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
@@ -289,7 +289,7 @@
289
289
  "remote": {
290
290
  "description": "Where the iOS simulator runs: local here (overriding a lower layer); auto here first, then a remote.machines entry when this machine is full or busy; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine; eas or proxy a remote device backend",
291
291
  "type": "string",
292
- "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
292
+ "pattern": "^(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
293
293
  "x-stim": {
294
294
  "key": "ios.remote",
295
295
  "kind": "string",
@@ -566,7 +566,7 @@
566
566
  "remote": {
567
567
  "description": "Where the Android emulator runs: local here (overriding a lower layer); auto here first, then a remote.machines entry when this machine is full or busy; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine; eas or proxy a remote device backend",
568
568
  "type": "string",
569
- "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
569
+ "pattern": "^(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
570
570
  "x-stim": {
571
571
  "key": "android.remote",
572
572
  "kind": "string",
@@ -814,7 +814,7 @@
814
814
  "remote": {
815
815
  "description": "Where stim macos launches the app: local here; auto here unless this machine is busy, then a remote.machines entry; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine. The --remote flag overrides it",
816
816
  "type": "string",
817
- "pattern": "^(?![Ee][Aa][Ss]$|[Pp][Rr][Oo][Xx][Yy]$)[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
817
+ "pattern": "^(?![Ee][Aa][Ss]$|[Pp][Rr][Oo][Xx][Yy]$)(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
818
818
  "x-stim": {
819
819
  "key": "macos.remote",
820
820
  "kind": "string",
@@ -1000,6 +1000,23 @@
1000
1000
  "maintenance": {
1001
1001
  "type": "object",
1002
1002
  "properties": {
1003
+ "idleStopHours": {
1004
+ "description": "Hours with no native run, Metro bundle or HMR request, agent-device command, Stim command or live view before automatic maintenance and gc --delete stop a workspace's dev server and shut down its owned simulators and emulators, as stim stop does; device and app log lines do not count; 0 never",
1005
+ "type": "number",
1006
+ "minimum": 0,
1007
+ "default": 6,
1008
+ "x-stim": {
1009
+ "key": "maintenance.idleStopHours",
1010
+ "kind": "number",
1011
+ "scopes": [
1012
+ "machine",
1013
+ "workspace",
1014
+ "repo",
1015
+ "committed"
1016
+ ],
1017
+ "env": "STIM_MAINTENANCE_IDLE_STOP_HOURS"
1018
+ }
1019
+ },
1003
1020
  "keep": {
1004
1021
  "description": "Pin this workspace: automatic maintenance never clears its build outputs, deletes its owned devices or removes its worktree",
1005
1022
  "type": "boolean",
@@ -1305,7 +1322,7 @@
1305
1322
  "remote": {
1306
1323
  "description": "Where the iOS simulator runs: local here (overriding a lower layer); auto here first, then a remote.machines entry when this machine is full or busy; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine; eas or proxy a remote device backend",
1307
1324
  "type": "string",
1308
- "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1325
+ "pattern": "^(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1309
1326
  "x-stim": {
1310
1327
  "key": "ios.remote",
1311
1328
  "kind": "string",
@@ -1415,7 +1432,7 @@
1415
1432
  "remote": {
1416
1433
  "description": "Where the Android emulator runs: local here (overriding a lower layer); auto here first, then a remote.machines entry when this machine is full or busy; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine; eas or proxy a remote device backend",
1417
1434
  "type": "string",
1418
- "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1435
+ "pattern": "^(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1419
1436
  "x-stim": {
1420
1437
  "key": "android.remote",
1421
1438
  "kind": "string",
@@ -1474,7 +1491,7 @@
1474
1491
  "remote": {
1475
1492
  "description": "Where stim macos launches the app: local here; auto here unless this machine is busy, then a remote.machines entry; remote on a remote.machines entry in order, here only when none takes it; remote-only the same but never here; a machine name exactly that machine. The --remote flag overrides it",
1476
1493
  "type": "string",
1477
- "pattern": "^(?![Ee][Aa][Ss]$|[Pp][Rr][Oo][Xx][Yy]$)[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1494
+ "pattern": "^(?![Ee][Aa][Ss]$|[Pp][Rr][Oo][Xx][Yy]$)(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
1478
1495
  "x-stim": {
1479
1496
  "key": "macos.remote",
1480
1497
  "kind": "string",
@@ -1968,7 +1985,7 @@
1968
1985
  }
1969
1986
  },
1970
1987
  "idleCheckMinutes": {
1971
- "description": "Interval in minutes of the check that shuts down owned simulators and emulators idle for devices.idleShutdownMinutes, also with no dev server running",
1988
+ "description": "Interval in minutes of the check that shuts down owned simulators and emulators idle for devices.idleShutdownMinutes, also with no dev server running, and stops workspaces idle for maintenance.idleStopHours",
1972
1989
  "type": "integer",
1973
1990
  "minimum": 1,
1974
1991
  "default": 5,
@@ -1981,6 +1998,23 @@
1981
1998
  "env": "STIM_MAINTENANCE_IDLE_CHECK_MINUTES"
1982
1999
  }
1983
2000
  },
2001
+ "idleStopHours": {
2002
+ "description": "Hours with no native run, Metro bundle or HMR request, agent-device command, Stim command or live view before automatic maintenance and gc --delete stop a workspace's dev server and shut down its owned simulators and emulators, as stim stop does; device and app log lines do not count; 0 never",
2003
+ "type": "number",
2004
+ "minimum": 0,
2005
+ "default": 6,
2006
+ "x-stim": {
2007
+ "key": "maintenance.idleStopHours",
2008
+ "kind": "number",
2009
+ "scopes": [
2010
+ "machine",
2011
+ "workspace",
2012
+ "repo",
2013
+ "committed"
2014
+ ],
2015
+ "env": "STIM_MAINTENANCE_IDLE_STOP_HOURS"
2016
+ }
2017
+ },
1984
2018
  "sweepHours": {
1985
2019
  "description": "Age sweep interval in hours; 0 turns the age sweep off",
1986
2020
  "type": "integer",
@@ -2358,6 +2392,21 @@
2358
2392
  ]
2359
2393
  }
2360
2394
  },
2395
+ "lanAddresses": {
2396
+ "description": "IPv4 addresses or network interface names (such as en0) on which stim-server also accepts machines and phones on the local network, without Tailscale, on its own port. Empty listens on no local network address. Wildcard addresses are refused. Connections there run protocol 2's Noise authentication and encryption, without TLS",
2397
+ "type": "array",
2398
+ "items": {
2399
+ "type": "string"
2400
+ },
2401
+ "default": [],
2402
+ "x-stim": {
2403
+ "key": "server.lanAddresses",
2404
+ "kind": "strings",
2405
+ "scopes": [
2406
+ "machine"
2407
+ ]
2408
+ }
2409
+ },
2361
2410
  "maxLoadPerCore": {
2362
2411
  "description": "Load per core (5-minute load average divided by the CPU count) at which this machine counts as saturated: it declines builds other machines send it, reports the limit in its device offers so other machines skip it like a full one, stops preferring itself for automatic placement, and automatic iOS, Android and macOS placement treats it as busy",
2363
2412
  "type": "number",
@@ -2404,7 +2453,7 @@
2404
2453
  "type": "object",
2405
2454
  "properties": {
2406
2455
  "machines": {
2407
- "description": "Tailscale names of the remote machines this machine may build on and host owned simulators, emulators and macOS apps on, each optionally with :<port> of its tailscale serve route (default 7443). The order is the placement priority: each workload goes to the first machine with room and a load under its own limit. What each is used for follows the build and device-host approvals it grants, which doctor --fix asks for separately",
2456
+ "description": "The remote machines this machine may build on and host owned simulators, emulators and macOS apps on: a Tailscale name, optionally with :<port> of its tailscale serve route (default 7443), or local: and a host name or IPv4 address on the local network, optionally with :<port> of its stim-server (default 7787), whose server key doctor --fix pins after a person confirms its fingerprint. The order is the placement priority: each workload goes to the first machine with room and a load under its own limit. What each is used for follows the build and device-host approvals it grants, which doctor --fix asks for separately",
2408
2457
  "type": "array",
2409
2458
  "items": {
2410
2459
  "type": "string"
@@ -2478,7 +2527,7 @@
2478
2527
  "build": {
2479
2528
  "description": "Where iOS simulator Debug, Android emulator debug and macOS SwiftPM Debug builds run: local here; auto here while it has a free concurrency.maxBuilds slot and load under server.maxLoadPerCore, otherwise on a remote.machines entry; remote on a remote.machines entry in order, here only when none takes the build; remote-only the same but never here; a machine name exactly that machine without fallback. The ios, android and macos --remote-build flag overrides this setting and its environment override",
2480
2529
  "type": "string",
2481
- "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
2530
+ "pattern": "^(?:local:)?[A-Za-z0-9][A-Za-z0-9.-]*(?::(?!0+$)(?:[0-5]?[0-9]{1,4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5]))?$",
2482
2531
  "default": "auto",
2483
2532
  "x-stim": {
2484
2533
  "key": "remote.build",
@@ -1,5 +1,5 @@
1
1
  import { D as ownership_claim_exports, S as process_identity_exports, b as operationState, t as getExecutor, y as isTermination } from "./exec-aULwtNly.mjs";
2
- import { d as getConfigDir } from "./config-Cn94Jc0g.mjs";
2
+ import { d as getConfigDir } from "./config-AbUjIBOQ.mjs";
3
3
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
4
  import { join } from "node:path";
5
5
  //#region src/engine/simslim.ts
@@ -1,9 +1,9 @@
1
- import { r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
2
- import { G as projectDeviceSlots, U as parseDeviceSlotKey, p as getProject } from "./config-Cn94Jc0g.mjs";
3
- import { O as getAvdNameForSerialAsync, j as listAdbDevicesAsync } from "./android-DriNoAVy.mjs";
4
- import { on as deviceShellArg } from "./ccache-BWTze1Ls.mjs";
5
- import { y as fileLeaseIo } from "./activity-Cd-ysFes.mjs";
6
- import { f as listAllIosSimsAsync } from "./ios-E26qSpkb.mjs";
1
+ import { r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { G as projectDeviceSlots, U as parseDeviceSlotKey, p as getProject } from "./config-AbUjIBOQ.mjs";
3
+ import { O as getAvdNameForSerialAsync, j as listAdbDevicesAsync } from "./android-BHKgeOuq.mjs";
4
+ import { on as deviceShellArg } from "./ccache-DsDkdP72.mjs";
5
+ import { y as fileLeaseIo } from "./activity-BR5oHSO5.mjs";
6
+ import { f as listAllIosSimsAsync } from "./ios-CoMCWfub.mjs";
7
7
  import { hostedNativeRecords } from "@stim-cli/core/state";
8
8
  //#region src/engine/slot-launch.ts
9
9
  function launchSlotScope(root, slot = "default") {
@@ -1,5 +1,5 @@
1
1
  import { c as throwIfCancelled, t as getExecutor, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
2
+ import { ot as runCancellationSignal } from "./toolchain-CLGnEUgT.mjs";
3
3
  import { existsSync, lstatSync, promises, readdirSync, realpathSync, statSync } from "node:fs";
4
4
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
5
5
  import { validMacosResourceDestination } from "@stim-cli/core";
@@ -1,2 +1,2 @@
1
- import { a as registerStart, c as startDevServer, d as supervisorSignalable, f as tailLines, i as readLogTail, l as startFacts, n as liveSupervisor, o as resolveWorkspaceMetroPort, p as wantsExpoOwnTunnel, r as parseWait, s as startCommand, t as failureEvidence, u as supervisorEntry } from "./start-DrPwER_2.mjs";
1
+ import { a as registerStart, c as startDevServer, d as supervisorSignalable, f as tailLines, i as readLogTail, l as startFacts, n as liveSupervisor, o as resolveWorkspaceMetroPort, p as wantsExpoOwnTunnel, r as parseWait, s as startCommand, t as failureEvidence, u as supervisorEntry } from "./start-Dlv4XXTP.mjs";
2
2
  export { startCommand as default, failureEvidence, liveSupervisor, parseWait, readLogTail, registerStart, resolveWorkspaceMetroPort, startDevServer, startFacts, supervisorEntry, supervisorSignalable, tailLines, wantsExpoOwnTunnel };
@@ -1,15 +1,15 @@
1
1
  import { D as ownership_claim_exports, S as process_identity_exports, a as waitForGroupExit, c as throwIfCancelled, d as workspaceProcessLockError, l as WorkspaceProcessCleanupError, o as cancellableSleep, r as groupExitBudgetMs, t as getExecutor, u as withWorkspaceProcessLock, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { S as supervisorLogFile, _ as ensureWorkspaceStorage, i as recordWorkspaceUse, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync, w as workspaceAgentDeviceDir } from "./workspace-state-BjqdjnJR.mjs";
3
- import { E as upsertProject, O as withConfigLockAsync$1, p as getProject, x as releaseMetroPort } from "./config-Cn94Jc0g.mjs";
4
- import { _ as stepTimer, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
5
- import { A as metroCommandSetting, B as publicUrlSetting, G as remoteIosSetting, I as ngrokUrlSetting, J as resolveCacheProviderConfig, M as metroIdleStopMinutesSetting, N as metroPortSetting, P as metroTunnelSettingError, U as remoteAndroidSetting, Y as resolveIosProjectDir, Z as resolveProjectSettingsAsync, _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, dt as detectProviders, ft as planMetroReach, h as deviceIdleShutdownMinutesSetting, j as metroCommandSettingError, m as defaultAndroidLayout, ot as tunnelModeSetting, p as cacheProviderSettingError, q as resolveAndroidLayout, rt as settingShapeErrors, st as unknownSettingKeys, ut as PUBLIC_METRO_ENV } from "./settings-BDVI8Ivc.mjs";
6
- import { E as MODE_EXPO, M as readMetroTunnel, O as clearManagedMetroTunnel, S as readAppJson, T as MODE_COMMAND, c as projectProblem, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL, v as detectIsExpo, w as MODE_BARE, x as readAppConfigText } from "./project-DYj-HVx6.mjs";
7
- import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
8
- import { _ as PORT_INSPECTION_REMEDY, a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, f as signalProcessTree, g as reserveMetroPort, h as isMetroRunning, m as createPortProbe, u as processCwds, v as PortInspectionError } from "./metro-CvyD-xwe.mjs";
9
- import { a as levelRank } from "./ndjson-Dy2W4vRa.mjs";
10
- import { En as runProcessOperation, In as readProjectConfig, Vn as remoteCliInvocation, b as stopOwnedMetroForReset, c as budgetGate, wn as exitAfterFlush } from "./ccache-BWTze1Ls.mjs";
11
- import { C as terminateChild, E as withManagedTunnelLock, S as stopTunnel, b as resolveSupervisorTarget, w as withManagedRemoteWorktreeLock, x as startTunnelSequence } from "./workspaces-DFbj07jp.mjs";
12
- import { i as restoreLightenedDependencies } from "./lightened-BCsdAGj_.mjs";
2
+ import { S as supervisorLogFile, _ as ensureWorkspaceStorage, i as recordWorkspaceUse, k as workspaceLogsDir$1, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { E as upsertProject, O as withConfigLockAsync$1, p as getProject, x as releaseMetroPort } from "./config-AbUjIBOQ.mjs";
4
+ import { _ as stepTimer, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
5
+ import { A as metroCommandSetting, B as publicUrlSetting, G as remoteIosSetting, I as ngrokUrlSetting, J as resolveCacheProviderConfig, M as metroIdleStopMinutesSetting, N as metroPortSetting, P as metroTunnelSettingError, U as remoteAndroidSetting, Y as resolveIosProjectDir, Z as resolveProjectSettingsAsync, _ as inertSettingWarning, a as SETTING_SHAPE_REMEDY, dt as detectProviders, ft as planMetroReach, h as deviceIdleShutdownMinutesSetting, j as metroCommandSettingError, m as defaultAndroidLayout, ot as tunnelModeSetting, p as cacheProviderSettingError, q as resolveAndroidLayout, rt as settingShapeErrors, st as unknownSettingKeys, ut as PUBLIC_METRO_ENV } from "./settings-D776ygML.mjs";
6
+ import { E as MODE_EXPO, M as readMetroTunnel, O as clearManagedMetroTunnel, S as readAppJson, T as MODE_COMMAND, c as projectProblem, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL, v as detectIsExpo, w as MODE_BARE, x as readAppConfigText } from "./project-D1n0K4yg.mjs";
7
+ import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
8
+ import { _ as PORT_INSPECTION_REMEDY, a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, f as signalProcessTree, g as reserveMetroPort, h as isMetroRunning, m as createPortProbe, u as processCwds, v as PortInspectionError } from "./metro-BMQHczcf.mjs";
9
+ import { a as levelRank } from "./ndjson-CrjIsGzw.mjs";
10
+ import { En as runProcessOperation, In as readProjectConfig, Vn as remoteCliInvocation, b as stopOwnedMetroForReset, c as budgetGate, wn as exitAfterFlush } from "./ccache-DsDkdP72.mjs";
11
+ import { C as stopTunnel, D as withManagedTunnelLock, S as startTunnelSequence, T as withManagedRemoteWorktreeLock, w as terminateChild, x as resolveSupervisorTarget } from "./workspaces-CvSYD_78.mjs";
12
+ import { i as restoreLightenedDependencies } from "./lightened-vSxkstg6.mjs";
13
13
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
14
14
  import { n as windowsLauncherArgs } from "./detached-entry-BPlSaCwC.mjs";
15
15
  import { appendFileSync, closeSync, mkdirSync, openSync, readFileSync } from "node:fs";
@@ -1,5 +1,5 @@
1
1
  import { S as process_identity_exports } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, k as workspaceLogsDir$1, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
2
+ import { E as workspaceDir, k as workspaceLogsDir$1, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
3
3
  import { existsSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  import { readMacosRecord } from "@stim-cli/core/state";
@@ -1,7 +1,7 @@
1
1
  import { D as ownership_claim_exports, S as process_identity_exports, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, d as writeWorkspaceState, k as workspaceLogsDir$1, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-BjqdjnJR.mjs";
2
+ import { E as workspaceDir, d as writeWorkspaceState, k as workspaceLogsDir$1, o as updateWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey } from "./workspace-state-DGwkPXwq.mjs";
3
3
  import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
4
- import { c as pidExists } from "./metro-CvyD-xwe.mjs";
4
+ import { c as pidExists } from "./metro-BMQHczcf.mjs";
5
5
  import { readFileSync, readlinkSync, rmSync } from "node:fs";
6
6
  import { hostname } from "node:os";
7
7
  import { join } from "node:path";
@@ -1,7 +1,7 @@
1
- import { P as formatBytes } from "./config-Cn94Jc0g.mjs";
2
- import { o as formatLongDuration } from "./command-output-Dj-WT4BP.mjs";
3
- import { i as findProjectRoot$1 } from "./project-DYj-HVx6.mjs";
4
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-C5nCKWp9.mjs";
1
+ import { P as formatBytes } from "./config-AbUjIBOQ.mjs";
2
+ import { o as formatLongDuration } from "./command-output-DjCsmzLZ.mjs";
3
+ import { i as findProjectRoot$1 } from "./project-D1n0K4yg.mjs";
4
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-W0x4SoC7.mjs";
5
5
  import { t as readProjectStats } from "./stats-report-B86Cv7Uc.mjs";
6
6
  import { archivedUsage, readArchives } from "@stim-cli/core/state";
7
7
  import chalk from "chalk";
@@ -1,5 +1,5 @@
1
- import { P as formatBytes } from "./config-Cn94Jc0g.mjs";
2
- import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
1
+ import { P as formatBytes } from "./config-AbUjIBOQ.mjs";
2
+ import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
3
3
  import { claimRemoveCommand, readClaimSet } from "@stim-cli/core/ownership-claim";
4
4
  import { maintenanceRunClaims, readMaintenanceState } from "@stim-cli/core/state";
5
5
  //#region src/maintenance/status.ts
@@ -1,34 +1,35 @@
1
1
  import { S as process_identity_exports, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { O as workspaceLogErrorIndex, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
3
- import { G as projectDeviceSlots, P as formatBytes, R as volumeRootFor, U as parseDeviceSlotKey, V as deviceSlotKey, _ as loadConfig$1, d as getConfigDir } from "./config-Cn94Jc0g.mjs";
4
- import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-Dj-WT4BP.mjs";
2
+ import { O as workspaceLogErrorIndex, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { G as projectDeviceSlots, P as formatBytes, R as volumeRootFor, U as parseDeviceSlotKey, V as deviceSlotKey, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-AbUjIBOQ.mjs";
4
+ import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-DjCsmzLZ.mjs";
5
5
  import { s as gitAsync } from "./operation-exec-Dp4FuIGR.mjs";
6
- import { Dt as linkedWorktreesOnDisk, It as repoRoot, Q as resolveSettings, St as gitCommonDirOnDisk, bt as gitCommonDir, lt as workspaceHiddenSetting } from "./settings-BDVI8Ivc.mjs";
7
- import { I as readWorkspaceLaunches, M as readMetroTunnel, P as readRemoteSession, S as readAppJson, a as findServerWorkspace, l as projectShortcut, u as detectPlatforms, v as detectIsExpo, y as detectTutorial } from "./project-DYj-HVx6.mjs";
8
- import { A as listAdbDevices, B as ownedAvdDeviceProfile, W as ownedAvdSerialResolver, ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting, yt as readParked } from "./android-DriNoAVy.mjs";
9
- import { c as pidExists, d as resolveProjectMetro, h as isMetroRunning, i as listeningPids, l as processCwd, o as listeningPidsByPort, u as processCwds } from "./metro-CvyD-xwe.mjs";
10
- import { o as parseNdjsonLine } from "./ndjson-Dy2W4vRa.mjs";
11
- import { E as metroLastStop, S as describeMetroLastStop, cn as hasMetroReverse, cr as attributeMachineUsage, lr as readFootprints, p as machineNumber } from "./ccache-BWTze1Ls.mjs";
12
- import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-BX1y5syV.mjs";
13
- import { A as remoteDeviceState, C as environmentState, D as parseDfFree, E as metroReverseTargets, M as tightVolumes, N as unprovisionedWorktrees, O as poolLine, P as withWebFacts, S as diskLine, T as gitSummaryText, _ as addReverseMissingIssue, b as deviceLeaseLines, g as activityLabel, j as statusActivity, k as remoteDeviceLine, r as readEasSessionLedger$1, v as applyMachineMemory, x as deviceLeaseStates, y as capacity } from "./eas-session-ledger-DrP4OuuM.mjs";
14
- import { B as activeBuildState, G as parseActiveBuild, H as buildStatusLine, R as ACTIVE_BUILD_KEY, U as bundlingActivity, V as buildReport, b as resolveSupervisorTarget, nt as readStats$1, ot as statsProjectKey$1 } from "./workspaces-DFbj07jp.mjs";
15
- import { a as createDeviceProcessTables, b as leaseIsExpired, h as tailLines, m as readWebActivity, r as createActivityReader, w as parseWorkspaceLeases, x as listLeaseFiles } from "./activity-Cd-ysFes.mjs";
16
- import { b as parseSimctlList, f as listAllIosSimsAsync } from "./ios-E26qSpkb.mjs";
17
- import { f as probeHostedSession } from "./hosted-client-D7Pk_Oo1.mjs";
18
- import "./hosted-macos-B9w4H8hc.mjs";
19
- import { i as readSupervisorState } from "./stop-D-EAr25B.mjs";
20
- import { l as applyStatusMeasures, n as workspacePhase, s as mergeState, u as createStatusMeasurer } from "./warm-progress-C0RsbngN.mjs";
21
- import { r as workspaceRecordingEnabled } from "./recordings-C20iUZfp.mjs";
22
- import { n as maintenanceLines, r as maintenanceStatus } from "./status-7ULDEJ1e.mjs";
23
- import { d as readIosDevices, s as isReachable } from "./ios-device-C_QkIf1Z.mjs";
24
- import { t as triggerMaintenance } from "./trigger-DMou-X7j.mjs";
25
- import { a as createRefreshScheduler, c as watchStatusSources, n as WATCH_LIGHT_INTERVAL_MS, o as watchChangeKey, r as WATCH_MACHINE_INTERVAL_MS, s as watchPayload, t as WATCH_FALLBACK_MS } from "./status-watch-BfabQn03.mjs";
6
+ import { Bt as repoRoot, Ct as gitCommonDirOnDisk, Ot as linkedWorktreesOnDisk, Q as resolveSettings, lt as workspaceHiddenSetting, xt as gitCommonDir } from "./settings-D776ygML.mjs";
7
+ import { I as readWorkspaceLaunches, M as readMetroTunnel, P as readRemoteSession, S as readAppJson, a as findServerWorkspace, l as projectShortcut, u as detectPlatforms, v as detectIsExpo, y as detectTutorial } from "./project-D1n0K4yg.mjs";
8
+ import { A as listAdbDevices, B as ownedAvdDeviceProfile, W as ownedAvdSerialResolver, ft as POOL_SETTING_REMEDY, j as listAdbDevicesAsync, vt as parkedMaxSetting, yt as readParked } from "./android-BHKgeOuq.mjs";
9
+ import { c as pidExists, d as resolveProjectMetro, h as isMetroRunning, i as listeningPids, l as processCwd, o as listeningPidsByPort, u as processCwds } from "./metro-BMQHczcf.mjs";
10
+ import { o as parseNdjsonLine } from "./ndjson-CrjIsGzw.mjs";
11
+ import { E as metroLastStop, S as describeMetroLastStop, cn as hasMetroReverse, cr as attributeMachineUsage, lr as readFootprints, p as machineNumber } from "./ccache-DsDkdP72.mjs";
12
+ import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-D5ZxwCGJ.mjs";
13
+ import { A as poolLine, C as diskLine, D as loadLine, E as gitSummaryText, F as tightVolumes, I as unprovisionedWorktrees, L as withWebFacts, M as remoteDeviceState, N as slotUsageLines, O as metroReverseTargets, P as statusActivity, S as deviceLeaseStates, _ as addReverseMissingIssue, b as capacityLoad, g as activityLabel, j as remoteDeviceLine, k as parseDfFree, r as readEasSessionLedger$1, v as applyMachineMemory, w as environmentState, x as deviceLeaseLines, y as capacity } from "./eas-session-ledger-B0KLZx5m.mjs";
14
+ import { Ct as buildSlotUsage, G as buildStatusLine, J as parseActiveBuild, K as bundlingActivity, U as activeBuildState, V as ACTIVE_BUILD_KEY, W as buildReport, at as readStats$1, lt as statsProjectKey$1, x as resolveSupervisorTarget } from "./workspaces-CvSYD_78.mjs";
15
+ import { a as createDeviceProcessTables, b as leaseIsExpired, h as tailLines, m as readWebActivity, r as createActivityReader, w as parseWorkspaceLeases, x as listLeaseFiles } from "./activity-BR5oHSO5.mjs";
16
+ import { b as parseSimctlList, f as listAllIosSimsAsync } from "./ios-CoMCWfub.mjs";
17
+ import { p as probeHostedSession } from "./hosted-client-CgoxdU9j.mjs";
18
+ import "./hosted-macos-Doh85YUM.mjs";
19
+ import { i as readSupervisorState } from "./stop-p9uSKuGE.mjs";
20
+ import { l as applyStatusMeasures, n as workspacePhase, s as mergeState, u as createStatusMeasurer } from "./warm-progress--KkkBBaq.mjs";
21
+ import { r as workspaceRecordingEnabled } from "./recordings-CHMaF73C.mjs";
22
+ import { n as maintenanceLines, r as maintenanceStatus } from "./status-CK7ZoEhV.mjs";
23
+ import { s as deviceSlotUsage } from "./device-capacity-B2ChA-bz.mjs";
24
+ import { d as readIosDevices, s as isReachable } from "./ios-device-L1-pota_.mjs";
25
+ import { t as triggerMaintenance } from "./trigger-CfnOfpDd.mjs";
26
+ import { a as createRefreshScheduler, c as watchStatusSources, n as WATCH_LIGHT_INTERVAL_MS, o as watchChangeKey, r as WATCH_MACHINE_INTERVAL_MS, s as watchPayload, t as WATCH_FALLBACK_MS } from "./status-watch-okrpea4i.mjs";
26
27
  import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
27
28
  import { createHash, randomUUID } from "node:crypto";
28
29
  import { mkdirSync, readFileSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
29
30
  import { join, posix, resolve } from "node:path";
30
31
  import { rotatedLogPath } from "@stim-cli/core";
31
- import { DEVICE_RECLAIM_REASON, ERROR_SOURCES, archiveRoot, archivedUsage, bundleMarkerPlatform, countErrorEntries, gitMergeCacheDir, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedIosPlacements, hostedIosRecords, hostedIosStatus, linkReplacedArchives, logFiles, macosAppState, parseHostedAndroidPlacement, parseHostedIosPlacement, queryLogs, readArchives, readBuildDetail, readBuildHistory, readDeviceIdleShutdowns, readDevicePlacement, readIdleStop, readLastBuilds, readMacosRecord, recordMatches, sortByTs, unreadableHostedAndroid, unreadableHostedIos, withDerivedFacts, withGitChip, withStateReadCache } from "@stim-cli/core/state";
32
+ import { DEVICE_RECLAIM_REASON, ERROR_SOURCES, archiveRoot, archivedUsage, bundleMarkerPlatform, countErrorEntries, gitMergeCacheDir, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedIosPlacements, hostedIosRecords, hostedIosStatus, linkReplacedArchives, loadPerCore, logFiles, macosAppState, maxLoadPerCore, parseHostedAndroidPlacement, parseHostedIosPlacement, queryLogs, readArchives, readBuildDetail, readBuildHistory, readDeviceIdleShutdowns, readDevicePlacement, readIdleStop, readLastBuilds, readMacosRecord, recordMatches, sortByTs, unreadableHostedAndroid, unreadableHostedIos, withDerivedFacts, withGitChip, withStateReadCache } from "@stim-cli/core/state";
32
33
  import { basename as basename$1, dirname as dirname$1, join as join$1 } from "path";
33
34
  import chalk from "chalk";
34
35
  import { closeSync as closeSync$1, existsSync as existsSync$1, fstatSync as fstatSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readSync as readSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
@@ -880,10 +881,12 @@ async function readStatusFacts(probes, gitScope, cwd) {
880
881
  const simsByUdid = {};
881
882
  let simsAvailable = true;
882
883
  let simctlError = null;
884
+ let simctlFailure = null;
883
885
  try {
884
886
  for (const sim of await simsRead) simsByUdid[sim.udid] = sim;
885
887
  } catch (e) {
886
888
  simsAvailable = false;
889
+ simctlFailure = e;
887
890
  simctlError = String(e?.message || e).split("\n")[0] ?? "";
888
891
  }
889
892
  const running = await processes;
@@ -1034,6 +1037,17 @@ async function readStatusFacts(probes, gitScope, cwd) {
1034
1037
  busy: sims.some((sim) => sim.state === "Booted"),
1035
1038
  probes
1036
1039
  });
1040
+ const { maxBuilds, maxDevices } = getConcurrencyLimits();
1041
+ const slotUsage = {
1042
+ ...maxBuilds > 0 ? { builds: buildSlotUsage(maxBuilds) } : {},
1043
+ ...maxDevices > 0 ? { devices: await deviceSlotUsage(maxDevices, {
1044
+ config: cfg,
1045
+ sims: process.platform !== "darwin" ? [] : simsAvailable ? sims : () => {
1046
+ throw simctlFailure;
1047
+ },
1048
+ adb: () => listAdbDevicesAsync({ timeoutMs: PHYSICAL_DEVICE_LIST_TIMEOUT_MS })
1049
+ }) } : {}
1050
+ };
1037
1051
  const archives = probes.archives();
1038
1052
  const maxCount = machineNumber("archive.maxCount", cfg, process.env);
1039
1053
  return {
@@ -1051,6 +1065,7 @@ async function readStatusFacts(probes, gitScope, cwd) {
1051
1065
  cwdRoot,
1052
1066
  tables,
1053
1067
  machine,
1068
+ slotUsage,
1054
1069
  roots,
1055
1070
  simNames,
1056
1071
  probes,
@@ -1431,10 +1446,14 @@ function statusCommand(program) {
1431
1446
  for (const line of renderStatus(await readStatus(), json)) console.log(line);
1432
1447
  });
1433
1448
  }
1434
- function renderStatus({ archived, archivedUsage: usage, projects, states, labelOnlyRoots, leases, leaseNow, orphanWorktrees, simsAvailable, simctlError, cwdRoot, machine }, json, settle = (payload) => payload, cwd = process.cwd()) {
1449
+ function renderStatus({ archived, archivedUsage: usage, projects, states, labelOnlyRoots, leases, leaseNow, orphanWorktrees, simsAvailable, simctlError, cwdRoot, machine, slotUsage }, json, settle = (payload) => payload, cwd = process.cwd()) {
1435
1450
  const out = [];
1436
1451
  const totalMemoryMb = Math.round(totalmem() / 1048576);
1437
- const cap = capacity(states, totalMemoryMb);
1452
+ const cap = {
1453
+ ...capacity(states, totalMemoryMb),
1454
+ ...slotUsage,
1455
+ load: capacityLoad(loadPerCore(), maxLoadPerCore(), null)
1456
+ };
1438
1457
  const pools = ["ios", "android"].map((platform) => {
1439
1458
  const { max, error } = parkedMaxSetting(platform);
1440
1459
  return {
@@ -1474,6 +1493,8 @@ function renderStatus({ archived, archivedUsage: usage, projects, states, labelO
1474
1493
  if (pool.line) out.push(chalk.dim(pool.line));
1475
1494
  }
1476
1495
  for (const line of deviceLeaseLines(leases, leaseNow)) out.push(line);
1496
+ out.push(chalk.dim(loadLine(cap.load)));
1497
+ for (const line of slotUsageLines(cap)) out.push(chalk.dim(line));
1477
1498
  return out;
1478
1499
  }
1479
1500
  if (!simsAvailable) out.push(chalk.yellow(`simctl could not be read (${simctlError}), so no iOS sim below could be checked.`));
@@ -1552,6 +1573,8 @@ function renderStatus({ archived, archivedUsage: usage, projects, states, labelO
1552
1573
  for (const w of orphanWorktrees) out.push(chalk.dim(` ${orphanWorktreeLine(w)}`));
1553
1574
  }
1554
1575
  out.push(chalk.dim(machine?.memorySource === "footprint" ? `\n${cap.liveCount} active environment(s) use ${formatGb(cap.committedMb)} of ${formatGb(cap.totalMemoryMb)}.` : `\n${cap.liveCount} active environment(s), roughly ${formatGb(cap.committedMb)} of ${formatGb(cap.totalMemoryMb)} committed.`));
1576
+ out.push(chalk.dim(loadLine(cap.load)));
1577
+ for (const line of slotUsageLines(cap)) out.push(chalk.dim(line));
1555
1578
  const volumes = readVolumes(cwdRoot || cwd);
1556
1579
  const line = diskLine(volumes);
1557
1580
  if (line) {
@@ -1,2 +1,2 @@
1
- import { n as runStatusWatch, r as statusCommand, t as readVolumes } from "./status-BfnK9pUd.mjs";
1
+ import { n as runStatusWatch, r as statusCommand, t as readVolumes } from "./status-D6PBK6_-.mjs";
2
2
  export { statusCommand as default, readVolumes, runStatusWatch };
@@ -1,8 +1,8 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { d as androidToolPath } from "./android-DriNoAVy.mjs";
3
- import { c as pidExists } from "./metro-CvyD-xwe.mjs";
4
- import { n as easMachineStateRoot } from "./eas-session-ledger-DrP4OuuM.mjs";
5
- import { b as parseSimctlList } from "./ios-E26qSpkb.mjs";
2
+ import { d as androidToolPath } from "./android-BHKgeOuq.mjs";
3
+ import { c as pidExists } from "./metro-BMQHczcf.mjs";
4
+ import { n as easMachineStateRoot } from "./eas-session-ledger-B0KLZx5m.mjs";
5
+ import { b as parseSimctlList } from "./ios-CoMCWfub.mjs";
6
6
  import { existsSync, readdirSync, statSync, watch } from "node:fs";
7
7
  import { basename, dirname, join } from "node:path";
8
8
  //#region src/status-watch.ts
@@ -417,9 +417,13 @@ function ownerKey(owner) {
417
417
  function ownerSteady(before, after) {
418
418
  return Math.abs(after.cpuPercent - before.cpuPercent) < 5 && Math.abs(after.memoryMb - before.memoryMb) < 16;
419
419
  }
420
+ function loadSteady(before, after) {
421
+ return before.state === after.state && before.limit === after.limit && before.busyAt === after.busyAt && before.cpus === after.cpus && Math.abs(Math.round((after.loadPerCore - before.loadPerCore) * 10)) < 10;
422
+ }
420
423
  /**
421
424
  * The payload `status --watch --json` prints. A usage figure keeps its value from the `previous` printed payload until it moves by a step: an owner's `cpuPercent`
422
- * and `memoryMb`, an environment's `memoryMb` and `capacity.committedMb`. An owner's row is kept whole, `residentMb`
425
+ * and `memoryMb`, an environment's `memoryMb`, `capacity.committedMb`, and `capacity.load` while its `state`, `limit`,
426
+ * `busyAt` and `cpus` stay the same and its `loadPerCore` moves less than a step. An owner's row is kept whole, `residentMb`
423
427
  * and `processes` included, until one of its two figures moves, so a machine whose processes only jitter prints no new line.
424
428
  */
425
429
  function watchPayload(previous, next) {
@@ -444,7 +448,14 @@ function watchPayload(previous, next) {
444
448
  } : env;
445
449
  });
446
450
  const { capacity } = previous;
447
- if (capacity.overCapacity === next.capacity.overCapacity && capacity.liveCount === next.capacity.liveCount && capacity.totalMemoryMb === next.capacity.totalMemoryMb && Math.abs(next.capacity.committedMb - capacity.committedMb) < 16) payload.capacity = capacity;
451
+ if (capacity.overCapacity === next.capacity.overCapacity && capacity.liveCount === next.capacity.liveCount && capacity.totalMemoryMb === next.capacity.totalMemoryMb && Math.abs(next.capacity.committedMb - capacity.committedMb) < 16) payload.capacity = {
452
+ ...payload.capacity,
453
+ committedMb: capacity.committedMb
454
+ };
455
+ if (capacity.load && next.capacity.load && loadSteady(capacity.load, next.capacity.load)) payload.capacity = {
456
+ ...payload.capacity,
457
+ load: capacity.load
458
+ };
448
459
  return payload;
449
460
  }
450
461
  const holdPullRequest = (worktree) => worktree.pullRequest ? {
@@ -1,4 +1,4 @@
1
- import { n as runStatusWatch } from "./status-BfnK9pUd.mjs";
1
+ import { n as runStatusWatch } from "./status-D6PBK6_-.mjs";
2
2
  import { parentPort, workerData } from "node:worker_threads";
3
3
  //#region src/status-worker.ts
4
4
  const STOP_EXIT_MS = 500;
@@ -1,5 +1,5 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { C as saveConfig, c as ensureConfig } from "./config-Cn94Jc0g.mjs";
2
+ import { C as saveConfig, c as ensureConfig } from "./config-AbUjIBOQ.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { workspaceId } from "@stim-cli/core";
5
5
  import { readHomeIdentity, withConfigLockAsync } from "@stim-cli/core/state";
@@ -1,3 +1,3 @@
1
- import { b as resolveSupervisorTarget } from "./workspaces-DFbj07jp.mjs";
2
- import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-D-EAr25B.mjs";
1
+ import { x as resolveSupervisorTarget } from "./workspaces-CvSYD_78.mjs";
2
+ import { a as resolveCollectorTargets, c as stopWorkspaceNow, i as readSupervisorState, n as clearSupervisorState, o as runStop, r as readCollectorState, s as stopCommand, t as clearCollectorState } from "./stop-p9uSKuGE.mjs";
3
3
  export { clearCollectorState, clearSupervisorState, stopCommand as default, readCollectorState, readSupervisorState, resolveCollectorTargets, resolveSupervisorTarget, runStop, stopWorkspaceNow };
@@ -1,19 +1,19 @@
1
1
  import { D as ownership_claim_exports, E as debugLog, S as process_identity_exports, l as WorkspaceProcessCleanupError, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-BjqdjnJR.mjs";
3
- import { E as upsertProject, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, U as parseDeviceSlotKey, W as parseDeviceSlotOption, o as clearSupervisor, p as getProject, q as validateDeviceSlot } from "./config-Cn94Jc0g.mjs";
4
- import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-Dj-WT4BP.mjs";
5
- import { A as clearWorkspaceLaunches, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, j as clearWorkspaceSupervisor, k as clearRemoteSession, n as findCommandWorkspace } from "./project-DYj-HVx6.mjs";
6
- import { t as macosAppPresent } from "./state-CZxLyetD.mjs";
7
- import { et as removeOwnedEmulatorMetroReverses } from "./android-DriNoAVy.mjs";
8
- import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, p as signalProcessTreeAsync, r as killMetroTreeAsync, u as processCwds } from "./metro-CvyD-xwe.mjs";
9
- import { D as requestDevServerStop, Ln as resolveEasCliBin, Ot as endRecordedSession, T as logVanishedSupervisor, k as withdrawDevServerStopRequest } from "./ccache-BWTze1Ls.mjs";
10
- import { S as stopTunnel, b as resolveSupervisorTarget, dt as teardownOwnedBrowser, ft as teardownOwnedIosSim, ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
11
- import { $ as clearNativeRunCancel, X as NATIVE_RUN_LOCK, Z as NATIVE_RUN_WAIT_MS, et as decideStopAction, it as requestNativeRunCancel, nt as nativeRunHolder, rt as nativeRunWaitNotice, tt as describeNativeRunHolder } from "./toolchain-CbCG6C5Z.mjs";
12
- import { O as releaseWorkspaceLeasesAsync, y as fileLeaseIo } from "./activity-Cd-ysFes.mjs";
13
- import { i as stopHostedAndroid } from "./hosted-android-BMKzUNnY.mjs";
14
- import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-C9yAaKEv.mjs";
15
- import { n as stopMacosApp } from "./stop-CH79S3IZ.mjs";
16
- import { n as verifyCollectorOwnership } from "./ownership-Bx-0cku-.mjs";
2
+ import { E as workspaceDir, c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { E as upsertProject, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, U as parseDeviceSlotKey, W as parseDeviceSlotOption, o as clearSupervisor, p as getProject, q as validateDeviceSlot } from "./config-AbUjIBOQ.mjs";
4
+ import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-DjCsmzLZ.mjs";
5
+ import { A as clearWorkspaceLaunches, M as readMetroTunnel, O as clearManagedMetroTunnel, P as readRemoteSession, T as MODE_COMMAND, j as clearWorkspaceSupervisor, k as clearRemoteSession, n as findCommandWorkspace } from "./project-D1n0K4yg.mjs";
6
+ import { t as macosAppPresent } from "./state-C2AUjjhg.mjs";
7
+ import { et as removeOwnedEmulatorMetroReverses } from "./android-BHKgeOuq.mjs";
8
+ import { a as listeningPidsAsync, c as pidExists, d as resolveProjectMetro, h as isMetroRunning, p as signalProcessTreeAsync, r as killMetroTreeAsync, u as processCwds } from "./metro-BMQHczcf.mjs";
9
+ import { D as requestDevServerStop, Ln as resolveEasCliBin, Ot as endRecordedSession, T as logVanishedSupervisor, k as withdrawDevServerStopRequest } from "./ccache-DsDkdP72.mjs";
10
+ import { C as stopTunnel, ht as teardownOwnedIosSim, mt as teardownOwnedBrowser, pt as teardownOwnedAvd, x as resolveSupervisorTarget } from "./workspaces-CvSYD_78.mjs";
11
+ import { $ as clearNativeRunCancel, X as NATIVE_RUN_LOCK, Z as NATIVE_RUN_WAIT_MS, et as decideStopAction, it as requestNativeRunCancel, nt as nativeRunHolder, rt as nativeRunWaitNotice, tt as describeNativeRunHolder } from "./toolchain-CLGnEUgT.mjs";
12
+ import { O as releaseWorkspaceLeasesAsync, y as fileLeaseIo } from "./activity-BR5oHSO5.mjs";
13
+ import { i as stopHostedAndroid } from "./hosted-android-DI_vvv7U.mjs";
14
+ import { a as stopHostedIos, n as removePhoneReverses } from "./phone-reverses-DZRad8HT.mjs";
15
+ import { r as stopMacosApp } from "./stop-uRQ-zYcl.mjs";
16
+ import { n as verifyCollectorOwnership } from "./ownership-Dtz9G5Gl.mjs";
17
17
  import { hostedAndroidDeviceName, hostedAndroidRecords, hostedIosRecords, hostedNativeRecords, isJsonObject, parseHostedNativePlacement } from "@stim-cli/core/state";
18
18
  import chalk from "chalk";
19
19
  //#region src/commands/stop.ts
@@ -267,7 +267,7 @@ async function stopWorkspace({ root, operation, project = void 0, state = void 0
267
267
  probe: (candidatePort) => isMetroRunning(candidatePort, operation?.signal),
268
268
  pidsOf: listeningPidsAsync,
269
269
  cwdOf: async (pid) => (await processCwds([pid])).get(pid) ?? null
270
- }), teardownIos = teardownOwnedIosSim, teardownAvd = teardownOwnedAvd, teardownBrowser = (projectRoot) => teardownOwnedBrowser(projectRoot), stopMacos, hostedSlot, remoteDevice = void 0, teardownRemoteSession = (projectRoot, id) => defaultTeardownRemoteSession(projectRoot, id, operation), metroTunnel = void 0, stopMetroTunnel = stopTunnel, releaseLeases = releaseWorkspaceLeasesAsync, freePort = defaultFreePort, clearRegistration = (projectRoot, expected) => defaultClearRegistration(projectRoot, expected, report), clearState = (projectRoot, expected) => withWorkspaceStateLockAsync(projectRoot, () => clearSupervisorState(projectRoot, expected)), report = (line) => console.error(line) }) {
270
+ }), teardownIos = teardownOwnedIosSim, teardownAvd = teardownOwnedAvd, teardownBrowser = (projectRoot) => teardownOwnedBrowser(projectRoot), stopMacos, hostedSlot, remoteDevice = void 0, teardownRemoteSession = (projectRoot, id) => defaultTeardownRemoteSession(projectRoot, id, operation), metroTunnel = void 0, stopMetroTunnel = stopTunnel, releaseLeases = releaseWorkspaceLeasesAsync, freePort = defaultFreePort, clearRegistration = (projectRoot, expected) => defaultClearRegistration(projectRoot, expected, report), clearState = (projectRoot, expected) => withWorkspaceStateLockAsync(projectRoot, () => clearSupervisorState(projectRoot, expected)), report = (line) => console.error(line), requester }) {
271
271
  const proj = project === void 0 ? getProject(root) : project;
272
272
  const sup = state === void 0 ? readSupervisorState(root) : state;
273
273
  const collectorRecords = collectors === void 0 ? readCollectorState(root) : collectors;
@@ -347,7 +347,8 @@ async function stopWorkspace({ root, operation, project = void 0, state = void 0
347
347
  killGroup,
348
348
  waiter,
349
349
  report,
350
- releaseReverses
350
+ releaseReverses,
351
+ requester
351
352
  });
352
353
  if (outcomes.supervisor.status !== "stopped") {
353
354
  ok = false;
@@ -648,11 +649,11 @@ async function reapCollectors(root, collectors, { isAlive, signal, report, verif
648
649
  entries
649
650
  };
650
651
  }
651
- async function stopSupervisor(target, { root, killGroup, waiter, report, releaseReverses }) {
652
+ async function stopSupervisor(target, { root, killGroup, waiter, report, releaseReverses, requester }) {
652
653
  await releaseReverses();
653
654
  report(chalk.dim(phaseLine("stop", `sending SIGTERM to supervisor process group ${target.pid}`)));
654
655
  try {
655
- await withWorkspaceStateLockAsync(root, () => requestDevServerStop(root, target.processToken, { by: "stim stop" }));
656
+ await withWorkspaceStateLockAsync(root, () => requestDevServerStop(root, target.processToken, requester ?? { by: "stim stop" }));
656
657
  } catch {}
657
658
  let signalled = false;
658
659
  try {
@@ -1,8 +1,8 @@
1
1
  import { D as ownership_claim_exports, S as process_identity_exports, u as withWorkspaceProcessLock } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, d as writeWorkspaceState, l as withWorkspaceStateLockAsync } from "./workspace-state-BjqdjnJR.mjs";
3
- import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-CZxLyetD.mjs";
4
- import { O as runningBundleInstancesAsync } from "./workspaces-DFbj07jp.mjs";
5
- import { n as stopHostedMacos } from "./hosted-macos-B9w4H8hc.mjs";
2
+ import { E as workspaceDir, d as writeWorkspaceState, l as withWorkspaceStateLockAsync } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { a as macosRuntimeClaim, o as requiredMacosRecord } from "./state-C2AUjjhg.mjs";
4
+ import { A as runningBundleInstancesAsync, j as runningInstancesInAsync, k as hostedBundleDirs } from "./workspaces-CvSYD_78.mjs";
5
+ import { n as stopHostedMacos } from "./hosted-macos-Doh85YUM.mjs";
6
6
  import { readMacosRecord } from "@stim-cli/core/state";
7
7
  //#region src/macos/stop.ts
8
8
  const APP_EXIT_MS = 5e3;
@@ -40,6 +40,10 @@ async function stopBundleInstances(root, operation) {
40
40
  await stopProcesses(instances, void 0, operation);
41
41
  return instances.length > 0;
42
42
  }
43
+ /** Stops every running copy of a hosted session's app bundles, including copies LaunchServices started from an earlier attempt. */
44
+ async function stopHostedBundleInstances(area, operation) {
45
+ await stopProcesses(await runningInstancesInAsync(hostedBundleDirs(area), operation), void 0, operation);
46
+ }
43
47
  async function stopMacosAppHeld(root, operation) {
44
48
  operation?.signal.throwIfAborted();
45
49
  const record = requiredMacosRecord(root);
@@ -78,4 +82,4 @@ function stopMacosApp(root, operation) {
78
82
  });
79
83
  }
80
84
  //#endregion
81
- export { stopMacosApp as n, stopMacosAppHeld as r, stopBundleInstances as t };
85
+ export { stopMacosAppHeld as i, stopHostedBundleInstances as n, stopMacosApp as r, stopBundleInstances as t };
@@ -16,6 +16,7 @@ interface ServerHandle {
16
16
  close(): Promise<void> | void;
17
17
  onExit?(cb: (info?: ServerExitInfo | null) => void): void;
18
18
  serverPid?: number | null;
19
+ observesRequests?: boolean;
19
20
  }
20
21
  type ServerStarter = (opts: {
21
22
  root: string;