stim 1.36.0 → 1.38.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 (167) hide show
  1. package/README.md +3 -1
  2. package/dist/{acquire-artifact-DGTHCd0Q.mjs → acquire-artifact-QKPDkesw.mjs} +2 -2
  3. package/dist/{act-CvN9xyV6.mjs → act-Bh3t-NuH.mjs} +28 -34
  4. package/dist/{activity-BpdDvA8Q.mjs → activity-CANftndU.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-pbhaW7_k.mjs → agent-device-usage-output-CuROXefb.mjs} +5 -5
  6. package/dist/{android-SJx1V3R3.mjs → android-27_JgJ1T.mjs} +7 -7
  7. package/dist/{android-B0qTdwnt.mjs → android-Biwc4Dck.mjs} +5 -5
  8. package/dist/{android-5wkcMFDG.mjs → android-DGLG_VQ3.mjs} +2 -2
  9. package/dist/{android-e9WP10cE.mjs → android-Z6Eev9rL.mjs} +51 -42
  10. package/dist/{android-cas-BS9_55U5.mjs → android-cas-BDAwwL82.mjs} +4 -4
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/{android-image-BZ57YL6R.mjs → android-image-BcUD6bPi.mjs} +3 -3
  13. package/dist/api.d.mts +12 -5
  14. package/dist/api.mjs +34 -31
  15. package/dist/{apk-signed-tail-eZyXIrnc.mjs → apk-signed-tail-DHMkXs4s.mjs} +2 -2
  16. package/dist/{artifact-C3srrGVU.mjs → artifact-Dc1GsK7o.mjs} +29 -15
  17. package/dist/{artifact-platform-DqCWUieN.mjs → artifact-platform-BaGL1i1X.mjs} +1 -1
  18. package/dist/{artifact-ubNdxo_K.mjs → artifact-sGoFVK1q.mjs} +12 -12
  19. package/dist/{auto-placement-CKFpFCuq.mjs → auto-placement-RNh4kx2T.mjs} +7 -7
  20. package/dist/{browser-web-B63vLrj6.mjs → browser-web-7Oj57Roa.mjs} +15 -15
  21. package/dist/{build-B_Dx9SKJ.mjs → build-DkE5vjp1.mjs} +29 -28
  22. package/dist/{build-cache-BW8T4oD2.mjs → build-cache-CJ65Efv7.mjs} +10 -7
  23. package/dist/{build-plan-CeIooJqn.mjs → build-plan-DWajg5l_.mjs} +8 -7
  24. package/dist/{cache-manifest-CxWkZmUr.mjs → cache-manifest-BO0TIcPV.mjs} +1 -1
  25. package/dist/cache-manifest.mjs +1 -1
  26. package/dist/{cdp-C216kOAn.mjs → cdp-CgT47_9A.mjs} +1 -1
  27. package/dist/{chrome-C8sC5tdl.mjs → chrome-DL5znvmo.mjs} +1 -1
  28. package/dist/{cli-COdXswmc.mjs → cli-BSlwv9hI.mjs} +21 -21
  29. package/dist/cli.mjs +1 -1
  30. package/dist/{client-KSWIeQLA.mjs → client-qwmHFSga.mjs} +16 -12
  31. package/dist/collector-run.mjs +7 -7
  32. package/dist/{command-output-T3cDctRE.mjs → command-output-DsjhOzJ3.mjs} +1 -1
  33. package/dist/{config-BA3TgoIP.mjs → config-CNmN-ndb.mjs} +2 -2
  34. package/dist/{dependencies-LH-7k1Vr.mjs → dependencies-oku1ZLep.mjs} +144 -71
  35. package/dist/{dependency-state-Blfp3AkG.mjs → dependency-state-CBhPJAs_.mjs} +2 -2
  36. package/dist/{detached-entry-tfrgGVWb.mjs → detached-entry-VqFeEE9W.mjs} +1 -1
  37. package/dist/{dev-client-MO_DjTZr.mjs → dev-client-DL5UtVdx.mjs} +2 -2
  38. package/dist/{device-DNTWFFB1.mjs → device-CxMwX0VO.mjs} +17 -16
  39. package/dist/{device-android-BB9Lugr8.mjs → device-android-CSlBXuh_.mjs} +9 -9
  40. package/dist/{device-capacity-CpAVcKgq.mjs → device-capacity-D_IlxZRL.mjs} +84 -37
  41. package/dist/device-host-worker.mjs +28 -16
  42. package/dist/{device-pool-BJToGG-q.mjs → device-pool-BEaTdtss.mjs} +3 -3
  43. package/dist/{device-provision-CxQDCtrc.mjs → device-provision-C9NPdCne.mjs} +10 -10
  44. package/dist/{device-BZWt_aPJ.mjs → device-yfuJ-v4s.mjs} +11 -11
  45. package/dist/{doctor-C-46SkBe.mjs → doctor-BAA3zN5U.mjs} +1 -1
  46. package/dist/{doctor-DV639Iw_.mjs → doctor-BQ1Kl44s.mjs} +15 -21
  47. package/dist/{doctor-CYZ45LnX.mjs → doctor-QNzDE4aW.mjs} +24 -24
  48. package/dist/{doctor-fingerprint-DqWvIhMb.mjs → doctor-fingerprint-Bo4z8YNP.mjs} +1 -1
  49. package/dist/doctor-fingerprint.mjs +1 -1
  50. package/dist/{doctor-watchman-TZxYt_98.mjs → doctor-watchman-B8e3s9ko.mjs} +5 -5
  51. package/dist/{eas-build-Xf5Jd6LR.mjs → eas-build-4rg9WpEg.mjs} +4 -4
  52. package/dist/{eas-fallback-DNYPNinw.mjs → eas-fallback-UGo0SG7T.mjs} +6 -6
  53. package/dist/{eas-session-ledger-CXZ4aix0.mjs → eas-session-ledger-BDpSdFDM.mjs} +6 -6
  54. package/dist/{error-diagnostics-CvB5bpPU.mjs → error-diagnostics-CW9xl6ot.mjs} +10 -10
  55. package/dist/{exec-CGuDzt40.mjs → exec-L37dbiIb.mjs} +7 -1
  56. package/dist/{gc-DiUhrVFo.mjs → gc-3DHVCn-k.mjs} +52 -36
  57. package/dist/{gc-8Qm_K1iy.mjs → gc-BQ5dXnC7.mjs} +2 -2
  58. package/dist/{guide-CuvHRP53.mjs → guide-DqJCc4vW.mjs} +209 -78
  59. package/dist/{hosted-android-D__HGVIO.mjs → hosted-android-gwLspaz6.mjs} +4 -4
  60. package/dist/{hosted-client-DMOOu8vD.mjs → hosted-client-B_h_bTlz.mjs} +4 -4
  61. package/dist/{hosted-logs-CClIktQM.mjs → hosted-logs-BpQSRDRU.mjs} +17 -10
  62. package/dist/{hosted-logs-sync-B7XCeqVm.mjs → hosted-logs-sync-D3L1hDpM.mjs} +5 -5
  63. package/dist/{hosted-macos-D4sDJIbB.mjs → hosted-macos-GK4O1s7x.mjs} +6 -6
  64. package/dist/{hosted-native-BiiUG_Q6.mjs → hosted-native-B6ur_0OJ.mjs} +8 -8
  65. package/dist/{ios-Qam0bT9n.mjs → ios-2Qr4_Zu2.mjs} +1 -1
  66. package/dist/{ios-BZuhvLGr.mjs → ios-Bi0bQiZ_.mjs} +8 -8
  67. package/dist/{ios-BhfpRfNf.mjs → ios-DQEzde6f.mjs} +23 -10
  68. package/dist/{ios-BhpUWyN7.mjs → ios-M7nRVb33.mjs} +100 -37
  69. package/dist/{ios-device-vhYL1N--.mjs → ios-device-BLm1BZB4.mjs} +3 -3
  70. package/dist/{ios-device-DLdEDWJj.mjs → ios-device-ygijU78G.mjs} +1 -1
  71. package/dist/{ios-project-Cz0S1Sz-.mjs → ios-project-Bsm-eqwv.mjs} +7 -7
  72. package/dist/ios-runtime-DLiKoOkd.mjs +150 -0
  73. package/dist/{ios-signing-BcH88ecn.mjs → ios-signing-rWR_Mu5Z.mjs} +3 -3
  74. package/dist/{ios-state-Avwz2cbZ.mjs → ios-state-tzD0s7pt.mjs} +1 -1
  75. package/dist/{js-swap-Desu2iII.mjs → js-swap-Cuky0ZAQ.mjs} +60 -13
  76. package/dist/{launch-6ckG9UrC.mjs → launch-B-pkNlqg.mjs} +48 -28
  77. package/dist/{lightened-B6TnpHMX.mjs → lightened-KHWHmzGs.mjs} +5 -5
  78. package/dist/{logs-B-DMy1K0.mjs → logs-B0etn-BD.mjs} +7 -7
  79. package/dist/{logs-CO0CJRiC.mjs → logs-HomiqPhV.mjs} +6 -6
  80. package/dist/{macos-CduEmWAK.mjs → macos-C5liDnbP.mjs} +1 -1
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/{macos-B1aCXhem.mjs → macos-zMxSibx5.mjs} +22 -23
  83. package/dist/maintenance-run.mjs +6 -6
  84. package/dist/{metro-DM3yJL1M.mjs → metro-Cj6W4qOO.mjs} +4 -4
  85. package/dist/{metro-request-O8Q-JvBg.mjs → metro-request-BWCl3Zco.mjs} +2 -2
  86. package/dist/{prebuild-Di2IhUue.mjs → miss-reason-CeHvzeVm.mjs} +12 -272
  87. package/dist/{named-ports-BvB_CO9B.mjs → named-ports-DZ8DrkH1.mjs} +3 -3
  88. package/dist/{native-android-28NOG2-y.mjs → native-android-DtWLzg6g.mjs} +18 -18
  89. package/dist/{native-gradle-artifact-inputs-DxVEtS6_.mjs → native-gradle-artifact-inputs-D4w20_6d.mjs} +5 -5
  90. package/dist/{native-runtime-C3_NkUlW.mjs → native-runtime-BfvvAJLd.mjs} +6 -6
  91. package/dist/{native-source-ChAGj7R1.mjs → native-source-D2ZfiQ6U.mjs} +1 -1
  92. package/dist/{native-xcode-inputs-BWFTw5cJ.mjs → native-xcode-inputs-BHvnAq4o.mjs} +3 -3
  93. package/dist/{native-xcode-ios-B4Qoc7-U.mjs → native-xcode-ios-CYxrg_kK.mjs} +18 -19
  94. package/dist/offload-worker.mjs +23 -22
  95. package/dist/{operation-exec-DKlBcKAL.mjs → operation-exec-DNynwpqO.mjs} +1 -1
  96. package/dist/{ownership-C3y8wLSl.mjs → ownership-BLgOimfp.mjs} +3 -3
  97. package/dist/{page-Dj8IqvGM.mjs → page-CoN9al_x.mjs} +2 -2
  98. package/dist/{phone-reverses-BhSxbqom.mjs → phone-reverses-vRveZKSG.mjs} +4 -4
  99. package/dist/{placement-log-B8RCSzOm.mjs → placement-log-CM0DSELs.mjs} +1 -1
  100. package/dist/{plan-placement-BI4r55aP.mjs → plan-placement-CIrvKq8y.mjs} +6 -6
  101. package/dist/{ports-DhOSyWm9.mjs → ports-CKORWlC0.mjs} +3 -3
  102. package/dist/{project-Clk1JAWL.mjs → project-DIo71tGq.mjs} +16 -16
  103. package/dist/{pull-request-BpMTNkMB.mjs → pull-request-m8cMZ3aE.mjs} +2 -2
  104. package/dist/pull-requests.mjs +1 -1
  105. package/dist/{react-native-android-bdHBMrnf.mjs → react-native-android-B7VYSlKj.mjs} +41 -36
  106. package/dist/{react-native-build-CJega_NM.mjs → react-native-build-CFYTYmG4.mjs} +13 -10
  107. package/dist/{react-native-doctor-CY7BGITE.mjs → react-native-doctor-CnpVfE0k.mjs} +6 -6
  108. package/dist/{react-native-ios-Bo5EDVel.mjs → react-native-ios-ByeXo_NP.mjs} +18 -18
  109. package/dist/{recorded-build-BuGL_fnm.mjs → recorded-build-B4prJjSD.mjs} +20 -2
  110. package/dist/{recordings-6i2-x8LU.mjs → recordings-Byu5SzlI.mjs} +1 -1
  111. package/dist/{registration-DKjJGQ6p.mjs → registration-C-3PDR3X.mjs} +1 -1
  112. package/dist/{reload-BvDuvygc.mjs → reload-DANrKhQR.mjs} +1 -1
  113. package/dist/{reload-A_axEbeS.mjs → reload-DTd9g1EG.mjs} +16 -16
  114. package/dist/{remote-PD6CM0xp.mjs → remote-BWuq9qHV.mjs} +4 -4
  115. package/dist/{remote-WK_swZEw.mjs → remote-NOM82XE0.mjs} +10 -10
  116. package/dist/{result-BkDpN5Mz.mjs → result-C-ISEJ5F.mjs} +17 -17
  117. package/dist/{run-CTFi4Nq2.mjs → run-DQwx6djG.mjs} +2 -2
  118. package/dist/{server-bare-W0aPsRZE.mjs → server-bare-B_wRfchQ.mjs} +2 -2
  119. package/dist/{server-command-S00-ddjK.mjs → server-command-DgXYowQf.mjs} +6 -6
  120. package/dist/{server-expo-cc-cmfsl.mjs → server-expo-ByBM8DVv.mjs} +10 -8
  121. package/dist/server-expo-D7rwjAFp.mjs +2 -0
  122. package/dist/{settings-C_Xu4RNZ.mjs → settings-BthPoY3t.mjs} +2 -2
  123. package/dist/{settings-Bap-qjnp.mjs → settings-Cz8kQJzr.mjs} +49 -12
  124. package/dist/{settings-payload-D5jjhmrw.mjs → settings-payload-BOcxsZ6k.mjs} +5 -5
  125. package/dist/{settings-write-C5huI-iS.mjs → settings-write-BuMPL1rd.mjs} +6 -6
  126. package/dist/settings.schema.json +32 -2
  127. package/dist/{simslim-DlBvwgeF.mjs → simslim-BMgpTRWe.mjs} +2 -2
  128. package/dist/{slot-launch-qEQVTth7.mjs → slot-launch-BIm9w8kH.mjs} +6 -6
  129. package/dist/{stage-CxVI_MlP.mjs → stage-CX1Byp3n.mjs} +6 -5
  130. package/dist/{start-CVzivp35.mjs → start-BZWr85b2.mjs} +1 -1
  131. package/dist/{start-YpT_JpQQ.mjs → start-DI0ofPO-.mjs} +12 -12
  132. package/dist/{state-B4B5P4LU.mjs → state-45P8Kd6Z.mjs} +2 -2
  133. package/dist/{state-B9VFI6r0.mjs → state-C2vELPyr.mjs} +4 -4
  134. package/dist/{stats-COoePEri.mjs → stats-BDljWVWU.mjs} +5 -5
  135. package/dist/{stats-report-BVRCqwWA.mjs → stats-report-Ci6TAfFm.mjs} +1 -1
  136. package/dist/{status-CIvU5-TF.mjs → status-BG2S-a1d.mjs} +1 -1
  137. package/dist/{status-CQWmNl1f.mjs → status-C2PdxK6q.mjs} +1 -1
  138. package/dist/{status-CIg0k7Qb.mjs → status-DEZjHP4q.mjs} +32 -34
  139. package/dist/{status-watch--rfZynD_.mjs → status-watch-Cs18eFkQ.mjs} +5 -5
  140. package/dist/status-worker.mjs +1 -1
  141. package/dist/{stim-desktop-D0P_bzmd.mjs → stim-desktop-DWGAfaud.mjs} +2 -2
  142. package/dist/{stop-BiI4_VFG.mjs → stop-B2zDplJa.mjs} +2 -2
  143. package/dist/{stop-C3d5qG7C.mjs → stop-BPrTEOaz.mjs} +16 -16
  144. package/dist/{stop-BEBBruvD.mjs → stop-DrxHVVX9.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +15 -15
  146. package/dist/{support-BJbXovoO.mjs → support-BeVRaMWT.mjs} +13 -14
  147. package/dist/{support-Vckdzrmk.mjs → support-DBKG3Yyb.mjs} +7 -7
  148. package/dist/{swiftpm-artifact-inputs-DbuF-Yrr.mjs → swiftpm-artifact-inputs-CfNAb6Vm.mjs} +4 -4
  149. package/dist/{swiftpm-macos-Bu8xeBfM.mjs → swiftpm-macos-xdHjJHIj.mjs} +11 -11
  150. package/dist/toolchain-CTsPS5tL.mjs +2 -0
  151. package/dist/{toolchain-DCnWAxQL.mjs → toolchain-CZvtCZ-m.mjs} +11 -8
  152. package/dist/trigger-Bp3lruF2.mjs +2 -0
  153. package/dist/{trigger-BtB4kbe0.mjs → trigger-G_gbfIVB.mjs} +2 -2
  154. package/dist/{warm-progress-DwsGBpph.mjs → warm-progress-D3a0KviW.mjs} +20 -16
  155. package/dist/{web-D2En0Wa5.mjs → web-BvAweypa.mjs} +9 -9
  156. package/dist/web-DDL3usMb.mjs +2 -0
  157. package/dist/web-run.mjs +8 -8
  158. package/dist/windows-report.mjs +1 -1
  159. package/dist/{workspace-state-BhwAJBgA.mjs → workspace-state-CHEN_xzy.mjs} +3 -3
  160. package/dist/{workspaces-Dh5N70qW.mjs → workspaces-BgAYIccE.mjs} +218 -54
  161. package/dist/{worktree-DLm4s2Ib.mjs → worktree-C0YZ6mnk.mjs} +1 -1
  162. package/dist/{worktree-Yw3EW77B.mjs → worktree-kGPE9Pcw.mjs} +339 -37
  163. package/package.json +7 -7
  164. package/dist/server-expo-BWJDa7Qb.mjs +0 -2
  165. package/dist/toolchain-CIRdNl-c.mjs +0 -2
  166. package/dist/trigger-D8B7QR0q.mjs +0 -2
  167. package/dist/web-Dpj70t4p.mjs +0 -2
@@ -1,7 +1,7 @@
1
- import { D as ownership_claim_exports, d as throwIfCancelled, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { a as killOnAbort, r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
3
- import { ar as remoteCliInvocation, lr as easCliSupport, tr as resolveEasCliBin, ur as easCliUpgradeRemedy } from "./device-capacity-CpAVcKgq.mjs";
4
- import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpdDvA8Q.mjs";
1
+ import { D as ownership_claim_exports, d as throwIfCancelled, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { a as killOnAbort, r as childEnvironment } from "./operation-exec-DNynwpqO.mjs";
3
+ import { cr as remoteCliInvocation, fr as easCliSupport, ir as resolveEasCliBin, pr as easCliUpgradeRemedy } from "./device-capacity-D_IlxZRL.mjs";
4
+ import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-CANftndU.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { existsSync, realpathSync, statSync } from "node:fs";
7
7
  //#region src/engine/eas-build.ts
@@ -1,9 +1,9 @@
1
- import { d as throwIfCancelled, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { m as getProject } from "./config-BA3TgoIP.mjs";
3
- import { r as childEnvironment } from "./operation-exec-DKlBcKAL.mjs";
4
- import { dt as detectProviders, ft as planMetroReach } from "./settings-Bap-qjnp.mjs";
5
- import { M as readMetroTunnel, P as readRemoteSession } from "./project-Clk1JAWL.mjs";
6
- import { Qt as readInstalledEasCliVersionAsync, Xn as isEasAuthFailureText, cr as MIN_EAS_CLI_SIMULATOR_VERSION, lr as easCliSupport, or as remoteCommand, sr as MIN_EAS_CLI_DEVICE_VERSION, tr as resolveEasCliBin } from "./device-capacity-CpAVcKgq.mjs";
1
+ import { d as throwIfCancelled, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { m as getProject } from "./config-CNmN-ndb.mjs";
3
+ import { r as childEnvironment } from "./operation-exec-DNynwpqO.mjs";
4
+ import { dt as detectProviders, ft as planMetroReach } from "./settings-Cz8kQJzr.mjs";
5
+ import { M as readMetroTunnel, P as readRemoteSession } from "./project-DIo71tGq.mjs";
6
+ import { $n as isEasAuthFailureText, dr as MIN_EAS_CLI_SIMULATOR_VERSION, fr as easCliSupport, ir as resolveEasCliBin, lr as remoteCommand, tn as readInstalledEasCliVersionAsync, ur as MIN_EAS_CLI_DEVICE_VERSION } from "./device-capacity-D_IlxZRL.mjs";
7
7
  //#region src/engine/eas-fallback.ts
8
8
  const AVAILABILITY_TIMEOUT_MS = 3e4;
9
9
  function unusable(code, reason) {
@@ -1,9 +1,9 @@
1
- import { r as reportSignal, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { M as withDirLock$1, N as withDirLockAsync$1, w as workspaceAgentDeviceDir } from "./workspace-state-BhwAJBgA.mjs";
3
- import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-T3cDctRE.mjs";
4
- import { ft as deviceSlotKey, gt as projectDeviceSlots } from "./config-BA3TgoIP.mjs";
5
- import { n as isInsideProject } from "./metro-DM3yJL1M.mjs";
6
- import { r as cdpEndpoint } from "./state-B9VFI6r0.mjs";
1
+ import { r as reportSignal, t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { M as withDirLock$1, N as withDirLockAsync$1, w as workspaceAgentDeviceDir } from "./workspace-state-CHEN_xzy.mjs";
3
+ import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-DsjhOzJ3.mjs";
4
+ import { ft as deviceSlotKey, gt as projectDeviceSlots } from "./config-CNmN-ndb.mjs";
5
+ import { n as isInsideProject } from "./metro-Cj6W4qOO.mjs";
6
+ import { r as cdpEndpoint } from "./state-C2vELPyr.mjs";
7
7
  import { accessSync, constants, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
8
8
  import { delimiter, dirname, join, resolve } from "node:path";
9
9
  import { workspaceId } from "@stim-cli/core";
@@ -1,13 +1,13 @@
1
- import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-BhwAJBgA.mjs";
3
- import { v as launchErrorPreview } from "./command-output-T3cDctRE.mjs";
4
- import { ft as deviceSlotKey, m as getProject, pt as deviceSlotPlatforms } from "./config-BA3TgoIP.mjs";
5
- import { I as readWorkspaceLaunches } from "./project-Clk1JAWL.mjs";
6
- import { o as androidHome, u as androidToolCwd } from "./android-SJx1V3R3.mjs";
7
- import { d as resolveProjectMetro } from "./metro-DM3yJL1M.mjs";
8
- import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-5wkcMFDG.mjs";
9
- import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-BpdDvA8Q.mjs";
10
- import { r as deviceConsoleLevel } from "./ios-device-DLdEDWJj.mjs";
1
+ import { t as getExecutor } from "./exec-L37dbiIb.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-CHEN_xzy.mjs";
3
+ import { v as launchErrorPreview } from "./command-output-DsjhOzJ3.mjs";
4
+ import { ft as deviceSlotKey, m as getProject, pt as deviceSlotPlatforms } from "./config-CNmN-ndb.mjs";
5
+ import { I as readWorkspaceLaunches } from "./project-DIo71tGq.mjs";
6
+ import { o as androidHome, u as androidToolCwd } from "./android-27_JgJ1T.mjs";
7
+ import { d as resolveProjectMetro } from "./metro-Cj6W4qOO.mjs";
8
+ import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-DGLG_VQ3.mjs";
9
+ import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-CANftndU.mjs";
10
+ import { r as deviceConsoleLevel } from "./ios-device-ygijU78G.mjs";
11
11
  import { createHash, randomUUID } from "node:crypto";
12
12
  import { existsSync, readFileSync, renameSync } from "node:fs";
13
13
  import { homedir } from "node:os";
@@ -4,7 +4,7 @@ import { existsSync, rmSync } from "node:fs";
4
4
  import { availableParallelism, loadavg, tmpdir } from "node:os";
5
5
  import { join } from "node:path";
6
6
  import { ambientContext, ambientEnv } from "@stim-cli/core";
7
- import { createDebugLog, redactArgv, redactCommandLine, runId, trace } from "@stim-cli/core/state";
7
+ import { createDebugLog, redactArgv, redactCommandLine, runId, tailscaleEnv, trace } from "@stim-cli/core/state";
8
8
  import { basename as basename$1, delimiter as delimiter$1, join as join$1, resolve as resolve$1 } from "path";
9
9
  import { execSync } from "child_process";
10
10
  import spawn from "cross-spawn";
@@ -597,6 +597,9 @@ function redactError(error, values) {
597
597
  }
598
598
  return error;
599
599
  }
600
+ function tailscaleEnvironment(file, env) {
601
+ return basename$1(file).toLowerCase() === "tailscale" ? tailscaleEnv(env ?? ambientEnv()) : env;
602
+ }
600
603
  const defaultExecutor = {
601
604
  reportSignal: () => reportSignal(ambientContext()),
602
605
  run(cmd, { timeoutMs, killSignal, cwd, env }) {
@@ -649,6 +652,7 @@ const defaultExecutor = {
649
652
  for (const key of omitEnv ?? []) delete childEnv[key];
650
653
  opts.env = childEnv;
651
654
  }
655
+ opts.env = tailscaleEnvironment(file, opts.env);
652
656
  refuseUnsafeBatchArguments(file, args, opts.env, opts.cwd);
653
657
  const result = spawn.sync(file, args, opts);
654
658
  if (result.error) throw redactError(nameTimeout(Object.assign(result.error, result), [file, ...args].join(" "), timeoutMs), redact);
@@ -685,6 +689,7 @@ const defaultExecutor = {
685
689
  for (const key of omitEnv ?? []) delete childEnv[key];
686
690
  opts.env = childEnv;
687
691
  }
692
+ opts.env = tailscaleEnvironment(file, opts.env);
688
693
  refuseUnsafeBatchArguments(file, args, opts.env, opts.cwd);
689
694
  const claims = declareFor ? [...operationState(declareFor).declaring] : [];
690
695
  let clearDeclaration;
@@ -853,6 +858,7 @@ const defaultExecutor = {
853
858
  cwd: opts.cwd ?? context.cwd,
854
859
  env: opts.env ?? context.env
855
860
  } : opts;
861
+ childOpts.env = tailscaleEnvironment(cmd, childOpts.env);
856
862
  if (report && process.platform !== "win32") childOpts.detached = true;
857
863
  refuseUnsafeBatchArguments(cmd, args, childOpts.env ?? ambientEnv(), childOpts.cwd);
858
864
  const claims = report ? [...operationState(context).declaring] : [];
@@ -1,24 +1,24 @@
1
- import { D as ownership_claim_exports, T as process_identity_exports, _ as declareSpawnsOn, d as throwIfCancelled, f as WorkspaceProcessCleanupError, t as getExecutor, w as withDrainingCancellation, x as stopDeclaringSpawnsOn } from "./exec-CGuDzt40.mjs";
2
- import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-BhwAJBgA.mjs";
3
- import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-T3cDctRE.mjs";
4
- import { A as withConfigLockAsync$1, C as removeProject, N as acquireAvdClaim, at as isAbsentPath, ct as measuredDirectorySizeAsync, d as getConfigDir, gt as projectDeviceSlots, it as formatBytes, ot as isOnMountedVolume, rt as directorySizeAsync, st as listMountedVolumes, v as loadConfig$1 } from "./config-BA3TgoIP.mjs";
5
- import { t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
6
- import { $t as TRASH_MANIFEST, Ft as matchWorktreeEntry, Wt as resolveSourceCheckoutAsync, Zt as TRASH_CLAIMS, en as deleteTrashEntry, jt as listWorktreesAsync } from "./settings-Bap-qjnp.mjs";
7
- import { i as findProjectRoot$1, v as detectIsExpo } from "./project-Clk1JAWL.mjs";
8
- import { B as listOrphanedAvdDirectories, Et as readCreatedDevices$1, R as listAvdsAsync, Tt as forgetCreatedDeviceAsync, U as ownedAvdDirectory, bt as parkedMaxSetting, h as avdNameAbsent, mt as POOL_SETTING_REMEDY } from "./android-SJx1V3R3.mjs";
9
- import { Ar as sizeCaches, At as deleteParkedAvds, Bt as unverifiedDeviceCommand, Cr as scopedMemoryReport, Dt as collectDeviceLeases, Et as DEVICE_LIST_TIMEOUT_MS, Ft as deviceSweepIsScoped, Gt as withRemoteSessionGcLocks, Ht as collectEasSessionSweep, It as eraseParkedDevices, Lt as findOrphanedDevices, Mt as deleteProjectDevices, Or as discoverCaches, Ot as collectParkedAvds, Pt as describeUnverifiableDevices, Rt as findStaleDeviceRecords, Sr as reclaimMemory, St as includesGradleVersions, Tr as phase, Tt as collectInventory, Ut as deleteEasSessions, Vt as withAndroidAvdSizes, Wn as runProcessOperation, Wt as describeError, _r as memoryCacheKind, _t as collectGradleVersions, br as memorySweepIsScoped, bt as gradleVersionLines, ct as includesParkedDevices, dt as isWorkspacesScope, fr as parseArchiveSelector, ft as planCacheEmptying, gt as trimCaches, hr as collectMemoryReport, ht as selectsBeyondCaches, it as openGcLog, jt as deleteParkedSims, kt as collectParkedSims, lt as includesRecordings, mt as selectCaches, nn as withEasProjectLock, nt as gcOptionsOf, ot as emptyCaches, pt as previewScopedEmptying, st as includesArchives, ut as includesWorkspaceOutputs, vr as memoryLines, wt as getMachineCacheReport, xr as memoryWorkPending, xt as gradleVersionsPending, yr as memoryScope, yt as deleteGradleVersions, zt as findStaleProjectDevices } from "./device-capacity-CpAVcKgq.mjs";
10
- import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-CXZ4aix0.mjs";
11
- import { At as mapLimited, Dt as createGcResults, Et as GC_OUTPUT, I as idleDeviceLines, M as collectIdleDevices, Mt as sizeConcurrency, N as collectIdleDevicesAsync, R as parseIdleDuration, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, f as rootPresence, g as ARTIFACT_DIRS, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, n as REBUILD_COST, o as collectWorkspaceOutputs, p as sizeText, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, wt as listBuildSlots, z as shutDownIdleDevices } from "./workspaces-Dh5N70qW.mjs";
12
- import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
13
- import { N as listBuildLocks, k as removeExpiredLease } from "./activity-BpdDvA8Q.mjs";
14
- import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-BhfpRfNf.mjs";
1
+ import { D as ownership_claim_exports, T as process_identity_exports, _ as declareSpawnsOn, d as throwIfCancelled, f as WorkspaceProcessCleanupError, t as getExecutor, w as withDrainingCancellation, x as stopDeclaringSpawnsOn } from "./exec-L37dbiIb.mjs";
2
+ import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-CHEN_xzy.mjs";
3
+ import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-DsjhOzJ3.mjs";
4
+ import { A as withConfigLockAsync$1, C as removeProject, N as acquireAvdClaim, at as isAbsentPath, ct as measuredDirectorySizeAsync, d as getConfigDir, gt as projectDeviceSlots, it as formatBytes, ot as isOnMountedVolume, rt as directorySizeAsync, st as listMountedVolumes, v as loadConfig$1 } from "./config-CNmN-ndb.mjs";
5
+ import { t as runOperationFile } from "./operation-exec-DNynwpqO.mjs";
6
+ import { $t as TRASH_MANIFEST, Ft as matchWorktreeEntry, Wt as resolveSourceCheckoutAsync, Zt as TRASH_CLAIMS, en as deleteTrashEntry, jt as listWorktreesAsync } from "./settings-Cz8kQJzr.mjs";
7
+ import { i as findProjectRoot$1, v as detectIsExpo } from "./project-DIo71tGq.mjs";
8
+ import { B as listOrphanedAvdDirectories, Et as readCreatedDevices$1, R as listAvdsAsync, Tt as forgetCreatedDeviceAsync, U as ownedAvdDirectory, bt as parkedMaxSetting, h as avdNameAbsent, mt as POOL_SETTING_REMEDY } from "./android-27_JgJ1T.mjs";
9
+ import { At as collectParkedSims, Bt as findOrphanedDevices, Cr as memorySweepIsScoped, Ct as includesGradleVersions, Dt as DEVICE_LIST_TIMEOUT_MS, Er as scopedMemoryReport, Et as collectInventory, Gt as collectEasSessionSweep, Ht as findStaleProjectDevices, It as describeUnverifiableDevices, Jt as withRemoteSessionGcLocks, Kt as deleteEasSessions, Lt as deviceSweepIsScoped, Mt as deleteParkedSims, Nr as sizeCaches, Nt as deleteProjectDevices, Or as phase, Ot as collectDeviceLeases, Pt as describeDeadProjectDevices, Rt as eraseParkedDevices, Sr as memoryScope, St as gradleVersionsPending, Tr as reclaimMemory, Tt as getMachineCacheReport, Ut as unverifiedDeviceCommand, Vt as findStaleDeviceRecords, Wt as withAndroidAvdSizes, _t as trimCaches, an as withEasProjectLock, br as memoryCacheKind, bt as deleteGradleVersions, ct as includesParkedDevices, dt as isWorkspacesScope, ft as markOverCapCompilationCache, gt as selectsBeyondCaches, hr as parseArchiveSelector, ht as selectCaches, it as openGcLog, jr as discoverCaches, jt as deleteParkedAvds, kt as collectParkedAvds, lt as includesRecordings, mt as previewScopedEmptying, nt as gcOptionsOf, ot as emptyCaches, pt as planCacheEmptying, qn as runProcessOperation, qt as describeError, st as includesArchives, ut as includesWorkspaceOutputs, vr as collectMemoryReport, vt as collectGradleVersions, wr as memoryWorkPending, xr as memoryLines, xt as gradleVersionLines, zt as findDeadProjectOwnedDevices } from "./device-capacity-D_IlxZRL.mjs";
10
+ import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-BDpSdFDM.mjs";
11
+ import { At as eachLimited, B as shutDownIdleDevices, Dt as GC_OUTPUT, L as idleDeviceLines, Mt as readConcurrency, N as collectIdleDevices, Nt as sizeConcurrency, Ot as createGcResults, P as collectIdleDevicesAsync, S as pruneEmptyProcessLockDirs, Tt as listBuildSlots, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, f as rootPresence, g as ARTIFACT_DIRS, i as clearWorkspaceOutputs, jt as mapLimited, n as REBUILD_COST, o as collectWorkspaceOutputs, p as sizeText, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, z as parseIdleDuration } from "./workspaces-BgAYIccE.mjs";
15
12
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
16
- import { r as readCollectors } from "./ownership-C3y8wLSl.mjs";
17
- import { A as deleteSelectedArchives, O as classifyProjectEntries, j as sweepArchiveStaging, k as reclaimProject } from "./worktree-Yw3EW77B.mjs";
18
- import { p as writeCacheFile } from "./warm-progress-DwsGBpph.mjs";
19
- import { a as restoreProblem, o as workspaceKeys } from "./lightened-B6TnpHMX.mjs";
20
- import { C as candidateRootsAsync, D as worktreeRemovalReason, E as worktreePullRequestNote, S as maintenancePinned, T as removeWorktrees, _ as finishedWorkspaces, a as previewMaintenance, b as cachedDeviceActivity, c as deleteTempLeftovers, d as appRoots, f as artifactWorktrees, g as stopIdleWorkspace, h as planIdleStop, l as tempLeftoverLines, m as collectArtifactsAsync, o as triggeringRoot, p as clearArtifact, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, w as collectWorktreeSweep, x as cachedDeviceActivityAsync, y as ownedDeviceUsage } from "./act-CvN9xyV6.mjs";
21
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-pbhaW7_k.mjs";
13
+ import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
14
+ import { N as listBuildLocks, k as removeExpiredLease } from "./activity-CANftndU.mjs";
15
+ import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-DQEzde6f.mjs";
16
+ import { r as readCollectors } from "./ownership-BLgOimfp.mjs";
17
+ import { A as deleteSelectedArchives, O as classifyProjectEntries, j as sweepArchiveStaging, k as reclaimProject } from "./worktree-kGPE9Pcw.mjs";
18
+ import { p as writeCacheFile } from "./warm-progress-D3a0KviW.mjs";
19
+ import { a as restoreProblem, o as workspaceKeys } from "./lightened-KHWHmzGs.mjs";
20
+ import { C as candidateRootsAsync, D as worktreeRemovalReason, E as worktreePullRequestNote, S as maintenancePinned, T as removeWorktrees, _ as finishedWorkspaces, a as previewMaintenance, b as cachedDeviceActivity, c as deleteTempLeftovers, d as appRoots, f as artifactWorktrees, g as stopIdleWorkspace, h as planIdleStop, l as tempLeftoverLines, m as collectArtifactsAsync, o as triggeringRoot, p as clearArtifact, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, w as collectWorktreeSweep, x as cachedDeviceActivityAsync, y as ownedDeviceUsage } from "./act-Bh3t-NuH.mjs";
21
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-CuROXefb.mjs";
22
22
  import { claimRemoveCommand, isClaimRefusal, isClaimUnavailable, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
23
23
  import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from "node:fs";
24
24
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -121,10 +121,6 @@ function archiveWorkPending(selection, otherWork) {
121
121
  //#endregion
122
122
  //#region src/commands/gc/eas-ledger.ts
123
123
  const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
124
- /**
125
- * An entry is dropped only when its id cannot be an EAS session id and its workspace root is provably gone:
126
- * absolute, missing, and on a mounted volume, the same proof gc uses for dead project entries.
127
- */
128
124
  function isStaleEasLedgerEntry(claim, mountedVolumes, exists = existsSync) {
129
125
  if (UUID.test(claim.sessionId)) return false;
130
126
  const root = claim.workspaceRoot;
@@ -238,7 +234,11 @@ function machineCacheLines(report, now = Date.now()) {
238
234
  }
239
235
  //#endregion
240
236
  //#region src/commands/gc/status-caches.ts
241
- const KINDS = ["disk-usage", "pull-request"];
237
+ const KINDS = [
238
+ "disk-usage",
239
+ "pull-request",
240
+ "git-merge"
241
+ ];
242
242
  const KEPT_REASON = {
243
243
  unreadable: "the file records no readable path of its own",
244
244
  unknown: "Stim cannot tell whether the folder it measures still exists",
@@ -1000,7 +1000,7 @@ function orphanedWorkspaceLines(orphaned) {
1000
1000
  const lines = [`Orphaned workspace directories (${orphaned.length}):`];
1001
1001
  for (const entry of orphaned) {
1002
1002
  lines.push(` ${entry.dir}${entry.bytes === void 0 ? "" : ` - ${sizeText(entry.bytes)}`}`);
1003
- lines.push(` recorded project root ${entry.projectRoot} is gone and no registry entry names it`);
1003
+ lines.push(entry.projectRoot === null ? " it is empty and has no workspace.json" : ` ${entry.residue ? "the project root its logs name" : "recorded project root"} ${entry.projectRoot} is gone and no registry entry names it`);
1004
1004
  }
1005
1005
  lines.push(" --delete re-checks each directory, then removes it whole.");
1006
1006
  return lines;
@@ -2296,7 +2296,7 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2296
2296
  const selected = selectCaches(discoverCaches(env, operation?.cwd), scope).filter((c) => !withWorkspaces || !isInsideWorkspaces(c.dir));
2297
2297
  if (selected.length) phase("caches", `measuring ${plural(selected.length, "shared cache")}`, operation);
2298
2298
  const sized = await sizeCaches(selected, operation);
2299
- const caches = scope === null ? previewScopedEmptying(sized, env) : planCacheEmptying(sized, all, env);
2299
+ const caches = scope === null ? markOverCapCompilationCache(previewScopedEmptying(sized, env), env) : planCacheEmptying(sized, all, env);
2300
2300
  if (scope) return {
2301
2301
  archives: includesArchives(scope) ? await collectArchives(scope, olderThan, now, operation?.signal) : void 0,
2302
2302
  skipped: [],
@@ -2446,14 +2446,14 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2446
2446
  const unsweepableReason = cfg === null ? "no Stim config found" : deviceSweepIsScoped(env) ? "STIM_HOME scopes this config, but simulators and AVDs are machine-global" : null;
2447
2447
  phase("devices", "listing simulators and emulators", operation);
2448
2448
  if (unsweepableReason) {
2449
- let simNames = [];
2449
+ let allSims = [];
2450
2450
  let avdNames = [];
2451
2451
  try {
2452
- simNames = (await listAllIosSimsAsync({
2452
+ allSims = await listAllIosSimsAsync({
2453
2453
  timeoutMs: DEVICE_LIST_TIMEOUT_MS,
2454
2454
  operation,
2455
2455
  signal: operation?.signal
2456
- })).map((s) => s.name);
2456
+ });
2457
2457
  } catch (error) {
2458
2458
  if (error instanceof WorkspaceProcessCleanupError) throw error;
2459
2459
  operation?.signal.throwIfAborted();
@@ -2468,7 +2468,14 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2468
2468
  if (error instanceof WorkspaceProcessCleanupError) throw error;
2469
2469
  operation?.signal.throwIfAborted();
2470
2470
  }
2471
- deviceSweepNotices.push(...describeUnverifiableDevices(simNames, avdNames, { reason: unsweepableReason }));
2471
+ const deadOwned = cfg === null ? [] : findDeadProjectOwnedDevices({
2472
+ config: cfg,
2473
+ deadProjects,
2474
+ sims: allSims,
2475
+ avds: avdNames
2476
+ });
2477
+ const deadOwnedIds = new Set(deadOwned.map((device) => device.id));
2478
+ deviceSweepNotices.push(...describeDeadProjectDevices(deadOwned), ...describeUnverifiableDevices(allSims.filter((sim) => !deadOwnedIds.has(sim.udid)).map((sim) => sim.name), avdNames.filter((name) => !deadOwnedIds.has(name)), { reason: unsweepableReason }));
2472
2479
  } else {
2473
2480
  let sims = [];
2474
2481
  let simsChecked = true;
@@ -2891,6 +2898,7 @@ async function pruneDeadProjects(deadProjects, output, operation) {
2891
2898
  }
2892
2899
  const result = await reclaimProject(path, {
2893
2900
  archive: { removedBy: "gc" },
2901
+ deleteOwnedDevices: deviceSweepIsScoped(operation?.env ?? process.env),
2894
2902
  stopRequester: { by: "stim gc --delete" },
2895
2903
  operation
2896
2904
  }).catch((error) => {
@@ -2921,7 +2929,10 @@ async function pruneDeadProjects(deadProjects, output, operation) {
2921
2929
  if (result.killedPid) output.log(chalk.dim(` killed orphaned Metro pid ${result.killedPid}`));
2922
2930
  if (result.stoppedSession) output.log(chalk.dim(` stopped remote session ${result.stoppedSession}`));
2923
2931
  if (result.stoppedTunnel) output.log(chalk.dim(` stopped ${result.stoppedTunnel} tunnel`));
2924
- for (const name of result.deletedDevices) output.record("device", "done", name);
2932
+ for (const name of result.deletedDevices) {
2933
+ output.log(chalk.dim(` deleted owned device ${name}`));
2934
+ output.record("device", "done", name);
2935
+ }
2925
2936
  for (const s of result.skippedDevices) {
2926
2937
  output.log(chalk.yellow(` ${s.name}: ${s.reason}`));
2927
2938
  output.record("device", result.failedDevices.includes(s) ? "failed" : "kept", s.name, {
@@ -2965,7 +2976,7 @@ async function reclaimParkedDevices(report, deps, output) {
2965
2976
  }
2966
2977
  function reportActionable(report) {
2967
2978
  const { deadProjects, invalidProjects, orphanedDevices, staleDevices, staleDeviceRecords, buildLocks, buildSlots, deviceLeases, easSessionSweep, caches, olderThan, all, cacheScope: cache } = report;
2968
- return archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || Boolean(report.worktreeDependencies?.candidates.length) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || Boolean(report.tempLeftovers?.entries.some((entry) => entry.willDelete)) || Boolean(report.trash?.entries.some((entry) => entry.willDelete)) || Boolean(report.worktreeSweep?.worktrees.some((entry) => !entry.skipped)) || report.parkedSims.length > 0 || report.parkedAvds.length + report.parkedHostedDevices.filter((device) => device.listed !== false).length > 0 || orphanedDevices.length > 0 || staleDevices.length + report.finishedDevices.length > 0 || staleDeviceRecords.length > 0 || report.staleLedgerEntries.length + report.staleEasLedgerEntries.length > 0 || report.staleStatusCaches.length > 0 || buildLocks.stale.length > 0 || buildSlots.stale.length > 0 || deviceLeases.expired.length > 0 || easSessionSweep.orphaned.length > 0 || (olderThan !== null || all) && caches.length > 0 || scopedWorkPending(cache, report));
2979
+ return archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || Boolean(report.worktreeDependencies?.candidates.length) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || Boolean(report.tempLeftovers?.entries.some((entry) => entry.willDelete)) || Boolean(report.trash?.entries.some((entry) => entry.willDelete)) || Boolean(report.worktreeSweep?.worktrees.some((entry) => !entry.skipped)) || report.parkedSims.length > 0 || report.parkedAvds.length + report.parkedHostedDevices.filter((device) => device.listed !== false).length > 0 || orphanedDevices.length > 0 || staleDevices.length + report.finishedDevices.length > 0 || staleDeviceRecords.length > 0 || report.staleLedgerEntries.length + report.staleEasLedgerEntries.length > 0 || report.staleStatusCaches.length > 0 || buildLocks.stale.length > 0 || buildSlots.stale.length > 0 || deviceLeases.expired.length > 0 || easSessionSweep.orphaned.length > 0 || (olderThan !== null || all) && caches.length > 0 || caches.some((entry) => entry.willEmpty) || scopedWorkPending(cache, report));
2969
2980
  }
2970
2981
  async function runGcCore(opts, deps, execution, reportOnly = false) {
2971
2982
  const { output, takeResults } = execution;
@@ -3117,6 +3128,10 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
3117
3128
  output.record("buildLock", "done", `${lock.platform} build lock`, { id: lock.path });
3118
3129
  output.log(chalk.green(`Cleared the ${lock.platform} build lock left by pid ${lock.pid ?? "?"} (${lock.projectRoot || "unrecorded workspace"})`));
3119
3130
  }
3131
+ if (report.cacheScope === null) {
3132
+ const emptyLockDirs = pruneEmptyProcessLockDirs();
3133
+ if (emptyLockDirs > 0) output.log(chalk.dim(`Removed ${emptyLockDirs} empty process lock entries`));
3134
+ }
3120
3135
  for (const slot of buildSlots.stale) {
3121
3136
  throwIfCancelled(signal, "GC");
3122
3137
  const cleared = (0, ownership_claim_exports.clearFreeClaimSet)({
@@ -3171,12 +3186,13 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
3171
3186
  throwIfCancelled(signal, "GC");
3172
3187
  if (all) deleteFailures += await emptyCaches(caches, output, signal, deps.operation);
3173
3188
  else if (olderThan === null) {
3174
- if (caches.length) output.log(chalk.dim("Shared caches left alone: pass --cache all to empty them, or --older-than <days> to trim them."));
3175
- } else deleteFailures += (await trimCaches(caches, olderThan, output, signal, deps.operation)).failures;
3189
+ if (caches.some((entry) => !entry.willEmpty)) output.log(chalk.dim("Shared caches left alone: pass --cache all to empty them, or --older-than <days> to trim them."));
3190
+ } else deleteFailures += (await trimCaches(caches.filter((entry) => !entry.willEmpty), olderThan, output, signal, deps.operation)).failures;
3191
+ if (!all) deleteFailures += await emptyCaches(caches.filter((entry) => entry.willEmpty), output, signal, deps.operation);
3176
3192
  return payload(deleteFailures);
3177
3193
  }
3178
3194
  function gcCommand(program) {
3179
- program.command("gc").description("Report what Stim has left behind: dead project entries, orphaned workspace directories, clean Stim-managed linked worktrees whose branch is merged or whose pull request was merged or closed, orphaned owned devices and EAS sessions, records of devices that no longer exist, build locks whose builder is gone, expired physical-device leases, the shared build caches, the build outputs and logs of each workspace, the memory of watchman and of the Gradle and Kotlin daemons, and recognized leftovers in TMPDIR. Reports by default; pass --delete to act.").option("--worktrees", "also remove clean, idle Stim-managed linked worktrees, not only merged ones: with --delete run `stim worktree remove` (never --force) on each; idle means unused for --older-than days, 7 without it").option("--delete", "actually prune the reported entries, reap the reported devices, lighten every workspace that is not building and ran no ios, android or macos command in the last 15 minutes by clearing its build outputs, a running dev server or booted device included, trim its Metro, client and device logs to their newest 8 MiB, and, unless maintenance.mode is off, stop each workspace idle past maintenance.idleStopHours as stim stop does").option("--older-than <days>", "also reap owned devices whose workspace has not been used this long, trim shared cache entries nothing has used in that time and device recordings made before it, and clear workspace build outputs only for workspaces idle this long and parked devices only once parked this long", (v) => {
3195
+ program.command("gc").description("Report what Stim has left behind: dead project entries, orphaned workspace directories, clean Stim-managed linked worktrees whose branch is merged or whose pull request was merged or closed, orphaned owned devices and EAS sessions, records of devices that no longer exist, build locks whose builder is gone, expired physical-device leases, the shared build caches, the build outputs and logs of each workspace, the memory of watchman and of the Gradle and Kotlin daemons, and recognized leftovers in TMPDIR. Reports by default; pass --delete to act.").option("--worktrees", "also remove clean, idle Stim-managed linked worktrees, not only merged ones: with --delete run `stim worktree remove` (never --force) on each; idle means unused for --older-than days, 7 without it").option("--delete", "actually prune the reported entries, reap the reported devices, lighten every workspace that is not building and ran no ios, android or macos command in the last 15 minutes by clearing its build outputs, a running dev server or booted device included, trim its Metro, client and device logs to their newest 8 MiB, and, unless maintenance.mode is off, stop each workspace idle past maintenance.idleStopHours as stim stop does, and shut down the shared watchman daemon (after removing its stale roots) when no client, subscription or trigger uses it").option("--older-than <days>", "also reap owned devices whose workspace has not been used this long, trim shared cache entries nothing has used in that time and device recordings made before it, and clear workspace build outputs only for workspaces idle this long and parked devices only once parked this long", (v) => {
3180
3196
  const n = parseInt(v, 10);
3181
3197
  if (!Number.isFinite(n) || String(n) !== String(v).trim()) throw new InvalidArgumentError("must be a whole number of days, e.g. --older-than 30");
3182
3198
  return n;
@@ -1,3 +1,3 @@
1
- import { Lt as findOrphanedDevices, Nt as describeParkedSims, Pt as describeUnverifiableDevices, Rt as findStaleDeviceRecords, jt as deleteParkedSims, mt as selectCaches, zt as findStaleProjectDevices } from "./device-capacity-CpAVcKgq.mjs";
2
- import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-DiUhrVFo.mjs";
1
+ import { Bt as findOrphanedDevices, Ft as describeParkedSims, Ht as findStaleProjectDevices, It as describeUnverifiableDevices, Mt as deleteParkedSims, Vt as findStaleDeviceRecords, ht as selectCaches } from "./device-capacity-D_IlxZRL.mjs";
2
+ import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-3DHVCn-k.mjs";
3
3
  export { collectGcReport, gcCommand as default, deleteParkedSims, describeParkedSims, describeUnverifiableDevices, executeGc, findOrphanedDevices, findStaleDeviceRecords, findStaleProjectDevices, formatGcReport, readGcReport, runGc, selectCaches, withGcMaintenanceClaim };