@aixnn/aixautots 0.5.2 → 0.5.3
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/{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/core/index.js +4 -4
- package/dist/device-session-W7I3WQXF.js +2 -0
- package/dist/react/index.js +6 -6
- 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.js +9 -9
- package/dist/ui/editor.js +7 -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/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/ScriptStudio-DaCqOF5H.d.ts +0 -43
- package/dist/agent-runner-V60B0is1.d.ts +0 -57
- package/dist/automation-queue-8HqRJV_K.d.ts +0 -72
- package/dist/config-Bm1hmXhD.d.ts +0 -1380
- package/dist/coords-LPR_MPyp.d.ts +0 -22
- package/dist/core/index.d.ts +0 -135
- package/dist/device-normalize-BaThgnH7.d.ts +0 -43
- package/dist/device-session-KZVGLPOI.js +0 -2
- package/dist/i18n/index.d.ts +0 -30
- package/dist/mirror-session-C_1vFkRV.d.ts +0 -108
- package/dist/nav/index.d.ts +0 -19
- package/dist/react/index.d.ts +0 -487
- package/dist/script-debugger-Cw5jVRoz.d.ts +0 -114
- package/dist/task-agent-runner-eD9-SCJz.d.ts +0 -160
- package/dist/types-C2WXVcam.d.ts +0 -1005
- package/dist/ui/billing.d.ts +0 -48
- package/dist/ui/device-create.d.ts +0 -55
- package/dist/ui/device-mirror.d.ts +0 -42
- package/dist/ui/devices.d.ts +0 -223
- package/dist/ui/editor.d.ts +0 -64
- package/dist/ui/index.d.ts +0 -104
- package/dist/ui/inspector.d.ts +0 -5
- package/dist/ui/market.d.ts +0 -10
- package/dist/ui/mirror.d.ts +0 -52
- package/dist/ui/primitives/index.d.ts +0 -101
- package/dist/ui/script-studio.d.ts +0 -85
- package/dist/ui/scripts.d.ts +0 -18
- package/dist/ui/tasks.d.ts +0 -10
- package/dist/use-script-run-Diay7ibY.d.ts +0 -50
package/dist/ui/billing.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { g as Decimal, B as BalanceLedgerRow } from '../types-C2WXVcam.js';
|
|
3
|
-
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
|
|
5
|
-
declare function BillingPage(): react.JSX.Element;
|
|
6
|
-
|
|
7
|
-
interface RechargeDrawerProps {
|
|
8
|
-
open: boolean;
|
|
9
|
-
onClose: () => void;
|
|
10
|
-
}
|
|
11
|
-
declare function RechargeDrawer({ open, onClose }: RechargeDrawerProps): react.JSX.Element;
|
|
12
|
-
|
|
13
|
-
declare function RechargePage(): react.JSX.Element;
|
|
14
|
-
|
|
15
|
-
declare function RechargeMethods(): react.JSX.Element;
|
|
16
|
-
|
|
17
|
-
interface TopupDrawerProps {
|
|
18
|
-
open: boolean;
|
|
19
|
-
onClose: () => void;
|
|
20
|
-
/** 目标用户钱包 id(恒为 user,预填,不由抽屉内选择)。 */
|
|
21
|
-
ownerUserId: string;
|
|
22
|
-
/** 展示用名字/邮箱;缺省回退到 ownerUserId。 */
|
|
23
|
-
ownerLabel?: string;
|
|
24
|
-
/** 成功后回调,带新余额(供宿主刷新列表)。 */
|
|
25
|
-
onDone?: (newBalance: Decimal) => void;
|
|
26
|
-
}
|
|
27
|
-
declare function TopupDrawer({ open, onClose, ownerUserId, ownerLabel, onDone }: TopupDrawerProps): react.JSX.Element;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* 流水分类元数据:每种 BalanceLedgerRow.kind → lucide 图标 + i18n key + 借贷方向。
|
|
31
|
-
* 纯函数(无 React),便于单测。BillingPage 用它给每行配图标/着色。
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
interface LedgerKindMeta {
|
|
35
|
-
icon: LucideIcon;
|
|
36
|
-
/** i18n key, e.g. `billing.kind.topup`. */
|
|
37
|
-
i18nKey: string;
|
|
38
|
-
/** credit = 入账(余额增,绿);debit = 扣费(余额减,红/默认)。 */
|
|
39
|
-
sign: 'credit' | 'debit';
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* 返回该流水行的元数据。
|
|
43
|
-
* `adjust` 类型的借贷方向取决于金额符号:正数 → credit(入账),负数 → debit(扣费)。
|
|
44
|
-
* 其余四种类型固定方向,`amount` 参数被忽略。
|
|
45
|
-
*/
|
|
46
|
-
declare function ledgerKindMeta(kind: BalanceLedgerRow['kind'], amount?: number): LedgerKindMeta;
|
|
47
|
-
|
|
48
|
-
export { BillingPage, type LedgerKindMeta, RechargeDrawer, type RechargeDrawerProps, RechargeMethods, RechargePage, TopupDrawer, type TopupDrawerProps, ledgerKindMeta };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { a as ProvisionResult, P as ProvisionSpec, b as DiscoveredDevice } from '../types-C2WXVcam.js';
|
|
3
|
-
|
|
4
|
-
interface DeviceCreateProps {
|
|
5
|
-
open: boolean;
|
|
6
|
-
onClose: () => void;
|
|
7
|
-
/** Fired after a successful create (provision result, or null for real-device enroll). */
|
|
8
|
-
onCreated?: (result: ProvisionResult | null) => void;
|
|
9
|
-
}
|
|
10
|
-
declare function DeviceCreate({ open, onClose, onCreated }: DeviceCreateProps): react.JSX.Element;
|
|
11
|
-
|
|
12
|
-
type NodeCapability = 'redroid' | 'vphone' | 'any';
|
|
13
|
-
interface Props$4 {
|
|
14
|
-
value: string;
|
|
15
|
-
onChange: (nodeId: string) => void;
|
|
16
|
-
hidePlatform?: boolean;
|
|
17
|
-
}
|
|
18
|
-
declare function NodePicker({ value, onChange, hidePlatform }: Props$4): react.JSX.Element;
|
|
19
|
-
|
|
20
|
-
interface Props$3 {
|
|
21
|
-
spec: ProvisionSpec;
|
|
22
|
-
onChange: (spec: ProvisionSpec) => void;
|
|
23
|
-
/** 选中的节点 id —— 用于按节点已装镜像(Hello `installed_images`)标注版本选项
|
|
24
|
-
* 「节点已装 / 需下载」并把已装的排前。 */
|
|
25
|
-
nodeId?: string;
|
|
26
|
-
}
|
|
27
|
-
declare function VirtualSpecStep({ spec, onChange, nodeId }: Props$3): react.JSX.Element;
|
|
28
|
-
|
|
29
|
-
interface Props$2 {
|
|
30
|
-
spec: ProvisionSpec;
|
|
31
|
-
onChange: (spec: ProvisionSpec) => void;
|
|
32
|
-
isReal?: boolean;
|
|
33
|
-
required?: boolean;
|
|
34
|
-
}
|
|
35
|
-
declare function ProxySpoofStep({ spec, onChange, isReal }: Props$2): react.JSX.Element;
|
|
36
|
-
|
|
37
|
-
interface Props$1 {
|
|
38
|
-
nodeId: string;
|
|
39
|
-
picked: DiscoveredDevice | null;
|
|
40
|
-
onPick: (d: DiscoveredDevice) => void;
|
|
41
|
-
}
|
|
42
|
-
declare function RealDiscoverStep({ nodeId, picked, onPick }: Props$1): react.JSX.Element;
|
|
43
|
-
|
|
44
|
-
interface Props {
|
|
45
|
-
open: boolean;
|
|
46
|
-
onClose: () => void;
|
|
47
|
-
/** Pre-selected node (e.g. the create-device wizard's node). */
|
|
48
|
-
nodeId?: string;
|
|
49
|
-
/** Pre-selected platform. */
|
|
50
|
-
platform?: Platform;
|
|
51
|
-
}
|
|
52
|
-
type Platform = 'android' | 'ios';
|
|
53
|
-
declare function AddWirelessDeviceDialog({ open, onClose, nodeId: initialNode, platform: initialPlatform }: Props): react.JSX.Element;
|
|
54
|
-
|
|
55
|
-
export { AddWirelessDeviceDialog, DeviceCreate, type DeviceCreateProps, type NodeCapability, NodePicker, ProxySpoofStep, RealDiscoverStep, VirtualSpecStep };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
import { D as DeviceSize } from '../coords-LPR_MPyp.js';
|
|
4
|
-
|
|
5
|
-
interface DeviceMirrorProps {
|
|
6
|
-
/** 设备寻址 id(= 后端 external_id)。 */
|
|
7
|
-
deviceId: string | null;
|
|
8
|
-
deviceName?: string;
|
|
9
|
-
/** 决定底栏按键图标风格;android 额外有菜单(最近任务)键。默认 android。 */
|
|
10
|
-
platform?: 'android' | 'ios';
|
|
11
|
-
/** 可选快捷指令栏插槽,透传给内部的 MirrorSurface。 */
|
|
12
|
-
shortcutBar?: ReactNode;
|
|
13
|
-
onClose: () => void;
|
|
14
|
-
}
|
|
15
|
-
declare function DeviceMirror({ deviceId, deviceName, platform, shortcutBar, onClose }: DeviceMirrorProps): react.JSX.Element | null;
|
|
16
|
-
|
|
17
|
-
interface MirrorSurfaceProps {
|
|
18
|
-
deviceId: string;
|
|
19
|
-
/** 决定底栏按键图标风格;android 额外有菜单(最近任务)键。默认 android。 */
|
|
20
|
-
platform?: 'android' | 'ios';
|
|
21
|
-
/** 视频轨实际分辨率回调(外壳可用宽高比定容器尺寸)。 */
|
|
22
|
-
onSize?: (size: DeviceSize) => void;
|
|
23
|
-
/** 画面区按此宽高比精确定尺(避免 object-contain 的黑边留白)。不传则铺满容器。 */
|
|
24
|
-
videoAspect?: number;
|
|
25
|
-
/** 可选快捷指令栏插槽。SDK 默认不带快捷指令子系统;消费方按需注入。 */
|
|
26
|
-
shortcutBar?: ReactNode;
|
|
27
|
-
className?: string;
|
|
28
|
-
}
|
|
29
|
-
declare function MirrorSurface({ deviceId, platform, onSize, videoAspect, shortcutBar, className }: MirrorSurfaceProps): react.JSX.Element;
|
|
30
|
-
|
|
31
|
-
interface Props {
|
|
32
|
-
/** 出错信息(节点离线/连接失败);有则显示错误而非启动动画。 */
|
|
33
|
-
error?: string | null;
|
|
34
|
-
/** 预期连接总时长(ms),进度据此推进。默认 3s(暖路径首帧典型值)。 */
|
|
35
|
-
expectedMs?: number;
|
|
36
|
-
/** 设备平台,决定 logo 与文案(android 机器人 / ios 苹果)。默认 android。 */
|
|
37
|
-
platform?: 'android' | 'ios';
|
|
38
|
-
className?: string;
|
|
39
|
-
}
|
|
40
|
-
declare function DeviceBootSplash({ error, expectedMs, platform, className }: Props): react.JSX.Element;
|
|
41
|
-
|
|
42
|
-
export { DeviceBootSplash, DeviceMirror, type DeviceMirrorProps, MirrorSurface, type MirrorSurfaceProps };
|
package/dist/ui/devices.d.ts
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { T as TaskAgentRunner, D as Device, a as TaskAgentDevice } from '../task-agent-runner-eD9-SCJz.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-eD9-SCJz.js';
|
|
4
|
-
import { aL as Shortcut, h as ScriptParam } from '../types-C2WXVcam.js';
|
|
5
|
-
import '../device-normalize-BaThgnH7.js';
|
|
6
|
-
import '../config-Bm1hmXhD.js';
|
|
7
|
-
import '../agent-runner-V60B0is1.js';
|
|
8
|
-
|
|
9
|
-
interface DevicesPageProps {
|
|
10
|
-
/** Render the page header actions (Refresh + Add device) into a host slot.
|
|
11
|
-
* When omitted the page renders its own inline action row above the toolbar. */
|
|
12
|
-
renderHeaderActions?: (actions: React.ReactNode) => React.ReactNode;
|
|
13
|
-
/** Optional host transport for multi-device Claude/Codex tasks. */
|
|
14
|
-
taskAgentRunner?: TaskAgentRunner;
|
|
15
|
-
}
|
|
16
|
-
declare function DevicesPage({ taskAgentRunner: providedTaskAgentRunner }?: DevicesPageProps): react.JSX.Element;
|
|
17
|
-
|
|
18
|
-
interface DeviceCardProps {
|
|
19
|
-
device: Device;
|
|
20
|
-
isSelected: boolean;
|
|
21
|
-
onPreview: (id: string) => void;
|
|
22
|
-
onEdit?: (id: string) => void;
|
|
23
|
-
onDelete?: (id: string) => void;
|
|
24
|
-
powering?: boolean;
|
|
25
|
-
onPowerOn?: (id: string) => void;
|
|
26
|
-
checked?: boolean;
|
|
27
|
-
onCheck?: (id: string, checked: boolean) => void;
|
|
28
|
-
}
|
|
29
|
-
/** 紧凑截图卡片:顶部小尺寸截图缩略(单次抓取,非实时画面),
|
|
30
|
-
* 底部名称/平台/节点 + 备注/分组行;点图打开实时镜像,详情走外层卡片点击(drawer)。 */
|
|
31
|
-
declare function DeviceCard({ device, isSelected, onPreview, onEdit, onDelete, powering, onPowerOn, checked, onCheck, }: DeviceCardProps): react.JSX.Element;
|
|
32
|
-
|
|
33
|
-
interface Props$e {
|
|
34
|
-
deviceId: string | null;
|
|
35
|
-
onClose: () => void;
|
|
36
|
-
}
|
|
37
|
-
declare function DeviceDetailDrawer({ deviceId, onClose }: Props$e): react.JSX.Element;
|
|
38
|
-
|
|
39
|
-
interface Props$d {
|
|
40
|
-
/** null = 关闭。 */
|
|
41
|
-
deviceIds: string[] | null;
|
|
42
|
-
/** id → 显示名。 */
|
|
43
|
-
names?: Record<string, string>;
|
|
44
|
-
/** 底栏按键图标风格(全 iOS 选 ios,否则 android)。默认 android。 */
|
|
45
|
-
platform?: 'android' | 'ios';
|
|
46
|
-
onClose: () => void;
|
|
47
|
-
}
|
|
48
|
-
declare function GroupMirrorModal({ deviceIds, names, platform, onClose }: Props$d): react.JSX.Element | null;
|
|
49
|
-
|
|
50
|
-
interface DeviceRef$1 {
|
|
51
|
-
id: string;
|
|
52
|
-
name: string;
|
|
53
|
-
}
|
|
54
|
-
interface Props$c {
|
|
55
|
-
/** 勾选的设备;null = 关闭。 */
|
|
56
|
-
devices: DeviceRef$1[] | null;
|
|
57
|
-
onClose: () => void;
|
|
58
|
-
}
|
|
59
|
-
declare function RunScriptDialog({ devices, onClose }: Props$c): react.JSX.Element | null;
|
|
60
|
-
|
|
61
|
-
interface TaskAgentDialogProps {
|
|
62
|
-
/** Selected devices; null closes the dialog. */
|
|
63
|
-
devices: TaskAgentDevice[] | null;
|
|
64
|
-
/** Desktop/web host transport. The SDK never imports Tauri directly. */
|
|
65
|
-
runner?: TaskAgentRunner;
|
|
66
|
-
onClose: () => void;
|
|
67
|
-
}
|
|
68
|
-
declare function TaskAgentDialog({ devices, runner, onClose }: TaskAgentDialogProps): react.JSX.Element | null;
|
|
69
|
-
|
|
70
|
-
interface DeviceRef {
|
|
71
|
-
id: string;
|
|
72
|
-
name: string;
|
|
73
|
-
platform?: string | null;
|
|
74
|
-
}
|
|
75
|
-
interface Props$b {
|
|
76
|
-
/** 勾选的设备;null = 关闭。 */
|
|
77
|
-
devices: DeviceRef[] | null;
|
|
78
|
-
onClose: () => void;
|
|
79
|
-
}
|
|
80
|
-
declare function BulkInstallAppsDialog({ devices, onClose }: Props$b): react.JSX.Element | null;
|
|
81
|
-
|
|
82
|
-
interface Props$a {
|
|
83
|
-
/** Target device(s). 单台传 1 个;多选传多个。 */
|
|
84
|
-
deviceIds: string[];
|
|
85
|
-
platform?: 'android' | 'ios' | 'any';
|
|
86
|
-
/** 横向(默认,设备详情抽屉用)或竖向图标轨(紧贴镜像左侧、与画面等高)。 */
|
|
87
|
-
orientation?: 'horizontal' | 'vertical';
|
|
88
|
-
className?: string;
|
|
89
|
-
}
|
|
90
|
-
/** 统一封装的设备快捷栏:拉 system+user 快捷,点一下在选中设备上跑(有参数则弹框)。
|
|
91
|
-
* 用户自有快捷可就地编辑/删除;"+" 新建。横向铺开或竖向贴边图标轨两种布局。 */
|
|
92
|
-
declare function ShortcutBar({ deviceIds, platform, orientation, className }: Props$a): react.JSX.Element;
|
|
93
|
-
|
|
94
|
-
interface Props$9 {
|
|
95
|
-
shortcut: Shortcut;
|
|
96
|
-
/** Targets — length drives single vs batch. */
|
|
97
|
-
deviceIds: string[];
|
|
98
|
-
onClose: () => void;
|
|
99
|
-
onRun: (values: Record<string, unknown>) => void;
|
|
100
|
-
}
|
|
101
|
-
/** Collect a shortcut's parameters (and confirm) before running it on N devices. */
|
|
102
|
-
declare function ShortcutRunDialog({ shortcut, deviceIds, onClose, onRun }: Props$9): react.JSX.Element;
|
|
103
|
-
|
|
104
|
-
interface Props$8 {
|
|
105
|
-
/** 传入则为编辑;否则新建。仅 user 快捷可编辑。 */
|
|
106
|
-
initial?: Shortcut;
|
|
107
|
-
onClose: () => void;
|
|
108
|
-
onSaved?: (s: Shortcut) => void;
|
|
109
|
-
onDeleted?: () => void;
|
|
110
|
-
}
|
|
111
|
-
/** 创建/编辑用户自定义快捷(函数脚本 + 参数签名)。 */
|
|
112
|
-
declare function ShortcutEditDialog({ initial, onClose, onSaved, onDeleted }: Props$8): react.JSX.Element;
|
|
113
|
-
|
|
114
|
-
/** 回收站视图:列出软删除设备,可恢复 / 彻底删除 / 清空全部。 */
|
|
115
|
-
declare function RecycleBinPanel(): react.JSX.Element;
|
|
116
|
-
|
|
117
|
-
interface Props$7 {
|
|
118
|
-
/** 目标设备(null = 关闭)。 */
|
|
119
|
-
device: {
|
|
120
|
-
id: string;
|
|
121
|
-
name: string;
|
|
122
|
-
} | null;
|
|
123
|
-
onClose: () => void;
|
|
124
|
-
/** 删除成功后的回调(如关闭详情抽屉)。 */
|
|
125
|
-
onDeleted?: () => void;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* 删除设备二次确认:要求键入设备名(防误删),确认后软删进回收站。
|
|
129
|
-
* 用受控弹窗而非浏览器 confirm —— Tauri webview 下 `window.confirm` 常被吞。
|
|
130
|
-
*/
|
|
131
|
-
declare function DeleteDeviceDialog({ device, onClose, onDeleted }: Props$7): react.JSX.Element | null;
|
|
132
|
-
|
|
133
|
-
interface Props$6 {
|
|
134
|
-
device: Device | null;
|
|
135
|
-
onClose: () => void;
|
|
136
|
-
}
|
|
137
|
-
declare function DeviceEditDialog({ device, onClose }: Props$6): react.JSX.Element | null;
|
|
138
|
-
|
|
139
|
-
interface Props$5 {
|
|
140
|
-
deviceId: string;
|
|
141
|
-
}
|
|
142
|
-
declare function FileManager({ deviceId }: Props$5): react.JSX.Element;
|
|
143
|
-
|
|
144
|
-
interface Props$4 {
|
|
145
|
-
deviceId: string;
|
|
146
|
-
}
|
|
147
|
-
declare function FingerprintPanel({ deviceId }: Props$4): react.JSX.Element;
|
|
148
|
-
|
|
149
|
-
interface Props$3 {
|
|
150
|
-
deviceId: string;
|
|
151
|
-
}
|
|
152
|
-
declare function DeviceTerminal({ deviceId }: Props$3): react.JSX.Element;
|
|
153
|
-
|
|
154
|
-
interface DeviceConnectProps {
|
|
155
|
-
open: boolean;
|
|
156
|
-
onClose: () => void;
|
|
157
|
-
}
|
|
158
|
-
declare function DeviceConnect({ open, onClose }: DeviceConnectProps): react.JSX.Element;
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* 运行设备下拉:列出全部设备(在线优先),选中即同步到共享 devices view 的
|
|
162
|
-
* `selectDevice`,保证镜像等读全局选中设备的链路一致。
|
|
163
|
-
*/
|
|
164
|
-
declare function DeviceSelector({ disabled }: {
|
|
165
|
-
disabled?: boolean;
|
|
166
|
-
}): react.JSX.Element;
|
|
167
|
-
|
|
168
|
-
interface TagEditorProps {
|
|
169
|
-
tags: string[];
|
|
170
|
-
onChange: (next: string[]) => void;
|
|
171
|
-
}
|
|
172
|
-
/** Inline editor for a device's group tags: chips with a remove (×) plus an
|
|
173
|
-
* input that appends a tag on Enter. Emits the full next-tag list. */
|
|
174
|
-
declare function TagEditor({ tags, onChange }: TagEditorProps): react.JSX.Element;
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* 「刷新设备参数」按钮 + popover。刷新 = 重滚设备指纹(regenerateProfile)。虚拟机
|
|
178
|
-
* (provisioned)额外提供「还原设备」可选勾:勾上则在重滚后恢复出厂(reset,清 /data、
|
|
179
|
-
* 原镜像重建)。真机无还原选项——保存即经 LSPosed 实时推送。
|
|
180
|
-
*/
|
|
181
|
-
declare function RefreshParamsButton({ deviceId, provisioned, onDone, size, variant, }: {
|
|
182
|
-
deviceId: string;
|
|
183
|
-
provisioned: boolean;
|
|
184
|
-
onDone?: () => void;
|
|
185
|
-
size?: 'sm' | 'md' | 'icon';
|
|
186
|
-
variant?: 'primary' | 'secondary' | 'ghost';
|
|
187
|
-
}): react.JSX.Element;
|
|
188
|
-
|
|
189
|
-
interface Props$2 {
|
|
190
|
-
/** 当前参数值映射(key → 字符串值)。 */
|
|
191
|
-
params: Record<string, string>;
|
|
192
|
-
/** 单个键变更回调。 */
|
|
193
|
-
onChange: (key: string, value: string) => void;
|
|
194
|
-
/** 无参数时的提示文案。 */
|
|
195
|
-
emptyHint?: string;
|
|
196
|
-
className?: string;
|
|
197
|
-
}
|
|
198
|
-
/** flow.variables → 参数输入。键列只读(脚本定义),值列可编辑。 */
|
|
199
|
-
declare function ScriptParamForm({ params, onChange, emptyHint, className }: Props$2): react.JSX.Element;
|
|
200
|
-
/** 把任意 `variables`(值可能非字符串)归一成参数表单用的字符串映射。 */
|
|
201
|
-
declare function variablesToParams(variables: Record<string, unknown> | undefined): Record<string, string>;
|
|
202
|
-
|
|
203
|
-
interface Props$1 {
|
|
204
|
-
/** 非目标参数(已剔除 isTarget)。 */
|
|
205
|
-
params: ScriptParam[];
|
|
206
|
-
/** 单值映射(随机关闭时的值,或随机开启时的多行候选文本)。 */
|
|
207
|
-
values: Record<string, string>;
|
|
208
|
-
/** 哪些字段处于「随机取值」模式。 */
|
|
209
|
-
randomOn: Record<string, boolean>;
|
|
210
|
-
onValue: (key: string, value: string) => void;
|
|
211
|
-
onToggleRandom: (key: string, on: boolean) => void;
|
|
212
|
-
}
|
|
213
|
-
declare function SharedParamsForm({ params, values, randomOn, onValue, onToggleRandom }: Props$1): react.JSX.Element;
|
|
214
|
-
/** 按 schema 对一行随机字段做解析:随机字段从多行候选里取一条,其余取单值。 */
|
|
215
|
-
declare function resolveSharedRow(params: ScriptParam[], values: Record<string, string>, randomOn: Record<string, boolean>): Record<string, string>;
|
|
216
|
-
|
|
217
|
-
interface Props {
|
|
218
|
-
open: boolean;
|
|
219
|
-
onClose: () => void;
|
|
220
|
-
}
|
|
221
|
-
declare function NodeRegister({ open, onClose }: Props): react.JSX.Element;
|
|
222
|
-
|
|
223
|
-
export { BulkInstallAppsDialog, DeleteDeviceDialog, DeviceCard, DeviceConnect, DeviceDetailDrawer, DeviceEditDialog, DeviceSelector, DeviceTerminal, DevicesPage, FileManager, FingerprintPanel, GroupMirrorModal, NodeRegister, RecycleBinPanel, RefreshParamsButton, RunScriptDialog, ScriptParamForm, SharedParamsForm, ShortcutBar, ShortcutEditDialog, ShortcutRunDialog, TagEditor, TaskAgentDevice, TaskAgentDialog, TaskAgentRunner, resolveSharedRow, variablesToParams };
|
package/dist/ui/editor.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { S as ScriptStudioProps } from '../ScriptStudio-DaCqOF5H.js';
|
|
3
|
-
export { a as ScriptStudioSlotContext } from '../ScriptStudio-DaCqOF5H.js';
|
|
4
|
-
import { a as AgentRunner } from '../agent-runner-V60B0is1.js';
|
|
5
|
-
export { A as AgentKind, b as AgentSendRequest, c as AgentStreamEvent } from '../agent-runner-V60B0is1.js';
|
|
6
|
-
import { c as AixClient } from '../config-Bm1hmXhD.js';
|
|
7
|
-
import '../types-C2WXVcam.js';
|
|
8
|
-
|
|
9
|
-
interface ScriptEditorPageProps {
|
|
10
|
-
/** Route param: the script to open. Undefined ⇒ a fresh "New Script". */
|
|
11
|
-
scriptId?: string;
|
|
12
|
-
/** Host-injected local-agent transport — drives the built-in `AgentPanel`. */
|
|
13
|
-
agentRunner?: AgentRunner;
|
|
14
|
-
/** Fully override the right-column agent panel (takes precedence over `agentRunner`). */
|
|
15
|
-
renderAgentPanel?: ScriptStudioProps['renderAgentPanel'];
|
|
16
|
-
/** Host-injected device inspector (modal/overlay). */
|
|
17
|
-
renderInspector?: ScriptStudioProps['renderInspector'];
|
|
18
|
-
/** Extra header controls (e.g. a language toggle) — host chrome. */
|
|
19
|
-
headerExtra?: ScriptStudioProps['headerExtra'];
|
|
20
|
-
}
|
|
21
|
-
declare function ScriptEditorPage({ scriptId, agentRunner, renderAgentPanel, renderInspector, headerExtra, }: ScriptEditorPageProps): react.JSX.Element;
|
|
22
|
-
|
|
23
|
-
interface AgentPanelProps {
|
|
24
|
-
scriptId?: string;
|
|
25
|
-
deviceId: string | null;
|
|
26
|
-
/** Current editor source — handed to the agent each turn. */
|
|
27
|
-
code: string;
|
|
28
|
-
/** Replace the editor source with the agent's edited `script.ts`. */
|
|
29
|
-
onReplace: (code: string) => void;
|
|
30
|
-
/** Open the visual device inspector (element picker → inserts a locator). */
|
|
31
|
-
onOpenInspector: () => void;
|
|
32
|
-
/** Append a snippet to the editor source (e.g. a `device.launchApp(...)` line). */
|
|
33
|
-
onInsert: (snippet: string) => void;
|
|
34
|
-
/** Host-injected agent transport (Tauri-backed on desktop). */
|
|
35
|
-
runner: AgentRunner;
|
|
36
|
-
}
|
|
37
|
-
declare function AgentPanel({ scriptId, deviceId, code, onReplace, onOpenInspector, onInsert, runner, }: AgentPanelProps): react.JSX.Element;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 服务端 agent 的 `AgentRunner` 实现:claude/codex CLI 跑在**后端**(密钥/算力在后端),
|
|
41
|
-
* 前端经 HTTP 起停 + SSE 流式回传。与本机 Tauri 实现(`frontend/src/lib/agentRunner.ts`)
|
|
42
|
-
* 并列;`AgentPanel` 不感知差异。
|
|
43
|
-
*
|
|
44
|
-
* 复用 `AixClient` 的 baseUrl / 鉴权(user JWT)/ fetchFn —— 做成闭包工厂,调用方只需:
|
|
45
|
-
* const runner = createBackendAgentRunner(client)
|
|
46
|
-
* <ScriptEditorPage agentRunner={isTauri() ? tauriAgentRunner : runner} />
|
|
47
|
-
*
|
|
48
|
-
* 后端端点契约(待后端落地):
|
|
49
|
-
* POST {basePath}/start body=AgentSendRequest 首轮:起会话并跑
|
|
50
|
-
* POST {basePath}/send body=AgentSendRequest 续轮
|
|
51
|
-
* POST {basePath}/stop body={ scriptId } 停止
|
|
52
|
-
* GET {basePath}/defaults → { agent? }(可选)
|
|
53
|
-
* GET {basePath}/stream (text/event-stream) SSE:每帧 data: <AgentStreamEvent JSON>
|
|
54
|
-
* 事件 JSON 字段:script_id|scriptId / stream('stdout'|'stderr'|'done') / chunk? / script?
|
|
55
|
-
* 鉴权全部复用 client 的 user JWT(fetchFn + auth.headers 注入)。
|
|
56
|
-
*/
|
|
57
|
-
|
|
58
|
-
interface BackendAgentRunnerOptions {
|
|
59
|
-
/** Agent 端点前缀,默认 `/api/agent`。 */
|
|
60
|
-
basePath?: string;
|
|
61
|
-
}
|
|
62
|
-
declare function createBackendAgentRunner(client: AixClient, opts?: BackendAgentRunnerOptions): AgentRunner;
|
|
63
|
-
|
|
64
|
-
export { AgentPanel, type AgentPanelProps, AgentRunner, type BackendAgentRunnerOptions, ScriptEditorPage, type ScriptEditorPageProps, createBackendAgentRunner };
|
package/dist/ui/index.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import react__default from 'react';
|
|
3
|
-
import { S as ScriptEvent, a as ScriptEngine } from '../script-debugger-Cw5jVRoz.js';
|
|
4
|
-
import * as _uiw_react_codemirror from '@uiw/react-codemirror';
|
|
5
|
-
export { ControlBar, ControlBarProps, MirrorView, MirrorViewProps } from './mirror.js';
|
|
6
|
-
import { E as EnvOs, d as EnvRoute, e as EnvEventKind } from '../config-Bm1hmXhD.js';
|
|
7
|
-
import { N as NodeRow } from '../types-C2WXVcam.js';
|
|
8
|
-
import '../coords-LPR_MPyp.js';
|
|
9
|
-
import '../mirror-session-C_1vFkRV.js';
|
|
10
|
-
|
|
11
|
-
interface DebugConsoleProps {
|
|
12
|
-
events: ScriptEvent[];
|
|
13
|
-
/** Invoke an exported method on the running script (rpc panel). */
|
|
14
|
-
onCall?: (method: string, args: unknown) => void;
|
|
15
|
-
/** Clear the accumulated events. */
|
|
16
|
-
onClear?: () => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
declare function DebugConsole({ events, onCall, onClear, className }: DebugConsoleProps): react__default.JSX.Element;
|
|
20
|
-
|
|
21
|
-
interface ScriptEditorProps {
|
|
22
|
-
value: string;
|
|
23
|
-
onChange: (value: string) => void;
|
|
24
|
-
engine: ScriptEngine;
|
|
25
|
-
onEngineChange: (engine: ScriptEngine) => void;
|
|
26
|
-
running: boolean;
|
|
27
|
-
onRun: () => void;
|
|
28
|
-
onCancel: () => void;
|
|
29
|
-
/** Engines offered in the selector. Default: both. */
|
|
30
|
-
engines?: ScriptEngine[];
|
|
31
|
-
className?: string;
|
|
32
|
-
}
|
|
33
|
-
declare function ScriptEditor(props: ScriptEditorProps): react__default.JSX.Element;
|
|
34
|
-
|
|
35
|
-
interface ScriptPanelProps {
|
|
36
|
-
deviceId: string;
|
|
37
|
-
defaultEngine?: 'frida' | 'scriptlet';
|
|
38
|
-
defaultScript?: string;
|
|
39
|
-
className?: string;
|
|
40
|
-
}
|
|
41
|
-
/** Ready-to-use scriptlet/frida debugging surface: editor + run/cancel + live
|
|
42
|
-
* event console + rpc call panel, all driven by `useScript`. */
|
|
43
|
-
declare function ScriptPanel({ deviceId, defaultEngine, defaultScript, className }: ScriptPanelProps): react__default.JSX.Element;
|
|
44
|
-
|
|
45
|
-
/** All semantic CSS variables consumed by `@aixnn/aixautots/ui` components. The flat
|
|
46
|
-
* `--aix-*` naming (no sub-namespace) is the intentional convention for this package. */
|
|
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
|
-
/** A CodeMirror theme extension that draws from the `--aix-editor-*` variables
|
|
49
|
-
* (with sensible dark-mode fallbacks), so the editor reskins with the rest. */
|
|
50
|
-
declare function aixCodeMirrorTheme(): _uiw_react_codemirror.Extension;
|
|
51
|
-
|
|
52
|
-
interface EnvInitDialogProps {
|
|
53
|
-
open: boolean;
|
|
54
|
-
onClose: () => void;
|
|
55
|
-
/** The bound local node id to initialize. */
|
|
56
|
-
nodeId: string;
|
|
57
|
-
/** Host OS — selects mac-env vs win-env on the daemon. */
|
|
58
|
-
os: EnvOs;
|
|
59
|
-
/** win-only route; ignored for mac. Defaults to server-side 'wsl2'. */
|
|
60
|
-
route?: EnvRoute;
|
|
61
|
-
/** 'prompt' (default): require a click to start. 'auto': start on open. */
|
|
62
|
-
mode?: 'prompt' | 'auto';
|
|
63
|
-
/** Status-probe events to seed the step list before setup starts (from
|
|
64
|
-
* `useEnvGate`), so the dialog shows what's missing without re-probing. */
|
|
65
|
-
seedEvents?: EnvEventKind[];
|
|
66
|
-
/** Fired once when setup finishes successfully. */
|
|
67
|
-
onReady?: () => void;
|
|
68
|
-
/** Host-side resolver for the WSL2-missing blocker (Windows): run an elevated
|
|
69
|
-
* `wsl --install` + reboot, then auto-resume. When provided and setup fails
|
|
70
|
-
* with `WSL_UNAVAILABLE`, the dialog shows an "install WSL2 & reboot" action
|
|
71
|
-
* instead of a plain retry. The daemon can't self-elevate/reboot, so the
|
|
72
|
-
* desktop wires this to Tauri commands. */
|
|
73
|
-
onInstallWsl?: () => void | Promise<void>;
|
|
74
|
-
title?: string;
|
|
75
|
-
}
|
|
76
|
-
/** Self-driving env-base initialization dialog. Requires an `<AixProvider>`
|
|
77
|
-
* ancestor (it streams via `useEnvRun`). */
|
|
78
|
-
declare function EnvInitDialog(props: EnvInitDialogProps): react__default.ReactElement | null;
|
|
79
|
-
|
|
80
|
-
type VmState = 'available' | 'needs-init' | 'needs-image' | 'unavailable';
|
|
81
|
-
interface VmItem {
|
|
82
|
-
key: 'android' | 'ios' | 'ios-real' | 'android-real';
|
|
83
|
-
label: string;
|
|
84
|
-
state: VmState;
|
|
85
|
-
/** Why it's unavailable / what init installs (shown under the row). */
|
|
86
|
-
reason?: string;
|
|
87
|
-
}
|
|
88
|
-
/** Per-capability plan for a node: what it can run, what needs a one-time base
|
|
89
|
-
* install, and what this host can't do (with the reason). Only `needs-init`
|
|
90
|
-
* rows expose an "初始化" action; `needs-image` rows expose "下载镜像". */
|
|
91
|
-
declare function vmPlan(node: NodeRow): VmItem[];
|
|
92
|
-
interface NodeCapabilityPanelProps {
|
|
93
|
-
node: NodeRow;
|
|
94
|
-
/** Tauri host? enables the WSL2 elevated-install resolver in the dialog. */
|
|
95
|
-
isTauri?: boolean;
|
|
96
|
-
/** Known local host OS, only when node.id matches the host process. */
|
|
97
|
-
localEnvOs?: EnvOs | null;
|
|
98
|
-
/** Host-side WSL2 install resolver (Windows desktop). */
|
|
99
|
-
onInstallWsl?: () => void | Promise<void>;
|
|
100
|
-
}
|
|
101
|
-
/** 「虚拟机与设备能力」面板:四平台能力行 + 初始化/下载镜像 + 流式进度。 */
|
|
102
|
-
declare function NodeCapabilityPanel({ node: reportedNode, isTauri, onInstallWsl, localEnvOs }: NodeCapabilityPanelProps): react.JSX.Element;
|
|
103
|
-
|
|
104
|
-
export { AIX_CSS_VARS, DebugConsole, type DebugConsoleProps, EnvInitDialog, type EnvInitDialogProps, NodeCapabilityPanel, type NodeCapabilityPanelProps, ScriptEditor, type ScriptEditorProps, ScriptPanel, type ScriptPanelProps, aixCodeMirrorTheme, vmPlan };
|
package/dist/ui/inspector.d.ts
DELETED
package/dist/ui/market.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
|
|
3
|
-
interface MarketPageProps {
|
|
4
|
-
/** Render header content (title/count) into a host slot. Optional — the page
|
|
5
|
-
* itself renders no header chrome (the host shell provides it). */
|
|
6
|
-
renderHeader?: (count: number) => React.ReactNode;
|
|
7
|
-
}
|
|
8
|
-
declare function MarketPage(_props?: MarketPageProps): react.JSX.Element;
|
|
9
|
-
|
|
10
|
-
export { MarketPage, type MarketPageProps };
|
package/dist/ui/mirror.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import react__default from 'react';
|
|
2
|
-
import { D as DeviceSize } from '../coords-LPR_MPyp.js';
|
|
3
|
-
import { C as ControlMessage } from '../mirror-session-C_1vFkRV.js';
|
|
4
|
-
import '../config-Bm1hmXhD.js';
|
|
5
|
-
import '../types-C2WXVcam.js';
|
|
6
|
-
|
|
7
|
-
interface MirrorViewProps {
|
|
8
|
-
stream: MediaStream | null;
|
|
9
|
-
deviceSize: DeviceSize;
|
|
10
|
-
onInput?: (msg: ControlMessage) => void;
|
|
11
|
-
/** Capture keyboard when the view is focused (default true). */
|
|
12
|
-
keyboard?: boolean;
|
|
13
|
-
/** Auto-focus on mount so keys flow without a click (default true). */
|
|
14
|
-
autoFocus?: boolean;
|
|
15
|
-
/** Fired once when the first real video frame has decoded (picture available),
|
|
16
|
-
* so callers can dismiss a loading splash only when there is actual data.
|
|
17
|
-
* Carries the **authoritative** decoded resolution (videoWidth/videoHeight) —
|
|
18
|
-
* use this for aspect/coords rather than the track's premature getSettings(). */
|
|
19
|
-
onFirstFrame?: (size: DeviceSize) => void;
|
|
20
|
-
/** Fired whenever the decoded resolution changes on the same stream (e.g. the
|
|
21
|
-
* device rotated portrait↔landscape). Lets callers re-fit the aspect/coords. */
|
|
22
|
-
onResize?: (size: DeviceSize) => void;
|
|
23
|
-
/** Stream real-time down/move/up events instead of the two-point tap/swipe
|
|
24
|
-
* classification (default false — keeps existing behavior for platforms
|
|
25
|
-
* without a continuous-injection backend, e.g. iOS). Android mirror turns
|
|
26
|
-
* this on so drags/scrolls follow the actual pointer path. */
|
|
27
|
-
continuousTouch?: boolean;
|
|
28
|
-
className?: string;
|
|
29
|
-
}
|
|
30
|
-
/** Live device video that turns mouse + keyboard into `ControlMessage`s.
|
|
31
|
-
* Two input modes:
|
|
32
|
-
* - default: pointer down→up becomes a tap (small move) or swipe (drag) —
|
|
33
|
-
* a single two-point message sent on release.
|
|
34
|
-
* - `continuousTouch`: pointerdown/move/up stream `touch_down`/`touch_move`/
|
|
35
|
-
* `touch_up` in real time, so drags follow the actual pointer path.
|
|
36
|
-
* keydown becomes a `key` (special keys) or `text` (printable) message. */
|
|
37
|
-
declare function MirrorView({ stream, deviceSize, onInput, keyboard, autoFocus, onFirstFrame, onResize, continuousTouch, className, }: MirrorViewProps): react__default.JSX.Element;
|
|
38
|
-
|
|
39
|
-
interface ControlBarProps {
|
|
40
|
-
/** Picks the nav-key icon set; Android additionally gets a Menu (recents)
|
|
41
|
-
* key when `onMenu` is wired (default 'android'). */
|
|
42
|
-
platform?: 'android' | 'ios';
|
|
43
|
-
onHome?: () => void;
|
|
44
|
-
onBack?: () => void;
|
|
45
|
-
/** Android-only third nav key (recents/menu). Ignored on iOS. */
|
|
46
|
-
onMenu?: () => void;
|
|
47
|
-
onScreenshot?: () => void;
|
|
48
|
-
className?: string;
|
|
49
|
-
}
|
|
50
|
-
declare function ControlBar({ platform, onHome, onBack, onMenu, onScreenshot, className }: ControlBarProps): react__default.JSX.Element;
|
|
51
|
-
|
|
52
|
-
export { ControlBar, type ControlBarProps, MirrorView, type MirrorViewProps };
|