@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.
- package/index.ts +2 -2
- package/openclaw.plugin.json +7 -0
- package/package.json +20 -20
- package/skills/search/SKILL.md +182 -0
- package/skills/search/scripts/search.sh +69 -0
- package/skills/yoyo-control/SKILL.md +105 -120
- package/skills/yoyo-control/references/alarm-create.md +473 -0
- package/skills/yoyo-control/references/app-close.md +183 -0
- package/skills/yoyo-control/references/app-open.md +178 -0
- package/skills/yoyo-control/references/call-phone.md +250 -0
- package/skills/yoyo-control/references/capture-screenshot.md +205 -54
- package/skills/yoyo-control/references/contact-search.md +235 -0
- package/skills/yoyo-control/references/hotspot.md +208 -0
- package/skills/yoyo-control/references/local-search.md +224 -15
- package/skills/yoyo-control/references/message-send.md +246 -0
- package/skills/yoyo-control/references/mobile-data.md +248 -0
- package/skills/yoyo-control/references/no-disturb.md +239 -0
- package/skills/yoyo-control/references/quiet-mode.md +228 -0
- package/skills/yoyo-control/references/ringing-mode.md +223 -0
- package/skills/yoyo-control/references/screen-record.md +220 -0
- package/skills/yoyo-control/references/vibration-mode.md +235 -0
- package/skills/yoyo-control/references/volume-operate.md +274 -0
- package/skills/yoyo-control/scripts/invoke.js +33 -111
- package/src/agent/copy-templates.ts +56 -0
- package/src/agent/index.ts +3 -0
- package/src/agent/templates/AGENTS.md +223 -0
- package/src/apis/claw-cloud.ts +70 -23
- package/src/apis/honor-auth.ts +20 -10
- package/src/apis/types.ts +24 -1
- package/src/cloud-channel/channel.ts +245 -58
- package/src/cloud-channel/client.ts +87 -12
- package/src/cloud-channel/types.ts +30 -0
- package/src/commands/env/impl.ts +58 -0
- package/src/commands/env/index.ts +1 -0
- package/src/commands/index.ts +11 -1
- package/src/commands/login/impl.ts +17 -8
- package/src/commands/logout/impl.ts +23 -0
- package/src/commands/logout/index.ts +1 -53
- package/src/commands/status/index.ts +172 -42
- package/src/gateway-client/client.deprecated.ts +1 -1
- package/src/gateway-client/client.ts +15 -20
- package/src/gateway-client/types.ts +2 -2
- package/src/honor-auth/browser.ts +12 -15
- package/src/honor-auth/callback-server.ts +3 -6
- package/src/honor-auth/cloud.ts +65 -12
- package/src/honor-auth/config.ts +25 -17
- package/src/honor-auth/index.ts +1 -0
- package/src/honor-auth/token-manager.ts +24 -14
- package/src/modules/claw-configs/config-manager.ts +211 -11
- package/src/modules/claw-configs/hosts.ts +48 -0
- package/src/modules/claw-configs/index.ts +1 -0
- package/src/modules/claw-configs/types.ts +4 -0
- package/src/modules/device/device-info.ts +20 -9
- package/src/modules/device/providers/linux.ts +128 -0
- package/src/modules/device/providers/macos.ts +123 -0
- package/src/modules/device/providers/pad.ts +0 -16
- package/src/modules/device/registry.ts +12 -3
- package/src/modules/login/impl.ts +38 -16
- package/src/runtime.ts +44 -0
- package/src/schemas.ts +4 -1
- package/src/services/connection/impl.ts +89 -9
- package/src/services/connection/status-tracker/events.ts +127 -0
- package/src/services/connection/status-tracker/index.ts +31 -0
- package/src/services/connection/status-tracker/storage.ts +133 -0
- package/src/services/connection/status-tracker/tracker.ts +370 -0
- package/src/services/connection/status-tracker/types.ts +131 -0
- package/src/types.ts +0 -4
- package/src/utils/fs-safe.ts +544 -0
- package/src/utils/version.ts +29 -0
- package/src/utils/ws.ts +21 -0
- package/skills/yoyo-control/references/open-app.md +0 -54
- package/skills/yoyo-control/references/phone-call.md +0 -217
- package/skills/yoyo-control/references/schedule.md +0 -107
- package/skills/yoyo-control/references/screen-recorder.md +0 -67
- package/skills/yoyo-control/references/search-contact.md +0 -37
- package/skills/yoyo-control/references/send-message.md +0 -155
- package/skills/yoyo-control/references/volume.md +0 -536
- package/skills/yoyo-control/scripts/README.md +0 -103
- package/skills/yoyo-control/scripts/volume-up.json +0 -7
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: YOYO-phone-control
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description:
|
|
4
|
+
description: 用于控制和操作手机系统功能及本地信息的工具集合,包括打开或关闭应用、发送短信、拨打电话、搜索联系人、创建闹钟、截屏、屏幕录制、调节音量、切换响铃/静音/勿扰模式、管理移动数据或热点、进行本地内容搜索等。
|
|
5
5
|
metadata: { "openclaw": { "emoji": "📱", "always": true } }
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
#
|
|
8
|
+
# YOYO Phone Control
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
**严格按照以下4步工作流**完成手机设备控制:
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
1. 查询节点状态以识别可用设备,并确定目标设备
|
|
13
|
+
2. 根据工具参考文档选择工具,提取命令和参数
|
|
14
|
+
3. 使用正确的节点标识符、命令和参数调用节点方法
|
|
15
|
+
4. 展示结果并确认操作是否成功
|
|
13
16
|
|
|
14
|
-
|
|
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**:
|
|
21
|
+
**Purpose**: 获取系统中所有节点的当前状态,识别可用于接收命令的设备
|
|
26
22
|
|
|
27
|
-
**
|
|
23
|
+
**Result Parameters Description**:
|
|
28
24
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
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 &
|
|
71
|
+
## Step 2. Plan Tool and Extract Command & Paramters
|
|
70
72
|
|
|
71
|
-
**⚠️ MANDATORY: Consult tool reference
|
|
73
|
+
**⚠️ MANDATORY: Consult tool reference before every operation**
|
|
72
74
|
|
|
73
|
-
Before executing any device control operation, you **MUST** consult the corresponding tool's
|
|
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 |
|
|
78
|
-
|
|
|
79
|
-
| `references/
|
|
80
|
-
| `references/
|
|
81
|
-
| `references/
|
|
82
|
-
| `references/
|
|
83
|
-
| `references/
|
|
84
|
-
| `references/
|
|
85
|
-
| `references/
|
|
86
|
-
| `references/
|
|
87
|
-
| `references/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
|
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
|
|
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
|
-
###
|
|
120
|
+
### Parameter Format Requirements
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
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**
|
|
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
|
-
|
|
144
|
+
**Command**:
|
|
136
145
|
|
|
137
|
-
|
|
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
|
|
146
|
-
| ---- |
|
|
147
|
-
| 1 | **Node Identifier**
|
|
148
|
-
| 2 | **Tool
|
|
149
|
-
| 4 | **Command Name**
|
|
150
|
-
| 3 | **Required Params**
|
|
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
|
-
|
|
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
|
-
│
|
|
157
|
-
│ ✅ openclaw nodes invoke 192.168.1.100 --command ... │
|
|
158
|
-
│ ✅ openclaw nodes invoke f5f8916028aa5 --command ... │
|
|
172
|
+
│ DETECT PLATFORM BEFORE COMMAND EXECUTION │
|
|
159
173
|
├─────────────────────────────────────────────────────────────┤
|
|
160
|
-
│
|
|
161
|
-
│
|
|
162
|
-
│
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
192
|
+
Use the invoke script which automatically handles platform-specific JSON parameter formatting and shell execution.
|
|
197
193
|
|
|
198
194
|
```bash
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
|
|
204
|
-
# openclaw nodes invoke "My Phone" --command volume.operate --params '{"actionType":"增加"}'
|
|
198
|
+
**Execution examples:**
|
|
205
199
|
|
|
206
|
-
|
|
207
|
-
#
|
|
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
|
-
#
|
|
210
|
-
|
|
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
|
|
225
|
+
│ RETRY FLOW (Max 2 attempts) │
|
|
231
226
|
├─────────────────────────────────────────────────────────────┤
|
|
232
|
-
│ Attempt 1 → FAIL → Wait 1s → Attempt 2 → FAIL → Wait
|
|
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
|
-
```
|