@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,536 +0,0 @@
1
- # volumn 音量控制工具使用说明
2
-
3
- ## 工具指令 command 定义
4
-
5
- ```bash
6
- volume.operate
7
- ```
8
-
9
- ## Tool Parameters and Examples
10
-
11
- ```json
12
- {
13
- "name": "volume",
14
- "description": "该工具提供对设备音量的调节与管理功能。支持音量的设置、调高、调低、开启与关闭,以及当前音量状态的查询;可针对不同应用、不同设备及不同音量类型(如媒体、通话、通知等)进行精细化控制。",
15
- "parameters": {
16
- "actionType": {
17
- "type": "enum",
18
- "enumType": "string",
19
- "values": ["设置", "查询", "打开", "关闭", "调大", "调小", "设值"],
20
- "description": "音量操作的动作类型,用于明确本次指令的具体音量控制行为。当需要对音量进行开关、调整或设置具体数值时选择对应操作;当获取当前音量状态或大小时使用查询。"
21
- },
22
- "app": {
23
- "type": "string",
24
- "description": "指定需要进行音量控制的应用名称。当明确要求修改某个具体应用的音量时填写,用于限定音量操作的应用范围。"
25
- },
26
- "device": {
27
- "type": "string",
28
- "description": "指定执行音量操作的目标设备。当存在多个可控设备,或明确指出具体设备时填写,用于精确定位操作对象。"
29
- },
30
- "number": {
31
- "type": "string",
32
- "description": "音量调整的具体数值,用于设置或变化音量大小。当 actionType 为设值、调大或调小时,可结合 numberType 一同使用以明确调整幅度。"
33
- },
34
- "numberType": {
35
- "type": "enum",
36
- "enumType": "string",
37
- "values": ["数字", "极值", "百分比", "级别", "分数"],
38
- "description": "音量数值的表达类型,用于说明 number 的含义。当采用不同计量方式描述音量大小时填写。"
39
- },
40
- "volumeType": {
41
- "type": "enum",
42
- "enumType": "string",
43
- "values": [
44
- "来电",
45
- "信息",
46
- "通知",
47
- "闹钟",
48
- "音乐",
49
- "视频",
50
- "游戏",
51
- "通话",
52
- "YOYO助理",
53
- "铃声",
54
- "媒体",
55
- "导航"
56
- ],
57
- "description": "需要操作或查询的音量类别,用于区分不同系统或场景音量。当需针对某一具体声音类型进行控制时填写。"
58
- },
59
- "time": {
60
- "type": "string",
61
- "description": "指定音量操作的执行时间,可用于定时或延时调整音量。当明确要求在某一时间点执行操作时填写。"
62
- }
63
- },
64
- "required": [],
65
- "examples": [
66
- {
67
- "query": "设置播放音量",
68
- "arguments": {
69
- "actionType": "设置"
70
- }
71
- },
72
- {
73
- "query": "调大播放音量",
74
- "arguments": {
75
- "actionType": "调大"
76
- }
77
- },
78
- {
79
- "query": "调小播放音量",
80
- "arguments": {
81
- "actionType": "调小"
82
- }
83
- },
84
- {
85
- "query": "查询播放音量",
86
- "arguments": {
87
- "actionType": "查询"
88
- }
89
- },
90
- {
91
- "query": "打开播放音量",
92
- "arguments": {
93
- "actionType": "打开"
94
- }
95
- },
96
- {
97
- "query": "关闭播放音量",
98
- "arguments": {
99
- "actionType": "关闭"
100
- }
101
- },
102
- {
103
- "query": "设定的声音高低50",
104
- "arguments": {
105
- "actionType": "设值",
106
- "number": "50",
107
- "numberType": "数字"
108
- }
109
- },
110
- {
111
- "query": "把网络机顶盒的声音调至50",
112
- "arguments": {
113
- "actionType": "设值",
114
- "device": "网络机顶盒",
115
- "number": "50",
116
- "numberType": "数字"
117
- }
118
- },
119
- {
120
- "query": "调到默认音量",
121
- "arguments": {
122
- "actionType": "设值",
123
- "number": "默认"
124
- }
125
- },
126
- {
127
- "query": "电视音量调小到30%",
128
- "arguments": {
129
- "actionType": "设值",
130
- "device": "电视",
131
- "number": "30%",
132
- "numberType": "百分比"
133
- }
134
- },
135
- {
136
- "query": "声音调到3格",
137
- "arguments": {
138
- "actionType": "设值",
139
- "number": "3格",
140
- "numberType": "级别"
141
- }
142
- },
143
- {
144
- "query": "音量调小到1/3",
145
- "arguments": {
146
- "actionType": "设值",
147
- "number": "1/3",
148
- "numberType": "分数"
149
- }
150
- },
151
- {
152
- "query": "调节电视音量",
153
- "arguments": {
154
- "actionType": "设置",
155
- "device": "电视"
156
- }
157
- },
158
- {
159
- "query": "电视音量调整到三分之二",
160
- "arguments": {
161
- "actionType": "设值",
162
- "device": "电视",
163
- "number": "三分之二",
164
- "numberType": "分数"
165
- }
166
- },
167
- {
168
- "query": "声音调到最大",
169
- "arguments": {
170
- "actionType": "设值",
171
- "number": "最大",
172
- "numberType": "极值"
173
- }
174
- },
175
- {
176
- "query": "电视音量设为最大",
177
- "arguments": {
178
- "actionType": "设值",
179
- "device": "电视",
180
- "number": "最大",
181
- "numberType": "极值"
182
- }
183
- },
184
- {
185
- "query": "把播放音乐声音放到3/4",
186
- "arguments": {
187
- "actionType": "设值",
188
- "number": "3/4",
189
- "numberType": "分数",
190
- "volumeType": "音乐"
191
- }
192
- },
193
- {
194
- "query": "闹铃声调到很大",
195
- "arguments": {
196
- "actionType": "设值",
197
- "volumeType": "闹钟"
198
- }
199
- },
200
- {
201
- "query": "智慧语音音量调到一半",
202
- "arguments": {
203
- "actionType": "设值",
204
- "number": "一半",
205
- "numberType": "分数",
206
- "volumeType": "YOYO助理"
207
- }
208
- },
209
- {
210
- "query": "智慧语音音量调到最大",
211
- "arguments": {
212
- "actionType": "设值",
213
- "number": "最大",
214
- "numberType": "极值",
215
- "volumeType": "YOYO助理"
216
- }
217
- },
218
- {
219
- "query": "语音助手的音量调整到30",
220
- "arguments": {
221
- "actionType": "设值",
222
- "number": "30",
223
- "numberType": "数字",
224
- "volumeType": "YOYO助理"
225
- }
226
- },
227
- {
228
- "query": "设置6格的音乐音量",
229
- "arguments": {
230
- "actionType": "设值",
231
- "number": "6格",
232
- "numberType": "级别",
233
- "volumeType": "音乐"
234
- }
235
- },
236
- {
237
- "query": "音量调小80%",
238
- "arguments": {
239
- "actionType": "调小",
240
- "number": "80%",
241
- "numberType": "百分比"
242
- }
243
- },
244
- {
245
- "query": "声音给我调小20",
246
- "arguments": {
247
- "actionType": "调小",
248
- "number": "20",
249
- "numberType": "数字"
250
- }
251
- },
252
- {
253
- "query": "音量再调小3格",
254
- "arguments": {
255
- "actionType": "调小",
256
- "number": "3格",
257
- "numberType": "级别"
258
- }
259
- },
260
- {
261
- "query": "音量调小四分之一",
262
- "arguments": {
263
- "actionType": "调小",
264
- "number": "四分之一",
265
- "numberType": "分数"
266
- }
267
- },
268
- {
269
- "query": "网络机顶盒音量调小一半",
270
- "arguments": {
271
- "actionType": "调小",
272
- "device": "网络机顶盒",
273
- "number": "一半",
274
- "numberType": "分数"
275
- }
276
- },
277
- {
278
- "query": "媒体音量降低百分之三十",
279
- "arguments": {
280
- "actionType": "调小",
281
- "number": "百分之三十",
282
- "numberType": "百分比",
283
- "volumeType": "媒体"
284
- }
285
- },
286
- {
287
- "query": "语音助手声音调小三分之一",
288
- "arguments": {
289
- "actionType": "调小",
290
- "number": "三分之一",
291
- "numberType": "分数",
292
- "volumeType": "YOYO助理"
293
- }
294
- },
295
- {
296
- "query": "我需要调低来电铃声的音量",
297
- "arguments": {
298
- "actionType": "调小",
299
- "volumeType": "来电"
300
- }
301
- },
302
- {
303
- "query": "把手机语音助手音量给我调小",
304
- "arguments": {
305
- "actionType": "调小",
306
- "device": "手机",
307
- "volumeType": "YOYO助理"
308
- }
309
- },
310
- {
311
- "query": "电视我要睡觉了调低音量12",
312
- "arguments": {
313
- "actionType": "调小",
314
- "device": "电视",
315
- "number": "12",
316
- "numberType": "数字"
317
- }
318
- },
319
- {
320
- "query": "卧室电视你小点声",
321
- "arguments": {
322
- "actionType": "调小",
323
- "device": "电视"
324
- }
325
- },
326
- {
327
- "query": "电视把媒体音量关13%",
328
- "arguments": {
329
- "actionType": "调小",
330
- "device": "电视",
331
- "number": "13%",
332
- "numberType": "百分比",
333
- "volumeType": "媒体"
334
- }
335
- },
336
- {
337
- "query": "请帮我将车载qq音乐的音量降低30格",
338
- "arguments": {
339
- "actionType": "调小",
340
- "app": "qq音乐",
341
- "device": "车载",
342
- "number": "30格",
343
- "numberType": "级别",
344
- "volumeType": "音乐"
345
- }
346
- },
347
- {
348
- "query": "把媒体音量关掉一成",
349
- "arguments": {
350
- "actionType": "调小",
351
- "number": "一成",
352
- "volumeType": "媒体"
353
- }
354
- },
355
- {
356
- "query": "电视音量调小70%",
357
- "arguments": {
358
- "actionType": "调小",
359
- "device": "电视",
360
- "number": "70%",
361
- "numberType": "百分比"
362
- }
363
- },
364
- {
365
- "query": "打开音乐的声音",
366
- "arguments": {
367
- "actionType": "打开",
368
- "volumeType": "音乐"
369
- }
370
- },
371
- {
372
- "query": "打开电视媒体音量",
373
- "arguments": {
374
- "actionType": "打开",
375
- "device": "电视",
376
- "volumeType": "媒体"
377
- }
378
- },
379
- {
380
- "query": "30分钟后将闹铃静音",
381
- "arguments": {
382
- "actionType": "关闭",
383
- "volumeType": "闹钟",
384
- "time": "30分钟后"
385
- }
386
- },
387
- {
388
- "query": "帮我把媒体音量静音",
389
- "arguments": {
390
- "actionType": "关闭",
391
- "volumeType": "媒体"
392
- }
393
- },
394
- {
395
- "query": "电视静音闹铃声音",
396
- "arguments": {
397
- "actionType": "关闭",
398
- "device": "电视",
399
- "volumeType": "闹钟"
400
- }
401
- },
402
- {
403
- "query": "手机的声音太响了,关掉它",
404
- "arguments": {
405
- "actionType": "关闭",
406
- "device": "手机"
407
- }
408
- },
409
- {
410
- "query": "在车上将百度导航的声音音量设为零",
411
- "arguments": {
412
- "actionType": "设值",
413
- "app": "百度导航",
414
- "device": "车上",
415
- "number": "零",
416
- "numberType": "数字"
417
- }
418
- },
419
- {
420
- "query": "现在的电视通话音量",
421
- "arguments": {
422
- "actionType": "查询",
423
- "device": "电视",
424
- "volumeType": "通话"
425
- }
426
- },
427
- {
428
- "query": "查询智慧语音铃声的音量",
429
- "arguments": {
430
- "actionType": "查询",
431
- "volumeType": "铃声"
432
- }
433
- },
434
- {
435
- "query": "取消媒体音量的静音",
436
- "arguments": {
437
- "actionType": "打开",
438
- "volumeType": "媒体"
439
- }
440
- },
441
- {
442
- "query": "禁止播放音乐声音",
443
- "arguments": {
444
- "actionType": "关闭",
445
- "volumeType": "音乐"
446
- }
447
- },
448
- {
449
- "query": "提高信息音量",
450
- "arguments": {
451
- "actionType": "调大",
452
- "volumeType": "信息"
453
- }
454
- },
455
- {
456
- "query": "调大语音助手声音",
457
- "arguments": {
458
- "actionType": "调大",
459
- "volumeType": "YOYO助理"
460
- }
461
- },
462
- {
463
- "query": "调小语音助手声音",
464
- "arguments": {
465
- "actionType": "调小",
466
- "volumeType": "YOYO助理"
467
- }
468
- },
469
- {
470
- "query": "铃声响一点",
471
- "arguments": {
472
- "actionType": "调大",
473
- "volumeType": "铃声"
474
- }
475
- },
476
- {
477
- "query": "短信提示音量弄成50",
478
- "arguments": {
479
- "actionType": "设置",
480
- "volumeType": "信息"
481
- }
482
- },
483
- {
484
- "query": "打开信息提示音",
485
- "arguments": {
486
- "actionType": "打开",
487
- "volumeType": "信息"
488
- }
489
- },
490
- {
491
- "query": "关闭信息声音",
492
- "arguments": {
493
- "actionType": "关闭",
494
- "volumeType": "信息"
495
- }
496
- },
497
- {
498
- "query": "打开通知提示音",
499
- "arguments": {
500
- "actionType": "打开",
501
- "volumeType": "通知"
502
- }
503
- },
504
- {
505
- "query": "关闭通知提示音",
506
- "arguments": {
507
- "actionType": "关闭",
508
- "volumeType": "通知"
509
- }
510
- },
511
- {
512
- "query": "劳驾将音乐的音量降低到安静模式",
513
- "arguments": {
514
- "actionType": "调小",
515
- "volumeType": "音乐"
516
- }
517
- },
518
- {
519
- "query": "帮我把导航声音调大一点",
520
- "arguments": {
521
- "actionType": "调大",
522
- "volumeType": "导航"
523
- }
524
- },
525
- {
526
- "query": "导航声音调到最大",
527
- "arguments": {
528
- "actionType": "设值",
529
- "number": "最大",
530
- "numberType": "极值",
531
- "volumeType": "导航"
532
- }
533
- }
534
- ]
535
- }
536
- ```
@@ -1,103 +0,0 @@
1
- # 设备控制脚本使用说明
2
-
3
- 本脚本提供统一的设备控制接口,避免 Windows PowerShell 对 JSON 参数的引号处理问题。
4
-
5
- ## 快速开始
6
-
7
- ### 1. 获取设备ID
8
-
9
- ```bash
10
- npx openclaw nodes status
11
- ```
12
-
13
- ### 2. 创建配置文件
14
-
15
- 复制并修改示例配置文件,将 `YOUR_DEVICE_ID` 替换为实际的设备ID。
16
-
17
- ```json
18
- {
19
- "nodeId": "f5f8916028aa52091fd9e97bdb77b294b73dcef339541e33d0b51a3b8d595b6c",
20
- "command": "volume.operate",
21
- "params": {
22
- "actionType": "关闭"
23
- }
24
- }
25
- ```
26
-
27
- ### 3. 执行命令
28
-
29
- ```bash
30
- cd claw-yoyo-ext
31
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/volume-close.json
32
- ```
33
-
34
- ## 使用示例
35
-
36
- ### 音量控制
37
-
38
- ```bash
39
- # 关闭音量
40
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/volume-close.json
41
-
42
- # 调大音量
43
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/volume-up.json
44
-
45
- # 设置音量为50
46
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/volume-set-50.json
47
- ```
48
-
49
- ### 电话拨打
50
-
51
- ```bash
52
- # 拨打电话
53
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/phone-call.json
54
- ```
55
-
56
- ### 屏幕录制
57
-
58
- ```bash
59
- # 开始录制
60
- node skills/devices-control/scripts/invoke.js skills/devices-control/scripts/screen-record-start.json
61
- ```
62
-
63
- ## 调试模式
64
-
65
- 启用调试模式查看详细执行信息:
66
-
67
- ```bash
68
- node skills/devices-control/scripts/invoke.js config.json --debug
69
- ```
70
-
71
- ## 配置文件格式
72
-
73
- ```json
74
- {
75
- "nodeId": "设备ID(必填)",
76
- "command": "命令标识(必填)",
77
- "params": {
78
- // 命令参数(可选)
79
- }
80
- }
81
- ```
82
-
83
- ## 常用命令标识
84
-
85
- | 功能 | 命令标识 |
86
- |------|----------|
87
- | 音量控制 | `volume.operate` |
88
- | 电话拨打 | `phone.call` |
89
- | 屏幕录制 | `screen_recorder.control` |
90
-
91
- ## 故障排查
92
-
93
- ### 问题:找不到 openclaw 命令
94
-
95
- 确保在 `claw-yoyo-ext` 目录下执行命令,或确保 `openclaw` 已全局安装。
96
-
97
- ### 问题:设备ID无效
98
-
99
- 使用 `npx openclaw nodes status` 查看有效的设备ID。
100
-
101
- ### 问题:参数格式错误
102
-
103
- 参考 `examples.json` 查看完整的参数示例。
@@ -1,7 +0,0 @@
1
- {
2
- "nodeId": "YOUR_DEVICE_ID",
3
- "command": "volume.operate",
4
- "params": {
5
- "actionType": "调大"
6
- }
7
- }