sootsim 0.1.310 → 0.1.311

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.
Files changed (151) hide show
  1. package/dist-cli/bin.js +5 -5
  2. package/dist-cli/chunks/{agent-CPD4GIXP.js → agent-KOPVOZ7G.js} +2 -2
  3. package/dist-cli/chunks/{agent-wrapper-JZTNUUZE.js → agent-wrapper-KVAIIK7K.js} +2 -2
  4. package/dist-cli/chunks/{app-fonts-CFIBFEVF.js → app-fonts-5ZX2IRBS.js} +2 -2
  5. package/dist-cli/chunks/{assert-C5WAWJ6I.js → assert-NRKM4ZIK.js} +2 -2
  6. package/dist-cli/chunks/{auth-UY7RPLPH.js → auth-MSLDV5HR.js} +2 -2
  7. package/dist-cli/chunks/{beta-NM7T7MDN.js → beta-L5QKFHWI.js} +2 -2
  8. package/dist-cli/chunks/{camera-4YUYYYJI.js → camera-5JUNQPSI.js} +2 -2
  9. package/dist-cli/chunks/{chunk-RYPPRVBM.js → chunk-3Y6476ZM.js} +2 -2
  10. package/dist-cli/chunks/{chunk-GQVBLBUJ.js → chunk-5V5MOREL.js} +2 -2
  11. package/dist-cli/chunks/{chunk-FT2XATWO.js → chunk-6JYTKF5O.js} +1 -1
  12. package/dist-cli/chunks/{chunk-LKAAQBT6.js → chunk-6QZY6YO2.js} +1 -1
  13. package/dist-cli/chunks/{chunk-TAQV44LZ.js → chunk-6SICKWPQ.js} +3 -3
  14. package/dist-cli/chunks/{chunk-Z6H5FR3U.js → chunk-75KNNHMR.js} +2 -2
  15. package/dist-cli/chunks/{chunk-YRRUK3EK.js → chunk-75YOUNTE.js} +1 -1
  16. package/dist-cli/chunks/chunk-7PHOEBKV.js +4 -0
  17. package/dist-cli/chunks/{chunk-S7WXPIOY.js → chunk-7W63IKAP.js} +2 -2
  18. package/dist-cli/chunks/chunk-CJKSD5BZ.js +5 -0
  19. package/dist-cli/chunks/{chunk-SY7E43UY.js → chunk-CKMQ2YXQ.js} +3 -3
  20. package/dist-cli/chunks/{chunk-QPZVGHRV.js → chunk-CUVLXG63.js} +1 -1
  21. package/dist-cli/chunks/{chunk-7RJEULWN.js → chunk-EHBHUE6S.js} +2 -2
  22. package/dist-cli/chunks/{chunk-NLTJE335.js → chunk-F2WH6XM7.js} +2 -2
  23. package/dist-cli/chunks/{chunk-63JWRDM6.js → chunk-GEUU2WIL.js} +2 -2
  24. package/dist-cli/chunks/{chunk-ZNK3ZAA5.js → chunk-GFKP5JIA.js} +2 -2
  25. package/dist-cli/chunks/{chunk-6UXXOG6P.js → chunk-GLECQIGB.js} +2 -2
  26. package/dist-cli/chunks/{chunk-3S7UEXZW.js → chunk-HI5MWY32.js} +1 -1
  27. package/dist-cli/chunks/{chunk-GH2OE6F6.js → chunk-J6ZKDIRN.js} +2 -2
  28. package/dist-cli/chunks/{chunk-PJKCYUT3.js → chunk-JGFIT5X5.js} +2 -2
  29. package/dist-cli/chunks/{chunk-3EO5JEG7.js → chunk-KGIXNUUM.js} +2 -2
  30. package/dist-cli/chunks/{chunk-BFNAFH27.js → chunk-KKXSWEYS.js} +1 -1
  31. package/dist-cli/chunks/{chunk-EPMLSKSB.js → chunk-NBNEISXX.js} +2 -2
  32. package/dist-cli/chunks/{chunk-EWRPLFYI.js → chunk-P7MI3VFY.js} +1 -1
  33. package/dist-cli/chunks/{chunk-YIJFCR5T.js → chunk-PHFRI2QF.js} +1 -1
  34. package/dist-cli/chunks/{chunk-RMIKUUCO.js → chunk-PJ27D3WO.js} +1 -1
  35. package/dist-cli/chunks/{chunk-MUQDPJUP.js → chunk-QCEMDWL4.js} +1 -1
  36. package/dist-cli/chunks/{chunk-2TRPGEZE.js → chunk-QILKSUH6.js} +2 -2
  37. package/dist-cli/chunks/{chunk-WWIQEYHT.js → chunk-QMHUIADD.js} +1 -1
  38. package/dist-cli/chunks/{chunk-66Z2ADUQ.js → chunk-QUAY5AZB.js} +2 -2
  39. package/dist-cli/chunks/{chunk-C3GMSIRT.js → chunk-RATCQLQA.js} +2 -2
  40. package/dist-cli/chunks/{chunk-C3O6UUPY.js → chunk-RHGVZJIY.js} +3 -3
  41. package/dist-cli/chunks/{chunk-BMIIHY6K.js → chunk-RIT4KI4Y.js} +3 -3
  42. package/dist-cli/chunks/{chunk-4XMPRQGE.js → chunk-S5U22PVL.js} +1 -1
  43. package/dist-cli/chunks/{chunk-XBBNRESY.js → chunk-SKGITCWL.js} +1 -1
  44. package/dist-cli/chunks/{chunk-RX4CFOVV.js → chunk-ULJT3HDO.js} +1 -1
  45. package/dist-cli/chunks/{chunk-XMOULANJ.js → chunk-VAFDFOE6.js} +2 -2
  46. package/dist-cli/chunks/{chunk-M2LP2VYQ.js → chunk-VJMY2MX6.js} +2 -2
  47. package/dist-cli/chunks/{chunk-IS5OOCN5.js → chunk-VNS6KYRJ.js} +1 -1
  48. package/dist-cli/chunks/{chunk-R7AS52NA.js → chunk-W4S7GGPG.js} +3 -3
  49. package/dist-cli/chunks/{chunk-YMD6WWI7.js → chunk-WIYIQQQS.js} +2 -2
  50. package/dist-cli/chunks/{chunk-VAGUPECL.js → chunk-WTNKX7QD.js} +2 -2
  51. package/dist-cli/chunks/{chunk-STWCCIBA.js → chunk-Y5O5GK2Q.js} +11 -11
  52. package/dist-cli/chunks/{chunk-YZPSUNTO.js → chunk-Y7RQGSZD.js} +2 -2
  53. package/dist-cli/chunks/{chunk-XKAXZ4DS.js → chunk-YOIHAHR5.js} +1 -1
  54. package/dist-cli/chunks/{chunk-ZS7OXPHR.js → chunk-YS7YDOGW.js} +1 -1
  55. package/dist-cli/chunks/{chunk-CORSX7M5.js → chunk-YTP5VCDL.js} +1 -1
  56. package/dist-cli/chunks/{chunk-2KSLGBIU.js → chunk-ZB3UAYJ4.js} +2 -2
  57. package/dist-cli/chunks/{chunk-EPZUFQMX.js → chunk-ZDQO6TJQ.js} +2 -2
  58. package/dist-cli/chunks/{chunk-C4O4VRN5.js → chunk-ZHPLBK34.js} +2 -2
  59. package/dist-cli/chunks/{cleanup-2ZM4QSDV.js → cleanup-436GW67Y.js} +2 -2
  60. package/dist-cli/chunks/{cli-version-WXOEWZDA.js → cli-version-BY3A3SBN.js} +2 -2
  61. package/dist-cli/chunks/{compat-MGY3FZSI.js → compat-DDJSQ3WI.js} +2 -2
  62. package/dist-cli/chunks/{config-3W5VNME6.js → config-XFLK4XZN.js} +2 -2
  63. package/dist-cli/chunks/{control-7LNRM2BK.js → control-W6KUVHYU.js} +2 -2
  64. package/dist-cli/chunks/daemon-E5MGIR55.js +4 -0
  65. package/dist-cli/chunks/{debug-4CMFC2CO.js → debug-PHSYXSNH.js} +3 -3
  66. package/dist-cli/chunks/{desktop-Q6CZSS4R.js → desktop-6V5ALYCZ.js} +3 -3
  67. package/dist-cli/chunks/{detox-2AF4MXXN.js → detox-SA27XGTO.js} +2 -2
  68. package/dist-cli/chunks/{device-E2WCI2N2.js → device-XURVFXBT.js} +2 -2
  69. package/dist-cli/chunks/{diagnose-CZGCKNVY.js → diagnose-HMUQWQOK.js} +2 -2
  70. package/dist-cli/chunks/disk-cleanup-KYAFCV6S.js +4 -0
  71. package/dist-cli/chunks/drivers-INII4IWR.js +4 -0
  72. package/dist-cli/chunks/{film-UDSAJZXL.js → film-3UM6EUYF.js} +3 -3
  73. package/dist-cli/chunks/flow-RP4UVYUA.js +4 -0
  74. package/dist-cli/chunks/help-STHBZD6I.js +4 -0
  75. package/dist-cli/chunks/{hidden-runtime-alias-CHAB56GM.js → hidden-runtime-alias-DVVAGM4I.js} +2 -2
  76. package/dist-cli/chunks/{home-paths-WFCI5ORX.js → home-paths-LVGGR4AJ.js} +2 -2
  77. package/dist-cli/chunks/inspect-5W52ZHKD.js +4 -0
  78. package/dist-cli/chunks/install-desktop-H4HLLT7K.js +4 -0
  79. package/dist-cli/chunks/{login-57UP2EKB.js → login-2QTBTTGJ.js} +4 -4
  80. package/dist-cli/chunks/{logout-UYNCJTOC.js → logout-PUBLDHVY.js} +2 -2
  81. package/dist-cli/chunks/{maestro-QMAPXPZ7.js → maestro-2UJ27MKD.js} +3 -3
  82. package/dist-cli/chunks/{maestro-generate-N2BJXJDH.js → maestro-generate-P4MDFYMV.js} +3 -3
  83. package/dist-cli/chunks/{mode-SY5G7WQD.js → mode-RRHPX23W.js} +2 -2
  84. package/dist-cli/chunks/{optional-demo-registry-DH3L6FFX.js → optional-demo-registry-5IRF7M7Z.js} +2 -2
  85. package/dist-cli/chunks/{perf-NZ6VEDLA.js → perf-BOLWOAKV.js} +2 -2
  86. package/dist-cli/chunks/{permissions-EMH2K5LX.js → permissions-ZIOTIBPV.js} +2 -2
  87. package/dist-cli/chunks/{record-44PMWGYY.js → record-DU2IKPFK.js} +3 -3
  88. package/dist-cli/chunks/{report-issue-PLGMRWXG.js → report-issue-4CQDUWT2.js} +2 -2
  89. package/dist-cli/chunks/runtime-QWPQ3M7H.js +4 -0
  90. package/dist-cli/chunks/{screenshot-command-GJT5XS7P.js → screenshot-command-XEN26NJV.js} +3 -3
  91. package/dist-cli/chunks/{screenshot-layers-4JSTS5VY.js → screenshot-layers-CRCQ4CEF.js} +2 -2
  92. package/dist-cli/chunks/{screenshots-capture-AQQISSQD.js → screenshots-capture-XGQFYINL.js} +2 -2
  93. package/dist-cli/chunks/{serve-TJMO4KGX.js → serve-UBSRDYA3.js} +2 -2
  94. package/dist-cli/chunks/{setup-7ZSYCUX6.js → setup-AKYIOBVO.js} +2 -2
  95. package/dist-cli/chunks/{skills-GRQPAAD5.js → skills-V5WV4LWH.js} +2 -2
  96. package/dist-cli/chunks/{storage-GWRZNBAU.js → storage-3PJPIHNM.js} +2 -2
  97. package/dist-cli/chunks/store-A27JYIGF.js +4 -0
  98. package/dist-cli/chunks/telemetry-LLD24AVX.js +4 -0
  99. package/dist-cli/chunks/{timeline-2FXM7HEU.js → timeline-OHQNHG52.js} +2 -2
  100. package/dist-cli/chunks/{upgrade-AV7UOK2X.js → upgrade-Q2TYYVIX.js} +2 -2
  101. package/dist-cli/chunks/upload-57FIDO2B.js +4 -0
  102. package/dist-cli/chunks/{version-C72O2LMS.js → version-SW6VCJVI.js} +2 -2
  103. package/dist-cli/chunks/{web-4V3YGWNC.js → web-BXVM3HJ3.js} +2 -2
  104. package/dist-cli/chunks/{what-happened-RGD2DOQI.js → what-happened-H62ASSI5.js} +2 -2
  105. package/dist-lib/agent-daemon-client.cjs +1 -1
  106. package/dist-lib/agent-events.cjs +1 -1
  107. package/dist-lib/agent-identity.cjs +1 -1
  108. package/dist-lib/agent-sessions.cjs +1 -1
  109. package/dist-lib/attached-projects.cjs +1 -1
  110. package/dist-lib/auth/shared-session.cjs +1 -1
  111. package/dist-lib/backend-origin.cjs +1 -1
  112. package/dist-lib/beta.cjs +1 -1
  113. package/dist-lib/beta.mjs +1 -1
  114. package/dist-lib/bridge-constants.cjs +1 -1
  115. package/dist-lib/cli-constants.cjs +1 -1
  116. package/dist-lib/config.cjs +1 -1
  117. package/dist-lib/detox/index.cjs +20 -16
  118. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  119. package/dist-lib/home-paths.cjs +1 -1
  120. package/dist-lib/host/bridge-host.cjs +164 -102
  121. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  122. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  123. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  124. package/dist-lib/host/websocket-proxy.cjs +1 -1
  125. package/dist-lib/index.cjs +1 -1
  126. package/dist-lib/jump-to-source-babel.cjs +1 -1
  127. package/dist-lib/menu.cjs +1 -1
  128. package/dist-lib/menu.mjs +1 -1
  129. package/dist-lib/metro.cjs +1 -1
  130. package/dist-lib/profiles.cjs +1 -1
  131. package/dist-lib/render-mode.cjs +1 -1
  132. package/dist-lib/scripts/dev-server-scanner.cjs +43 -23
  133. package/dist-lib/sdk.cjs +1 -1
  134. package/dist-lib/sdk.mjs +1 -1
  135. package/dist-lib/skills.cjs +277 -206
  136. package/dist-lib/vite.cjs +1 -1
  137. package/package.json +1 -1
  138. package/scripts/dev-server-scanner.ts +34 -8
  139. package/dist-cli/chunks/chunk-63EKEKDF.js +0 -4
  140. package/dist-cli/chunks/chunk-OQO3HU4Y.js +0 -5
  141. package/dist-cli/chunks/daemon-ZNCVHOWJ.js +0 -4
  142. package/dist-cli/chunks/disk-cleanup-4T6MDZBA.js +0 -4
  143. package/dist-cli/chunks/drivers-NEB27ZKQ.js +0 -4
  144. package/dist-cli/chunks/flow-GXXVEHEW.js +0 -4
  145. package/dist-cli/chunks/help-3RVUJUAN.js +0 -4
  146. package/dist-cli/chunks/inspect-4H4VNQJ4.js +0 -4
  147. package/dist-cli/chunks/install-desktop-RGCBPM4J.js +0 -4
  148. package/dist-cli/chunks/runtime-CUSKTS2J.js +0 -4
  149. package/dist-cli/chunks/store-MLODFZBM.js +0 -4
  150. package/dist-cli/chunks/telemetry-XL3UDJSE.js +0 -4
  151. package/dist-cli/chunks/upload-6DXF4DAQ.js +0 -4
@@ -1,4 +1,4 @@
1
- /*! sootsim v0.1.310 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! sootsim v0.1.311 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -36,6 +36,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
36
36
  function currentRuntime() {
37
37
  return { platform: process.platform, env: process.env };
38
38
  }
39
+ function processCommand(pid) {
40
+ return (0, import_node_child_process.execFileSync)("/bin/ps", ["-p", String(pid), "-o", "command="], {
41
+ encoding: "utf8"
42
+ }).trim();
43
+ }
39
44
  function softwareChromeAllowed(runtime = currentRuntime()) {
40
45
  return runtime.platform === "linux" && runtime.env.GITHUB_ACTIONS === "true" && runtime.env.RUNNER_OS === "Linux";
41
46
  }
@@ -211,7 +216,7 @@ async function rejectLaunchedBrowser(browser) {
211
216
  }
212
217
  }
213
218
  }
214
- async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget) {
219
+ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget, commandForPid = processCommand) {
215
220
  if (softwareChromeAllowed(runtime)) return;
216
221
  const root = rootChromePid(browser);
217
222
  const launchedControl = browserControl(browser);
@@ -219,10 +224,7 @@ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget) {
219
224
  registerChromePid(browser, launchedControl, root);
220
225
  }
221
226
  if (root !== null && (runtime.platform === "darwin" || runtime.platform === "linux")) {
222
- const command = (0, import_node_child_process.execFileSync)("ps", ["-p", String(root), "-o", "command="], {
223
- encoding: "utf8"
224
- }).trim();
225
- assertGpuBrowserCommand(command, runtime);
227
+ assertGpuBrowserCommand(commandForPid(root), runtime);
226
228
  }
227
229
  const rendererBrowser = rendererTarget ? await rendererTarget(browser) : browser;
228
230
  const control = browserControl(rendererBrowser);
@@ -238,10 +240,7 @@ async function validateLaunchedGpuBrowser(browser, runtime, rendererTarget) {
238
240
  discoveredChromePids.set(rendererBrowser, pid);
239
241
  }
240
242
  if (runtime.platform === "darwin" || runtime.platform === "linux") {
241
- const command = (0, import_node_child_process.execFileSync)("ps", ["-p", String(pid), "-o", "command="], {
242
- encoding: "utf8"
243
- }).trim();
244
- assertGpuBrowserCommand(command, runtime);
243
+ assertGpuBrowserCommand(commandForPid(pid), runtime);
245
244
  }
246
245
  assertGpuRendererInfo(await session.send("SystemInfo.getInfo"), runtime);
247
246
  return;
@@ -359,9 +358,9 @@ function gpuChromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
359
358
  ignoreDefaultArgs: ignoredDefaults
360
359
  };
361
360
  }
362
- function platformChromeLaunch(launch3, opts, rendererTarget) {
361
+ function platformChromeLaunch(launch3, opts, rendererTarget, policy = {}) {
363
362
  return async () => {
364
- const runtime = currentRuntime();
363
+ const runtime = policy.runtime ?? currentRuntime();
365
364
  if (softwareChromeAllowed(runtime)) {
366
365
  return launch3(chromeLaunchOptions(opts, runtime));
367
366
  }
@@ -381,7 +380,12 @@ function platformChromeLaunch(launch3, opts, rendererTarget) {
381
380
  );
382
381
  }
383
382
  try {
384
- await validateLaunchedGpuBrowser(browser, runtime, rendererTarget);
383
+ await validateLaunchedGpuBrowser(
384
+ browser,
385
+ runtime,
386
+ rendererTarget,
387
+ policy.processCommand
388
+ );
385
389
  } catch (err) {
386
390
  await rejectLaunchedBrowser(browser);
387
391
  throw err;
@@ -397,7 +401,7 @@ function softwareChromeLaunchOptions(opts) {
397
401
  }
398
402
  const callerArgs = Array.isArray(opts.args) ? opts.args.map(String) : [];
399
403
  const unmanagedCallerArgs = callerArgs.filter((arg) => {
400
- return !arg.startsWith("--use-angle=") && arg !== "--enable-gpu" && arg !== "--enable-gpu-rasterization" && arg !== "--enable-zero-copy" && arg !== "--ignore-gpu-blocklist" && !/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(arg);
404
+ return !arg.startsWith("--use-angle=") && arg !== "--enable-gpu" && arg !== "--enable-gpu-rasterization" && arg !== "--enable-zero-copy" && arg !== "--ignore-gpu-blocklist" && !/^--enable-unsafe-webgpu(?:=.*)?$/i.test(arg) && !/^--enable-unsafe-swiftshader(?:=.*)?$/i.test(arg);
401
405
  });
402
406
  const software = {
403
407
  ...opts,
@@ -414,8 +418,8 @@ function softwareChromeLaunchOptions(opts) {
414
418
  function chromeLaunchOptions(opts = {}, runtime = currentRuntime()) {
415
419
  return softwareChromeAllowed(runtime) ? softwareChromeLaunchOptions(opts) : gpuChromeLaunchOptions(opts, runtime);
416
420
  }
417
- async function launchReapedChrome(launch3, opts = {}, rendererTarget) {
418
- return launchReaped(platformChromeLaunch(launch3, opts, rendererTarget));
421
+ async function launchReapedChrome(launch3, opts = {}, rendererTarget, policy = {}) {
422
+ return launchReaped(platformChromeLaunch(launch3, opts, rendererTarget, policy));
419
423
  }
420
424
  var import_node_child_process, discoveredChromePids, reapPids, installed, signalShutdownClaimed;
421
425
  var init_reap_browser = __esm({
@@ -575,6 +579,20 @@ var init_registry = __esm({
575
579
  }
576
580
  ]
577
581
  },
582
+ "@metamask/react-native-webview": {
583
+ category: "Essentials",
584
+ stubType: "native",
585
+ proofCoverage: 0.3,
586
+ versions: [
587
+ {
588
+ range: ">=14.0.0 <15.0.0",
589
+ coverage: 0.5,
590
+ note: "native-seam only: the maintained scoped fork runs unchanged against the shared RNCWebView host view and RNCWebViewModule implementation",
591
+ working: "the react-native-webview host view, command, event, loading, message, layout, and presentation behavior supported by the shared seam",
592
+ missing: "the browser iframe limitations documented for react-native-webview apply to this fork too"
593
+ }
594
+ ]
595
+ },
578
596
  "@expo/dom-webview": {
579
597
  category: "Essentials",
580
598
  stubType: "native",
@@ -2649,7 +2667,11 @@ var init_registry = __esm({
2649
2667
  },
2650
2668
  "react-native-blue-crypto": {
2651
2669
  category: "Auth & Payments",
2670
+ // npm's current package is a security placeholder with no native code.
2671
+ // keep the seam for bundles locked to the withdrawn native releases, but
2672
+ // a new install must not trigger the shipped-app native-code warning.
2652
2673
  stubType: "native",
2674
+ shipsNativeCode: false,
2653
2675
  versions: [
2654
2676
  {
2655
2677
  range: ">=1.0.0",
@@ -3301,7 +3323,10 @@ var init_registry = __esm({
3301
3323
  },
3302
3324
  "react-native-web": {
3303
3325
  category: "Essentials",
3326
+ // pure JS, but deliberately intercepted by the core host adapter so its
3327
+ // React Native-compatible APIs route through the canvas engine.
3304
3328
  stubType: "native",
3329
+ shipsNativeCode: false,
3305
3330
  versions: [
3306
3331
  {
3307
3332
  range: ">=0.21.0 <0.22.0",
@@ -10257,6 +10282,32 @@ var init_registry = __esm({
10257
10282
  }
10258
10283
  ]
10259
10284
  },
10285
+ "react-native-nitro-text-decoder": {
10286
+ category: "Networking",
10287
+ stubType: "native",
10288
+ versions: [
10289
+ {
10290
+ range: ">=0.2.0 <1.0.0",
10291
+ coverage: 0.98,
10292
+ note: "native-seam only: the upstream TextDecoder class runs unchanged against the worker TextDecoder through NitroTextEncoding",
10293
+ working: "UTF-8 and utf8 labels, fatal decoding, BOM handling, streaming decode, ArrayBuffer, typed-array and DataView byte ranges, and empty-input flush",
10294
+ missing: "native SIMD performance characteristics"
10295
+ }
10296
+ ]
10297
+ },
10298
+ "react-native-nitro-websockets": {
10299
+ category: "Networking",
10300
+ stubType: "native",
10301
+ versions: [
10302
+ {
10303
+ range: ">=1.0.0 <2.0.0",
10304
+ coverage: 0.75,
10305
+ note: "native-seam only: the upstream NitroWebSocket class runs unchanged against the worker browser WebSocket transport",
10306
+ working: "connect, string and binary send/receive, protocols, ready state, URL, buffered amount, extensions, and open/message/close/error callbacks",
10307
+ missing: "cold-start prewarming, durable prewarm queue storage including remove and clear behavior, custom native handshake headers, native TLS implementation details, and native socket performance characteristics"
10308
+ }
10309
+ ]
10310
+ },
10260
10311
  "react-native-fast-trie": {
10261
10312
  category: "Storage & Data",
10262
10313
  stubType: "native",
@@ -11807,14 +11858,14 @@ var init_optional_demo_registry = __esm({
11807
11858
 
11808
11859
  // scripts/dev-server-scanner.ts
11809
11860
  function tcpPing(port, timeout = TCP_GATE_MS) {
11810
- return new Promise((resolve6) => {
11861
+ return new Promise((resolve7) => {
11811
11862
  const sock = new import_net.default.Socket();
11812
11863
  let settled = false;
11813
11864
  const done = (ok) => {
11814
11865
  if (settled) return;
11815
11866
  settled = true;
11816
11867
  sock.destroy();
11817
- resolve6(ok);
11868
+ resolve7(ok);
11818
11869
  };
11819
11870
  sock.setTimeout(timeout);
11820
11871
  sock.once("connect", () => done(true));
@@ -11824,7 +11875,7 @@ function tcpPing(port, timeout = TCP_GATE_MS) {
11824
11875
  });
11825
11876
  }
11826
11877
  function httpGet(port, path16, method = "GET", timeout = TIMEOUT_MS, headers = {}) {
11827
- return new Promise((resolve6) => {
11878
+ return new Promise((resolve7) => {
11828
11879
  const req = import_http.default.request(
11829
11880
  { hostname: "localhost", port, path: path16, method, timeout, headers },
11830
11881
  (res) => {
@@ -11838,14 +11889,14 @@ function httpGet(port, path16, method = "GET", timeout = TIMEOUT_MS, headers = {
11838
11889
  })();
11839
11890
  res.on(
11840
11891
  "end",
11841
- () => resolve6({ statusCode: res.statusCode || 0, body, contentType })
11892
+ () => resolve7({ statusCode: res.statusCode || 0, body, contentType })
11842
11893
  );
11843
11894
  }
11844
11895
  );
11845
- req.on("error", () => resolve6(null));
11896
+ req.on("error", () => resolve7(null));
11846
11897
  req.setTimeout(timeout, () => {
11847
11898
  req.destroy();
11848
- resolve6(null);
11899
+ resolve7(null);
11849
11900
  });
11850
11901
  req.end();
11851
11902
  });
@@ -11978,20 +12029,24 @@ async function resolveProcessCwd(pid) {
11978
12029
  }
11979
12030
  return null;
11980
12031
  }
11981
- function makeResult(port, framework) {
12032
+ function makeResult(port, framework, owner) {
11982
12033
  return {
11983
12034
  port,
11984
12035
  framework,
11985
12036
  bundleUrl: withRuntimeConfig(
11986
12037
  port,
11987
- `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`
12038
+ `http://localhost:${port}/index.bundle?platform=ios&dev=true&hot=true&minify=false`,
12039
+ owner.cwd
11988
12040
  ),
11989
12041
  hmrUrl: `ws://localhost:${port}/hot`,
11990
- lastSeen: Date.now()
12042
+ lastSeen: Date.now(),
12043
+ ...owner
11991
12044
  };
11992
12045
  }
11993
- function withRuntimeConfig(port, bundleUrl) {
11994
- const knownApp = optionalDemoAppsSync().find((app) => app.preferredPort === port);
12046
+ function withRuntimeConfig(port, bundleUrl, projectCwd) {
12047
+ const knownApp = projectCwd ? optionalDemoAppsSync().find(
12048
+ (app) => app.preferredPort === port && (0, import_node_path3.resolve)(app.dir) === (0, import_node_path3.resolve)(projectCwd)
12049
+ ) : void 0;
11995
12050
  const configured = knownApp?.runtimeConfig ? applySootSimConfigToUrl(bundleUrl, knownApp.runtimeConfig) : bundleUrl;
11996
12051
  return normalizeNativeDevBundleUrl(configured);
11997
12052
  }
@@ -12016,7 +12071,7 @@ function applyManifest(result, manifestRes, buildIconProxyUrl) {
12016
12071
  if (result.framework === "metro" && client.sdkVersion) result.framework = "expo";
12017
12072
  const launchUrl2 = manifest?.launchAsset?.url;
12018
12073
  if (launchUrl2 && !result.patched && !isDirectOneBundleUrl(result.bundleUrl)) {
12019
- result.bundleUrl = withRuntimeConfig(result.port, launchUrl2);
12074
+ result.bundleUrl = withRuntimeConfig(result.port, launchUrl2, result.cwd);
12020
12075
  }
12021
12076
  const rawIconUrl = client.iconUrl || client.ios?.iconUrl || client.icon || client.ios?.icon;
12022
12077
  if (rawIconUrl) {
@@ -12078,9 +12133,16 @@ async function fetchManifestEnrichment(port, buildIconProxyUrl) {
12078
12133
  });
12079
12134
  portCache.delete(port);
12080
12135
  }
12081
- async function probePort(port, buildIconProxyUrl) {
12136
+ async function probePort(port, buildIconProxyUrl, listeningProcess) {
12082
12137
  await loadOptionalDemoApps();
12083
12138
  if (!await tcpPing(port)) return null;
12139
+ const suppliedPid = listeningProcess?.pid;
12140
+ const ownerPid = suppliedPid && suppliedPid > 0 ? suppliedPid : await resolveListeningPid(port);
12141
+ const ownerCwd = ownerPid ? await resolveProcessCwd(ownerPid) : null;
12142
+ const owner = {
12143
+ ...ownerPid ? { pid: ownerPid } : {},
12144
+ ...ownerCwd ? { cwd: ownerCwd } : {}
12145
+ };
12084
12146
  const onePath = `/node_modules/one/metro-entry.bundle?platform=ios&dev=true`;
12085
12147
  const [sootsimRes, statusRes, manifestRes, expoRes] = await Promise.all([
12086
12148
  knownNonPatched.has(port) ? Promise.resolve(null) : httpGet(port, "/__soot/"),
@@ -12106,9 +12168,10 @@ async function probePort(port, buildIconProxyUrl) {
12106
12168
  {
12107
12169
  port,
12108
12170
  framework,
12109
- bundleUrl: withRuntimeConfig(port, launchUrl2),
12171
+ bundleUrl: withRuntimeConfig(port, launchUrl2, owner.cwd),
12110
12172
  hmrUrl: `ws://localhost:${port}/hot`,
12111
- lastSeen: Date.now()
12173
+ lastSeen: Date.now(),
12174
+ ...owner
12112
12175
  },
12113
12176
  manifestRes,
12114
12177
  buildIconProxyUrl
@@ -12118,7 +12181,7 @@ async function probePort(port, buildIconProxyUrl) {
12118
12181
  knownNonPatched.add(port);
12119
12182
  return enrichWithManifest(
12120
12183
  applyManifest(
12121
- makeResult(port, expoRes && expoRes.statusCode === 200 ? "expo" : "metro"),
12184
+ makeResult(port, expoRes && expoRes.statusCode === 200 ? "expo" : "metro", owner),
12122
12185
  manifestRes,
12123
12186
  buildIconProxyUrl
12124
12187
  ),
@@ -12132,10 +12195,15 @@ async function probePort(port, buildIconProxyUrl) {
12132
12195
  {
12133
12196
  port,
12134
12197
  framework: "one",
12135
- bundleUrl: withRuntimeConfig(port, `http://localhost:${port}/__soot/bundle.js`),
12198
+ bundleUrl: withRuntimeConfig(
12199
+ port,
12200
+ `http://localhost:${port}/__soot/bundle.js`,
12201
+ owner.cwd
12202
+ ),
12136
12203
  hmrUrl: `ws://localhost:${port}/hot`,
12137
12204
  lastSeen: Date.now(),
12138
- patched: true
12205
+ patched: true,
12206
+ ...owner
12139
12207
  },
12140
12208
  manifestRes,
12141
12209
  buildIconProxyUrl
@@ -12158,10 +12226,12 @@ async function probePort(port, buildIconProxyUrl) {
12158
12226
  framework: "one",
12159
12227
  bundleUrl: withRuntimeConfig(
12160
12228
  port,
12161
- `http://localhost:${port}${onePath}&minify=false`
12229
+ `http://localhost:${port}${onePath}&minify=false`,
12230
+ owner.cwd
12162
12231
  ),
12163
12232
  hmrUrl: `ws://localhost:${port}/hot`,
12164
- lastSeen: Date.now()
12233
+ lastSeen: Date.now(),
12234
+ ...owner
12165
12235
  },
12166
12236
  manifestRes,
12167
12237
  buildIconProxyUrl
@@ -12184,7 +12254,7 @@ function isWeakCachedResult(result) {
12184
12254
  }
12185
12255
  function hasCurrentRuntimeConfig(result) {
12186
12256
  if (!result) return true;
12187
- return withRuntimeConfig(result.port, result.bundleUrl) === result.bundleUrl;
12257
+ return withRuntimeConfig(result.port, result.bundleUrl, result.cwd) === result.bundleUrl;
12188
12258
  }
12189
12259
  function __shouldReuseScannerCacheEntry(entry, pid, now = Date.now()) {
12190
12260
  if (pid === 0) return false;
@@ -12242,7 +12312,7 @@ async function scanDevServers(opts = {}) {
12242
12312
  }
12243
12313
  if (toProbe.length > 0) {
12244
12314
  const probed = await Promise.all(
12245
- toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl))
12315
+ toProbe.map((p) => probePort(p.port, opts.buildIconProxyUrl, p))
12246
12316
  );
12247
12317
  probed.forEach((result, i) => {
12248
12318
  const { port, pid } = toProbe[i];
@@ -12271,7 +12341,7 @@ async function scanDevServers(opts = {}) {
12271
12341
  }
12272
12342
  return results.filter((r) => !isSootSimSelfServer(r));
12273
12343
  }
12274
- var import_child_process, import_promises2, import_http, import_net, import_util, execP, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, TCP_GATE_MS, FALLBACK_PORTS, cwdByPid, ENRICH_TIMEOUT_MS, enrichmentCache, enrichmentInFlight, knownNonPatched, knownNonExpo, knownOne, portCache, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
12344
+ var import_child_process, import_promises2, import_http, import_net, import_node_path3, import_util, execP, TIMEOUT_MS, MANIFEST_TIMEOUT_MS, TCP_GATE_MS, FALLBACK_PORTS, cwdByPid, ENRICH_TIMEOUT_MS, enrichmentCache, enrichmentInFlight, knownNonPatched, knownNonExpo, knownOne, portCache, NEGATIVE_CACHE_TTL_MS, WEAK_RESULT_CACHE_TTL_MS;
12275
12345
  var init_dev_server_scanner = __esm({
12276
12346
  "scripts/dev-server-scanner.ts"() {
12277
12347
  "use strict";
@@ -12279,6 +12349,7 @@ var init_dev_server_scanner = __esm({
12279
12349
  import_promises2 = require("fs/promises");
12280
12350
  import_http = __toESM(require("http"), 1);
12281
12351
  import_net = __toESM(require("net"), 1);
12352
+ import_node_path3 = require("node:path");
12282
12353
  import_util = require("util");
12283
12354
  init_config();
12284
12355
  init_native_dev_bundle_url();
@@ -12319,9 +12390,9 @@ function getCliVersion() {
12319
12390
  () => (0, import_node_url2.fileURLToPath)(import_meta.resolve("sootsim/package.json")),
12320
12391
  () => (0, import_node_url2.fileURLToPath)(new URL("../package.json", __sootsim_import_meta_url))
12321
12392
  ];
12322
- for (const resolve6 of candidates) {
12393
+ for (const resolve7 of candidates) {
12323
12394
  try {
12324
- const version = JSON.parse((0, import_node_fs2.readFileSync)(resolve6(), "utf8")).version;
12395
+ const version = JSON.parse((0, import_node_fs2.readFileSync)(resolve7(), "utf8")).version;
12325
12396
  if (typeof version === "string" && version) {
12326
12397
  cached2 = version;
12327
12398
  return cached2;
@@ -12395,8 +12466,8 @@ __export(home_paths_exports, {
12395
12466
  });
12396
12467
  function sootsimHomeDir() {
12397
12468
  const override = process.env[SOOTSIM_HOME_ENV];
12398
- if (override && override.length > 0) return import_node_path3.default.resolve(override);
12399
- return import_node_path3.default.join((0, import_node_os.homedir)(), ".sootsim");
12469
+ if (override && override.length > 0) return import_node_path4.default.resolve(override);
12470
+ return import_node_path4.default.join((0, import_node_os.homedir)(), ".sootsim");
12400
12471
  }
12401
12472
  function isSootsimDevCheckout() {
12402
12473
  if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
@@ -12407,7 +12478,7 @@ function isSootsimDevCheckout() {
12407
12478
  if (!argv1) return false;
12408
12479
  try {
12409
12480
  const real = import_node_fs3.default.realpathSync(argv1);
12410
- return real.includes(`${import_node_path3.default.sep}packages${import_node_path3.default.sep}sootsim${import_node_path3.default.sep}`);
12481
+ return real.includes(`${import_node_path4.default.sep}packages${import_node_path4.default.sep}sootsim${import_node_path4.default.sep}`);
12411
12482
  } catch {
12412
12483
  return false;
12413
12484
  }
@@ -12420,46 +12491,46 @@ function shouldSkipPersistentDaemon() {
12420
12491
  return isSootsimDevCheckout() || isDevWorkstation();
12421
12492
  }
12422
12493
  function runtimesDir() {
12423
- return import_node_path3.default.join(sootsimHomeDir(), "runtimes");
12494
+ return import_node_path4.default.join(sootsimHomeDir(), "runtimes");
12424
12495
  }
12425
12496
  function runtimeDir(version) {
12426
- return import_node_path3.default.join(runtimesDir(), version);
12497
+ return import_node_path4.default.join(runtimesDir(), version);
12427
12498
  }
12428
12499
  function activeRuntimeFile() {
12429
- return import_node_path3.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
12500
+ return import_node_path4.default.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
12430
12501
  }
12431
12502
  function electronDir() {
12432
- return import_node_path3.default.join(sootsimHomeDir(), "electron");
12503
+ return import_node_path4.default.join(sootsimHomeDir(), "electron");
12433
12504
  }
12434
12505
  function electronUserDataDir() {
12435
- return import_node_path3.default.join(electronDir(), "userData");
12506
+ return import_node_path4.default.join(electronDir(), "userData");
12436
12507
  }
12437
12508
  function electronVersionDir(version) {
12438
- return import_node_path3.default.join(electronDir(), version);
12509
+ return import_node_path4.default.join(electronDir(), version);
12439
12510
  }
12440
12511
  function profilesDir() {
12441
- return import_node_path3.default.join(sootsimHomeDir(), "profiles");
12512
+ return import_node_path4.default.join(sootsimHomeDir(), "profiles");
12442
12513
  }
12443
12514
  function daemonAppDir() {
12444
- return import_node_path3.default.join(sootsimHomeDir(), "daemon-app");
12515
+ return import_node_path4.default.join(sootsimHomeDir(), "daemon-app");
12445
12516
  }
12446
12517
  function daemonAppBundlePath() {
12447
- return import_node_path3.default.join(daemonAppDir(), "SootSim Daemon.app");
12518
+ return import_node_path4.default.join(daemonAppDir(), "SootSim Daemon.app");
12448
12519
  }
12449
12520
  function daemonAppLauncherPath() {
12450
- return import_node_path3.default.join(daemonAppBundlePath(), "Contents", "MacOS", "sootsim-daemon");
12521
+ return import_node_path4.default.join(daemonAppBundlePath(), "Contents", "MacOS", "sootsim-daemon");
12451
12522
  }
12452
12523
  function cacheDir() {
12453
- return import_node_path3.default.join(sootsimHomeDir(), "cache");
12524
+ return import_node_path4.default.join(sootsimHomeDir(), "cache");
12454
12525
  }
12455
12526
  function daemonLockfilePath() {
12456
- return import_node_path3.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
12527
+ return import_node_path4.default.join(sootsimHomeDir(), DAEMON_LOCKFILE);
12457
12528
  }
12458
12529
  function devBridgeLockfilePath() {
12459
- return import_node_path3.default.join(sootsimHomeDir(), DEV_BRIDGE_LOCKFILE);
12530
+ return import_node_path4.default.join(sootsimHomeDir(), DEV_BRIDGE_LOCKFILE);
12460
12531
  }
12461
12532
  function configFilePath() {
12462
- return import_node_path3.default.join(sootsimHomeDir(), CONFIG_FILE);
12533
+ return import_node_path4.default.join(sootsimHomeDir(), CONFIG_FILE);
12463
12534
  }
12464
12535
  function readSharedConfig() {
12465
12536
  try {
@@ -12512,7 +12583,7 @@ function readOrCreateAnonymousId() {
12512
12583
  return created;
12513
12584
  }
12514
12585
  function runtimeUpgradeNoticePath() {
12515
- return import_node_path3.default.join(sootsimHomeDir(), "runtime-upgraded.json");
12586
+ return import_node_path4.default.join(sootsimHomeDir(), "runtime-upgraded.json");
12516
12587
  }
12517
12588
  function writeRuntimeUpgradeNotice(notice) {
12518
12589
  ensureSootsimHome();
@@ -12672,14 +12743,14 @@ function removeDevBridgeLockfile() {
12672
12743
  } catch {
12673
12744
  }
12674
12745
  }
12675
- var import_node_crypto, import_node_fs3, import_node_os, import_node_path3, SOOTSIM_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGE_LOCKFILE, CONFIG_FILE, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
12746
+ var import_node_crypto, import_node_fs3, import_node_os, import_node_path4, SOOTSIM_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGE_LOCKFILE, CONFIG_FILE, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES;
12676
12747
  var init_home_paths = __esm({
12677
12748
  "src/home-paths.ts"() {
12678
12749
  "use strict";
12679
12750
  import_node_crypto = require("node:crypto");
12680
12751
  import_node_fs3 = __toESM(require("node:fs"), 1);
12681
12752
  import_node_os = require("node:os");
12682
- import_node_path3 = __toESM(require("node:path"), 1);
12753
+ import_node_path4 = __toESM(require("node:path"), 1);
12683
12754
  SOOTSIM_HOME_ENV = "SOOTSIM_HOME";
12684
12755
  ACTIVE_RUNTIME_FILE = "active";
12685
12756
  DAEMON_LOCKFILE = "daemon.json";
@@ -12702,7 +12773,7 @@ function listInstalledRuntimes(product) {
12702
12773
  }
12703
12774
  }
12704
12775
  function runtimeTarballCacheName(product, version) {
12705
- return import_node_path4.default.posix.basename(product.tarballPath(version));
12776
+ return import_node_path5.default.posix.basename(product.tarballPath(version));
12706
12777
  }
12707
12778
  function compareSemver(a, b) {
12708
12779
  const parse = (v) => {
@@ -12725,12 +12796,12 @@ function compareSemver(a, b) {
12725
12796
  if (!bp) return -1;
12726
12797
  return ap < bp ? -1 : 1;
12727
12798
  }
12728
- var import_node_fs4, import_node_path4;
12799
+ var import_node_fs4, import_node_path5;
12729
12800
  var init_product = __esm({
12730
12801
  "../contrast-runtime-delivery/src/product.ts"() {
12731
12802
  "use strict";
12732
12803
  import_node_fs4 = __toESM(require("node:fs"), 1);
12733
- import_node_path4 = __toESM(require("node:path"), 1);
12804
+ import_node_path5 = __toESM(require("node:path"), 1);
12734
12805
  }
12735
12806
  });
12736
12807
 
@@ -12806,7 +12877,7 @@ function createRuntimeDelivery(product) {
12806
12877
  const setActive = opts.setActive !== false;
12807
12878
  const protectVersions = [version, ...opts.protectVersions ?? []];
12808
12879
  pruneLocalRetention({ protectVersions });
12809
- if (!opts.force && import_node_fs5.default.existsSync(import_node_path5.default.join(destDir, product.installedMarker))) {
12880
+ if (!opts.force && import_node_fs5.default.existsSync(import_node_path6.default.join(destDir, product.installedMarker))) {
12810
12881
  if (setActive) product.writeActiveRuntime(version);
12811
12882
  pruneLocalRetention({ protectVersions });
12812
12883
  return {
@@ -12821,14 +12892,14 @@ function createRuntimeDelivery(product) {
12821
12892
  }
12822
12893
  const tarUrl = entry.tarball || tarballUrl(version, cdnOrigin);
12823
12894
  const downloadDir = import_node_fs5.default.mkdtempSync(
12824
- import_node_path5.default.join(import_node_os2.default.tmpdir(), `${product.id}-runtime-download-`)
12895
+ import_node_path6.default.join(import_node_os2.default.tmpdir(), `${product.id}-runtime-download-`)
12825
12896
  );
12826
- const runtimeArchivePath = import_node_path5.default.join(
12897
+ const runtimeArchivePath = import_node_path6.default.join(
12827
12898
  downloadDir,
12828
12899
  runtimeTarballCacheName(product, version)
12829
12900
  );
12830
- const tmpDir = import_node_path5.default.join(
12831
- import_node_path5.default.dirname(destDir),
12901
+ const tmpDir = import_node_path6.default.join(
12902
+ import_node_path6.default.dirname(destDir),
12832
12903
  `.installing-${version}-${process.pid}`
12833
12904
  );
12834
12905
  import_node_fs5.default.rmSync(tmpDir, { recursive: true, force: true });
@@ -12846,7 +12917,7 @@ function createRuntimeDelivery(product) {
12846
12917
  }
12847
12918
  import_node_fs5.default.mkdirSync(tmpDir, { recursive: true });
12848
12919
  await extractTarball(runtimeArchivePath, tmpDir);
12849
- if (!import_node_fs5.default.existsSync(import_node_path5.default.join(tmpDir, product.installedMarker))) {
12920
+ if (!import_node_fs5.default.existsSync(import_node_path6.default.join(tmpDir, product.installedMarker))) {
12850
12921
  throw new Error(
12851
12922
  `extracted tarball for runtime ${version} is missing ${product.installedMarker}`
12852
12923
  );
@@ -12880,7 +12951,7 @@ function createRuntimeDelivery(product) {
12880
12951
  if (pin) {
12881
12952
  const activeVersion2 = product.readActiveRuntime();
12882
12953
  const pinInstalled = import_node_fs5.default.existsSync(
12883
- import_node_path5.default.join(product.runtimeDir(pin), product.installedMarker)
12954
+ import_node_path6.default.join(product.runtimeDir(pin), product.installedMarker)
12884
12955
  );
12885
12956
  if (activeVersion2 === pin && pinInstalled) {
12886
12957
  return {
@@ -12929,7 +13000,7 @@ function createRuntimeDelivery(product) {
12929
13000
  }
12930
13001
  const activeVersion = product.readActiveRuntime();
12931
13002
  const activeDir = activeVersion ? product.runtimeDir(activeVersion) : null;
12932
- const activeInstalled = activeDir ? import_node_fs5.default.existsSync(import_node_path5.default.join(activeDir, product.installedMarker)) : false;
13003
+ const activeInstalled = activeDir ? import_node_fs5.default.existsSync(import_node_path6.default.join(activeDir, product.installedMarker)) : false;
12933
13004
  const shouldInstall = !activeVersion || !activeInstalled || compareSemver(latestVersion, activeVersion) > 0;
12934
13005
  if (!shouldInstall) {
12935
13006
  return {
@@ -13006,7 +13077,7 @@ function createRuntimeDelivery(product) {
13006
13077
  const complete = entry.name.startsWith(cachePrefix) && entry.name.endsWith(cacheSuffix);
13007
13078
  const partial = entry.name.startsWith(cachePrefix) && entry.name.endsWith(`${cacheSuffix}.partial`);
13008
13079
  return complete || partial;
13009
- }).map((entry) => import_node_path5.default.join(product.cacheDir(), entry.name)).sort();
13080
+ }).map((entry) => import_node_path6.default.join(product.cacheDir(), entry.name)).sort();
13010
13081
  } catch {
13011
13082
  }
13012
13083
  }
@@ -13050,7 +13121,7 @@ async function downloadToFile(url, destPath) {
13050
13121
  if (!res.ok || !res.body) {
13051
13122
  throw new Error(`download failed: ${res.status} ${res.statusText} (${url})`);
13052
13123
  }
13053
- import_node_fs5.default.mkdirSync(import_node_path5.default.dirname(destPath), { recursive: true });
13124
+ import_node_fs5.default.mkdirSync(import_node_path6.default.dirname(destPath), { recursive: true });
13054
13125
  const tmp = `${destPath}.partial`;
13055
13126
  try {
13056
13127
  await (0, import_promises3.pipeline)(
@@ -13067,27 +13138,27 @@ async function downloadToFile(url, destPath) {
13067
13138
  }
13068
13139
  }
13069
13140
  function sha256File(filePath) {
13070
- return new Promise((resolve6, reject) => {
13141
+ return new Promise((resolve7, reject) => {
13071
13142
  const hash = import_node_crypto2.default.createHash("sha256");
13072
13143
  const stream = import_node_fs5.default.createReadStream(filePath);
13073
13144
  stream.on("data", (chunk) => hash.update(chunk));
13074
13145
  stream.on("error", reject);
13075
- stream.on("end", () => resolve6(hash.digest("hex")));
13146
+ stream.on("end", () => resolve7(hash.digest("hex")));
13076
13147
  });
13077
13148
  }
13078
13149
  function extractTarball(tarPath, destDir) {
13079
- return new Promise((resolve6, reject) => {
13150
+ return new Promise((resolve7, reject) => {
13080
13151
  const child = (0, import_node_child_process2.spawn)("tar", ["-xzf", tarPath, "-C", destDir], {
13081
13152
  stdio: ["ignore", "inherit", "inherit"]
13082
13153
  });
13083
13154
  child.on("error", reject);
13084
13155
  child.on("exit", (code) => {
13085
- if (code === 0) resolve6();
13156
+ if (code === 0) resolve7();
13086
13157
  else reject(new Error(`tar exited with code ${code}`));
13087
13158
  });
13088
13159
  });
13089
13160
  }
13090
- var import_node_child_process2, import_node_crypto2, import_node_fs5, import_node_os2, import_node_path5, import_node_stream, import_promises3, DEFAULT_LOCAL_RUNTIME_RETENTION_COUNT;
13161
+ var import_node_child_process2, import_node_crypto2, import_node_fs5, import_node_os2, import_node_path6, import_node_stream, import_promises3, DEFAULT_LOCAL_RUNTIME_RETENTION_COUNT;
13091
13162
  var init_src = __esm({
13092
13163
  "../contrast-runtime-delivery/src/index.ts"() {
13093
13164
  "use strict";
@@ -13095,7 +13166,7 @@ var init_src = __esm({
13095
13166
  import_node_crypto2 = __toESM(require("node:crypto"), 1);
13096
13167
  import_node_fs5 = __toESM(require("node:fs"), 1);
13097
13168
  import_node_os2 = __toESM(require("node:os"), 1);
13098
- import_node_path5 = __toESM(require("node:path"), 1);
13169
+ import_node_path6 = __toESM(require("node:path"), 1);
13099
13170
  import_node_stream = require("node:stream");
13100
13171
  import_promises3 = require("node:stream/promises");
13101
13172
  init_product();
@@ -13267,7 +13338,7 @@ function getUserDataDir() {
13267
13338
  return userDataDir();
13268
13339
  }
13269
13340
  function storeFile() {
13270
- return import_node_path6.default.join(userDataDir(), "attached-projects.json");
13341
+ return import_node_path7.default.join(userDataDir(), "attached-projects.json");
13271
13342
  }
13272
13343
  function cloneEmpty() {
13273
13344
  return {
@@ -13309,7 +13380,7 @@ function loadStore() {
13309
13380
  }
13310
13381
  function writeStore(store) {
13311
13382
  const file = storeFile();
13312
- import_node_fs6.default.mkdirSync(import_node_path6.default.dirname(file), { recursive: true });
13383
+ import_node_fs6.default.mkdirSync(import_node_path7.default.dirname(file), { recursive: true });
13313
13384
  const tmp = `${file}.tmp-${process.pid}-${Date.now()}`;
13314
13385
  const fd = import_node_fs6.default.openSync(tmp, "w", 384);
13315
13386
  try {
@@ -13327,13 +13398,13 @@ function mutateStore(fn) {
13327
13398
  return store;
13328
13399
  }
13329
13400
  function projectIdForCwd(cwd) {
13330
- return (0, import_node_crypto3.createHash)("sha256").update(import_node_path6.default.resolve(cwd)).digest("hex").slice(0, 16);
13401
+ return (0, import_node_crypto3.createHash)("sha256").update(import_node_path7.default.resolve(cwd)).digest("hex").slice(0, 16);
13331
13402
  }
13332
13403
  function newSessionId() {
13333
13404
  return `s_${(0, import_node_crypto3.randomBytes)(10).toString("hex")}`;
13334
13405
  }
13335
13406
  function upsertProject(input) {
13336
- const cwd = import_node_path6.default.resolve(input.cwd);
13407
+ const cwd = import_node_path7.default.resolve(input.cwd);
13337
13408
  const id = projectIdForCwd(cwd);
13338
13409
  let result;
13339
13410
  mutateStore((store) => {
@@ -13359,7 +13430,7 @@ function upsertProject(input) {
13359
13430
  const now = Date.now();
13360
13431
  const created = {
13361
13432
  id,
13362
- name: input.name ?? import_node_path6.default.basename(cwd),
13433
+ name: input.name ?? import_node_path7.default.basename(cwd),
13363
13434
  cwd,
13364
13435
  repoRoot: input.repoRoot,
13365
13436
  sourceRoots: input.sourceRoots ?? [cwd],
@@ -13505,7 +13576,7 @@ async function seedFromDemoAppRegistry() {
13505
13576
  mutateStore((store) => {
13506
13577
  for (const app of apps) {
13507
13578
  if (!import_node_fs6.default.existsSync(app.dir)) continue;
13508
- const cwd = import_node_path6.default.resolve(app.dir);
13579
+ const cwd = import_node_path7.default.resolve(app.dir);
13509
13580
  const id = projectIdForCwd(cwd);
13510
13581
  if (store.attachedProjects.some((p) => p.id === id)) continue;
13511
13582
  const now = Date.now();
@@ -13526,13 +13597,13 @@ async function seedFromDemoAppRegistry() {
13526
13597
  }
13527
13598
  });
13528
13599
  }
13529
- var import_node_crypto3, import_node_fs6, import_node_path6, overrideDir, COST_HISTORY_MAX_AGE_MS;
13600
+ var import_node_crypto3, import_node_fs6, import_node_path7, overrideDir, COST_HISTORY_MAX_AGE_MS;
13530
13601
  var init_attached_projects = __esm({
13531
13602
  "src/attached-projects.ts"() {
13532
13603
  "use strict";
13533
13604
  import_node_crypto3 = require("node:crypto");
13534
13605
  import_node_fs6 = __toESM(require("node:fs"), 1);
13535
- import_node_path6 = __toESM(require("node:path"), 1);
13606
+ import_node_path7 = __toESM(require("node:path"), 1);
13536
13607
  init_home_paths();
13537
13608
  overrideDir = null;
13538
13609
  COST_HISTORY_MAX_AGE_MS = 14 * 24 * 60 * 60 * 1e3;
@@ -13541,16 +13612,16 @@ var init_attached_projects = __esm({
13541
13612
 
13542
13613
  // src/agent-sessions.ts
13543
13614
  function sessionDir(sessionId) {
13544
- return import_node_path7.default.join(getUserDataDir(), "sessions", sessionId);
13615
+ return import_node_path8.default.join(getUserDataDir(), "sessions", sessionId);
13545
13616
  }
13546
13617
  function promptFifoPath(sessionId) {
13547
- return import_node_path7.default.join(sessionDir(sessionId), "prompt.in");
13618
+ return import_node_path8.default.join(sessionDir(sessionId), "prompt.in");
13548
13619
  }
13549
13620
  function eventsFifoPath(sessionId) {
13550
- return import_node_path7.default.join(sessionDir(sessionId), "events.out");
13621
+ return import_node_path8.default.join(sessionDir(sessionId), "events.out");
13551
13622
  }
13552
13623
  function transcriptPath(sessionId) {
13553
- return import_node_path7.default.join(getUserDataDir(), "transcripts", `${sessionId}.log`);
13624
+ return import_node_path8.default.join(getUserDataDir(), "transcripts", `${sessionId}.log`);
13554
13625
  }
13555
13626
  function pidIsAlive(pid, sessionId) {
13556
13627
  if (!pid) return false;
@@ -13572,8 +13643,8 @@ function resolveSootsimInvocation() {
13572
13643
  const resourcesPath = process.resourcesPath;
13573
13644
  if (resourcesPath) {
13574
13645
  const candidates = [
13575
- import_node_path7.default.join(resourcesPath, "bin", "sootsim"),
13576
- import_node_path7.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
13646
+ import_node_path8.default.join(resourcesPath, "bin", "sootsim"),
13647
+ import_node_path8.default.join(resourcesPath, "bin", `sootsim-${process.platform}-${process.arch}`)
13577
13648
  ];
13578
13649
  for (const c of candidates) {
13579
13650
  if (import_node_fs7.default.existsSync(c)) return { cmd: c, prefixArgs: [] };
@@ -13599,12 +13670,12 @@ function tryWorkspaceSootsim() {
13599
13670
  const sootsimDir = resolveSootsimPackageDir();
13600
13671
  if (!sootsimDir) return null;
13601
13672
  const binaryName = `sootsim-${process.platform}-${process.arch}`;
13602
- const distBinary = import_node_path7.default.join(sootsimDir, "dist-bin", binaryName);
13673
+ const distBinary = import_node_path8.default.join(sootsimDir, "dist-bin", binaryName);
13603
13674
  if (import_node_fs7.default.existsSync(distBinary)) return { cmd: distBinary, prefixArgs: [] };
13604
- const distBin = import_node_path7.default.join(sootsimDir, "dist-cli", "bin.js");
13675
+ const distBin = import_node_path8.default.join(sootsimDir, "dist-cli", "bin.js");
13605
13676
  if (import_node_fs7.default.existsSync(distBin)) {
13606
13677
  try {
13607
- const src = import_node_path7.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
13678
+ const src = import_node_path8.default.join(sootsimDir, "cli", "commands", "agent-wrapper.ts");
13608
13679
  if (import_node_fs7.default.existsSync(src)) {
13609
13680
  const srcMtime = import_node_fs7.default.statSync(src).mtimeMs;
13610
13681
  const buildMtime = import_node_fs7.default.statSync(distBin).mtimeMs;
@@ -13626,14 +13697,14 @@ function tryWorkspaceSootsim() {
13626
13697
  function resolveSootsimPackageDir() {
13627
13698
  try {
13628
13699
  const resolved = require.resolve("sootsim/package.json");
13629
- return import_node_path7.default.dirname(resolved);
13700
+ return import_node_path8.default.dirname(resolved);
13630
13701
  } catch {
13631
13702
  }
13632
13703
  const here = fileFromImportMeta();
13633
13704
  if (!here) return null;
13634
- let cur = import_node_path7.default.dirname(here);
13705
+ let cur = import_node_path8.default.dirname(here);
13635
13706
  for (let i = 0; i < 8; i++) {
13636
- const pkg = import_node_path7.default.join(cur, "package.json");
13707
+ const pkg = import_node_path8.default.join(cur, "package.json");
13637
13708
  try {
13638
13709
  if (import_node_fs7.default.existsSync(pkg)) {
13639
13710
  const parsed = JSON.parse(import_node_fs7.default.readFileSync(pkg, "utf8"));
@@ -13641,7 +13712,7 @@ function resolveSootsimPackageDir() {
13641
13712
  }
13642
13713
  } catch {
13643
13714
  }
13644
- const parent = import_node_path7.default.dirname(cur);
13715
+ const parent = import_node_path8.default.dirname(cur);
13645
13716
  if (parent === cur) break;
13646
13717
  cur = parent;
13647
13718
  }
@@ -13657,13 +13728,13 @@ function fileFromImportMeta() {
13657
13728
  }
13658
13729
  }
13659
13730
  async function withStartLock(projectId, provider, fn) {
13660
- const lockDir = import_node_path7.default.join(getUserDataDir(), "locks");
13731
+ const lockDir = import_node_path8.default.join(getUserDataDir(), "locks");
13661
13732
  import_node_fs7.default.mkdirSync(lockDir, { recursive: true });
13662
13733
  try {
13663
13734
  import_node_fs7.default.chmodSync(lockDir, 448);
13664
13735
  } catch {
13665
13736
  }
13666
- const lockPath = import_node_path7.default.join(lockDir, `start-${projectId}-${provider}.lock`);
13737
+ const lockPath = import_node_path8.default.join(lockDir, `start-${projectId}-${provider}.lock`);
13667
13738
  const deadline = Date.now() + 4e3;
13668
13739
  let fd = null;
13669
13740
  while (fd === null) {
@@ -13714,7 +13785,7 @@ function isProcessAlive(pid) {
13714
13785
  }
13715
13786
  }
13716
13787
  function mkfifoSync(p) {
13717
- const parent = import_node_path7.default.dirname(p);
13788
+ const parent = import_node_path8.default.dirname(p);
13718
13789
  import_node_fs7.default.mkdirSync(parent, { recursive: true });
13719
13790
  try {
13720
13791
  import_node_fs7.default.chmodSync(parent, 448);
@@ -13772,7 +13843,7 @@ async function startSession(opts) {
13772
13843
  const transcript = transcriptPath(session.id);
13773
13844
  mkfifoSync(promptIn);
13774
13845
  mkfifoSync(eventsOut);
13775
- const transcriptDir = import_node_path7.default.dirname(transcript);
13846
+ const transcriptDir = import_node_path8.default.dirname(transcript);
13776
13847
  import_node_fs7.default.mkdirSync(transcriptDir, { recursive: true });
13777
13848
  try {
13778
13849
  import_node_fs7.default.chmodSync(transcriptDir, 448);
@@ -13955,14 +14026,14 @@ async function waitForFirstEvent(fifo, predicate, timeoutMs) {
13955
14026
  import_node_fs7.default.closeSync(fd);
13956
14027
  }
13957
14028
  }
13958
- var import_node_child_process3, import_node_crypto4, import_node_fs7, import_node_path7, import_node_readline, AgentSessionError;
14029
+ var import_node_child_process3, import_node_crypto4, import_node_fs7, import_node_path8, import_node_readline, AgentSessionError;
13959
14030
  var init_agent_sessions = __esm({
13960
14031
  "src/agent-sessions.ts"() {
13961
14032
  "use strict";
13962
14033
  import_node_child_process3 = require("node:child_process");
13963
14034
  import_node_crypto4 = require("node:crypto");
13964
14035
  import_node_fs7 = __toESM(require("node:fs"), 1);
13965
- import_node_path7 = __toESM(require("node:path"), 1);
14036
+ import_node_path8 = __toESM(require("node:path"), 1);
13966
14037
  import_node_readline = __toESM(require("node:readline"), 1);
13967
14038
  init_agent_events();
13968
14039
  init_agent_prompt();
@@ -14015,7 +14086,7 @@ async function sendPromptToTeamMachineSession(input) {
14015
14086
  }
14016
14087
  const command = resolveTeamMachineCommand(input.command);
14017
14088
  const timeoutMs = input.timeoutMs ?? 15e3;
14018
- await new Promise((resolve6, reject) => {
14089
+ await new Promise((resolve7, reject) => {
14019
14090
  const child = (0, import_node_child_process4.spawn)(command, ["send", sessionId, text], {
14020
14091
  stdio: ["ignore", "ignore", "pipe"],
14021
14092
  env: process.env
@@ -14039,7 +14110,7 @@ async function sendPromptToTeamMachineSession(input) {
14039
14110
  child.on("exit", (code, signal) => {
14040
14111
  clearTimeout(timer);
14041
14112
  if (code === 0) {
14042
- resolve6();
14113
+ resolve7();
14043
14114
  return;
14044
14115
  }
14045
14116
  const detail = stderr.trim();
@@ -14074,12 +14145,12 @@ function mapFrameworkToProjectFramework(fw) {
14074
14145
  if (fw === "one" || fw === "vxrn") return "one";
14075
14146
  return "unknown";
14076
14147
  }
14077
- var import_node_fs8, import_node_path8, WS_OPEN, SESSION_STATUS_PERSIST_DELAY_MS, AgentHost;
14148
+ var import_node_fs8, import_node_path9, WS_OPEN, SESSION_STATUS_PERSIST_DELAY_MS, AgentHost;
14078
14149
  var init_agent_host = __esm({
14079
14150
  "src/host/agent-host.ts"() {
14080
14151
  "use strict";
14081
14152
  import_node_fs8 = __toESM(require("node:fs"), 1);
14082
- import_node_path8 = __toESM(require("node:path"), 1);
14153
+ import_node_path9 = __toESM(require("node:path"), 1);
14083
14154
  init_dev_server_scanner();
14084
14155
  init_agent_sessions();
14085
14156
  init_attached_projects();
@@ -14278,7 +14349,7 @@ var init_agent_host = __esm({
14278
14349
  );
14279
14350
  const project = upsertProject({
14280
14351
  cwd: match.cwd,
14281
- name: match.projectName ?? import_node_path8.default.basename(match.cwd),
14352
+ name: match.projectName ?? import_node_path9.default.basename(match.cwd),
14282
14353
  preferredProvider: input.provider ?? existing?.preferredProvider,
14283
14354
  sourceRoots: existing?.sourceRoots ?? [match.cwd],
14284
14355
  knownBundleUrls,
@@ -14298,9 +14369,9 @@ var init_agent_host = __esm({
14298
14369
  const dir = getUserDataDir();
14299
14370
  return {
14300
14371
  userDataDir: dir,
14301
- storeFile: import_node_path8.default.join(dir, "attached-projects.json"),
14302
- sessionsDir: import_node_path8.default.join(dir, "sessions"),
14303
- transcriptsDir: import_node_path8.default.join(dir, "transcripts")
14372
+ storeFile: import_node_path9.default.join(dir, "attached-projects.json"),
14373
+ sessionsDir: import_node_path9.default.join(dir, "sessions"),
14374
+ transcriptsDir: import_node_path9.default.join(dir, "transcripts")
14304
14375
  };
14305
14376
  }
14306
14377
  // --- subscription management ---
@@ -14750,7 +14821,7 @@ async function handleFetchProxyRequest(req, res) {
14750
14821
  } else if (nextBody) {
14751
14822
  targetHeaders["content-length"] = String(nextBody.byteLength);
14752
14823
  }
14753
- const proxyRes = await new Promise((resolve6, reject) => {
14824
+ const proxyRes = await new Promise((resolve7, reject) => {
14754
14825
  const proxyReq = transport.request(
14755
14826
  {
14756
14827
  hostname: targetUrl2.hostname,
@@ -14760,7 +14831,7 @@ async function handleFetchProxyRequest(req, res) {
14760
14831
  headers: targetHeaders,
14761
14832
  ...loopbackTlsOptions(targetUrl2)
14762
14833
  },
14763
- resolve6
14834
+ resolve7
14764
14835
  );
14765
14836
  const abort = () => proxyReq.destroy(new Error("fetch proxy client disconnected"));
14766
14837
  req.once("aborted", abort);
@@ -14958,7 +15029,7 @@ function buildOpenUrlCommand(url, options = {}) {
14958
15029
  };
14959
15030
  }
14960
15031
  async function spawnLaunch(command, args, detached) {
14961
- return new Promise((resolve6, reject) => {
15032
+ return new Promise((resolve7, reject) => {
14962
15033
  const child = (0, import_child_process2.spawn)(command, args, {
14963
15034
  detached,
14964
15035
  stdio: "ignore"
@@ -14966,7 +15037,7 @@ async function spawnLaunch(command, args, detached) {
14966
15037
  child.once("error", reject);
14967
15038
  child.once("spawn", () => {
14968
15039
  if (detached) child.unref();
14969
- resolve6(child.pid);
15040
+ resolve7(child.pid);
14970
15041
  });
14971
15042
  });
14972
15043
  }
@@ -15427,7 +15498,7 @@ var init_bridge_host = __esm({
15427
15498
  );
15428
15499
  }
15429
15500
  bindOnce(port, _silent) {
15430
- return new Promise((resolve6, reject) => {
15501
+ return new Promise((resolve7, reject) => {
15431
15502
  const server = (0, import_http3.createServer)((req, res) => this.handleHttpRequest(req, res));
15432
15503
  let settled = false;
15433
15504
  const onError = (err) => {
@@ -15459,7 +15530,7 @@ var init_bridge_host = __esm({
15459
15530
  this.wss?.emit("connection", ws, req);
15460
15531
  });
15461
15532
  });
15462
- resolve6();
15533
+ resolve7();
15463
15534
  });
15464
15535
  });
15465
15536
  }
@@ -16607,7 +16678,7 @@ var init_bridge_host = __esm({
16607
16678
  async sendCommand(cmd) {
16608
16679
  const sim = await this.waitForSim(cmd.simId);
16609
16680
  const id = this.nextCommandId++;
16610
- return new Promise((resolve6, reject) => {
16681
+ return new Promise((resolve7, reject) => {
16611
16682
  const timeout = setTimeout(() => {
16612
16683
  this.pendingCommands.delete(id);
16613
16684
  this.broadcastSimClientStates();
@@ -16619,7 +16690,7 @@ var init_bridge_host = __esm({
16619
16690
  clearTimeout(timeout);
16620
16691
  this.pendingCommands.delete(id);
16621
16692
  this.broadcastSimClientStates();
16622
- resolve6(value);
16693
+ resolve7(value);
16623
16694
  },
16624
16695
  reject: (error) => {
16625
16696
  clearTimeout(timeout);
@@ -16645,23 +16716,23 @@ var init_bridge_host = __esm({
16645
16716
  async openPathInEditor(filePath, line, column) {
16646
16717
  const loc = line != null ? `:${line}${column != null ? `:${column}` : ""}` : "";
16647
16718
  const target = `${filePath}${loc}`;
16648
- const trySpawn = (cmd, args) => new Promise((resolve6) => {
16719
+ const trySpawn = (cmd, args) => new Promise((resolve7) => {
16649
16720
  try {
16650
16721
  const child = (0, import_child_process3.spawn)(cmd, args, { detached: true, stdio: "ignore" });
16651
16722
  let settled = false;
16652
16723
  child.on("error", () => {
16653
16724
  if (settled) return;
16654
16725
  settled = true;
16655
- resolve6(false);
16726
+ resolve7(false);
16656
16727
  });
16657
16728
  child.on("spawn", () => {
16658
16729
  if (settled) return;
16659
16730
  settled = true;
16660
16731
  child.unref();
16661
- resolve6(true);
16732
+ resolve7(true);
16662
16733
  });
16663
16734
  } catch {
16664
- resolve6(false);
16735
+ resolve7(false);
16665
16736
  }
16666
16737
  });
16667
16738
  const envEditor = process.env.REACT_EDITOR || process.env.EDITOR;
@@ -16908,7 +16979,7 @@ var init_bridge_host = __esm({
16908
16979
  const sim = this.getOpenSim(simId);
16909
16980
  if (sim) return sim;
16910
16981
  }
16911
- await new Promise((resolve6) => setTimeout(resolve6, intervalMs));
16982
+ await new Promise((resolve7) => setTimeout(resolve7, intervalMs));
16912
16983
  }
16913
16984
  if (!simId) throw new Error("no sim connected");
16914
16985
  const openSimIds = this.getDefaultSimCandidates().map((sim) => sim.id);
@@ -17638,7 +17709,7 @@ function createBridge(wsPort, opts = {}) {
17638
17709
  const pending = /* @__PURE__ */ new Map();
17639
17710
  const ws = new import_ws3.WebSocket(`ws://localhost:${wsPort}`);
17640
17711
  const identity = getCliIdentity();
17641
- const ready = new Promise((resolve6, reject) => {
17712
+ const ready = new Promise((resolve7, reject) => {
17642
17713
  ws.on("open", () => {
17643
17714
  try {
17644
17715
  ws.send(
@@ -17652,7 +17723,7 @@ function createBridge(wsPort, opts = {}) {
17652
17723
  );
17653
17724
  } catch {
17654
17725
  }
17655
- resolve6();
17726
+ resolve7();
17656
17727
  });
17657
17728
  ws.on("error", (err) => {
17658
17729
  const cause = err.message ? `: ${err.message}` : "";
@@ -17718,7 +17789,7 @@ function createBridge(wsPort, opts = {}) {
17718
17789
  const sendOnce = async (defaultSimId) => {
17719
17790
  await ready;
17720
17791
  const id = nextId++;
17721
- return new Promise((resolve6, reject) => {
17792
+ return new Promise((resolve7, reject) => {
17722
17793
  const timeout = setTimeout(() => {
17723
17794
  pending.delete(id);
17724
17795
  reject(
@@ -17730,7 +17801,7 @@ function createBridge(wsPort, opts = {}) {
17730
17801
  pending.set(id, {
17731
17802
  resolve: (v) => {
17732
17803
  clearTimeout(timeout);
17733
- resolve6(v);
17804
+ resolve7(v);
17734
17805
  },
17735
17806
  reject: (e) => {
17736
17807
  clearTimeout(timeout);
@@ -18136,7 +18207,7 @@ var init_profiles = __esm({
18136
18207
  // cli/app-project.ts
18137
18208
  function firstNamedFile(dir, names) {
18138
18209
  for (const name of names) {
18139
- const candidate = import_node_path9.default.join(dir, name);
18210
+ const candidate = import_node_path10.default.join(dir, name);
18140
18211
  try {
18141
18212
  if (import_node_fs9.default.statSync(candidate).isFile()) return candidate;
18142
18213
  } catch {
@@ -18152,7 +18223,7 @@ function findSootSimAppConfig(dir) {
18152
18223
  }
18153
18224
  function readWorkspacePatterns(rootDir) {
18154
18225
  try {
18155
- const value = JSON.parse(import_node_fs9.default.readFileSync(import_node_path9.default.join(rootDir, "package.json"), "utf8"));
18226
+ const value = JSON.parse(import_node_fs9.default.readFileSync(import_node_path10.default.join(rootDir, "package.json"), "utf8"));
18156
18227
  if (!value || typeof value !== "object") return [];
18157
18228
  const workspaces = Reflect.get(value, "workspaces");
18158
18229
  if (Array.isArray(workspaces)) {
@@ -18174,7 +18245,7 @@ function workspaceDirectories(rootDir) {
18174
18245
  complete = false;
18175
18246
  break;
18176
18247
  }
18177
- if (!pattern || import_node_path9.default.isAbsolute(pattern)) continue;
18248
+ if (!pattern || import_node_path10.default.isAbsolute(pattern)) continue;
18178
18249
  const segments = pattern.split(/[\\/]+/).filter(Boolean);
18179
18250
  if (segments.length === 0 || segments.length > MAX_SCAN_DEPTH) continue;
18180
18251
  if (segments.some((segment) => segment === ".." || segment === "**")) continue;
@@ -18197,10 +18268,10 @@ function workspaceDirectories(rootDir) {
18197
18268
  for (const entry of entries) {
18198
18269
  if (!entry.isDirectory() || entry.isSymbolicLink()) continue;
18199
18270
  if (entry.name.startsWith(".") || SKIP_DIR_NAMES.has(entry.name)) continue;
18200
- next.push(import_node_path9.default.join(parent, entry.name));
18271
+ next.push(import_node_path10.default.join(parent, entry.name));
18201
18272
  }
18202
18273
  } else if (!segment.includes("*")) {
18203
- const candidate = import_node_path9.default.join(parent, segment);
18274
+ const candidate = import_node_path10.default.join(parent, segment);
18204
18275
  try {
18205
18276
  const stat2 = import_node_fs9.default.lstatSync(candidate);
18206
18277
  if (stat2.isDirectory() && !stat2.isSymbolicLink()) next.push(candidate);
@@ -18246,22 +18317,22 @@ function boundedConfigDirectories(rootDir) {
18246
18317
  complete = false;
18247
18318
  break;
18248
18319
  }
18249
- queue.push({ dir: import_node_path9.default.join(current.dir, entry.name), depth: current.depth + 1 });
18320
+ queue.push({ dir: import_node_path10.default.join(current.dir, entry.name), depth: current.depth + 1 });
18250
18321
  }
18251
18322
  }
18252
18323
  return { directories: matches, complete: complete && nextIndex === queue.length };
18253
18324
  }
18254
18325
  function resolveAppProject(startDir, opts = {}) {
18255
- const rootDir = import_node_path9.default.resolve(startDir);
18326
+ const rootDir = import_node_path10.default.resolve(startDir);
18256
18327
  const rootConfigPath = findSootSimAppConfig(rootDir);
18257
18328
  if (findExpoAppConfig(rootDir) || opts.trustStart && import_node_fs9.default.existsSync(rootDir)) {
18258
18329
  let configPath = rootConfigPath;
18259
18330
  if (!configPath && opts.trustStart) {
18260
- let parent = import_node_path9.default.dirname(rootDir);
18261
- for (let depth = 0; depth < MAX_SCAN_DEPTH && parent !== import_node_path9.default.dirname(parent); depth++) {
18331
+ let parent = import_node_path10.default.dirname(rootDir);
18332
+ for (let depth = 0; depth < MAX_SCAN_DEPTH && parent !== import_node_path10.default.dirname(parent); depth++) {
18262
18333
  configPath = findSootSimAppConfig(parent);
18263
18334
  if (configPath) break;
18264
- parent = import_node_path9.default.dirname(parent);
18335
+ parent = import_node_path10.default.dirname(parent);
18265
18336
  }
18266
18337
  }
18267
18338
  return { appDir: rootDir, configPath };
@@ -18293,12 +18364,12 @@ function resolveAppProject(startDir, opts = {}) {
18293
18364
  if (rootConfigPath) return { appDir: rootDir, configPath: rootConfigPath };
18294
18365
  return null;
18295
18366
  }
18296
- var import_node_fs9, import_node_path9, EXPO_APP_CONFIG_NAMES, SOOTSIM_APP_CONFIG_NAMES, SKIP_DIR_NAMES, MAX_SCANNED_DIRECTORIES, MAX_SCAN_DEPTH;
18367
+ var import_node_fs9, import_node_path10, EXPO_APP_CONFIG_NAMES, SOOTSIM_APP_CONFIG_NAMES, SKIP_DIR_NAMES, MAX_SCANNED_DIRECTORIES, MAX_SCAN_DEPTH;
18297
18368
  var init_app_project = __esm({
18298
18369
  "cli/app-project.ts"() {
18299
18370
  "use strict";
18300
18371
  import_node_fs9 = __toESM(require("node:fs"), 1);
18301
- import_node_path9 = __toESM(require("node:path"), 1);
18372
+ import_node_path10 = __toESM(require("node:path"), 1);
18302
18373
  EXPO_APP_CONFIG_NAMES = [
18303
18374
  "app.config.js",
18304
18375
  "app.config.ts",
@@ -18394,7 +18465,7 @@ function localOriginOf(value) {
18394
18465
  }
18395
18466
  function hasPackageJson(dir) {
18396
18467
  try {
18397
- return import_node_fs10.default.statSync(import_node_path10.default.join(dir, "package.json")).isFile();
18468
+ return import_node_fs10.default.statSync(import_node_path11.default.join(dir, "package.json")).isFile();
18398
18469
  } catch {
18399
18470
  return false;
18400
18471
  }
@@ -18403,7 +18474,7 @@ function discoverNativeLinkedAppFonts(opts) {
18403
18474
  const metroOrigin = localOriginOf(opts.bundleUrl);
18404
18475
  if (!metroOrigin) return [];
18405
18476
  const explicit = opts.repoDir || process.env.CONTRAST_REPO_DIR;
18406
- const startDir = explicit ? import_node_path10.default.resolve(explicit) : process.cwd();
18477
+ const startDir = explicit ? import_node_path11.default.resolve(explicit) : process.cwd();
18407
18478
  if (!explicit && !hasPackageJson(startDir)) return [];
18408
18479
  const project = resolveAppProject(startDir, { trustStart: opts.exactProjectDir });
18409
18480
  const selectedAppDir = project?.appDir ?? null;
@@ -18455,7 +18526,7 @@ function discoverNativeLinkedAppFonts(opts) {
18455
18526
  }
18456
18527
  for (const entry of entries) {
18457
18528
  if (entry.isSymbolicLink()) continue;
18458
- const fullPath = import_node_path10.default.join(current.dir, entry.name);
18529
+ const fullPath = import_node_path11.default.join(current.dir, entry.name);
18459
18530
  if (entry.isDirectory()) {
18460
18531
  if (current.depth < 4 && pending.length < 64 && !entry.name.startsWith(".")) {
18461
18532
  pending.push({ dir: fullPath, depth: current.depth + 1 });
@@ -18463,15 +18534,15 @@ function discoverNativeLinkedAppFonts(opts) {
18463
18534
  continue;
18464
18535
  }
18465
18536
  if (!entry.isFile() || !/\.(ttf|otf|woff|woff2)$/i.test(entry.name)) continue;
18466
- const relative = import_node_path10.default.relative(root, fullPath).split(import_node_path10.default.sep).join("/");
18467
- fontPaths.push(import_node_path10.default.posix.join(metroPathPrefix, relative));
18537
+ const relative = import_node_path11.default.relative(root, fullPath).split(import_node_path11.default.sep).join("/");
18538
+ fontPaths.push(import_node_path11.default.posix.join(metroPathPrefix, relative));
18468
18539
  if (fontPaths.length >= 256) break;
18469
18540
  }
18470
18541
  }
18471
18542
  };
18472
18543
  try {
18473
18544
  const packageJson = JSON.parse(
18474
- import_node_fs10.default.readFileSync(import_node_path10.default.join(selectedAppDir, "package.json"), "utf8")
18545
+ import_node_fs10.default.readFileSync(import_node_path11.default.join(selectedAppDir, "package.json"), "utf8")
18475
18546
  );
18476
18547
  const dependencyNames = /* @__PURE__ */ new Set();
18477
18548
  for (const field of ["dependencies", "devDependencies", "optionalDependencies"]) {
@@ -18486,24 +18557,24 @@ function discoverNativeLinkedAppFonts(opts) {
18486
18557
  const config = Reflect.get(packageJson, "reactNativeVectorIcons");
18487
18558
  const configuredFontDir = config && typeof config === "object" ? Reflect.get(config, "fontDir") : null;
18488
18559
  const configuredDir = typeof configuredFontDir === "string" ? configuredFontDir : "rnvi-fonts";
18489
- const root = import_node_path10.default.resolve(selectedAppDir, configuredDir);
18490
- const relativeRoot = import_node_path10.default.relative(selectedAppDir, root);
18491
- if (!relativeRoot.startsWith("..") && !import_node_path10.default.isAbsolute(relativeRoot)) {
18492
- collectFontFiles(root, relativeRoot.split(import_node_path10.default.sep).join("/"));
18560
+ const root = import_node_path11.default.resolve(selectedAppDir, configuredDir);
18561
+ const relativeRoot = import_node_path11.default.relative(selectedAppDir, root);
18562
+ if (!relativeRoot.startsWith("..") && !import_node_path11.default.isAbsolute(relativeRoot)) {
18563
+ collectFontFiles(root, relativeRoot.split(import_node_path11.default.sep).join("/"));
18493
18564
  }
18494
- const vectorIconRequire = (0, import_node_module2.createRequire)(import_node_path10.default.join(selectedAppDir, "package.json"));
18565
+ const vectorIconRequire = (0, import_node_module2.createRequire)(import_node_path11.default.join(selectedAppDir, "package.json"));
18495
18566
  for (const dependencyName of vectorIconDependencies) {
18496
18567
  try {
18497
18568
  const entryPath = vectorIconRequire.resolve(dependencyName);
18498
- const dependencyPath = dependencyName.split("/").join(import_node_path10.default.sep);
18499
- const marker = `${import_node_path10.default.sep}node_modules${import_node_path10.default.sep}${dependencyPath}${import_node_path10.default.sep}`;
18569
+ const dependencyPath = dependencyName.split("/").join(import_node_path11.default.sep);
18570
+ const marker = `${import_node_path11.default.sep}node_modules${import_node_path11.default.sep}${dependencyPath}${import_node_path11.default.sep}`;
18500
18571
  const markerIndex = entryPath.lastIndexOf(marker);
18501
18572
  if (markerIndex === -1) continue;
18502
18573
  const packageRoot = entryPath.slice(0, markerIndex + marker.length - 1);
18503
18574
  const fontsDir = dependencyName === "react-native-vector-icons" ? "Fonts" : "fonts";
18504
18575
  collectFontFiles(
18505
- import_node_path10.default.join(packageRoot, fontsDir),
18506
- import_node_path10.default.posix.join("node_modules", dependencyName, fontsDir)
18576
+ import_node_path11.default.join(packageRoot, fontsDir),
18577
+ import_node_path11.default.posix.join("node_modules", dependencyName, fontsDir)
18507
18578
  );
18508
18579
  } catch {
18509
18580
  }
@@ -18512,32 +18583,32 @@ function discoverNativeLinkedAppFonts(opts) {
18512
18583
  } catch {
18513
18584
  }
18514
18585
  try {
18515
- const configPath = import_node_path10.default.join(selectedAppDir, "react-native.config.js");
18586
+ const configPath = import_node_path11.default.join(selectedAppDir, "react-native.config.js");
18516
18587
  if (import_node_fs10.default.statSync(configPath).isFile()) {
18517
- const appConfigRequire = (0, import_node_module2.createRequire)(import_node_path10.default.join(selectedAppDir, "package.json"));
18588
+ const appConfigRequire = (0, import_node_module2.createRequire)(import_node_path11.default.join(selectedAppDir, "package.json"));
18518
18589
  const rnConfig = appConfigRequire(configPath);
18519
18590
  const assets = rnConfig && typeof rnConfig === "object" ? Reflect.get(rnConfig, "assets") : null;
18520
18591
  if (Array.isArray(assets)) {
18521
18592
  for (const assetDir of assets) {
18522
18593
  if (typeof assetDir !== "string") continue;
18523
- const root = import_node_path10.default.resolve(selectedAppDir, assetDir);
18524
- const relativeRoot = import_node_path10.default.relative(selectedAppDir, root);
18525
- if (relativeRoot.startsWith("..") || import_node_path10.default.isAbsolute(relativeRoot)) continue;
18526
- collectFontFiles(root, relativeRoot.split(import_node_path10.default.sep).join("/"));
18594
+ const root = import_node_path11.default.resolve(selectedAppDir, assetDir);
18595
+ const relativeRoot = import_node_path11.default.relative(selectedAppDir, root);
18596
+ if (relativeRoot.startsWith("..") || import_node_path11.default.isAbsolute(relativeRoot)) continue;
18597
+ collectFontFiles(root, relativeRoot.split(import_node_path11.default.sep).join("/"));
18527
18598
  }
18528
18599
  }
18529
18600
  }
18530
18601
  } catch {
18531
18602
  }
18532
18603
  if (platform === "ios") {
18533
- const iosDir = import_node_path10.default.join(selectedAppDir, "ios");
18604
+ const iosDir = import_node_path11.default.join(selectedAppDir, "ios");
18534
18605
  try {
18535
18606
  const targetDirs = import_node_fs10.default.readdirSync(iosDir, { withFileTypes: true }).filter(
18536
18607
  (entry) => entry.isDirectory() && !entry.isSymbolicLink() && entry.name !== "Pods" && entry.name !== "build" && !entry.name.startsWith(".")
18537
18608
  ).slice(0, 64);
18538
- const plistPaths = [import_node_path10.default.join(iosDir, "Info.plist")];
18609
+ const plistPaths = [import_node_path11.default.join(iosDir, "Info.plist")];
18539
18610
  for (const entry of targetDirs) {
18540
- plistPaths.push(import_node_path10.default.join(iosDir, entry.name, "Info.plist"));
18611
+ plistPaths.push(import_node_path11.default.join(iosDir, entry.name, "Info.plist"));
18541
18612
  }
18542
18613
  for (const plistPath of plistPaths) {
18543
18614
  let parsed;
@@ -18552,12 +18623,12 @@ function discoverNativeLinkedAppFonts(opts) {
18552
18623
  for (const declaredFont of declaredFonts) {
18553
18624
  if (typeof declaredFont !== "string") continue;
18554
18625
  const candidates = [
18555
- import_node_path10.default.resolve(import_node_path10.default.dirname(plistPath), declaredFont),
18556
- import_node_path10.default.resolve(iosDir, declaredFont)
18626
+ import_node_path11.default.resolve(import_node_path11.default.dirname(plistPath), declaredFont),
18627
+ import_node_path11.default.resolve(iosDir, declaredFont)
18557
18628
  ];
18558
18629
  const fontPath = candidates.find((candidate) => {
18559
- const relative = import_node_path10.default.relative(selectedAppDir, candidate);
18560
- if (relative.startsWith("..") || import_node_path10.default.isAbsolute(relative)) return false;
18630
+ const relative = import_node_path11.default.relative(selectedAppDir, candidate);
18631
+ if (relative.startsWith("..") || import_node_path11.default.isAbsolute(relative)) return false;
18561
18632
  try {
18562
18633
  return import_node_fs10.default.statSync(candidate).isFile();
18563
18634
  } catch {
@@ -18566,7 +18637,7 @@ function discoverNativeLinkedAppFonts(opts) {
18566
18637
  });
18567
18638
  if (!fontPath) continue;
18568
18639
  fontPaths.push(
18569
- import_node_path10.default.relative(selectedAppDir, fontPath).split(import_node_path10.default.sep).join("/")
18640
+ import_node_path11.default.relative(selectedAppDir, fontPath).split(import_node_path11.default.sep).join("/")
18570
18641
  );
18571
18642
  }
18572
18643
  }
@@ -18605,13 +18676,13 @@ async function resolveMetroProjectRoot(bundleUrl, opts) {
18605
18676
  function encodeAppFontsWire(specs) {
18606
18677
  return specs.map((spec) => `${encodeURIComponent(spec.url)}::${encodeURIComponent(spec.family)}`).join(",");
18607
18678
  }
18608
- var import_node_fs10, import_node_module2, import_node_path10, import_config_plugin_fonts, require3;
18679
+ var import_node_fs10, import_node_module2, import_node_path11, import_config_plugin_fonts, require3;
18609
18680
  var init_app_fonts = __esm({
18610
18681
  "cli/app-fonts.ts"() {
18611
18682
  "use strict";
18612
18683
  import_node_fs10 = __toESM(require("node:fs"), 1);
18613
18684
  import_node_module2 = require("node:module");
18614
- import_node_path10 = __toESM(require("node:path"), 1);
18685
+ import_node_path11 = __toESM(require("node:path"), 1);
18615
18686
  import_config_plugin_fonts = require("sootsim-engine/engine/config-plugin-fonts");
18616
18687
  init_dev_server_scanner();
18617
18688
  init_plist();
@@ -18634,7 +18705,7 @@ function localOriginOf2(value) {
18634
18705
  }
18635
18706
  function hasPackageJson2(dir) {
18636
18707
  try {
18637
- return import_node_fs11.default.statSync(import_node_path11.default.join(dir, "package.json")).isFile();
18708
+ return import_node_fs11.default.statSync(import_node_path12.default.join(dir, "package.json")).isFile();
18638
18709
  } catch {
18639
18710
  return false;
18640
18711
  }
@@ -18643,7 +18714,7 @@ function discoverConfigPluginAppSplash(opts) {
18643
18714
  const metroOrigin = localOriginOf2(opts.bundleUrl);
18644
18715
  if (!metroOrigin) return null;
18645
18716
  const explicit = opts.repoDir || process.env.CONTRAST_REPO_DIR;
18646
- const startDir = explicit ? import_node_path11.default.resolve(explicit) : process.cwd();
18717
+ const startDir = explicit ? import_node_path12.default.resolve(explicit) : process.cwd();
18647
18718
  if (!explicit && !hasPackageJson2(startDir)) return null;
18648
18719
  const project = resolveAppProject(startDir, { trustStart: opts.exactProjectDir });
18649
18720
  const selectedAppDir = project?.appDir ?? null;
@@ -18677,13 +18748,13 @@ function discoverConfigPluginAppSplash(opts) {
18677
18748
  function encodeAppSplashWire(spec) {
18678
18749
  return encodeURIComponent(JSON.stringify(spec));
18679
18750
  }
18680
- var import_node_fs11, import_node_module3, import_node_path11, import_config_plugin_splash, require4;
18751
+ var import_node_fs11, import_node_module3, import_node_path12, import_config_plugin_splash, require4;
18681
18752
  var init_app_splash = __esm({
18682
18753
  "cli/app-splash.ts"() {
18683
18754
  "use strict";
18684
18755
  import_node_fs11 = __toESM(require("node:fs"), 1);
18685
18756
  import_node_module3 = require("node:module");
18686
- import_node_path11 = __toESM(require("node:path"), 1);
18757
+ import_node_path12 = __toESM(require("node:path"), 1);
18687
18758
  import_config_plugin_splash = require("sootsim-engine/engine/config-plugin-splash");
18688
18759
  init_app_project();
18689
18760
  require4 = (0, import_node_module3.createRequire)(__sootsim_import_meta_url);
@@ -19214,7 +19285,7 @@ var init_core = __esm({
19214
19285
 
19215
19286
  // cli/commands/inspect/shared.ts
19216
19287
  function sleep(ms) {
19217
- return new Promise((resolve6) => setTimeout(resolve6, ms));
19288
+ return new Promise((resolve7) => setTimeout(resolve7, ms));
19218
19289
  }
19219
19290
  function formatLogTimestamp(ts, nowMs = Date.now()) {
19220
19291
  const d = new Date(ts);
@@ -19542,12 +19613,12 @@ function findDesktopCompanion() {
19542
19613
  }
19543
19614
  async function spawnDetached(command, args, opts = {}) {
19544
19615
  const stdio = opts.inheritStdio ? ["ignore", "inherit", "inherit"] : "ignore";
19545
- await new Promise((resolve6, reject) => {
19616
+ await new Promise((resolve7, reject) => {
19546
19617
  const child = (0, import_child_process5.spawn)(command, args, { detached: true, stdio });
19547
19618
  child.once("error", reject);
19548
19619
  child.once("spawn", () => {
19549
19620
  child.unref();
19550
- resolve6();
19621
+ resolve7();
19551
19622
  });
19552
19623
  });
19553
19624
  }
@@ -19784,11 +19855,11 @@ async function launch2(opts) {
19784
19855
  }
19785
19856
  });
19786
19857
  child.unref();
19787
- const earlyExit = await new Promise((resolve6) => {
19788
- const timer = setTimeout(() => resolve6(null), 4e3);
19858
+ const earlyExit = await new Promise((resolve7) => {
19859
+ const timer = setTimeout(() => resolve7(null), 4e3);
19789
19860
  child.once("exit", (code) => {
19790
19861
  clearTimeout(timer);
19791
- resolve6(code ?? 0);
19862
+ resolve7(code ?? 0);
19792
19863
  });
19793
19864
  });
19794
19865
  if (earlyExit !== null) {
@@ -20522,13 +20593,13 @@ async function tellDaemonRuntimeChanged(version) {
20522
20593
  const lock = readDaemonLockfile2();
20523
20594
  if (!isDaemonLockfileFresh2(lock)) return false;
20524
20595
  const port = resolveDefaultBridgePort();
20525
- return new Promise((resolve6) => {
20596
+ return new Promise((resolve7) => {
20526
20597
  let settled = false;
20527
20598
  let success = false;
20528
20599
  const finish = (ok) => {
20529
20600
  if (settled) return;
20530
20601
  settled = true;
20531
- resolve6(ok);
20602
+ resolve7(ok);
20532
20603
  };
20533
20604
  const ws = new import_ws4.WebSocket(`ws://127.0.0.1:${port}`, {
20534
20605
  handshakeTimeout: 800
@@ -20727,7 +20798,7 @@ __export(control_exports, {
20727
20798
  waitForSimMatchOrHostExit: () => waitForSimMatchOrHostExit
20728
20799
  });
20729
20800
  function sleep2(ms) {
20730
- return new Promise((resolve6) => setTimeout(resolve6, ms));
20801
+ return new Promise((resolve7) => setTimeout(resolve7, ms));
20731
20802
  }
20732
20803
  function parsePositiveIntegerEnv(name) {
20733
20804
  const value = process.env[name]?.trim();
@@ -20852,7 +20923,7 @@ function spawnSootsim(args) {
20852
20923
  });
20853
20924
  }
20854
20925
  function canConnectToBridge(port, timeoutMs) {
20855
- return new Promise((resolve6) => {
20926
+ return new Promise((resolve7) => {
20856
20927
  const ws = new import_ws5.WebSocket(`ws://127.0.0.1:${port}`, { handshakeTimeout: timeoutMs });
20857
20928
  let settled = false;
20858
20929
  const finish = (ok) => {
@@ -20862,7 +20933,7 @@ function canConnectToBridge(port, timeoutMs) {
20862
20933
  ws.close();
20863
20934
  } catch {
20864
20935
  }
20865
- resolve6(ok);
20936
+ resolve7(ok);
20866
20937
  };
20867
20938
  ws.once("open", () => finish(true));
20868
20939
  ws.once("error", () => finish(false));
@@ -20987,10 +21058,10 @@ async function buildResolvedBundleOpenUrl(target, baseUrl, opts = {}) {
20987
21058
  }
20988
21059
  function normalizeReplacementPath(filePath) {
20989
21060
  if (filePath.startsWith("~/")) {
20990
- return import_node_path12.default.join(import_node_os3.default.homedir(), filePath.slice(2));
21061
+ return import_node_path13.default.join(import_node_os3.default.homedir(), filePath.slice(2));
20991
21062
  }
20992
- if (import_node_path12.default.isAbsolute(filePath)) return filePath;
20993
- return import_node_path12.default.resolve(process.cwd(), filePath);
21063
+ if (import_node_path13.default.isAbsolute(filePath)) return filePath;
21064
+ return import_node_path13.default.resolve(process.cwd(), filePath);
20994
21065
  }
20995
21066
  function parseOpenRuntimeConfig(args) {
20996
21067
  const modules = {};
@@ -21044,7 +21115,7 @@ async function resolveOpenAppProject(resolvedBundle) {
21044
21115
  return resolveAppProject(process.env.CONTRAST_REPO_DIR || process.cwd());
21045
21116
  }
21046
21117
  async function ensureConfiguredRuntime(version) {
21047
- if (import_node_fs12.default.existsSync(import_node_path12.default.join(runtimeDir(version), "index.html"))) return;
21118
+ if (import_node_fs12.default.existsSync(import_node_path13.default.join(runtimeDir(version), "index.html"))) return;
21048
21119
  console.error(` installing configured engine runtime ${version}...`);
21049
21120
  const result = await sootsimRuntime.install({
21050
21121
  version,
@@ -21422,17 +21493,17 @@ function printDriverDiagnosticLogTail(result) {
21422
21493
  try {
21423
21494
  const detail = import_node_fs12.default.readFileSync(result.diagnosticLogPath, "utf8").trim();
21424
21495
  if (!detail) {
21425
- console.error(` ${import_node_path12.default.basename(result.diagnosticLogPath)} was empty`);
21496
+ console.error(` ${import_node_path13.default.basename(result.diagnosticLogPath)} was empty`);
21426
21497
  return;
21427
21498
  }
21428
21499
  const shown = detail.length > 4e3 ? `\u2026
21429
21500
  ${detail.slice(-4e3)}` : detail;
21430
- console.error(` ${import_node_path12.default.basename(result.diagnosticLogPath)}:`);
21501
+ console.error(` ${import_node_path13.default.basename(result.diagnosticLogPath)}:`);
21431
21502
  console.error(shown);
21432
21503
  } catch (err) {
21433
21504
  const message = err instanceof Error ? err.message : String(err);
21434
21505
  console.error(
21435
- ` failed to read ${import_node_path12.default.basename(result.diagnosticLogPath)}: ${message}`
21506
+ ` failed to read ${import_node_path13.default.basename(result.diagnosticLogPath)}: ${message}`
21436
21507
  );
21437
21508
  }
21438
21509
  }
@@ -22249,14 +22320,14 @@ async function runCloseCommand(args, opts = {}) {
22249
22320
  bridge.close();
22250
22321
  }
22251
22322
  }
22252
- var import_node_child_process5, import_node_fs12, import_node_os3, import_node_path12, import_settings, import_ws5, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, SHELL_APPS, DEEP_LINK_SCHEME_RE;
22323
+ var import_node_child_process5, import_node_fs12, import_node_os3, import_node_path13, import_settings, import_ws5, DEFAULT_DRIVER_CONNECT_TIMEOUT_MS, DRIVER_CONNECT_INTERVAL_MS, DRIVER_CONNECT_HOST_GRACE_MS, OPEN_BRIDGE_SPAWN_TIMEOUT_MS, SHELL_APPS, DEEP_LINK_SCHEME_RE;
22253
22324
  var init_control = __esm({
22254
22325
  "cli/commands/control.ts"() {
22255
22326
  "use strict";
22256
22327
  import_node_child_process5 = require("node:child_process");
22257
22328
  import_node_fs12 = __toESM(require("node:fs"), 1);
22258
22329
  import_node_os3 = __toESM(require("node:os"), 1);
22259
- import_node_path12 = __toESM(require("node:path"), 1);
22330
+ import_node_path13 = __toESM(require("node:path"), 1);
22260
22331
  import_settings = require("sootsim-engine/settings");
22261
22332
  import_ws5 = require("ws");
22262
22333
  init_dev_server_scanner();
@@ -23037,14 +23108,14 @@ process.stdin.on('end', async () => {
23037
23108
  function getBaseDir() {
23038
23109
  const explicit = process.env[SESSION_FILE_ENV];
23039
23110
  if (explicit?.trim()) {
23040
- return (0, import_node_path13.dirname)((0, import_node_path13.resolve)(explicit));
23111
+ return (0, import_node_path14.dirname)((0, import_node_path14.resolve)(explicit));
23041
23112
  }
23042
23113
  return electronUserDataDir();
23043
23114
  }
23044
23115
  function getSharedDesktopAuthFilePath() {
23045
23116
  const explicit = process.env[SESSION_FILE_ENV];
23046
- if (explicit?.trim()) return (0, import_node_path13.resolve)(explicit);
23047
- return (0, import_node_path13.join)(getBaseDir(), "desktop-auth.json");
23117
+ if (explicit?.trim()) return (0, import_node_path14.resolve)(explicit);
23118
+ return (0, import_node_path14.join)(getBaseDir(), "desktop-auth.json");
23048
23119
  }
23049
23120
  function normalizeUser(input) {
23050
23121
  if (!input || typeof input !== "object") return null;
@@ -23104,12 +23175,12 @@ function readSharedDesktopAuthSession() {
23104
23175
  return null;
23105
23176
  }
23106
23177
  }
23107
- var import_node_fs13, import_node_path13, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
23178
+ var import_node_fs13, import_node_path14, SESSION_VERSION, SESSION_FILE_ENV, DEFAULT_ORIGIN;
23108
23179
  var init_shared_session = __esm({
23109
23180
  "src/auth/shared-session.ts"() {
23110
23181
  "use strict";
23111
23182
  import_node_fs13 = require("node:fs");
23112
- import_node_path13 = require("node:path");
23183
+ import_node_path14 = require("node:path");
23113
23184
  init_home_paths();
23114
23185
  SESSION_VERSION = 1;
23115
23186
  SESSION_FILE_ENV = "SOOTSIM_SHARED_AUTH_FILE";
@@ -23323,7 +23394,7 @@ __export(bridge_flow_runner_exports, {
23323
23394
  resolveFlowScreenshotPathWithMode: () => resolveFlowScreenshotPathWithMode
23324
23395
  });
23325
23396
  function sleep3(ms) {
23326
- return new Promise((resolve6) => setTimeout(resolve6, ms));
23397
+ return new Promise((resolve7) => setTimeout(resolve7, ms));
23327
23398
  }
23328
23399
  function isObjectRecord2(value) {
23329
23400
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
@@ -25410,7 +25481,7 @@ function readDependencies(value) {
25410
25481
 
25411
25482
  // src/skills/builtin/maestro-test.ts
25412
25483
  function sleep4(ms) {
25413
- return new Promise((resolve6) => setTimeout(resolve6, ms));
25484
+ return new Promise((resolve7) => setTimeout(resolve7, ms));
25414
25485
  }
25415
25486
  var skill3 = {
25416
25487
  name: "maestro-test",