@honor-claw/yoyo 0.0.1-beta.2 → 0.0.1-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/index.ts +2 -2
  2. package/openclaw.plugin.json +7 -0
  3. package/package.json +20 -20
  4. package/skills/search/SKILL.md +182 -0
  5. package/skills/search/scripts/search.sh +69 -0
  6. package/skills/yoyo-control/SKILL.md +105 -120
  7. package/skills/yoyo-control/references/alarm-create.md +473 -0
  8. package/skills/yoyo-control/references/app-close.md +183 -0
  9. package/skills/yoyo-control/references/app-open.md +178 -0
  10. package/skills/yoyo-control/references/call-phone.md +250 -0
  11. package/skills/yoyo-control/references/capture-screenshot.md +205 -54
  12. package/skills/yoyo-control/references/contact-search.md +235 -0
  13. package/skills/yoyo-control/references/hotspot.md +208 -0
  14. package/skills/yoyo-control/references/local-search.md +224 -15
  15. package/skills/yoyo-control/references/message-send.md +246 -0
  16. package/skills/yoyo-control/references/mobile-data.md +248 -0
  17. package/skills/yoyo-control/references/no-disturb.md +239 -0
  18. package/skills/yoyo-control/references/quiet-mode.md +228 -0
  19. package/skills/yoyo-control/references/ringing-mode.md +223 -0
  20. package/skills/yoyo-control/references/screen-record.md +220 -0
  21. package/skills/yoyo-control/references/vibration-mode.md +235 -0
  22. package/skills/yoyo-control/references/volume-operate.md +274 -0
  23. package/skills/yoyo-control/scripts/invoke.js +33 -111
  24. package/src/agent/copy-templates.ts +56 -0
  25. package/src/agent/index.ts +3 -0
  26. package/src/agent/templates/AGENTS.md +223 -0
  27. package/src/apis/claw-cloud.ts +70 -23
  28. package/src/apis/honor-auth.ts +20 -10
  29. package/src/apis/types.ts +24 -1
  30. package/src/cloud-channel/channel.ts +245 -58
  31. package/src/cloud-channel/client.ts +87 -12
  32. package/src/cloud-channel/types.ts +30 -0
  33. package/src/commands/env/impl.ts +58 -0
  34. package/src/commands/env/index.ts +1 -0
  35. package/src/commands/index.ts +11 -1
  36. package/src/commands/login/impl.ts +17 -8
  37. package/src/commands/logout/impl.ts +23 -0
  38. package/src/commands/logout/index.ts +1 -53
  39. package/src/commands/status/index.ts +172 -42
  40. package/src/gateway-client/client.deprecated.ts +1 -1
  41. package/src/gateway-client/client.ts +15 -20
  42. package/src/gateway-client/types.ts +2 -2
  43. package/src/honor-auth/browser.ts +12 -15
  44. package/src/honor-auth/callback-server.ts +3 -6
  45. package/src/honor-auth/cloud.ts +65 -12
  46. package/src/honor-auth/config.ts +25 -17
  47. package/src/honor-auth/index.ts +1 -0
  48. package/src/honor-auth/token-manager.ts +24 -14
  49. package/src/modules/claw-configs/config-manager.ts +211 -11
  50. package/src/modules/claw-configs/hosts.ts +48 -0
  51. package/src/modules/claw-configs/index.ts +1 -0
  52. package/src/modules/claw-configs/types.ts +4 -0
  53. package/src/modules/device/device-info.ts +20 -9
  54. package/src/modules/device/providers/linux.ts +128 -0
  55. package/src/modules/device/providers/macos.ts +123 -0
  56. package/src/modules/device/providers/pad.ts +0 -16
  57. package/src/modules/device/registry.ts +12 -3
  58. package/src/modules/login/impl.ts +38 -16
  59. package/src/runtime.ts +44 -0
  60. package/src/schemas.ts +4 -1
  61. package/src/services/connection/impl.ts +89 -9
  62. package/src/services/connection/status-tracker/events.ts +127 -0
  63. package/src/services/connection/status-tracker/index.ts +31 -0
  64. package/src/services/connection/status-tracker/storage.ts +133 -0
  65. package/src/services/connection/status-tracker/tracker.ts +370 -0
  66. package/src/services/connection/status-tracker/types.ts +131 -0
  67. package/src/types.ts +0 -4
  68. package/src/utils/fs-safe.ts +544 -0
  69. package/src/utils/version.ts +29 -0
  70. package/src/utils/ws.ts +21 -0
  71. package/skills/yoyo-control/references/open-app.md +0 -54
  72. package/skills/yoyo-control/references/phone-call.md +0 -217
  73. package/skills/yoyo-control/references/schedule.md +0 -107
  74. package/skills/yoyo-control/references/screen-recorder.md +0 -67
  75. package/skills/yoyo-control/references/search-contact.md +0 -37
  76. package/skills/yoyo-control/references/send-message.md +0 -155
  77. package/skills/yoyo-control/references/volume.md +0 -536
  78. package/skills/yoyo-control/scripts/README.md +0 -103
  79. package/skills/yoyo-control/scripts/volume-up.json +0 -7
@@ -1,34 +1,35 @@
1
1
  ---
2
- name: yoyo-control
2
+ name: YOYO-phone-control
3
3
  version: 1.0.0
4
- description: Whenever a task requires **operating or controlling the phone**, eg. open app, send message, search contact, create schedule, phone calls, screen record, capture screenshot, volume, local search, etc.
4
+ description: 用于控制和操作手机系统功能及本地信息的工具集合,包括打开或关闭应用、发送短信、拨打电话、搜索联系人、创建闹钟、截屏、屏幕录制、调节音量、切换响铃/静音/勿扰模式、管理移动数据或热点、进行本地内容搜索等。
5
5
  metadata: { "openclaw": { "emoji": "📱", "always": true } }
6
6
  ---
7
7
 
8
- # Control phone with YOYO
8
+ # YOYO Phone Control
9
9
 
10
- Follow the workflow to control phone or pad with YOYO, Don't guess the commands.
10
+ **严格按照以下4步工作流**完成手机设备控制:
11
11
 
12
- ## Workflow
12
+ 1. 查询节点状态以识别可用设备,并确定目标设备
13
+ 2. 根据工具参考文档选择工具,提取命令和参数
14
+ 3. 使用正确的节点标识符、命令和参数调用节点方法
15
+ 4. 展示结果并确认操作是否成功
13
16
 
14
- Follow this **4-step workflow** when using the skill:
15
-
16
- 1. Query the device status to identify available device nodes.
17
- 2. Determine the target node, required tool, and execution parameters based on the user's intent.
18
- 3. Call the node tool using the correct parameter format.
19
- 4. Present the result and confirm whether the operation was successful.
20
-
21
- ### Step 1. Discover Nodes
17
+ ## 步骤 1:确定目标设备
22
18
 
23
19
  **Command**: `openclaw nodes status`
24
20
 
25
- **Purpose**: Retrieve current status of all nodes in the system to identify available devices ready to receive commands.
21
+ **Purpose**: 获取系统中所有节点的当前状态,识别可用于接收命令的设备
26
22
 
27
- **Execution result**:
23
+ **Result Parameters Description**:
28
24
 
29
- | Node | ID | IP | Detail | Status | Caps |
30
- | ---------- | -------- | -------- | -------- | -------- | ------ |
31
- | <nodeName> | <nodeId> | <nodeIP> | <detail> | <status> | <caps> |
25
+ | Parameter | Type | Description | Example |
26
+ | --------- | ------ | -------------------------------------------------------------------------------------- | ------------------------- |
27
+ | `Node` | String | 设备名称,显示节点的友好标识名称 | `Honor Magic6 Pro` |
28
+ | `ID` | String | 节点唯一标识符,用于命令调用时的 `--node` 参数(推荐使用) | `f5f8916028aa5` |
29
+ | `IP` | String | 节点网络IP地址,也可用于命令调用时的 `--node` 参数 (强烈使用) | `192.168.1.100` |
30
+ | `Detail` | String | 设备详细信息,可能包含设备型号、操作系统版本等信息 | `Magic6 Pro, Android 14` |
31
+ | `Status` | String | 节点连接状态,值包括:`connected`(已连接)、`disconnected`(离线)、`unknown`(未知) | `connected` |
32
+ | `Caps` | String | 节点能力列表,逗号分隔的能力标识,表示该设备支持的操作类型 | `app,call,message,volume` |
32
33
 
33
34
  #### Capability Matching Logic
34
35
 
@@ -44,6 +45,7 @@ Match device capabilities with user intent:
44
45
 
45
46
  **Automatic Selection** (single best match):
46
47
 
48
+ - If there is only one node connected, then it is considered to be the target one.
47
49
  - Only one node matches all required capabilities
48
50
 
49
51
  **User Confirmation Required** (multiple candidates):
@@ -66,75 +68,83 @@ Match device capabilities with user intent:
66
68
  - ✅ If multiple nodes match, ask user to select OR control all if appropriate
67
69
  - ✅ If no suitable node found, clearly inform user with available options
68
70
 
69
- ## Step 2. Plan Tool and Extract Command & Params
71
+ ## Step 2. Plan Tool and Extract Command & Paramters
70
72
 
71
- **⚠️ MANDATORY: Consult tool reference documentation before every operation**
73
+ **⚠️ MANDATORY: Consult tool reference before every operation**
72
74
 
73
- Before executing any device control operation, you **MUST** consult the corresponding tool's command and parameter definition file in the `references/` directory. This is a non-negotiable requirement to ensure correct command and parameters.
75
+ Before executing any device control operation, you **MUST** consult the corresponding tool's definition file in the `references/` directory. This is a non-negotiable requirement to ensure correct command and parameters.
74
76
 
75
77
  ### Available Tool References
76
78
 
77
- | Reference File | Capability | Description | Required Node Caps |
78
- | ---------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
79
- | `references/volume.md` | Volume Control | Adjust, set, increase, decrease, mute/unmute device volume; query current volume status; fine-grained control by stream type (media, call, ringtone, notification) | `volume.operate` |
80
- | `references/phone-call.md` | Phone Call | Initiate and manage phone calls; unified control for call operations | `phone.call` |
81
- | `references/screen-recorder.md` | Screen Recording | Start/stop screen recording; configure recording parameters; query recording status; app-specific recording control | `screen.record` |
82
- | `references/capture-screenshot.md` | Screenshot | Capture current screen content as image; support standard and scrolling screenshot modes | `capture.shot` |
83
- | `references/schedule.md` | Schedule | Provides the ability to create schedules | `schedule.create` |
84
- | `references/search-contact.md` | Contact | Provides the ability to search contacts | `search.contact ` |
85
- | `references/open-app.md` | Open Application | Used to help users open a specified app without any specific app internals. | `app.open` |
86
- | `references/send-message.md` | Send Message | Provide SMS sending services, users can send SMS content to specified numbers by providing phone numbers or contact information. | `send.message` |
87
- | `references/local-search.md` | Local Search | Search native data for documents, notes, calendars, galleries, yoyo memories, wallets, and more for direct answers to user questions or generate at-a-glance content | `message.send.message` |
88
-
89
- ### Parameter Construction Workflow
90
-
91
- Execute the following steps **in strict order** for each operation:
79
+ | Required Node Caps | Reference File | Tool Description |
80
+ | -------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
81
+ | `mobile-data` | `references/mobile-data.md` | 移动数据与流量管理工具。提供对移动数据及流量管理相关功能的综合管理与控制,支持开关移动数据、切换SIM卡、查询流量使用情况/账单/排行、设置流量限额与提醒、控制应用级流量、流量校准及省流量模式等功能。 |
82
+ | `hotspot` | `references/hotspot.md` | 个人热点管理工具。提供对个人热点功能的统一管理与控制,支持个人热点的开启与关闭、参数设置以及当前状态查询,并可结合指定应用执行相关操作。 |
83
+ | `volume` | `references/volume-operate.md` | 设备音量调节与管理工具。提供对设备音量的调节与管理功能,支持音量的设置、调高、调低、开启与关闭,以及当前音量状态的查询;可针对不同应用、不同设备及不同音量类型(如媒体、通话、通知等)进行精细化控制。 |
84
+ | `no-disturb` | `references/no-disturb.md` | 免打扰模式管理工具。支持在特定时间段或特定情况下屏蔽来电和通知,减少干扰,提高专注度。提供即时开关、定时设置、联系人例外、应用通知控制等功能。 |
85
+ | `screen-record` | `references/screen-record.md` | 设备屏幕录制管理与控制工具。提供对设备屏幕录制功能的管理与控制能力,支持对屏幕录制功能的开启与关闭、相关录制参数的设置、当前录制状态的查询,并可结合指定应用对其在特定应用场景下的录制行为进行管理。 |
86
+ | `quiet-mode` | `references/quiet-mode.md` | 设备静音模式管理与控制工具。提供对设备静音模式的管理与控制能力,支持静音模式的开启与关闭、当前状态的查询、静音持续时间的设置,以及结合指定应用或设备进行声音控制。 |
87
+ | `ringing-mode` | `references/ringing-mode.md` | 响铃模式管理工具。提供对系统响铃模式的管理与控制能力,支持对响铃模式的开启与关闭、相关行为的设置以及当前状态的查询,并可结合指定应用对其在响铃模式下的表现进行管理。 |
88
+ | `vibration-mode` | `references/vibration-mode.md` | 系统震动反馈管理与控制工具。提供对系统震动反馈功能的统一管理与控制能力,支持震动模式的设置、状态查询、打开与关闭,并可分别管理静音状态下震动、响铃状态下震动,以及在点击导航栏或设备解锁等交互场景中的震动反馈。 |
89
+ | `capture-screenshot` | `references/capture-screenshot.md` | 截屏功能管理与触发工具。提供对截屏功能的管理与触发能力,支持将当前手机屏幕内容以图片的形式保存,包括普通截屏和滚动截屏等操作。 |
90
+ | `app` | `references/app-open.md` | 应用打开工具。用于帮助用户关闭指定的 APP 应用,且不涉及任何具体 App 内部操作。 |
91
+ | `app` | `references/app-close.md` | 应用关闭工具。用于帮助用户打开指定的 APP 应用,且不涉及任何具体 App 内部操作。 |
92
+ | `contact` | `references/contact-search.md` | 联系人查找服务工具。提供按姓名、昵称、电话号码检索联系人的能力,支持区分自然人名与机构/黄页条目,可处理模糊匹配、多结果列表展示及序号选择场景。 |
93
+ | `call` | `references/call-phone.md` | 智能电话拨打与管理工具。提供全面的电话呼叫功能,支持通过姓名、电话号码或黄页服务发起呼叫;支持指定拨号使用的SIM卡(移动/联通/电信/卡槽);具备重拨最后号码、回拨已接听来电、回拨未接听来电及通用回拨功能; |
94
+ | `message` | `references/message-send.md` | 提供发送短信的服务。支持通过电话号码或联系人名称发送短信内容,可使用黄页发送短信至公共服务号码,以及发送名片信息给指定联系人。 |
95
+ | `local-search` | `references/local-search.md` | 查询手机文档、笔记、日程、图库、yoyo记忆、钱包等 |
96
+ | `alarm` | `references/alarm-create.md` | 闹钟创建工具。用于创建闹钟,当用户明确创建/定一个闹钟时,属于创建闹钟。 |
97
+
98
+ ### Command and Parameters Construction Workflow
99
+
100
+ Execute the following steps **in strict order** for each operation to construct parameter:
92
101
 
93
102
  ```
94
103
  ┌─────────────────────────────────────────────────────────────┐
95
104
  │ Step 1: INTENT RECOGNITION │
96
- │ Parse user request → Identify target tool and operation
105
+ │ Parse user request → Identify target tool to use
97
106
  └─────────────────────────────────────────────────────────────┘
98
107
 
99
108
  ┌─────────────────────────────────────────────────────────────┐
100
109
  │ Step 2: DOCUMENT CONSULTATION [MANDATORY] │
101
- │ Open references/*.md → Read tool definitions
110
+ │ Open references/*.md → Read tool reference
102
111
  │ ⚠️ PROHIBITED: Skip, guess, assume, or rely on memory │
103
112
  └─────────────────────────────────────────────────────────────┘
104
113
 
105
114
  ┌─────────────────────────────────────────────────────────────┐
106
- │ Step 3: PARAMETER EXTRACTION
107
- │ Extract: type, enum values, required/optional, defaults │
108
- └─────────────────────────────────────────────────────────────┘
109
-
110
- ┌─────────────────────────────────────────────────────────────┐
111
- │ Step 4: JSON CONSTRUCTION │
112
- │ Build params object conforming to JSONSchema definiton │
113
- └─────────────────────────────────────────────────────────────┘
114
-
115
- ┌─────────────────────────────────────────────────────────────┐
116
- │ Step 5: VALIDATION │
115
+ │ Step 3: PARAMETER EXTRACTION AND VALIDATION
117
116
  │ Verify: required fields present, enum case-sensitive match │
118
117
  └─────────────────────────────────────────────────────────────┘
119
118
  ```
120
119
 
121
- ### Error Handling Protocol
120
+ ### Parameter Format Requirements
122
121
 
123
- | Scenario | Required Action |
124
- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
125
- | **Ambiguous Request** | User request unclear or missing required fields → Ask clarifying questions before proceeding |
126
- | **Unsupported Operation** | No matching tool definition found → Inform user: "Operation '[operation]' is not supported. Available operations: [list]" |
127
- | **Capability Mismatch** | Selected node lacks required capability → Inform user and suggest alternative device or operation |
122
+ - Parameters must be valid JSON
123
+ - Enum values must match documentation exactly (case-sensitive)
124
+ - Numeric values must be within defined ranges
125
+
126
+ ### Error Handling Protocolreference
127
+
128
+ | Scenario | Required Action |
129
+ | ------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
130
+ | **Ambiguous Request** | User request unclear or missing required fields → Ask clarifying questions before proceeding |
131
+ | **Unsupported Operation** | No matching tool reference found → Inform user: "Operation '[operation]' is not supported. Available operations: [list]" |
132
+ | **Capability Mismatch** | Selected node lacks required capability → Inform user and suggest alternative device or operation |
128
133
 
129
134
  ### ⚠️ Prohibited Actions
130
135
 
131
- - ❌ **DO NOT** construct parameters from memory or guesswork
136
+ - ❌ **DO NOT** guess command names from user intent
132
137
  - ❌ **DO NOT** skip document consultation before executing commands
133
138
  - ❌ **DO NOT** use parameter values not defined in the documentation
139
+ - ❌ **DO NOT** infer parameter structure from similar tools
140
+ - ❌ **DO NOT** assume enum values without checking reference
141
+
142
+ ## Step 3. Invoke Node With Command and Parameters
134
143
 
135
- ## Step 3. Invoke Node With Command And Params
144
+ **Command**:
136
145
 
137
- **Command**: `openclaw nodes invoke --node <id|ip> --command <command> --params <json>`
146
+ - window(CMD): `openclaw nodes invoke --node <IP> --command <command> --params "<json>"`
147
+ - Other: `openclaw nodes invoke --node <IP> --command <command> --params '<json>'`
138
148
 
139
149
  **Purpose**: Send command to target node and initiate operation.
140
150
 
@@ -142,72 +152,57 @@ Execute the following steps **in strict order** for each operation:
142
152
 
143
153
  **Execute these validation steps in order. DO NOT skip any step.**
144
154
 
145
- | Step | Validation | Action | On Failure |
146
- | ---- | ---------------------- | ------------------------------------------------------ | --------------------------------------------------------------- |
147
- | 1 | **Node Identifier** | Extract `ID` or `IP` column from `nodes status` output | ❌ STOP: "Cannot use node name. Use ID or IP from nodes status" |
148
- | 2 | **Tool Documentation** | Read `references/<tool>.md` file completely | ❌ STOP: "Tool documentation not found" |
149
- | 4 | **Command Name** | Extract `command` exactly from tool documentation | ❌ STOP: "Command mismatch. Check documentation" |
150
- | 3 | **Required Params** | Extract `params` from tool documentation | ❌ STOP: "Missing required field: [field]" |
155
+ | Step | Validation | Action | On Failure |
156
+ | ---- | ------------------- | ------------------------------------------------------ | ---------------------------------------------------- |
157
+ | 1 | **Node Identifier** | Extract `IP` or `ID` column from `nodes status` output | ❌ STOP: "Cannot use node. Use ID from nodes status" |
158
+ | 2 | **Tool Reference** | Read `references/<tool>.md` file completely | ❌ STOP: "Tool reference not found" |
159
+ | 4 | **Command Name** | Extract `command` exactly from tool documentation | ❌ STOP: "Command mismatch. Check documentation" |
160
+ | 3 | **Required Params** | Extract `params` from tool documentation | ❌ STOP: "Missing required field: [field]" |
161
+
162
+ ### Platform Detection and Command Format
163
+
164
+ **⚠️ CRITICAL: Platform detection is mandatory and cannot be skipped.**
151
165
 
152
- #### Node Identifier Rules
166
+ Before executing any command, you **MUST** detect the current platform and use the appropriate command format. Using the wrong format will cause command execution failures.
167
+
168
+ #### Platform Detection Logic
153
169
 
154
170
  ```
155
171
  ┌─────────────────────────────────────────────────────────────┐
156
- CORRECT: Use ID or IP from nodes status output
157
- │ ✅ openclaw nodes invoke 192.168.1.100 --command ... │
158
- │ ✅ openclaw nodes invoke f5f8916028aa5 --command ... │
172
+ DETECT PLATFORM BEFORE COMMAND EXECUTION
159
173
  ├─────────────────────────────────────────────────────────────┤
160
- INCORRECT: Use Node name column
161
- openclaw nodes invoke "Honor Magic6" --command ...
162
- openclaw nodes invoke "My Phone" --command ...
174
+ 1. Check OS type (Windows/Linux/macOS)
175
+ 2. Verify shell type (CMD/Bash/PowerShell)
176
+ 3. Apply corresponding quote style and escaping rules
177
+ │ 4. Execute command with platform-specific format │
163
178
  └─────────────────────────────────────────────────────────────┘
164
179
  ```
165
180
 
166
- ### Anti-Hallucination Rules
167
-
168
- **Before constructing ANY command, you MUST:**
169
-
170
- 1. ✅ **READ** the tool documentation file completely
171
- 2. ✅ **COPY** command name exactly from documentation
172
- 3. ✅ **VERIFY** each parameter against JSONSchema
173
- 4. ✅ **MATCH** enum values character-by-character
174
-
175
- **PROHIBITED actions that cause hallucination:**
176
-
177
- - ❌ **DO NOT** guess command names from user intent
178
- - ❌ **DO NOT** infer parameter structure from similar tools
179
- - ❌ **DO NOT** assume enum values without checking documentation
180
- - ❌ **DO NOT** use node names from the "Node" column in status output
181
-
182
- ### Parameter Format Requirements
183
-
184
- | Platform | Format | Example |
185
- | ---------------------------- | --------------------------------------- | ----------------------- |
186
- | **Bash (Linux/macOS)** | Single quotes wrapping JSON | `'{"level":50}'` |
187
- | **Windows (PowerShell/CMD)** | Double quotes with escaped inner quotes | `"{\"level\":50}"` |
188
- | **Complex Objects** | Create JSON file first | `--params @params.json` |
181
+ #### Platform-Specific Command Formats
189
182
 
190
- **Additional Requirements**:
183
+ | Platform | Shell Type | Quote Style | JSON Escaping Required | Example Command |
184
+ | ----------- | ---------- | ------------------------------- | ---------------------- | -------------------------------------------------------------------------------------------- |
185
+ | **Windows** | CMD | Double quotes, escape inner `"` | ✅ YES | `openclaw nodes invoke <IP> --command phone.call --params "{\"actionType\":\"打电话\"}"` |
186
+ | **Windows** | PowerShell | Double quotes, escape inner `$` | ✅ YES | `openclaw nodes invoke <IP> --command phone.call --params "{\`"actionType\`":\`"打电话\`"}"` |
187
+ | **Linux** | Bash | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
188
+ | **macOS** | Bash/Zsh | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
191
189
 
192
- - Parameters must be valid JSON
193
- - Enum values must match documentation exactly (case-sensitive)
194
- - Numeric values must be within defined ranges
190
+ **Universal execution method (all platforms):**
195
191
 
196
- ### Examples
192
+ Use the invoke script which automatically handles platform-specific JSON parameter formatting and shell execution.
197
193
 
198
194
  ```bash
199
- # CORRECT: Execute volume control after consulting volume.md
200
- # Documentation: command = "volume.operate", params = { actionType: "增加" | "减少" | "关闭", level?: number }
201
- openclaw nodes invoke 192.168.1.100 --command volume.operate --params '{"actionType":"增加","level":50}'
195
+ node {baseDir}/scripts/invoke.js --node <ID> --command <command> --params '<json>'
196
+ ```
202
197
 
203
- # ❌ INCORRECT: Using node name instead of ID/IP
204
- # openclaw nodes invoke "My Phone" --command volume.operate --params '{"actionType":"增加"}'
198
+ **Execution examples:**
205
199
 
206
- # ❌ INCORRECT: Wrong command name
207
- # openclaw nodes invoke <nodeId> --command volume --params '{"action":"up"}'
200
+ ```bash
201
+ # Phone call
202
+ node {baseDir}/scripts/invoke.js --node 192.168.1.100 --command phone.call --params '{"actionType":"打电话","phoneNumber":"10086"}'
208
203
 
209
- # INCORRECT: Enum case mismatch
210
- # openclaw nodes invoke <nodeId> --command volume.operate --params '{"actionType":"UP"}'
204
+ # Volume control
205
+ node {baseDir}/scripts/invoke.js --node 192.168.1.100 --command volume.operate --params '{"actionType":"增加","level":50}'
211
206
  ```
212
207
 
213
208
  ### Error Handling
@@ -227,9 +222,9 @@ openclaw nodes invoke 192.168.1.100 --command volume.operate --params '{"actionT
227
222
 
228
223
  ```
229
224
  ┌─────────────────────────────────────────────────────────────┐
230
- │ RETRY FLOW (Max 3 attempts) │
225
+ │ RETRY FLOW (Max 2 attempts) │
231
226
  ├─────────────────────────────────────────────────────────────┤
232
- │ Attempt 1 → FAIL → Wait 1s → Attempt 2 → FAIL → Wait 2s
227
+ │ Attempt 1 → FAIL → Wait 1s → Attempt 2 → FAIL → Wait 1s
233
228
  │ → Attempt 3 → FAIL → STOP & REPORT ERROR │
234
229
  │ │
235
230
  │ ⚠️ After 3 failed attempts: │
@@ -334,13 +329,3 @@ Would you like to check other nodes or retry later?"
334
329
  - ❌ **DO NOT** expose raw error codes to users
335
330
  - ❌ **DO NOT** assume user knows technical details
336
331
  - ❌ **DO NOT** leave user without next steps on failure
337
-
338
- ## 快速参考命令
339
-
340
- ```bash
341
- # 获取所有节点状态
342
- openclaw nodes status
343
-
344
- # 调用工具
345
- openclaw nodes invoke --node <id|name|ip> --command <command> --params <json>
346
- ```