@honor-claw/yoyo 1.6.1-beta.8 → 1.6.1-beta.9

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.6.1-beta.8",
3
+ "version": "1.6.1-beta.9",
4
4
  "description": "OpenClaw Honor Yoyo connection plugin",
5
5
  "keywords": [
6
6
  "ai",
@@ -90,7 +90,12 @@ metadata: { "openclaw": { "emoji": "📱", "always": true } }
90
90
 
91
91
  | 所需 Caps | 参考文件 | 工具说明 |
92
92
  | --------------------- | ---------------------------------------- | ------------------------------------ |
93
+ | `local-search` | `references/local-search.md` | 本地搜索(文档、笔记、日程、图库等) |
94
+ | `task-result-query` | `references/task-result-query.md` | 任务结果查询(轮询获取异步任务结果) |
93
95
  | `file-upload` | `references/file-upload.md` | 文件上传 |
96
+ | `gui` | `references/gui-task-create.md` | 启动 GUI 操作任务(UI Agent),只有当用户明确要求在指定 App 内执行指定动作时才使用。如果用户没有提供应用名,严禁使用本工具。|
97
+ | `gui` | `references/gui-task-terminate.md` | 取消 GUI 任务 |
98
+ | `gui` | `references/gui-task-pause.md` | 暂停 GUI 任务 |
94
99
 
95
100
  ### 2.3 MCP 工具查找流程
96
101
 
@@ -1,3 +1,8 @@
1
1
  [
2
- "file_upload"
2
+ "file_upload",
3
+ "local_search",
4
+ "task_result_query",
5
+ "gui_task_create",
6
+ "gui_task_pause",
7
+ "gui_task_terminate"
3
8
  ]
@@ -0,0 +1,206 @@
1
+ ---
2
+ name: gui.create
3
+ description: >
4
+ 启动基于 GUI 的应用操作任务(UI Agent)。用于在手机上对指定 App 发起一次独立的操控流程;单一 App 禁止拆分任务,多 App 或含条件的流程需拆分为多次调用,续办需携带上次任务的 task_id。
5
+ ---
6
+
7
+ # Gui Task Create GUI 任务创建
8
+
9
+ ## Tool Command
10
+ ```bash
11
+ gui.create
12
+ ```
13
+
14
+ ## 3. 业务规则
15
+
16
+ ### 适用场景及操作流程
17
+ 1. 针对单一 App 的任何 GUI 操作任务,禁止拆分任务,必须直接发起调用
18
+ 2. 涉及多个 App 的连续操作需拆分为多个独立任务,逐个调用
19
+ 3. 涉及条件判断(如“若…则…”)时,将条件判断与执行任务拆分为两次调用
20
+ 4. 若为对未结束任务的补充/修改/继续,需在请求中补充对应的 task_id
21
+
22
+ ### 特定交互
23
+ - 当用户表达“继续/接着/沿用上次”等续办意图时,应查找并填写上一未结束任务的 task_id
24
+ - 用户 query 中提及多个 App 时需与用户确认目标 App 后再调用
25
+ - task_query 应尽量保持用户原始指令表述,避免改写
26
+
27
+ ## 集成工作流
28
+
29
+ ### Step 1: 意图解析与参数组装
30
+ ```
31
+ ┌─────────────────────────────────────────────────────────────┐
32
+ │ 意图识别与参数提取 │
33
+ │ - 识别操作意图: 创建/发起 + GUI 应用操作任务 │
34
+ │ - 提取应用名称: 官方名/通用别称/拼音 │
35
+ │ - 提取任务指令: 包含明确操作步骤或目标 │
36
+ │ - 判断是否为续办: 根据“继续/接着/上次”等上下文 │
37
+ │ - 特殊处理: query 含多个App时确定目标应用 │
38
+ └─────────────────────────────────────────────────────────────┘
39
+
40
+ ┌─────────────────────────────────────────────────────────────┐
41
+ │ 消歧与槽位填充 │
42
+ │ - 未指定应用名称时,需向用户追问app_name │
43
+ │ - 未提供任务指令时,需向用户追问task_query │
44
+ │ - 多个应用候选时,需追问或让用户选择其一 │
45
+ │ - task_id仅当为未结束任务的更新/补充时填写 │
46
+ │ - "继续/接着/上次那个" → 映射为续办并查找task_id │
47
+ │ - 验证应用名称有效性(是否可被唤起) │
48
+ └─────────────────────────────────────────────────────────────┘
49
+
50
+ ┌─────────────────────────────────────────────────────────────┐
51
+ │ 生成工具调用 │
52
+ │ - 组装 app_name, task_query 及可选参数(task_id) │
53
+ │ - 生成平台特定的命令格式 │
54
+ └─────────────────────────────────────────────────────────────┘
55
+ ```
56
+
57
+ ### Step 2: 执行调用
58
+ - 根据操作系统选择对应的命令格式
59
+ - Windows: Cmd 格式(双引号需转义)
60
+ - Linux: Bash 格式(单引号包裹)
61
+
62
+ ## 参数定义
63
+ ```json
64
+ {
65
+ "app_name": {
66
+ "type": "string",
67
+ "description": "必填参数,需要执行该任务的app名称"
68
+ },
69
+ "task_query": {
70
+ "type": "string",
71
+ "description": "必填参数,需要让GUI执行的任务的明确query,通常为一个包含app名称的指令性query"
72
+ },
73
+ "task_id": {
74
+ "type": "string",
75
+ "description": "任务id,当前query为gui执行,且是对上一个未结束的gui任务的更新、补充,那么则将上一个未结束的gui任务的task_id填入"
76
+ }
77
+ }
78
+ ```
79
+
80
+ ### 参数注意事项
81
+ 1. `task_query` 应尽量保持用户原始意图,并将其改写成包含app名称的指令性query,或明确的gui操作指令。
82
+ 2. **同义词/间接表述映射**: “用X/在X里/打开X然后…”均映射为识别 `app_name`=X;“继续/接着/上次那个”映射为续办语义,需要填写 `task_id`。
83
+ 3. **默认值或缺省行为**: `app_name` 与 `task_query` 为必填,无默认值,如果缺失则需要追问用户;新增任务场景下 `task_id` 留空或不填写。
84
+ 4. **参数间关联/依赖**: `task_query` 通常包含 App 名称,但仍须单独提供 `app_name`;续办场景中 `task_id` 与所指任务保持一致。
85
+ 5. **可选参数填写条件**: 仅当用户明确为未结束任务的更新/补充/继续时才填写 `task_id`,否则不传。
86
+
87
+ ## Query 示例及输出
88
+
89
+ ### 示例 1: 在携程查询最便宜的机票(新增任务)
90
+
91
+ **用户输入**: "帮我在携程查询一下从上海去北京最便宜的机票"
92
+
93
+ **工具**: "gui.create"
94
+
95
+ **JSON 参数**:
96
+ ```json
97
+ {
98
+ "app_name": "携程",
99
+ "task_query": "帮我在携程查询一下从上海去北京最便宜的机票"
100
+ }
101
+ ```
102
+
103
+ **Windows (Cmd) 执行命令**:
104
+ ```bash
105
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.create --params "{\"app_name\":\"携程\",\"task_query\":\"帮我在携程查询一下从上海去北京最便宜的机票\"}"'
106
+ ```
107
+
108
+ **Linux (Bash) 执行命令**:
109
+ ```bash
110
+ openclaw nodes invoke --node <ID> --command gui.create --params '{"app_name":"携程","task_query":"帮我在携程查询一下从上海去北京最便宜的机票"}'
111
+ ```
112
+
113
+ ---
114
+
115
+ ### 示例 2: 单一应用任务(禁止拆解任务)
116
+
117
+ **用户输入**: "打开微信添加好友A和好友B,并给A发送你好"
118
+
119
+ **工具**: "gui.create"
120
+
121
+ **JSON 参数**:
122
+ ```json
123
+ {
124
+ "app_name": "微信",
125
+ "task_query": "打开微信添加好友A和好友B,并给A发送你好"
126
+ }
127
+ ```
128
+
129
+ **Windows (Cmd) 执行命令**:
130
+ ```bash
131
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.create --params "{\"app_name\":\"微信\",\"task_query\":\"打开微信添加好友A和好友B,并给A发送你好\"}"'
132
+ ```
133
+
134
+ **Linux (Bash) 执行命令**:
135
+ ```bash
136
+ openclaw nodes invoke --node <ID> --command gui.create --params '{"app_name":"微信","task_query":"打开微信添加好友A和好友B,并给A发送你好"}'
137
+ ```
138
+
139
+ ---
140
+
141
+ ### 示例 3: 多应用任务(必须按app拆解任务)
142
+
143
+ **用户输入**: "在淘宝把羽绒服加入购物车,然后截图发给微信好友A"
144
+
145
+ **工具**: "gui.create"
146
+
147
+ **JSON 参数**:
148
+ sub-task 1: 在淘宝将“羽绒服”加入购物车并截图
149
+ ```json
150
+ {
151
+ "app_name": "淘宝",
152
+ "task_query": "在淘宝将“羽绒服”加入购物车并截图"
153
+ }
154
+ ```
155
+ sub-task 2: 在微信将截图发送给好友A
156
+ ```json
157
+ {
158
+ "app_name": "微信",
159
+ "task_query": "在微信将截图发送给好友A"
160
+ }
161
+ ```
162
+
163
+ **Windows (Cmd) 执行命令**:
164
+ ```bash
165
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.create --params "{\"app_name\":\"淘宝\",\"task_query\":\"在淘宝将“羽绒服”加入购物车并截图\"}"'
166
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.create --params "{\"app_name\":\"微信\",\"task_query\":\"在微信将截图发送给好友A\"}"'
167
+ ```
168
+
169
+ **Linux (Bash) 执行命令**:
170
+ ```bash
171
+ openclaw nodes invoke --node <ID> --command gui.create --params '{"app_name":"淘宝","task_query":"在淘宝将“羽绒服”加入购物车并截图"}'
172
+ openclaw nodes invoke --node <ID> --command gui.create --params '{"app_name":"微信","task_query":"在微信将截图发送给好友A"}'
173
+ ```
174
+
175
+ ---
176
+
177
+ ### 示例 4: 继续上次在高德地图的导航并修改目的地(续办,带 task_id)
178
+
179
+ **用户输入**: "接着刚才在高德地图的导航,把目的地改成北京南站"
180
+
181
+ **工具**: "gui.create"
182
+
183
+ **JSON 参数**:
184
+ ```json
185
+ {
186
+ "app_name": "高德地图",
187
+ "task_query": "继续在高德地图进行导航,将目的地改为北京南站",
188
+ "task_id": "prev-task-id-001"
189
+ }
190
+ ```
191
+
192
+ **Windows (Cmd) 执行命令**:
193
+ ```bash
194
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.create --params "{\"app_name\":\"高德地图\",\"task_query\":\"继续在高德地图进行导航,将目的地改为北京南站\",\"task_id\":\"prev-task-id-001\"}"'
195
+ ```
196
+
197
+ **Linux (Bash) 执行命令**:
198
+ ```bash
199
+ openclaw nodes invoke --node <ID> --command gui.create --params '{"app_name":"高德地图","task_query":"继续在高德地图进行导航,将目的地改为北京南站","task_id":"prev-task-id-001"}'
200
+ ```
201
+
202
+ ---
203
+
204
+ **注意**:
205
+ - 返回给用户的回复话术严禁包含完整的 `task_id`,以免泄露隐私。
206
+ - 回复话术使用简短的task_id,且task_id不能被特殊字符包裹,例如:成功创建了任务55cd5faf-2871-468c-86bc-415b24ee0cc4,应该返回的回复话术为:✅ GUI 任务已启动,正在规划中。\n📋 任务 ID:55cd5faf
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: gui.pause
3
+ description: >
4
+ GUI 任务暂停工具。用于暂停由 gui_task_create 创建且正在执行中的 GUI 任务(UI Agent 接口)。
5
+ ---
6
+
7
+ # Gui Task Pause GUI任务暂停
8
+
9
+ ## Tool Command
10
+ ```bash
11
+ gui.pause
12
+ ```
13
+
14
+ ## 集成工作流
15
+
16
+ ### Step 1: 意图解析与参数组装
17
+ ```
18
+ ┌─────────────────────────────────────────────────────────────┐
19
+ │ 意图识别与参数提取 │
20
+ │ - 识别操作意图: 暂停 + GUI任务 │
21
+ │ - 提取任务标识: 从会话上下文获取上一个未结束的 task_id │
22
+ │ - 判断任务上下文: 如无未结束任务需提示或追问 │
23
+ │ - 提取修饰词: 用户表述中的时间性短语不影响暂停意图 │
24
+ │ - 特殊处理: "暂停/先停一下/稍后继续/先别动"等同义词统一识别 │
25
+ └─────────────────────────────────────────────────────────────┘
26
+
27
+ ┌─────────────────────────────────────────────────────────────┐
28
+ │ 消歧与槽位填充 │
29
+ │ - 未指定 task_id 时,默认为上一个未结束的 GUI 任务 │
30
+ │ - 无可用任务时,需向用户追问具体 task_id 或返回不可暂停 │
31
+ │ - "先暂停一下/停一停" → 映射为暂停操作 │
32
+ │ - 验证任务状态: 仅当任务处于执行中方可暂停 │
33
+ │ - 特殊约束: query 保持用户原始输入,严禁改写 │
34
+ └─────────────────────────────────────────────────────────────┘
35
+
36
+ ┌─────────────────────────────────────────────────────────────┐
37
+ │ 生成工具调用 │
38
+ │ - 组装 task_id 及可选参数(无) │
39
+ │ - 生成平台特定的命令格式 │
40
+ └─────────────────────────────────────────────────────────────┘
41
+ ```
42
+
43
+ ### Step 2: 执行调用
44
+ - 根据操作系统选择对应的命令格式
45
+ - Windows: Cmd 格式(双引号需转义)
46
+ - Linux: Bash 格式(单引号包裹)
47
+
48
+ ## 参数定义
49
+ ```json
50
+ {
51
+ "task_id": {
52
+ "type": "string",
53
+ "description": "必填参数,任务id,当前query为gui执行,且是对上一个未结束的gui任务的更新、补充,那么则将上一个未结束的gui任务的task_id填入"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### 参数注意事项
59
+ 1. **同义词/间接表述映射**: 用户表述如`“暂停”/“先暂停一下”/“停一下”/“稍后继续”/“先别动”`均识别为暂停操作,对应调用本工具并填充`task_id`。
60
+ 2. **默认值或缺省行为**: 未显式提供`task_id`时,默认使用“上一个未结束的 GUI 任务”的`task_id`;若不存在此类任务,应向用户追问或返回不可暂停。
61
+ 3. **参数间关联/依赖**: 仅可暂停由`gui_task_create`创建且处于执行中的任务;`task_id`若对应已完成或已取消的任务,应进行状态校验并提示无法暂停。
62
+ 4. **格式/原样保留要求**: `task_id`需精确传递为系统返回的原始字符串,不得改写、截断或格式化。
63
+
64
+ ## Query 示例及输出
65
+
66
+ ### 示例 1: 暂停后台执行中的任务(已知任务ID)
67
+ **用户输入**: "暂停后台的应用操作"
68
+
69
+ **工具**: "gui.pause"
70
+
71
+ **JSON 参数**:
72
+ ```json
73
+ {
74
+ "task_id": "1234567890"
75
+ }
76
+ ```
77
+
78
+ **Windows (Cmd) 执行命令**:
79
+ ```bash
80
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.pause --params "{\\"task_id\\":\\"1234567890\\"}"'
81
+ ```
82
+
83
+ **Linux (Bash) 执行命令**:
84
+ ```bash
85
+ openclaw nodes invoke --node <ID> --command gui.pause --params '{"task_id":"1234567890"}'
86
+ ```
87
+
88
+ ---
89
+
90
+ ### 示例 2: 暂停当前GUI执行(使用上一个未结束任务)
91
+ **用户输入**: "先暂停当前的GUI执行"
92
+
93
+ **工具**: "gui.pause"
94
+
95
+ **JSON 参数**:
96
+ ```json
97
+ {
98
+ "task_id": "gui-20240408-01"
99
+ }
100
+ ```
101
+
102
+ **Windows (Cmd) 执行命令**:
103
+ ```bash
104
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.pause --params "{\\"task_id\\":\\"gui-20240408-01\\"}"'
105
+ ```
106
+
107
+ **Linux (Bash) 执行命令**:
108
+ ```bash
109
+ openclaw nodes invoke --node <ID> --command gui.pause --params '{"task_id":"gui-20240408-01"}'
110
+ ```
111
+
112
+ ---
113
+
114
+ ### 示例 3: 暂停自动化点按流程
115
+ **用户输入**: "把刚才的自动化点按流程停一下"
116
+
117
+ **工具**: "gui.pause"
118
+
119
+ **JSON 参数**:
120
+ ```json
121
+ {
122
+ "task_id": "task_98765"
123
+ }
124
+ ```
125
+
126
+ **Windows (Cmd) 执行命令**:
127
+ ```bash
128
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.pause --params "{\\"task_id\\":\\"task_98765\\"}"'
129
+ ```
130
+
131
+ **Linux (Bash) 执行命令**:
132
+ ```bash
133
+ openclaw nodes invoke --node <ID> --command gui.pause --params '{"task_id":"task_98765"}'
134
+ ```
135
+
136
+ ---
137
+
138
+ ### 示例 4: 暂停,待命令再继续
139
+ **用户输入**: "先别动,等我说继续再跑"
140
+
141
+ **工具**: "gui.pause"
142
+
143
+ **JSON 参数**:
144
+ ```json
145
+ {
146
+ "task_id": "t-001"
147
+ }
148
+ ```
149
+
150
+ **Windows (Cmd) 执行命令**:
151
+ ```bash
152
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.pause --params "{\\"task_id\\":\\"t-001\\"}"'
153
+ ```
154
+
155
+ **Linux (Bash) 执行命令**:
156
+ ```bash
157
+ openclaw nodes invoke --node <ID> --command gui.pause --params '{"task_id":"t-001"}'
158
+ ```
159
+
160
+ ---
161
+
162
+ ### 示例 5: 暂停指定应用场景的GUI任务
163
+ **用户输入**: "暂停抖音店铺浏览任务"
164
+
165
+ **工具**: "gui.pause"
166
+
167
+ **JSON 参数**:
168
+ ```json
169
+ {
170
+ "task_id": "9f2a1c3e"
171
+ }
172
+ ```
173
+
174
+ **Windows (Cmd) 执行命令**:
175
+ ```bash
176
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.pause --params "{\\"task_id\\":\\"9f2a1c3e\\"}"'
177
+ ```
178
+
179
+ **Linux (Bash) 执行命令**:
180
+ ```bash
181
+ openclaw nodes invoke --node <ID> --command gui.pause --params '{"task_id":"9f2a1c3e"}'
182
+ ```
183
+
184
+ ---
185
+
186
+ **注意**:
187
+ - 返回给用户的回复话术严禁包含完整的 `task_id`,以免泄露隐私。
188
+ - 回复话术使用简短的task_id,且task_id不能被特殊字符包裹,例如:成功暂停了任务55cd5faf-2871-468c-86bc-415b24ee0cc4,应该返回的回复话术为:✅ GUI 任务(55cd5faf)已暂停。
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: gui.terminate
3
+ description: >
4
+ GUI 任务取消工具。用于通过 UI Agent 取消由 gui_task_create 创建且正在执行的 GUI 任务。
5
+ ---
6
+
7
+ # Gui Task Terminate GUI 任务取消
8
+
9
+ ## Tool Command
10
+ ```bash
11
+ gui.terminate
12
+ ```
13
+
14
+ ## 集成工作流
15
+
16
+ ### Step 1: 意图解析与参数组装
17
+ ```
18
+ ┌─────────────────────────────────────────────────────────────┐
19
+ │ 意图识别与参数提取 │
20
+ │ - 识别操作意图: 取消 + GUI 任务 │
21
+ │ - 提取任务ID: 从上下文获取上一个未结束 GUI 任务的 task_id │
22
+ │ - 判断场景: 当前是否为对上一个未结束 GUI 任务的更新/补充 │
23
+ │ - 特殊处理: "取消/停止/终止/结束/中止/打断/别做了" 等同义词│
24
+ │ 统一识别 │
25
+ └─────────────────────────────────────────────────────────────┘
26
+
27
+ ┌─────────────────────────────────────────────────────────────┐
28
+ │ 消歧与槽位填充 │
29
+ │ - 未指定task_id且存在唯一未结束任务时,默认为该任务 │
30
+ │ - task_id缺失且无法从上下文确定时,需向用户追问要取消的任务│
31
+ │ - "停止/终止/结束/打断/不要了" → 映射为取消操作 │
32
+ │ - task_id需为非空字符串,若无效需提示用户 │
33
+ │ - query保持用户原始输入,严禁改写 │
34
+ └─────────────────────────────────────────────────────────────┘
35
+
36
+ ┌─────────────────────────────────────────────────────────────┐
37
+ │ 生成工具调用 │
38
+ │ - 组装 task_id 及可选参数(无) │
39
+ │ - 生成平台特定的命令格式 │
40
+ └─────────────────────────────────────────────────────────────┘
41
+ ```
42
+
43
+ ### Step 2: 执行调用
44
+ - 根据操作系统选择对应的命令格式
45
+ - Windows: Cmd 格式(双引号需转义)
46
+ - Linux: Bash 格式(单引号包裹)
47
+
48
+ ## 参数定义
49
+ ```json
50
+ {
51
+ "task_id": {
52
+ "type": "string",
53
+ "description": "必填参数,任务id,当前query为gui执行,且是对上一个未结束的gui任务的更新、补充,那么则将上一个未结束的gui任务的task_id填入"
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### 参数注意事项
59
+ 1. **同义词/间接表述映射**: 用户口语化表述如“取消/停止/终止/结束/中止/打断/别做了/不要了”均视为取消当前 GUI 任务,映射到填写`task_id`并调用本工具。
60
+ 2. **默认值或缺省行为**: 当存在唯一未结束的 GUI 任务且用户未显式提供`task_id`时,默认使用该任务的`task_id`进行取消。
61
+ 3. **参数依赖与来源**: `task_id`通常来源于由`gui_task_create`创建的最近未结束任务的上下文;如有多个未结束任务,必须让用户明确指定目标任务。
62
+
63
+ ## Query 示例及输出
64
+
65
+ ### 示例 1: 取消正在进行的后台应用操作
66
+
67
+ **用户输入**: "取消后台的应用操作"
68
+
69
+ **工具**: "gui.terminate"
70
+
71
+ **JSON 参数**:
72
+ ```json
73
+ {
74
+ "task_id": "1234567890"
75
+ }
76
+ ```
77
+
78
+ **Windows (Cmd) 执行命令**:
79
+ ```bash
80
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.terminate --params "{\"task_id\":\"1234567890\"}"'
81
+ ```
82
+
83
+ **Linux (Bash) 执行命令**:
84
+ ```bash
85
+ openclaw nodes invoke --node <ID> --command gui.terminate --params '{"task_id":"1234567890"}'
86
+ ```
87
+
88
+ ---
89
+
90
+ ### 示例 2: 用户切换任务,终止上个 GUI 操作
91
+
92
+ **用户输入**: "直接做下一个任务"
93
+
94
+ **工具**: "gui.terminate"
95
+
96
+ **JSON 参数**:
97
+ ```json
98
+ {
99
+ "task_id": "1234567890"
100
+ }
101
+ ```
102
+
103
+ **Windows (Cmd) 执行命令**:
104
+ ```bash
105
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.terminate --params "{\"task_id\":\"1234567890\"}"'
106
+ ```
107
+
108
+ **Linux (Bash) 执行命令**:
109
+ ```bash
110
+ openclaw nodes invoke --node <ID> --command gui.terminate --params '{"task_id":"1234567890"}'
111
+ ```
112
+
113
+ ---
114
+
115
+ ### 示例 3: 口语化表达终止操作
116
+
117
+ **用户输入**: "把刚才的 GUI 操作停一下"
118
+
119
+ **工具**: "gui.terminate"
120
+
121
+ **JSON 参数**:
122
+ ```json
123
+ {
124
+ "task_id": "9876543210"
125
+ }
126
+ ```
127
+
128
+ **Windows (Cmd) 执行命令**:
129
+ ```bash
130
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.terminate --params "{\"task_id\":\"9876543210\"}"'
131
+ ```
132
+
133
+ **Linux (Bash) 执行命令**:
134
+ ```bash
135
+ openclaw nodes invoke --node <ID> --command gui.terminate --params '{"task_id":"9876543210"}'
136
+ ```
137
+
138
+ ---
139
+
140
+ ### 示例 4: 指代“上个任务”的场景
141
+
142
+ **用户输入**: "中止上个图形化任务"
143
+
144
+ **工具**: "gui.terminate"
145
+
146
+ **JSON 参数**:
147
+ ```json
148
+ {
149
+ "task_id": "task-abc-001"
150
+ }
151
+ ```
152
+
153
+ **Windows (Cmd) 执行命令**:
154
+ ```bash
155
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.terminate --params "{\"task_id\":\"task-abc-001\"}"'
156
+ ```
157
+
158
+ **Linux (Bash) 执行命令**:
159
+ ```bash
160
+ openclaw nodes invoke --node <ID> --command gui.terminate --params '{"task_id":"task-abc-001"}'
161
+ ```
162
+
163
+ ---
164
+
165
+ ### 示例 5: 结束刚才的自动执行
166
+
167
+ **用户输入**: "结束刚才的自动操作"
168
+
169
+ **工具**: "gui.terminate"
170
+
171
+ **JSON 参数**:
172
+ ```json
173
+ {
174
+ "task_id": "last-gui-0001"
175
+ }
176
+ ```
177
+
178
+ **Windows (Cmd) 执行命令**:
179
+ ```bash
180
+ cmd /c 'openclaw nodes invoke --node <ID> --command gui.terminate --params "{\"task_id\":\"last-gui-0001\"}"'
181
+ ```
182
+
183
+ **Linux (Bash) 执行命令**:
184
+ ```bash
185
+ openclaw nodes invoke --node <ID> --command gui.terminate --params '{"task_id":"last-gui-0001"}'
186
+ ```
187
+
188
+ ---
189
+
190
+ **注意**:
191
+ - 返回给用户的回复话术严禁包含完整的 `task_id`,以免泄露隐私。
192
+ - 回复话术使用简短的task_id,且task_id不能被特殊字符包裹,例如:成功终止了任务55cd5faf-2871-468c-86bc-415b24ee0cc4,应该返回的回复话术为:✅ GUI 任务(55cd5faf)已终止。
@@ -0,0 +1,307 @@
1
+ ---
2
+ name: local-search
3
+ description: >
4
+ 用户手机内容RAG系统。用户使用自然语言统一查询本地数据,
5
+ 信源包括文档、笔记、日程、图库、yoyo记忆、钱包,
6
+ 用于直接回答用户问题或生成概览性内容。
7
+ ---
8
+
9
+ # Local Search 本地数据搜索
10
+
11
+ ## Tool Command
12
+
13
+ ```bash
14
+ local-search
15
+ ```
16
+
17
+ ### 输出
18
+
19
+ ```json
20
+ {
21
+ "task_id": {
22
+ "type": "string",
23
+ "description": "任务ID,用于后续查询任务执行结果"
24
+ }
25
+ }
26
+ ```
27
+
28
+ ### Step 2: 获取任务结果
29
+
30
+ ```bash
31
+ task_result_query
32
+ ```
33
+
34
+ ### 输入 (task_result_query)
35
+
36
+ ```json
37
+ {
38
+ "task_id": {
39
+ "type": "string",
40
+ "description": "local-search 返回的任务ID"
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### 输出 (task_result_query)
46
+
47
+ ```json
48
+ {
49
+ "answer": {
50
+ "type": "string",
51
+ "description": "工具执行的最新结果"
52
+ },
53
+ "isFinal": {
54
+ "type": "boolean",
55
+ "description": "任务是否执行完成,true 表示完成,false 表示仍在执行中"
56
+ }
57
+ }
58
+ ```
59
+
60
+ ### 完整调用流程
61
+
62
+ ```
63
+ ┌─────────────────────────────────────────────────────────────┐
64
+ │ Step 1: 调用 local-search │
65
+ │ - 输入: query, isSearchImage │
66
+ │ - 输出: task_id │
67
+ └─────────────────────────────────────────────────────────────┘
68
+
69
+ ┌─────────────────────────────────────────────────────────────┐
70
+ │ Step 2: 轮询 task_result_query │
71
+ │ - 输入: task_id │
72
+ │ - 输出: answer, isFinal │
73
+ │ - 循环调用直到 isFinal = true │
74
+ └─────────────────────────────────────────────────────────────┘
75
+ ```
76
+
77
+ ## 集成工作流
78
+
79
+ ### Step 1: 意图解析与参数组装
80
+
81
+ ```
82
+ ┌─────────────────────────────────────────────────────────────┐
83
+ │ 意图识别与参数提取 │
84
+ │ - 识别查询内容: 用户原始 query,不做任何改写 │
85
+ │ - 判断是否涉及图片搜索 │
86
+ │ - 数据范围: 文档/笔记/日程/图库/yoyo记忆/钱包 │
87
+ └─────────────────────────────────────────────────────────────┘
88
+
89
+ ┌─────────────────────────────────────────────────────────────┐
90
+ │ 消歧与槽位填充 │
91
+ │ - 当 query 涉及图片、照片、截图等内容时 isSearchImage = true │
92
+ │ - 其他文本类查询(文档、笔记、日程等)isSearchImage = false │
93
+ │ - query 保持用户原始输入,严禁改写 │
94
+ └─────────────────────────────────────────────────────────────┘
95
+
96
+ ┌─────────────────────────────────────────────────────────────┐
97
+ │ 生成工具调用 │
98
+ │ - 组装 query 及可选参数(isSearchImage) │
99
+ │ - 生成平台特定的命令格式 │
100
+ └─────────────────────────────────────────────────────────────┘
101
+ ```
102
+
103
+ ### Step 2: 执行调用
104
+
105
+ - 根据操作系统选择对应的命令格式
106
+ - Windows: Cmd 格式(双引号需转义)
107
+ - Linux: Bash 格式(单引号包裹)
108
+
109
+ ### Step 3: 获取任务结果
110
+
111
+ - 使用 local-search 返回的 task_id
112
+ - 调用 task_result_query 轮询获取结果
113
+ - 当 isFinal = false 时继续轮询,当 isFinal = true 时返回最终结果
114
+
115
+ ## 数据范围
116
+
117
+ | 信源 | 说明 |
118
+ | :----------- | :--------------------------------------------------------------------- |
119
+ | **文档** | 本地存储的文档(如 Word、PDF、PPT 等),通过文本抽取和向量化建立索引 |
120
+ | **笔记** | 便签、备忘录、记事类应用中的文本内容 |
121
+ | **日程** | 日历和日程条目(会议、活动、提醒等),含时间、地点、参与人等结构化信息 |
122
+ | **图库** | 本地图片、照片、截图等图像内容 |
123
+ | **yoyo记忆** | yoyo 智能助理的历史记忆数据 |
124
+ | **钱包** | 钱包相关数据 |
125
+
126
+ ## 意图分类与参数映射
127
+
128
+ | 用户意图 | 关键词示例 | 参数组合 |
129
+ | :--------------- | :---------------------------- | :---------------------------- |
130
+ | **查询文档内容** | 找/搜/查 + 文档/文件/PPT/PDF | `query` |
131
+ | **查询笔记内容** | 找/搜/查 + 笔记/便签/备忘录 | `query` |
132
+ | **查询日程信息** | 查看/查 + 日程/会议/日历/活动 | `query` |
133
+ | **搜索图片** | 找/搜 + 图片/照片/截图 | `query`, `isSearchImage`=true |
134
+ | **查询yoyo记忆** | 之前说过/记得/上次提到 | `query` |
135
+ | **查询钱包信息** | 查 + 钱包/余额/账单 | `query` |
136
+
137
+ ## 参数定义
138
+
139
+ ```json
140
+ {
141
+ "query": {
142
+ "type": "string",
143
+ "description": "用户原始 query,不需要进行任何改写。"
144
+ },
145
+ "isSearchImage": {
146
+ "type": "boolean",
147
+ "description": "是否搜索图片。"
148
+ }
149
+ }
150
+ ```
151
+
152
+ ### 参数注意事项
153
+
154
+ 1. **query 不做改写**: 必须保持用户的原始输入,严禁对 query 进行任何改写、摘要或重组
155
+ 2. **isSearchImage 判断**: 当用户查询明确涉及图片、照片、截图等图像内容时设为 `true`,其他情况设为 `false` 或不传
156
+
157
+ ## Query 示例及输出
158
+
159
+ ### 示例 1: 查询文档内容
160
+
161
+ **用户输入**: "帮我找一下上次的项目方案文档"
162
+
163
+ **工具**: "local-search"
164
+
165
+ **JSON 参数**:
166
+
167
+ ```json
168
+ {
169
+ "query": "帮我找一下上次的项目方案文档",
170
+ "isSearchImage": false
171
+ }
172
+ ```
173
+
174
+ **Windows (Cmd) 执行命令**:
175
+
176
+ ```bash
177
+ cmd /c 'openclaw nodes invoke --node <ID> --command local-search --params "{\"query\":\"帮我找一下上次的项目方案文档\",\"isSearchImage\":false}"'
178
+
179
+ ```
180
+
181
+ **Linux (Bash) 执行命令**:
182
+
183
+ ```bash
184
+ openclaw nodes invoke --node <ID> --command local-search --params '{"query":"帮我找一下上次的项目方案文档","isSearchImage":false}'
185
+ ```
186
+
187
+ ---
188
+
189
+ ### 示例 2: 搜索图片
190
+
191
+ **用户输入**: "找一下上周拍的风景照片"
192
+
193
+ **工具**: "local-search"
194
+
195
+ **JSON 参数**:
196
+
197
+ ```json
198
+ {
199
+ "query": "找一下上周拍的风景照片",
200
+ "isSearchImage": true
201
+ }
202
+ ```
203
+
204
+ **Windows (Cmd) 执行命令**:
205
+
206
+ ```bash
207
+ cmd /c 'openclaw nodes invoke --node <ID> --command local-search --params "{\"query\":\"找一下上周拍的风景照片\",\"isSearchImage\":true}"'
208
+
209
+ ```
210
+
211
+ **Linux (Bash) 执行命令**:
212
+
213
+ ```bash
214
+ openclaw nodes invoke --node <ID> --command local-search --params '{"query":"找一下上周拍的风景照片","isSearchImage":true}'
215
+ ```
216
+
217
+ ---
218
+
219
+ ### 示例 3: 查询日程信息
220
+
221
+ **用户输入**: "明天有什么会议安排"
222
+
223
+ **工具**: "local-search"
224
+
225
+ **JSON 参数**:
226
+
227
+ ```json
228
+ {
229
+ "query": "明天有什么会议安排",
230
+ "isSearchImage": false
231
+ }
232
+ ```
233
+
234
+ **Windows (Cmd) 执行命令**:
235
+
236
+ ```bash
237
+ cmd /c 'openclaw nodes invoke --node <ID> --command local-search --params "{\"query\":\"明天有什么会议安排\",\"isSearchImage\":false}"'
238
+
239
+ ```
240
+
241
+ **Linux (Bash) 执行命令**:
242
+
243
+ ```bash
244
+ openclaw nodes invoke --node <ID> --command local-search --params '{"query":"明天有什么会议安排","isSearchImage":false}'
245
+ ```
246
+
247
+ ---
248
+
249
+ ### 示例 4: 查询笔记内容
250
+
251
+ **用户输入**: "我之前记的读书笔记里有什么"
252
+
253
+ **工具**: "local-search"
254
+
255
+ **JSON 参数**:
256
+
257
+ ```json
258
+ {
259
+ "query": "我之前记的读书笔记里有什么",
260
+ "isSearchImage": false
261
+ }
262
+ ```
263
+
264
+ **Windows (Cmd) 执行命令**:
265
+
266
+ ```bash
267
+ cmd /c 'openclaw nodes invoke --node <ID> --command local-search --params "{\"query\":\"我之前记的读书笔记里有什么\",\"isSearchImage\":false}"'
268
+
269
+ ```
270
+
271
+ **Linux (Bash) 执行命令**:
272
+
273
+ ```bash
274
+ openclaw nodes invoke --node <ID> --command local-search --params '{"query":"我之前记的读书笔记里有什么","isSearchImage":false}'
275
+ ```
276
+
277
+ ---
278
+
279
+ ### 示例 5: 搜索截图
280
+
281
+ **用户输入**: "找一下之前的微信聊天截图"
282
+
283
+ **工具**: "local-search"
284
+
285
+ **JSON 参数**:
286
+
287
+ ```json
288
+ {
289
+ "query": "找一下之前的微信聊天截图",
290
+ "isSearchImage": true
291
+ }
292
+ ```
293
+
294
+ **Windows (Cmd) 执行命令**:
295
+
296
+ ```bash
297
+ cmd /c 'openclaw nodes invoke --node <ID> --command local-search --params "{\"query\":\"找一下之前的微信聊天截图\",\"isSearchImage\":true}"'
298
+
299
+ ```
300
+
301
+ **Linux (Bash) 执行命令**:
302
+
303
+ ```bash
304
+ openclaw nodes invoke --node <ID> --command local-search --params '{"query":"找一下之前的微信聊天截图","isSearchImage":true}'
305
+ ```
306
+
307
+ ---
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: task-result-query
3
+ description: >
4
+ 轮询查询任务执行结果。通过 task_id 查询异步任务的执行状态和结果,
5
+ 用于获取 local-search 等异步工具的执行结果。
6
+ ---
7
+
8
+ # Task Result Query 任务结果查询
9
+
10
+ ## Tool Command
11
+
12
+ ```bash
13
+ task_result_query
14
+ ```
15
+
16
+ ## 输入
17
+
18
+ ```json
19
+ {
20
+ "task_id": {
21
+ "type": "string",
22
+ "description": "local-search 返回的任务ID,用于查询任务执行结果"
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## 输出
28
+
29
+ ```json
30
+ {
31
+ "answer": {
32
+ "type": "string",
33
+ "description": "工具执行的最新结果内容"
34
+ },
35
+ "isFinal": {
36
+ "type": "boolean",
37
+ "description": "任务是否执行完成,true 表示已完成,false 表示仍在执行中"
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## 使用说明
43
+
44
+ 1. 先调用 local-search 获取 task_id
45
+ 2. 使用 task_id 调用本工具查询结果
46
+ 3. 当 isFinal = false 时继续轮询(建议间隔 1-2 秒)
47
+ 4. 当 isFinal = true 时返回最终结果
48
+
49
+ ## Windows (Cmd) 执行命令
50
+
51
+ ```bash
52
+ cmd /c 'openclaw nodes invoke --node <ID> --command task_result_query --params "{\"task_id\":\"<task_id>\"}"'
53
+ ```
54
+
55
+ ## Linux (Bash) 执行命令
56
+
57
+ ```bash
58
+ openclaw nodes invoke --node <ID> --command task_result_query --params '{"task_id":"<task_id>"}'
59
+ ```