@aixnn/aixautots 0.5.2 → 0.5.4
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 +23 -40
- package/dist/{automation-queue-8HqRJV_K.d.ts → automation-queue-CKsueO9z.d.ts} +1 -1
- package/dist/{chunk-MRQ7VJFJ.js → chunk-BSHHYM72.js} +2 -2
- package/dist/{chunk-PUPVZRKZ.js → chunk-IJVNII5N.js} +1 -1
- package/dist/{chunk-EHF2WQUR.js → chunk-O34SNDQB.js} +4 -4
- package/dist/{chunk-GKEPMDXO.js → chunk-OXIM6EYO.js} +1 -1
- package/dist/{chunk-AIUOLJZA.js → chunk-SVK2AY3J.js} +2 -2
- package/dist/{chunk-PCYERBNZ.js → chunk-TATL3HTE.js} +11 -64
- package/dist/{chunk-SUKFJ73W.js → chunk-UINEPEIE.js} +2 -2
- package/dist/{chunk-H7MHGYF3.js → chunk-V4MXFPDX.js} +3 -3
- package/dist/{chunk-6YUAACW6.js → chunk-XNKC6HU3.js} +3 -3
- package/dist/{chunk-536WVCTB.js → chunk-YOT7HZBU.js} +5 -5
- package/dist/{config-Bm1hmXhD.d.ts → config-fsx4jlLK.d.ts} +4 -6
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.js +4 -4
- package/dist/device-session-W7I3WQXF.js +2 -0
- package/dist/{mirror-session-C_1vFkRV.d.ts → mirror-session-DM-trg1F.d.ts} +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +6 -6
- package/dist/{script-debugger-Cw5jVRoz.d.ts → script-debugger-Cu_coj-h.d.ts} +1 -1
- package/dist/{task-agent-runner-eD9-SCJz.d.ts → task-agent-runner-CMq9Cir1.d.ts} +1 -1
- package/dist/ui/billing.js +6 -6
- package/dist/ui/device-create.js +7 -7
- package/dist/ui/device-mirror.js +7 -7
- package/dist/ui/devices.d.ts +3 -3
- package/dist/ui/devices.js +9 -9
- package/dist/ui/editor.d.ts +1 -1
- package/dist/ui/editor.js +7 -7
- package/dist/ui/index.d.ts +5 -7
- package/dist/ui/index.js +20 -31
- package/dist/ui/inspector.js +6 -6
- package/dist/ui/market.js +6 -6
- package/dist/ui/mirror.d.ts +2 -2
- package/dist/ui/script-studio.js +7 -7
- package/dist/ui/scripts.js +6 -6
- package/dist/ui/tasks.js +9 -9
- package/package.json +1 -2
- package/styles.css +1 -1
- package/tailwind-preset.cjs +3 -3
- package/dist/device-session-KZVGLPOI.js +0 -2
package/README.md
CHANGED
|
@@ -1,21 +1,4 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
发布包已迁移到 npm 用户 `aixnn` 的 scope,完整包名为 `@aixnn/aixautots`。本仓库目录仍为 `aixautots/`,各子包入口保持不变,例如 `@aixnn/aixautots/core`。
|
|
4
|
-
|
|
5
|
-
```sh
|
|
6
|
-
npm install @aixnn/aixautots
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
发布(在 `aixautots/` 目录,使用有权限的 npm 账号):
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npm run typecheck
|
|
13
|
-
npm test
|
|
14
|
-
npm run build
|
|
15
|
-
python3 ../scripts/npm-with-access-key.py publish --access public
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
发布脚本读取 `~/.aixenv` 的 `NPM_ACCESS_KEY`,通过临时 npm 配置使用令牌,结束后删除临时配置,不修改全局登录配置。令牌需拥有 `@aixnn/aixautots` 的发布权限;第三方项目也可使用自身 npm 凭据执行 `npm publish --access public`。若令牌未允许绕过双重验证,npm 仍可能要求一次性验证码。
|
|
1
|
+
# aixautots
|
|
19
2
|
|
|
20
3
|
aixautobot 的 TypeScript 客户端 SDK。core/react 是 headless 的数据/传输/鉴权层;ui 既提供细粒度
|
|
21
4
|
部件,也提供**开箱即用的成品页面**(设备/任务/市场/脚本/编辑器/检查器)+ 一套可换肤主题,
|
|
@@ -25,47 +8,47 @@ aixautobot 的 TypeScript 客户端 SDK。core/react 是 headless 的数据/传
|
|
|
25
8
|
|
|
26
9
|
| 子包 | 职责 |
|
|
27
10
|
|---|---|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
|
|
|
11
|
+
| `aixautots/core` | 资源 REST 客户端(`AixClient`)+ 会话层(设备通道 / Flow / 镜像)+ 类型 + 错误 |
|
|
12
|
+
| `aixautots/react` | 上述能力的 React hooks(`AixProvider` + 资源/会话 hooks) |
|
|
13
|
+
| `aixautots/ui` | 设备向细粒度部件(`MirrorView`/`ControlBar`/`ScriptEditor`/`DebugConsole`/`ScriptPanel`) |
|
|
14
|
+
| `aixautots/ui/primitives` | 基础件(`Button`/`Input`/`Select`/`Badge`/`Dialog`/`Popover`) |
|
|
15
|
+
| `aixautots/ui/{devices,tasks,market,scripts,editor,inspector}` | 成品页面组件 |
|
|
16
|
+
| `aixautots/nav` | 路由无关导航注入(`AixNavProvider`/`useAixNav`) |
|
|
17
|
+
| `aixautots/i18n` | 内置 i18n(`AixI18nProvider`/`useAixT`,en/zh,无 i18next 依赖) |
|
|
18
|
+
| `aixautots/tailwind-preset` · `aixautots/styles.css` | Tailwind 预设 + 主题 token |
|
|
36
19
|
|
|
37
20
|
```bash
|
|
38
|
-
npm i
|
|
21
|
+
npm i aixautots # peer: react(react 子包用);ui 子包另需 @uiw/react-codemirror
|
|
39
22
|
```
|
|
40
23
|
|
|
41
24
|
## 接入(三步)
|
|
42
25
|
|
|
43
|
-
用到
|
|
26
|
+
用到 `aixautots/ui` 的成品页面/部件时,按以下三步接入样式与运行时上下文:
|
|
44
27
|
|
|
45
28
|
**1) 样式** —— Tailwind 预设 + 主题 token + content 扫描:
|
|
46
29
|
|
|
47
30
|
```js
|
|
48
31
|
// tailwind.config.js
|
|
49
32
|
module.exports = {
|
|
50
|
-
presets: [require('
|
|
33
|
+
presets: [require('aixautots/tailwind-preset')],
|
|
51
34
|
content: [
|
|
52
35
|
'./src/**/*.{ts,tsx}',
|
|
53
|
-
'./node_modules
|
|
36
|
+
'./node_modules/aixautots/dist/**/*.js', // 关键:否则 aixautots 组件的类名不会被生成
|
|
54
37
|
],
|
|
55
38
|
}
|
|
56
39
|
```
|
|
57
40
|
|
|
58
41
|
```css
|
|
59
42
|
/* 入口 CSS */
|
|
60
|
-
@import "
|
|
43
|
+
@import "aixautots/styles.css"; /* :root 浅色 + .dark 深色 token,可覆盖换肤 */
|
|
61
44
|
```
|
|
62
45
|
|
|
63
46
|
**2) Provider** —— 在 `AixProvider` 内注入导航与语言:
|
|
64
47
|
|
|
65
48
|
```tsx
|
|
66
|
-
import { AixProvider } from '
|
|
67
|
-
import { AixNavProvider } from '
|
|
68
|
-
import { AixI18nProvider } from '
|
|
49
|
+
import { AixProvider } from 'aixautots/react'
|
|
50
|
+
import { AixNavProvider } from 'aixautots/nav'
|
|
51
|
+
import { AixI18nProvider } from 'aixautots/i18n'
|
|
69
52
|
import { useNavigate } from 'react-router-dom' // 任意路由库都行
|
|
70
53
|
|
|
71
54
|
function Providers({ children }) {
|
|
@@ -83,8 +66,8 @@ function Providers({ children }) {
|
|
|
83
66
|
**3) 用页面** —— 直接挂成品页面,路由参数以 props 传入:
|
|
84
67
|
|
|
85
68
|
```tsx
|
|
86
|
-
import { DevicesPage } from '
|
|
87
|
-
import { ScriptEditorPage } from '
|
|
69
|
+
import { DevicesPage } from 'aixautots/ui/devices'
|
|
70
|
+
import { ScriptEditorPage } from 'aixautots/ui/editor'
|
|
88
71
|
|
|
89
72
|
<DevicesPage />
|
|
90
73
|
<ScriptEditorPage scriptId={params.id} />
|
|
@@ -93,7 +76,7 @@ import { ScriptEditorPage } from '@aixnn/aixautots/ui/editor'
|
|
|
93
76
|
## Quickstart
|
|
94
77
|
|
|
95
78
|
```ts
|
|
96
|
-
import { AixClient } from '
|
|
79
|
+
import { AixClient } from 'aixautots/core'
|
|
97
80
|
|
|
98
81
|
const client = new AixClient({
|
|
99
82
|
baseUrl: 'https://aixautobot.com',
|
|
@@ -107,7 +90,7 @@ const { run_id } = await client.fleet.start({ flow, device_ids: [devices[0].id]
|
|
|
107
90
|
React:
|
|
108
91
|
|
|
109
92
|
```tsx
|
|
110
|
-
import { AixProvider, useDevices } from '
|
|
93
|
+
import { AixProvider, useDevices } from 'aixautots/react'
|
|
111
94
|
|
|
112
95
|
function App() {
|
|
113
96
|
return (
|
|
@@ -153,7 +136,7 @@ auth: [
|
|
|
153
136
|
第三方前端(浏览器不持 project secret):后端铸 user JWT,前端用 `createCachedUserCredential` 自动缓存/刷新(按 `expiresIn` 或 JWT `exp`,并发去重):
|
|
154
137
|
|
|
155
138
|
```ts
|
|
156
|
-
import { createCachedUserCredential } from '
|
|
139
|
+
import { createCachedUserCredential } from 'aixautots/core'
|
|
157
140
|
|
|
158
141
|
const auth = createCachedUserCredential({
|
|
159
142
|
mint: () => fetch('/mint-token').then((r) => r.json()), // 你的后端 → { token, expiresIn? } 或 token 字符串
|
|
@@ -221,7 +204,7 @@ React:`useLlm()` → `{ generate, refine, explain, test }`(参考实现见 f
|
|
|
221
204
|
## 镜像
|
|
222
205
|
|
|
223
206
|
```ts
|
|
224
|
-
import { MirrorSession } from '
|
|
207
|
+
import { MirrorSession } from 'aixautots/core'
|
|
225
208
|
const s = await MirrorSession.join(cfg, deviceId)
|
|
226
209
|
s.onStream((stream) => { videoEl.srcObject = stream })
|
|
227
210
|
s.sendInput({ t: 'tap', x, y }) // 归一坐标 [0,1]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn, Select, Dialog, Button, Input, Badge } from './chunk-EVHTAXQG.js';
|
|
2
|
-
import { useNodes, useDevices } from './chunk-
|
|
3
|
-
import { useClient } from './chunk-
|
|
2
|
+
import { useNodes, useDevices } from './chunk-O34SNDQB.js';
|
|
3
|
+
import { useClient } from './chunk-UINEPEIE.js';
|
|
4
4
|
import { useMemo, useEffect, useState, useCallback } from 'react';
|
|
5
5
|
import { Server, RefreshCw, Smartphone, Usb, Wifi, Info } from 'lucide-react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinUrl, AixAuthError, AixError, AixClient, resolveConfig, DevicesApi, RestClient, ReconnectingSocket } from './chunk-
|
|
1
|
+
import { joinUrl, AixAuthError, AixError, AixClient, resolveConfig, DevicesApi, RestClient, ReconnectingSocket } from './chunk-TATL3HTE.js';
|
|
2
2
|
|
|
3
3
|
// src/core/webrtc-rest.ts
|
|
4
4
|
async function getIceServers(cfg) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MirrorSession, normalizeDevices, submitBatch } from './chunk-
|
|
2
|
-
import { useDevice, useAixConfig, useClient, useQuery } from './chunk-
|
|
3
|
-
import { FlowRun } from './chunk-
|
|
4
|
-
import { isFleetRunTerminal, resolveConfig, joinUrl, AixAuthError, AixError, detectEnvOs, EnvRun, summarizeEnv, ReconnectingSocket, executionWsTicketUrl } from './chunk-
|
|
1
|
+
import { MirrorSession, normalizeDevices, submitBatch } from './chunk-V4MXFPDX.js';
|
|
2
|
+
import { useDevice, useAixConfig, useClient, useQuery } from './chunk-UINEPEIE.js';
|
|
3
|
+
import { FlowRun } from './chunk-OXIM6EYO.js';
|
|
4
|
+
import { isFleetRunTerminal, resolveConfig, joinUrl, AixAuthError, AixError, detectEnvOs, EnvRun, summarizeEnv, ReconnectingSocket, executionWsTicketUrl } from './chunk-TATL3HTE.js';
|
|
5
5
|
import { createContext, useState, useRef, useEffect, useCallback, useMemo, createElement, useContext } from 'react';
|
|
6
6
|
|
|
7
7
|
function useCommands(deviceId) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinUrl, AixAuthError, AixLocked, AixError, resolveConfig, ReconnectingSocket, AixTimeout, parseIncoming, isRetFrame, errorFromRet, isFridaEventFrame, isScriptletEventFrame, isStatusFrame, executionWsTicketUrl, isExecutionFrame, executionStreamEventsAfter } from './chunk-
|
|
1
|
+
import { joinUrl, AixAuthError, AixLocked, AixError, resolveConfig, ReconnectingSocket, AixTimeout, parseIncoming, isRetFrame, errorFromRet, isFridaEventFrame, isScriptletEventFrame, isStatusFrame, executionWsTicketUrl, isExecutionFrame, executionStreamEventsAfter } from './chunk-TATL3HTE.js';
|
|
2
2
|
|
|
3
3
|
// src/core/ws-access.ts
|
|
4
4
|
async function mintDeviceAccess(cfg, deviceId) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MirrorView, ControlBar } from './chunk-CVV7FOMQ.js';
|
|
2
|
-
import { useMirror, useDevices } from './chunk-
|
|
3
|
-
import { useClient } from './chunk-
|
|
2
|
+
import { useMirror, useDevices } from './chunk-O34SNDQB.js';
|
|
3
|
+
import { useClient } from './chunk-UINEPEIE.js';
|
|
4
4
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
5
5
|
import { RotateCw, Minimize2, Maximize2, X } from 'lucide-react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -286,9 +286,7 @@ var ReconnectingSocket = class {
|
|
|
286
286
|
this.attempt++;
|
|
287
287
|
this.reconnectTimer = setTimeout(() => {
|
|
288
288
|
this.reconnectTimer = null;
|
|
289
|
-
void this.connect()
|
|
290
|
-
if (!this.closed) this.scheduleReconnect();
|
|
291
|
-
});
|
|
289
|
+
void this.connect();
|
|
292
290
|
}, exp + jitter);
|
|
293
291
|
}
|
|
294
292
|
send(text) {
|
|
@@ -327,8 +325,6 @@ var EnvRun = class _EnvRun {
|
|
|
327
325
|
this.doneFired = false;
|
|
328
326
|
this.last = null;
|
|
329
327
|
this.cursor = 0;
|
|
330
|
-
this.pollTimer = null;
|
|
331
|
-
this.closed = false;
|
|
332
328
|
// `start()` opens the socket before callers can register listeners. Keep
|
|
333
329
|
// frames received in that small window so the first Started/Step events do
|
|
334
330
|
// not disappear and leave progress UIs stuck at 0%.
|
|
@@ -353,26 +349,17 @@ var EnvRun = class _EnvRun {
|
|
|
353
349
|
let run = null;
|
|
354
350
|
let cursor = 0;
|
|
355
351
|
let processing = Promise.resolve();
|
|
356
|
-
|
|
357
|
-
if (frame.run_id !== data.req_id) return;
|
|
358
|
-
if (typeof frame.cursor !== "number") {
|
|
359
|
-
run?.onMessage(JSON.stringify(frame.event));
|
|
360
|
-
return;
|
|
361
|
-
}
|
|
362
|
-
if (frame.cursor <= cursor) return;
|
|
363
|
-
cursor = frame.cursor;
|
|
364
|
-
run?.onMessage(JSON.stringify({ cursor: frame.cursor, ...frame.event }));
|
|
365
|
-
};
|
|
352
|
+
let processFrame;
|
|
366
353
|
const fetchCatchup = async (after) => {
|
|
367
354
|
let nextAfter = after;
|
|
368
355
|
do {
|
|
369
356
|
const page = await executionStreamEventsAfter(resolved, data.req_id, nextAfter);
|
|
370
|
-
for (const event of page.events)
|
|
357
|
+
for (const event of page.events) await processFrame(event);
|
|
371
358
|
nextAfter = page.next_cursor ?? cursor;
|
|
372
359
|
if (!page.has_more) break;
|
|
373
360
|
} while (true);
|
|
374
361
|
};
|
|
375
|
-
|
|
362
|
+
processFrame = async (frame) => {
|
|
376
363
|
if (frame.run_id !== data.req_id) return;
|
|
377
364
|
if (typeof frame.cursor !== "number") {
|
|
378
365
|
run?.onMessage(JSON.stringify(frame.event));
|
|
@@ -381,8 +368,10 @@ var EnvRun = class _EnvRun {
|
|
|
381
368
|
if (frame.cursor <= cursor) return;
|
|
382
369
|
if (frame.cursor > cursor + 1) {
|
|
383
370
|
await fetchCatchup(cursor);
|
|
371
|
+
return processFrame(frame);
|
|
384
372
|
}
|
|
385
|
-
|
|
373
|
+
cursor = frame.cursor;
|
|
374
|
+
run?.onMessage(JSON.stringify({ cursor: frame.cursor, ...frame.event }));
|
|
386
375
|
};
|
|
387
376
|
const socket = new ReconnectingSocket({
|
|
388
377
|
// Fetch a new one-time ticket after every stream reconnect and resume
|
|
@@ -404,34 +393,7 @@ var EnvRun = class _EnvRun {
|
|
|
404
393
|
}
|
|
405
394
|
});
|
|
406
395
|
run = new _EnvRun(data.req_id, data.stream ?? `/ws/execution/${data.req_id}`, socket);
|
|
407
|
-
|
|
408
|
-
let failures = 0;
|
|
409
|
-
const poll = async () => {
|
|
410
|
-
if (currentRun.closed) return;
|
|
411
|
-
try {
|
|
412
|
-
await (processing = processing.catch(() => void 0).then(() => fetchCatchup(cursor)));
|
|
413
|
-
failures = 0;
|
|
414
|
-
} catch (error) {
|
|
415
|
-
if (++failures >= 3 && !currentRun.closed) {
|
|
416
|
-
currentRun.onMessage(JSON.stringify({
|
|
417
|
-
kind: "finished",
|
|
418
|
-
ok: false,
|
|
419
|
-
error: `Environment progress connection failed: ${String(error)}`,
|
|
420
|
-
hint: "The node may still be installing. Check its status before starting setup again."
|
|
421
|
-
}));
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
if (!currentRun.closed) currentRun.pollTimer = setTimeout(() => {
|
|
425
|
-
void poll();
|
|
426
|
-
}, 3e3);
|
|
427
|
-
};
|
|
428
|
-
currentRun.pollTimer = setTimeout(() => {
|
|
429
|
-
void poll();
|
|
430
|
-
}, 3e3);
|
|
431
|
-
try {
|
|
432
|
-
await socket.start();
|
|
433
|
-
} catch {
|
|
434
|
-
}
|
|
396
|
+
await socket.start();
|
|
435
397
|
return run;
|
|
436
398
|
}
|
|
437
399
|
on(event, cb) {
|
|
@@ -473,15 +435,10 @@ var EnvRun = class _EnvRun {
|
|
|
473
435
|
this.doneFired = true;
|
|
474
436
|
this.last = ev;
|
|
475
437
|
for (const cb of this.doneListeners) cb(this.last);
|
|
476
|
-
this.close();
|
|
438
|
+
this.socket.close();
|
|
477
439
|
}
|
|
478
440
|
}
|
|
479
441
|
close() {
|
|
480
|
-
this.closed = true;
|
|
481
|
-
if (this.pollTimer !== null) {
|
|
482
|
-
clearTimeout(this.pollTimer);
|
|
483
|
-
this.pollTimer = null;
|
|
484
|
-
}
|
|
485
442
|
this.socket.close();
|
|
486
443
|
}
|
|
487
444
|
};
|
|
@@ -496,17 +453,7 @@ function summarizeEnv(events) {
|
|
|
496
453
|
for (const e of events) {
|
|
497
454
|
if (e.kind === "started") {
|
|
498
455
|
total = e.total;
|
|
499
|
-
e.steps.forEach((s, i) =>
|
|
500
|
-
meta.set(i, s);
|
|
501
|
-
const existing = steps.get(i);
|
|
502
|
-
steps.set(i, existing ? { ...existing, label: s.label } : {
|
|
503
|
-
index: i,
|
|
504
|
-
id: s.id,
|
|
505
|
-
label: s.label,
|
|
506
|
-
state: "pending",
|
|
507
|
-
pct: 0
|
|
508
|
-
});
|
|
509
|
-
});
|
|
456
|
+
e.steps.forEach((s, i) => meta.set(i, s));
|
|
510
457
|
} else if (e.kind === "step") {
|
|
511
458
|
const m = meta.get(e.index);
|
|
512
459
|
steps.set(e.index, {
|
|
@@ -1553,7 +1500,7 @@ var AixClient = class {
|
|
|
1553
1500
|
* 即可,不必回依赖 client 实例)。
|
|
1554
1501
|
*/
|
|
1555
1502
|
async deviceSession(deviceId, opts = {}) {
|
|
1556
|
-
const { DeviceSession } = await import('./device-session-
|
|
1503
|
+
const { DeviceSession } = await import('./device-session-W7I3WQXF.js');
|
|
1557
1504
|
return DeviceSession.open(this.cfg, deviceId, opts);
|
|
1558
1505
|
}
|
|
1559
1506
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeviceChannel, ScriptDebugger } from './chunk-
|
|
2
|
-
import { resolveConfig, AixClient, EnvRun } from './chunk-
|
|
1
|
+
import { DeviceChannel, ScriptDebugger } from './chunk-OXIM6EYO.js';
|
|
2
|
+
import { resolveConfig, AixClient, EnvRun } from './chunk-TATL3HTE.js';
|
|
3
3
|
import React, { createContext, useContext, useState, useRef, useEffect, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getIceServers, mintViewerToken } from './chunk-
|
|
2
|
-
import { FlowRun } from './chunk-
|
|
3
|
-
import { resolveConfig, ReconnectingSocket, joinUrl } from './chunk-
|
|
1
|
+
import { getIceServers, mintViewerToken } from './chunk-IJVNII5N.js';
|
|
2
|
+
import { FlowRun } from './chunk-OXIM6EYO.js';
|
|
3
|
+
import { resolveConfig, ReconnectingSocket, joinUrl } from './chunk-TATL3HTE.js';
|
|
4
4
|
|
|
5
5
|
// src/core/automation-queue.ts
|
|
6
6
|
async function submitBatch(cfg, config) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { LogConsole } from './chunk-FW23FLAF.js';
|
|
2
2
|
import { cn, Button, Select } from './chunk-EVHTAXQG.js';
|
|
3
|
-
import { useDevices, useScripts, useScriptRun } from './chunk-
|
|
4
|
-
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-
|
|
5
|
-
import { useClient } from './chunk-
|
|
3
|
+
import { useDevices, useScripts, useScriptRun } from './chunk-O34SNDQB.js';
|
|
4
|
+
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-V4MXFPDX.js';
|
|
5
|
+
import { useClient } from './chunk-UINEPEIE.js';
|
|
6
6
|
import { useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
7
7
|
import { Trash2, Plus, Play, Pause, Square, ArrowDownToLine, WrapText, ChevronRight, Save, XCircle, CheckCircle2, Loader2, Circle } from 'lucide-react';
|
|
8
8
|
import CodeMirror, { EditorView } from '@uiw/react-codemirror';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useAixT } from './chunk-64Q7BBIQ.js';
|
|
2
2
|
import { LogConsole } from './chunk-FW23FLAF.js';
|
|
3
|
-
import { MirrorSurface, DeviceMirror } from './chunk-
|
|
3
|
+
import { MirrorSurface, DeviceMirror } from './chunk-SVK2AY3J.js';
|
|
4
4
|
import { ControlBar, MirrorView } from './chunk-CVV7FOMQ.js';
|
|
5
|
-
import { createProxyProbeGuard, proxySummaryFromDevice, isProxyApplyStatus, proxyCapabilityReason, proxyProbeExitIp, proxyProbeMessage, DeviceCreate, isProxyProbeUnsupported, isRedactedProxyUrl, isSupportedProxyUrl, redactProxyUrl } from './chunk-
|
|
5
|
+
import { createProxyProbeGuard, proxySummaryFromDevice, isProxyApplyStatus, proxyCapabilityReason, proxyProbeExitIp, proxyProbeMessage, DeviceCreate, isProxyProbeUnsupported, isRedactedProxyUrl, isSupportedProxyUrl, redactProxyUrl } from './chunk-BSHHYM72.js';
|
|
6
6
|
import { cn, Badge, Button, Dialog, Input, Popover, Select, useToast, ToastViewport, Drawer } from './chunk-EVHTAXQG.js';
|
|
7
|
-
import { useDevicesView, useShortcutsView, GROUP_MIRROR_MAX, useGroupMirror, useScripts, useFleetRun, useTaskAgentRun, preflightTaskAgentDevice, createAgentTaskRunner, useNodesView } from './chunk-
|
|
8
|
-
import { DeviceSession, pushFile, pullFile } from './chunk-
|
|
9
|
-
import { useClient } from './chunk-
|
|
7
|
+
import { useDevicesView, useShortcutsView, GROUP_MIRROR_MAX, useGroupMirror, useScripts, useFleetRun, useTaskAgentRun, preflightTaskAgentDevice, createAgentTaskRunner, useNodesView } from './chunk-O34SNDQB.js';
|
|
8
|
+
import { DeviceSession, pushFile, pullFile } from './chunk-IJVNII5N.js';
|
|
9
|
+
import { useClient } from './chunk-UINEPEIE.js';
|
|
10
10
|
import { useState, useRef, useCallback, useEffect, useMemo, useLayoutEffect } from 'react';
|
|
11
11
|
import * as Icons from 'lucide-react';
|
|
12
12
|
import { Monitor, Eye, Play, Power, RefreshCw, Server, Pencil, Trash2, FolderPlus, Upload, ArrowUp, Folder, File, Download, Dices, ShieldCheck, AlertTriangle, X, Crown, RotateCcw, Square, Plus, Search, LayoutGrid, List, ChevronLeft, Link, Link2Off, Terminal as Terminal$1, PackagePlus, MonitorPlay, ChevronRight, ChevronDown, PlusSquare, Maximize2, Info, ChevronsLeft, ChevronsRight, Check, Copy, Tablet, Smartphone } from 'lucide-react';
|
|
@@ -706,8 +706,8 @@ type EnvOs = 'mac' | 'win';
|
|
|
706
706
|
type EnvRoute = 'wsl2' | 'full_vm';
|
|
707
707
|
type EnvAction = 'setup' | 'status' | 'teardown';
|
|
708
708
|
interface EnvSetupInput {
|
|
709
|
-
/** Defaults to
|
|
710
|
-
os?: EnvOs;
|
|
709
|
+
/** Defaults to mac; Linux setup initializes the native runtime and pulls images. */
|
|
710
|
+
os?: EnvOs | 'linux';
|
|
711
711
|
/** win-only; ignored for mac. Defaults to 'wsl2' server-side. */
|
|
712
712
|
route?: EnvRoute;
|
|
713
713
|
}
|
|
@@ -736,12 +736,10 @@ declare class EnvRun {
|
|
|
736
736
|
private doneFired;
|
|
737
737
|
private last;
|
|
738
738
|
private cursor;
|
|
739
|
-
private pollTimer;
|
|
740
|
-
private closed;
|
|
741
739
|
private pendingEvents;
|
|
742
740
|
private constructor();
|
|
743
741
|
/** Trigger an env action on an owned node and start streaming its progress. */
|
|
744
|
-
static start(cfg: AixConfig | ResolvedConfig, nodeId: string, action: EnvAction, input?: EnvSetupInput & EnvTeardownInput): Promise<EnvRun>;
|
|
742
|
+
static start(cfg: AixConfig | ResolvedConfig, nodeId: string, action: EnvAction, input?: EnvSetupInput & Omit<EnvTeardownInput, 'os'>): Promise<EnvRun>;
|
|
745
743
|
on(event: 'event', cb: (e: EnvEventKind) => void): () => void;
|
|
746
744
|
on(event: 'done', cb: (e: EnvFinished) => void): () => void;
|
|
747
745
|
private onMessage;
|
|
@@ -783,7 +781,7 @@ declare function detectEnvOs(): EnvOs | null;
|
|
|
783
781
|
/** Trigger an env action and resolve once the terminal `finished` frame arrives,
|
|
784
782
|
* returning the full event list (for `summarizeEnv`). Rejects if the trigger
|
|
785
783
|
* POST fails. Used by headless callers (e.g. `LocalNodeController` auto-init). */
|
|
786
|
-
declare function runEnvToFinish(cfg: AixConfig | ResolvedConfig, nodeId: string, action: EnvAction, input?: EnvSetupInput & EnvTeardownInput): Promise<EnvSummary>;
|
|
784
|
+
declare function runEnvToFinish(cfg: AixConfig | ResolvedConfig, nodeId: string, action: EnvAction, input?: EnvSetupInput & Omit<EnvTeardownInput, 'os'>): Promise<EnvSummary>;
|
|
787
785
|
|
|
788
786
|
/** Node registry (caller-scoped). A node belongs to the caller who registers it. */
|
|
789
787
|
declare class NodesApi {
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as ResolvedConfig, W as WebSocketFactory } from '../config-
|
|
2
|
-
export { f as AdminApi, c as AixClient, A as AixConfig, g as ApiTokensApi, h as AuthApi, i as AuthProvider, B as BillingApi, C as CachedUserCredentialOpts, j as ClustersApi, k as Credential, D as DcStream, l as DeviceReq, m as DeviceResp, n as DeviceSession, o as DevicesApi, p as EnvAction, e as EnvEventKind, q as EnvFinished, E as EnvOs, r as EnvResultDto, d as EnvRoute, s as EnvRun, t as EnvSetupInput, u as EnvStepMeta, v as EnvStepView, w as EnvSummary, x as EnvTeardownInput, y as ExecutionFrame, z as ExecutionStreamEvent, G as ExecutionStreamEventsResult, H as FileEntry, I as FleetApi, F as FridaEventFrame, J as IRTCDataChannel, K as IRTCPeerConnection, L as IWebSocket, M as ImagesApi, N as IncomingFrame, P as LlmApi, Q as LocalNodeController, T as LocalNodeOptions, U as LocatorsApi, V as NodeHost, X as NodeHostStatus, Y as NodesApi, O as OutgoingFrame, Z as ProgressFn, _ as ProjectsApi, $ as PullResult, a0 as PushInput, a1 as RTCFactory, a2 as RequestOpts, a3 as RestClient, a4 as RetFrame, a as RunEventKind, a5 as Scope, S as ScriptletEventFrame, a6 as ScriptsApi, a7 as ShortcutsApi, b as StatusFrame, a8 as StreamTarget, a9 as TasksApi, aa as TransferOpts, ab as TransferProgress, ac as TransferResult, ad as UsersApi, ae as WebhooksApi, af as authHeader, ag as buildAuthProvider, ah as createCachedUserCredential, ai as createClient, aj as detectEnvOs, ak as envBlocker, al as executionStreamEventsAfter, am as executionWsTicketUrl, an as executionWsUrl, ao as isEnvEventFrame, ap as isExecutionFrame, aq as isFleetRunTerminal, ar as isFridaEventFrame, as as isRetFrame, at as isScriptletEventFrame, au as isStatusFrame, av as joinUrl, aw as parseIncoming, ax as pullFile, ay as pushFile, az as resolveConfig, aA as restClient, aB as runEnvToFinish, aC as summarizeEnv } from '../config-
|
|
3
|
-
export { A as AdbResult, D as DeviceChannel, b as DeviceTunnel, c as ScriptDebugger, d as ScriptDebuggerOptions, a as ScriptEngine, S as ScriptEvent, e as ScriptRunInput, W as WdaResult } from '../script-debugger-
|
|
4
|
-
export { A as AutomationQueue, B as BatchConfig, F as FlowEvent, a as FlowRun, b as FlowSubmit, Q as QueueMode, s as submitBatch } from '../automation-queue-
|
|
1
|
+
import { R as ResolvedConfig, W as WebSocketFactory } from '../config-fsx4jlLK.js';
|
|
2
|
+
export { f as AdminApi, c as AixClient, A as AixConfig, g as ApiTokensApi, h as AuthApi, i as AuthProvider, B as BillingApi, C as CachedUserCredentialOpts, j as ClustersApi, k as Credential, D as DcStream, l as DeviceReq, m as DeviceResp, n as DeviceSession, o as DevicesApi, p as EnvAction, e as EnvEventKind, q as EnvFinished, E as EnvOs, r as EnvResultDto, d as EnvRoute, s as EnvRun, t as EnvSetupInput, u as EnvStepMeta, v as EnvStepView, w as EnvSummary, x as EnvTeardownInput, y as ExecutionFrame, z as ExecutionStreamEvent, G as ExecutionStreamEventsResult, H as FileEntry, I as FleetApi, F as FridaEventFrame, J as IRTCDataChannel, K as IRTCPeerConnection, L as IWebSocket, M as ImagesApi, N as IncomingFrame, P as LlmApi, Q as LocalNodeController, T as LocalNodeOptions, U as LocatorsApi, V as NodeHost, X as NodeHostStatus, Y as NodesApi, O as OutgoingFrame, Z as ProgressFn, _ as ProjectsApi, $ as PullResult, a0 as PushInput, a1 as RTCFactory, a2 as RequestOpts, a3 as RestClient, a4 as RetFrame, a as RunEventKind, a5 as Scope, S as ScriptletEventFrame, a6 as ScriptsApi, a7 as ShortcutsApi, b as StatusFrame, a8 as StreamTarget, a9 as TasksApi, aa as TransferOpts, ab as TransferProgress, ac as TransferResult, ad as UsersApi, ae as WebhooksApi, af as authHeader, ag as buildAuthProvider, ah as createCachedUserCredential, ai as createClient, aj as detectEnvOs, ak as envBlocker, al as executionStreamEventsAfter, am as executionWsTicketUrl, an as executionWsUrl, ao as isEnvEventFrame, ap as isExecutionFrame, aq as isFleetRunTerminal, ar as isFridaEventFrame, as as isRetFrame, at as isScriptletEventFrame, au as isStatusFrame, av as joinUrl, aw as parseIncoming, ax as pullFile, ay as pushFile, az as resolveConfig, aA as restClient, aB as runEnvToFinish, aC as summarizeEnv } from '../config-fsx4jlLK.js';
|
|
3
|
+
export { A as AdbResult, D as DeviceChannel, b as DeviceTunnel, c as ScriptDebugger, d as ScriptDebuggerOptions, a as ScriptEngine, S as ScriptEvent, e as ScriptRunInput, W as WdaResult } from '../script-debugger-Cu_coj-h.js';
|
|
4
|
+
export { A as AutomationQueue, B as BatchConfig, F as FlowEvent, a as FlowRun, b as FlowSubmit, Q as QueueMode, s as submitBatch } from '../automation-queue-CKsueO9z.js';
|
|
5
5
|
import { h as ScriptParam } from '../types-C2WXVcam.js';
|
|
6
6
|
export { i as AdbScanResult, d as AgentTaskBlocker, j as AgentTaskCurrentAttempt, k as AgentTaskEvent, l as AgentTaskEventsResult, e as AgentTaskEvidence, m as AgentTaskReadResult, n as AgentTaskReadTarget, o as AgentTaskSubmitInput, p as AgentTaskSubmitResult, c as AgentTaskTarget, A as AgentTaskTargetStatus, q as ApiTokenRow, r as AppCandidate, s as AppEntry, t as AppTemplate, u as AppTemplateItemAndroid, v as AppTemplateItemIos, w as AuthResult, B as BalanceLedgerRow, x as BalanceResp, y as BillingPlan, C as CatalogBrand, z as CatalogModel, E as Cluster, F as ClusterMode, G as CreateClusterInput, H as CreateLocatorInput, I as CreateProjectInput, J as CreateProjectResult, K as CreateTokenInput, L as CreateWebhookInput, M as CreatedToken, g as Decimal, O as DeveloperRef, Q as DeviceLocation, R as DeviceOp, T as DeviceProfileView, U as DeviceRate, D as DeviceRow, V as DeviceUsageSession, b as DiscoveredDevice, W as DiscoveredStatus, X as ElementNode, Y as FleetMode, Z as FleetRunDetail, _ as FleetRunDeviceRow, $ as FleetRunSubmit, a0 as ImageArtifact, a1 as ImageInput, a2 as ImageOption, a3 as InstallAntiDetectResult, a4 as IosAccountState, a5 as IosDeviceRow, a6 as IosLibraryApp, a7 as IosLoginResult, a8 as IosScanResult, a9 as KnownDeviceOpName, aa as LlmTestResult, ab as Locator, ac as MdnsEntry, ad as NewAppTemplate, ae as NewShortcut, af as NodeEffectiveCaps, ag as NodeOwnerPolicy, N as NodeRow, ah as NodeScope, ai as OwnNodeDailyCharge, aj as PlanInput, ak as PlatformOem, al as PlatformOemInput, am as PowerAction, an as PowerRunResult, ao as ProfileOverrides, ap as Project, aq as ProjectSubscription, ar as ProjectUserResult, a as ProvisionResult, P as ProvisionSpec, as as ProvisionUserInput, at as ProvisionUserResult, au as ProxyApplyReceipt, av as ProxyApplyStatus, aw as ProxyPatchResult, ax as ProxyProbe, ay as ProxyProbeErrorCode, az as ProxySummary, aA as ProxyUrl, aB as RateInput, aC as RebateLedgerRow, aD as RecycledDeviceRow, aE as RegisterNodeInput, aF as RegisterNodeResult, aG as ScreenshotResult, S as Script, f as ScriptSummary, aH as SendCodeResult, aI as SetDataRootResult, aJ as SetDisguiseResult, aK as SetProfileResult, aL as Shortcut, aM as ShortcutParam, aN as ShortcutRunResult, aO as SubscribeInput, aP as TaskEvent, aQ as TaskEventsResult, aR as TaskListFilter, aS as TaskListResult, aT as TaskStatus, aU as TaskSubmitResult, aV as TaskSummary, aW as TaskTarget, aX as TopupInput, aY as TopupResult, aZ as UpdateNodeInput, a_ as User, a$ as VerifyCodeResult, b0 as WebhookConfig } from '../types-C2WXVcam.js';
|
|
7
|
-
import { C as ControlMessage } from '../mirror-session-
|
|
8
|
-
export { I as InputMessage, M as MirrorSession, S as SCRCPY_PROFILES, a as ScrcpyProfile, b as ScrcpyProfileName, q as qualityMessage } from '../mirror-session-
|
|
7
|
+
import { C as ControlMessage } from '../mirror-session-DM-trg1F.js';
|
|
8
|
+
export { I as InputMessage, M as MirrorSession, S as SCRCPY_PROFILES, a as ScrcpyProfile, b as ScrcpyProfileName, q as qualityMessage } from '../mirror-session-DM-trg1F.js';
|
|
9
9
|
import { B as Box, D as DeviceSize } from '../coords-LPR_MPyp.js';
|
|
10
10
|
export { a as DevicePoint, t as toDevicePoint } from '../coords-LPR_MPyp.js';
|
|
11
11
|
export { D as DeviceTransport, N as NormalizedDevice, n as normalizeDevices } from '../device-normalize-BaThgnH7.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AutomationQueue, MirrorSession, SCHEMA_KEY, SCRCPY_PROFILES, normalizeDevices, qualityMessage, schemaDefaults, schemaToVariables, submitBatch, targetParam, variablesToSchema } from '../chunk-
|
|
2
|
-
export { DeviceSession, getIceServers, mintViewerToken, pullFile, pushFile } from '../chunk-
|
|
3
|
-
export { DeviceChannel, DeviceTunnel, FlowRun, ScriptDebugger, mintDeviceAccess, wsUrlFromAccess } from '../chunk-
|
|
4
|
-
export { AdminApi, AixAuthError, AixClient, AixDeviceOffline, AixError, AixLocked, AixProtocolError, AixTimeout, ApiTokensApi, AuthApi, BillingApi, ClustersApi, DevicesApi, EnvRun, FleetApi, ImagesApi, LlmApi, LocalNodeController, LocatorsApi, NodesApi, ProjectsApi, ReconnectingSocket, RestClient, ScriptsApi, ShortcutsApi, TasksApi, UsersApi, WebhooksApi, authHeader, buildAuthProvider, createCachedUserCredential, createClient, detectEnvOs, envBlocker, errorFromRet, executionStreamEventsAfter, executionWsTicketUrl, executionWsUrl, getLocale, isEnvEventFrame, isExecutionFrame, isFleetRunTerminal, isFridaEventFrame, isRetFrame, isScriptletEventFrame, isStatusFrame, joinUrl, parseIncoming, resolveConfig, restClient, runEnvToFinish, setLocale, summarizeEnv, t } from '../chunk-
|
|
1
|
+
export { AutomationQueue, MirrorSession, SCHEMA_KEY, SCRCPY_PROFILES, normalizeDevices, qualityMessage, schemaDefaults, schemaToVariables, submitBatch, targetParam, variablesToSchema } from '../chunk-V4MXFPDX.js';
|
|
2
|
+
export { DeviceSession, getIceServers, mintViewerToken, pullFile, pushFile } from '../chunk-IJVNII5N.js';
|
|
3
|
+
export { DeviceChannel, DeviceTunnel, FlowRun, ScriptDebugger, mintDeviceAccess, wsUrlFromAccess } from '../chunk-OXIM6EYO.js';
|
|
4
|
+
export { AdminApi, AixAuthError, AixClient, AixDeviceOffline, AixError, AixLocked, AixProtocolError, AixTimeout, ApiTokensApi, AuthApi, BillingApi, ClustersApi, DevicesApi, EnvRun, FleetApi, ImagesApi, LlmApi, LocalNodeController, LocatorsApi, NodesApi, ProjectsApi, ReconnectingSocket, RestClient, ScriptsApi, ShortcutsApi, TasksApi, UsersApi, WebhooksApi, authHeader, buildAuthProvider, createCachedUserCredential, createClient, detectEnvOs, envBlocker, errorFromRet, executionStreamEventsAfter, executionWsTicketUrl, executionWsUrl, getLocale, isEnvEventFrame, isExecutionFrame, isFleetRunTerminal, isFridaEventFrame, isRetFrame, isScriptletEventFrame, isStatusFrame, joinUrl, parseIncoming, resolveConfig, restClient, runEnvToFinish, setLocale, summarizeEnv, t } from '../chunk-TATL3HTE.js';
|
|
5
5
|
export { classifyDrag, mapKey, toDevicePoint } from '../chunk-NWFYTFMI.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AixConfig, R as ResolvedConfig } from './config-
|
|
1
|
+
import { A as AixConfig, R as ResolvedConfig } from './config-fsx4jlLK.js';
|
|
2
2
|
|
|
3
3
|
/** Mirrors the node's `ControlMsg` (webrtc/control.rs): `t`-tagged, coords
|
|
4
4
|
* normalized [0,1] (node scales to px). Sent over the `control` DataChannel. */
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default, { ReactNode } from 'react';
|
|
3
|
-
import { A as AixConfig, R as ResolvedConfig, c as AixClient, e as EnvEventKind, q as EnvFinished, t as EnvSetupInput, x as EnvTeardownInput, E as EnvOs } from '../config-
|
|
4
|
-
import { D as DeviceChannel, A as AdbResult, W as WdaResult, S as ScriptEvent, e as ScriptRunInput } from '../script-debugger-
|
|
5
|
-
import { F as FlowEvent, b as FlowSubmit, B as BatchConfig } from '../automation-queue-
|
|
6
|
-
import { M as MirrorSession, I as InputMessage, b as ScrcpyProfileName } from '../mirror-session-
|
|
3
|
+
import { A as AixConfig, R as ResolvedConfig, c as AixClient, e as EnvEventKind, q as EnvFinished, t as EnvSetupInput, x as EnvTeardownInput, E as EnvOs } from '../config-fsx4jlLK.js';
|
|
4
|
+
import { D as DeviceChannel, A as AdbResult, W as WdaResult, S as ScriptEvent, e as ScriptRunInput } from '../script-debugger-Cu_coj-h.js';
|
|
5
|
+
import { F as FlowEvent, b as FlowSubmit, B as BatchConfig } from '../automation-queue-CKsueO9z.js';
|
|
6
|
+
import { M as MirrorSession, I as InputMessage, b as ScrcpyProfileName } from '../mirror-session-DM-trg1F.js';
|
|
7
7
|
import { w as AuthResult, aH as SendCodeResult, a$ as VerifyCodeResult, ap as Project, I as CreateProjectInput, J as CreateProjectResult, am as PowerAction, aG as ScreenshotResult, X as ElementNode, D as DeviceRow, N as NodeRow, ah as NodeScope, aF as RegisterNodeResult, ag as NodeOwnerPolicy, aL as Shortcut, ae as NewShortcut, aN as ShortcutRunResult, an as PowerRunResult, f as ScriptSummary, S as Script, E as Cluster, G as CreateClusterInput, Z as FleetRunDetail, Y as FleetMode, d as AgentTaskBlocker, e as AgentTaskEvidence, aT as TaskStatus, aV as TaskSummary, aR as TaskListFilter, b0 as WebhookConfig, L as CreateWebhookInput, aE as RegisterNodeInput, ab as Locator, H as CreateLocatorInput, a0 as ImageArtifact, a1 as ImageInput, aa as LlmTestResult, U as DeviceRate, aB as RateInput, y as BillingPlan, aj as PlanInput, V as DeviceUsageSession, aC as RebateLedgerRow, x as BalanceResp, aX as TopupInput, aY as TopupResult, q as ApiTokenRow, K as CreateTokenInput, M as CreatedToken } from '../types-C2WXVcam.js';
|
|
8
|
-
import { a as TaskAgentDevice, b as TaskAgentDeviceStatus, T as TaskAgentRunner } from '../task-agent-runner-
|
|
9
|
-
export { D as Device, i as DevicesProvider, j as DevicesProviderProps, k as DevicesView, c as TaskAgentNodeSnapshot, d as TaskAgentPreflightResult, e as TaskAgentRunRequest, f as TaskAgentStreamEvent, g as TaskAgentTarget, m as mapDevice, p as preflightTaskAgentDevice, u as useDevicesView } from '../task-agent-runner-
|
|
8
|
+
import { a as TaskAgentDevice, b as TaskAgentDeviceStatus, T as TaskAgentRunner } from '../task-agent-runner-CMq9Cir1.js';
|
|
9
|
+
export { D as Device, i as DevicesProvider, j as DevicesProviderProps, k as DevicesView, c as TaskAgentNodeSnapshot, d as TaskAgentPreflightResult, e as TaskAgentRunRequest, f as TaskAgentStreamEvent, g as TaskAgentTarget, m as mapDevice, p as preflightTaskAgentDevice, u as useDevicesView } from '../task-agent-runner-CMq9Cir1.js';
|
|
10
10
|
import { L as LogEntry } from '../use-script-run-Diay7ibY.js';
|
|
11
11
|
export { b as LogLevel, S as ScriptRunStatus, a as StepEvent, U as UseScriptRun, u as useScriptRun } from '../use-script-run-Diay7ibY.js';
|
|
12
12
|
import { A as AgentKind } from '../agent-runner-V60B0is1.js';
|
package/dist/react/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, mapDevice, preflightTaskAgentDevice, useAdmin, useApiTokens, useAuth, useAutomationQueue, useBilling, useClusters, useCommands, useDeviceActions, useDevices, useDevicesView, useEnvGate, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
export { AixProvider, useAixConfig, useClient, useDevice, useEnvRun, useQuery, useScript } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
1
|
+
export { DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, mapDevice, preflightTaskAgentDevice, useAdmin, useApiTokens, useAuth, useAutomationQueue, useBilling, useClusters, useCommands, useDeviceActions, useDevices, useDevicesView, useEnvGate, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks } from '../chunk-O34SNDQB.js';
|
|
2
|
+
import '../chunk-V4MXFPDX.js';
|
|
3
|
+
import '../chunk-IJVNII5N.js';
|
|
4
|
+
export { AixProvider, useAixConfig, useClient, useDevice, useEnvRun, useQuery, useScript } from '../chunk-UINEPEIE.js';
|
|
5
|
+
import '../chunk-OXIM6EYO.js';
|
|
6
|
+
import '../chunk-TATL3HTE.js';
|
|
7
7
|
import '../chunk-NWFYTFMI.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as AixConfig, R as ResolvedConfig, F as FridaEventFrame, S as ScriptletEventFrame, b as StatusFrame, O as OutgoingFrame } from './config-
|
|
1
|
+
import { A as AixConfig, R as ResolvedConfig, F as FridaEventFrame, S as ScriptletEventFrame, b as StatusFrame, O as OutgoingFrame } from './config-fsx4jlLK.js';
|
|
2
2
|
|
|
3
3
|
declare class DeviceTunnel {
|
|
4
4
|
readonly streamId: string;
|
|
@@ -2,7 +2,7 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { P as ProvisionSpec, a as ProvisionResult, b as DiscoveredDevice, A as AgentTaskTargetStatus, c as AgentTaskTarget, d as AgentTaskBlocker, e as AgentTaskEvidence } from './types-C2WXVcam.js';
|
|
4
4
|
import { N as NormalizedDevice } from './device-normalize-BaThgnH7.js';
|
|
5
|
-
import { A as AixConfig, R as ResolvedConfig } from './config-
|
|
5
|
+
import { A as AixConfig, R as ResolvedConfig } from './config-fsx4jlLK.js';
|
|
6
6
|
import { A as AgentKind } from './agent-runner-V60B0is1.js';
|
|
7
7
|
|
|
8
8
|
interface Device {
|
package/dist/ui/billing.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
2
2
|
import { cn, Button, Badge, Input } from '../chunk-EVHTAXQG.js';
|
|
3
|
-
import { useBilling } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { useClient } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
3
|
+
import { useBilling } from '../chunk-O34SNDQB.js';
|
|
4
|
+
import '../chunk-V4MXFPDX.js';
|
|
5
|
+
import '../chunk-IJVNII5N.js';
|
|
6
|
+
import { useClient } from '../chunk-UINEPEIE.js';
|
|
7
|
+
import '../chunk-OXIM6EYO.js';
|
|
8
|
+
import '../chunk-TATL3HTE.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
|
10
10
|
import { useState, useEffect } from 'react';
|
|
11
11
|
import { SlidersHorizontal, Server, CalendarClock, Smartphone, ArrowUpCircle, ArrowDownCircle, HeadphonesIcon, Wallet, X, RefreshCw } from 'lucide-react';
|
package/dist/ui/device-create.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { AddWirelessDeviceDialog, DeviceCreate, NodePicker, ProxySpoofStep, RealDiscoverStep, VirtualSpecStep } from '../chunk-
|
|
1
|
+
export { AddWirelessDeviceDialog, DeviceCreate, NodePicker, ProxySpoofStep, RealDiscoverStep, VirtualSpecStep } from '../chunk-BSHHYM72.js';
|
|
2
2
|
import '../chunk-EVHTAXQG.js';
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-O34SNDQB.js';
|
|
4
|
+
import '../chunk-V4MXFPDX.js';
|
|
5
|
+
import '../chunk-IJVNII5N.js';
|
|
6
|
+
import '../chunk-UINEPEIE.js';
|
|
7
|
+
import '../chunk-OXIM6EYO.js';
|
|
8
|
+
import '../chunk-TATL3HTE.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/device-mirror.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { DeviceBootSplash, DeviceMirror, MirrorSurface } from '../chunk-
|
|
1
|
+
export { DeviceBootSplash, DeviceMirror, MirrorSurface } from '../chunk-SVK2AY3J.js';
|
|
2
2
|
import '../chunk-OEZFYKL6.js';
|
|
3
3
|
import '../chunk-CVV7FOMQ.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-O34SNDQB.js';
|
|
5
|
+
import '../chunk-V4MXFPDX.js';
|
|
6
|
+
import '../chunk-IJVNII5N.js';
|
|
7
|
+
import '../chunk-UINEPEIE.js';
|
|
8
|
+
import '../chunk-OXIM6EYO.js';
|
|
9
|
+
import '../chunk-TATL3HTE.js';
|
|
10
10
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/devices.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { T as TaskAgentRunner, D as Device, a as TaskAgentDevice } from '../task-agent-runner-
|
|
3
|
-
export { A as AgentTaskRunnerOptions, b as TaskAgentDeviceStatus, c as TaskAgentNodeSnapshot, d as TaskAgentPreflightResult, e as TaskAgentRunRequest, f as TaskAgentStreamEvent, g as TaskAgentTarget, h as createAgentTaskRunner, p as preflightTaskAgentDevice } from '../task-agent-runner-
|
|
2
|
+
import { T as TaskAgentRunner, D as Device, a as TaskAgentDevice } from '../task-agent-runner-CMq9Cir1.js';
|
|
3
|
+
export { A as AgentTaskRunnerOptions, b as TaskAgentDeviceStatus, c as TaskAgentNodeSnapshot, d as TaskAgentPreflightResult, e as TaskAgentRunRequest, f as TaskAgentStreamEvent, g as TaskAgentTarget, h as createAgentTaskRunner, p as preflightTaskAgentDevice } from '../task-agent-runner-CMq9Cir1.js';
|
|
4
4
|
import { aL as Shortcut, h as ScriptParam } from '../types-C2WXVcam.js';
|
|
5
5
|
import '../device-normalize-BaThgnH7.js';
|
|
6
|
-
import '../config-
|
|
6
|
+
import '../config-fsx4jlLK.js';
|
|
7
7
|
import '../agent-runner-V60B0is1.js';
|
|
8
8
|
|
|
9
9
|
interface DevicesPageProps {
|
package/dist/ui/devices.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { BulkInstallAppsDialog, DeleteDeviceDialog, DeviceCard, DeviceConnect, DeviceDetailDrawer, DeviceEditDialog, DeviceSelector, DeviceTerminal, DevicesPage, FileManager, FingerprintPanel, GroupMirrorModal, NodeRegister, RecycleBinPanel, RefreshParamsButton, RunScriptDialog, ScriptParamForm, SharedParamsForm, ShortcutBar, ShortcutEditDialog, ShortcutRunDialog, TagEditor, TaskAgentDialog, resolveSharedRow, variablesToParams } from '../chunk-
|
|
1
|
+
export { BulkInstallAppsDialog, DeleteDeviceDialog, DeviceCard, DeviceConnect, DeviceDetailDrawer, DeviceEditDialog, DeviceSelector, DeviceTerminal, DevicesPage, FileManager, FingerprintPanel, GroupMirrorModal, NodeRegister, RecycleBinPanel, RefreshParamsButton, RunScriptDialog, ScriptParamForm, SharedParamsForm, ShortcutBar, ShortcutEditDialog, ShortcutRunDialog, TagEditor, TaskAgentDialog, resolveSharedRow, variablesToParams } from '../chunk-YOT7HZBU.js';
|
|
2
2
|
import '../chunk-64Q7BBIQ.js';
|
|
3
3
|
import '../chunk-FW23FLAF.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-SVK2AY3J.js';
|
|
5
5
|
import '../chunk-OEZFYKL6.js';
|
|
6
6
|
import '../chunk-CVV7FOMQ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-BSHHYM72.js';
|
|
8
8
|
import '../chunk-EVHTAXQG.js';
|
|
9
|
-
export { createAgentTaskRunner, preflightTaskAgentDevice } from '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
9
|
+
export { createAgentTaskRunner, preflightTaskAgentDevice } from '../chunk-O34SNDQB.js';
|
|
10
|
+
import '../chunk-V4MXFPDX.js';
|
|
11
|
+
import '../chunk-IJVNII5N.js';
|
|
12
|
+
import '../chunk-UINEPEIE.js';
|
|
13
|
+
import '../chunk-OXIM6EYO.js';
|
|
14
|
+
import '../chunk-TATL3HTE.js';
|
|
15
15
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/editor.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { S as ScriptStudioProps } from '../ScriptStudio-DaCqOF5H.js';
|
|
|
3
3
|
export { a as ScriptStudioSlotContext } from '../ScriptStudio-DaCqOF5H.js';
|
|
4
4
|
import { a as AgentRunner } from '../agent-runner-V60B0is1.js';
|
|
5
5
|
export { A as AgentKind, b as AgentSendRequest, c as AgentStreamEvent } from '../agent-runner-V60B0is1.js';
|
|
6
|
-
import { c as AixClient } from '../config-
|
|
6
|
+
import { c as AixClient } from '../config-fsx4jlLK.js';
|
|
7
7
|
import '../types-C2WXVcam.js';
|
|
8
8
|
|
|
9
9
|
interface ScriptEditorPageProps {
|
package/dist/ui/editor.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ScriptStudio } from '../chunk-
|
|
1
|
+
import { ScriptStudio } from '../chunk-XNKC6HU3.js';
|
|
2
2
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
3
3
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
4
4
|
import '../chunk-FW23FLAF.js';
|
|
5
5
|
import { Select, cn } from '../chunk-EVHTAXQG.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import { useClient } from '../chunk-
|
|
10
|
-
import '../chunk-
|
|
11
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-O34SNDQB.js';
|
|
7
|
+
import '../chunk-V4MXFPDX.js';
|
|
8
|
+
import '../chunk-IJVNII5N.js';
|
|
9
|
+
import { useClient } from '../chunk-UINEPEIE.js';
|
|
10
|
+
import '../chunk-OXIM6EYO.js';
|
|
11
|
+
import '../chunk-TATL3HTE.js';
|
|
12
12
|
import '../chunk-NWFYTFMI.js';
|
|
13
13
|
import { useState, useEffect, useRef, useCallback } from 'react';
|
|
14
14
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import { S as ScriptEvent, a as ScriptEngine } from '../script-debugger-
|
|
3
|
+
import { S as ScriptEvent, a as ScriptEngine } from '../script-debugger-Cu_coj-h.js';
|
|
4
4
|
import * as _uiw_react_codemirror from '@uiw/react-codemirror';
|
|
5
5
|
export { ControlBar, ControlBarProps, MirrorView, MirrorViewProps } from './mirror.js';
|
|
6
|
-
import { E as EnvOs, d as EnvRoute, e as EnvEventKind } from '../config-
|
|
6
|
+
import { E as EnvOs, d as EnvRoute, e as EnvEventKind } from '../config-fsx4jlLK.js';
|
|
7
7
|
import { N as NodeRow } from '../types-C2WXVcam.js';
|
|
8
8
|
import '../coords-LPR_MPyp.js';
|
|
9
|
-
import '../mirror-session-
|
|
9
|
+
import '../mirror-session-DM-trg1F.js';
|
|
10
10
|
|
|
11
11
|
interface DebugConsoleProps {
|
|
12
12
|
events: ScriptEvent[];
|
|
@@ -42,7 +42,7 @@ interface ScriptPanelProps {
|
|
|
42
42
|
* event console + rpc call panel, all driven by `useScript`. */
|
|
43
43
|
declare function ScriptPanel({ deviceId, defaultEngine, defaultScript, className }: ScriptPanelProps): react__default.JSX.Element;
|
|
44
44
|
|
|
45
|
-
/** All semantic CSS variables consumed by
|
|
45
|
+
/** All semantic CSS variables consumed by `aixautots/ui` components. The flat
|
|
46
46
|
* `--aix-*` naming (no sub-namespace) is the intentional convention for this package. */
|
|
47
47
|
declare const AIX_CSS_VARS: readonly ["--aix-bg", "--aix-fg", "--aix-muted", "--aix-accent", "--aix-danger", "--aix-border", "--aix-radius", "--aix-font", "--aix-mono", "--aix-editor-bg", "--aix-editor-fg"];
|
|
48
48
|
/** A CodeMirror theme extension that draws from the `--aix-editor-*` variables
|
|
@@ -93,12 +93,10 @@ interface NodeCapabilityPanelProps {
|
|
|
93
93
|
node: NodeRow;
|
|
94
94
|
/** Tauri host? enables the WSL2 elevated-install resolver in the dialog. */
|
|
95
95
|
isTauri?: boolean;
|
|
96
|
-
/** Known local host OS, only when node.id matches the host process. */
|
|
97
|
-
localEnvOs?: EnvOs | null;
|
|
98
96
|
/** Host-side WSL2 install resolver (Windows desktop). */
|
|
99
97
|
onInstallWsl?: () => void | Promise<void>;
|
|
100
98
|
}
|
|
101
99
|
/** 「虚拟机与设备能力」面板:四平台能力行 + 初始化/下载镜像 + 流式进度。 */
|
|
102
|
-
declare function NodeCapabilityPanel({ node
|
|
100
|
+
declare function NodeCapabilityPanel({ node, isTauri, onInstallWsl }: NodeCapabilityPanelProps): react.JSX.Element;
|
|
103
101
|
|
|
104
102
|
export { AIX_CSS_VARS, DebugConsole, type DebugConsoleProps, EnvInitDialog, type EnvInitDialogProps, NodeCapabilityPanel, type NodeCapabilityPanelProps, ScriptEditor, type ScriptEditorProps, ScriptPanel, type ScriptPanelProps, aixCodeMirrorTheme, vmPlan };
|
package/dist/ui/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { ControlBar, MirrorView } from '../chunk-CVV7FOMQ.js';
|
|
2
2
|
import { Button, Input } from '../chunk-EVHTAXQG.js';
|
|
3
|
-
import { useScript, useEnvRun, useClient } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import { envBlocker, summarizeEnv
|
|
3
|
+
import { useScript, useEnvRun, useClient } from '../chunk-UINEPEIE.js';
|
|
4
|
+
import '../chunk-OXIM6EYO.js';
|
|
5
|
+
import { envBlocker, summarizeEnv } from '../chunk-TATL3HTE.js';
|
|
6
6
|
import '../chunk-NWFYTFMI.js';
|
|
7
7
|
import React4, { useState, useId, useRef, useEffect, useMemo } from 'react';
|
|
8
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -294,7 +294,7 @@ function EnvInitDialog(props) {
|
|
|
294
294
|
);
|
|
295
295
|
if (!open) return null;
|
|
296
296
|
const pct = summary.steps.length ? Math.round(summary.steps.reduce((a, s) => a + (s.state === "ok" || s.state === "done" || s.state === "skipped" || s.state === "present" ? 100 : s.pct), 0) / summary.steps.length) : 0;
|
|
297
|
-
const failed =
|
|
297
|
+
const failed = done && finished && !finished.ok;
|
|
298
298
|
const success = done && finished?.ok;
|
|
299
299
|
return /* @__PURE__ */ jsx("div", { style: overlay, role: "dialog", "aria-modal": "true", onClick: (e) => {
|
|
300
300
|
if (e.target === e.currentTarget && !started) onClose();
|
|
@@ -309,7 +309,6 @@ function EnvInitDialog(props) {
|
|
|
309
309
|
"%"
|
|
310
310
|
] })
|
|
311
311
|
] }),
|
|
312
|
-
started && events.length === 0 && !failed && /* @__PURE__ */ jsx("div", { role: "status", style: { color: "var(--aix-muted, #8a8a8a)", fontSize: 13, marginBottom: 12 }, children: "\u6B63\u5728\u8FDE\u63A5\u8282\u70B9\u5E76\u7B49\u5F85\u521D\u59CB\u5316\u6B65\u9AA4\u2026" }),
|
|
313
312
|
/* @__PURE__ */ jsx("ul", { style: { listStyle: "none", margin: 0, padding: 0, display: "grid", gap: 8 }, children: summary.steps.map((s) => /* @__PURE__ */ jsxs("li", { style: { display: "flex", alignItems: "baseline", gap: 10, fontSize: 13 }, children: [
|
|
314
313
|
/* @__PURE__ */ jsx("span", { style: { color: stateColor(s.state), width: 16, textAlign: "center" }, children: STATE_ICON[s.state] ?? "\xB7" }),
|
|
315
314
|
/* @__PURE__ */ jsxs("span", { style: { flex: 1 }, children: [
|
|
@@ -399,19 +398,6 @@ function envOsOf(node) {
|
|
|
399
398
|
const os = str(sys(node, "os"));
|
|
400
399
|
return os === "macos" ? "mac" : os === "windows" ? "win" : null;
|
|
401
400
|
}
|
|
402
|
-
function withLocalEnvOs(node, os) {
|
|
403
|
-
if (!node.is_owner || !os || envOsOf(node) || sys(node, "os")) return node;
|
|
404
|
-
return {
|
|
405
|
-
...node,
|
|
406
|
-
reported_caps: {
|
|
407
|
-
...node.reported_caps,
|
|
408
|
-
system: {
|
|
409
|
-
...node.reported_caps?.system,
|
|
410
|
-
os: os === "win" ? "windows" : "macos"
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
401
|
function vmPlan(node) {
|
|
416
402
|
const eff = node.effective_caps;
|
|
417
403
|
const os = str(sys(node, "os"));
|
|
@@ -436,11 +422,13 @@ function vmPlan(node) {
|
|
|
436
422
|
reason: `\u9700\u5B89\u88C5 redroid \u73AF\u5883\u5E95\u5EA7\uFF08${os === "windows" ? "WSL2" : "lima"}\uFF09\u540E\u53EF\u7528`
|
|
437
423
|
});
|
|
438
424
|
} else if (os === "linux") {
|
|
425
|
+
const feature = node.reported_caps?.redroid_feature_enabled;
|
|
426
|
+
const setupSupported = feature !== false && !capBool(node, "redroid_capable") && capBool(node, "redroid_setup_supported");
|
|
439
427
|
out.push({
|
|
440
428
|
key: "android",
|
|
441
429
|
label: "Android \u4E91\u624B\u673A",
|
|
442
|
-
state: "unavailable",
|
|
443
|
-
reason: "\u8BE5 Linux \u8282\u70B9\
|
|
430
|
+
state: setupSupported ? "needs-init" : "unavailable",
|
|
431
|
+
reason: setupSupported ? "\u9700\u521D\u59CB\u5316\u8FD0\u884C\u73AF\u5883\u5E76\u5728\u7EBF\u4E0B\u8F7D Android \u955C\u50CF" : feature === false ? "\u8BE5 Linux \u8282\u70B9\u7248\u672C\u672A\u5305\u542B Redroid provider\uFF0C\u8BF7\u5347\u7EA7\u8282\u70B9" : capBool(node, "redroid_capable") ? "\u8282\u70B9\u672A\u542F\u7528 Android \u4E91\u624B\u673A\u6743\u9650" : feature === true ? "Linux \u8FD0\u884C\u73AF\u5883\u5C1A\u672A\u5C31\u7EEA\uFF0C\u6B64\u8282\u70B9\u4E0D\u652F\u6301\u81EA\u52A8\u521D\u59CB\u5316" : "\u8282\u70B9\u5C1A\u672A\u4E0A\u62A5 Linux \u521D\u59CB\u5316\u80FD\u529B\uFF0C\u8BF7\u68C0\u67E5\u8282\u70B9\u7248\u672C\u4E0E\u8FD0\u884C\u73AF\u5883"
|
|
444
432
|
});
|
|
445
433
|
} else {
|
|
446
434
|
out.push({ key: "android", label: "Android \u4E91\u624B\u673A", state: "unavailable", reason: "\u672C\u673A\u4E0D\u652F\u6301" });
|
|
@@ -525,7 +513,7 @@ function VmCapRow({
|
|
|
525
513
|
onDownload,
|
|
526
514
|
downloading
|
|
527
515
|
}) {
|
|
528
|
-
const canInit = vm.state === "needs-init" && node.is_owner && envOsOf(node) !== null;
|
|
516
|
+
const canInit = vm.state === "needs-init" && node.is_owner && (envOsOf(node) !== null || sys(node, "os") === "linux" && capBool(node, "redroid_setup_supported"));
|
|
529
517
|
const canDownload = vm.state === "needs-image" && node.is_owner;
|
|
530
518
|
const dot = vm.state === "available" ? "bg-success" : vm.state === "needs-init" ? "bg-warning" : vm.state === "needs-image" ? "bg-warning" : "bg-muted-foreground/40";
|
|
531
519
|
const badge = vm.state === "available" ? "\u53EF\u7528" : vm.state === "needs-init" ? "\u9700\u521D\u59CB\u5316" : vm.state === "needs-image" ? "\u955C\u50CF\u672A\u5C31\u7EEA" : "\u672C\u673A\u4E0D\u53EF\u7528";
|
|
@@ -535,8 +523,8 @@ function VmCapRow({
|
|
|
535
523
|
/* @__PURE__ */ jsx("span", { className: `h-1.5 w-1.5 shrink-0 rounded-full ${dot}` }),
|
|
536
524
|
/* @__PURE__ */ jsx("span", { className: "flex-1 text-xs text-foreground", children: vm.label }),
|
|
537
525
|
/* @__PURE__ */ jsx("span", { className: `text-[11px] ${badgeClass}`, children: badge }),
|
|
538
|
-
canInit && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", onClick: onInit, className: "ml-2", children: "\u521D\u59CB\u5316" }),
|
|
539
|
-
canDownload && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", onClick: onDownload, disabled: downloading, className: "ml-2", children: downloading ? "\
|
|
526
|
+
canInit && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", onClick: onInit, disabled: downloading, className: "ml-2", children: downloading ? "\u521D\u59CB\u5316\u4E2D\u2026" : "\u521D\u59CB\u5316" }),
|
|
527
|
+
canDownload && /* @__PURE__ */ jsx(Button, { size: "sm", variant: "primary", onClick: onDownload, disabled: downloading, className: "ml-2", children: downloading ? "\u4E0B\u8F7D\u4E2D\u2026" : "\u4E0B\u8F7D\u955C\u50CF" })
|
|
540
528
|
] }),
|
|
541
529
|
vm.reason && /* @__PURE__ */ jsx("p", { className: "mt-1 pl-3.5 text-[11px] text-muted-foreground", children: vm.reason })
|
|
542
530
|
] });
|
|
@@ -594,19 +582,18 @@ function AndroidImageRows({ images, installed }) {
|
|
|
594
582
|
] }, img.id);
|
|
595
583
|
}) });
|
|
596
584
|
}
|
|
597
|
-
function NodeCapabilityPanel({ node
|
|
585
|
+
function NodeCapabilityPanel({ node, isTauri, onInstallWsl }) {
|
|
598
586
|
const client = useClient();
|
|
599
|
-
const localOs = localEnvOs ?? (client.localNode?.nodeId === reportedNode.id ? client.localNode.envOs ?? detectEnvOs() : null);
|
|
600
|
-
const node = withLocalEnvOs(reportedNode, localOs);
|
|
601
587
|
const [init, setInit] = useState(null);
|
|
602
588
|
const initOs = envOsOf(node);
|
|
603
589
|
const envRun = useEnvRun();
|
|
604
590
|
const imagePulling = envRun.reqId !== null && !envRun.done;
|
|
605
591
|
const showImagePanel = envRun.reqId !== null;
|
|
606
592
|
const handleDownload = async () => {
|
|
607
|
-
|
|
593
|
+
const setupOs = sys(node, "os") === "linux" ? "linux" : initOs;
|
|
594
|
+
if (!setupOs || imagePulling) return;
|
|
608
595
|
try {
|
|
609
|
-
await envRun.setup(node.id, { os:
|
|
596
|
+
await envRun.setup(node.id, { os: setupOs });
|
|
610
597
|
} catch {
|
|
611
598
|
}
|
|
612
599
|
};
|
|
@@ -625,14 +612,16 @@ function NodeCapabilityPanel({ node: reportedNode, isTauri, onInstallWsl, localE
|
|
|
625
612
|
return /* @__PURE__ */ jsxs("section", { children: [
|
|
626
613
|
/* @__PURE__ */ jsx("h3", { className: "text-xs font-semibold text-muted-foreground uppercase tracking-wide mb-2", children: "\u865A\u62DF\u673A\u4E0E\u8BBE\u5907\u80FD\u529B" }),
|
|
627
614
|
!node.reported_caps ? /* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: "\u80FD\u529B\u672A\u77E5\uFF1A\u8282\u70B9\u5C1A\u672A\u8FDE\u63A5\u6216\u4E3A\u65E7\u7248\u672C\uFF08\u9700\u5347\u7EA7\u4EE5\u4E0A\u62A5\u80FD\u529B\uFF09\u3002" }) : /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
628
|
-
!reportedNode.reported_caps && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-muted-foreground", children: "\u5DF2\u8BC6\u522B\u672C\u673A\u7CFB\u7EDF\uFF0C\u53EF\u521D\u59CB\u5316\u73AF\u5883\uFF1B\u8282\u70B9\u80FD\u529B\u5C1A\u672A\u4E0A\u62A5\uFF0C\u8BF7\u786E\u4FDD\u8282\u70B9\u5DF2\u8FDE\u63A5\u8BBE\u5907\u7F51\u5173\u3002" }),
|
|
629
615
|
vmPlan(node).map((vm) => /* @__PURE__ */ jsxs("div", { children: [
|
|
630
616
|
/* @__PURE__ */ jsx(
|
|
631
617
|
VmCapRow,
|
|
632
618
|
{
|
|
633
619
|
node,
|
|
634
620
|
vm,
|
|
635
|
-
onInit: () =>
|
|
621
|
+
onInit: () => {
|
|
622
|
+
if (sys(node, "os") === "linux") void handleDownload();
|
|
623
|
+
else setInit(vm);
|
|
624
|
+
},
|
|
636
625
|
onDownload: handleDownload,
|
|
637
626
|
downloading: imagePulling
|
|
638
627
|
}
|
|
@@ -650,7 +639,7 @@ function NodeCapabilityPanel({ node: reportedNode, isTauri, onInstallWsl, localE
|
|
|
650
639
|
}
|
|
651
640
|
)
|
|
652
641
|
] }),
|
|
653
|
-
node.is_owner &&
|
|
642
|
+
node.is_owner && /* @__PURE__ */ jsx(DataRootConfig, { node }),
|
|
654
643
|
init && initOs && /* @__PURE__ */ jsx(
|
|
655
644
|
EnvInitDialog,
|
|
656
645
|
{
|
package/dist/ui/inspector.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
2
2
|
import { Select, Button, cn, Input, Dialog } from '../chunk-EVHTAXQG.js';
|
|
3
|
-
import { useInspectorView, useDevicesView, useLocators } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import { useClient } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
3
|
+
import { useInspectorView, useDevicesView, useLocators } from '../chunk-O34SNDQB.js';
|
|
4
|
+
import '../chunk-V4MXFPDX.js';
|
|
5
|
+
import '../chunk-IJVNII5N.js';
|
|
6
|
+
import { useClient } from '../chunk-UINEPEIE.js';
|
|
7
|
+
import '../chunk-OXIM6EYO.js';
|
|
8
|
+
import '../chunk-TATL3HTE.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
|
10
10
|
import { useState, useMemo, useEffect, useCallback, useRef } from 'react';
|
|
11
11
|
import { Upload, RefreshCw, ChevronsUp, ChevronsDown, MousePointer2, Circle, Square, Search, Laptop, Smartphone, Check, Copy, Crosshair, TimerReset, Eraser, ImageDown, Keyboard, Save, Trash2, X, ChevronDown, ChevronRight, ArrowLeft, Home, SquareStack, CornerDownLeft, Delete } from 'lucide-react';
|
package/dist/ui/market.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
2
2
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
3
|
-
import { useScripts } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
3
|
+
import { useScripts } from '../chunk-O34SNDQB.js';
|
|
4
|
+
import '../chunk-V4MXFPDX.js';
|
|
5
|
+
import '../chunk-IJVNII5N.js';
|
|
6
|
+
import '../chunk-UINEPEIE.js';
|
|
7
|
+
import '../chunk-OXIM6EYO.js';
|
|
8
|
+
import '../chunk-TATL3HTE.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
|
10
10
|
import { Pencil, Store } from 'lucide-react';
|
|
11
11
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
package/dist/ui/mirror.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import react__default from 'react';
|
|
2
2
|
import { D as DeviceSize } from '../coords-LPR_MPyp.js';
|
|
3
|
-
import { C as ControlMessage } from '../mirror-session-
|
|
4
|
-
import '../config-
|
|
3
|
+
import { C as ControlMessage } from '../mirror-session-DM-trg1F.js';
|
|
4
|
+
import '../config-fsx4jlLK.js';
|
|
5
5
|
import '../types-C2WXVcam.js';
|
|
6
6
|
|
|
7
7
|
interface MirrorViewProps {
|
package/dist/ui/script-studio.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CodeEditor, DeviceSelect, RunPanel, ScriptParamEditor, ScriptStudio, TimelineStep } from '../chunk-
|
|
1
|
+
export { CodeEditor, DeviceSelect, RunPanel, ScriptParamEditor, ScriptStudio, TimelineStep } from '../chunk-XNKC6HU3.js';
|
|
2
2
|
export { LogConsole } from '../chunk-FW23FLAF.js';
|
|
3
3
|
import '../chunk-EVHTAXQG.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-O34SNDQB.js';
|
|
5
|
+
import '../chunk-V4MXFPDX.js';
|
|
6
|
+
import '../chunk-IJVNII5N.js';
|
|
7
|
+
import '../chunk-UINEPEIE.js';
|
|
8
|
+
import '../chunk-OXIM6EYO.js';
|
|
9
|
+
import '../chunk-TATL3HTE.js';
|
|
10
10
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/scripts.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
2
2
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
3
3
|
import { cn, Badge, Button, Input } from '../chunk-EVHTAXQG.js';
|
|
4
|
-
import { useScripts } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
9
|
-
import '../chunk-
|
|
4
|
+
import { useScripts } from '../chunk-O34SNDQB.js';
|
|
5
|
+
import '../chunk-V4MXFPDX.js';
|
|
6
|
+
import '../chunk-IJVNII5N.js';
|
|
7
|
+
import '../chunk-UINEPEIE.js';
|
|
8
|
+
import '../chunk-OXIM6EYO.js';
|
|
9
|
+
import '../chunk-TATL3HTE.js';
|
|
10
10
|
import '../chunk-NWFYTFMI.js';
|
|
11
11
|
import { useState, useMemo } from 'react';
|
|
12
12
|
import { AppWindow, Monitor, Smartphone, FileText, Play, Copy, Trash2, PlusCircle, LayoutGrid, Plus, Search } from 'lucide-react';
|
package/dist/ui/tasks.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { SharedParamsForm, resolveSharedRow } from '../chunk-
|
|
1
|
+
import { SharedParamsForm, resolveSharedRow } from '../chunk-YOT7HZBU.js';
|
|
2
2
|
import { useAixT } from '../chunk-64Q7BBIQ.js';
|
|
3
3
|
import '../chunk-FW23FLAF.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-SVK2AY3J.js';
|
|
5
5
|
import '../chunk-OEZFYKL6.js';
|
|
6
6
|
import '../chunk-CVV7FOMQ.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-BSHHYM72.js';
|
|
8
8
|
import { Button, cn, Select, Input, Badge } from '../chunk-EVHTAXQG.js';
|
|
9
|
-
import { useDevicesView, useAutomationQueue, useApiTokens } from '../chunk-
|
|
10
|
-
import { targetParam, variablesToSchema, schemaDefaults } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import { useClient, useAixConfig } from '../chunk-
|
|
13
|
-
import '../chunk-
|
|
14
|
-
import '../chunk-
|
|
9
|
+
import { useDevicesView, useAutomationQueue, useApiTokens } from '../chunk-O34SNDQB.js';
|
|
10
|
+
import { targetParam, variablesToSchema, schemaDefaults } from '../chunk-V4MXFPDX.js';
|
|
11
|
+
import '../chunk-IJVNII5N.js';
|
|
12
|
+
import { useClient, useAixConfig } from '../chunk-UINEPEIE.js';
|
|
13
|
+
import '../chunk-OXIM6EYO.js';
|
|
14
|
+
import '../chunk-TATL3HTE.js';
|
|
15
15
|
import '../chunk-NWFYTFMI.js';
|
|
16
16
|
import { useState, useEffect, useMemo } from 'react';
|
|
17
17
|
import { RefreshCw, Plug, Plus, X, Play, ChevronDown, ChevronRight, PlayCircle, Pause, Ban, Trash2, Webhook, MonitorSmartphone, Copy } from 'lucide-react';
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aixnn/aixautots",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
|
|
7
6
|
"sideEffects": false,
|
|
8
7
|
"exports": {
|
|
9
8
|
"./core": { "types": "./dist/core/index.d.ts", "import": "./dist/core/index.js" },
|
package/styles.css
CHANGED
package/tailwind-preset.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* aixautots 的 Tailwind 预设。接入方在自己的 tailwind.config 里:
|
|
3
|
-
* presets: [require('
|
|
3
|
+
* presets: [require('aixautots/tailwind-preset')]
|
|
4
4
|
* 即可获得 aixautots UI 组件依赖的全部语义 token(颜色/字号/间距/圆角),无需手抄。
|
|
5
5
|
*
|
|
6
|
-
* 颜色走 `hsl(var(--token))` 约定,token 的实际值由
|
|
6
|
+
* 颜色走 `hsl(var(--token))` 约定,token 的实际值由 `aixautots/styles.css` 提供
|
|
7
7
|
* (浅色 :root + 深色 .dark)。接入方覆盖 token 值即可换肤。
|
|
8
8
|
*
|
|
9
9
|
* 注意:接入方仍需在 content 里加入 aixautots(否则其类名不会被生成):
|
|
10
|
-
* content: [..., './node_modules
|
|
10
|
+
* content: [..., './node_modules/aixautots/dist/** /*.js'] // 或源码路径
|
|
11
11
|
*/
|
|
12
12
|
module.exports = {
|
|
13
13
|
darkMode: 'class',
|