@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,217 +0,0 @@
1
- # phone_call 拨打电话工具使用说明
2
-
3
- ## Tool Command
4
-
5
- ```bash
6
- phone.call
7
- ```
8
-
9
- ## Workflow
10
-
11
- **⚠️ IMPORTANT: Follow this workflow before making a call**
12
-
13
- ```
14
- ┌─────────────────────────────────────────────────────────────┐
15
- │ Step 1: Check Input Parameters │
16
- │ - Has phoneNumber? → Go to Step 3 │
17
- │ - Has contact only? → Go to Step 2 │
18
- │ - Has neither? → Ask user for contact or phoneNumber │
19
- │ - Is recall/redial? → Go to Step 3 directly │
20
- └─────────────────────────────────────────────────────────────┘
21
-
22
- ┌─────────────────────────────────────────────────────────────┐
23
- │ Step 2: Resolve Contact to PhoneNumber │
24
- │ Call: search_contact with contact name │
25
- │ Extract: phoneNumber from search result │
26
- │ If multiple matches → Ask user to select │
27
- │ If no match → Inform user and ask for phoneNumber │
28
- └─────────────────────────────────────────────────────────────┘
29
-
30
- ┌─────────────────────────────────────────────────────────────┐
31
- │ Step 3: Make Phone Call │
32
- │ Call: phone.call with phoneNumber and actionType │
33
- └─────────────────────────────────────────────────────────────┘
34
- ```
35
-
36
- ### Decision Table
37
-
38
- | Input | Action | Tools Required |
39
- | -------------------------------- | -------------------------------------------- | ------------------------------- |
40
- | phoneNumber | Call directly | `phone.call` |
41
- | contact name | Search contact first, then call | `search_contact` → `phone.call` |
42
- | contact + phoneCard | Search contact, then call with specific card | `search_contact` → `phone.call` |
43
- | actionType = "重拨" | Redial last call | `phone.call` |
44
- | actionType = "回拨" + recallType | Callback specific call | `phone.call` |
45
- | Neither | Ask user for contact or phoneNumber | - |
46
-
47
- ### Action Types
48
-
49
- | actionType | Description | Required Params |
50
- | ---------- | ------------------------- | ------------------------ |
51
- | `打电话` | Make a new call | phoneNumber or contact |
52
- | `重拨` | Redial last outgoing call | None (uses call history) |
53
- | `回拨` | Callback a previous call | recallType |
54
-
55
- ### Recall Types (for actionType = "回拨")
56
-
57
- | recallType | Description |
58
- | ---------------- | ---------------------------------------- |
59
- | `回拨已接听来电` | Callback the last answered incoming call |
60
- | `回拨未接听来电` | Callback the last missed call |
61
- | `回拨电话` | Callback the last call (any type) |
62
-
63
- ## Tool Parameters and Examples
64
-
65
- ```json
66
- {
67
- "name": "phone_call",
68
- "description": "提供打电话能力,支持指定姓名、电话号码电话;支持选择打电话的卡;支持重拨、回拨已接听来电、回拨未接听来电、回拨电话",
69
- "parameters": {
70
- "actionType": {
71
- "type": "string",
72
- "enum": ["打电话", "重拨", "回拨"],
73
- "description": "拨打业务类型"
74
- },
75
- "recallType": {
76
- "type": "string",
77
- "enum": ["回拨已接听来电", "回拨未接听来电", "回拨电话"],
78
- "description": "回拨类型,非打电话和重拨的时候有值"
79
- },
80
- "deviceType": {
81
- "type": "string",
82
- "description": "设备类型,手机、固定电话等等。"
83
- },
84
- "phoneCard": {
85
- "type": "string",
86
- "description": "电话卡,包括移动、联通、电信、卡1、卡2等等。"
87
- },
88
- "phoneNumber": {
89
- "type": "string",
90
- "description": "电话号码。该参数必需。"
91
- },
92
- "contact": {
93
- "type": "string",
94
- "description": "泛化的"联系人"概念,可为:自然人名或昵称(如:张三、王总)、非自然实体(机构、部门、服务名称,如:招生办、物业客服)"
95
- }
96
- },
97
- "examples": [
98
- {
99
- "scenario": "User provides phoneNumber directly",
100
- "query": "打电话给15651621029",
101
- "workflow": "Direct call (no contact search needed)",
102
- "arguments": {
103
- "actionType": "打电话",
104
- "phoneNumber": "15651621029"
105
- }
106
- },
107
- {
108
- "scenario": "User provides contact name only",
109
- "query": "打电话给妈妈",
110
- "workflow": "search_contact → phone.call",
111
- "step1": {
112
- "tool": "search_contact",
113
- "arguments": {
114
- "contact": "妈妈"
115
- },
116
- "result": {
117
- "name": "妈妈",
118
- "phoneNumber": "13900139000"
119
- }
120
- },
121
- "step2": {
122
- "tool": "phone.call",
123
- "arguments": {
124
- "actionType": "打电话",
125
- "phoneNumber": "13900139000"
126
- }
127
- }
128
- },
129
- {
130
- "scenario": "User provides contact with phoneCard",
131
- "query": "用移动卡打电话给张三",
132
- "workflow": "search_contact → phone.call with phoneCard",
133
- "step1": {
134
- "tool": "search_contact",
135
- "arguments": {
136
- "contact": "张三"
137
- },
138
- "result": {
139
- "name": "张三",
140
- "phoneNumber": "15651621029"
141
- }
142
- },
143
- "step2": {
144
- "tool": "phone.call",
145
- "arguments": {
146
- "actionType": "打电话",
147
- "phoneNumber": "15651621029",
148
- "phoneCard": "移动"
149
- }
150
- }
151
- },
152
- {
153
- "scenario": "User requests redial",
154
- "query": "重拨",
155
- "workflow": "Direct redial (no contact search needed)",
156
- "arguments": {
157
- "actionType": "重拨"
158
- }
159
- },
160
- {
161
- "scenario": "User requests callback missed call",
162
- "query": "回拨未接来电",
163
- "workflow": "Direct callback (no contact search needed)",
164
- "arguments": {
165
- "actionType": "回拨",
166
- "recallType": "回拨未接听来电"
167
- }
168
- },
169
- {
170
- "scenario": "User provides contact with multiple matches",
171
- "query": "打电话给李四",
172
- "workflow": "search_contact → user selects → phone.call",
173
- "step1": {
174
- "tool": "search_contact",
175
- "arguments": {
176
- "contact": "李四"
177
- },
178
- "result": {
179
- "matches": [
180
- { "name": "李四(公司)", "phoneNumber": "13800138001" },
181
- { "name": "李四(家里)", "phoneNumber": "13800138002" }
182
- ]
183
- }
184
- },
185
- "step2": {
186
- "action": "Ask user to select",
187
- "prompt": "找到多个李四,请选择:1. 李四(公司) 2. 李四(家里)"
188
- },
189
- "step3": {
190
- "tool": "phone.call",
191
- "arguments": {
192
- "actionType": "打电话",
193
- "phoneNumber": "13800138001"
194
- }
195
- }
196
- },
197
- {
198
- "scenario": "User provides contact with no match",
199
- "query": "打电话给王五",
200
- "workflow": "search_contact → no match → ask for phoneNumber",
201
- "step1": {
202
- "tool": "search_contact",
203
- "arguments": {
204
- "contact": "王五"
205
- },
206
- "result": {
207
- "matches": []
208
- }
209
- },
210
- "step2": {
211
- "action": "Ask user for phoneNumber",
212
- "prompt": "未找到联系人王五,请提供电话号码"
213
- }
214
- }
215
- ]
216
- }
217
- ```
@@ -1,107 +0,0 @@
1
- # schedule_create 日程创建工具使用说明
2
-
3
- ## Tool Command
4
-
5
- ```bash
6
- schedule.create
7
- ```
8
-
9
- ## Tool Parameters and Examples
10
-
11
- ```JSON
12
- {
13
- "name": "schedule_create",
14
- "description": "该工具提供对于日程的创建功能。",
15
- "parameters": {
16
- "timeInfo": {
17
- "type": "object",
18
- "description": "时间相关信息",
19
- "properties": {
20
- "type": {
21
- "type": "string",
22
- "enum": [
23
- "repeat",
24
- "duration",
25
- "fixedDate",
26
- "fixedTime",
27
- "fixedPeriodDate",
28
- "fixedPeriodTime"
29
- ],
30
- "description": "日程类型"
31
- },
32
- "inferTime": {
33
- "type": "string",
34
- "description": "当前时间,如:2026-03-16 16:05:56"
35
- },
36
- "inferResult": {
37
- "type": "object",
38
- "description": "时间相关信息",
39
- "properties": {
40
- "fixedTime": {
41
- "type": "string",
42
- "description": "日程时间,如:2026-03-17 10:00:00"
43
- },
44
- "originTime": {
45
- "type": "string",
46
- "description": "与fixedTime值相同"
47
- },
48
- "queryTime": {
49
- "type": "string",
50
- "description": "与fixedTime值相同"
51
- },
52
- "queryDate": {
53
- "type": "string",
54
- "description": "日程日期,如:2026-03-17"
55
- },
56
- "lunar": {
57
- "type": "number",
58
- "description": "固定值为0"
59
- },
60
- "inferedTime": {
61
- "type": "string",
62
- "description": "与fixedTime值相同"
63
- },
64
- "originNewTime": {
65
- "type": "string",
66
- "description": "与fixedTime值相同"
67
- }
68
- }
69
- }
70
- }
71
- },
72
- "time": {
73
- "type": "string",
74
- "description": "日程时间描述,如:明天十点"
75
- },
76
- "type": {
77
- "type": "string",
78
- "description": "固定值为:日程"
79
- },
80
- "event": {
81
- "type": "string",
82
- "description": "日程内容,如:重要会议"
83
- }
84
- },
85
- "required": [],
86
- "examples": [
87
- {
88
- "timeInfo": {
89
- "type": "fixedTime",
90
- "inferTime": "2026-03-16 16:05:56",
91
- "inferResult": {
92
- "fixedTime": "2026-03-17 03:00:00",
93
- "originTime": "2026-03-17 03:00:00",
94
- "queryTime": "2026-03-17 03:00:00",
95
- "queryDate": "2026-03-17",
96
- "lunar": "0",
97
- "inferedTime": "2026-03-17 03:00:00",
98
- "originNewTime": "2026-03-17 03:00:00"
99
- }
100
- },
101
- "time": "明天三点",
102
- "type": "日程",
103
- "event": "帮我创建一个明天的日程,明天是重要会议"
104
- }
105
- ]
106
- }
107
- ```
@@ -1,67 +0,0 @@
1
- # screen_recorder 屏幕录制工具使用说明
2
-
3
- ## Tool Command
4
-
5
- ```bash
6
- screen.record
7
- ```
8
-
9
- ## Tool Parameters and Examples
10
-
11
- ```json
12
- {
13
- "name": "screen_recorder",
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
- },
27
- "required": [],
28
- "examples": [
29
- {
30
- "query": "打开屏幕录制",
31
- "arguments": {
32
- "actionType": "打开"
33
- }
34
- },
35
- {
36
- "query": "关闭屏幕录制",
37
- "arguments": {
38
- "actionType": "关闭"
39
- }
40
- },
41
- {
42
- "query": "恢复录屏使用",
43
- "arguments": {
44
- "actionType": "打开"
45
- }
46
- },
47
- {
48
- "query": "请打开手机录制屏幕功能",
49
- "arguments": {
50
- "actionType": "打开"
51
- }
52
- },
53
- {
54
- "query": "youyou停止录制屏幕",
55
- "arguments": {
56
- "actionType": "关闭"
57
- }
58
- },
59
- {
60
- "query": "您好幽幽断开屏幕录制选项下吧",
61
- "arguments": {
62
- "actionType": "关闭"
63
- }
64
- }
65
- ]
66
- }
67
- ```
@@ -1,37 +0,0 @@
1
- # search_contact 搜索联系人工具使用说明
2
-
3
- ## Tool Command
4
-
5
- ```bash
6
- search.contact
7
- ```
8
-
9
- ## Tool Parameters and Examples
10
-
11
- ```json
12
- {
13
- "name": "search_contact",
14
- "description": "该工具提供对于联系人的查询功能。支持查找手机联系人",
15
- "parameters": {
16
- "contact": {
17
- "type": "string",
18
- "description": "联系人名称"
19
- }
20
- },
21
- "required": [],
22
- "examples": [
23
- {
24
- "query": "查找妈妈的电话",
25
- "arguments": {
26
- "contact": "妈妈"
27
- }
28
- },
29
- {
30
- "query": "打给老婆",
31
- "arguments": {
32
- "contact": "老婆"
33
- }
34
- }
35
- ]
36
- }
37
- ```
@@ -1,155 +0,0 @@
1
- # send_message 发送短信工具使用说明
2
-
3
- ## Tool Command
4
-
5
- ```bash
6
- send.message
7
- ```
8
-
9
- ## Workflow
10
-
11
- **⚠️ IMPORTANT: Follow this workflow before sending message**
12
-
13
- ```
14
- ┌─────────────────────────────────────────────────────────────┐
15
- │ Step 1: Check Input Parameters │
16
- │ - Has phoneNumber? → Go to Step 3 │
17
- │ - Has contact only? → Go to Step 2 │
18
- │ - Has neither? → Ask user for contact or phoneNumber │
19
- └─────────────────────────────────────────────────────────────┘
20
-
21
- ┌─────────────────────────────────────────────────────────────┐
22
- │ Step 2: Resolve Contact to PhoneNumber │
23
- │ Call: search.contact with contact name │
24
- │ Extract: phoneNumber from search result │
25
- │ If multiple matches → Ask user to select │
26
- │ If no match → Inform user and ask for phoneNumber │
27
- └─────────────────────────────────────────────────────────────┘
28
-
29
- ┌─────────────────────────────────────────────────────────────┐
30
- │ Step 3: Send Message │
31
- │ Call: send.message with phoneNumber and content │
32
- └─────────────────────────────────────────────────────────────┘
33
- ```
34
-
35
- ### Decision Table
36
-
37
- | Input | Action | Tools Required |
38
- | --------------------- | ------------------------------------- | --------------------------------- |
39
- | phoneNumber + content | Send directly | `send.message` |
40
- | contact + content | Search contact first, then send | `search_contact` → `send.message` |
41
- | contact only | Ask for content, then search and send | `search_contact` → `send.message` |
42
- | phoneNumber only | Ask for content, then send | `send.message` |
43
- | Neither | Ask user for contact or phoneNumber | - |
44
-
45
- ## Tool Parameters and Examples
46
-
47
- ```json
48
- {
49
- "name": "send_message",
50
- "description": "提供发送短信的服务,用户可以通过提供电话号码或联系人的方式,向指定的号码发送短信内容。同时,用户还可以使用黄页来发送短信,以及发送名片信息。",
51
- "parameters": {
52
- "contact": {
53
- "type": "string",
54
- "description": "需要用户提供接收短信的联系人名称如张三、李四、王哥等,可以为非自然实体,如招生办。"
55
- },
56
- "content": {
57
- "type": "string",
58
- "description": "需要用户提供短信的内容。"
59
- },
60
- "phoneNumber": {
61
- "type": "string",
62
- "description": "需要用户提供接收短信的手机号码。该参数必需。"
63
- }
64
- },
65
- "required": ["phoneNumber"],
66
- "examples": [
67
- {
68
- "scenario": "User provides phoneNumber directly",
69
- "query": "发短信给13800138000,内容是明天开会",
70
- "workflow": "Direct send (no contact search needed)",
71
- "arguments": {
72
- "phoneNumber": "13800138000",
73
- "content": "明天开会"
74
- }
75
- },
76
- {
77
- "scenario": "User provides contact name only",
78
- "query": "发短信给妈妈,说我晚上回家吃饭",
79
- "workflow": "search_contact → send_message",
80
- "step1": {
81
- "tool": "search_contact",
82
- "arguments": {
83
- "contact": "妈妈"
84
- },
85
- "result": {
86
- "name": "妈妈",
87
- "phoneNumber": "13900139000"
88
- }
89
- },
90
- "step2": {
91
- "tool": "send_message",
92
- "arguments": {
93
- "phoneNumber": "13900139000",
94
- "content": "我晚上回家吃饭"
95
- }
96
- }
97
- },
98
- {
99
- "scenario": "User provides contact name with multiple matches",
100
- "query": "发短信给张三,内容是项目进度更新",
101
- "workflow": "search_contact → user selects → send_message",
102
- "step1": {
103
- "tool": "search_contact",
104
- "arguments": {
105
- "contact": "张三"
106
- },
107
- "result": {
108
- "matches": [
109
- { "name": "张三(公司)", "phoneNumber": "13800138001" },
110
- { "name": "张三(大学)", "phoneNumber": "13800138002" }
111
- ]
112
- }
113
- },
114
- "step2": {
115
- "action": "Ask user to select",
116
- "prompt": "找到多个张三,请选择:1. 张三(公司) 2. 张三(大学)"
117
- },
118
- "step3": {
119
- "tool": "send.message",
120
- "arguments": {
121
- "phoneNumber": "13800138001",
122
- "content": "项目进度更新"
123
- }
124
- }
125
- },
126
- {
127
- "scenario": "User provides contact with no match",
128
- "query": "发短信给李四,内容是周末聚会",
129
- "workflow": "search_contact → no match → ask for phoneNumber",
130
- "step1": {
131
- "tool": "search_contact",
132
- "arguments": {
133
- "contact": "李四"
134
- },
135
- "result": {
136
- "matches": []
137
- }
138
- },
139
- "step2": {
140
- "action": "Ask user for phoneNumber",
141
- "prompt": "未找到联系人李四,请提供手机号码"
142
- }
143
- },
144
- {
145
- "scenario": "User provides contact and phoneNumber",
146
- "query": "发短信给王五(13900139000),内容是生日快乐",
147
- "workflow": "Direct send (phoneNumber provided)",
148
- "arguments": {
149
- "phoneNumber": "13900139000",
150
- "content": "生日快乐"
151
- }
152
- }
153
- ]
154
- }
155
- ```