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,17 +1,17 @@
1
- import { _ as debugLog, f as ownership_claim_exports, n as isTimeoutError, t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { b as debugLog, n as isTimeoutError, r as WorkspaceProcessCleanupError, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
2
  import { d as workspaceDir, n as ensureWorkspaceStorage, v as withDirLock } from "./paths-DQtTgsBf.mjs";
3
- import { f as agentKey, m as discoverAgentSessions, o as updateWorkspaceState, p as attributeAgentSessions } from "./workspace-state-Cjuigeeu.mjs";
4
- import { Dt as linkedWorktreesOnDisk, bt as gitCommonDirOnDisk } from "./settings-CsJDEXgK.mjs";
5
- import { i as gitQuietAsync, n as gitAsync, t as git$1 } from "./git-C3iTsJaZ.mjs";
6
- import { z as ownedAvdDirectory } from "./android-DUYkNF4u.mjs";
7
- import { o as pullRequestLookups } from "./pull-request-Lfetn8Kr.mjs";
3
+ import { l as gitQuietAsync, o as git$1, s as gitAsync } from "./operation-exec-BW0em61G.mjs";
4
+ import { f as agentKey, m as discoverAgentSessions, o as updateWorkspaceState, p as attributeAgentSessions } from "./workspace-state-U08dEzhG.mjs";
5
+ import { wt as linkedWorktreesOnDisk, yt as gitCommonDirOnDisk } from "./settings-C7O8A6ZI.mjs";
6
+ import { V as ownedAvdDirectory } from "./android-C7sVmyI9.mjs";
7
+ import { s as pullRequestLookups } from "./pull-request-W1IuLXDt.mjs";
8
+ import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
8
9
  import { randomUUID } from "node:crypto";
9
10
  import { existsSync, mkdirSync, readdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
10
11
  import { homedir } from "node:os";
11
12
  import { basename, dirname, join, sep } from "node:path";
12
13
  import { ENDED_AGENT_RETENTION_MS, READY_PHASE_MS, WARM_KEY, agentSessionsCacheFile, diskUsageCacheFile, diskUsageFailureFile, diskUsageWalkClaims, pullRequestCacheFile, readAgentSessionsCache, readDiskUsage, readDiskUsageFailure, readEndedAgentSessions, readPullRequestCache, readWarmRecord, readWorkspaceAgent, readWorkspaceState, workspaceEndedAgentsFile, workspaceEndedAgentsLock } from "@stim-cli/core/state";
13
14
  import { captureProcessIdentity } from "@stim-cli/core/process-identity";
14
- import { clearClaimChild, markClaimChildPending, releaseClaim, setClaimChild, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
15
15
  //#region src/workspace/merge-state.ts
16
16
  const FETCH_TIMEOUT_MS = 3e4;
17
17
  /** How old a fetch or a cached lookup can be and still count as fresh. */
@@ -270,44 +270,50 @@ function mergeState(path, target, { timeoutMs = GIT_TIMEOUT_MS$1, maxCommits = M
270
270
  return step.value;
271
271
  }
272
272
  /** `mergeState` without blocking the event loop during Git reads. */
273
- async function mergeStateAsync(path, target, { timeoutMs = GIT_TIMEOUT_MS$1, maxCommits = MAX_MERGE_STATE_COMMITS } = {}) {
273
+ async function mergeStateAsync(path, target, { timeoutMs = GIT_TIMEOUT_MS$1, maxCommits = MAX_MERGE_STATE_COMMITS, ...execution } = {}) {
274
274
  const reads = mergeStateReads(target, maxCommits);
275
275
  let step = reads.next();
276
276
  while (!step.done) {
277
+ execution.signal?.throwIfAborted();
277
278
  const { args, options } = step.value;
278
279
  try {
279
280
  step = reads.next(await gitAsync(path, args, {
281
+ ...execution,
280
282
  timeoutMs,
281
283
  ...options
282
284
  }));
283
285
  } catch (error) {
286
+ if (error instanceof WorkspaceProcessCleanupError || error instanceof Error && "reportCleanup" in error) throw error;
287
+ execution.signal?.throwIfAborted();
284
288
  step = reads.throw(error);
285
289
  }
286
290
  }
291
+ execution.signal?.throwIfAborted();
287
292
  return step.value;
288
293
  }
289
294
  /** The last fetch timestamp, or null, read without blocking on Git. */
290
- async function lastFetchedAtAsync(repo) {
295
+ async function lastFetchedAtAsync(repo, execution = {}) {
291
296
  return fetchTime(await gitQuietAsync(repo, [
292
297
  "rev-parse",
293
298
  "--path-format=absolute",
294
299
  "--git-path",
295
300
  "FETCH_HEAD"
296
- ]));
301
+ ], execution));
297
302
  }
298
303
  /** The existing origin/HEAD target, or a refusal, without fetching or blocking on Git. */
299
- async function localDefaultBranchAsync(repo) {
304
+ async function localDefaultBranchAsync(repo, execution = {}) {
300
305
  return defaultBranch(repo, await gitQuietAsync(repo, [
301
306
  "symbolic-ref",
302
307
  "--quiet",
303
308
  "refs/remotes/origin/HEAD"
304
- ]));
309
+ ], execution));
305
310
  }
306
311
  /** Refreshes origin/HEAD without credential prompts when the last fetch is at least ten minutes old. */
307
- async function fetchDefaultBranchAsync(repo, now = Date.now()) {
308
- const target = await localDefaultBranchAsync(repo);
312
+ async function fetchDefaultBranchAsync(repo, now = Date.now(), execution = {}) {
313
+ execution.signal?.throwIfAborted();
314
+ const target = await localDefaultBranchAsync(repo, execution);
309
315
  if ("error" in target) return target;
310
- const at = await lastFetchedAtAsync(repo);
316
+ const at = await lastFetchedAtAsync(repo, execution);
311
317
  if (at !== null && now - at < 6e5) return target;
312
318
  const branch = target.ref.slice(20);
313
319
  try {
@@ -319,11 +325,18 @@ async function fetchDefaultBranchAsync(repo, now = Date.now()) {
319
325
  "origin",
320
326
  `+refs/heads/${branch}:${target.ref}`
321
327
  ], {
328
+ ...execution,
322
329
  write: true,
323
330
  timeoutMs: FETCH_TIMEOUT_MS,
324
- env: { GIT_TERMINAL_PROMPT: "0" }
331
+ env: {
332
+ ...execution.env,
333
+ GIT_TERMINAL_PROMPT: "0"
334
+ },
335
+ omitEnv: execution.omitEnv?.filter((name) => name !== "GIT_TERMINAL_PROMPT")
325
336
  });
326
337
  } catch (error) {
338
+ if (error instanceof WorkspaceProcessCleanupError || error instanceof Error && "reportCleanup" in error) throw error;
339
+ execution.signal?.throwIfAborted();
327
340
  return { error: `git fetch origin ${branch} failed: ${failure(error)}` };
328
341
  }
329
342
  return target;
@@ -0,0 +1,2 @@
1
+ import { n as webCommand, t as runWeb } from "./web-DKx6yoFA.mjs";
2
+ export { webCommand as default, runWeb };
@@ -1,13 +1,13 @@
1
1
  import { m as workspaceLogsDir } from "./paths-DQtTgsBf.mjs";
2
- import { E as upsertProject, p as getProject } from "./config-CYcBF478.mjs";
3
- import { f as refuseNoProject, l as phaseLine } from "./command-output-B1UrjZHL.mjs";
4
- import { i as recordWorkspaceUse } from "./workspace-state-Cjuigeeu.mjs";
5
- import { J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, et as settingShapeErrors } from "./settings-CsJDEXgK.mjs";
6
- import { f as projectRegistry, n as findCommandWorkspace } from "./project-BZNjmW_8.mjs";
7
- import { o as readWebRecord, r as cdpEndpoint } from "./state-C4ZtUisW.mjs";
8
- import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-C12we7lz.mjs";
9
- import { t as liveWebRecord } from "./page-CPaHeYqj.mjs";
10
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-Dg1Q7tfF.mjs";
2
+ import { E as upsertProject, p as getProject } from "./config-DlrsduwG.mjs";
3
+ import { f as refuseNoProject, l as phaseLine } from "./command-output-gwpm28fu.mjs";
4
+ import { i as recordWorkspaceUse } from "./workspace-state-U08dEzhG.mjs";
5
+ import { J as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, et as settingShapeErrors } from "./settings-C7O8A6ZI.mjs";
6
+ import { f as projectRegistry, n as findCommandWorkspace } from "./project-wM_XFTvE.mjs";
7
+ import { o as readWebRecord, r as cdpEndpoint } from "./state--smjFSTL.mjs";
8
+ import { a as workspaceLinkLine, o as workspaceLinks } from "./stim-desktop-D5OGpYZM.mjs";
9
+ import { t as liveWebRecord } from "./page-DBL2PiUU.mjs";
10
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-B7KIafpM.mjs";
11
11
  import chalk from "chalk";
12
12
  //#region src/commands/web.ts
13
13
  const printNote = (line) => console.error(line);
@@ -58,7 +58,8 @@ async function runWeb({ root, headed, note, context }) {
58
58
  const { url } = prepared;
59
59
  const launch = await runtime.launch(prepared, {
60
60
  root,
61
- note
61
+ note,
62
+ signal: context?.signal
62
63
  });
63
64
  if (!launch.ok) return launch;
64
65
  const { verdict, remedy } = await runtime.verify(prepared, { since: launch.since });
package/dist/web-run.mjs CHANGED
@@ -1,13 +1,13 @@
1
- import { f as ownership_claim_exports, p as process_identity_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
2
- import { Qt as cancellableSleep } from "./settings-CsJDEXgK.mjs";
1
+ import { g as process_identity_exports, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
+ import { u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
3
3
  import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
4
- import { p as signalProcessTree } from "./metro-DEXpIhHC.mjs";
5
- import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state-C4ZtUisW.mjs";
6
- import { l as probeWebDrivers } from "./activity-BzVfHSrY.mjs";
7
- import { r as recordCreatedDevice } from "./created-devices-CqeBlrEn.mjs";
8
- import { t as connectOwnedBrowser } from "./cdp-CWmIUMbw.mjs";
9
- import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-B6tfCta1.mjs";
10
- import { t as relaunchWithLogFile } from "./detached-entry-DFRyG1_o.mjs";
4
+ import { f as signalProcessTree } from "./metro-DiXtA3Ty.mjs";
5
+ import { c as webClaimRoot, f as webLogFile, g as chromeProcessState, h as writeWebRecord, i as clearWebRecord, l as webDir, n as browserLogFile, p as webProfileDir, s as updateWebRecord, v as liveProfileHolder, y as removeSingletonFiles } from "./state--smjFSTL.mjs";
6
+ import { l as probeWebDrivers } from "./activity-CMLmzp7o.mjs";
7
+ import { i as recordCreatedDevice } from "./created-devices-x9rN6bhs.mjs";
8
+ import { t as connectOwnedBrowser } from "./cdp-3fwICjzi.mjs";
9
+ import { t as relaunchWithLogFile } from "./detached-entry-BwNEtIrP.mjs";
10
+ import { i as chromeArgs, n as DESKTOP_PAGE, r as PHONE_SCREEN } from "./chrome-Bbw689-6.mjs";
11
11
  import { existsSync, mkdirSync, openSync, realpathSync } from "node:fs";
12
12
  import { isAbsolute, resolve } from "node:path";
13
13
  import { LOG_ROTATE_BYTES } from "@stim-cli/core";
@@ -517,6 +517,7 @@ async function runWebSupervisor(options, { onExit = (code) => process.exit(code)
517
517
  startedAt: (/* @__PURE__ */ new Date()).toISOString(),
518
518
  ...options.launchId ? { launchId: options.launchId } : {}
519
519
  });
520
+ process.send?.("web-registered", () => {});
520
521
  const fd = openSync(browserLogFile(root), "a");
521
522
  (0, ownership_claim_exports.markClaimChildPending)(claim);
522
523
  chrome = getExecutor().spawn(options.chrome, chromeArgs({
@@ -734,6 +735,7 @@ async function runWebSupervisor(options, { onExit = (code) => process.exit(code)
734
735
  targetId,
735
736
  version
736
737
  });
738
+ process.send?.("web-registered", () => {});
737
739
  log("info", "web_browser_started", `browser supervisor pid ${process.pid} runs ${version} (pid ${pid}) on ${profile}`);
738
740
  connection.send("Page.navigate", { url: options.url }, sessionId).catch((error) => {
739
741
  log("debug", "web_navigation_slow", `Page.navigate did not answer: ${describe(error)}; the page may still load`);
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
2
  //#region bin/windows-report.ts
3
3
  const request = JSON.parse(process.env.STIM_REPORT_CHILD ?? "");
4
4
  const env = { ...process.env };
@@ -1,7 +1,7 @@
1
- import { p as process_identity_exports, t as getExecutor } from "./exec-_UbtCQcG.mjs";
1
+ import { g as process_identity_exports, t as getExecutor } from "./exec-DEoAhcze.mjs";
2
2
  import { _ as workspaceStateLock, g as workspaceStateFile$1, n as ensureWorkspaceStorage, r as ensureWorkspaceStorageAsync, v as withDirLock, y as withDirLockAsync } from "./paths-DQtTgsBf.mjs";
3
- import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-CYcBF478.mjs";
4
- import { ot as workspaceHiddenSetting } from "./settings-CsJDEXgK.mjs";
3
+ import { A as writeConfigSettingAsync, k as writeConfigSetting, m as getProjectSettings } from "./config-DlrsduwG.mjs";
4
+ import { ot as workspaceHiddenSetting } from "./settings-C7O8A6ZI.mjs";
5
5
  import { existsSync, mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
6
6
  import { homedir } from "node:os";
7
7
  import { dirname, isAbsolute, join, relative } from "node:path";