@swmansion/argent 0.25.1-next.9 → 0.25.1
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/bin/argent-android-devtools-0.1.0.apk +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/simulator-server +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/linux/simulator-server +0 -0
- package/bin/linux-arm64/simulator-server +0 -0
- package/bin/tcp/ax-service +0 -0
- package/bin/win32/simulator-server.exe +0 -0
- package/dist/cli-cmds.mjs +24 -5
- package/dist/installer.mjs +23 -3
- package/dist/mcp-server.mjs +17 -2
- package/dist/tool-server.cjs +1408 -1038
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +1 -1
- package/skills/argent-android-emulator-setup/SKILL.md +1 -1
- package/skills/argent-create-flow/references/flow-yaml.md +4 -4
- package/skills/argent-create-flow/references/reliability-and-recovery.md +5 -5
- package/skills/argent-metro-debugger/SKILL.md +13 -16
- package/skills/argent-metro-debugger/references/failure-scenarios.md +1 -1
- package/skills/argent-metro-debugger/references/source-maps.md +1 -1
- package/skills/argent-tv-interact/SKILL.md +1 -1
package/dist/tool-server.cjs
CHANGED
|
@@ -42,6 +42,195 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
42
42
|
));
|
|
43
43
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
44
44
|
|
|
45
|
+
// ../configuration-core/src/flags.ts
|
|
46
|
+
function getFlagDefinition(name, registry2 = FLAG_REGISTRY) {
|
|
47
|
+
return registry2.find((def) => def.name === name);
|
|
48
|
+
}
|
|
49
|
+
function findProjectRoot(startDir) {
|
|
50
|
+
let current = path.resolve(startDir);
|
|
51
|
+
while (true) {
|
|
52
|
+
for (const marker of PROJECT_MARKERS) {
|
|
53
|
+
if (fs.existsSync(path.join(current, marker))) return current;
|
|
54
|
+
}
|
|
55
|
+
const parent = path.dirname(current);
|
|
56
|
+
if (parent === current) return null;
|
|
57
|
+
current = parent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function resolveProjectRoot(startDir) {
|
|
61
|
+
return findProjectRoot(startDir) ?? path.resolve(startDir);
|
|
62
|
+
}
|
|
63
|
+
function getFlagsPath(scope, options = {}) {
|
|
64
|
+
const home = options.homeDir ?? (0, import_node_os.homedir)();
|
|
65
|
+
if (scope === "global") {
|
|
66
|
+
return path.join(home, ".argent", "flags.json");
|
|
67
|
+
}
|
|
68
|
+
const cwd = options.cwd ?? process.cwd();
|
|
69
|
+
return path.join(resolveProjectRoot(cwd), ".argent", "flags.json");
|
|
70
|
+
}
|
|
71
|
+
function readFlagsFile(filePath) {
|
|
72
|
+
let raw;
|
|
73
|
+
try {
|
|
74
|
+
raw = fs.readFileSync(filePath, "utf8");
|
|
75
|
+
} catch {
|
|
76
|
+
return {};
|
|
77
|
+
}
|
|
78
|
+
let parsed;
|
|
79
|
+
try {
|
|
80
|
+
parsed = JSON.parse(raw);
|
|
81
|
+
} catch {
|
|
82
|
+
return {};
|
|
83
|
+
}
|
|
84
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
85
|
+
const flags = parsed.flags;
|
|
86
|
+
if (!flags || typeof flags !== "object" || Array.isArray(flags)) return {};
|
|
87
|
+
const out = {};
|
|
88
|
+
for (const [k, v] of Object.entries(flags)) {
|
|
89
|
+
if (typeof v === "boolean") out[k] = v;
|
|
90
|
+
}
|
|
91
|
+
return out;
|
|
92
|
+
}
|
|
93
|
+
function readFlags(scope, options = {}) {
|
|
94
|
+
return readFlagsFile(getFlagsPath(scope, options));
|
|
95
|
+
}
|
|
96
|
+
function isFlagEnabled(name, options = {}) {
|
|
97
|
+
const projectFlags = readFlags("project", options);
|
|
98
|
+
if (Object.hasOwn(projectFlags, name)) return projectFlags[name];
|
|
99
|
+
const globalFlags = readFlags("global", options);
|
|
100
|
+
if (Object.hasOwn(globalFlags, name)) return globalFlags[name];
|
|
101
|
+
return options.default ?? false;
|
|
102
|
+
}
|
|
103
|
+
function isFeatureEnabled(name, options = {}, registry2 = FLAG_REGISTRY) {
|
|
104
|
+
return isFlagEnabled(name, {
|
|
105
|
+
...options,
|
|
106
|
+
default: getFlagDefinition(name, registry2)?.defaultEnabled ?? false
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
var fs, path, import_node_os, FLAG_REGISTRY, PROJECT_MARKERS;
|
|
110
|
+
var init_flags = __esm({
|
|
111
|
+
"../configuration-core/src/flags.ts"() {
|
|
112
|
+
"use strict";
|
|
113
|
+
fs = __toESM(require("node:fs"), 1);
|
|
114
|
+
path = __toESM(require("node:path"), 1);
|
|
115
|
+
import_node_os = require("node:os");
|
|
116
|
+
FLAG_REGISTRY = [
|
|
117
|
+
{
|
|
118
|
+
name: "disable-auto-screenshot",
|
|
119
|
+
description: "Disable the automatic screenshot captured after interaction tools."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "disable-auto-describe",
|
|
123
|
+
description: "Disable the accessibility element tree appended after interaction tools."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "argent-lens",
|
|
127
|
+
description: "Argent Lens \u2014 the propose_variant / await_user_selection tools and the Electron preview window for staging UI design variants and letting a human pick among them. Off by default while the feature is in development."
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "artifacts-list-endpoint",
|
|
131
|
+
description: "Expose GET /artifacts for remote artifact inventory consumers."
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "tool-server-event-log",
|
|
135
|
+
description: "Write structured tool-server lifecycle events to a JSONL file."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "boot-sound",
|
|
139
|
+
description: "Default boot-device's `sound` argument to true so Android emulators boot with audio output instead of muted. Only the argument's default changes \u2014 an explicit `sound: false` on a call still boots muted."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "microinteractions",
|
|
143
|
+
description: "Amplify device actions with matching animations of the host window, so what happens on the guest is also visible on the desktop. Purely cosmetic, macOS only, and never affects whether the underlying action succeeds. Off by default."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "video-watermark",
|
|
147
|
+
description: "Overlay the argent corner watermark on recorded screen videos. On by default; turn it off with `argent disable video-watermark`.",
|
|
148
|
+
defaultEnabled: true
|
|
149
|
+
}
|
|
150
|
+
];
|
|
151
|
+
PROJECT_MARKERS = [".argent", ".git", "package.json"];
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
// ../configuration-core/src/paths.ts
|
|
156
|
+
function nonEmpty(value) {
|
|
157
|
+
if (value == void 0) return null;
|
|
158
|
+
const trimmed = value.trim();
|
|
159
|
+
return trimmed === "" ? null : value;
|
|
160
|
+
}
|
|
161
|
+
function resolveHomeDir(options = {}) {
|
|
162
|
+
if (options.homeDir) return options.homeDir;
|
|
163
|
+
return process.platform === "win32" ? nonEmpty(process.env.USERPROFILE) ?? os.homedir() : nonEmpty(process.env.HOME) ?? os.homedir();
|
|
164
|
+
}
|
|
165
|
+
function argentHomeDir() {
|
|
166
|
+
return path2.join(resolveHomeDir(), ".argent");
|
|
167
|
+
}
|
|
168
|
+
function configDir(scope = "global", options = {}) {
|
|
169
|
+
if (scope === "global") {
|
|
170
|
+
return path2.join(resolveHomeDir(options), ".argent");
|
|
171
|
+
}
|
|
172
|
+
const cwd = options.cwd ?? process.cwd();
|
|
173
|
+
return path2.join(resolveProjectRoot(cwd), ".argent");
|
|
174
|
+
}
|
|
175
|
+
function configFilePath(scope = "global", options = {}) {
|
|
176
|
+
return path2.join(configDir(scope, options), "config.json");
|
|
177
|
+
}
|
|
178
|
+
var os, path2;
|
|
179
|
+
var init_paths = __esm({
|
|
180
|
+
"../configuration-core/src/paths.ts"() {
|
|
181
|
+
"use strict";
|
|
182
|
+
os = __toESM(require("node:os"), 1);
|
|
183
|
+
path2 = __toESM(require("node:path"), 1);
|
|
184
|
+
init_flags();
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// ../configuration-core/src/config.ts
|
|
189
|
+
function readConfigObject(scope = "global", options = {}) {
|
|
190
|
+
try {
|
|
191
|
+
const raw = fs2.readFileSync(configFilePath(scope, options), "utf8");
|
|
192
|
+
const json2 = JSON.parse(raw);
|
|
193
|
+
if (json2 && typeof json2 === "object" && !Array.isArray(json2)) {
|
|
194
|
+
return json2;
|
|
195
|
+
}
|
|
196
|
+
} catch {
|
|
197
|
+
}
|
|
198
|
+
return {};
|
|
199
|
+
}
|
|
200
|
+
function splitKey(dottedKey) {
|
|
201
|
+
const parts2 = dottedKey.split(".");
|
|
202
|
+
if (parts2.length === 0 || parts2.some((p) => p === "")) {
|
|
203
|
+
throw new Error(`Invalid config key "${dottedKey}": empty path segment`);
|
|
204
|
+
}
|
|
205
|
+
for (const p of parts2) {
|
|
206
|
+
if (FORBIDDEN_SEGMENTS.has(p)) {
|
|
207
|
+
throw new Error(`Invalid config key "${dottedKey}": forbidden segment "${p}"`);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return parts2;
|
|
211
|
+
}
|
|
212
|
+
function isPlainObject(value) {
|
|
213
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
214
|
+
}
|
|
215
|
+
function getAtPath(obj, dottedKey) {
|
|
216
|
+
const parts2 = splitKey(dottedKey);
|
|
217
|
+
let cur = obj;
|
|
218
|
+
for (const part of parts2) {
|
|
219
|
+
if (!isPlainObject(cur)) return void 0;
|
|
220
|
+
cur = cur[part];
|
|
221
|
+
}
|
|
222
|
+
return cur;
|
|
223
|
+
}
|
|
224
|
+
var fs2, FORBIDDEN_SEGMENTS;
|
|
225
|
+
var init_config = __esm({
|
|
226
|
+
"../configuration-core/src/config.ts"() {
|
|
227
|
+
"use strict";
|
|
228
|
+
fs2 = __toESM(require("node:fs"), 1);
|
|
229
|
+
init_paths();
|
|
230
|
+
FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
|
|
45
234
|
// ../../node_modules/dotenv/lib/main.js
|
|
46
235
|
var require_main = __commonJS({
|
|
47
236
|
"../../node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
@@ -361,6 +550,401 @@ var require_main = __commonJS({
|
|
|
361
550
|
}
|
|
362
551
|
});
|
|
363
552
|
|
|
553
|
+
// ../configuration-core/src/secrets.ts
|
|
554
|
+
function envSource(env) {
|
|
555
|
+
const values = /* @__PURE__ */ new Map();
|
|
556
|
+
for (const [key2, value] of Object.entries(env)) {
|
|
557
|
+
if (value === void 0 || !key2.startsWith(SECRET_ENV_PREFIX)) continue;
|
|
558
|
+
const name = key2.slice(SECRET_ENV_PREFIX.length);
|
|
559
|
+
if (SECRET_NAME_RE.test(name)) values.set(name, value);
|
|
560
|
+
}
|
|
561
|
+
return {
|
|
562
|
+
label: `environment (${SECRET_ENV_PREFIX}*)`,
|
|
563
|
+
kind: "env",
|
|
564
|
+
present: true,
|
|
565
|
+
names: [...values.keys()].sort(),
|
|
566
|
+
values
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
function fileSource(filePath, exposure) {
|
|
570
|
+
const label = filePath;
|
|
571
|
+
const absent = {
|
|
572
|
+
label,
|
|
573
|
+
kind: "file",
|
|
574
|
+
present: false,
|
|
575
|
+
names: [],
|
|
576
|
+
values: /* @__PURE__ */ new Map()
|
|
577
|
+
};
|
|
578
|
+
if (!fs3.statSync(filePath, { throwIfNoEntry: false })) return absent;
|
|
579
|
+
let content;
|
|
580
|
+
try {
|
|
581
|
+
content = fs3.readFileSync(filePath, "utf8");
|
|
582
|
+
} catch {
|
|
583
|
+
return absent;
|
|
584
|
+
}
|
|
585
|
+
const values = /* @__PURE__ */ new Map();
|
|
586
|
+
let skippedUnprefixed = false;
|
|
587
|
+
for (const [key2, value] of Object.entries((0, import_dotenv.parse)(content))) {
|
|
588
|
+
const prefixed = key2.startsWith(SECRET_ENV_PREFIX);
|
|
589
|
+
if (exposure === "shared" && !prefixed) {
|
|
590
|
+
skippedUnprefixed = true;
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
const name = prefixed ? key2.slice(SECRET_ENV_PREFIX.length) : key2;
|
|
594
|
+
if (SECRET_NAME_RE.test(name)) values.set(name, value);
|
|
595
|
+
}
|
|
596
|
+
return {
|
|
597
|
+
label,
|
|
598
|
+
kind: "file",
|
|
599
|
+
present: true,
|
|
600
|
+
names: [...values.keys()].sort(),
|
|
601
|
+
values,
|
|
602
|
+
...values.size === 0 && skippedUnprefixed ? { needsPrefix: true } : {}
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
function secretSources(options = {}) {
|
|
606
|
+
const sources = [envSource(options.env ?? process.env)];
|
|
607
|
+
const projectRoot = findProjectRoot(options.cwd ?? process.cwd());
|
|
608
|
+
const filePaths = [];
|
|
609
|
+
if (projectRoot) {
|
|
610
|
+
filePaths.push({
|
|
611
|
+
path: path3.join(projectRoot, ".argent", SECRETS_FILE_NAME),
|
|
612
|
+
exposure: "dedicated"
|
|
613
|
+
});
|
|
614
|
+
for (const name of SHARED_ENV_FILES) {
|
|
615
|
+
filePaths.push({ path: path3.join(projectRoot, name), exposure: "shared" });
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
filePaths.push({
|
|
619
|
+
path: path3.join(resolveHomeDir(options), ".argent", SECRETS_FILE_NAME),
|
|
620
|
+
exposure: "dedicated"
|
|
621
|
+
});
|
|
622
|
+
const seen = /* @__PURE__ */ new Set();
|
|
623
|
+
for (const entry of filePaths) {
|
|
624
|
+
const resolved = path3.resolve(entry.path);
|
|
625
|
+
if (seen.has(resolved)) continue;
|
|
626
|
+
seen.add(resolved);
|
|
627
|
+
sources.push(fileSource(resolved, entry.exposure));
|
|
628
|
+
}
|
|
629
|
+
return sources;
|
|
630
|
+
}
|
|
631
|
+
function lookupSecret(name, sources) {
|
|
632
|
+
for (const source of sources) {
|
|
633
|
+
const value = source.values.get(name);
|
|
634
|
+
if (value !== void 0) return value;
|
|
635
|
+
}
|
|
636
|
+
return void 0;
|
|
637
|
+
}
|
|
638
|
+
function secretNames(sources) {
|
|
639
|
+
const names = /* @__PURE__ */ new Set();
|
|
640
|
+
for (const source of sources) for (const name of source.names) names.add(name);
|
|
641
|
+
return [...names].sort();
|
|
642
|
+
}
|
|
643
|
+
function describeSecretSources(sources) {
|
|
644
|
+
return sources.map((source, i) => {
|
|
645
|
+
const count2 = `${source.names.length} secret${source.names.length === 1 ? "" : "s"}`;
|
|
646
|
+
let state3;
|
|
647
|
+
if (!source.present) state3 = "not found";
|
|
648
|
+
else if (source.needsPrefix) {
|
|
649
|
+
state3 = `found, but no ${SECRET_ENV_PREFIX}* keys \u2014 only prefixed keys are exposed from a file the app shares`;
|
|
650
|
+
} else state3 = source.kind === "env" ? count2 : `found, ${count2}`;
|
|
651
|
+
return ` ${i + 1}. ${source.label} \u2014 ${state3}`;
|
|
652
|
+
}).join("\n");
|
|
653
|
+
}
|
|
654
|
+
function secretPlacementAdvice(name, options = {}) {
|
|
655
|
+
const globalFile = path3.join(resolveHomeDir(options), ".argent", SECRETS_FILE_NAME);
|
|
656
|
+
return `To make it available, ask the user to add \`${name}=\u2026\` to ${globalFile} (or to \`.argent/${SECRETS_FILE_NAME}\` in the project), add \`${SECRET_ENV_PREFIX}${name}=\u2026\` to the project's .env / .env.local, or export ${SECRET_ENV_PREFIX}${name} in the tool-server's environment \u2014 never ask the user for the secret value itself.`;
|
|
657
|
+
}
|
|
658
|
+
var fs3, path3, import_dotenv, SECRET_ENV_PREFIX, SECRETS_FILE_NAME, SHARED_ENV_FILES, SECRET_NAME_RE;
|
|
659
|
+
var init_secrets = __esm({
|
|
660
|
+
"../configuration-core/src/secrets.ts"() {
|
|
661
|
+
"use strict";
|
|
662
|
+
fs3 = __toESM(require("node:fs"), 1);
|
|
663
|
+
path3 = __toESM(require("node:path"), 1);
|
|
664
|
+
import_dotenv = __toESM(require_main(), 1);
|
|
665
|
+
init_flags();
|
|
666
|
+
init_paths();
|
|
667
|
+
SECRET_ENV_PREFIX = "ARGENT_SECRET_";
|
|
668
|
+
SECRETS_FILE_NAME = "secrets.env";
|
|
669
|
+
SHARED_ENV_FILES = [".env.local", ".env"];
|
|
670
|
+
SECRET_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
671
|
+
}
|
|
672
|
+
});
|
|
673
|
+
|
|
674
|
+
// ../configuration-core/src/merge.ts
|
|
675
|
+
function mergeRestrictive(local, global2) {
|
|
676
|
+
if (local === void 0) return global2;
|
|
677
|
+
if (global2 === void 0) return local;
|
|
678
|
+
if (typeof local === "boolean" && typeof global2 === "boolean") {
|
|
679
|
+
return local && global2;
|
|
680
|
+
}
|
|
681
|
+
if (typeof local === "number" && typeof global2 === "number") {
|
|
682
|
+
return Math.min(local, global2);
|
|
683
|
+
}
|
|
684
|
+
return local;
|
|
685
|
+
}
|
|
686
|
+
function toArray(value) {
|
|
687
|
+
return Array.isArray(value) ? value : null;
|
|
688
|
+
}
|
|
689
|
+
function mergeUnion(local, global2) {
|
|
690
|
+
const l = toArray(local);
|
|
691
|
+
const g = toArray(global2);
|
|
692
|
+
if (l === null && g === null) return local ?? global2;
|
|
693
|
+
const merged = [...g ?? [], ...l ?? []];
|
|
694
|
+
return Array.from(new Set(merged));
|
|
695
|
+
}
|
|
696
|
+
function mergeIntersection(local, global2) {
|
|
697
|
+
const l = toArray(local);
|
|
698
|
+
const g = toArray(global2);
|
|
699
|
+
if (l === null && g === null) return local ?? global2;
|
|
700
|
+
if (l === null) return global2;
|
|
701
|
+
if (g === null) return local;
|
|
702
|
+
const globalSet = new Set(g);
|
|
703
|
+
return l.filter((item) => globalSet.has(item));
|
|
704
|
+
}
|
|
705
|
+
function applyMergePolicy(policy, local, global2) {
|
|
706
|
+
if (typeof policy === "function") return policy({ local, global: global2 });
|
|
707
|
+
switch (policy) {
|
|
708
|
+
case "prioritize-local":
|
|
709
|
+
return local ?? global2;
|
|
710
|
+
case "prioritize-global":
|
|
711
|
+
return global2 ?? local;
|
|
712
|
+
case "prioritize-restrictive":
|
|
713
|
+
return mergeRestrictive(local, global2);
|
|
714
|
+
case "union":
|
|
715
|
+
return mergeUnion(local, global2);
|
|
716
|
+
case "intersection":
|
|
717
|
+
return mergeIntersection(local, global2);
|
|
718
|
+
default: {
|
|
719
|
+
const _exhaustive = policy;
|
|
720
|
+
return _exhaustive;
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
var init_merge = __esm({
|
|
725
|
+
"../configuration-core/src/merge.ts"() {
|
|
726
|
+
"use strict";
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
|
|
730
|
+
// ../configuration-core/src/config-schema.ts
|
|
731
|
+
function asBoolean(raw) {
|
|
732
|
+
return typeof raw === "boolean" ? raw : void 0;
|
|
733
|
+
}
|
|
734
|
+
function asString(raw) {
|
|
735
|
+
if (typeof raw !== "string") return void 0;
|
|
736
|
+
const trimmed = raw.trim();
|
|
737
|
+
return trimmed === "" ? void 0 : trimmed;
|
|
738
|
+
}
|
|
739
|
+
function asPositiveInteger(raw) {
|
|
740
|
+
return typeof raw === "number" && Number.isSafeInteger(raw) && raw > 0 ? raw : void 0;
|
|
741
|
+
}
|
|
742
|
+
function asStringArray(raw) {
|
|
743
|
+
if (!Array.isArray(raw)) return void 0;
|
|
744
|
+
const out = [];
|
|
745
|
+
for (const item of raw) {
|
|
746
|
+
if (typeof item === "string" && item.trim() !== "") out.push(item.trim());
|
|
747
|
+
}
|
|
748
|
+
return out;
|
|
749
|
+
}
|
|
750
|
+
function getConfigDefinition(key2, registry2 = CONFIG_SCHEMA) {
|
|
751
|
+
return registry2.find((def) => def.key === key2);
|
|
752
|
+
}
|
|
753
|
+
var import_node_path, MIN_SCRIPT_HEAP_LIMIT_MB, MIN_SCRIPT_TIMEOUT_MS, CONFIG_SCHEMA;
|
|
754
|
+
var init_config_schema = __esm({
|
|
755
|
+
"../configuration-core/src/config-schema.ts"() {
|
|
756
|
+
"use strict";
|
|
757
|
+
import_node_path = require("node:path");
|
|
758
|
+
MIN_SCRIPT_HEAP_LIMIT_MB = 32;
|
|
759
|
+
MIN_SCRIPT_TIMEOUT_MS = 100;
|
|
760
|
+
CONFIG_SCHEMA = [
|
|
761
|
+
{
|
|
762
|
+
key: "telemetry.enabled",
|
|
763
|
+
description: "Whether anonymous opt-out telemetry is enabled (on by default; environment opt-outs like DO_NOT_TRACK are not reflected here \u2014 `argent telemetry status` shows effective consent). `false` in either scope wins, so a committed project opt-out holds for every teammate.",
|
|
764
|
+
scopes: ["project", "global"],
|
|
765
|
+
parse: asBoolean,
|
|
766
|
+
merge: "prioritize-restrictive",
|
|
767
|
+
// Opt-out: consent.ts reads an unstored value as enabled, so the config
|
|
768
|
+
// surface must show the same rather than "(unset)".
|
|
769
|
+
default: true,
|
|
770
|
+
// Opt-in/out goes through the dedicated command so the live client is
|
|
771
|
+
// drained/reset, not just the file rewritten.
|
|
772
|
+
manageCommand: "argent telemetry"
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
key: "allowlist.enabled",
|
|
776
|
+
description: "Whether `argent update` re-applies editor auto-approve allowlist rules. Unset (the default) keeps the current behavior: update refreshes the rules for editors that already have argent configured. Set to `false` to keep update from touching editor allowlists. `false` in either scope wins, so a committed project opt-out holds for every teammate.",
|
|
777
|
+
scopes: ["project", "global"],
|
|
778
|
+
parse: asBoolean,
|
|
779
|
+
merge: "prioritize-restrictive",
|
|
780
|
+
example: "false"
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
key: "lens.agent",
|
|
784
|
+
description: "Coding-agent id remembered by `argent lens` to skip the picker.",
|
|
785
|
+
scopes: ["project", "global"],
|
|
786
|
+
parse: asString,
|
|
787
|
+
merge: "prioritize-local",
|
|
788
|
+
example: "claude"
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
key: "ios.additionalDeviceSets",
|
|
792
|
+
description: "Additional CoreSimulator device-set directories whose simulators argent should see alongside the default set. Absolute paths (or ~/\u2026); relative entries resolve against the project root (project scope) or home (global scope).",
|
|
793
|
+
scopes: ["project", "global"],
|
|
794
|
+
parse: asStringArray,
|
|
795
|
+
// Additive rather than shadowing: global baseline first, project extras
|
|
796
|
+
// after, deduplicated. `getAdditionalIosDeviceSets` re-implements this union
|
|
797
|
+
// (path resolution must precede dedup) and guards on the preset staying "union".
|
|
798
|
+
merge: "union",
|
|
799
|
+
example: '["~/DeviceSets/ci"]'
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
key: "android.sdkRoot",
|
|
803
|
+
description: "Android SDK root argent uses instead of `ANDROID_HOME`, for hosts whose SDK is not where the environment says (Nix, custom layouts). Absolute or `~/`-prefixed. Applies to the tool-server and to the simulator-server it starts. `adb` on PATH still wins, as it does with the environment variable.",
|
|
804
|
+
scopes: ["project", "global"],
|
|
805
|
+
parse: (raw) => {
|
|
806
|
+
const value = asString(raw);
|
|
807
|
+
return value !== void 0 && (value === "~" || value.startsWith("~/") || (0, import_node_path.isAbsolute)(value)) ? value : void 0;
|
|
808
|
+
},
|
|
809
|
+
expected: "an absolute path, or one starting with `~/`",
|
|
810
|
+
merge: "prioritize-local",
|
|
811
|
+
example: "~/Library/Android/sdk"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
key: "recordings.directory",
|
|
815
|
+
description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
|
|
816
|
+
scopes: ["project", "global"],
|
|
817
|
+
parse: asString,
|
|
818
|
+
// Resolved on the client (the machine the mp4 is persisted to), so with a
|
|
819
|
+
// remote `argent link` tool-server it is the *client's* config that decides.
|
|
820
|
+
merge: "prioritize-local",
|
|
821
|
+
example: "~/Movies/argent"
|
|
822
|
+
},
|
|
823
|
+
// Global-scope only: a checked-in `.argent/config.json` must not raise the
|
|
824
|
+
// ceiling on how much of the machine a script step may occupy. `merge` is
|
|
825
|
+
// nominal here — the project scope of a global-only key is never read.
|
|
826
|
+
{
|
|
827
|
+
key: "scripts.maxTimeoutMs",
|
|
828
|
+
description: `Upper bound, in milliseconds, on the time limit a flow \`script\` step may ask for (default 300000 \u2014 five minutes). Bounds how long one script can occupy the host. Values below ${MIN_SCRIPT_TIMEOUT_MS} ms are refused: the step starts a Node process before the script runs, so a smaller ceiling ends a script that did nothing wrong.`,
|
|
829
|
+
scopes: ["global"],
|
|
830
|
+
parse: (raw) => {
|
|
831
|
+
const value = asPositiveInteger(raw);
|
|
832
|
+
return value !== void 0 && value >= MIN_SCRIPT_TIMEOUT_MS ? value : void 0;
|
|
833
|
+
},
|
|
834
|
+
expected: `a whole number of milliseconds, at least ${MIN_SCRIPT_TIMEOUT_MS}`,
|
|
835
|
+
merge: "prioritize-global",
|
|
836
|
+
default: 5 * 6e4,
|
|
837
|
+
example: "300000"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
key: "scripts.heapLimitMb",
|
|
841
|
+
description: `Old-space heap limit, in MiB, given to each flow \`script\` process (default 512). Values below ${MIN_SCRIPT_HEAP_LIMIT_MB} MiB are refused: that is already below what importing a real npm dependency needs, and under about 5 MiB the process dies inside V8's own startup before any script runs.`,
|
|
842
|
+
scopes: ["global"],
|
|
843
|
+
parse: (raw) => {
|
|
844
|
+
const value = asPositiveInteger(raw);
|
|
845
|
+
return value !== void 0 && value >= MIN_SCRIPT_HEAP_LIMIT_MB ? value : void 0;
|
|
846
|
+
},
|
|
847
|
+
expected: `a whole number of MiB, at least ${MIN_SCRIPT_HEAP_LIMIT_MB}`,
|
|
848
|
+
merge: "prioritize-global",
|
|
849
|
+
default: 512,
|
|
850
|
+
example: "512"
|
|
851
|
+
}
|
|
852
|
+
];
|
|
853
|
+
}
|
|
854
|
+
});
|
|
855
|
+
|
|
856
|
+
// ../configuration-core/src/config-access.ts
|
|
857
|
+
function readScopeValue(def, scope, options) {
|
|
858
|
+
if (!def.scopes.includes(scope)) return void 0;
|
|
859
|
+
const raw = getAtPath(readConfigObject(scope, options), def.key);
|
|
860
|
+
return raw === void 0 ? void 0 : def.parse(raw);
|
|
861
|
+
}
|
|
862
|
+
function getConfigValue(def, options = {}) {
|
|
863
|
+
const local = readScopeValue(def, "project", options);
|
|
864
|
+
const global2 = readScopeValue(def, "global", options);
|
|
865
|
+
const merged = applyMergePolicy(def.merge, local, global2);
|
|
866
|
+
return merged ?? def.default;
|
|
867
|
+
}
|
|
868
|
+
function getConfigValueByKey(key2, options = {}, registry2 = CONFIG_SCHEMA) {
|
|
869
|
+
const def = requireDefinition(key2, registry2);
|
|
870
|
+
return getConfigValue(def, options);
|
|
871
|
+
}
|
|
872
|
+
function requireDefinition(key2, registry2 = CONFIG_SCHEMA) {
|
|
873
|
+
const def = getConfigDefinition(key2, registry2);
|
|
874
|
+
if (!def) {
|
|
875
|
+
throw new UnknownConfigKeyError(key2);
|
|
876
|
+
}
|
|
877
|
+
return def;
|
|
878
|
+
}
|
|
879
|
+
function getAndroidSdkRoot(options = {}) {
|
|
880
|
+
const value = getConfigValueByKey(ANDROID_SDK_ROOT_KEY, options);
|
|
881
|
+
if (typeof value !== "string") return null;
|
|
882
|
+
const home = resolveHomeDir(options);
|
|
883
|
+
if (value === "~") return path4.resolve(home);
|
|
884
|
+
if (value.startsWith("~/")) return path4.resolve(home, value.slice(2));
|
|
885
|
+
return path4.resolve(value);
|
|
886
|
+
}
|
|
887
|
+
function getAdditionalIosDeviceSets(options = {}) {
|
|
888
|
+
const def = requireDefinition(IOS_ADDITIONAL_DEVICE_SETS_KEY);
|
|
889
|
+
if (def.merge !== "union") {
|
|
890
|
+
throw new Error(
|
|
891
|
+
`Expected "${IOS_ADDITIONAL_DEVICE_SETS_KEY}" to use the "union" merge preset; update getAdditionalIosDeviceSets to match the new policy.`
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
const home = resolveHomeDir(options);
|
|
895
|
+
const global2 = resolveDeviceSetEntries(readScopeValue(def, "global", options), home, home);
|
|
896
|
+
const project = resolveDeviceSetEntries(
|
|
897
|
+
readScopeValue(def, "project", options),
|
|
898
|
+
resolveProjectRoot(options.cwd ?? process.cwd()),
|
|
899
|
+
home
|
|
900
|
+
);
|
|
901
|
+
return Array.from(/* @__PURE__ */ new Set([...global2, ...project]));
|
|
902
|
+
}
|
|
903
|
+
function resolveDeviceSetEntries(entries, baseDir, home) {
|
|
904
|
+
if (!entries || entries.length === 0) return [];
|
|
905
|
+
return entries.map((entry) => {
|
|
906
|
+
if (entry === "~") return path4.resolve(home);
|
|
907
|
+
if (entry.startsWith("~/")) return path4.resolve(home, entry.slice(2));
|
|
908
|
+
return path4.resolve(baseDir, entry);
|
|
909
|
+
});
|
|
910
|
+
}
|
|
911
|
+
var path4, UnknownConfigKeyError, ANDROID_SDK_ROOT_KEY, IOS_ADDITIONAL_DEVICE_SETS_KEY;
|
|
912
|
+
var init_config_access = __esm({
|
|
913
|
+
"../configuration-core/src/config-access.ts"() {
|
|
914
|
+
"use strict";
|
|
915
|
+
path4 = __toESM(require("node:path"), 1);
|
|
916
|
+
init_flags();
|
|
917
|
+
init_paths();
|
|
918
|
+
init_config();
|
|
919
|
+
init_merge();
|
|
920
|
+
init_config_schema();
|
|
921
|
+
UnknownConfigKeyError = class extends Error {
|
|
922
|
+
constructor(key2) {
|
|
923
|
+
super(`Unknown configuration key "${key2}".`);
|
|
924
|
+
this.key = key2;
|
|
925
|
+
this.name = "UnknownConfigKeyError";
|
|
926
|
+
}
|
|
927
|
+
key;
|
|
928
|
+
};
|
|
929
|
+
ANDROID_SDK_ROOT_KEY = "android.sdkRoot";
|
|
930
|
+
IOS_ADDITIONAL_DEVICE_SETS_KEY = "ios.additionalDeviceSets";
|
|
931
|
+
}
|
|
932
|
+
});
|
|
933
|
+
|
|
934
|
+
// ../configuration-core/src/index.ts
|
|
935
|
+
var init_src = __esm({
|
|
936
|
+
"../configuration-core/src/index.ts"() {
|
|
937
|
+
"use strict";
|
|
938
|
+
init_flags();
|
|
939
|
+
init_paths();
|
|
940
|
+
init_config();
|
|
941
|
+
init_secrets();
|
|
942
|
+
init_merge();
|
|
943
|
+
init_config_schema();
|
|
944
|
+
init_config_access();
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
|
|
364
948
|
// ../registry/src/event-emitter.ts
|
|
365
949
|
var TypedEventEmitter;
|
|
366
950
|
var init_event_emitter = __esm({
|
|
@@ -390,7 +974,9 @@ var init_event_emitter = __esm({
|
|
|
390
974
|
return this;
|
|
391
975
|
}
|
|
392
976
|
emit(event2, ...args) {
|
|
393
|
-
this.listeners.get(event2)
|
|
977
|
+
const fns = this.listeners.get(event2);
|
|
978
|
+
if (!fns) return;
|
|
979
|
+
for (const fn of [...fns]) {
|
|
394
980
|
try {
|
|
395
981
|
fn(...args);
|
|
396
982
|
} catch (err) {
|
|
@@ -399,7 +985,7 @@ var init_event_emitter = __esm({
|
|
|
399
985
|
`
|
|
400
986
|
);
|
|
401
987
|
}
|
|
402
|
-
}
|
|
988
|
+
}
|
|
403
989
|
}
|
|
404
990
|
removeAllListeners() {
|
|
405
991
|
this.listeners.clear();
|
|
@@ -420,15 +1006,15 @@ var init_types = __esm({
|
|
|
420
1006
|
|
|
421
1007
|
// ../registry/src/artifacts.ts
|
|
422
1008
|
function inferMimeType(filePath) {
|
|
423
|
-
return MIME_BY_EXT[(0,
|
|
1009
|
+
return MIME_BY_EXT[(0, import_node_path2.extname)(filePath).toLowerCase()] ?? "application/octet-stream";
|
|
424
1010
|
}
|
|
425
|
-
var import_promises, import_node_crypto,
|
|
1011
|
+
var import_promises, import_node_crypto, import_node_path2, ARTIFACT_MARKER, MIME_BY_EXT, ArtifactStore;
|
|
426
1012
|
var init_artifacts = __esm({
|
|
427
1013
|
"../registry/src/artifacts.ts"() {
|
|
428
1014
|
"use strict";
|
|
429
1015
|
import_promises = require("node:fs/promises");
|
|
430
1016
|
import_node_crypto = require("node:crypto");
|
|
431
|
-
|
|
1017
|
+
import_node_path2 = require("node:path");
|
|
432
1018
|
ARTIFACT_MARKER = "__argentArtifact";
|
|
433
1019
|
MIME_BY_EXT = {
|
|
434
1020
|
".png": "image/png",
|
|
@@ -461,7 +1047,7 @@ var init_artifacts = __esm({
|
|
|
461
1047
|
*/
|
|
462
1048
|
async register(opts) {
|
|
463
1049
|
const { hostPath, kind } = opts;
|
|
464
|
-
const filename = opts.filename ?? (0,
|
|
1050
|
+
const filename = opts.filename ?? (0, import_node_path2.basename)(hostPath);
|
|
465
1051
|
const mimeType = opts.mimeType ?? inferMimeType(hostPath);
|
|
466
1052
|
let size = 0;
|
|
467
1053
|
let mtimeMs;
|
|
@@ -696,6 +1282,8 @@ var init_failure_codes = __esm({
|
|
|
696
1282
|
ANDROID_DEVTOOLS_WRONG_PLATFORM: "ANDROID_DEVTOOLS_WRONG_PLATFORM",
|
|
697
1283
|
ANDROID_DEVTOOLS_DEVICE_ID_INVALID: "ANDROID_DEVTOOLS_DEVICE_ID_INVALID",
|
|
698
1284
|
ANDROID_DEVTOOLS_HELPER_TERMINATED: "ANDROID_DEVTOOLS_HELPER_TERMINATED",
|
|
1285
|
+
ANDROID_DEVTOOLS_HELPER_INSTALL_FAILED: "ANDROID_DEVTOOLS_HELPER_INSTALL_FAILED",
|
|
1286
|
+
ANDROID_DEVTOOLS_HELPER_REPAIR_FAILED: "ANDROID_DEVTOOLS_HELPER_REPAIR_FAILED",
|
|
699
1287
|
ANDROID_DEVTOOLS_RPC_CLIENT_CLOSED: "ANDROID_DEVTOOLS_RPC_CLIENT_CLOSED",
|
|
700
1288
|
ANDROID_DEVTOOLS_RPC_ERROR: "ANDROID_DEVTOOLS_RPC_ERROR",
|
|
701
1289
|
ANDROID_DEVTOOLS_RPC_TIMEOUT: "ANDROID_DEVTOOLS_RPC_TIMEOUT",
|
|
@@ -16594,7 +17182,7 @@ var init_logger = __esm({
|
|
|
16594
17182
|
});
|
|
16595
17183
|
|
|
16596
17184
|
// ../registry/src/index.ts
|
|
16597
|
-
var
|
|
17185
|
+
var init_src2 = __esm({
|
|
16598
17186
|
"../registry/src/index.ts"() {
|
|
16599
17187
|
"use strict";
|
|
16600
17188
|
init_event_emitter();
|
|
@@ -70000,8 +70588,8 @@ async function commandOnPath(name) {
|
|
|
70000
70588
|
try {
|
|
70001
70589
|
if (process.platform === "win32") {
|
|
70002
70590
|
const { stdout: stdout2 } = await execFileAsync("where", [name], { timeout: 2e3 });
|
|
70003
|
-
const cwd =
|
|
70004
|
-
const match = stdout2.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).find((candidate) =>
|
|
70591
|
+
const cwd = import_node_path3.win32.resolve(process.cwd()).toLowerCase();
|
|
70592
|
+
const match = stdout2.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).find((candidate) => import_node_path3.win32.resolve(import_node_path3.win32.dirname(candidate)).toLowerCase() !== cwd);
|
|
70005
70593
|
return match ?? null;
|
|
70006
70594
|
}
|
|
70007
70595
|
const { stdout } = await execFileAsync("/bin/sh", ["-c", `command -v ${name}`], {
|
|
@@ -70013,13 +70601,13 @@ async function commandOnPath(name) {
|
|
|
70013
70601
|
return null;
|
|
70014
70602
|
}
|
|
70015
70603
|
}
|
|
70016
|
-
var import_node_child_process2, import_node_util,
|
|
70604
|
+
var import_node_child_process2, import_node_util, import_node_path3, execFileAsync;
|
|
70017
70605
|
var init_command_on_path = __esm({
|
|
70018
70606
|
"../tool-server/src/utils/command-on-path.ts"() {
|
|
70019
70607
|
"use strict";
|
|
70020
70608
|
import_node_child_process2 = require("node:child_process");
|
|
70021
70609
|
import_node_util = require("node:util");
|
|
70022
|
-
|
|
70610
|
+
import_node_path3 = require("node:path");
|
|
70023
70611
|
execFileAsync = (0, import_node_util.promisify)(import_node_child_process2.execFile);
|
|
70024
70612
|
}
|
|
70025
70613
|
});
|
|
@@ -70040,7 +70628,7 @@ async function probe(name) {
|
|
|
70040
70628
|
const onPath = await commandOnPath(name);
|
|
70041
70629
|
if (onPath) return onPath;
|
|
70042
70630
|
for (const root of androidRoots()) {
|
|
70043
|
-
const candidate = (0,
|
|
70631
|
+
const candidate = (0, import_node_path4.join)(root, SUBDIR[name], binFileName(name));
|
|
70044
70632
|
try {
|
|
70045
70633
|
await (0, import_promises2.access)(candidate, import_node_fs2.constants.X_OK);
|
|
70046
70634
|
return candidate;
|
|
@@ -70050,19 +70638,21 @@ async function probe(name) {
|
|
|
70050
70638
|
return null;
|
|
70051
70639
|
}
|
|
70052
70640
|
function androidRoots() {
|
|
70053
|
-
const envRoots = [
|
|
70054
|
-
(
|
|
70055
|
-
|
|
70641
|
+
const envRoots = [
|
|
70642
|
+
getAndroidSdkRoot(),
|
|
70643
|
+
process.env.ANDROID_HOME,
|
|
70644
|
+
process.env.ANDROID_SDK_ROOT
|
|
70645
|
+
].filter((v) => Boolean(v && v.trim()));
|
|
70056
70646
|
return [...envRoots, ...defaultAndroidRoots()];
|
|
70057
70647
|
}
|
|
70058
70648
|
function defaultAndroidRoots() {
|
|
70059
70649
|
const home = (0, import_node_os2.homedir)();
|
|
70060
70650
|
const roots = [
|
|
70061
|
-
(0,
|
|
70651
|
+
(0, import_node_path4.join)(home, "Library", "Android", "sdk"),
|
|
70062
70652
|
// macOS Android Studio default
|
|
70063
|
-
(0,
|
|
70653
|
+
(0, import_node_path4.join)(home, "Android", "Sdk"),
|
|
70064
70654
|
// Linux Android Studio default
|
|
70065
|
-
(0,
|
|
70655
|
+
(0, import_node_path4.join)(home, "android-sdk"),
|
|
70066
70656
|
// manual-install convention; no installer picks it
|
|
70067
70657
|
"/opt/android-sdk",
|
|
70068
70658
|
"/usr/lib/android-sdk",
|
|
@@ -70072,19 +70662,20 @@ function defaultAndroidRoots() {
|
|
|
70072
70662
|
];
|
|
70073
70663
|
if (process.platform === "win32") {
|
|
70074
70664
|
const localAppData = process.env.LOCALAPPDATA?.trim();
|
|
70075
|
-
if (localAppData) roots.push((0,
|
|
70076
|
-
roots.push((0,
|
|
70665
|
+
if (localAppData) roots.push((0, import_node_path4.join)(localAppData, "Android", "Sdk"));
|
|
70666
|
+
roots.push((0, import_node_path4.join)(home, "AppData", "Local", "Android", "Sdk"));
|
|
70077
70667
|
}
|
|
70078
70668
|
return roots;
|
|
70079
70669
|
}
|
|
70080
|
-
var import_promises2, import_node_fs2, import_node_os2,
|
|
70670
|
+
var import_promises2, import_node_fs2, import_node_os2, import_node_path4, SUBDIR, BIN_EXT, CACHE_TTL_MS, cache2;
|
|
70081
70671
|
var init_android_binary = __esm({
|
|
70082
70672
|
"../tool-server/src/utils/android-binary.ts"() {
|
|
70083
70673
|
"use strict";
|
|
70084
70674
|
import_promises2 = require("node:fs/promises");
|
|
70085
70675
|
import_node_fs2 = require("node:fs");
|
|
70086
70676
|
import_node_os2 = require("node:os");
|
|
70087
|
-
|
|
70677
|
+
import_node_path4 = require("node:path");
|
|
70678
|
+
init_src();
|
|
70088
70679
|
init_command_on_path();
|
|
70089
70680
|
SUBDIR = {
|
|
70090
70681
|
adb: "platform-tools",
|
|
@@ -72749,7 +73340,7 @@ var init_write = __esm({
|
|
|
72749
73340
|
});
|
|
72750
73341
|
|
|
72751
73342
|
// ../device-providers/src/index.ts
|
|
72752
|
-
var
|
|
73343
|
+
var init_src3 = __esm({
|
|
72753
73344
|
"../device-providers/src/index.ts"() {
|
|
72754
73345
|
"use strict";
|
|
72755
73346
|
init_contract();
|
|
@@ -73011,10 +73602,10 @@ var ALLOWED_ENDPOINT_SET, PROBE_TIMEOUT_MS, lastSeenCapabilities, inFlightRevoca
|
|
|
73011
73602
|
var init_external_devices = __esm({
|
|
73012
73603
|
"../tool-server/src/utils/external-devices.ts"() {
|
|
73013
73604
|
"use strict";
|
|
73605
|
+
init_src3();
|
|
73014
73606
|
init_src2();
|
|
73015
|
-
init_src();
|
|
73016
73607
|
init_device_info();
|
|
73017
|
-
|
|
73608
|
+
init_src3();
|
|
73018
73609
|
ALLOWED_ENDPOINT_SET = new Set(ALLOWED_SIM_SERVER_ENDPOINTS);
|
|
73019
73610
|
PROBE_TIMEOUT_MS = 800;
|
|
73020
73611
|
lastSeenCapabilities = /* @__PURE__ */ new Map();
|
|
@@ -77004,8 +77595,8 @@ async function emulatorSupportsFlag(flag, options = {}) {
|
|
|
77004
77595
|
} catch {
|
|
77005
77596
|
return false;
|
|
77006
77597
|
}
|
|
77007
|
-
const
|
|
77008
|
-
const cached3 = emulatorFlagSupportCache.get(
|
|
77598
|
+
const cacheKey2 = `${emulatorPath}|${flag}`;
|
|
77599
|
+
const cached3 = emulatorFlagSupportCache.get(cacheKey2);
|
|
77009
77600
|
if (cached3 !== void 0) return cached3;
|
|
77010
77601
|
let output;
|
|
77011
77602
|
let failure = null;
|
|
@@ -77032,7 +77623,7 @@ async function emulatorSupportsFlag(flag, options = {}) {
|
|
|
77032
77623
|
return false;
|
|
77033
77624
|
}
|
|
77034
77625
|
const supported = output.includes(flag);
|
|
77035
|
-
emulatorFlagSupportCache.set(
|
|
77626
|
+
emulatorFlagSupportCache.set(cacheKey2, supported);
|
|
77036
77627
|
return supported;
|
|
77037
77628
|
}
|
|
77038
77629
|
function describeAdbFailure(args, err) {
|
|
@@ -77291,7 +77882,7 @@ function avdRootCandidates() {
|
|
|
77291
77882
|
process.env.ANDROID_SDK_HOME ? `${process.env.ANDROID_SDK_HOME}/.android/avd` : null,
|
|
77292
77883
|
home ? `${home}/.android/avd` : null
|
|
77293
77884
|
];
|
|
77294
|
-
return candidates.filter((p) => Boolean(p && (0,
|
|
77885
|
+
return candidates.filter((p) => Boolean(p && (0, import_node_path7.isAbsolute)(p)));
|
|
77295
77886
|
}
|
|
77296
77887
|
async function resolveAvdPath(avdName) {
|
|
77297
77888
|
const { readFile: readFile17 } = await import("node:fs/promises");
|
|
@@ -77301,7 +77892,7 @@ async function resolveAvdPath(avdName) {
|
|
|
77301
77892
|
const raw = (0, import_ini.parse)(content).path;
|
|
77302
77893
|
if (typeof raw !== "string") continue;
|
|
77303
77894
|
const trimmed = raw.trim();
|
|
77304
|
-
if (!(0,
|
|
77895
|
+
if (!(0, import_node_path7.isAbsolute)(trimmed)) continue;
|
|
77305
77896
|
return trimmed;
|
|
77306
77897
|
} catch {
|
|
77307
77898
|
}
|
|
@@ -77325,16 +77916,16 @@ async function hasDefaultBootSnapshot(avdName) {
|
|
|
77325
77916
|
return false;
|
|
77326
77917
|
}
|
|
77327
77918
|
}
|
|
77328
|
-
var import_node_child_process12, import_node_util10, import_node_os5,
|
|
77919
|
+
var import_node_child_process12, import_node_util10, import_node_os5, import_node_path7, import_ini, execFileAsync10, emulatorFlagSupportCache, ADB_KILL_SIGNAL, ADB_DEVICE_STATES, ADB_DEVICES_TIMEOUT_MS, ENRICH_TIMEOUT_MS, androidRuntimeKindCache, TERMINAL_ADB_ERROR_PATTERNS, AVD_NAME_PATTERN;
|
|
77329
77920
|
var init_adb = __esm({
|
|
77330
77921
|
"../tool-server/src/utils/adb.ts"() {
|
|
77331
77922
|
"use strict";
|
|
77332
77923
|
import_node_child_process12 = require("node:child_process");
|
|
77333
77924
|
import_node_util10 = require("node:util");
|
|
77334
77925
|
import_node_os5 = require("node:os");
|
|
77335
|
-
|
|
77926
|
+
import_node_path7 = require("node:path");
|
|
77336
77927
|
import_ini = __toESM(require_ini());
|
|
77337
|
-
|
|
77928
|
+
init_src2();
|
|
77338
77929
|
init_android_binary();
|
|
77339
77930
|
init_subprocess_error();
|
|
77340
77931
|
init_external_devices();
|
|
@@ -78571,7 +79162,7 @@ var require_common2 = __commonJS({
|
|
|
78571
79162
|
}
|
|
78572
79163
|
var path50 = require("path");
|
|
78573
79164
|
var minimatch = require_minimatch();
|
|
78574
|
-
var
|
|
79165
|
+
var isAbsolute9 = require_path_is_absolute();
|
|
78575
79166
|
var Minimatch = minimatch.Minimatch;
|
|
78576
79167
|
function alphasorti(a, b) {
|
|
78577
79168
|
return a.toLowerCase().localeCompare(b.toLowerCase());
|
|
@@ -78714,7 +79305,7 @@ var require_common2 = __commonJS({
|
|
|
78714
79305
|
var abs = f;
|
|
78715
79306
|
if (f.charAt(0) === "/") {
|
|
78716
79307
|
abs = path50.join(self2.root, f);
|
|
78717
|
-
} else if (
|
|
79308
|
+
} else if (isAbsolute9(f) || f === "") {
|
|
78718
79309
|
abs = f;
|
|
78719
79310
|
} else if (self2.changedCwd) {
|
|
78720
79311
|
abs = path50.resolve(self2.cwd, f);
|
|
@@ -78752,7 +79343,7 @@ var require_sync = __commonJS({
|
|
|
78752
79343
|
var util = require("util");
|
|
78753
79344
|
var path50 = require("path");
|
|
78754
79345
|
var assert2 = require("assert");
|
|
78755
|
-
var
|
|
79346
|
+
var isAbsolute9 = require_path_is_absolute();
|
|
78756
79347
|
var common = require_common2();
|
|
78757
79348
|
var alphasort = common.alphasort;
|
|
78758
79349
|
var alphasorti = common.alphasorti;
|
|
@@ -78826,8 +79417,8 @@ var require_sync = __commonJS({
|
|
|
78826
79417
|
var read;
|
|
78827
79418
|
if (prefix === null)
|
|
78828
79419
|
read = ".";
|
|
78829
|
-
else if (
|
|
78830
|
-
if (!prefix || !
|
|
79420
|
+
else if (isAbsolute9(prefix) || isAbsolute9(pattern.join("/"))) {
|
|
79421
|
+
if (!prefix || !isAbsolute9(prefix))
|
|
78831
79422
|
prefix = "/" + prefix;
|
|
78832
79423
|
read = prefix;
|
|
78833
79424
|
} else
|
|
@@ -79012,7 +79603,7 @@ var require_sync = __commonJS({
|
|
|
79012
79603
|
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
79013
79604
|
if (!exists2)
|
|
79014
79605
|
return;
|
|
79015
|
-
if (prefix &&
|
|
79606
|
+
if (prefix && isAbsolute9(prefix) && !this.nomount) {
|
|
79016
79607
|
var trail = /[\/\\]$/.test(prefix);
|
|
79017
79608
|
if (prefix.charAt(0) === "/") {
|
|
79018
79609
|
prefix = path50.join(this.root, prefix);
|
|
@@ -79132,7 +79723,7 @@ var require_glob = __commonJS({
|
|
|
79132
79723
|
var EE = require("events").EventEmitter;
|
|
79133
79724
|
var path50 = require("path");
|
|
79134
79725
|
var assert2 = require("assert");
|
|
79135
|
-
var
|
|
79726
|
+
var isAbsolute9 = require_path_is_absolute();
|
|
79136
79727
|
var globSync = require_sync();
|
|
79137
79728
|
var common = require_common2();
|
|
79138
79729
|
var alphasort = common.alphasort;
|
|
@@ -79346,8 +79937,8 @@ var require_glob = __commonJS({
|
|
|
79346
79937
|
var read;
|
|
79347
79938
|
if (prefix === null)
|
|
79348
79939
|
read = ".";
|
|
79349
|
-
else if (
|
|
79350
|
-
if (!prefix || !
|
|
79940
|
+
else if (isAbsolute9(prefix) || isAbsolute9(pattern.join("/"))) {
|
|
79941
|
+
if (!prefix || !isAbsolute9(prefix))
|
|
79351
79942
|
prefix = "/" + prefix;
|
|
79352
79943
|
read = prefix;
|
|
79353
79944
|
} else
|
|
@@ -79579,7 +80170,7 @@ var require_glob = __commonJS({
|
|
|
79579
80170
|
this.matches[index] = /* @__PURE__ */ Object.create(null);
|
|
79580
80171
|
if (!exists2)
|
|
79581
80172
|
return cb();
|
|
79582
|
-
if (prefix &&
|
|
80173
|
+
if (prefix && isAbsolute9(prefix) && !this.nomount) {
|
|
79583
80174
|
var trail = /[\/\\]$/.test(prefix);
|
|
79584
80175
|
if (prefix.charAt(0) === "/") {
|
|
79585
80176
|
prefix = path50.join(this.root, prefix);
|
|
@@ -90663,503 +91254,8 @@ __export(index_exports, {
|
|
|
90663
91254
|
module.exports = __toCommonJS(index_exports);
|
|
90664
91255
|
var path49 = __toESM(require("node:path"));
|
|
90665
91256
|
var import_node_os14 = require("node:os");
|
|
90666
|
-
|
|
90667
|
-
// ../configuration-core/src/flags.ts
|
|
90668
|
-
var fs = __toESM(require("node:fs"), 1);
|
|
90669
|
-
var path = __toESM(require("node:path"), 1);
|
|
90670
|
-
var import_node_os = require("node:os");
|
|
90671
|
-
var FLAG_REGISTRY = [
|
|
90672
|
-
{
|
|
90673
|
-
name: "disable-auto-screenshot",
|
|
90674
|
-
description: "Disable the automatic screenshot captured after interaction tools."
|
|
90675
|
-
},
|
|
90676
|
-
{
|
|
90677
|
-
name: "disable-auto-describe",
|
|
90678
|
-
description: "Disable the accessibility element tree appended after interaction tools."
|
|
90679
|
-
},
|
|
90680
|
-
{
|
|
90681
|
-
name: "argent-lens",
|
|
90682
|
-
description: "Argent Lens \u2014 the propose_variant / await_user_selection tools and the Electron preview window for staging UI design variants and letting a human pick among them. Off by default while the feature is in development."
|
|
90683
|
-
},
|
|
90684
|
-
{
|
|
90685
|
-
name: "artifacts-list-endpoint",
|
|
90686
|
-
description: "Expose GET /artifacts for remote artifact inventory consumers."
|
|
90687
|
-
},
|
|
90688
|
-
{
|
|
90689
|
-
name: "tool-server-event-log",
|
|
90690
|
-
description: "Write structured tool-server lifecycle events to a JSONL file."
|
|
90691
|
-
},
|
|
90692
|
-
{
|
|
90693
|
-
name: "boot-sound",
|
|
90694
|
-
description: "Default boot-device's `sound` argument to true so Android emulators boot with audio output instead of muted. Only the argument's default changes \u2014 an explicit `sound: false` on a call still boots muted."
|
|
90695
|
-
},
|
|
90696
|
-
{
|
|
90697
|
-
name: "microinteractions",
|
|
90698
|
-
description: "Amplify device actions with matching animations of the host window, so what happens on the guest is also visible on the desktop. Purely cosmetic, macOS only, and never affects whether the underlying action succeeds. Off by default."
|
|
90699
|
-
},
|
|
90700
|
-
{
|
|
90701
|
-
name: "video-watermark",
|
|
90702
|
-
description: "Overlay the argent corner watermark on recorded screen videos. On by default; turn it off with `argent disable video-watermark`.",
|
|
90703
|
-
defaultEnabled: true
|
|
90704
|
-
}
|
|
90705
|
-
];
|
|
90706
|
-
function getFlagDefinition(name, registry2 = FLAG_REGISTRY) {
|
|
90707
|
-
return registry2.find((def) => def.name === name);
|
|
90708
|
-
}
|
|
90709
|
-
var PROJECT_MARKERS = [".argent", ".git", "package.json"];
|
|
90710
|
-
function findProjectRoot(startDir) {
|
|
90711
|
-
let current = path.resolve(startDir);
|
|
90712
|
-
while (true) {
|
|
90713
|
-
for (const marker of PROJECT_MARKERS) {
|
|
90714
|
-
if (fs.existsSync(path.join(current, marker))) return current;
|
|
90715
|
-
}
|
|
90716
|
-
const parent = path.dirname(current);
|
|
90717
|
-
if (parent === current) return null;
|
|
90718
|
-
current = parent;
|
|
90719
|
-
}
|
|
90720
|
-
}
|
|
90721
|
-
function resolveProjectRoot(startDir) {
|
|
90722
|
-
return findProjectRoot(startDir) ?? path.resolve(startDir);
|
|
90723
|
-
}
|
|
90724
|
-
function getFlagsPath(scope, options = {}) {
|
|
90725
|
-
const home = options.homeDir ?? (0, import_node_os.homedir)();
|
|
90726
|
-
if (scope === "global") {
|
|
90727
|
-
return path.join(home, ".argent", "flags.json");
|
|
90728
|
-
}
|
|
90729
|
-
const cwd = options.cwd ?? process.cwd();
|
|
90730
|
-
return path.join(resolveProjectRoot(cwd), ".argent", "flags.json");
|
|
90731
|
-
}
|
|
90732
|
-
function readFlagsFile(filePath) {
|
|
90733
|
-
let raw;
|
|
90734
|
-
try {
|
|
90735
|
-
raw = fs.readFileSync(filePath, "utf8");
|
|
90736
|
-
} catch {
|
|
90737
|
-
return {};
|
|
90738
|
-
}
|
|
90739
|
-
let parsed;
|
|
90740
|
-
try {
|
|
90741
|
-
parsed = JSON.parse(raw);
|
|
90742
|
-
} catch {
|
|
90743
|
-
return {};
|
|
90744
|
-
}
|
|
90745
|
-
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
90746
|
-
const flags = parsed.flags;
|
|
90747
|
-
if (!flags || typeof flags !== "object" || Array.isArray(flags)) return {};
|
|
90748
|
-
const out = {};
|
|
90749
|
-
for (const [k, v] of Object.entries(flags)) {
|
|
90750
|
-
if (typeof v === "boolean") out[k] = v;
|
|
90751
|
-
}
|
|
90752
|
-
return out;
|
|
90753
|
-
}
|
|
90754
|
-
function readFlags(scope, options = {}) {
|
|
90755
|
-
return readFlagsFile(getFlagsPath(scope, options));
|
|
90756
|
-
}
|
|
90757
|
-
function isFlagEnabled(name, options = {}) {
|
|
90758
|
-
const projectFlags = readFlags("project", options);
|
|
90759
|
-
if (Object.hasOwn(projectFlags, name)) return projectFlags[name];
|
|
90760
|
-
const globalFlags = readFlags("global", options);
|
|
90761
|
-
if (Object.hasOwn(globalFlags, name)) return globalFlags[name];
|
|
90762
|
-
return options.default ?? false;
|
|
90763
|
-
}
|
|
90764
|
-
function isFeatureEnabled(name, options = {}, registry2 = FLAG_REGISTRY) {
|
|
90765
|
-
return isFlagEnabled(name, {
|
|
90766
|
-
...options,
|
|
90767
|
-
default: getFlagDefinition(name, registry2)?.defaultEnabled ?? false
|
|
90768
|
-
});
|
|
90769
|
-
}
|
|
90770
|
-
|
|
90771
|
-
// ../configuration-core/src/paths.ts
|
|
90772
|
-
var os = __toESM(require("node:os"), 1);
|
|
90773
|
-
var path2 = __toESM(require("node:path"), 1);
|
|
90774
|
-
function nonEmpty(value) {
|
|
90775
|
-
if (value == void 0) return null;
|
|
90776
|
-
const trimmed = value.trim();
|
|
90777
|
-
return trimmed === "" ? null : value;
|
|
90778
|
-
}
|
|
90779
|
-
function resolveHomeDir(options = {}) {
|
|
90780
|
-
if (options.homeDir) return options.homeDir;
|
|
90781
|
-
return process.platform === "win32" ? nonEmpty(process.env.USERPROFILE) ?? os.homedir() : nonEmpty(process.env.HOME) ?? os.homedir();
|
|
90782
|
-
}
|
|
90783
|
-
function argentHomeDir() {
|
|
90784
|
-
return path2.join(resolveHomeDir(), ".argent");
|
|
90785
|
-
}
|
|
90786
|
-
function configDir(scope = "global", options = {}) {
|
|
90787
|
-
if (scope === "global") {
|
|
90788
|
-
return path2.join(resolveHomeDir(options), ".argent");
|
|
90789
|
-
}
|
|
90790
|
-
const cwd = options.cwd ?? process.cwd();
|
|
90791
|
-
return path2.join(resolveProjectRoot(cwd), ".argent");
|
|
90792
|
-
}
|
|
90793
|
-
function configFilePath(scope = "global", options = {}) {
|
|
90794
|
-
return path2.join(configDir(scope, options), "config.json");
|
|
90795
|
-
}
|
|
90796
|
-
|
|
90797
|
-
// ../configuration-core/src/config.ts
|
|
90798
|
-
var fs2 = __toESM(require("node:fs"), 1);
|
|
90799
|
-
function readConfigObject(scope = "global", options = {}) {
|
|
90800
|
-
try {
|
|
90801
|
-
const raw = fs2.readFileSync(configFilePath(scope, options), "utf8");
|
|
90802
|
-
const json2 = JSON.parse(raw);
|
|
90803
|
-
if (json2 && typeof json2 === "object" && !Array.isArray(json2)) {
|
|
90804
|
-
return json2;
|
|
90805
|
-
}
|
|
90806
|
-
} catch {
|
|
90807
|
-
}
|
|
90808
|
-
return {};
|
|
90809
|
-
}
|
|
90810
|
-
var FORBIDDEN_SEGMENTS = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
90811
|
-
function splitKey(dottedKey) {
|
|
90812
|
-
const parts2 = dottedKey.split(".");
|
|
90813
|
-
if (parts2.length === 0 || parts2.some((p) => p === "")) {
|
|
90814
|
-
throw new Error(`Invalid config key "${dottedKey}": empty path segment`);
|
|
90815
|
-
}
|
|
90816
|
-
for (const p of parts2) {
|
|
90817
|
-
if (FORBIDDEN_SEGMENTS.has(p)) {
|
|
90818
|
-
throw new Error(`Invalid config key "${dottedKey}": forbidden segment "${p}"`);
|
|
90819
|
-
}
|
|
90820
|
-
}
|
|
90821
|
-
return parts2;
|
|
90822
|
-
}
|
|
90823
|
-
function isPlainObject(value) {
|
|
90824
|
-
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
90825
|
-
}
|
|
90826
|
-
function getAtPath(obj, dottedKey) {
|
|
90827
|
-
const parts2 = splitKey(dottedKey);
|
|
90828
|
-
let cur = obj;
|
|
90829
|
-
for (const part of parts2) {
|
|
90830
|
-
if (!isPlainObject(cur)) return void 0;
|
|
90831
|
-
cur = cur[part];
|
|
90832
|
-
}
|
|
90833
|
-
return cur;
|
|
90834
|
-
}
|
|
90835
|
-
|
|
90836
|
-
// ../configuration-core/src/secrets.ts
|
|
90837
|
-
var fs3 = __toESM(require("node:fs"), 1);
|
|
90838
|
-
var path3 = __toESM(require("node:path"), 1);
|
|
90839
|
-
var import_dotenv = __toESM(require_main(), 1);
|
|
90840
|
-
var SECRET_ENV_PREFIX = "ARGENT_SECRET_";
|
|
90841
|
-
var SECRETS_FILE_NAME = "secrets.env";
|
|
90842
|
-
var SHARED_ENV_FILES = [".env.local", ".env"];
|
|
90843
|
-
var SECRET_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
90844
|
-
function envSource(env) {
|
|
90845
|
-
const values = /* @__PURE__ */ new Map();
|
|
90846
|
-
for (const [key2, value] of Object.entries(env)) {
|
|
90847
|
-
if (value === void 0 || !key2.startsWith(SECRET_ENV_PREFIX)) continue;
|
|
90848
|
-
const name = key2.slice(SECRET_ENV_PREFIX.length);
|
|
90849
|
-
if (SECRET_NAME_RE.test(name)) values.set(name, value);
|
|
90850
|
-
}
|
|
90851
|
-
return {
|
|
90852
|
-
label: `environment (${SECRET_ENV_PREFIX}*)`,
|
|
90853
|
-
kind: "env",
|
|
90854
|
-
present: true,
|
|
90855
|
-
names: [...values.keys()].sort(),
|
|
90856
|
-
values
|
|
90857
|
-
};
|
|
90858
|
-
}
|
|
90859
|
-
function fileSource(filePath, exposure) {
|
|
90860
|
-
const label = filePath;
|
|
90861
|
-
const absent = {
|
|
90862
|
-
label,
|
|
90863
|
-
kind: "file",
|
|
90864
|
-
present: false,
|
|
90865
|
-
names: [],
|
|
90866
|
-
values: /* @__PURE__ */ new Map()
|
|
90867
|
-
};
|
|
90868
|
-
if (!fs3.statSync(filePath, { throwIfNoEntry: false })) return absent;
|
|
90869
|
-
let content;
|
|
90870
|
-
try {
|
|
90871
|
-
content = fs3.readFileSync(filePath, "utf8");
|
|
90872
|
-
} catch {
|
|
90873
|
-
return absent;
|
|
90874
|
-
}
|
|
90875
|
-
const values = /* @__PURE__ */ new Map();
|
|
90876
|
-
let skippedUnprefixed = false;
|
|
90877
|
-
for (const [key2, value] of Object.entries((0, import_dotenv.parse)(content))) {
|
|
90878
|
-
const prefixed = key2.startsWith(SECRET_ENV_PREFIX);
|
|
90879
|
-
if (exposure === "shared" && !prefixed) {
|
|
90880
|
-
skippedUnprefixed = true;
|
|
90881
|
-
continue;
|
|
90882
|
-
}
|
|
90883
|
-
const name = prefixed ? key2.slice(SECRET_ENV_PREFIX.length) : key2;
|
|
90884
|
-
if (SECRET_NAME_RE.test(name)) values.set(name, value);
|
|
90885
|
-
}
|
|
90886
|
-
return {
|
|
90887
|
-
label,
|
|
90888
|
-
kind: "file",
|
|
90889
|
-
present: true,
|
|
90890
|
-
names: [...values.keys()].sort(),
|
|
90891
|
-
values,
|
|
90892
|
-
...values.size === 0 && skippedUnprefixed ? { needsPrefix: true } : {}
|
|
90893
|
-
};
|
|
90894
|
-
}
|
|
90895
|
-
function secretSources(options = {}) {
|
|
90896
|
-
const sources = [envSource(options.env ?? process.env)];
|
|
90897
|
-
const projectRoot = findProjectRoot(options.cwd ?? process.cwd());
|
|
90898
|
-
const filePaths = [];
|
|
90899
|
-
if (projectRoot) {
|
|
90900
|
-
filePaths.push({
|
|
90901
|
-
path: path3.join(projectRoot, ".argent", SECRETS_FILE_NAME),
|
|
90902
|
-
exposure: "dedicated"
|
|
90903
|
-
});
|
|
90904
|
-
for (const name of SHARED_ENV_FILES) {
|
|
90905
|
-
filePaths.push({ path: path3.join(projectRoot, name), exposure: "shared" });
|
|
90906
|
-
}
|
|
90907
|
-
}
|
|
90908
|
-
filePaths.push({
|
|
90909
|
-
path: path3.join(resolveHomeDir(options), ".argent", SECRETS_FILE_NAME),
|
|
90910
|
-
exposure: "dedicated"
|
|
90911
|
-
});
|
|
90912
|
-
const seen = /* @__PURE__ */ new Set();
|
|
90913
|
-
for (const entry of filePaths) {
|
|
90914
|
-
const resolved = path3.resolve(entry.path);
|
|
90915
|
-
if (seen.has(resolved)) continue;
|
|
90916
|
-
seen.add(resolved);
|
|
90917
|
-
sources.push(fileSource(resolved, entry.exposure));
|
|
90918
|
-
}
|
|
90919
|
-
return sources;
|
|
90920
|
-
}
|
|
90921
|
-
function lookupSecret(name, sources) {
|
|
90922
|
-
for (const source of sources) {
|
|
90923
|
-
const value = source.values.get(name);
|
|
90924
|
-
if (value !== void 0) return value;
|
|
90925
|
-
}
|
|
90926
|
-
return void 0;
|
|
90927
|
-
}
|
|
90928
|
-
function secretNames(sources) {
|
|
90929
|
-
const names = /* @__PURE__ */ new Set();
|
|
90930
|
-
for (const source of sources) for (const name of source.names) names.add(name);
|
|
90931
|
-
return [...names].sort();
|
|
90932
|
-
}
|
|
90933
|
-
function describeSecretSources(sources) {
|
|
90934
|
-
return sources.map((source, i) => {
|
|
90935
|
-
const count2 = `${source.names.length} secret${source.names.length === 1 ? "" : "s"}`;
|
|
90936
|
-
let state3;
|
|
90937
|
-
if (!source.present) state3 = "not found";
|
|
90938
|
-
else if (source.needsPrefix) {
|
|
90939
|
-
state3 = `found, but no ${SECRET_ENV_PREFIX}* keys \u2014 only prefixed keys are exposed from a file the app shares`;
|
|
90940
|
-
} else state3 = source.kind === "env" ? count2 : `found, ${count2}`;
|
|
90941
|
-
return ` ${i + 1}. ${source.label} \u2014 ${state3}`;
|
|
90942
|
-
}).join("\n");
|
|
90943
|
-
}
|
|
90944
|
-
function secretPlacementAdvice(name, options = {}) {
|
|
90945
|
-
const globalFile = path3.join(resolveHomeDir(options), ".argent", SECRETS_FILE_NAME);
|
|
90946
|
-
return `To make it available, ask the user to add \`${name}=\u2026\` to ${globalFile} (or to \`.argent/${SECRETS_FILE_NAME}\` in the project), add \`${SECRET_ENV_PREFIX}${name}=\u2026\` to the project's .env / .env.local, or export ${SECRET_ENV_PREFIX}${name} in the tool-server's environment \u2014 never ask the user for the secret value itself.`;
|
|
90947
|
-
}
|
|
90948
|
-
|
|
90949
|
-
// ../configuration-core/src/merge.ts
|
|
90950
|
-
function mergeRestrictive(local, global2) {
|
|
90951
|
-
if (local === void 0) return global2;
|
|
90952
|
-
if (global2 === void 0) return local;
|
|
90953
|
-
if (typeof local === "boolean" && typeof global2 === "boolean") {
|
|
90954
|
-
return local && global2;
|
|
90955
|
-
}
|
|
90956
|
-
if (typeof local === "number" && typeof global2 === "number") {
|
|
90957
|
-
return Math.min(local, global2);
|
|
90958
|
-
}
|
|
90959
|
-
return local;
|
|
90960
|
-
}
|
|
90961
|
-
function toArray(value) {
|
|
90962
|
-
return Array.isArray(value) ? value : null;
|
|
90963
|
-
}
|
|
90964
|
-
function mergeUnion(local, global2) {
|
|
90965
|
-
const l = toArray(local);
|
|
90966
|
-
const g = toArray(global2);
|
|
90967
|
-
if (l === null && g === null) return local ?? global2;
|
|
90968
|
-
const merged = [...g ?? [], ...l ?? []];
|
|
90969
|
-
return Array.from(new Set(merged));
|
|
90970
|
-
}
|
|
90971
|
-
function mergeIntersection(local, global2) {
|
|
90972
|
-
const l = toArray(local);
|
|
90973
|
-
const g = toArray(global2);
|
|
90974
|
-
if (l === null && g === null) return local ?? global2;
|
|
90975
|
-
if (l === null) return global2;
|
|
90976
|
-
if (g === null) return local;
|
|
90977
|
-
const globalSet = new Set(g);
|
|
90978
|
-
return l.filter((item) => globalSet.has(item));
|
|
90979
|
-
}
|
|
90980
|
-
function applyMergePolicy(policy, local, global2) {
|
|
90981
|
-
if (typeof policy === "function") return policy({ local, global: global2 });
|
|
90982
|
-
switch (policy) {
|
|
90983
|
-
case "prioritize-local":
|
|
90984
|
-
return local ?? global2;
|
|
90985
|
-
case "prioritize-global":
|
|
90986
|
-
return global2 ?? local;
|
|
90987
|
-
case "prioritize-restrictive":
|
|
90988
|
-
return mergeRestrictive(local, global2);
|
|
90989
|
-
case "union":
|
|
90990
|
-
return mergeUnion(local, global2);
|
|
90991
|
-
case "intersection":
|
|
90992
|
-
return mergeIntersection(local, global2);
|
|
90993
|
-
default: {
|
|
90994
|
-
const _exhaustive = policy;
|
|
90995
|
-
return _exhaustive;
|
|
90996
|
-
}
|
|
90997
|
-
}
|
|
90998
|
-
}
|
|
90999
|
-
|
|
91000
|
-
// ../configuration-core/src/config-schema.ts
|
|
91001
|
-
function asBoolean(raw) {
|
|
91002
|
-
return typeof raw === "boolean" ? raw : void 0;
|
|
91003
|
-
}
|
|
91004
|
-
function asString(raw) {
|
|
91005
|
-
if (typeof raw !== "string") return void 0;
|
|
91006
|
-
const trimmed = raw.trim();
|
|
91007
|
-
return trimmed === "" ? void 0 : trimmed;
|
|
91008
|
-
}
|
|
91009
|
-
function asPositiveInteger(raw) {
|
|
91010
|
-
return typeof raw === "number" && Number.isSafeInteger(raw) && raw > 0 ? raw : void 0;
|
|
91011
|
-
}
|
|
91012
|
-
var MIN_SCRIPT_HEAP_LIMIT_MB = 32;
|
|
91013
|
-
var MIN_SCRIPT_TIMEOUT_MS = 100;
|
|
91014
|
-
function asStringArray(raw) {
|
|
91015
|
-
if (!Array.isArray(raw)) return void 0;
|
|
91016
|
-
const out = [];
|
|
91017
|
-
for (const item of raw) {
|
|
91018
|
-
if (typeof item === "string" && item.trim() !== "") out.push(item.trim());
|
|
91019
|
-
}
|
|
91020
|
-
return out;
|
|
91021
|
-
}
|
|
91022
|
-
var CONFIG_SCHEMA = [
|
|
91023
|
-
{
|
|
91024
|
-
key: "telemetry.enabled",
|
|
91025
|
-
description: "Whether anonymous opt-out telemetry is enabled (on by default; environment opt-outs like DO_NOT_TRACK are not reflected here \u2014 `argent telemetry status` shows effective consent). `false` in either scope wins, so a committed project opt-out holds for every teammate.",
|
|
91026
|
-
scopes: ["project", "global"],
|
|
91027
|
-
parse: asBoolean,
|
|
91028
|
-
merge: "prioritize-restrictive",
|
|
91029
|
-
// Opt-out: consent.ts reads an unstored value as enabled, so the config
|
|
91030
|
-
// surface must show the same rather than "(unset)".
|
|
91031
|
-
default: true,
|
|
91032
|
-
// Opt-in/out goes through the dedicated command so the live client is
|
|
91033
|
-
// drained/reset, not just the file rewritten.
|
|
91034
|
-
manageCommand: "argent telemetry"
|
|
91035
|
-
},
|
|
91036
|
-
{
|
|
91037
|
-
key: "allowlist.enabled",
|
|
91038
|
-
description: "Whether `argent update` re-applies editor auto-approve allowlist rules. Unset (the default) keeps the current behavior: update refreshes the rules for editors that already have argent configured. Set to `false` to keep update from touching editor allowlists. `false` in either scope wins, so a committed project opt-out holds for every teammate.",
|
|
91039
|
-
scopes: ["project", "global"],
|
|
91040
|
-
parse: asBoolean,
|
|
91041
|
-
merge: "prioritize-restrictive",
|
|
91042
|
-
example: "false"
|
|
91043
|
-
},
|
|
91044
|
-
{
|
|
91045
|
-
key: "lens.agent",
|
|
91046
|
-
description: "Coding-agent id remembered by `argent lens` to skip the picker.",
|
|
91047
|
-
scopes: ["project", "global"],
|
|
91048
|
-
parse: asString,
|
|
91049
|
-
merge: "prioritize-local",
|
|
91050
|
-
example: "claude"
|
|
91051
|
-
},
|
|
91052
|
-
{
|
|
91053
|
-
key: "ios.additionalDeviceSets",
|
|
91054
|
-
description: "Additional CoreSimulator device-set directories whose simulators argent should see alongside the default set. Absolute paths (or ~/\u2026); relative entries resolve against the project root (project scope) or home (global scope).",
|
|
91055
|
-
scopes: ["project", "global"],
|
|
91056
|
-
parse: asStringArray,
|
|
91057
|
-
// Additive rather than shadowing: global baseline first, project extras
|
|
91058
|
-
// after, deduplicated. `getAdditionalIosDeviceSets` re-implements this union
|
|
91059
|
-
// (path resolution must precede dedup) and guards on the preset staying "union".
|
|
91060
|
-
merge: "union",
|
|
91061
|
-
example: '["~/DeviceSets/ci"]'
|
|
91062
|
-
},
|
|
91063
|
-
{
|
|
91064
|
-
key: "recordings.directory",
|
|
91065
|
-
description: "Directory where finished screen recordings (mp4) are saved on the client host. Absolute, `~`-prefixed, or relative to the project root (home dir when not in a project). Unset \u21D2 `.argent/recordings` under the project root.",
|
|
91066
|
-
scopes: ["project", "global"],
|
|
91067
|
-
parse: asString,
|
|
91068
|
-
// Resolved on the client (the machine the mp4 is persisted to), so with a
|
|
91069
|
-
// remote `argent link` tool-server it is the *client's* config that decides.
|
|
91070
|
-
merge: "prioritize-local",
|
|
91071
|
-
example: "~/Movies/argent"
|
|
91072
|
-
},
|
|
91073
|
-
// Global-scope only: a checked-in `.argent/config.json` must not raise the
|
|
91074
|
-
// ceiling on how much of the machine a script step may occupy. `merge` is
|
|
91075
|
-
// nominal here — the project scope of a global-only key is never read.
|
|
91076
|
-
{
|
|
91077
|
-
key: "scripts.maxTimeoutMs",
|
|
91078
|
-
description: `Upper bound, in milliseconds, on the time limit a flow \`script\` step may ask for (default 300000 \u2014 five minutes). Bounds how long one script can occupy the host. Values below ${MIN_SCRIPT_TIMEOUT_MS} ms are refused: the step starts a Node process before the script runs, so a smaller ceiling ends a script that did nothing wrong.`,
|
|
91079
|
-
scopes: ["global"],
|
|
91080
|
-
parse: (raw) => {
|
|
91081
|
-
const value = asPositiveInteger(raw);
|
|
91082
|
-
return value !== void 0 && value >= MIN_SCRIPT_TIMEOUT_MS ? value : void 0;
|
|
91083
|
-
},
|
|
91084
|
-
expected: `a whole number of milliseconds, at least ${MIN_SCRIPT_TIMEOUT_MS}`,
|
|
91085
|
-
merge: "prioritize-global",
|
|
91086
|
-
default: 5 * 6e4,
|
|
91087
|
-
example: "300000"
|
|
91088
|
-
},
|
|
91089
|
-
{
|
|
91090
|
-
key: "scripts.heapLimitMb",
|
|
91091
|
-
description: `Old-space heap limit, in MiB, given to each flow \`script\` process (default 512). Values below ${MIN_SCRIPT_HEAP_LIMIT_MB} MiB are refused: that is already below what importing a real npm dependency needs, and under about 5 MiB the process dies inside V8's own startup before any script runs.`,
|
|
91092
|
-
scopes: ["global"],
|
|
91093
|
-
parse: (raw) => {
|
|
91094
|
-
const value = asPositiveInteger(raw);
|
|
91095
|
-
return value !== void 0 && value >= MIN_SCRIPT_HEAP_LIMIT_MB ? value : void 0;
|
|
91096
|
-
},
|
|
91097
|
-
expected: `a whole number of MiB, at least ${MIN_SCRIPT_HEAP_LIMIT_MB}`,
|
|
91098
|
-
merge: "prioritize-global",
|
|
91099
|
-
default: 512,
|
|
91100
|
-
example: "512"
|
|
91101
|
-
}
|
|
91102
|
-
];
|
|
91103
|
-
function getConfigDefinition(key2, registry2 = CONFIG_SCHEMA) {
|
|
91104
|
-
return registry2.find((def) => def.key === key2);
|
|
91105
|
-
}
|
|
91106
|
-
|
|
91107
|
-
// ../configuration-core/src/config-access.ts
|
|
91108
|
-
var path4 = __toESM(require("node:path"), 1);
|
|
91109
|
-
function readScopeValue(def, scope, options) {
|
|
91110
|
-
if (!def.scopes.includes(scope)) return void 0;
|
|
91111
|
-
const raw = getAtPath(readConfigObject(scope, options), def.key);
|
|
91112
|
-
return raw === void 0 ? void 0 : def.parse(raw);
|
|
91113
|
-
}
|
|
91114
|
-
function getConfigValue(def, options = {}) {
|
|
91115
|
-
const local = readScopeValue(def, "project", options);
|
|
91116
|
-
const global2 = readScopeValue(def, "global", options);
|
|
91117
|
-
const merged = applyMergePolicy(def.merge, local, global2);
|
|
91118
|
-
return merged ?? def.default;
|
|
91119
|
-
}
|
|
91120
|
-
function requireDefinition(key2, registry2 = CONFIG_SCHEMA) {
|
|
91121
|
-
const def = getConfigDefinition(key2, registry2);
|
|
91122
|
-
if (!def) {
|
|
91123
|
-
throw new UnknownConfigKeyError(key2);
|
|
91124
|
-
}
|
|
91125
|
-
return def;
|
|
91126
|
-
}
|
|
91127
|
-
var UnknownConfigKeyError = class extends Error {
|
|
91128
|
-
constructor(key2) {
|
|
91129
|
-
super(`Unknown configuration key "${key2}".`);
|
|
91130
|
-
this.key = key2;
|
|
91131
|
-
this.name = "UnknownConfigKeyError";
|
|
91132
|
-
}
|
|
91133
|
-
key;
|
|
91134
|
-
};
|
|
91135
|
-
var IOS_ADDITIONAL_DEVICE_SETS_KEY = "ios.additionalDeviceSets";
|
|
91136
|
-
function getAdditionalIosDeviceSets(options = {}) {
|
|
91137
|
-
const def = requireDefinition(IOS_ADDITIONAL_DEVICE_SETS_KEY);
|
|
91138
|
-
if (def.merge !== "union") {
|
|
91139
|
-
throw new Error(
|
|
91140
|
-
`Expected "${IOS_ADDITIONAL_DEVICE_SETS_KEY}" to use the "union" merge preset; update getAdditionalIosDeviceSets to match the new policy.`
|
|
91141
|
-
);
|
|
91142
|
-
}
|
|
91143
|
-
const home = resolveHomeDir(options);
|
|
91144
|
-
const global2 = resolveDeviceSetEntries(readScopeValue(def, "global", options), home, home);
|
|
91145
|
-
const project = resolveDeviceSetEntries(
|
|
91146
|
-
readScopeValue(def, "project", options),
|
|
91147
|
-
resolveProjectRoot(options.cwd ?? process.cwd()),
|
|
91148
|
-
home
|
|
91149
|
-
);
|
|
91150
|
-
return Array.from(/* @__PURE__ */ new Set([...global2, ...project]));
|
|
91151
|
-
}
|
|
91152
|
-
function resolveDeviceSetEntries(entries, baseDir, home) {
|
|
91153
|
-
if (!entries || entries.length === 0) return [];
|
|
91154
|
-
return entries.map((entry) => {
|
|
91155
|
-
if (entry === "~") return path4.resolve(home);
|
|
91156
|
-
if (entry.startsWith("~/")) return path4.resolve(home, entry.slice(2));
|
|
91157
|
-
return path4.resolve(baseDir, entry);
|
|
91158
|
-
});
|
|
91159
|
-
}
|
|
91160
|
-
|
|
91161
|
-
// ../tool-server/src/index.ts
|
|
91162
91257
|
init_src();
|
|
91258
|
+
init_src2();
|
|
91163
91259
|
|
|
91164
91260
|
// ../../node_modules/@opentelemetry/api-logs/build/esm/types/LogRecord.js
|
|
91165
91261
|
var SeverityNumber;
|
|
@@ -93734,6 +93830,7 @@ var fs5 = __toESM(require("node:fs"));
|
|
|
93734
93830
|
|
|
93735
93831
|
// ../telemetry/src/paths.ts
|
|
93736
93832
|
var path6 = __toESM(require("node:path"));
|
|
93833
|
+
init_src();
|
|
93737
93834
|
function identityFilePath() {
|
|
93738
93835
|
return path6.join(argentHomeDir(), "telemetry-id");
|
|
93739
93836
|
}
|
|
@@ -93939,7 +94036,7 @@ function resetClient() {
|
|
|
93939
94036
|
}
|
|
93940
94037
|
|
|
93941
94038
|
// ../telemetry/src/sanitize.ts
|
|
93942
|
-
|
|
94039
|
+
init_src2();
|
|
93943
94040
|
|
|
93944
94041
|
// ../telemetry/src/events.ts
|
|
93945
94042
|
var PLATFORMS = [
|
|
@@ -94702,7 +94799,7 @@ var _CI_VENDOR_COUNT_FOR_TEST = vendors_default.length;
|
|
|
94702
94799
|
var SESSION_ID = (0, import_node_crypto3.randomUUID)();
|
|
94703
94800
|
function readCliVersion() {
|
|
94704
94801
|
if (true) {
|
|
94705
|
-
return "0.25.1
|
|
94802
|
+
return "0.25.1";
|
|
94706
94803
|
}
|
|
94707
94804
|
return "0.0.0";
|
|
94708
94805
|
}
|
|
@@ -95172,6 +95269,7 @@ function resolveHostFingerprintAsync() {
|
|
|
95172
95269
|
|
|
95173
95270
|
// ../telemetry/src/consent.ts
|
|
95174
95271
|
var fs8 = __toESM(require("node:fs"));
|
|
95272
|
+
init_src();
|
|
95175
95273
|
var cache = /* @__PURE__ */ new Map();
|
|
95176
95274
|
var sessionOverride = null;
|
|
95177
95275
|
function readConfigOverrideAt(filePath) {
|
|
@@ -95267,6 +95365,7 @@ function isEnabled(env = process.env, cwd) {
|
|
|
95267
95365
|
}
|
|
95268
95366
|
|
|
95269
95367
|
// ../telemetry/src/notice.ts
|
|
95368
|
+
init_src();
|
|
95270
95369
|
var TELEMETRY_OPT_OUT_COMMAND = "argent telemetry disable";
|
|
95271
95370
|
var TELEMETRY_DETAILS_URL = "https://swmansion.com/legal/argent/privacy-notice/";
|
|
95272
95371
|
var FIRST_RUN_NOTICE_BODY_LINES = [
|
|
@@ -95280,7 +95379,7 @@ var FIRST_RUN_NOTICE = [
|
|
|
95280
95379
|
].join("\n");
|
|
95281
95380
|
|
|
95282
95381
|
// ../telemetry/src/registry-listener.ts
|
|
95283
|
-
|
|
95382
|
+
init_src2();
|
|
95284
95383
|
function attachRegistryTelemetry(registry2) {
|
|
95285
95384
|
const activeMetaByInvocationId = /* @__PURE__ */ new Map();
|
|
95286
95385
|
let totalToolCalls = 0;
|
|
@@ -95521,10 +95620,11 @@ var import_bytes2 = __toESM(require_bytes());
|
|
|
95521
95620
|
var import_node_fs10 = require("node:fs");
|
|
95522
95621
|
var import_promises9 = require("node:fs/promises");
|
|
95523
95622
|
var import_node_os9 = require("node:os");
|
|
95524
|
-
var
|
|
95525
|
-
var import_node_crypto8 = require("node:crypto");
|
|
95526
|
-
init_src();
|
|
95623
|
+
var import_node_path12 = require("node:path");
|
|
95527
95624
|
init_src();
|
|
95625
|
+
var import_node_crypto8 = require("node:crypto");
|
|
95626
|
+
init_src2();
|
|
95627
|
+
init_src2();
|
|
95528
95628
|
|
|
95529
95629
|
// ../tool-server/src/utils/idle-timer.ts
|
|
95530
95630
|
var IDLE_CHECK_INTERVAL_MS = 6e4;
|
|
@@ -95561,7 +95661,7 @@ function createIdleTimer(timeoutMs, onIdle) {
|
|
|
95561
95661
|
}
|
|
95562
95662
|
|
|
95563
95663
|
// ../tool-server/src/utils/check-deps.ts
|
|
95564
|
-
|
|
95664
|
+
init_src2();
|
|
95565
95665
|
init_android_binary();
|
|
95566
95666
|
|
|
95567
95667
|
// ../tool-server/src/utils/vega-cli.ts
|
|
@@ -95570,8 +95670,8 @@ var import_node_util3 = require("node:util");
|
|
|
95570
95670
|
var import_node_fs4 = require("node:fs");
|
|
95571
95671
|
var import_promises3 = require("node:fs/promises");
|
|
95572
95672
|
var import_node_os3 = require("node:os");
|
|
95573
|
-
var
|
|
95574
|
-
|
|
95673
|
+
var import_node_path5 = require("node:path");
|
|
95674
|
+
init_src2();
|
|
95575
95675
|
init_subprocess_error();
|
|
95576
95676
|
|
|
95577
95677
|
// ../tool-server/src/utils/vega-process.ts
|
|
@@ -95661,7 +95761,7 @@ async function resolveVegaBinary() {
|
|
|
95661
95761
|
return cachedVegaBinary.path;
|
|
95662
95762
|
}
|
|
95663
95763
|
const onPath = await commandOnPath("vega") ?? await commandOnPath("kepler");
|
|
95664
|
-
const fallback = (0,
|
|
95764
|
+
const fallback = (0, import_node_path5.join)((0, import_node_os3.homedir)(), "vega", "bin", "vega");
|
|
95665
95765
|
const path50 = onPath ?? (await isExecutable(fallback) ? fallback : null);
|
|
95666
95766
|
cachedVegaBinary = { path: path50, checkedAt: now };
|
|
95667
95767
|
return path50;
|
|
@@ -95959,8 +96059,8 @@ var CACHE_TTL_MS2 = 6e4;
|
|
|
95959
96059
|
var cache3 = /* @__PURE__ */ new Map();
|
|
95960
96060
|
var INSTALL_HINTS = {
|
|
95961
96061
|
"xcrun": "Xcode command-line tools are not installed. Run `xcode-select --install` (or install Xcode from the App Store) and retry. Only required for iOS simulators.",
|
|
95962
|
-
"adb": "Android SDK Platform Tools not found. Install with `brew install --cask android-platform-tools` or via Android Studio \u2192 SDK Manager. If installed, ensure `adb` is on PATH or
|
|
95963
|
-
"emulator": "Android Emulator not found. Install via Android Studio \u2192 SDK Manager \u2192 Emulator, or `sdkmanager 'emulator'`. If installed, ensure `emulator` is on PATH or
|
|
96062
|
+
"adb": "Android SDK Platform Tools not found. Install with `brew install --cask android-platform-tools` or via Android Studio \u2192 SDK Manager. If installed, ensure `adb` is on PATH or point `$ANDROID_HOME` (or the `android.sdkRoot` config key) at the SDK root (the resolver checks `<root>/platform-tools/adb`). Only required for Android devices and emulators.",
|
|
96063
|
+
"emulator": "Android Emulator not found. Install via Android Studio \u2192 SDK Manager \u2192 Emulator, or `sdkmanager 'emulator'`. If installed, ensure `emulator` is on PATH or point `$ANDROID_HOME` (or the `android.sdkRoot` config key) at the SDK root (the resolver checks `<root>/emulator/emulator`). Only required to launch new Android emulators via `boot-device`.",
|
|
95964
96064
|
"sim-remote": "`sim-remote` CLI not found on PATH. Install via the radon-cloud project (see its README) and run `sim-remote login` before invoking any ios-remote tool. Only required for remote iOS simulators.",
|
|
95965
96065
|
"vega": "Vega SDK CLI not found. Install the Amazon Vega SDK and run `source ~/vega/env` so `vega` (or its `kepler` alias) is on PATH; the resolver also checks `~/vega/bin/vega`. Only required for Vega (Fire TV) devices."
|
|
95966
96066
|
};
|
|
@@ -95994,7 +96094,7 @@ async function ensureDep(dep) {
|
|
|
95994
96094
|
}
|
|
95995
96095
|
|
|
95996
96096
|
// ../tool-server/src/utils/format-error.ts
|
|
95997
|
-
|
|
96097
|
+
init_src2();
|
|
95998
96098
|
function formatErrorForAgent(err) {
|
|
95999
96099
|
if (!(err instanceof Error)) return String(err);
|
|
96000
96100
|
const parts2 = [err.message];
|
|
@@ -96055,11 +96155,11 @@ function toSimulatorNetworkError(toolLabel, err, apiUrl, fallbackHint) {
|
|
|
96055
96155
|
// ../tool-server/src/utils/update-checker.ts
|
|
96056
96156
|
var import_node_fs5 = __toESM(require("node:fs"));
|
|
96057
96157
|
var import_node_os4 = __toESM(require("node:os"));
|
|
96058
|
-
var
|
|
96158
|
+
var import_node_path6 = __toESM(require("node:path"));
|
|
96059
96159
|
var import_semver2 = __toESM(require_semver2());
|
|
96060
96160
|
|
|
96061
96161
|
// ../tool-server/package.json
|
|
96062
|
-
var version2 = "0.25.
|
|
96162
|
+
var version2 = "0.25.1";
|
|
96063
96163
|
|
|
96064
96164
|
// ../tool-server/src/utils/update-checker.ts
|
|
96065
96165
|
var import_update_core = __toESM(require_dist4());
|
|
@@ -96067,7 +96167,7 @@ var PACKAGE_NAME = "@swmansion/argent";
|
|
|
96067
96167
|
var REGISTRY_URL = `https://registry.npmjs.org/${PACKAGE_NAME}`;
|
|
96068
96168
|
var CHECK_INTERVAL_MS = 60 * 60 * 1e3 * 24;
|
|
96069
96169
|
function getSuppressionFilePath() {
|
|
96070
|
-
return
|
|
96170
|
+
return import_node_path6.default.join(import_node_os4.default.homedir(), ".argent", "update-suppression.json");
|
|
96071
96171
|
}
|
|
96072
96172
|
function loadSuppressUntil() {
|
|
96073
96173
|
try {
|
|
@@ -96081,7 +96181,7 @@ function loadSuppressUntil() {
|
|
|
96081
96181
|
}
|
|
96082
96182
|
function persistSuppressUntil(value) {
|
|
96083
96183
|
const filePath = getSuppressionFilePath();
|
|
96084
|
-
import_node_fs5.default.mkdirSync(
|
|
96184
|
+
import_node_fs5.default.mkdirSync(import_node_path6.default.dirname(filePath), { recursive: true });
|
|
96085
96185
|
import_node_fs5.default.writeFileSync(filePath, JSON.stringify({ suppressUntil: value }));
|
|
96086
96186
|
}
|
|
96087
96187
|
var state2 = {
|
|
@@ -96337,12 +96437,14 @@ function consumePendingSigningDetectionNote() {
|
|
|
96337
96437
|
// ../tool-server/src/preview.ts
|
|
96338
96438
|
var import_node_fs8 = __toESM(require("node:fs"));
|
|
96339
96439
|
var import_node_os7 = __toESM(require("node:os"));
|
|
96340
|
-
var
|
|
96440
|
+
var import_node_path9 = __toESM(require("node:path"));
|
|
96341
96441
|
var import_express = __toESM(require_express2());
|
|
96442
|
+
init_src();
|
|
96342
96443
|
|
|
96343
96444
|
// ../tool-server/src/blueprints/simulator-server.ts
|
|
96344
96445
|
var import_node_child_process11 = require("node:child_process");
|
|
96345
96446
|
var readline = __toESM(require("node:readline"));
|
|
96447
|
+
init_src2();
|
|
96346
96448
|
init_src();
|
|
96347
96449
|
|
|
96348
96450
|
// ../tool-server/src/blueprints/ax-service.ts
|
|
@@ -96392,7 +96494,7 @@ function attachNdjsonReader(socket, handlers) {
|
|
|
96392
96494
|
}
|
|
96393
96495
|
|
|
96394
96496
|
// ../tool-server/src/blueprints/ax-service.ts
|
|
96395
|
-
|
|
96497
|
+
init_src2();
|
|
96396
96498
|
init_external_devices();
|
|
96397
96499
|
|
|
96398
96500
|
// ../tool-server/src/utils/ios-host.ts
|
|
@@ -96410,6 +96512,7 @@ var SIMCTL_KILL_SIGNAL = "SIGKILL";
|
|
|
96410
96512
|
var fs11 = __toESM(require("node:fs"));
|
|
96411
96513
|
var import_node_child_process6 = require("node:child_process");
|
|
96412
96514
|
var import_node_util5 = require("node:util");
|
|
96515
|
+
init_src2();
|
|
96413
96516
|
init_src();
|
|
96414
96517
|
init_external_devices();
|
|
96415
96518
|
var execFileAsync5 = (0, import_node_util5.promisify)(import_node_child_process6.execFile);
|
|
@@ -96674,8 +96777,8 @@ async function run(args, options) {
|
|
|
96674
96777
|
throw new Error(`sim-remote ${args.join(" ")} failed: ${suffix}`, { cause: err });
|
|
96675
96778
|
}
|
|
96676
96779
|
}
|
|
96677
|
-
async function simctlListDevices() {
|
|
96678
|
-
const { stdout } = await run(["simctl", "list", "devices", "--json"]);
|
|
96780
|
+
async function simctlListDevices(options) {
|
|
96781
|
+
const { stdout } = await run(["simctl", "list", "devices", "--json"], options);
|
|
96679
96782
|
try {
|
|
96680
96783
|
return JSON.parse(stdout);
|
|
96681
96784
|
} catch (err) {
|
|
@@ -96686,12 +96789,12 @@ async function simctlListDevices() {
|
|
|
96686
96789
|
}
|
|
96687
96790
|
}
|
|
96688
96791
|
var remoteRuntimeKindCache = /* @__PURE__ */ new Map();
|
|
96689
|
-
async function isRemoteTvOsSimulator(udid) {
|
|
96792
|
+
async function isRemoteTvOsSimulator(udid, options) {
|
|
96690
96793
|
const id = stripRemotePrefix(udid);
|
|
96691
96794
|
const cached3 = remoteRuntimeKindCache.get(id);
|
|
96692
96795
|
if (cached3) return cached3 === "tv";
|
|
96693
96796
|
try {
|
|
96694
|
-
const { devices } = await simctlListDevices();
|
|
96797
|
+
const { devices } = await simctlListDevices(options);
|
|
96695
96798
|
for (const [runtime, entries] of Object.entries(devices)) {
|
|
96696
96799
|
if (!entries.some((d) => d.udid === id)) continue;
|
|
96697
96800
|
const kind = runtime.includes("tvOS") ? "tv" : "mobile";
|
|
@@ -96733,6 +96836,9 @@ async function simctlOpenUrl(udid, url2) {
|
|
|
96733
96836
|
async function simctlPrivacy(udid, action, service, bundleId) {
|
|
96734
96837
|
await run(["simctl", "privacy", stripRemotePrefix(udid), action, service, bundleId]);
|
|
96735
96838
|
}
|
|
96839
|
+
async function simctlStatusBar(udid, args, options) {
|
|
96840
|
+
await run(["simctl", "status_bar", stripRemotePrefix(udid), ...args], options);
|
|
96841
|
+
}
|
|
96736
96842
|
async function simctlPbcopy(udid, text) {
|
|
96737
96843
|
await run(["simctl", "pbcopy", stripRemotePrefix(udid)], { stdin: text });
|
|
96738
96844
|
}
|
|
@@ -97473,7 +97579,7 @@ var axServiceBlueprint = {
|
|
|
97473
97579
|
};
|
|
97474
97580
|
|
|
97475
97581
|
// ../tool-server/src/utils/capability.ts
|
|
97476
|
-
|
|
97582
|
+
init_src2();
|
|
97477
97583
|
var UnsupportedOperationError = class extends Error {
|
|
97478
97584
|
constructor(toolId, device, reason) {
|
|
97479
97585
|
const detail = reason ? ` (${reason})` : "";
|
|
@@ -107259,6 +107365,7 @@ async function openMoqClient(udid) {
|
|
|
107259
107365
|
async function openMoqClientFromInfo(info) {
|
|
107260
107366
|
await installNodeWebTransport();
|
|
107261
107367
|
const session = new MoqDeviceSession(await connectMoq(info), { publishPath: PUBLISH_PATH });
|
|
107368
|
+
disposeWhenTransportDies(session);
|
|
107262
107369
|
return {
|
|
107263
107370
|
sendControl: (payload) => session.sendControl(payload),
|
|
107264
107371
|
async screenshot(opts) {
|
|
@@ -107269,10 +107376,19 @@ async function openMoqClientFromInfo(info) {
|
|
|
107269
107376
|
}
|
|
107270
107377
|
};
|
|
107271
107378
|
}
|
|
107379
|
+
function disposeWhenTransportDies(session) {
|
|
107380
|
+
const dispose = () => {
|
|
107381
|
+
try {
|
|
107382
|
+
session.close();
|
|
107383
|
+
} catch {
|
|
107384
|
+
}
|
|
107385
|
+
};
|
|
107386
|
+
void session.closed.then(dispose, dispose);
|
|
107387
|
+
}
|
|
107272
107388
|
|
|
107273
107389
|
// ../tool-server/src/utils/simulator-client.ts
|
|
107274
107390
|
init_wrapper();
|
|
107275
|
-
|
|
107391
|
+
init_src2();
|
|
107276
107392
|
|
|
107277
107393
|
// ../tool-server/src/utils/timing.ts
|
|
107278
107394
|
var sleep = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -107337,17 +107453,26 @@ function failAllPending(conn, makeError) {
|
|
|
107337
107453
|
conn.pending.clear();
|
|
107338
107454
|
for (const entry of entries) entry.settle(makeError(entry.cmd));
|
|
107339
107455
|
}
|
|
107456
|
+
var COMMAND_TRANSPORT_FAILURE = {
|
|
107457
|
+
error_code: FAILURE_CODES.SIMULATOR_COMMAND_TRANSPORT_FAILED,
|
|
107458
|
+
failure_stage: "simulator_command_transport",
|
|
107459
|
+
failure_area: "tool_server",
|
|
107460
|
+
error_kind: "network",
|
|
107461
|
+
network_failure: "connection_reset",
|
|
107462
|
+
failure_command: "simulator_server"
|
|
107463
|
+
};
|
|
107340
107464
|
function transportError(cmd, apiUrl, detail) {
|
|
107341
107465
|
return new FailureError(
|
|
107342
107466
|
`simulator-server did not accept the '${cmd}' command: ${detail}. The command was NOT delivered to the device. Check that the simulator is still booted and the simulator-server for ${apiUrl} is running.`,
|
|
107343
|
-
|
|
107344
|
-
|
|
107345
|
-
|
|
107346
|
-
|
|
107347
|
-
|
|
107348
|
-
|
|
107349
|
-
|
|
107350
|
-
|
|
107467
|
+
COMMAND_TRANSPORT_FAILURE
|
|
107468
|
+
);
|
|
107469
|
+
}
|
|
107470
|
+
function remoteTransportError(cmd, cause) {
|
|
107471
|
+
const detail = cause instanceof Error ? cause.message : String(cause);
|
|
107472
|
+
return wrapFailure(
|
|
107473
|
+
cause,
|
|
107474
|
+
COMMAND_TRANSPORT_FAILURE,
|
|
107475
|
+
`The remote simulator did not accept the '${cmd}' command: ${detail}. The command was NOT delivered to the device. Call stop-simulator-server for this device and retry - the next call opens a new cloud session. If the machine itself was released, acquire one again before retrying.`
|
|
107351
107476
|
);
|
|
107352
107477
|
}
|
|
107353
107478
|
function getOrCreateConnection(api) {
|
|
@@ -107403,13 +107528,10 @@ function getOrCreateConnection(api) {
|
|
|
107403
107528
|
return conn;
|
|
107404
107529
|
}
|
|
107405
107530
|
function sendCommand(api, cmd) {
|
|
107406
|
-
|
|
107407
|
-
|
|
107408
|
-
return Promise.resolve();
|
|
107409
|
-
}
|
|
107531
|
+
const cmdName = typeof cmd.cmd === "string" ? cmd.cmd : "unknown";
|
|
107532
|
+
if (api.transport) return sendViaTransport(api.transport, cmd, cmdName);
|
|
107410
107533
|
const conn = getOrCreateConnection(api);
|
|
107411
107534
|
const id = String(++cmdId);
|
|
107412
|
-
const cmdName = typeof cmd.cmd === "string" ? cmd.cmd : "unknown";
|
|
107413
107535
|
const payload = JSON.stringify({ id, ...cmd });
|
|
107414
107536
|
return new Promise((resolve14, reject) => {
|
|
107415
107537
|
let done = false;
|
|
@@ -107611,32 +107733,36 @@ async function httpScreenshot(api, rotation, signal, scale) {
|
|
|
107611
107733
|
);
|
|
107612
107734
|
}
|
|
107613
107735
|
}
|
|
107736
|
+
async function sendViaTransport(transport, cmd, cmdName) {
|
|
107737
|
+
const sent = routeViaTransport(transport, cmd);
|
|
107738
|
+
try {
|
|
107739
|
+
await sent;
|
|
107740
|
+
} catch (cause) {
|
|
107741
|
+
throw remoteTransportError(cmdName, cause);
|
|
107742
|
+
}
|
|
107743
|
+
}
|
|
107614
107744
|
function routeViaTransport(transport, cmd) {
|
|
107615
107745
|
switch (cmd.cmd) {
|
|
107616
107746
|
case "touch": {
|
|
107617
107747
|
const sx = cmd.second_x ?? cmd.secondX;
|
|
107618
107748
|
const sy = cmd.second_y ?? cmd.secondY;
|
|
107619
|
-
transport.touch({
|
|
107749
|
+
return transport.touch({
|
|
107620
107750
|
type: cmd.type,
|
|
107621
107751
|
x: cmd.x,
|
|
107622
107752
|
y: cmd.y,
|
|
107623
107753
|
secondX: sx == null ? void 0 : sx,
|
|
107624
107754
|
secondY: sy == null ? void 0 : sy
|
|
107625
107755
|
});
|
|
107626
|
-
return;
|
|
107627
107756
|
}
|
|
107628
107757
|
case "button":
|
|
107629
|
-
transport.button({
|
|
107758
|
+
return transport.button({
|
|
107630
107759
|
direction: cmd.direction,
|
|
107631
107760
|
button: cmd.button
|
|
107632
107761
|
});
|
|
107633
|
-
return;
|
|
107634
107762
|
case "rotate":
|
|
107635
|
-
transport.rotate(cmd.direction);
|
|
107636
|
-
return;
|
|
107763
|
+
return transport.rotate(cmd.direction);
|
|
107637
107764
|
case "key":
|
|
107638
|
-
transport.pressKey(cmd.direction, cmd.code);
|
|
107639
|
-
return;
|
|
107765
|
+
return transport.pressKey(cmd.direction, cmd.code);
|
|
107640
107766
|
default:
|
|
107641
107767
|
throw new Error(`MoQ transport does not implement sendCommand cmd '${String(cmd.cmd)}'`);
|
|
107642
107768
|
}
|
|
@@ -107650,8 +107776,8 @@ function createMoqTransport(moq, options) {
|
|
|
107650
107776
|
return { url: (0, import_node_url.pathToFileURL)(file2).toString(), path: file2 };
|
|
107651
107777
|
};
|
|
107652
107778
|
return {
|
|
107653
|
-
touch(opts) {
|
|
107654
|
-
|
|
107779
|
+
async touch(opts) {
|
|
107780
|
+
await moq.sendControl(
|
|
107655
107781
|
encodeTouch({
|
|
107656
107782
|
action: opts.type,
|
|
107657
107783
|
x: opts.x,
|
|
@@ -107661,17 +107787,17 @@ function createMoqTransport(moq, options) {
|
|
|
107661
107787
|
})
|
|
107662
107788
|
);
|
|
107663
107789
|
},
|
|
107664
|
-
button(opts) {
|
|
107665
|
-
|
|
107790
|
+
async button(opts) {
|
|
107791
|
+
await moq.sendControl(encodeButton({ action: opts.direction, button: opts.button }));
|
|
107666
107792
|
},
|
|
107667
|
-
rotate(direction) {
|
|
107668
|
-
|
|
107793
|
+
async rotate(direction) {
|
|
107794
|
+
await moq.sendControl(encodeRotate(direction));
|
|
107669
107795
|
},
|
|
107670
107796
|
async paste(text) {
|
|
107671
107797
|
await options.pasteText(text);
|
|
107672
107798
|
},
|
|
107673
|
-
pressKey(direction, keyCode) {
|
|
107674
|
-
|
|
107799
|
+
async pressKey(direction, keyCode) {
|
|
107800
|
+
await moq.sendControl(encodeKey({ action: direction, code: keyCode }));
|
|
107675
107801
|
},
|
|
107676
107802
|
async screenshot(opts) {
|
|
107677
107803
|
const scale = opts?.scale ?? getScreenshotScale();
|
|
@@ -107704,17 +107830,20 @@ async function buildRemoteInstance(device) {
|
|
|
107704
107830
|
await simctlPbcopy(device.id, text);
|
|
107705
107831
|
const CMD = 227;
|
|
107706
107832
|
const V = 25;
|
|
107707
|
-
await
|
|
107708
|
-
await
|
|
107709
|
-
await
|
|
107710
|
-
await
|
|
107833
|
+
await api.pressKey("Down", CMD);
|
|
107834
|
+
await api.pressKey("Down", V);
|
|
107835
|
+
await api.pressKey("Up", V);
|
|
107836
|
+
await api.pressKey("Up", CMD);
|
|
107711
107837
|
}
|
|
107712
107838
|
});
|
|
107713
107839
|
const stubUrl = `moq+remote://${device.id}`;
|
|
107714
107840
|
const api = {
|
|
107715
107841
|
apiUrl: stubUrl,
|
|
107716
107842
|
streamUrl: stubUrl,
|
|
107717
|
-
|
|
107843
|
+
// Through `sendCommand`, as the attached instance below does, so a key the
|
|
107844
|
+
// session refuses reports the same failure as a refused touch instead of a
|
|
107845
|
+
// bare SDK error the caller cannot classify.
|
|
107846
|
+
pressKey: (direction, keyCode) => sendCommand(api, { cmd: "key", code: keyCode, direction }),
|
|
107718
107847
|
transport
|
|
107719
107848
|
};
|
|
107720
107849
|
return {
|
|
@@ -107769,9 +107898,14 @@ async function spawnSimulatorServerProcess(udid, subcommand) {
|
|
|
107769
107898
|
return new Promise((resolve14, reject) => {
|
|
107770
107899
|
const args = [subcommand, "--id", udid];
|
|
107771
107900
|
if (deviceSet) args.push("--device-set", deviceSet);
|
|
107901
|
+
const sdkRoot = subcommand === "ios" ? null : getAndroidSdkRoot();
|
|
107902
|
+
if (sdkRoot)
|
|
107903
|
+
process.stderr.write(`[sim ${udid.slice(0, 8)}] android.sdkRoot \u2192 ANDROID_HOME=${sdkRoot}
|
|
107904
|
+
`);
|
|
107772
107905
|
const proc = (0, import_node_child_process11.spawn)(BINARY_PATH, args, {
|
|
107773
107906
|
cwd: RUN_DIR,
|
|
107774
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
107907
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
107908
|
+
...sdkRoot ? { env: { ...process.env, ANDROID_HOME: sdkRoot } } : {}
|
|
107775
107909
|
});
|
|
107776
107910
|
let apiUrl = null;
|
|
107777
107911
|
let streamUrl = "";
|
|
@@ -108073,7 +108207,7 @@ var fs16 = __toESM(require("node:fs/promises"));
|
|
|
108073
108207
|
var os6 = __toESM(require("node:os"));
|
|
108074
108208
|
var path14 = __toESM(require("node:path"));
|
|
108075
108209
|
var import_node_crypto7 = require("node:crypto");
|
|
108076
|
-
|
|
108210
|
+
init_src2();
|
|
108077
108211
|
|
|
108078
108212
|
// ../tool-server/src/utils/ios-device/usbmux-protocol.ts
|
|
108079
108213
|
var USBMUX_HEADER_BYTES = 16;
|
|
@@ -108563,20 +108697,20 @@ var path17 = __toESM(require("node:path"));
|
|
|
108563
108697
|
init_device_info();
|
|
108564
108698
|
|
|
108565
108699
|
// ../tool-server/src/blueprints/chromium-cdp.ts
|
|
108566
|
-
|
|
108700
|
+
init_src2();
|
|
108567
108701
|
|
|
108568
108702
|
// ../tool-server/src/chromium-server/index.ts
|
|
108569
|
-
|
|
108703
|
+
init_src2();
|
|
108570
108704
|
|
|
108571
108705
|
// ../tool-server/src/chromium-server/cdp-session.ts
|
|
108572
108706
|
var fs17 = __toESM(require("node:fs"));
|
|
108573
108707
|
var os7 = __toESM(require("node:os"));
|
|
108574
108708
|
var path15 = __toESM(require("node:path"));
|
|
108575
|
-
|
|
108709
|
+
init_src2();
|
|
108576
108710
|
|
|
108577
108711
|
// ../tool-server/src/utils/debugger/cdp-client.ts
|
|
108578
108712
|
init_wrapper();
|
|
108579
|
-
|
|
108713
|
+
init_src2();
|
|
108580
108714
|
var crypto3 = __toESM(require("node:crypto"));
|
|
108581
108715
|
var BLOCKED_WHILE_PAUSED = /* @__PURE__ */ new Set(["Runtime.evaluate", "Runtime.callFunctionOn"]);
|
|
108582
108716
|
function trimBundleQuery(url2) {
|
|
@@ -108852,12 +108986,15 @@ var CDPClient = class {
|
|
|
108852
108986
|
const timer = setTimeout(() => {
|
|
108853
108987
|
this.pendingBindings.delete(id);
|
|
108854
108988
|
reject(
|
|
108855
|
-
new FailureError(
|
|
108856
|
-
|
|
108857
|
-
|
|
108858
|
-
|
|
108859
|
-
|
|
108860
|
-
|
|
108989
|
+
new FailureError(
|
|
108990
|
+
`Binding response for requestId=${id} timed out \u2014 the runtime took the script but never called back over the binding. It may be paused at a breakpoint (the script is dispatched without awaiting it, so a paused runtime still accepts it and never runs the callback), or frozen. Check the debugger and resume it; if nothing is paused, restart the app. Do not retry in a loop \u2014 each attempt waits out the full timeout.`,
|
|
108991
|
+
{
|
|
108992
|
+
error_code: FAILURE_CODES.DEBUGGER_CDP_BINDING_TIMEOUT,
|
|
108993
|
+
failure_stage: "debugger_cdp_binding",
|
|
108994
|
+
failure_area: "tool_server",
|
|
108995
|
+
error_kind: "timeout"
|
|
108996
|
+
}
|
|
108997
|
+
)
|
|
108861
108998
|
);
|
|
108862
108999
|
}, timeout);
|
|
108863
109000
|
this.pendingBindings.set(id, { resolve: resolve14, reject, timer });
|
|
@@ -109018,7 +109155,7 @@ async function discoverPrimaryPage(port, signal) {
|
|
|
109018
109155
|
);
|
|
109019
109156
|
}
|
|
109020
109157
|
throw new FailureError(
|
|
109021
|
-
`Chromium CDP on port ${port}
|
|
109158
|
+
`Chromium CDP on port ${port} answered but exposes no page target (the app is running with no window). Open an app window and retry.`,
|
|
109022
109159
|
{
|
|
109023
109160
|
error_code: FAILURE_CODES.CHROMIUM_CDP_NO_PAGE_TARGET,
|
|
109024
109161
|
failure_stage: "chromium_cdp_discover_page_none",
|
|
@@ -109050,16 +109187,18 @@ async function browserWebSocketUrl(port, signal) {
|
|
|
109050
109187
|
}
|
|
109051
109188
|
return url2;
|
|
109052
109189
|
}
|
|
109190
|
+
var CDP_HTTP_TIMEOUT_MS = 5e3;
|
|
109053
109191
|
async function fetchJson(url2, signal) {
|
|
109054
109192
|
let res;
|
|
109055
109193
|
try {
|
|
109056
|
-
res = await fetch(url2, { signal });
|
|
109194
|
+
res = await fetch(url2, { signal: signal ?? AbortSignal.timeout(CDP_HTTP_TIMEOUT_MS) });
|
|
109057
109195
|
} catch (err) {
|
|
109058
109196
|
if (err instanceof Error && err.name === "AbortError") throw err;
|
|
109197
|
+
const timedOut2 = err instanceof Error && err.name === "TimeoutError";
|
|
109059
109198
|
const code = err.code ?? err.cause?.code;
|
|
109060
|
-
const network_failure = code === "ECONNREFUSED" ? "connection_refused" : code === "ECONNRESET" ? "connection_reset" : code === "ETIMEDOUT" || code === "UND_ERR_CONNECT_TIMEOUT" ? "timeout" : "other";
|
|
109199
|
+
const network_failure = timedOut2 ? "timeout" : code === "ECONNREFUSED" ? "connection_refused" : code === "ECONNRESET" ? "connection_reset" : code === "ETIMEDOUT" || code === "UND_ERR_CONNECT_TIMEOUT" ? "timeout" : "other";
|
|
109061
109200
|
throw new FailureError(
|
|
109062
|
-
`Chromium CDP discovery: GET ${url2} could not connect. Is the app running with --remote-debugging-port?`,
|
|
109201
|
+
timedOut2 ? `Chromium CDP discovery: GET ${url2} timed out. Something is holding port ${new URL(url2).port} without answering CDP.` : `Chromium CDP discovery: GET ${url2} could not connect. Is the app running with --remote-debugging-port?`,
|
|
109063
109202
|
{
|
|
109064
109203
|
error_code: FAILURE_CODES.CHROMIUM_CDP_UNREACHABLE,
|
|
109065
109204
|
failure_stage: "chromium_cdp_discovery_connect",
|
|
@@ -109213,7 +109352,7 @@ var FpsTracker = class {
|
|
|
109213
109352
|
};
|
|
109214
109353
|
|
|
109215
109354
|
// ../tool-server/src/chromium-server/input.ts
|
|
109216
|
-
|
|
109355
|
+
init_src2();
|
|
109217
109356
|
function clampPx(value, max) {
|
|
109218
109357
|
if (!Number.isFinite(value)) {
|
|
109219
109358
|
throw new FailureError(`Chromium input: non-finite coordinate ${value}`, {
|
|
@@ -109498,7 +109637,7 @@ var ScreencastManager = class {
|
|
|
109498
109637
|
// ../tool-server/src/chromium-server/screenshot.ts
|
|
109499
109638
|
var fs18 = __toESM(require("node:fs"));
|
|
109500
109639
|
var path16 = __toESM(require("node:path"));
|
|
109501
|
-
|
|
109640
|
+
init_src2();
|
|
109502
109641
|
var sharpCache;
|
|
109503
109642
|
var sharpLoadWarningEmitted = false;
|
|
109504
109643
|
function tryLoadSharp() {
|
|
@@ -109619,7 +109758,7 @@ async function copyScreenshotToClipboard(ctx, opts = {}) {
|
|
|
109619
109758
|
}
|
|
109620
109759
|
|
|
109621
109760
|
// ../tool-server/src/chromium-server/tabs.ts
|
|
109622
|
-
|
|
109761
|
+
init_src2();
|
|
109623
109762
|
function createTabsManager(deps) {
|
|
109624
109763
|
const { cdp, port } = deps;
|
|
109625
109764
|
const targetToTab = /* @__PURE__ */ new Map();
|
|
@@ -109887,7 +110026,7 @@ function createNetworkManager(deps) {
|
|
|
109887
110026
|
}
|
|
109888
110027
|
|
|
109889
110028
|
// ../tool-server/src/chromium-server/viewport.ts
|
|
109890
|
-
|
|
110029
|
+
init_src2();
|
|
109891
110030
|
var VIEWPORT_FAILURE = {
|
|
109892
110031
|
error_code: FAILURE_CODES.CHROMIUM_VIEWPORT_READ_FAILED,
|
|
109893
110032
|
failure_area: "tool_server",
|
|
@@ -110217,17 +110356,17 @@ async function discoverChromiumDevices(options) {
|
|
|
110217
110356
|
}
|
|
110218
110357
|
|
|
110219
110358
|
// ../tool-server/src/utils/vega-devices.ts
|
|
110220
|
-
|
|
110359
|
+
init_src2();
|
|
110221
110360
|
|
|
110222
110361
|
// ../tool-server/src/utils/vega-sdk.ts
|
|
110223
110362
|
var import_promises4 = require("node:fs/promises");
|
|
110224
110363
|
var import_node_fs6 = require("node:fs");
|
|
110225
110364
|
var import_node_os6 = require("node:os");
|
|
110226
|
-
var
|
|
110365
|
+
var import_node_path8 = require("node:path");
|
|
110227
110366
|
var import_semver3 = __toESM(require_semver2());
|
|
110228
110367
|
async function readVegaConfig() {
|
|
110229
110368
|
try {
|
|
110230
|
-
const raw = await (0, import_promises4.readFile)((0,
|
|
110369
|
+
const raw = await (0, import_promises4.readFile)((0, import_node_path8.join)((0, import_node_os6.homedir)(), "vega", "config.json"), "utf-8");
|
|
110231
110370
|
return JSON.parse(raw);
|
|
110232
110371
|
} catch {
|
|
110233
110372
|
return {};
|
|
@@ -110238,13 +110377,13 @@ function bareVersion(version3) {
|
|
|
110238
110377
|
}
|
|
110239
110378
|
function sdkComponentRoots(config2) {
|
|
110240
110379
|
const roots = [
|
|
110241
|
-
config2.sdkPath && (0,
|
|
110242
|
-
(0,
|
|
110380
|
+
config2.sdkPath && (0, import_node_path8.join)(config2.sdkPath, "vega-sdk"),
|
|
110381
|
+
(0, import_node_path8.join)((0, import_node_os6.homedir)(), "vega", "sdk", "vega-sdk")
|
|
110243
110382
|
].filter((p) => Boolean(p));
|
|
110244
110383
|
return Array.from(new Set(roots));
|
|
110245
110384
|
}
|
|
110246
110385
|
async function resolveVersion(channelDir, preferred) {
|
|
110247
|
-
if (preferred && (0, import_node_fs6.existsSync)((0,
|
|
110386
|
+
if (preferred && (0, import_node_fs6.existsSync)((0, import_node_path8.join)(channelDir, preferred))) return preferred;
|
|
110248
110387
|
try {
|
|
110249
110388
|
const versions = (await (0, import_promises4.readdir)(channelDir)).filter((e) => import_semver3.default.valid(e)).sort(import_semver3.default.rcompare);
|
|
110250
110389
|
return versions[0] ?? null;
|
|
@@ -110258,10 +110397,10 @@ async function resolveVegaSdkImagesDir() {
|
|
|
110258
110397
|
const channel = config2.defaultChannel || "main";
|
|
110259
110398
|
const preferred = bareVersion(config2.defaultVersion);
|
|
110260
110399
|
for (const root of sdkComponentRoots(config2)) {
|
|
110261
|
-
const channelDir = (0,
|
|
110400
|
+
const channelDir = (0, import_node_path8.join)(root, channel);
|
|
110262
110401
|
const version3 = await resolveVersion(channelDir, preferred);
|
|
110263
110402
|
if (!version3) continue;
|
|
110264
|
-
const imagesDir = (0,
|
|
110403
|
+
const imagesDir = (0, import_node_path8.join)(channelDir, version3, "vvd", "images");
|
|
110265
110404
|
if ((0, import_node_fs6.existsSync)(imagesDir)) return imagesDir;
|
|
110266
110405
|
}
|
|
110267
110406
|
return null;
|
|
@@ -110271,7 +110410,7 @@ async function listVvdImages() {
|
|
|
110271
110410
|
if (!dir) return [];
|
|
110272
110411
|
try {
|
|
110273
110412
|
const entries = await (0, import_promises4.readdir)(dir, { withFileTypes: true });
|
|
110274
|
-
return entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, path: (0,
|
|
110413
|
+
return entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, path: (0, import_node_path8.join)(dir, e.name) })).sort((a, b) => a.name.localeCompare(b.name));
|
|
110275
110414
|
} catch {
|
|
110276
110415
|
return [];
|
|
110277
110416
|
}
|
|
@@ -110612,7 +110751,7 @@ Booted/ready devices are listed first. Platforms whose CLI is unavailable are si
|
|
|
110612
110751
|
};
|
|
110613
110752
|
|
|
110614
110753
|
// ../tool-server/src/utils/variant-proposals.ts
|
|
110615
|
-
|
|
110754
|
+
init_src2();
|
|
110616
110755
|
var MAX_COMMENT_LENGTH = 2e3;
|
|
110617
110756
|
var MAX_PENDING_OUTCOMES = 32;
|
|
110618
110757
|
var MAX_MATCH_VALUE_LENGTH = 200;
|
|
@@ -111088,7 +111227,7 @@ var variantProposalStore = new VariantProposalStore();
|
|
|
111088
111227
|
// ../tool-server/src/blueprints/native-devtools.ts
|
|
111089
111228
|
var net2 = __toESM(require("node:net"));
|
|
111090
111229
|
var fs20 = __toESM(require("node:fs"));
|
|
111091
|
-
|
|
111230
|
+
init_src2();
|
|
111092
111231
|
init_external_devices();
|
|
111093
111232
|
var NATIVE_DEVTOOLS_NAMESPACE = "NativeDevtools";
|
|
111094
111233
|
function isInjectableBundleId(bundleId) {
|
|
@@ -111497,7 +111636,12 @@ var nativeDevtoolsBlueprint = {
|
|
|
111497
111636
|
resolve14();
|
|
111498
111637
|
});
|
|
111499
111638
|
});
|
|
111500
|
-
|
|
111639
|
+
try {
|
|
111640
|
+
await host.startProxy(udid, endpoint.port);
|
|
111641
|
+
} catch (err) {
|
|
111642
|
+
server.close();
|
|
111643
|
+
throw err;
|
|
111644
|
+
}
|
|
111501
111645
|
} else {
|
|
111502
111646
|
await bindNativeDevtoolsUnixSocket(server, socketPath);
|
|
111503
111647
|
}
|
|
@@ -111649,7 +111793,7 @@ var nativeDevtoolsBlueprint = {
|
|
|
111649
111793
|
};
|
|
111650
111794
|
|
|
111651
111795
|
// ../tool-server/src/utils/native-target-app.ts
|
|
111652
|
-
|
|
111796
|
+
init_src2();
|
|
111653
111797
|
function chooseFrontmostConnectedApp(apps) {
|
|
111654
111798
|
const strongCandidates = apps.filter(
|
|
111655
111799
|
(app) => app.applicationState === "active" || app.foregroundActiveSceneCount > 0
|
|
@@ -112029,12 +112173,12 @@ function unexplainedHint(hint, detail, params) {
|
|
|
112029
112173
|
}
|
|
112030
112174
|
|
|
112031
112175
|
// ../tool-server/src/tools/describe/platforms/android/index.ts
|
|
112032
|
-
|
|
112176
|
+
init_src2();
|
|
112033
112177
|
init_adb();
|
|
112034
112178
|
init_device_info();
|
|
112035
112179
|
|
|
112036
112180
|
// ../tool-server/src/utils/android-screen.ts
|
|
112037
|
-
|
|
112181
|
+
init_src2();
|
|
112038
112182
|
init_adb();
|
|
112039
112183
|
async function getAndroidScreenSize(serial) {
|
|
112040
112184
|
const out = await adbShell(serial, "wm size", { timeoutMs: 5e3 });
|
|
@@ -112072,7 +112216,7 @@ function orientScreenSize(size, rotation) {
|
|
|
112072
112216
|
}
|
|
112073
112217
|
|
|
112074
112218
|
// ../tool-server/src/tools/describe/platforms/android/uiautomator-parser.ts
|
|
112075
|
-
|
|
112219
|
+
init_src2();
|
|
112076
112220
|
function parseUiAutomatorXml(xml) {
|
|
112077
112221
|
const body = xml.replace(/^\s*<\?xml[^?]*\?>\s*/, "");
|
|
112078
112222
|
const tagRe = /<(\/?)([A-Za-z_][\w.-]*)((?:"[^"]*"|'[^']*'|[^"'/<>])*?)\s*(\/?)>/gs;
|
|
@@ -112519,7 +112663,7 @@ function parseUiAutomatorDump(rawOutput, screenW, screenH, options = {}) {
|
|
|
112519
112663
|
// ../tool-server/src/blueprints/android-devtools.ts
|
|
112520
112664
|
var import_node_child_process15 = require("node:child_process");
|
|
112521
112665
|
var readline2 = __toESM(require("node:readline"));
|
|
112522
|
-
|
|
112666
|
+
init_src2();
|
|
112523
112667
|
|
|
112524
112668
|
// ../native-devtools-android/src/index.ts
|
|
112525
112669
|
var path19 = __toESM(require("node:path"));
|
|
@@ -112859,10 +113003,6 @@ init_android_binary();
|
|
|
112859
113003
|
|
|
112860
113004
|
// ../tool-server/src/utils/android-helper-install.ts
|
|
112861
113005
|
init_adb();
|
|
112862
|
-
var installedHelpers = /* @__PURE__ */ new Map();
|
|
112863
|
-
function cacheKey(serial, versionCode) {
|
|
112864
|
-
return `${serial}|${versionCode}`;
|
|
112865
|
-
}
|
|
112866
113006
|
async function probeInstalledVersion(serial, packageName) {
|
|
112867
113007
|
let out;
|
|
112868
113008
|
try {
|
|
@@ -112885,17 +113025,17 @@ async function probeInstalledVersion(serial, packageName) {
|
|
|
112885
113025
|
}
|
|
112886
113026
|
return { installed: false, versionCode: null };
|
|
112887
113027
|
}
|
|
112888
|
-
async function ensureAndroidDevtoolsInstalled(serial) {
|
|
113028
|
+
async function ensureAndroidDevtoolsInstalled(serial, options = {}) {
|
|
112889
113029
|
const manifest = helperManifest();
|
|
112890
|
-
|
|
112891
|
-
|
|
112892
|
-
|
|
112893
|
-
|
|
112894
|
-
|
|
112895
|
-
return;
|
|
113030
|
+
if (!options.force) {
|
|
113031
|
+
const probe3 = await probeInstalledVersion(serial, manifest.packageName);
|
|
113032
|
+
if (probe3.installed && (probe3.versionCode === null || probe3.versionCode >= manifest.versionCode)) {
|
|
113033
|
+
return;
|
|
113034
|
+
}
|
|
112896
113035
|
}
|
|
112897
113036
|
const apkPath = bundledHelperApkPath();
|
|
112898
|
-
const
|
|
113037
|
+
const flags = options.force ? [...manifest.installFlags, "-d"] : manifest.installFlags;
|
|
113038
|
+
const args = ["-s", serial, "install", ...flags, apkPath];
|
|
112899
113039
|
try {
|
|
112900
113040
|
await runAdb(args, { timeoutMs: 6e4 });
|
|
112901
113041
|
} catch (err) {
|
|
@@ -112910,12 +113050,11 @@ async function ensureAndroidDevtoolsInstalled(serial) {
|
|
|
112910
113050
|
throw err;
|
|
112911
113051
|
}
|
|
112912
113052
|
}
|
|
112913
|
-
installedHelpers.set(key2, true);
|
|
112914
113053
|
}
|
|
112915
113054
|
|
|
112916
113055
|
// ../tool-server/src/utils/android-devtools-client.ts
|
|
112917
113056
|
var net3 = __toESM(require("node:net"));
|
|
112918
|
-
|
|
113057
|
+
init_src2();
|
|
112919
113058
|
var DEFAULT_RPC_TIMEOUT_MS = 5e3;
|
|
112920
113059
|
var LONG_RPC_TIMEOUT_MS = 15e3;
|
|
112921
113060
|
function connectAndroidDevtoolsClient(localPort, onTerminated) {
|
|
@@ -113054,14 +113193,28 @@ function androidDevtoolsRef(device) {
|
|
|
113054
113193
|
};
|
|
113055
113194
|
}
|
|
113056
113195
|
var READY_TIMEOUT_MS2 = 3e4;
|
|
113196
|
+
var EXIT_GRACE_MS = 200;
|
|
113057
113197
|
var HELPER_PORT_MARKER = /^INSTRUMENTATION_STATUS:\s*port=(\d+)/;
|
|
113058
113198
|
var ADB_FORWARD_PORT_MARKER = /^(\d+)\s*$/;
|
|
113199
|
+
var HELPER_STATUS_MARKER = /^INSTRUMENTATION_STATUS:\s*Error=/;
|
|
113200
|
+
var HELPER_STATUS_MAX_CHARS = 400;
|
|
113201
|
+
function classifyHelperSpawnFault(text) {
|
|
113202
|
+
return /Unable to find instrumentation (?:info|target package)/i.test(text) ? "instrumentation-missing" : "unknown";
|
|
113203
|
+
}
|
|
113204
|
+
var HelperSpawnError = class extends FailureError {
|
|
113205
|
+
fault;
|
|
113206
|
+
constructor(message, signal, fault) {
|
|
113207
|
+
super(message, signal);
|
|
113208
|
+
this.name = "HelperSpawnError";
|
|
113209
|
+
this.fault = fault;
|
|
113210
|
+
}
|
|
113211
|
+
};
|
|
113059
113212
|
async function spawnHelper(serial) {
|
|
113060
113213
|
const manifest = helperManifest();
|
|
113061
113214
|
const adbPath = await resolveAndroidBinary("adb");
|
|
113062
113215
|
if (!adbPath) {
|
|
113063
113216
|
throw new FailureError(
|
|
113064
|
-
"`adb` not found on PATH or under `$ANDROID_HOME/platform-tools` while spawning android
|
|
113217
|
+
"`adb` not found on PATH or under `$ANDROID_HOME/platform-tools` while spawning the argent android helper.",
|
|
113065
113218
|
{
|
|
113066
113219
|
error_code: FAILURE_CODES.ANDROID_DEVTOOLS_ADB_NOT_FOUND,
|
|
113067
113220
|
failure_stage: "android_devtools_spawn_helper",
|
|
@@ -113080,10 +113233,13 @@ async function spawnHelper(serial) {
|
|
|
113080
113233
|
let localPort = null;
|
|
113081
113234
|
let settled = false;
|
|
113082
113235
|
let stderrBuf = "";
|
|
113236
|
+
let statusBuf = "";
|
|
113237
|
+
let exitGrace;
|
|
113083
113238
|
const settle = (fn, cleanup) => {
|
|
113084
113239
|
if (settled) return;
|
|
113085
113240
|
settled = true;
|
|
113086
113241
|
clearTimeout(timer);
|
|
113242
|
+
clearTimeout(exitGrace);
|
|
113087
113243
|
rl.close();
|
|
113088
113244
|
cleanup?.();
|
|
113089
113245
|
fn();
|
|
@@ -113091,6 +113247,9 @@ async function spawnHelper(serial) {
|
|
|
113091
113247
|
const rl = readline2.createInterface({ input: proc.stdout });
|
|
113092
113248
|
rl.on("line", async (rawLine) => {
|
|
113093
113249
|
const line = rawLine.trim();
|
|
113250
|
+
if (statusBuf.length < HELPER_STATUS_MAX_CHARS && HELPER_STATUS_MARKER.test(line)) {
|
|
113251
|
+
statusBuf = (statusBuf ? `${statusBuf} ${line}` : line).slice(0, HELPER_STATUS_MAX_CHARS);
|
|
113252
|
+
}
|
|
113094
113253
|
const portMatch = HELPER_PORT_MARKER.exec(line);
|
|
113095
113254
|
if (!portMatch || devicePort !== null) return;
|
|
113096
113255
|
devicePort = parseInt(portMatch[1], 10);
|
|
@@ -113120,25 +113279,32 @@ async function spawnHelper(serial) {
|
|
|
113120
113279
|
stderrBuf += data.toString("utf-8");
|
|
113121
113280
|
if (stderrBuf.length > 4 * 1024) stderrBuf = stderrBuf.slice(-4 * 1024);
|
|
113122
113281
|
});
|
|
113123
|
-
|
|
113124
|
-
|
|
113125
|
-
|
|
113126
|
-
|
|
113127
|
-
|
|
113128
|
-
|
|
113129
|
-
|
|
113130
|
-
|
|
113131
|
-
|
|
113132
|
-
|
|
113133
|
-
|
|
113134
|
-
|
|
113135
|
-
|
|
113136
|
-
|
|
113137
|
-
}
|
|
113138
|
-
|
|
113282
|
+
let exitCode = null;
|
|
113283
|
+
let exitSignal = null;
|
|
113284
|
+
const rejectExited = () => {
|
|
113285
|
+
const detail = statusBuf ? statusBuf : stderrBuf.trim() ? `code=${exitCode} signal=${exitSignal}. stderr=${stderrBuf.trim().slice(0, 200)}` : `code=${exitCode} signal=${exitSignal}`;
|
|
113286
|
+
reject(
|
|
113287
|
+
new HelperSpawnError(
|
|
113288
|
+
`am instrument exited before becoming ready: ${detail}`,
|
|
113289
|
+
{
|
|
113290
|
+
error_code: FAILURE_CODES.ANDROID_DEVTOOLS_HELPER_EXITED_BEFORE_READY,
|
|
113291
|
+
failure_stage: "android_devtools_helper_ready",
|
|
113292
|
+
failure_area: "tool_server",
|
|
113293
|
+
error_kind: "subprocess",
|
|
113294
|
+
failure_command: "android_devtools",
|
|
113295
|
+
...typeof exitCode === "number" ? { failure_exit_code: exitCode } : {},
|
|
113296
|
+
...exitSignal === "SIGABRT" || exitSignal === "SIGHUP" || exitSignal === "SIGINT" || exitSignal === "SIGKILL" || exitSignal === "SIGQUIT" || exitSignal === "SIGTERM" ? { failure_signal: exitSignal } : {}
|
|
113297
|
+
},
|
|
113298
|
+
classifyHelperSpawnFault(statusBuf)
|
|
113139
113299
|
)
|
|
113140
113300
|
);
|
|
113301
|
+
};
|
|
113302
|
+
proc.on("exit", (code, signal) => {
|
|
113303
|
+
exitCode = code;
|
|
113304
|
+
exitSignal = signal;
|
|
113305
|
+
exitGrace = setTimeout(() => settle(rejectExited), EXIT_GRACE_MS);
|
|
113141
113306
|
});
|
|
113307
|
+
proc.on("close", () => settle(rejectExited));
|
|
113142
113308
|
proc.on("error", (err) => {
|
|
113143
113309
|
settle(
|
|
113144
113310
|
() => reject(
|
|
@@ -113173,6 +113339,50 @@ async function spawnHelper(serial) {
|
|
|
113173
113339
|
}, READY_TIMEOUT_MS2);
|
|
113174
113340
|
});
|
|
113175
113341
|
}
|
|
113342
|
+
async function installHelper(serial, options) {
|
|
113343
|
+
try {
|
|
113344
|
+
await ensureAndroidDevtoolsInstalled(serial, options);
|
|
113345
|
+
} catch (err) {
|
|
113346
|
+
const cause = err instanceof Error ? err : new Error(String(err));
|
|
113347
|
+
const reason = cause.message.replace(/^.*? failed: /s, "").replace(/\s+/g, " ").trim().slice(0, 200);
|
|
113348
|
+
throw new FailureError(
|
|
113349
|
+
`the argent android helper is not installed on ${serial} and could not be installed: ${reason}`,
|
|
113350
|
+
{
|
|
113351
|
+
error_code: FAILURE_CODES.ANDROID_DEVTOOLS_HELPER_INSTALL_FAILED,
|
|
113352
|
+
failure_stage: "android_devtools_helper_install",
|
|
113353
|
+
failure_area: "tool_server",
|
|
113354
|
+
error_kind: "subprocess",
|
|
113355
|
+
failure_command: "adb"
|
|
113356
|
+
},
|
|
113357
|
+
{ cause }
|
|
113358
|
+
);
|
|
113359
|
+
}
|
|
113360
|
+
}
|
|
113361
|
+
async function spawnHelperWithRepair(serial) {
|
|
113362
|
+
await installHelper(serial, {});
|
|
113363
|
+
try {
|
|
113364
|
+
return await spawnHelper(serial);
|
|
113365
|
+
} catch (err) {
|
|
113366
|
+
if (!(err instanceof HelperSpawnError) || err.fault !== "instrumentation-missing") throw err;
|
|
113367
|
+
await installHelper(serial, { force: true });
|
|
113368
|
+
try {
|
|
113369
|
+
return await spawnHelper(serial);
|
|
113370
|
+
} catch (repairErr) {
|
|
113371
|
+
if (!(repairErr instanceof HelperSpawnError)) throw repairErr;
|
|
113372
|
+
throw new FailureError(
|
|
113373
|
+
`the argent android helper could not start on ${serial} even after reinstalling it: ${repairErr.message}`,
|
|
113374
|
+
{
|
|
113375
|
+
error_code: FAILURE_CODES.ANDROID_DEVTOOLS_HELPER_REPAIR_FAILED,
|
|
113376
|
+
failure_stage: "android_devtools_helper_repair",
|
|
113377
|
+
failure_area: "tool_server",
|
|
113378
|
+
error_kind: "subprocess",
|
|
113379
|
+
failure_command: "android_devtools"
|
|
113380
|
+
},
|
|
113381
|
+
{ cause: repairErr }
|
|
113382
|
+
);
|
|
113383
|
+
}
|
|
113384
|
+
}
|
|
113385
|
+
}
|
|
113176
113386
|
async function removeAdbForward(serial, localPort) {
|
|
113177
113387
|
try {
|
|
113178
113388
|
await runAdb(["-s", serial, "forward", "--remove", `tcp:${localPort}`], { timeoutMs: 5e3 });
|
|
@@ -113222,8 +113432,7 @@ var androidDevtoolsBlueprint = {
|
|
|
113222
113432
|
}
|
|
113223
113433
|
const serial = device.id;
|
|
113224
113434
|
const events = new TypedEventEmitter();
|
|
113225
|
-
await
|
|
113226
|
-
const spawned = await spawnHelper(serial);
|
|
113435
|
+
const spawned = await spawnHelperWithRepair(serial);
|
|
113227
113436
|
let ready2 = false;
|
|
113228
113437
|
let disposed = false;
|
|
113229
113438
|
let client2;
|
|
@@ -113398,9 +113607,9 @@ function hasUnreadWebView(node) {
|
|
|
113398
113607
|
// ../tool-server/src/preview.ts
|
|
113399
113608
|
function findUiFile(name) {
|
|
113400
113609
|
const candidates = [
|
|
113401
|
-
|
|
113402
|
-
|
|
113403
|
-
|
|
113610
|
+
import_node_path9.default.join(__dirname, "preview-ui", name),
|
|
113611
|
+
import_node_path9.default.resolve(__dirname, "..", "..", "..", "ui", name),
|
|
113612
|
+
import_node_path9.default.resolve(__dirname, "..", "..", "ui", name)
|
|
113404
113613
|
];
|
|
113405
113614
|
for (const p of candidates) {
|
|
113406
113615
|
if (import_node_fs8.default.existsSync(p)) return p;
|
|
@@ -113409,7 +113618,7 @@ function findUiFile(name) {
|
|
|
113409
113618
|
}
|
|
113410
113619
|
function serveUiFile(res, filePath, contentType) {
|
|
113411
113620
|
res.set("Cache-Control", "no-store, must-revalidate");
|
|
113412
|
-
res.type(contentType).sendFile(
|
|
113621
|
+
res.type(contentType).sendFile(import_node_path9.default.basename(filePath), { root: import_node_path9.default.dirname(filePath) });
|
|
113413
113622
|
}
|
|
113414
113623
|
function wsUrlFromHttp(httpUrl2) {
|
|
113415
113624
|
const u = new URL(httpUrl2);
|
|
@@ -113753,9 +113962,9 @@ data: ${JSON.stringify(data)}
|
|
|
113753
113962
|
return;
|
|
113754
113963
|
}
|
|
113755
113964
|
const contained = allowedRoots.some(
|
|
113756
|
-
(root) => real === root || real.startsWith(root +
|
|
113965
|
+
(root) => real === root || real.startsWith(root + import_node_path9.default.sep)
|
|
113757
113966
|
);
|
|
113758
|
-
const mime = IMG_MIME[
|
|
113967
|
+
const mime = IMG_MIME[import_node_path9.default.extname(real).toLowerCase()];
|
|
113759
113968
|
if (!contained || !mime || size > MAX_PREVIEW_BYTES) {
|
|
113760
113969
|
res.status(404).end();
|
|
113761
113970
|
return;
|
|
@@ -113821,13 +114030,13 @@ var import_node_child_process17 = require("node:child_process");
|
|
|
113821
114030
|
// ../archive/src/index.ts
|
|
113822
114031
|
var import_node_child_process16 = require("node:child_process");
|
|
113823
114032
|
var import_promises6 = require("node:fs/promises");
|
|
113824
|
-
var
|
|
114033
|
+
var import_node_path10 = require("node:path");
|
|
113825
114034
|
var import_node_util13 = require("node:util");
|
|
113826
114035
|
var execFileAsync13 = (0, import_node_util13.promisify)(import_node_child_process16.execFile);
|
|
113827
114036
|
var ArchiveError = class extends Error {
|
|
113828
114037
|
};
|
|
113829
114038
|
function createTarGzArgs(sourcePath, target) {
|
|
113830
|
-
return ["-czf", target, "-C", (0,
|
|
114039
|
+
return ["-czf", target, "-C", (0, import_node_path10.dirname)(sourcePath), (0, import_node_path10.basename)(sourcePath)];
|
|
113831
114040
|
}
|
|
113832
114041
|
function normalizeTarMemberPath(memberPath2) {
|
|
113833
114042
|
return memberPath2.replace(/^\.\//, "").replace(/\\/g, "/");
|
|
@@ -113836,13 +114045,13 @@ function isSafeTarMember(memberPath2, destDir) {
|
|
|
113836
114045
|
const normalized = normalizeTarMemberPath(memberPath2);
|
|
113837
114046
|
if (!normalized || normalized === "." || normalized === "./") return false;
|
|
113838
114047
|
if (normalized.startsWith("/") || /^[A-Za-z]:[\\/]/.test(normalized)) return false;
|
|
113839
|
-
const relative5 =
|
|
114048
|
+
const relative5 = import_node_path10.posix.normalize(normalized);
|
|
113840
114049
|
if (relative5 === ".." || relative5.startsWith("../") || relative5.split("/").includes("..")) {
|
|
113841
114050
|
return false;
|
|
113842
114051
|
}
|
|
113843
|
-
const root = (0,
|
|
113844
|
-
const resolved = (0,
|
|
113845
|
-
return resolved === root || resolved.startsWith(root +
|
|
114052
|
+
const root = (0, import_node_path10.resolve)(destDir);
|
|
114053
|
+
const resolved = (0, import_node_path10.resolve)(destDir, relative5);
|
|
114054
|
+
return resolved === root || resolved.startsWith(root + import_node_path10.sep);
|
|
113846
114055
|
}
|
|
113847
114056
|
async function listTarMembers(tarPath) {
|
|
113848
114057
|
const { stdout } = await execFileAsync13("tar", ["-tzf", tarPath]);
|
|
@@ -113850,7 +114059,7 @@ async function listTarMembers(tarPath) {
|
|
|
113850
114059
|
}
|
|
113851
114060
|
function isEscapingLinkTarget(target) {
|
|
113852
114061
|
if (target.startsWith("/") || /^[A-Za-z]:[\\/]/.test(target)) return true;
|
|
113853
|
-
return
|
|
114062
|
+
return import_node_path10.posix.normalize(target.replace(/\\/g, "/")).split("/").includes("..");
|
|
113854
114063
|
}
|
|
113855
114064
|
async function assertSafeMemberTypes(tarPath) {
|
|
113856
114065
|
const { stdout } = await execFileAsync13("tar", ["-tzvf", tarPath]);
|
|
@@ -113895,7 +114104,7 @@ async function assertSafeArchive(tarPath, destDir) {
|
|
|
113895
114104
|
async function resolveMember(destDir, expectedName) {
|
|
113896
114105
|
const entries = await (0, import_promises6.readdir)(destDir);
|
|
113897
114106
|
if (entries.includes(expectedName)) {
|
|
113898
|
-
return (0,
|
|
114107
|
+
return (0, import_node_path10.join)(destDir, expectedName);
|
|
113899
114108
|
}
|
|
113900
114109
|
const real = entries.filter((e) => !e.startsWith("._"));
|
|
113901
114110
|
if (real.length !== 1) {
|
|
@@ -113903,7 +114112,7 @@ async function resolveMember(destDir, expectedName) {
|
|
|
113903
114112
|
`Could not identify the extracted member (expected "${expectedName}", found ${real.length} entries).`
|
|
113904
114113
|
);
|
|
113905
114114
|
}
|
|
113906
|
-
return (0,
|
|
114115
|
+
return (0, import_node_path10.join)(destDir, real[0]);
|
|
113907
114116
|
}
|
|
113908
114117
|
async function safeExtractTarGz(tarPath, destDir, expectedName) {
|
|
113909
114118
|
await assertSafeArchive(tarPath, destDir);
|
|
@@ -113912,7 +114121,7 @@ async function safeExtractTarGz(tarPath, destDir, expectedName) {
|
|
|
113912
114121
|
}
|
|
113913
114122
|
|
|
113914
114123
|
// ../tool-server/src/artifacts.ts
|
|
113915
|
-
|
|
114124
|
+
init_src2();
|
|
113916
114125
|
function requireArtifacts(ctx) {
|
|
113917
114126
|
if (!ctx?.artifacts) {
|
|
113918
114127
|
throw new Error(
|
|
@@ -113980,9 +114189,9 @@ function streamDirectoryAsTarGz(id, entry, res) {
|
|
|
113980
114189
|
// ../tool-server/src/file-inputs.ts
|
|
113981
114190
|
var import_promises8 = require("node:fs/promises");
|
|
113982
114191
|
var import_node_os8 = require("node:os");
|
|
113983
|
-
var
|
|
114192
|
+
var import_node_path11 = require("node:path");
|
|
113984
114193
|
var import_bytes = __toESM(require_bytes());
|
|
113985
|
-
|
|
114194
|
+
init_src2();
|
|
113986
114195
|
var MAX_UPLOAD_BYTES = 32 * 1024 * 1024;
|
|
113987
114196
|
var FileInputError = class extends Error {
|
|
113988
114197
|
};
|
|
@@ -114029,8 +114238,8 @@ async function materializeUpload(wire) {
|
|
|
114029
114238
|
`Uploaded content for "${wire.path}" is ${data.length} bytes but the client recorded ${wire.size} \u2014 refusing a truncated or corrupted upload.`
|
|
114030
114239
|
);
|
|
114031
114240
|
}
|
|
114032
|
-
const dir = await (0, import_promises8.mkdtemp)((0,
|
|
114033
|
-
const filePath = (0,
|
|
114241
|
+
const dir = await (0, import_promises8.mkdtemp)((0, import_node_path11.join)((0, import_node_os8.tmpdir)(), "argent-file-input-"));
|
|
114242
|
+
const filePath = (0, import_node_path11.join)(dir, sanitizeFilename((0, import_node_path11.basename)(wire.path)));
|
|
114034
114243
|
await (0, import_promises8.writeFile)(filePath, data);
|
|
114035
114244
|
return { filePath, dir };
|
|
114036
114245
|
}
|
|
@@ -114053,10 +114262,10 @@ async function extractTarUpload(wire, uploadId, meta3, tempDirs, lookupUpload) {
|
|
|
114053
114262
|
);
|
|
114054
114263
|
}
|
|
114055
114264
|
const extractDir = await (0, import_promises8.mkdtemp)(
|
|
114056
|
-
(0,
|
|
114265
|
+
(0, import_node_path11.join)((0, import_node_os8.tmpdir)(), `argent-tar-upload-${entry.sha256.slice(0, 16)}-`)
|
|
114057
114266
|
);
|
|
114058
114267
|
tempDirs.push(extractDir);
|
|
114059
|
-
const uploaded = await safeExtractTarGz(entry.tarPath, extractDir, (0,
|
|
114268
|
+
const uploaded = await safeExtractTarGz(entry.tarPath, extractDir, (0, import_node_path11.basename)(wire.path));
|
|
114060
114269
|
return { value: uploaded, meta: { ...meta3, viaUpload: true } };
|
|
114061
114270
|
} catch (err) {
|
|
114062
114271
|
if (err instanceof FileInputError) throw err;
|
|
@@ -114706,7 +114915,7 @@ function createHttpApp(registry2, options) {
|
|
|
114706
114915
|
return;
|
|
114707
114916
|
}
|
|
114708
114917
|
const id = (0, import_node_crypto8.randomUUID)();
|
|
114709
|
-
const tarPath = (0,
|
|
114918
|
+
const tarPath = (0, import_node_path12.join)((0, import_node_os9.tmpdir)(), `argent-upload-${id}.tar.gz`);
|
|
114710
114919
|
const ws = (0, import_node_fs10.createWriteStream)(tarPath);
|
|
114711
114920
|
let received = 0;
|
|
114712
114921
|
let released = false;
|
|
@@ -115110,12 +115319,12 @@ function createHttpApp(registry2, options) {
|
|
|
115110
115319
|
// ../tool-server/src/event-log.ts
|
|
115111
115320
|
var import_bunyan = __toESM(require_bunyan());
|
|
115112
115321
|
var import_node_fs11 = require("node:fs");
|
|
115113
|
-
var
|
|
115114
|
-
|
|
115322
|
+
var import_node_path13 = require("node:path");
|
|
115323
|
+
init_src2();
|
|
115115
115324
|
function createToolServerEventLog({
|
|
115116
115325
|
filePath
|
|
115117
115326
|
}) {
|
|
115118
|
-
(0, import_node_fs11.mkdirSync)((0,
|
|
115327
|
+
(0, import_node_fs11.mkdirSync)((0, import_node_path13.dirname)(filePath), { recursive: true });
|
|
115119
115328
|
(0, import_node_fs11.writeFileSync)(filePath, "");
|
|
115120
115329
|
const fileStream = (0, import_node_fs11.createWriteStream)(filePath, { flags: "a" });
|
|
115121
115330
|
let disposed = false;
|
|
@@ -115263,10 +115472,11 @@ function attachRegistryEventLogger(registry2, eventLog) {
|
|
|
115263
115472
|
}
|
|
115264
115473
|
|
|
115265
115474
|
// ../tool-server/src/utils/setup-registry.ts
|
|
115475
|
+
init_src2();
|
|
115266
115476
|
init_src();
|
|
115267
115477
|
|
|
115268
115478
|
// ../tool-server/src/blueprints/ios-device-runner.ts
|
|
115269
|
-
|
|
115479
|
+
init_src2();
|
|
115270
115480
|
|
|
115271
115481
|
// ../tool-server/src/utils/ios-device/runner-artifact.ts
|
|
115272
115482
|
var import_node_child_process18 = require("node:child_process");
|
|
@@ -115276,7 +115486,7 @@ var fs23 = __toESM(require("node:fs"));
|
|
|
115276
115486
|
var fsp = __toESM(require("node:fs/promises"));
|
|
115277
115487
|
var os10 = __toESM(require("node:os"));
|
|
115278
115488
|
var path21 = __toESM(require("node:path"));
|
|
115279
|
-
|
|
115489
|
+
init_src2();
|
|
115280
115490
|
|
|
115281
115491
|
// ../tool-server/src/utils/keyed-lock.ts
|
|
115282
115492
|
async function withKeyedLock(locks, key2, fn) {
|
|
@@ -115292,7 +115502,7 @@ async function withKeyedLock(locks, key2, fn) {
|
|
|
115292
115502
|
}
|
|
115293
115503
|
|
|
115294
115504
|
// ../tool-server/src/utils/ios-device/runner-signing.ts
|
|
115295
|
-
|
|
115505
|
+
init_src2();
|
|
115296
115506
|
function signingTeamError(message) {
|
|
115297
115507
|
return withFailureSignal(new Error(message), {
|
|
115298
115508
|
error_code: FAILURE_CODES.IOS_DEVICE_RUNNER_NOT_READY,
|
|
@@ -115490,13 +115700,13 @@ async function ensureRunnerArtifact(config2, opts = {}) {
|
|
|
115490
115700
|
xcodeVersionFingerprint()
|
|
115491
115701
|
]);
|
|
115492
115702
|
const staticArgs = runnerBuildStaticArgs(projectPath, config2);
|
|
115493
|
-
const
|
|
115703
|
+
const cacheKey2 = computeRunnerCacheKey(sourcesHash, xcodeVersion, staticArgs);
|
|
115494
115704
|
const derivedDataPath = derivedDir();
|
|
115495
115705
|
const build = opts.build ?? buildRunnerArtifact;
|
|
115496
115706
|
return withRunnerBuildLock(async () => {
|
|
115497
115707
|
const stampPath = path21.join(derivedDataPath, CACHE_KEY_FILE);
|
|
115498
115708
|
const stamped = await fsp.readFile(stampPath, "utf8").catch(() => null);
|
|
115499
|
-
if (!opts.force && stamped ===
|
|
115709
|
+
if (!opts.force && stamped === cacheKey2) {
|
|
115500
115710
|
const cached3 = findBaseXctestrun(derivedDataPath);
|
|
115501
115711
|
const expiresAt = await readRunnerExpiryDate(derivedDataPath);
|
|
115502
115712
|
const needsRenew = expiresAt !== null && profileNeedsRenewal(expiresAt, /* @__PURE__ */ new Date());
|
|
@@ -115508,14 +115718,14 @@ async function ensureRunnerArtifact(config2, opts = {}) {
|
|
|
115508
115718
|
};
|
|
115509
115719
|
}
|
|
115510
115720
|
}
|
|
115511
|
-
if (stamped !==
|
|
115721
|
+
if (stamped !== cacheKey2) {
|
|
115512
115722
|
await fsp.rm(derivedDataPath, {
|
|
115513
115723
|
recursive: true,
|
|
115514
115724
|
force: true
|
|
115515
115725
|
});
|
|
115516
115726
|
}
|
|
115517
115727
|
const built = await build(derivedDataPath, staticArgs, opts.destinationUdid);
|
|
115518
|
-
await fsp.writeFile(stampPath,
|
|
115728
|
+
await fsp.writeFile(stampPath, cacheKey2);
|
|
115519
115729
|
return built;
|
|
115520
115730
|
});
|
|
115521
115731
|
}
|
|
@@ -115585,7 +115795,7 @@ var fs24 = __toESM(require("node:fs"));
|
|
|
115585
115795
|
var fsp2 = __toESM(require("node:fs/promises"));
|
|
115586
115796
|
var os11 = __toESM(require("node:os"));
|
|
115587
115797
|
var path22 = __toESM(require("node:path"));
|
|
115588
|
-
|
|
115798
|
+
init_src2();
|
|
115589
115799
|
|
|
115590
115800
|
// ../tool-server/src/utils/process-kill.ts
|
|
115591
115801
|
function signalGroup(pid, signal) {
|
|
@@ -116169,7 +116379,7 @@ async function readRunnerCrashSummary(resultBundlePath) {
|
|
|
116169
116379
|
|
|
116170
116380
|
// ../tool-server/src/utils/ios-device/runner-client.ts
|
|
116171
116381
|
var import_node_crypto10 = require("node:crypto");
|
|
116172
|
-
|
|
116382
|
+
init_src2();
|
|
116173
116383
|
var RUNNER_COMMAND_TIMEOUT_MS = 45e3;
|
|
116174
116384
|
var RUNNER_STATUS_RECOVERY_TIMEOUT_MS = 3e3;
|
|
116175
116385
|
var RUNNER_READY_POLL_INTERVAL_MS = 250;
|
|
@@ -116659,7 +116869,7 @@ var iosDeviceRunnerBlueprint = {
|
|
|
116659
116869
|
// ../tool-server/src/blueprints/chromium-js-runtime-debugger.ts
|
|
116660
116870
|
init_wrapper();
|
|
116661
116871
|
var http2 = __toESM(require("node:http"));
|
|
116662
|
-
|
|
116872
|
+
init_src2();
|
|
116663
116873
|
|
|
116664
116874
|
// ../tool-server/src/utils/debugger/source-maps.ts
|
|
116665
116875
|
var ALLOWED_SOURCE_MAP_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1"]);
|
|
@@ -116732,18 +116942,10 @@ var os12 = __toESM(require("node:os"));
|
|
|
116732
116942
|
var MAX_ENTRIES = 5e4;
|
|
116733
116943
|
var CLUSTER_KEY_LENGTH = 80;
|
|
116734
116944
|
var SOURCE_EXT = /\.(tsx?|jsx?|mjs|cjs)$/;
|
|
116735
|
-
var LEVEL_DISPLAY = {
|
|
116736
|
-
log: "LOG ",
|
|
116737
|
-
warn: "WARN ",
|
|
116738
|
-
error: "ERROR",
|
|
116739
|
-
info: "INFO ",
|
|
116740
|
-
debug: "DEBUG"
|
|
116741
|
-
};
|
|
116742
116945
|
var LINE_RE = /^\[L:(\d+)\] (\S+) (\S+)\s+(\S+) \| (.*)$/;
|
|
116743
116946
|
var LogFileWriter = class {
|
|
116744
116947
|
filePath;
|
|
116745
116948
|
fd = null;
|
|
116746
|
-
writeBuffer = [];
|
|
116747
116949
|
bytesWritten = 0;
|
|
116748
116950
|
entryCount = 0;
|
|
116749
116951
|
levelCounts = {};
|
|
@@ -116761,18 +116963,9 @@ var LogFileWriter = class {
|
|
|
116761
116963
|
try {
|
|
116762
116964
|
this.fd = fs27.openSync(this.filePath, "w");
|
|
116763
116965
|
this.ready = true;
|
|
116764
|
-
this.flushBuffer();
|
|
116765
116966
|
} catch {
|
|
116766
116967
|
}
|
|
116767
116968
|
}
|
|
116768
|
-
flushBuffer() {
|
|
116769
|
-
if (!this.ready || this.fd === null) return;
|
|
116770
|
-
for (const line of this.writeBuffer) {
|
|
116771
|
-
const buf = Buffer.from(line);
|
|
116772
|
-
fs27.writeSync(this.fd, buf);
|
|
116773
|
-
}
|
|
116774
|
-
this.writeBuffer = [];
|
|
116775
|
-
}
|
|
116776
116969
|
write(entry) {
|
|
116777
116970
|
if (this.closed) throw new Error("LogFileWriter is closed");
|
|
116778
116971
|
if (this.entryCount >= MAX_ENTRIES) {
|
|
@@ -116787,14 +116980,12 @@ var LogFileWriter = class {
|
|
|
116787
116980
|
const sourceFile = sourceUrl ? cleanSourceUrl(sourceUrl) ?? void 0 : void 0;
|
|
116788
116981
|
const source = sourceFile !== void 0 && sourceLine !== void 0 ? `${sourceFile}:${sourceLine}` : "-";
|
|
116789
116982
|
const flatMessage = entry.message.replace(/\n/g, " ");
|
|
116790
|
-
const levelDisplay =
|
|
116983
|
+
const levelDisplay = entry.level.toUpperCase().padEnd(5);
|
|
116791
116984
|
const line = `[L:${entry.id}] ${entry.timestamp} ${levelDisplay} ${source} | ${flatMessage}
|
|
116792
116985
|
`;
|
|
116793
116986
|
if (this.ready && this.fd !== null) {
|
|
116794
116987
|
const buf = Buffer.from(line);
|
|
116795
116988
|
fs27.writeSync(this.fd, buf);
|
|
116796
|
-
} else {
|
|
116797
|
-
this.writeBuffer.push(line);
|
|
116798
116989
|
}
|
|
116799
116990
|
this.bytesWritten += Buffer.byteLength(line);
|
|
116800
116991
|
this.entryCount++;
|
|
@@ -116842,7 +117033,6 @@ var LogFileWriter = class {
|
|
|
116842
117033
|
}
|
|
116843
117034
|
readAll() {
|
|
116844
117035
|
if (this.closed || !this.ready) return [];
|
|
116845
|
-
this.flushBuffer();
|
|
116846
117036
|
try {
|
|
116847
117037
|
const content = fs27.readFileSync(this.filePath, "utf-8");
|
|
116848
117038
|
return content.split("\n").filter((line) => line.length > 0).map(parseFlatLine).filter((entry) => entry !== null);
|
|
@@ -117108,7 +117298,7 @@ var chromiumJsRuntimeDebuggerBlueprint = {
|
|
|
117108
117298
|
var net5 = __toESM(require("node:net"));
|
|
117109
117299
|
var fs28 = __toESM(require("node:fs"));
|
|
117110
117300
|
var import_node_child_process22 = require("node:child_process");
|
|
117111
|
-
|
|
117301
|
+
init_src2();
|
|
117112
117302
|
var TV_CONTROL_NAMESPACE = "TvControl";
|
|
117113
117303
|
function tvControlRef(device) {
|
|
117114
117304
|
return {
|
|
@@ -117438,11 +117628,11 @@ var tvControlBlueprint = {
|
|
|
117438
117628
|
};
|
|
117439
117629
|
|
|
117440
117630
|
// ../tool-server/src/blueprints/android-tv-control.ts
|
|
117441
|
-
|
|
117631
|
+
init_src2();
|
|
117442
117632
|
init_adb();
|
|
117443
117633
|
|
|
117444
117634
|
// ../tool-server/src/utils/android-input.ts
|
|
117445
|
-
|
|
117635
|
+
init_src2();
|
|
117446
117636
|
init_adb();
|
|
117447
117637
|
var ANDROID_NAMED_KEYCODES = {
|
|
117448
117638
|
"enter": 66,
|
|
@@ -117848,7 +118038,7 @@ Fails if the simulator server is not running for the given UDID.`,
|
|
|
117848
118038
|
|
|
117849
118039
|
// ../tool-server/src/tools/native-devtools/native-network-logs.ts
|
|
117850
118040
|
init_zod();
|
|
117851
|
-
|
|
118041
|
+
init_src2();
|
|
117852
118042
|
init_device_info();
|
|
117853
118043
|
var zodSchema3 = external_exports.object({
|
|
117854
118044
|
udid: external_exports.string().describe("Simulator UDID"),
|
|
@@ -117900,7 +118090,7 @@ A not-running app comes back as one of those statuses rather than a failure. An
|
|
|
117900
118090
|
|
|
117901
118091
|
// ../tool-server/src/tools/native-devtools/native-find-views.ts
|
|
117902
118092
|
init_zod();
|
|
117903
|
-
|
|
118093
|
+
init_src2();
|
|
117904
118094
|
init_device_info();
|
|
117905
118095
|
var zodSchema4 = external_exports.object({
|
|
117906
118096
|
udid: external_exports.string().describe("Simulator UDID"),
|
|
@@ -118030,7 +118220,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
|
|
|
118030
118220
|
|
|
118031
118221
|
// ../tool-server/src/tools/native-devtools/native-describe-screen.ts
|
|
118032
118222
|
init_zod();
|
|
118033
|
-
|
|
118223
|
+
init_src2();
|
|
118034
118224
|
init_device_info();
|
|
118035
118225
|
var zodSchema6 = external_exports.object({
|
|
118036
118226
|
udid: external_exports.string().describe("Simulator UDID"),
|
|
@@ -118101,7 +118291,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
|
|
|
118101
118291
|
|
|
118102
118292
|
// ../tool-server/src/tools/native-devtools/native-view-at-point.ts
|
|
118103
118293
|
init_zod();
|
|
118104
|
-
|
|
118294
|
+
init_src2();
|
|
118105
118295
|
init_device_info();
|
|
118106
118296
|
var zodSchema7 = external_exports.object({
|
|
118107
118297
|
udid: external_exports.string().describe("Simulator UDID"),
|
|
@@ -118187,7 +118377,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
|
|
|
118187
118377
|
|
|
118188
118378
|
// ../tool-server/src/tools/native-devtools/native-user-interactable-view-at-point.ts
|
|
118189
118379
|
init_zod();
|
|
118190
|
-
|
|
118380
|
+
init_src2();
|
|
118191
118381
|
init_device_info();
|
|
118192
118382
|
var zodSchema8 = external_exports.object({
|
|
118193
118383
|
udid: external_exports.string().describe("Simulator UDID"),
|
|
@@ -118272,10 +118462,10 @@ A not-connected or not-running app comes back as one of those statuses rather th
|
|
|
118272
118462
|
};
|
|
118273
118463
|
|
|
118274
118464
|
// ../tool-server/src/blueprints/js-runtime-debugger.ts
|
|
118275
|
-
|
|
118465
|
+
init_src2();
|
|
118276
118466
|
|
|
118277
118467
|
// ../tool-server/src/utils/debugger/discovery.ts
|
|
118278
|
-
|
|
118468
|
+
init_src2();
|
|
118279
118469
|
var DECOY_VM = "don't use";
|
|
118280
118470
|
async function discoverMetro(port) {
|
|
118281
118471
|
let statusRes;
|
|
@@ -118372,7 +118562,7 @@ init_device_info();
|
|
|
118372
118562
|
init_external_devices();
|
|
118373
118563
|
|
|
118374
118564
|
// ../tool-server/src/utils/debugger/target-selection.ts
|
|
118375
|
-
|
|
118565
|
+
init_src2();
|
|
118376
118566
|
function deviceKey(target) {
|
|
118377
118567
|
const logicalId = target.reactNative?.logicalDeviceId;
|
|
118378
118568
|
if (logicalId) return logicalId;
|
|
@@ -118923,7 +119113,7 @@ var jsRuntimeDebuggerBlueprint = {
|
|
|
118923
119113
|
};
|
|
118924
119114
|
|
|
118925
119115
|
// ../tool-server/src/blueprints/network-inspector.ts
|
|
118926
|
-
|
|
119116
|
+
init_src2();
|
|
118927
119117
|
|
|
118928
119118
|
// ../tool-server/src/utils/debugger/scripts/network-interceptor.ts
|
|
118929
119119
|
var NETWORK_INTERCEPTOR_SCRIPT = `(function() {
|
|
@@ -119153,7 +119343,7 @@ var networkInspectorBlueprint = {
|
|
|
119153
119343
|
};
|
|
119154
119344
|
|
|
119155
119345
|
// ../tool-server/src/blueprints/react-profiler-session.ts
|
|
119156
|
-
|
|
119346
|
+
init_src2();
|
|
119157
119347
|
init_external_devices();
|
|
119158
119348
|
|
|
119159
119349
|
// ../tool-server/src/utils/react-profiler/scripts.ts
|
|
@@ -119834,33 +120024,34 @@ var reactProfilerSessionBlueprint = {
|
|
|
119834
120024
|
}
|
|
119835
120025
|
};
|
|
119836
120026
|
var profilerPathsCache = /* @__PURE__ */ new Map();
|
|
119837
|
-
function
|
|
120027
|
+
function cacheKey(port, deviceId) {
|
|
119838
120028
|
return `${port}:${deviceId}`;
|
|
119839
120029
|
}
|
|
119840
120030
|
function cacheProfilerPaths(port, paths, deviceId) {
|
|
119841
|
-
profilerPathsCache.set(
|
|
120031
|
+
profilerPathsCache.set(cacheKey(port, deviceId), paths);
|
|
119842
120032
|
}
|
|
119843
120033
|
function getCachedProfilerPaths(port, deviceId) {
|
|
119844
|
-
return profilerPathsCache.get(
|
|
120034
|
+
return profilerPathsCache.get(cacheKey(port, deviceId));
|
|
119845
120035
|
}
|
|
119846
120036
|
function clearCachedProfilerPaths(port, deviceId) {
|
|
119847
|
-
profilerPathsCache.delete(
|
|
120037
|
+
profilerPathsCache.delete(cacheKey(port, deviceId));
|
|
119848
120038
|
}
|
|
119849
120039
|
|
|
119850
120040
|
// ../tool-server/src/tools/devices/boot-device.ts
|
|
119851
|
-
var
|
|
120041
|
+
var import_node_child_process25 = require("node:child_process");
|
|
119852
120042
|
var import_node_fs12 = require("node:fs");
|
|
119853
120043
|
var import_node_os11 = require("node:os");
|
|
119854
|
-
var
|
|
119855
|
-
var
|
|
120044
|
+
var import_node_path15 = require("node:path");
|
|
120045
|
+
var import_node_util18 = require("node:util");
|
|
119856
120046
|
init_zod();
|
|
119857
120047
|
init_src();
|
|
120048
|
+
init_src2();
|
|
119858
120049
|
init_adb();
|
|
119859
120050
|
|
|
119860
120051
|
// ../tool-server/src/utils/linux-preflight.ts
|
|
119861
120052
|
var fs30 = __toESM(require("node:fs"));
|
|
119862
120053
|
var import_node_os10 = require("node:os");
|
|
119863
|
-
var
|
|
120054
|
+
var import_node_path14 = require("node:path");
|
|
119864
120055
|
var import_ini2 = __toESM(require_ini());
|
|
119865
120056
|
function linuxBootDiagnostics(avdName) {
|
|
119866
120057
|
if (process.platform !== "linux") return null;
|
|
@@ -119888,7 +120079,7 @@ function checkKvm() {
|
|
|
119888
120079
|
var MIN_RAM_MB = 4096;
|
|
119889
120080
|
var MIN_HEAP_MB = 512;
|
|
119890
120081
|
function checkAvdSizing(avdName) {
|
|
119891
|
-
const configPath = (0,
|
|
120082
|
+
const configPath = (0, import_node_path14.join)((0, import_node_os10.homedir)(), ".android", "avd", `${avdName}.avd`, "config.ini");
|
|
119892
120083
|
let content;
|
|
119893
120084
|
try {
|
|
119894
120085
|
content = fs30.readFileSync(configPath, "utf8");
|
|
@@ -119937,8 +120128,41 @@ function androidHeadlessFromEnv() {
|
|
|
119937
120128
|
init_device_info();
|
|
119938
120129
|
init_external_devices();
|
|
119939
120130
|
|
|
120131
|
+
// ../tool-server/src/utils/hid-suppression.ts
|
|
120132
|
+
var import_node_child_process23 = require("node:child_process");
|
|
120133
|
+
var import_node_util17 = require("node:util");
|
|
120134
|
+
var execFileAsync17 = (0, import_node_util17.promisify)(import_node_child_process23.execFile);
|
|
120135
|
+
var WARMUP_TIMEOUT_MS = 4e4;
|
|
120136
|
+
var errText = (err) => err instanceof Error ? err.message : String(err);
|
|
120137
|
+
function startHidWarmUp(udid, deviceSet) {
|
|
120138
|
+
let binary;
|
|
120139
|
+
try {
|
|
120140
|
+
binary = simulatorServerBinaryPath();
|
|
120141
|
+
} catch (err) {
|
|
120142
|
+
process.stderr.write(
|
|
120143
|
+
`[hid-warmup ${udid.slice(0, 8)}] simulator-server binary not found (${errText(err)}); HID suppression protection is not active for this boot.
|
|
120144
|
+
`
|
|
120145
|
+
);
|
|
120146
|
+
return Promise.resolve();
|
|
120147
|
+
}
|
|
120148
|
+
const args = ["hid_warmup", "--id", udid];
|
|
120149
|
+
if (deviceSet) args.push("--device-set", deviceSet);
|
|
120150
|
+
return execFileAsync17(binary, args, {
|
|
120151
|
+
timeout: WARMUP_TIMEOUT_MS,
|
|
120152
|
+
// It prints CoreSimulator noise on every failed attach attempt — ~80KB
|
|
120153
|
+
// against a device that never comes up. Well under Node's 1MB default, but
|
|
120154
|
+
// the default is the only headroom there is, so name one.
|
|
120155
|
+
maxBuffer: 4 * 1024 * 1024
|
|
120156
|
+
}).then(() => void 0).catch((err) => {
|
|
120157
|
+
process.stderr.write(
|
|
120158
|
+
`[hid-warmup ${udid.slice(0, 8)}] warm-up did not run (${errText(err)}); input may be silently dropped on this simulator.
|
|
120159
|
+
`
|
|
120160
|
+
);
|
|
120161
|
+
});
|
|
120162
|
+
}
|
|
120163
|
+
|
|
119940
120164
|
// ../tool-server/src/utils/vega-vvd.ts
|
|
119941
|
-
|
|
120165
|
+
init_src2();
|
|
119942
120166
|
init_adb();
|
|
119943
120167
|
var MultipleVegaDevicesError = class extends FailureError {
|
|
119944
120168
|
constructor(consolePorts) {
|
|
@@ -120067,10 +120291,10 @@ async function waitForVvdRunning(timeoutMs) {
|
|
|
120067
120291
|
}
|
|
120068
120292
|
|
|
120069
120293
|
// ../tool-server/src/tools/devices/boot-electron.ts
|
|
120070
|
-
var
|
|
120294
|
+
var import_node_child_process24 = require("node:child_process");
|
|
120071
120295
|
var fs31 = __toESM(require("node:fs"));
|
|
120072
120296
|
var path26 = __toESM(require("node:path"));
|
|
120073
|
-
|
|
120297
|
+
init_src2();
|
|
120074
120298
|
init_device_info();
|
|
120075
120299
|
|
|
120076
120300
|
// ../tool-server/src/utils/electron-env.ts
|
|
@@ -120263,9 +120487,12 @@ async function bootElectronApp(options) {
|
|
|
120263
120487
|
];
|
|
120264
120488
|
let child;
|
|
120265
120489
|
try {
|
|
120266
|
-
child = (0,
|
|
120490
|
+
child = (0, import_node_child_process24.spawn)(launcher.command, args, {
|
|
120267
120491
|
detached: true,
|
|
120268
|
-
|
|
120492
|
+
// stdout is discarded, not piped: nothing reads it, and an unread pipe
|
|
120493
|
+
// blocks the child's writes once the OS buffer fills. The
|
|
120494
|
+
// ELECTRON_ENABLE_LOGGING below is what keeps it writing.
|
|
120495
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
120269
120496
|
// Strip ELECTRON_RUN_AS_NODE (see electronGuiChildEnv): inherited from an
|
|
120270
120497
|
// Electron-based MCP host it would boot the binary in Node mode with no
|
|
120271
120498
|
// CDP endpoint, failing boot-device instead of bringing the app up.
|
|
@@ -120382,7 +120609,7 @@ async function bootElectronApp(options) {
|
|
|
120382
120609
|
}
|
|
120383
120610
|
|
|
120384
120611
|
// ../tool-server/src/tools/devices/boot-device.ts
|
|
120385
|
-
var
|
|
120612
|
+
var execFileAsync18 = (0, import_node_util18.promisify)(import_node_child_process25.execFile);
|
|
120386
120613
|
var zodSchema9 = external_exports.object({
|
|
120387
120614
|
udid: external_exports.string().optional().describe(
|
|
120388
120615
|
"iOS: simulator UDID to boot (from `list-devices`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`."
|
|
@@ -120586,7 +120813,7 @@ async function bootIos(udid, registry2, force, headless) {
|
|
|
120586
120813
|
const deviceSet = await deviceSetForUdid(udid);
|
|
120587
120814
|
const prefix = simctlPrefix(deviceSet);
|
|
120588
120815
|
if (force && simState === "Booted") {
|
|
120589
|
-
await
|
|
120816
|
+
await execFileAsync18("xcrun", [...prefix, "shutdown", udid]);
|
|
120590
120817
|
}
|
|
120591
120818
|
const needsPreBoot = simState === "Shutdown" || force && simState === "Booted";
|
|
120592
120819
|
if (needsPreBoot) {
|
|
@@ -120597,13 +120824,15 @@ async function bootIos(udid, registry2, force, headless) {
|
|
|
120597
120824
|
);
|
|
120598
120825
|
});
|
|
120599
120826
|
}
|
|
120600
|
-
|
|
120827
|
+
const alreadyUp = simState === "Booted" && !force;
|
|
120828
|
+
const hidWarmUp = alreadyUp || isTvOs ? Promise.resolve() : startHidWarmUp(udid, deviceSet);
|
|
120829
|
+
await execFileAsync18("xcrun", [...prefix, "boot", udid]).catch((err) => {
|
|
120601
120830
|
const message = err instanceof Error ? err.message : String(err);
|
|
120602
120831
|
if (!message.includes("Unable to boot device in current state: Booted")) {
|
|
120603
120832
|
throw err;
|
|
120604
120833
|
}
|
|
120605
120834
|
});
|
|
120606
|
-
await
|
|
120835
|
+
await execFileAsync18("xcrun", [...prefix, "bootstatus", udid, "-b"]);
|
|
120607
120836
|
if (isTvOs && needsPreBoot) {
|
|
120608
120837
|
await registry2.disposeService(`${TV_CONTROL_NAMESPACE}:${udid}`).catch((err) => {
|
|
120609
120838
|
if (err instanceof ServiceNotFoundError) return;
|
|
@@ -120622,6 +120851,7 @@ async function bootIos(udid, registry2, force, headless) {
|
|
|
120622
120851
|
});
|
|
120623
120852
|
}
|
|
120624
120853
|
await ensureAutomationEnabled(udid).catch(() => void 0);
|
|
120854
|
+
await hidWarmUp;
|
|
120625
120855
|
const ndRef = nativeDevtoolsRef({ id: udid, platform: "ios", kind: "simulator" });
|
|
120626
120856
|
const ndApi = await registry2.resolveService(ndRef.urn, ndRef.options);
|
|
120627
120857
|
await ndApi.reverifyEnv().catch(() => {
|
|
@@ -120631,7 +120861,7 @@ async function bootIos(udid, registry2, force, headless) {
|
|
|
120631
120861
|
return buildInitFailedResult(udid, initFailure);
|
|
120632
120862
|
}
|
|
120633
120863
|
if (!deviceSet) {
|
|
120634
|
-
await
|
|
120864
|
+
await execFileAsync18("defaults", [
|
|
120635
120865
|
"write",
|
|
120636
120866
|
"com.apple.iphonesimulator",
|
|
120637
120867
|
"CurrentDeviceUDID",
|
|
@@ -120640,7 +120870,7 @@ async function bootIos(udid, registry2, force, headless) {
|
|
|
120640
120870
|
});
|
|
120641
120871
|
}
|
|
120642
120872
|
if (!headless && !iosHeadlessFromEnv() && !deviceSet) {
|
|
120643
|
-
await
|
|
120873
|
+
await execFileAsync18("open", ["-a", "Simulator.app"]).catch(() => execFileAsync18("open", ["-b", "com.apple.dt.Devices"])).catch(() => {
|
|
120644
120874
|
});
|
|
120645
120875
|
}
|
|
120646
120876
|
return { platform: "ios", udid, booted: true };
|
|
@@ -120683,11 +120913,11 @@ async function attemptBoot(params) {
|
|
|
120683
120913
|
let stdio = "ignore";
|
|
120684
120914
|
if (process.platform === "win32") {
|
|
120685
120915
|
const safeName = params.avdName.replace(/[^\w.-]/g, "_");
|
|
120686
|
-
const logPath = (0,
|
|
120916
|
+
const logPath = (0, import_node_path15.join)((0, import_node_os11.tmpdir)(), `argent-emulator-${safeName}.log`);
|
|
120687
120917
|
emulatorLogFd = (0, import_node_fs12.openSync)(logPath, "w");
|
|
120688
120918
|
stdio = ["ignore", emulatorLogFd, emulatorLogFd];
|
|
120689
120919
|
}
|
|
120690
|
-
const child = (0,
|
|
120920
|
+
const child = (0, import_node_child_process25.spawn)(params.emulatorBinary, params.emulatorArgs, {
|
|
120691
120921
|
detached: true,
|
|
120692
120922
|
stdio
|
|
120693
120923
|
});
|
|
@@ -121307,12 +121537,16 @@ function dispatchByPlatform(opts) {
|
|
|
121307
121537
|
};
|
|
121308
121538
|
}
|
|
121309
121539
|
|
|
121540
|
+
// ../tool-server/src/utils/bundle-id.ts
|
|
121541
|
+
var BUNDLE_ID_PATTERN = /^[A-Za-z0-9_][A-Za-z0-9._-]*$/;
|
|
121542
|
+
var BUNDLE_ID_MESSAGE = "bundleId may only contain letters, digits, '.', '_' and '-', and may not start with '-' or '.'";
|
|
121543
|
+
|
|
121310
121544
|
// ../tool-server/src/tools/launch-app/platforms/ios.ts
|
|
121311
|
-
var
|
|
121312
|
-
var
|
|
121313
|
-
|
|
121545
|
+
var import_node_child_process26 = require("node:child_process");
|
|
121546
|
+
var import_node_util19 = require("node:util");
|
|
121547
|
+
init_src2();
|
|
121314
121548
|
init_external_devices();
|
|
121315
|
-
var
|
|
121549
|
+
var execFileAsync19 = (0, import_node_util19.promisify)(import_node_child_process26.execFile);
|
|
121316
121550
|
function makeIosImpl(registry2) {
|
|
121317
121551
|
return {
|
|
121318
121552
|
requires: ["xcrun"],
|
|
@@ -121327,7 +121561,7 @@ function makeIosImpl(registry2) {
|
|
|
121327
121561
|
if (blocked) return blocked;
|
|
121328
121562
|
}
|
|
121329
121563
|
try {
|
|
121330
|
-
await
|
|
121564
|
+
await execFileAsync19(
|
|
121331
121565
|
"xcrun",
|
|
121332
121566
|
await simctlArgsForUdid(params.udid, ["launch", params.udid, params.bundleId])
|
|
121333
121567
|
);
|
|
@@ -121350,7 +121584,7 @@ function makeIosImpl(registry2) {
|
|
|
121350
121584
|
}
|
|
121351
121585
|
|
|
121352
121586
|
// ../tool-server/src/utils/ios-device/app-session.ts
|
|
121353
|
-
|
|
121587
|
+
init_src2();
|
|
121354
121588
|
var currentAppByUdid = /* @__PURE__ */ new Map();
|
|
121355
121589
|
var SESSION_ONLY_SYSTEM_UI_BUNDLE_IDS = /* @__PURE__ */ new Set(["com.apple.springboard", "com.apple.Spotlight"]);
|
|
121356
121590
|
function isSessionOnlySystemUi(bundleId) {
|
|
@@ -121423,7 +121657,7 @@ var remoteSimctl = {
|
|
|
121423
121657
|
};
|
|
121424
121658
|
|
|
121425
121659
|
// ../tool-server/src/tools/launch-app/platforms/shared.ts
|
|
121426
|
-
|
|
121660
|
+
init_src2();
|
|
121427
121661
|
function buildIosLaunchHandler(backend) {
|
|
121428
121662
|
return async (services, params) => {
|
|
121429
121663
|
const blocked = await precheckNativeDevtools(services.nativeDevtools, params.udid);
|
|
@@ -121454,7 +121688,7 @@ var iosRemoteImpl = {
|
|
|
121454
121688
|
};
|
|
121455
121689
|
|
|
121456
121690
|
// ../tool-server/src/tools/launch-app/platforms/android.ts
|
|
121457
|
-
|
|
121691
|
+
init_src2();
|
|
121458
121692
|
init_adb();
|
|
121459
121693
|
function assertAmStartOk(out) {
|
|
121460
121694
|
if (!/Status:\s*ok/i.test(out)) {
|
|
@@ -121556,12 +121790,11 @@ var vegaImpl = {
|
|
|
121556
121790
|
};
|
|
121557
121791
|
|
|
121558
121792
|
// ../tool-server/src/tools/launch-app/index.ts
|
|
121559
|
-
var BUNDLE_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9._-]*$/;
|
|
121560
121793
|
var ACTIVITY_PATTERN = /^[A-Za-z_.][A-Za-z0-9._/-]*$/;
|
|
121561
121794
|
var zodSchema10 = external_exports.object({
|
|
121562
121795
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
|
|
121563
|
-
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN,
|
|
121564
|
-
"App identifier. iOS: bundle id (e.g. com.apple.MobileSMS). Android: package name from build.gradle `applicationId` (e.g. com.android.settings). Chromium:
|
|
121796
|
+
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
121797
|
+
"App identifier. iOS: bundle id (e.g. com.apple.MobileSMS). Android: package name from build.gradle `applicationId` (e.g. com.android.settings). Chromium: any tag matching the same alphabet (letters, digits, '.', '_' and '-'); the call is a no-op since the renderer is already running."
|
|
121565
121798
|
),
|
|
121566
121799
|
activity: external_exports.string().regex(ACTIVITY_PATTERN, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
|
|
121567
121800
|
"Android-only: fully-qualified Activity name (e.g. `.MainActivity` or `com.example/com.example.MainActivity`). If omitted on Android, the app's default launcher activity is used. Ignored on iOS / Chromium."
|
|
@@ -121620,11 +121853,11 @@ init_zod();
|
|
|
121620
121853
|
init_device_info();
|
|
121621
121854
|
|
|
121622
121855
|
// ../tool-server/src/tools/restart-app/platforms/ios.ts
|
|
121623
|
-
var
|
|
121624
|
-
var
|
|
121625
|
-
|
|
121856
|
+
var import_node_child_process27 = require("node:child_process");
|
|
121857
|
+
var import_node_util20 = require("node:util");
|
|
121858
|
+
init_src2();
|
|
121626
121859
|
init_external_devices();
|
|
121627
|
-
var
|
|
121860
|
+
var execFileAsync20 = (0, import_node_util20.promisify)(import_node_child_process27.execFile);
|
|
121628
121861
|
function makeIosImpl2(registry2) {
|
|
121629
121862
|
return {
|
|
121630
121863
|
requires: ["xcrun"],
|
|
@@ -121640,11 +121873,11 @@ function makeIosImpl2(registry2) {
|
|
|
121640
121873
|
if (blocked) return blocked;
|
|
121641
121874
|
}
|
|
121642
121875
|
try {
|
|
121643
|
-
await
|
|
121876
|
+
await execFileAsync20("xcrun", await simctlArgsForUdid(udid, ["terminate", udid, bundleId]));
|
|
121644
121877
|
} catch {
|
|
121645
121878
|
}
|
|
121646
121879
|
try {
|
|
121647
|
-
await
|
|
121880
|
+
await execFileAsync20("xcrun", await simctlArgsForUdid(udid, ["launch", udid, bundleId]));
|
|
121648
121881
|
} catch (err) {
|
|
121649
121882
|
throw new FailureError(
|
|
121650
121883
|
`Failed to restart iOS app ${bundleId} on ${udid}.`,
|
|
@@ -121683,7 +121916,7 @@ var iosDeviceImpl2 = {
|
|
|
121683
121916
|
};
|
|
121684
121917
|
|
|
121685
121918
|
// ../tool-server/src/tools/restart-app/platforms/shared.ts
|
|
121686
|
-
|
|
121919
|
+
init_src2();
|
|
121687
121920
|
function buildIosRestartHandler(backend) {
|
|
121688
121921
|
return async (services, params) => {
|
|
121689
121922
|
const { udid, bundleId } = params;
|
|
@@ -121719,7 +121952,7 @@ var iosRemoteImpl2 = {
|
|
|
121719
121952
|
};
|
|
121720
121953
|
|
|
121721
121954
|
// ../tool-server/src/tools/restart-app/platforms/android.ts
|
|
121722
|
-
|
|
121955
|
+
init_src2();
|
|
121723
121956
|
init_adb();
|
|
121724
121957
|
var androidImpl2 = {
|
|
121725
121958
|
requires: ["adb"],
|
|
@@ -121770,11 +122003,10 @@ var vegaImpl2 = {
|
|
|
121770
122003
|
};
|
|
121771
122004
|
|
|
121772
122005
|
// ../tool-server/src/tools/restart-app/index.ts
|
|
121773
|
-
var BUNDLE_ID_PATTERN2 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
|
|
121774
122006
|
var ACTIVITY_PATTERN2 = /^[A-Za-z_.][A-Za-z0-9._/-]*$/;
|
|
121775
122007
|
var zodSchema11 = external_exports.object({
|
|
121776
122008
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
121777
|
-
bundleId: external_exports.string().min(1).regex(
|
|
122009
|
+
bundleId: external_exports.string().min(1).regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe("App identifier. iOS: bundle id. Android: package name."),
|
|
121778
122010
|
activity: external_exports.string().regex(ACTIVITY_PATTERN2, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
|
|
121779
122011
|
"Android-only: relaunch a non-launcher Activity (e.g. `.SettingsActivity` or `com.example/com.example.SettingsActivity`). If omitted, the app's default launcher activity is used. Ignored on iOS."
|
|
121780
122012
|
)
|
|
@@ -121823,23 +122055,23 @@ Returns { restarted, bundleId }. Fails if the app is not installed.`,
|
|
|
121823
122055
|
init_zod();
|
|
121824
122056
|
|
|
121825
122057
|
// ../tool-server/src/tools/reinstall-app/platforms/ios.ts
|
|
121826
|
-
var
|
|
121827
|
-
var
|
|
121828
|
-
var
|
|
121829
|
-
|
|
121830
|
-
var
|
|
122058
|
+
var import_node_child_process28 = require("node:child_process");
|
|
122059
|
+
var import_node_util21 = require("node:util");
|
|
122060
|
+
var import_node_path16 = require("node:path");
|
|
122061
|
+
init_src2();
|
|
122062
|
+
var execFileAsync21 = (0, import_node_util21.promisify)(import_node_child_process28.execFile);
|
|
121831
122063
|
var iosImpl = {
|
|
121832
122064
|
requires: ["xcrun"],
|
|
121833
122065
|
handler: async (_services, params) => {
|
|
121834
122066
|
const { udid, bundleId, appPath } = params;
|
|
121835
|
-
const absolute = (0,
|
|
122067
|
+
const absolute = (0, import_node_path16.resolve)(appPath);
|
|
121836
122068
|
const { nativeId, prefix } = await simctlTargetForUdid(udid);
|
|
121837
122069
|
try {
|
|
121838
|
-
await
|
|
122070
|
+
await execFileAsync21("xcrun", [...prefix, "uninstall", nativeId, bundleId]);
|
|
121839
122071
|
} catch {
|
|
121840
122072
|
}
|
|
121841
122073
|
try {
|
|
121842
|
-
await
|
|
122074
|
+
await execFileAsync21("xcrun", [...prefix, "install", nativeId, absolute]);
|
|
121843
122075
|
} catch (err) {
|
|
121844
122076
|
throw new FailureError(
|
|
121845
122077
|
`Failed to install iOS app bundle on ${udid}.`,
|
|
@@ -121858,14 +122090,14 @@ var iosImpl = {
|
|
|
121858
122090
|
};
|
|
121859
122091
|
|
|
121860
122092
|
// ../tool-server/src/tools/reinstall-app/platforms/android.ts
|
|
121861
|
-
var
|
|
121862
|
-
|
|
122093
|
+
var import_node_path17 = require("node:path");
|
|
122094
|
+
init_src2();
|
|
121863
122095
|
init_adb();
|
|
121864
122096
|
var androidImpl3 = {
|
|
121865
122097
|
requires: ["adb"],
|
|
121866
122098
|
handler: async (_services, params) => {
|
|
121867
122099
|
const { udid, bundleId, appPath } = params;
|
|
121868
|
-
const absolute = (0,
|
|
122100
|
+
const absolute = (0, import_node_path17.resolve)(appPath);
|
|
121869
122101
|
try {
|
|
121870
122102
|
await runAdb(["-s", udid, "uninstall", bundleId], { timeoutMs: 3e4 });
|
|
121871
122103
|
} catch {
|
|
@@ -121887,7 +122119,7 @@ ${stderr}`;
|
|
|
121887
122119
|
};
|
|
121888
122120
|
|
|
121889
122121
|
// ../tool-server/src/tools/reinstall-app/platforms/ios-device.ts
|
|
121890
|
-
var
|
|
122122
|
+
var import_node_path18 = require("node:path");
|
|
121891
122123
|
var iosDeviceImpl3 = {
|
|
121892
122124
|
requires: ["xcrun"],
|
|
121893
122125
|
handler: async (_services, params) => {
|
|
@@ -121899,7 +122131,7 @@ var iosDeviceImpl3 = {
|
|
|
121899
122131
|
await ensureDeviceReady(params.udid);
|
|
121900
122132
|
await uninstallApp(params.udid, params.bundleId);
|
|
121901
122133
|
clearCurrentIosDeviceApp(params.udid, params.bundleId);
|
|
121902
|
-
await installApp(params.udid, (0,
|
|
122134
|
+
await installApp(params.udid, (0, import_node_path18.resolve)(params.appPath));
|
|
121903
122135
|
return {
|
|
121904
122136
|
reinstalled: true,
|
|
121905
122137
|
bundleId: params.bundleId
|
|
@@ -121908,12 +122140,12 @@ var iosDeviceImpl3 = {
|
|
|
121908
122140
|
};
|
|
121909
122141
|
|
|
121910
122142
|
// ../tool-server/src/tools/reinstall-app/platforms/ios-remote.ts
|
|
121911
|
-
var
|
|
122143
|
+
var import_node_path19 = require("node:path");
|
|
121912
122144
|
var iosRemoteImpl3 = {
|
|
121913
122145
|
requires: ["sim-remote"],
|
|
121914
122146
|
handler: async (_services, params) => {
|
|
121915
122147
|
const { udid, bundleId, appPath } = params;
|
|
121916
|
-
const absolute = (0,
|
|
122148
|
+
const absolute = (0, import_node_path19.resolve)(appPath);
|
|
121917
122149
|
try {
|
|
121918
122150
|
await simctlUninstall(udid, bundleId);
|
|
121919
122151
|
} catch {
|
|
@@ -121924,13 +122156,13 @@ var iosRemoteImpl3 = {
|
|
|
121924
122156
|
};
|
|
121925
122157
|
|
|
121926
122158
|
// ../tool-server/src/tools/reinstall-app/platforms/vega.ts
|
|
121927
|
-
var
|
|
121928
|
-
|
|
122159
|
+
var import_node_path20 = require("node:path");
|
|
122160
|
+
init_src2();
|
|
121929
122161
|
var vegaImpl3 = {
|
|
121930
122162
|
requires: ["vega"],
|
|
121931
122163
|
handler: async (_services, params) => {
|
|
121932
122164
|
const { udid, bundleId, appPath } = params;
|
|
121933
|
-
const absolute = (0,
|
|
122165
|
+
const absolute = (0, import_node_path20.resolve)(appPath);
|
|
121934
122166
|
await vegaDevice(udid, ["uninstall-app", "-a", bundleId], { timeoutMs: 6e4 }).catch(
|
|
121935
122167
|
() => {
|
|
121936
122168
|
}
|
|
@@ -121956,10 +122188,9 @@ ${stderr}`;
|
|
|
121956
122188
|
};
|
|
121957
122189
|
|
|
121958
122190
|
// ../tool-server/src/tools/reinstall-app/index.ts
|
|
121959
|
-
var BUNDLE_ID_PATTERN3 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
|
|
121960
122191
|
var zodSchema12 = external_exports.object({
|
|
121961
122192
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
|
|
121962
|
-
bundleId: external_exports.string().regex(
|
|
122193
|
+
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
121963
122194
|
"App identifier that matches the bundle at `appPath`. iOS: bundle id (used to uninstall first). Android: package name (used to uninstall first; the install itself identifies the app from the APK). Vega: interactive component app id (e.g. com.example.app.main), used to uninstall first."
|
|
121964
122195
|
),
|
|
121965
122196
|
appPath: external_exports.string().describe(
|
|
@@ -122017,10 +122248,10 @@ var PERMISSION_NAMES = [
|
|
|
122017
122248
|
];
|
|
122018
122249
|
|
|
122019
122250
|
// ../tool-server/src/tools/settings-permissions/platforms/ios.ts
|
|
122020
|
-
var
|
|
122021
|
-
var
|
|
122022
|
-
|
|
122023
|
-
var
|
|
122251
|
+
var import_node_child_process29 = require("node:child_process");
|
|
122252
|
+
var import_node_util22 = require("node:util");
|
|
122253
|
+
init_src2();
|
|
122254
|
+
var execFileAsync22 = (0, import_node_util22.promisify)(import_node_child_process29.execFile);
|
|
122024
122255
|
var SIMCTL_ACTION = {
|
|
122025
122256
|
grant: "grant",
|
|
122026
122257
|
deny: "revoke",
|
|
@@ -122045,7 +122276,7 @@ var NON_TCC_GRANT_NEEDS_INSTALL = /* @__PURE__ */ new Set([
|
|
|
122045
122276
|
]);
|
|
122046
122277
|
var localBackend = {
|
|
122047
122278
|
async run(udid, simctlAction, service, bundleId) {
|
|
122048
|
-
await
|
|
122279
|
+
await execFileAsync22(
|
|
122049
122280
|
"xcrun",
|
|
122050
122281
|
await simctlArgsForUdid(udid, ["privacy", udid, simctlAction, service, bundleId]),
|
|
122051
122282
|
{ timeout: 3e4 }
|
|
@@ -122053,7 +122284,7 @@ var localBackend = {
|
|
|
122053
122284
|
},
|
|
122054
122285
|
async isInstalled(udid, bundleId) {
|
|
122055
122286
|
try {
|
|
122056
|
-
await
|
|
122287
|
+
await execFileAsync22(
|
|
122057
122288
|
"xcrun",
|
|
122058
122289
|
await simctlArgsForUdid(udid, ["get_app_container", udid, bundleId]),
|
|
122059
122290
|
{ timeout: 15e3 }
|
|
@@ -122074,7 +122305,7 @@ function buildIosHandler(backend) {
|
|
|
122074
122305
|
const { udid, action, permission, bundleId } = params;
|
|
122075
122306
|
const services = IOS_SERVICES[permission];
|
|
122076
122307
|
if (services.length === 0) {
|
|
122077
|
-
throw new
|
|
122308
|
+
throw new InvalidToolInputError(
|
|
122078
122309
|
`Permission '${permission}' cannot be changed on the iOS simulator \u2014 \`xcrun simctl privacy\` has no service for it. Interact with the notification permission dialog in the app instead.`,
|
|
122079
122310
|
{
|
|
122080
122311
|
error_code: FAILURE_CODES.SETTINGS_PERMISSION_UNSUPPORTED,
|
|
@@ -122143,7 +122374,7 @@ var iosRemoteImpl4 = {
|
|
|
122143
122374
|
};
|
|
122144
122375
|
|
|
122145
122376
|
// ../tool-server/src/tools/settings-permissions/platforms/android.ts
|
|
122146
|
-
|
|
122377
|
+
init_src2();
|
|
122147
122378
|
init_adb();
|
|
122148
122379
|
var ANDROID_PERMISSIONS = {
|
|
122149
122380
|
"camera": ["android.permission.CAMERA"],
|
|
@@ -122209,7 +122440,7 @@ var androidImpl4 = {
|
|
|
122209
122440
|
const { udid, action, permission, bundleId } = params;
|
|
122210
122441
|
const permissions = permissionsFor(permission, action);
|
|
122211
122442
|
if (permissions.length === 0) {
|
|
122212
|
-
throw new
|
|
122443
|
+
throw new InvalidToolInputError(
|
|
122213
122444
|
`Permission '${permission}' has no Android runtime-permission equivalent, so there is nothing to ${action}.`,
|
|
122214
122445
|
{
|
|
122215
122446
|
error_code: FAILURE_CODES.SETTINGS_PERMISSION_UNSUPPORTED,
|
|
@@ -122279,7 +122510,6 @@ var androidImpl4 = {
|
|
|
122279
122510
|
};
|
|
122280
122511
|
|
|
122281
122512
|
// ../tool-server/src/tools/settings-permissions/index.ts
|
|
122282
|
-
var BUNDLE_ID_PATTERN4 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
|
|
122283
122513
|
var zodSchema13 = external_exports.object({
|
|
122284
122514
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS simulator UDID or Android serial)."),
|
|
122285
122515
|
action: external_exports.enum(PERMISSION_ACTIONS).describe(
|
|
@@ -122288,7 +122518,7 @@ var zodSchema13 = external_exports.object({
|
|
|
122288
122518
|
permission: external_exports.enum(PERMISSION_NAMES).describe(
|
|
122289
122519
|
"The permission to change. `notifications` is Android-only (iOS has no simctl service for it); `reminders` is iOS-only; `camera` works on Android and on iOS only when the target simulator's runtime models the service (varies by simruntime, not by the installed Xcode)."
|
|
122290
122520
|
),
|
|
122291
|
-
bundleId: external_exports.string().regex(
|
|
122521
|
+
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
|
|
122292
122522
|
"App to change the permission for \u2014 required for every action. iOS: bundle id (e.g. com.example.app). Android: package name. `reset` is per-app too: simctl's device-wide reset (no bundleId) silently leaves existing per-app grants untouched on recent iOS, so the permission is always reset for this one app."
|
|
122293
122523
|
)
|
|
122294
122524
|
});
|
|
@@ -122337,9 +122567,9 @@ init_zod();
|
|
|
122337
122567
|
init_device_info();
|
|
122338
122568
|
|
|
122339
122569
|
// ../tool-server/src/tools/open-url/platforms/ios.ts
|
|
122340
|
-
var
|
|
122341
|
-
var
|
|
122342
|
-
|
|
122570
|
+
var import_node_child_process30 = require("node:child_process");
|
|
122571
|
+
var import_node_util23 = require("node:util");
|
|
122572
|
+
init_src2();
|
|
122343
122573
|
|
|
122344
122574
|
// ../tool-server/src/tools/open-url/deep-link-note.ts
|
|
122345
122575
|
function httpDeepLinkNote(url2) {
|
|
@@ -122348,12 +122578,12 @@ function httpDeepLinkNote(url2) {
|
|
|
122348
122578
|
}
|
|
122349
122579
|
|
|
122350
122580
|
// ../tool-server/src/tools/open-url/platforms/ios.ts
|
|
122351
|
-
var
|
|
122581
|
+
var execFileAsync23 = (0, import_node_util23.promisify)(import_node_child_process30.execFile);
|
|
122352
122582
|
var iosImpl3 = {
|
|
122353
122583
|
requires: ["xcrun"],
|
|
122354
122584
|
handler: async (_services, params) => {
|
|
122355
122585
|
try {
|
|
122356
|
-
await
|
|
122586
|
+
await execFileAsync23(
|
|
122357
122587
|
"xcrun",
|
|
122358
122588
|
await simctlArgsForUdid(params.udid, ["openurl", params.udid, params.url])
|
|
122359
122589
|
);
|
|
@@ -122410,7 +122640,7 @@ var iosDeviceImpl4 = {
|
|
|
122410
122640
|
};
|
|
122411
122641
|
|
|
122412
122642
|
// ../tool-server/src/tools/open-url/platforms/android.ts
|
|
122413
|
-
|
|
122643
|
+
init_src2();
|
|
122414
122644
|
init_adb();
|
|
122415
122645
|
var androidImpl5 = {
|
|
122416
122646
|
requires: ["adb"],
|
|
@@ -122452,13 +122682,12 @@ var chromiumImpl2 = {
|
|
|
122452
122682
|
};
|
|
122453
122683
|
|
|
122454
122684
|
// ../tool-server/src/tools/open-url/index.ts
|
|
122455
|
-
var BUNDLE_ID_PATTERN5 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
|
|
122456
122685
|
var zodSchema14 = external_exports.object({
|
|
122457
122686
|
udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
|
|
122458
122687
|
url: external_exports.string().describe(
|
|
122459
122688
|
"URL or scheme to open (e.g. https://example.com, messages://, tel:555, geo:37.0,-122.0). For Chromium this navigates the renderer."
|
|
122460
122689
|
),
|
|
122461
|
-
bundleId: external_exports.string().regex(
|
|
122690
|
+
bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).optional().describe(
|
|
122462
122691
|
"Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. Ignored elsewhere."
|
|
122463
122692
|
)
|
|
122464
122693
|
});
|
|
@@ -122510,8 +122739,8 @@ Returns { opened, url, note? }. note carries the deep-linking caveat when a web
|
|
|
122510
122739
|
};
|
|
122511
122740
|
|
|
122512
122741
|
// ../tool-server/src/tools/screenshot/index.ts
|
|
122513
|
-
var
|
|
122514
|
-
var
|
|
122742
|
+
var import_node_child_process31 = require("node:child_process");
|
|
122743
|
+
var import_node_util24 = require("node:util");
|
|
122515
122744
|
var os13 = __toESM(require("node:os"));
|
|
122516
122745
|
var path27 = __toESM(require("node:path"));
|
|
122517
122746
|
init_zod();
|
|
@@ -122689,7 +122918,7 @@ async function captureScreenshotUpright(api, device, requestedRotation, signal,
|
|
|
122689
122918
|
}
|
|
122690
122919
|
|
|
122691
122920
|
// ../tool-server/src/utils/android-devtools-rotation-peek.ts
|
|
122692
|
-
|
|
122921
|
+
init_src2();
|
|
122693
122922
|
var PEEK_TIMEOUT_MS = 1e3;
|
|
122694
122923
|
function androidDevtoolsRotationPeek(registry2, device) {
|
|
122695
122924
|
return async () => {
|
|
@@ -122717,7 +122946,7 @@ function androidDevtoolsRotationPeek(registry2, device) {
|
|
|
122717
122946
|
}
|
|
122718
122947
|
|
|
122719
122948
|
// ../tool-server/src/utils/ios-device/runner-commands.ts
|
|
122720
|
-
|
|
122949
|
+
init_src2();
|
|
122721
122950
|
var APP_BACKGROUNDED_ERROR_CODE = "APP_BACKGROUNDED";
|
|
122722
122951
|
function repliedReactivated(data) {
|
|
122723
122952
|
return typeof data === "object" && data !== null && data.reactivated === true;
|
|
@@ -122875,9 +123104,9 @@ async function captureSnapshot(api, bundleId) {
|
|
|
122875
123104
|
// ../tool-server/src/utils/vega-screen.ts
|
|
122876
123105
|
var import_promises10 = require("node:fs/promises");
|
|
122877
123106
|
var import_node_os12 = require("node:os");
|
|
122878
|
-
var
|
|
123107
|
+
var import_node_path21 = require("node:path");
|
|
122879
123108
|
var import_pngjs = __toESM(require_png());
|
|
122880
|
-
|
|
123109
|
+
init_src2();
|
|
122881
123110
|
init_adb();
|
|
122882
123111
|
|
|
122883
123112
|
// ../tool-server/src/tools/screenshot-diff/resize.ts
|
|
@@ -123042,7 +123271,7 @@ async function captureVegaScreenshotPng(opts = {}) {
|
|
|
123042
123271
|
async function captureViaEmulatorConsole(opts) {
|
|
123043
123272
|
const port = await discoverVegaConsolePort();
|
|
123044
123273
|
const serial = `emulator-${port}`;
|
|
123045
|
-
const outDir = await (0, import_promises10.mkdtemp)((0,
|
|
123274
|
+
const outDir = await (0, import_promises10.mkdtemp)((0, import_node_path21.join)((0, import_node_os12.tmpdir)(), "vega-shot-"));
|
|
123046
123275
|
try {
|
|
123047
123276
|
await runAdb(["-s", serial, "emu", "screenrecord", "screenshot", outDir], {
|
|
123048
123277
|
timeoutMs: 2e4
|
|
@@ -123056,9 +123285,9 @@ async function captureViaEmulatorConsole(opts) {
|
|
|
123056
123285
|
error_kind: "unknown"
|
|
123057
123286
|
});
|
|
123058
123287
|
}
|
|
123059
|
-
const decoded = import_pngjs.PNG.sync.read(await (0, import_promises10.readFile)((0,
|
|
123288
|
+
const decoded = import_pngjs.PNG.sync.read(await (0, import_promises10.readFile)((0, import_node_path21.join)(outDir, pngName)));
|
|
123060
123289
|
const scaled = scalePng(decoded, opts.scale);
|
|
123061
|
-
const outPath = (0,
|
|
123290
|
+
const outPath = (0, import_node_path21.join)((0, import_node_os12.tmpdir)(), `vega-screenshot-${process.hrtime.bigint()}.png`);
|
|
123062
123291
|
await (0, import_promises10.writeFile)(outPath, import_pngjs.PNG.sync.write(scaled));
|
|
123063
123292
|
return outPath;
|
|
123064
123293
|
} finally {
|
|
@@ -123083,7 +123312,7 @@ function scalePng(src, scale) {
|
|
|
123083
123312
|
|
|
123084
123313
|
// ../tool-server/src/tools/screenshot/index.ts
|
|
123085
123314
|
var fs33 = __toESM(require("node:fs/promises"));
|
|
123086
|
-
var
|
|
123315
|
+
var execFileAsync24 = (0, import_node_util24.promisify)(import_node_child_process31.execFile);
|
|
123087
123316
|
var zodSchema15 = external_exports.object({
|
|
123088
123317
|
udid: external_exports.string().describe(
|
|
123089
123318
|
"Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, or Chromium id)."
|
|
@@ -123124,11 +123353,11 @@ async function tvScreenshot(udid, scale, signal) {
|
|
|
123124
123353
|
os13.tmpdir(),
|
|
123125
123354
|
`argent-tv-screenshot-${udid.slice(0, 8)}-${process.hrtime.bigint()}.png`
|
|
123126
123355
|
);
|
|
123127
|
-
await
|
|
123356
|
+
await execFileAsync24("xcrun", await simctlArgsForUdid(udid, ["io", udid, "screenshot", file2]), {
|
|
123128
123357
|
signal
|
|
123129
123358
|
});
|
|
123130
123359
|
if (scale < 1) {
|
|
123131
|
-
await
|
|
123360
|
+
await execFileAsync24("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
|
|
123132
123361
|
signal
|
|
123133
123362
|
}).catch(() => {
|
|
123134
123363
|
});
|
|
@@ -123138,7 +123367,7 @@ async function tvScreenshot(udid, scale, signal) {
|
|
|
123138
123367
|
async function tvTargetLongSide(file2, scale) {
|
|
123139
123368
|
let longSide = 3840;
|
|
123140
123369
|
try {
|
|
123141
|
-
const { stdout } = await
|
|
123370
|
+
const { stdout } = await execFileAsync24("sips", ["-g", "pixelWidth", "-g", "pixelHeight", file2]);
|
|
123142
123371
|
const width = Number(/pixelWidth:\s*(\d+)/.exec(stdout)?.[1]);
|
|
123143
123372
|
const height = Number(/pixelHeight:\s*(\d+)/.exec(stdout)?.[1]);
|
|
123144
123373
|
if (Number.isFinite(width) && Number.isFinite(height) && width > 0 && height > 0) {
|
|
@@ -123152,7 +123381,7 @@ async function downscalePngInPlace(file2, scale, signal) {
|
|
|
123152
123381
|
if (scale >= 1) {
|
|
123153
123382
|
return;
|
|
123154
123383
|
}
|
|
123155
|
-
await
|
|
123384
|
+
await execFileAsync24("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
|
|
123156
123385
|
signal
|
|
123157
123386
|
}).catch(() => {
|
|
123158
123387
|
});
|
|
@@ -123248,7 +123477,7 @@ Fails if the simulator-server / emulator backend / Chromium CDP is not reachable
|
|
|
123248
123477
|
init_zod();
|
|
123249
123478
|
|
|
123250
123479
|
// ../tool-server/src/utils/chromium-visibility.ts
|
|
123251
|
-
|
|
123480
|
+
init_src2();
|
|
123252
123481
|
async function assertChromiumWindowVisible(chromium, action) {
|
|
123253
123482
|
let value;
|
|
123254
123483
|
try {
|
|
@@ -124197,9 +124426,10 @@ Fails if the device backend is not reachable: the simulator-server for iOS, or \
|
|
|
124197
124426
|
|
|
124198
124427
|
// ../tool-server/src/tools/keyboard/index.ts
|
|
124199
124428
|
init_zod();
|
|
124200
|
-
|
|
124429
|
+
init_src2();
|
|
124201
124430
|
|
|
124202
124431
|
// ../tool-server/src/utils/secrets.ts
|
|
124432
|
+
init_src2();
|
|
124203
124433
|
init_src();
|
|
124204
124434
|
var SECRET_PLACEHOLDER_MARKER = "{{secret:";
|
|
124205
124435
|
var PLACEHOLDER_RE = /\{\{secret:([A-Za-z_][A-Za-z0-9_]*)\}\}/g;
|
|
@@ -124301,7 +124531,7 @@ function redactSecretsFromError(err, secrets) {
|
|
|
124301
124531
|
}
|
|
124302
124532
|
|
|
124303
124533
|
// ../tool-server/src/tools/keyboard/simulator-server-keys.ts
|
|
124304
|
-
|
|
124534
|
+
init_src2();
|
|
124305
124535
|
|
|
124306
124536
|
// ../tool-server/src/tools/keyboard/key-codes.ts
|
|
124307
124537
|
var SHIFT_KEYCODE = 225;
|
|
@@ -124482,7 +124712,7 @@ function makeIosRemoteImpl(registry2) {
|
|
|
124482
124712
|
}
|
|
124483
124713
|
|
|
124484
124714
|
// ../tool-server/src/tools/keyboard/platforms/ios-device.ts
|
|
124485
|
-
|
|
124715
|
+
init_src2();
|
|
124486
124716
|
async function mapNotFocused(send) {
|
|
124487
124717
|
try {
|
|
124488
124718
|
return await send;
|
|
@@ -124575,7 +124805,7 @@ function makeAndroidImpl(registry2) {
|
|
|
124575
124805
|
}
|
|
124576
124806
|
|
|
124577
124807
|
// ../tool-server/src/tools/keyboard/platforms/chromium.ts
|
|
124578
|
-
|
|
124808
|
+
init_src2();
|
|
124579
124809
|
|
|
124580
124810
|
// ../tool-server/src/tools/keyboard/chromium-keys.ts
|
|
124581
124811
|
var CHROMIUM_NAMED_KEYS = {
|
|
@@ -124715,7 +124945,7 @@ function makeChromiumImpl(registry2) {
|
|
|
124715
124945
|
}
|
|
124716
124946
|
|
|
124717
124947
|
// ../tool-server/src/utils/vega-input.ts
|
|
124718
|
-
|
|
124948
|
+
init_src2();
|
|
124719
124949
|
init_adb();
|
|
124720
124950
|
var REMOTE_KEYCODES = {
|
|
124721
124951
|
up: "KEY_UP",
|
|
@@ -125143,12 +125373,13 @@ var shakeZodSchema = external_exports.object({
|
|
|
125143
125373
|
});
|
|
125144
125374
|
|
|
125145
125375
|
// ../tool-server/src/tools/shake/platforms/ios.ts
|
|
125146
|
-
var
|
|
125147
|
-
var
|
|
125148
|
-
|
|
125376
|
+
var import_node_child_process33 = require("node:child_process");
|
|
125377
|
+
var import_node_util25 = require("node:util");
|
|
125378
|
+
init_src2();
|
|
125149
125379
|
|
|
125150
125380
|
// ../tool-server/src/utils/window-shake.ts
|
|
125151
|
-
var
|
|
125381
|
+
var import_node_child_process32 = require("node:child_process");
|
|
125382
|
+
init_src();
|
|
125152
125383
|
var MICROINTERACTIONS_FLAG = "microinteractions";
|
|
125153
125384
|
var AMPLITUDE = 22;
|
|
125154
125385
|
var STEPS = 60;
|
|
@@ -125254,7 +125485,7 @@ end run
|
|
|
125254
125485
|
}
|
|
125255
125486
|
function runOsascript(script) {
|
|
125256
125487
|
return new Promise((resolve14, reject) => {
|
|
125257
|
-
const child = (0,
|
|
125488
|
+
const child = (0, import_node_child_process32.execFile)(
|
|
125258
125489
|
"/usr/bin/osascript",
|
|
125259
125490
|
["-"],
|
|
125260
125491
|
{ timeout: OSASCRIPT_TIMEOUT_MS },
|
|
@@ -125347,7 +125578,7 @@ async function prepareHostWindowShake(target) {
|
|
|
125347
125578
|
}
|
|
125348
125579
|
|
|
125349
125580
|
// ../tool-server/src/tools/shake/platforms/ios.ts
|
|
125350
|
-
var
|
|
125581
|
+
var execFileAsync25 = (0, import_node_util25.promisify)(import_node_child_process33.execFile);
|
|
125351
125582
|
var SHAKE_NOTIFICATION = "com.apple.UIKit.SimulatorShake";
|
|
125352
125583
|
var SHAKE_INTERVAL_MS = 400;
|
|
125353
125584
|
var sleep11 = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
@@ -125387,7 +125618,7 @@ var iosImpl4 = {
|
|
|
125387
125618
|
if (i > 0) await sleep11(SHAKE_INTERVAL_MS);
|
|
125388
125619
|
shaker.begin();
|
|
125389
125620
|
try {
|
|
125390
|
-
await
|
|
125621
|
+
await execFileAsync25("xcrun", args, { timeout: 15e3 });
|
|
125391
125622
|
} catch (err) {
|
|
125392
125623
|
const error52 = err instanceof Error ? err : new Error(String(err));
|
|
125393
125624
|
throw shakeFailure(udid, error52.message, error52);
|
|
@@ -125424,7 +125655,7 @@ var iosRemoteImpl6 = {
|
|
|
125424
125655
|
};
|
|
125425
125656
|
|
|
125426
125657
|
// ../tool-server/src/tools/shake/platforms/android.ts
|
|
125427
|
-
|
|
125658
|
+
init_src2();
|
|
125428
125659
|
init_adb();
|
|
125429
125660
|
var SHAKE_AMPLITUDE = 30;
|
|
125430
125661
|
var SWINGS_PER_SHAKE = 8;
|
|
@@ -125736,7 +125967,7 @@ init_device_info();
|
|
|
125736
125967
|
|
|
125737
125968
|
// ../tool-server/src/utils/sub-invoke.ts
|
|
125738
125969
|
var import_node_crypto11 = require("node:crypto");
|
|
125739
|
-
|
|
125970
|
+
init_src2();
|
|
125740
125971
|
async function invokeSubTool(registry2, ctx, toolId, args) {
|
|
125741
125972
|
const signal = ctx?.signal;
|
|
125742
125973
|
const recordChildInvocation = ctx?.recordChildInvocation;
|
|
@@ -125771,7 +126002,7 @@ init_adb();
|
|
|
125771
126002
|
|
|
125772
126003
|
// ../tool-server/src/utils/poll-describe-tree.ts
|
|
125773
126004
|
async function pollDescribeTree(args) {
|
|
125774
|
-
const { fetchTree
|
|
126005
|
+
const { fetchTree, timeoutMs, pollIntervalMs, signal, onSample } = args;
|
|
125775
126006
|
const start2 = Date.now();
|
|
125776
126007
|
const deadline = start2 + timeoutMs;
|
|
125777
126008
|
let polls = 0;
|
|
@@ -125790,7 +126021,7 @@ async function pollDescribeTree(args) {
|
|
|
125790
126021
|
for (; ; ) {
|
|
125791
126022
|
if (signal?.aborted) return outcome(void 0, true);
|
|
125792
126023
|
const remaining = Math.max(0, deadline - Date.now());
|
|
125793
|
-
const settled = await settleWithin(
|
|
126024
|
+
const settled = await settleWithin(fetchTree(), remaining, signal);
|
|
125794
126025
|
polls += 1;
|
|
125795
126026
|
if (settled.type === "aborted") return outcome(void 0, true);
|
|
125796
126027
|
lastAttemptSettled = settled.type !== "timeout";
|
|
@@ -125917,7 +126148,7 @@ function adaptRunnerSnapshot(nodes) {
|
|
|
125917
126148
|
}
|
|
125918
126149
|
|
|
125919
126150
|
// ../tool-server/src/tools/describe/platforms/chromium.ts
|
|
125920
|
-
|
|
126151
|
+
init_src2();
|
|
125921
126152
|
var DESCRIBE_FAILURE = {
|
|
125922
126153
|
error_code: FAILURE_CODES.CHROMIUM_DESCRIBE_FAILED,
|
|
125923
126154
|
failure_area: "tool_server",
|
|
@@ -131951,23 +132182,6 @@ function deriveSelector(node) {
|
|
|
131951
132182
|
if (node.role && !GENERIC_ROLES.has(node.role.toLowerCase())) return { role: node.role };
|
|
131952
132183
|
return null;
|
|
131953
132184
|
}
|
|
131954
|
-
async function fetchTree(registry2, device, opts = {}) {
|
|
131955
|
-
if (device.platform === "ios") {
|
|
131956
|
-
return describeIos(registry2, device, { bundleId: opts.bundleId });
|
|
131957
|
-
}
|
|
131958
|
-
if (device.platform === "android") {
|
|
131959
|
-
return describeAndroid(registry2, device.id);
|
|
131960
|
-
}
|
|
131961
|
-
if (device.platform === "chromium") {
|
|
131962
|
-
const ref = chromiumCdpRef(device);
|
|
131963
|
-
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
131964
|
-
return describeChromium(api);
|
|
131965
|
-
}
|
|
131966
|
-
if (device.platform === "vega") {
|
|
131967
|
-
return describeVega(device.id);
|
|
131968
|
-
}
|
|
131969
|
-
throw new Error(`ui-tree matching is not supported on platform "${device.platform}"`);
|
|
131970
|
-
}
|
|
131971
132185
|
|
|
131972
132186
|
// ../tool-server/src/tools/await-ui-element/index.ts
|
|
131973
132187
|
var AWAIT_UI_ELEMENT_TOOL_ID = "await-ui-element";
|
|
@@ -132082,7 +132296,7 @@ function timeoutNote(params, lastTree, fetchError, lastData) {
|
|
|
132082
132296
|
return appendDiagnostics(base, lastData);
|
|
132083
132297
|
}
|
|
132084
132298
|
function createAwaitUiElementTool(registry2) {
|
|
132085
|
-
async function
|
|
132299
|
+
async function fetchTree(device, params, services, isTvOs, androidIsTv) {
|
|
132086
132300
|
if (device.platform === "ios" || device.platform === "ios-remote") {
|
|
132087
132301
|
if (device.kind === "device") {
|
|
132088
132302
|
return describeIosDevice(registry2, device);
|
|
@@ -132164,7 +132378,7 @@ tap/navigation to wait for the next screen, or before tapping an element that ap
|
|
|
132164
132378
|
let everMatched = false;
|
|
132165
132379
|
let lastTrustedReadAt;
|
|
132166
132380
|
const poll = await pollDescribeTree({
|
|
132167
|
-
fetchTree: () =>
|
|
132381
|
+
fetchTree: () => fetchTree(device, params, services, isTvOs, androidIsTv),
|
|
132168
132382
|
timeoutMs,
|
|
132169
132383
|
pollIntervalMs,
|
|
132170
132384
|
signal,
|
|
@@ -132458,7 +132672,7 @@ init_zod();
|
|
|
132458
132672
|
init_device_info();
|
|
132459
132673
|
|
|
132460
132674
|
// ../tool-server/src/tools/debugger/not-connected.ts
|
|
132461
|
-
|
|
132675
|
+
init_src2();
|
|
132462
132676
|
init_device_info();
|
|
132463
132677
|
var GUIDANCE = {
|
|
132464
132678
|
metro_not_running: "Metro is not running on this port. Do not retry in a loop \u2014 the result will not change until Metro is started. Start Metro (e.g. `npx react-native start` or `npx expo start`) or ask the user, wait for it to report ready, then retry once.",
|
|
@@ -132609,7 +132823,7 @@ Use when you need to verify connectivity before using other debugger tools. Neve
|
|
|
132609
132823
|
|
|
132610
132824
|
// ../tool-server/src/tools/debugger/debugger-evaluate.ts
|
|
132611
132825
|
init_zod();
|
|
132612
|
-
|
|
132826
|
+
init_src2();
|
|
132613
132827
|
var zodSchema31 = external_exports.object({
|
|
132614
132828
|
port: metroPortField,
|
|
132615
132829
|
device_id: external_exports.string().describe(
|
|
@@ -132662,7 +132876,7 @@ Returns the evaluation result as a JSON-serializable value, along with deviceNam
|
|
|
132662
132876
|
|
|
132663
132877
|
// ../tool-server/src/tools/debugger/debugger-reload-metro.ts
|
|
132664
132878
|
init_zod();
|
|
132665
|
-
|
|
132879
|
+
init_src2();
|
|
132666
132880
|
var zodSchema32 = external_exports.object({
|
|
132667
132881
|
port: metroPortField,
|
|
132668
132882
|
device_id: external_exports.string().describe(
|
|
@@ -134837,7 +135051,7 @@ function treeSignature(root) {
|
|
|
134837
135051
|
return parts2.join("\n");
|
|
134838
135052
|
}
|
|
134839
135053
|
function createAwaitScreenIdleTool(registry2) {
|
|
134840
|
-
function
|
|
135054
|
+
function fetchTree(device, services, isTvOs, androidIsTv) {
|
|
134841
135055
|
if (device.platform === "ios" || device.platform === "ios-remote") {
|
|
134842
135056
|
if (device.kind === "device") {
|
|
134843
135057
|
return describeIosDevice(registry2, device);
|
|
@@ -134885,7 +135099,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
|
|
|
134885
135099
|
let stableSignature;
|
|
134886
135100
|
let stableSince = 0;
|
|
134887
135101
|
const poll = await pollDescribeTree({
|
|
134888
|
-
fetchTree: () =>
|
|
135102
|
+
fetchTree: () => fetchTree(device, services, isTvOs, androidIsTv),
|
|
134889
135103
|
timeoutMs: params.timeoutMs ?? DEFAULT_TIMEOUT_MS4,
|
|
134890
135104
|
pollIntervalMs: params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2,
|
|
134891
135105
|
signal: ctx?.signal,
|
|
@@ -134914,7 +135128,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
|
|
|
134914
135128
|
// ../tool-server/src/tools/profiler/react/react-profiler-start.ts
|
|
134915
135129
|
var crypto6 = __toESM(require("node:crypto"));
|
|
134916
135130
|
init_zod();
|
|
134917
|
-
|
|
135131
|
+
init_src2();
|
|
134918
135132
|
|
|
134919
135133
|
// ../tool-server/src/utils/react-profiler/session-ownership.ts
|
|
134920
135134
|
var DEFAULT_STALE_THRESHOLD_MS = 5 * 6e4;
|
|
@@ -135203,7 +135417,7 @@ Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot
|
|
|
135203
135417
|
|
|
135204
135418
|
// ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
|
|
135205
135419
|
init_zod();
|
|
135206
|
-
|
|
135420
|
+
init_src2();
|
|
135207
135421
|
|
|
135208
135422
|
// ../tool-server/src/utils/react-profiler/debug/dump.ts
|
|
135209
135423
|
var import_fs = require("fs");
|
|
@@ -135704,7 +135918,7 @@ function createReactProfilerStatusTool(registry2) {
|
|
|
135704
135918
|
// ../tool-server/src/tools/profiler/react/react-profiler-analyze.ts
|
|
135705
135919
|
init_zod();
|
|
135706
135920
|
var import_fs5 = require("fs");
|
|
135707
|
-
|
|
135921
|
+
init_src2();
|
|
135708
135922
|
|
|
135709
135923
|
// ../tool-server/src/utils/react-profiler/pipeline/session-context.ts
|
|
135710
135924
|
var import_fs2 = require("fs");
|
|
@@ -137451,7 +137665,7 @@ When several files define a component with the same name (e.g. platform variants
|
|
|
137451
137665
|
|
|
137452
137666
|
// ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
|
|
137453
137667
|
init_zod();
|
|
137454
|
-
|
|
137668
|
+
init_src2();
|
|
137455
137669
|
var zodSchema45 = external_exports.object({
|
|
137456
137670
|
port: metroPortField,
|
|
137457
137671
|
device_id: external_exports.string().describe(
|
|
@@ -137568,7 +137782,7 @@ Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
|
|
|
137568
137782
|
|
|
137569
137783
|
// ../tool-server/src/tools/profiler/react/react-profiler-renders.ts
|
|
137570
137784
|
init_zod();
|
|
137571
|
-
|
|
137785
|
+
init_src2();
|
|
137572
137786
|
var COLLECT_RENDERS_SCRIPT = `
|
|
137573
137787
|
(function() {
|
|
137574
137788
|
try {
|
|
@@ -137724,7 +137938,7 @@ ${renderMarkdownTable2(entries)}`;
|
|
|
137724
137938
|
|
|
137725
137939
|
// ../tool-server/src/tools/profiler/react/react-profiler-fiber-tree.ts
|
|
137726
137940
|
init_zod();
|
|
137727
|
-
|
|
137941
|
+
init_src2();
|
|
137728
137942
|
var HOOK_MISSING_ERROR2 = "no __REACT_DEVTOOLS_GLOBAL_HOOK__";
|
|
137729
137943
|
var NO_RENDERERS_ERROR2 = "no renderers attached to hook";
|
|
137730
137944
|
var HOOK_NOT_PRESENT_ERRORS2 = /* @__PURE__ */ new Set([HOOK_MISSING_ERROR2, NO_RENDERERS_ERROR2]);
|
|
@@ -137894,7 +138108,7 @@ Fails if the React DevTools hook is not present or no fiber roots have been comm
|
|
|
137894
138108
|
init_zod();
|
|
137895
138109
|
|
|
137896
138110
|
// ../tool-server/src/blueprints/native-profiler-session.ts
|
|
137897
|
-
|
|
138111
|
+
init_src2();
|
|
137898
138112
|
init_external_devices();
|
|
137899
138113
|
|
|
137900
138114
|
// ../tool-server/src/utils/profiler-shared/lifecycle.ts
|
|
@@ -138096,7 +138310,7 @@ init_device_info();
|
|
|
138096
138310
|
|
|
138097
138311
|
// ../tool-server/src/tools/profiler/native-profiler/platforms/ios.ts
|
|
138098
138312
|
var import_child_process4 = require("child_process");
|
|
138099
|
-
|
|
138313
|
+
init_src2();
|
|
138100
138314
|
var import_fs9 = require("fs");
|
|
138101
138315
|
var import_node_fs14 = require("node:fs");
|
|
138102
138316
|
var path30 = __toESM(require("path"));
|
|
@@ -138156,7 +138370,7 @@ function listenForDarwinNotification(name) {
|
|
|
138156
138370
|
}
|
|
138157
138371
|
|
|
138158
138372
|
// ../tool-server/src/utils/ios-profiler/startup.ts
|
|
138159
|
-
|
|
138373
|
+
init_src2();
|
|
138160
138374
|
function waitForXctraceReady(child, { notify, timeoutMs }) {
|
|
138161
138375
|
return new Promise((resolve14, reject) => {
|
|
138162
138376
|
let settled = false;
|
|
@@ -138246,8 +138460,8 @@ var import_util8 = require("util");
|
|
|
138246
138460
|
var DEFAULT_EXEC_TIMEOUT_MS = 6e4;
|
|
138247
138461
|
var DEFAULT_EXEC_MAX_BUFFER = 256 * 1024 * 1024;
|
|
138248
138462
|
async function execFileAsyncWithTimeout(file2, args, options = {}) {
|
|
138249
|
-
const
|
|
138250
|
-
const { stdout, stderr } = await
|
|
138463
|
+
const execFileAsync30 = (0, import_util8.promisify)(import_child_process2.execFile);
|
|
138464
|
+
const { stdout, stderr } = await execFileAsync30(file2, args, {
|
|
138251
138465
|
encoding: "utf-8",
|
|
138252
138466
|
...options,
|
|
138253
138467
|
// Applied after ...options so a caller cannot weaken the guards; maxBuffer
|
|
@@ -140438,12 +140652,12 @@ async function analyzeNativeProfilerIos(api) {
|
|
|
140438
140652
|
|
|
140439
140653
|
// ../tool-server/src/tools/profiler/native-profiler/platforms/android.ts
|
|
140440
140654
|
var path33 = __toESM(require("path"));
|
|
140441
|
-
|
|
140655
|
+
init_src2();
|
|
140442
140656
|
|
|
140443
140657
|
// ../tool-server/src/utils/android-profiler/capture.ts
|
|
140444
140658
|
var import_child_process5 = require("child_process");
|
|
140445
140659
|
var import_fs10 = require("fs");
|
|
140446
|
-
|
|
140660
|
+
init_src2();
|
|
140447
140661
|
init_android_binary();
|
|
140448
140662
|
init_adb();
|
|
140449
140663
|
var ON_DEVICE_TRACE_DIR = "/data/misc/perfetto-traces";
|
|
@@ -140683,7 +140897,7 @@ async function stopPerfetto(opts) {
|
|
|
140683
140897
|
}
|
|
140684
140898
|
|
|
140685
140899
|
// ../tool-server/src/utils/android-profiler/detect-app.ts
|
|
140686
|
-
|
|
140900
|
+
init_src2();
|
|
140687
140901
|
init_adb();
|
|
140688
140902
|
var DETECT_TIMEOUT_MS = 1e4;
|
|
140689
140903
|
async function validateAndroidAppProcess(serial, appProcess) {
|
|
@@ -140807,7 +141021,7 @@ function parseUserPackages(output) {
|
|
|
140807
141021
|
}
|
|
140808
141022
|
|
|
140809
141023
|
// ../tool-server/src/utils/android-profiler/pipeline/index.ts
|
|
140810
|
-
|
|
141024
|
+
init_src2();
|
|
140811
141025
|
|
|
140812
141026
|
// ../tool-server/src/utils/android-profiler/pipeline/run-tp.ts
|
|
140813
141027
|
var import_fs11 = require("fs");
|
|
@@ -141375,7 +141589,7 @@ function unwrapOr(result, fallback, onError) {
|
|
|
141375
141589
|
|
|
141376
141590
|
// ../tool-server/src/utils/android-profiler/session-metadata.ts
|
|
141377
141591
|
var import_fs13 = require("fs");
|
|
141378
|
-
|
|
141592
|
+
init_src2();
|
|
141379
141593
|
function androidNativeProfilerMetadataPath(pftracePath) {
|
|
141380
141594
|
return `${pftracePath}.metadata.json`;
|
|
141381
141595
|
}
|
|
@@ -141805,7 +142019,7 @@ Fails if native-profiler-stop has not been called first to export trace data.`,
|
|
|
141805
142019
|
};
|
|
141806
142020
|
|
|
141807
142021
|
// ../tool-server/src/blueprints/screen-recording-session.ts
|
|
141808
|
-
|
|
142022
|
+
init_src2();
|
|
141809
142023
|
var import_fs14 = require("fs");
|
|
141810
142024
|
var SCREEN_RECORDING_SESSION_NAMESPACE = "ScreenRecordingSession";
|
|
141811
142025
|
function screenRecordingSessionRef(device) {
|
|
@@ -141954,19 +142168,20 @@ var screenRecordingSessionBlueprint = {
|
|
|
141954
142168
|
|
|
141955
142169
|
// ../tool-server/src/tools/screen-recording/screen-recording-start.ts
|
|
141956
142170
|
init_zod();
|
|
141957
|
-
|
|
142171
|
+
init_src2();
|
|
141958
142172
|
init_device_info();
|
|
142173
|
+
init_src();
|
|
141959
142174
|
|
|
141960
142175
|
// ../tool-server/src/tools/screen-recording/capture.ts
|
|
141961
142176
|
var os15 = __toESM(require("os"));
|
|
141962
142177
|
var path35 = __toESM(require("path"));
|
|
141963
142178
|
var import_fs17 = require("fs");
|
|
141964
142179
|
var import_child_process7 = require("child_process");
|
|
141965
|
-
|
|
142180
|
+
init_src2();
|
|
141966
142181
|
|
|
141967
142182
|
// ../tool-server/src/tools/screen-recording/mjpeg-stream.ts
|
|
141968
142183
|
var import_http = __toESM(require("http"));
|
|
141969
|
-
|
|
142184
|
+
init_src2();
|
|
141970
142185
|
var MAX_BUFFER_BYTES = 64 * 1024 * 1024;
|
|
141971
142186
|
function delimiterFromContentType(contentType) {
|
|
141972
142187
|
const match = /boundary=([^;\s]+)/i.exec(contentType ?? "");
|
|
@@ -142163,7 +142378,7 @@ function readJpegDimensions(jpeg) {
|
|
|
142163
142378
|
|
|
142164
142379
|
// ../tool-server/src/tools/screen-recording/session-guards.ts
|
|
142165
142380
|
var import_fs15 = require("fs");
|
|
142166
|
-
|
|
142381
|
+
init_src2();
|
|
142167
142382
|
function clip2(s, max = 300) {
|
|
142168
142383
|
const t = s.trim();
|
|
142169
142384
|
if (!t) return "<empty>";
|
|
@@ -142272,7 +142487,7 @@ var WATERMARK_PNG_HEIGHT = 277;
|
|
|
142272
142487
|
var WATERMARK_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAA4QAAAEVCAYAAAC46yv0AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOydd7xkRbX916qGIcwQBAaQDEPOacgqIgoCgxJEQRiCCuJ7CCoIzwQYfoIYAJ8BFAUERYLwAEUBMcCoMAwZiUMSkJwGJMycWr8/ui709D23Y1Wf7tP7+/ncz3zm3HN27e7b4eyqXWsRhtEiksYBmCrp8wBWKzqffoLkqiRnFp2HYRiGYRiGYbTDPEUnYPQ/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f59NdRobrFFQ3dd3R5ji8lpivd2+4jYtvhcrYs8QVH3FP7HAdwu6Y8ppcuQv95WR1dHfX6Oqh53CM3M5nOS3iXpq3XlSD6fzTcFn+dIIvKLjFUBLFX8ZMg7gY8CeIBz0XYcxUXU0shfw2OjHrk066XoQCyB/GZZK2tqJS2JPGvpI/5c5yac74H8fJ9SNyZHodhWYxEATwN4qq3Pl5mZ2TwnIi5ssMltv2nOzczMzMzMbCqTtFpEPFPXIZT0b+Nuq5mZmbXPSWXMzOZvb0b9VgkPAjhjEtpiZmZmk8wdQjOz+ZSkBSUd2KDct8edGMXMzMzMzMxaJOmjDdYOZpLWHndbzczMzMzMrCFJqUi33+u5RbMs+1jk6jqE3qzbzMxsHuZtJ8zM5kGS1pR0C4CbAdwp6V4AGcnVAbwCwHJNwpB8KclrRtlWMzMzMzMza5GkNRuM/tX9OJGMmZnZPM5JZczMrJdHSL573I0wMzOz0XKH0MzMuonkQSTvHndDzMzMbLTcITQzs4lE8lCSPxx3Q8zMzGz03CE0M7PZHiS5H8mvjbshZmZmNjncITQzs6ckfYvkhiR/MO7GmJmZ2eTxthNmZvMgSYsC2A3AGhHxXABLkVwawEIAMkkzAPw1pXQtgItIPjrG5pqZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmc2X/j9B0/+uMB3y2gAAAABJRU5ErkJggg==";
|
|
142273
142488
|
|
|
142274
142489
|
// ../tool-server/src/tools/screen-recording/watermark.ts
|
|
142275
|
-
var
|
|
142490
|
+
var execFileAsync26 = (0, import_util9.promisify)(import_child_process6.execFile);
|
|
142276
142491
|
var OUTPUT_FPS = 30;
|
|
142277
142492
|
var FFMPEG_FALLBACK_PATHS = [
|
|
142278
142493
|
"/opt/homebrew/bin/ffmpeg",
|
|
@@ -142289,7 +142504,7 @@ var MASK_DARK_MAX_LUMA = 90;
|
|
|
142289
142504
|
var MASK_LIGHT_MIN_LUMA = 165;
|
|
142290
142505
|
async function resolveBinary(name, fallbacks) {
|
|
142291
142506
|
try {
|
|
142292
|
-
await
|
|
142507
|
+
await execFileAsync26("/bin/sh", ["-c", `command -v ${name}`], { timeout: 2e3 });
|
|
142293
142508
|
return name;
|
|
142294
142509
|
} catch {
|
|
142295
142510
|
}
|
|
@@ -142867,7 +143082,7 @@ function makePointerControl(simulator) {
|
|
|
142867
143082
|
}
|
|
142868
143083
|
|
|
142869
143084
|
// ../tool-server/src/tools/screen-recording/screen-recording-stop.ts
|
|
142870
|
-
var
|
|
143085
|
+
var import_node_path22 = require("node:path");
|
|
142871
143086
|
init_zod();
|
|
142872
143087
|
init_device_info();
|
|
142873
143088
|
var zodSchema52 = external_exports.object({
|
|
@@ -142907,7 +143122,7 @@ Fails if no recording (running or finished-but-unretrieved) exists for the given
|
|
|
142907
143122
|
kind: "screen-recording",
|
|
142908
143123
|
mimeType: "video/mp4",
|
|
142909
143124
|
// Drop the internal `argent-` temp-file prefix from the saved name.
|
|
142910
|
-
filename: (0,
|
|
143125
|
+
filename: (0, import_node_path22.basename)(stopped.outputFile).replace(/^argent-/, ""),
|
|
142911
143126
|
saveDir: RECORDINGS_DIR
|
|
142912
143127
|
});
|
|
142913
143128
|
const result = { video, durationMs: stopped.durationMs };
|
|
@@ -142920,7 +143135,7 @@ Fails if no recording (running or finished-but-unretrieved) exists for the given
|
|
|
142920
143135
|
|
|
142921
143136
|
// ../tool-server/src/tools/profiler/query/profiler-cpu-query.ts
|
|
142922
143137
|
init_zod();
|
|
142923
|
-
|
|
143138
|
+
init_src2();
|
|
142924
143139
|
var import_fs18 = require("fs");
|
|
142925
143140
|
var timeWindowSchema = external_exports.object({
|
|
142926
143141
|
start: external_exports.coerce.number().describe(
|
|
@@ -143296,7 +143511,7 @@ Fails if no CPU profile is stored \u2014 run react-profiler-stop first.`,
|
|
|
143296
143511
|
|
|
143297
143512
|
// ../tool-server/src/tools/profiler/query/profiler-commit-query.ts
|
|
143298
143513
|
init_zod();
|
|
143299
|
-
|
|
143514
|
+
init_src2();
|
|
143300
143515
|
var timeRangeSchema = external_exports.object({
|
|
143301
143516
|
start: external_exports.coerce.number().describe(
|
|
143302
143517
|
"Start of range in ms since profiling started \u2014 the same clock profiler-commit-query prints"
|
|
@@ -143647,7 +143862,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
|
|
|
143647
143862
|
|
|
143648
143863
|
// ../tool-server/src/tools/profiler/query/profiler-stack-query.ts
|
|
143649
143864
|
init_zod();
|
|
143650
|
-
|
|
143865
|
+
init_src2();
|
|
143651
143866
|
init_device_info();
|
|
143652
143867
|
var zodSchema55 = external_exports.object({
|
|
143653
143868
|
device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
|
|
@@ -143998,7 +144213,7 @@ Fails if native-profiler-analyze has not been run or no parsed trace data is in
|
|
|
143998
144213
|
|
|
143999
144214
|
// ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
|
|
144000
144215
|
init_zod();
|
|
144001
|
-
|
|
144216
|
+
init_src2();
|
|
144002
144217
|
init_device_info();
|
|
144003
144218
|
|
|
144004
144219
|
// ../tool-server/src/utils/profiler-shared/time-align.ts
|
|
@@ -144360,7 +144575,7 @@ function renderCombinedMemoryLeaks(memoryLeaks, mountComponents, mallocStackLogg
|
|
|
144360
144575
|
init_zod();
|
|
144361
144576
|
var import_fs19 = require("fs");
|
|
144362
144577
|
var path36 = __toESM(require("path"));
|
|
144363
|
-
|
|
144578
|
+
init_src2();
|
|
144364
144579
|
init_device_info();
|
|
144365
144580
|
var SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
|
|
144366
144581
|
function assertSafeSessionId(sessionId) {
|
|
@@ -144789,7 +145004,7 @@ Fails if the session_id is not found or required XML files are missing from disk
|
|
|
144789
145004
|
|
|
144790
145005
|
// ../tool-server/src/tools/simulator/stop-simulator-server.ts
|
|
144791
145006
|
init_zod();
|
|
144792
|
-
|
|
145007
|
+
init_src2();
|
|
144793
145008
|
init_device_info();
|
|
144794
145009
|
init_external_devices();
|
|
144795
145010
|
|
|
@@ -144900,7 +145115,7 @@ function createStopSimulatorServerTool(registry2) {
|
|
|
144900
145115
|
|
|
144901
145116
|
// ../tool-server/src/tools/simulator/stop-all-simulator-servers.ts
|
|
144902
145117
|
init_zod();
|
|
144903
|
-
|
|
145118
|
+
init_src2();
|
|
144904
145119
|
init_external_devices();
|
|
144905
145120
|
var zodSchema59 = external_exports.object({
|
|
144906
145121
|
devices: external_exports.array(external_exports.string()).optional().describe(
|
|
@@ -144989,7 +145204,7 @@ Returns { stopped } - the URNs of the services that were actually live and got s
|
|
|
144989
145204
|
|
|
144990
145205
|
// ../tool-server/src/tools/simulator/stop-metro.ts
|
|
144991
145206
|
init_zod();
|
|
144992
|
-
var
|
|
145207
|
+
var import_node_child_process34 = require("node:child_process");
|
|
144993
145208
|
function parseNetstatListeningPids(netstatOutput, port) {
|
|
144994
145209
|
const pids = /* @__PURE__ */ new Set();
|
|
144995
145210
|
for (const line of netstatOutput.split(/\r?\n/)) {
|
|
@@ -145005,7 +145220,7 @@ function parseNetstatListeningPids(netstatOutput, port) {
|
|
|
145005
145220
|
}
|
|
145006
145221
|
function listeningPids(port) {
|
|
145007
145222
|
if (process.platform === "win32") {
|
|
145008
|
-
const output2 = (0,
|
|
145223
|
+
const output2 = (0, import_node_child_process34.execFileSync)("netstat", ["-ano"], {
|
|
145009
145224
|
encoding: "utf-8",
|
|
145010
145225
|
timeout: 5e3,
|
|
145011
145226
|
// `netstat -ano` dumps every socket on the host; overflowing Node's
|
|
@@ -145014,7 +145229,7 @@ function listeningPids(port) {
|
|
|
145014
145229
|
});
|
|
145015
145230
|
return parseNetstatListeningPids(output2, port);
|
|
145016
145231
|
}
|
|
145017
|
-
const output = (0,
|
|
145232
|
+
const output = (0, import_node_child_process34.execFileSync)("lsof", ["-ti", `tcp:${port}`, "-sTCP:LISTEN"], {
|
|
145018
145233
|
encoding: "utf-8",
|
|
145019
145234
|
timeout: 5e3
|
|
145020
145235
|
}).trim();
|
|
@@ -145062,8 +145277,9 @@ var path37 = __toESM(require("node:path"));
|
|
|
145062
145277
|
var fs52 = __toESM(require("node:fs/promises"));
|
|
145063
145278
|
var import_node_fs15 = require("node:fs");
|
|
145064
145279
|
init_src();
|
|
145280
|
+
init_src2();
|
|
145065
145281
|
var import_yaml = __toESM(require_dist5());
|
|
145066
|
-
|
|
145282
|
+
init_src2();
|
|
145067
145283
|
|
|
145068
145284
|
// ../tool-server/src/tools/flows/flow-pinch-geometry.ts
|
|
145069
145285
|
var PINCH_RATIO_PER_GESTURE = 4;
|
|
@@ -145397,7 +145613,7 @@ function appIdForPlatform(launch, platform) {
|
|
|
145397
145613
|
if (c === void 0) return null;
|
|
145398
145614
|
return typeof c === "string" ? c : c.path;
|
|
145399
145615
|
}
|
|
145400
|
-
const v = launch[platform];
|
|
145616
|
+
const v = launch[authoringPlatform(platform)];
|
|
145401
145617
|
return v ?? launch.native ?? null;
|
|
145402
145618
|
}
|
|
145403
145619
|
function chromiumLaunchSpec(launch) {
|
|
@@ -146128,6 +146344,10 @@ function isIdleCondition(raw, kind) {
|
|
|
146128
146344
|
return true;
|
|
146129
146345
|
}
|
|
146130
146346
|
var LAUNCH_PLATFORMS = ["ios", "android", "chromium", "vega"];
|
|
146347
|
+
var SELECTABLE_PLATFORMS = [...LAUNCH_PLATFORMS, "ios-remote"];
|
|
146348
|
+
function authoringPlatform(platform) {
|
|
146349
|
+
return platform === "ios-remote" ? "ios" : platform;
|
|
146350
|
+
}
|
|
146131
146351
|
var LAUNCH_MAP_KEYS = ["native", ...LAUNCH_PLATFORMS];
|
|
146132
146352
|
function parseChromiumLaunch(raw) {
|
|
146133
146353
|
if (typeof raw === "string" && raw.length > 0) return raw;
|
|
@@ -147368,19 +147588,19 @@ costs the finish the cross-tree verdicts anchored to them.`,
|
|
|
147368
147588
|
init_zod();
|
|
147369
147589
|
var fs54 = __toESM(require("node:fs/promises"));
|
|
147370
147590
|
var path39 = __toESM(require("node:path"));
|
|
147371
|
-
|
|
147591
|
+
init_src2();
|
|
147372
147592
|
|
|
147373
147593
|
// ../tool-server/src/tools/flows/flow-actions.ts
|
|
147374
147594
|
init_device_info();
|
|
147375
147595
|
|
|
147376
147596
|
// ../tool-server/src/tools/flows/flow-device.ts
|
|
147377
|
-
|
|
147597
|
+
init_src2();
|
|
147378
147598
|
init_device_info();
|
|
147379
147599
|
var DEVICE_BIND_KEYS = ["udid", "device_id", "device"];
|
|
147380
147600
|
var DEVICE_BIND_LIST_KEYS = ["devices"];
|
|
147381
147601
|
var DEVICE_ARG_KEYS = DEVICE_BIND_KEYS;
|
|
147382
147602
|
function deviceEntryId(d) {
|
|
147383
|
-
if (d.platform === "ios") return d.udid;
|
|
147603
|
+
if (d.platform === "ios" || d.platform === "ios-remote") return d.udid;
|
|
147384
147604
|
if (d.platform === "chromium") return d.id;
|
|
147385
147605
|
return d.serial;
|
|
147386
147606
|
}
|
|
@@ -147388,6 +147608,8 @@ function isBooted(d) {
|
|
|
147388
147608
|
switch (d.platform) {
|
|
147389
147609
|
case "ios":
|
|
147390
147610
|
return d.state === "Booted";
|
|
147611
|
+
case "ios-remote":
|
|
147612
|
+
return d.state === "Booted";
|
|
147391
147613
|
case "android":
|
|
147392
147614
|
return d.state === "device";
|
|
147393
147615
|
case "vega":
|
|
@@ -147516,7 +147738,8 @@ function bindDeviceArgs(registry2, toolName, deviceId, args, deviceIsExplicit =
|
|
|
147516
147738
|
}
|
|
147517
147739
|
|
|
147518
147740
|
// ../tool-server/src/tools/flows/flow-ios-tree.ts
|
|
147519
|
-
|
|
147741
|
+
init_src2();
|
|
147742
|
+
init_device_info();
|
|
147520
147743
|
|
|
147521
147744
|
// ../tool-server/src/tools/flows/flow-tree-flatten.ts
|
|
147522
147745
|
function intersectClip(rect, clip3) {
|
|
@@ -147682,6 +147905,7 @@ function adaptFullHierarchy(raw) {
|
|
|
147682
147905
|
});
|
|
147683
147906
|
return screenW > 0 && screenH > 0 ? { tree, screen: { width: screenW, height: screenH } } : { tree };
|
|
147684
147907
|
}
|
|
147908
|
+
var FLOW_TREE_MAX_DEPTH = 100;
|
|
147685
147909
|
var FULL_HIERARCHY_FIELDS = [
|
|
147686
147910
|
"className",
|
|
147687
147911
|
"identifier",
|
|
@@ -147713,9 +147937,9 @@ async function queryFullHierarchyTree(registry2, device, target) {
|
|
|
147713
147937
|
const ndRef = nativeDevtoolsRef(device);
|
|
147714
147938
|
nativeApi = await registry2.resolveService(ndRef.urn, ndRef.options);
|
|
147715
147939
|
} catch (err) {
|
|
147716
|
-
throw
|
|
147940
|
+
throw wrapPreservingFailure(
|
|
147717
147941
|
`native devtools is unavailable (${errMsg2(err)}) \u2014 flows resolve selectors against the full view hierarchy it serves`,
|
|
147718
|
-
|
|
147942
|
+
err
|
|
147719
147943
|
);
|
|
147720
147944
|
}
|
|
147721
147945
|
let bundleId;
|
|
@@ -147784,7 +148008,7 @@ async function queryFullHierarchyTree(registry2, device, target) {
|
|
|
147784
148008
|
resolved = await resolveNativeTargetApp(nativeApi, void 0);
|
|
147785
148009
|
} catch (err) {
|
|
147786
148010
|
const timedOut2 = getFailureSignal(err)?.error_code === FAILURE_CODES.NATIVE_DEVTOOLS_RPC_TIMEOUT;
|
|
147787
|
-
if (!timedOut2 || !target) throw err;
|
|
148011
|
+
if (!timedOut2 || !target) throw await explainTargetingFailure(err, nativeApi, device, target);
|
|
147788
148012
|
if (!isInjectableBundleId(target.bundleId)) {
|
|
147789
148013
|
throw new FailureError(
|
|
147790
148014
|
systemAppFlowTargetRefusal(target.bundleId),
|
|
@@ -147797,13 +148021,15 @@ async function queryFullHierarchyTree(registry2, device, target) {
|
|
|
147797
148021
|
err instanceof Error ? { cause: err } : void 0
|
|
147798
148022
|
);
|
|
147799
148023
|
}
|
|
147800
|
-
if (!nativeApi.listConnectedBundleIds().includes(target.bundleId))
|
|
148024
|
+
if (!nativeApi.listConnectedBundleIds().includes(target.bundleId)) {
|
|
148025
|
+
throw await explainTargetingFailure(err, nativeApi, device, target);
|
|
148026
|
+
}
|
|
147801
148027
|
let hintState;
|
|
147802
148028
|
try {
|
|
147803
148029
|
hintState = await nativeApi.getAppState(target.bundleId);
|
|
147804
148030
|
} catch (probeErr) {
|
|
147805
148031
|
if (getFailureSignal(probeErr)?.error_code === FAILURE_CODES.NATIVE_DEVTOOLS_RPC_TIMEOUT) {
|
|
147806
|
-
throw err;
|
|
148032
|
+
throw await explainTargetingFailure(err, nativeApi, device, target);
|
|
147807
148033
|
}
|
|
147808
148034
|
throw probeErr;
|
|
147809
148035
|
}
|
|
@@ -147822,13 +148048,18 @@ async function queryFullHierarchyTree(registry2, device, target) {
|
|
|
147822
148048
|
resolved = { bundleId: target.bundleId };
|
|
147823
148049
|
}
|
|
147824
148050
|
bundleId = resolved.bundleId;
|
|
148051
|
+
if (!nativeApi.listConnectedBundleIds().includes(bundleId)) {
|
|
148052
|
+
throw new Error(
|
|
148053
|
+
`${bundleId} answered the target probe and then dropped its native-devtools connection before the view hierarchy could be read. It was instrumented, so a retry may ride this out; if the connection does not come back, relaunch with restart-app (or a flow \`launch\` step) \u2014 launch-app would only foreground the process that just lost it.`
|
|
148054
|
+
);
|
|
148055
|
+
}
|
|
147825
148056
|
}
|
|
147826
148057
|
const rawResult = await nativeApi.queryViewHierarchy(
|
|
147827
148058
|
bundleId,
|
|
147828
148059
|
"ViewHierarchy.getFullHierarchy",
|
|
147829
148060
|
{
|
|
147830
148061
|
fields: FULL_HIERARCHY_FIELDS,
|
|
147831
|
-
maxDepth:
|
|
148062
|
+
maxDepth: FLOW_TREE_MAX_DEPTH
|
|
147832
148063
|
}
|
|
147833
148064
|
);
|
|
147834
148065
|
if (rawResult.error) {
|
|
@@ -147845,6 +148076,89 @@ async function queryFullHierarchyTree(registry2, device, target) {
|
|
|
147845
148076
|
function errMsg2(err) {
|
|
147846
148077
|
return err instanceof Error ? err.message : String(err);
|
|
147847
148078
|
}
|
|
148079
|
+
async function explainTargetingFailure(err, nativeApi, device, launched) {
|
|
148080
|
+
const failureCode = getFailureSignal(err)?.error_code;
|
|
148081
|
+
if (failureCode === FAILURE_CODES.NATIVE_TARGET_MULTIPLE_APPS_AMBIGUOUS) {
|
|
148082
|
+
const terminate = await terminateCommand(device);
|
|
148083
|
+
const clearOthers = terminate ? `; clear the others with \`${terminate}\` (argent has no terminate tool, and restart-app would just bring that app back to the front).` : `.`;
|
|
148084
|
+
return wrapPreservingFailure(
|
|
148085
|
+
// Short header: the embedded diagnostic already says the set is
|
|
148086
|
+
// ambiguous, and the per-app entries need those 90 characters.
|
|
148087
|
+
`could not target an app to read the view hierarchy from:
|
|
148088
|
+
${cappedAppDiagnostic(withoutExplicitBundleIdAdvice(errMsg2(err)))}
|
|
148089
|
+
Flow selectors auto-target and cannot name a bundleId. Foreground the intended app with launch-app (it does not terminate), then retry${clearOthers}`,
|
|
148090
|
+
err
|
|
148091
|
+
);
|
|
148092
|
+
}
|
|
148093
|
+
if (failureCode === FAILURE_CODES.NATIVE_TARGET_SINGLE_APP_NOT_FOREGROUND) {
|
|
148094
|
+
return wrapPreservingFailure(
|
|
148095
|
+
`the only native-devtools-connected app is not foreground, so it cannot be auto-targeted:
|
|
148096
|
+
${withoutExplicitBundleIdAdvice(errMsg2(err))}
|
|
148097
|
+
Flow selector steps auto-target and cannot provide a bundleId. Bring that app to the foreground with launch-app (it does not terminate \u2014 the app is already instrumented, just not frontmost), then retry.`,
|
|
148098
|
+
err
|
|
148099
|
+
);
|
|
148100
|
+
}
|
|
148101
|
+
const stillConnected = nativeApi.listConnectedBundleIds();
|
|
148102
|
+
if (stillConnected.length > 0) {
|
|
148103
|
+
const launchedGone = launched !== void 0 && !stillConnected.includes(launched.bundleId);
|
|
148104
|
+
const terminate = stillConnected.length > (launchedGone ? 0 : 1) ? await terminateCommand(device) : void 0;
|
|
148105
|
+
const clearOthers = terminate ? ` To clear the others use \`${terminate}\` \u2014 argent exposes no terminate tool, and restart-app would bring the app you cleared back to the front instead.` : ``;
|
|
148106
|
+
return wrapPreservingFailure(
|
|
148107
|
+
`could not read the state of the native-devtools-connected apps, so none could be auto-targeted (${firstClause(err)}). Connected: ${cappedList(stillConnected)}. ` + (launchedGone ? `${launched.bundleId} \u2014 the app this flow launched \u2014 is NOT among them, so relaunch it with restart-app (or a flow \`launch\` step); launch-app does not terminate, so it would only foreground the same uninstrumented process.` : `They are instrumented \u2014 do not relaunch. A suspended app stops answering: foreground the app the flow drives with launch-app (it does not terminate), then retry.`) + clearOthers,
|
|
148108
|
+
err
|
|
148109
|
+
);
|
|
148110
|
+
}
|
|
148111
|
+
return wrapPreservingFailure(
|
|
148112
|
+
`no app is connected to native devtools, so flow selectors have no instrumented process to read the view hierarchy from (${firstClause(err)}). Relaunch with restart-app (or a flow \`launch\` step): launch-app does not terminate, so on an app already running from Metro/Expo, Xcode, or its icon it only foregrounds that uninstrumented process. Argent treats an Apple system app (com.apple.*) as non-injectable \u2014 the native-devtools feature tools refuse it too \u2014 so if one never connects, drive it with raw point taps and tool: await-ui-element steps.`,
|
|
148113
|
+
err
|
|
148114
|
+
);
|
|
148115
|
+
}
|
|
148116
|
+
async function terminateCommand(device) {
|
|
148117
|
+
if (device.platform === "ios-remote") {
|
|
148118
|
+
return `sim-remote simctl terminate ${stripRemotePrefix(device.id)} <bundleId>`;
|
|
148119
|
+
}
|
|
148120
|
+
try {
|
|
148121
|
+
const { prefix } = await simctlTargetForUdid(device.id);
|
|
148122
|
+
return `xcrun ${prefix.join(" ")} terminate <udid> <bundleId>`;
|
|
148123
|
+
} catch {
|
|
148124
|
+
return void 0;
|
|
148125
|
+
}
|
|
148126
|
+
}
|
|
148127
|
+
function firstClause(err) {
|
|
148128
|
+
const firstLine2 = errMsg2(err).split("\n", 1)[0];
|
|
148129
|
+
const sentenceEnd = /\.(?=\s|$)/.exec(firstLine2);
|
|
148130
|
+
return sentenceEnd === null ? firstLine2 : firstLine2.slice(0, sentenceEnd.index + 1);
|
|
148131
|
+
}
|
|
148132
|
+
var MAX_LISTED_APPS = 2;
|
|
148133
|
+
function cappedList(bundleIds) {
|
|
148134
|
+
if (bundleIds.length <= MAX_LISTED_APPS) return bundleIds.join(", ");
|
|
148135
|
+
const dropped = bundleIds.length - MAX_LISTED_APPS;
|
|
148136
|
+
return `${bundleIds.slice(0, MAX_LISTED_APPS).join(", ")} (+${dropped} more)`;
|
|
148137
|
+
}
|
|
148138
|
+
function cappedAppDiagnostic(message) {
|
|
148139
|
+
const lines = message.split("\n");
|
|
148140
|
+
const isEntry = (line) => line.startsWith("- ");
|
|
148141
|
+
const firstEntry = lines.findIndex(isEntry);
|
|
148142
|
+
if (firstEntry === -1) return message;
|
|
148143
|
+
const entries = lines.filter(isEntry);
|
|
148144
|
+
if (entries.length <= MAX_LISTED_APPS) return message;
|
|
148145
|
+
const kept = entries.slice(0, MAX_LISTED_APPS);
|
|
148146
|
+
const dropped = entries.length - MAX_LISTED_APPS;
|
|
148147
|
+
return [
|
|
148148
|
+
...lines.slice(0, firstEntry),
|
|
148149
|
+
...kept,
|
|
148150
|
+
`- (+${dropped} more connected app${dropped === 1 ? "" : "s"})`,
|
|
148151
|
+
...lines.slice(firstEntry + entries.length).filter((line) => !isEntry(line))
|
|
148152
|
+
].join("\n");
|
|
148153
|
+
}
|
|
148154
|
+
function withoutExplicitBundleIdAdvice(message) {
|
|
148155
|
+
return message.replace(/\nProvide bundleId explicitly[^\n]*$/, "");
|
|
148156
|
+
}
|
|
148157
|
+
function wrapPreservingFailure(message, err) {
|
|
148158
|
+
const cause = err instanceof Error ? err : new Error(String(err));
|
|
148159
|
+
const signal = getFailureSignal(err);
|
|
148160
|
+
return signal ? new FailureError(message, signal, { cause }) : new Error(message, { cause });
|
|
148161
|
+
}
|
|
147848
148162
|
function projectIosDeviceNode(node) {
|
|
147849
148163
|
const onScreen = node.frame.width > 0 && node.frame.height > 0;
|
|
147850
148164
|
return {
|
|
@@ -147989,10 +148303,7 @@ async function queryAndroidFullHierarchy(registry2, device) {
|
|
|
147989
148303
|
devtools = await registry2.resolveService(ref.urn, ref.options);
|
|
147990
148304
|
} catch (err) {
|
|
147991
148305
|
const msg = err instanceof Error ? err.message : String(err);
|
|
147992
|
-
throw new Error(
|
|
147993
|
-
`the android devtools helper is unavailable (${msg}) \u2014 flows resolve testID selectors against the full hierarchy it serves; confirm the device is unlocked and the helper can be installed (\`adb install -t\`)`,
|
|
147994
|
-
{ cause: err }
|
|
147995
|
-
);
|
|
148306
|
+
throw new Error(`the argent android helper is unavailable: ${msg}`, { cause: err });
|
|
147996
148307
|
}
|
|
147997
148308
|
const [{ xml }, size] = await Promise.all([
|
|
147998
148309
|
// clearCache: await/assert polls must see text changes, not cached reads.
|
|
@@ -148082,21 +148393,22 @@ async function queryVegaTree(device) {
|
|
|
148082
148393
|
|
|
148083
148394
|
// ../tool-server/src/tools/flows/flow-tree.ts
|
|
148084
148395
|
async function fetchFlowTree(registry2, device, target) {
|
|
148085
|
-
|
|
148086
|
-
if (!source) return fetchTree(registry2, device);
|
|
148087
|
-
return source(registry2, device, target);
|
|
148396
|
+
return FLOW_TREE_SOURCES[device.platform](registry2, device, target);
|
|
148088
148397
|
}
|
|
148089
148398
|
var FLOW_TREE_SOURCES = {
|
|
148090
148399
|
// Simulator iOS uses the injected hierarchy and an optional target.
|
|
148091
148400
|
// Physical devices use the XCUITest runner tree.
|
|
148092
|
-
ios: (registry2, device, target) => device.kind === "device" ? queryIosDeviceFlowTree(registry2, device) : queryFullHierarchyTree(registry2, device, target),
|
|
148093
|
-
|
|
148094
|
-
|
|
148095
|
-
|
|
148401
|
+
"ios": (registry2, device, target) => device.kind === "device" ? queryIosDeviceFlowTree(registry2, device) : queryFullHierarchyTree(registry2, device, target),
|
|
148402
|
+
// A remote sim is an iOS simulator reached over the sim-remote tunnel, and
|
|
148403
|
+
// the native-devtools blueprint routes `getFullHierarchy` over TCP for one.
|
|
148404
|
+
// So it is the local simulator source with no `kind === "device"` arm:
|
|
148405
|
+
// `ios-remote` is always kind "simulator" (utils/device-info.ts) and has no
|
|
148406
|
+
// physical-device variant.
|
|
148407
|
+
"ios-remote": (registry2, device, target) => queryFullHierarchyTree(registry2, device, target),
|
|
148408
|
+
"android": (registry2, device) => queryAndroidFullHierarchy(registry2, device),
|
|
148409
|
+
"chromium": (registry2, device) => queryChromiumTree(registry2, device),
|
|
148410
|
+
"vega": (_registry, device) => queryVegaTree(device)
|
|
148096
148411
|
};
|
|
148097
|
-
function supportsFlowTree(platform) {
|
|
148098
|
-
return FLOW_TREE_SOURCES[platform] !== void 0;
|
|
148099
|
-
}
|
|
148100
148412
|
|
|
148101
148413
|
// ../tool-server/src/tools/flows/flow-pixels.ts
|
|
148102
148414
|
var fs53 = __toESM(require("node:fs/promises"));
|
|
@@ -148127,10 +148439,14 @@ var FIRST_CAPTURE_COMPLETION_MARGIN_MS = 500;
|
|
|
148127
148439
|
var FIRST_PIXEL_CAPTURE_TIMEOUT_MS = FIRST_FRAME_WAIT_MS + FIRST_CAPTURE_COMPLETION_MARGIN_MS;
|
|
148128
148440
|
var PIXEL_CAPTURE_TIMEOUT_MS = 2e3;
|
|
148129
148441
|
var IOS_DEVICE_PIXEL_CAPTURE_TIMEOUT_MS = 4e3;
|
|
148442
|
+
var REMOTE_PIXEL_CAPTURE_TIMEOUT_MS = 4e3;
|
|
148130
148443
|
function pixelCaptureTimeoutMs(device, firstCapture) {
|
|
148131
148444
|
if (isIosPhysicalDevice(device)) {
|
|
148132
148445
|
return IOS_DEVICE_PIXEL_CAPTURE_TIMEOUT_MS;
|
|
148133
148446
|
}
|
|
148447
|
+
if (device.platform === "ios-remote" && !firstCapture) {
|
|
148448
|
+
return REMOTE_PIXEL_CAPTURE_TIMEOUT_MS;
|
|
148449
|
+
}
|
|
148134
148450
|
const warmFromTheStart = device.platform === "chromium" || device.platform === "vega";
|
|
148135
148451
|
return firstCapture && !warmFromTheStart ? FIRST_PIXEL_CAPTURE_TIMEOUT_MS : PIXEL_CAPTURE_TIMEOUT_MS;
|
|
148136
148452
|
}
|
|
@@ -148540,12 +148856,10 @@ async function runDirective(env, step) {
|
|
|
148540
148856
|
}
|
|
148541
148857
|
async function settleForGesture(env) {
|
|
148542
148858
|
let warning;
|
|
148543
|
-
|
|
148544
|
-
|
|
148545
|
-
|
|
148546
|
-
|
|
148547
|
-
warning = unsettledGestureWarning(err);
|
|
148548
|
-
}
|
|
148859
|
+
try {
|
|
148860
|
+
await settleTree(env, { skipProvenOutage: true });
|
|
148861
|
+
} catch (err) {
|
|
148862
|
+
warning = unsettledGestureWarning(err);
|
|
148549
148863
|
}
|
|
148550
148864
|
if (env.signal?.aborted) return { aborted: true };
|
|
148551
148865
|
return warning !== void 0 ? { warning } : {};
|
|
@@ -149421,12 +149735,12 @@ function recordedLaunchedApp(session, platform) {
|
|
|
149421
149735
|
return void 0;
|
|
149422
149736
|
}
|
|
149423
149737
|
function fallbackSourceWarning(source, platform) {
|
|
149424
|
-
const expected = REPLAY_TREE_SOURCES[platform];
|
|
149738
|
+
const expected = REPLAY_TREE_SOURCES[authoringPlatform(platform)];
|
|
149425
149739
|
if (!expected || source === expected) return void 0;
|
|
149426
149740
|
return `selector captured from the fallback ${source} tree (${expected} unavailable) \u2014 replay resolves against the full hierarchy, which may not match it`;
|
|
149427
149741
|
}
|
|
149428
149742
|
function platformOf(udid) {
|
|
149429
|
-
return typeof udid === "string" ? resolveDevice(udid).platform : void 0;
|
|
149743
|
+
return typeof udid === "string" ? authoringPlatform(resolveDevice(udid).platform) : void 0;
|
|
149430
149744
|
}
|
|
149431
149745
|
var UNSUPPORTED_PLATFORM = {
|
|
149432
149746
|
divergence: "The recorder and the runner read different projections of the screen.",
|
|
@@ -149501,7 +149815,7 @@ function unmetWaitWarningFor(cause) {
|
|
|
149501
149815
|
}
|
|
149502
149816
|
function indeterminateReasonCaveat(udid) {
|
|
149503
149817
|
if (platformOf(udid) !== "ios") return "";
|
|
149504
|
-
return ".
|
|
149818
|
+
return ". One thing that reason cannot see is this step: the probe predicts an `await:`/`assert:` directive, and no directive takes a bundleId, so neither this probe nor the runner accepts one (the `bundleId` on this step reached the live wait only)";
|
|
149505
149819
|
}
|
|
149506
149820
|
var CANCELLED_PROBE_WARNING = "recorded, but the re-probe against the tree the RUNNER reads was cancelled before it answered. The step itself ran and is written to the flow; only the verdict is missing, so whether it would convert to `await:`/`assert:` is UNKNOWN, not known-bad \u2014 record the wait again, uncancelled, before trusting the conversion";
|
|
149507
149821
|
var PROBE_MAX_TREE_READ_MS = 2500;
|
|
@@ -149575,6 +149889,15 @@ async function probeAgainstRunnerTree(registry2, ctx, args) {
|
|
|
149575
149889
|
(condition === "text" ? textTieClause(args.udid) : "") + " " + SPELLING_CLAUSE + ` ${treeDivergenceFor(args.udid, condition)} ${runnerSideReadClause(args.udid, condition)}`
|
|
149576
149890
|
};
|
|
149577
149891
|
}
|
|
149892
|
+
function roleOnlySelectorWarning(selector) {
|
|
149893
|
+
if (selector.role === void 0 || selector.identifier !== void 0) return void 0;
|
|
149894
|
+
if (selector.text !== void 0 || selector.textMatches !== void 0) return void 0;
|
|
149895
|
+
return `selector ${describeSelector(selector)} matches by role alone (the tapped element has no id or visible text) \u2014 replay takes whichever element of that role ranks first, so re-record against a labelled element if that is not reliably this one`;
|
|
149896
|
+
}
|
|
149897
|
+
function innermostTreeReason(message) {
|
|
149898
|
+
const unwrapped = /helper is unavailable:\s*(.+)/s.exec(message)?.[1] ?? message;
|
|
149899
|
+
return unwrapped.replace(/^\[[^\]]+\]\s*/, "").trim();
|
|
149900
|
+
}
|
|
149578
149901
|
async function captureTapSelector(registry2, session, udid, point) {
|
|
149579
149902
|
try {
|
|
149580
149903
|
const device = resolveDevice(udid);
|
|
@@ -149600,10 +149923,15 @@ async function captureTapSelector(registry2, session, udid, point) {
|
|
|
149600
149923
|
warning: `selector ${describeSelector(selector)} resolves to a different element on this screen; kept coordinates (brittle)`
|
|
149601
149924
|
};
|
|
149602
149925
|
}
|
|
149603
|
-
|
|
149926
|
+
const warnings = [
|
|
149927
|
+
roleOnlySelectorWarning(selector),
|
|
149928
|
+
fallbackSourceWarning(source, device.platform)
|
|
149929
|
+
].filter((w) => w !== void 0);
|
|
149930
|
+
return { selector, ...warnings.length > 0 ? { warning: warnings.join("; ") } : {} };
|
|
149604
149931
|
} catch (err) {
|
|
149932
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
149605
149933
|
return {
|
|
149606
|
-
warning: `selector capture failed (${
|
|
149934
|
+
warning: `selector capture failed (${innermostTreeReason(message)}); kept coordinates`
|
|
149607
149935
|
};
|
|
149608
149936
|
}
|
|
149609
149937
|
}
|
|
@@ -149861,6 +150189,17 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
|
|
|
149861
150189
|
error_kind: "validation"
|
|
149862
150190
|
});
|
|
149863
150191
|
}
|
|
150192
|
+
if (isNativeDevtoolsBlockResult(params.command, toolResult)) {
|
|
150193
|
+
throw new FailureError(
|
|
150194
|
+
`${params.command} did not run (${toolResult.status}): ${toolResult.message} \u2014 nothing was recorded, so the take still matches what is on screen; clear the block and call flow-add-step again`,
|
|
150195
|
+
{
|
|
150196
|
+
error_code: FAILURE_CODES.NATIVE_DEVTOOLS_NOT_CONNECTED,
|
|
150197
|
+
failure_stage: "flow_add_step_native_devtools_block",
|
|
150198
|
+
failure_area: "tool_server",
|
|
150199
|
+
error_kind: "not_found"
|
|
150200
|
+
}
|
|
150201
|
+
);
|
|
150202
|
+
}
|
|
149864
150203
|
let waitWarning;
|
|
149865
150204
|
if (params.command === AWAIT_UI_ELEMENT_TOOL_ID) {
|
|
149866
150205
|
if (isUnmetUiWaitResult(params.command, toolResult)) {
|
|
@@ -149973,7 +150312,7 @@ Returns { message, stepCount, savedTo }. Fails if that flow has no recording in
|
|
|
149973
150312
|
// ../tool-server/src/tools/flows/flow-add-script.ts
|
|
149974
150313
|
init_zod();
|
|
149975
150314
|
var nodePath = __toESM(require("node:path"));
|
|
149976
|
-
|
|
150315
|
+
init_src2();
|
|
149977
150316
|
|
|
149978
150317
|
// ../tool-server/src/tools/flows/flow-file-refs.ts
|
|
149979
150318
|
var fs55 = __toESM(require("node:fs/promises"));
|
|
@@ -150004,15 +150343,16 @@ async function resolveFlowRelativeFile(anchorDir, target, addressable) {
|
|
|
150004
150343
|
var fs57 = __toESM(require("node:fs/promises"));
|
|
150005
150344
|
var path42 = __toESM(require("node:path"));
|
|
150006
150345
|
var import_node_url4 = require("node:url");
|
|
150007
|
-
|
|
150346
|
+
init_src2();
|
|
150008
150347
|
|
|
150009
150348
|
// ../tool-server/src/tools/flows/script/flow-script-executor.ts
|
|
150010
|
-
var
|
|
150349
|
+
var import_node_child_process35 = require("node:child_process");
|
|
150011
150350
|
var fs56 = __toESM(require("node:fs"));
|
|
150012
150351
|
var os17 = __toESM(require("node:os"));
|
|
150013
150352
|
var path41 = __toESM(require("node:path"));
|
|
150014
150353
|
var import_node_string_decoder = require("node:string_decoder");
|
|
150015
150354
|
var import_node_url3 = require("node:url");
|
|
150355
|
+
init_src();
|
|
150016
150356
|
|
|
150017
150357
|
// ../tool-server/src/tools/flows/script/flow-script-protocol.ts
|
|
150018
150358
|
var SCRIPT_MAX_OUTPUT_BYTES = 1024 * 1024;
|
|
@@ -150391,7 +150731,7 @@ var FlowScriptExecutor = class {
|
|
|
150391
150731
|
detached: process.platform !== "win32",
|
|
150392
150732
|
windowsHide: process.platform === "win32"
|
|
150393
150733
|
};
|
|
150394
|
-
child = (0,
|
|
150734
|
+
child = (0, import_node_child_process35.fork)(scriptPath, [], forkOptions);
|
|
150395
150735
|
} catch (err) {
|
|
150396
150736
|
return emptyResult(
|
|
150397
150737
|
{ kind: "spawn", message: `Could not start the script process: ${errorMessage(err)}` },
|
|
@@ -150832,7 +151172,7 @@ async function stopProcessTree(child, graceMs) {
|
|
|
150832
151172
|
if (process.platform === "win32") {
|
|
150833
151173
|
if (hasExited(child)) return;
|
|
150834
151174
|
tryKill(() => {
|
|
150835
|
-
const killer = (0,
|
|
151175
|
+
const killer = (0, import_node_child_process35.spawn)("taskkill", ["/pid", String(pid), "/t", "/f"], {
|
|
150836
151176
|
windowsHide: true,
|
|
150837
151177
|
stdio: "ignore"
|
|
150838
151178
|
});
|
|
@@ -151532,7 +151872,7 @@ You can still edit the .yaml file directly afterwards to remove or reorder steps
|
|
|
151532
151872
|
init_zod();
|
|
151533
151873
|
var fs61 = __toESM(require("node:fs/promises"));
|
|
151534
151874
|
var path45 = __toESM(require("node:path"));
|
|
151535
|
-
|
|
151875
|
+
init_src2();
|
|
151536
151876
|
|
|
151537
151877
|
// ../tool-server/src/tools/flows/flow-nested-outcome.ts
|
|
151538
151878
|
var FLOW_EXECUTE_TOOL_ID = "flow-execute";
|
|
@@ -151621,11 +151961,12 @@ var import_pngjs4 = __toESM(require_png());
|
|
|
151621
151961
|
var import_promises11 = __toESM(require("fs/promises"));
|
|
151622
151962
|
var import_path7 = __toESM(require("path"));
|
|
151623
151963
|
var import_pngjs3 = __toESM(require_png());
|
|
151964
|
+
init_src2();
|
|
151624
151965
|
|
|
151625
151966
|
// ../tool-server/src/tools/screenshot-diff/screenshot-diff-ocr.ts
|
|
151626
151967
|
var import_child_process8 = require("child_process");
|
|
151627
151968
|
var import_util10 = require("util");
|
|
151628
|
-
var
|
|
151969
|
+
var execFileAsync27 = (0, import_util10.promisify)(import_child_process8.execFile);
|
|
151629
151970
|
var OCR_TIMEOUT_MS = 1e4;
|
|
151630
151971
|
var OCR_MAX_BUFFER_BYTES = 32 * 1024 * 1024;
|
|
151631
151972
|
var TESSERACT_BINARY = "tesseract";
|
|
@@ -151670,7 +152011,7 @@ async function extractOcrTextBlocks(imagePath) {
|
|
|
151670
152011
|
}
|
|
151671
152012
|
}
|
|
151672
152013
|
async function recognizeTsv(imagePath) {
|
|
151673
|
-
const { stdout } = await
|
|
152014
|
+
const { stdout } = await execFileAsync27(
|
|
151674
152015
|
TESSERACT_BINARY,
|
|
151675
152016
|
[
|
|
151676
152017
|
imagePath,
|
|
@@ -153355,13 +153696,25 @@ async function writeDiffArtifacts(params) {
|
|
|
153355
153696
|
);
|
|
153356
153697
|
}
|
|
153357
153698
|
async function decodePngFile(filePath) {
|
|
153358
|
-
|
|
153359
|
-
|
|
153360
|
-
|
|
153361
|
-
|
|
153362
|
-
|
|
153363
|
-
|
|
153364
|
-
|
|
153699
|
+
try {
|
|
153700
|
+
const buffer = await import_promises11.default.readFile(filePath);
|
|
153701
|
+
const png = import_pngjs3.PNG.sync.read(buffer);
|
|
153702
|
+
return {
|
|
153703
|
+
width: png.width,
|
|
153704
|
+
height: png.height,
|
|
153705
|
+
data: png.data
|
|
153706
|
+
};
|
|
153707
|
+
} catch (err) {
|
|
153708
|
+
throw new FailureError(
|
|
153709
|
+
`Could not read PNG at ${filePath}: ${err instanceof Error ? err.message : String(err)}`,
|
|
153710
|
+
{
|
|
153711
|
+
error_code: FAILURE_CODES.SCREENSHOT_DIFF_INPUT_INVALID,
|
|
153712
|
+
failure_stage: "screenshot_diff_decode_failed",
|
|
153713
|
+
failure_area: "tool_server",
|
|
153714
|
+
error_kind: "validation"
|
|
153715
|
+
}
|
|
153716
|
+
);
|
|
153717
|
+
}
|
|
153365
153718
|
}
|
|
153366
153719
|
async function analyzeScreenshotTextChangesSafely(options) {
|
|
153367
153720
|
try {
|
|
@@ -153749,7 +154102,7 @@ async function runSnapshot(env, opts) {
|
|
|
153749
154102
|
});
|
|
153750
154103
|
const { w, h } = await pngDimensions(shot.image.hostPath);
|
|
153751
154104
|
const cropSuffix = opts.cropOn === void 0 ? "" : `-crop-${(0, import_node_crypto12.createHash)("sha256").update(cropIdentity(opts.cropOn)).digest("hex").slice(0, 8)}`;
|
|
153752
|
-
const snapshotKey = `${opts.name}__${env.device.platform}-${w}x${h}${cropSuffix}`;
|
|
154105
|
+
const snapshotKey = `${opts.name}__${authoringPlatform(env.device.platform)}-${w}x${h}${cropSuffix}`;
|
|
153753
154106
|
const key2 = `${snapshotKey}.png`;
|
|
153754
154107
|
const dir = baselineDir(opts.flowsDir, opts.flowName);
|
|
153755
154108
|
const baselinePath = path44.join(dir, key2);
|
|
@@ -153800,9 +154153,10 @@ async function runSnapshot(env, opts) {
|
|
|
153800
154153
|
kind: "screenshot",
|
|
153801
154154
|
mimeType: "image/png"
|
|
153802
154155
|
});
|
|
154156
|
+
const source = env.device.platform === "ios-remote" ? " from a remote simulator" : "";
|
|
153803
154157
|
return {
|
|
153804
154158
|
status: "pass",
|
|
153805
|
-
reason: exists2 ? `baseline updated (${key2})` : `baseline written (${key2})`,
|
|
154159
|
+
reason: exists2 ? `baseline updated${source} (${key2})` : `baseline written${source} (${key2})`,
|
|
153806
154160
|
snapshotKey,
|
|
153807
154161
|
artifacts: { baseline }
|
|
153808
154162
|
};
|
|
@@ -153882,36 +154236,47 @@ async function runSnapshot(env, opts) {
|
|
|
153882
154236
|
}
|
|
153883
154237
|
|
|
153884
154238
|
// ../tool-server/src/utils/status-bar.ts
|
|
153885
|
-
var
|
|
153886
|
-
var
|
|
154239
|
+
var import_node_child_process36 = require("node:child_process");
|
|
154240
|
+
var import_node_util26 = require("node:util");
|
|
153887
154241
|
init_adb();
|
|
153888
154242
|
init_device_info();
|
|
153889
|
-
var
|
|
154243
|
+
var execFileAsync28 = (0, import_node_util26.promisify)(import_node_child_process36.execFile);
|
|
153890
154244
|
var DEMO_BROADCAST = "am broadcast -a com.android.systemui.demo";
|
|
153891
|
-
|
|
154245
|
+
var IOS_STATUS_BAR_OVERRIDE = [
|
|
154246
|
+
"override",
|
|
154247
|
+
"--time",
|
|
154248
|
+
"9:37",
|
|
154249
|
+
"--batteryState",
|
|
154250
|
+
"charged",
|
|
154251
|
+
"--batteryLevel",
|
|
154252
|
+
"100",
|
|
154253
|
+
"--wifiBars",
|
|
154254
|
+
"3",
|
|
154255
|
+
"--cellularBars",
|
|
154256
|
+
"4"
|
|
154257
|
+
];
|
|
154258
|
+
var REMOTE_STATUS_BAR_TIMEOUT_MS = 5e3;
|
|
154259
|
+
function isRemoteTvOs(device) {
|
|
154260
|
+
return isRemoteTvOsSimulator(device.id, { timeoutMs: REMOTE_STATUS_BAR_TIMEOUT_MS });
|
|
154261
|
+
}
|
|
154262
|
+
async function pinStatusBar(device, signal) {
|
|
154263
|
+
if (signal?.aborted) return false;
|
|
153892
154264
|
if (isIosPhysicalDevice(device)) return false;
|
|
153893
154265
|
try {
|
|
153894
154266
|
if (device.platform === "ios") {
|
|
153895
|
-
await
|
|
154267
|
+
await execFileAsync28(
|
|
153896
154268
|
"xcrun",
|
|
153897
|
-
await simctlArgsForUdid(device.id, [
|
|
153898
|
-
"status_bar",
|
|
153899
|
-
device.id,
|
|
153900
|
-
"override",
|
|
153901
|
-
"--time",
|
|
153902
|
-
"9:37",
|
|
153903
|
-
"--batteryState",
|
|
153904
|
-
"charged",
|
|
153905
|
-
"--batteryLevel",
|
|
153906
|
-
"100",
|
|
153907
|
-
"--wifiBars",
|
|
153908
|
-
"3",
|
|
153909
|
-
"--cellularBars",
|
|
153910
|
-
"4"
|
|
153911
|
-
])
|
|
154269
|
+
await simctlArgsForUdid(device.id, ["status_bar", device.id, ...IOS_STATUS_BAR_OVERRIDE])
|
|
153912
154270
|
);
|
|
153913
154271
|
return true;
|
|
153914
154272
|
}
|
|
154273
|
+
if (device.platform === "ios-remote") {
|
|
154274
|
+
if (await isRemoteTvOs(device)) return false;
|
|
154275
|
+
await simctlStatusBar(device.id, IOS_STATUS_BAR_OVERRIDE, {
|
|
154276
|
+
timeoutMs: REMOTE_STATUS_BAR_TIMEOUT_MS
|
|
154277
|
+
});
|
|
154278
|
+
return true;
|
|
154279
|
+
}
|
|
153915
154280
|
if (device.platform === "android") {
|
|
153916
154281
|
await adbShell(device.id, "settings put global sysui_demo_allowed 1");
|
|
153917
154282
|
await adbShell(device.id, `${DEMO_BROADCAST} -e command enter`);
|
|
@@ -153929,16 +154294,20 @@ async function pinStatusBar(device) {
|
|
|
153929
154294
|
return false;
|
|
153930
154295
|
} catch {
|
|
153931
154296
|
const restored = await restoreStatusBar(device);
|
|
153932
|
-
return device.platform === "android" && !restored;
|
|
154297
|
+
return (device.platform === "android" || device.platform === "ios-remote") && !restored;
|
|
153933
154298
|
}
|
|
153934
154299
|
}
|
|
153935
154300
|
async function restoreStatusBar(device) {
|
|
153936
154301
|
try {
|
|
153937
154302
|
if (device.platform === "ios") {
|
|
153938
|
-
await
|
|
154303
|
+
await execFileAsync28(
|
|
153939
154304
|
"xcrun",
|
|
153940
154305
|
await simctlArgsForUdid(device.id, ["status_bar", device.id, "clear"])
|
|
153941
154306
|
);
|
|
154307
|
+
} else if (device.platform === "ios-remote") {
|
|
154308
|
+
if (!await isRemoteTvOs(device)) {
|
|
154309
|
+
await simctlStatusBar(device.id, ["clear"], { timeoutMs: REMOTE_STATUS_BAR_TIMEOUT_MS });
|
|
154310
|
+
}
|
|
153942
154311
|
} else if (device.platform === "android") {
|
|
153943
154312
|
try {
|
|
153944
154313
|
await adbShell(device.id, `${DEMO_BROADCAST} -e command exit`);
|
|
@@ -153969,8 +154338,8 @@ var zodSchema66 = external_exports.object({
|
|
|
153969
154338
|
device: external_exports.string().optional().describe(
|
|
153970
154339
|
"Device id to run against (iOS UDID, Android/Vega serial, Chromium id) \u2014 the id list-devices reports. Auto-detected when omitted, but only when exactly one booted device matches (optionally narrowed by `platform`); with several booted the run fails and lists them, so pass this explicitly whenever more than one device is up."
|
|
153971
154340
|
),
|
|
153972
|
-
platform: external_exports.enum(
|
|
153973
|
-
"Restrict auto-detection to this platform when several devices are booted. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: \u2026 }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first."
|
|
154341
|
+
platform: external_exports.enum(SELECTABLE_PLATFORMS).optional().describe(
|
|
154342
|
+
"Restrict auto-detection to this platform when several devices are booted. `ios` selects local simulators only \u2014 pass `ios-remote` to select a remote one. `chromium` does more than filter: with no `device` it SELECTS the self-boot branch for an e2e flow - the runner boots an Electron instance from the `launch` step's chromium value and tears it down after the run (a single-key `launch: { chromium: \u2026 }` map selects it on its own, without this parameter). When it selects that branch it never falls back to device auto-detection (a fragment, or an e2e launch map with no `chromium` key, still does), and the launch value must be a real Electron app path on the tool-server host: a bare-string `launch:` - what the recorder writes - holds an installed-app bundle id, so passing `chromium` for one fails the whole run with `Electron boot: path does not exist`. Edit the launch to `{ chromium: <app path> }` first."
|
|
153974
154343
|
),
|
|
153975
154344
|
updateBaselines: external_exports.boolean().optional().describe(
|
|
153976
154345
|
"Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them."
|
|
@@ -154071,9 +154440,9 @@ async function androidDevtoolsReady(registry2, device) {
|
|
|
154071
154440
|
try {
|
|
154072
154441
|
const ref = androidDevtoolsRef(device);
|
|
154073
154442
|
const api = await registry2.resolveService(ref.urn, ref.options);
|
|
154074
|
-
return api.isReady();
|
|
154075
|
-
} catch {
|
|
154076
|
-
return false;
|
|
154443
|
+
return { ready: api.isReady() };
|
|
154444
|
+
} catch (err) {
|
|
154445
|
+
return { ready: false, reason: err instanceof Error ? err.message : String(err) };
|
|
154077
154446
|
}
|
|
154078
154447
|
}
|
|
154079
154448
|
async function treeSourceGate(registry2, device, bundleId, signal) {
|
|
@@ -154086,16 +154455,16 @@ async function treeSourceGate(registry2, device, bundleId, signal) {
|
|
|
154086
154455
|
return `the on-device XCUITest runner did not become ready for ${device.id}: ${err instanceof Error ? err.message : String(err)}`;
|
|
154087
154456
|
}
|
|
154088
154457
|
}
|
|
154089
|
-
if (device.platform === "ios" && !signal?.aborted) {
|
|
154458
|
+
if ((device.platform === "ios" || device.platform === "ios-remote") && !signal?.aborted) {
|
|
154090
154459
|
const reason = await waitForNativeDevtools(registry2, device, bundleId, signal);
|
|
154091
154460
|
if (reason !== null && !signal?.aborted) {
|
|
154092
154461
|
return `could not connect to native devtools. ${reason}`;
|
|
154093
154462
|
}
|
|
154094
154463
|
}
|
|
154095
154464
|
if (device.platform === "android" && !signal?.aborted) {
|
|
154096
|
-
const ready2 = await androidDevtoolsReady(registry2, device);
|
|
154465
|
+
const { ready: ready2, reason } = await androidDevtoolsReady(registry2, device);
|
|
154097
154466
|
if (!ready2 && !signal?.aborted) {
|
|
154098
|
-
return
|
|
154467
|
+
return reason ? `the argent android helper is unavailable: ${reason}` : `the argent android helper is unavailable (full-hierarchy source for testID selectors).`;
|
|
154099
154468
|
}
|
|
154100
154469
|
}
|
|
154101
154470
|
if (device.platform === "vega" && !signal?.aborted) {
|
|
@@ -154115,7 +154484,7 @@ async function runLaunch(state3, app) {
|
|
|
154115
154484
|
if (!bundleId) {
|
|
154116
154485
|
return {
|
|
154117
154486
|
ok: false,
|
|
154118
|
-
reason: `no app id declared for platform "${device.platform}" \u2014 add a launch entry for it`
|
|
154487
|
+
reason: `no app id declared for platform "${authoringPlatform(device.platform)}" \u2014 add a launch entry for it`
|
|
154119
154488
|
};
|
|
154120
154489
|
}
|
|
154121
154490
|
state3.treeTarget = void 0;
|
|
@@ -154447,7 +154816,7 @@ Returns a per-step report: the first failure stops the run and the rest report a
|
|
|
154447
154816
|
viaUpload
|
|
154448
154817
|
);
|
|
154449
154818
|
const device = resolved.device;
|
|
154450
|
-
const statusBarPinned = device !== null && await pinStatusBar(device);
|
|
154819
|
+
const statusBarPinned = device !== null && await pinStatusBar(device, signal);
|
|
154451
154820
|
if (device?.platform === "chromium") await frontChromiumPage(registry2, device);
|
|
154452
154821
|
const state3 = {
|
|
154453
154822
|
registry: registry2,
|
|
@@ -154798,7 +155167,7 @@ async function execWhenStep(state3, step, scope) {
|
|
|
154798
155167
|
let met;
|
|
154799
155168
|
if (step.condition.kind === "platform") {
|
|
154800
155169
|
const guardEnv = deviceEnv(state3);
|
|
154801
|
-
const platform = guardEnv.device.platform
|
|
155170
|
+
const platform = authoringPlatform(guardEnv.device.platform);
|
|
154802
155171
|
met = platform === step.condition.platform;
|
|
154803
155172
|
} else {
|
|
154804
155173
|
const probe3 = await probeWhenCondition(deviceEnv(state3), step.condition);
|
|
@@ -154973,6 +155342,7 @@ async function execLeafStep(state3, step, index, scope) {
|
|
|
154973
155342
|
status: r.status,
|
|
154974
155343
|
reason: r.reason,
|
|
154975
155344
|
snapshotKey: r.snapshotKey,
|
|
155345
|
+
...r.snapshotKey !== void 0 && state3.device?.platform === "ios-remote" ? { snapshotRemote: true } : {},
|
|
154976
155346
|
artifacts: r.artifacts
|
|
154977
155347
|
};
|
|
154978
155348
|
} catch (err) {
|
|
@@ -155274,8 +155644,8 @@ init_zod();
|
|
|
155274
155644
|
|
|
155275
155645
|
// ../tool-server/src/utils/workspace-reader.ts
|
|
155276
155646
|
var import_promises12 = require("node:fs/promises");
|
|
155277
|
-
var
|
|
155278
|
-
var
|
|
155647
|
+
var import_node_path23 = require("node:path");
|
|
155648
|
+
var import_node_child_process37 = require("node:child_process");
|
|
155279
155649
|
var import_dotenv2 = __toESM(require_main());
|
|
155280
155650
|
async function exists(path50) {
|
|
155281
155651
|
try {
|
|
@@ -155319,7 +155689,7 @@ async function listDir(path50) {
|
|
|
155319
155689
|
var COMMAND_TIMEOUT_MS = 3e3;
|
|
155320
155690
|
function runVersionCommand(cmd, args, cwd) {
|
|
155321
155691
|
return new Promise((resolve14) => {
|
|
155322
|
-
const child = (0,
|
|
155692
|
+
const child = (0, import_node_child_process37.execFile)(cmd, args, { cwd, timeout: COMMAND_TIMEOUT_MS }, (err, stdout) => {
|
|
155323
155693
|
if (err) {
|
|
155324
155694
|
resolve14(null);
|
|
155325
155695
|
return;
|
|
@@ -155362,7 +155732,7 @@ async function detectLockfile(workspacePath) {
|
|
|
155362
155732
|
const checks = await Promise.all(
|
|
155363
155733
|
LOCKFILES.map(async (name) => ({
|
|
155364
155734
|
name,
|
|
155365
|
-
exists: await exists((0,
|
|
155735
|
+
exists: await exists((0, import_node_path23.join)(workspacePath, name))
|
|
155366
155736
|
}))
|
|
155367
155737
|
);
|
|
155368
155738
|
return checks.find((c) => c.exists)?.name ?? null;
|
|
@@ -155381,7 +155751,7 @@ var CI_CONFIGS = [
|
|
|
155381
155751
|
];
|
|
155382
155752
|
async function detectCiConfig(workspacePath) {
|
|
155383
155753
|
for (const ci of CI_CONFIGS) {
|
|
155384
|
-
if (await exists((0,
|
|
155754
|
+
if (await exists((0, import_node_path23.join)(workspacePath, ci.path))) return ci.label;
|
|
155385
155755
|
}
|
|
155386
155756
|
return null;
|
|
155387
155757
|
}
|
|
@@ -155402,7 +155772,7 @@ async function detectLintStagedConfig(workspacePath, packageJson) {
|
|
|
155402
155772
|
return packageJson["lint-staged"];
|
|
155403
155773
|
}
|
|
155404
155774
|
for (const file2 of LINT_STAGED_FILES) {
|
|
155405
|
-
const full = (0,
|
|
155775
|
+
const full = (0, import_node_path23.join)(workspacePath, file2);
|
|
155406
155776
|
if (await exists(full)) {
|
|
155407
155777
|
if (file2.endsWith(".json") || file2 === ".lintstagedrc") {
|
|
155408
155778
|
return readJsonFile(full);
|
|
@@ -155444,7 +155814,7 @@ var CONFIG_FILES = [
|
|
|
155444
155814
|
async function detectConfigFiles(workspacePath) {
|
|
155445
155815
|
const results = await Promise.allSettled(
|
|
155446
155816
|
CONFIG_FILES.map(async (file2) => {
|
|
155447
|
-
if (await exists((0,
|
|
155817
|
+
if (await exists((0, import_node_path23.join)(workspacePath, file2))) return file2;
|
|
155448
155818
|
return null;
|
|
155449
155819
|
})
|
|
155450
155820
|
);
|
|
@@ -155483,7 +155853,7 @@ async function detectEnvFiles(workspacePath) {
|
|
|
155483
155853
|
const envFileNames = entries.filter((e) => e === ".env" || e.startsWith(".env."));
|
|
155484
155854
|
const results = await Promise.all(
|
|
155485
155855
|
envFileNames.map(async (name) => {
|
|
155486
|
-
const content = await readTextFile((0,
|
|
155856
|
+
const content = await readTextFile((0, import_node_path23.join)(workspacePath, name));
|
|
155487
155857
|
return {
|
|
155488
155858
|
name,
|
|
155489
155859
|
keys: content ? extractEnvKeys(content) : []
|
|
@@ -155510,34 +155880,34 @@ async function readWorkspaceSnapshot(workspacePath) {
|
|
|
155510
155880
|
ciConfig,
|
|
155511
155881
|
configFilesFound
|
|
155512
155882
|
] = await Promise.all([
|
|
155513
|
-
readJsonFile((0,
|
|
155514
|
-
readJsonFile((0,
|
|
155515
|
-
readJsonFile((0,
|
|
155516
|
-
readJsonFile((0,
|
|
155517
|
-
readTextFile((0,
|
|
155518
|
-
(r) => r ?? readTextFile((0,
|
|
155883
|
+
readJsonFile((0, import_node_path23.join)(workspacePath, "package.json")),
|
|
155884
|
+
readJsonFile((0, import_node_path23.join)(workspacePath, "app.json")),
|
|
155885
|
+
readJsonFile((0, import_node_path23.join)(workspacePath, "eas.json")),
|
|
155886
|
+
readJsonFile((0, import_node_path23.join)(workspacePath, "tsconfig.json")),
|
|
155887
|
+
readTextFile((0, import_node_path23.join)(workspacePath, "metro.config.js")).then(
|
|
155888
|
+
(r) => r ?? readTextFile((0, import_node_path23.join)(workspacePath, "metro.config.ts"))
|
|
155519
155889
|
),
|
|
155520
|
-
readTextFile((0,
|
|
155521
|
-
(r) => r ?? readTextFile((0,
|
|
155890
|
+
readTextFile((0, import_node_path23.join)(workspacePath, "babel.config.js")).then(
|
|
155891
|
+
(r) => r ?? readTextFile((0, import_node_path23.join)(workspacePath, "babel.config.cjs"))
|
|
155522
155892
|
),
|
|
155523
|
-
isDirectory((0,
|
|
155524
|
-
isDirectory((0,
|
|
155893
|
+
isDirectory((0, import_node_path23.join)(workspacePath, "ios")),
|
|
155894
|
+
isDirectory((0, import_node_path23.join)(workspacePath, "android")),
|
|
155525
155895
|
detectLockfile(workspacePath),
|
|
155526
155896
|
detectEnvFiles(workspacePath),
|
|
155527
155897
|
detectToolVersions(workspacePath),
|
|
155528
|
-
listDir((0,
|
|
155529
|
-
listDir((0,
|
|
155898
|
+
listDir((0, import_node_path23.join)(workspacePath, "scripts")),
|
|
155899
|
+
listDir((0, import_node_path23.join)(workspacePath, ".husky")),
|
|
155530
155900
|
detectCiConfig(workspacePath),
|
|
155531
155901
|
detectConfigFiles(workspacePath)
|
|
155532
155902
|
]);
|
|
155533
|
-
const iosDir = (0,
|
|
155534
|
-
const androidDir = (0,
|
|
155903
|
+
const iosDir = (0, import_node_path23.join)(workspacePath, "ios");
|
|
155904
|
+
const androidDir = (0, import_node_path23.join)(workspacePath, "android");
|
|
155535
155905
|
const [iosWorkspace, iosHasPodfile, makefileText, lintStagedConfig, androidHasGradle] = await Promise.all([
|
|
155536
155906
|
hasIosDir ? findIosWorkspace(iosDir) : Promise.resolve(null),
|
|
155537
|
-
exists((0,
|
|
155538
|
-
readTextFile((0,
|
|
155907
|
+
exists((0, import_node_path23.join)(workspacePath, "ios", "Podfile")),
|
|
155908
|
+
readTextFile((0, import_node_path23.join)(workspacePath, "Makefile")),
|
|
155539
155909
|
detectLintStagedConfig(workspacePath, packageJson),
|
|
155540
|
-
hasAndroidDir ? exists((0,
|
|
155910
|
+
hasAndroidDir ? exists((0, import_node_path23.join)(androidDir, "gradlew")) : Promise.resolve(false)
|
|
155541
155911
|
]);
|
|
155542
155912
|
const metroPort2 = metroConfigRaw ? extractMetroPort(metroConfigRaw) : null;
|
|
155543
155913
|
const makefileTargets = makefileText ? extractMakefileTargets(makefileText) : null;
|
|
@@ -155608,7 +155978,7 @@ Fails if the workspacePath is not an absolute path or the directory cannot be ac
|
|
|
155608
155978
|
};
|
|
155609
155979
|
|
|
155610
155980
|
// ../tool-server/src/tools/system/update-argent.ts
|
|
155611
|
-
var
|
|
155981
|
+
var import_node_child_process38 = require("node:child_process");
|
|
155612
155982
|
var fs63 = __toESM(require("node:fs"));
|
|
155613
155983
|
var path46 = __toESM(require("node:path"));
|
|
155614
155984
|
init_zod();
|
|
@@ -155743,7 +156113,7 @@ var updateArgentTool = {
|
|
|
155743
156113
|
if (spawnRoot) updateArgs.push("--project-root", spawnRoot);
|
|
155744
156114
|
const cmd = cliEntry ? process.execPath : "argent";
|
|
155745
156115
|
const args = cliEntry ? [cliEntry, ...updateArgs] : updateArgs;
|
|
155746
|
-
const child = (0,
|
|
156116
|
+
const child = (0, import_node_child_process38.spawn)(cmd, args, {
|
|
155747
156117
|
detached: true,
|
|
155748
156118
|
stdio: "ignore",
|
|
155749
156119
|
env: { ...process.env, ARGENT_UPDATE_TRIGGER: "mcp_update" }
|
|
@@ -155800,7 +156170,7 @@ var import_promises13 = __toESM(require("fs/promises"));
|
|
|
155800
156170
|
var import_node_os13 = __toESM(require("node:os"));
|
|
155801
156171
|
var import_path8 = __toESM(require("path"));
|
|
155802
156172
|
init_zod();
|
|
155803
|
-
|
|
156173
|
+
init_src2();
|
|
155804
156174
|
init_device_info();
|
|
155805
156175
|
var zodSchema71 = external_exports.object({
|
|
155806
156176
|
baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
|
|
@@ -156276,7 +156646,7 @@ disconnects (aborts cleanly).`,
|
|
|
156276
156646
|
|
|
156277
156647
|
// ../tool-server/src/tools/chromium-tabs/index.ts
|
|
156278
156648
|
init_zod();
|
|
156279
|
-
|
|
156649
|
+
init_src2();
|
|
156280
156650
|
init_device_info();
|
|
156281
156651
|
var zodSchema74 = external_exports.object({
|
|
156282
156652
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
@@ -156364,11 +156734,11 @@ Returns { tabs: [{ tabId, targetId, title, url, active, label? }] }. Fails if th
|
|
|
156364
156734
|
|
|
156365
156735
|
// ../tool-server/src/tools/chromium-cookies/index.ts
|
|
156366
156736
|
init_zod();
|
|
156367
|
-
|
|
156737
|
+
init_src2();
|
|
156368
156738
|
init_device_info();
|
|
156369
156739
|
|
|
156370
156740
|
// ../tool-server/src/chromium-server/storage.ts
|
|
156371
|
-
|
|
156741
|
+
init_src2();
|
|
156372
156742
|
async function getCookies(cdp, urls) {
|
|
156373
156743
|
const out = await cdp.send("Network.getCookies", urls && urls.length ? { urls } : {});
|
|
156374
156744
|
return out.cookies ?? [];
|
|
@@ -156536,7 +156906,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
|
|
|
156536
156906
|
|
|
156537
156907
|
// ../tool-server/src/tools/chromium-storage/index.ts
|
|
156538
156908
|
init_zod();
|
|
156539
|
-
|
|
156909
|
+
init_src2();
|
|
156540
156910
|
init_device_info();
|
|
156541
156911
|
var zodSchema76 = external_exports.object({
|
|
156542
156912
|
udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
|
|
@@ -156745,13 +157115,13 @@ function probeArgentToolServer(host, port, timeoutMs = 500) {
|
|
|
156745
157115
|
|
|
156746
157116
|
// ../tool-server/src/utils/simulator-watcher.ts
|
|
156747
157117
|
var fs65 = __toESM(require("node:fs"));
|
|
156748
|
-
var
|
|
156749
|
-
var
|
|
157118
|
+
var import_node_child_process39 = require("node:child_process");
|
|
157119
|
+
var import_node_util27 = require("node:util");
|
|
156750
157120
|
init_external_devices();
|
|
156751
|
-
var
|
|
157121
|
+
var execFileAsync29 = (0, import_node_util27.promisify)(import_node_child_process39.execFile);
|
|
156752
157122
|
var POLL_INTERVAL_MS2 = 1e4;
|
|
156753
157123
|
async function getBootedUdidsInSet(deviceSet) {
|
|
156754
|
-
const { stdout } = await
|
|
157124
|
+
const { stdout } = await execFileAsync29("xcrun", [
|
|
156755
157125
|
...simctlPrefix(deviceSet),
|
|
156756
157126
|
"list",
|
|
156757
157127
|
"devices",
|
|
@@ -156870,7 +157240,7 @@ function startSimulatorWatcher(registry2) {
|
|
|
156870
157240
|
}
|
|
156871
157241
|
|
|
156872
157242
|
// ../tool-server/src/utils/preview-window.ts
|
|
156873
|
-
var
|
|
157243
|
+
var import_node_child_process40 = require("node:child_process");
|
|
156874
157244
|
var fs66 = __toESM(require("node:fs"));
|
|
156875
157245
|
var os20 = __toESM(require("node:os"));
|
|
156876
157246
|
var path48 = __toESM(require("node:path"));
|
|
@@ -156902,10 +157272,10 @@ function ensureLensAppBundle(electronBin) {
|
|
|
156902
157272
|
fs66.copyFileSync(path48.join(realContents, "Info.plist"), plist);
|
|
156903
157273
|
const setPlist = (entry, value) => {
|
|
156904
157274
|
try {
|
|
156905
|
-
(0,
|
|
157275
|
+
(0, import_node_child_process40.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Set :${entry} ${value}`, plist]);
|
|
156906
157276
|
} catch {
|
|
156907
157277
|
try {
|
|
156908
|
-
(0,
|
|
157278
|
+
(0, import_node_child_process40.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Add :${entry} string ${value}`, plist]);
|
|
156909
157279
|
} catch {
|
|
156910
157280
|
}
|
|
156911
157281
|
}
|
|
@@ -156964,7 +157334,7 @@ function createPreviewWindowManager(opts = {}) {
|
|
|
156964
157334
|
const wrapperBin = ensureLensAppBundle(electronBin);
|
|
156965
157335
|
const launchBin = wrapperBin ?? electronBin;
|
|
156966
157336
|
const launchArgs = wrapperBin ? ["--no-sandbox", mainScript] : [mainScript];
|
|
156967
|
-
const next = (0,
|
|
157337
|
+
const next = (0, import_node_child_process40.spawn)(launchBin, launchArgs, {
|
|
156968
157338
|
// Strips ELECTRON_RUN_AS_NODE, which an Electron-based MCP host leaves in
|
|
156969
157339
|
// our env, so the child boots as a GUI app instead of bare Node.
|
|
156970
157340
|
env: electronGuiChildEnv({ ARGENT_PREVIEW_URL: url2 }),
|