@aixnn/aixautots 0.6.5 → 0.6.7
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/dist/{chunk-YWA47ARA.js → chunk-573FOGYE.js} +86 -33
- package/dist/{chunk-LWTL4AIC.js → chunk-C7RG4MXM.js} +8 -4
- package/dist/{chunk-7CN37G3W.js → chunk-EJWJQI5Y.js} +2 -2
- package/dist/{chunk-7H4CYM42.js → chunk-EP3ZSPST.js} +53 -12
- package/dist/{chunk-LMSN6Z3N.js → chunk-KEB4MQEF.js} +214 -8
- package/dist/{chunk-FBWJUW4X.js → chunk-NVFMGPUG.js} +3 -3
- package/dist/{chunk-F76N3GOA.js → chunk-QNDM2SKW.js} +8 -4
- package/dist/{chunk-X5KVYWUK.js → chunk-R6MITP4L.js} +2 -2
- package/dist/{chunk-IFARWPMU.js → chunk-WUT5OUBG.js} +54 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/device-session-XTNY2RSP.js +1 -0
- package/dist/i18n/index.js +1 -1
- package/dist/{mirror-session-DK0OQvA3.d.ts → mirror-session-CDPlWFuU.d.ts} +3 -2
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +3 -3
- package/dist/ui/billing.js +4 -4
- package/dist/ui/device-create.js +6 -6
- package/dist/ui/device-mirror.js +5 -5
- package/dist/ui/devices.js +8 -8
- package/dist/ui/editor.js +5 -5
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +5 -5
- package/dist/ui/inspector.js +4 -4
- package/dist/ui/market.js +4 -4
- package/dist/ui/mirror.d.ts +1 -1
- package/dist/ui/script-studio.js +4 -4
- package/dist/ui/scripts.js +4 -4
- package/dist/ui/tasks.js +8 -8
- package/package.json +1 -1
- package/dist/device-session-OFGN4KUD.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { MirrorView, ControlBar } from './chunk-E7WMHM63.js';
|
|
2
|
-
import { useAixT } from './chunk-
|
|
2
|
+
import { useAixT } from './chunk-WUT5OUBG.js';
|
|
3
3
|
import { Popover, Button } from './chunk-SKTL6ACT.js';
|
|
4
|
-
import { useMirror, useClient
|
|
5
|
-
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
6
|
-
import { Check, Settings2, VolumeX, Volume2, RotateCw, Minimize2, Maximize2,
|
|
4
|
+
import { useDevices, useMirror, useClient } from './chunk-C7RG4MXM.js';
|
|
5
|
+
import { useState, useRef, useEffect, useId, useCallback, useMemo } from 'react';
|
|
6
|
+
import { X, PanelsTopLeft, Check, Settings2, VolumeX, Volume2, RotateCw, Minimize2, Maximize2, Rocket, Loader2, Square, Video, Download } from 'lucide-react';
|
|
7
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
var button = "flex w-full items-center justify-center gap-2 rounded-md border border-border px-2 py-2 text-xs hover:bg-secondary disabled:opacity-40";
|
|
@@ -743,11 +743,44 @@ var AUTO_QUALITY_INTERVAL_MS = 8e3;
|
|
|
743
743
|
var AUTO_QUALITY_MIN_SWITCH_INTERVAL_MS = 15e3;
|
|
744
744
|
function MirrorSurface(props) {
|
|
745
745
|
if (props.platform === "ios") return /* @__PURE__ */ jsx(IosMediaSurface, { ...props }, props.deviceId);
|
|
746
|
-
return /* @__PURE__ */ jsx(
|
|
746
|
+
return /* @__PURE__ */ jsx(AndroidMirrorSurface, { ...props }, props.deviceId);
|
|
747
|
+
}
|
|
748
|
+
function AndroidMirrorSurface(props) {
|
|
749
|
+
const { data: devices, loading, error, refetch } = useDevices();
|
|
750
|
+
const device = Array.isArray(devices) ? devices.find((row) => row.external_id === props.deviceId || row.id === props.deviceId) : void 0;
|
|
751
|
+
const provision = device?.meta?.provisioning_operation;
|
|
752
|
+
const hasOperation = device?.meta?.provisioning_operation !== void 0;
|
|
753
|
+
const notProvisioned = hasOperation ? provision?.status !== "ready" || device?.meta?.provisioned !== true : device?.meta?.provision_intent !== void 0 && device?.meta?.provisioned !== true;
|
|
754
|
+
useEffect(() => {
|
|
755
|
+
if (!notProvisioned || loading) return;
|
|
756
|
+
const timer = setTimeout(() => {
|
|
757
|
+
void refetch();
|
|
758
|
+
}, 5e3);
|
|
759
|
+
return () => clearTimeout(timer);
|
|
760
|
+
}, [notProvisioned, loading, refetch]);
|
|
761
|
+
if (loading && devices === null || error && devices === null || notProvisioned) {
|
|
762
|
+
return /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-col items-center justify-center gap-3 rounded-lg bg-black/80 p-6 text-center text-white ${props.className ?? ""}`, role: "status", children: [
|
|
763
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: error ? "\u65E0\u6CD5\u6838\u5BF9\u8BBE\u5907\u72B6\u6001" : notProvisioned ? provision?.status === "pending" ? "\u8BBE\u5907\u6B63\u5728\u521B\u5EFA" : "\u8BBE\u5907\u521B\u5EFA\u672A\u5B8C\u6210" : "\u6B63\u5728\u6838\u5BF9\u8BBE\u5907\u72B6\u6001\u2026" }),
|
|
764
|
+
notProvisioned && /* @__PURE__ */ jsx("p", { className: "max-w-sm text-xs text-white/70", children: provision?.error || (provision?.status === "pending" ? "\u521B\u5EFA\u5B8C\u6210\u540E\u5C06\u81EA\u52A8\u8FDE\u63A5\u753B\u9762\u3002" : "\u521B\u5EFA\u7ED3\u679C\u5C1A\u672A\u786E\u8BA4\uFF0C\u8BF7\u6838\u5BF9\u539F\u521B\u5EFA\u4EFB\u52A1\uFF1B\u5F53\u524D\u6CA1\u6709\u53EF\u8FDE\u63A5\u7684\u8BBE\u5907\u753B\u9762\u3002") }),
|
|
765
|
+
error && /* @__PURE__ */ jsx("p", { className: "text-xs text-white/70", children: "\u8BF7\u5237\u65B0\u72B6\u6001\u540E\u91CD\u8BD5\u3002" }),
|
|
766
|
+
(error || notProvisioned) && /* @__PURE__ */ jsx("button", { type: "button", disabled: loading, onClick: () => {
|
|
767
|
+
void refetch();
|
|
768
|
+
}, className: "min-h-11 rounded-md border border-white/30 px-3 text-xs focus-visible:outline focus-visible:outline-2 focus-visible:outline-white disabled:opacity-50", children: loading ? "\u5237\u65B0\u4E2D\u2026" : "\u5237\u65B0\u72B6\u6001" })
|
|
769
|
+
] });
|
|
770
|
+
}
|
|
771
|
+
return /* @__PURE__ */ jsx(WebRtcMirrorSurface, { ...props }, props.deviceId);
|
|
747
772
|
}
|
|
748
773
|
function WebRtcMirrorSurface({ deviceId, platform = "android", onSize, videoAspect, shortcutBar, className }) {
|
|
749
774
|
const { stream, error, sendInput, setQuality, session } = useMirror(deviceId);
|
|
750
775
|
const [pasteContent, setPasteContent] = useState("");
|
|
776
|
+
const [panelOpen, setPanelOpen] = useState(false);
|
|
777
|
+
const [panelMounted, setPanelMounted] = useState(false);
|
|
778
|
+
const panelId = useId();
|
|
779
|
+
const panelButton = useRef(null);
|
|
780
|
+
const closePanel = () => {
|
|
781
|
+
setPanelOpen(false);
|
|
782
|
+
panelButton.current?.focus();
|
|
783
|
+
};
|
|
751
784
|
const { error: clipboardError, conflict: clipboardConflict, resolveConflict } = useClipboardSync(deviceId, !!stream);
|
|
752
785
|
const [size, setSize] = useState(DEFAULT_SIZE);
|
|
753
786
|
const [hasFrame, setHasFrame] = useState(false);
|
|
@@ -849,36 +882,15 @@ function WebRtcMirrorSurface({ deviceId, platform = "android", onSize, videoAspe
|
|
|
849
882
|
[reportSize]
|
|
850
883
|
);
|
|
851
884
|
return /* @__PURE__ */ jsxs("div", { className: `flex min-h-0 flex-col items-center gap-2 ${className ?? ""}`, children: [
|
|
852
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
853
|
-
/* @__PURE__ */ jsxs("aside", { "aria-label": "\u955C\u50CF\u547D\u4EE4\u680F", className: "flex w-40 shrink-0 flex-col gap-3 overflow-y-auto rounded-lg border border-border bg-background p-2 text-foreground", children: [
|
|
854
|
-
/* @__PURE__ */ jsx(MirrorActions, { deviceId, stream, ready: hasFrame, platform }),
|
|
855
|
-
shortcutBar,
|
|
856
|
-
/* @__PURE__ */ jsxs("form", { className: "flex flex-col gap-2", onSubmit: (e) => {
|
|
857
|
-
e.preventDefault();
|
|
858
|
-
if (stream && pasteContent.trim()) sendInput({ t: "text", value: pasteContent });
|
|
859
|
-
}, children: [
|
|
860
|
-
/* @__PURE__ */ jsxs("label", { className: "text-xs font-medium", children: [
|
|
861
|
-
"\u547D\u4EE4 / \u7C98\u8D34\u5185\u5BB9",
|
|
862
|
-
/* @__PURE__ */ jsx(
|
|
863
|
-
"textarea",
|
|
864
|
-
{
|
|
865
|
-
"aria-label": "\u547D\u4EE4 / \u7C98\u8D34\u5185\u5BB9",
|
|
866
|
-
value: pasteContent,
|
|
867
|
-
onChange: (e) => setPasteContent(e.target.value),
|
|
868
|
-
placeholder: "\u8F93\u5165\u6216\u7C98\u8D34\u5185\u5BB9",
|
|
869
|
-
rows: 5,
|
|
870
|
-
className: "mt-2 w-full resize-y rounded border border-border bg-secondary p-2 text-xs"
|
|
871
|
-
}
|
|
872
|
-
)
|
|
873
|
-
] }),
|
|
874
|
-
/* @__PURE__ */ jsx("button", { type: "submit", disabled: !stream || !pasteContent.trim(), className: "rounded bg-primary px-2 py-2 text-xs text-primary-foreground disabled:opacity-40", children: "\u7C98\u8D34\u5230\u8BBE\u5907" })
|
|
875
|
-
] })
|
|
876
|
-
] }),
|
|
885
|
+
/* @__PURE__ */ jsxs("div", { className: `flex min-h-0 max-w-[96vw] flex-1 items-stretch justify-center gap-2 ${videoAspect ? "w-max" : "w-full"}`, children: [
|
|
877
886
|
/* @__PURE__ */ jsxs(
|
|
878
887
|
"div",
|
|
879
888
|
{
|
|
880
|
-
className: `relative min-h-0 overflow-hidden rounded-lg ${videoAspect ? "h-full" : "h-full flex-1"}`,
|
|
881
|
-
style: videoAspect ? {
|
|
889
|
+
className: `relative min-h-0 overflow-hidden rounded-lg ${videoAspect ? "h-full shrink-0" : "h-full flex-1"}`,
|
|
890
|
+
style: videoAspect ? {
|
|
891
|
+
aspectRatio: String(videoAspect),
|
|
892
|
+
maxHeight: `calc((96vw - ${panelOpen ? "min(16rem, 45vw) - 0.5rem" : "0px"}) / ${videoAspect})`
|
|
893
|
+
} : void 0,
|
|
882
894
|
children: [
|
|
883
895
|
stream && /* @__PURE__ */ jsx(
|
|
884
896
|
MirrorView,
|
|
@@ -903,9 +915,50 @@ function WebRtcMirrorSurface({ deviceId, platform = "android", onSize, videoAspe
|
|
|
903
915
|
) })
|
|
904
916
|
]
|
|
905
917
|
}
|
|
906
|
-
)
|
|
918
|
+
),
|
|
919
|
+
panelMounted && /* @__PURE__ */ jsxs("aside", { id: panelId, hidden: !panelOpen, "aria-label": "AI \u63A7\u5236\u9762\u677F", className: `${panelOpen ? "flex" : "hidden"} w-64 max-w-[45vw] shrink-0 flex-col gap-3 overflow-y-auto rounded-lg border border-border bg-background p-3 text-foreground`, onKeyDown: (event) => {
|
|
920
|
+
if (event.key === "Escape") {
|
|
921
|
+
event.preventDefault();
|
|
922
|
+
event.stopPropagation();
|
|
923
|
+
closePanel();
|
|
924
|
+
}
|
|
925
|
+
}, children: [
|
|
926
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-2", children: [
|
|
927
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "AI \u63A7\u5236" }),
|
|
928
|
+
/* @__PURE__ */ jsx("button", { type: "button", "aria-label": "\u6536\u8D77 AI \u63A7\u5236\u9762\u677F", onClick: closePanel, className: "flex h-11 w-11 items-center justify-center rounded-md hover:bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary", children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true", className: "h-4 w-4" }) })
|
|
929
|
+
] }),
|
|
930
|
+
/* @__PURE__ */ jsx(MirrorActions, { deviceId, stream, ready: hasFrame, platform }),
|
|
931
|
+
shortcutBar,
|
|
932
|
+
/* @__PURE__ */ jsxs("form", { className: "flex flex-col gap-2", onSubmit: (e) => {
|
|
933
|
+
e.preventDefault();
|
|
934
|
+
if (hasFrame && stream && pasteContent.trim()) sendInput({ t: "text", value: pasteContent });
|
|
935
|
+
}, children: [
|
|
936
|
+
/* @__PURE__ */ jsxs("label", { className: "text-xs font-medium", children: [
|
|
937
|
+
"\u547D\u4EE4 / \u7C98\u8D34\u5185\u5BB9",
|
|
938
|
+
/* @__PURE__ */ jsx(
|
|
939
|
+
"textarea",
|
|
940
|
+
{
|
|
941
|
+
"aria-label": "\u547D\u4EE4 / \u7C98\u8D34\u5185\u5BB9",
|
|
942
|
+
value: pasteContent,
|
|
943
|
+
onChange: (e) => setPasteContent(e.target.value),
|
|
944
|
+
placeholder: "\u8F93\u5165\u6216\u7C98\u8D34\u5185\u5BB9",
|
|
945
|
+
rows: 5,
|
|
946
|
+
className: "mt-2 w-full resize-y rounded border border-border bg-secondary p-2 text-xs"
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
] }),
|
|
950
|
+
/* @__PURE__ */ jsx("button", { type: "submit", disabled: !hasFrame || !stream || !pasteContent.trim(), className: "min-h-11 rounded bg-primary px-2 py-2 text-xs text-primary-foreground disabled:opacity-40", children: "\u7C98\u8D34\u5230\u8BBE\u5907" })
|
|
951
|
+
] })
|
|
952
|
+
] })
|
|
907
953
|
] }),
|
|
908
954
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-center gap-1 rounded-xl border border-border bg-background px-2 py-1 shadow-lg", children: [
|
|
955
|
+
/* @__PURE__ */ jsxs("button", { ref: panelButton, type: "button", "aria-expanded": panelOpen, "aria-controls": panelMounted ? panelId : void 0, onClick: () => {
|
|
956
|
+
setPanelMounted(true);
|
|
957
|
+
setPanelOpen((open) => !open);
|
|
958
|
+
}, className: "flex min-h-11 items-center gap-1.5 rounded-md px-3 text-xs text-foreground hover:bg-secondary focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary", children: [
|
|
959
|
+
/* @__PURE__ */ jsx(PanelsTopLeft, { "aria-hidden": "true", className: "h-4 w-4" }),
|
|
960
|
+
"AI \u63A7\u5236"
|
|
961
|
+
] }),
|
|
909
962
|
/* @__PURE__ */ jsx(
|
|
910
963
|
ControlBar,
|
|
911
964
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DeviceChannel, ScriptDebugger, FlowRun, MirrorSession, normalizeDevices, submitBatch } from './chunk-
|
|
2
|
-
import { resolveConfig, AixClient, isFleetRunTerminal, joinUrl, AixAuthError, AixError, EnvRun, detectEnvOs, summarizeEnv, ReconnectingSocket, executionWsTicketUrl } from './chunk-
|
|
1
|
+
import { DeviceChannel, ScriptDebugger, FlowRun, MirrorSession, normalizeDevices, submitBatch } from './chunk-EP3ZSPST.js';
|
|
2
|
+
import { resolveConfig, AixClient, isFleetRunTerminal, joinUrl, AixAuthError, AixError, EnvRun, detectEnvOs, summarizeEnv, ReconnectingSocket, executionWsTicketUrl } from './chunk-QNDM2SKW.js';
|
|
3
3
|
import React, { createContext, useContext, useState, useRef, useEffect, useCallback, useMemo, createElement } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -231,6 +231,7 @@ function useMirror(sessionId) {
|
|
|
231
231
|
useEffect(() => {
|
|
232
232
|
mountedRef.current = true;
|
|
233
233
|
let cancelled = false;
|
|
234
|
+
const joining = new AbortController();
|
|
234
235
|
let unsubscribe = [];
|
|
235
236
|
setSession(null);
|
|
236
237
|
setStream(null);
|
|
@@ -240,7 +241,7 @@ function useMirror(sessionId) {
|
|
|
240
241
|
if (!sessionId) return () => {
|
|
241
242
|
mountedRef.current = false;
|
|
242
243
|
};
|
|
243
|
-
MirrorSession.join(cfg, sessionId).then((ms) => {
|
|
244
|
+
MirrorSession.join(cfg, sessionId, joining.signal).then((ms) => {
|
|
244
245
|
if (cancelled) {
|
|
245
246
|
ms.leave();
|
|
246
247
|
return;
|
|
@@ -270,6 +271,7 @@ function useMirror(sessionId) {
|
|
|
270
271
|
});
|
|
271
272
|
return () => {
|
|
272
273
|
cancelled = true;
|
|
274
|
+
joining.abort();
|
|
273
275
|
mountedRef.current = false;
|
|
274
276
|
unsubscribe.forEach((stop) => stop());
|
|
275
277
|
ref.current?.leave();
|
|
@@ -295,6 +297,7 @@ function useGroupMirror(ids) {
|
|
|
295
297
|
const truncated = ids.length > GROUP_MIRROR_MAX;
|
|
296
298
|
useEffect(() => {
|
|
297
299
|
let cancelled = false;
|
|
300
|
+
const joining = new AbortController();
|
|
298
301
|
setStreams(/* @__PURE__ */ new Map());
|
|
299
302
|
setErrors(/* @__PURE__ */ new Map());
|
|
300
303
|
setConnected(0);
|
|
@@ -303,7 +306,7 @@ function useGroupMirror(ids) {
|
|
|
303
306
|
}
|
|
304
307
|
const take = idsKey ? idsKey.split("\n") : [];
|
|
305
308
|
for (const id of take) {
|
|
306
|
-
MirrorSession.join(cfg, id).then((ms) => {
|
|
309
|
+
MirrorSession.join(cfg, id, joining.signal).then((ms) => {
|
|
307
310
|
if (cancelled) {
|
|
308
311
|
ms.leave();
|
|
309
312
|
return;
|
|
@@ -319,6 +322,7 @@ function useGroupMirror(ids) {
|
|
|
319
322
|
}
|
|
320
323
|
return () => {
|
|
321
324
|
cancelled = true;
|
|
325
|
+
joining.abort();
|
|
322
326
|
for (const ms of sessionsRef.current.values()) ms.leave();
|
|
323
327
|
sessionsRef.current = /* @__PURE__ */ new Map();
|
|
324
328
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useAixT } from './chunk-
|
|
1
|
+
import { useAixT } from './chunk-WUT5OUBG.js';
|
|
2
2
|
import { Button } from './chunk-SKTL6ACT.js';
|
|
3
|
-
import { useClient } from './chunk-
|
|
3
|
+
import { useClient } from './chunk-C7RG4MXM.js';
|
|
4
4
|
import { useSyncExternalStore, useState, useEffect } from 'react';
|
|
5
5
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { joinUrl, AixAuthError, AixLocked, AixError, resolveConfig, ReconnectingSocket, AixTimeout, parseIncoming, isRetFrame, errorFromRet, isFridaEventFrame, isScriptletEventFrame, isStatusFrame, executionWsTicketUrl, isExecutionFrame, getIceServers, mintViewerToken, executionStreamEventsAfter } from './chunk-
|
|
1
|
+
import { joinUrl, AixAuthError, AixLocked, AixError, resolveConfig, ReconnectingSocket, AixTimeout, parseIncoming, isRetFrame, errorFromRet, isFridaEventFrame, isScriptletEventFrame, isStatusFrame, executionWsTicketUrl, isExecutionFrame, getIceServers, mintViewerToken, executionStreamEventsAfter } from './chunk-QNDM2SKW.js';
|
|
2
2
|
|
|
3
3
|
// src/core/ws-access.ts
|
|
4
4
|
async function mintDeviceAccess(cfg, deviceId) {
|
|
@@ -540,28 +540,69 @@ var MirrorSession = class _MirrorSession {
|
|
|
540
540
|
/** Start a viewer session. On WebSocket reconnect the socket re-joins
|
|
541
541
|
* automatically; the node then sends a fresh offer, which is paired with a
|
|
542
542
|
* fresh RTCPeerConnection (see the `offer` handler) — no consumer action
|
|
543
|
-
* needed to restore the video track.
|
|
544
|
-
|
|
543
|
+
* needed to restore the video track. The optional signal cancels a pending
|
|
544
|
+
* join; after it resolves, use leave() to end the returned session. */
|
|
545
|
+
static async join(cfg, session, signal) {
|
|
545
546
|
const resolved = "fetchFn" in cfg ? cfg : resolveConfig(cfg);
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
let ms;
|
|
547
|
+
const abortError = () => Object.assign(new Error("Viewer join cancelled"), { name: "AbortError" });
|
|
548
|
+
if (signal?.aborted) throw abortError();
|
|
549
|
+
let ms = null;
|
|
550
|
+
let open = false;
|
|
551
|
+
let joined = false;
|
|
552
|
+
let stopped = false;
|
|
553
|
+
const joinIfReady = () => {
|
|
554
|
+
if (stopped || signal?.aborted || !open || joined || !ms || ms.left) return;
|
|
555
|
+
joined = true;
|
|
556
|
+
ms.sendSignal({ type: "join", session, role: "viewer", token: ms.token });
|
|
557
|
+
};
|
|
549
558
|
const socket = new ReconnectingSocket({
|
|
550
559
|
urlProvider: async () => signalWsUrl(resolved.baseUrl),
|
|
551
560
|
wsFactory: resolved.wsFactory,
|
|
552
|
-
onOpen: () =>
|
|
553
|
-
|
|
561
|
+
onOpen: () => {
|
|
562
|
+
if (!open) {
|
|
563
|
+
open = true;
|
|
564
|
+
joinIfReady();
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
onMessage: (text) => {
|
|
568
|
+
if (joined && !stopped) void ms?.onSignal(text);
|
|
569
|
+
},
|
|
554
570
|
onClose: () => {
|
|
555
|
-
|
|
571
|
+
open = false;
|
|
572
|
+
joined = false;
|
|
573
|
+
if (ms && !ms.left) {
|
|
556
574
|
ms.resetPeer();
|
|
557
575
|
ms._stream = null;
|
|
558
576
|
ms.emitState("disconnected");
|
|
559
577
|
}
|
|
560
578
|
}
|
|
561
579
|
});
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
580
|
+
let rejectAbort;
|
|
581
|
+
const aborted = new Promise((_, reject) => {
|
|
582
|
+
rejectAbort = reject;
|
|
583
|
+
});
|
|
584
|
+
const onAbort = () => {
|
|
585
|
+
stopped = true;
|
|
586
|
+
socket.close();
|
|
587
|
+
rejectAbort(abortError());
|
|
588
|
+
};
|
|
589
|
+
signal?.addEventListener("abort", onAbort, { once: true });
|
|
590
|
+
try {
|
|
591
|
+
const [iceServers, token] = await Promise.race([
|
|
592
|
+
Promise.all([getIceServers(resolved), mintViewerToken(resolved, session), socket.start()]),
|
|
593
|
+
aborted
|
|
594
|
+
]);
|
|
595
|
+
if (stopped || signal?.aborted) throw abortError();
|
|
596
|
+
ms = new _MirrorSession(resolved, session, socket, iceServers, token);
|
|
597
|
+
joinIfReady();
|
|
598
|
+
return ms;
|
|
599
|
+
} catch (error) {
|
|
600
|
+
stopped = true;
|
|
601
|
+
socket.close();
|
|
602
|
+
throw error;
|
|
603
|
+
} finally {
|
|
604
|
+
signal?.removeEventListener("abort", onAbort);
|
|
605
|
+
}
|
|
565
606
|
}
|
|
566
607
|
get stream() {
|
|
567
608
|
return this._stream;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { LogConsole } from './chunk-D7J4EQTA.js';
|
|
2
|
-
import { requestPreviewFrame, MirrorSurface, DeviceMirror } from './chunk-
|
|
2
|
+
import { requestPreviewFrame, MirrorSurface, DeviceMirror } from './chunk-573FOGYE.js';
|
|
3
3
|
import { ControlBar, MirrorView } from './chunk-E7WMHM63.js';
|
|
4
|
-
import { deviceProxyCapabilities, createProxyProbeGuard, proxySummaryFromDevice, isProxyApplyStatus, proxyCapabilityReason, proxyProbeExitIp, proxyProbeMessage, DeviceCreate, isProxyProbeUnsupported, isRedactedProxyUrl, isSupportedProxyUrl, redactProxyUrl } from './chunk-
|
|
5
|
-
import { isPhysicalIos, IosDeviceDiagnostics } from './chunk-
|
|
6
|
-
import { useAixT, useAixLang } from './chunk-
|
|
4
|
+
import { deviceProxyCapabilities, createProxyProbeGuard, proxySummaryFromDevice, isProxyApplyStatus, proxyCapabilityReason, proxyProbeExitIp, proxyProbeMessage, DeviceCreate, isProxyProbeUnsupported, isRedactedProxyUrl, isSupportedProxyUrl, redactProxyUrl } from './chunk-NVFMGPUG.js';
|
|
5
|
+
import { isPhysicalIos, IosDeviceDiagnostics, canConnectPhysicalDevice } from './chunk-EJWJQI5Y.js';
|
|
6
|
+
import { useAixT, useAixLang } from './chunk-WUT5OUBG.js';
|
|
7
7
|
import { cn, Badge, Button, Dialog, Input, Popover, Select, useToast, ToastViewport, Drawer } from './chunk-SKTL6ACT.js';
|
|
8
|
-
import { useClient, useDevicesView, useShortcutsView, GROUP_MIRROR_MAX, useGroupMirror, useScripts, useFleetRun, useTaskAgentRun, preflightTaskAgentDevice, createAgentTaskRunner, useNodesView } from './chunk-
|
|
9
|
-
import { DeviceSession, pushFile, pullFile } from './chunk-
|
|
8
|
+
import { useClient, useDevicesView, useShortcutsView, GROUP_MIRROR_MAX, useGroupMirror, useScripts, useFleetRun, useTaskAgentRun, preflightTaskAgentDevice, createAgentTaskRunner, useNodesView } from './chunk-C7RG4MXM.js';
|
|
9
|
+
import { DeviceSession, pushFile, pullFile } from './chunk-QNDM2SKW.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';
|
|
@@ -5153,6 +5153,195 @@ function DeviceEditDialog({ device, onClose }) {
|
|
|
5153
5153
|
}
|
|
5154
5154
|
);
|
|
5155
5155
|
}
|
|
5156
|
+
|
|
5157
|
+
// src/ui/devices/device-connect.ts
|
|
5158
|
+
function adbAddress(serial) {
|
|
5159
|
+
const value = serial.trim();
|
|
5160
|
+
const match = /^(\[[^\]]+\]|[^:\[\]\/\?#@\s]+):([0-9]{1,5})$/.exec(value);
|
|
5161
|
+
if (!match || Number(match[2]) < 1 || Number(match[2]) > 65535) return null;
|
|
5162
|
+
try {
|
|
5163
|
+
const parsed = new URL(`http://${value}`);
|
|
5164
|
+
if (!parsed.hostname || parsed.username || parsed.password || parsed.search || parsed.hash) return null;
|
|
5165
|
+
return value;
|
|
5166
|
+
} catch {
|
|
5167
|
+
return null;
|
|
5168
|
+
}
|
|
5169
|
+
}
|
|
5170
|
+
function connectionMode(device) {
|
|
5171
|
+
if (device.meta.provisioned === true || device.id.startsWith("rd-") || device.id.startsWith("vp-")) return { kind: "blocked", code: "virtual" };
|
|
5172
|
+
if (device.platform === "macos" || device.platform === "windows") return { kind: "blocked", code: "desktop" };
|
|
5173
|
+
if (device.platform !== "android") return { kind: "blocked", code: "unsupported" };
|
|
5174
|
+
if (device.platform === "android") {
|
|
5175
|
+
const address = adbAddress(device.udid);
|
|
5176
|
+
if (address) return { kind: "wireless", address };
|
|
5177
|
+
if (device.udid.includes(":")) return { kind: "blocked", code: "invalidAddress" };
|
|
5178
|
+
}
|
|
5179
|
+
return { kind: "inventory" };
|
|
5180
|
+
}
|
|
5181
|
+
function eligibleConnectionNodes(nodes, device) {
|
|
5182
|
+
return nodes.filter((node) => canConnectPhysicalDevice(node, device.platform === "android" ? "android" : "ios") && (device.platform !== "android" || node.effective_caps?.android !== false));
|
|
5183
|
+
}
|
|
5184
|
+
async function connectSelectedDevices(client, devices, choices = {}, isCurrent = () => true) {
|
|
5185
|
+
const result = (device, code, error) => ({
|
|
5186
|
+
id: device.id,
|
|
5187
|
+
name: device.name,
|
|
5188
|
+
ok: code === "requested" || code === "alreadyOnline",
|
|
5189
|
+
code,
|
|
5190
|
+
...error ? { error } : {}
|
|
5191
|
+
});
|
|
5192
|
+
if (!devices.length) return [];
|
|
5193
|
+
let nodes;
|
|
5194
|
+
try {
|
|
5195
|
+
nodes = await client.nodes.list();
|
|
5196
|
+
} catch (error) {
|
|
5197
|
+
return devices.map((device) => result(device, "requestFailed", String(error.message ?? error)));
|
|
5198
|
+
}
|
|
5199
|
+
const results = [];
|
|
5200
|
+
for (const device of devices) {
|
|
5201
|
+
if (!isCurrent()) {
|
|
5202
|
+
results.push(result(device, "cancelled"));
|
|
5203
|
+
continue;
|
|
5204
|
+
}
|
|
5205
|
+
if (device.online) {
|
|
5206
|
+
results.push(result(device, "alreadyOnline"));
|
|
5207
|
+
continue;
|
|
5208
|
+
}
|
|
5209
|
+
const mode = connectionMode(device);
|
|
5210
|
+
if (mode.kind === "blocked") {
|
|
5211
|
+
results.push(result(device, mode.code));
|
|
5212
|
+
continue;
|
|
5213
|
+
}
|
|
5214
|
+
const nodeId = device.nodeId ?? choices[device.id];
|
|
5215
|
+
if (!nodeId) {
|
|
5216
|
+
results.push(result(device, "chooseNode"));
|
|
5217
|
+
continue;
|
|
5218
|
+
}
|
|
5219
|
+
const node = nodes.find((candidate) => candidate.id === nodeId);
|
|
5220
|
+
if (!node) {
|
|
5221
|
+
results.push(result(device, "nodeMissing"));
|
|
5222
|
+
continue;
|
|
5223
|
+
}
|
|
5224
|
+
if (!node.is_owner) {
|
|
5225
|
+
results.push(result(device, "notOwner"));
|
|
5226
|
+
continue;
|
|
5227
|
+
}
|
|
5228
|
+
if (node.status !== "online") {
|
|
5229
|
+
results.push(result(device, "nodeOffline"));
|
|
5230
|
+
continue;
|
|
5231
|
+
}
|
|
5232
|
+
if (!eligibleConnectionNodes([node], device).length) {
|
|
5233
|
+
results.push(result(device, "permission"));
|
|
5234
|
+
continue;
|
|
5235
|
+
}
|
|
5236
|
+
let requested = false;
|
|
5237
|
+
try {
|
|
5238
|
+
if (mode.kind === "wireless") {
|
|
5239
|
+
await client.nodes.adbConnect(node.id, mode.address);
|
|
5240
|
+
requested = true;
|
|
5241
|
+
if (!isCurrent()) {
|
|
5242
|
+
results.push(result(device, "cancelled"));
|
|
5243
|
+
continue;
|
|
5244
|
+
}
|
|
5245
|
+
}
|
|
5246
|
+
await client.nodes.discoverDevices(node.id);
|
|
5247
|
+
if (!isCurrent()) {
|
|
5248
|
+
results.push(result(device, "cancelled"));
|
|
5249
|
+
continue;
|
|
5250
|
+
}
|
|
5251
|
+
results.push(result(device, requested ? "requested" : "inventoryOnly"));
|
|
5252
|
+
} catch (error) {
|
|
5253
|
+
results.push(result(device, requested ? "refreshFailed" : "requestFailed", String(error.message ?? error)));
|
|
5254
|
+
}
|
|
5255
|
+
}
|
|
5256
|
+
return results;
|
|
5257
|
+
}
|
|
5258
|
+
function ConnectDevicesDialog({ devices, onClose, onComplete }) {
|
|
5259
|
+
const client = useClient();
|
|
5260
|
+
const t = useAixT();
|
|
5261
|
+
const [nodes, setNodes] = useState([]);
|
|
5262
|
+
const [choices, setChoices] = useState({});
|
|
5263
|
+
const [loading, setLoading] = useState(false);
|
|
5264
|
+
const [busy, setBusy] = useState(false);
|
|
5265
|
+
const [error, setError] = useState("");
|
|
5266
|
+
const [results, setResults] = useState(null);
|
|
5267
|
+
const active = useRef(true);
|
|
5268
|
+
const pending = useRef(false);
|
|
5269
|
+
const unassigned = devices.filter((device) => !device.online && !device.nodeId && connectionMode(device).kind !== "blocked");
|
|
5270
|
+
const needsChoice = unassigned.some((device) => !choices[device.id]);
|
|
5271
|
+
const run = async () => {
|
|
5272
|
+
if (!active.current || pending.current || needsChoice) return;
|
|
5273
|
+
pending.current = true;
|
|
5274
|
+
setBusy(true);
|
|
5275
|
+
setError("");
|
|
5276
|
+
try {
|
|
5277
|
+
const next = await connectSelectedDevices(client, devices, choices, () => active.current);
|
|
5278
|
+
if (!active.current) return;
|
|
5279
|
+
setResults(next);
|
|
5280
|
+
await onComplete(next);
|
|
5281
|
+
} catch (error2) {
|
|
5282
|
+
if (active.current) setError(error2.message);
|
|
5283
|
+
} finally {
|
|
5284
|
+
pending.current = false;
|
|
5285
|
+
if (active.current) setBusy(false);
|
|
5286
|
+
}
|
|
5287
|
+
};
|
|
5288
|
+
useEffect(() => {
|
|
5289
|
+
active.current = true;
|
|
5290
|
+
if (unassigned.length) {
|
|
5291
|
+
setLoading(true);
|
|
5292
|
+
void client.nodes.list().then((rows) => {
|
|
5293
|
+
if (active.current) setNodes(rows);
|
|
5294
|
+
}).catch((error2) => {
|
|
5295
|
+
if (active.current) setError(error2.message);
|
|
5296
|
+
}).finally(() => {
|
|
5297
|
+
if (active.current) setLoading(false);
|
|
5298
|
+
});
|
|
5299
|
+
} else {
|
|
5300
|
+
void run();
|
|
5301
|
+
}
|
|
5302
|
+
return () => {
|
|
5303
|
+
active.current = false;
|
|
5304
|
+
};
|
|
5305
|
+
}, []);
|
|
5306
|
+
return /* @__PURE__ */ jsx(Dialog, { open: true, onClose, title: t("deviceConnect.title"), description: t("deviceConnect.description"), children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
5307
|
+
unassigned.map((device) => {
|
|
5308
|
+
const available = eligibleConnectionNodes(nodes, device);
|
|
5309
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
5310
|
+
/* @__PURE__ */ jsxs("label", { className: "block text-xs font-medium", children: [
|
|
5311
|
+
/* @__PURE__ */ jsx("span", { className: "mb-1 block", children: t("deviceConnect.chooseFor", { name: device.name }) }),
|
|
5312
|
+
/* @__PURE__ */ jsx(
|
|
5313
|
+
Select,
|
|
5314
|
+
{
|
|
5315
|
+
value: choices[device.id] ?? "",
|
|
5316
|
+
disabled: busy || loading,
|
|
5317
|
+
onChange: (nodeId) => setChoices((previous) => ({ ...previous, [device.id]: nodeId })),
|
|
5318
|
+
placeholder: t("deviceConnect.chooseNode"),
|
|
5319
|
+
options: available.map((node) => ({ value: node.id, label: node.name }))
|
|
5320
|
+
}
|
|
5321
|
+
)
|
|
5322
|
+
] }),
|
|
5323
|
+
!loading && !available.length && /* @__PURE__ */ jsx("p", { className: "mt-1 text-xs text-muted-foreground", children: t("deviceConnect.noNodes") })
|
|
5324
|
+
] }, device.id);
|
|
5325
|
+
}),
|
|
5326
|
+
loading && /* @__PURE__ */ jsx("p", { role: "status", className: "text-xs", children: t("deviceConnect.loading") }),
|
|
5327
|
+
busy && /* @__PURE__ */ jsx("p", { role: "status", className: "text-xs", children: t("deviceConnect.running") }),
|
|
5328
|
+
error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-xs text-destructive", children: error }),
|
|
5329
|
+
results && /* @__PURE__ */ jsx("ul", { className: "max-h-64 space-y-2 overflow-auto", "aria-live": "polite", children: results.map((result) => /* @__PURE__ */ jsxs("li", { className: "text-xs", children: [
|
|
5330
|
+
/* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
|
|
5331
|
+
result.name,
|
|
5332
|
+
": "
|
|
5333
|
+
] }),
|
|
5334
|
+
/* @__PURE__ */ jsxs("span", { className: result.ok ? "text-muted-foreground" : "text-destructive", children: [
|
|
5335
|
+
t(`deviceConnect.${result.code}`),
|
|
5336
|
+
result.error ? ` ${result.error}` : ""
|
|
5337
|
+
] })
|
|
5338
|
+
] }, result.id)) }),
|
|
5339
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
5340
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", variant: "ghost", onClick: onClose, children: t("common.close") }),
|
|
5341
|
+
!results && unassigned.length > 0 && /* @__PURE__ */ jsx(Button, { size: "sm", disabled: busy || loading || needsChoice, onClick: () => void run(), children: busy ? t("deviceConnect.running") : t("devices.bulk.connect") })
|
|
5342
|
+
] })
|
|
5343
|
+
] }) });
|
|
5344
|
+
}
|
|
5156
5345
|
function DevicesPage({ taskAgentRunner: providedTaskAgentRunner } = {}) {
|
|
5157
5346
|
const t = useAixT();
|
|
5158
5347
|
const client = useClient();
|
|
@@ -5183,6 +5372,7 @@ function DevicesPage({ taskAgentRunner: providedTaskAgentRunner } = {}) {
|
|
|
5183
5372
|
const [taskAgentDevices, setTaskAgentDevices] = useState(null);
|
|
5184
5373
|
const [bulkInstallDevices, setBulkInstallDevices] = useState(null);
|
|
5185
5374
|
const [bulkPowering, setBulkPowering] = useState(false);
|
|
5375
|
+
const [connectTargets, setConnectTargets] = useState(null);
|
|
5186
5376
|
const [editDeviceId, setEditDeviceId] = useState(null);
|
|
5187
5377
|
const [deleteTarget, setDeleteTarget] = useState(null);
|
|
5188
5378
|
const [poweringId, setPoweringId] = useState(null);
|
|
@@ -5425,8 +5615,16 @@ function DevicesPage({ taskAgentRunner: providedTaskAgentRunner } = {}) {
|
|
|
5425
5615
|
/* @__PURE__ */ jsx("span", { children: t("devices.selectAll") })
|
|
5426
5616
|
] }),
|
|
5427
5617
|
/* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border" }),
|
|
5428
|
-
/* @__PURE__ */ jsx(
|
|
5429
|
-
|
|
5618
|
+
/* @__PURE__ */ jsx(
|
|
5619
|
+
BulkAction,
|
|
5620
|
+
{
|
|
5621
|
+
icon: /* @__PURE__ */ jsx(Link, { className: "w-3.5 h-3.5" }),
|
|
5622
|
+
label: t("devices.bulk.connect"),
|
|
5623
|
+
disabled: !devices.some((device) => checkedIds.has(device.id)) || connectTargets !== null,
|
|
5624
|
+
onClick: () => setConnectTargets(devices.filter((device) => checkedIds.has(device.id)))
|
|
5625
|
+
}
|
|
5626
|
+
),
|
|
5627
|
+
/* @__PURE__ */ jsx("span", { tabIndex: 0, title: t("deviceConnect.disconnectUnsupported"), "aria-label": t("deviceConnect.disconnectUnsupported"), children: /* @__PURE__ */ jsx(BulkAction, { icon: /* @__PURE__ */ jsx(Link2Off, { className: "w-3.5 h-3.5" }), label: t("devices.bulk.disconnect"), disabled: true }) }),
|
|
5430
5628
|
/* @__PURE__ */ jsx(
|
|
5431
5629
|
BulkAction,
|
|
5432
5630
|
{
|
|
@@ -5755,6 +5953,14 @@ function DevicesPage({ taskAgentRunner: providedTaskAgentRunner } = {}) {
|
|
|
5755
5953
|
}
|
|
5756
5954
|
),
|
|
5757
5955
|
/* @__PURE__ */ jsx(BulkInstallAppsDialog, { devices: bulkInstallDevices, onClose: () => setBulkInstallDevices(null) }),
|
|
5956
|
+
connectTargets && /* @__PURE__ */ jsx(ConnectDevicesDialog, { devices: connectTargets, onClose: () => setConnectTargets(null), onComplete: async (results) => {
|
|
5957
|
+
const failed = results.filter((result) => !result.ok).length;
|
|
5958
|
+
const message = t("deviceConnect.summary", { ok: results.length - failed, failed });
|
|
5959
|
+
if (failed) toast.error(message);
|
|
5960
|
+
else toast.success(message);
|
|
5961
|
+
await fetchDevices();
|
|
5962
|
+
await fetchNodes();
|
|
5963
|
+
} }),
|
|
5758
5964
|
/* @__PURE__ */ jsx(
|
|
5759
5965
|
DeviceEditDialog,
|
|
5760
5966
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { canConnectPhysicalDevice, IosDeviceDiagnostics } from './chunk-
|
|
2
|
-
import { useAixT } from './chunk-
|
|
1
|
+
import { canConnectPhysicalDevice, IosDeviceDiagnostics } from './chunk-EJWJQI5Y.js';
|
|
2
|
+
import { useAixT } from './chunk-WUT5OUBG.js';
|
|
3
3
|
import { cn, Select, Dialog, Button, Input, Badge } from './chunk-SKTL6ACT.js';
|
|
4
|
-
import { useNodes, useClient, useDevices } from './chunk-
|
|
4
|
+
import { useNodes, useClient, useDevices } from './chunk-C7RG4MXM.js';
|
|
5
5
|
import { useMemo, useEffect, useState, useCallback, useRef } from 'react';
|
|
6
6
|
import { Server, RefreshCw, Smartphone, Usb, Wifi, Info } from 'lucide-react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -227,19 +227,23 @@ var ReconnectingSocket = class {
|
|
|
227
227
|
async connect() {
|
|
228
228
|
if (this.closed) return;
|
|
229
229
|
const url = await this.o.urlProvider();
|
|
230
|
+
if (this.closed) return;
|
|
230
231
|
const ws = this.o.wsFactory(url);
|
|
231
232
|
this.ws = ws;
|
|
232
233
|
ws.onopen = () => {
|
|
233
|
-
this.
|
|
234
|
-
|
|
234
|
+
if (!this.closed && this.ws === ws) {
|
|
235
|
+
this.attempt = 0;
|
|
236
|
+
this.o.onOpen?.();
|
|
237
|
+
}
|
|
235
238
|
};
|
|
236
239
|
ws.onmessage = (ev) => {
|
|
237
|
-
if (typeof ev.data !== "string") return;
|
|
240
|
+
if (this.closed || this.ws !== ws || typeof ev.data !== "string") return;
|
|
238
241
|
this.o.onMessage(ev.data);
|
|
239
242
|
};
|
|
240
243
|
ws.onerror = () => {
|
|
241
244
|
};
|
|
242
245
|
ws.onclose = () => {
|
|
246
|
+
if (this.ws !== ws) return;
|
|
243
247
|
this.ws = null;
|
|
244
248
|
this.o.onClose?.();
|
|
245
249
|
if (!this.closed) this.scheduleReconnect();
|
|
@@ -1682,7 +1686,7 @@ var AixClient = class {
|
|
|
1682
1686
|
* 即可,不必回依赖 client 实例)。
|
|
1683
1687
|
*/
|
|
1684
1688
|
async deviceSession(deviceId, opts = {}) {
|
|
1685
|
-
const { DeviceSession: DeviceSession2 } = await import('./device-session-
|
|
1689
|
+
const { DeviceSession: DeviceSession2 } = await import('./device-session-XTNY2RSP.js');
|
|
1686
1690
|
return DeviceSession2.open(this.cfg, deviceId, opts);
|
|
1687
1691
|
}
|
|
1688
1692
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogConsole } from './chunk-D7J4EQTA.js';
|
|
2
2
|
import { cn, Button, Select } from './chunk-SKTL6ACT.js';
|
|
3
|
-
import { useDevices, useClient, useScripts, useScriptRun } from './chunk-
|
|
4
|
-
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-
|
|
3
|
+
import { useDevices, useClient, useScripts, useScriptRun } from './chunk-C7RG4MXM.js';
|
|
4
|
+
import { variablesToSchema, normalizeDevices, schemaToVariables } from './chunk-EP3ZSPST.js';
|
|
5
5
|
import { useMemo, useState, useEffect, useRef, useCallback } from 'react';
|
|
6
6
|
import { Trash2, Plus, Play, Pause, Square, ArrowDownToLine, WrapText, ChevronRight, Save, XCircle, CheckCircle2, Loader2, Circle } from 'lucide-react';
|
|
7
7
|
import CodeMirror, { EditorView } from '@uiw/react-codemirror';
|
|
@@ -4,6 +4,33 @@ import { createContext, useMemo, createElement, useContext } from 'react';
|
|
|
4
4
|
|
|
5
5
|
// src/ui/i18n/dict.ts
|
|
6
6
|
var en = {
|
|
7
|
+
"deviceConnect.title": "Connect selected devices",
|
|
8
|
+
"deviceConnect.description": "Reconnect paired Android network devices. USB entries only refresh reported inventory; restore their USB connection on the host. Use Add device for iOS pairing.",
|
|
9
|
+
"deviceConnect.chooseFor": "Choose the node attached to {name}",
|
|
10
|
+
"deviceConnect.chooseNode": "Choose an owned online node",
|
|
11
|
+
"deviceConnect.noNodes": "No eligible owned online node. Start your node and enable physical-device access.",
|
|
12
|
+
"deviceConnect.loading": "Loading nodes\u2026",
|
|
13
|
+
"deviceConnect.running": "Connecting / refreshing inventory\u2026",
|
|
14
|
+
"deviceConnect.summary": "Completed {ok}; need attention {failed}.",
|
|
15
|
+
"deviceConnect.inventoryOnly": "Reported inventory refreshed; this is not a live USB scan. Check the host cable, driver and device authorization, then refresh status.",
|
|
16
|
+
"deviceConnect.refreshFailed": "Connection request completed, but inventory refresh failed:",
|
|
17
|
+
"deviceConnect.alreadyOnline": "Already online; no connection request sent.",
|
|
18
|
+
"deviceConnect.requested": "Connection request completed. Reported inventory does not verify current connectivity; refresh device status.",
|
|
19
|
+
"deviceConnect.virtual": "Use Power on for virtual devices; Connect does not start a virtual machine.",
|
|
20
|
+
"deviceConnect.desktop": "Start the SDK node on the original computer. Connect cannot move a desktop device.",
|
|
21
|
+
"deviceConnect.unsupported": "Use Add device to configure this device type.",
|
|
22
|
+
"deviceConnect.invalidAddress": "Invalid wireless address. Use host:port or [IPv6]:port through Add device.",
|
|
23
|
+
"deviceConnect.nodeMissing": "Original node is missing. Restore it, or use Add device to set up the target node explicitly.",
|
|
24
|
+
"deviceConnect.nodeOffline": "Original node is offline. Start it and try again.",
|
|
25
|
+
"deviceConnect.notOwner": "Physical-device connections require a node you own.",
|
|
26
|
+
"deviceConnect.permission": "Enable this platform and physical-device access on the selected node.",
|
|
27
|
+
"deviceConnect.notReported": "Not reported by this node. Check the USB cable/driver, or wireless pairing and address, then use Add device.",
|
|
28
|
+
"deviceConnect.unauthorized": "Device is offline or unauthorized. Unlock it and approve USB debugging/trust, or pair it through Add device.",
|
|
29
|
+
"deviceConnect.needsEnrollment": "Device found; use Add device to claim or register it explicitly on this node.",
|
|
30
|
+
"deviceConnect.ownedOther": "This device belongs to another owner. No claim or migration was attempted.",
|
|
31
|
+
"deviceConnect.requestFailed": "Connection or inventory refresh failed:",
|
|
32
|
+
"deviceConnect.cancelled": "Stopped before the next operation.",
|
|
33
|
+
"deviceConnect.disconnectUnsupported": "Disconnect is unavailable here. Use the device or node transport controls; closing a mirror does not disconnect the device.",
|
|
7
34
|
"creation.status.applying_proxy": "Device created \xB7 waiting for proxy application",
|
|
8
35
|
"creation.startupNetwork": "The proxy is configured after device startup. The device may use its original network until proxy application is confirmed.",
|
|
9
36
|
"creation.title": "Create with an AIxIps IP",
|
|
@@ -849,6 +876,33 @@ var en = {
|
|
|
849
876
|
"agent.send": "Send"
|
|
850
877
|
};
|
|
851
878
|
var zh = {
|
|
879
|
+
"deviceConnect.title": "\u8FDE\u63A5\u6240\u9009\u8BBE\u5907",
|
|
880
|
+
"deviceConnect.description": "\u91CD\u8FDE\u5DF2\u914D\u5BF9\u7684 Android \u7F51\u7EDC\u8BBE\u5907\u3002USB \u8BBE\u5907\u4EC5\u5237\u65B0\u5DF2\u4E0A\u62A5\u8BB0\u5F55\uFF0C\u8BF7\u5728\u5BBF\u4E3B\u6062\u590D USB \u8FDE\u63A5\uFF1BiOS \u914D\u5BF9\u8BF7\u4F7F\u7528\u6DFB\u52A0\u8BBE\u5907\u3002",
|
|
881
|
+
"deviceConnect.chooseFor": "\u4E3A {name} \u9009\u62E9\u5B9E\u9645\u63A5\u5165\u7684\u8282\u70B9",
|
|
882
|
+
"deviceConnect.chooseNode": "\u9009\u62E9\u672C\u4EBA\u5728\u7EBF\u8282\u70B9",
|
|
883
|
+
"deviceConnect.noNodes": "\u6CA1\u6709\u53EF\u7528\u7684\u672C\u4EBA\u5728\u7EBF\u8282\u70B9\uFF0C\u8BF7\u542F\u52A8\u8282\u70B9\u5E76\u542F\u7528\u5BF9\u5E94\u771F\u673A\u6743\u9650\u3002",
|
|
884
|
+
"deviceConnect.loading": "\u52A0\u8F7D\u8282\u70B9\u4E2D\u2026",
|
|
885
|
+
"deviceConnect.running": "\u8FDE\u63A5 / \u5237\u65B0\u8BB0\u5F55\u4E2D\u2026",
|
|
886
|
+
"deviceConnect.summary": "\u5DF2\u5B8C\u6210 {ok} \u53F0\uFF0C{failed} \u53F0\u9700\u8981\u5904\u7406\u3002",
|
|
887
|
+
"deviceConnect.inventoryOnly": "\u5DF2\u5237\u65B0\u4E0A\u62A5\u8BB0\u5F55\uFF0C\u672A\u5B9E\u65F6\u626B\u63CF USB\u3002\u8BF7\u68C0\u67E5\u5BBF\u4E3B\u7EBF\u7F06\u3001\u9A71\u52A8\u548C\u8BBE\u5907\u6388\u6743\u540E\u5237\u65B0\u72B6\u6001\u3002",
|
|
888
|
+
"deviceConnect.refreshFailed": "\u8FDE\u63A5\u8BF7\u6C42\u5DF2\u5B8C\u6210\uFF0C\u4F46\u5237\u65B0\u4E0A\u62A5\u8BB0\u5F55\u5931\u8D25\uFF1A",
|
|
889
|
+
"deviceConnect.alreadyOnline": "\u8BBE\u5907\u5DF2\u5728\u7EBF\uFF0C\u672A\u91CD\u590D\u53D1\u9001\u8FDE\u63A5\u8BF7\u6C42\u3002",
|
|
890
|
+
"deviceConnect.requested": "\u8FDE\u63A5\u8BF7\u6C42\u5DF2\u5B8C\u6210\uFF0C\u8BB0\u5F55\u4E0D\u4EE3\u8868\u5F53\u524D\u5DF2\u8FDE\u63A5\uFF0C\u8BF7\u5237\u65B0\u8BBE\u5907\u72B6\u6001\u3002",
|
|
891
|
+
"deviceConnect.virtual": "\u865A\u62DF\u8BBE\u5907\u8BF7\u4F7F\u7528\u5F00\u673A\u64CD\u4F5C\uFF1B\u8FDE\u63A5\u4E0D\u4F1A\u542F\u52A8\u865A\u62DF\u673A\u3002",
|
|
892
|
+
"deviceConnect.desktop": "\u8BF7\u5728\u539F\u7535\u8111\u542F\u52A8 SDK \u8282\u70B9\uFF1B\u8FDE\u63A5\u4E0D\u80FD\u8FC1\u79FB\u684C\u9762\u8BBE\u5907\u3002",
|
|
893
|
+
"deviceConnect.unsupported": "\u8BF7\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u914D\u7F6E\u6B64\u7C7B\u578B\u3002",
|
|
894
|
+
"deviceConnect.invalidAddress": "\u65E0\u7EBF\u5730\u5740\u65E0\u6548\uFF0C\u8BF7\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u586B\u5199 \u4E3B\u673A:\u7AEF\u53E3 \u6216 [IPv6]:\u7AEF\u53E3\u3002",
|
|
895
|
+
"deviceConnect.nodeMissing": "\u539F\u8282\u70B9\u4E0D\u5B58\u5728\uFF0C\u8BF7\u6062\u590D\u539F\u8282\u70B9\uFF0C\u6216\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u660E\u786E\u914D\u7F6E\u76EE\u6807\u8282\u70B9\u3002",
|
|
896
|
+
"deviceConnect.nodeOffline": "\u539F\u8282\u70B9\u79BB\u7EBF\uFF0C\u8BF7\u5148\u542F\u52A8\u540E\u91CD\u8BD5\u3002",
|
|
897
|
+
"deviceConnect.notOwner": "\u771F\u673A\u8FDE\u63A5\u53EA\u80FD\u5728\u672C\u4EBA\u8282\u70B9\u6267\u884C\u3002",
|
|
898
|
+
"deviceConnect.permission": "\u8BF7\u4E3A\u6240\u9009\u8282\u70B9\u542F\u7528\u5BF9\u5E94\u5E73\u53F0\u53CA\u771F\u673A\u63A5\u5165\u6743\u9650\u3002",
|
|
899
|
+
"deviceConnect.notReported": "\u6B64\u8282\u70B9\u5C1A\u672A\u53D1\u73B0\u8BBE\u5907\uFF0C\u8BF7\u68C0\u67E5 USB \u7EBF\u7F06/\u9A71\u52A8\uFF0C\u6216\u65E0\u7EBF\u914D\u5BF9\u4E0E\u5730\u5740\uFF0C\u518D\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u914D\u7F6E\u3002",
|
|
900
|
+
"deviceConnect.unauthorized": "\u8BBE\u5907\u79BB\u7EBF\u6216\u672A\u6388\u6743\uFF0C\u8BF7\u89E3\u9501\u5E76\u786E\u8BA4 USB \u8C03\u8BD5/\u4FE1\u4EFB\u63D0\u793A\uFF0C\u6216\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u914D\u5BF9\u3002",
|
|
901
|
+
"deviceConnect.needsEnrollment": "\u5DF2\u53D1\u73B0\u8BBE\u5907\uFF0C\u8BF7\u901A\u8FC7\u6DFB\u52A0\u8BBE\u5907\u660E\u786E\u8BA4\u9886\u6216\u6CE8\u518C\u5230\u6B64\u8282\u70B9\u3002",
|
|
902
|
+
"deviceConnect.ownedOther": "\u8BBE\u5907\u5C5E\u4E8E\u5176\u4ED6\u7528\u6237\uFF0C\u672A\u6267\u884C\u8BA4\u9886\u6216\u8FC1\u79FB\u3002",
|
|
903
|
+
"deviceConnect.requestFailed": "\u8FDE\u63A5\u6216\u5237\u65B0\u8BB0\u5F55\u5931\u8D25\uFF1A",
|
|
904
|
+
"deviceConnect.cancelled": "\u540E\u7EED\u64CD\u4F5C\u5DF2\u505C\u6B62\u3002",
|
|
905
|
+
"deviceConnect.disconnectUnsupported": "\u6B64\u5904\u6682\u4E0D\u652F\u6301\u65AD\u5F00\uFF0C\u8BF7\u4F7F\u7528\u8BBE\u5907\u6216\u8282\u70B9\u7684\u8FDE\u63A5\u7BA1\u7406\uFF1B\u5173\u95ED\u955C\u50CF\u4E0D\u4F1A\u65AD\u5F00\u8BBE\u5907\u3002",
|
|
852
906
|
"creation.status.applying_proxy": "\u8BBE\u5907\u5DF2\u521B\u5EFA \xB7 \u7B49\u5F85\u4EE3\u7406\u5E94\u7528\u786E\u8BA4",
|
|
853
907
|
"creation.startupNetwork": "\u8BBE\u5907\u542F\u52A8\u540E\u5B8C\u6210\u4EE3\u7406\u914D\u7F6E\uFF1B\u4EE3\u7406\u5E94\u7528\u786E\u8BA4\u524D\u53EF\u80FD\u4F7F\u7528\u539F\u7F51\u7EDC\u3002",
|
|
854
908
|
"creation.title": "\u4F7F\u7528 AIxIps IP \u521B\u5EFA\u8BBE\u5907",
|
package/dist/core/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ export { A as AdbResult, D as DeviceChannel, b as DeviceTunnel, c as ScriptDebug
|
|
|
4
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-aYRO9JLj.js';
|
|
5
5
|
import { h as ScriptParam } from '../types-BbtVr3QM.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 DeviceSnapshot, W as DeviceSnapshotList, X as DeviceUsageSession, b as DiscoveredDevice, Y as DiscoveredStatus, Z as ElementNode, _ as FleetMode, $ as FleetRunDetail, a0 as FleetRunDeviceRow, a1 as FleetRunSubmit, a2 as ImageArtifact, a3 as ImageInput, a4 as ImageOption, a5 as InstallAntiDetectResult, a6 as IosAccountState, a7 as IosDeviceRow, a8 as IosDiagnosticStage, a9 as IosDiagnostics, aa as IosLibraryApp, ab as IosLoginResult, ac as IosScanResult, ad as KnownDeviceOpName, ae as LlmTestResult, af as Locator, ag as MdnsEntry, ah as NewAppTemplate, ai as NewShortcut, aj as NodeEffectiveCaps, ak as NodeOwnerPolicy, N as NodeRow, al as NodeScope, am as OwnNodeDailyCharge, an as PlanInput, ao as PlatformOem, ap as PlatformOemInput, aq as PowerAction, ar as PowerRunResult, as as ProfileOverrides, at as Project, au as ProjectSubscription, av as ProjectUserResult, a as ProvisionResult, P as ProvisionSpec, aw as ProvisionUserInput, ax as ProvisionUserResult, ay as ProxyApplyReceipt, az as ProxyApplyStatus, aA as ProxyPatchResult, aB as ProxyProbe, aC as ProxyProbeErrorCode, aD as ProxySummary, aE as ProxyUrl, aF as RateInput, aG as RebateLedgerRow, aH as RecycledDeviceRow, aI as RegisterNodeInput, aJ as RegisterNodeResult, aK as ScreenshotResult, S as Script, f as ScriptSummary, aL as SendCodeResult, aM as SetDataRootResult, aN as SetDisguiseResult, aO as SetProfileResult, aP as Shortcut, aQ as ShortcutParam, aR as ShortcutRunResult, aS as SubscribeInput, aT as TaskEvent, aU as TaskEventsResult, aV as TaskListFilter, aW as TaskListResult, aX as TaskStatus, aY as TaskSubmitResult, aZ as TaskSummary, a_ as TaskTarget, a$ as TopupInput, b0 as TopupResult, b1 as UpdateNodeInput, b2 as User, b3 as VerifyCodeResult, b4 as WebhookConfig } from '../types-BbtVr3QM.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-CDPlWFuU.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-CDPlWFuU.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-CuGflfZA.js';
|
package/dist/core/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { AutomationQueue, DeviceChannel, DeviceTunnel, FlowRun, MirrorSession, SCHEMA_KEY, SCRCPY_PROFILES, ScriptDebugger, mintDeviceAccess, normalizeDevices, qualityMessage, schemaDefaults, schemaToVariables, submitBatch, targetParam, variablesToSchema, wsUrlFromAccess } from '../chunk-
|
|
2
|
-
export { AdminApi, AixAuthError, AixClient, AixDeviceOffline, AixError, AixLocked, AixProtocolError, AixTimeout, ApiTokensApi, AuthApi, BillingApi, ClustersApi, DeviceSession, DevicesApi, EnvRun, FleetApi, ImagesApi, LlmApi, LocalNodeController, LocatorsApi, ManagedProxiesApi, NodesApi, ProjectsApi, ReconnectingSocket, RestClient, ScriptsApi, ShortcutsApi, TasksApi, UsersApi, WebhooksApi, authHeader, buildAuthProvider, createCachedUserCredential, createClient, detectEnvOs, envBlocker, errorFromRet, executionStreamEventsAfter, executionWsTicketUrl, executionWsUrl, getIceServers, getLocale, isEnvEventFrame, isExecutionFrame, isFleetRunTerminal, isFridaEventFrame, isRetFrame, isScriptletEventFrame, isStatusFrame, joinUrl, mintViewerToken, parseIncoming, pullFile, pushFile, resolveConfig, restClient, runEnvToFinish, setLocale, summarizeEnv, t } from '../chunk-
|
|
1
|
+
export { AutomationQueue, DeviceChannel, DeviceTunnel, FlowRun, MirrorSession, SCHEMA_KEY, SCRCPY_PROFILES, ScriptDebugger, mintDeviceAccess, normalizeDevices, qualityMessage, schemaDefaults, schemaToVariables, submitBatch, targetParam, variablesToSchema, wsUrlFromAccess } from '../chunk-EP3ZSPST.js';
|
|
2
|
+
export { AdminApi, AixAuthError, AixClient, AixDeviceOffline, AixError, AixLocked, AixProtocolError, AixTimeout, ApiTokensApi, AuthApi, BillingApi, ClustersApi, DeviceSession, DevicesApi, EnvRun, FleetApi, ImagesApi, LlmApi, LocalNodeController, LocatorsApi, ManagedProxiesApi, NodesApi, ProjectsApi, ReconnectingSocket, RestClient, ScriptsApi, ShortcutsApi, TasksApi, UsersApi, WebhooksApi, authHeader, buildAuthProvider, createCachedUserCredential, createClient, detectEnvOs, envBlocker, errorFromRet, executionStreamEventsAfter, executionWsTicketUrl, executionWsUrl, getIceServers, getLocale, isEnvEventFrame, isExecutionFrame, isFleetRunTerminal, isFridaEventFrame, isRetFrame, isScriptletEventFrame, isStatusFrame, joinUrl, mintViewerToken, parseIncoming, pullFile, pushFile, resolveConfig, restClient, runEnvToFinish, setLocale, summarizeEnv, t } from '../chunk-QNDM2SKW.js';
|
|
3
3
|
export { classifyDrag, mapKey, toDevicePoint } from '../chunk-NWFYTFMI.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DeviceSession, pullFile, pushFile } from './chunk-QNDM2SKW.js';
|
package/dist/i18n/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AixI18nProvider, useAixLang, useAixT } from '../chunk-
|
|
1
|
+
export { AixI18nProvider, useAixLang, useAixT } from '../chunk-WUT5OUBG.js';
|
|
@@ -88,8 +88,9 @@ declare class MirrorSession {
|
|
|
88
88
|
/** Start a viewer session. On WebSocket reconnect the socket re-joins
|
|
89
89
|
* automatically; the node then sends a fresh offer, which is paired with a
|
|
90
90
|
* fresh RTCPeerConnection (see the `offer` handler) — no consumer action
|
|
91
|
-
* needed to restore the video track.
|
|
92
|
-
|
|
91
|
+
* needed to restore the video track. The optional signal cancels a pending
|
|
92
|
+
* join; after it resolves, use leave() to end the returned session. */
|
|
93
|
+
static join(cfg: AixConfig | ResolvedConfig, session: string, signal?: AbortSignal): Promise<MirrorSession>;
|
|
93
94
|
get stream(): MediaStream | null;
|
|
94
95
|
get connectionState(): string;
|
|
95
96
|
get controlReady(): boolean;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import react__default, { ReactNode } from 'react';
|
|
|
3
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-B7t1Ln3w.js';
|
|
4
4
|
import { D as DeviceChannel, A as AdbResult, W as WdaResult, S as ScriptEvent, e as ScriptRunInput } from '../script-debugger-6hoLEwEz.js';
|
|
5
5
|
import { F as FlowEvent, b as FlowSubmit, B as BatchConfig } from '../automation-queue-aYRO9JLj.js';
|
|
6
|
-
import { M as MirrorSession, I as InputMessage, b as ScrcpyProfileName } from '../mirror-session-
|
|
6
|
+
import { M as MirrorSession, I as InputMessage, b as ScrcpyProfileName } from '../mirror-session-CDPlWFuU.js';
|
|
7
7
|
import { w as AuthResult, aL as SendCodeResult, b3 as VerifyCodeResult, at as Project, I as CreateProjectInput, J as CreateProjectResult, aq as PowerAction, aK as ScreenshotResult, Z as ElementNode, D as DeviceRow, N as NodeRow, al as NodeScope, aJ as RegisterNodeResult, ak as NodeOwnerPolicy, aP as Shortcut, ai as NewShortcut, aR as ShortcutRunResult, ar as PowerRunResult, f as ScriptSummary, S as Script, E as Cluster, G as CreateClusterInput, $ as FleetRunDetail, _ as FleetMode, d as AgentTaskBlocker, e as AgentTaskEvidence, aX as TaskStatus, aZ as TaskSummary, aV as TaskListFilter, b4 as WebhookConfig, L as CreateWebhookInput, aI as RegisterNodeInput, af as Locator, H as CreateLocatorInput, a2 as ImageArtifact, a3 as ImageInput, ae as LlmTestResult, U as DeviceRate, aF as RateInput, y as BillingPlan, an as PlanInput, X as DeviceUsageSession, aG as RebateLedgerRow, x as BalanceResp, a$ as TopupInput, b0 as TopupResult, q as ApiTokenRow, K as CreateTokenInput, M as CreatedToken } from '../types-BbtVr3QM.js';
|
|
8
8
|
import { a as TaskAgentDevice, b as TaskAgentDeviceStatus, T as TaskAgentRunner } from '../task-agent-runner-BwRW88rl.js';
|
|
9
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-BwRW88rl.js';
|
package/dist/react/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AixProvider, DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, mapDevice, preflightTaskAgentDevice, useAdmin, useAixConfig, useApiTokens, useAuth, useAutomationQueue, useBilling, useClient, useClusters, useCommands, useDevice, useDeviceActions, useDevices, useDevicesView, useEnvGate, useEnvRun, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useQuery, useScript, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { AixProvider, DevicesProvider, GROUP_MIRROR_MAX, InspectorProvider, NodesProvider, ShortcutsProvider, mapDevice, preflightTaskAgentDevice, useAdmin, useAixConfig, useApiTokens, useAuth, useAutomationQueue, useBilling, useClient, useClusters, useCommands, useDevice, useDeviceActions, useDevices, useDevicesView, useEnvGate, useEnvRun, useFleetRun, useFlowRun, useGroupMirror, useImages, useInspector, useInspectorView, useLlm, useLocators, useMirror, useNodes, useNodesView, useProjects, useQuery, useScript, useScriptRun, useScripts, useShortcutsView, useTaskAgentRun, useTaskStatus, useTasks, useWebhooks } from '../chunk-C7RG4MXM.js';
|
|
2
|
+
import '../chunk-EP3ZSPST.js';
|
|
3
|
+
import '../chunk-QNDM2SKW.js';
|
|
4
4
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/billing.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useAixT } from '../chunk-
|
|
1
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
2
2
|
import { cn, Button, Badge, Input } from '../chunk-SKTL6ACT.js';
|
|
3
|
-
import { useBilling, useClient } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import { useBilling, useClient } from '../chunk-C7RG4MXM.js';
|
|
4
|
+
import '../chunk-EP3ZSPST.js';
|
|
5
|
+
import '../chunk-QNDM2SKW.js';
|
|
6
6
|
import '../chunk-NWFYTFMI.js';
|
|
7
7
|
import { useState, useEffect } from 'react';
|
|
8
8
|
import { SlidersHorizontal, Server, CalendarClock, Smartphone, ArrowUpCircle, ArrowDownCircle, HeadphonesIcon, Wallet, X, RefreshCw } from 'lucide-react';
|
package/dist/ui/device-create.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { AddWirelessDeviceDialog, DeviceCreate, NodePicker, ProxySpoofStep, RealDiscoverStep, VirtualSpecStep } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { AddWirelessDeviceDialog, DeviceCreate, NodePicker, ProxySpoofStep, RealDiscoverStep, VirtualSpecStep } from '../chunk-NVFMGPUG.js';
|
|
2
|
+
import '../chunk-EJWJQI5Y.js';
|
|
3
|
+
import '../chunk-WUT5OUBG.js';
|
|
4
4
|
import '../chunk-SKTL6ACT.js';
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-C7RG4MXM.js';
|
|
6
|
+
import '../chunk-EP3ZSPST.js';
|
|
7
|
+
import '../chunk-QNDM2SKW.js';
|
|
8
8
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/device-mirror.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { DeviceBootSplash, DeviceMirror, MirrorSurface, parseIosMediaCapabilities } from '../chunk-
|
|
1
|
+
export { DeviceBootSplash, DeviceMirror, MirrorSurface, parseIosMediaCapabilities } from '../chunk-573FOGYE.js';
|
|
2
2
|
import '../chunk-OEZFYKL6.js';
|
|
3
3
|
import '../chunk-E7WMHM63.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-WUT5OUBG.js';
|
|
5
5
|
import '../chunk-SKTL6ACT.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-C7RG4MXM.js';
|
|
7
|
+
import '../chunk-EP3ZSPST.js';
|
|
8
|
+
import '../chunk-QNDM2SKW.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/devices.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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-KEB4MQEF.js';
|
|
2
2
|
import '../chunk-D7J4EQTA.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-573FOGYE.js';
|
|
4
4
|
import '../chunk-OEZFYKL6.js';
|
|
5
5
|
import '../chunk-E7WMHM63.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import '../chunk-NVFMGPUG.js';
|
|
7
|
+
import '../chunk-EJWJQI5Y.js';
|
|
8
|
+
import '../chunk-WUT5OUBG.js';
|
|
9
9
|
import '../chunk-SKTL6ACT.js';
|
|
10
|
-
export { createAgentTaskRunner, preflightTaskAgentDevice } from '../chunk-
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import '../chunk-
|
|
10
|
+
export { createAgentTaskRunner, preflightTaskAgentDevice } from '../chunk-C7RG4MXM.js';
|
|
11
|
+
import '../chunk-EP3ZSPST.js';
|
|
12
|
+
import '../chunk-QNDM2SKW.js';
|
|
13
13
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/editor.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ScriptStudio } from '../chunk-
|
|
1
|
+
import { ScriptStudio } from '../chunk-R6MITP4L.js';
|
|
2
2
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
3
3
|
import '../chunk-D7J4EQTA.js';
|
|
4
|
-
import { useAixT } from '../chunk-
|
|
4
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
5
5
|
import { Select, cn } from '../chunk-SKTL6ACT.js';
|
|
6
|
-
import { useClient } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import { useClient } from '../chunk-C7RG4MXM.js';
|
|
7
|
+
import '../chunk-EP3ZSPST.js';
|
|
8
|
+
import '../chunk-QNDM2SKW.js';
|
|
9
9
|
import '../chunk-NWFYTFMI.js';
|
|
10
10
|
import { useState, useEffect, useRef, useCallback } from 'react';
|
|
11
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { ControlBar, ControlBarProps, MirrorView, MirrorViewProps } from './mirr
|
|
|
6
6
|
import { E as EnvOs, d as EnvRoute, e as EnvEventKind } from '../config-B7t1Ln3w.js';
|
|
7
7
|
import { N as NodeRow } from '../types-BbtVr3QM.js';
|
|
8
8
|
import '../coords-LPR_MPyp.js';
|
|
9
|
-
import '../mirror-session-
|
|
9
|
+
import '../mirror-session-CDPlWFuU.js';
|
|
10
10
|
|
|
11
11
|
interface DebugConsoleProps {
|
|
12
12
|
events: ScriptEvent[];
|
package/dist/ui/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { ControlBar, MirrorView } from '../chunk-E7WMHM63.js';
|
|
2
|
-
import { iosPhysicalUnavailableReason, IosDeviceDiagnostics } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { iosPhysicalUnavailableReason, IosDeviceDiagnostics } from '../chunk-EJWJQI5Y.js';
|
|
3
|
+
import '../chunk-WUT5OUBG.js';
|
|
4
4
|
import { Button, Input } from '../chunk-SKTL6ACT.js';
|
|
5
|
-
import { useScript, useEnvRun, useClient } from '../chunk-
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import { summarizeEnv, envBlocker, detectEnvOs } from '../chunk-
|
|
5
|
+
import { useScript, useEnvRun, useClient } from '../chunk-C7RG4MXM.js';
|
|
6
|
+
import '../chunk-EP3ZSPST.js';
|
|
7
|
+
import { summarizeEnv, envBlocker, detectEnvOs } from '../chunk-QNDM2SKW.js';
|
|
8
8
|
import '../chunk-NWFYTFMI.js';
|
|
9
9
|
import React4, { useState, useId, useRef, useMemo, useEffect } from 'react';
|
|
10
10
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
package/dist/ui/inspector.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useAixT } from '../chunk-
|
|
1
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
2
2
|
import { Select, Button, cn, Input, Dialog } from '../chunk-SKTL6ACT.js';
|
|
3
|
-
import { useInspectorView, useDevicesView, useClient, useLocators } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import { useInspectorView, useDevicesView, useClient, useLocators } from '../chunk-C7RG4MXM.js';
|
|
4
|
+
import '../chunk-EP3ZSPST.js';
|
|
5
|
+
import '../chunk-QNDM2SKW.js';
|
|
6
6
|
import '../chunk-NWFYTFMI.js';
|
|
7
7
|
import { useState, useMemo, useEffect, useCallback, useRef } from 'react';
|
|
8
8
|
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,8 +1,8 @@
|
|
|
1
1
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
2
|
-
import { useAixT } from '../chunk-
|
|
3
|
-
import { useScripts } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
2
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
3
|
+
import { useScripts } from '../chunk-C7RG4MXM.js';
|
|
4
|
+
import '../chunk-EP3ZSPST.js';
|
|
5
|
+
import '../chunk-QNDM2SKW.js';
|
|
6
6
|
import '../chunk-NWFYTFMI.js';
|
|
7
7
|
import { Pencil, Store } from 'lucide-react';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
package/dist/ui/mirror.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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-
|
|
3
|
+
import { C as ControlMessage } from '../mirror-session-CDPlWFuU.js';
|
|
4
4
|
import '../config-B7t1Ln3w.js';
|
|
5
5
|
import '../types-BbtVr3QM.js';
|
|
6
6
|
|
package/dist/ui/script-studio.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { CodeEditor, DeviceSelect, RunPanel, ScriptParamEditor, ScriptStudio, TimelineStep } from '../chunk-
|
|
1
|
+
export { CodeEditor, DeviceSelect, RunPanel, ScriptParamEditor, ScriptStudio, TimelineStep } from '../chunk-R6MITP4L.js';
|
|
2
2
|
export { LogConsole } from '../chunk-D7J4EQTA.js';
|
|
3
3
|
import '../chunk-SKTL6ACT.js';
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-C7RG4MXM.js';
|
|
5
|
+
import '../chunk-EP3ZSPST.js';
|
|
6
|
+
import '../chunk-QNDM2SKW.js';
|
|
7
7
|
import '../chunk-NWFYTFMI.js';
|
package/dist/ui/scripts.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useAixNav } from '../chunk-5BMFMDQR.js';
|
|
2
|
-
import { useAixT } from '../chunk-
|
|
2
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
3
3
|
import { cn, Badge, Button, Input } from '../chunk-SKTL6ACT.js';
|
|
4
|
-
import { useScripts } from '../chunk-
|
|
5
|
-
import '../chunk-
|
|
6
|
-
import '../chunk-
|
|
4
|
+
import { useScripts } from '../chunk-C7RG4MXM.js';
|
|
5
|
+
import '../chunk-EP3ZSPST.js';
|
|
6
|
+
import '../chunk-QNDM2SKW.js';
|
|
7
7
|
import '../chunk-NWFYTFMI.js';
|
|
8
8
|
import { useState, useMemo } from 'react';
|
|
9
9
|
import { AppWindow, Monitor, Smartphone, FileText, Play, Copy, Trash2, PlusCircle, LayoutGrid, Plus, Search } from 'lucide-react';
|
package/dist/ui/tasks.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { SharedParamsForm, resolveSharedRow } from '../chunk-
|
|
1
|
+
import { SharedParamsForm, resolveSharedRow } from '../chunk-KEB4MQEF.js';
|
|
2
2
|
import '../chunk-D7J4EQTA.js';
|
|
3
|
-
import '../chunk-
|
|
3
|
+
import '../chunk-573FOGYE.js';
|
|
4
4
|
import '../chunk-OEZFYKL6.js';
|
|
5
5
|
import '../chunk-E7WMHM63.js';
|
|
6
|
-
import '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import { useAixT } from '../chunk-
|
|
6
|
+
import '../chunk-NVFMGPUG.js';
|
|
7
|
+
import '../chunk-EJWJQI5Y.js';
|
|
8
|
+
import { useAixT } from '../chunk-WUT5OUBG.js';
|
|
9
9
|
import { Button, cn, Select, Input, Badge } from '../chunk-SKTL6ACT.js';
|
|
10
|
-
import { useDevicesView, useAutomationQueue, useClient, useAixConfig, useApiTokens } from '../chunk-
|
|
11
|
-
import { targetParam, variablesToSchema, schemaDefaults } from '../chunk-
|
|
12
|
-
import '../chunk-
|
|
10
|
+
import { useDevicesView, useAutomationQueue, useClient, useAixConfig, useApiTokens } from '../chunk-C7RG4MXM.js';
|
|
11
|
+
import { targetParam, variablesToSchema, schemaDefaults } from '../chunk-EP3ZSPST.js';
|
|
12
|
+
import '../chunk-QNDM2SKW.js';
|
|
13
13
|
import '../chunk-NWFYTFMI.js';
|
|
14
14
|
import { useState, useEffect, useMemo } from 'react';
|
|
15
15
|
import { RefreshCw, Plug, Plus, X, Play, ChevronDown, ChevronRight, PlayCircle, Pause, Ban, Trash2, Webhook, MonitorSmartphone, Copy } from 'lucide-react';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DeviceSession, pullFile, pushFile } from './chunk-F76N3GOA.js';
|