shellx-ai 1.1.1 → 1.1.2
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/README.md +162 -666
- package/dist/automation/element-finder.d.ts +0 -8
- package/dist/automation/element-finder.js +0 -7
- package/dist/automation/element-finder.js.map +1 -1
- package/dist/automation/ui-action-handler.d.ts +1 -1
- package/dist/automation/ui-action-handler.js +58 -31
- package/dist/automation/ui-action-handler.js.map +1 -1
- package/dist/cbor-compat.js +5 -10
- package/dist/cbor-compat.js.map +1 -1
- package/dist/data/index.d.ts +9 -0
- package/dist/data/index.js +11 -0
- package/dist/data/index.js.map +1 -0
- package/dist/data/types.d.ts +351 -0
- package/dist/data/types.js +8 -0
- package/dist/data/types.js.map +1 -0
- package/dist/domain-manager.js +4 -5
- package/dist/domain-manager.js.map +1 -1
- package/dist/errors.js +4 -2
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +36 -26
- package/dist/index.js +193 -53
- package/dist/index.js.map +1 -1
- package/dist/protocol.d.ts +27 -5
- package/dist/shellx.d.ts +139 -56
- package/dist/shellx.js +201 -88
- package/dist/shellx.js.map +1 -1
- package/dist/types.d.ts +38 -1
- package/package.json +25 -4
- package/dist/shell/output-buffer.d.ts +0 -152
- package/dist/shell/output-buffer.js +0 -176
- package/dist/shell/output-buffer.js.map +0 -1
- package/dist/shell/shell-command-executor.d.ts +0 -182
- package/dist/shell/shell-command-executor.js +0 -404
- package/dist/shell/shell-command-executor.js.map +0 -1
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data Module Types
|
|
3
|
+
*
|
|
4
|
+
* 类型定义用于 ShellX SDK 的 data 模块
|
|
5
|
+
* 提供对 Android 系统数据的访问接口
|
|
6
|
+
*/
|
|
7
|
+
export interface AddAlarmRequest {
|
|
8
|
+
hour: number;
|
|
9
|
+
minute: number;
|
|
10
|
+
repeatDays?: number[];
|
|
11
|
+
label?: string;
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface AddAlarmResponse {
|
|
15
|
+
success: boolean;
|
|
16
|
+
timestamp: number;
|
|
17
|
+
errorMessage?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DeleteAlarmRequest {
|
|
20
|
+
hour: number;
|
|
21
|
+
minute: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DeleteAlarmResponse {
|
|
24
|
+
success: boolean;
|
|
25
|
+
timestamp: number;
|
|
26
|
+
errorMessage?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface GetAlarmListRequest {
|
|
29
|
+
includeDisabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface AlarmInfo {
|
|
32
|
+
hour: number;
|
|
33
|
+
minute: number;
|
|
34
|
+
repeatDays: number[];
|
|
35
|
+
label: string;
|
|
36
|
+
enabled: boolean;
|
|
37
|
+
nextTriggerTime: number;
|
|
38
|
+
}
|
|
39
|
+
export interface GetAlarmListResponse {
|
|
40
|
+
success: boolean;
|
|
41
|
+
total: number;
|
|
42
|
+
alarms: AlarmInfo[];
|
|
43
|
+
timestamp: number;
|
|
44
|
+
errorMessage?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface LaunchAppRequest {
|
|
47
|
+
packageName: string;
|
|
48
|
+
launchDuration?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface LaunchAppResponse {
|
|
51
|
+
success: boolean;
|
|
52
|
+
packageName: string;
|
|
53
|
+
launchDuration: number;
|
|
54
|
+
timestamp: number;
|
|
55
|
+
errorMessage?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface ExitAppRequest {
|
|
58
|
+
packageName: string;
|
|
59
|
+
}
|
|
60
|
+
export interface ExitAppResponse {
|
|
61
|
+
success: boolean;
|
|
62
|
+
packageName: string;
|
|
63
|
+
timestamp: number;
|
|
64
|
+
errorMessage?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface InstallAppRequest {
|
|
67
|
+
appName: string;
|
|
68
|
+
packageName?: string;
|
|
69
|
+
downloadUrl?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface InstallAppResponse {
|
|
72
|
+
success: boolean;
|
|
73
|
+
appName: string;
|
|
74
|
+
packageName?: string;
|
|
75
|
+
message?: string;
|
|
76
|
+
timestamp: number;
|
|
77
|
+
errorMessage?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface UninstallAppRequest {
|
|
80
|
+
packageName: string;
|
|
81
|
+
}
|
|
82
|
+
export interface UninstallAppResponse {
|
|
83
|
+
success: boolean;
|
|
84
|
+
packageName: string;
|
|
85
|
+
timestamp: number;
|
|
86
|
+
errorMessage?: string;
|
|
87
|
+
}
|
|
88
|
+
export interface GetAppInfoRequest {
|
|
89
|
+
packageName: string;
|
|
90
|
+
}
|
|
91
|
+
export interface GetAppInfoResponse {
|
|
92
|
+
success: boolean;
|
|
93
|
+
packageName: string;
|
|
94
|
+
appName?: string;
|
|
95
|
+
versionName?: string;
|
|
96
|
+
versionCode?: number;
|
|
97
|
+
activities?: string[];
|
|
98
|
+
permissions?: string[];
|
|
99
|
+
isSystemApp?: boolean;
|
|
100
|
+
isRunning?: boolean;
|
|
101
|
+
foregroundActivity?: string;
|
|
102
|
+
timestamp: number;
|
|
103
|
+
errorMessage?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface GetAppListRequest {
|
|
106
|
+
includeSystemApps?: boolean;
|
|
107
|
+
includeRunningOnly?: boolean;
|
|
108
|
+
limit?: number;
|
|
109
|
+
offset?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface AppListInfo {
|
|
112
|
+
packageName: string;
|
|
113
|
+
appName: string;
|
|
114
|
+
versionName: string;
|
|
115
|
+
versionCode: number;
|
|
116
|
+
isSystemApp: boolean;
|
|
117
|
+
isRunning: boolean;
|
|
118
|
+
}
|
|
119
|
+
export interface GetAppListResponse {
|
|
120
|
+
success: boolean;
|
|
121
|
+
total: number;
|
|
122
|
+
apps: AppListInfo[];
|
|
123
|
+
timestamp: number;
|
|
124
|
+
errorMessage?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface GetCalendarListRequest {
|
|
127
|
+
}
|
|
128
|
+
export interface CalendarInfo {
|
|
129
|
+
id: string;
|
|
130
|
+
name: string;
|
|
131
|
+
accountName: string;
|
|
132
|
+
color?: string;
|
|
133
|
+
visible?: boolean;
|
|
134
|
+
syncStatus?: string;
|
|
135
|
+
}
|
|
136
|
+
export interface GetCalendarListResponse {
|
|
137
|
+
success: boolean;
|
|
138
|
+
calendars: CalendarInfo[];
|
|
139
|
+
timestamp: number;
|
|
140
|
+
errorMessage?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface GetCalendarEventRequest {
|
|
143
|
+
calendarId?: string;
|
|
144
|
+
startDate?: number;
|
|
145
|
+
endDate?: number;
|
|
146
|
+
limit?: number;
|
|
147
|
+
}
|
|
148
|
+
export interface CalendarEvent {
|
|
149
|
+
id: string;
|
|
150
|
+
calendarId: string;
|
|
151
|
+
title: string;
|
|
152
|
+
description?: string;
|
|
153
|
+
location?: string;
|
|
154
|
+
startTime: number;
|
|
155
|
+
endTime: number;
|
|
156
|
+
allDay?: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface GetCalendarEventResponse {
|
|
159
|
+
success: boolean;
|
|
160
|
+
events: CalendarEvent[];
|
|
161
|
+
timestamp: number;
|
|
162
|
+
errorMessage?: string;
|
|
163
|
+
}
|
|
164
|
+
export interface GetCalendarDetailRequest {
|
|
165
|
+
eventId: string;
|
|
166
|
+
}
|
|
167
|
+
export interface GetCalendarDetailResponse {
|
|
168
|
+
success: boolean;
|
|
169
|
+
event?: CalendarEvent;
|
|
170
|
+
timestamp: number;
|
|
171
|
+
errorMessage?: string;
|
|
172
|
+
}
|
|
173
|
+
export interface AddCalendarEventRequest {
|
|
174
|
+
title: string;
|
|
175
|
+
description?: string;
|
|
176
|
+
location?: string;
|
|
177
|
+
startTime: number;
|
|
178
|
+
endTime: number;
|
|
179
|
+
allDay?: boolean;
|
|
180
|
+
calendarId?: string;
|
|
181
|
+
reminders?: CalendarEventReminder[];
|
|
182
|
+
attendees?: CalendarEventAttendee[];
|
|
183
|
+
recurrence?: string;
|
|
184
|
+
timezone?: string;
|
|
185
|
+
}
|
|
186
|
+
export interface CalendarEventReminder {
|
|
187
|
+
method: number;
|
|
188
|
+
minutes: number;
|
|
189
|
+
}
|
|
190
|
+
export interface CalendarEventAttendee {
|
|
191
|
+
name: string;
|
|
192
|
+
email: string;
|
|
193
|
+
}
|
|
194
|
+
export interface AddCalendarEventResponse {
|
|
195
|
+
success: boolean;
|
|
196
|
+
eventId?: string;
|
|
197
|
+
startTime?: number;
|
|
198
|
+
endTime?: number;
|
|
199
|
+
timestamp: number;
|
|
200
|
+
errorMessage?: string;
|
|
201
|
+
}
|
|
202
|
+
export interface GetCallsRequest {
|
|
203
|
+
limit?: number;
|
|
204
|
+
offset?: number;
|
|
205
|
+
}
|
|
206
|
+
export interface CallRecord {
|
|
207
|
+
id: string;
|
|
208
|
+
number: string;
|
|
209
|
+
name?: string;
|
|
210
|
+
type: string;
|
|
211
|
+
date: number;
|
|
212
|
+
duration: number;
|
|
213
|
+
}
|
|
214
|
+
export interface GetCallsResponse {
|
|
215
|
+
success: boolean;
|
|
216
|
+
total: number;
|
|
217
|
+
calls: CallRecord[];
|
|
218
|
+
timestamp: number;
|
|
219
|
+
errorMessage?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface GetCallsStatRequest {
|
|
222
|
+
}
|
|
223
|
+
export interface CallStat {
|
|
224
|
+
total: number;
|
|
225
|
+
incoming: number;
|
|
226
|
+
outgoing: number;
|
|
227
|
+
missed: number;
|
|
228
|
+
totalDuration: number;
|
|
229
|
+
averageDuration: number;
|
|
230
|
+
}
|
|
231
|
+
export interface GetCallsStatResponse {
|
|
232
|
+
success: boolean;
|
|
233
|
+
stat: CallStat;
|
|
234
|
+
timestamp: number;
|
|
235
|
+
errorMessage?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface SearchContactsRequest {
|
|
238
|
+
query: string;
|
|
239
|
+
limit?: number;
|
|
240
|
+
offset?: number;
|
|
241
|
+
}
|
|
242
|
+
export interface ContactPhoneNumber {
|
|
243
|
+
number: string;
|
|
244
|
+
type: string;
|
|
245
|
+
label: string;
|
|
246
|
+
}
|
|
247
|
+
export interface Contact {
|
|
248
|
+
id: string;
|
|
249
|
+
name: string;
|
|
250
|
+
phoneNumbers: ContactPhoneNumber[];
|
|
251
|
+
photoUri?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface SearchContactsResponse {
|
|
254
|
+
success: boolean;
|
|
255
|
+
total: number;
|
|
256
|
+
contacts: Contact[];
|
|
257
|
+
timestamp: number;
|
|
258
|
+
errorMessage?: string;
|
|
259
|
+
}
|
|
260
|
+
export interface AddContactRequest {
|
|
261
|
+
name: string;
|
|
262
|
+
phoneNumbers: {
|
|
263
|
+
number: string;
|
|
264
|
+
type: number;
|
|
265
|
+
}[];
|
|
266
|
+
email?: string;
|
|
267
|
+
company?: string;
|
|
268
|
+
title?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface AddContactResponse {
|
|
271
|
+
success: boolean;
|
|
272
|
+
contactId?: string;
|
|
273
|
+
timestamp: number;
|
|
274
|
+
errorMessage?: string;
|
|
275
|
+
}
|
|
276
|
+
export interface DeleteContactRequest {
|
|
277
|
+
contactId: string;
|
|
278
|
+
}
|
|
279
|
+
export interface DeleteContactResponse {
|
|
280
|
+
success: boolean;
|
|
281
|
+
timestamp: number;
|
|
282
|
+
errorMessage?: string;
|
|
283
|
+
}
|
|
284
|
+
export interface SetWifiRequest {
|
|
285
|
+
enabled: boolean;
|
|
286
|
+
}
|
|
287
|
+
export interface SetWifiResponse {
|
|
288
|
+
success: boolean;
|
|
289
|
+
enabled?: boolean;
|
|
290
|
+
timestamp: number;
|
|
291
|
+
errorMessage?: string;
|
|
292
|
+
}
|
|
293
|
+
export interface SetMobileDataRequest {
|
|
294
|
+
enabled: boolean;
|
|
295
|
+
}
|
|
296
|
+
export interface SetMobileDataResponse {
|
|
297
|
+
success: boolean;
|
|
298
|
+
enabled?: boolean;
|
|
299
|
+
timestamp: number;
|
|
300
|
+
errorMessage?: string;
|
|
301
|
+
}
|
|
302
|
+
export interface SetFlashlightRequest {
|
|
303
|
+
enabled: boolean;
|
|
304
|
+
}
|
|
305
|
+
export interface SetFlashlightResponse {
|
|
306
|
+
success: boolean;
|
|
307
|
+
enabled?: boolean;
|
|
308
|
+
timestamp: number;
|
|
309
|
+
errorMessage?: string;
|
|
310
|
+
}
|
|
311
|
+
export interface SetVolumeRequest {
|
|
312
|
+
enabled: boolean;
|
|
313
|
+
percentage: number;
|
|
314
|
+
streamType?: string;
|
|
315
|
+
}
|
|
316
|
+
export interface SetVolumeResponse {
|
|
317
|
+
success: boolean;
|
|
318
|
+
enabled?: boolean;
|
|
319
|
+
percentage?: number;
|
|
320
|
+
timestamp: number;
|
|
321
|
+
errorMessage?: string;
|
|
322
|
+
}
|
|
323
|
+
export interface SetBrightnessRequest {
|
|
324
|
+
percentage: number;
|
|
325
|
+
}
|
|
326
|
+
export interface SetBrightnessResponse {
|
|
327
|
+
success: boolean;
|
|
328
|
+
percentage?: number;
|
|
329
|
+
timestamp: number;
|
|
330
|
+
errorMessage?: string;
|
|
331
|
+
}
|
|
332
|
+
export interface SetFontSizeRequest {
|
|
333
|
+
size: string;
|
|
334
|
+
}
|
|
335
|
+
export interface SetFontSizeResponse {
|
|
336
|
+
success: boolean;
|
|
337
|
+
size?: string;
|
|
338
|
+
timestamp: number;
|
|
339
|
+
errorMessage?: string;
|
|
340
|
+
}
|
|
341
|
+
export interface SetBluetoothRequest {
|
|
342
|
+
enabled: boolean;
|
|
343
|
+
}
|
|
344
|
+
export interface SetBluetoothResponse {
|
|
345
|
+
success: boolean;
|
|
346
|
+
enabled?: boolean;
|
|
347
|
+
timestamp: number;
|
|
348
|
+
errorMessage?: string;
|
|
349
|
+
}
|
|
350
|
+
export type DataRequest = AddAlarmRequest | DeleteAlarmRequest | GetAlarmListRequest | LaunchAppRequest | ExitAppRequest | InstallAppRequest | UninstallAppRequest | GetAppInfoRequest | GetAppListRequest | GetCalendarListRequest | GetCalendarEventRequest | GetCalendarDetailRequest | GetCallsRequest | GetCallsStatRequest | SearchContactsRequest | AddContactRequest | DeleteContactRequest | SetWifiRequest | SetMobileDataRequest | SetBluetoothRequest | SetFlashlightRequest | SetVolumeRequest | SetBrightnessRequest | SetFontSizeRequest;
|
|
351
|
+
export type DataResponse = AddAlarmResponse | DeleteAlarmResponse | GetAlarmListResponse | LaunchAppResponse | ExitAppResponse | InstallAppResponse | UninstallAppResponse | GetAppInfoResponse | GetAppListResponse | GetCalendarListResponse | GetCalendarEventResponse | GetCalendarDetailResponse | AddCalendarEventResponse | GetCallsResponse | GetCallsStatResponse | SearchContactsResponse | AddContactResponse | DeleteContactResponse | SetWifiResponse | SetMobileDataResponse | SetBluetoothResponse | SetFlashlightResponse | SetVolumeResponse | SetBrightnessResponse | SetFontSizeResponse;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/data/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/dist/domain-manager.js
CHANGED
|
@@ -8,8 +8,8 @@ import { createLogger } from "./logger.js";
|
|
|
8
8
|
// Create logger for DomainManager
|
|
9
9
|
const logger = createLogger("DomainManager");
|
|
10
10
|
const DEFAULT_DOMAIN_CONFIG = {
|
|
11
|
-
international: "shellx.
|
|
12
|
-
china: "
|
|
11
|
+
international: "shellx.cc",
|
|
12
|
+
china: "shellx.cc",
|
|
13
13
|
protocol: "https://",
|
|
14
14
|
};
|
|
15
15
|
/**
|
|
@@ -52,7 +52,7 @@ export function isChineseUser() {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
// 4. Node.js environment detection
|
|
55
|
-
if (typeof process !== "undefined" && process
|
|
55
|
+
if (typeof process !== "undefined" && process?.env) {
|
|
56
56
|
const timezone = process.env["TZ"];
|
|
57
57
|
const lang = process.env["LANG"] || process.env["LANGUAGE"];
|
|
58
58
|
if (timezone && timezone.includes("Asia/Shanghai")) {
|
|
@@ -78,8 +78,7 @@ export function isChineseUser() {
|
|
|
78
78
|
* @returns Complete API base URL
|
|
79
79
|
*/
|
|
80
80
|
export function getApiBaseUrl(config = DEFAULT_DOMAIN_CONFIG) {
|
|
81
|
-
|
|
82
|
-
return config.protocol + domain;
|
|
81
|
+
return config.protocol + config.international;
|
|
83
82
|
}
|
|
84
83
|
/**
|
|
85
84
|
* Get WebSocket server URL
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain-manager.js","sourceRoot":"","sources":["../src/domain-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,kCAAkC;AAClC,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAoB7C,MAAM,qBAAqB,GAAiB;IAC1C,aAAa,EAAE,WAAW;IAC1B,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"domain-manager.js","sourceRoot":"","sources":["../src/domain-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,kCAAkC;AAClC,MAAM,MAAM,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAoB7C,MAAM,qBAAqB,GAAiB;IAC1C,aAAa,EAAE,WAAW;IAC1B,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,UAAU;CACrB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,IAAI,CAAC;QACH,wCAAwC;QACxC,IAAI,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAC;YAClE,IAAI,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAA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|
80
80
|
this.details = details;
|
|
81
|
-
// Maintains proper stack trace for where our error was thrown
|
|
82
|
-
|
|
81
|
+
// Maintains proper stack trace for where our error was thrown (V8 / Node.js)
|
|
82
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
|
+
if (typeof Error.captureStackTrace === "function") {
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
83
85
|
Error.captureStackTrace(this, ShellXError);
|
|
84
86
|
}
|
|
85
87
|
}
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAe,EACf,IAAa,EACb,OAAiC;IAEjC,MAAM,QAAQ,GAAkB,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACnD,IAAI,IAAI;QAAE,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;IAC/B,IAAI,OAAO;QAAE,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC;IACxC,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,OAAgB,EAChB,QAAgB,EAChB,KAAc;IAEd,MAAM,MAAM,GAAwB,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;IAC1D,IAAI,KAAK;QAAE,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,SAiCX;AAjCD,WAAY,SAAS;IACnB,2BAA2B;IAC3B,oDAAuC,CAAA;IACvC,sDAAyC,CAAA;IACzC,4DAA+C,CAAA;IAC/C,kDAAqC,CAAA;IACrC,4DAA+C,CAAA;IAE/C,0BAA0B;IAC1B,kDAAqC,CAAA;IACrC,oDAAuC,CAAA;IACvC,wDA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ACH,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C,YAAY,OAAe,EAAE,OAAiC;QAC5D,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;QACjD,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Logger } from "./logger.js";
|
|
2
|
+
import type { ShellX } from "./shellx.js";
|
|
2
3
|
export interface TaskClientConfig {
|
|
3
4
|
timeout: number;
|
|
4
5
|
reconnect: boolean;
|
|
@@ -10,10 +11,13 @@ export interface TaskClientConfig {
|
|
|
10
11
|
onError: (error?: Error | Event) => void;
|
|
11
12
|
onReconnectFailed: () => void;
|
|
12
13
|
onMessage?: (data: unknown) => void;
|
|
14
|
+
/** Called whenever the device sends an ASR recognition result */
|
|
15
|
+
onAsrResult?: (text: string, source: string) => void;
|
|
16
|
+
/** Called when an OpenClaw Gateway message is received */
|
|
17
|
+
onGatewayMessage?: (message: GatewayMsg) => void;
|
|
13
18
|
}
|
|
14
19
|
export declare const DEFAULT_CONFIG: TaskClientConfig;
|
|
15
|
-
import type { WsClient, ActionSequence, ScreenShotOptions, ElementSelector, FindOptions, WaitOptions, UIHierarchy, WAITElement, ScreenShotResponse, ScreenInfoResponse } from "./protocol.js";
|
|
16
|
-
import type { Buffer } from "buffer";
|
|
20
|
+
import type { WsClient, ActionSequence, ScreenShotOptions, ElementSelector, FindOptions, WaitOptions, UIHierarchy, WAITElement, ScreenShotResponse, ScreenInfoResponse, GatewayMsg } from "./protocol.js";
|
|
17
21
|
/**
|
|
18
22
|
* WebSocket interface for cross-platform compatibility
|
|
19
23
|
*/
|
|
@@ -24,16 +28,10 @@ interface IWebSocket {
|
|
|
24
28
|
onerror?: ((event: Event) => void) | null;
|
|
25
29
|
onclose?: ((event: CloseEvent) => void) | null;
|
|
26
30
|
readyState?: number;
|
|
27
|
-
send(data: ArrayBuffer | Uint8Array | string | Blob
|
|
31
|
+
send(data: ArrayBuffer | Uint8Array | string | Blob): void;
|
|
28
32
|
close(code?: number, reason?: string): void;
|
|
29
33
|
ping?(data?: ArrayBuffer | string): void;
|
|
30
34
|
}
|
|
31
|
-
/**
|
|
32
|
-
* Interface for ShellX instance
|
|
33
|
-
*/
|
|
34
|
-
interface IShellXInstance {
|
|
35
|
-
handleShellOutput: (chunks: [number, number, Uint8Array[]]) => void;
|
|
36
|
-
}
|
|
37
35
|
export interface TaskResponse<T = unknown> {
|
|
38
36
|
taskId?: string;
|
|
39
37
|
success?: boolean;
|
|
@@ -91,7 +89,7 @@ export declare class ConnectionClient {
|
|
|
91
89
|
constructor(deviceId: string | undefined, config?: Partial<TaskClientConfig>, logger?: Logger);
|
|
92
90
|
private init;
|
|
93
91
|
private authenticateDevice;
|
|
94
|
-
getFetch(): (url: string, options?: RequestInit) => Promise<
|
|
92
|
+
getFetch(): (url: string, options?: RequestInit) => Promise<any>;
|
|
95
93
|
/**
|
|
96
94
|
* Wait for WebSocket initialization complete
|
|
97
95
|
*/
|
|
@@ -112,41 +110,40 @@ export declare class ConnectionClient {
|
|
|
112
110
|
ensureConnected(timeout?: number): Promise<void>;
|
|
113
111
|
private handleMessage;
|
|
114
112
|
private processServerMessage;
|
|
113
|
+
/**
|
|
114
|
+
* Handle OpenClaw Gateway messages forwarded from the backend
|
|
115
|
+
*/
|
|
116
|
+
private handleGatewayMessage;
|
|
115
117
|
private matchResponseByType;
|
|
116
118
|
private handleJsonDataResponse;
|
|
117
119
|
sendMessage<T = unknown>(message: WsClient, taskType?: string): Promise<T>;
|
|
118
120
|
/**
|
|
119
|
-
* Find UI elements on the screen
|
|
121
|
+
* Find UI elements on the screen (using dataRequest)
|
|
120
122
|
*/
|
|
121
123
|
findElement(selector: ElementSelector, options?: FindOptions): Promise<UIHierarchy>;
|
|
122
124
|
/**
|
|
123
|
-
* Wait for UI element to appear
|
|
125
|
+
* Wait for UI element to appear (using dataRequest)
|
|
124
126
|
*/
|
|
125
127
|
waitElement(selector: ElementSelector, options?: WaitOptions): Promise<WAITElement>;
|
|
126
|
-
/**
|
|
127
|
-
* Take a screenshot
|
|
128
|
-
* @deprecated Use takeScreenshot() instead for consistency
|
|
129
|
-
*/
|
|
130
|
-
screenShot(options?: ScreenShotOptions): Promise<ScreenShotResponse>;
|
|
131
128
|
/**
|
|
132
129
|
* Take a screenshot
|
|
133
130
|
*/
|
|
134
131
|
takeScreenshot(options?: ScreenShotOptions): Promise<ScreenShotResponse>;
|
|
135
132
|
/**
|
|
136
|
-
*
|
|
133
|
+
* Screenshot method (alias for takeScreenshot)
|
|
134
|
+
* This method is required by IConnectionClient interface
|
|
137
135
|
*/
|
|
138
|
-
|
|
136
|
+
screenshot(options?: ScreenShotOptions): Promise<ScreenShotResponse>;
|
|
139
137
|
/**
|
|
140
138
|
* Get screen information
|
|
141
|
-
* @deprecated Use wakeScreenAndGetInfo() instead for clarity
|
|
142
139
|
*/
|
|
143
|
-
|
|
140
|
+
getScreenInfo(): Promise<ScreenInfoResponse>;
|
|
144
141
|
/**
|
|
145
142
|
* Wake screen and get screen information
|
|
146
143
|
*/
|
|
147
144
|
wakeScreenAndGetInfo(): Promise<ScreenInfoResponse>;
|
|
148
145
|
/**
|
|
149
|
-
* Execute an action sequence
|
|
146
|
+
* Execute an action sequence (using dataRequest)
|
|
150
147
|
*/
|
|
151
148
|
executeAction(actionSequence: ActionSequence, taskId?: string, timeout?: number): Promise<unknown>;
|
|
152
149
|
/**
|
|
@@ -188,12 +185,24 @@ export declare class ConnectionClient {
|
|
|
188
185
|
stopAsr(): Promise<void>;
|
|
189
186
|
/**
|
|
190
187
|
* Speak text using TTS (Text-to-Speech)
|
|
188
|
+
* @param text - Text to synthesise
|
|
189
|
+
* @param voiceType - Optional Volcengine voice type (e.g. "BV001_streaming")
|
|
191
190
|
*/
|
|
192
|
-
speak(text: string): Promise<void>;
|
|
191
|
+
speak(text: string, voiceType?: string, volume?: number): Promise<void>;
|
|
193
192
|
/**
|
|
194
193
|
* Stop TTS (Text-to-Speech)
|
|
195
194
|
*/
|
|
196
195
|
stopTts(): Promise<void>;
|
|
196
|
+
/**
|
|
197
|
+
* Close a terminal session by ID
|
|
198
|
+
*
|
|
199
|
+
* @param sid - Session ID (terminal ID) to close
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* // Close terminal with ID 12345
|
|
203
|
+
* await client.closeTerminal(12345);
|
|
204
|
+
*/
|
|
205
|
+
closeTerminal(sid: number): Promise<void>;
|
|
197
206
|
/**
|
|
198
207
|
* Send raw message (for custom integrations)
|
|
199
208
|
*/
|
|
@@ -245,7 +254,7 @@ export declare class ConnectionClient {
|
|
|
245
254
|
/**
|
|
246
255
|
* Set associated ShellX instance
|
|
247
256
|
*/
|
|
248
|
-
setShellX(shellx:
|
|
257
|
+
setShellX(shellx: ShellX): void;
|
|
249
258
|
/**
|
|
250
259
|
* Create a timeout result object based on task type
|
|
251
260
|
* @param taskType Type of the task that timed out
|
|
@@ -256,7 +265,7 @@ export declare class ConnectionClient {
|
|
|
256
265
|
/**
|
|
257
266
|
* Get associated ShellX instance
|
|
258
267
|
*/
|
|
259
|
-
getShellX():
|
|
268
|
+
getShellX(): ShellX | null;
|
|
260
269
|
/**
|
|
261
270
|
* Manually complete task by taskId
|
|
262
271
|
* @param taskId Task ID
|
|
@@ -283,9 +292,10 @@ export declare class ConnectionClient {
|
|
|
283
292
|
completeTasksByType(taskType: string, result?: unknown, success?: boolean): number;
|
|
284
293
|
}
|
|
285
294
|
export default ConnectionClient;
|
|
286
|
-
export type { UIElement, ElementSelector, ActionSequence, WsClient, WsServer, ScreenShotOptions, FindOptions, WaitOptions, UIHierarchy, WAITElement, ScreenShotResponse, ScreenInfoResponse, } from "./protocol.js";
|
|
295
|
+
export type { UIElement, ElementSelector, ActionSequence, WsClient, WsServer, ScreenShotOptions, FindOptions, WaitOptions, UIHierarchy, WAITElement, ScreenShotResponse, ScreenInfoResponse, GatewayMsg, } from "./protocol.js";
|
|
287
296
|
export type { Click, Input, Swipe, Key, Wait, Find, Command, AppInfo, Screenshot, BaseResult, Element, FindResult, CommandResult, Action, Clipboard, Actions, ClickResult, InputResult, SwipeResult, KeyResult, WaitResult, ClipboardResult, AppInfoResult, ScreenshotResult, ScreenInfoResult, ExecuteActionsResult, OperationResult, } from "./types.js";
|
|
288
297
|
export { ShellX, type ShellXOptions } from "./shellx.js";
|
|
298
|
+
export { type AddAlarmRequest, type AddAlarmResponse, type DeleteAlarmRequest, type DeleteAlarmResponse, type GetAlarmListRequest, type GetAlarmListResponse, type AlarmInfo, type LaunchAppRequest, type LaunchAppResponse, type ExitAppRequest, type ExitAppResponse, type InstallAppRequest, type InstallAppResponse, type UninstallAppRequest, type UninstallAppResponse, type GetAppInfoRequest, type GetAppInfoResponse, type GetAppListRequest, type GetAppListResponse, type AppListInfo, type GetCalendarListRequest, type GetCalendarListResponse, type GetCalendarEventRequest, type GetCalendarEventResponse, type GetCalendarDetailRequest, type GetCalendarDetailResponse, type AddCalendarEventRequest, type AddCalendarEventResponse, type CalendarInfo, type CalendarEvent, type CalendarEventReminder, type CalendarEventAttendee, type GetCallsRequest, type GetCallsResponse, type GetCallsStatRequest, type GetCallsStatResponse, type CallRecord, type CallStat, type SearchContactsRequest, type SearchContactsResponse, type AddContactRequest, type AddContactResponse, type DeleteContactRequest, type DeleteContactResponse, type Contact, type ContactPhoneNumber, type SetWifiRequest, type SetWifiResponse, type SetMobileDataRequest, type SetMobileDataResponse, type SetFlashlightRequest, type SetFlashlightResponse, type SetVolumeRequest, type SetVolumeResponse, type SetBrightnessRequest, type SetBrightnessResponse, type SetFontSizeRequest, type SetFontSizeResponse, } from "./data/index.js";
|
|
289
299
|
export { type ErrorResponse, type BaseOperationResult, createErrorResponse, createOperationResult, ErrorCode, ShellXError, ConnectionError, OperationError, ElementError, ValidationError, } from "./errors.js";
|
|
290
300
|
export { extractErrorMessage, createErrorResult, createSuccessResult, handleOperation, handleOperationWithRetry, validateRequired, validateOneOfRequired, wrapErrorWithContext, type ErrorHandlerOptions, type ErrorHandlerResult, } from "./error-handler.js";
|
|
291
301
|
export { buildDeviceApiUrl, buildDeviceConfigUrl, buildDeviceRegisterUrl, buildTokenVerifyUrl, buildTokenRefreshUrl, getApiBaseUrl, getWsServerUrl, getCurrentDomainInfo, createDomainConfig, isChineseUser, type DomainConfig, } from "./domain-manager.js";
|