stim 1.20.0 → 1.20.2

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 (158) hide show
  1. package/README.md +6 -3
  2. package/dist/{activity-BrGh9EAI.mjs → activity-BSV745Kz.mjs} +4 -4
  3. package/dist/{agent-device-usage-output-DVyv_hWj.mjs → agent-device-usage-output-Dzgv6lgR.mjs} +5 -6
  4. package/dist/{android-Brx6EKvJ.mjs → android-DCKZrNvV.mjs} +37 -38
  5. package/dist/{android-0vv-OruW.mjs → android-Dlzxshgp.mjs} +5 -5
  6. package/dist/{android-CK3fpEyZ.mjs → android-HqP1_vB_.mjs} +3 -3
  7. package/dist/{android-BsYNR81W.mjs → android-Mz_Inn3w.mjs} +12 -12
  8. package/dist/{android-cas-DCAuXryb.mjs → android-cas-Bl-cLJBk.mjs} +4 -4
  9. package/dist/android-cas-compiler.mjs +1 -1
  10. package/dist/{api-zuX3ynYN.mjs → api-qvOzWyfO.mjs} +1 -1
  11. package/dist/api-run.mjs +19 -21
  12. package/dist/api.mjs +1 -1
  13. package/dist/{app-install-0LgaQRT7.mjs → app-install-BIKtMfPq.mjs} +71 -48
  14. package/dist/{artifact-DClXJNWx.mjs → artifact-D3czlUvT.mjs} +13 -13
  15. package/dist/{artifact-CnC0mfov.mjs → artifact-HSwkIWEQ.mjs} +12 -12
  16. package/dist/{browser-web-CzBmhmgs.mjs → browser-web-CA-F1GQo.mjs} +18 -18
  17. package/dist/{budget-BONq9vXY.mjs → budget-f7516Zk0.mjs} +23 -26
  18. package/dist/{build-BixRI6sB.mjs → build-DYDbfkk5.mjs} +28 -33
  19. package/dist/{build-plan-CP0tckNU.mjs → build-plan-B7SZsc2N.mjs} +17 -17
  20. package/dist/{cache-manifest-qA3dT2x2.mjs → cache-manifest-XH-fvDUj.mjs} +10 -5
  21. package/dist/cache-manifest.mjs +1 -1
  22. package/dist/cancellation-C_22VQTH.mjs +24 -0
  23. package/dist/{ccache-CjHQ5F8g.mjs → ccache-zdKiYQ3E.mjs} +7 -7
  24. package/dist/{chrome-Dp2lMLBe.mjs → chrome-BnzZMqsR.mjs} +1 -1
  25. package/dist/{cli-B2R8wH1F.mjs → cli-CLP3diBm.mjs} +20 -20
  26. package/dist/cli.mjs +1 -1
  27. package/dist/{client-BLy1Pw2V.mjs → client-qQAaXSUs.mjs} +21 -29
  28. package/dist/collector-run.d.mts +7 -6
  29. package/dist/collector-run.mjs +6 -7
  30. package/dist/{command-output-BjPN99ZB.mjs → command-output-BTy8hZ0F.mjs} +1 -1
  31. package/dist/{config-D0LhTY3S.mjs → config-BYDxlMY3.mjs} +43 -5
  32. package/dist/{created-devices-HU_DAb_Q.mjs → created-devices-Dzd5C2LF.mjs} +2 -2
  33. package/dist/{dependency-state-B2m8eqsS.mjs → dependency-state-DG0p31-y.mjs} +2 -2
  34. package/dist/{detached-entry-BXq4fIl-.mjs → detached-entry-B9C_zeQC.mjs} +1 -1
  35. package/dist/{dev-client-ClATaJoH.mjs → dev-client-DAWVIGBu.mjs} +2 -2
  36. package/dist/{device-DVCwAFlX.mjs → device-BECOiufl.mjs} +13 -14
  37. package/dist/{device-B7lsC0K1.mjs → device-DuiPJQSn.mjs} +8 -8
  38. package/dist/{device-capacity-Ca_ke1LE.mjs → device-capacity-CBUAcRyQ.mjs} +10 -11
  39. package/dist/device-host-worker.mjs +16 -17
  40. package/dist/{device-ios-CRUqPxKw.mjs → device-ios-COSi6oS1.mjs} +12 -15
  41. package/dist/{device-lease-DHOBXGgS.mjs → device-lease-BX1sJQ2E.mjs} +15 -18
  42. package/dist/{device-lease-run-CvDeHTkG.mjs → device-lease-run-Cw2M4z51.mjs} +4 -4
  43. package/dist/{device-pool-L2-5GxMy.mjs → device-pool-Bf-pOhSw.mjs} +3 -3
  44. package/dist/{device-remote-Bmg42063.mjs → device-remote-xRT0Vmo9.mjs} +14 -14
  45. package/dist/{doctor-C2MSuMMg.mjs → doctor-CB8oZKCk.mjs} +13 -13
  46. package/dist/{doctor-DPAqhVCK.mjs → doctor-kfMBnUw6.mjs} +78 -69
  47. package/dist/{doctor-watchman-CB4NnVZm.mjs → doctor-watchman-BRyV2adA.mjs} +9 -10
  48. package/dist/{eas-build-Dw_ec2Km.mjs → eas-build-JyfqyHfC.mjs} +5 -5
  49. package/dist/{eas-session-ledger-DZlC-Fq3.mjs → eas-session-ledger-Cm0Gwq2F.mjs} +6 -4
  50. package/dist/{error-diagnostics-Du7I_GuY.mjs → error-diagnostics-BR677IDM.mjs} +10 -10
  51. package/dist/{exec-B81Qodjn.mjs → exec-DqKo9GKJ.mjs} +22 -8
  52. package/dist/{gc-PWp34zGb.mjs → gc-qWOMdnER.mjs} +75 -24
  53. package/dist/git-DDfFzkMm.mjs +45 -0
  54. package/dist/{gradle-C2OEKCCI.mjs → gradle-DSrXb6lG.mjs} +6 -6
  55. package/dist/{guide-Dai9lphv.mjs → guide-G9cAbVAc.mjs} +81 -178
  56. package/dist/{hosted-android-DQ-Agsd8.mjs → hosted-android-C3MHGld1.mjs} +3 -3
  57. package/dist/{hosted-client-Io01s5By.mjs → hosted-client-ZEKpS9vw.mjs} +19 -11
  58. package/dist/{hosted-ios-DIxFnYp-.mjs → hosted-ios-l-o3iM9J.mjs} +1 -1
  59. package/dist/{hosted-logs-DP-ABU_M.mjs → hosted-logs-EzQM7-3Z.mjs} +7 -7
  60. package/dist/{hosted-macos-Aziw9T_9.mjs → hosted-macos-BACVAVqE.mjs} +10 -8
  61. package/dist/{hosted-native-BdAQi21M.mjs → hosted-native-A4s1QPXe.mjs} +13 -11
  62. package/dist/{idle-shutdown-DdMqoSUB.mjs → idle-shutdown-DtxhPTKe.mjs} +7 -7
  63. package/dist/{ios-BZ9dg2Fr.mjs → ios-BwVCF7oA.mjs} +8 -8
  64. package/dist/{ios-CZuv6gRv.mjs → ios-Ce7bc7br.mjs} +29 -29
  65. package/dist/{ios-CXLIUxXJ.mjs → ios-RkW4pnQf.mjs} +21 -17
  66. package/dist/{ios-device-B1B14xND.mjs → ios-device-B5veSDDQ.mjs} +1 -1
  67. package/dist/{ios-device-BreZOpM0.mjs → ios-device-D7pi2Sca.mjs} +14 -14
  68. package/dist/{ios-VGvNdsv2.mjs → ios-nOLJGVdy.mjs} +1 -1
  69. package/dist/{ios-project-B9drt_aY.mjs → ios-project-K9hY_Jab.mjs} +8 -8
  70. package/dist/{ios-state-CjrL2qv-.mjs → ios-state-CBLe1xYw.mjs} +1 -1
  71. package/dist/{js-swap-C8icNYIY.mjs → js-swap-Bb3nsS07.mjs} +13 -13
  72. package/dist/{launch-YrbqaIFj.mjs → launch-C3qJ6Agb.mjs} +46 -45
  73. package/dist/{launch-DxH0THLP.mjs → launch-F4sOqAhB.mjs} +21 -21
  74. package/dist/{launch-verify-BzRdbuO1.mjs → launch-verify-B6Q8hZP-.mjs} +11 -11
  75. package/dist/{logs-DHaRNfg7.mjs → logs-BGrEUaEs.mjs} +10 -11
  76. package/dist/{macos-V_3Ui7g4.mjs → macos-Ch5VJmcS.mjs} +40 -24
  77. package/dist/macos-D7uDvO-z.mjs +2 -0
  78. package/dist/macos-run.mjs +1 -1
  79. package/dist/maintenance-run.mjs +7 -7
  80. package/dist/{metro-D_j9sN-B.mjs → metro-DnCEjCxs.mjs} +8 -9
  81. package/dist/{metro-gateway-BBJldOdi.mjs → metro-gateway-CX9Xlkq2.mjs} +3 -3
  82. package/dist/{miss-reason-BPAzZS0r.mjs → miss-reason-mKzZ4VvN.mjs} +3 -3
  83. package/dist/{named-ports-C2lvoPsb.mjs → named-ports-4WopRPg-.mjs} +4 -5
  84. package/dist/{native-android-lHzaew7r.mjs → native-android-D5qc3-_v.mjs} +10 -10
  85. package/dist/{native-gradle-inputs-BQnIdAlL.mjs → native-gradle-inputs-BsLRrl7u.mjs} +3 -10
  86. package/dist/{native-runtime-BRmWL7ru.mjs → native-runtime-k8dTIrbK.mjs} +7 -8
  87. package/dist/{native-xcode-inputs-eutS19jU.mjs → native-xcode-inputs-CykopJdM.mjs} +7 -9
  88. package/dist/{native-xcode-ios-DP3cHLwu.mjs → native-xcode-ios-Bbf30Gm0.mjs} +15 -15
  89. package/dist/offload-worker.mjs +34 -38
  90. package/dist/{ownership-DXzMMSx6.mjs → ownership-DCtw_2IA.mjs} +3 -3
  91. package/dist/{page-Bv9s2KwY.mjs → page-DRHy329N.mjs} +1 -1
  92. package/dist/{placement-log-reFbjqEr.mjs → placement-log-MOfPVgaM.mjs} +1 -1
  93. package/dist/{plan-BDk2AeY_.mjs → plan-C4TjdPsR.mjs} +10 -10
  94. package/dist/{plan-placement-D_YYlE6N.mjs → plan-placement-V0TdzYXp.mjs} +3 -3
  95. package/dist/{ports-jzvAJXXL.mjs → ports-DdSUicVo.mjs} +3 -3
  96. package/dist/{prebuild-Bw44QxVh.mjs → prebuild-DYbucPXy.mjs} +7 -8
  97. package/dist/{preview-BaBJ72Al.mjs → preview-78a9kR_-.mjs} +31 -24
  98. package/dist/{project-B8_duAzW.mjs → project-_phNIJfs.mjs} +110 -47
  99. package/dist/{pull-request-vOhLNmIb.mjs → pull-request-CQ8sPbZa.mjs} +5 -18
  100. package/dist/pull-requests.mjs +1 -1
  101. package/dist/{react-native-android-chm1DMlA.mjs → react-native-android-CM1XRDwv.mjs} +34 -30
  102. package/dist/{react-native-build-oAw6gQeW.mjs → react-native-build-CtCccJtb.mjs} +6 -6
  103. package/dist/{react-native-doctor-DYXoh-6I.mjs → react-native-doctor-CfRnFfjs.mjs} +5 -5
  104. package/dist/{react-native-ios-SCTK_CT5.mjs → react-native-ios-Dhq_eiYQ.mjs} +14 -14
  105. package/dist/{recordings-Bk-VivUV.mjs → recordings-D0d5aQt0.mjs} +1 -1
  106. package/dist/{reload-D34GkY78.mjs → reload-C8JhxjSh.mjs} +17 -17
  107. package/dist/{remote-BU9UyhCJ.mjs → remote-BiR6aYjy.mjs} +7 -7
  108. package/dist/{remote-cache-Bsts6f6Y.mjs → remote-cache-OyOyVIS3.mjs} +4 -4
  109. package/dist/{result-BDoRk1k3.mjs → result-CaJg5Iat.mjs} +8 -8
  110. package/dist/{run-qvff78hv.mjs → run-BtPgpKks.mjs} +3 -3
  111. package/dist/{server-bare-dWjAarki.mjs → server-bare-R2m_gsH8.mjs} +3 -3
  112. package/dist/{server-command-7XIKlWtO.mjs → server-command-CTtCkmcQ.mjs} +5 -5
  113. package/dist/server-expo-Bigriskl.mjs +2 -0
  114. package/dist/{server-expo-CsYu2aKL.mjs → server-expo-DsguMGUF.mjs} +5 -10
  115. package/dist/{settings-Bbztm4oV.mjs → settings-B717odTD.mjs} +74 -115
  116. package/dist/{settings-CT3E71-i.mjs → settings-BORNaaCO.mjs} +5 -5
  117. package/dist/settings.schema.json +1 -1
  118. package/dist/{simslim-ChMfe8rg.mjs → simslim-CCr3rE-A.mjs} +2 -3
  119. package/dist/{slot-launch-B9hn96wd.mjs → slot-launch-DPt0m9Nd.mjs} +6 -6
  120. package/dist/{spawn-claims-Kqiifsk2.mjs → spawn-claims-DVS5RkMS.mjs} +1 -1
  121. package/dist/{stage-BNKKdDNc.mjs → stage-KNTQopqv.mjs} +9 -9
  122. package/dist/{start-CdvcTaXr.mjs → start-BWqzODpb.mjs} +19 -20
  123. package/dist/{start-CbQCSnXQ.mjs → start-TXeMmmO2.mjs} +1 -1
  124. package/dist/{state-Boo0IMJq.mjs → state-CG_OFoaA.mjs} +2 -2
  125. package/dist/{state-DI84A-uu.mjs → state-D1Icyjlu.mjs} +8 -7
  126. package/dist/{stats-BIIDrjA8.mjs → stats-BoY5sEPU.mjs} +5 -5
  127. package/dist/{status-BDGHwkCs.mjs → status-BTA7kKiQ.mjs} +1 -1
  128. package/dist/{status-DARMkc9q.mjs → status-WgFbkRzj.mjs} +30 -47
  129. package/dist/{status-watch-DvmI3SmN.mjs → status-watch-C23ILtf9.mjs} +4 -4
  130. package/dist/{stim-desktop-8GQX2OV8.mjs → stim-desktop-BzBN2Em2.mjs} +1 -1
  131. package/dist/{stop-iNemHsJC.mjs → stop-BNmBMi1F.mjs} +18 -19
  132. package/dist/{stop-WQPQHLuy.mjs → stop-DPEhunlw.mjs} +6 -6
  133. package/dist/{stop-CCZS-C9m.mjs → stop-DR6VoDIk.mjs} +2 -2
  134. package/dist/supervisor-run.mjs +16 -17
  135. package/dist/{support-DCco5fut.mjs → support-CwjbFs9H.mjs} +9 -9
  136. package/dist/{support-CnE_SIjt.mjs → support-DMTqj3Hm.mjs} +6 -6
  137. package/dist/{swiftpm-macos-afeNUExW.mjs → swiftpm-macos-DRNVJWlb.mjs} +9 -9
  138. package/dist/{tailnet-CoJUb2tB.mjs → tailnet-Dh-qiYzG.mjs} +5 -5
  139. package/dist/toolchain-BFkAcstd.mjs +2 -0
  140. package/dist/{toolchain-DqyDXs30.mjs → toolchain-DxSsNssu.mjs} +10 -10
  141. package/dist/trigger-9_USgmxz.mjs +2 -0
  142. package/dist/{trigger-C0MWBi8O.mjs → trigger-CigAYjeL.mjs} +2 -2
  143. package/dist/{warm-progress-C3ASD6z5.mjs → warm-progress-BuY-Fvfn.mjs} +43 -61
  144. package/dist/{watchman-CQl51YZu.mjs → watchman-CPQFZLXY.mjs} +6 -6
  145. package/dist/{web-B3eldHFH.mjs → web-BDBMxDpx.mjs} +9 -9
  146. package/dist/web-Dq-i3wzJ.mjs +2 -0
  147. package/dist/web-run.mjs +14 -14
  148. package/dist/{workspace-state-CSIFuuDa.mjs → workspace-state-DJt_MMvf.mjs} +16 -6
  149. package/dist/{workspaces-D2xSHBDY.mjs → workspaces-C36s2jb9.mjs} +15 -16
  150. package/dist/{worktree-BxDqaTev.mjs → worktree-CgvJYJ-Q.mjs} +96 -89
  151. package/dist/{worktree-q7_OZNY0.mjs → worktree-DpLdCHga.mjs} +1 -1
  152. package/package.json +6 -7
  153. package/dist/macos-C0iljhsN.mjs +0 -2
  154. package/dist/process-identity-Biv3arCO.mjs +0 -40
  155. package/dist/server-expo-DV43vep4.mjs +0 -2
  156. package/dist/toolchain-BIupIro1.mjs +0 -2
  157. package/dist/trigger-SHLOWJ4O.mjs +0 -2
  158. package/dist/web-BLXpOe6b.mjs +0 -2
@@ -1,24 +1,23 @@
1
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
- import { t as getExecutor } from "./exec-B81Qodjn.mjs";
3
- import { A as directorySize, D as withConfigLock$1, F as volumeRootFor, H as projectDeviceSlots, M as isOnMountedVolume, N as listMountedVolumes, S as removeProject, _ as loadConfig$1, j as formatBytes, k as acquireAvdClaim } from "./config-D0LhTY3S.mjs";
4
- import { d as removeExpiredLease, h as listBuildLocks } from "./device-lease-DHOBXGgS.mjs";
5
- import { D as withDirLock$1, E as workspaceStateFile, s as workspaceLastUsed, x as workspaceDir } from "./workspace-state-CSIFuuDa.mjs";
6
- import { h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-BjPN99ZB.mjs";
7
- import { _ as detectIsExpo, r as findProjectRoot } from "./project-B8_duAzW.mjs";
8
- import { A as listAvds, H as parseAvdSystemImage, I as ownedAvdDirectory, M as listOrphanedAvdDirectories, V as parseAvdDeviceProfile, _ as avdStorageRoots, at as POOL_SETTING_REMEDY, d as androidToolPath, dt as parkedMaxSetting, ft as readParked, it as isStimOwnedSim, j as listInstalledSystemImages, m as avdNameAbsent, o as androidHome, p as avdIniPaths, rt as isStimOwnedAvd } from "./android-BsYNR81W.mjs";
9
- import { n as readCreatedDevices$1, t as forgetCreatedDevice } from "./created-devices-HU_DAb_Q.mjs";
10
- import { C as recordGcResult, I as listBuildSlots, T as canonicalPath, a as collectWorkspaceOutputs, c as listWorkspaceDirs, f as withIdleWorkspace, i as collectOrphanedWorkspaces, l as rootPresence, n as WORKSPACE_OUTPUT_DIRS, o as deleteOrphanedWorkspaces, p as workspaceInUse, r as clearWorkspaceOutputs, s as isInsideWorkspaces, t as REBUILD_COST, u as sizeText, w as takeGcResults } from "./workspaces-D2xSHBDY.mjs";
11
- import { $ as memoryWorkPending, A as findStaleProjectDevices, B as previewScopedEmptying, C as deleteProjectDevices, D as eraseParkedDevices, E as deviceSweepIsScoped, F as includesParkedDevices, H as selectsBeyondCaches, I as includesRecordings, L as includesWorkspaceOutputs, M as withAndroidAvdSizes, N as emptyCaches, O as findOrphanedDevices, P as includesArchives, Q as memorySweepIsScoped, R as isWorkspacesScope, S as deleteParkedSims, T as describeUnverifiableDevices, U as trimCaches, V as selectCaches, W as parseArchiveSelector, X as memoryLines, Y as memoryCacheKind, Z as memoryScope, _ as DEVICE_LIST_TIMEOUT_MS, at as discoverCaches, b as collectParkedSims, d as collectIdleDevices, et as reclaimMemory, h as shutDownIdleDevices, j as unverifiedDeviceCommand, k as findStaleDeviceRecords, m as parseIdleDuration, nt as phase, p as idleDeviceLines, q as collectMemoryReport, st as sizeCaches, tt as scopedMemoryReport, v as collectDeviceLeases, w as describeParkedSims, x as deleteParkedAvds, y as collectParkedAvds, z as planCacheEmptying } from "./budget-BONq9vXY.mjs";
12
- import { f as resolveEasCliBin } from "./remote-cache-Bsts6f6Y.mjs";
13
- import { d as listAllIosSims } from "./ios-CXLIUxXJ.mjs";
14
- import { C as parseSessionListPage, T as verifyStoppedSession, _ as findOrphanedOwnedSessions, b as isDefinitiveMissingSessionError, d as withRemoteSessionLock, f as withEasProjectLock, v as getSessionArgs, w as stopSessionArgs, x as listOwnedSessionsArgs, y as inspectSessionForTeardown } from "./device-remote-Bmg42063.mjs";
15
- import { a as removeEasSessionClaim, n as easMachineStateRoot$1, r as readEasSessionLedger$1 } from "./eas-session-ledger-DZlC-Fq3.mjs";
16
- import { r as readCollectors } from "./ownership-DXzMMSx6.mjs";
17
- import { c as removeWorktrees, l as worktreePullRequestNote, n as previewMaintenance, s as collectWorktreeSweep, u as worktreeRemovalReason } from "./preview-BaBJ72Al.mjs";
18
- import { _ as reclaimProject, g as describeDereferenced, v as deleteSelectedArchives, y as sweepArchiveStaging } from "./worktree-BxDqaTev.mjs";
19
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-DVyv_hWj.mjs";
1
+ import { A as acquireAvdClaim, D as withConfigLock$1, F as listMountedVolumes, L as volumeRootFor, M as directorySize, N as formatBytes, P as isOnMountedVolume, S as removeProject, W as projectDeviceSlots, _ as loadConfig$1, j as ownership_claim_exports, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
2
+ import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
3
+ import { d as removeExpiredLease, h as listBuildLocks } from "./device-lease-BX1sJQ2E.mjs";
4
+ import { D as withDirLock$1, E as workspaceStateFile, s as workspaceLastUsed, x as workspaceDir } from "./workspace-state-DJt_MMvf.mjs";
5
+ import { h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-BTy8hZ0F.mjs";
6
+ import { _ as detectIsExpo, r as findProjectRoot } from "./project-_phNIJfs.mjs";
7
+ import { A as listAvds, H as parseAvdSystemImage, I as ownedAvdDirectory, M as listOrphanedAvdDirectories, V as parseAvdDeviceProfile, _ as avdStorageRoots, at as POOL_SETTING_REMEDY, d as androidToolPath, dt as parkedMaxSetting, ft as readParked, it as isStimOwnedSim, j as listInstalledSystemImages, m as avdNameAbsent, o as androidHome, p as avdIniPaths, rt as isStimOwnedAvd } from "./android-Mz_Inn3w.mjs";
8
+ import { n as readCreatedDevices$1, t as forgetCreatedDevice } from "./created-devices-Dzd5C2LF.mjs";
9
+ import { C as recordGcResult, I as listBuildSlots, T as canonicalPath, a as collectWorkspaceOutputs, c as listWorkspaceDirs, f as withIdleWorkspace, i as collectOrphanedWorkspaces, l as rootPresence, n as WORKSPACE_OUTPUT_DIRS, o as deleteOrphanedWorkspaces, p as workspaceInUse, r as clearWorkspaceOutputs, s as isInsideWorkspaces, t as REBUILD_COST, u as sizeText, w as takeGcResults } from "./workspaces-C36s2jb9.mjs";
10
+ import { $ as memoryWorkPending, A as findStaleProjectDevices, B as previewScopedEmptying, C as deleteProjectDevices, D as eraseParkedDevices, E as deviceSweepIsScoped, F as includesParkedDevices, H as selectsBeyondCaches, I as includesRecordings, L as includesWorkspaceOutputs, M as withAndroidAvdSizes, N as emptyCaches, O as findOrphanedDevices, P as includesArchives, Q as memorySweepIsScoped, R as isWorkspacesScope, S as deleteParkedSims, T as describeUnverifiableDevices, U as trimCaches, V as selectCaches, W as parseArchiveSelector, X as memoryLines, Y as memoryCacheKind, Z as memoryScope, _ as DEVICE_LIST_TIMEOUT_MS, at as discoverCaches, b as collectParkedSims, d as collectIdleDevices, et as reclaimMemory, h as shutDownIdleDevices, j as unverifiedDeviceCommand, k as findStaleDeviceRecords, m as parseIdleDuration, nt as phase, p as idleDeviceLines, q as collectMemoryReport, st as sizeCaches, tt as scopedMemoryReport, v as collectDeviceLeases, w as describeParkedSims, x as deleteParkedAvds, y as collectParkedAvds, z as planCacheEmptying } from "./budget-f7516Zk0.mjs";
11
+ import { f as resolveEasCliBin } from "./remote-cache-OyOyVIS3.mjs";
12
+ import { d as listAllIosSims } from "./ios-RkW4pnQf.mjs";
13
+ import { C as parseSessionListPage, T as verifyStoppedSession, _ as findOrphanedOwnedSessions, b as isDefinitiveMissingSessionError, d as withRemoteSessionLock, f as withEasProjectLock, v as getSessionArgs, w as stopSessionArgs, x as listOwnedSessionsArgs, y as inspectSessionForTeardown } from "./device-remote-xRT0Vmo9.mjs";
14
+ import { a as removeEasSessionClaim, n as easMachineStateRoot$1, r as readEasSessionLedger$1 } from "./eas-session-ledger-Cm0Gwq2F.mjs";
15
+ import { r as readCollectors } from "./ownership-DCtw_2IA.mjs";
16
+ import { c as removeWorktrees, l as worktreePullRequestNote, n as previewMaintenance, s as collectWorktreeSweep, u as worktreeRemovalReason } from "./preview-78a9kR_-.mjs";
17
+ import { _ as reclaimProject, g as describeDereferenced, v as deleteSelectedArchives, y as sweepArchiveStaging } from "./worktree-CgvJYJ-Q.mjs";
18
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-Dzgv6lgR.mjs";
20
19
  import { existsSync, lstatSync, readFileSync, readdirSync, rmSync, statSync } from "node:fs";
21
- import { basename, dirname, join } from "node:path";
20
+ import { basename, dirname, isAbsolute, join } from "node:path";
22
21
  import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1 } from "path";
23
22
  import { assertHostedDeviceLedger, deviceHostArea, deviceHostRoot, hostedDeviceId, isJsonObject, listRecordedDevices, listStatusCacheEntries, maintenanceRunClaims, parseHostedPlatformDevice, readArchives, readHostedDevice, readHostedDeviceLedger, readHostedSessions, recordedBytes } from "@stim-cli/core/state";
24
23
  import { fileURLToPath } from "node:url";
@@ -529,6 +528,40 @@ async function deleteEasSessions(easSessionSweep, deps) {
529
528
  return deleteFailures;
530
529
  }
531
530
  //#endregion
531
+ //#region src/commands/gc/eas-ledger.ts
532
+ const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
533
+ /**
534
+ * An entry is dropped only when its id cannot be an EAS session id and its workspace root is provably gone:
535
+ * absolute, missing, and on a mounted volume, the same proof gc uses for dead project entries.
536
+ */
537
+ function isStaleEasLedgerEntry(claim, mountedVolumes, exists = existsSync) {
538
+ if (UUID.test(claim.sessionId)) return false;
539
+ const root = claim.workspaceRoot;
540
+ if (!isAbsolute(root) || exists(root)) return false;
541
+ return isOnMountedVolume(root, mountedVolumes);
542
+ }
543
+ function findStaleEasLedgerEntries(mountedVolumes, deps = {}) {
544
+ const ledger = readEasSessionLedger$1(deps.easLedgerRoot ?? easMachineStateRoot$1());
545
+ if (!ledger.safe) return [];
546
+ return [...ledger.claims.values()].filter((claim) => isStaleEasLedgerEntry(claim, mountedVolumes)).map(({ sessionId, workspaceRoot }) => ({
547
+ id: sessionId,
548
+ workspaceRoot
549
+ }));
550
+ }
551
+ function forgetStaleEasLedgerEntries(entries, mountedVolumes, deps = {}) {
552
+ let failures = 0;
553
+ const root = deps.easLedgerRoot ?? easMachineStateRoot$1();
554
+ const remove = deps.removeEasSessionClaim ?? removeEasSessionClaim;
555
+ for (const entry of entries) try {
556
+ if (remove(entry.id, root, (claim) => isStaleEasLedgerEntry(claim, mountedVolumes))) console.log(chalk.green(`Forgot the EAS ledger entry ${entry.id} (invalid id, ${entry.workspaceRoot} is gone)`));
557
+ else console.log(chalk.dim(`Kept the EAS ledger entry ${entry.id}: it changed since the report.`));
558
+ } catch (error) {
559
+ failures++;
560
+ console.log(chalk.red(`Could not forget the EAS ledger entry ${entry.id}: ${describeError(error)}`));
561
+ }
562
+ return failures;
563
+ }
564
+ //#endregion
532
565
  //#region src/commands/gc/status-caches.ts
533
566
  const KINDS = ["disk-usage", "pull-request"];
534
567
  const KEPT_REASON = {
@@ -809,7 +842,15 @@ function maintenanceReportLines(maintenance) {
809
842
  }
810
843
  return lines;
811
844
  }
812
- function formatGcReport({ maintenance, archives, skipped = [], deadProjects = [], orphanedPorts, invalidProjects = [], orphanedWorkspaces = [], parkedSims = [], parkedAvds = [], parkedHostedDevices, orphanedDevices = [], unverifiedDevices = [], staleDevices = [], staleDeviceRecords = [], staleLedgerEntries = [], staleStatusCaches = [], buildLocks = {
845
+ function staleEasLedgerLines(entries = []) {
846
+ if (!entries.length) return [];
847
+ return [
848
+ `Stale EAS ledger entries (${entries.length}) - the id is not a valid EAS session id and the workspace is gone:`,
849
+ ...entries.map((entry) => ` ${entry.id} (workspace ${entry.workspaceRoot})`),
850
+ " --delete forgets the LEDGER ENTRY only; no EAS session is contacted."
851
+ ];
852
+ }
853
+ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = [], orphanedPorts, invalidProjects = [], orphanedWorkspaces = [], parkedSims = [], parkedAvds = [], parkedHostedDevices, orphanedDevices = [], unverifiedDevices = [], staleDevices = [], staleDeviceRecords = [], staleLedgerEntries = [], staleEasLedgerEntries, staleStatusCaches = [], buildLocks = {
813
854
  stale: [],
814
855
  live: [],
815
856
  unresolved: []
@@ -828,6 +869,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
828
869
  }, agentDeviceUsage = null, swiftpmCacheUsage, caches = [], workspaceOutputs = null, workspaceLogs = [], recordings = [], worktreeSweep = null, memory, cacheScope = null, olderThan = null }, { now = Date.now() } = {}) {
829
870
  const lines = archiveLines(archives);
830
871
  const parkedHostedLines = formatParkedHostedDeviceReport(parkedHostedDevices, now);
872
+ const easLedgerLines = staleEasLedgerLines(staleEasLedgerEntries);
831
873
  const staleLocks = buildLocks?.stale ?? [];
832
874
  const liveLocks = buildLocks?.live ?? [];
833
875
  const staleSlots = buildSlots?.stale ?? [];
@@ -844,6 +886,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
844
886
  staleDevices,
845
887
  staleDeviceRecords,
846
888
  staleLedgerEntries,
889
+ easLedgerLines,
847
890
  staleStatusCaches,
848
891
  staleLocks,
849
892
  staleSlots,
@@ -901,6 +944,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
901
944
  for (const entry of staleLedgerEntries) lines.push(` ${entry.kind} ${entry.id} is not on this machine`);
902
945
  lines.push(" --delete forgets the LEDGER ENTRY only; there is no device left to touch.");
903
946
  }
947
+ lines.push(...easLedgerLines);
904
948
  lines.push(...statusCacheLines(staleStatusCaches));
905
949
  if (easSessionSweep.orphaned.length) {
906
950
  lines.push(`Orphaned EAS sessions (${easSessionSweep.orphaned.length}) - current EAS project only:`);
@@ -1083,7 +1127,7 @@ function jsonPullRequest(lookup) {
1083
1127
  containsHead: pr.containsHead
1084
1128
  } : null;
1085
1129
  }
1086
- function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedPorts = [], invalidProjects = [], orphanedWorkspaces = [], worktreeSweep = null, parkedSims = [], parkedAvds = [], parkedHostedDevices = [], orphanedDevices = [], unverifiedDevices = [], staleDevices = [], staleDeviceRecords = [], staleLedgerEntries = [], staleStatusCaches = [], buildLocks = {
1130
+ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedPorts = [], invalidProjects = [], orphanedWorkspaces = [], worktreeSweep = null, parkedSims = [], parkedAvds = [], parkedHostedDevices = [], orphanedDevices = [], unverifiedDevices = [], staleDevices = [], staleDeviceRecords = [], staleLedgerEntries = [], staleEasLedgerEntries = [], staleStatusCaches = [], buildLocks = {
1087
1131
  stale: [],
1088
1132
  live: [],
1089
1133
  unresolved: []
@@ -1180,6 +1224,10 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
1180
1224
  kind,
1181
1225
  id
1182
1226
  })),
1227
+ staleEasLedgerEntries: staleEasLedgerEntries.map(({ id, workspaceRoot }) => ({
1228
+ id,
1229
+ workspaceRoot
1230
+ })),
1183
1231
  staleStatusCaches: staleStatusCaches.map(({ kind, path, file, bytes }) => ({
1184
1232
  kind,
1185
1233
  path,
@@ -1526,7 +1574,7 @@ function parseSimRuntimeList(jsonOutput) {
1526
1574
  if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("Expected simctl runtime list to return a JSON object.");
1527
1575
  const runtimes = [];
1528
1576
  for (const [key, value] of Object.entries(parsed)) {
1529
- if (value === null || typeof value !== "object" || Array.isArray(value)) continue;
1577
+ if (!isJsonObject(value)) continue;
1530
1578
  const entry = value;
1531
1579
  if (entry.platformIdentifier !== IOS_SIMULATOR_PLATFORM) continue;
1532
1580
  runtimes.push({
@@ -2103,6 +2151,7 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2103
2151
  staleDevices: [],
2104
2152
  staleDeviceRecords: [],
2105
2153
  staleLedgerEntries: [],
2154
+ staleEasLedgerEntries: [],
2106
2155
  staleStatusCaches: [],
2107
2156
  buildLocks: {
2108
2157
  stale: [],
@@ -2304,6 +2353,7 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2304
2353
  staleDevices,
2305
2354
  staleDeviceRecords,
2306
2355
  staleLedgerEntries,
2356
+ staleEasLedgerEntries: findStaleEasLedgerEntries(mountedVolumes, deps),
2307
2357
  staleStatusCaches: statusCaches.stale,
2308
2358
  buildLocks: {
2309
2359
  stale: locks.filter((l) => !l.alive && !l.unresolved),
@@ -2588,7 +2638,7 @@ async function runGcCore(opts, deps) {
2588
2638
  const all = report.all;
2589
2639
  for (const line of formatGcReport(report)) console.log(line);
2590
2640
  const { deadProjects, invalidProjects, orphanedDevices, staleDevices, staleDeviceRecords, buildLocks, buildSlots, deviceLeases, easSessionSweep, caches } = report;
2591
- const actionable = archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || 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 > 0 || staleDeviceRecords.length > 0 || report.staleLedgerEntries.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 || memoryWorkPending(cache, report.memory));
2641
+ const actionable = archiveWorkPending(report.archives, deadProjects.length + invalidProjects.length > 0 || report.orphanedWorkspaces.length > 0 || Boolean(report.workspaceOutputs?.workspaces.some((entry) => entry.willClear)) || report.workspaceLogs.some((entry) => entry.willTrim) || report.recordings.some((entry) => entry.willDelete && !entry.withWorkspace) || 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 > 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 || memoryWorkPending(cache, report.memory));
2592
2642
  const idle = opts.idle ?? null;
2593
2643
  const idleFailures = idle === null ? 0 : shutDownIdleDevices(report.idleDevices, idle, () => collectIdleDevices(loadConfig$1(), listAllIosSims({ timeoutMs: DEVICE_LIST_TIMEOUT_MS }), report.deadProjects)).failures;
2594
2644
  if (idleFailures) process.exitCode = 1;
@@ -2628,6 +2678,7 @@ async function runGcCore(opts, deps) {
2628
2678
  deleteFailures += await deleteOrphanedWorkspaces(report.orphanedWorkspaces);
2629
2679
  deleteFailures += deleteProjectDevices(orphanedDevices, staleDevices, staleDeviceRecords);
2630
2680
  deleteFailures += forgetStaleLedgerEntries(report.staleLedgerEntries);
2681
+ deleteFailures += forgetStaleEasLedgerEntries(report.staleEasLedgerEntries, listMountedVolumes(), deps);
2631
2682
  deleteFailures += pruneStatusCaches(report);
2632
2683
  for (const lock of buildLocks.stale) {
2633
2684
  const cleared = (0, ownership_claim_exports.clearFreeClaimSet)({
@@ -0,0 +1,45 @@
1
+ import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
+ //#region src/workspace/git.ts
3
+ const GIT_TIMEOUT_MS = 1e4;
4
+ const GIT_CONCURRENCY = 6;
5
+ function gitCall(cwd, args, { write, timeoutMs = GIT_TIMEOUT_MS, ...opts }) {
6
+ return {
7
+ args: [
8
+ ...write ? [] : ["--no-optional-locks"],
9
+ "-C",
10
+ cwd,
11
+ ...args
12
+ ],
13
+ opts: {
14
+ ...opts,
15
+ timeoutMs
16
+ }
17
+ };
18
+ }
19
+ /** Runs git in `cwd`, bounded by `timeoutMs` (10 s by default); throws like `runFile`. */
20
+ function git(cwd, args, opts = {}) {
21
+ const call = gitCall(cwd, args, opts);
22
+ return getExecutor().runFile("git", call.args, call.opts);
23
+ }
24
+ /** `git`, returning null instead of throwing. */
25
+ function gitQuiet(cwd, args, opts = {}) {
26
+ const call = gitCall(cwd, args, opts);
27
+ return getExecutor().runFileQuiet("git", call.args, call.opts);
28
+ }
29
+ const queue = [];
30
+ let running = 0;
31
+ /** `git` without blocking the event loop, at most six at a time; the budget starts when the call leaves the queue. */
32
+ async function gitAsync(cwd, args, opts = {}) {
33
+ if (running < GIT_CONCURRENCY) running++;
34
+ else await new Promise((proceed) => queue.push(proceed));
35
+ try {
36
+ const call = gitCall(cwd, args, opts);
37
+ return await getExecutor().runFileAsync("git", call.args, call.opts);
38
+ } finally {
39
+ const next = queue.shift();
40
+ if (next) next();
41
+ else running--;
42
+ }
43
+ }
44
+ //#endregion
45
+ export { gitAsync as n, gitQuiet as r, git as t };
@@ -1,10 +1,10 @@
1
- import { t as getExecutor } from "./exec-B81Qodjn.mjs";
1
+ import { t as getExecutor } from "./exec-DqKo9GKJ.mjs";
2
2
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
3
- import { l as phaseLine } from "./command-output-BjPN99ZB.mjs";
4
- import { o as androidHome } from "./android-BsYNR81W.mjs";
5
- import { a as spawnDeclared } from "./spawn-claims-Kqiifsk2.mjs";
6
- import { a as readCcacheActivity, n as CCACHE_UNAVAILABLE } from "./ccache-CjHQ5F8g.mjs";
7
- import { M as startBuildHeartbeat, y as HEARTBEAT_INTERVAL_MS } from "./toolchain-DqyDXs30.mjs";
3
+ import { l as phaseLine } from "./command-output-BTy8hZ0F.mjs";
4
+ import { o as androidHome } from "./android-Mz_Inn3w.mjs";
5
+ import { a as spawnDeclared } from "./spawn-claims-DVS5RkMS.mjs";
6
+ import { a as readCcacheActivity, n as CCACHE_UNAVAILABLE } from "./ccache-zdKiYQ3E.mjs";
7
+ import { M as startBuildHeartbeat, y as HEARTBEAT_INTERVAL_MS } from "./toolchain-DxSsNssu.mjs";
8
8
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync } from "node:fs";
9
9
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
10
10
  import { fileURLToPath } from "node:url";
@@ -1,8 +1,8 @@
1
- import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-Bbztm4oV.mjs";
2
- import { r as findProjectRoot } from "./project-B8_duAzW.mjs";
3
- import { s as RECENT_LAUNCH_MS } from "./watchman-CQl51YZu.mjs";
4
- import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-CB4NnVZm.mjs";
5
- import "./status-watch-DvmI3SmN.mjs";
1
+ import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-B717odTD.mjs";
2
+ import { r as findProjectRoot } from "./project-_phNIJfs.mjs";
3
+ import { s as RECENT_LAUNCH_MS } from "./watchman-CPQFZLXY.mjs";
4
+ import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-BRyV2adA.mjs";
5
+ import "./status-watch-C23ILtf9.mjs";
6
6
  import { SETTINGS, SETTINGS_SCHEMA_URL, TUTORIAL_VERSION } from "@stim-cli/core/state";
7
7
  import chalk from "chalk";
8
8
  //#region src/guide/agent.ts
@@ -405,7 +405,7 @@ FULL TOPIC LIST
405
405
  stim guide cleanup # what reclaims a device, and what deletes
406
406
  stim guide cleanup collector # an unproven collector pid; why the app on a phone closed
407
407
  stim guide cleanup memory # watchman and Gradle daemon memory; gc --cache watchman
408
- stim guide tutorial # tutorial sections and manual commands
408
+ stim guide tutorial # tutorial sections
409
409
  stim guide tutorial run # create the app and build in a tour worktree
410
410
  stim guide settings # configuration files and supported keys`
411
411
  };
@@ -1360,6 +1360,11 @@ RULES
1360
1360
  root, and browser profile paths whose
1361
1361
  directory is gone; --delete forgets the
1362
1362
  ledger entry only
1363
+ staleEasLedgerEntries { id, workspaceRoot } entries of the machine
1364
+ EAS session ledger whose id is not a UUID and
1365
+ whose absolute workspace root is missing on a
1366
+ mounted volume; --delete forgets the entry
1367
+ only and contacts no EAS session
1363
1368
  staleStatusCaches { kind: "disk-usage" | "pull-request", path,
1364
1369
  file, bytes } entries of $STIM_HOME/disk-usage
1365
1370
  and pull-requests whose path is gone from a
@@ -1506,6 +1511,8 @@ RULES
1506
1511
  absent until it has run.
1507
1512
  recording { enabled }: whether stim-server may record the workspace's
1508
1513
  device screens for replay, from recording.enabled
1514
+ hidden true when workspace.hidden is set; absent otherwise. The next
1515
+ command that uses the workspace clears it.
1509
1516
 
1510
1517
  Each environment also carries stage, where the workspace is as Stim
1511
1518
  Desktop and the phone app show it: { kind, since, platform, closedApps }.
@@ -6274,11 +6281,12 @@ A RUNNING APP IS RESTARTED, LIKE XCODE'S RUN
6274
6281
  A stop that fails refuses the launch rather than reusing the old process.
6275
6282
  When a simulator's process list cannot be read, Stim launches with
6276
6283
  \`simctl launch --terminate-running-process\`, which replaces any running
6277
- copy. When an emulator's cannot be read, Stim launches without stopping
6278
- anything and verification reports what it observes. An iPhone run
6279
- (\`ios --device\`) needs no extra step: its collector launches with
6280
- devicectl's \`--terminate-existing\`. Remote targets launch through
6281
- \`agent-device open --relaunch\`.
6284
+ copy. When an Android device's cannot be read, Stim launches with
6285
+ \`am start -S\`, which force-stops the app first; an app without a
6286
+ launcher activity gets a best-effort \`am force-stop\` before \`monkey\`.
6287
+ Neither claims a restart. An iPhone run (\`ios --device\`) needs no extra
6288
+ step: its collector launches with devicectl's \`--terminate-existing\`.
6289
+ Remote targets launch through \`agent-device open --relaunch\`.
6282
6290
 
6283
6291
  RUNTIME STATE AND BUILD INPUTS
6284
6292
  Runtime state is stored outside the project tree under
@@ -8076,6 +8084,14 @@ THE MIRROR IMAGE: A STALE DEVICE RECORD
8076
8084
  runs still counts as this home's; run \`gc\` after deleting a Stim AVD by
8077
8085
  hand.
8078
8086
 
8087
+ The machine EAS session ledger (~/.stim/machine/eas/sessions.json) can hold
8088
+ entries that no EAS session ever had, such as ids written by a test
8089
+ fixture. \`gc\` reports an entry under "Stale EAS ledger entries" only when
8090
+ its id is not a UUID AND its workspace root is an absolute path that is
8091
+ missing on a mounted volume. A valid id, an existing root, or a root on an
8092
+ unmounted volume keeps the entry. \`gc --delete\` re-checks each entry and
8093
+ removes it under the ledger lock; it never contacts EAS.
8094
+
8079
8095
  THE ONE CASE GC WILL NOT REAP
8080
8096
  If the config is gone entirely (deleted ~/.stim, or a throwaway
8081
8097
  STIM_HOME), gc cannot tell your stale devices from another config's LIVE
@@ -9163,8 +9179,10 @@ The same \`remote.machines\` list names the Macs that may build for this one:
9163
9179
  node in $STIM_HOME/build-machines.json. A person approves the request on that
9164
9180
  Mac with \`stim-server devices grant <id> --build\`; doctor prints the id.
9165
9181
  A person can instead run \`stim-server setup\` on the worker with a node,
9166
- ticket and expiry, under the approval rule above. Build never includes read
9167
- or control.
9182
+ ticket and expiry, under the approval rule above. A build grant is full access
9183
+ to the account stim-server runs as: project code runs there unsandboxed, so it
9184
+ can grant itself read and control. Revoking it does not undo what that code
9185
+ already did. Grant it only to Macs you trust.
9168
9186
  Stim connects to a named Mac only while its name still belongs to the pinned
9169
9187
  node and never sends the token to another node. \`doctor\` reports each
9170
9188
  remote Mac's build pairing state and, for an approved one, asks it for one build
@@ -9366,6 +9384,19 @@ them within seconds, as soon as \`stim status\` shows recording.enabled false
9366
9384
  for them. Turning it back on records from then on. See \`guide cleanup\` for
9367
9385
  how recordings are removed otherwise.
9368
9386
 
9387
+ HIDE A WORKSPACE IN THE APPS
9388
+ \`workspace.hidden\` is a boolean, false by default, set only at workspace
9389
+ scope, so it needs no --scope. Run it from the workspace:
9390
+
9391
+ stim settings set workspace.hidden true
9392
+ stim settings unset workspace.hidden
9393
+
9394
+ \`stim status --json\` then reports hidden: true on that environment, and
9395
+ clients that read it list the workspace under Hidden. The next start, ios,
9396
+ android, web, macos, reload or worktree warm in the workspace clears it, so
9397
+ a workspace in use is never hidden. \`worktree remove\` drops it with the
9398
+ workspace.
9399
+
9369
9400
  STIM NEEDS NO PROJECT CHANGES TO RUN
9370
9401
  Nothing above is required to use Stim. The performance caches that used to
9371
9402
  be setup steps are supplied by Stim on the command lines it composes itself:
@@ -9592,7 +9623,11 @@ FileStore shards across 256 directories, a build cache is keyed
9592
9623
  platform instead of one entry. Pass prune: 'atomic' for a cache whose index
9593
9624
  references its own data (an LLVM CAS): it is then left alone by --older-than
9594
9625
  and emptied whole only by 'gc --delete --cache all'.
9595
- Registration is idempotent and keyed on the directory.`
9626
+ Registration is idempotent and keyed on the directory.
9627
+ dir must be absolute (a leading ~ is expanded) and dedicated to the cache.
9628
+ register throws for a path that is or contains the home directory, the system
9629
+ temporary directory, the Stim config directory or a filesystem root, and gc
9630
+ never prunes or empties such a directory.`
9596
9631
  };
9597
9632
  //#endregion
9598
9633
  //#region src/guide/web.ts
@@ -9955,8 +9990,11 @@ attempt falls back here. Placement and failure reasons are in build logs.
9955
9990
 
9956
9991
  AGENT ACTIONS
9957
9992
 
9958
- Launch through stim macos first. Use its isolated bundleId from the JSON
9959
- launch record or status --json:
9993
+ Launch through stim macos first. Use its isolated bundleId from the JSON launch
9994
+ record or status --json. stim macos waits, for up to 20 seconds, until macOS
9995
+ LaunchServices lists the app, so agent-device open attaches to it instead of
9996
+ starting a second copy. If it is still unlisted, stim macos warns and returns;
9997
+ wait before opening. A --remote launch skips the wait:
9960
9998
 
9961
9999
  agent-device open <bundleId> --platform macos --surface app --foreground
9962
10000
  agent-device click <ref> --settle
@@ -10260,139 +10298,13 @@ const TUTORIAL_RESTART_PROMPT = "Restart the Stim tutorial.";
10260
10298
  const TUTORIAL_ASKS = {
10261
10299
  begin: `Clone ${TUTORIAL_REPO} into {base} and follow stim guide tutorial run.`,
10262
10300
  build: "Make the title purple in the Stim tutorial app and check it on the simulator.",
10263
- agent: "Open the app on the iOS simulator, take a screenshot and confirm the title color.",
10301
+ parallel: "While that builds, make the Tap me button green in a new worktree and check it on the simulator.",
10264
10302
  finish: "I'm done with these experiments in {base} and don't need the changes. Stop the apps and remove the worktrees {worktrees}, and keep the clone. Follow stim guide tutorial finish.",
10265
- delete: "Remove the Stim tutorial: remove its worktrees and the clone at {base} with stim worktree remove, then delete {base}. Follow stim guide tutorial delete.",
10303
+ delete: "Remove the test app: run stim worktree remove on {base}, then delete the folder. Follow stim guide tutorial delete.",
10266
10304
  share: `Open a pull request to ${TUTORIAL_REPO} with my title color change, with before and after screenshots from the simulator. See stim guide tutorial share.`,
10267
10305
  retry: "The first iOS build of the tutorial app in {tour} failed. Find out why and run it on iOS again."
10268
10306
  };
10269
- const TUTORIAL_STEPS = [
10270
- {
10271
- id: "begin",
10272
- title: "Get the Test App",
10273
- who: "agent",
10274
- optional: false,
10275
- ask: TUTORIAL_ASKS.begin,
10276
- section: "run",
10277
- commands: []
10278
- },
10279
- {
10280
- id: "build",
10281
- title: "Make a Change",
10282
- who: "you",
10283
- optional: false,
10284
- ask: TUTORIAL_ASKS.build,
10285
- section: null,
10286
- commands: []
10287
- },
10288
- {
10289
- id: "parallel",
10290
- title: "Change It Again in Parallel",
10291
- who: "you",
10292
- optional: false,
10293
- ask: null,
10294
- section: null,
10295
- commands: []
10296
- },
10297
- {
10298
- id: "device",
10299
- title: "Live View and Control",
10300
- who: "you",
10301
- optional: true,
10302
- ask: null,
10303
- section: null,
10304
- commands: ["stim status"]
10305
- },
10306
- {
10307
- id: "agent",
10308
- title: "Agent Actions and Replay",
10309
- who: "agent",
10310
- optional: true,
10311
- ask: TUTORIAL_ASKS.agent,
10312
- section: null,
10313
- commands: [
10314
- "cd \"{tour}\"",
10315
- "export AGENT_DEVICE_STATE_DIR=\"{stateDir}\"",
10316
- `agent-device open ${TUTORIAL_BUNDLE_ID} --platform ios --udid {udid}`,
10317
- "agent-device screenshot tutorial.png",
10318
- "agent-device close",
10319
- "stim logs --source agent --tail 10"
10320
- ]
10321
- },
10322
- {
10323
- id: "logs",
10324
- title: "App Logs",
10325
- who: "you",
10326
- optional: true,
10327
- ask: null,
10328
- section: null,
10329
- commands: ["stim logs --errors", "stim logs --grep stim:tutorial"]
10330
- },
10331
- {
10332
- id: "phone",
10333
- title: "Watch on Your Phone",
10334
- who: "you",
10335
- optional: true,
10336
- ask: null,
10337
- section: null,
10338
- commands: []
10339
- },
10340
- {
10341
- id: "share",
10342
- title: "Share Your Finish",
10343
- who: "you",
10344
- optional: true,
10345
- ask: TUTORIAL_ASKS.share,
10346
- section: "share",
10347
- commands: [
10348
- "cd \"{tour}\"",
10349
- "git commit -am \"<one-line summary>\"",
10350
- "mkdir -p .expo/screenshots",
10351
- "git checkout origin/main -- theme.js",
10352
- "xcrun simctl io {udid} screenshot .expo/screenshots/before.png",
10353
- "git checkout HEAD -- theme.js",
10354
- "xcrun simctl io {udid} screenshot .expo/screenshots/after.png",
10355
- "cp .github/pull_request_template.md .expo/screenshots/body.md",
10356
- `gh repo fork ${TUTORIAL_REPO} --remote --remote-name fork`,
10357
- "git push -u fork HEAD",
10358
- `gh pr create --repo ${TUTORIAL_REPO} --title "<one-line summary>" --body-file .expo/screenshots/body.md --attach ".expo/screenshots/before.png#Before" --attach ".expo/screenshots/after.png#After"`
10359
- ]
10360
- },
10361
- {
10362
- id: "finish",
10363
- title: "Finish and Archive",
10364
- who: "agent",
10365
- optional: false,
10366
- ask: TUTORIAL_ASKS.finish,
10367
- section: "finish",
10368
- commands: [
10369
- "cd \"{tour}\"",
10370
- "stim stop",
10371
- "cd \"{second}\"",
10372
- "stim stop",
10373
- "cd \"{base}\"",
10374
- "stim worktree remove \"{tour}\"",
10375
- "stim worktree remove \"{second}\""
10376
- ]
10377
- },
10378
- {
10379
- id: "delete",
10380
- title: "Delete the Test App",
10381
- who: "agent",
10382
- optional: true,
10383
- ask: TUTORIAL_ASKS.delete,
10384
- section: "delete",
10385
- commands: [
10386
- "cd \"{base}\"",
10387
- "grep stimTutorial app.json",
10388
- "git worktree list",
10389
- "stim stop",
10390
- "stim worktree remove \"{base}\"",
10391
- "cd ..",
10392
- "rm -rf \"{base}\""
10393
- ]
10394
- }
10395
- ];
10307
+ TUTORIAL_ASKS.begin, TUTORIAL_ASKS.build, TUTORIAL_ASKS.parallel, TUTORIAL_ASKS.share, TUTORIAL_ASKS.finish, TUTORIAL_ASKS.delete;
10396
10308
  //#endregion
10397
10309
  //#region src/guide/tutorial.ts
10398
10310
  const paths = `Use {base} = ~/stim-tutorial unless the user named another folder. Expand ~
@@ -10420,9 +10332,6 @@ Without agent-device, use xcrun simctl io <ios.udid> screenshot
10420
10332
  never booted. Take both with the same tool so they match in size. .expo/ is
10421
10333
  ignored and outside the native fingerprint, so the files are never committed,
10422
10334
  never change the build, and never block stim worktree remove. Keep each PNG under 1 MB.`;
10423
- function commands(id) {
10424
- return TUTORIAL_STEPS.find((step) => step.id === id).commands.join("\n");
10425
- }
10426
10335
  //#endregion
10427
10336
  //#region src/guide/index.ts
10428
10337
  const TOPICS = {
@@ -10444,11 +10353,9 @@ const TOPICS = {
10444
10353
  preamble: () => `STIM TUTORIAL
10445
10354
 
10446
10355
  The tutorial clones ${TUTORIAL_REPO}, a tiny Expo app, into {base}; the clone is
10447
- never run, and only the optional delete step removes it. The user then asks for a visual change, and for another
10448
- change while the first builds. Each change runs in its own linked worktree of
10449
- {base}, so each has its own simulator and Metro port, and the second worktree's
10450
- first iOS build reuses the first one's native build. Only the clone, the
10451
- optional share and the cleanup need this guide: the changes are ordinary
10356
+ never run, and only the optional delete step removes it. The user then asks for a visual change, which runs in a
10357
+ linked worktree of {base} with its own simulator and Metro port. Only the clone,
10358
+ the optional share and the cleanup need this guide: the changes are ordinary
10452
10359
  requests, so follow stim guide agent for them, and check each change on the
10453
10360
  device.
10454
10361
 
@@ -10461,8 +10368,7 @@ ${local}
10461
10368
 
10462
10369
  ${paths}
10463
10370
 
10464
- Never pair phones, approve machines, or grant access on the user's behalf.
10465
- For commands to type yourself, read stim guide tutorial manual.`,
10371
+ Never pair phones, approve machines, or grant access on the user's behalf.`,
10466
10372
  sections: {
10467
10373
  run: {
10468
10374
  summary: "Clone the test app into a fresh folder and install its dependencies",
@@ -10501,10 +10407,20 @@ ${local}
10501
10407
 
10502
10408
  ${screenshots}
10503
10409
 
10410
+ Check each change on the device with agent-device in that same session, after
10411
+ the after screenshot, so Stim Desktop records your actions and the user can
10412
+ replay them: tap tap-button, toggle dark-accent-switch, pick a size
10413
+ (size-s, size-m or size-l), then take a screenshot (agent-device screenshot
10414
+ .expo/screenshots/checked.png) and confirm the change. Refs expire after each
10415
+ action: run agent-device snapshot -i before every action and use the ref it
10416
+ reports for that testID. When agentDevice.installed is false in stim status
10417
+ --json, do not install agent-device unasked: check the change with the build
10418
+ result and stim logs --errors, and tell the user that agent-device would let
10419
+ you tap through the app.
10420
+
10504
10421
  PAUSE: end the turn. Tell the user to ask for a visual change next, such as
10505
- making the title purple, in their own words. Each change runs in a new linked
10506
- worktree of {base} (stim guide agent), and its first iOS build takes a few
10507
- minutes.`
10422
+ making the title purple, in their own words. It runs in a new linked worktree
10423
+ of {base} (stim guide agent), and its first iOS build takes a few minutes.`
10508
10424
  },
10509
10425
  finish: {
10510
10426
  summary: "Stop and remove the two tutorial worktrees, keeping the clone",
@@ -10518,7 +10434,13 @@ as {tour} and {second}. Never touch any other worktree, an earlier tutorial
10518
10434
  clone, or the clone itself. For each, stop from its path, then remove it from
10519
10435
  the clone:
10520
10436
 
10521
- ${commands("finish")}
10437
+ cd "{tour}"
10438
+ stim stop
10439
+ cd "{second}"
10440
+ stim stop
10441
+ cd "{base}"
10442
+ stim worktree remove "{tour}"
10443
+ stim worktree remove "{second}"
10522
10444
 
10523
10445
  Use a plain remove first. The user's finish request says they do not need the
10524
10446
  changes, which is the consent stim guide agent asks for before worktree remove
@@ -10631,25 +10553,6 @@ path; never use --force for them. Reuse the clone at {base} only if its
10631
10553
  stimTutorial marker equals ${TUTORIAL_VERSION}; otherwise follow stim guide
10632
10554
  tutorial run into a fresh folder. Pause as run instructs. Stim Desktop starts
10633
10555
  over: only worktrees and builds after the restart count.`
10634
- },
10635
- manual: {
10636
- summary: "The commands behind each step, for typing yourself",
10637
- body: () => `MANUAL TUTORIAL
10638
-
10639
- ${paths}
10640
-
10641
- Replace {base}, {tour} and {second} with absolute paths: {base} is the clone,
10642
- {tour} the first worktree and {second} the second. For Agent Actions, replace
10643
- {stateDir} with agentDevice.stateDir from stim ios or stim status --json and
10644
- {udid} with the workspace's ios.udid. Clone with git
10645
- clone https://github.com/${TUTORIAL_REPO}.git into a fresh folder outside any
10646
- repository. Each change runs in its own worktree of that clone (stim guide
10647
- agent); the clone itself is never run. Run each worktree on iOS with
10648
- stim ios --remote local --remote-build local so it stays on this Mac.
10649
-
10650
- ${TUTORIAL_STEPS.map((step) => `${step.title}${step.optional ? " (optional)" : ""}\n\n${step.commands.length ? `\`\`\`sh\n${step.commands.join("\n")}\n\`\`\`` : "Ask your agent in your own words, or observe this step in Stim Desktop."}`).join("\n\n")}
10651
-
10652
- Finish removes only the two tutorial worktrees, never the clone; stim guide tutorial finish says when --force is allowed for them.`
10653
10556
  }
10654
10557
  }
10655
10558
  }
@@ -1,6 +1,6 @@
1
- import { o as call, s as connectHost } from "./hosted-client-Io01s5By.mjs";
2
- import { i as requestHostedMetro } from "./metro-gateway-BBJldOdi.mjs";
3
- import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-BdAQi21M.mjs";
1
+ import { c as connectHost, s as call } from "./hosted-client-ZEKpS9vw.mjs";
2
+ import { i as requestHostedMetro } from "./metro-gateway-CX9Xlkq2.mjs";
3
+ import { n as prepareHostedNative, r as stopHostedNative, t as placeHostedNative } from "./hosted-native-A4s1QPXe.mjs";
4
4
  //#region src/device-host/hosted-android.ts
5
5
  async function prepareHostedAndroid(machine, selectors, recorded, mode) {
6
6
  return await prepareHostedNative(machine, selectors, recorded, "android", false, mode);