stim 1.21.0 → 1.22.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 (184) hide show
  1. package/README.md +60 -7
  2. package/dist/{acquire-artifact-CD4lbiWE.mjs → acquire-artifact-Co2k4f7O.mjs} +21 -3
  3. package/dist/{act-DHAw2A2S.mjs → act-DsuqEkiM.mjs} +298 -164
  4. package/dist/{activity-BzVfHSrY.mjs → activity-CMLmzp7o.mjs} +33 -12
  5. package/dist/{agent-device-usage-output-zh1vhbLp.mjs → agent-device-usage-output-DUFaTMdd.mjs} +7 -7
  6. package/dist/{android-BLgbNqox.mjs → android-ByRMUoiJ.mjs} +66 -52
  7. package/dist/{android-DUYkNF4u.mjs → android-C7sVmyI9.mjs} +160 -59
  8. package/dist/{android-CV_GCELZ.mjs → android-DGkNqa_c.mjs} +5 -5
  9. package/dist/{android-BEJ8Jpl7.mjs → android-DR5lZ2Az.mjs} +2 -2
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/{android-cas-Ct5b1xCK.mjs → android-cas-ngferVq2.mjs} +3 -3
  12. package/dist/{client-B7QVOlCr.d.mts → android-project-DVWyCbWU.d.mts} +145 -7
  13. package/dist/api.d.mts +132 -118
  14. package/dist/api.mjs +239 -42
  15. package/dist/{artifact-B8T3S5gi.mjs → artifact-8EY8SAPw.mjs} +40 -35
  16. package/dist/{artifact-DAuZ-FNU.mjs → artifact-DJPy518Y.mjs} +69 -40
  17. package/dist/artifact-platform-CXcmX_j3.mjs +27 -0
  18. package/dist/{browser-web-QQzVjz3O.mjs → browser-web-Bcv99PBM.mjs} +187 -59
  19. package/dist/{budget-Bs6SxxzO.mjs → budget-Cvwn54qV.mjs} +830 -699
  20. package/dist/{build-CoPzQRNw.mjs → build-CabC3G23.mjs} +34 -27
  21. package/dist/{build-cache-DmyR9Zzc.mjs → build-cache-Dv7RN200.mjs} +4 -4
  22. package/dist/{build-plan-CaFskB7_.mjs → build-plan-DUC8Ka9y.mjs} +74 -14
  23. package/dist/{cache-manifest-DkkqguoK.mjs → cache-manifest-DSeQjt-Q.mjs} +1 -1
  24. package/dist/cache-manifest.mjs +1 -1
  25. package/dist/{ccache-BJRZ9pG3.mjs → ccache-Btwc36-I.mjs} +6 -6
  26. package/dist/{cdp-CWmIUMbw.mjs → cdp-3fwICjzi.mjs} +1 -1
  27. package/dist/{chrome-B6tfCta1.mjs → chrome-Bbw689-6.mjs} +1 -1
  28. package/dist/{cli-0DYf8QhQ.mjs → cli-CHZa9Lvk.mjs} +20 -20
  29. package/dist/cli.mjs +1 -1
  30. package/dist/{client-UXD70ZbM.mjs → client-OyRoEuSr.mjs} +218 -47
  31. package/dist/collector-run.d.mts +1 -1
  32. package/dist/collector-run.mjs +6 -6
  33. package/dist/{command-output-B1UrjZHL.mjs → command-output-gwpm28fu.mjs} +1 -1
  34. package/dist/{config-CYcBF478.mjs → config-DlrsduwG.mjs} +17 -11
  35. package/dist/{created-devices-CqeBlrEn.mjs → created-devices-x9rN6bhs.mjs} +13 -3
  36. package/dist/{dependency-state-BbKQW83h.mjs → dependency-state-1I9KZT1Y.mjs} +2 -2
  37. package/dist/{detached-entry-DFRyG1_o.mjs → detached-entry-BwNEtIrP.mjs} +1 -1
  38. package/dist/{dev-client-UOeESKm6.mjs → dev-client-BSDR5h3F.mjs} +2 -2
  39. package/dist/{device-ExJq8Ei7.mjs → device-B-L3Fbxy.mjs} +71 -14
  40. package/dist/{device-DCxH7_By.mjs → device-DklWZLqb.mjs} +16 -16
  41. package/dist/{device-capacity-CMlqEcvw.mjs → device-capacity-DK5_EwRS.mjs} +9 -10
  42. package/dist/device-host-worker.mjs +25 -32
  43. package/dist/{device-ios-DRUeKaFV.mjs → device-ios-DoB6KFCO.mjs} +39 -16
  44. package/dist/{device-lease-run-C8raGFoP.mjs → device-lease-run-xJPQ_QQG.mjs} +5 -5
  45. package/dist/{device-pool-DMRpVX9a.mjs → device-pool-BMkdsefq.mjs} +3 -3
  46. package/dist/{doctor-DTvaDOda.mjs → doctor-Bo7BXLux.mjs} +24 -37
  47. package/dist/{doctor-Dhqebm0q.mjs → doctor-D5_EzwfA.mjs} +19 -16
  48. package/dist/doctor-fingerprint-DZLoYFVb.mjs +16 -0
  49. package/dist/doctor-fingerprint.mjs +1 -1
  50. package/dist/{doctor-BLHCYxzi.mjs → doctor-thjWAV0z.mjs} +1 -1
  51. package/dist/{doctor-watchman-Cv1F10Kj.mjs → doctor-watchman-N2wDotwQ.mjs} +5 -5
  52. package/dist/{eas-build-BomfRnFT.mjs → eas-build-CwknaQYj.mjs} +4 -4
  53. package/dist/{eas-fallback-DJwZpy0c.mjs → eas-fallback-CSgAulr5.mjs} +27 -18
  54. package/dist/{eas-session-ledger-op6A54yi.mjs → eas-session-ledger-DlY_serQ.mjs} +8 -7
  55. package/dist/{error-diagnostics-Bf0rZvG9.mjs → error-diagnostics-DBWO2rxE.mjs} +10 -10
  56. package/dist/{exec-_UbtCQcG.mjs → exec-DEoAhcze.mjs} +155 -47
  57. package/dist/{exec-H20xSg2T.d.mts → exec-DnYc4HGH.d.mts} +17 -4
  58. package/dist/{gc-_-dCXdyL.mjs → gc-CXxN-4SE.mjs} +587 -313
  59. package/dist/gc-DnNDQyaP.mjs +3 -0
  60. package/dist/{guide-Yqwt2bd6.mjs → guide-Br0LEfKy.mjs} +239 -43
  61. package/dist/{hosted-android-Bw-honsd.mjs → hosted-android-B-9f-jkd.mjs} +6 -6
  62. package/dist/{hosted-client-DB_gBPfY.mjs → hosted-client-DZAPrcro.mjs} +4 -4
  63. package/dist/{hosted-ios-CUvOf4Vr.mjs → hosted-ios-CsCS21hn.mjs} +1 -1
  64. package/dist/{hosted-logs-DL_P5AdN.mjs → hosted-logs-FIRx9X2f.mjs} +5 -5
  65. package/dist/{hosted-macos-QI141yKk.mjs → hosted-macos-_awYSpfv.mjs} +21 -12
  66. package/dist/{hosted-native-Ksyjgzq-.mjs → hosted-native-BdzE668-.mjs} +27 -14
  67. package/dist/{idle-BVeRGroT.d.mts → idle-C4cZ757K.d.mts} +3 -3
  68. package/dist/{idle-shutdown-DaKmZi0z.mjs → idle-shutdown-DDg3SdvY.mjs} +7 -7
  69. package/dist/ios-CDvlmUs7.d.mts +24 -0
  70. package/dist/{ios-CQ68hG9s.mjs → ios-Ds1clbIt.mjs} +8 -8
  71. package/dist/{ios-device-CwFMehUS.mjs → ios-device--h_-8ENa.mjs} +3 -3
  72. package/dist/{ios-device-CXGP1bsD.mjs → ios-device-BXZ0c7Kb.mjs} +1 -1
  73. package/dist/{ios-CpByZy12.mjs → ios-hcBpnEGk.mjs} +81 -34
  74. package/dist/{ios-ubFsBzwq.mjs → ios-pm4nL6By.mjs} +59 -50
  75. package/dist/{ios-project-WuwwBdvW.mjs → ios-project-CZhKODF3.mjs} +5 -5
  76. package/dist/{ios-signing-DTTIChGs.mjs → ios-signing-BtAffm0A.mjs} +2 -2
  77. package/dist/{ios-state-DvFX-K_l.mjs → ios-state-Dtw5K2aI.mjs} +1 -1
  78. package/dist/{ios-qNJt4dFm.mjs → ios-xtlRHaeB.mjs} +1 -1
  79. package/dist/{js-swap-Cc1dttps.mjs → js-swap-Bwhh4S7V.mjs} +7 -29
  80. package/dist/{launch-Zq2mOSDy.mjs → launch-BjxemNpK.mjs} +40 -39
  81. package/dist/{launch-CD1yVc7U.mjs → launch-CCzXlc8r.mjs} +16 -16
  82. package/dist/{logs-BS00Anxf.mjs → logs-BfwwadsZ.mjs} +151 -24
  83. package/dist/{logs-CMm05HxN.mjs → logs-jTS_lHSo.mjs} +10 -17
  84. package/dist/{macos-B65--pPd.mjs → macos-DVlSSyUg.mjs} +1 -1
  85. package/dist/{macos-C-0qJ6zq.mjs → macos-NfV2D7dO.mjs} +143 -46
  86. package/dist/macos-run.mjs +1 -1
  87. package/dist/maintenance-run.mjs +8 -8
  88. package/dist/{metro-DEXpIhHC.mjs → metro-DiXtA3Ty.mjs} +59 -37
  89. package/dist/{metro-gateway-BMJNlj3E.mjs → metro-gateway-CKZqKqx7.mjs} +120 -22
  90. package/dist/{named-ports-BWTzt6mu.mjs → named-ports-DkEzOfzO.mjs} +40 -33
  91. package/dist/{native-android-JACyjTZs.mjs → native-android-CqgnOgsT.mjs} +43 -242
  92. package/dist/native-gradle-artifact-inputs-DHFnmrVf.mjs +270 -0
  93. package/dist/{native-gradle-inputs-Bep9JcSF.mjs → native-gradle-inputs-Dnh84Zbd.mjs} +3 -129
  94. package/dist/{native-run-DY_RLx3C.mjs → native-run-NwUuxbkg.mjs} +4 -5
  95. package/dist/{native-runtime-Dg1Q7tfF.mjs → native-runtime-B7KIafpM.mjs} +8 -7
  96. package/dist/native-source-Y0yLhFyQ.mjs +133 -0
  97. package/dist/{native-xcode-inputs-CB2iQeWq.mjs → native-xcode-inputs-D_VOfFL7.mjs} +2 -3
  98. package/dist/{native-xcode-ios-CXX39F7o.mjs → native-xcode-ios-BYDOHWLN.mjs} +27 -32
  99. package/dist/offload-worker.d.mts +65 -2
  100. package/dist/offload-worker.mjs +305 -73
  101. package/dist/operation-exec-BW0em61G.mjs +171 -0
  102. package/dist/{ownership-DEmM5vhh.mjs → ownership-C5fo5Edb.mjs} +3 -3
  103. package/dist/{page-CPaHeYqj.mjs → page-DBL2PiUU.mjs} +8 -4
  104. package/dist/{placement-log-BqGbTa61.mjs → placement-log-BnGgJRRZ.mjs} +1 -1
  105. package/dist/{plan-placement-Bwj-IjY1.mjs → plan-placement-DIsMtN-d.mjs} +12 -8
  106. package/dist/{ports-D-MmCTdv.mjs → ports-Cy1RkmuQ.mjs} +3 -3
  107. package/dist/{prebuild-uD_ipCxF.mjs → prebuild-D4JoEAEs.mjs} +49 -14
  108. package/dist/{project-BZNjmW_8.mjs → project-wM_XFTvE.mjs} +16 -16
  109. package/dist/{pull-request-Lfetn8Kr.mjs → pull-request-W1IuLXDt.mjs} +102 -20
  110. package/dist/{pull-request-zjCSAryH.d.mts → pull-request-eODyIqZF.d.mts} +6 -2
  111. package/dist/pull-requests.d.mts +2 -2
  112. package/dist/pull-requests.mjs +2 -2
  113. package/dist/{react-native-android-DuzH0cn3.mjs → react-native-android-6OZ7MSM7.mjs} +71 -48
  114. package/dist/{react-native-build-rhk4smwQ.mjs → react-native-build-Dvd8hC21.mjs} +8 -8
  115. package/dist/{react-native-doctor-CQpuIMso.mjs → react-native-doctor-DsoSF1Y9.mjs} +7 -7
  116. package/dist/{react-native-ios-Bhq1rJeV.mjs → react-native-ios-4u1Rn-GR.mjs} +40 -26
  117. package/dist/{recordings-DYteQSu4.mjs → recordings-CQmfzAh7.mjs} +1 -1
  118. package/dist/registration-BcRgF6Ox.mjs +51 -0
  119. package/dist/{reload-CmTRFJaX.mjs → reload-BzkYabB-.mjs} +16 -15
  120. package/dist/{reload-DzjSl5P_.mjs → reload-D7AVlb8N.mjs} +1 -1
  121. package/dist/{remote-ByYkXdGD.mjs → remote-DjGDmlTZ.mjs} +18 -15
  122. package/dist/{result-DNiS-tTP.mjs → result-D2Ykz_iD.mjs} +24 -23
  123. package/dist/{run-D23HmJMs.mjs → run-DidHghD1.mjs} +3 -2
  124. package/dist/{selection-CSl9i5qU.mjs → selection-DSMbWEX2.mjs} +6 -5
  125. package/dist/{server-bare-CxTrvDg8.mjs → server-bare-CafzuyFB.mjs} +2 -2
  126. package/dist/{server-command-CtzloH3v.mjs → server-command-C6QjeupS.mjs} +5 -5
  127. package/dist/{server-expo-DT_F_uVI.mjs → server-expo-CrjB29pq.mjs} +7 -5
  128. package/dist/server-expo-D58c9L0M.mjs +2 -0
  129. package/dist/{settings-CsJDEXgK.mjs → settings-C7O8A6ZI.mjs} +223 -243
  130. package/dist/{settings-T1gtc3bf.mjs → settings-DpR-1Wnn.mjs} +1 -1
  131. package/dist/{settings-write-HyVZ8eQ8.mjs → settings-write-CzD60rOD.mjs} +7 -6
  132. package/dist/settings.schema.json +13 -0
  133. package/dist/{simslim-Cgk17SXV.mjs → simslim-BNckWpXi.mjs} +2 -2
  134. package/dist/{slot-launch-DF8VfT64.mjs → slot-launch-CbfmNgM6.mjs} +6 -6
  135. package/dist/{stage-BIS0ydsV.mjs → stage-Bps5oius.mjs} +21 -4
  136. package/dist/{start-RChynRDp.mjs → start-Br-oxqMD.mjs} +1 -1
  137. package/dist/{start-7lpH7hmN.mjs → start-EojN4WFz.mjs} +622 -393
  138. package/dist/{state-C4ZtUisW.mjs → state--smjFSTL.mjs} +22 -7
  139. package/dist/{state-XMziexv2.mjs → state-08I3hw3_.mjs} +2 -2
  140. package/dist/{stats-53T7OTb9.mjs → stats-D3GerlFW.mjs} +5 -5
  141. package/dist/{stats-report-BFfMpWWF.mjs → stats-report-BzaPrRm6.mjs} +1 -1
  142. package/dist/{status-DqEUSSxs.mjs → status-BRROykC8.mjs} +2 -2
  143. package/dist/{status-CSi6tlRq.mjs → status-EvrK72L2.mjs} +1 -1
  144. package/dist/{status-BL7jVyAB.mjs → status-WBDajew2.mjs} +43 -29
  145. package/dist/{status-watch-GDCfqpTE.mjs → status-watch-Bg_u-pwR.mjs} +48 -16
  146. package/dist/status-worker.mjs +1 -1
  147. package/dist/{stim-desktop-C12we7lz.mjs → stim-desktop-D5OGpYZM.mjs} +2 -2
  148. package/dist/{stop-Bk_1qiV6.mjs → stop-DTZ9uTw3.mjs} +2 -2
  149. package/dist/{stop-D7h6jAXQ.mjs → stop-Dky10AEJ.mjs} +31 -22
  150. package/dist/{stop-CPzlM1L-.mjs → stop-Mv6W9FAk.mjs} +15 -16
  151. package/dist/supervisor-run.d.mts +3 -3
  152. package/dist/supervisor-run.mjs +28 -36
  153. package/dist/{support-Dlu37g6H.mjs → support-CNioewsd.mjs} +10 -10
  154. package/dist/{support-67vraa1Q.mjs → support-yUiOjnVY.mjs} +8 -8
  155. package/dist/swiftpm-artifact-inputs-DFcGsXDP.mjs +153 -0
  156. package/dist/swiftpm-macos-BIak-Rxv.mjs +532 -0
  157. package/dist/toolchain-BY8X8HXx.mjs +2 -0
  158. package/dist/{toolchain-Hp9sCpK4.mjs → toolchain-DpJMHq0n.mjs} +9 -6
  159. package/dist/{trigger-BAahxUPq.mjs → trigger-Cbyc41d_.mjs} +3 -3
  160. package/dist/trigger-yb_nFzPF.mjs +2 -0
  161. package/dist/{warm-progress-BHX5r0Ei.mjs → warm-progress-CA3TgT3-.mjs} +29 -16
  162. package/dist/web-CZ07gd77.mjs +2 -0
  163. package/dist/{web-CJmIj6AI.mjs → web-DKx6yoFA.mjs} +11 -10
  164. package/dist/web-run.mjs +11 -9
  165. package/dist/windows-report.mjs +1 -1
  166. package/dist/{workspace-state-Cjuigeeu.mjs → workspace-state-U08dEzhG.mjs} +3 -3
  167. package/dist/{workspaces-BccMFmGQ.mjs → workspaces-CpANmBlq.mjs} +594 -266
  168. package/dist/{worktree-DQ6Zi2Mv.mjs → worktree-CHecZ4Oq.mjs} +850 -551
  169. package/dist/worktree-ZqZVjD9K.mjs +2 -0
  170. package/dist/{xcode-Zlx3qjEs.mjs → xcode-BXn9-xYx.mjs} +5 -5
  171. package/package.json +7 -7
  172. package/shim/android-audio/Main.java +24 -0
  173. package/shim/android-audio/README.md +17 -0
  174. package/shim/android-audio.jar +0 -0
  175. package/dist/gc-C-WwL0yi.mjs +0 -3
  176. package/dist/git-C3iTsJaZ.mjs +0 -73
  177. package/dist/server-expo-C-90EhcG.mjs +0 -2
  178. package/dist/settings-DkdmlelE.d.mts +0 -15
  179. package/dist/swiftpm-macos-p8WZbxKU.mjs +0 -130
  180. package/dist/toolchain-DhKwp9iI.mjs +0 -2
  181. package/dist/trigger-Bf3uDcpv.mjs +0 -2
  182. package/dist/web-DknQETPs.mjs +0 -2
  183. package/dist/workspace-process-lock-1_1OoVW5.mjs +0 -57
  184. package/dist/worktree-CK2MpJW5.mjs +0 -2
@@ -1,9 +1,10 @@
1
- import { c as stopDeclaringSpawnsOn, f as ownership_claim_exports, i as declareSpawnsOn, p as process_identity_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { c as declareSpawnsOn, f as stopDeclaringSpawnsOn, g as process_identity_exports, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
2
  import { m as workspaceLogsDir$1, v as withDirLock$1, y as withDirLockAsync$1 } from "./paths-DQtTgsBf.mjs";
3
- import { H as deviceSlotKey, J as validateDeviceSlot, W as parseDeviceSlotKey, d as getConfigDir } from "./config-CYcBF478.mjs";
4
- import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-B1UrjZHL.mjs";
5
- import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-Cjuigeeu.mjs";
6
- import { h as resolveBuild } from "./build-cache-DmyR9Zzc.mjs";
3
+ import { U as parseDeviceSlotKey, V as deviceSlotKey, d as getConfigDir, q as validateDeviceSlot } from "./config-DlrsduwG.mjs";
4
+ import { a as formatElapsed, i as formatDuration, m as shortHash } from "./command-output-gwpm28fu.mjs";
5
+ import { n as runOperationFileQuiet } from "./operation-exec-BW0em61G.mjs";
6
+ import { c as withWorkspaceStateLock, d as writeWorkspaceState, l as withWorkspaceStateLockAsync, n as clearWorkspaceStateKeys, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
7
+ import { h as resolveBuild } from "./build-cache-Dv7RN200.mjs";
7
8
  import { randomBytes } from "node:crypto";
8
9
  import { closeSync, fstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
9
10
  import { homedir } from "node:os";
@@ -1092,12 +1093,17 @@ function createDeviceProcessTables() {
1092
1093
  }
1093
1094
  };
1094
1095
  }
1095
- async function readHostProcessTableAsync() {
1096
- const output = await getExecutor().runFileQuietAsync("ps", [
1096
+ async function readHostProcessTableAsync(signal, operation) {
1097
+ const output = await runOperationFileQuiet(operation, getExecutor(), "ps", [
1097
1098
  "-axww",
1098
1099
  "-o",
1099
1100
  HOST_PROCESS_COLUMNS
1100
- ], { timeoutMs: 1e4 });
1101
+ ], {
1102
+ timeoutMs: 1e4,
1103
+ killSignal: "SIGKILL",
1104
+ signal,
1105
+ cwd: operation?.cwd
1106
+ });
1101
1107
  return output === null ? null : parseProcessTable(output);
1102
1108
  }
1103
1109
  /** Reads bounded host/instrumentation children asynchronously, sharing observations across device targets. */
@@ -1115,13 +1121,15 @@ function createActivityReaderAsync(options = {}) {
1115
1121
  android: (serial) => androidValues.get(serial) ?? null
1116
1122
  }
1117
1123
  });
1118
- return async (target) => {
1119
- host ??= readHostProcessTableAsync();
1124
+ const probe = async (target) => {
1125
+ options.signal?.throwIfAborted();
1126
+ host ??= readHostProcessTableAsync(options.signal, options.operation);
1120
1127
  hostValue = await host;
1128
+ options.signal?.throwIfAborted();
1121
1129
  if (target.platform === "android") {
1122
1130
  let pending = android.get(target.id);
1123
1131
  if (!pending) {
1124
- pending = exec.runFileQuietAsync("adb", [
1132
+ pending = runOperationFileQuiet(options.operation, exec, "adb", [
1125
1133
  "-s",
1126
1134
  target.id,
1127
1135
  "shell",
@@ -1129,13 +1137,26 @@ function createActivityReaderAsync(options = {}) {
1129
1137
  "-A",
1130
1138
  "-o",
1131
1139
  "PID,ARGS"
1132
- ], { timeoutMs: 5e3 });
1140
+ ], {
1141
+ timeoutMs: 5e3,
1142
+ killSignal: "SIGKILL",
1143
+ signal: options.signal,
1144
+ cwd: process.platform === "win32" ? homedir() : options.operation?.cwd
1145
+ });
1133
1146
  android.set(target.id, pending);
1134
1147
  }
1135
1148
  androidValues.set(target.id, await pending);
1136
1149
  }
1150
+ options.signal?.throwIfAborted();
1137
1151
  return read(target);
1138
1152
  };
1153
+ let queued = Promise.resolve();
1154
+ return (target) => {
1155
+ if (!options.operation) return probe(target);
1156
+ const result = queued.then(() => probe(target));
1157
+ queued = result;
1158
+ return result;
1159
+ };
1139
1160
  }
1140
1161
  function workspaceDeviceRecency(root) {
1141
1162
  const recency = [];
@@ -1,8 +1,8 @@
1
- import { p as process_identity_exports } from "./exec-_UbtCQcG.mjs";
2
- import { P as formatBytes } from "./config-CYcBF478.mjs";
3
- import { o as formatLongDuration } from "./command-output-B1UrjZHL.mjs";
4
- import { M as canonical, N as measureDu, P as writeUsageCache, c as listWorkspaceDirs } from "./workspaces-BccMFmGQ.mjs";
5
- import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-BzVfHSrY.mjs";
1
+ import { g as process_identity_exports } from "./exec-DEoAhcze.mjs";
2
+ import { P as formatBytes } from "./config-DlrsduwG.mjs";
3
+ import { o as formatLongDuration } from "./command-output-gwpm28fu.mjs";
4
+ import { F as writeUsageCache, N as canonical, P as measureDu, c as listWorkspaceDirs } from "./workspaces-CpANmBlq.mjs";
5
+ import { c as parseAgentDeviceRecord, o as envDir, u as processMatches } from "./activity-CMLmzp7o.mjs";
6
6
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
7
7
  import { homedir } from "node:os";
8
8
  import { isAbsolute, join, relative, sep } from "node:path";
@@ -17,7 +17,7 @@ async function getSwiftpmCacheUsage({ maxAgeMs = 6e5, operation } = {}) {
17
17
  const age = cached ? Date.now() - Date.parse(cached.measuredAt) : Infinity;
18
18
  if (cached && cached.dir === dir && age >= 0 && age < maxAgeMs) return cached;
19
19
  const present = existsSync(dir);
20
- const result = present ? await measureDu(["-sk", dir]) : null;
20
+ const result = present ? await measureDu(["-sk", dir], operation) : null;
21
21
  const bytes = present ? result?.complete ? result.sizes.get(dir) ?? null : null : 0;
22
22
  const usage = {
23
23
  version: 1,
@@ -296,7 +296,7 @@ async function getAgentDeviceUsage({ maxAgeMs = MAX_AGE_MS, operation } = {}) {
296
296
  const sizes = /* @__PURE__ */ new Map();
297
297
  let complete = true;
298
298
  const measure = async (args) => {
299
- const result = await measureDu(args);
299
+ const result = await measureDu(args, operation);
300
300
  complete &&= result.complete;
301
301
  for (const [dir, bytes] of result.sizes) sizes.set(dir, bytes);
302
302
  };
@@ -1,40 +1,40 @@
1
- import { f as ownership_claim_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
2
  import { m as workspaceLogsDir$1, t as emulatorLogFile } from "./paths-DQtTgsBf.mjs";
3
- import { E as upsertProject, G as parseDeviceSlotOption, J as validateDeviceSlot, U as deviceSlotPlatforms, V as deviceSlotFileKey, p as getProject, u as getConcurrencyLimits } from "./config-CYcBF478.mjs";
4
- import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
5
- import { d as writeWorkspaceState, i as recordWorkspaceUse, r as readWorkspaceState$1 } from "./workspace-state-Cjuigeeu.mjs";
6
- import { G as resolveCacheProviderConfig, H as remoteEasFallbackSetting, J as resolveProjectSettingsAsync, L as projectSettingsContextAsync, N as metroWarmupUrlSetting, R as publicUrlSetting, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, ct as detectProviders, g as deviceReclaimIdleMinutesSetting, j as metroPortSetting, rt as tunnelModeSetting } from "./settings-CsJDEXgK.mjs";
7
- import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunch } from "./project-BZNjmW_8.mjs";
3
+ import { B as deviceSlotFileKey, E as upsertProject, H as deviceSlotPlatforms, W as parseDeviceSlotOption, p as getProject, q as validateDeviceSlot, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
4
+ import { _ as stepTimer, f as refuseNoProject, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-gwpm28fu.mjs";
5
+ import { d as writeWorkspaceState, i as recordWorkspaceUse, r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
6
+ import { G as resolveCacheProviderConfig, H as remoteEasFallbackSetting, J as resolveProjectSettingsAsync, L as projectSettingsContextAsync, N as metroWarmupUrlSetting, R as publicUrlSetting, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, ct as detectProviders, g as deviceReclaimIdleMinutesSetting, j as metroPortSetting, rt as tunnelModeSetting } from "./settings-C7O8A6ZI.mjs";
7
+ import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot$1, l as projectShortcut, t as NO_PROJECT_REFUSAL, z as writeWorkspaceLaunch } from "./project-wM_XFTvE.mjs";
8
8
  import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
9
- import { f as resolveProjectMetro, l as pidExists } from "./metro-DEXpIhHC.mjs";
10
- import { Bn as checkEasAuth, Bt as ensureMetroReachable, Cn as launchAndroidApp, Gt as resolveRemoteContext, H as tapBuildLog, In as runProcessOperation, J as recordRunStats, Jn as resolveRemote, K as recordCapacityRefusal, Lt as binOnPath, M as NO_BUILD_PROGRESS, Pn as exitAfterFlush, U as createRunRecorder, Ut as remoteAndroidDeps, V as startBuildProgress, Vt as ensureRemoteBootOwned, W as readRunEstimates, Y as statsProjectKey$1, Yn as uploadRemote, cn as DEFAULT_METRO_PORT, in as verifyLaunch, qn as resolveEasCliBin, rn as verifyAndroidReleaseLaunch, rr as ownedSessionName, sn as ADB_INSTALL_TIMEOUT_MS, t as budgetGate, wn as launchAndroidReleaseApp, yn as installAndroidApp } from "./budget-Bs6SxxzO.mjs";
11
- import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-DY_RLx3C.mjs";
12
- import { F as acquireBuildSlot, L as releaseBuildSlot } from "./workspaces-BccMFmGQ.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BzVfHSrY.mjs";
14
- import { $ as resolvePhysicalDevice, P as listInstalledSystemImages, Q as resolveOwnedAvdSerialAsync, Y as probeEmulatorSerial, a as androidDeviceAbi, it as waitForBoot, k as listAdbDevices, ot as configuredAndroidEmulatorApp, q as physicalDeviceModel } from "./android-DUYkNF4u.mjs";
15
- import { t as CCACHE_NOT_RUN } from "./ccache-BJRZ9pG3.mjs";
16
- import { f as setRemoteLogSink } from "./client-UXD70ZbM.mjs";
17
- import { i as parseBuildMachineOption, s as resolveBuildPlacement } from "./selection-CSl9i5qU.mjs";
18
- import { r as hostedMetroSettings } from "./metro-gateway-BMJNlj3E.mjs";
19
- import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-DvFX-K_l.mjs";
20
- import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-Bw-honsd.mjs";
21
- import { n as verifyCollectorOwnership } from "./ownership-DEmM5vhh.mjs";
22
- import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-DF8VfT64.mjs";
23
- import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-C8raGFoP.mjs";
24
- import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-CMlqEcvw.mjs";
25
- import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-BomfRnFT.mjs";
26
- import { c as startDevServer } from "./start-7lpH7hmN.mjs";
27
- import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-Dg1Q7tfF.mjs";
28
- import { n as devicePlacementRecord } from "./placement-log-BqGbTa61.mjs";
29
- import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-67vraa1Q.mjs";
30
- import { t as acquireAndroidArtifact } from "./artifact-DAuZ-FNU.mjs";
31
- import { a as reportAndroidResult, c as resolveAndroidRunPlan, i as persistLastBuild, n as finishAndroidUpload, o as androidDeviceSelectorRefusal } from "./result-DNiS-tTP.mjs";
32
- import { n as automaticDevicePlacement, r as devicePlacementLine, t as checkEasFallback } from "./eas-fallback-DJwZpy0c.mjs";
33
- import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-ExJq8Ei7.mjs";
34
- import { t as selectFromPool } from "./device-pool-DMRpVX9a.mjs";
35
- import { r as finishAndroidRun } from "./launch-CD1yVc7U.mjs";
9
+ import { c as pidExists, d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
10
+ import { Bn as checkEasAuth, Bt as ensureMetroReachable, Cn as launchAndroidApp, Gt as resolveRemoteContext, H as tapBuildLog, In as runProcessOperation, J as recordRunStats, Jn as resolveRemote, K as recordCapacityRefusal, Lt as binOnPath, M as NO_BUILD_PROGRESS, Pn as exitAfterFlush, U as createRunRecorder, Ut as remoteAndroidDeps, V as startBuildProgress, Vt as ensureRemoteBootOwned, W as readRunEstimates, Y as statsProjectKey$1, Yn as uploadRemote, cn as DEFAULT_METRO_PORT, in as verifyLaunch, qn as resolveEasCliBin, rn as verifyAndroidReleaseLaunch, rr as ownedSessionName, sn as ADB_INSTALL_TIMEOUT_MS, t as budgetGate, wn as launchAndroidReleaseApp, yn as installAndroidApp } from "./budget-Cvwn54qV.mjs";
11
+ import { d as runCancellationSignal, f as withNativeBuildRun, r as cancelledFailure, u as runCancellation } from "./native-run-NwUuxbkg.mjs";
12
+ import { I as acquireBuildSlot, R as releaseBuildSlot } from "./workspaces-CpANmBlq.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-CMLmzp7o.mjs";
14
+ import { A as listAdbDevices, I as listInstalledSystemImages, Y as physicalDeviceModel, Z as probeEmulatorSerial, a as androidDeviceAbi, ct as configuredAndroidEmulatorApp, et as resolveOwnedAvdSerialAsync, ot as waitForBoot, tt as resolvePhysicalDevice } from "./android-C7sVmyI9.mjs";
15
+ import { t as CCACHE_NOT_RUN } from "./ccache-Btwc36-I.mjs";
16
+ import { h as setRemoteLogSink } from "./client-OyRoEuSr.mjs";
17
+ import { i as parseBuildMachineOption, s as resolveBuildPlacement } from "./selection-DSMbWEX2.mjs";
18
+ import { r as hostedMetroSettings } from "./metro-gateway-CKZqKqx7.mjs";
19
+ import { a as writeHostedAndroid, i as writeDevicePlacement, t as readHostedAndroid } from "./ios-state-Dtw5K2aI.mjs";
20
+ import { n as prepareHostedAndroid, t as placeHostedAndroid } from "./hosted-android-B-9f-jkd.mjs";
21
+ import { n as verifyCollectorOwnership } from "./ownership-C5fo5Edb.mjs";
22
+ import { r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-CbfmNgM6.mjs";
23
+ import { c as startDevServer } from "./start-EojN4WFz.mjs";
24
+ import { a as acquireRunLease, d as runLease, f as waitFlagConflict, o as leaseExpiryText, u as releaseLeaseOnAbort } from "./device-lease-run-xJPQ_QQG.mjs";
25
+ import { n as DeviceAdmissionRefusal, r as checkDeviceCapacity } from "./device-capacity-DK5_EwRS.mjs";
26
+ import { a as resolveEasDevelopmentBuild, r as isEasBuildFailure } from "./eas-build-CwknaQYj.mjs";
27
+ import { n as ensureWorkspaceStorageSafely, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-B7KIafpM.mjs";
28
+ import { n as devicePlacementRecord } from "./placement-log-BnGgJRRZ.mjs";
29
+ import { S as pooledAndroidDevice, a as PLATFORM, b as noDeviceDiagnostic, g as dumpApkManifest, h as displayPath, o as androidBuildOptions, p as apkPackage, r as NO_DEVICE, s as androidDevClientScheme } from "./support-yUiOjnVY.mjs";
30
+ import { t as acquireAndroidArtifact } from "./artifact-DJPy518Y.mjs";
31
+ import { a as reportAndroidResult, c as resolveAndroidRunPlan, i as persistLastBuild, n as finishAndroidUpload, o as androidDeviceSelectorRefusal } from "./result-D2Ykz_iD.mjs";
32
+ import { n as automaticDevicePlacement, r as devicePlacementLine, t as checkEasFallback } from "./eas-fallback-CSgAulr5.mjs";
33
+ import { a as AvdRecoveryError, i as AvdBootError, n as ensureBooted, o as warmMetro, r as ensureOwnedDevice, t as didSetUpDevice } from "./device-B-L3Fbxy.mjs";
34
+ import { t as selectFromPool } from "./device-pool-BMkdsefq.mjs";
35
+ import { r as finishAndroidRun } from "./launch-CCzXlc8r.mjs";
36
36
  import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
37
- import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-CaFskB7_.mjs";
37
+ import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-DUC8Ka9y.mjs";
38
38
  import { basename, join } from "node:path";
39
39
  import { workspaceId } from "@stim-cli/core";
40
40
  import { hostedAndroidStatus, parseMachine } from "@stim-cli/core/state";
@@ -111,7 +111,7 @@ async function selectAndroidPlacement({ target: selected, automatic = automaticD
111
111
  })
112
112
  };
113
113
  }
114
- const refusal = localSelectors(selected);
114
+ const refusal = await localSelectors(selected);
115
115
  if (refusal) return { failure: refusal };
116
116
  try {
117
117
  const placed = await automatic({
@@ -278,26 +278,33 @@ function runOnlyFlag(opts) {
278
278
  if (opts.metroCheck === false) return "--no-metro-check";
279
279
  return null;
280
280
  }
281
- async function planAndroid(opts, overrides = {}) {
281
+ async function readAndroidBuildPlan(operation, opts, overrides = {}) {
282
282
  const deps = {
283
283
  findRoot: findProjectRoot$1,
284
284
  projectRegistry,
285
285
  ...overrides
286
286
  };
287
- const json = Boolean(opts.json);
288
287
  const flag = runOnlyFlag(opts);
289
- if (flag) return refusePlan(planFlagRefusal(flag), json);
290
- const root = deps.findRoot(process.cwd());
291
- if (!root) return refusePlan(NO_PROJECT_REFUSAL, json);
288
+ if (flag) return { refusal: planFlagRefusal(flag) };
289
+ const root = deps.findRoot(operation.projectRoot);
290
+ if (!root) return { refusal: NO_PROJECT_REFUSAL };
292
291
  const selected = deps.projectRegistry.selectAndroid(root);
293
- if ("problem" in selected) return refusePlan({
292
+ if ("problem" in selected) return { refusal: {
294
293
  code: "STIM_NO_PROJECT",
295
294
  ...selected.problem
296
- }, json);
297
- const resolved = await resolveProjectSettingsAsync(root);
295
+ } };
296
+ const resolved = await resolveProjectSettingsAsync(root, {
297
+ env: operation.env,
298
+ signal: operation.signal
299
+ });
298
300
  const planner = (await selected.load(resolved)).plan;
299
- if (!planner) return refusePlan(unsupportedPlan("android"), json);
300
- const { value: result, interrupted } = await runProcessOperation(root, (operation) => planner(opts, resolved, operation));
301
+ if (!planner) return { refusal: unsupportedPlan("android") };
302
+ operation.signal.throwIfAborted();
303
+ return planner(opts, resolved, operation);
304
+ }
305
+ async function planAndroid(opts, overrides = {}) {
306
+ const json = Boolean(opts.json);
307
+ const { value: result, interrupted } = await runProcessOperation(process.cwd(), (operation) => readAndroidBuildPlan(operation, opts, overrides));
301
308
  if ("platform" in result) printPlan(result, json);
302
309
  else refusePlan(result.refusal, json, result.lines);
303
310
  if (interrupted) process.exitCode = interrupted;
@@ -582,7 +589,7 @@ async function runAndroid(options = {}) {
582
589
  const recordRun = stats.record;
583
590
  let ccacheActivity = CCACHE_NOT_RUN;
584
591
  let reclaimed = [];
585
- const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], lines = [], logPath = null, lease } = {}) => {
592
+ const fail = (code, message, remedy, { lastBuildStatus = false, setup = false, diagnostics = [], buildDiagnostics: rawDiagnostics = [], retainedClaimRoots, lines = [], logPath = null, lease } = {}) => {
586
593
  const cancellation = cancelledFailure(context, PLATFORM, {
587
594
  code,
588
595
  message
@@ -623,7 +630,8 @@ async function runAndroid(options = {}) {
623
630
  error: {
624
631
  code,
625
632
  message,
626
- remedy: remedy ?? null
633
+ remedy: remedy ?? null,
634
+ ...retainedClaimRoots ? { retainedClaimRoots } : {}
627
635
  }
628
636
  };
629
637
  };
@@ -662,10 +670,11 @@ async function runAndroid(options = {}) {
662
670
  const { code, message, remedy } = placement.failure;
663
671
  return fail(code, message, remedy, { setup: true });
664
672
  }
665
- const planned = resolveAndroidRunPlan({
673
+ const planned = await resolveAndroidRunPlan({
666
674
  settings,
667
675
  settingsContext,
668
676
  env: context.env,
677
+ signal: context.signal,
669
678
  slot,
670
679
  easProfile,
671
680
  variant: variantFlag,
@@ -733,6 +742,7 @@ async function runAndroid(options = {}) {
733
742
  }) } : {},
734
743
  localSelectors: (target) => androidDeviceSelectorRefusal({
735
744
  settingsContext,
745
+ signal: context.signal,
736
746
  slot,
737
747
  systemImageFlag,
738
748
  deviceProfileFlag,
@@ -834,7 +844,8 @@ async function runAndroid(options = {}) {
834
844
  code: gate.code,
835
845
  message: gate.message,
836
846
  remedy: gate.remedy,
837
- lines: gate.lines
847
+ lines: gate.lines,
848
+ ...gate.retainedClaimRoots ? { retainedClaimRoots: gate.retainedClaimRoots } : {}
838
849
  }
839
850
  };
840
851
  metroPort = gate.port;
@@ -870,8 +881,11 @@ async function runAndroid(options = {}) {
870
881
  const useBuildCache = buildPlan.cache.read;
871
882
  const preparation = await runtime.prepare();
872
883
  if (!preparation.ok) {
873
- const { code, message, remedy, lines } = preparation.error;
874
- return fail(code, message, remedy, { lines });
884
+ const { code, message, remedy, lines, retainedClaimRoots } = preparation.error;
885
+ return fail(code, message, remedy, {
886
+ lines,
887
+ retainedClaimRoots
888
+ });
875
889
  }
876
890
  const runtimePreparation = preparation.prepared;
877
891
  metroPort = runtimePreparation.metroPort;
@@ -1304,4 +1318,4 @@ async function runAndroid(options = {}) {
1304
1318
  }
1305
1319
  }
1306
1320
  //#endregion
1307
- export { runAndroidOperation as i, registerAndroid as n, runAndroid as r, androidCommand as t };
1321
+ export { readAndroidBuildPlan as a, runAndroidOperation as i, registerAndroid as n, runAndroid as r, androidCommand as t };