{
  "components": {
    "schemas": {
      "Envelope": {
        "properties": {
          "data": {
            "description": "依动作返回的安全摘要、任务、列表或文件"
          },
          "error": {
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "retryable": {
                "type": "boolean"
              }
            },
            "type": "object"
          },
          "request_id": {
            "format": "uuid",
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "description": "session/create 返回的300秒证书绑定令牌",
        "scheme": "bearer",
        "type": "http"
      },
      "mutualTLS": {
        "description": "御安批准的客户端证书",
        "type": "mutualTLS"
      }
    }
  },
  "info": {
    "description": "大迈御安 HTTP / MCP 逐接口开发文档。店铺和本地 Profile 支持页面请求、URL 响应监听及按需 CDP；真实调试从御安的在线调试入口打开。",
    "title": "大迈御安 MCP / RPC API",
    "version": "1.0.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/approval/get": {
      "post": {
        "description": "查询当前 Agent 任务的审批状态。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_approval_get`，参数与 HTTP 请求体相同。",
        "operationId": "approval_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询当前 Agent 任务的审批状态",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_approval_get"
      }
    },
    "/artifact/get": {
      "post": {
        "description": "读取本客户端临时文件。读取当前客户端未过期截图的MIME、有效期与content_base64。文件不能跨部署、网关账号、客户端读取，不接受本地路径。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_artifact_get`，参数与 HTTP 请求体相同。",
        "operationId": "artifact_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "artifact_id": "art_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "artifact_id": {
                    "description": "临时文件：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "artifact_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "artifact_id": "art_example",
                    "content_base64": "iVBORw0KGgo…",
                    "mime_type": "image/png"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "artifact_id": {
                          "description": "文件：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "local_path": {
                          "description": "文件已校验的本机完整路径",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "mime_type": {
                          "description": "MIME 类型",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "sha256": {
                          "description": "文件 SHA256",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "size": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "读取本客户端临时文件",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_artifact_get"
      }
    },
    "/artifact/save": {
      "post": {
        "description": "取得已校验的授权文件及本机路径。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_artifact_save`，参数与 HTTP 请求体相同。",
        "operationId": "artifact_save",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "artifact_id": "art_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "artifact_id": {
                    "description": "文件：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "artifact_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "artifact_id": {
                          "description": "文件：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "local_path": {
                          "description": "文件已校验的本机完整路径",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "mime_type": {
                          "description": "MIME 类型",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "sha256": {
                          "description": "文件 SHA256",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "size": {
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "取得已校验的授权文件及本机路径",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_artifact_save"
      }
    },
    "/capability/get": {
      "post": {
        "description": "可用能力与限制。返回可用动作、传输类型、速率限制和浏览器适配器；旧内核可启动但不支持页面操作。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_capability_get`，参数与 HTTP 请求体相同。",
        "operationId": "capability_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "api_versions": [
                      "1"
                    ],
                    "browser_adapters": [
                      "damai_bridge"
                    ],
                    "limits": {
                      "concurrent_preparations": 2,
                      "requests_per_second": 20
                    },
                    "supported_operations": [
                      "context.get",
                      "shop.list",
                      "shop.open"
                    ],
                    "transports": [
                      "stdio",
                      "https-mtls"
                    ]
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "api_versions": {
                          "items": {
                            "description": "API主版本",
                            "maxLength": 4096,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "browser_adapters": {
                          "items": {
                            "description": "适配器",
                            "maxLength": 4096,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "limits": {
                          "description": "requests_per_second=20、concurrent_preparations=2",
                          "type": "object"
                        },
                        "supported_operations": {
                          "items": {
                            "description": "名词.动作",
                            "maxLength": 4096,
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "transports": {
                          "items": {
                            "description": "传输类型",
                            "maxLength": 4096,
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "可用能力与限制",
        "tags": [
          "身份、会话与连接"
        ],
        "x-mcp-tool": "damai_capability_get"
      }
    },
    "/client/list": {
      "post": {
        "description": "查询当前 Agent 的身份与授权。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_client_list`，参数与 HTTP 请求体相同。",
        "operationId": "client_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询当前 Agent 的身份与授权",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_client_list"
      }
    },
    "/connection/check": {
      "post": {
        "description": "检查连接授权及登记配置。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_connection_check`，参数与 HTTP 请求体相同。",
        "operationId": "connection_check",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "检查连接授权及登记配置",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_connection_check"
      }
    },
    "/connection/get": {
      "post": {
        "description": "读取指定连接摘要。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_connection_get`，参数与 HTTP 请求体相同。",
        "operationId": "connection_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "读取指定连接摘要",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_connection_get"
      }
    },
    "/connection/list": {
      "post": {
        "description": "列出店铺获授权的平台连接。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_connection_list`，参数与 HTTP 请求体相同。",
        "operationId": "connection_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "列出店铺获授权的平台连接",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_connection_list"
      }
    },
    "/context/get": {
      "post": {
        "description": "当前网关账号与部署。返回当前网关账号、所属公司、部署、策略版本、御安状态与软件版本，不接受调用方切换身份。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_context_get`，参数与 HTTP 请求体相同。",
        "operationId": "context_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "automation_permission_mode": "full",
                    "company_id": "102",
                    "console_state": "online",
                    "deployment_id": "damai-saas",
                    "employee_id": "10543"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "automation_permission_mode": {
                          "description": "权限",
                          "enum": [
                            "none",
                            "full"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "browser_version": {
                          "description": "浏览器版本",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "company_id": {
                          "description": "公司：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "console_state": {
                          "description": "当前连接状态",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "console_version": {
                          "description": "控制台版本",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "customer_code": {
                          "description": "大客户识别码；SaaS为null",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "deployment_id": {
                          "description": "部署：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "employee": {
                          "description": "id、username、name",
                          "type": "object"
                        },
                        "employee_id": {
                          "description": "员工：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "gateway_account_id": {
                          "description": "网关账号：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "node_id": {
                          "description": "节点：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "policy_revision": {
                          "description": "授权版本",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "user_code": {
                          "description": "当前员工编码",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "当前网关账号与部署",
        "tags": [
          "身份、会话与连接"
        ],
        "x-mcp-tool": "damai_context_get"
      }
    },
    "/control/acquire": {
      "post": {
        "description": "申请独占控制租约。按运行实例申请60秒独占控制租约。同一客户端可复用，其他客户端收到RUNTIME_BUSY。MCP桥接程序每20秒续租；普通HTTP调用者自行续租。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_control_acquire`，参数与 HTTP 请求体相同。",
        "operationId": "control_acquire",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "purpose": {
                    "description": "任务用途",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "expires_at": "2026-10-23T08:01:00Z",
                    "lease_id": "lease_example",
                    "runtime_id": "rt_example"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "expires_at": {
                          "description": "实际有效期，最多60秒且不能越过HTTP会话有效期",
                          "format": "date-time",
                          "type": "string"
                        },
                        "lease_id": {
                          "description": "控制租约：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "runtime_id": {
                          "description": "运行实例：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "申请独占控制租约",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-mcp-tool": "damai_control_acquire"
      }
    },
    "/control/release": {
      "post": {
        "description": "释放控制权并保留窗口。释放当前客户端控制租约，窗口保留。后续页面动作必须重新申请控制权。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_control_release`，参数与 HTTP 请求体相同。",
        "operationId": "control_release",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "lease_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "released": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "released": {
                          "description": "是否释放",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "释放控制权并保留窗口",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-mcp-tool": "damai_control_release"
      }
    },
    "/control/renew": {
      "post": {
        "description": "续租控制权。仅供连接层或HTTP脚本延长有效租约，不暴露为模型工具；建议每20秒续租。过期后重新申请，不能恢复旧控制权。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n此接口用于连接管理，不暴露为 MCP 模型工具。",
        "operationId": "control_renew",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "lease_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "expires_at": "2026-10-23T08:01:00Z",
                    "lease_id": "lease_example",
                    "runtime_id": "rt_example"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "expires_at": {
                          "description": "实际有效期，最多60秒且不能越过HTTP会话有效期",
                          "format": "date-time",
                          "type": "string"
                        },
                        "lease_id": {
                          "description": "控制租约：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "runtime_id": {
                          "description": "运行实例：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "续租控制权",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-mcp-tool": "damai_control_renew"
      }
    },
    "/download/get": {
      "post": {
        "description": "获取任务下载结果。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_download_get`，参数与 HTTP 请求体相同。",
        "operationId": "download_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example",
                "wait_timeout_ms": 10000
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "wait_timeout_ms": {
                    "description": "等待时限毫秒",
                    "maximum": 25000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "获取任务下载结果",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_download_get"
      }
    },
    "/download/list": {
      "post": {
        "description": "查询任务的文件结果。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_download_list`，参数与 HTTP 请求体相同。",
        "operationId": "download_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example",
                "wait_timeout_ms": 10000
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "wait_timeout_ms": {
                    "description": "等待时限毫秒",
                    "maximum": 25000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询任务的文件结果",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_download_list"
      }
    },
    "/download/wait": {
      "post": {
        "description": "最多等待 25 秒查询下载结果。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_download_wait`，参数与 HTTP 请求体相同。",
        "operationId": "download_wait",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example",
                "wait_timeout_ms": 10000
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "wait_timeout_ms": {
                    "description": "等待时限毫秒",
                    "maximum": 25000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "最多等待 25 秒查询下载结果",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_download_wait"
      }
    },
    "/event/poll": {
      "post": {
        "description": "长轮询本客户端事件。POST长轮询，默认25秒、最多30秒。after_event_id首次可省略，后续使用next_event_id；limit默认100、最多500。游标过期返回EVENT_CURSOR_EXPIRED，不以GET或SSE替代。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_event_poll`，参数与 HTTP 请求体相同。",
        "operationId": "event_poll",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50,
                "wait_timeout_ms": 10000
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "after_event_id": {
                    "description": "事件游标：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "limit": {
                    "description": "最多事件数",
                    "maximum": 500,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "wait_timeout_ms": {
                    "description": "最多等待毫秒",
                    "maximum": 30000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "has_more": false,
                    "items": [],
                    "next_event_id": "evt_42"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "has_more": {
                          "description": "是否继续读取",
                          "type": "boolean"
                        },
                        "items": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "data": {
                                "description": "事件负载，无页面正文和凭据"
                              },
                              "event_id": {
                                "description": "事件：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "occurred_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "type": {
                                "description": "事件类型",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "next_event_id": {
                          "description": "下次轮询游标：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "长轮询本客户端事件",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_event_poll"
      }
    },
    "/health/get": {
      "post": {
        "description": "本机服务健康状态。在完成身份和权限验证后返回本机服务状态；不作为匿名探测接口。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_health_get`，参数与 HTTP 请求体相同。",
        "operationId": "health_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "api_version": "1",
                    "state": "ready"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "api_version": {
                          "description": "1",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "state": {
                          "description": "ready",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "本机服务健康状态",
        "tags": [
          "身份、会话与连接"
        ],
        "x-mcp-tool": "damai_health_get"
      }
    },
    "/job/cancel": {
      "post": {
        "description": "尽力取消任务。尽力取消排队或运行中的任务，返回当前任务状态。已经提交给网页的点击、导航或表单不能保证回滚。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_job_cancel`，参数与 HTTP 请求体相同。",
        "operationId": "job_cancel",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "job_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "job_id": {
                          "description": "任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "状态",
                          "enum": [
                            "waiting_approval",
                            "queued",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled",
                            "outcome_unknown",
                            "cancel_requested",
                            "interrupted"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "尽力取消任务",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_job_cancel"
      }
    },
    "/job/get": {
      "post": {
        "description": "查询异步任务。仅创建任务的客户端在同一网关账号授权范围内查询。state为queued/running/succeeded/failed/cancel_requested/cancelled/interrupted，副作用状态effect_state为not_applied/applied/unknown；wait最多30秒。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_job_get`，参数与 HTTP 请求体相同。",
        "operationId": "job_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "effect_state": "applied",
                    "error": null,
                    "job_id": "job_example",
                    "result": {
                      "automation_state": "ready",
                      "runtime_id": "rt_example"
                    },
                    "state": "succeeded"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "job_id": {
                          "description": "任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "状态",
                          "enum": [
                            "waiting_approval",
                            "queued",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled",
                            "outcome_unknown",
                            "cancel_requested",
                            "interrupted"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询异步任务",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_job_get"
      }
    },
    "/job/wait": {
      "post": {
        "description": "有界等待异步任务。仅创建任务的客户端在同一网关账号授权范围内查询。state为queued/running/succeeded/failed/cancel_requested/cancelled/interrupted，副作用状态effect_state为not_applied/applied/unknown；wait最多30秒。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_job_wait`，参数与 HTTP 请求体相同。",
        "operationId": "job_wait",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "job_id": "job_example",
                "wait_timeout_ms": 10000
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "job_id": {
                    "description": "任务：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "wait_timeout_ms": {
                    "description": "最多等待毫秒",
                    "maximum": 30000,
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "job_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "effect_state": "applied",
                    "error": null,
                    "job_id": "job_example",
                    "result": {
                      "automation_state": "ready",
                      "runtime_id": "rt_example"
                    },
                    "state": "succeeded"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": true,
                      "properties": {
                        "job_id": {
                          "description": "任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "状态",
                          "enum": [
                            "waiting_approval",
                            "queued",
                            "running",
                            "succeeded",
                            "failed",
                            "cancelled",
                            "outcome_unknown",
                            "cancel_requested",
                            "interrupted"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "有界等待异步任务",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_job_wait"
      }
    },
    "/page/check": {
      "post": {
        "description": "设置复选或单选状态。将复选框或单选框设置到指定状态；已经匹配时不重复点击。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_check`，参数与 HTTP 请求体相同。",
        "operationId": "page_check",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "checked": true,
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "checked": {
                    "description": "目标勾选状态",
                    "type": "boolean"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "checked",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "设置复选或单选状态",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "本地派发成功；不代表网站业务成功",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_check"
      }
    },
    "/page/click": {
      "post": {
        "description": "点击唯一元素。元素必须唯一、可见且未禁用。只允许结构化定位器或当前文档element_ref；锁定的账号密码DOM拒绝改动。点击可能提交订单，调用者负责业务确认。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_click`，参数与 HTTP 请求体相同。",
        "operationId": "page_click",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "button": {
                    "description": "鼠标键",
                    "enum": [
                      "left",
                      "right",
                      "middle"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "点击唯一元素",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "本地派发成功；不代表网站业务成功",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_click"
      }
    },
    "/page/extract": {
      "post": {
        "description": "提取文字和允许属性。提取text、href、title、aria-label白名单字段。默认严格唯一，many可读取多个，最多500条；不提供value、HTML、Cookie、任意属性或脚本。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_page_extract`，参数与 HTTP 请求体相同。",
        "operationId": "page_extract",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "limit": 50,
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "fields": {
                    "items": {
                      "description": "字段",
                      "enum": [
                        "text",
                        "href",
                        "title",
                        "aria-label"
                      ],
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxItems": 4,
                    "type": "array"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "limit": {
                    "description": "最大项数",
                    "maximum": 500,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "many": {
                    "description": "允许多个元素",
                    "type": "boolean"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "提取文字和允许属性",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "items": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "aria-label": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "element_ref": {
                    "description": "元素引用：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "href": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "text": {
                    "description": "文字",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "title": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_extract"
      }
    },
    "/page/fill": {
      "post": {
        "description": "填写可编辑输入框。直接填写唯一可编辑输入框并派发input/change，不先清空产生可见闪动；账号密码锁定的DOM返回CREDENTIAL_FIELD_LOCKED。内容不写入持久日志或审计。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_fill`，参数与 HTTP 请求体相同。",
        "operationId": "page_fill",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                },
                "value": "公开汇率"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "value": {
                    "description": "新内容；不会回传原值",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "value",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "填写可编辑输入框",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "本地派发成功；不代表网站业务成功",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_fill"
      }
    },
    "/page/listen": {
      "post": {
        "description": "在指定标签页监听url_patterns中的多个URL通配规则，*匹配任意长度、?匹配单字符。resource_types可选XHR、Fetch、Document等；默认监听全部HTTP响应。返回listener_id，使用page/poll读取，page/unlisten停止。默认5分钟、最长10分钟；导航后继续监听，标签页关闭自动释放。正文默认256KiB、最大1MiB；缓冲32条/8MiB，溢出报告dropped。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_listen`，参数与 HTTP 请求体相同。",
        "operationId": "page_listen",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "url_patterns": [
                  "https://www.example.com/api/*",
                  "https://www.example.com/reports/*"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "lifetime_ms": {
                    "description": "监听时长，默认300000；到期自动释放",
                    "maximum": 600000,
                    "minimum": 1000,
                    "type": "integer"
                  },
                  "max_response_bytes": {
                    "description": "每个响应正文上限，默认262144",
                    "maximum": 1048576,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "resource_types": {
                    "items": {
                      "description": "可选CDP类型：XHR、Fetch、Document等；省略监听所有HTTP响应",
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxItems": 20,
                    "type": "array"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "url_patterns": {
                    "items": {
                      "description": "完整URL通配规则；*任意长度，?单字符",
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxItems": 50,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "url_patterns",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "监听指定URL的网络响应",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "listener_id": {
              "description": "仅当前Agent和标签页可读取的响应监听：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "listener_id"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_page_listen"
      }
    },
    "/page/navigate": {
      "post": {
        "description": "页面导航。导航到公开HTTP/HTTPS网址，按wait_until等待none、DOMContentLoaded或load；默认30秒，最多60秒。只代表加载条件，不代表网站业务成功。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_navigate`，参数与 HTTP 请求体相同。",
        "operationId": "page_navigate",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "url": "https://www.example.com/"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "url": {
                    "description": "目标网址",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "wait_until": {
                    "description": "等待状态",
                    "enum": [
                      "none",
                      "domcontentloaded",
                      "load"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "url",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "页面导航",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "navigation_started": {
              "description": "wait_until=none时仅表示开始导航",
              "type": "boolean"
            },
            "ready_state": {
              "description": "文档就绪状态",
              "enum": [
                "loading",
                "interactive",
                "complete"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "url": {
              "description": "当前文档网址",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_navigate"
      }
    },
    "/page/poll": {
      "post": {
        "description": "需要当前Agent的listener_id、runtime_id、tab_id及有效lease_id。读取并移出缓冲结果，limit默认10、最大20，并限制单次返回总大小。返回HTTP元数据、body_base64、truncated、body_error、has_more、累计dropped。正文为浏览器解码后的数据，不是TLS原始报文；其他Agent或标签页不能读取。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_poll`，参数与 HTTP 请求体相同。",
        "operationId": "page_poll",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "limit": 10,
                "listener_id": "listen_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "limit": {
                    "description": "本次读取条数，默认10",
                    "maximum": 20,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "listener_id": {
                    "description": "监听：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "listener_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "读取响应监听结果",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "dropped": {
              "description": "累计因缓存上限丢弃的响应数",
              "maximum": 2147483647,
              "minimum": 0,
              "type": "integer"
            },
            "has_more": {
              "description": "还有缓存响应",
              "type": "boolean"
            },
            "items": {
              "items": {
                "additionalProperties": true,
                "description": "Chromium Network.responseReceived响应元数据，附正文及请求标识",
                "properties": {
                  "body_base64": {
                    "description": "正文Base64",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "body_bytes": {
                    "description": "返回的正文字节数",
                    "maximum": 1048576,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "body_error": {
                    "description": "正文不可用或请求中断时的原因",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "headers": {
                    "type": "object"
                  },
                  "headers_text": {
                    "description": "Chromium可提供时的原始响应头",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "network_request_id": {
                    "description": "Chromium网络请求标识",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "resource_type": {
                    "description": "资源类型，如Fetch、XHR、Document",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "status": {
                    "type": "number"
                  },
                  "truncated": {
                    "description": "正文被截断",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "响应网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "listener_id": {
              "description": "监听：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "listener_id",
            "items",
            "has_more",
            "dropped"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_page_poll"
      }
    },
    "/page/press": {
      "post": {
        "description": "向元素发送限定按键。仅接受单字符或限定Enter、Tab、Escape、Backspace、Delete和方向等按键，不接受操作系统快捷键或任意脚本。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_press`，参数与 HTTP 请求体相同。",
        "operationId": "page_press",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "key": "Enter",
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "key": {
                    "description": "单字符或Enter/Tab/Escape等限定键",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "key",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "向元素发送限定按键",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "本地派发成功；不代表网站业务成功",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_press"
      }
    },
    "/page/request": {
      "post": {
        "description": "通过当前页面Fetch执行HTTP请求，复用代理与Cookie发送规则，遵守CORS/CSP。支持method、headers、body或body_base64、credentials、timeout_ms、max_response_bytes。返回HTTP状态、可读响应头、body_text、body_base64和truncated，4xx/5xx仍返回响应；网络/CORS失败返回错误。返回job_id，用job/wait读取。不接收任意JS。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_request`，参数与 HTTP 请求体相同。",
        "operationId": "page_request",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "url": "https://www.example.com/"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "body": {
                    "description": "请求正文；与body_base64二选一",
                    "maxLength": 262144,
                    "type": "string"
                  },
                  "body_base64": {
                    "description": "二进制请求正文的Base64",
                    "maxLength": 349528,
                    "type": "string"
                  },
                  "credentials": {
                    "description": "Cookie策略，默认same-origin",
                    "enum": [
                      "omit",
                      "same-origin",
                      "include"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "headers": {
                    "additionalProperties": {
                      "description": "请求头值",
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxProperties": 50,
                    "type": "object"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "max_response_bytes": {
                    "description": "响应正文上限，默认262144；超出标记truncated",
                    "maximum": 1048576,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "method": {
                    "description": "HTTP方法，默认GET",
                    "enum": [
                      "GET",
                      "HEAD",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE",
                      "OPTIONS"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "url": {
                    "description": "完整http/https URL；复用浏览器Cookie规则与代理，遵守CORS",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "url",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "在指定标签页发起异步请求",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "body_base64": {
              "description": "响应正文原始字节的Base64",
              "maxLength": 4096,
              "type": "string"
            },
            "body_bytes": {
              "description": "返回的正文字节数",
              "maximum": 1048576,
              "minimum": 0,
              "type": "integer"
            },
            "body_text": {
              "description": "正文的UTF-8解码；二进制请使用body_base64",
              "maxLength": 4096,
              "type": "string"
            },
            "headers": {
              "additionalProperties": {
                "type": "string"
              },
              "description": "Fetch允许页面读取的响应头",
              "type": "object"
            },
            "redirected": {
              "description": "发生过重定向",
              "type": "boolean"
            },
            "response_type": {
              "description": "Fetch响应类型",
              "maxLength": 4096,
              "type": "string"
            },
            "status": {
              "description": "HTTP状态码；4xx/5xx也正常返回",
              "maximum": 599,
              "minimum": 0,
              "type": "integer"
            },
            "status_text": {
              "description": "HTTP状态文字",
              "maxLength": 4096,
              "type": "string"
            },
            "truncated": {
              "description": "正文超过max_response_bytes而截断",
              "type": "boolean"
            },
            "url": {
              "description": "实际响应网址",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "url",
            "status",
            "headers",
            "body_base64",
            "body_bytes",
            "truncated"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_page_request"
      }
    },
    "/page/screenshot": {
      "post": {
        "description": "截取页面图片。截图生成10分钟有效的artifact_id，通过artifact/get读取base64。临时图片仅当前客户端访问，不持久化到磁盘。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_screenshot`，参数与 HTTP 请求体相同。",
        "operationId": "page_screenshot",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "full_page": {
                    "description": "是否截取整页",
                    "type": "boolean"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "截取页面图片",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "artifact_id": {
              "description": "用artifact/get取图片：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "expires_at": {
              "format": "date-time",
              "type": "string"
            },
            "mime_type": {
              "description": "image/png",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "artifact_id"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_page_screenshot"
      }
    },
    "/page/scroll": {
      "post": {
        "description": "滚动页面或元素。按delta_x、delta_y滚动页面或指定唯一元素。位移有上限，避免无界操作。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_scroll`，参数与 HTTP 请求体相同。",
        "operationId": "page_scroll",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "delta_y": 600,
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "delta_x": {
                    "description": "水平位移",
                    "maximum": 100000,
                    "minimum": -100000,
                    "type": "integer"
                  },
                  "delta_y": {
                    "description": "垂直位移",
                    "maximum": 100000,
                    "minimum": -100000,
                    "type": "integer"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "滚动页面或元素",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "scrolled": {
              "description": "已派发滚动",
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_scroll"
      }
    },
    "/page/select": {
      "post": {
        "description": "选择下拉项。根据values选择HTML下拉框中已有选项，并派发变化事件；目标须唯一且可编辑。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_select`，参数与 HTTP 请求体相同。",
        "operationId": "page_select",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "exact": true,
                    "type": "css",
                    "value": "#search"
                  }
                },
                "values": [
                  "USD"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "values": {
                    "items": {
                      "description": "选项值",
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxItems": 100,
                    "type": "array"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "values",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "选择下拉项",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "本地派发成功；不代表网站业务成功",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_select"
      }
    },
    "/page/snapshot": {
      "post": {
        "description": "页面结构与元素快照。返回一次文档生命周期内的document_id、Frame、可见交互元素引用及有限正文；不导出input.value、密码、Cookie或TOTP。导航后重新获取，旧元素引用失效。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_page_snapshot`，参数与 HTTP 请求体相同。",
        "operationId": "page_snapshot",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "max_chars": {
                    "description": "最大文本长度",
                    "maximum": 100000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "页面结构与元素快照",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "elements": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "disabled": {
                    "description": "是否禁用",
                    "type": "boolean"
                  },
                  "element_ref": {
                    "description": "临时元素引用：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "name": {
                    "description": "可访问名称",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "read_only": {
                    "description": "DOM只读状态；内核凭据锁还会单独校验",
                    "type": "boolean"
                  },
                  "role": {
                    "description": "角色",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "tag": {
                    "description": "标签",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "type": {
                    "description": "输入类型",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "text": {
              "description": "页面可见文字，最多max_chars",
              "maxLength": 100000,
              "type": "string"
            },
            "title": {
              "description": "标题",
              "maxLength": 4096,
              "type": "string"
            },
            "url": {
              "description": "文档网址",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_snapshot"
      }
    },
    "/page/unlisten": {
      "post": {
        "description": "停止当前Agent、当前标签页的listener_id，清空内存缓冲并释放内部DevTools会话。需要有效控制租约。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_unlisten`，参数与 HTTP 请求体相同。",
        "operationId": "page_unlisten",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "listener_id": "listen_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "listener_id": {
                    "description": "监听：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "listener_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "停止响应监听",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "stopped": {
              "description": "监听已停止并清理缓存",
              "type": "boolean"
            }
          },
          "required": [
            "stopped"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_page_unlisten"
      }
    },
    "/page/upload": {
      "post": {
        "description": "只允许当前运行店铺的上传目录内的一个普通文件；拒绝目录联接、符号链接和备用数据流。以querySelector语义选取主文档中第一个CSS匹配项，目标须为可用的文件输入框；未找到时返回ELEMENT_NOT_FOUND。需要独占控制租约与page/upload工具授权。不开放任意CDP或JavaScript。选择后尚未提交，提交需另行page/click。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_page_upload`，参数与 HTTP 请求体相同。",
        "operationId": "page_upload",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "files": [
                  "D:\\DamaiUpload\\360过白(dsbrowser@leaddeal.cn)\\DamaiConsole_v2.0.1.exe"
                ],
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example",
                "target": {
                  "locator": {
                    "type": "css",
                    "value": "input[type=file]"
                  }
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "files": {
                    "items": {
                      "description": "当前店铺上传目录内的绝对文件路径；仅支持主文档CSS文件输入框",
                      "maxLength": 4096,
                      "type": "string"
                    },
                    "maxItems": 1,
                    "minItems": 1,
                    "type": "array"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "主文档CSS定位器：按querySelector语义选择第一个匹配项",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "target",
                  "files",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "选择店铺上传目录内的文件",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "applied": {
              "description": "文件已选入输入框；不代表网站已提交",
              "type": "boolean"
            },
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "file_count": {
              "description": "已选文件数",
              "maximum": 1,
              "minimum": 1,
              "type": "integer"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_upload"
      }
    },
    "/page/wait": {
      "post": {
        "description": "等待元素或加载状态。在限定时间内等待元素attached、visible、editable、hidden或页面加载状态；采用轮询，不会无限阻塞御安。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_page_wait`，参数与 HTTP 请求体相同。",
        "operationId": "page_wait",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "condition": "visible",
                "lease_id": "lease_example",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "condition": {
                    "description": "等待条件",
                    "enum": [
                      "attached",
                      "visible",
                      "editable",
                      "hidden",
                      "domcontentloaded",
                      "load"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "target": {
                    "description": "元素引用或严格唯一的定位器",
                    "oneOf": [
                      {
                        "additionalProperties": false,
                        "properties": {
                          "element_ref": {
                            "description": "元素引用：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          }
                        },
                        "required": [
                          "element_ref"
                        ],
                        "type": "object"
                      },
                      {
                        "additionalProperties": false,
                        "properties": {
                          "frame_id": {
                            "description": "Frame：由服务返回的不透明标识",
                            "maxLength": 128,
                            "minLength": 1,
                            "type": "string"
                          },
                          "locator": {
                            "additionalProperties": false,
                            "properties": {
                              "exact": {
                                "description": "默认true，精确匹配",
                                "type": "boolean"
                              },
                              "name": {
                                "description": "role定位的名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "type": {
                                "description": "定位方式",
                                "enum": [
                                  "role",
                                  "label",
                                  "text",
                                  "css"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "value": {
                                "description": "定位表达式",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "required": [
                              "type",
                              "value"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "locator"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "condition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "等待元素或加载状态",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "document_id": {
              "description": "文档：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frame_id": {
              "description": "Frame：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "frames": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "frame_id": {
                    "description": "Frame：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "main": {
                    "description": "主文档",
                    "type": "boolean"
                  },
                  "url": {
                    "description": "文档网址",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "type": "object"
              },
              "type": "array"
            },
            "satisfied": {
              "description": "等待条件已满足",
              "type": "boolean"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_page_wait"
      }
    },
    "/profile/clear": {
      "post": {
        "description": "清空已关闭的本地Profile的Cookie、缓存和浏览器数据，保留Profile标识、代理及窗口配置；不改变传给内核的Profile标识。confirm_profile_id必须一致。返回异步任务，通过job/wait确认。先正常关闭窗口；清理与启动互斥，拒绝目录逃逸及Windows目录联接，不影响其他Profile或真实店铺。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_profile_clear`，参数与 HTTP 请求体相同。",
        "operationId": "profile_clear",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "confirm_profile_id": "auto_fx_daily",
                "profile_id": "auto_fx_daily",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "confirm_profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "profile_id",
                  "confirm_profile_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "清空本地浏览器数据并保留Profile配置",
        "tags": [
          "自由启动 Profile"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "cleared": {
              "description": "浏览器数据已清理",
              "type": "boolean"
            },
            "configuration_preserved": {
              "description": "代理及Profile标识仍保留",
              "type": "boolean"
            },
            "deleted": {
              "description": "配置已删除",
              "type": "boolean"
            },
            "profile_id": {
              "description": "本地Profile：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "profile_id",
            "cleared",
            "deleted",
            "configuration_preserved"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_profile_clear"
      }
    },
    "/profile/create": {
      "post": {
        "description": "创建本地独立店铺，不创建商户中心记录或上传Cookie。profile_id以auto_开头，省略自动生成，对应内核--dm-shop-code。window_title设置标题；proxy_td设置落地代理，proxy_relay可选，均包含scheme/host/port及可选username/password；兼容旧proxy但不可与proxy_td同时传入。storage_mode默认persistent保留数据，ephemeral每次关闭后清理浏览器数据并保留配置。密码由Windows DPAPI保护。需要Agent对应工具权限或完整权限。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_profile_create`，参数与 HTTP 请求体相同。",
        "operationId": "profile_create",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "display_name": "每日公开汇率",
                "profile_id": "auto_fx_daily",
                "proxy_relay": {
                  "host": "relay.example.invalid",
                  "password": "EXAMPLE_ONLY",
                  "port": 443,
                  "scheme": "https",
                  "username": "example_user"
                },
                "proxy_td": {
                  "host": "proxy.example.invalid",
                  "password": "EXAMPLE_ONLY",
                  "port": 1080,
                  "scheme": "socks5",
                  "username": "example_user"
                },
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "storage_mode": "persistent",
                "window_title": "汇率采集"
              },
              "schema": {
                "additionalProperties": false,
                "oneOf": [
                  {
                    "not": {
                      "required": [
                        "proxy"
                      ]
                    },
                    "required": [
                      "proxy_td"
                    ]
                  },
                  {
                    "not": {
                      "required": [
                        "proxy_td"
                      ]
                    },
                    "required": [
                      "proxy"
                    ]
                  }
                ],
                "properties": {
                  "display_name": {
                    "description": "显示名称；省略使用窗口标题或Profile ID",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "proxy": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理主机",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "mode": {
                        "description": "代理模式",
                        "enum": [
                          "direct",
                          "custom",
                          "reference"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写；省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "代理端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "proxy_ref": {
                        "description": "授权代理引用：由服务返回的不透明标识",
                        "maxLength": 128,
                        "minLength": 1,
                        "type": "string"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "代理用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "type": "object"
                  },
                  "proxy_relay": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理IP或域名，不包含协议或认证",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写密码；更新省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "scheme",
                      "host",
                      "port"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "proxy_td": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理IP或域名，不包含协议或认证",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写密码；更新省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "scheme",
                      "host",
                      "port"
                    ],
                    "type": "object"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "storage_mode": {
                    "description": "默认persistent保留本机数据；ephemeral每次关闭后清理浏览器数据，保留配置",
                    "enum": [
                      "persistent",
                      "ephemeral"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "window_title": {
                    "description": "浏览器窗口标题",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-23T08:00:00Z",
                    "display_name": "每日公开汇率",
                    "profile_id": "auto_fx_daily",
                    "proxy": {
                      "mode": "direct",
                      "password_configured": false
                    }
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "disk_usage_bytes": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "display_name": {
                          "description": "显示名称",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "last_opened_at": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "profile_id": {
                          "description": "自由Profile：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "proxy": {
                          "description": "代理摘要，无password，含password_configured。",
                          "type": "object"
                        },
                        "proxy_relay": {
                          "description": "跳板代理摘要，绝不回传密码",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "proxy_td": {
                          "type": "object"
                        },
                        "running": {
                          "description": "本机浏览器是否正在运行",
                          "type": "boolean"
                        },
                        "storage_mode": {
                          "description": "本机数据保留方式",
                          "enum": [
                            "persistent",
                            "ephemeral"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "updated_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "window_title": {
                          "description": "窗口标题",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "创建独立Profile与代理配置",
        "tags": [
          "自由启动 Profile"
        ],
        "x-mcp-tool": "damai_profile_create"
      }
    },
    "/profile/delete": {
      "post": {
        "description": "删除已关闭Profile的配置及本地浏览器数据，confirm_profile_id必须一致；返回异步任务，用job/wait确认。运行中或启动中的环境不会被删除。不影响真实店铺或云端Cookie。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_profile_delete`，参数与 HTTP 请求体相同。",
        "operationId": "profile_delete",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "confirm_profile_id": "auto_fx_daily",
                "profile_id": "auto_fx_daily",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "confirm_profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "profile_id",
                  "confirm_profile_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "删除未运行的本地Profile",
        "tags": [
          "自由启动 Profile"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "cleared": {
              "description": "浏览器数据已清理",
              "type": "boolean"
            },
            "configuration_preserved": {
              "description": "代理及Profile标识仍保留",
              "type": "boolean"
            },
            "deleted": {
              "description": "配置已删除",
              "type": "boolean"
            },
            "profile_id": {
              "description": "本地Profile：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "profile_id",
            "cleared",
            "deleted",
            "configuration_preserved"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_profile_delete"
      }
    },
    "/profile/get": {
      "post": {
        "description": "查询当前账号本机Profile详情，包括running、disk_usage_bytes、last_opened_at、window_title、storage_mode及代理摘要；不回传任何代理密码。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_profile_get`，参数与 HTTP 请求体相同。",
        "operationId": "profile_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "profile_id": "auto_fx_daily"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "profile_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-23T08:00:00Z",
                    "display_name": "每日公开汇率",
                    "profile_id": "auto_fx_daily",
                    "proxy": {
                      "mode": "direct",
                      "password_configured": false
                    }
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "disk_usage_bytes": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "display_name": {
                          "description": "显示名称",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "last_opened_at": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "profile_id": {
                          "description": "自由Profile：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "proxy": {
                          "description": "代理摘要，无password，含password_configured。",
                          "type": "object"
                        },
                        "proxy_relay": {
                          "description": "跳板代理摘要，绝不回传密码",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "proxy_td": {
                          "type": "object"
                        },
                        "running": {
                          "description": "本机浏览器是否正在运行",
                          "type": "boolean"
                        },
                        "storage_mode": {
                          "description": "本机数据保留方式",
                          "enum": [
                            "persistent",
                            "ephemeral"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "updated_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "window_title": {
                          "description": "窗口标题",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询Profile配置摘要",
        "tags": [
          "自由启动 Profile"
        ],
        "x-mcp-tool": "damai_profile_get"
      }
    },
    "/profile/list": {
      "post": {
        "description": "查询当前智能体账号本地Profile，支持名称、ID、窗口标题快搜及分页。返回running、disk_usage_bytes、last_opened_at、创建时间和代理摘要；跳板及落地密码均不回传。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_profile_list`，参数与 HTTP 请求体相同。",
        "operationId": "profile_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "cursor": {
                    "description": "上一页返回的游标",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "limit": {
                    "description": "每页数量，默认50",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "query": {
                    "description": "名称或编码模糊搜索",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "as_of": "2026-10-23T08:00:00Z",
                    "items": [],
                    "next_cursor": null,
                    "total": 0
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "as_of": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "items": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "created_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "disk_usage_bytes": {
                                "minimum": 0,
                                "type": "integer"
                              },
                              "display_name": {
                                "description": "显示名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "last_opened_at": {
                                "format": "date-time",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "profile_id": {
                                "description": "自由Profile：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "proxy": {
                                "description": "代理摘要，无password，含password_configured。",
                                "type": "object"
                              },
                              "proxy_relay": {
                                "description": "跳板代理摘要，绝不回传密码",
                                "type": [
                                  "object",
                                  "null"
                                ]
                              },
                              "proxy_td": {
                                "type": "object"
                              },
                              "running": {
                                "description": "本机浏览器是否正在运行",
                                "type": "boolean"
                              },
                              "storage_mode": {
                                "description": "本机数据保留方式",
                                "enum": [
                                  "persistent",
                                  "ephemeral"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "updated_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "window_title": {
                                "description": "窗口标题",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "description": "完整匹配数量",
                          "maximum": 2147483647,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "items",
                        "total",
                        "next_cursor"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询本地独立Profile",
        "tags": [
          "自由启动 Profile"
        ],
        "x-mcp-tool": "damai_profile_list"
      }
    },
    "/profile/open": {
      "post": {
        "description": "使用独立automationData目录启动本地店铺，--dm-shop-code使用profile_id。initial_url默认about:blank；window_title可覆盖本次标题。按保存的跳板及落地配置启动Gost，代理失败不降级直连。同一Profile默认复用运行窗口。返回异步任务，通过job/wait获取runtime_id，再申请控制租约使用页面工具。与真实店铺、云同步及MFA凭据隔离。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_profile_open`，参数与 HTTP 请求体相同。",
        "operationId": "profile_open",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "enable_cdp": false,
                "profile_id": "auto_fx_daily",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "activate_window": {
                    "description": "默认true，激活窗口",
                    "type": "boolean"
                  },
                  "control_mode": {
                    "description": "控制模式，默认automation",
                    "enum": [
                      "automation",
                      "external_rpa"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "enable_cdp": {
                    "description": "默认false；开启后返回店铺本机CDP地址，需要runtime/cdp授权",
                    "type": "boolean"
                  },
                  "initial_url": {
                    "description": "启动网址，http或https",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "reuse_if_running": {
                    "description": "默认true，复用现有窗口",
                    "type": "boolean"
                  },
                  "window_title": {
                    "description": "本次窗口标题；省略沿用创建时配置",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "profile_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "自由启动浏览器",
        "tags": [
          "自由启动 Profile"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "automation_state": {
              "description": "自动化适配器状态",
              "enum": [
                "ready",
                "unsupported",
                "external",
                "closed"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "browser_state": {
              "description": "进程状态",
              "enum": [
                "running",
                "closed"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "browser_version": {
              "description": "本次内核版本",
              "maxLength": 4096,
              "type": "string"
            },
            "cdp": {
              "additionalProperties": false,
              "properties": {
                "http_url": {
                  "description": "连接Playwright的HTTP地址",
                  "maxLength": 4096,
                  "type": "string"
                },
                "port": {
                  "description": "本机CDP监听端口",
                  "maximum": 65535,
                  "minimum": 1,
                  "type": "integer"
                },
                "websocket_url": {
                  "description": "浏览器CDP WebSocket地址；仅开启它的Agent可获取",
                  "maxLength": 4096,
                  "type": "string"
                }
              },
              "required": [
                "port",
                "http_url",
                "websocket_url"
              ],
              "type": "object"
            },
            "initial_tab_id": {
              "description": "首个标签页：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "kind": {
              "description": "类型",
              "enum": [
                "shop",
                "free"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "profile_id": {
              "description": "自由Profile",
              "maxLength": 4096,
              "type": "string"
            },
            "readiness": {
              "additionalProperties": false,
              "properties": {
                "local_proxy": {
                  "description": "本地代理监听状态",
                  "enum": [
                    "ready",
                    "unavailable"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                },
                "page": {
                  "description": "启动时采样的页面状态；后续使用page/wait查询",
                  "enum": [
                    "unknown",
                    "loading",
                    "ready",
                    "error"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                },
                "upstream": {
                  "description": "当前不主动访问上游探测地址；有上游返回not_checked，直连返回not_required",
                  "enum": [
                    "not_checked",
                    "not_required"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "reused": {
              "description": "是否复用已有窗口",
              "type": "boolean"
            },
            "runtime_id": {
              "description": "运行实例：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "shop_code": {
              "description": "店铺编码",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_profile_open"
      }
    },
    "/profile/update": {
      "post": {
        "description": "修改已关闭的Profile。只允许修改已关闭的独立Profile。代理password省略保留、null删除；不接收任意目录和启动命令。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_profile_update`，参数与 HTTP 请求体相同。",
        "operationId": "profile_update",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "profile_id": "auto_fx_daily",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "display_name": {
                    "description": "显示名称；省略使用窗口标题或Profile ID",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "profile_id": {
                    "description": "自由Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "pattern": "^auto_[a-z0-9][a-z0-9_-]{0,58}$",
                    "type": "string"
                  },
                  "proxy": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理主机",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "mode": {
                        "description": "代理模式",
                        "enum": [
                          "direct",
                          "custom",
                          "reference"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写；省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "代理端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "proxy_ref": {
                        "description": "授权代理引用：由服务返回的不透明标识",
                        "maxLength": 128,
                        "minLength": 1,
                        "type": "string"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "代理用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "mode"
                    ],
                    "type": "object"
                  },
                  "proxy_relay": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理IP或域名，不包含协议或认证",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写密码；更新省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "scheme",
                      "host",
                      "port"
                    ],
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "proxy_td": {
                    "additionalProperties": false,
                    "properties": {
                      "host": {
                        "description": "代理IP或域名，不包含协议或认证",
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "password": {
                        "description": "只写密码；更新省略保留，null删除",
                        "maxLength": 4096,
                        "type": [
                          "string",
                          "null"
                        ],
                        "writeOnly": true
                      },
                      "port": {
                        "description": "端口",
                        "maximum": 65535,
                        "minimum": 1,
                        "type": "integer"
                      },
                      "scheme": {
                        "description": "代理协议",
                        "enum": [
                          "http",
                          "https",
                          "socks5"
                        ],
                        "maxLength": 4096,
                        "type": "string"
                      },
                      "username": {
                        "description": "用户名",
                        "maxLength": 4096,
                        "type": "string"
                      }
                    },
                    "required": [
                      "scheme",
                      "host",
                      "port"
                    ],
                    "type": "object"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "storage_mode": {
                    "description": "默认persistent保留本机数据；ephemeral每次关闭后清理浏览器数据，保留配置",
                    "enum": [
                      "persistent",
                      "ephemeral"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "window_title": {
                    "description": "浏览器窗口标题",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "profile_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "created_at": "2026-10-23T08:00:00Z",
                    "display_name": "每日公开汇率",
                    "profile_id": "auto_fx_daily",
                    "proxy": {
                      "mode": "direct",
                      "password_configured": false
                    }
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "created_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "disk_usage_bytes": {
                          "minimum": 0,
                          "type": "integer"
                        },
                        "display_name": {
                          "description": "显示名称",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "last_opened_at": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "profile_id": {
                          "description": "自由Profile：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "proxy": {
                          "description": "代理摘要，无password，含password_configured。",
                          "type": "object"
                        },
                        "proxy_relay": {
                          "description": "跳板代理摘要，绝不回传密码",
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "proxy_td": {
                          "type": "object"
                        },
                        "running": {
                          "description": "本机浏览器是否正在运行",
                          "type": "boolean"
                        },
                        "storage_mode": {
                          "description": "本机数据保留方式",
                          "enum": [
                            "persistent",
                            "ephemeral"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "updated_at": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "window_title": {
                          "description": "窗口标题",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "修改已关闭的Profile",
        "tags": [
          "自由启动 Profile"
        ],
        "x-mcp-tool": "damai_profile_update"
      }
    },
    "/request/execute": {
      "post": {
        "description": "按登记的 operation_id 提交 API 任务。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_request_execute`，参数与 HTTP 请求体相同。",
        "operationId": "request_execute",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "arguments": {},
                "connection_id": "79261025-0001-4000-a000-000000000002",
                "operation_id": "orders_list",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "type": "object"
                  },
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "operation_id": {
                    "description": "登记操作：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code",
                  "connection_id",
                  "arguments",
                  "operation_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "按登记的 operation_id 提交 API 任务",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_request_execute"
      }
    },
    "/runtime/close": {
      "post": {
        "description": "正常关闭运行实例。需要独占租约。通过既有正常关闭及店铺同步流程退出，返回异步任务。取消不能撤回已发出的关闭动作。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_runtime_close`，参数与 HTTP 请求体相同。",
        "operationId": "runtime_close",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "正常关闭运行实例",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "closed": {
              "description": "窗口或标签已关闭",
              "type": "boolean"
            }
          },
          "required": [
            "closed"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_runtime_close"
      }
    },
    "/runtime/get": {
      "post": {
        "description": "查询运行实例详情。仅列出当前御安登录所启动或接管的运行实例。runtime_id不等于PID；不返回操作系统路径或代理密码；enable_cdp=true开启后，仅开启它且具备runtime/cdp授权的Agent可读取cdp.port、http_url和websocket_url。CDP覆盖当前店铺浏览器所有标签页，关闭窗口后失效，默认关闭。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_runtime_get`，参数与 HTTP 请求体相同。",
        "operationId": "runtime_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "runtime_id": "rt_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "automation_state": "ready",
                    "browser_version": "1.0.8",
                    "kind": "shop",
                    "reused": false,
                    "runtime_id": "rt_example",
                    "shop_code": "ZH00030271"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "automation_state": {
                          "description": "自动化适配器状态",
                          "enum": [
                            "ready",
                            "unsupported",
                            "external",
                            "closed"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "browser_state": {
                          "description": "进程状态",
                          "enum": [
                            "running",
                            "closed"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "browser_version": {
                          "description": "本次内核版本",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "cdp": {
                          "additionalProperties": false,
                          "properties": {
                            "http_url": {
                              "description": "连接Playwright的HTTP地址",
                              "maxLength": 4096,
                              "type": "string"
                            },
                            "port": {
                              "description": "本机CDP监听端口",
                              "maximum": 65535,
                              "minimum": 1,
                              "type": "integer"
                            },
                            "websocket_url": {
                              "description": "浏览器CDP WebSocket地址；仅开启它的Agent可获取",
                              "maxLength": 4096,
                              "type": "string"
                            }
                          },
                          "required": [
                            "port",
                            "http_url",
                            "websocket_url"
                          ],
                          "type": "object"
                        },
                        "initial_tab_id": {
                          "description": "首个标签页：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "kind": {
                          "description": "类型",
                          "enum": [
                            "shop",
                            "free"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "profile_id": {
                          "description": "自由Profile",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "readiness": {
                          "additionalProperties": false,
                          "properties": {
                            "local_proxy": {
                              "description": "本地代理监听状态",
                              "enum": [
                                "ready",
                                "unavailable"
                              ],
                              "maxLength": 4096,
                              "type": "string"
                            },
                            "page": {
                              "description": "启动时采样的页面状态；后续使用page/wait查询",
                              "enum": [
                                "unknown",
                                "loading",
                                "ready",
                                "error"
                              ],
                              "maxLength": 4096,
                              "type": "string"
                            },
                            "upstream": {
                              "description": "当前不主动访问上游探测地址；有上游返回not_checked，直连返回not_required",
                              "enum": [
                                "not_checked",
                                "not_required"
                              ],
                              "maxLength": 4096,
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "reused": {
                          "description": "是否复用已有窗口",
                          "type": "boolean"
                        },
                        "runtime_id": {
                          "description": "运行实例：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "shop_code": {
                          "description": "店铺编码",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询运行实例详情",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-mcp-tool": "damai_runtime_get"
      }
    },
    "/runtime/list": {
      "post": {
        "description": "查询本机运行实例。仅列出当前御安登录所启动或接管的运行实例。runtime_id不等于PID；不返回操作系统路径或代理密码；enable_cdp=true开启后，仅开启它且具备runtime/cdp授权的Agent可读取cdp.port、http_url和websocket_url。CDP覆盖当前店铺浏览器所有标签页，关闭窗口后失效，默认关闭。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_runtime_list`，参数与 HTTP 请求体相同。",
        "operationId": "runtime_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "cursor": {
                    "description": "上一页返回的游标",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "kind": {
                    "description": "运行类型",
                    "enum": [
                      "shop",
                      "free"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "limit": {
                    "description": "每页数量，默认50",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "profile_id": {
                    "description": "Profile：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "query": {
                    "description": "名称或编码模糊搜索",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "as_of": "2026-10-23T08:00:00Z",
                    "items": [],
                    "next_cursor": null,
                    "total": 0
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "as_of": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "items": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "automation_state": {
                                "description": "自动化适配器状态",
                                "enum": [
                                  "ready",
                                  "unsupported",
                                  "external",
                                  "closed"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "browser_state": {
                                "description": "进程状态",
                                "enum": [
                                  "running",
                                  "closed"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "browser_version": {
                                "description": "本次内核版本",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "cdp": {
                                "additionalProperties": false,
                                "properties": {
                                  "http_url": {
                                    "description": "连接Playwright的HTTP地址",
                                    "maxLength": 4096,
                                    "type": "string"
                                  },
                                  "port": {
                                    "description": "本机CDP监听端口",
                                    "maximum": 65535,
                                    "minimum": 1,
                                    "type": "integer"
                                  },
                                  "websocket_url": {
                                    "description": "浏览器CDP WebSocket地址；仅开启它的Agent可获取",
                                    "maxLength": 4096,
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "port",
                                  "http_url",
                                  "websocket_url"
                                ],
                                "type": "object"
                              },
                              "initial_tab_id": {
                                "description": "首个标签页：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "kind": {
                                "description": "类型",
                                "enum": [
                                  "shop",
                                  "free"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "profile_id": {
                                "description": "自由Profile",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "readiness": {
                                "additionalProperties": false,
                                "properties": {
                                  "local_proxy": {
                                    "description": "本地代理监听状态",
                                    "enum": [
                                      "ready",
                                      "unavailable"
                                    ],
                                    "maxLength": 4096,
                                    "type": "string"
                                  },
                                  "page": {
                                    "description": "启动时采样的页面状态；后续使用page/wait查询",
                                    "enum": [
                                      "unknown",
                                      "loading",
                                      "ready",
                                      "error"
                                    ],
                                    "maxLength": 4096,
                                    "type": "string"
                                  },
                                  "upstream": {
                                    "description": "当前不主动访问上游探测地址；有上游返回not_checked，直连返回not_required",
                                    "enum": [
                                      "not_checked",
                                      "not_required"
                                    ],
                                    "maxLength": 4096,
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "reused": {
                                "description": "是否复用已有窗口",
                                "type": "boolean"
                              },
                              "runtime_id": {
                                "description": "运行实例：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "shop_code": {
                                "description": "店铺编码",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "description": "完整匹配数量",
                          "maximum": 2147483647,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "items",
                        "total",
                        "next_cursor"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询本机运行实例",
        "tags": [
          "运行实例与控制租约"
        ],
        "x-mcp-tool": "damai_runtime_list"
      }
    },
    "/session/create": {
      "post": {
        "description": "创建证书绑定的短期会话。通过已配对客户端证书和预期身份申请300秒访问令牌；令牌绑定证书与当前御安登录，仅存内存，重启失效。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n此接口用于连接管理，不暴露为 MCP 模型工具。",
        "operationId": "session_create",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "expected_deployment_id": "damai-saas",
                "expected_employee_id": "10543",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "expected_deployment_id": {
                    "description": "部署：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "expected_employee_id": {
                    "description": "员工：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "expected_deployment_id",
                  "expected_employee_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "access_token": "EXAMPLE_ONLY_NOT_A_REAL_TOKEN",
                    "automation_session_id": "as_example",
                    "deployment_id": "damai-saas",
                    "employee_id": "10543",
                    "expires_in": 300,
                    "token_type": "Bearer"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "access_token": {
                          "description": "300秒证书绑定的内存令牌",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "automation_session_id": {
                          "description": "自动化会话：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "deployment_id": {
                          "description": "部署：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "employee_id": {
                          "description": "员工：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "expires_in": {
                          "description": "有效秒数",
                          "maximum": 300,
                          "minimum": 1,
                          "type": "integer"
                        },
                        "token_type": {
                          "description": "认证类型",
                          "enum": [
                            "Bearer"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "security": [
          {
            "mutualTLS": []
          }
        ],
        "summary": "创建证书绑定的短期会话",
        "tags": [
          "身份、会话与连接"
        ],
        "x-mcp-tool": "damai_session_create"
      }
    },
    "/session/revoke": {
      "post": {
        "description": "撤销当前自动化会话。撤销当前会话，释放客户端租约并取消未完成动作；保留浏览器窗口供人工操作。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n此接口用于连接管理，不暴露为 MCP 模型工具。",
        "operationId": "session_revoke",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "required": [
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "revoked": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "revoked": {
                          "description": "是否撤销",
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "撤销当前自动化会话",
        "tags": [
          "身份、会话与连接"
        ],
        "x-mcp-tool": "damai_session_revoke"
      }
    },
    "/shop/get": {
      "post": {
        "description": "查询店铺安全摘要。按ZH店铺编码查询安全摘要；无权限与不存在均不泄露店铺内容。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_shop_get`，参数与 HTTP 请求体相同。",
        "operationId": "shop_get",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "can_open": true,
                    "channel_state": "available",
                    "name": "示例店铺",
                    "platform_name": "Amazon",
                    "shop_code": "ZH00030271"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "can_open": {
                          "description": "是否可启动",
                          "type": "boolean"
                        },
                        "channel_state": {
                          "description": "通道业务状态",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "last_opened_at": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "name": {
                          "description": "店铺名称",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "platform_id": {
                          "description": "平台ID",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "platform_name": {
                          "description": "平台名称",
                          "maxLength": 4096,
                          "type": "string"
                        },
                        "shop_code": {
                          "description": "店铺编码：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "site_name": {
                          "description": "站点名称",
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询店铺安全摘要",
        "tags": [
          "店铺查询与启动"
        ],
        "x-mcp-tool": "damai_shop_get"
      }
    },
    "/shop/list": {
      "post": {
        "description": "查询本人授权店铺。按照已有系统管理员、部门主管和网关账号授权查询店铺安全摘要，默认仅返回可启动店铺。支持平台、通道状态、模糊搜索与游标分页；不返回账号密码或代理口令。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_shop_list`，参数与 HTTP 请求体相同。",
        "operationId": "shop_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "limit": 50
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "channel_state": {
                    "description": "通道业务状态",
                    "enum": [
                      "available",
                      "creating",
                      "expired",
                      "released",
                      "disabled"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "cursor": {
                    "description": "上一页返回的游标",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "include_unavailable": {
                    "description": "是否包含不可启动店铺",
                    "type": "boolean"
                  },
                  "limit": {
                    "description": "每页数量，默认50",
                    "maximum": 100,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "platform_id": {
                    "description": "平台：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "query": {
                    "description": "名称或编码模糊搜索",
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "can_open": true,
                        "channel_state": "available",
                        "name": "示例店铺",
                        "platform_name": "Amazon",
                        "shop_code": "ZH00030271"
                      }
                    ],
                    "next_cursor": null,
                    "total": 1
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "as_of": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "items": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "can_open": {
                                "description": "是否可启动",
                                "type": "boolean"
                              },
                              "channel_state": {
                                "description": "通道业务状态",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "last_opened_at": {
                                "format": "date-time",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "name": {
                                "description": "店铺名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "platform_id": {
                                "description": "平台ID",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "platform_name": {
                                "description": "平台名称",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "shop_code": {
                                "description": "店铺编码：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "site_name": {
                                "description": "站点名称",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "next_cursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "total": {
                          "description": "完整匹配数量",
                          "maximum": 2147483647,
                          "minimum": 0,
                          "type": "integer"
                        }
                      },
                      "required": [
                        "items",
                        "total",
                        "next_cursor"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询本人授权店铺",
        "tags": [
          "店铺查询与启动"
        ],
        "x-mcp-tool": "damai_shop_list"
      }
    },
    "/shop/open": {
      "post": {
        "description": "启动或复用授权店铺。启动前重新校验云端会话与店铺权限，复用既有Profile同步、凭据管道、gost和启动日志。默认复用正在运行的窗口，禁止并发重建同一Profile；返回异步任务，不代表页面已加载。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_shop_open`，参数与 HTTP 请求体相同。",
        "operationId": "shop_open",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "enable_cdp": false,
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "activate_window": {
                    "description": "默认true，激活窗口",
                    "type": "boolean"
                  },
                  "control_mode": {
                    "description": "控制模式，默认automation",
                    "enum": [
                      "automation",
                      "external_rpa"
                    ],
                    "maxLength": 4096,
                    "type": "string"
                  },
                  "enable_cdp": {
                    "description": "默认false；开启后返回店铺本机CDP地址，需要runtime/cdp授权",
                    "type": "boolean"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "reuse_if_running": {
                    "description": "默认true，复用现有窗口",
                    "type": "boolean"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "启动或复用授权店铺",
        "tags": [
          "店铺查询与启动"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "automation_state": {
              "description": "自动化适配器状态",
              "enum": [
                "ready",
                "unsupported",
                "external",
                "closed"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "browser_state": {
              "description": "进程状态",
              "enum": [
                "running",
                "closed"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "browser_version": {
              "description": "本次内核版本",
              "maxLength": 4096,
              "type": "string"
            },
            "cdp": {
              "additionalProperties": false,
              "properties": {
                "http_url": {
                  "description": "连接Playwright的HTTP地址",
                  "maxLength": 4096,
                  "type": "string"
                },
                "port": {
                  "description": "本机CDP监听端口",
                  "maximum": 65535,
                  "minimum": 1,
                  "type": "integer"
                },
                "websocket_url": {
                  "description": "浏览器CDP WebSocket地址；仅开启它的Agent可获取",
                  "maxLength": 4096,
                  "type": "string"
                }
              },
              "required": [
                "port",
                "http_url",
                "websocket_url"
              ],
              "type": "object"
            },
            "initial_tab_id": {
              "description": "首个标签页：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "kind": {
              "description": "类型",
              "enum": [
                "shop",
                "free"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "profile_id": {
              "description": "自由Profile",
              "maxLength": 4096,
              "type": "string"
            },
            "readiness": {
              "additionalProperties": false,
              "properties": {
                "local_proxy": {
                  "description": "本地代理监听状态",
                  "enum": [
                    "ready",
                    "unavailable"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                },
                "page": {
                  "description": "启动时采样的页面状态；后续使用page/wait查询",
                  "enum": [
                    "unknown",
                    "loading",
                    "ready",
                    "error"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                },
                "upstream": {
                  "description": "当前不主动访问上游探测地址；有上游返回not_checked，直连返回not_required",
                  "enum": [
                    "not_checked",
                    "not_required"
                  ],
                  "maxLength": 4096,
                  "type": "string"
                }
              },
              "type": "object"
            },
            "reused": {
              "description": "是否复用已有窗口",
              "type": "boolean"
            },
            "runtime_id": {
              "description": "运行实例：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "shop_code": {
              "description": "店铺编码",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "type": "object"
        },
        "x-mcp-tool": "damai_shop_open"
      }
    },
    "/tab/activate": {
      "post": {
        "description": "激活标签页。只操作指定实例的网页标签页。新建仅接受公开HTTP/HTTPS或about:blank，标签页ID不可跨实例使用。返回异步任务。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_tab_activate`，参数与 HTTP 请求体相同。",
        "operationId": "tab_activate",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "激活标签页",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "activated": {
              "description": "已激活",
              "type": "boolean"
            }
          },
          "required": [
            "activated"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_tab_activate"
      }
    },
    "/tab/close": {
      "post": {
        "description": "关闭标签页。只操作指定实例的网页标签页。新建仅接受公开HTTP/HTTPS或about:blank，标签页ID不可跨实例使用。返回异步任务。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_tab_close`，参数与 HTTP 请求体相同。",
        "operationId": "tab_close",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example",
                "tab_id": "tab_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "tab_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "关闭标签页",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "closed": {
              "description": "窗口或标签已关闭",
              "type": "boolean"
            }
          },
          "required": [
            "closed"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_tab_close"
      }
    },
    "/tab/create": {
      "post": {
        "description": "新建标签页。只操作指定实例的网页标签页。新建仅接受公开HTTP/HTTPS或about:blank，标签页ID不可跨实例使用。返回异步任务。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_tab_create`，参数与 HTTP 请求体相同。",
        "operationId": "tab_create",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "runtime_id": "rt_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tab_id": {
                    "description": "标签页：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "timeout_ms": {
                    "description": "执行超时毫秒，默认10000，导航默认30000",
                    "maximum": 60000,
                    "minimum": 1,
                    "type": "integer"
                  },
                  "url": {
                    "description": "初始网址，默认about:blank",
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "job_id": "job_example",
                    "state": "queued"
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "job_id": {
                          "description": "异步任务：由服务返回的不透明标识",
                          "maxLength": 128,
                          "minLength": 1,
                          "type": "string"
                        },
                        "state": {
                          "description": "已接收任务",
                          "enum": [
                            "queued"
                          ],
                          "maxLength": 4096,
                          "type": "string"
                        }
                      },
                      "required": [
                        "job_id",
                        "state"
                      ],
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "异步任务已接收，使用 job/get 或 job/wait 查询最终结果。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "新建标签页",
        "tags": [
          "浏览器页面命令"
        ],
        "x-job-result-schema": {
          "additionalProperties": false,
          "properties": {
            "loading": {
              "description": "加载中",
              "type": "boolean"
            },
            "page_state": {
              "description": "页面状态",
              "enum": [
                "loading",
                "ready",
                "error"
              ],
              "maxLength": 4096,
              "type": "string"
            },
            "tab_id": {
              "description": "新标签页：由服务返回的不透明标识",
              "maxLength": 128,
              "minLength": 1,
              "type": "string"
            },
            "title": {
              "description": "标题",
              "maxLength": 4096,
              "type": "string"
            },
            "url": {
              "description": "当前或待提交网址",
              "maxLength": 4096,
              "type": "string"
            }
          },
          "required": [
            "tab_id"
          ],
          "type": "object"
        },
        "x-mcp-tool": "damai_tab_create"
      }
    },
    "/tab/list": {
      "post": {
        "description": "查询实例标签页。需要当前运行实例的控制租约；返回允许操作的网页标签页，排除浏览器内部页面和扩展管理页面。\n\n所有参数位于 JSON 请求体。未知字段会被拒绝；资源始终限定于当前部署、公司、网关账号和已配对客户端。\n\n\n对应 MCP 工具：`damai_tab_list`，参数与 HTTP 请求体相同。",
        "operationId": "tab_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "lease_id": "lease_example",
                "runtime_id": "rt_example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "lease_id": {
                    "description": "控制租约：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "runtime_id": {
                    "description": "运行实例：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "runtime_id",
                  "lease_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "items": [
                      {
                        "loading": false,
                        "tab_id": "tab_example",
                        "title": "Example Domain",
                        "url": "https://www.example.com/"
                      }
                    ]
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "additionalProperties": false,
                      "properties": {
                        "items": {
                          "items": {
                            "additionalProperties": false,
                            "properties": {
                              "loading": {
                                "description": "是否加载中",
                                "type": "boolean"
                              },
                              "page_state": {
                                "description": "页面状态",
                                "enum": [
                                  "loading",
                                  "ready",
                                  "error"
                                ],
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "tab_id": {
                                "description": "标签页：由服务返回的不透明标识",
                                "maxLength": 128,
                                "minLength": 1,
                                "type": "string"
                              },
                              "title": {
                                "description": "页面标题",
                                "maxLength": 4096,
                                "type": "string"
                              },
                              "url": {
                                "description": "当前网址",
                                "maxLength": 4096,
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "查询实例标签页",
        "tags": [
          "浏览器页面命令"
        ],
        "x-mcp-tool": "damai_tab_list"
      }
    },
    "/tool/call": {
      "post": {
        "description": "提交平台工具任务，写操作等待人工批准。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n`request_id` 为必填 UUID。同一动作重试必须保持该值，参数不同返回 IDEMPOTENCY_CONFLICT。\n对应 MCP 工具：`damai_tool_call`，参数与 HTTP 请求体相同。",
        "operationId": "tool_call",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "arguments": {},
                "connection_id": "79261025-0001-4000-a000-000000000002",
                "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                "shop_code": "ZH00030271",
                "tool_name": "orders_list"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "arguments": {
                    "type": "object"
                  },
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "tool_name": {
                    "description": "登记操作：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code",
                  "connection_id",
                  "arguments",
                  "tool_name",
                  "request_id"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "提交平台工具任务，写操作等待人工批准",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_tool_call"
      }
    },
    "/tool/list": {
      "post": {
        "description": "发现连接中已登记并获授权的工具。权限取网关账号、Agent、店铺与连接策略的交集。平台凭据不返回 Agent。\n\n\n对应 MCP 工具：`damai_tool_list`，参数与 HTTP 请求体相同。",
        "operationId": "tool_list",
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "shop_code": "ZH00030271"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connection_id": {
                    "description": "连接：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  },
                  "request_id": {
                    "description": "请求 UUID；重试原动作时保持不变，新动作换新 UUID",
                    "maxLength": 4096,
                    "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
                    "type": "string"
                  },
                  "shop_code": {
                    "description": "店铺编码：由服务返回的不透明标识",
                    "maxLength": 128,
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "shop_code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "example": {
                  "data": {
                    "applied": true
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": true
                },
                "schema": {
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "request_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "success": {
                      "const": true,
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "同步动作完成或任务状态查询成功；任务实际结果检查 data.state。"
          },
          "400": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "INVALID_ARGUMENT",
                    "message": "请求参数不符合接口定义",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求参数不符合接口定义"
          },
          "401": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "SESSION_EXPIRED",
                    "message": "会话过期或客户端证书无效",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "会话过期或客户端证书无效"
          },
          "403": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "AUTOMATION_PERMISSION_DENIED",
                    "message": "当前网关账号未获授权",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "当前网关账号未获授权"
          },
          "404": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "NOT_FOUND",
                    "message": "资源不存在或不属于当前客户端",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "资源不存在或不属于当前客户端"
          },
          "409": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RUNTIME_BUSY",
                    "message": "运行实例正由其他客户端控制",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "运行实例正由其他客户端控制"
          },
          "429": {
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "RATE_LIMITED",
                    "message": "请求过于频繁",
                    "retryable": false
                  },
                  "request_id": "36c7b889-9479-46e4-a1fd-7c5b1e45e300",
                  "success": false
                }
              }
            },
            "description": "请求过于频繁"
          }
        },
        "summary": "发现连接中已登记并获授权的工具",
        "tags": [
          "任务、事件与文件"
        ],
        "x-mcp-tool": "damai_tool_list"
      }
    }
  },
  "security": [
    {
      "bearerAuth": [],
      "mutualTLS": []
    }
  ],
  "servers": [
    {
      "description": "御安设置中显示的本机地址",
      "url": "https://127.0.0.1:{port}/automation/v1",
      "variables": {
        "port": {
          "default": "49152",
          "description": "运行时端口，按御安设置修改"
        }
      }
    }
  ]
}