stim 1.27.0 → 1.29.0

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 (154) hide show
  1. package/dist/{acquire-artifact-BKN2Yuhg.mjs → acquire-artifact-C2DKfenN.mjs} +1 -1
  2. package/dist/{act-ROviTF_t.mjs → act-CrTcskiE.mjs} +502 -34
  3. package/dist/{activity-Cd-ysFes.mjs → activity-BR5oHSO5.mjs} +6 -5
  4. package/dist/{agent-device-usage-output-C5nCKWp9.mjs → agent-device-usage-output-W0x4SoC7.mjs} +4 -4
  5. package/dist/{android-DriNoAVy.mjs → android-BHKgeOuq.mjs} +5 -5
  6. package/dist/{android--HBgpvpW.mjs → android-BPmCmyAy.mjs} +5 -5
  7. package/dist/{android-Deb9X3_Y.mjs → android-CLU_MMnb.mjs} +1 -1
  8. package/dist/{android-cas-D5e6ecUg.mjs → android-cas-BH6K12__.mjs} +4 -4
  9. package/dist/{android-Cd6w7_qw.mjs → android-l616dRP1.mjs} +42 -39
  10. package/dist/{android-project-DUGMbq28.d.mts → android-project-CCEQyYJK.d.mts} +6 -2
  11. package/dist/api.d.mts +8 -5
  12. package/dist/api.mjs +27 -27
  13. package/dist/{apk-signed-tail-BHQHx3Rm.mjs → apk-signed-tail-B-wKoF_8.mjs} +2 -2
  14. package/dist/{artifact-0AGJYB9O.mjs → artifact-DHuFYfhD.mjs} +12 -12
  15. package/dist/{artifact-faemIZv5.mjs → artifact-Dm9ScLrh.mjs} +12 -12
  16. package/dist/{auto-placement-z-H5pJza.mjs → auto-placement-C8sJsyMN.mjs} +8 -8
  17. package/dist/{browser-web-slD8AvLp.mjs → browser-web-_tQTbQUs.mjs} +12 -12
  18. package/dist/{build-hS0QyFlQ.mjs → build-DtCU9Kim.mjs} +23 -23
  19. package/dist/{build-cache-gBJ-WKzA.mjs → build-cache-BGwTsIEa.mjs} +4 -4
  20. package/dist/{build-plan-CBqYbzYM.mjs → build-plan-CWyjMPKo.mjs} +6 -6
  21. package/dist/{cache-manifest-DEjqGGat.mjs → cache-manifest-evF_zJ9U.mjs} +1 -1
  22. package/dist/cache-manifest.mjs +1 -1
  23. package/dist/{ccache-BWTze1Ls.mjs → ccache-DsDkdP72.mjs} +19 -18
  24. package/dist/{cli-ftXDLto1.mjs → cli-3fjOg-Oc.mjs} +19 -19
  25. package/dist/cli.mjs +1 -1
  26. package/dist/{client-xsdxrhWA.mjs → client-BTUH8TF1.mjs} +41 -8
  27. package/dist/collector-run.mjs +5 -5
  28. package/dist/{command-output-Dj-WT4BP.mjs → command-output-DjCsmzLZ.mjs} +1 -1
  29. package/dist/{config-Cn94Jc0g.mjs → config-AbUjIBOQ.mjs} +121 -19
  30. package/dist/{dependencies-BGokZ-Ng.mjs → dependencies-CHNqX6Pr.mjs} +38 -38
  31. package/dist/{dependency-state-C3OtgG94.mjs → dependency-state-CPKAKCZ8.mjs} +1 -1
  32. package/dist/{dev-client-BMca82xo.mjs → dev-client-CROrxj1x.mjs} +2 -2
  33. package/dist/{device-tM41-TUq.mjs → device-Bmm5qjM-.mjs} +14 -14
  34. package/dist/device-BvpasThQ.mjs +297 -0
  35. package/dist/{device-capacity-6LP7QsaA.mjs → device-capacity-B2ChA-bz.mjs} +86 -18
  36. package/dist/device-host-worker.mjs +15 -13
  37. package/dist/{device-ios-534c14fz.mjs → device-ios-CYzivd31.mjs} +9 -9
  38. package/dist/{device-lease-run-DwsGfjUN.mjs → device-lease-run-qRq_2W2V.mjs} +4 -4
  39. package/dist/{device-pool-BnQqvs6o.mjs → device-pool-CrmiE4_x.mjs} +3 -3
  40. package/dist/{device-BJm0irrq.mjs → device-provision-CK2XiEp1.mjs} +11 -302
  41. package/dist/{doctor-Dbx1ZpD2.mjs → doctor-BO_kaFWX.mjs} +1 -1
  42. package/dist/{doctor-DyqE9n1J.mjs → doctor-Cp4-HN1f.mjs} +20 -15
  43. package/dist/{doctor-F-3VUUyN.mjs → doctor-Dr3C1iXV.mjs} +19 -19
  44. package/dist/doctor-fingerprint.mjs +1 -1
  45. package/dist/{doctor-watchman-CxDbyrrt.mjs → doctor-watchman-CJr2aXXv.mjs} +4 -4
  46. package/dist/{eas-build-CjNSWmjo.mjs → eas-build-D-9HmGZS.mjs} +2 -2
  47. package/dist/{eas-fallback-9fqb46kW.mjs → eas-fallback-Cemt2GVL.mjs} +4 -4
  48. package/dist/{eas-session-ledger-DrP4OuuM.mjs → eas-session-ledger-B0KLZx5m.mjs} +36 -7
  49. package/dist/{error-diagnostics-snej9k4j.mjs → error-diagnostics-CV_1RoEH.mjs} +8 -8
  50. package/dist/{gc-CGZ1Yg88.mjs → gc-CKHqL4aS.mjs} +81 -18
  51. package/dist/{gc-BRwAY3qT.mjs → gc-DjXwQXHK.mjs} +2 -2
  52. package/dist/{guide-_rfEh_zM.mjs → guide-CeRlWVsS.mjs} +230 -62
  53. package/dist/{hosted-android-BMKzUNnY.mjs → hosted-android-DI_vvv7U.mjs} +5 -6
  54. package/dist/{hosted-client-D7Pk_Oo1.mjs → hosted-client-CgoxdU9j.mjs} +44 -17
  55. package/dist/{hosted-logs-B1gqQuva.mjs → hosted-logs-C-4INmkn.mjs} +17 -8
  56. package/dist/{hosted-logs-sync-Dg3qrZmV.mjs → hosted-logs-sync-Bf5s02fi.mjs} +5 -5
  57. package/dist/{hosted-macos-B9w4H8hc.mjs → hosted-macos-Doh85YUM.mjs} +5 -5
  58. package/dist/{hosted-native-CdgaiuyP.mjs → hosted-native-DvZENAL-.mjs} +11 -8
  59. package/dist/{idle-shutdown-Cbvo5KEh.mjs → idle-shutdown-BM37gMfU.mjs} +7 -7
  60. package/dist/{ios-Bk4mWbtS.mjs → ios-CNDH6fNF.mjs} +8 -8
  61. package/dist/{ios-E26qSpkb.mjs → ios-CoMCWfub.mjs} +4 -4
  62. package/dist/{ios-B5HlVMhQ.mjs → ios-UM_dManb.mjs} +31 -29
  63. package/dist/{ios-device-C_QkIf1Z.mjs → ios-device-L1-pota_.mjs} +1 -1
  64. package/dist/{ios-project-D8Jcy_br.mjs → ios-project-DJYptOCh.mjs} +7 -7
  65. package/dist/{ios-state-BZ03NFgF.mjs → ios-state-Ce_dystM.mjs} +1 -1
  66. package/dist/{js-swap-Dg2a945i.mjs → js-swap-BthE4kZC.mjs} +4 -4
  67. package/dist/{launch-CRyBeNsA.mjs → launch-D798aSm8.mjs} +19 -19
  68. package/dist/{lightened-BCsdAGj_.mjs → lightened-vSxkstg6.mjs} +4 -4
  69. package/dist/{logs-aJQb-RDg.mjs → logs-BND8MiBq.mjs} +9 -8
  70. package/dist/{logs-CC_-ZzEE.mjs → logs-CilPftm3.mjs} +5 -5
  71. package/dist/{macos-BGmTpnv9.mjs → macos-BOQrKYeJ.mjs} +1 -1
  72. package/dist/{macos-DlCBhMw5.mjs → macos-CxUi9xcE.mjs} +20 -20
  73. package/dist/macos-run.mjs +1 -1
  74. package/dist/maintenance-run.mjs +13 -9
  75. package/dist/{metro-CvyD-xwe.mjs → metro-BMQHczcf.mjs} +2 -2
  76. package/dist/{metro-gateway-BnHdqMO_.mjs → metro-request-BtF7ox53.mjs} +25 -46
  77. package/dist/{named-ports-BCyMWA6b.mjs → named-ports-DcktE2Pw.mjs} +2 -2
  78. package/dist/{native-android-DlpxCyOP.mjs → native-android-BkhrCjdX.mjs} +16 -16
  79. package/dist/{native-gradle-artifact-inputs-C13qT7R_.mjs → native-gradle-artifact-inputs-Cw4P6Gyr.mjs} +3 -3
  80. package/dist/{native-runtime-DqaIBO5w.mjs → native-runtime-DyH2gkXK.mjs} +6 -6
  81. package/dist/{native-xcode-inputs-B1W8SrxB.mjs → native-xcode-inputs-DV8jr3kJ.mjs} +2 -2
  82. package/dist/{native-xcode-ios-QPP0Rm68.mjs → native-xcode-ios-DdpPG2iT.mjs} +15 -15
  83. package/dist/{ndjson-Dy2W4vRa.mjs → ndjson-CrjIsGzw.mjs} +2 -2
  84. package/dist/offload-worker.d.mts +1 -1
  85. package/dist/offload-worker.mjs +22 -22
  86. package/dist/{ownership-Bx-0cku-.mjs → ownership-Dtz9G5Gl.mjs} +2 -2
  87. package/dist/{phone-reverses-C9yAaKEv.mjs → phone-reverses-DZRad8HT.mjs} +4 -4
  88. package/dist/{placement-log-BXUbiZM6.mjs → placement-log-CoN6xrjY.mjs} +1 -1
  89. package/dist/{plan-placement-UxnQjv5Z.mjs → plan-placement-7sHuqR-r.mjs} +6 -6
  90. package/dist/{ports-uUrghqWN.mjs → ports-VQSAPZhl.mjs} +3 -3
  91. package/dist/{prebuild-BDpToDgR.mjs → prebuild-Bqp0LFGN.mjs} +9 -9
  92. package/dist/{project-DYj-HVx6.mjs → project-D1n0K4yg.mjs} +15 -15
  93. package/dist/{react-native-android-DDBccgJw.mjs → react-native-android-FQ-yX3Mv.mjs} +22 -22
  94. package/dist/{react-native-build-DaK2IFyP.mjs → react-native-build-D58bIqV9.mjs} +7 -7
  95. package/dist/{react-native-doctor-B-Mw6DcR.mjs → react-native-doctor-AkUH2aca.mjs} +5 -5
  96. package/dist/{react-native-ios-DjYwUF9U.mjs → react-native-ios-Dmsv8j7T.mjs} +14 -14
  97. package/dist/{recordings-C20iUZfp.mjs → recordings-CHMaF73C.mjs} +1 -1
  98. package/dist/{reload-fUdkH2_p.mjs → reload-BV0nD-k9.mjs} +14 -14
  99. package/dist/{reload-DJBeF_rC.mjs → reload-CDKEzzaf.mjs} +1 -1
  100. package/dist/{remote-y6n99WMW.mjs → remote-C8xyslUa.mjs} +9 -9
  101. package/dist/{result-CTqBw2Te.mjs → result-9fqcJ90W.mjs} +16 -16
  102. package/dist/{run-DaCeNKRm.mjs → run-BQAmrohh.mjs} +2 -2
  103. package/dist/{selection-Bs8phwhN.mjs → selection-D1ZDzHFX.mjs} +105 -62
  104. package/dist/{server-bare-BOh-iZEj.mjs → server-bare-CEQdB_F4.mjs} +37 -1
  105. package/dist/{server-command-8CuA51Cv.mjs → server-command-RlS-Kl4a.mjs} +5 -5
  106. package/dist/server-expo-BVV9qy31.mjs +2 -0
  107. package/dist/{server-expo-ABQs2XFA.mjs → server-expo-bB1VV2k-.mjs} +8 -5
  108. package/dist/{settings-CMHhQNwI.mjs → settings-BcVCcAT5.mjs} +2 -2
  109. package/dist/{settings-BDVI8Ivc.mjs → settings-D776ygML.mjs} +47 -3
  110. package/dist/{settings-Djl-mpjX.mjs → settings-D9LtQaUw.mjs} +2 -1
  111. package/dist/{settings-payload-cm60Zhib.mjs → settings-payload-_aatELz2.mjs} +4 -4
  112. package/dist/{settings-write-BdNRLlBn.mjs → settings-write-CkTVGQ4O.mjs} +5 -5
  113. package/dist/settings.schema.json +58 -9
  114. package/dist/{simslim-DCQwzoPy.mjs → simslim-CbpHERcv.mjs} +1 -1
  115. package/dist/{slot-launch-0l7RqSpr.mjs → slot-launch-Dbgfh8gc.mjs} +6 -6
  116. package/dist/{stage-F4cAfJGi.mjs → stage-BuHuRj1y.mjs} +1 -1
  117. package/dist/{start-DcqnF9p8.mjs → start-Cr-c3Xhq.mjs} +1 -1
  118. package/dist/{start-DrPwER_2.mjs → start-Dlv4XXTP.mjs} +11 -11
  119. package/dist/{state-CZxLyetD.mjs → state-C2AUjjhg.mjs} +1 -1
  120. package/dist/{state-BX1y5syV.mjs → state-D5ZxwCGJ.mjs} +2 -2
  121. package/dist/{stats-GxuCbles.mjs → stats-D5c-uIBp.mjs} +4 -4
  122. package/dist/{status-7ULDEJ1e.mjs → status-CK7ZoEhV.mjs} +2 -2
  123. package/dist/{status-BfnK9pUd.mjs → status-D6PBK6_-.mjs} +49 -26
  124. package/dist/{status-Bj7ZYvvc.mjs → status-DbQv--Yb.mjs} +1 -1
  125. package/dist/{status-watch-BfabQn03.mjs → status-watch-okrpea4i.mjs} +17 -6
  126. package/dist/status-worker.mjs +1 -1
  127. package/dist/{stim-desktop-CbWo21kb.mjs → stim-desktop-CYXLFpFS.mjs} +1 -1
  128. package/dist/{stop-x1Yu3He4.mjs → stop-CHtAiv79.mjs} +2 -2
  129. package/dist/{stop-D-EAr25B.mjs → stop-p9uSKuGE.mjs} +20 -19
  130. package/dist/{stop-CH79S3IZ.mjs → stop-uRQ-zYcl.mjs} +9 -5
  131. package/dist/supervisor-run.d.mts +1 -0
  132. package/dist/supervisor-run.mjs +243 -65
  133. package/dist/{support-Be0UeVZU.mjs → support-BMpQIug0.mjs} +11 -10
  134. package/dist/{support-CNg_YsOk.mjs → support-PFyTkrnr.mjs} +4 -4
  135. package/dist/{swiftpm-artifact-inputs-uPqYvGBv.mjs → swiftpm-artifact-inputs-Cddq6jN2.mjs} +1 -1
  136. package/dist/{swiftpm-macos-Ch4YjY_A.mjs → swiftpm-macos-BSj9iZlI.mjs} +8 -8
  137. package/dist/{toolchain-JYAOquPg.mjs → toolchain-B-mzR9Rh.mjs} +1 -1
  138. package/dist/{toolchain-CbCG6C5Z.mjs → toolchain-CLGnEUgT.mjs} +4 -4
  139. package/dist/{trigger-DMou-X7j.mjs → trigger-CfnOfpDd.mjs} +1 -1
  140. package/dist/trigger-DBZ-GBrl.mjs +2 -0
  141. package/dist/{warm-progress-C0RsbngN.mjs → warm-progress--KkkBBaq.mjs} +3 -3
  142. package/dist/web-BxSo493O.mjs +2 -0
  143. package/dist/web-run.mjs +5 -5
  144. package/dist/{web-Cq_AQ4DK.mjs → web-xlVssjQf.mjs} +8 -8
  145. package/dist/{workspace-state-BjqdjnJR.mjs → workspace-state-DGwkPXwq.mjs} +2 -2
  146. package/dist/{workspaces-DFbj07jp.mjs → workspaces-CvSYD_78.mjs} +106 -26
  147. package/dist/{worktree-COAJ3-OD.mjs → worktree-CaQBf6kh.mjs} +26 -47
  148. package/dist/worktree-DTOIohFe.mjs +2 -0
  149. package/package.json +7 -7
  150. package/shim/bundle-response.cjs +37 -0
  151. package/dist/server-expo-Ba_Y21vB.mjs +0 -2
  152. package/dist/trigger-qp2ji5wE.mjs +0 -2
  153. package/dist/web-Je6abcpz.mjs +0 -2
  154. package/dist/worktree-JGUd_53L.mjs +0 -2
@@ -1,25 +1,184 @@
1
1
  import { S as process_identity_exports, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
2
- import { c as withWorkspaceStateLock, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
3
- import { G as projectDeviceSlots, T as setSupervisor, U as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-Cn94Jc0g.mjs";
4
- import { $ as runnableMetroCommand, X as resolveProjectSettings } from "./settings-BDVI8Ivc.mjs";
5
- import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-DYj-HVx6.mjs";
6
- import { W as ownedAvdSerialResolver } from "./android-DriNoAVy.mjs";
7
- import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
8
- import { C as devServerStopLevel, O as vanishedSupervisorMessage, w as devServerStopRecord, x as describeDevServerStop } from "./ccache-BWTze1Ls.mjs";
9
- import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-DrP4OuuM.mjs";
10
- import { L as workspaceBuildInProgress, _ as withIdleWorkspace } from "./workspaces-DFbj07jp.mjs";
11
- import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-Cd-ysFes.mjs";
2
+ import { c as withWorkspaceStateLock, d as writeWorkspaceState, j as workspaceStateFile$1, k as workspaceLogsDir$1, n as clearWorkspaceStateKeys, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { G as projectDeviceSlots, T as setSupervisor, U as parseDeviceSlotKey, o as clearSupervisor, p as getProject } from "./config-AbUjIBOQ.mjs";
4
+ import { $ as runnableMetroCommand, X as resolveProjectSettings } from "./settings-D776ygML.mjs";
5
+ import { D as clearExpoMetroTunnel, E as MODE_EXPO, N as readPidFile, R as writePidFile, T as MODE_COMMAND, d as nativeProjectIntegration, j as clearWorkspaceSupervisor, v as detectIsExpo, w as MODE_BARE } from "./project-D1n0K4yg.mjs";
6
+ import { W as ownedAvdSerialResolver } from "./android-BHKgeOuq.mjs";
7
+ import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
8
+ import { C as devServerStopLevel, O as vanishedSupervisorMessage, w as devServerStopRecord, x as describeDevServerStop } from "./ccache-DsDkdP72.mjs";
9
+ import { d as parseWatchRoots, l as parseSubscriberNames, m as runWatchman, u as parseTriggerCount } from "./eas-session-ledger-B0KLZx5m.mjs";
10
+ import { B as workspaceBuildInProgress, v as withIdleWorkspace } from "./workspaces-CvSYD_78.mjs";
11
+ import { S as parseLease, _ as workspaceDeviceLastUseAt, b as leaseIsExpired, r as createActivityReader, v as deviceLeasePath, w as parseWorkspaceLeases } from "./activity-BR5oHSO5.mjs";
12
12
  import { t as describeError } from "./errors-DHm_U5gv.mjs";
13
- import { f as probeHostedSession } from "./hosted-client-D7Pk_Oo1.mjs";
14
- import { o as watchWorkspaceState, t as clearHostedMetro } from "./metro-gateway-BnHdqMO_.mjs";
13
+ import { d as hostConnector, p as probeHostedSession } from "./hosted-client-CgoxdU9j.mjs";
14
+ import { o as watchWorkspaceState, t as clearHostedMetro } from "./metro-request-BtF7ox53.mjs";
15
15
  import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
16
- import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-Cbvo5KEh.mjs";
17
- import { t as triggerMaintenance } from "./trigger-DMou-X7j.mjs";
16
+ import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-BM37gMfU.mjs";
17
+ import { t as triggerMaintenance } from "./trigger-CfnOfpDd.mjs";
18
18
  import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
19
19
  import { dirname, isAbsolute, join, resolve, sep } from "node:path";
20
- import { LOG_ROTATE_BYTES, createMetroGateway } from "@stim-cli/core";
21
- import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_GATEWAYS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroGateways, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
20
+ import { LOG_ROTATE_BYTES } from "@stim-cli/core";
21
+ import { DEV_SERVER_STOP_REQUEST_KEY, HOSTED_METRO_LINKS_KEY, HOSTED_METRO_REQUESTS_KEY, IDLE_STOP_KEY, hostedAndroidPlacements, hostedIosPlacements, hostedMetroLinks, hostedMetroRequests, hostedNativeRecords, parseHostedNativePlacement, readDevServerStopRequest } from "@stim-cli/core/state";
22
22
  import { fileURLToPath } from "node:url";
23
+ import { connect } from "node:net";
24
+ //#region src/supervisor/metro-links.ts
25
+ const IDLE_LINKS = 4;
26
+ const FRAME_BYTES = 32768;
27
+ const RETRY_MS = [
28
+ 500,
29
+ 1e3,
30
+ 2e3,
31
+ 5e3,
32
+ 1e4
33
+ ];
34
+ const METRO_RESET = 4410;
35
+ /**
36
+ * Keeps `IDLE_LINKS` authenticated connections open to `machine`, each offered to `session`'s Metro bridge there. The
37
+ * host pairs one with each connection the hosted device makes; this side then pipes it to loopback `metroPort` and
38
+ * opens a replacement. `onReady` runs when the host holds a link after holding none, and `onLost` when no linked
39
+ * connection to the host is left. Failures that a retry can fix are retried. A host that turns this machine away calls
40
+ * `onError` and stops the pool, and so does a refused link before the host ever held one; after that, refused links
41
+ * are retried, since a session the host restarted refuses links until its client attaches again.
42
+ */
43
+ function openMetroLinks({ machine, session, metroPort, onReady, onLost, onError }) {
44
+ const connect$1 = hostConnector(machine);
45
+ const live = /* @__PURE__ */ new Set();
46
+ const linked = /* @__PURE__ */ new Set();
47
+ const waiting = /* @__PURE__ */ new Set();
48
+ const streams = /* @__PURE__ */ new Set();
49
+ let opening = 0;
50
+ let failures = 0;
51
+ let ready = false;
52
+ let linkedOnce = false;
53
+ let closed = false;
54
+ let retry;
55
+ const fill = () => {
56
+ if (closed || retry) return;
57
+ while (opening + waiting.size < IDLE_LINKS) {
58
+ opening++;
59
+ link();
60
+ }
61
+ };
62
+ const gone = (connection) => {
63
+ live.delete(connection);
64
+ waiting.delete(connection);
65
+ if (!linked.delete(connection) || closed || !ready || linked.size > 0) return;
66
+ ready = false;
67
+ onLost();
68
+ };
69
+ const failed = (message, refused) => {
70
+ if (closed) return;
71
+ if (refused === "host" || refused === "link" && !linkedOnce) {
72
+ stop();
73
+ onError(message);
74
+ return;
75
+ }
76
+ if (retry) return;
77
+ retry = setTimeout(() => {
78
+ retry = void 0;
79
+ fill();
80
+ }, RETRY_MS[Math.min(failures++, RETRY_MS.length - 1)]);
81
+ retry.unref();
82
+ };
83
+ const carry = (connection, ended) => {
84
+ const metro = connect({
85
+ host: "127.0.0.1",
86
+ port: metroPort
87
+ });
88
+ streams.add(metro);
89
+ metro.on("error", () => metro.destroy());
90
+ metro.once("close", (hadError) => {
91
+ streams.delete(metro);
92
+ ended();
93
+ connection.flushed().then(() => connection.close(hadError ? METRO_RESET : 1e3));
94
+ });
95
+ connection.onDropped((code) => code === 1e3 ? metro.end() : metro.resetAndDestroy());
96
+ let paused = false;
97
+ connection.onBinary((frame) => {
98
+ if (metro.write(frame) || paused) return;
99
+ paused = true;
100
+ connection.pause();
101
+ metro.once("drain", () => {
102
+ paused = false;
103
+ connection.resume();
104
+ });
105
+ });
106
+ metro.on("data", (chunk) => {
107
+ metro.pause();
108
+ (async () => {
109
+ for (let offset = 0; offset < chunk.length; offset += FRAME_BYTES) await connection.sendBinary(chunk.subarray(offset, offset + FRAME_BYTES));
110
+ if (!metro.destroyed) metro.resume();
111
+ })();
112
+ });
113
+ };
114
+ const link = async () => {
115
+ let connection;
116
+ try {
117
+ connection = await connect$1();
118
+ if (closed) return void connection.close();
119
+ live.add(connection);
120
+ if (!connection.supports("hosted-metro-link")) throw Object.assign(/* @__PURE__ */ new Error(`${machine} runs a stim-server that cannot link Metro. Update stim-server there, then retry.`), { code: "STIM_HOSTING_REFUSED" });
121
+ const each = connection;
122
+ let paired = false;
123
+ let ended = false;
124
+ each.onEvent((event) => {
125
+ if (event.event !== "device-host.metro.link.open" || paired || closed) return;
126
+ paired = true;
127
+ each.unwatch();
128
+ waiting.delete(each);
129
+ carry(each, () => {
130
+ ended = true;
131
+ gone(each);
132
+ });
133
+ fill();
134
+ });
135
+ let registered = false;
136
+ each.onDropped(() => {
137
+ if (paired || !registered) return;
138
+ gone(each);
139
+ fill();
140
+ });
141
+ const reply = await each.request("device-host.metro.link", { session });
142
+ if ("error" in reply) throw Object.assign(/* @__PURE__ */ new Error(`${machine} refused the Metro link: ${reply.error.message}`), { linkRefused: reply.error.code !== "closed" && reply.error.code !== "timeout" });
143
+ if (closed) return void each.close();
144
+ if (ended || each.failure) return void live.delete(each);
145
+ registered = true;
146
+ linked.add(each);
147
+ if (!paired) {
148
+ waiting.add(each);
149
+ each.watch();
150
+ }
151
+ failures = 0;
152
+ clearTimeout(retry);
153
+ retry = void 0;
154
+ if (!ready) {
155
+ ready = true;
156
+ linkedOnce = true;
157
+ onReady();
158
+ }
159
+ } catch (error) {
160
+ if (connection) live.delete(connection);
161
+ connection?.close();
162
+ const refused = typeof error !== "object" || error === null ? null : "code" in error && typeof error.code === "string" && error.code.startsWith("STIM_") ? "host" : "linkRefused" in error && error.linkRefused === true ? "link" : null;
163
+ failed(error instanceof Error ? error.message : String(error), refused);
164
+ } finally {
165
+ opening--;
166
+ fill();
167
+ }
168
+ };
169
+ function stop() {
170
+ closed = true;
171
+ clearTimeout(retry);
172
+ for (const connection of live) connection.close();
173
+ for (const stream of streams) stream.destroy();
174
+ live.clear();
175
+ linked.clear();
176
+ waiting.clear();
177
+ }
178
+ fill();
179
+ return { close: stop };
180
+ }
181
+ //#endregion
23
182
  //#region src/supervisor/hosted-metro.ts
24
183
  function reconcileHostedMetro(requests, active) {
25
184
  const same = (session) => JSON.stringify(requests[session]) === JSON.stringify(active[session]);
@@ -30,7 +189,7 @@ function reconcileHostedMetro(requests, active) {
30
189
  }
31
190
  function watchHostedMetro(root, metroPort, processToken) {
32
191
  const active = {};
33
- const bridges = /* @__PURE__ */ new Map();
192
+ const pools = /* @__PURE__ */ new Map();
34
193
  let closed = false;
35
194
  let running = Promise.resolve();
36
195
  let probingAt = 0;
@@ -43,7 +202,7 @@ function watchHostedMetro(root, metroPort, processToken) {
43
202
  ...state,
44
203
  supervisor: {
45
204
  ...state.supervisor,
46
- hostedMetro: true
205
+ hostedMetroLinks: true
47
206
  }
48
207
  } : state);
49
208
  const readState = () => {
@@ -55,16 +214,36 @@ function watchHostedMetro(root, metroPort, processToken) {
55
214
  }
56
215
  return cached;
57
216
  };
58
- const publish = (session, gateway) => updateWorkspaceState(root, (state) => {
59
- const gateways = { ...hostedMetroGateways(state) };
60
- if (state.supervisor?.processToken !== processToken) return state;
61
- if (gateway) gateways[session] = gateway;
62
- else delete gateways[session];
63
- return {
64
- ...state,
65
- [HOSTED_METRO_GATEWAYS_KEY]: gateways
66
- };
67
- });
217
+ const unpublished = /* @__PURE__ */ new Map();
218
+ let republish;
219
+ const flush = () => {
220
+ clearTimeout(republish);
221
+ for (const [session, links] of unpublished) {
222
+ try {
223
+ updateWorkspaceState(root, (state) => {
224
+ const published = { ...hostedMetroLinks(state) };
225
+ if (state.supervisor?.processToken !== processToken) return state;
226
+ if (links) published[session] = links;
227
+ else delete published[session];
228
+ return {
229
+ ...state,
230
+ [HOSTED_METRO_LINKS_KEY]: published
231
+ };
232
+ });
233
+ } catch {
234
+ if (closed) return;
235
+ republish = setTimeout(flush, 1e3);
236
+ republish.unref();
237
+ return;
238
+ }
239
+ unpublished.delete(session);
240
+ }
241
+ };
242
+ const publish = (session, links) => {
243
+ unpublished.delete(session);
244
+ unpublished.set(session, links);
245
+ flush();
246
+ };
68
247
  const reconcile = async () => {
69
248
  if (closed) return;
70
249
  observer.refresh();
@@ -83,45 +262,39 @@ function watchHostedMetro(root, metroPort, processToken) {
83
262
  });
84
263
  const actions = reconcileHostedMetro(requests, active);
85
264
  for (const session of actions.close) {
86
- await bridges.get(session)?.close();
87
- bridges.delete(session);
265
+ pools.get(session)?.close();
266
+ pools.delete(session);
88
267
  delete active[session];
89
268
  publish(session, null);
90
269
  }
91
270
  for (const session of actions.open) {
92
271
  const request = requests[session];
93
272
  active[session] = request;
94
- const bridge = createMetroGateway({
273
+ pools.set(session, openMetroLinks({
274
+ machine: request.machine,
275
+ session,
95
276
  metroPort,
96
- peer: request.peer,
97
- secret: request.secret
98
- });
99
- bridges.set(session, bridge);
100
- try {
101
- const saved = hostedMetroGateways(state)[session];
102
- await new Promise((resolve, reject) => {
103
- bridge.server.once("error", reject);
104
- bridge.server.listen(saved?.id === request.id ? saved.port ?? 0 : 0, request.address, () => {
105
- bridge.server.removeListener("error", reject);
106
- resolve();
277
+ onReady: () => {
278
+ if (active[session] === request) publish(session, {
279
+ id: request.id,
280
+ processToken,
281
+ ready: true
107
282
  });
108
- });
109
- const address = bridge.server.address();
110
- if (!address || typeof address === "string") throw new Error("No gateway port.");
111
- publish(session, {
112
- id: request.id,
113
- processToken,
114
- port: address.port
115
- });
116
- } catch {
117
- await bridge.close();
118
- bridges.delete(session);
119
- publish(session, {
120
- id: request.id,
121
- processToken,
122
- error: `Could not bind the private Metro gateway for ${request.machine}. Check Tailscale, then restart Metro.`
123
- });
124
- }
283
+ },
284
+ onLost: () => {
285
+ if (active[session] === request) publish(session, {
286
+ id: request.id,
287
+ processToken
288
+ });
289
+ },
290
+ onError: (message) => {
291
+ if (active[session] === request) publish(session, {
292
+ id: request.id,
293
+ processToken,
294
+ error: message
295
+ });
296
+ }
297
+ }));
125
298
  }
126
299
  if (!probing && Date.now() >= probingAt) {
127
300
  clearTimeout(probeTimer);
@@ -154,9 +327,10 @@ function watchHostedMetro(root, metroPort, processToken) {
154
327
  closed = true;
155
328
  observer.close();
156
329
  clearTimeout(probeTimer);
330
+ clearTimeout(republish);
157
331
  clearInterval(timer);
158
332
  await running;
159
- await Promise.all([...bridges.values()].map((bridge) => bridge.close()));
333
+ for (const pool of pools.values()) pool.close();
160
334
  };
161
335
  }
162
336
  //#endregion
@@ -628,7 +802,7 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
628
802
  try {
629
803
  let start;
630
804
  if (command) {
631
- const startServer = startCommand ?? (await import("./server-command-8CuA51Cv.mjs")).startCommandServer;
805
+ const startServer = startCommand ?? (await import("./server-command-RlS-Kl4a.mjs")).startCommandServer;
632
806
  start = (opts) => startServer({
633
807
  ...opts,
634
808
  command
@@ -674,13 +848,17 @@ async function runSupervisor({ root, port, tunnel = false, resetCache = false, i
674
848
  return null;
675
849
  }
676
850
  const serverPid = server.serverPid;
677
- if (serverPid) {
678
- const serverProcessToken = (0, process_identity_exports.captureProcessToken)(serverPid);
851
+ const hmrUpdates = server.observesRequests === true;
852
+ if (serverPid || hmrUpdates) {
853
+ const serverProcessToken = serverPid ? (0, process_identity_exports.captureProcessToken)(serverPid) : null;
679
854
  withWorkspaceStateLock(root, () => {
680
855
  if (readWorkspaceState$1(root)?.supervisor?.processToken === processToken) writeWorkspaceState(root, { supervisor: {
681
856
  ...record,
682
- serverPid,
683
- ...serverProcessToken ? { serverProcessToken } : {}
857
+ ...serverPid ? {
858
+ serverPid,
859
+ ...serverProcessToken ? { serverProcessToken } : {}
860
+ } : {},
861
+ ...hmrUpdates ? { hmrUpdates } : {}
684
862
  } });
685
863
  });
686
864
  }
@@ -1,13 +1,13 @@
1
- import { k as workspaceLogsDir } from "./workspace-state-BjqdjnJR.mjs";
2
- import { h as shortUdid, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
3
- import { _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSetting, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys, x as iosProjectDirSettingError } from "./settings-BDVI8Ivc.mjs";
4
- import { q as describeDiagnostic } from "./toolchain-CbCG6C5Z.mjs";
5
- import { P as parseIosSimulatorApp } from "./ios-E26qSpkb.mjs";
1
+ import { k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { h as shortUdid, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
3
+ import { _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, b as iosProjectDirSetting, p as cacheProviderSettingError, rt as settingShapeErrors, st as unknownSettingKeys, x as iosProjectDirSettingError } from "./settings-D776ygML.mjs";
4
+ import { q as describeDiagnostic } from "./toolchain-CLGnEUgT.mjs";
5
+ import { P as parseIosSimulatorApp } from "./ios-CoMCWfub.mjs";
6
6
  import { p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
7
- import { d as resolveBuildPlacement } from "./selection-Bs8phwhN.mjs";
8
- import { l as parseDeviceWait } from "./device-lease-run-DwsGfjUN.mjs";
9
- import { c as layerNote, m as unknownIosRuntimeRefusal, p as unknownIosDeviceTypeRefusal, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-6LP7QsaA.mjs";
10
- import { t as IosDeviceMismatchError } from "./device-ios-534c14fz.mjs";
7
+ import { d as resolveBuildPlacement } from "./selection-D1ZDzHFX.mjs";
8
+ import { l as parseDeviceWait } from "./device-lease-run-qRq_2W2V.mjs";
9
+ import { h as unknownIosRuntimeRefusal, l as layerNote, m as unknownIosDeviceTypeRefusal, t as DEFAULT_DEVICE_SLOT_WAIT_MS } from "./device-capacity-B2ChA-bz.mjs";
10
+ import { t as IosDeviceMismatchError } from "./device-ios-CYzivd31.mjs";
11
11
  import { basename, join } from "node:path";
12
12
  import chalk from "chalk";
13
13
  function buildLogFile(root) {
@@ -265,7 +265,8 @@ function createIosDeviceWaitRun(stats, progress, signal) {
265
265
  waiting = info !== null;
266
266
  progress.waitingFor(info, "device-slot");
267
267
  },
268
- onWait: stats.addDeviceSlotWaitMs
268
+ onWait: stats.addDeviceSlotWaitMs,
269
+ onBootStart: () => progress.bootStarted()
269
270
  },
270
271
  record(next) {
271
272
  if (waiting) outcome = next;
@@ -1,9 +1,9 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
2
  import { a as killOnAbort } from "./operation-exec-Dp4FuIGR.mjs";
3
- import { C as emulatorDiskSpaceRemedy, E as findBuildTool, Q as profileNeedsFoldFeature, R as memoizeEmulatorProbe, T as extractEmulatorFailure, X as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, k as hostSystemImageArch, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as emulatorFailureRemedy } from "./android-DriNoAVy.mjs";
4
- import { yn as pickDevClientScheme } from "./ccache-BWTze1Ls.mjs";
5
- import { c as layerNote, d as unknownAndroidDeviceProfileRefusal, f as unknownAndroidSystemImageRefusal } from "./device-capacity-6LP7QsaA.mjs";
6
- import { t as devClientScheme } from "./dev-client-BMca82xo.mjs";
3
+ import { C as emulatorDiskSpaceRemedy, E as findBuildTool, Q as profileNeedsFoldFeature, R as memoizeEmulatorProbe, T as extractEmulatorFailure, X as pickDefaultSystemImage, c as androidPoolNoCandidatesRefusal, k as hostSystemImageArch, l as androidSystemImageAbi, o as androidHome, s as androidPoolCandidates, w as emulatorFailureRemedy } from "./android-BHKgeOuq.mjs";
4
+ import { yn as pickDevClientScheme } from "./ccache-DsDkdP72.mjs";
5
+ import { f as unknownAndroidDeviceProfileRefusal, l as layerNote, p as unknownAndroidSystemImageRefusal } from "./device-capacity-B2ChA-bz.mjs";
6
+ import { t as devClientScheme } from "./dev-client-CROrxj1x.mjs";
7
7
  import { existsSync, readFileSync, readdirSync } from "node:fs";
8
8
  import { relative } from "node:path";
9
9
  //#region src/commands/android/support.ts
@@ -1,6 +1,6 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
2
  import { s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
3
- import { n as buildCacheKey } from "./build-cache-gBJ-WKzA.mjs";
3
+ import { n as buildCacheKey } from "./build-cache-BGwTsIEa.mjs";
4
4
  import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
5
5
  import { a as sourceManifest, r as nativeFileDigest } from "./native-source-D1AzWiuP.mjs";
6
6
  import { createHash } from "node:crypto";
@@ -1,15 +1,15 @@
1
1
  import { T as trackReportResource, _ as spawnDeclared, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { y as sharedBuildCache } from "./workspace-state-BjqdjnJR.mjs";
3
- import { J as resolveCacheProviderConfig, Lt as repoRootAsync, it as settingValueAt, z as projectSettingsContextAsync } from "./settings-BDVI8Ivc.mjs";
4
- import { r as register } from "./cache-manifest-DEjqGGat.mjs";
5
- import { m as macosToolchainAsync, ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
6
- import "./build-cache-gBJ-WKzA.mjs";
2
+ import { y as sharedBuildCache } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { J as resolveCacheProviderConfig, Vt as repoRootAsync, it as settingValueAt, z as projectSettingsContextAsync } from "./settings-D776ygML.mjs";
4
+ import { r as register } from "./cache-manifest-evF_zJ9U.mjs";
5
+ import { m as macosToolchainAsync, ot as runCancellationSignal } from "./toolchain-CLGnEUgT.mjs";
6
+ import "./build-cache-BGwTsIEa.mjs";
7
7
  import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
8
8
  import { r as nativeFileDigest } from "./native-source-D1AzWiuP.mjs";
9
- import { a as validateInfoPlist, i as stageBundle, n as resolveBundleExtras, r as setBundleName, t as reidentifyBundle } from "./stage-F4cAfJGi.mjs";
9
+ import { a as validateInfoPlist, i as stageBundle, n as resolveBundleExtras, r as setBundleName, t as reidentifyBundle } from "./stage-BuHuRj1y.mjs";
10
10
  import { t as validateMacosArtifactPlatform } from "./artifact-platform-BO2Uvk_A.mjs";
11
- import { t as logLines } from "./run-DaCeNKRm.mjs";
12
- import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-uPqYvGBv.mjs";
11
+ import { t as logLines } from "./run-BQAmrohh.mjs";
12
+ import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-Cddq6jN2.mjs";
13
13
  import { createHash } from "node:crypto";
14
14
  import { createReadStream, createWriteStream, existsSync, realpathSync } from "node:fs";
15
15
  import { tmpdir } from "node:os";
@@ -1,2 +1,2 @@
1
- import { m as macosToolchainAsync, p as macosToolchain } from "./toolchain-CbCG6C5Z.mjs";
1
+ import { m as macosToolchainAsync, p as macosToolchain } from "./toolchain-CLGnEUgT.mjs";
2
2
  export { macosToolchain, macosToolchainAsync };
@@ -1,12 +1,12 @@
1
1
  import { D as ownership_claim_exports, _ as spawnDeclared, b as operationState, g as signalDeclaredSpawns, h as refuseDeclaredSpawns, m as declareSpawnsOn, p as allowDeclaredSpawns, t as getExecutor, u as withWorkspaceProcessLock, v as stopDeclaringSpawnsOn, y as isTermination } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, T as workspaceDerivedData, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-BjqdjnJR.mjs";
2
+ import { E as workspaceDir, T as workspaceDerivedData, l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-DGwkPXwq.mjs";
3
3
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
- import { a as formatElapsed, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
4
+ import { a as formatElapsed, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
5
5
  import { a as killOnAbort } from "./operation-exec-Dp4FuIGR.mjs";
6
- import { o as androidHome } from "./android-DriNoAVy.mjs";
6
+ import { o as androidHome } from "./android-BHKgeOuq.mjs";
7
7
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
8
8
  import { p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
9
- import { t as cleanLine } from "./server-expo-ABQs2XFA.mjs";
9
+ import { t as cleanLine } from "./server-expo-bB1VV2k-.mjs";
10
10
  import { createRequire } from "node:module";
11
11
  import { createHash } from "node:crypto";
12
12
  import { existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
2
+ import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
3
3
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
4
4
  import { n as windowsLauncherArgs } from "./detached-entry-BPlSaCwC.mjs";
5
5
  import { n as stampAttempt, r as due, t as capChildLog } from "./attempt-ClyJlZPT.mjs";
@@ -0,0 +1,2 @@
1
+ import { t as triggerMaintenance } from "./trigger-CfnOfpDd.mjs";
2
+ export { triggerMaintenance };
@@ -1,8 +1,8 @@
1
1
  import { D as ownership_claim_exports, E as debugLog, l as WorkspaceProcessCleanupError, n as isTimeoutError, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, M as withDirLock, _ as ensureWorkspaceStorage, h as discoverAgentSessions, m as attributeAgentSessions, o as updateWorkspaceState, p as agentKey } from "./workspace-state-BjqdjnJR.mjs";
2
+ import { E as workspaceDir, M as withDirLock, _ as ensureWorkspaceStorage, h as discoverAgentSessions, m as attributeAgentSessions, o as updateWorkspaceState, p as agentKey } from "./workspace-state-DGwkPXwq.mjs";
3
3
  import { l as gitQuietAsync, o as git$1, s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
4
- import { Dt as linkedWorktreesOnDisk, St as gitCommonDirOnDisk } from "./settings-BDVI8Ivc.mjs";
5
- import { V as ownedAvdDirectory } from "./android-DriNoAVy.mjs";
4
+ import { Ct as gitCommonDirOnDisk, Ot as linkedWorktreesOnDisk } from "./settings-D776ygML.mjs";
5
+ import { V as ownedAvdDirectory } from "./android-BHKgeOuq.mjs";
6
6
  import { s as pullRequestLookups } from "./pull-request-BzLmzAIQ.mjs";
7
7
  import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
8
8
  import { randomUUID } from "node:crypto";
@@ -0,0 +1,2 @@
1
+ import { n as webCommand, t as runWeb } from "./web-xlVssjQf.mjs";
2
+ export { webCommand as default, runWeb };
package/dist/web-run.mjs CHANGED
@@ -1,9 +1,9 @@
1
1
  import { D as ownership_claim_exports, S as process_identity_exports, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { Tt as recordCreatedDevice } from "./android-DriNoAVy.mjs";
3
- import { f as signalProcessTree } from "./metro-CvyD-xwe.mjs";
4
- import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
5
- import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-BX1y5syV.mjs";
6
- import { l as probeWebDrivers } from "./activity-Cd-ysFes.mjs";
2
+ import { Tt as recordCreatedDevice } from "./android-BHKgeOuq.mjs";
3
+ import { f as signalProcessTree } from "./metro-BMQHczcf.mjs";
4
+ import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
5
+ import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-D5ZxwCGJ.mjs";
6
+ import { l as probeWebDrivers } from "./activity-BR5oHSO5.mjs";
7
7
  import { t as connectOwnedBrowser } from "./cdp-C3svvXiE.mjs";
8
8
  import { t as relaunchWithLogFile } from "./detached-entry-BPlSaCwC.mjs";
9
9
  import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-DyDWurWG.mjs";
@@ -1,12 +1,12 @@
1
- import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-BjqdjnJR.mjs";
2
- import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-Cn94Jc0g.mjs";
3
- import { f as refuseNoProject, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
4
- import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-BDVI8Ivc.mjs";
5
- import { f as projectRegistry, n as findCommandWorkspace } from "./project-DYj-HVx6.mjs";
6
- import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
7
- import { o as readWebRecord, r as cdpEndpoint } from "./state-BX1y5syV.mjs";
1
+ import { i as recordWorkspaceUse, k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { E as upsertProject, O as withConfigLockAsync, p as getProject } from "./config-AbUjIBOQ.mjs";
3
+ import { f as refuseNoProject, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
4
+ import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, rt as settingShapeErrors } from "./settings-D776ygML.mjs";
5
+ import { f as projectRegistry, n as findCommandWorkspace } from "./project-D1n0K4yg.mjs";
6
+ import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
7
+ import { o as readWebRecord, r as cdpEndpoint } from "./state-D5ZxwCGJ.mjs";
8
8
  import { t as liveWebRecord } from "./page-CQJlcj3x.mjs";
9
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DqaIBO5w.mjs";
9
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DyH2gkXK.mjs";
10
10
  import chalk from "chalk";
11
11
  //#region src/commands/web.ts
12
12
  const printNote = (line) => console.error(line);
@@ -1,6 +1,6 @@
1
1
  import { S as process_identity_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-Cn94Jc0g.mjs";
3
- import { lt as workspaceHiddenSetting } from "./settings-BDVI8Ivc.mjs";
2
+ import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-AbUjIBOQ.mjs";
3
+ import { lt as workspaceHiddenSetting } from "./settings-D776ygML.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { homedir } from "node:os";
6
6
  import { dirname, isAbsolute, join, relative } from "node:path";