pudu-cloudveil-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese云隐 CloudVeil Skill
CloudVeil (Yunyin) Skill
工作流
Workflow
1. 检查环境 → 确认 CLOUDVEIL_BASE_URL / CLOUDVEIL_ACCOUNT / CLOUDVEIL_PASSWORD
2. 认证 → 使用 SSO getSecret + SM2 加密 + accountLogin 获取 access_token
3. 理解意图 → 定位功能组 → 读取 references/capabilities.md 和命中的分组文档
4. 归一化参数名 → 将用户输入字段映射为接口规范中的真实字段名
5. 构建并执行请求 → 从 assets/*.openapi.json 读取 method、query、requestBody、schema
6. 展示结果 → 200 且 message === "SUCCESS" 视为成功,否则按失败展示1. Check Environment → Verify CLOUDVEIL_BASE_URL / CLOUDVEIL_ACCOUNT / CLOUDVEIL_PASSWORD
2. Authentication → Use SSO getSecret + SM2 encryption + accountLogin to obtain access_token
3. Understand Intent → Locate functional group → Read references/capabilities.md and the hit group documents
4. Normalize Parameter Names → Map user input fields to the actual field names specified in the interface specification
5. Build and Execute Request → Read method, query, requestBody, schema from assets/*.openapi.json
6. Display Results → Consider it successful only if HTTP status is 200 and message === "SUCCESS"; otherwise, display as failed第一步:检查环境
Step 1: Check Environment
任何真实调用前,先读取 并检查:
references/request-sdk.md| 变量 | 作用 |
|---|---|
| CloudVeil 服务器基础地址,例如 |
| CloudVeil 登录账号 |
| CloudVeil 登录密码 |
若缺少任一变量,停止执行并提示用户补齐。不要默认演示地址,不要把账号、密码、访问 token 或加密后的凭证写入仓库文件。
Before any actual call, read and check the following:
references/request-sdk.md| Variable | Function |
|---|---|
| CloudVeil server base URL, e.g., |
| CloudVeil login account |
| CloudVeil login password |
If any variable is missing, stop execution and prompt the user to complete it. Do not use default demo URLs, and do not write accounts, passwords, access tokens, or encrypted credentials into repository files.
第二步:认证
Step 2: Authentication
CloudVeil 使用 SSO/SM2 登录流程:
GET /openapi/sso/api/v1/secret/getSecret- 用返回的 对
data.secret和CLOUDVEIL_ACCOUNT做 SM2 加密CLOUDVEIL_PASSWORD POST /openapi/sso/api/v1/account/accountLogin- 使用 调用目标 OpenAPI
data.access_token
具体调用规则、token 头部覆盖项和 用法见 。
scripts/cloudveil-request.jsreferences/request-sdk.mdCloudVeil uses the SSO/SM2 login process:
GET /openapi/sso/api/v1/secret/getSecret- Use the returned to encrypt
data.secretandCLOUDVEIL_ACCOUNTwith SM2CLOUDVEIL_PASSWORD POST /openapi/sso/api/v1/account/accountLogin- Use to call the target OpenAPI
data.access_token
For specific call rules, token header overrides, and usage of , refer to .
scripts/cloudveil-request.jsreferences/request-sdk.md第三步:理解意图并定位接口
Step 3: Understand Intent and Locate Interface
先读 ,根据用户描述定位功能组,再只打开命中的分组文档和 asset。
references/capabilities.md| 功能组 | 详细文档 | OpenAPI asset | 典型场景 |
|---|---|---|---|
| 通用接口 | | | 门店、地图、机器人组、位置 |
| 机器人信息 | | | 机器人状态、任务状态 |
| 机器人任务 | | | 呼叫、配送、运送、跑腿、顶升、托盘、领位 |
| 控制指令 | | | 位置上报、切图、一键回充、刷卡、设备影子 |
| 统计数据 | | | 数据看板、分析、任务明细、日志 |
| 订单到人(试用版) | | | 订单、托盘配置、巷道、拣货、批次、仓库 |
| 回调通知 | | Not covered | 被动回调参数说明 |
| 机器人调度 | | Not covered | 交管区 / 调度接口 |
标记为 Not covered 的分组没有 bundled OpenAPI asset。不要编造路径、参数、回调或请求体。
First read , locate the functional group based on the user's description, then only open the hit group documents and assets.
references/capabilities.md| Functional Group | Detailed Document | OpenAPI Asset | Typical Scenarios |
|---|---|---|---|
| Common Interfaces | | | Stores, maps, robot groups, locations |
| Robot Information | | | Robot status, task status |
| Robot Tasks | | | Calling, delivery, transport, errand, lifting, pallet, hosting |
| Control Commands | | | Position reporting, map switching, one-click recharge, card swiping, device shadow |
| Statistical Data | | | Data board, analysis, task details, logs |
| Order-to-Person (Beta) | | | Orders, pallet configuration, aisles, picking, batches, warehouses |
| Callback Notifications | | Not covered | Passive callback parameter description |
| Robot Dispatch | | Not covered | Traffic control zone / dispatch interfaces |
Groups marked as Not covered do not have bundled OpenAPI assets. Do not fabricate paths, parameters, callbacks, or request bodies.
第四步:参数名归一化
Step 4: Normalize Parameter Names
用户输入的参数名可能使用驼峰、下划线或中划线格式。构建 query 或 JSON request body 前,必须根据当前接口规范中的 和 schema,将用户字段自动映射为接口要求的真实字段名:
parametersrequestBody- /
shopId/shop_id→ 按当前接口规范转换为shop-id或shopIdshop_id - /
groupId/group_id→ 按当前接口规范转换为group-id或groupIdgroup_id - /
payload.startPoint/payload.start_point→ 按 schema 转换为真实嵌套字段名payload.start-point
归一化规则:
- 用当前接口规范构建字段名白名单;不要凭常识自行决定最终字段名
- 匹配时忽略大小写,并忽略 和
_,但最终输出必须保留规范中的原始字段名格式- - 对 request body 的对象、数组对象也要递归应用同样规则
- 只转换字段名,不改变字段值
- 如果同一个输入字段可匹配多个规范字段,或字段不在规范中,先向用户确认;不要把未知字段直接发给接口
Parameter names entered by users may use camelCase, snake_case, or kebab-case formats. Before building query or JSON request bodies, you must automatically map user fields to the actual field names required by the interface according to the and schema in the current interface specification:
parametersrequestBody- /
shopId/shop_id→ Convert toshop-idorshopIdaccording to the current interface specificationshop_id - /
groupId/group_id→ Convert togroup-idorgroupIdaccording to the current interface specificationgroup_id - /
payload.startPoint/payload.start_point→ Convert to the actual nested field name according to the schemapayload.start-point
Normalization Rules:
- Build a whitelist of field names using the current interface specification; do not determine the final field names based on common sense
- Ignore case, , and
_during matching, but the final output must retain the original field name format specified in the specification- - Apply the same rules recursively to objects and array objects in the request body
- Only convert field names, do not change field values
- If an input field matches multiple specification fields, or the field is not in the specification, confirm with the user first; do not send unknown fields directly to the interface
第五步:构建并执行请求
Step 5: Build and Execute Request
从对应 读取精确 method、query 参数、JSON requestBody、Schema 和响应结构。不要只靠自然语言猜字段名;发出请求前必须完成参数名归一化,确保所有字段名与规范完全一致。
assets/*.openapi.json大范围查找时优先用 或 ,不要把整份 asset 加载进上下文:
jqrgbash
jq -r '.paths | keys[]' assets/robot-tasks.openapi.json
jq '.paths["/openapi/open-platform-service/v1/custom_call"].post.requestBody' assets/robot-tasks.openapi.json
jq '.paths["/openapi/data-board/v1/brief/shop"].get.parameters' assets/statistics.openapi.json
jq '.paths["/openapi/order_to_user/v1/order/import"].post.requestBody' assets/order-to-person.openapi.json真实调用使用:
bash
node scripts/cloudveil-request.js --path <api-path> [--method GET|POST] [--param key=value] [--body-json '<json>']Read the exact method, query parameters, JSON requestBody, Schema, and response structure from the corresponding . Do not guess field names based solely on natural language; parameter name normalization must be completed before sending the request to ensure all field names are exactly consistent with the specification.
assets/*.openapi.jsonUse or for large-scale searches instead of loading the entire asset into the context:
jqrgbash
jq -r '.paths | keys[]' assets/robot-tasks.openapi.json
jq '.paths["/openapi/open-platform-service/v1/custom_call"].post.requestBody' assets/robot-tasks.openapi.json
jq '.paths["/openapi/data-board/v1/brief/shop"].get.parameters' assets/statistics.openapi.json
jq '.paths["/openapi/order_to_user/v1/order/import"].post.requestBody' assets/order-to-person.openapi.jsonFor actual calls, use:
bash
node scripts/cloudveil-request.js --path <api-path> [--method GET|POST] [--param key=value] [--body-json '<json>']第六步:展示结果
Step 6: Display Results
成功必须同时满足:
- HTTP 状态码为
200 - 响应 JSON 的
message === "SUCCESS"
如果 HTTP 为 200 但 不是 ,按业务失败处理。展示结果时保留接口、method、关键参数和返回 JSON;凭证、token、密码和 SM2 加密结果只能脱敏显示。
messageSUCCESSSuccess must meet both of the following conditions:
- HTTP status code is
200 - in the response JSON
message === "SUCCESS"
If HTTP status is 200 but is not , treat it as a business failure. When displaying results, retain the interface, method, key parameters, and returned JSON; credentials, tokens, passwords, and SM2 encryption results must be desensitized.
messageSUCCESS常用接口速查
Quick Reference for Common Interfaces
text
undefinedtext
undefined机器人状态
Robot Status
GET /openapi/open-platform-service/v2/status/get_by_sn
GET /openapi/open-platform-service/v2/status/get_by_group_id
GET /openapi/open-platform-service/v2/status/get_by_sn
GET /openapi/open-platform-service/v2/status/get_by_group_id
地图与位置
Maps and Locations
GET /openapi/map-service/v1/open/current
GET /openapi/open-platform-service/v1/robot/get_position
POST /openapi/map-service/v1/open/group
GET /openapi/map-service/v1/open/current
GET /openapi/open-platform-service/v1/robot/get_position
POST /openapi/map-service/v1/open/group
任务
Tasks
POST /openapi/open-platform-service/v1/custom_call
POST /openapi/open-platform-service/v1/delivery_task
POST /openapi/open-platform-service/v1/transport_task
POST /openapi/open-platform-service/v1/task_errand
POST /openapi/open-platform-service/v1/lifting_task
POST /openapi/open-platform-service/v1/custom_call
POST /openapi/open-platform-service/v1/delivery_task
POST /openapi/open-platform-service/v1/transport_task
POST /openapi/open-platform-service/v1/task_errand
POST /openapi/open-platform-service/v1/lifting_task
控制
Control
GET /openapi/open-platform-service/v2/recharge
POST /openapi/open-platform-service/v1/switch_map
GET /openapi/open-platform-service/v2/recharge
POST /openapi/open-platform-service/v1/switch_map
统计
Statistics
GET /openapi/data-board/v1/brief/shop
GET /openapi/data-board/v1/analysis/run
GET /openapi/data-board/v1/brief/shop
GET /openapi/data-board/v1/analysis/run
订单到人
Order-to-Person
POST /openapi/order_to_user/v1/order/import
GET /openapi/order_to_user/v1/batch/query
GET /openapi/order_to_user/v1/warehouse/query_points
undefinedPOST /openapi/order_to_user/v1/order/import
GET /openapi/order_to_user/v1/batch/query
GET /openapi/order_to_user/v1/warehouse/query_points
undefined