stim 1.23.0 → 1.24.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 (169) hide show
  1. package/README.md +3 -2
  2. package/dist/{acquire-artifact-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CHH4KLOR.mjs → android-DcztblCT.mjs} +5 -5
  10. package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/api.d.mts +22 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-Dwdo7k1E.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
  16. package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
  17. package/dist/{browser-web-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-C8CIvRyi.mjs → build-plan-JsDUq4w1.mjs} +8 -7
  22. package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-RcAy92gH.mjs → ccache-CCn1S6qG.mjs} +6 -6
  25. package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
  26. package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
  27. package/dist/{cli-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-Db8BqzxH.mjs → command-output-DxC0k2rk.mjs} +3 -2
  32. package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
  33. package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
  34. package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-C56ll9hY.mjs} +2 -2
  35. package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
  36. package/dist/{dev-client-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
  42. package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
  47. package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
  48. package/dist/doctor-fingerprint.mjs +1 -1
  49. package/dist/{doctor-watchman-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
  58. package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-vbUOqGXu.mjs → ios-BItP6lkn.mjs} +8 -8
  67. package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
  68. package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
  69. package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
  70. package/dist/{ios-device-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CVyNwjAF.mjs → ios-project-KYqeJURj.mjs} +5 -5
  72. package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
  73. package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
  74. package/dist/{js-swap-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-u0BoHKnO.mjs → macos-CCfhb-jT.mjs} +49 -42
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/maintenance-run.mjs +7 -7
  83. package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
  84. package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
  85. package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
  86. package/dist/{native-android-CdCSylTn.mjs → native-android-96BBizbq.mjs} +17 -17
  87. package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
  88. package/dist/{native-run-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-CRSOZxKY.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
  90. package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
  91. package/dist/{native-xcode-inputs-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +104 -43
  95. package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
  96. package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
  97. package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
  98. package/dist/phone-reverses-BdsdesVF.mjs +57 -0
  99. package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
  100. package/dist/{plan-placement-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-CTLNHCfE.mjs → project-Dz-hWkb-.mjs} +21 -17
  104. package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
  105. package/dist/pull-requests.mjs +1 -1
  106. package/dist/{react-native-android-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-ChBF1MkB.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
  110. package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
  111. package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
  112. package/dist/{reload-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-Cx5CRLvS.mjs → result-DqBrb12U.mjs} +40 -17
  116. package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
  117. package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
  118. package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
  119. package/dist/{server-command-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-79mQRr9C.mjs → settings-write--gj6MACV.mjs} +7 -7
  125. package/dist/settings.schema.json +13 -0
  126. package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
  127. package/dist/{slot-launch-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-CRfN1kWV.mjs → start-Bmg_qmHi.mjs} +1 -1
  131. package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
  132. package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
  133. package/dist/{stats-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BIqqbJ6q.mjs → status-watch-XC7F-AMf.mjs} +5 -5
  139. package/dist/status-worker.mjs +1 -1
  140. package/dist/stim-clonefile.c +18 -0
  141. package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
  142. package/dist/{stop-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-DTBV56gy.mjs → support-B3tzVhKn.mjs} +6 -6
  148. package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
  149. package/dist/{swiftpm-macos-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-CWeGJgCc.mjs → toolchain-D3bmRMia.mjs} +57 -36
  152. package/dist/trigger-BLsHgAGR.mjs +2 -0
  153. package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
  154. package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-ol0ZypEu.mjs} +6 -6
  155. package/dist/{web-CwREhjD-.mjs → web-BH7peScT.mjs} +12 -10
  156. package/dist/web-BdOFlTJr.mjs +2 -0
  157. package/dist/web-run.mjs +8 -9
  158. package/dist/windows-report.mjs +12 -1
  159. package/dist/windows-report.ps1 +1 -1
  160. package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CeBpIZgr.mjs} +11 -4
  161. package/dist/{workspaces-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-iQnROM5o.mjs → xcode-DHu41qQ4.mjs} +41 -27
  165. package/package.json +7 -7
  166. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
  167. package/dist/server-expo-C-Buqvn_.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-Cduk0NSE.mjs +0 -2
@@ -1,35 +1,36 @@
1
- import { c as declareSpawnsOn, f as stopDeclaringSpawnsOn, g as process_identity_exports, h as withDrainingCancellation, r as WorkspaceProcessCleanupError, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, S as process_identity_exports, c as throwIfCancelled, l as WorkspaceProcessCleanupError, m as declareSpawnsOn, t as getExecutor, v as stopDeclaringSpawnsOn, x as withDrainingCancellation } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
3
- import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, S as removeProject, _ as loadConfig$1, d as getConfigDir, j as acquireAvdClaim } from "./config-DlrsduwG.mjs";
4
- import { h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-Db8BqzxH.mjs";
5
- import { f as throwIfCancelled, t as runOperationFile } from "./operation-exec-BW0em61G.mjs";
6
- import { u as workspaceLastUsed } from "./workspace-state-U08dEzhG.mjs";
7
- import { Et as listWorktreesAsync, It as resolveSourceCheckoutAsync } from "./settings-C7O8A6ZI.mjs";
8
- import { i as findProjectRoot$1, v as detectIsExpo } from "./project-CTLNHCfE.mjs";
9
- import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-BzzsX97d.mjs";
10
- import { $ as includesRecordings, At as unverifiedDeviceCommand, C as collectIdleDevices, D as idleDeviceLines, Dt as findOrphanedDevices, Et as eraseParkedDevices, Ft as withRemoteSessionGcLocks, In as runProcessOperation, Kt as withEasProjectLock, Mt as collectEasSessionSweep, Nt as deleteEasSessions, O as parseIdleDuration, Ot as findStaleDeviceRecords, Pt as describeError, Q as includesParkedDevices, Sr as sizeCaches, St as deleteProjectDevices, Tt as deviceSweepIsScoped, X as emptyCaches, Z as includesArchives, _r as phase, _t as collectDeviceLeases, at as selectsBeyondCaches, br as discoverCaches, bt as deleteParkedAvds, dr as memoryScope, dt as gradleVersionsPending, et as includesWorkspaceOutputs, fr as memorySweepIsScoped, ft as includesGradleVersions, gt as DEVICE_LIST_TIMEOUT_MS, hr as scopedMemoryReport, ht as collectInventory, ir as parseArchiveSelector, it as selectCaches, jt as withAndroidAvdSizes, k as shutDownIdleDevices, kt as findStaleProjectDevices, lr as memoryCacheKind, lt as deleteGradleVersions, mr as reclaimMemory, mt as getMachineCacheReport, nt as planCacheEmptying, ot as trimCaches, pr as memoryWorkPending, rt as previewScopedEmptying, sr as collectMemoryReport, st as collectGradleVersions, tt as isWorkspacesScope, ur as memoryLines, ut as gradleVersionLines, vt as collectParkedAvds, w as collectIdleDevicesAsync, wt as describeUnverifiableDevices, xt as deleteParkedSims, yt as collectParkedSims } from "./budget-DnPX3DXj.mjs";
3
+ import { F as isOnMountedVolume, G as projectDeviceSlots, I as listMountedVolumes, L as measuredDirectorySizeAsync, N as directorySizeAsync, O as withConfigLockAsync$1, P as formatBytes, R as volumeRootFor, S as removeProject, _ as loadConfig$1, d as getConfigDir, j as acquireAvdClaim } from "./config-BZhXY15H.mjs";
4
+ import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-DxC0k2rk.mjs";
5
+ import { t as runOperationFile } from "./operation-exec-CUZifp6Z.mjs";
6
+ import { u as workspaceLastUsed } from "./workspace-state-CeBpIZgr.mjs";
7
+ import { Et as listWorktreesAsync, It as resolveSourceCheckoutAsync } from "./settings-RKwY33wv.mjs";
8
+ import { i as findProjectRoot$1, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
9
+ import { F as listAvdsAsync, L as listOrphanedAvdDirectories, V as ownedAvdDirectory, ft as POOL_SETTING_REMEDY, h as avdNameAbsent, vt as parkedMaxSetting } from "./android-882m4hxX.mjs";
10
+ import { n as forgetCreatedDeviceAsync, r as readCreatedDevices$1 } from "./created-devices-D2Aca-xu.mjs";
11
+ import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-Ck6YXPAO.mjs";
12
+ import { $ as includesArchives, At as findStaleDeviceRecords, C as collectIdleDevices, Ct as deleteParkedSims, D as idleDeviceLines, Dt as deviceSweepIsScoped, Et as describeUnverifiableDevices, Ft as deleteEasSessions, It as describeError, Jt as withEasProjectLock, Lt as withRemoteSessionGcLocks, Mt as unverifiedDeviceCommand, Nt as withAndroidAvdSizes, O as parseIdleDuration, Ot as eraseParkedDevices, Pt as collectEasSessionSweep, Q as emptyCaches, Rn as runProcessOperation, Sr as discoverCaches, St as deleteParkedAvds, _r as scopedMemoryReport, _t as collectInventory, at as previewScopedEmptying, bt as collectParkedAvds, ct as trimCaches, dr as memoryCacheKind, dt as deleteGradleVersions, et as includesParkedDevices, fr as memoryLines, ft as gradleVersionLines, gr as reclaimMemory, gt as getMachineCacheReport, hr as memoryWorkPending, it as planCacheEmptying, jt as findStaleProjectDevices, k as shutDownIdleDevices, kt as findOrphanedDevices, lr as collectMemoryReport, lt as collectGradleVersions, mr as memorySweepIsScoped, mt as includesGradleVersions, nt as includesWorkspaceOutputs, or as parseArchiveSelector, ot as selectCaches, pr as memoryScope, pt as gradleVersionsPending, rt as isWorkspacesScope, st as selectsBeyondCaches, tt as includesRecordings, vt as DEVICE_LIST_TIMEOUT_MS, w as collectIdleDevicesAsync, wr as sizeCaches, wt as deleteProjectDevices, xt as collectParkedSims, yr as phase, yt as collectDeviceLeases } from "./budget-dPGuhNai.mjs";
11
13
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
12
- import { B as createGcResults, L as listBuildSlots, a as collectWorkspaceOutputs, c as listWorkspaceDirs, f as withIdleWorkspace, i as collectOrphanedWorkspaces, l as rootPresence, m as workspaceInUseAsync, n as WORKSPACE_OUTPUT_DIRS, o as deleteOrphanedWorkspaces, r as clearWorkspaceOutputs, s as isInsideWorkspaces, t as REBUILD_COST, u as sizeText, z as GC_OUTPUT } from "./workspaces-BxzYlo3P.mjs";
13
- import { N as listBuildLocks, k as removeExpiredLease } from "./activity-B5RtpFda.mjs";
14
- import { n as forgetCreatedDeviceAsync, r as readCreatedDevices$1 } from "./created-devices-x9rN6bhs.mjs";
15
- import { F as listAvdsAsync, L as listOrphanedAvdDirectories, V as ownedAvdDirectory, _t as parkedMaxSetting, dt as POOL_SETTING_REMEDY, h as avdNameAbsent } from "./android-C7sVmyI9.mjs";
16
- import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-hcBpnEGk.mjs";
17
- import { r as readCollectors } from "./ownership-C5fo5Edb.mjs";
18
- import { a as matchWorktreeEntry, b as deleteSelectedArchives, v as describeDereferenced, x as sweepArchiveStaging, y as reclaimProject } from "./worktree-8lqn_lBp.mjs";
19
- import { s as writeCacheFile } from "./warm-progress-CA3TgT3-.mjs";
20
- import { _ as collectWorktreeSweep, a as previewMaintenance, b as worktreeRemovalReason, c as deleteTempLeftovers, d as ARTIFACT_DIRS, f as appRoots, g as candidateRootsAsync, h as ownedDeviceUsage, l as tempLeftoverLines, o as triggeringRoot, p as finishedWorkspaces, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, v as removeWorktrees, y as worktreePullRequestNote } from "./act-DG54PWtJ.mjs";
21
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-UJ5gC80l.mjs";
14
+ import { B as GC_OUTPUT, R as listBuildSlots, V as createGcResults, a as collectWorkspaceOutputs, c as listWorkspaceDirs, h as workspaceInUseAsync, i as collectOrphanedWorkspaces, l as rootPresence, n as WORKSPACE_OUTPUT_DIRS, o as deleteOrphanedWorkspaces, p as withIdleWorkspace, r as clearWorkspaceOutputs, s as isInsideWorkspaces, t as REBUILD_COST, u as sizeText } from "./workspaces-CSV2Orf4.mjs";
15
+ import { N as listBuildLocks, k as removeExpiredLease } from "./activity-Dq3ZcdD8.mjs";
16
+ import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-CVUFFZ6C.mjs";
17
+ import { r as readCollectors } from "./ownership-DxlZGDcV.mjs";
18
+ import { C as reclaimProject, S as describeDereferenced, T as sweepArchiveStaging, a as matchWorktreeEntry, b as TRASH_MANIFEST, v as TRASH_CLAIMS, w as deleteSelectedArchives, x as deleteTrashEntry } from "./worktree-Dw8kfacb.mjs";
19
+ import { s as writeCacheFile } from "./warm-progress-ol0ZypEu.mjs";
20
+ import { _ as collectWorktreeSweep, a as previewMaintenance, b as worktreeRemovalReason, c as deleteTempLeftovers, d as ARTIFACT_DIRS, f as appRoots, g as candidateRootsAsync, h as ownedDeviceUsage, l as tempLeftoverLines, o as triggeringRoot, p as finishedWorkspaces, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, v as removeWorktrees, y as worktreePullRequestNote } from "./act-Cyvm8xYc.mjs";
21
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-CccomeE0.mjs";
22
+ import { claimRemoveCommand, isClaimRefusal, isClaimUnavailable, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
22
23
  import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from "node:fs";
23
24
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
24
25
  import { LOG_ROTATE_BYTES, ensurePrivateDir, rotatedLogPath, withDirLock, withDirLockTransaction } from "@stim-cli/core";
25
- import { assertHostedDeviceLedger, configLockPath, deviceHostArea, deviceHostRoot, diskUsageCacheFile, hostedDeviceId, isJsonObject, listRecordedDevicesAsync, listStatusCacheEntries, maintenanceRunClaims, parseHostedPlatformDevice, readArchivesAsync, readDiskUsage, readHostedDevice, readHostedDeviceLedger, readHostedSessions, recordedBytes } from "@stim-cli/core/state";
26
+ import { assertHostedDeviceLedger, configLockPath, deviceHostArea, deviceHostRoot, diskUsageCacheFile, hostedDeviceId, isJsonObject, listRecordedDevicesAsync, listStatusCacheEntries, maintenanceRunClaims, parseHostedPlatformDevice, readArchivesAsync, readDiskUsage, readHostedDevice, readHostedDeviceLedger, readHostedSessions, recordedBytes, trashRoot } from "@stim-cli/core/state";
26
27
  import { isAbsolute as isAbsolute$1, join as join$1 } from "path";
27
28
  import { fileURLToPath } from "node:url";
28
29
  import { setImmediate } from "node:timers/promises";
29
30
  import chalk from "chalk";
30
31
  import { existsSync as existsSync$1 } from "fs";
31
32
  import { InvalidArgumentError } from "commander";
32
- import { open, readdir, rename, rm, stat, utimes, writeFile } from "node:fs/promises";
33
+ import { lstat, open, readFile, readdir, rename, rm, stat, utimes, writeFile } from "node:fs/promises";
33
34
  //#region src/commands/gc/archives.ts
34
35
  async function stagingOrNone(signal) {
35
36
  try {
@@ -527,6 +528,160 @@ function recordingLines(recordings) {
527
528
  return lines;
528
529
  }
529
530
  //#endregion
531
+ //#region src/commands/gc/trash.ts
532
+ const CLAIM_LABEL = "worktree trash";
533
+ function claimKept(dir) {
534
+ const survey = readClaimSet(join(dir, TRASH_CLAIMS));
535
+ if (survey.live.length) return {
536
+ kept: "a worktree removal is still moving or deleting it",
537
+ live: true
538
+ };
539
+ const problem = survey.unresolved[0];
540
+ if (problem) return {
541
+ kept: `its ownership claim cannot be verified (${problem.reason}); run \`${claimRemoveCommand(problem.path)}\``,
542
+ live: false
543
+ };
544
+ return {
545
+ kept: null,
546
+ live: false
547
+ };
548
+ }
549
+ async function worktreeKept(worktree) {
550
+ try {
551
+ await lstat(worktree);
552
+ } catch (error) {
553
+ const code = error instanceof Error && "code" in error ? error.code : void 0;
554
+ if (code === "ENOENT" || code === "ENOTDIR") return null;
555
+ return `its worktree ${worktree} cannot be checked (${String(code ?? "unknown error")})`;
556
+ }
557
+ return `its worktree ${worktree} still exists; if it is the one this entry came from, run \`stim worktree remove\` on it to finish the removal, then gc deletes this entry`;
558
+ }
559
+ async function readManifest(dir) {
560
+ try {
561
+ const parsed = JSON.parse(await readFile(join(dir, TRASH_MANIFEST), "utf8"));
562
+ if (!parsed || typeof parsed !== "object" || !("worktree" in parsed) || !("createdAt" in parsed)) return null;
563
+ const { worktree, createdAt } = parsed;
564
+ return typeof worktree === "string" && typeof createdAt === "string" ? {
565
+ worktree,
566
+ createdAt
567
+ } : null;
568
+ } catch {
569
+ return null;
570
+ }
571
+ }
572
+ /** The entries under `$STIM_HOME/trash`, each deletable only with a valid manifest, no live or unresolved ownership claim, and a worktree that is gone. */
573
+ async function collectTrash({ signal, operation } = {}) {
574
+ const root = trashRoot();
575
+ let names;
576
+ try {
577
+ names = await readdir(root);
578
+ } catch {
579
+ return null;
580
+ }
581
+ const entries = [];
582
+ for (const name of names.toSorted()) {
583
+ const path = join(root, name);
584
+ if (!(await lstat(path).catch(() => null))?.isDirectory()) continue;
585
+ const manifest = name.startsWith("remove-") ? await readManifest(path) : null;
586
+ const claim = manifest ? claimKept(path) : {
587
+ kept: "it has no valid trash.json, so Stim did not create it",
588
+ live: false
589
+ };
590
+ const live = claim.live;
591
+ const kept = claim.kept ?? (manifest ? await worktreeKept(manifest.worktree) : null);
592
+ entries.push({
593
+ path,
594
+ worktree: manifest?.worktree ?? null,
595
+ removedAt: manifest?.createdAt ?? null,
596
+ bytes: live ? null : await directorySizeAsync(path, {
597
+ timeoutMs: "unbounded",
598
+ signal,
599
+ operation
600
+ }),
601
+ willDelete: kept === null,
602
+ kept
603
+ });
604
+ }
605
+ return entries.length ? {
606
+ root,
607
+ entries
608
+ } : null;
609
+ }
610
+ function trashLines(report) {
611
+ if (!report) return [];
612
+ const total = report.entries.reduce((sum, entry) => sum + (entry.bytes ?? 0), 0);
613
+ const lines = [`Worktree trash (${formatBytes(total)} in ${report.entries.length}) - ${report.root}:`];
614
+ for (const entry of report.entries) {
615
+ const from = entry.worktree ? ` from ${entry.worktree}` : "";
616
+ lines.push(` ${(entry.bytes === null ? "deleting" : formatBytes(entry.bytes)).padStart(10)} ${entry.path}${from}`);
617
+ lines.push(entry.kept ? ` kept: ${entry.kept}` : " --delete would DELETE it");
618
+ }
619
+ return lines;
620
+ }
621
+ /** Deletes what a fresh `collectTrash` marks deletable, each entry under its own exclusive claim. */
622
+ async function deleteTrash(operation, output = GC_OUTPUT) {
623
+ const report = await collectTrash({
624
+ signal: operation?.signal,
625
+ operation
626
+ });
627
+ const done = {
628
+ count: 0,
629
+ bytes: 0,
630
+ failures: 0
631
+ };
632
+ for (const entry of report?.entries ?? []) {
633
+ if (!entry.willDelete) continue;
634
+ let claim;
635
+ try {
636
+ claim = tryAcquireClaim({
637
+ root: join(entry.path, TRASH_CLAIMS),
638
+ mode: "exclusive",
639
+ label: CLAIM_LABEL
640
+ });
641
+ } catch (error) {
642
+ if (!isClaimRefusal(error) && !isClaimUnavailable(error)) throw error;
643
+ output.record("trash", "kept", entry.path, {
644
+ bytes: entry.bytes ?? 0,
645
+ detail: error.reason
646
+ });
647
+ continue;
648
+ }
649
+ if (!claim.acquired) {
650
+ if (claim.pending) releaseClaim(claim.pending);
651
+ output.record("trash", "kept", entry.path, {
652
+ bytes: entry.bytes ?? 0,
653
+ detail: "a worktree removal is still moving or deleting it"
654
+ });
655
+ continue;
656
+ }
657
+ try {
658
+ await deleteTrashEntry(entry.path, operation);
659
+ done.count++;
660
+ done.bytes += entry.bytes ?? 0;
661
+ } catch (error) {
662
+ if (error instanceof WorkspaceProcessCleanupError || error instanceof Error && "reportCleanup" in error) throw error;
663
+ operation?.signal.throwIfAborted();
664
+ done.failures++;
665
+ const detail = error instanceof Error ? error.message : String(error);
666
+ output.log(chalk.red(`Could not delete ${entry.path}: ${detail}`));
667
+ output.record("trash", "failed", entry.path, {
668
+ bytes: entry.bytes ?? 0,
669
+ detail
670
+ });
671
+ } finally {
672
+ releaseClaim(claim.acquired);
673
+ }
674
+ }
675
+ if (done.count) {
676
+ output.log(chalk.green(`Deleted ${plural(done.count, "worktree trash entry", "worktree trash entries")} (${formatBytes(done.bytes)})`));
677
+ output.record("trash", "done", report?.root ?? trashRoot(), {
678
+ bytes: done.bytes,
679
+ detail: `${plural(done.count, "entry", "entries")} deleted`
680
+ });
681
+ }
682
+ return done;
683
+ }
684
+ //#endregion
530
685
  //#region src/commands/gc/report.ts
531
686
  function shortKey(key) {
532
687
  const text = String(key ?? "");
@@ -631,7 +786,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
631
786
  orphaned: [],
632
787
  notices: [],
633
788
  deletionSafe: true
634
- }, agentDeviceUsage = null, swiftpmCacheUsage, machineCaches, tempLeftovers, gradleVersions, caches = [], workspaceOutputs = null, workspaceLogs = [], recordings = [], worktreeSweep = null, memory, cacheScope = null, olderThan = null }, { now = Date.now() } = {}) {
789
+ }, agentDeviceUsage = null, swiftpmCacheUsage, machineCaches, tempLeftovers, trash, gradleVersions, caches = [], workspaceOutputs = null, workspaceLogs = [], recordings = [], worktreeSweep = null, memory, cacheScope = null, olderThan = null }, { now = Date.now() } = {}) {
635
790
  const lines = archiveLines(archives);
636
791
  const parkedHostedLines = formatParkedHostedDeviceReport(parkedHostedDevices, now);
637
792
  const easLedgerLines = staleEasLedgerLines(staleEasLedgerEntries);
@@ -766,6 +921,7 @@ function formatGcReport({ maintenance, archives, skipped = [], deadProjects = []
766
921
  lines.push(...swiftpmCacheLines(swiftpmCacheUsage, now));
767
922
  lines.push(...machineCacheLines(machineCaches, now));
768
923
  lines.push(...tempLeftoverLines(tempLeftovers));
924
+ lines.push(...trashLines(trash));
769
925
  lines.push(...gradleVersionLines(gradleVersions));
770
926
  lines.push(...memoryLines(memory, memoryCacheKind(cacheScope), now));
771
927
  lines.push(...maintenanceReportLines(maintenance));
@@ -957,7 +1113,7 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
957
1113
  orphaned: [],
958
1114
  notices: [],
959
1115
  deletionSafe: true
960
- }, workspaceOutputs = null, workspaceLogs = [], recordings = [], agentDeviceUsage = null, swiftpmCacheUsage = null, machineCaches = null, tempLeftovers = null, gradleVersions = null, caches = [], memory = null }) {
1116
+ }, workspaceOutputs = null, workspaceLogs = [], recordings = [], agentDeviceUsage = null, swiftpmCacheUsage = null, machineCaches = null, tempLeftovers = null, trash = null, gradleVersions = null, caches = [], memory = null }) {
961
1117
  return {
962
1118
  ...archives ? {
963
1119
  archived: archives.records,
@@ -1147,6 +1303,7 @@ function gcReportSections({ archives, skipped = [], deadProjects = [], orphanedP
1147
1303
  swiftpmCache: swiftpmCacheUsage,
1148
1304
  machineCaches,
1149
1305
  tempLeftovers: tempLeftoverSection(tempLeftovers),
1306
+ trash,
1150
1307
  gradleVersions,
1151
1308
  memory: memory?.processes ?? [],
1152
1309
  watchmanRoots: memory?.watchmanRoots ?? [],
@@ -1920,10 +2077,10 @@ function readGcReport(options = {}, deps = {}) {
1920
2077
  takeResults: () => []
1921
2078
  }, true);
1922
2079
  }
1923
- function removeInvalidProjectEntries(invalidProjects, output, signal) {
2080
+ async function removeInvalidProjectEntries(invalidProjects, output, signal) {
1924
2081
  for (const path of invalidProjects) {
1925
2082
  signal?.throwIfAborted();
1926
- removeProject(path);
2083
+ await withConfigLockAsync$1(() => removeProject(path), signal);
1927
2084
  output.log(chalk.green(`Removed the invalid registry entry ${path}`));
1928
2085
  output.record("project", "done", path);
1929
2086
  }
@@ -2047,6 +2204,7 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2047
2204
  swiftpmCacheUsage: null,
2048
2205
  machineCaches: null,
2049
2206
  tempLeftovers: null,
2207
+ trash: null,
2050
2208
  gradleVersions: includesGradleVersions(scope) ? await collectGradleVersions({
2051
2209
  olderThanDays: olderThan,
2052
2210
  now,
@@ -2069,6 +2227,11 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2069
2227
  signal: operation?.signal,
2070
2228
  operation
2071
2229
  });
2230
+ phase("trash", "measuring worktree trash", operation);
2231
+ const trash = await collectTrash({
2232
+ signal: operation?.signal,
2233
+ operation
2234
+ });
2072
2235
  const mountedVolumes = listMountedVolumes();
2073
2236
  const cfg = loadConfig$1();
2074
2237
  let easSessionSweep = deps.precollectedEasSessionSweep;
@@ -2326,11 +2489,24 @@ async function collectGcReport({ olderThan = null, cache = null, worktrees = fal
2326
2489
  swiftpmCacheUsage,
2327
2490
  machineCaches,
2328
2491
  tempLeftovers,
2492
+ trash,
2329
2493
  cacheScope: null,
2330
2494
  olderThan,
2331
2495
  all
2332
2496
  };
2333
2497
  }
2498
+ const shellWord = (value) => /^[\w.:-]+$/.test(value) ? value : quotedPath$1(value);
2499
+ function gcRetryCommand(opts) {
2500
+ return [
2501
+ "stim gc",
2502
+ opts.delete && "--delete",
2503
+ opts.worktrees && "--worktrees",
2504
+ opts.olderThan !== void 0 && `--older-than ${opts.olderThan}`,
2505
+ opts.cache !== void 0 && `--cache ${shellWord(opts.cache)}`,
2506
+ opts.idle !== void 0 && `--idle ${opts.idle / 6e4}m`,
2507
+ opts.json && "--json"
2508
+ ].filter(Boolean).join(" ");
2509
+ }
2334
2510
  async function runGc(opts = {}, deps = {}) {
2335
2511
  let result;
2336
2512
  try {
@@ -2339,7 +2515,7 @@ async function runGc(opts = {}, deps = {}) {
2339
2515
  else console.log(line);
2340
2516
  }, claim));
2341
2517
  } catch (error) {
2342
- const failure = (0, ownership_claim_exports.claimFailure)(error, opts.delete ? "stim gc --delete" : "stim gc --idle <duration>") ?? (deps.operation?.signal.aborted ? {
2518
+ const failure = (0, ownership_claim_exports.claimFailure)(error, gcRetryCommand(opts)) ?? (deps.operation?.signal.aborted ? {
2343
2519
  code: "STIM_CANCELLED",
2344
2520
  message: "GC was cancelled.",
2345
2521
  remedy: "Retry the same GC command."
@@ -2615,7 +2791,7 @@ async function reclaimParkedDevices(report, deps, output) {
2615
2791
  }
2616
2792
  function reportActionable(report) {
2617
2793
  const { deadProjects, invalidProjects, orphanedDevices, staleDevices, staleDeviceRecords, buildLocks, buildSlots, deviceLeases, easSessionSweep, caches, olderThan, all, cacheScope: cache } = report;
2618
- return 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.tempLeftovers?.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));
2794
+ return 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.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));
2619
2795
  }
2620
2796
  async function runGcCore(opts, deps, execution, reportOnly = false) {
2621
2797
  const { output, takeResults } = execution;
@@ -2713,7 +2889,7 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
2713
2889
  throwIfCancelled(signal, "GC");
2714
2890
  deleteFailures += await deleteGradleVersions(report.gradleVersions, output, deps.operation);
2715
2891
  throwIfCancelled(signal, "GC");
2716
- removeInvalidProjectEntries(invalidProjects, output, signal);
2892
+ await removeInvalidProjectEntries(invalidProjects, output, signal);
2717
2893
  throwIfCancelled(signal, "GC");
2718
2894
  deleteFailures += await pruneDeadProjects(deadProjects, output, deps.operation);
2719
2895
  throwIfCancelled(signal, "GC");
@@ -2733,6 +2909,7 @@ async function runGcCore(opts, deps, execution, reportOnly = false) {
2733
2909
  signal: deps.operation?.signal,
2734
2910
  operation: deps.operation
2735
2911
  }, output)).failures;
2912
+ if (report.trash) deleteFailures += (await deleteTrash(deps.operation, output)).failures;
2736
2913
  for (const lock of buildLocks.stale) {
2737
2914
  throwIfCancelled(signal, "GC");
2738
2915
  const cleared = (0, ownership_claim_exports.clearFreeClaimSet)({