@swmansion/argent 0.25.1-next.8 → 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.
@@ -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)?.forEach((fn) => {
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, import_node_path.extname)(filePath).toLowerCase()] ?? "application/octet-stream";
1009
+ return MIME_BY_EXT[(0, import_node_path2.extname)(filePath).toLowerCase()] ?? "application/octet-stream";
424
1010
  }
425
- var import_promises, import_node_crypto, import_node_path, ARTIFACT_MARKER, MIME_BY_EXT, ArtifactStore;
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
- import_node_path = require("node:path");
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, import_node_path.basename)(hostPath);
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 init_src = __esm({
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 = import_node_path2.win32.resolve(process.cwd()).toLowerCase();
70004
- const match = stdout2.split(/\r?\n/).map((line) => line.trim()).filter(Boolean).find((candidate) => import_node_path2.win32.resolve(import_node_path2.win32.dirname(candidate)).toLowerCase() !== cwd);
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, import_node_path2, execFileAsync;
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
- import_node_path2 = require("node:path");
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, import_node_path3.join)(root, SUBDIR[name], binFileName(name));
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 = [process.env.ANDROID_HOME, process.env.ANDROID_SDK_ROOT].filter(
70054
- (v) => Boolean(v && v.trim())
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, import_node_path3.join)(home, "Library", "Android", "sdk"),
70651
+ (0, import_node_path4.join)(home, "Library", "Android", "sdk"),
70062
70652
  // macOS Android Studio default
70063
- (0, import_node_path3.join)(home, "Android", "Sdk"),
70653
+ (0, import_node_path4.join)(home, "Android", "Sdk"),
70064
70654
  // Linux Android Studio default
70065
- (0, import_node_path3.join)(home, "android-sdk"),
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, import_node_path3.join)(localAppData, "Android", "Sdk"));
70076
- roots.push((0, import_node_path3.join)(home, "AppData", "Local", "Android", "Sdk"));
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, import_node_path3, SUBDIR, BIN_EXT, CACHE_TTL_MS, cache2;
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
- import_node_path3 = require("node:path");
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 init_src2 = __esm({
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
- init_src2();
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 cacheKey3 = `${emulatorPath}|${flag}`;
77008
- const cached3 = emulatorFlagSupportCache.get(cacheKey3);
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(cacheKey3, supported);
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, import_node_path6.isAbsolute)(p)));
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, import_node_path6.isAbsolute)(trimmed)) continue;
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, import_node_path6, 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;
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
- import_node_path6 = require("node:path");
77926
+ import_node_path7 = require("node:path");
77336
77927
  import_ini = __toESM(require_ini());
77337
- init_src();
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 isAbsolute8 = require_path_is_absolute();
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 (isAbsolute8(f) || f === "") {
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 isAbsolute8 = require_path_is_absolute();
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 (isAbsolute8(prefix) || isAbsolute8(pattern.join("/"))) {
78830
- if (!prefix || !isAbsolute8(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 && isAbsolute8(prefix) && !this.nomount) {
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 isAbsolute8 = require_path_is_absolute();
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 (isAbsolute8(prefix) || isAbsolute8(pattern.join("/"))) {
79350
- if (!prefix || !isAbsolute8(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 && isAbsolute8(prefix) && !this.nomount) {
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
- init_src();
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-next.8";
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
- init_src();
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 import_node_path11 = require("node:path");
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
- init_src();
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 import_node_path4 = require("node:path");
95574
- init_src();
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, import_node_path4.join)((0, import_node_os3.homedir)(), "vega", "bin", "vega");
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 set `$ANDROID_HOME` to the SDK root (the resolver checks `$ANDROID_HOME/platform-tools/adb`). Only required for Android devices and emulators.",
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 set `$ANDROID_HOME` to the SDK root (the resolver checks `$ANDROID_HOME/emulator/emulator`). Only required to launch new Android emulators via `boot-device`.",
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
- init_src();
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 import_node_path5 = __toESM(require("node:path"));
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.0";
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 import_node_path5.default.join(import_node_os4.default.homedir(), ".argent", "update-suppression.json");
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(import_node_path5.default.dirname(filePath), { recursive: true });
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 import_node_path8 = __toESM(require("node:path"));
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
- init_src();
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
- init_src();
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
- init_src();
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
- error_code: FAILURE_CODES.SIMULATOR_COMMAND_TRANSPORT_FAILED,
107345
- failure_stage: "simulator_command_transport",
107346
- failure_area: "tool_server",
107347
- error_kind: "network",
107348
- network_failure: "connection_reset",
107349
- failure_command: "simulator_server"
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
- if (api.transport) {
107407
- routeViaTransport(api.transport, cmd);
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;
@@ -107541,11 +107663,18 @@ async function simulatorPost(toolLabel, api, endpoint, reqBody, signal, fallback
107541
107663
  }
107542
107664
  return { res, body };
107543
107665
  }
107666
+ var warnedScaleValue;
107544
107667
  function getScreenshotScale() {
107545
107668
  const v = process.env.ARGENT_SCREENSHOT_SCALE;
107546
107669
  if (v) {
107547
107670
  const n = parseFloat(v);
107548
- if (!Number.isNaN(n) && n > 0 && n <= 1) return n;
107671
+ if (!Number.isNaN(n) && n >= 0.01 && n <= 1) return n;
107672
+ if (v !== warnedScaleValue) {
107673
+ warnedScaleValue = v;
107674
+ console.warn(
107675
+ `[screenshot] Ignoring ARGENT_SCREENSHOT_SCALE=${v}: expected a number between 0.01 and 1.0. Using ${DEFAULT_SCREENSHOT_SCALE}.`
107676
+ );
107677
+ }
107549
107678
  }
107550
107679
  return DEFAULT_SCREENSHOT_SCALE;
107551
107680
  }
@@ -107604,32 +107733,36 @@ async function httpScreenshot(api, rotation, signal, scale) {
107604
107733
  );
107605
107734
  }
107606
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
+ }
107607
107744
  function routeViaTransport(transport, cmd) {
107608
107745
  switch (cmd.cmd) {
107609
107746
  case "touch": {
107610
107747
  const sx = cmd.second_x ?? cmd.secondX;
107611
107748
  const sy = cmd.second_y ?? cmd.secondY;
107612
- transport.touch({
107749
+ return transport.touch({
107613
107750
  type: cmd.type,
107614
107751
  x: cmd.x,
107615
107752
  y: cmd.y,
107616
107753
  secondX: sx == null ? void 0 : sx,
107617
107754
  secondY: sy == null ? void 0 : sy
107618
107755
  });
107619
- return;
107620
107756
  }
107621
107757
  case "button":
107622
- transport.button({
107758
+ return transport.button({
107623
107759
  direction: cmd.direction,
107624
107760
  button: cmd.button
107625
107761
  });
107626
- return;
107627
107762
  case "rotate":
107628
- transport.rotate(cmd.direction);
107629
- return;
107763
+ return transport.rotate(cmd.direction);
107630
107764
  case "key":
107631
- transport.pressKey(cmd.direction, cmd.code);
107632
- return;
107765
+ return transport.pressKey(cmd.direction, cmd.code);
107633
107766
  default:
107634
107767
  throw new Error(`MoQ transport does not implement sendCommand cmd '${String(cmd.cmd)}'`);
107635
107768
  }
@@ -107643,8 +107776,8 @@ function createMoqTransport(moq, options) {
107643
107776
  return { url: (0, import_node_url.pathToFileURL)(file2).toString(), path: file2 };
107644
107777
  };
107645
107778
  return {
107646
- touch(opts) {
107647
- void moq.sendControl(
107779
+ async touch(opts) {
107780
+ await moq.sendControl(
107648
107781
  encodeTouch({
107649
107782
  action: opts.type,
107650
107783
  x: opts.x,
@@ -107654,17 +107787,17 @@ function createMoqTransport(moq, options) {
107654
107787
  })
107655
107788
  );
107656
107789
  },
107657
- button(opts) {
107658
- void moq.sendControl(encodeButton({ action: opts.direction, button: opts.button }));
107790
+ async button(opts) {
107791
+ await moq.sendControl(encodeButton({ action: opts.direction, button: opts.button }));
107659
107792
  },
107660
- rotate(direction) {
107661
- void moq.sendControl(encodeRotate(direction));
107793
+ async rotate(direction) {
107794
+ await moq.sendControl(encodeRotate(direction));
107662
107795
  },
107663
107796
  async paste(text) {
107664
107797
  await options.pasteText(text);
107665
107798
  },
107666
- pressKey(direction, keyCode) {
107667
- void moq.sendControl(encodeKey({ action: direction, code: keyCode }));
107799
+ async pressKey(direction, keyCode) {
107800
+ await moq.sendControl(encodeKey({ action: direction, code: keyCode }));
107668
107801
  },
107669
107802
  async screenshot(opts) {
107670
107803
  const scale = opts?.scale ?? getScreenshotScale();
@@ -107697,17 +107830,20 @@ async function buildRemoteInstance(device) {
107697
107830
  await simctlPbcopy(device.id, text);
107698
107831
  const CMD = 227;
107699
107832
  const V = 25;
107700
- await moq.sendControl(encodeKey({ action: "Down", code: CMD }));
107701
- await moq.sendControl(encodeKey({ action: "Down", code: V }));
107702
- await moq.sendControl(encodeKey({ action: "Up", code: V }));
107703
- await moq.sendControl(encodeKey({ action: "Up", code: CMD }));
107833
+ await api.pressKey("Down", CMD);
107834
+ await api.pressKey("Down", V);
107835
+ await api.pressKey("Up", V);
107836
+ await api.pressKey("Up", CMD);
107704
107837
  }
107705
107838
  });
107706
107839
  const stubUrl = `moq+remote://${device.id}`;
107707
107840
  const api = {
107708
107841
  apiUrl: stubUrl,
107709
107842
  streamUrl: stubUrl,
107710
- pressKey: (direction, keyCode) => moq.sendControl(encodeKey({ action: direction, code: keyCode })),
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 }),
107711
107847
  transport
107712
107848
  };
107713
107849
  return {
@@ -107762,9 +107898,14 @@ async function spawnSimulatorServerProcess(udid, subcommand) {
107762
107898
  return new Promise((resolve14, reject) => {
107763
107899
  const args = [subcommand, "--id", udid];
107764
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
+ `);
107765
107905
  const proc = (0, import_node_child_process11.spawn)(BINARY_PATH, args, {
107766
107906
  cwd: RUN_DIR,
107767
- stdio: ["pipe", "pipe", "pipe"]
107907
+ stdio: ["pipe", "pipe", "pipe"],
107908
+ ...sdkRoot ? { env: { ...process.env, ANDROID_HOME: sdkRoot } } : {}
107768
107909
  });
107769
107910
  let apiUrl = null;
107770
107911
  let streamUrl = "";
@@ -108066,7 +108207,7 @@ var fs16 = __toESM(require("node:fs/promises"));
108066
108207
  var os6 = __toESM(require("node:os"));
108067
108208
  var path14 = __toESM(require("node:path"));
108068
108209
  var import_node_crypto7 = require("node:crypto");
108069
- init_src();
108210
+ init_src2();
108070
108211
 
108071
108212
  // ../tool-server/src/utils/ios-device/usbmux-protocol.ts
108072
108213
  var USBMUX_HEADER_BYTES = 16;
@@ -108556,20 +108697,20 @@ var path17 = __toESM(require("node:path"));
108556
108697
  init_device_info();
108557
108698
 
108558
108699
  // ../tool-server/src/blueprints/chromium-cdp.ts
108559
- init_src();
108700
+ init_src2();
108560
108701
 
108561
108702
  // ../tool-server/src/chromium-server/index.ts
108562
- init_src();
108703
+ init_src2();
108563
108704
 
108564
108705
  // ../tool-server/src/chromium-server/cdp-session.ts
108565
108706
  var fs17 = __toESM(require("node:fs"));
108566
108707
  var os7 = __toESM(require("node:os"));
108567
108708
  var path15 = __toESM(require("node:path"));
108568
- init_src();
108709
+ init_src2();
108569
108710
 
108570
108711
  // ../tool-server/src/utils/debugger/cdp-client.ts
108571
108712
  init_wrapper();
108572
- init_src();
108713
+ init_src2();
108573
108714
  var crypto3 = __toESM(require("node:crypto"));
108574
108715
  var BLOCKED_WHILE_PAUSED = /* @__PURE__ */ new Set(["Runtime.evaluate", "Runtime.callFunctionOn"]);
108575
108716
  function trimBundleQuery(url2) {
@@ -108845,12 +108986,15 @@ var CDPClient = class {
108845
108986
  const timer = setTimeout(() => {
108846
108987
  this.pendingBindings.delete(id);
108847
108988
  reject(
108848
- new FailureError(`Binding response for requestId=${id} timed out`, {
108849
- error_code: FAILURE_CODES.DEBUGGER_CDP_BINDING_TIMEOUT,
108850
- failure_stage: "debugger_cdp_binding",
108851
- failure_area: "tool_server",
108852
- error_kind: "timeout"
108853
- })
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
+ )
108854
108998
  );
108855
108999
  }, timeout);
108856
109000
  this.pendingBindings.set(id, { resolve: resolve14, reject, timer });
@@ -109011,7 +109155,7 @@ async function discoverPrimaryPage(port, signal) {
109011
109155
  );
109012
109156
  }
109013
109157
  throw new FailureError(
109014
- `Chromium CDP on port ${port} reported no page targets. Is the app started with --remote-debugging-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.`,
109015
109159
  {
109016
109160
  error_code: FAILURE_CODES.CHROMIUM_CDP_NO_PAGE_TARGET,
109017
109161
  failure_stage: "chromium_cdp_discover_page_none",
@@ -109043,16 +109187,18 @@ async function browserWebSocketUrl(port, signal) {
109043
109187
  }
109044
109188
  return url2;
109045
109189
  }
109190
+ var CDP_HTTP_TIMEOUT_MS = 5e3;
109046
109191
  async function fetchJson(url2, signal) {
109047
109192
  let res;
109048
109193
  try {
109049
- res = await fetch(url2, { signal });
109194
+ res = await fetch(url2, { signal: signal ?? AbortSignal.timeout(CDP_HTTP_TIMEOUT_MS) });
109050
109195
  } catch (err) {
109051
109196
  if (err instanceof Error && err.name === "AbortError") throw err;
109197
+ const timedOut2 = err instanceof Error && err.name === "TimeoutError";
109052
109198
  const code = err.code ?? err.cause?.code;
109053
- 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";
109054
109200
  throw new FailureError(
109055
- `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?`,
109056
109202
  {
109057
109203
  error_code: FAILURE_CODES.CHROMIUM_CDP_UNREACHABLE,
109058
109204
  failure_stage: "chromium_cdp_discovery_connect",
@@ -109206,7 +109352,7 @@ var FpsTracker = class {
109206
109352
  };
109207
109353
 
109208
109354
  // ../tool-server/src/chromium-server/input.ts
109209
- init_src();
109355
+ init_src2();
109210
109356
  function clampPx(value, max) {
109211
109357
  if (!Number.isFinite(value)) {
109212
109358
  throw new FailureError(`Chromium input: non-finite coordinate ${value}`, {
@@ -109491,7 +109637,7 @@ var ScreencastManager = class {
109491
109637
  // ../tool-server/src/chromium-server/screenshot.ts
109492
109638
  var fs18 = __toESM(require("node:fs"));
109493
109639
  var path16 = __toESM(require("node:path"));
109494
- init_src();
109640
+ init_src2();
109495
109641
  var sharpCache;
109496
109642
  var sharpLoadWarningEmitted = false;
109497
109643
  function tryLoadSharp() {
@@ -109612,7 +109758,7 @@ async function copyScreenshotToClipboard(ctx, opts = {}) {
109612
109758
  }
109613
109759
 
109614
109760
  // ../tool-server/src/chromium-server/tabs.ts
109615
- init_src();
109761
+ init_src2();
109616
109762
  function createTabsManager(deps) {
109617
109763
  const { cdp, port } = deps;
109618
109764
  const targetToTab = /* @__PURE__ */ new Map();
@@ -109880,7 +110026,7 @@ function createNetworkManager(deps) {
109880
110026
  }
109881
110027
 
109882
110028
  // ../tool-server/src/chromium-server/viewport.ts
109883
- init_src();
110029
+ init_src2();
109884
110030
  var VIEWPORT_FAILURE = {
109885
110031
  error_code: FAILURE_CODES.CHROMIUM_VIEWPORT_READ_FAILED,
109886
110032
  failure_area: "tool_server",
@@ -110210,17 +110356,17 @@ async function discoverChromiumDevices(options) {
110210
110356
  }
110211
110357
 
110212
110358
  // ../tool-server/src/utils/vega-devices.ts
110213
- init_src();
110359
+ init_src2();
110214
110360
 
110215
110361
  // ../tool-server/src/utils/vega-sdk.ts
110216
110362
  var import_promises4 = require("node:fs/promises");
110217
110363
  var import_node_fs6 = require("node:fs");
110218
110364
  var import_node_os6 = require("node:os");
110219
- var import_node_path7 = require("node:path");
110365
+ var import_node_path8 = require("node:path");
110220
110366
  var import_semver3 = __toESM(require_semver2());
110221
110367
  async function readVegaConfig() {
110222
110368
  try {
110223
- const raw = await (0, import_promises4.readFile)((0, import_node_path7.join)((0, import_node_os6.homedir)(), "vega", "config.json"), "utf-8");
110369
+ const raw = await (0, import_promises4.readFile)((0, import_node_path8.join)((0, import_node_os6.homedir)(), "vega", "config.json"), "utf-8");
110224
110370
  return JSON.parse(raw);
110225
110371
  } catch {
110226
110372
  return {};
@@ -110231,13 +110377,13 @@ function bareVersion(version3) {
110231
110377
  }
110232
110378
  function sdkComponentRoots(config2) {
110233
110379
  const roots = [
110234
- config2.sdkPath && (0, import_node_path7.join)(config2.sdkPath, "vega-sdk"),
110235
- (0, import_node_path7.join)((0, import_node_os6.homedir)(), "vega", "sdk", "vega-sdk")
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")
110236
110382
  ].filter((p) => Boolean(p));
110237
110383
  return Array.from(new Set(roots));
110238
110384
  }
110239
110385
  async function resolveVersion(channelDir, preferred) {
110240
- if (preferred && (0, import_node_fs6.existsSync)((0, import_node_path7.join)(channelDir, preferred))) return preferred;
110386
+ if (preferred && (0, import_node_fs6.existsSync)((0, import_node_path8.join)(channelDir, preferred))) return preferred;
110241
110387
  try {
110242
110388
  const versions = (await (0, import_promises4.readdir)(channelDir)).filter((e) => import_semver3.default.valid(e)).sort(import_semver3.default.rcompare);
110243
110389
  return versions[0] ?? null;
@@ -110251,10 +110397,10 @@ async function resolveVegaSdkImagesDir() {
110251
110397
  const channel = config2.defaultChannel || "main";
110252
110398
  const preferred = bareVersion(config2.defaultVersion);
110253
110399
  for (const root of sdkComponentRoots(config2)) {
110254
- const channelDir = (0, import_node_path7.join)(root, channel);
110400
+ const channelDir = (0, import_node_path8.join)(root, channel);
110255
110401
  const version3 = await resolveVersion(channelDir, preferred);
110256
110402
  if (!version3) continue;
110257
- const imagesDir = (0, import_node_path7.join)(channelDir, version3, "vvd", "images");
110403
+ const imagesDir = (0, import_node_path8.join)(channelDir, version3, "vvd", "images");
110258
110404
  if ((0, import_node_fs6.existsSync)(imagesDir)) return imagesDir;
110259
110405
  }
110260
110406
  return null;
@@ -110264,7 +110410,7 @@ async function listVvdImages() {
110264
110410
  if (!dir) return [];
110265
110411
  try {
110266
110412
  const entries = await (0, import_promises4.readdir)(dir, { withFileTypes: true });
110267
- return entries.filter((e) => e.isDirectory()).map((e) => ({ name: e.name, path: (0, import_node_path7.join)(dir, e.name) })).sort((a, b) => a.name.localeCompare(b.name));
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));
110268
110414
  } catch {
110269
110415
  return [];
110270
110416
  }
@@ -110605,7 +110751,7 @@ Booted/ready devices are listed first. Platforms whose CLI is unavailable are si
110605
110751
  };
110606
110752
 
110607
110753
  // ../tool-server/src/utils/variant-proposals.ts
110608
- init_src();
110754
+ init_src2();
110609
110755
  var MAX_COMMENT_LENGTH = 2e3;
110610
110756
  var MAX_PENDING_OUTCOMES = 32;
110611
110757
  var MAX_MATCH_VALUE_LENGTH = 200;
@@ -111081,7 +111227,7 @@ var variantProposalStore = new VariantProposalStore();
111081
111227
  // ../tool-server/src/blueprints/native-devtools.ts
111082
111228
  var net2 = __toESM(require("node:net"));
111083
111229
  var fs20 = __toESM(require("node:fs"));
111084
- init_src();
111230
+ init_src2();
111085
111231
  init_external_devices();
111086
111232
  var NATIVE_DEVTOOLS_NAMESPACE = "NativeDevtools";
111087
111233
  function isInjectableBundleId(bundleId) {
@@ -111490,7 +111636,12 @@ var nativeDevtoolsBlueprint = {
111490
111636
  resolve14();
111491
111637
  });
111492
111638
  });
111493
- await host.startProxy(udid, endpoint.port);
111639
+ try {
111640
+ await host.startProxy(udid, endpoint.port);
111641
+ } catch (err) {
111642
+ server.close();
111643
+ throw err;
111644
+ }
111494
111645
  } else {
111495
111646
  await bindNativeDevtoolsUnixSocket(server, socketPath);
111496
111647
  }
@@ -111642,7 +111793,7 @@ var nativeDevtoolsBlueprint = {
111642
111793
  };
111643
111794
 
111644
111795
  // ../tool-server/src/utils/native-target-app.ts
111645
- init_src();
111796
+ init_src2();
111646
111797
  function chooseFrontmostConnectedApp(apps) {
111647
111798
  const strongCandidates = apps.filter(
111648
111799
  (app) => app.applicationState === "active" || app.foregroundActiveSceneCount > 0
@@ -112022,12 +112173,12 @@ function unexplainedHint(hint, detail, params) {
112022
112173
  }
112023
112174
 
112024
112175
  // ../tool-server/src/tools/describe/platforms/android/index.ts
112025
- init_src();
112176
+ init_src2();
112026
112177
  init_adb();
112027
112178
  init_device_info();
112028
112179
 
112029
112180
  // ../tool-server/src/utils/android-screen.ts
112030
- init_src();
112181
+ init_src2();
112031
112182
  init_adb();
112032
112183
  async function getAndroidScreenSize(serial) {
112033
112184
  const out = await adbShell(serial, "wm size", { timeoutMs: 5e3 });
@@ -112065,7 +112216,7 @@ function orientScreenSize(size, rotation) {
112065
112216
  }
112066
112217
 
112067
112218
  // ../tool-server/src/tools/describe/platforms/android/uiautomator-parser.ts
112068
- init_src();
112219
+ init_src2();
112069
112220
  function parseUiAutomatorXml(xml) {
112070
112221
  const body = xml.replace(/^\s*<\?xml[^?]*\?>\s*/, "");
112071
112222
  const tagRe = /<(\/?)([A-Za-z_][\w.-]*)((?:"[^"]*"|'[^']*'|[^"'/<>])*?)\s*(\/?)>/gs;
@@ -112512,7 +112663,7 @@ function parseUiAutomatorDump(rawOutput, screenW, screenH, options = {}) {
112512
112663
  // ../tool-server/src/blueprints/android-devtools.ts
112513
112664
  var import_node_child_process15 = require("node:child_process");
112514
112665
  var readline2 = __toESM(require("node:readline"));
112515
- init_src();
112666
+ init_src2();
112516
112667
 
112517
112668
  // ../native-devtools-android/src/index.ts
112518
112669
  var path19 = __toESM(require("node:path"));
@@ -112852,10 +113003,6 @@ init_android_binary();
112852
113003
 
112853
113004
  // ../tool-server/src/utils/android-helper-install.ts
112854
113005
  init_adb();
112855
- var installedHelpers = /* @__PURE__ */ new Map();
112856
- function cacheKey(serial, versionCode) {
112857
- return `${serial}|${versionCode}`;
112858
- }
112859
113006
  async function probeInstalledVersion(serial, packageName) {
112860
113007
  let out;
112861
113008
  try {
@@ -112878,17 +113025,17 @@ async function probeInstalledVersion(serial, packageName) {
112878
113025
  }
112879
113026
  return { installed: false, versionCode: null };
112880
113027
  }
112881
- async function ensureAndroidDevtoolsInstalled(serial) {
113028
+ async function ensureAndroidDevtoolsInstalled(serial, options = {}) {
112882
113029
  const manifest = helperManifest();
112883
- const key2 = cacheKey(serial, manifest.versionCode);
112884
- if (installedHelpers.has(key2)) return;
112885
- const probe3 = await probeInstalledVersion(serial, manifest.packageName);
112886
- if (probe3.installed && probe3.versionCode !== null && probe3.versionCode >= manifest.versionCode) {
112887
- installedHelpers.set(key2, true);
112888
- 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
+ }
112889
113035
  }
112890
113036
  const apkPath = bundledHelperApkPath();
112891
- const args = ["-s", serial, "install", ...manifest.installFlags, apkPath];
113037
+ const flags = options.force ? [...manifest.installFlags, "-d"] : manifest.installFlags;
113038
+ const args = ["-s", serial, "install", ...flags, apkPath];
112892
113039
  try {
112893
113040
  await runAdb(args, { timeoutMs: 6e4 });
112894
113041
  } catch (err) {
@@ -112903,12 +113050,11 @@ async function ensureAndroidDevtoolsInstalled(serial) {
112903
113050
  throw err;
112904
113051
  }
112905
113052
  }
112906
- installedHelpers.set(key2, true);
112907
113053
  }
112908
113054
 
112909
113055
  // ../tool-server/src/utils/android-devtools-client.ts
112910
113056
  var net3 = __toESM(require("node:net"));
112911
- init_src();
113057
+ init_src2();
112912
113058
  var DEFAULT_RPC_TIMEOUT_MS = 5e3;
112913
113059
  var LONG_RPC_TIMEOUT_MS = 15e3;
112914
113060
  function connectAndroidDevtoolsClient(localPort, onTerminated) {
@@ -113047,14 +113193,28 @@ function androidDevtoolsRef(device) {
113047
113193
  };
113048
113194
  }
113049
113195
  var READY_TIMEOUT_MS2 = 3e4;
113196
+ var EXIT_GRACE_MS = 200;
113050
113197
  var HELPER_PORT_MARKER = /^INSTRUMENTATION_STATUS:\s*port=(\d+)/;
113051
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
+ };
113052
113212
  async function spawnHelper(serial) {
113053
113213
  const manifest = helperManifest();
113054
113214
  const adbPath = await resolveAndroidBinary("adb");
113055
113215
  if (!adbPath) {
113056
113216
  throw new FailureError(
113057
- "`adb` not found on PATH or under `$ANDROID_HOME/platform-tools` while spawning android-devtools helper.",
113217
+ "`adb` not found on PATH or under `$ANDROID_HOME/platform-tools` while spawning the argent android helper.",
113058
113218
  {
113059
113219
  error_code: FAILURE_CODES.ANDROID_DEVTOOLS_ADB_NOT_FOUND,
113060
113220
  failure_stage: "android_devtools_spawn_helper",
@@ -113073,10 +113233,13 @@ async function spawnHelper(serial) {
113073
113233
  let localPort = null;
113074
113234
  let settled = false;
113075
113235
  let stderrBuf = "";
113236
+ let statusBuf = "";
113237
+ let exitGrace;
113076
113238
  const settle = (fn, cleanup) => {
113077
113239
  if (settled) return;
113078
113240
  settled = true;
113079
113241
  clearTimeout(timer);
113242
+ clearTimeout(exitGrace);
113080
113243
  rl.close();
113081
113244
  cleanup?.();
113082
113245
  fn();
@@ -113084,6 +113247,9 @@ async function spawnHelper(serial) {
113084
113247
  const rl = readline2.createInterface({ input: proc.stdout });
113085
113248
  rl.on("line", async (rawLine) => {
113086
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
+ }
113087
113253
  const portMatch = HELPER_PORT_MARKER.exec(line);
113088
113254
  if (!portMatch || devicePort !== null) return;
113089
113255
  devicePort = parseInt(portMatch[1], 10);
@@ -113113,25 +113279,32 @@ async function spawnHelper(serial) {
113113
113279
  stderrBuf += data.toString("utf-8");
113114
113280
  if (stderrBuf.length > 4 * 1024) stderrBuf = stderrBuf.slice(-4 * 1024);
113115
113281
  });
113116
- proc.on("exit", (code, signal) => {
113117
- const detail = stderrBuf.trim() ? ` stderr=${stderrBuf.trim().slice(0, 400)}` : "";
113118
- settle(
113119
- () => reject(
113120
- new FailureError(
113121
- `am instrument exited before becoming ready (code=${code} signal=${signal}).${detail}`,
113122
- {
113123
- error_code: FAILURE_CODES.ANDROID_DEVTOOLS_HELPER_EXITED_BEFORE_READY,
113124
- failure_stage: "android_devtools_helper_ready",
113125
- failure_area: "tool_server",
113126
- error_kind: "subprocess",
113127
- failure_command: "android_devtools",
113128
- ...typeof code === "number" ? { failure_exit_code: code } : {},
113129
- ...signal === "SIGABRT" || signal === "SIGHUP" || signal === "SIGINT" || signal === "SIGKILL" || signal === "SIGQUIT" || signal === "SIGTERM" ? { failure_signal: signal } : {}
113130
- }
113131
- )
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)
113132
113299
  )
113133
113300
  );
113301
+ };
113302
+ proc.on("exit", (code, signal) => {
113303
+ exitCode = code;
113304
+ exitSignal = signal;
113305
+ exitGrace = setTimeout(() => settle(rejectExited), EXIT_GRACE_MS);
113134
113306
  });
113307
+ proc.on("close", () => settle(rejectExited));
113135
113308
  proc.on("error", (err) => {
113136
113309
  settle(
113137
113310
  () => reject(
@@ -113166,6 +113339,50 @@ async function spawnHelper(serial) {
113166
113339
  }, READY_TIMEOUT_MS2);
113167
113340
  });
113168
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
+ }
113169
113386
  async function removeAdbForward(serial, localPort) {
113170
113387
  try {
113171
113388
  await runAdb(["-s", serial, "forward", "--remove", `tcp:${localPort}`], { timeoutMs: 5e3 });
@@ -113215,8 +113432,7 @@ var androidDevtoolsBlueprint = {
113215
113432
  }
113216
113433
  const serial = device.id;
113217
113434
  const events = new TypedEventEmitter();
113218
- await ensureAndroidDevtoolsInstalled(serial);
113219
- const spawned = await spawnHelper(serial);
113435
+ const spawned = await spawnHelperWithRepair(serial);
113220
113436
  let ready2 = false;
113221
113437
  let disposed = false;
113222
113438
  let client2;
@@ -113391,9 +113607,9 @@ function hasUnreadWebView(node) {
113391
113607
  // ../tool-server/src/preview.ts
113392
113608
  function findUiFile(name) {
113393
113609
  const candidates = [
113394
- import_node_path8.default.join(__dirname, "preview-ui", name),
113395
- import_node_path8.default.resolve(__dirname, "..", "..", "..", "ui", name),
113396
- import_node_path8.default.resolve(__dirname, "..", "..", "ui", name)
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)
113397
113613
  ];
113398
113614
  for (const p of candidates) {
113399
113615
  if (import_node_fs8.default.existsSync(p)) return p;
@@ -113402,7 +113618,7 @@ function findUiFile(name) {
113402
113618
  }
113403
113619
  function serveUiFile(res, filePath, contentType) {
113404
113620
  res.set("Cache-Control", "no-store, must-revalidate");
113405
- res.type(contentType).sendFile(import_node_path8.default.basename(filePath), { root: import_node_path8.default.dirname(filePath) });
113621
+ res.type(contentType).sendFile(import_node_path9.default.basename(filePath), { root: import_node_path9.default.dirname(filePath) });
113406
113622
  }
113407
113623
  function wsUrlFromHttp(httpUrl2) {
113408
113624
  const u = new URL(httpUrl2);
@@ -113746,9 +113962,9 @@ data: ${JSON.stringify(data)}
113746
113962
  return;
113747
113963
  }
113748
113964
  const contained = allowedRoots.some(
113749
- (root) => real === root || real.startsWith(root + import_node_path8.default.sep)
113965
+ (root) => real === root || real.startsWith(root + import_node_path9.default.sep)
113750
113966
  );
113751
- const mime = IMG_MIME[import_node_path8.default.extname(real).toLowerCase()];
113967
+ const mime = IMG_MIME[import_node_path9.default.extname(real).toLowerCase()];
113752
113968
  if (!contained || !mime || size > MAX_PREVIEW_BYTES) {
113753
113969
  res.status(404).end();
113754
113970
  return;
@@ -113814,13 +114030,13 @@ var import_node_child_process17 = require("node:child_process");
113814
114030
  // ../archive/src/index.ts
113815
114031
  var import_node_child_process16 = require("node:child_process");
113816
114032
  var import_promises6 = require("node:fs/promises");
113817
- var import_node_path9 = require("node:path");
114033
+ var import_node_path10 = require("node:path");
113818
114034
  var import_node_util13 = require("node:util");
113819
114035
  var execFileAsync13 = (0, import_node_util13.promisify)(import_node_child_process16.execFile);
113820
114036
  var ArchiveError = class extends Error {
113821
114037
  };
113822
114038
  function createTarGzArgs(sourcePath, target) {
113823
- return ["-czf", target, "-C", (0, import_node_path9.dirname)(sourcePath), (0, import_node_path9.basename)(sourcePath)];
114039
+ return ["-czf", target, "-C", (0, import_node_path10.dirname)(sourcePath), (0, import_node_path10.basename)(sourcePath)];
113824
114040
  }
113825
114041
  function normalizeTarMemberPath(memberPath2) {
113826
114042
  return memberPath2.replace(/^\.\//, "").replace(/\\/g, "/");
@@ -113829,13 +114045,13 @@ function isSafeTarMember(memberPath2, destDir) {
113829
114045
  const normalized = normalizeTarMemberPath(memberPath2);
113830
114046
  if (!normalized || normalized === "." || normalized === "./") return false;
113831
114047
  if (normalized.startsWith("/") || /^[A-Za-z]:[\\/]/.test(normalized)) return false;
113832
- const relative5 = import_node_path9.posix.normalize(normalized);
114048
+ const relative5 = import_node_path10.posix.normalize(normalized);
113833
114049
  if (relative5 === ".." || relative5.startsWith("../") || relative5.split("/").includes("..")) {
113834
114050
  return false;
113835
114051
  }
113836
- const root = (0, import_node_path9.resolve)(destDir);
113837
- const resolved = (0, import_node_path9.resolve)(destDir, relative5);
113838
- return resolved === root || resolved.startsWith(root + import_node_path9.sep);
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);
113839
114055
  }
113840
114056
  async function listTarMembers(tarPath) {
113841
114057
  const { stdout } = await execFileAsync13("tar", ["-tzf", tarPath]);
@@ -113843,7 +114059,7 @@ async function listTarMembers(tarPath) {
113843
114059
  }
113844
114060
  function isEscapingLinkTarget(target) {
113845
114061
  if (target.startsWith("/") || /^[A-Za-z]:[\\/]/.test(target)) return true;
113846
- return import_node_path9.posix.normalize(target.replace(/\\/g, "/")).split("/").includes("..");
114062
+ return import_node_path10.posix.normalize(target.replace(/\\/g, "/")).split("/").includes("..");
113847
114063
  }
113848
114064
  async function assertSafeMemberTypes(tarPath) {
113849
114065
  const { stdout } = await execFileAsync13("tar", ["-tzvf", tarPath]);
@@ -113888,7 +114104,7 @@ async function assertSafeArchive(tarPath, destDir) {
113888
114104
  async function resolveMember(destDir, expectedName) {
113889
114105
  const entries = await (0, import_promises6.readdir)(destDir);
113890
114106
  if (entries.includes(expectedName)) {
113891
- return (0, import_node_path9.join)(destDir, expectedName);
114107
+ return (0, import_node_path10.join)(destDir, expectedName);
113892
114108
  }
113893
114109
  const real = entries.filter((e) => !e.startsWith("._"));
113894
114110
  if (real.length !== 1) {
@@ -113896,7 +114112,7 @@ async function resolveMember(destDir, expectedName) {
113896
114112
  `Could not identify the extracted member (expected "${expectedName}", found ${real.length} entries).`
113897
114113
  );
113898
114114
  }
113899
- return (0, import_node_path9.join)(destDir, real[0]);
114115
+ return (0, import_node_path10.join)(destDir, real[0]);
113900
114116
  }
113901
114117
  async function safeExtractTarGz(tarPath, destDir, expectedName) {
113902
114118
  await assertSafeArchive(tarPath, destDir);
@@ -113905,7 +114121,7 @@ async function safeExtractTarGz(tarPath, destDir, expectedName) {
113905
114121
  }
113906
114122
 
113907
114123
  // ../tool-server/src/artifacts.ts
113908
- init_src();
114124
+ init_src2();
113909
114125
  function requireArtifacts(ctx) {
113910
114126
  if (!ctx?.artifacts) {
113911
114127
  throw new Error(
@@ -113973,9 +114189,9 @@ function streamDirectoryAsTarGz(id, entry, res) {
113973
114189
  // ../tool-server/src/file-inputs.ts
113974
114190
  var import_promises8 = require("node:fs/promises");
113975
114191
  var import_node_os8 = require("node:os");
113976
- var import_node_path10 = require("node:path");
114192
+ var import_node_path11 = require("node:path");
113977
114193
  var import_bytes = __toESM(require_bytes());
113978
- init_src();
114194
+ init_src2();
113979
114195
  var MAX_UPLOAD_BYTES = 32 * 1024 * 1024;
113980
114196
  var FileInputError = class extends Error {
113981
114197
  };
@@ -114022,8 +114238,8 @@ async function materializeUpload(wire) {
114022
114238
  `Uploaded content for "${wire.path}" is ${data.length} bytes but the client recorded ${wire.size} \u2014 refusing a truncated or corrupted upload.`
114023
114239
  );
114024
114240
  }
114025
- const dir = await (0, import_promises8.mkdtemp)((0, import_node_path10.join)((0, import_node_os8.tmpdir)(), "argent-file-input-"));
114026
- const filePath = (0, import_node_path10.join)(dir, sanitizeFilename((0, import_node_path10.basename)(wire.path)));
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)));
114027
114243
  await (0, import_promises8.writeFile)(filePath, data);
114028
114244
  return { filePath, dir };
114029
114245
  }
@@ -114046,10 +114262,10 @@ async function extractTarUpload(wire, uploadId, meta3, tempDirs, lookupUpload) {
114046
114262
  );
114047
114263
  }
114048
114264
  const extractDir = await (0, import_promises8.mkdtemp)(
114049
- (0, import_node_path10.join)((0, import_node_os8.tmpdir)(), `argent-tar-upload-${entry.sha256.slice(0, 16)}-`)
114265
+ (0, import_node_path11.join)((0, import_node_os8.tmpdir)(), `argent-tar-upload-${entry.sha256.slice(0, 16)}-`)
114050
114266
  );
114051
114267
  tempDirs.push(extractDir);
114052
- const uploaded = await safeExtractTarGz(entry.tarPath, extractDir, (0, import_node_path10.basename)(wire.path));
114268
+ const uploaded = await safeExtractTarGz(entry.tarPath, extractDir, (0, import_node_path11.basename)(wire.path));
114053
114269
  return { value: uploaded, meta: { ...meta3, viaUpload: true } };
114054
114270
  } catch (err) {
114055
114271
  if (err instanceof FileInputError) throw err;
@@ -114699,7 +114915,7 @@ function createHttpApp(registry2, options) {
114699
114915
  return;
114700
114916
  }
114701
114917
  const id = (0, import_node_crypto8.randomUUID)();
114702
- const tarPath = (0, import_node_path11.join)((0, import_node_os9.tmpdir)(), `argent-upload-${id}.tar.gz`);
114918
+ const tarPath = (0, import_node_path12.join)((0, import_node_os9.tmpdir)(), `argent-upload-${id}.tar.gz`);
114703
114919
  const ws = (0, import_node_fs10.createWriteStream)(tarPath);
114704
114920
  let received = 0;
114705
114921
  let released = false;
@@ -115103,12 +115319,12 @@ function createHttpApp(registry2, options) {
115103
115319
  // ../tool-server/src/event-log.ts
115104
115320
  var import_bunyan = __toESM(require_bunyan());
115105
115321
  var import_node_fs11 = require("node:fs");
115106
- var import_node_path12 = require("node:path");
115107
- init_src();
115322
+ var import_node_path13 = require("node:path");
115323
+ init_src2();
115108
115324
  function createToolServerEventLog({
115109
115325
  filePath
115110
115326
  }) {
115111
- (0, import_node_fs11.mkdirSync)((0, import_node_path12.dirname)(filePath), { recursive: true });
115327
+ (0, import_node_fs11.mkdirSync)((0, import_node_path13.dirname)(filePath), { recursive: true });
115112
115328
  (0, import_node_fs11.writeFileSync)(filePath, "");
115113
115329
  const fileStream = (0, import_node_fs11.createWriteStream)(filePath, { flags: "a" });
115114
115330
  let disposed = false;
@@ -115256,10 +115472,11 @@ function attachRegistryEventLogger(registry2, eventLog) {
115256
115472
  }
115257
115473
 
115258
115474
  // ../tool-server/src/utils/setup-registry.ts
115475
+ init_src2();
115259
115476
  init_src();
115260
115477
 
115261
115478
  // ../tool-server/src/blueprints/ios-device-runner.ts
115262
- init_src();
115479
+ init_src2();
115263
115480
 
115264
115481
  // ../tool-server/src/utils/ios-device/runner-artifact.ts
115265
115482
  var import_node_child_process18 = require("node:child_process");
@@ -115269,7 +115486,7 @@ var fs23 = __toESM(require("node:fs"));
115269
115486
  var fsp = __toESM(require("node:fs/promises"));
115270
115487
  var os10 = __toESM(require("node:os"));
115271
115488
  var path21 = __toESM(require("node:path"));
115272
- init_src();
115489
+ init_src2();
115273
115490
 
115274
115491
  // ../tool-server/src/utils/keyed-lock.ts
115275
115492
  async function withKeyedLock(locks, key2, fn) {
@@ -115285,7 +115502,7 @@ async function withKeyedLock(locks, key2, fn) {
115285
115502
  }
115286
115503
 
115287
115504
  // ../tool-server/src/utils/ios-device/runner-signing.ts
115288
- init_src();
115505
+ init_src2();
115289
115506
  function signingTeamError(message) {
115290
115507
  return withFailureSignal(new Error(message), {
115291
115508
  error_code: FAILURE_CODES.IOS_DEVICE_RUNNER_NOT_READY,
@@ -115483,13 +115700,13 @@ async function ensureRunnerArtifact(config2, opts = {}) {
115483
115700
  xcodeVersionFingerprint()
115484
115701
  ]);
115485
115702
  const staticArgs = runnerBuildStaticArgs(projectPath, config2);
115486
- const cacheKey3 = computeRunnerCacheKey(sourcesHash, xcodeVersion, staticArgs);
115703
+ const cacheKey2 = computeRunnerCacheKey(sourcesHash, xcodeVersion, staticArgs);
115487
115704
  const derivedDataPath = derivedDir();
115488
115705
  const build = opts.build ?? buildRunnerArtifact;
115489
115706
  return withRunnerBuildLock(async () => {
115490
115707
  const stampPath = path21.join(derivedDataPath, CACHE_KEY_FILE);
115491
115708
  const stamped = await fsp.readFile(stampPath, "utf8").catch(() => null);
115492
- if (!opts.force && stamped === cacheKey3) {
115709
+ if (!opts.force && stamped === cacheKey2) {
115493
115710
  const cached3 = findBaseXctestrun(derivedDataPath);
115494
115711
  const expiresAt = await readRunnerExpiryDate(derivedDataPath);
115495
115712
  const needsRenew = expiresAt !== null && profileNeedsRenewal(expiresAt, /* @__PURE__ */ new Date());
@@ -115501,14 +115718,14 @@ async function ensureRunnerArtifact(config2, opts = {}) {
115501
115718
  };
115502
115719
  }
115503
115720
  }
115504
- if (stamped !== cacheKey3) {
115721
+ if (stamped !== cacheKey2) {
115505
115722
  await fsp.rm(derivedDataPath, {
115506
115723
  recursive: true,
115507
115724
  force: true
115508
115725
  });
115509
115726
  }
115510
115727
  const built = await build(derivedDataPath, staticArgs, opts.destinationUdid);
115511
- await fsp.writeFile(stampPath, cacheKey3);
115728
+ await fsp.writeFile(stampPath, cacheKey2);
115512
115729
  return built;
115513
115730
  });
115514
115731
  }
@@ -115578,7 +115795,7 @@ var fs24 = __toESM(require("node:fs"));
115578
115795
  var fsp2 = __toESM(require("node:fs/promises"));
115579
115796
  var os11 = __toESM(require("node:os"));
115580
115797
  var path22 = __toESM(require("node:path"));
115581
- init_src();
115798
+ init_src2();
115582
115799
 
115583
115800
  // ../tool-server/src/utils/process-kill.ts
115584
115801
  function signalGroup(pid, signal) {
@@ -116162,7 +116379,7 @@ async function readRunnerCrashSummary(resultBundlePath) {
116162
116379
 
116163
116380
  // ../tool-server/src/utils/ios-device/runner-client.ts
116164
116381
  var import_node_crypto10 = require("node:crypto");
116165
- init_src();
116382
+ init_src2();
116166
116383
  var RUNNER_COMMAND_TIMEOUT_MS = 45e3;
116167
116384
  var RUNNER_STATUS_RECOVERY_TIMEOUT_MS = 3e3;
116168
116385
  var RUNNER_READY_POLL_INTERVAL_MS = 250;
@@ -116652,7 +116869,7 @@ var iosDeviceRunnerBlueprint = {
116652
116869
  // ../tool-server/src/blueprints/chromium-js-runtime-debugger.ts
116653
116870
  init_wrapper();
116654
116871
  var http2 = __toESM(require("node:http"));
116655
- init_src();
116872
+ init_src2();
116656
116873
 
116657
116874
  // ../tool-server/src/utils/debugger/source-maps.ts
116658
116875
  var ALLOWED_SOURCE_MAP_HOSTS = /* @__PURE__ */ new Set(["localhost", "127.0.0.1", "::1"]);
@@ -116725,18 +116942,10 @@ var os12 = __toESM(require("node:os"));
116725
116942
  var MAX_ENTRIES = 5e4;
116726
116943
  var CLUSTER_KEY_LENGTH = 80;
116727
116944
  var SOURCE_EXT = /\.(tsx?|jsx?|mjs|cjs)$/;
116728
- var LEVEL_DISPLAY = {
116729
- log: "LOG ",
116730
- warn: "WARN ",
116731
- error: "ERROR",
116732
- info: "INFO ",
116733
- debug: "DEBUG"
116734
- };
116735
116945
  var LINE_RE = /^\[L:(\d+)\] (\S+) (\S+)\s+(\S+) \| (.*)$/;
116736
116946
  var LogFileWriter = class {
116737
116947
  filePath;
116738
116948
  fd = null;
116739
- writeBuffer = [];
116740
116949
  bytesWritten = 0;
116741
116950
  entryCount = 0;
116742
116951
  levelCounts = {};
@@ -116754,18 +116963,9 @@ var LogFileWriter = class {
116754
116963
  try {
116755
116964
  this.fd = fs27.openSync(this.filePath, "w");
116756
116965
  this.ready = true;
116757
- this.flushBuffer();
116758
116966
  } catch {
116759
116967
  }
116760
116968
  }
116761
- flushBuffer() {
116762
- if (!this.ready || this.fd === null) return;
116763
- for (const line of this.writeBuffer) {
116764
- const buf = Buffer.from(line);
116765
- fs27.writeSync(this.fd, buf);
116766
- }
116767
- this.writeBuffer = [];
116768
- }
116769
116969
  write(entry) {
116770
116970
  if (this.closed) throw new Error("LogFileWriter is closed");
116771
116971
  if (this.entryCount >= MAX_ENTRIES) {
@@ -116780,14 +116980,12 @@ var LogFileWriter = class {
116780
116980
  const sourceFile = sourceUrl ? cleanSourceUrl(sourceUrl) ?? void 0 : void 0;
116781
116981
  const source = sourceFile !== void 0 && sourceLine !== void 0 ? `${sourceFile}:${sourceLine}` : "-";
116782
116982
  const flatMessage = entry.message.replace(/\n/g, " ");
116783
- const levelDisplay = LEVEL_DISPLAY[entry.level] ?? entry.level.toUpperCase().padEnd(5);
116983
+ const levelDisplay = entry.level.toUpperCase().padEnd(5);
116784
116984
  const line = `[L:${entry.id}] ${entry.timestamp} ${levelDisplay} ${source} | ${flatMessage}
116785
116985
  `;
116786
116986
  if (this.ready && this.fd !== null) {
116787
116987
  const buf = Buffer.from(line);
116788
116988
  fs27.writeSync(this.fd, buf);
116789
- } else {
116790
- this.writeBuffer.push(line);
116791
116989
  }
116792
116990
  this.bytesWritten += Buffer.byteLength(line);
116793
116991
  this.entryCount++;
@@ -116835,7 +117033,6 @@ var LogFileWriter = class {
116835
117033
  }
116836
117034
  readAll() {
116837
117035
  if (this.closed || !this.ready) return [];
116838
- this.flushBuffer();
116839
117036
  try {
116840
117037
  const content = fs27.readFileSync(this.filePath, "utf-8");
116841
117038
  return content.split("\n").filter((line) => line.length > 0).map(parseFlatLine).filter((entry) => entry !== null);
@@ -117101,7 +117298,7 @@ var chromiumJsRuntimeDebuggerBlueprint = {
117101
117298
  var net5 = __toESM(require("node:net"));
117102
117299
  var fs28 = __toESM(require("node:fs"));
117103
117300
  var import_node_child_process22 = require("node:child_process");
117104
- init_src();
117301
+ init_src2();
117105
117302
  var TV_CONTROL_NAMESPACE = "TvControl";
117106
117303
  function tvControlRef(device) {
117107
117304
  return {
@@ -117431,11 +117628,11 @@ var tvControlBlueprint = {
117431
117628
  };
117432
117629
 
117433
117630
  // ../tool-server/src/blueprints/android-tv-control.ts
117434
- init_src();
117631
+ init_src2();
117435
117632
  init_adb();
117436
117633
 
117437
117634
  // ../tool-server/src/utils/android-input.ts
117438
- init_src();
117635
+ init_src2();
117439
117636
  init_adb();
117440
117637
  var ANDROID_NAMED_KEYCODES = {
117441
117638
  "enter": 66,
@@ -117841,7 +118038,7 @@ Fails if the simulator server is not running for the given UDID.`,
117841
118038
 
117842
118039
  // ../tool-server/src/tools/native-devtools/native-network-logs.ts
117843
118040
  init_zod();
117844
- init_src();
118041
+ init_src2();
117845
118042
  init_device_info();
117846
118043
  var zodSchema3 = external_exports.object({
117847
118044
  udid: external_exports.string().describe("Simulator UDID"),
@@ -117893,7 +118090,7 @@ A not-running app comes back as one of those statuses rather than a failure. An
117893
118090
 
117894
118091
  // ../tool-server/src/tools/native-devtools/native-find-views.ts
117895
118092
  init_zod();
117896
- init_src();
118093
+ init_src2();
117897
118094
  init_device_info();
117898
118095
  var zodSchema4 = external_exports.object({
117899
118096
  udid: external_exports.string().describe("Simulator UDID"),
@@ -118023,7 +118220,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
118023
118220
 
118024
118221
  // ../tool-server/src/tools/native-devtools/native-describe-screen.ts
118025
118222
  init_zod();
118026
- init_src();
118223
+ init_src2();
118027
118224
  init_device_info();
118028
118225
  var zodSchema6 = external_exports.object({
118029
118226
  udid: external_exports.string().describe("Simulator UDID"),
@@ -118094,7 +118291,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
118094
118291
 
118095
118292
  // ../tool-server/src/tools/native-devtools/native-view-at-point.ts
118096
118293
  init_zod();
118097
- init_src();
118294
+ init_src2();
118098
118295
  init_device_info();
118099
118296
  var zodSchema7 = external_exports.object({
118100
118297
  udid: external_exports.string().describe("Simulator UDID"),
@@ -118180,7 +118377,7 @@ A not-connected or not-running app comes back as one of those statuses rather th
118180
118377
 
118181
118378
  // ../tool-server/src/tools/native-devtools/native-user-interactable-view-at-point.ts
118182
118379
  init_zod();
118183
- init_src();
118380
+ init_src2();
118184
118381
  init_device_info();
118185
118382
  var zodSchema8 = external_exports.object({
118186
118383
  udid: external_exports.string().describe("Simulator UDID"),
@@ -118265,10 +118462,10 @@ A not-connected or not-running app comes back as one of those statuses rather th
118265
118462
  };
118266
118463
 
118267
118464
  // ../tool-server/src/blueprints/js-runtime-debugger.ts
118268
- init_src();
118465
+ init_src2();
118269
118466
 
118270
118467
  // ../tool-server/src/utils/debugger/discovery.ts
118271
- init_src();
118468
+ init_src2();
118272
118469
  var DECOY_VM = "don't use";
118273
118470
  async function discoverMetro(port) {
118274
118471
  let statusRes;
@@ -118365,7 +118562,7 @@ init_device_info();
118365
118562
  init_external_devices();
118366
118563
 
118367
118564
  // ../tool-server/src/utils/debugger/target-selection.ts
118368
- init_src();
118565
+ init_src2();
118369
118566
  function deviceKey(target) {
118370
118567
  const logicalId = target.reactNative?.logicalDeviceId;
118371
118568
  if (logicalId) return logicalId;
@@ -118916,7 +119113,7 @@ var jsRuntimeDebuggerBlueprint = {
118916
119113
  };
118917
119114
 
118918
119115
  // ../tool-server/src/blueprints/network-inspector.ts
118919
- init_src();
119116
+ init_src2();
118920
119117
 
118921
119118
  // ../tool-server/src/utils/debugger/scripts/network-interceptor.ts
118922
119119
  var NETWORK_INTERCEPTOR_SCRIPT = `(function() {
@@ -119146,7 +119343,7 @@ var networkInspectorBlueprint = {
119146
119343
  };
119147
119344
 
119148
119345
  // ../tool-server/src/blueprints/react-profiler-session.ts
119149
- init_src();
119346
+ init_src2();
119150
119347
  init_external_devices();
119151
119348
 
119152
119349
  // ../tool-server/src/utils/react-profiler/scripts.ts
@@ -119827,33 +120024,34 @@ var reactProfilerSessionBlueprint = {
119827
120024
  }
119828
120025
  };
119829
120026
  var profilerPathsCache = /* @__PURE__ */ new Map();
119830
- function cacheKey2(port, deviceId) {
120027
+ function cacheKey(port, deviceId) {
119831
120028
  return `${port}:${deviceId}`;
119832
120029
  }
119833
120030
  function cacheProfilerPaths(port, paths, deviceId) {
119834
- profilerPathsCache.set(cacheKey2(port, deviceId), paths);
120031
+ profilerPathsCache.set(cacheKey(port, deviceId), paths);
119835
120032
  }
119836
120033
  function getCachedProfilerPaths(port, deviceId) {
119837
- return profilerPathsCache.get(cacheKey2(port, deviceId));
120034
+ return profilerPathsCache.get(cacheKey(port, deviceId));
119838
120035
  }
119839
120036
  function clearCachedProfilerPaths(port, deviceId) {
119840
- profilerPathsCache.delete(cacheKey2(port, deviceId));
120037
+ profilerPathsCache.delete(cacheKey(port, deviceId));
119841
120038
  }
119842
120039
 
119843
120040
  // ../tool-server/src/tools/devices/boot-device.ts
119844
- var import_node_child_process24 = require("node:child_process");
120041
+ var import_node_child_process25 = require("node:child_process");
119845
120042
  var import_node_fs12 = require("node:fs");
119846
120043
  var import_node_os11 = require("node:os");
119847
- var import_node_path14 = require("node:path");
119848
- var import_node_util17 = require("node:util");
120044
+ var import_node_path15 = require("node:path");
120045
+ var import_node_util18 = require("node:util");
119849
120046
  init_zod();
119850
120047
  init_src();
120048
+ init_src2();
119851
120049
  init_adb();
119852
120050
 
119853
120051
  // ../tool-server/src/utils/linux-preflight.ts
119854
120052
  var fs30 = __toESM(require("node:fs"));
119855
120053
  var import_node_os10 = require("node:os");
119856
- var import_node_path13 = require("node:path");
120054
+ var import_node_path14 = require("node:path");
119857
120055
  var import_ini2 = __toESM(require_ini());
119858
120056
  function linuxBootDiagnostics(avdName) {
119859
120057
  if (process.platform !== "linux") return null;
@@ -119881,7 +120079,7 @@ function checkKvm() {
119881
120079
  var MIN_RAM_MB = 4096;
119882
120080
  var MIN_HEAP_MB = 512;
119883
120081
  function checkAvdSizing(avdName) {
119884
- const configPath = (0, import_node_path13.join)((0, import_node_os10.homedir)(), ".android", "avd", `${avdName}.avd`, "config.ini");
120082
+ const configPath = (0, import_node_path14.join)((0, import_node_os10.homedir)(), ".android", "avd", `${avdName}.avd`, "config.ini");
119885
120083
  let content;
119886
120084
  try {
119887
120085
  content = fs30.readFileSync(configPath, "utf8");
@@ -119930,8 +120128,41 @@ function androidHeadlessFromEnv() {
119930
120128
  init_device_info();
119931
120129
  init_external_devices();
119932
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
+
119933
120164
  // ../tool-server/src/utils/vega-vvd.ts
119934
- init_src();
120165
+ init_src2();
119935
120166
  init_adb();
119936
120167
  var MultipleVegaDevicesError = class extends FailureError {
119937
120168
  constructor(consolePorts) {
@@ -120060,10 +120291,10 @@ async function waitForVvdRunning(timeoutMs) {
120060
120291
  }
120061
120292
 
120062
120293
  // ../tool-server/src/tools/devices/boot-electron.ts
120063
- var import_node_child_process23 = require("node:child_process");
120294
+ var import_node_child_process24 = require("node:child_process");
120064
120295
  var fs31 = __toESM(require("node:fs"));
120065
120296
  var path26 = __toESM(require("node:path"));
120066
- init_src();
120297
+ init_src2();
120067
120298
  init_device_info();
120068
120299
 
120069
120300
  // ../tool-server/src/utils/electron-env.ts
@@ -120256,9 +120487,12 @@ async function bootElectronApp(options) {
120256
120487
  ];
120257
120488
  let child;
120258
120489
  try {
120259
- child = (0, import_node_child_process23.spawn)(launcher.command, args, {
120490
+ child = (0, import_node_child_process24.spawn)(launcher.command, args, {
120260
120491
  detached: true,
120261
- stdio: ["ignore", "pipe", "pipe"],
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"],
120262
120496
  // Strip ELECTRON_RUN_AS_NODE (see electronGuiChildEnv): inherited from an
120263
120497
  // Electron-based MCP host it would boot the binary in Node mode with no
120264
120498
  // CDP endpoint, failing boot-device instead of bringing the app up.
@@ -120375,7 +120609,7 @@ async function bootElectronApp(options) {
120375
120609
  }
120376
120610
 
120377
120611
  // ../tool-server/src/tools/devices/boot-device.ts
120378
- var execFileAsync17 = (0, import_node_util17.promisify)(import_node_child_process24.execFile);
120612
+ var execFileAsync18 = (0, import_node_util18.promisify)(import_node_child_process25.execFile);
120379
120613
  var zodSchema9 = external_exports.object({
120380
120614
  udid: external_exports.string().optional().describe(
120381
120615
  "iOS: simulator UDID to boot (from `list-devices`). Provide exactly one of `udid`, `avdName`, `vvdImage`, or `electronAppPath`."
@@ -120579,7 +120813,7 @@ async function bootIos(udid, registry2, force, headless) {
120579
120813
  const deviceSet = await deviceSetForUdid(udid);
120580
120814
  const prefix = simctlPrefix(deviceSet);
120581
120815
  if (force && simState === "Booted") {
120582
- await execFileAsync17("xcrun", [...prefix, "shutdown", udid]);
120816
+ await execFileAsync18("xcrun", [...prefix, "shutdown", udid]);
120583
120817
  }
120584
120818
  const needsPreBoot = simState === "Shutdown" || force && simState === "Booted";
120585
120819
  if (needsPreBoot) {
@@ -120590,13 +120824,15 @@ async function bootIos(udid, registry2, force, headless) {
120590
120824
  );
120591
120825
  });
120592
120826
  }
120593
- await execFileAsync17("xcrun", [...prefix, "boot", udid]).catch((err) => {
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) => {
120594
120830
  const message = err instanceof Error ? err.message : String(err);
120595
120831
  if (!message.includes("Unable to boot device in current state: Booted")) {
120596
120832
  throw err;
120597
120833
  }
120598
120834
  });
120599
- await execFileAsync17("xcrun", [...prefix, "bootstatus", udid, "-b"]);
120835
+ await execFileAsync18("xcrun", [...prefix, "bootstatus", udid, "-b"]);
120600
120836
  if (isTvOs && needsPreBoot) {
120601
120837
  await registry2.disposeService(`${TV_CONTROL_NAMESPACE}:${udid}`).catch((err) => {
120602
120838
  if (err instanceof ServiceNotFoundError) return;
@@ -120615,6 +120851,7 @@ async function bootIos(udid, registry2, force, headless) {
120615
120851
  });
120616
120852
  }
120617
120853
  await ensureAutomationEnabled(udid).catch(() => void 0);
120854
+ await hidWarmUp;
120618
120855
  const ndRef = nativeDevtoolsRef({ id: udid, platform: "ios", kind: "simulator" });
120619
120856
  const ndApi = await registry2.resolveService(ndRef.urn, ndRef.options);
120620
120857
  await ndApi.reverifyEnv().catch(() => {
@@ -120624,7 +120861,7 @@ async function bootIos(udid, registry2, force, headless) {
120624
120861
  return buildInitFailedResult(udid, initFailure);
120625
120862
  }
120626
120863
  if (!deviceSet) {
120627
- await execFileAsync17("defaults", [
120864
+ await execFileAsync18("defaults", [
120628
120865
  "write",
120629
120866
  "com.apple.iphonesimulator",
120630
120867
  "CurrentDeviceUDID",
@@ -120633,7 +120870,7 @@ async function bootIos(udid, registry2, force, headless) {
120633
120870
  });
120634
120871
  }
120635
120872
  if (!headless && !iosHeadlessFromEnv() && !deviceSet) {
120636
- await execFileAsync17("open", ["-a", "Simulator.app"]).catch(() => execFileAsync17("open", ["-b", "com.apple.dt.Devices"])).catch(() => {
120873
+ await execFileAsync18("open", ["-a", "Simulator.app"]).catch(() => execFileAsync18("open", ["-b", "com.apple.dt.Devices"])).catch(() => {
120637
120874
  });
120638
120875
  }
120639
120876
  return { platform: "ios", udid, booted: true };
@@ -120676,11 +120913,11 @@ async function attemptBoot(params) {
120676
120913
  let stdio = "ignore";
120677
120914
  if (process.platform === "win32") {
120678
120915
  const safeName = params.avdName.replace(/[^\w.-]/g, "_");
120679
- const logPath = (0, import_node_path14.join)((0, import_node_os11.tmpdir)(), `argent-emulator-${safeName}.log`);
120916
+ const logPath = (0, import_node_path15.join)((0, import_node_os11.tmpdir)(), `argent-emulator-${safeName}.log`);
120680
120917
  emulatorLogFd = (0, import_node_fs12.openSync)(logPath, "w");
120681
120918
  stdio = ["ignore", emulatorLogFd, emulatorLogFd];
120682
120919
  }
120683
- const child = (0, import_node_child_process24.spawn)(params.emulatorBinary, params.emulatorArgs, {
120920
+ const child = (0, import_node_child_process25.spawn)(params.emulatorBinary, params.emulatorArgs, {
120684
120921
  detached: true,
120685
120922
  stdio
120686
120923
  });
@@ -121300,12 +121537,16 @@ function dispatchByPlatform(opts) {
121300
121537
  };
121301
121538
  }
121302
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
+
121303
121544
  // ../tool-server/src/tools/launch-app/platforms/ios.ts
121304
- var import_node_child_process25 = require("node:child_process");
121305
- var import_node_util18 = require("node:util");
121306
- init_src();
121545
+ var import_node_child_process26 = require("node:child_process");
121546
+ var import_node_util19 = require("node:util");
121547
+ init_src2();
121307
121548
  init_external_devices();
121308
- var execFileAsync18 = (0, import_node_util18.promisify)(import_node_child_process25.execFile);
121549
+ var execFileAsync19 = (0, import_node_util19.promisify)(import_node_child_process26.execFile);
121309
121550
  function makeIosImpl(registry2) {
121310
121551
  return {
121311
121552
  requires: ["xcrun"],
@@ -121320,7 +121561,7 @@ function makeIosImpl(registry2) {
121320
121561
  if (blocked) return blocked;
121321
121562
  }
121322
121563
  try {
121323
- await execFileAsync18(
121564
+ await execFileAsync19(
121324
121565
  "xcrun",
121325
121566
  await simctlArgsForUdid(params.udid, ["launch", params.udid, params.bundleId])
121326
121567
  );
@@ -121343,7 +121584,7 @@ function makeIosImpl(registry2) {
121343
121584
  }
121344
121585
 
121345
121586
  // ../tool-server/src/utils/ios-device/app-session.ts
121346
- init_src();
121587
+ init_src2();
121347
121588
  var currentAppByUdid = /* @__PURE__ */ new Map();
121348
121589
  var SESSION_ONLY_SYSTEM_UI_BUNDLE_IDS = /* @__PURE__ */ new Set(["com.apple.springboard", "com.apple.Spotlight"]);
121349
121590
  function isSessionOnlySystemUi(bundleId) {
@@ -121416,7 +121657,7 @@ var remoteSimctl = {
121416
121657
  };
121417
121658
 
121418
121659
  // ../tool-server/src/tools/launch-app/platforms/shared.ts
121419
- init_src();
121660
+ init_src2();
121420
121661
  function buildIosLaunchHandler(backend) {
121421
121662
  return async (services, params) => {
121422
121663
  const blocked = await precheckNativeDevtools(services.nativeDevtools, params.udid);
@@ -121447,7 +121688,7 @@ var iosRemoteImpl = {
121447
121688
  };
121448
121689
 
121449
121690
  // ../tool-server/src/tools/launch-app/platforms/android.ts
121450
- init_src();
121691
+ init_src2();
121451
121692
  init_adb();
121452
121693
  function assertAmStartOk(out) {
121453
121694
  if (!/Status:\s*ok/i.test(out)) {
@@ -121549,12 +121790,11 @@ var vegaImpl = {
121549
121790
  };
121550
121791
 
121551
121792
  // ../tool-server/src/tools/launch-app/index.ts
121552
- var BUNDLE_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9._-]*$/;
121553
121793
  var ACTIVITY_PATTERN = /^[A-Za-z_.][A-Za-z0-9._/-]*$/;
121554
121794
  var zodSchema10 = external_exports.object({
121555
121795
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
121556
- bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, "bundleId may only contain letters, digits, '.', '_' and '-'").describe(
121557
- "App identifier. iOS: bundle id (e.g. com.apple.MobileSMS). Android: package name from build.gradle `applicationId` (e.g. com.android.settings). Chromium: arbitrary tag; the call is a no-op since the renderer is already running."
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."
121558
121798
  ),
121559
121799
  activity: external_exports.string().regex(ACTIVITY_PATTERN, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
121560
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."
@@ -121613,11 +121853,11 @@ init_zod();
121613
121853
  init_device_info();
121614
121854
 
121615
121855
  // ../tool-server/src/tools/restart-app/platforms/ios.ts
121616
- var import_node_child_process26 = require("node:child_process");
121617
- var import_node_util19 = require("node:util");
121618
- init_src();
121856
+ var import_node_child_process27 = require("node:child_process");
121857
+ var import_node_util20 = require("node:util");
121858
+ init_src2();
121619
121859
  init_external_devices();
121620
- var execFileAsync19 = (0, import_node_util19.promisify)(import_node_child_process26.execFile);
121860
+ var execFileAsync20 = (0, import_node_util20.promisify)(import_node_child_process27.execFile);
121621
121861
  function makeIosImpl2(registry2) {
121622
121862
  return {
121623
121863
  requires: ["xcrun"],
@@ -121633,11 +121873,11 @@ function makeIosImpl2(registry2) {
121633
121873
  if (blocked) return blocked;
121634
121874
  }
121635
121875
  try {
121636
- await execFileAsync19("xcrun", await simctlArgsForUdid(udid, ["terminate", udid, bundleId]));
121876
+ await execFileAsync20("xcrun", await simctlArgsForUdid(udid, ["terminate", udid, bundleId]));
121637
121877
  } catch {
121638
121878
  }
121639
121879
  try {
121640
- await execFileAsync19("xcrun", await simctlArgsForUdid(udid, ["launch", udid, bundleId]));
121880
+ await execFileAsync20("xcrun", await simctlArgsForUdid(udid, ["launch", udid, bundleId]));
121641
121881
  } catch (err) {
121642
121882
  throw new FailureError(
121643
121883
  `Failed to restart iOS app ${bundleId} on ${udid}.`,
@@ -121676,7 +121916,7 @@ var iosDeviceImpl2 = {
121676
121916
  };
121677
121917
 
121678
121918
  // ../tool-server/src/tools/restart-app/platforms/shared.ts
121679
- init_src();
121919
+ init_src2();
121680
121920
  function buildIosRestartHandler(backend) {
121681
121921
  return async (services, params) => {
121682
121922
  const { udid, bundleId } = params;
@@ -121712,7 +121952,7 @@ var iosRemoteImpl2 = {
121712
121952
  };
121713
121953
 
121714
121954
  // ../tool-server/src/tools/restart-app/platforms/android.ts
121715
- init_src();
121955
+ init_src2();
121716
121956
  init_adb();
121717
121957
  var androidImpl2 = {
121718
121958
  requires: ["adb"],
@@ -121763,11 +122003,10 @@ var vegaImpl2 = {
121763
122003
  };
121764
122004
 
121765
122005
  // ../tool-server/src/tools/restart-app/index.ts
121766
- var BUNDLE_ID_PATTERN2 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
121767
122006
  var ACTIVITY_PATTERN2 = /^[A-Za-z_.][A-Za-z0-9._/-]*$/;
121768
122007
  var zodSchema11 = external_exports.object({
121769
122008
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
121770
- bundleId: external_exports.string().min(1).regex(BUNDLE_ID_PATTERN2, "bundleId may only contain letters, digits, '.', '_' and '-'").describe("App identifier. iOS: bundle id. Android: package name."),
122009
+ bundleId: external_exports.string().min(1).regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe("App identifier. iOS: bundle id. Android: package name."),
121771
122010
  activity: external_exports.string().regex(ACTIVITY_PATTERN2, "activity may only contain letters, digits, '.', '_', '-' and '/'").optional().describe(
121772
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."
121773
122012
  )
@@ -121816,23 +122055,23 @@ Returns { restarted, bundleId }. Fails if the app is not installed.`,
121816
122055
  init_zod();
121817
122056
 
121818
122057
  // ../tool-server/src/tools/reinstall-app/platforms/ios.ts
121819
- var import_node_child_process27 = require("node:child_process");
121820
- var import_node_util20 = require("node:util");
121821
- var import_node_path15 = require("node:path");
121822
- init_src();
121823
- var execFileAsync20 = (0, import_node_util20.promisify)(import_node_child_process27.execFile);
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);
121824
122063
  var iosImpl = {
121825
122064
  requires: ["xcrun"],
121826
122065
  handler: async (_services, params) => {
121827
122066
  const { udid, bundleId, appPath } = params;
121828
- const absolute = (0, import_node_path15.resolve)(appPath);
122067
+ const absolute = (0, import_node_path16.resolve)(appPath);
121829
122068
  const { nativeId, prefix } = await simctlTargetForUdid(udid);
121830
122069
  try {
121831
- await execFileAsync20("xcrun", [...prefix, "uninstall", nativeId, bundleId]);
122070
+ await execFileAsync21("xcrun", [...prefix, "uninstall", nativeId, bundleId]);
121832
122071
  } catch {
121833
122072
  }
121834
122073
  try {
121835
- await execFileAsync20("xcrun", [...prefix, "install", nativeId, absolute]);
122074
+ await execFileAsync21("xcrun", [...prefix, "install", nativeId, absolute]);
121836
122075
  } catch (err) {
121837
122076
  throw new FailureError(
121838
122077
  `Failed to install iOS app bundle on ${udid}.`,
@@ -121851,14 +122090,14 @@ var iosImpl = {
121851
122090
  };
121852
122091
 
121853
122092
  // ../tool-server/src/tools/reinstall-app/platforms/android.ts
121854
- var import_node_path16 = require("node:path");
121855
- init_src();
122093
+ var import_node_path17 = require("node:path");
122094
+ init_src2();
121856
122095
  init_adb();
121857
122096
  var androidImpl3 = {
121858
122097
  requires: ["adb"],
121859
122098
  handler: async (_services, params) => {
121860
122099
  const { udid, bundleId, appPath } = params;
121861
- const absolute = (0, import_node_path16.resolve)(appPath);
122100
+ const absolute = (0, import_node_path17.resolve)(appPath);
121862
122101
  try {
121863
122102
  await runAdb(["-s", udid, "uninstall", bundleId], { timeoutMs: 3e4 });
121864
122103
  } catch {
@@ -121880,7 +122119,7 @@ ${stderr}`;
121880
122119
  };
121881
122120
 
121882
122121
  // ../tool-server/src/tools/reinstall-app/platforms/ios-device.ts
121883
- var import_node_path17 = require("node:path");
122122
+ var import_node_path18 = require("node:path");
121884
122123
  var iosDeviceImpl3 = {
121885
122124
  requires: ["xcrun"],
121886
122125
  handler: async (_services, params) => {
@@ -121892,7 +122131,7 @@ var iosDeviceImpl3 = {
121892
122131
  await ensureDeviceReady(params.udid);
121893
122132
  await uninstallApp(params.udid, params.bundleId);
121894
122133
  clearCurrentIosDeviceApp(params.udid, params.bundleId);
121895
- await installApp(params.udid, (0, import_node_path17.resolve)(params.appPath));
122134
+ await installApp(params.udid, (0, import_node_path18.resolve)(params.appPath));
121896
122135
  return {
121897
122136
  reinstalled: true,
121898
122137
  bundleId: params.bundleId
@@ -121901,12 +122140,12 @@ var iosDeviceImpl3 = {
121901
122140
  };
121902
122141
 
121903
122142
  // ../tool-server/src/tools/reinstall-app/platforms/ios-remote.ts
121904
- var import_node_path18 = require("node:path");
122143
+ var import_node_path19 = require("node:path");
121905
122144
  var iosRemoteImpl3 = {
121906
122145
  requires: ["sim-remote"],
121907
122146
  handler: async (_services, params) => {
121908
122147
  const { udid, bundleId, appPath } = params;
121909
- const absolute = (0, import_node_path18.resolve)(appPath);
122148
+ const absolute = (0, import_node_path19.resolve)(appPath);
121910
122149
  try {
121911
122150
  await simctlUninstall(udid, bundleId);
121912
122151
  } catch {
@@ -121917,13 +122156,13 @@ var iosRemoteImpl3 = {
121917
122156
  };
121918
122157
 
121919
122158
  // ../tool-server/src/tools/reinstall-app/platforms/vega.ts
121920
- var import_node_path19 = require("node:path");
121921
- init_src();
122159
+ var import_node_path20 = require("node:path");
122160
+ init_src2();
121922
122161
  var vegaImpl3 = {
121923
122162
  requires: ["vega"],
121924
122163
  handler: async (_services, params) => {
121925
122164
  const { udid, bundleId, appPath } = params;
121926
- const absolute = (0, import_node_path19.resolve)(appPath);
122165
+ const absolute = (0, import_node_path20.resolve)(appPath);
121927
122166
  await vegaDevice(udid, ["uninstall-app", "-a", bundleId], { timeoutMs: 6e4 }).catch(
121928
122167
  () => {
121929
122168
  }
@@ -121949,10 +122188,9 @@ ${stderr}`;
121949
122188
  };
121950
122189
 
121951
122190
  // ../tool-server/src/tools/reinstall-app/index.ts
121952
- var BUNDLE_ID_PATTERN3 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
121953
122191
  var zodSchema12 = external_exports.object({
121954
122192
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID or Android serial)."),
121955
- bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN3, "bundleId may only contain letters, digits, '.', '_' and '-'").describe(
122193
+ bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
121956
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."
121957
122195
  ),
121958
122196
  appPath: external_exports.string().describe(
@@ -122010,10 +122248,10 @@ var PERMISSION_NAMES = [
122010
122248
  ];
122011
122249
 
122012
122250
  // ../tool-server/src/tools/settings-permissions/platforms/ios.ts
122013
- var import_node_child_process28 = require("node:child_process");
122014
- var import_node_util21 = require("node:util");
122015
- init_src();
122016
- var execFileAsync21 = (0, import_node_util21.promisify)(import_node_child_process28.execFile);
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);
122017
122255
  var SIMCTL_ACTION = {
122018
122256
  grant: "grant",
122019
122257
  deny: "revoke",
@@ -122038,7 +122276,7 @@ var NON_TCC_GRANT_NEEDS_INSTALL = /* @__PURE__ */ new Set([
122038
122276
  ]);
122039
122277
  var localBackend = {
122040
122278
  async run(udid, simctlAction, service, bundleId) {
122041
- await execFileAsync21(
122279
+ await execFileAsync22(
122042
122280
  "xcrun",
122043
122281
  await simctlArgsForUdid(udid, ["privacy", udid, simctlAction, service, bundleId]),
122044
122282
  { timeout: 3e4 }
@@ -122046,7 +122284,7 @@ var localBackend = {
122046
122284
  },
122047
122285
  async isInstalled(udid, bundleId) {
122048
122286
  try {
122049
- await execFileAsync21(
122287
+ await execFileAsync22(
122050
122288
  "xcrun",
122051
122289
  await simctlArgsForUdid(udid, ["get_app_container", udid, bundleId]),
122052
122290
  { timeout: 15e3 }
@@ -122067,7 +122305,7 @@ function buildIosHandler(backend) {
122067
122305
  const { udid, action, permission, bundleId } = params;
122068
122306
  const services = IOS_SERVICES[permission];
122069
122307
  if (services.length === 0) {
122070
- throw new FailureError(
122308
+ throw new InvalidToolInputError(
122071
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.`,
122072
122310
  {
122073
122311
  error_code: FAILURE_CODES.SETTINGS_PERMISSION_UNSUPPORTED,
@@ -122136,7 +122374,7 @@ var iosRemoteImpl4 = {
122136
122374
  };
122137
122375
 
122138
122376
  // ../tool-server/src/tools/settings-permissions/platforms/android.ts
122139
- init_src();
122377
+ init_src2();
122140
122378
  init_adb();
122141
122379
  var ANDROID_PERMISSIONS = {
122142
122380
  "camera": ["android.permission.CAMERA"],
@@ -122202,7 +122440,7 @@ var androidImpl4 = {
122202
122440
  const { udid, action, permission, bundleId } = params;
122203
122441
  const permissions = permissionsFor(permission, action);
122204
122442
  if (permissions.length === 0) {
122205
- throw new FailureError(
122443
+ throw new InvalidToolInputError(
122206
122444
  `Permission '${permission}' has no Android runtime-permission equivalent, so there is nothing to ${action}.`,
122207
122445
  {
122208
122446
  error_code: FAILURE_CODES.SETTINGS_PERMISSION_UNSUPPORTED,
@@ -122272,7 +122510,6 @@ var androidImpl4 = {
122272
122510
  };
122273
122511
 
122274
122512
  // ../tool-server/src/tools/settings-permissions/index.ts
122275
- var BUNDLE_ID_PATTERN4 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
122276
122513
  var zodSchema13 = external_exports.object({
122277
122514
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS simulator UDID or Android serial)."),
122278
122515
  action: external_exports.enum(PERMISSION_ACTIONS).describe(
@@ -122281,7 +122518,7 @@ var zodSchema13 = external_exports.object({
122281
122518
  permission: external_exports.enum(PERMISSION_NAMES).describe(
122282
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)."
122283
122520
  ),
122284
- bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN4, "bundleId may only contain letters, digits, '.', '_' and '-'").describe(
122521
+ bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).describe(
122285
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."
122286
122523
  )
122287
122524
  });
@@ -122330,9 +122567,9 @@ init_zod();
122330
122567
  init_device_info();
122331
122568
 
122332
122569
  // ../tool-server/src/tools/open-url/platforms/ios.ts
122333
- var import_node_child_process29 = require("node:child_process");
122334
- var import_node_util22 = require("node:util");
122335
- init_src();
122570
+ var import_node_child_process30 = require("node:child_process");
122571
+ var import_node_util23 = require("node:util");
122572
+ init_src2();
122336
122573
 
122337
122574
  // ../tool-server/src/tools/open-url/deep-link-note.ts
122338
122575
  function httpDeepLinkNote(url2) {
@@ -122341,12 +122578,12 @@ function httpDeepLinkNote(url2) {
122341
122578
  }
122342
122579
 
122343
122580
  // ../tool-server/src/tools/open-url/platforms/ios.ts
122344
- var execFileAsync22 = (0, import_node_util22.promisify)(import_node_child_process29.execFile);
122581
+ var execFileAsync23 = (0, import_node_util23.promisify)(import_node_child_process30.execFile);
122345
122582
  var iosImpl3 = {
122346
122583
  requires: ["xcrun"],
122347
122584
  handler: async (_services, params) => {
122348
122585
  try {
122349
- await execFileAsync22(
122586
+ await execFileAsync23(
122350
122587
  "xcrun",
122351
122588
  await simctlArgsForUdid(params.udid, ["openurl", params.udid, params.url])
122352
122589
  );
@@ -122403,7 +122640,7 @@ var iosDeviceImpl4 = {
122403
122640
  };
122404
122641
 
122405
122642
  // ../tool-server/src/tools/open-url/platforms/android.ts
122406
- init_src();
122643
+ init_src2();
122407
122644
  init_adb();
122408
122645
  var androidImpl5 = {
122409
122646
  requires: ["adb"],
@@ -122445,13 +122682,12 @@ var chromiumImpl2 = {
122445
122682
  };
122446
122683
 
122447
122684
  // ../tool-server/src/tools/open-url/index.ts
122448
- var BUNDLE_ID_PATTERN5 = /^[A-Za-z_][A-Za-z0-9._-]*$/;
122449
122685
  var zodSchema14 = external_exports.object({
122450
122686
  udid: external_exports.string().min(1).describe("Target device id from `list-devices` (iOS UDID, Android serial, or Chromium id)."),
122451
122687
  url: external_exports.string().describe(
122452
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."
122453
122689
  ),
122454
- bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN5, "bundleId may only contain letters, digits, '.', '_' and '-'").optional().describe(
122690
+ bundleId: external_exports.string().regex(BUNDLE_ID_PATTERN, BUNDLE_ID_MESSAGE).optional().describe(
122455
122691
  "Physical iOS only: the app that receives the URL. Defaults to Safari for http(s); required for any other scheme. Ignored elsewhere."
122456
122692
  )
122457
122693
  });
@@ -122503,8 +122739,8 @@ Returns { opened, url, note? }. note carries the deep-linking caveat when a web
122503
122739
  };
122504
122740
 
122505
122741
  // ../tool-server/src/tools/screenshot/index.ts
122506
- var import_node_child_process30 = require("node:child_process");
122507
- var import_node_util23 = require("node:util");
122742
+ var import_node_child_process31 = require("node:child_process");
122743
+ var import_node_util24 = require("node:util");
122508
122744
  var os13 = __toESM(require("node:os"));
122509
122745
  var path27 = __toESM(require("node:path"));
122510
122746
  init_zod();
@@ -122682,7 +122918,7 @@ async function captureScreenshotUpright(api, device, requestedRotation, signal,
122682
122918
  }
122683
122919
 
122684
122920
  // ../tool-server/src/utils/android-devtools-rotation-peek.ts
122685
- init_src();
122921
+ init_src2();
122686
122922
  var PEEK_TIMEOUT_MS = 1e3;
122687
122923
  function androidDevtoolsRotationPeek(registry2, device) {
122688
122924
  return async () => {
@@ -122710,7 +122946,7 @@ function androidDevtoolsRotationPeek(registry2, device) {
122710
122946
  }
122711
122947
 
122712
122948
  // ../tool-server/src/utils/ios-device/runner-commands.ts
122713
- init_src();
122949
+ init_src2();
122714
122950
  var APP_BACKGROUNDED_ERROR_CODE = "APP_BACKGROUNDED";
122715
122951
  function repliedReactivated(data) {
122716
122952
  return typeof data === "object" && data !== null && data.reactivated === true;
@@ -122868,9 +123104,9 @@ async function captureSnapshot(api, bundleId) {
122868
123104
  // ../tool-server/src/utils/vega-screen.ts
122869
123105
  var import_promises10 = require("node:fs/promises");
122870
123106
  var import_node_os12 = require("node:os");
122871
- var import_node_path20 = require("node:path");
123107
+ var import_node_path21 = require("node:path");
122872
123108
  var import_pngjs = __toESM(require_png());
122873
- init_src();
123109
+ init_src2();
122874
123110
  init_adb();
122875
123111
 
122876
123112
  // ../tool-server/src/tools/screenshot-diff/resize.ts
@@ -123035,7 +123271,7 @@ async function captureVegaScreenshotPng(opts = {}) {
123035
123271
  async function captureViaEmulatorConsole(opts) {
123036
123272
  const port = await discoverVegaConsolePort();
123037
123273
  const serial = `emulator-${port}`;
123038
- const outDir = await (0, import_promises10.mkdtemp)((0, import_node_path20.join)((0, import_node_os12.tmpdir)(), "vega-shot-"));
123274
+ const outDir = await (0, import_promises10.mkdtemp)((0, import_node_path21.join)((0, import_node_os12.tmpdir)(), "vega-shot-"));
123039
123275
  try {
123040
123276
  await runAdb(["-s", serial, "emu", "screenrecord", "screenshot", outDir], {
123041
123277
  timeoutMs: 2e4
@@ -123049,9 +123285,9 @@ async function captureViaEmulatorConsole(opts) {
123049
123285
  error_kind: "unknown"
123050
123286
  });
123051
123287
  }
123052
- const decoded = import_pngjs.PNG.sync.read(await (0, import_promises10.readFile)((0, import_node_path20.join)(outDir, pngName)));
123288
+ const decoded = import_pngjs.PNG.sync.read(await (0, import_promises10.readFile)((0, import_node_path21.join)(outDir, pngName)));
123053
123289
  const scaled = scalePng(decoded, opts.scale);
123054
- const outPath = (0, import_node_path20.join)((0, import_node_os12.tmpdir)(), `vega-screenshot-${process.hrtime.bigint()}.png`);
123290
+ const outPath = (0, import_node_path21.join)((0, import_node_os12.tmpdir)(), `vega-screenshot-${process.hrtime.bigint()}.png`);
123055
123291
  await (0, import_promises10.writeFile)(outPath, import_pngjs.PNG.sync.write(scaled));
123056
123292
  return outPath;
123057
123293
  } finally {
@@ -123076,7 +123312,7 @@ function scalePng(src, scale) {
123076
123312
 
123077
123313
  // ../tool-server/src/tools/screenshot/index.ts
123078
123314
  var fs33 = __toESM(require("node:fs/promises"));
123079
- var execFileAsync23 = (0, import_node_util23.promisify)(import_node_child_process30.execFile);
123315
+ var execFileAsync24 = (0, import_node_util24.promisify)(import_node_child_process31.execFile);
123080
123316
  var zodSchema15 = external_exports.object({
123081
123317
  udid: external_exports.string().describe(
123082
123318
  "Target device id from `list-devices` (iOS UDID, Android serial, Apple TV UDID, Vega serial, or Chromium id)."
@@ -123117,11 +123353,11 @@ async function tvScreenshot(udid, scale, signal) {
123117
123353
  os13.tmpdir(),
123118
123354
  `argent-tv-screenshot-${udid.slice(0, 8)}-${process.hrtime.bigint()}.png`
123119
123355
  );
123120
- await execFileAsync23("xcrun", await simctlArgsForUdid(udid, ["io", udid, "screenshot", file2]), {
123356
+ await execFileAsync24("xcrun", await simctlArgsForUdid(udid, ["io", udid, "screenshot", file2]), {
123121
123357
  signal
123122
123358
  });
123123
123359
  if (scale < 1) {
123124
- await execFileAsync23("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
123360
+ await execFileAsync24("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
123125
123361
  signal
123126
123362
  }).catch(() => {
123127
123363
  });
@@ -123131,7 +123367,7 @@ async function tvScreenshot(udid, scale, signal) {
123131
123367
  async function tvTargetLongSide(file2, scale) {
123132
123368
  let longSide = 3840;
123133
123369
  try {
123134
- const { stdout } = await execFileAsync23("sips", ["-g", "pixelWidth", "-g", "pixelHeight", file2]);
123370
+ const { stdout } = await execFileAsync24("sips", ["-g", "pixelWidth", "-g", "pixelHeight", file2]);
123135
123371
  const width = Number(/pixelWidth:\s*(\d+)/.exec(stdout)?.[1]);
123136
123372
  const height = Number(/pixelHeight:\s*(\d+)/.exec(stdout)?.[1]);
123137
123373
  if (Number.isFinite(width) && Number.isFinite(height) && width > 0 && height > 0) {
@@ -123145,7 +123381,7 @@ async function downscalePngInPlace(file2, scale, signal) {
123145
123381
  if (scale >= 1) {
123146
123382
  return;
123147
123383
  }
123148
- await execFileAsync23("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
123384
+ await execFileAsync24("sips", ["-Z", String(await tvTargetLongSide(file2, scale)), file2], {
123149
123385
  signal
123150
123386
  }).catch(() => {
123151
123387
  });
@@ -123241,7 +123477,7 @@ Fails if the simulator-server / emulator backend / Chromium CDP is not reachable
123241
123477
  init_zod();
123242
123478
 
123243
123479
  // ../tool-server/src/utils/chromium-visibility.ts
123244
- init_src();
123480
+ init_src2();
123245
123481
  async function assertChromiumWindowVisible(chromium, action) {
123246
123482
  let value;
123247
123483
  try {
@@ -124190,9 +124426,10 @@ Fails if the device backend is not reachable: the simulator-server for iOS, or \
124190
124426
 
124191
124427
  // ../tool-server/src/tools/keyboard/index.ts
124192
124428
  init_zod();
124193
- init_src();
124429
+ init_src2();
124194
124430
 
124195
124431
  // ../tool-server/src/utils/secrets.ts
124432
+ init_src2();
124196
124433
  init_src();
124197
124434
  var SECRET_PLACEHOLDER_MARKER = "{{secret:";
124198
124435
  var PLACEHOLDER_RE = /\{\{secret:([A-Za-z_][A-Za-z0-9_]*)\}\}/g;
@@ -124294,7 +124531,7 @@ function redactSecretsFromError(err, secrets) {
124294
124531
  }
124295
124532
 
124296
124533
  // ../tool-server/src/tools/keyboard/simulator-server-keys.ts
124297
- init_src();
124534
+ init_src2();
124298
124535
 
124299
124536
  // ../tool-server/src/tools/keyboard/key-codes.ts
124300
124537
  var SHIFT_KEYCODE = 225;
@@ -124475,7 +124712,7 @@ function makeIosRemoteImpl(registry2) {
124475
124712
  }
124476
124713
 
124477
124714
  // ../tool-server/src/tools/keyboard/platforms/ios-device.ts
124478
- init_src();
124715
+ init_src2();
124479
124716
  async function mapNotFocused(send) {
124480
124717
  try {
124481
124718
  return await send;
@@ -124568,7 +124805,7 @@ function makeAndroidImpl(registry2) {
124568
124805
  }
124569
124806
 
124570
124807
  // ../tool-server/src/tools/keyboard/platforms/chromium.ts
124571
- init_src();
124808
+ init_src2();
124572
124809
 
124573
124810
  // ../tool-server/src/tools/keyboard/chromium-keys.ts
124574
124811
  var CHROMIUM_NAMED_KEYS = {
@@ -124708,7 +124945,7 @@ function makeChromiumImpl(registry2) {
124708
124945
  }
124709
124946
 
124710
124947
  // ../tool-server/src/utils/vega-input.ts
124711
- init_src();
124948
+ init_src2();
124712
124949
  init_adb();
124713
124950
  var REMOTE_KEYCODES = {
124714
124951
  up: "KEY_UP",
@@ -125136,12 +125373,13 @@ var shakeZodSchema = external_exports.object({
125136
125373
  });
125137
125374
 
125138
125375
  // ../tool-server/src/tools/shake/platforms/ios.ts
125139
- var import_node_child_process32 = require("node:child_process");
125140
- var import_node_util24 = require("node:util");
125141
- init_src();
125376
+ var import_node_child_process33 = require("node:child_process");
125377
+ var import_node_util25 = require("node:util");
125378
+ init_src2();
125142
125379
 
125143
125380
  // ../tool-server/src/utils/window-shake.ts
125144
- var import_node_child_process31 = require("node:child_process");
125381
+ var import_node_child_process32 = require("node:child_process");
125382
+ init_src();
125145
125383
  var MICROINTERACTIONS_FLAG = "microinteractions";
125146
125384
  var AMPLITUDE = 22;
125147
125385
  var STEPS = 60;
@@ -125247,7 +125485,7 @@ end run
125247
125485
  }
125248
125486
  function runOsascript(script) {
125249
125487
  return new Promise((resolve14, reject) => {
125250
- const child = (0, import_node_child_process31.execFile)(
125488
+ const child = (0, import_node_child_process32.execFile)(
125251
125489
  "/usr/bin/osascript",
125252
125490
  ["-"],
125253
125491
  { timeout: OSASCRIPT_TIMEOUT_MS },
@@ -125340,7 +125578,7 @@ async function prepareHostWindowShake(target) {
125340
125578
  }
125341
125579
 
125342
125580
  // ../tool-server/src/tools/shake/platforms/ios.ts
125343
- var execFileAsync24 = (0, import_node_util24.promisify)(import_node_child_process32.execFile);
125581
+ var execFileAsync25 = (0, import_node_util25.promisify)(import_node_child_process33.execFile);
125344
125582
  var SHAKE_NOTIFICATION = "com.apple.UIKit.SimulatorShake";
125345
125583
  var SHAKE_INTERVAL_MS = 400;
125346
125584
  var sleep11 = (ms) => new Promise((r) => setTimeout(r, ms));
@@ -125380,7 +125618,7 @@ var iosImpl4 = {
125380
125618
  if (i > 0) await sleep11(SHAKE_INTERVAL_MS);
125381
125619
  shaker.begin();
125382
125620
  try {
125383
- await execFileAsync24("xcrun", args, { timeout: 15e3 });
125621
+ await execFileAsync25("xcrun", args, { timeout: 15e3 });
125384
125622
  } catch (err) {
125385
125623
  const error52 = err instanceof Error ? err : new Error(String(err));
125386
125624
  throw shakeFailure(udid, error52.message, error52);
@@ -125417,7 +125655,7 @@ var iosRemoteImpl6 = {
125417
125655
  };
125418
125656
 
125419
125657
  // ../tool-server/src/tools/shake/platforms/android.ts
125420
- init_src();
125658
+ init_src2();
125421
125659
  init_adb();
125422
125660
  var SHAKE_AMPLITUDE = 30;
125423
125661
  var SWINGS_PER_SHAKE = 8;
@@ -125729,7 +125967,7 @@ init_device_info();
125729
125967
 
125730
125968
  // ../tool-server/src/utils/sub-invoke.ts
125731
125969
  var import_node_crypto11 = require("node:crypto");
125732
- init_src();
125970
+ init_src2();
125733
125971
  async function invokeSubTool(registry2, ctx, toolId, args) {
125734
125972
  const signal = ctx?.signal;
125735
125973
  const recordChildInvocation = ctx?.recordChildInvocation;
@@ -125764,7 +126002,7 @@ init_adb();
125764
126002
 
125765
126003
  // ../tool-server/src/utils/poll-describe-tree.ts
125766
126004
  async function pollDescribeTree(args) {
125767
- const { fetchTree: fetchTree2, timeoutMs, pollIntervalMs, signal, onSample } = args;
126005
+ const { fetchTree, timeoutMs, pollIntervalMs, signal, onSample } = args;
125768
126006
  const start2 = Date.now();
125769
126007
  const deadline = start2 + timeoutMs;
125770
126008
  let polls = 0;
@@ -125783,7 +126021,7 @@ async function pollDescribeTree(args) {
125783
126021
  for (; ; ) {
125784
126022
  if (signal?.aborted) return outcome(void 0, true);
125785
126023
  const remaining = Math.max(0, deadline - Date.now());
125786
- const settled = await settleWithin(fetchTree2(), remaining, signal);
126024
+ const settled = await settleWithin(fetchTree(), remaining, signal);
125787
126025
  polls += 1;
125788
126026
  if (settled.type === "aborted") return outcome(void 0, true);
125789
126027
  lastAttemptSettled = settled.type !== "timeout";
@@ -125910,7 +126148,7 @@ function adaptRunnerSnapshot(nodes) {
125910
126148
  }
125911
126149
 
125912
126150
  // ../tool-server/src/tools/describe/platforms/chromium.ts
125913
- init_src();
126151
+ init_src2();
125914
126152
  var DESCRIBE_FAILURE = {
125915
126153
  error_code: FAILURE_CODES.CHROMIUM_DESCRIBE_FAILED,
125916
126154
  failure_area: "tool_server",
@@ -131944,23 +132182,6 @@ function deriveSelector(node) {
131944
132182
  if (node.role && !GENERIC_ROLES.has(node.role.toLowerCase())) return { role: node.role };
131945
132183
  return null;
131946
132184
  }
131947
- async function fetchTree(registry2, device, opts = {}) {
131948
- if (device.platform === "ios") {
131949
- return describeIos(registry2, device, { bundleId: opts.bundleId });
131950
- }
131951
- if (device.platform === "android") {
131952
- return describeAndroid(registry2, device.id);
131953
- }
131954
- if (device.platform === "chromium") {
131955
- const ref = chromiumCdpRef(device);
131956
- const api = await registry2.resolveService(ref.urn, ref.options);
131957
- return describeChromium(api);
131958
- }
131959
- if (device.platform === "vega") {
131960
- return describeVega(device.id);
131961
- }
131962
- throw new Error(`ui-tree matching is not supported on platform "${device.platform}"`);
131963
- }
131964
132185
 
131965
132186
  // ../tool-server/src/tools/await-ui-element/index.ts
131966
132187
  var AWAIT_UI_ELEMENT_TOOL_ID = "await-ui-element";
@@ -132075,7 +132296,7 @@ function timeoutNote(params, lastTree, fetchError, lastData) {
132075
132296
  return appendDiagnostics(base, lastData);
132076
132297
  }
132077
132298
  function createAwaitUiElementTool(registry2) {
132078
- async function fetchTree2(device, params, services, isTvOs, androidIsTv) {
132299
+ async function fetchTree(device, params, services, isTvOs, androidIsTv) {
132079
132300
  if (device.platform === "ios" || device.platform === "ios-remote") {
132080
132301
  if (device.kind === "device") {
132081
132302
  return describeIosDevice(registry2, device);
@@ -132157,7 +132378,7 @@ tap/navigation to wait for the next screen, or before tapping an element that ap
132157
132378
  let everMatched = false;
132158
132379
  let lastTrustedReadAt;
132159
132380
  const poll = await pollDescribeTree({
132160
- fetchTree: () => fetchTree2(device, params, services, isTvOs, androidIsTv),
132381
+ fetchTree: () => fetchTree(device, params, services, isTvOs, androidIsTv),
132161
132382
  timeoutMs,
132162
132383
  pollIntervalMs,
132163
132384
  signal,
@@ -132451,7 +132672,7 @@ init_zod();
132451
132672
  init_device_info();
132452
132673
 
132453
132674
  // ../tool-server/src/tools/debugger/not-connected.ts
132454
- init_src();
132675
+ init_src2();
132455
132676
  init_device_info();
132456
132677
  var GUIDANCE = {
132457
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.",
@@ -132602,7 +132823,7 @@ Use when you need to verify connectivity before using other debugger tools. Neve
132602
132823
 
132603
132824
  // ../tool-server/src/tools/debugger/debugger-evaluate.ts
132604
132825
  init_zod();
132605
- init_src();
132826
+ init_src2();
132606
132827
  var zodSchema31 = external_exports.object({
132607
132828
  port: metroPortField,
132608
132829
  device_id: external_exports.string().describe(
@@ -132655,7 +132876,7 @@ Returns the evaluation result as a JSON-serializable value, along with deviceNam
132655
132876
 
132656
132877
  // ../tool-server/src/tools/debugger/debugger-reload-metro.ts
132657
132878
  init_zod();
132658
- init_src();
132879
+ init_src2();
132659
132880
  var zodSchema32 = external_exports.object({
132660
132881
  port: metroPortField,
132661
132882
  device_id: external_exports.string().describe(
@@ -134830,7 +135051,7 @@ function treeSignature(root) {
134830
135051
  return parts2.join("\n");
134831
135052
  }
134832
135053
  function createAwaitScreenIdleTool(registry2) {
134833
- function fetchTree2(device, services, isTvOs, androidIsTv) {
135054
+ function fetchTree(device, services, isTvOs, androidIsTv) {
134834
135055
  if (device.platform === "ios" || device.platform === "ios-remote") {
134835
135056
  if (device.kind === "device") {
134836
135057
  return describeIosDevice(registry2, device);
@@ -134878,7 +135099,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
134878
135099
  let stableSignature;
134879
135100
  let stableSince = 0;
134880
135101
  const poll = await pollDescribeTree({
134881
- fetchTree: () => fetchTree2(device, services, isTvOs, androidIsTv),
135102
+ fetchTree: () => fetchTree(device, services, isTvOs, androidIsTv),
134882
135103
  timeoutMs: params.timeoutMs ?? DEFAULT_TIMEOUT_MS4,
134883
135104
  pollIntervalMs: params.pollIntervalMs ?? DEFAULT_POLL_INTERVAL_MS2,
134884
135105
  signal: ctx?.signal,
@@ -134907,7 +135128,7 @@ still before the timeout. Use after a launch/navigation to wait for the UI to re
134907
135128
  // ../tool-server/src/tools/profiler/react/react-profiler-start.ts
134908
135129
  var crypto6 = __toESM(require("node:crypto"));
134909
135130
  init_zod();
134910
- init_src();
135131
+ init_src2();
134911
135132
 
134912
135133
  // ../tool-server/src/utils/react-profiler/session-ownership.ts
134913
135134
  var DEFAULT_STALE_THRESHOLD_MS = 5 * 6e4;
@@ -135196,7 +135417,7 @@ Fails if the Hermes runtime is not reachable or the Metro CDP connection cannot
135196
135417
 
135197
135418
  // ../tool-server/src/tools/profiler/react/react-profiler-stop.ts
135198
135419
  init_zod();
135199
- init_src();
135420
+ init_src2();
135200
135421
 
135201
135422
  // ../tool-server/src/utils/react-profiler/debug/dump.ts
135202
135423
  var import_fs = require("fs");
@@ -135697,7 +135918,7 @@ function createReactProfilerStatusTool(registry2) {
135697
135918
  // ../tool-server/src/tools/profiler/react/react-profiler-analyze.ts
135698
135919
  init_zod();
135699
135920
  var import_fs5 = require("fs");
135700
- init_src();
135921
+ init_src2();
135701
135922
 
135702
135923
  // ../tool-server/src/utils/react-profiler/pipeline/session-context.ts
135703
135924
  var import_fs2 = require("fs");
@@ -137444,7 +137665,7 @@ When several files define a component with the same name (e.g. platform variants
137444
137665
 
137445
137666
  // ../tool-server/src/tools/profiler/react/react-profiler-cpu-summary.ts
137446
137667
  init_zod();
137447
- init_src();
137668
+ init_src2();
137448
137669
  var zodSchema45 = external_exports.object({
137449
137670
  port: metroPortField,
137450
137671
  device_id: external_exports.string().describe(
@@ -137561,7 +137782,7 @@ Fails if react-profiler-stop has not been called or no CPU profile is stored.`,
137561
137782
 
137562
137783
  // ../tool-server/src/tools/profiler/react/react-profiler-renders.ts
137563
137784
  init_zod();
137564
- init_src();
137785
+ init_src2();
137565
137786
  var COLLECT_RENDERS_SCRIPT = `
137566
137787
  (function() {
137567
137788
  try {
@@ -137717,7 +137938,7 @@ ${renderMarkdownTable2(entries)}`;
137717
137938
 
137718
137939
  // ../tool-server/src/tools/profiler/react/react-profiler-fiber-tree.ts
137719
137940
  init_zod();
137720
- init_src();
137941
+ init_src2();
137721
137942
  var HOOK_MISSING_ERROR2 = "no __REACT_DEVTOOLS_GLOBAL_HOOK__";
137722
137943
  var NO_RENDERERS_ERROR2 = "no renderers attached to hook";
137723
137944
  var HOOK_NOT_PRESENT_ERRORS2 = /* @__PURE__ */ new Set([HOOK_MISSING_ERROR2, NO_RENDERERS_ERROR2]);
@@ -137887,7 +138108,7 @@ Fails if the React DevTools hook is not present or no fiber roots have been comm
137887
138108
  init_zod();
137888
138109
 
137889
138110
  // ../tool-server/src/blueprints/native-profiler-session.ts
137890
- init_src();
138111
+ init_src2();
137891
138112
  init_external_devices();
137892
138113
 
137893
138114
  // ../tool-server/src/utils/profiler-shared/lifecycle.ts
@@ -138089,7 +138310,7 @@ init_device_info();
138089
138310
 
138090
138311
  // ../tool-server/src/tools/profiler/native-profiler/platforms/ios.ts
138091
138312
  var import_child_process4 = require("child_process");
138092
- init_src();
138313
+ init_src2();
138093
138314
  var import_fs9 = require("fs");
138094
138315
  var import_node_fs14 = require("node:fs");
138095
138316
  var path30 = __toESM(require("path"));
@@ -138149,7 +138370,7 @@ function listenForDarwinNotification(name) {
138149
138370
  }
138150
138371
 
138151
138372
  // ../tool-server/src/utils/ios-profiler/startup.ts
138152
- init_src();
138373
+ init_src2();
138153
138374
  function waitForXctraceReady(child, { notify, timeoutMs }) {
138154
138375
  return new Promise((resolve14, reject) => {
138155
138376
  let settled = false;
@@ -138239,8 +138460,8 @@ var import_util8 = require("util");
138239
138460
  var DEFAULT_EXEC_TIMEOUT_MS = 6e4;
138240
138461
  var DEFAULT_EXEC_MAX_BUFFER = 256 * 1024 * 1024;
138241
138462
  async function execFileAsyncWithTimeout(file2, args, options = {}) {
138242
- const execFileAsync29 = (0, import_util8.promisify)(import_child_process2.execFile);
138243
- const { stdout, stderr } = await execFileAsync29(file2, args, {
138463
+ const execFileAsync30 = (0, import_util8.promisify)(import_child_process2.execFile);
138464
+ const { stdout, stderr } = await execFileAsync30(file2, args, {
138244
138465
  encoding: "utf-8",
138245
138466
  ...options,
138246
138467
  // Applied after ...options so a caller cannot weaken the guards; maxBuffer
@@ -140431,12 +140652,12 @@ async function analyzeNativeProfilerIos(api) {
140431
140652
 
140432
140653
  // ../tool-server/src/tools/profiler/native-profiler/platforms/android.ts
140433
140654
  var path33 = __toESM(require("path"));
140434
- init_src();
140655
+ init_src2();
140435
140656
 
140436
140657
  // ../tool-server/src/utils/android-profiler/capture.ts
140437
140658
  var import_child_process5 = require("child_process");
140438
140659
  var import_fs10 = require("fs");
140439
- init_src();
140660
+ init_src2();
140440
140661
  init_android_binary();
140441
140662
  init_adb();
140442
140663
  var ON_DEVICE_TRACE_DIR = "/data/misc/perfetto-traces";
@@ -140676,7 +140897,7 @@ async function stopPerfetto(opts) {
140676
140897
  }
140677
140898
 
140678
140899
  // ../tool-server/src/utils/android-profiler/detect-app.ts
140679
- init_src();
140900
+ init_src2();
140680
140901
  init_adb();
140681
140902
  var DETECT_TIMEOUT_MS = 1e4;
140682
140903
  async function validateAndroidAppProcess(serial, appProcess) {
@@ -140800,7 +141021,7 @@ function parseUserPackages(output) {
140800
141021
  }
140801
141022
 
140802
141023
  // ../tool-server/src/utils/android-profiler/pipeline/index.ts
140803
- init_src();
141024
+ init_src2();
140804
141025
 
140805
141026
  // ../tool-server/src/utils/android-profiler/pipeline/run-tp.ts
140806
141027
  var import_fs11 = require("fs");
@@ -141368,7 +141589,7 @@ function unwrapOr(result, fallback, onError) {
141368
141589
 
141369
141590
  // ../tool-server/src/utils/android-profiler/session-metadata.ts
141370
141591
  var import_fs13 = require("fs");
141371
- init_src();
141592
+ init_src2();
141372
141593
  function androidNativeProfilerMetadataPath(pftracePath) {
141373
141594
  return `${pftracePath}.metadata.json`;
141374
141595
  }
@@ -141798,7 +142019,7 @@ Fails if native-profiler-stop has not been called first to export trace data.`,
141798
142019
  };
141799
142020
 
141800
142021
  // ../tool-server/src/blueprints/screen-recording-session.ts
141801
- init_src();
142022
+ init_src2();
141802
142023
  var import_fs14 = require("fs");
141803
142024
  var SCREEN_RECORDING_SESSION_NAMESPACE = "ScreenRecordingSession";
141804
142025
  function screenRecordingSessionRef(device) {
@@ -141947,19 +142168,20 @@ var screenRecordingSessionBlueprint = {
141947
142168
 
141948
142169
  // ../tool-server/src/tools/screen-recording/screen-recording-start.ts
141949
142170
  init_zod();
141950
- init_src();
142171
+ init_src2();
141951
142172
  init_device_info();
142173
+ init_src();
141952
142174
 
141953
142175
  // ../tool-server/src/tools/screen-recording/capture.ts
141954
142176
  var os15 = __toESM(require("os"));
141955
142177
  var path35 = __toESM(require("path"));
141956
142178
  var import_fs17 = require("fs");
141957
142179
  var import_child_process7 = require("child_process");
141958
- init_src();
142180
+ init_src2();
141959
142181
 
141960
142182
  // ../tool-server/src/tools/screen-recording/mjpeg-stream.ts
141961
142183
  var import_http = __toESM(require("http"));
141962
- init_src();
142184
+ init_src2();
141963
142185
  var MAX_BUFFER_BYTES = 64 * 1024 * 1024;
141964
142186
  function delimiterFromContentType(contentType) {
141965
142187
  const match = /boundary=([^;\s]+)/i.exec(contentType ?? "");
@@ -142156,7 +142378,7 @@ function readJpegDimensions(jpeg) {
142156
142378
 
142157
142379
  // ../tool-server/src/tools/screen-recording/session-guards.ts
142158
142380
  var import_fs15 = require("fs");
142159
- init_src();
142381
+ init_src2();
142160
142382
  function clip2(s, max = 300) {
142161
142383
  const t = s.trim();
142162
142384
  if (!t) return "<empty>";
@@ -142265,7 +142487,7 @@ var WATERMARK_PNG_HEIGHT = 277;
142265
142487
  var WATERMARK_PNG_BASE64 = "iVBORw0KGgoAAAANSUhEUgAAA4QAAAEVCAYAAAC46yv0AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nOydd7xkRbX916qGIcwQBAaQDEPOacgqIgoCgxJEQRiCCuJ7CCoIzwQYfoIYAJ8BFAUERYLwAEUBMcCoMAwZiUMSkJwGJMycWr8/ui709D23Y1Wf7tP7+/ncz3zm3HN27e7b4eyqXWsRhtEiksYBmCrp8wBWKzqffoLkqiRnFp2HYRiGYRiGYbTDPEUnYPQ/ksYD+LikzwFYvuh8+pTNAVhBaBiGYRiGYQwUVhAaYyJpMe/9YZIOA7B40fn0M977zQD8sug8jOFB0ju89zunHsc5dwHJGanHMQzDMAyjGKwgNEYhaSnv/aGSjiC5SNH5DAIkNy86B2O4kHQcye1Sj+O9XxnAh1OPYxiGY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2tqJS2JPGvpI/5c5yac74H8fJ9SNyZHodhWYxEATwN4qq3Pl5mZ2TwnIi5ssMltv2nOzczMzMzMbCqTtFpEPFPXIZT0b+Nuq5mZmbXPSWXMzOZvb0b9VgkPAjhjEtpiZmZmk8wdQjOz+ZSkBSUd2KDct8edGMXMzMzMzMxaJOmjDdYOZpLWHndbzczMzMzMrCFJqUi33+u5RbMs+1jk6jqE3qzbzMxsHuZtJ8zM5kGS1pR0C4CbAdwp6V4AGcnVAbwCwHJNwpB8KclrRtlWMzMzMzMza5GkNRuM/tX9OJGMmZnZPM5JZczMrJdHSL573I0wMzOz0XKH0MzMuonkQSTvHndDzMzMbLTcITQzs4lE8lCSPxx3Q8zMzGz03CE0M7PZHiS5H8mvjbshZmZmNjncITQzs6ckfYvkhiR/MO7GmJmZ2eTxthNmZvMgSYsC2A3AGhHxXABLkVwawEIAMkkzAPw1pXQtgItIPjrG5pqZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmc2X/j9B0/+uMB3y2gAAAABJRU5ErkJggg==";
142266
142488
 
142267
142489
  // ../tool-server/src/tools/screen-recording/watermark.ts
142268
- var execFileAsync25 = (0, import_util9.promisify)(import_child_process6.execFile);
142490
+ var execFileAsync26 = (0, import_util9.promisify)(import_child_process6.execFile);
142269
142491
  var OUTPUT_FPS = 30;
142270
142492
  var FFMPEG_FALLBACK_PATHS = [
142271
142493
  "/opt/homebrew/bin/ffmpeg",
@@ -142282,7 +142504,7 @@ var MASK_DARK_MAX_LUMA = 90;
142282
142504
  var MASK_LIGHT_MIN_LUMA = 165;
142283
142505
  async function resolveBinary(name, fallbacks) {
142284
142506
  try {
142285
- await execFileAsync25("/bin/sh", ["-c", `command -v ${name}`], { timeout: 2e3 });
142507
+ await execFileAsync26("/bin/sh", ["-c", `command -v ${name}`], { timeout: 2e3 });
142286
142508
  return name;
142287
142509
  } catch {
142288
142510
  }
@@ -142860,7 +143082,7 @@ function makePointerControl(simulator) {
142860
143082
  }
142861
143083
 
142862
143084
  // ../tool-server/src/tools/screen-recording/screen-recording-stop.ts
142863
- var import_node_path21 = require("node:path");
143085
+ var import_node_path22 = require("node:path");
142864
143086
  init_zod();
142865
143087
  init_device_info();
142866
143088
  var zodSchema52 = external_exports.object({
@@ -142900,7 +143122,7 @@ Fails if no recording (running or finished-but-unretrieved) exists for the given
142900
143122
  kind: "screen-recording",
142901
143123
  mimeType: "video/mp4",
142902
143124
  // Drop the internal `argent-` temp-file prefix from the saved name.
142903
- filename: (0, import_node_path21.basename)(stopped.outputFile).replace(/^argent-/, ""),
143125
+ filename: (0, import_node_path22.basename)(stopped.outputFile).replace(/^argent-/, ""),
142904
143126
  saveDir: RECORDINGS_DIR
142905
143127
  });
142906
143128
  const result = { video, durationMs: stopped.durationMs };
@@ -142913,7 +143135,7 @@ Fails if no recording (running or finished-but-unretrieved) exists for the given
142913
143135
 
142914
143136
  // ../tool-server/src/tools/profiler/query/profiler-cpu-query.ts
142915
143137
  init_zod();
142916
- init_src();
143138
+ init_src2();
142917
143139
  var import_fs18 = require("fs");
142918
143140
  var timeWindowSchema = external_exports.object({
142919
143141
  start: external_exports.coerce.number().describe(
@@ -143289,7 +143511,7 @@ Fails if no CPU profile is stored \u2014 run react-profiler-stop first.`,
143289
143511
 
143290
143512
  // ../tool-server/src/tools/profiler/query/profiler-commit-query.ts
143291
143513
  init_zod();
143292
- init_src();
143514
+ init_src2();
143293
143515
  var timeRangeSchema = external_exports.object({
143294
143516
  start: external_exports.coerce.number().describe(
143295
143517
  "Start of range in ms since profiling started \u2014 the same clock profiler-commit-query prints"
@@ -143640,7 +143862,7 @@ Fails if react-profiler-stop has not been called or no commit data is stored.`,
143640
143862
 
143641
143863
  // ../tool-server/src/tools/profiler/query/profiler-stack-query.ts
143642
143864
  init_zod();
143643
- init_src();
143865
+ init_src2();
143644
143866
  init_device_info();
143645
143867
  var zodSchema55 = external_exports.object({
143646
143868
  device_id: metroDeviceIdParam("iOS Simulator UDID or Android serial."),
@@ -143991,7 +144213,7 @@ Fails if native-profiler-analyze has not been run or no parsed trace data is in
143991
144213
 
143992
144214
  // ../tool-server/src/tools/profiler/combined/profiler-combined-report.ts
143993
144215
  init_zod();
143994
- init_src();
144216
+ init_src2();
143995
144217
  init_device_info();
143996
144218
 
143997
144219
  // ../tool-server/src/utils/profiler-shared/time-align.ts
@@ -144353,7 +144575,7 @@ function renderCombinedMemoryLeaks(memoryLeaks, mountComponents, mallocStackLogg
144353
144575
  init_zod();
144354
144576
  var import_fs19 = require("fs");
144355
144577
  var path36 = __toESM(require("path"));
144356
- init_src();
144578
+ init_src2();
144357
144579
  init_device_info();
144358
144580
  var SESSION_ID_PATTERN = /^[A-Za-z0-9_-]+$/;
144359
144581
  function assertSafeSessionId(sessionId) {
@@ -144782,7 +145004,7 @@ Fails if the session_id is not found or required XML files are missing from disk
144782
145004
 
144783
145005
  // ../tool-server/src/tools/simulator/stop-simulator-server.ts
144784
145006
  init_zod();
144785
- init_src();
145007
+ init_src2();
144786
145008
  init_device_info();
144787
145009
  init_external_devices();
144788
145010
 
@@ -144893,7 +145115,7 @@ function createStopSimulatorServerTool(registry2) {
144893
145115
 
144894
145116
  // ../tool-server/src/tools/simulator/stop-all-simulator-servers.ts
144895
145117
  init_zod();
144896
- init_src();
145118
+ init_src2();
144897
145119
  init_external_devices();
144898
145120
  var zodSchema59 = external_exports.object({
144899
145121
  devices: external_exports.array(external_exports.string()).optional().describe(
@@ -144982,7 +145204,7 @@ Returns { stopped } - the URNs of the services that were actually live and got s
144982
145204
 
144983
145205
  // ../tool-server/src/tools/simulator/stop-metro.ts
144984
145206
  init_zod();
144985
- var import_node_child_process33 = require("node:child_process");
145207
+ var import_node_child_process34 = require("node:child_process");
144986
145208
  function parseNetstatListeningPids(netstatOutput, port) {
144987
145209
  const pids = /* @__PURE__ */ new Set();
144988
145210
  for (const line of netstatOutput.split(/\r?\n/)) {
@@ -144998,7 +145220,7 @@ function parseNetstatListeningPids(netstatOutput, port) {
144998
145220
  }
144999
145221
  function listeningPids(port) {
145000
145222
  if (process.platform === "win32") {
145001
- const output2 = (0, import_node_child_process33.execFileSync)("netstat", ["-ano"], {
145223
+ const output2 = (0, import_node_child_process34.execFileSync)("netstat", ["-ano"], {
145002
145224
  encoding: "utf-8",
145003
145225
  timeout: 5e3,
145004
145226
  // `netstat -ano` dumps every socket on the host; overflowing Node's
@@ -145007,7 +145229,7 @@ function listeningPids(port) {
145007
145229
  });
145008
145230
  return parseNetstatListeningPids(output2, port);
145009
145231
  }
145010
- const output = (0, import_node_child_process33.execFileSync)("lsof", ["-ti", `tcp:${port}`, "-sTCP:LISTEN"], {
145232
+ const output = (0, import_node_child_process34.execFileSync)("lsof", ["-ti", `tcp:${port}`, "-sTCP:LISTEN"], {
145011
145233
  encoding: "utf-8",
145012
145234
  timeout: 5e3
145013
145235
  }).trim();
@@ -145055,8 +145277,9 @@ var path37 = __toESM(require("node:path"));
145055
145277
  var fs52 = __toESM(require("node:fs/promises"));
145056
145278
  var import_node_fs15 = require("node:fs");
145057
145279
  init_src();
145280
+ init_src2();
145058
145281
  var import_yaml = __toESM(require_dist5());
145059
- init_src();
145282
+ init_src2();
145060
145283
 
145061
145284
  // ../tool-server/src/tools/flows/flow-pinch-geometry.ts
145062
145285
  var PINCH_RATIO_PER_GESTURE = 4;
@@ -145390,7 +145613,7 @@ function appIdForPlatform(launch, platform) {
145390
145613
  if (c === void 0) return null;
145391
145614
  return typeof c === "string" ? c : c.path;
145392
145615
  }
145393
- const v = launch[platform];
145616
+ const v = launch[authoringPlatform(platform)];
145394
145617
  return v ?? launch.native ?? null;
145395
145618
  }
145396
145619
  function chromiumLaunchSpec(launch) {
@@ -146121,6 +146344,10 @@ function isIdleCondition(raw, kind) {
146121
146344
  return true;
146122
146345
  }
146123
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
+ }
146124
146351
  var LAUNCH_MAP_KEYS = ["native", ...LAUNCH_PLATFORMS];
146125
146352
  function parseChromiumLaunch(raw) {
146126
146353
  if (typeof raw === "string" && raw.length > 0) return raw;
@@ -147361,19 +147588,19 @@ costs the finish the cross-tree verdicts anchored to them.`,
147361
147588
  init_zod();
147362
147589
  var fs54 = __toESM(require("node:fs/promises"));
147363
147590
  var path39 = __toESM(require("node:path"));
147364
- init_src();
147591
+ init_src2();
147365
147592
 
147366
147593
  // ../tool-server/src/tools/flows/flow-actions.ts
147367
147594
  init_device_info();
147368
147595
 
147369
147596
  // ../tool-server/src/tools/flows/flow-device.ts
147370
- init_src();
147597
+ init_src2();
147371
147598
  init_device_info();
147372
147599
  var DEVICE_BIND_KEYS = ["udid", "device_id", "device"];
147373
147600
  var DEVICE_BIND_LIST_KEYS = ["devices"];
147374
147601
  var DEVICE_ARG_KEYS = DEVICE_BIND_KEYS;
147375
147602
  function deviceEntryId(d) {
147376
- if (d.platform === "ios") return d.udid;
147603
+ if (d.platform === "ios" || d.platform === "ios-remote") return d.udid;
147377
147604
  if (d.platform === "chromium") return d.id;
147378
147605
  return d.serial;
147379
147606
  }
@@ -147381,6 +147608,8 @@ function isBooted(d) {
147381
147608
  switch (d.platform) {
147382
147609
  case "ios":
147383
147610
  return d.state === "Booted";
147611
+ case "ios-remote":
147612
+ return d.state === "Booted";
147384
147613
  case "android":
147385
147614
  return d.state === "device";
147386
147615
  case "vega":
@@ -147509,7 +147738,8 @@ function bindDeviceArgs(registry2, toolName, deviceId, args, deviceIsExplicit =
147509
147738
  }
147510
147739
 
147511
147740
  // ../tool-server/src/tools/flows/flow-ios-tree.ts
147512
- init_src();
147741
+ init_src2();
147742
+ init_device_info();
147513
147743
 
147514
147744
  // ../tool-server/src/tools/flows/flow-tree-flatten.ts
147515
147745
  function intersectClip(rect, clip3) {
@@ -147675,6 +147905,7 @@ function adaptFullHierarchy(raw) {
147675
147905
  });
147676
147906
  return screenW > 0 && screenH > 0 ? { tree, screen: { width: screenW, height: screenH } } : { tree };
147677
147907
  }
147908
+ var FLOW_TREE_MAX_DEPTH = 100;
147678
147909
  var FULL_HIERARCHY_FIELDS = [
147679
147910
  "className",
147680
147911
  "identifier",
@@ -147706,9 +147937,9 @@ async function queryFullHierarchyTree(registry2, device, target) {
147706
147937
  const ndRef = nativeDevtoolsRef(device);
147707
147938
  nativeApi = await registry2.resolveService(ndRef.urn, ndRef.options);
147708
147939
  } catch (err) {
147709
- throw new Error(
147940
+ throw wrapPreservingFailure(
147710
147941
  `native devtools is unavailable (${errMsg2(err)}) \u2014 flows resolve selectors against the full view hierarchy it serves`,
147711
- { cause: err }
147942
+ err
147712
147943
  );
147713
147944
  }
147714
147945
  let bundleId;
@@ -147777,7 +148008,7 @@ async function queryFullHierarchyTree(registry2, device, target) {
147777
148008
  resolved = await resolveNativeTargetApp(nativeApi, void 0);
147778
148009
  } catch (err) {
147779
148010
  const timedOut2 = getFailureSignal(err)?.error_code === FAILURE_CODES.NATIVE_DEVTOOLS_RPC_TIMEOUT;
147780
- if (!timedOut2 || !target) throw err;
148011
+ if (!timedOut2 || !target) throw await explainTargetingFailure(err, nativeApi, device, target);
147781
148012
  if (!isInjectableBundleId(target.bundleId)) {
147782
148013
  throw new FailureError(
147783
148014
  systemAppFlowTargetRefusal(target.bundleId),
@@ -147790,13 +148021,15 @@ async function queryFullHierarchyTree(registry2, device, target) {
147790
148021
  err instanceof Error ? { cause: err } : void 0
147791
148022
  );
147792
148023
  }
147793
- if (!nativeApi.listConnectedBundleIds().includes(target.bundleId)) throw err;
148024
+ if (!nativeApi.listConnectedBundleIds().includes(target.bundleId)) {
148025
+ throw await explainTargetingFailure(err, nativeApi, device, target);
148026
+ }
147794
148027
  let hintState;
147795
148028
  try {
147796
148029
  hintState = await nativeApi.getAppState(target.bundleId);
147797
148030
  } catch (probeErr) {
147798
148031
  if (getFailureSignal(probeErr)?.error_code === FAILURE_CODES.NATIVE_DEVTOOLS_RPC_TIMEOUT) {
147799
- throw err;
148032
+ throw await explainTargetingFailure(err, nativeApi, device, target);
147800
148033
  }
147801
148034
  throw probeErr;
147802
148035
  }
@@ -147815,13 +148048,18 @@ async function queryFullHierarchyTree(registry2, device, target) {
147815
148048
  resolved = { bundleId: target.bundleId };
147816
148049
  }
147817
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
+ }
147818
148056
  }
147819
148057
  const rawResult = await nativeApi.queryViewHierarchy(
147820
148058
  bundleId,
147821
148059
  "ViewHierarchy.getFullHierarchy",
147822
148060
  {
147823
148061
  fields: FULL_HIERARCHY_FIELDS,
147824
- maxDepth: 40
148062
+ maxDepth: FLOW_TREE_MAX_DEPTH
147825
148063
  }
147826
148064
  );
147827
148065
  if (rawResult.error) {
@@ -147838,6 +148076,89 @@ async function queryFullHierarchyTree(registry2, device, target) {
147838
148076
  function errMsg2(err) {
147839
148077
  return err instanceof Error ? err.message : String(err);
147840
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
+ }
147841
148162
  function projectIosDeviceNode(node) {
147842
148163
  const onScreen = node.frame.width > 0 && node.frame.height > 0;
147843
148164
  return {
@@ -147982,10 +148303,7 @@ async function queryAndroidFullHierarchy(registry2, device) {
147982
148303
  devtools = await registry2.resolveService(ref.urn, ref.options);
147983
148304
  } catch (err) {
147984
148305
  const msg = err instanceof Error ? err.message : String(err);
147985
- throw new Error(
147986
- `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\`)`,
147987
- { cause: err }
147988
- );
148306
+ throw new Error(`the argent android helper is unavailable: ${msg}`, { cause: err });
147989
148307
  }
147990
148308
  const [{ xml }, size] = await Promise.all([
147991
148309
  // clearCache: await/assert polls must see text changes, not cached reads.
@@ -148075,21 +148393,22 @@ async function queryVegaTree(device) {
148075
148393
 
148076
148394
  // ../tool-server/src/tools/flows/flow-tree.ts
148077
148395
  async function fetchFlowTree(registry2, device, target) {
148078
- const source = FLOW_TREE_SOURCES[device.platform];
148079
- if (!source) return fetchTree(registry2, device);
148080
- return source(registry2, device, target);
148396
+ return FLOW_TREE_SOURCES[device.platform](registry2, device, target);
148081
148397
  }
148082
148398
  var FLOW_TREE_SOURCES = {
148083
148399
  // Simulator iOS uses the injected hierarchy and an optional target.
148084
148400
  // Physical devices use the XCUITest runner tree.
148085
- ios: (registry2, device, target) => device.kind === "device" ? queryIosDeviceFlowTree(registry2, device) : queryFullHierarchyTree(registry2, device, target),
148086
- android: (registry2, device) => queryAndroidFullHierarchy(registry2, device),
148087
- chromium: (registry2, device) => queryChromiumTree(registry2, device),
148088
- vega: (_registry, device) => queryVegaTree(device)
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)
148089
148411
  };
148090
- function supportsFlowTree(platform) {
148091
- return FLOW_TREE_SOURCES[platform] !== void 0;
148092
- }
148093
148412
 
148094
148413
  // ../tool-server/src/tools/flows/flow-pixels.ts
148095
148414
  var fs53 = __toESM(require("node:fs/promises"));
@@ -148120,10 +148439,14 @@ var FIRST_CAPTURE_COMPLETION_MARGIN_MS = 500;
148120
148439
  var FIRST_PIXEL_CAPTURE_TIMEOUT_MS = FIRST_FRAME_WAIT_MS + FIRST_CAPTURE_COMPLETION_MARGIN_MS;
148121
148440
  var PIXEL_CAPTURE_TIMEOUT_MS = 2e3;
148122
148441
  var IOS_DEVICE_PIXEL_CAPTURE_TIMEOUT_MS = 4e3;
148442
+ var REMOTE_PIXEL_CAPTURE_TIMEOUT_MS = 4e3;
148123
148443
  function pixelCaptureTimeoutMs(device, firstCapture) {
148124
148444
  if (isIosPhysicalDevice(device)) {
148125
148445
  return IOS_DEVICE_PIXEL_CAPTURE_TIMEOUT_MS;
148126
148446
  }
148447
+ if (device.platform === "ios-remote" && !firstCapture) {
148448
+ return REMOTE_PIXEL_CAPTURE_TIMEOUT_MS;
148449
+ }
148127
148450
  const warmFromTheStart = device.platform === "chromium" || device.platform === "vega";
148128
148451
  return firstCapture && !warmFromTheStart ? FIRST_PIXEL_CAPTURE_TIMEOUT_MS : PIXEL_CAPTURE_TIMEOUT_MS;
148129
148452
  }
@@ -148533,12 +148856,10 @@ async function runDirective(env, step) {
148533
148856
  }
148534
148857
  async function settleForGesture(env) {
148535
148858
  let warning;
148536
- if (supportsFlowTree(env.device.platform)) {
148537
- try {
148538
- await settleTree(env, { skipProvenOutage: true });
148539
- } catch (err) {
148540
- warning = unsettledGestureWarning(err);
148541
- }
148859
+ try {
148860
+ await settleTree(env, { skipProvenOutage: true });
148861
+ } catch (err) {
148862
+ warning = unsettledGestureWarning(err);
148542
148863
  }
148543
148864
  if (env.signal?.aborted) return { aborted: true };
148544
148865
  return warning !== void 0 ? { warning } : {};
@@ -149414,12 +149735,12 @@ function recordedLaunchedApp(session, platform) {
149414
149735
  return void 0;
149415
149736
  }
149416
149737
  function fallbackSourceWarning(source, platform) {
149417
- const expected = REPLAY_TREE_SOURCES[platform];
149738
+ const expected = REPLAY_TREE_SOURCES[authoringPlatform(platform)];
149418
149739
  if (!expected || source === expected) return void 0;
149419
149740
  return `selector captured from the fallback ${source} tree (${expected} unavailable) \u2014 replay resolves against the full hierarchy, which may not match it`;
149420
149741
  }
149421
149742
  function platformOf(udid) {
149422
- return typeof udid === "string" ? resolveDevice(udid).platform : void 0;
149743
+ return typeof udid === "string" ? authoringPlatform(resolveDevice(udid).platform) : void 0;
149423
149744
  }
149424
149745
  var UNSUPPORTED_PLATFORM = {
149425
149746
  divergence: "The recorder and the runner read different projections of the screen.",
@@ -149494,7 +149815,7 @@ function unmetWaitWarningFor(cause) {
149494
149815
  }
149495
149816
  function indeterminateReasonCaveat(udid) {
149496
149817
  if (platformOf(udid) !== "ios") return "";
149497
- return ". That reason may tell you to pass `bundleId` \u2014 it is quoted from the shared native-target error, and it does not apply here: 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). What the runner's iOS tree needs is an app with argent's instrumentation loaded \u2014 relaunch it with `launch-app` or a flow `launch:` step. An app that cannot load it at all, such as a `com.apple.*` system app, can never be probed or converted: keep the check as a raw `tool:` step";
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)";
149498
149819
  }
149499
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";
149500
149821
  var PROBE_MAX_TREE_READ_MS = 2500;
@@ -149568,6 +149889,15 @@ async function probeAgainstRunnerTree(registry2, ctx, args) {
149568
149889
  (condition === "text" ? textTieClause(args.udid) : "") + " " + SPELLING_CLAUSE + ` ${treeDivergenceFor(args.udid, condition)} ${runnerSideReadClause(args.udid, condition)}`
149569
149890
  };
149570
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
+ }
149571
149901
  async function captureTapSelector(registry2, session, udid, point) {
149572
149902
  try {
149573
149903
  const device = resolveDevice(udid);
@@ -149593,10 +149923,15 @@ async function captureTapSelector(registry2, session, udid, point) {
149593
149923
  warning: `selector ${describeSelector(selector)} resolves to a different element on this screen; kept coordinates (brittle)`
149594
149924
  };
149595
149925
  }
149596
- return { selector, warning: fallbackSourceWarning(source, device.platform) };
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("; ") } : {} };
149597
149931
  } catch (err) {
149932
+ const message = err instanceof Error ? err.message : String(err);
149598
149933
  return {
149599
- warning: `selector capture failed (${err instanceof Error ? err.message : String(err)}); kept coordinates`
149934
+ warning: `selector capture failed (${innermostTreeReason(message)}); kept coordinates`
149600
149935
  };
149601
149936
  }
149602
149937
  }
@@ -149854,6 +150189,17 @@ Returns { message, stepCount, recorded, savedTo }; \`recorded\`, not the status,
149854
150189
  error_kind: "validation"
149855
150190
  });
149856
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
+ }
149857
150203
  let waitWarning;
149858
150204
  if (params.command === AWAIT_UI_ELEMENT_TOOL_ID) {
149859
150205
  if (isUnmetUiWaitResult(params.command, toolResult)) {
@@ -149966,7 +150312,7 @@ Returns { message, stepCount, savedTo }. Fails if that flow has no recording in
149966
150312
  // ../tool-server/src/tools/flows/flow-add-script.ts
149967
150313
  init_zod();
149968
150314
  var nodePath = __toESM(require("node:path"));
149969
- init_src();
150315
+ init_src2();
149970
150316
 
149971
150317
  // ../tool-server/src/tools/flows/flow-file-refs.ts
149972
150318
  var fs55 = __toESM(require("node:fs/promises"));
@@ -149997,15 +150343,16 @@ async function resolveFlowRelativeFile(anchorDir, target, addressable) {
149997
150343
  var fs57 = __toESM(require("node:fs/promises"));
149998
150344
  var path42 = __toESM(require("node:path"));
149999
150345
  var import_node_url4 = require("node:url");
150000
- init_src();
150346
+ init_src2();
150001
150347
 
150002
150348
  // ../tool-server/src/tools/flows/script/flow-script-executor.ts
150003
- var import_node_child_process34 = require("node:child_process");
150349
+ var import_node_child_process35 = require("node:child_process");
150004
150350
  var fs56 = __toESM(require("node:fs"));
150005
150351
  var os17 = __toESM(require("node:os"));
150006
150352
  var path41 = __toESM(require("node:path"));
150007
150353
  var import_node_string_decoder = require("node:string_decoder");
150008
150354
  var import_node_url3 = require("node:url");
150355
+ init_src();
150009
150356
 
150010
150357
  // ../tool-server/src/tools/flows/script/flow-script-protocol.ts
150011
150358
  var SCRIPT_MAX_OUTPUT_BYTES = 1024 * 1024;
@@ -150384,7 +150731,7 @@ var FlowScriptExecutor = class {
150384
150731
  detached: process.platform !== "win32",
150385
150732
  windowsHide: process.platform === "win32"
150386
150733
  };
150387
- child = (0, import_node_child_process34.fork)(scriptPath, [], forkOptions);
150734
+ child = (0, import_node_child_process35.fork)(scriptPath, [], forkOptions);
150388
150735
  } catch (err) {
150389
150736
  return emptyResult(
150390
150737
  { kind: "spawn", message: `Could not start the script process: ${errorMessage(err)}` },
@@ -150825,7 +151172,7 @@ async function stopProcessTree(child, graceMs) {
150825
151172
  if (process.platform === "win32") {
150826
151173
  if (hasExited(child)) return;
150827
151174
  tryKill(() => {
150828
- const killer = (0, import_node_child_process34.spawn)("taskkill", ["/pid", String(pid), "/t", "/f"], {
151175
+ const killer = (0, import_node_child_process35.spawn)("taskkill", ["/pid", String(pid), "/t", "/f"], {
150829
151176
  windowsHide: true,
150830
151177
  stdio: "ignore"
150831
151178
  });
@@ -151525,7 +151872,7 @@ You can still edit the .yaml file directly afterwards to remove or reorder steps
151525
151872
  init_zod();
151526
151873
  var fs61 = __toESM(require("node:fs/promises"));
151527
151874
  var path45 = __toESM(require("node:path"));
151528
- init_src();
151875
+ init_src2();
151529
151876
 
151530
151877
  // ../tool-server/src/tools/flows/flow-nested-outcome.ts
151531
151878
  var FLOW_EXECUTE_TOOL_ID = "flow-execute";
@@ -151614,11 +151961,12 @@ var import_pngjs4 = __toESM(require_png());
151614
151961
  var import_promises11 = __toESM(require("fs/promises"));
151615
151962
  var import_path7 = __toESM(require("path"));
151616
151963
  var import_pngjs3 = __toESM(require_png());
151964
+ init_src2();
151617
151965
 
151618
151966
  // ../tool-server/src/tools/screenshot-diff/screenshot-diff-ocr.ts
151619
151967
  var import_child_process8 = require("child_process");
151620
151968
  var import_util10 = require("util");
151621
- var execFileAsync26 = (0, import_util10.promisify)(import_child_process8.execFile);
151969
+ var execFileAsync27 = (0, import_util10.promisify)(import_child_process8.execFile);
151622
151970
  var OCR_TIMEOUT_MS = 1e4;
151623
151971
  var OCR_MAX_BUFFER_BYTES = 32 * 1024 * 1024;
151624
151972
  var TESSERACT_BINARY = "tesseract";
@@ -151663,7 +152011,7 @@ async function extractOcrTextBlocks(imagePath) {
151663
152011
  }
151664
152012
  }
151665
152013
  async function recognizeTsv(imagePath) {
151666
- const { stdout } = await execFileAsync26(
152014
+ const { stdout } = await execFileAsync27(
151667
152015
  TESSERACT_BINARY,
151668
152016
  [
151669
152017
  imagePath,
@@ -153348,13 +153696,25 @@ async function writeDiffArtifacts(params) {
153348
153696
  );
153349
153697
  }
153350
153698
  async function decodePngFile(filePath) {
153351
- const buffer = await import_promises11.default.readFile(filePath);
153352
- const png = import_pngjs3.PNG.sync.read(buffer);
153353
- return {
153354
- width: png.width,
153355
- height: png.height,
153356
- data: png.data
153357
- };
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
+ }
153358
153718
  }
153359
153719
  async function analyzeScreenshotTextChangesSafely(options) {
153360
153720
  try {
@@ -153742,7 +154102,7 @@ async function runSnapshot(env, opts) {
153742
154102
  });
153743
154103
  const { w, h } = await pngDimensions(shot.image.hostPath);
153744
154104
  const cropSuffix = opts.cropOn === void 0 ? "" : `-crop-${(0, import_node_crypto12.createHash)("sha256").update(cropIdentity(opts.cropOn)).digest("hex").slice(0, 8)}`;
153745
- const snapshotKey = `${opts.name}__${env.device.platform}-${w}x${h}${cropSuffix}`;
154105
+ const snapshotKey = `${opts.name}__${authoringPlatform(env.device.platform)}-${w}x${h}${cropSuffix}`;
153746
154106
  const key2 = `${snapshotKey}.png`;
153747
154107
  const dir = baselineDir(opts.flowsDir, opts.flowName);
153748
154108
  const baselinePath = path44.join(dir, key2);
@@ -153793,9 +154153,10 @@ async function runSnapshot(env, opts) {
153793
154153
  kind: "screenshot",
153794
154154
  mimeType: "image/png"
153795
154155
  });
154156
+ const source = env.device.platform === "ios-remote" ? " from a remote simulator" : "";
153796
154157
  return {
153797
154158
  status: "pass",
153798
- reason: exists2 ? `baseline updated (${key2})` : `baseline written (${key2})`,
154159
+ reason: exists2 ? `baseline updated${source} (${key2})` : `baseline written${source} (${key2})`,
153799
154160
  snapshotKey,
153800
154161
  artifacts: { baseline }
153801
154162
  };
@@ -153875,36 +154236,47 @@ async function runSnapshot(env, opts) {
153875
154236
  }
153876
154237
 
153877
154238
  // ../tool-server/src/utils/status-bar.ts
153878
- var import_node_child_process35 = require("node:child_process");
153879
- var import_node_util25 = require("node:util");
154239
+ var import_node_child_process36 = require("node:child_process");
154240
+ var import_node_util26 = require("node:util");
153880
154241
  init_adb();
153881
154242
  init_device_info();
153882
- var execFileAsync27 = (0, import_node_util25.promisify)(import_node_child_process35.execFile);
154243
+ var execFileAsync28 = (0, import_node_util26.promisify)(import_node_child_process36.execFile);
153883
154244
  var DEMO_BROADCAST = "am broadcast -a com.android.systemui.demo";
153884
- async function pinStatusBar(device) {
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;
153885
154264
  if (isIosPhysicalDevice(device)) return false;
153886
154265
  try {
153887
154266
  if (device.platform === "ios") {
153888
- await execFileAsync27(
154267
+ await execFileAsync28(
153889
154268
  "xcrun",
153890
- await simctlArgsForUdid(device.id, [
153891
- "status_bar",
153892
- device.id,
153893
- "override",
153894
- "--time",
153895
- "9:37",
153896
- "--batteryState",
153897
- "charged",
153898
- "--batteryLevel",
153899
- "100",
153900
- "--wifiBars",
153901
- "3",
153902
- "--cellularBars",
153903
- "4"
153904
- ])
154269
+ await simctlArgsForUdid(device.id, ["status_bar", device.id, ...IOS_STATUS_BAR_OVERRIDE])
153905
154270
  );
153906
154271
  return true;
153907
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
+ }
153908
154280
  if (device.platform === "android") {
153909
154281
  await adbShell(device.id, "settings put global sysui_demo_allowed 1");
153910
154282
  await adbShell(device.id, `${DEMO_BROADCAST} -e command enter`);
@@ -153922,16 +154294,20 @@ async function pinStatusBar(device) {
153922
154294
  return false;
153923
154295
  } catch {
153924
154296
  const restored = await restoreStatusBar(device);
153925
- return device.platform === "android" && !restored;
154297
+ return (device.platform === "android" || device.platform === "ios-remote") && !restored;
153926
154298
  }
153927
154299
  }
153928
154300
  async function restoreStatusBar(device) {
153929
154301
  try {
153930
154302
  if (device.platform === "ios") {
153931
- await execFileAsync27(
154303
+ await execFileAsync28(
153932
154304
  "xcrun",
153933
154305
  await simctlArgsForUdid(device.id, ["status_bar", device.id, "clear"])
153934
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
+ }
153935
154311
  } else if (device.platform === "android") {
153936
154312
  try {
153937
154313
  await adbShell(device.id, `${DEMO_BROADCAST} -e command exit`);
@@ -153962,8 +154338,8 @@ var zodSchema66 = external_exports.object({
153962
154338
  device: external_exports.string().optional().describe(
153963
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."
153964
154340
  ),
153965
- platform: external_exports.enum(LAUNCH_PLATFORMS).optional().describe(
153966
- "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."
153967
154343
  ),
153968
154344
  updateBaselines: external_exports.boolean().optional().describe(
153969
154345
  "Write/refresh screenshot baselines for `snapshot` steps instead of diffing against them."
@@ -154064,9 +154440,9 @@ async function androidDevtoolsReady(registry2, device) {
154064
154440
  try {
154065
154441
  const ref = androidDevtoolsRef(device);
154066
154442
  const api = await registry2.resolveService(ref.urn, ref.options);
154067
- return api.isReady();
154068
- } catch {
154069
- return false;
154443
+ return { ready: api.isReady() };
154444
+ } catch (err) {
154445
+ return { ready: false, reason: err instanceof Error ? err.message : String(err) };
154070
154446
  }
154071
154447
  }
154072
154448
  async function treeSourceGate(registry2, device, bundleId, signal) {
@@ -154079,16 +154455,16 @@ async function treeSourceGate(registry2, device, bundleId, signal) {
154079
154455
  return `the on-device XCUITest runner did not become ready for ${device.id}: ${err instanceof Error ? err.message : String(err)}`;
154080
154456
  }
154081
154457
  }
154082
- if (device.platform === "ios" && !signal?.aborted) {
154458
+ if ((device.platform === "ios" || device.platform === "ios-remote") && !signal?.aborted) {
154083
154459
  const reason = await waitForNativeDevtools(registry2, device, bundleId, signal);
154084
154460
  if (reason !== null && !signal?.aborted) {
154085
154461
  return `could not connect to native devtools. ${reason}`;
154086
154462
  }
154087
154463
  }
154088
154464
  if (device.platform === "android" && !signal?.aborted) {
154089
- const ready2 = await androidDevtoolsReady(registry2, device);
154465
+ const { ready: ready2, reason } = await androidDevtoolsReady(registry2, device);
154090
154466
  if (!ready2 && !signal?.aborted) {
154091
- return `could not reach the Android devtools helper (full-hierarchy source for testID selectors). Confirm the device is unlocked and the argent helper can be installed (\`adb install -t\`); a locked device or a blocked install is the usual cause. Re-run once resolved.`;
154467
+ return reason ? `the argent android helper is unavailable: ${reason}` : `the argent android helper is unavailable (full-hierarchy source for testID selectors).`;
154092
154468
  }
154093
154469
  }
154094
154470
  if (device.platform === "vega" && !signal?.aborted) {
@@ -154108,7 +154484,7 @@ async function runLaunch(state3, app) {
154108
154484
  if (!bundleId) {
154109
154485
  return {
154110
154486
  ok: false,
154111
- 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`
154112
154488
  };
154113
154489
  }
154114
154490
  state3.treeTarget = void 0;
@@ -154440,7 +154816,7 @@ Returns a per-step report: the first failure stops the run and the rest report a
154440
154816
  viaUpload
154441
154817
  );
154442
154818
  const device = resolved.device;
154443
- const statusBarPinned = device !== null && await pinStatusBar(device);
154819
+ const statusBarPinned = device !== null && await pinStatusBar(device, signal);
154444
154820
  if (device?.platform === "chromium") await frontChromiumPage(registry2, device);
154445
154821
  const state3 = {
154446
154822
  registry: registry2,
@@ -154791,7 +155167,7 @@ async function execWhenStep(state3, step, scope) {
154791
155167
  let met;
154792
155168
  if (step.condition.kind === "platform") {
154793
155169
  const guardEnv = deviceEnv(state3);
154794
- const platform = guardEnv.device.platform === "ios-remote" ? "ios" : guardEnv.device.platform;
155170
+ const platform = authoringPlatform(guardEnv.device.platform);
154795
155171
  met = platform === step.condition.platform;
154796
155172
  } else {
154797
155173
  const probe3 = await probeWhenCondition(deviceEnv(state3), step.condition);
@@ -154966,6 +155342,7 @@ async function execLeafStep(state3, step, index, scope) {
154966
155342
  status: r.status,
154967
155343
  reason: r.reason,
154968
155344
  snapshotKey: r.snapshotKey,
155345
+ ...r.snapshotKey !== void 0 && state3.device?.platform === "ios-remote" ? { snapshotRemote: true } : {},
154969
155346
  artifacts: r.artifacts
154970
155347
  };
154971
155348
  } catch (err) {
@@ -155267,8 +155644,8 @@ init_zod();
155267
155644
 
155268
155645
  // ../tool-server/src/utils/workspace-reader.ts
155269
155646
  var import_promises12 = require("node:fs/promises");
155270
- var import_node_path22 = require("node:path");
155271
- var import_node_child_process36 = require("node:child_process");
155647
+ var import_node_path23 = require("node:path");
155648
+ var import_node_child_process37 = require("node:child_process");
155272
155649
  var import_dotenv2 = __toESM(require_main());
155273
155650
  async function exists(path50) {
155274
155651
  try {
@@ -155312,7 +155689,7 @@ async function listDir(path50) {
155312
155689
  var COMMAND_TIMEOUT_MS = 3e3;
155313
155690
  function runVersionCommand(cmd, args, cwd) {
155314
155691
  return new Promise((resolve14) => {
155315
- const child = (0, import_node_child_process36.execFile)(cmd, args, { cwd, timeout: COMMAND_TIMEOUT_MS }, (err, stdout) => {
155692
+ const child = (0, import_node_child_process37.execFile)(cmd, args, { cwd, timeout: COMMAND_TIMEOUT_MS }, (err, stdout) => {
155316
155693
  if (err) {
155317
155694
  resolve14(null);
155318
155695
  return;
@@ -155355,7 +155732,7 @@ async function detectLockfile(workspacePath) {
155355
155732
  const checks = await Promise.all(
155356
155733
  LOCKFILES.map(async (name) => ({
155357
155734
  name,
155358
- exists: await exists((0, import_node_path22.join)(workspacePath, name))
155735
+ exists: await exists((0, import_node_path23.join)(workspacePath, name))
155359
155736
  }))
155360
155737
  );
155361
155738
  return checks.find((c) => c.exists)?.name ?? null;
@@ -155374,7 +155751,7 @@ var CI_CONFIGS = [
155374
155751
  ];
155375
155752
  async function detectCiConfig(workspacePath) {
155376
155753
  for (const ci of CI_CONFIGS) {
155377
- if (await exists((0, import_node_path22.join)(workspacePath, ci.path))) return ci.label;
155754
+ if (await exists((0, import_node_path23.join)(workspacePath, ci.path))) return ci.label;
155378
155755
  }
155379
155756
  return null;
155380
155757
  }
@@ -155395,7 +155772,7 @@ async function detectLintStagedConfig(workspacePath, packageJson) {
155395
155772
  return packageJson["lint-staged"];
155396
155773
  }
155397
155774
  for (const file2 of LINT_STAGED_FILES) {
155398
- const full = (0, import_node_path22.join)(workspacePath, file2);
155775
+ const full = (0, import_node_path23.join)(workspacePath, file2);
155399
155776
  if (await exists(full)) {
155400
155777
  if (file2.endsWith(".json") || file2 === ".lintstagedrc") {
155401
155778
  return readJsonFile(full);
@@ -155437,7 +155814,7 @@ var CONFIG_FILES = [
155437
155814
  async function detectConfigFiles(workspacePath) {
155438
155815
  const results = await Promise.allSettled(
155439
155816
  CONFIG_FILES.map(async (file2) => {
155440
- if (await exists((0, import_node_path22.join)(workspacePath, file2))) return file2;
155817
+ if (await exists((0, import_node_path23.join)(workspacePath, file2))) return file2;
155441
155818
  return null;
155442
155819
  })
155443
155820
  );
@@ -155476,7 +155853,7 @@ async function detectEnvFiles(workspacePath) {
155476
155853
  const envFileNames = entries.filter((e) => e === ".env" || e.startsWith(".env."));
155477
155854
  const results = await Promise.all(
155478
155855
  envFileNames.map(async (name) => {
155479
- const content = await readTextFile((0, import_node_path22.join)(workspacePath, name));
155856
+ const content = await readTextFile((0, import_node_path23.join)(workspacePath, name));
155480
155857
  return {
155481
155858
  name,
155482
155859
  keys: content ? extractEnvKeys(content) : []
@@ -155503,34 +155880,34 @@ async function readWorkspaceSnapshot(workspacePath) {
155503
155880
  ciConfig,
155504
155881
  configFilesFound
155505
155882
  ] = await Promise.all([
155506
- readJsonFile((0, import_node_path22.join)(workspacePath, "package.json")),
155507
- readJsonFile((0, import_node_path22.join)(workspacePath, "app.json")),
155508
- readJsonFile((0, import_node_path22.join)(workspacePath, "eas.json")),
155509
- readJsonFile((0, import_node_path22.join)(workspacePath, "tsconfig.json")),
155510
- readTextFile((0, import_node_path22.join)(workspacePath, "metro.config.js")).then(
155511
- (r) => r ?? readTextFile((0, import_node_path22.join)(workspacePath, "metro.config.ts"))
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"))
155512
155889
  ),
155513
- readTextFile((0, import_node_path22.join)(workspacePath, "babel.config.js")).then(
155514
- (r) => r ?? readTextFile((0, import_node_path22.join)(workspacePath, "babel.config.cjs"))
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"))
155515
155892
  ),
155516
- isDirectory((0, import_node_path22.join)(workspacePath, "ios")),
155517
- isDirectory((0, import_node_path22.join)(workspacePath, "android")),
155893
+ isDirectory((0, import_node_path23.join)(workspacePath, "ios")),
155894
+ isDirectory((0, import_node_path23.join)(workspacePath, "android")),
155518
155895
  detectLockfile(workspacePath),
155519
155896
  detectEnvFiles(workspacePath),
155520
155897
  detectToolVersions(workspacePath),
155521
- listDir((0, import_node_path22.join)(workspacePath, "scripts")),
155522
- listDir((0, import_node_path22.join)(workspacePath, ".husky")),
155898
+ listDir((0, import_node_path23.join)(workspacePath, "scripts")),
155899
+ listDir((0, import_node_path23.join)(workspacePath, ".husky")),
155523
155900
  detectCiConfig(workspacePath),
155524
155901
  detectConfigFiles(workspacePath)
155525
155902
  ]);
155526
- const iosDir = (0, import_node_path22.join)(workspacePath, "ios");
155527
- const androidDir = (0, import_node_path22.join)(workspacePath, "android");
155903
+ const iosDir = (0, import_node_path23.join)(workspacePath, "ios");
155904
+ const androidDir = (0, import_node_path23.join)(workspacePath, "android");
155528
155905
  const [iosWorkspace, iosHasPodfile, makefileText, lintStagedConfig, androidHasGradle] = await Promise.all([
155529
155906
  hasIosDir ? findIosWorkspace(iosDir) : Promise.resolve(null),
155530
- exists((0, import_node_path22.join)(workspacePath, "ios", "Podfile")),
155531
- readTextFile((0, import_node_path22.join)(workspacePath, "Makefile")),
155907
+ exists((0, import_node_path23.join)(workspacePath, "ios", "Podfile")),
155908
+ readTextFile((0, import_node_path23.join)(workspacePath, "Makefile")),
155532
155909
  detectLintStagedConfig(workspacePath, packageJson),
155533
- hasAndroidDir ? exists((0, import_node_path22.join)(androidDir, "gradlew")) : Promise.resolve(false)
155910
+ hasAndroidDir ? exists((0, import_node_path23.join)(androidDir, "gradlew")) : Promise.resolve(false)
155534
155911
  ]);
155535
155912
  const metroPort2 = metroConfigRaw ? extractMetroPort(metroConfigRaw) : null;
155536
155913
  const makefileTargets = makefileText ? extractMakefileTargets(makefileText) : null;
@@ -155601,7 +155978,7 @@ Fails if the workspacePath is not an absolute path or the directory cannot be ac
155601
155978
  };
155602
155979
 
155603
155980
  // ../tool-server/src/tools/system/update-argent.ts
155604
- var import_node_child_process37 = require("node:child_process");
155981
+ var import_node_child_process38 = require("node:child_process");
155605
155982
  var fs63 = __toESM(require("node:fs"));
155606
155983
  var path46 = __toESM(require("node:path"));
155607
155984
  init_zod();
@@ -155736,7 +156113,7 @@ var updateArgentTool = {
155736
156113
  if (spawnRoot) updateArgs.push("--project-root", spawnRoot);
155737
156114
  const cmd = cliEntry ? process.execPath : "argent";
155738
156115
  const args = cliEntry ? [cliEntry, ...updateArgs] : updateArgs;
155739
- const child = (0, import_node_child_process37.spawn)(cmd, args, {
156116
+ const child = (0, import_node_child_process38.spawn)(cmd, args, {
155740
156117
  detached: true,
155741
156118
  stdio: "ignore",
155742
156119
  env: { ...process.env, ARGENT_UPDATE_TRIGGER: "mcp_update" }
@@ -155793,7 +156170,7 @@ var import_promises13 = __toESM(require("fs/promises"));
155793
156170
  var import_node_os13 = __toESM(require("node:os"));
155794
156171
  var import_path8 = __toESM(require("path"));
155795
156172
  init_zod();
155796
- init_src();
156173
+ init_src2();
155797
156174
  init_device_info();
155798
156175
  var zodSchema71 = external_exports.object({
155799
156176
  baselinePath: external_exports.string().min(1).optional().describe("Path to the baseline PNG file. Required unless captureBaseline is true."),
@@ -156269,7 +156646,7 @@ disconnects (aborts cleanly).`,
156269
156646
 
156270
156647
  // ../tool-server/src/tools/chromium-tabs/index.ts
156271
156648
  init_zod();
156272
- init_src();
156649
+ init_src2();
156273
156650
  init_device_info();
156274
156651
  var zodSchema74 = external_exports.object({
156275
156652
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
@@ -156357,11 +156734,11 @@ Returns { tabs: [{ tabId, targetId, title, url, active, label? }] }. Fails if th
156357
156734
 
156358
156735
  // ../tool-server/src/tools/chromium-cookies/index.ts
156359
156736
  init_zod();
156360
- init_src();
156737
+ init_src2();
156361
156738
  init_device_info();
156362
156739
 
156363
156740
  // ../tool-server/src/chromium-server/storage.ts
156364
- init_src();
156741
+ init_src2();
156365
156742
  async function getCookies(cdp, urls) {
156366
156743
  const out = await cdp.send("Network.getCookies", urls && urls.length ? { urls } : {});
156367
156744
  return out.cookies ?? [];
@@ -156529,7 +156906,7 @@ Returns { cookies, count } for get, or a small status object ({ set } / { delete
156529
156906
 
156530
156907
  // ../tool-server/src/tools/chromium-storage/index.ts
156531
156908
  init_zod();
156532
- init_src();
156909
+ init_src2();
156533
156910
  init_device_info();
156534
156911
  var zodSchema76 = external_exports.object({
156535
156912
  udid: external_exports.string().describe("Chromium device id from `list-devices` (e.g. `chromium-cdp-9222`)."),
@@ -156738,13 +157115,13 @@ function probeArgentToolServer(host, port, timeoutMs = 500) {
156738
157115
 
156739
157116
  // ../tool-server/src/utils/simulator-watcher.ts
156740
157117
  var fs65 = __toESM(require("node:fs"));
156741
- var import_node_child_process38 = require("node:child_process");
156742
- var import_node_util26 = require("node:util");
157118
+ var import_node_child_process39 = require("node:child_process");
157119
+ var import_node_util27 = require("node:util");
156743
157120
  init_external_devices();
156744
- var execFileAsync28 = (0, import_node_util26.promisify)(import_node_child_process38.execFile);
157121
+ var execFileAsync29 = (0, import_node_util27.promisify)(import_node_child_process39.execFile);
156745
157122
  var POLL_INTERVAL_MS2 = 1e4;
156746
157123
  async function getBootedUdidsInSet(deviceSet) {
156747
- const { stdout } = await execFileAsync28("xcrun", [
157124
+ const { stdout } = await execFileAsync29("xcrun", [
156748
157125
  ...simctlPrefix(deviceSet),
156749
157126
  "list",
156750
157127
  "devices",
@@ -156863,7 +157240,7 @@ function startSimulatorWatcher(registry2) {
156863
157240
  }
156864
157241
 
156865
157242
  // ../tool-server/src/utils/preview-window.ts
156866
- var import_node_child_process39 = require("node:child_process");
157243
+ var import_node_child_process40 = require("node:child_process");
156867
157244
  var fs66 = __toESM(require("node:fs"));
156868
157245
  var os20 = __toESM(require("node:os"));
156869
157246
  var path48 = __toESM(require("node:path"));
@@ -156895,10 +157272,10 @@ function ensureLensAppBundle(electronBin) {
156895
157272
  fs66.copyFileSync(path48.join(realContents, "Info.plist"), plist);
156896
157273
  const setPlist = (entry, value) => {
156897
157274
  try {
156898
- (0, import_node_child_process39.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Set :${entry} ${value}`, plist]);
157275
+ (0, import_node_child_process40.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Set :${entry} ${value}`, plist]);
156899
157276
  } catch {
156900
157277
  try {
156901
- (0, import_node_child_process39.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Add :${entry} string ${value}`, plist]);
157278
+ (0, import_node_child_process40.execFileSync)("/usr/libexec/PlistBuddy", ["-c", `Add :${entry} string ${value}`, plist]);
156902
157279
  } catch {
156903
157280
  }
156904
157281
  }
@@ -156957,7 +157334,7 @@ function createPreviewWindowManager(opts = {}) {
156957
157334
  const wrapperBin = ensureLensAppBundle(electronBin);
156958
157335
  const launchBin = wrapperBin ?? electronBin;
156959
157336
  const launchArgs = wrapperBin ? ["--no-sandbox", mainScript] : [mainScript];
156960
- const next = (0, import_node_child_process39.spawn)(launchBin, launchArgs, {
157337
+ const next = (0, import_node_child_process40.spawn)(launchBin, launchArgs, {
156961
157338
  // Strips ELECTRON_RUN_AS_NODE, which an Electron-based MCP host leaves in
156962
157339
  // our env, so the child boots as a GUI app instead of bare Node.
156963
157340
  env: electronGuiChildEnv({ ARGENT_PREVIEW_URL: url2 }),