@honor-claw/yoyo 1.0.7-beta.5 → 1.0.7-beta.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@honor-claw/yoyo",
3
- "version": "1.0.7-beta.5",
3
+ "version": "1.0.7-beta.6",
4
4
  "description": "OpenClaw Honor Yoyo connection plugin",
5
5
  "keywords": [
6
6
  "ai",
@@ -91,23 +91,22 @@ Before executing any device control operation, you **MUST** consult the correspo
91
91
  | `app` | `references/app-close.md` | 应用关闭工具。用于帮助用户关闭指定的 APP 应用,且不涉及任何具体 App 内部操作。 |
92
92
  | `contact` | `references/contact-search.md` | 联系人查找服务工具。提供按姓名、昵称、电话号码检索联系人的能力,支持区分自然人名与机构/黄页条目,可处理模糊匹配、多结果列表展示及序号选择场景。 |
93
93
  | `call` | `references/call-phone.md` | 智能电话拨打与管理工具。提供全面的电话呼叫功能,支持通过姓名、电话号码或黄页服务发起呼叫;支持指定拨号使用的SIM卡(移动/联通/电信/卡槽);具备重拨最后号码、回拨已接听来电、回拨未接听来电及通用回拨功能。 |
94
- | `call` | `references/call-search.md` | 提供查看通话记录(全部、未接听、已接听,或按联系人筛选)服务。 |
94
+ | `call` | `references/call-search.md` | 提供查看通话记录(全部、未接听、已接听,或按联系人筛选)服务。 |
95
95
  | `message` | `references/message-send.md` | 提供发送短信的服务。支持通过电话号码或联系人名称发送短信内容,可使用黄页发送短信至公共服务号码,以及发送名片信息给指定联系人。 |
96
- | `message` | `references/message-search.md` | 短信查询工具。用于查询设备上的短信记录,支持按联系人、电话号码或短信内容检索。当用户询问"查看/查询/搜索短信"等意图时调用。 |
97
- | `local-search` | `references/local-search.md` | 查询手机文档、笔记、日程、图库、yoyo记忆、钱包等 |
98
- | `file-upload` | `references/file-upload.md` | 文件上传工具。用于将本地文件上传到指定位置。当用户明确提供文件路径时直接调用;当用户仅描述文件(如"某文件"、"某照片")时,需先调用 local-search 查询获取文件路径,再执行上传。 |
99
- | `alarm` | `references/alarm-create.md` | 闹钟创建工具。用于创建闹钟,当用户明确创建/定一个闹钟时,属于创建闹钟。 |
100
- | `alarm` | `references/alarm-query.md` | 闹钟查询工具。用于查询已创建的闹钟列表,支持按时间、标题、重复类型等多维度筛选。 |
101
- | `alarm` | `references/alarm-delete.md` | 闹钟删除工具。用于永久删除已创建的闹钟,支持批量删除多个闹钟。 |
102
- | `alarm` | `references/alarm-disable.md` | 闹钟关闭工具。用于禁用已创建的闹钟,支持批量关闭多个闹钟。 |
103
- | `alarm` | `references/alarm-enable.md` | 闹钟打开工具。用于启用已创建的闹钟,支持批量打开多个闹钟。 |
104
- | `schedule` | `references/schedule-create.md` | 日程创建工具。用于在设备上创建新的日程安排,支持设置具体时间、日期和日程内容。当用户询问"创建/添加/新建日程"等意图时调用。用于创建日程的工具。当用户意图涉及添加日程/安排时,属于创建日程。 |
105
- | `schedule` | `references/schedule-search.md` | 日程查询工具。用于查询设备上已创建的日程安排,支持按时间、内容等多维度检索。 当用户询问"查看/查询/搜索日程"等意图时调用。用于搜索日程的工具。当用户意图涉及查找日程/安排时,属于查询日程。 |
106
- | `schedule` | `references/schedule-delete.md` | 日程删除工具。用于删除设备上已创建的日程安排,支持删除指定日程。当用户询问"删除/移除/取消日程"等意图时调用。用于删除日程的工具。当用户意图涉及移除日程/安排时,属于删除日程。 |
107
- | `schedule` | `references/schedule-update.md` | 日程编辑修改工具。用于修改设备上已创建日程的属性,支持修改时间、内容、地点等。当用户询问"修改/编辑/更改日程"等意图时调用。用于更新日程的工具。当用户意图涉及修改日程/安排属性时,属于编辑修改日程。 |
108
- | `wlan` | `references/wlan.md` | WLAN(无线网络、WiFi)管理工具。提供对WLAN及其相关能力的统一管理与控制,支持WLAN的开启与关闭、参数设置与状态查询,并可对WLAN使用的流量与流量提醒进行管理。 |
109
- | `bluetooth` | `references/bluetooth.md` | 蓝牙设备管理工具。提供蓝牙设备的统一管理与控制,支持蓝牙的打开/关闭、参数设置、状态查询、设备搜索与配对,并能管理已接收的蓝牙文件。 |
110
-
96
+ | `message` | `references/message-search.md` | 短信查询工具。用于查询设备上的短信记录,支持按联系人、电话号码或短信内容检索。当用户询问"查看/查询/搜索短信"等意图时调用。 |
97
+ | `local-search` | `references/local-search.md` | 查询手机文档、笔记、日程、图库、yoyo记忆、钱包等 |
98
+ | `file-upload` | `references/file-upload.md` | 文件上传工具。用于将本地文件上传到指定位置。当用户明确提供文件路径时直接调用;当用户仅描述文件(如"某文件"、"某照片")时,需先调用 local-search 查询获取文件路径,再执行上传。 |
99
+ | `alarm` | `references/alarm-create.md` | 闹钟创建工具。用于创建闹钟,当用户明确创建/定一个闹钟时,属于创建闹钟。 |
100
+ | `alarm` | `references/alarm-query.md` | 闹钟查询工具。用于查询已创建的闹钟列表,支持按时间、标题、重复类型等多维度筛选。 |
101
+ | `alarm` | `references/alarm-delete.md` | 闹钟删除工具。用于永久删除已创建的闹钟,支持批量删除多个闹钟。 |
102
+ | `alarm` | `references/alarm-disable.md` | 闹钟关闭工具。用于禁用已创建的闹钟,支持批量关闭多个闹钟。 |
103
+ | `alarm` | `references/alarm-enable.md` | 闹钟打开工具。用于启用已创建的闹钟,支持批量打开多个闹钟。 |
104
+ | `schedule` | `references/schedule-create.md` | 日程创建工具。用于在设备上创建新的日程安排,支持设置具体时间、日期和日程内容。当用户询问"创建/添加/新建日程"等意图时调用。用于创建日程的工具。当用户意图涉及添加日程/安排时,属于创建日程。 |
105
+ | `schedule` | `references/schedule-search.md` | 日程查询工具。用于查询设备上已创建的日程安排,支持按时间、内容等多维度检索。 当用户询问"查看/查询/搜索日程"等意图时调用。用于搜索日程的工具。当用户意图涉及查找日程/安排时,属于查询日程。 |
106
+ | `schedule` | `references/schedule-delete.md` | 日程删除工具。用于删除设备上已创建的日程安排,支持删除指定日程。当用户询问"删除/移除/取消日程"等意图时调用。用于删除日程的工具。当用户意图涉及移除日程/安排时,属于删除日程。 |
107
+ | `schedule` | `references/schedule-update.md` | 日程编辑修改工具。用于修改设备上已创建日程的属性,支持修改时间、内容、地点等。当用户询问"修改/编辑/更改日程"等意图时调用。用于更新日程的工具。当用户意图涉及修改日程/安排属性时,属于编辑修改日程。 |
108
+ | `wlan` | `references/wlan.md` | WLAN(无线网络、WiFi)管理工具。提供对WLAN及其相关能力的统一管理与控制,支持WLAN的开启与关闭、参数设置与状态查询,并可对WLAN使用的流量与流量提醒进行管理。 |
109
+ | `bluetooth` | `references/bluetooth.md` | 蓝牙设备管理工具。提供蓝牙设备的统一管理与控制,支持蓝牙的打开/关闭、参数设置、状态查询、设备搜索与配对,并能管理已接收的蓝牙文件。 |
111
110
 
112
111
  ### Command and Parameters Construction Workflow
113
112
 
@@ -153,7 +152,6 @@ Execute the following steps **in strict order** for each operation to construct
153
152
  - ❌ **DO NOT** infer parameter structure from similar tools
154
153
  - ❌ **DO NOT** assume enum values without checking reference
155
154
 
156
-
157
155
  ## Step 3: 特殊场景处理
158
156
 
159
157
  在正式执行工具调用前,需先识别并处理以下两类特殊场景:
@@ -163,6 +161,7 @@ Execute the following steps **in strict order** for each operation to construct
163
161
  **场景定义**:用户在短时间内(5分钟内)多次要求执行相同或高度相似的操作。
164
162
 
165
163
  **识别逻辑**:
164
+
166
165
  ```
167
166
  ┌─────────────────────────────────────────────────────────────┐
168
167
  │ 重复操作识别 │
@@ -176,11 +175,11 @@ Execute the following steps **in strict order** for each operation to construct
176
175
 
177
176
  **处理策略**:
178
177
 
179
- | 场景 | 处理方式 | 话术示例 |
180
- | :--- | :--- | :--- |
178
+ | 场景 | 处理方式 | 话术示例 |
179
+ | :----------------------- | :------------------ | :--------------------------------------------- |
181
180
  | 完全重复(参数完全一致) | 直接执行 + 智能提示 | "刚已经帮你打开蓝牙了,你是想要再操作一次吗?" |
182
- | 疑似重复(核心参数一致) | 确认后执行 | "蓝牙已经是打开状态了,你是要重新开关一次吗?" |
183
- | 用户坚持重复 | 无条件执行 | "好的,马上再帮你执行一次" |
181
+ | 疑似重复(核心参数一致) | 确认后执行 | "蓝牙已经是打开状态了,你是要重新开关一次吗?" |
182
+ | 用户坚持重复 | 无条件执行 | "好的,马上再帮你执行一次" |
184
183
 
185
184
  **智能话术模板**:
186
185
 
@@ -203,11 +202,13 @@ Execute the following steps **in strict order** for each operation to construct
203
202
  **场景定义**:用户要求执行带有时间延迟、定时触发或条件触发的操作。
204
203
 
205
204
  **识别关键词**:
205
+
206
206
  - 时间延迟:"X分钟后"、"X小时后"、"过一会儿"
207
207
  - 定时触发:"定时"、"到时候"、"X点的时候"
208
208
  - 条件触发:"等...之后"、"当...的时候"
209
209
 
210
210
  **识别逻辑**:
211
+
211
212
  ```
212
213
  ┌─────────────────────────────────────────────────────────────┐
213
214
  │ 定时任务识别 │
@@ -220,12 +221,12 @@ Execute the following steps **in strict order** for each operation to construct
220
221
 
221
222
  **处理策略**:
222
223
 
223
- | 场景 | 处理方式 | 话术示例 |
224
- | :--- | :--- | :--- |
224
+ | 场景 | 处理方式 | 话术示例 |
225
+ | :------------------ | :---------------------------- | :------------------------------------------------- |
225
226
  | 延迟执行(X分钟后) | 提示不支持 + 询问是否立即执行 | "我还不支持定时任务,只能现在帮你[操作],需要吗?" |
226
- | 定时触发(X点执行) | 提示不支持 + 建议替代方案 | "目前无法定时执行,你可以到点了再叫我哦" |
227
- | 序列操作(A然后B) | 拆解为即时操作 + 说明限制 | "我可以现在帮你[操作A],但[操作B]需要到时候再叫我" |
228
- | 条件触发(等X后Y) | 提示不支持条件执行 | "我做不到自动等待,你可以等[条件]满足后再叫我" |
227
+ | 定时触发(X点执行) | 提示不支持 + 建议替代方案 | "目前无法定时执行,你可以到点了再叫我哦" |
228
+ | 序列操作(A然后B) | 拆解为即时操作 + 说明限制 | "我可以现在帮你[操作A],但[操作B]需要到时候再叫我" |
229
+ | 条件触发(等X后Y) | 提示不支持条件执行 | "我做不到自动等待,你可以等[条件]满足后再叫我" |
229
230
 
230
231
  **标准话术模板**:
231
232
 
@@ -258,9 +259,6 @@ Execute the following steps **in strict order** for each operation to construct
258
259
  └─────────────────────────────────────────────────────────────┘
259
260
  ```
260
261
 
261
-
262
-
263
-
264
262
  ## Step 4. Invoke Node With Command and Parameters
265
263
 
266
264
  **Command**:
@@ -302,30 +300,12 @@ Before executing any command, you **MUST** detect the current platform and use t
302
300
 
303
301
  #### 平台特定命令格式
304
302
 
305
- | Platform | Shell Type | Quote Style | JSON Escaping Required | Example Command |
306
- | ----------- | ---------- | ------------------------------- | ---------------------- | -------------------------------------------------------------------------------------------- |
303
+ | Platform | Shell Type | Quote Style | JSON Escaping Required | Example Command |
304
+ | ----------- | ---------- | ------------------------------- | ---------------------- | ----------------------------------------------------------------------------------------------------------- |
307
305
  | **Windows** | CMD | Double quotes, escape inner `"` | ✅ YES | `cmd /c 'openclaw nodes invoke --node <ID> --command phone.call --params "{\"actionType\":\"打电话\"}"` |
308
306
  | **Windows** | PowerShell | Double quotes, escape inner `$` | ✅ YES | `cmd /c 'openclaw nodes invoke --node <ID> --command phone.call --params "{\`"actionType\`":\`"打电话\`"}"` |
309
- | **Linux** | Bash | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
310
- | **macOS** | Bash/Zsh | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
311
-
312
- **Universal execution method (all platforms):**
313
-
314
- Use the invoke script which automatically handles platform-specific JSON parameter formatting and shell execution.
315
-
316
- ```bash
317
- node {baseDir}/scripts/invoke.js --node <ID> --command <command> --params '<json>'
318
- ```
319
-
320
- **Execution examples:**
321
-
322
- ```bash
323
- # Phone call
324
- node {baseDir}/scripts/invoke.js --node 192.168.1.100 --command phone.call --params '{"actionType":"打电话","phoneNumber":"10086"}'
325
-
326
- # Volume control
327
- node {baseDir}/scripts/invoke.js --node 192.168.1.100 --command volume.operate --params '{"actionType":"增加","level":50}'
328
- ```
307
+ | **Linux** | Bash | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
308
+ | **macOS** | Bash/Zsh | Single quotes | ❌ NO | `openclaw nodes invoke <IP> --command phone.call --params '{"actionType":"打电话"}'` |
329
309
 
330
310
  ### Error Handling
331
311
 
@@ -1,41 +0,0 @@
1
- #!/usr/bin/env node
2
- import { execSync } from "child_process";
3
- import { parseArgs } from "util";
4
-
5
- const { values } = parseArgs({
6
- options: {
7
- node: { type: "string", short: "n" },
8
- command: { type: "string", short: "c" },
9
- params: { type: "string", short: "p", default: "{}" },
10
- },
11
- strict: true,
12
- allowPositionals: true,
13
- });
14
-
15
- if (!values.node || !values.command) {
16
- console.error("错误: 必须提供 --node 和 --command 参数");
17
- console.error("用法: node invoke.js --node <nodeId> --command <command> [--params '<json>']");
18
- process.exit(1);
19
- }
20
-
21
- const { node, command, params } = values;
22
- const isWindows = process.platform === "win32";
23
- const escapedParams = isWindows ? JSON.stringify(JSON.parse(params)).replace(/"/g, '\\"') : params;
24
- const baseCmd = isWindows ?
25
- `openclaw nodes invoke --node ${node} --command ${command} --params "${escapedParams}"` :
26
- `openclaw nodes invoke --node ${node} --command ${command} --params '${escapedParams}'`;
27
-
28
- console.log("BashCommand:", baseCmd);
29
-
30
- try {
31
- // Windows 环境使用 cmd.exe 执行
32
- const execOptions = {
33
- encoding: "utf8",
34
- shell: isWindows ? "cmd.exe" : true,
35
- };
36
- const result = execSync(baseCmd, execOptions);
37
- console.log("Node execute result:", result);
38
- } catch (e) {
39
- console.error("Execute error:", JSON.stringify(e));
40
- process.exit(1);
41
- }