stim 1.30.0 → 1.31.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 (144) hide show
  1. package/dist/{acquire-artifact-CrZ4rEbI.mjs → acquire-artifact-P84h3ssa.mjs} +1 -1
  2. package/dist/{act-BaKjDWGw.mjs → act-lcOIEy32.mjs} +18 -18
  3. package/dist/{activity-BTaUf0tc.mjs → activity-Dw4N_RFe.mjs} +4 -4
  4. package/dist/{agent-device-usage-output-DYBpO17K.mjs → agent-device-usage-output-Boie2yB-.mjs} +4 -4
  5. package/dist/{android-BEQUDpOg.mjs → android-BeeC15Ve.mjs} +1 -1
  6. package/dist/{android-BWqdDK6R.mjs → android-DhiWSOFU.mjs} +41 -39
  7. package/dist/{android-DdKG6lyD.mjs → android-DsEj2CCs.mjs} +27 -6
  8. package/dist/{android-BCYLwmH6.mjs → android-aIuJZoDu.mjs} +5 -5
  9. package/dist/{android-cas-BH6K12__.mjs → android-cas-CbumHXIq.mjs} +4 -4
  10. package/dist/api.mjs +26 -26
  11. package/dist/{apk-signed-tail-B8kw4a8K.mjs → apk-signed-tail-B9Usseps.mjs} +2 -2
  12. package/dist/{artifact-DTHXcmQ3.mjs → artifact-Cr34-Yyy.mjs} +12 -12
  13. package/dist/{artifact-M6W2l-xh.mjs → artifact-ta3xA0c4.mjs} +12 -12
  14. package/dist/{auto-placement-CZaWDmcY.mjs → auto-placement-DtTRG0rk.mjs} +10 -10
  15. package/dist/{browser-web-JQ7lFej3.mjs → browser-web-DuULNZrS.mjs} +11 -11
  16. package/dist/{build-C2ZWoCmg.mjs → build-BpFFbdXD.mjs} +22 -22
  17. package/dist/{build-cache-DlC3owap.mjs → build-cache-BsKim4V7.mjs} +4 -4
  18. package/dist/{build-plan-J3iRR3gI.mjs → build-plan-DH1rT11x.mjs} +6 -6
  19. package/dist/{cache-manifest-evF_zJ9U.mjs → cache-manifest-CfiEny4T.mjs} +1 -1
  20. package/dist/cache-manifest.mjs +1 -1
  21. package/dist/{ccache-B8gY50-h.mjs → ccache-DVDO2ocE.mjs} +15 -15
  22. package/dist/{cli-xRPXJPtA.mjs → cli-C0jjwTuM.mjs} +18 -18
  23. package/dist/cli.mjs +1 -1
  24. package/dist/{client-DrHykA24.mjs → client-DhJOvSvh.mjs} +4 -4
  25. package/dist/collector-run.mjs +4 -4
  26. package/dist/{command-output-BBW8eWPL.mjs → command-output-VrXd6qPX.mjs} +1 -1
  27. package/dist/{config-AbUjIBOQ.mjs → config-D5qNWJEP.mjs} +2 -2
  28. package/dist/{dependencies-vUh9mp5z.mjs → dependencies-DIU-5rnG.mjs} +37 -37
  29. package/dist/{dependency-state-CPKAKCZ8.mjs → dependency-state-DZVln1P9.mjs} +1 -1
  30. package/dist/{dev-client-CASgAOu7.mjs → dev-client-DeAg0fso.mjs} +2 -2
  31. package/dist/{device-ChnO7bR9.mjs → device-C2WsPgFt.mjs} +12 -12
  32. package/dist/{device-CsIdRXfm.mjs → device-DuNLOlR6.mjs} +11 -11
  33. package/dist/{device-android-CcdQqQWg.mjs → device-android-BjhH0Ru3.mjs} +20 -14
  34. package/dist/{device-capacity-C5C_jOQd.mjs → device-capacity-Du5wBTNJ.mjs} +173 -74
  35. package/dist/device-host-worker.mjs +19 -15
  36. package/dist/{device-ios-DbmtPIiw.mjs → device-ios-CUYUhSYO.mjs} +8 -8
  37. package/dist/{device-lease-run-Do6zYA7y.mjs → device-lease-run-CHXQEn-7.mjs} +4 -4
  38. package/dist/{device-pool-CpoYiCGO.mjs → device-pool-kUHO7MHO.mjs} +3 -3
  39. package/dist/{device-provision-B5Ms94qY.mjs → device-provision-e7bKS7lx.mjs} +8 -8
  40. package/dist/{doctor-CpfbYh3Q.mjs → doctor-B6kIVgU9.mjs} +1 -1
  41. package/dist/{doctor-CLE4AZEI.mjs → doctor-BGcsAgAV.mjs} +15 -15
  42. package/dist/doctor-fingerprint.mjs +1 -1
  43. package/dist/{doctor-CJSB5q-s.mjs → doctor-hva3sd9f.mjs} +36 -25
  44. package/dist/{doctor-watchman-D1IyMle9.mjs → doctor-watchman-DJY550yz.mjs} +4 -4
  45. package/dist/{eas-build-DIDOHw2P.mjs → eas-build-CBFgseh1.mjs} +2 -2
  46. package/dist/{eas-fallback-DVS9oBSc.mjs → eas-fallback-DFXdz4d6.mjs} +4 -4
  47. package/dist/{eas-session-ledger-CW3l-inB.mjs → eas-session-ledger-aFBLTZr2.mjs} +19 -6
  48. package/dist/{error-diagnostics-XJ9eWdtq.mjs → error-diagnostics-CCsq_3uG.mjs} +8 -8
  49. package/dist/{gc-Co7PE36D.mjs → gc-B0K4d_PL.mjs} +17 -17
  50. package/dist/{gc-BVIcxCxE.mjs → gc-DASUa3Z_.mjs} +2 -2
  51. package/dist/{guide-DkepBgHT.mjs → guide-Civo5-zV.mjs} +74 -21
  52. package/dist/{hosted-android-Du7NxufJ.mjs → hosted-android-CH1Sm4wo.mjs} +3 -3
  53. package/dist/{hosted-client-Cect92SZ.mjs → hosted-client-5ur3YpxY.mjs} +36 -12
  54. package/dist/{hosted-logs-Opcjv1Lr.mjs → hosted-logs-BYg4yeti.mjs} +6 -6
  55. package/dist/{hosted-logs-sync-wsI7N1Hv.mjs → hosted-logs-sync-BPe8xnMu.mjs} +5 -5
  56. package/dist/{hosted-macos-BP9Kucat.mjs → hosted-macos-BagT0Gn3.mjs} +5 -5
  57. package/dist/{hosted-native-DmdLSmvu.mjs → hosted-native-kaR4nUHk.mjs} +6 -6
  58. package/dist/{idle-shutdown-BcMN_cLm.mjs → idle-shutdown-BWHQ7mQG.mjs} +6 -6
  59. package/dist/{ios-BFkBHuRT.mjs → ios-BKR-Dq46.mjs} +8 -8
  60. package/dist/{ios-CXnoVO_z.mjs → ios-CdAV4-1E.mjs} +4 -4
  61. package/dist/{ios-CG0IsLtt.mjs → ios-DUL68MI5.mjs} +32 -31
  62. package/dist/{ios-device-ClSfuu-_.mjs → ios-device-Dz8gFZ0K.mjs} +1 -1
  63. package/dist/{ios-project-BM9TbTE7.mjs → ios-project-Br1tVYWX.mjs} +7 -7
  64. package/dist/{ios-state-Ce_dystM.mjs → ios-state-BEIJRJ7P.mjs} +1 -1
  65. package/dist/{js-swap-9Rx-5Nqz.mjs → js-swap-BfG8XpyS.mjs} +4 -4
  66. package/dist/{launch-DvJV1Mx4.mjs → launch-CrGndh8T.mjs} +19 -19
  67. package/dist/{lightened-23pqe7LS.mjs → lightened-DZ9Ip0T3.mjs} +4 -4
  68. package/dist/{logs-Pkeh3wZk.mjs → logs-C-hfMsxK.mjs} +5 -5
  69. package/dist/{logs-DJgZlf2K.mjs → logs-DpIKWT3A.mjs} +7 -7
  70. package/dist/{macos-Du07NsOB.mjs → macos-DNmKwfDy.mjs} +1 -1
  71. package/dist/{macos-DPvPQadc.mjs → macos-DZ9ZSolN.mjs} +19 -19
  72. package/dist/macos-run.mjs +1 -1
  73. package/dist/maintenance-run.mjs +5 -5
  74. package/dist/{metro-BMQHczcf.mjs → metro-mKHEMO-a.mjs} +2 -2
  75. package/dist/{metro-request-BtF7ox53.mjs → metro-request-RDhyx85c.mjs} +1 -1
  76. package/dist/{named-ports-DcktE2Pw.mjs → named-ports-B0hCk2v-.mjs} +2 -2
  77. package/dist/{native-android-CBOM1_gB.mjs → native-android-DExhFqR6.mjs} +16 -16
  78. package/dist/{native-gradle-artifact-inputs-D_iAfPuS.mjs → native-gradle-artifact-inputs-Bcmbdc23.mjs} +3 -3
  79. package/dist/{native-runtime-D4cTwU0Z.mjs → native-runtime-D4qgnjK_.mjs} +6 -6
  80. package/dist/{native-xcode-inputs-BF-ogSnG.mjs → native-xcode-inputs-EWma1lXh.mjs} +2 -2
  81. package/dist/{native-xcode-ios-DwJBfMP6.mjs → native-xcode-ios-Y6rzmWTc.mjs} +15 -15
  82. package/dist/offload-worker.mjs +19 -19
  83. package/dist/{ownership-Dtz9G5Gl.mjs → ownership-CCfiBfOP.mjs} +2 -2
  84. package/dist/{phone-reverses-CvhhkGMH.mjs → phone-reverses-Drj5QQCh.mjs} +4 -4
  85. package/dist/{placement-log-CRR_TE1r.mjs → placement-log-CFT8SnlS.mjs} +1 -1
  86. package/dist/{plan-placement-CdLc-pTb.mjs → plan-placement-DhKCH_wF.mjs} +6 -6
  87. package/dist/{ports-g4N_cfyg.mjs → ports-BNtJ5DCj.mjs} +3 -3
  88. package/dist/{prebuild-DBJMhwSS.mjs → prebuild-D0hvmO4j.mjs} +9 -9
  89. package/dist/{project-DPQjnpcI.mjs → project-DCLkDM8C.mjs} +15 -15
  90. package/dist/{react-native-android-idMWOwkX.mjs → react-native-android-Dp7vctEA.mjs} +22 -22
  91. package/dist/{react-native-build-BSoh4HkH.mjs → react-native-build-vK2lFYfN.mjs} +7 -7
  92. package/dist/{react-native-doctor-CYibY8-4.mjs → react-native-doctor-BtWzwZHU.mjs} +5 -5
  93. package/dist/{react-native-ios-13KIIOOy.mjs → react-native-ios-DW1Ax3Yv.mjs} +14 -14
  94. package/dist/{recordings-CHMaF73C.mjs → recordings-BWnIlhZH.mjs} +1 -1
  95. package/dist/{reload-BUQI3dSu.mjs → reload-B-d7-CsI.mjs} +14 -14
  96. package/dist/{reload-B9DZOjcV.mjs → reload-BS_ntVV_.mjs} +1 -1
  97. package/dist/{remote-C-RGHhAP.mjs → remote-DScVlaMz.mjs} +8 -8
  98. package/dist/{result-W4HCum4A.mjs → result-Epkl6gyG.mjs} +16 -16
  99. package/dist/{run-BQAmrohh.mjs → run-2CHAJ9Oj.mjs} +1 -1
  100. package/dist/{selection-PCMT97XD.mjs → selection-C95m--1_.mjs} +3 -3
  101. package/dist/{server-bare-CEQdB_F4.mjs → server-bare-CFyVFZXJ.mjs} +1 -1
  102. package/dist/{server-command-oqi3TDy7.mjs → server-command-B1gDRJB2.mjs} +4 -4
  103. package/dist/{server-expo-C1K07shx.mjs → server-expo-CP4dURQp.mjs} +2 -2
  104. package/dist/server-expo-D3k9mvP8.mjs +2 -0
  105. package/dist/{settings-D776ygML.mjs → settings-C6UTYW2K.mjs} +1 -1
  106. package/dist/{settings-CKlMOmhj.mjs → settings-CjTRNCi3.mjs} +2 -2
  107. package/dist/{settings-payload-CE-NZ6Lq.mjs → settings-payload-zf5EnCTg.mjs} +4 -4
  108. package/dist/{settings-write-D7Xwa_-M.mjs → settings-write-Fe0K6BeC.mjs} +5 -5
  109. package/dist/settings.schema.json +45 -3
  110. package/dist/{simslim-CbpHERcv.mjs → simslim-93xmPh-d.mjs} +1 -1
  111. package/dist/{slot-launch-CeIK1iUI.mjs → slot-launch-B4MHzVX2.mjs} +6 -6
  112. package/dist/{stage-Blqe6bWb.mjs → stage-DDrnM0CY.mjs} +1 -1
  113. package/dist/{start-CvP2pJjc.mjs → start-BXl5tkv8.mjs} +1 -1
  114. package/dist/{start-B7J5a9nS.mjs → start-LSwIFlBv.mjs} +10 -10
  115. package/dist/{state-D5ZxwCGJ.mjs → state-CM_HvvkS.mjs} +2 -2
  116. package/dist/{state-C2AUjjhg.mjs → state-CiflgxTP.mjs} +1 -1
  117. package/dist/{stats-Uo7l8OAk.mjs → stats-EgpYD536.mjs} +4 -4
  118. package/dist/{status-_rWXFSO7.mjs → status-BLDvhatv.mjs} +26 -25
  119. package/dist/{status-CqJI1TgG.mjs → status-DBMD7ZQT.mjs} +1 -1
  120. package/dist/{status-CK7ZoEhV.mjs → status-GQ-JqvRi.mjs} +1 -1
  121. package/dist/{status-watch-CnSyXUmj.mjs → status-watch-BwG4lJ1q.mjs} +4 -4
  122. package/dist/status-worker.mjs +1 -1
  123. package/dist/{stim-desktop-CYXLFpFS.mjs → stim-desktop-1XxET4S8.mjs} +1 -1
  124. package/dist/{stop-Bogo9oO2.mjs → stop-4SAV_RR8.mjs} +2 -2
  125. package/dist/{stop-CMVfaA-6.mjs → stop-BfNhzvXO.mjs} +4 -4
  126. package/dist/{stop-CnF9ixYe.mjs → stop-WyrZQuX6.mjs} +15 -15
  127. package/dist/supervisor-run.mjs +13 -13
  128. package/dist/{support-BGqpYMV8.mjs → support-Cffz6_Ft.mjs} +4 -4
  129. package/dist/{support-DUevTPur.mjs → support-Cs24xRQa.mjs} +9 -9
  130. package/dist/{swiftpm-artifact-inputs-BcJk6-3u.mjs → swiftpm-artifact-inputs-yp8D5LE4.mjs} +1 -1
  131. package/dist/{swiftpm-macos-DBrmoocG.mjs → swiftpm-macos-D0CzQtpp.mjs} +8 -8
  132. package/dist/{toolchain-Cw9VVHOY.mjs → toolchain-BEra9AIX.mjs} +1 -1
  133. package/dist/{toolchain-DLdoyxIt.mjs → toolchain-CGdgD4x4.mjs} +4 -4
  134. package/dist/{warm-progress-DQ2wQZKp.mjs → warm-progress-_aTMvkIH.mjs} +3 -3
  135. package/dist/{web-g9U7L1sR.mjs → web-BE89ONcc.mjs} +8 -8
  136. package/dist/web-DQPxvFVD.mjs +2 -0
  137. package/dist/web-run.mjs +4 -4
  138. package/dist/{workspace-state-DGwkPXwq.mjs → workspace-state-3bF4TB8P.mjs} +2 -2
  139. package/dist/{workspaces-7_RWoi6c.mjs → workspaces-BNEyJ1B_.mjs} +15 -12
  140. package/dist/{worktree-qKJ3x07S.mjs → worktree-BTrii9e_.mjs} +24 -24
  141. package/dist/{worktree-DEet9H3p.mjs → worktree-DB3Ypdj6.mjs} +1 -1
  142. package/package.json +7 -7
  143. package/dist/server-expo-BUFAq2In.mjs +0 -2
  144. package/dist/web-CI_qCRPw.mjs +0 -2
@@ -1,18 +1,18 @@
1
- import { Q as doctorIo, _ as loadConfig$1, p as getProject, tt as keyConfirmer } from "./config-AbUjIBOQ.mjs";
2
- import { f as refuseNoProject, l as phaseLine } from "./command-output-BBW8eWPL.mjs";
3
- import { Bt as repoRoot, z as projectSettingsContextAsync } from "./settings-D776ygML.mjs";
4
- import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-DPQjnpcI.mjs";
5
- import { Qn as inspectWatchmanMemory, f as inspectBudget, l as budgetLine, nr as memorySweepIsScoped } from "./ccache-B8gY50-h.mjs";
6
- import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-CW3l-inB.mjs";
7
- import { L as detectXcodeMajorAsync } from "./toolchain-DLdoyxIt.mjs";
8
- import { H as memoryCulpritFindings, U as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-CXnoVO_z.mjs";
9
- import { s as offloadCheck } from "./client-DrHykA24.mjs";
10
- import { g as configuredMachines, p as inspectBuildMachines, v as inspectDeviceHostMachines } from "./selection-PCMT97XD.mjs";
11
- import { r as maintenanceStatus, t as maintenanceLine } from "./status-CK7ZoEhV.mjs";
12
- import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-D1IyMle9.mjs";
13
- import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-CJSB5q-s.mjs";
14
- import { h as resolveDeviceType, v as resolveRuntime } from "./support-DUevTPur.mjs";
15
- import { t as confirmInTerminal } from "./device-provision-B5Ms94qY.mjs";
1
+ import { $ as doctorIo, m as getProject, nt as keyConfirmer, v as loadConfig$1 } from "./config-D5qNWJEP.mjs";
2
+ import { f as refuseNoProject, l as phaseLine } from "./command-output-VrXd6qPX.mjs";
3
+ import { Bt as repoRoot, z as projectSettingsContextAsync } from "./settings-C6UTYW2K.mjs";
4
+ import { f as projectRegistry, t as NO_PROJECT_REFUSAL } from "./project-DCLkDM8C.mjs";
5
+ import { Qn as inspectWatchmanMemory, f as inspectBudget, l as budgetLine, nr as memorySweepIsScoped } from "./ccache-DVDO2ocE.mjs";
6
+ import { c as inspectStimVersions, s as compareStimVersions } from "./eas-session-ledger-aFBLTZr2.mjs";
7
+ import { L as detectXcodeMajorAsync } from "./toolchain-CGdgD4x4.mjs";
8
+ import { H as memoryCulpritFindings, U as readMemoryCulpritsAsync, f as listAllIosSimsAsync, h as listIosRuntimesAsync, l as iosRuntimeMatches, x as pickDefaultIosCreation } from "./ios-CdAV4-1E.mjs";
9
+ import { s as offloadCheck } from "./client-DhJOvSvh.mjs";
10
+ import { g as configuredMachines, p as inspectBuildMachines, v as inspectDeviceHostMachines } from "./selection-C95m--1_.mjs";
11
+ import { r as maintenanceStatus, t as maintenanceLine } from "./status-GQ-JqvRi.mjs";
12
+ import { a as writeIgnoreDirs, c as recordDoctorRun, i as watchedCheckouts, n as inspectNestedWorktrees, r as nestedWorktreeFinding } from "./doctor-watchman-DJY550yz.mjs";
13
+ import { c as checkWorktreeStorageLayout, l as readMachineSettings, o as runDoctor } from "./doctor-hva3sd9f.mjs";
14
+ import { h as resolveDeviceType, v as resolveRuntime } from "./support-Cs24xRQa.mjs";
15
+ import { t as confirmInTerminal } from "./device-provision-e7bKS7lx.mjs";
16
16
  import { isJsonObject, maintenanceNdjsonFile, readHostedAppMetadata, readHostedSessions } from "@stim-cli/core/state";
17
17
  import { dirname, join, sep } from "path";
18
18
  import chalk from "chalk";
@@ -1,4 +1,4 @@
1
- import { m as fingerprintProject } from "./build-cache-DlC3owap.mjs";
1
+ import { m as fingerprintProject } from "./build-cache-BsKim4V7.mjs";
2
2
  import * as fingerprint from "@expo/fingerprint";
3
3
  //#region bin/doctor-fingerprint.ts
4
4
  let input = "";
@@ -1,28 +1,28 @@
1
1
  import { C as reportSignal, T as trackReportResource, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { T as workspaceDerivedData, r as readWorkspaceState$1, y as sharedBuildCache } from "./workspace-state-DGwkPXwq.mjs";
3
- import { _ as loadConfig$1, ot as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-AbUjIBOQ.mjs";
4
- import { d as quotedPath, u as plural } from "./command-output-BBW8eWPL.mjs";
2
+ import { T as workspaceDerivedData, r as readWorkspaceState$1, y as sharedBuildCache } from "./workspace-state-3bF4TB8P.mjs";
3
+ import { p as getPlatformDeviceLimits, s as configCorruptRepair, st as realIo, u as getConcurrencyLimits, v as loadConfig$1 } from "./config-D5qNWJEP.mjs";
4
+ import { d as quotedPath, u as plural } from "./command-output-VrXd6qPX.mjs";
5
5
  import { l as gitQuietAsync, o as git } from "./operation-exec-Dp4FuIGR.mjs";
6
- import { Bt as repoRoot, D as iosSimSlimProfileSetting, E as iosSimSlimDefaultSetting, G as remoteIosSetting, Nt as locallyKnownUpstreamAsync, Q as resolveSettings, R as projectSettingsContext, St as gitCommonDirAsync, U as remoteAndroidSetting, V as readCommittedSettings, Vt as repoRootAsync, Wt as resolveSourceCheckoutAsync, Y as resolveIosProjectDir, a as SETTING_SHAPE_REMEDY, an as makeTemporaryDirectory, at as settingsLayers, cn as temporaryRoot, ct as webSettings, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, in as filesystemDevice, it as settingValueAt, jt as listWorktreesAsync, k as mergeSettingsLayers, m as defaultAndroidLayout, q as resolveAndroidLayout, r as PATH_SETTINGS, rt as settingShapeErrors, st as unknownSettingKeys, tt as settingOrigin, yt as dirtyFingerprintFiles } from "./settings-D776ygML.mjs";
7
- import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-DPQjnpcI.mjs";
8
- import { A as hostSystemImageArch, ft as POOL_SETTING_REMEDY, o as androidHome, vt as parkedMaxSetting } from "./android-DdKG6lyD.mjs";
9
- import { An as checkEasAuth$1, Fn as providerFromConfig, Gn as easCliSupport, Kn as easCliUpgradeRemedy, Ln as resolveEasCliBin, Pn as ownerFromConfig, Wn as MIN_EAS_CLI_SIMULATOR_VERSION, a as projectCmakeLauncher, i as ccacheInstallCommand, jt as readInstalledEasCliVersionAsync } from "./ccache-B8gY50-h.mjs";
10
- import { wt as listBuildSlots } from "./workspaces-7_RWoi6c.mjs";
11
- import { X as podInstallCommand } from "./toolchain-DLdoyxIt.mjs";
12
- import { N as listBuildLocks } from "./activity-BTaUf0tc.mjs";
13
- import { m as fingerprintProject, o as diffFingerprintSources } from "./build-cache-DlC3owap.mjs";
14
- import { F as hostMemoryPressureAdvice, z as readHostMemoryPressureAsync } from "./ios-CXnoVO_z.mjs";
6
+ import { Bt as repoRoot, D as iosSimSlimProfileSetting, E as iosSimSlimDefaultSetting, G as remoteIosSetting, Nt as locallyKnownUpstreamAsync, Q as resolveSettings, R as projectSettingsContext, St as gitCommonDirAsync, U as remoteAndroidSetting, V as readCommittedSettings, Vt as repoRootAsync, Wt as resolveSourceCheckoutAsync, Y as resolveIosProjectDir, a as SETTING_SHAPE_REMEDY, an as makeTemporaryDirectory, at as settingsLayers, cn as temporaryRoot, ct as webSettings, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, in as filesystemDevice, it as settingValueAt, jt as listWorktreesAsync, k as mergeSettingsLayers, m as defaultAndroidLayout, q as resolveAndroidLayout, r as PATH_SETTINGS, rt as settingShapeErrors, st as unknownSettingKeys, tt as settingOrigin, yt as dirtyFingerprintFiles } from "./settings-C6UTYW2K.mjs";
7
+ import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-DCLkDM8C.mjs";
8
+ import { bt as parkedMaxSetting, j as hostSystemImageArch, mt as POOL_SETTING_REMEDY, o as androidHome } from "./android-DsEj2CCs.mjs";
9
+ import { An as checkEasAuth$1, Fn as providerFromConfig, Gn as easCliSupport, Kn as easCliUpgradeRemedy, Ln as resolveEasCliBin, Pn as ownerFromConfig, Wn as MIN_EAS_CLI_SIMULATOR_VERSION, a as projectCmakeLauncher, i as ccacheInstallCommand, jt as readInstalledEasCliVersionAsync } from "./ccache-DVDO2ocE.mjs";
10
+ import { wt as listBuildSlots } from "./workspaces-BNEyJ1B_.mjs";
11
+ import { X as podInstallCommand } from "./toolchain-CGdgD4x4.mjs";
12
+ import { N as listBuildLocks } from "./activity-Dw4N_RFe.mjs";
13
+ import { m as fingerprintProject, o as diffFingerprintSources } from "./build-cache-BsKim4V7.mjs";
14
+ import { F as hostMemoryPressureAdvice, z as readHostMemoryPressureAsync } from "./ios-CdAV4-1E.mjs";
15
15
  import { p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-DHm_U5gv.mjs";
16
- import { n as hasInstalledDependencies, r as installedNpmTreeIsValidAsync, t as dependencyState } from "./dependency-state-CPKAKCZ8.mjs";
17
- import { g as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-BSoh4HkH.mjs";
18
- import { a as envSettingRefusal, i as configSettingRefusal } from "./settings-payload-CE-NZ6Lq.mjs";
19
- import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-C5C_jOQd.mjs";
16
+ import { n as hasInstalledDependencies, r as installedNpmTreeIsValidAsync, t as dependencyState } from "./dependency-state-DZVln1P9.mjs";
17
+ import { g as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-vK2lFYfN.mjs";
18
+ import { a as envSettingRefusal, i as configSettingRefusal } from "./settings-payload-zf5EnCTg.mjs";
19
+ import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-Du5wBTNJ.mjs";
20
20
  import { t as readDoctorFingerprint } from "./doctor-fingerprint-o7ZI9YLn.mjs";
21
21
  import { i as probeSigningIdentities } from "./ios-signing-BJzvDPfU.mjs";
22
22
  import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-DyDWurWG.mjs";
23
- import { n as simslimIsOnPath } from "./simslim-CbpHERcv.mjs";
24
- import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-DIDOHw2P.mjs";
25
- import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-BH6K12__.mjs";
23
+ import { n as simslimIsOnPath } from "./simslim-93xmPh-d.mjs";
24
+ import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-CBFgseh1.mjs";
25
+ import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-CbumHXIq.mjs";
26
26
  import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
27
27
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
28
28
  import { LAST_BUILD_KEYS, REPLACED_SETTINGS, isJsonObject, readBuildHistory, readJsonObject, readStats, replacementAdvice, settingDefinition } from "@stim-cli/core/state";
@@ -656,9 +656,18 @@ function checkEasAuth({ provider, owner = null, auth = null } = {}) {
656
656
  if (status.code === "wrong-account") return finding("note", `EAS is authenticated as ${status.account}, but this project's owner is ${status.owner}`, `A session on an account that does not cover ${status.owner} cannot read or write that account's builds, so the shared cache silently does nothing here. This is a NOTE and not a hard failure on purpose: \`eas whoami\` only enumerates accounts for some actors (a robot prints a display name that is not an account name at all), the list may be incomplete, and access is the server's decision rather than this list's. Confirm before acting on it.`, status.remedy ?? null);
657
657
  return null;
658
658
  }
659
- function checkConcurrency({ maxBuilds = 0, maxDevices = 0, liveDevices = 0, activeBuilds = 0 } = {}) {
660
- if (!maxBuilds && !maxDevices) return null;
661
- return finding("note", "Concurrency limits are set", `${`maxBuilds ${maxBuilds || "unlimited"}, maxDevices ${maxDevices || "unlimited"}`}. Right now ${typeof liveDevices === "number" ? `${liveDevices} Stim device(s) are booted` : `the number of booted Stim devices is unknown (${liveDevices.unknown})`} and ${activeBuilds} build slot(s) are in use on this machine. At the device cap a new \`stim ios\`/\`android\` waits in FIFO order for 600s (--wait changes it; --no-wait refuses with STIM_AT_CAPACITY); at the build cap a compile waits for a free slot.`, null);
659
+ function checkConcurrency({ maxBuilds = 0, maxDevices = 0, platformMax = {
660
+ ios: 0,
661
+ android: 0,
662
+ macos: 0
663
+ }, liveDevices = 0, activeBuilds = 0 } = {}) {
664
+ const platformCaps = [
665
+ ["ios", "maxIosDevices"],
666
+ ["android", "maxAndroidDevices"],
667
+ ["macos", "maxMacosApps"]
668
+ ].filter(([platform]) => platformMax[platform] > 0);
669
+ if (!maxBuilds && !maxDevices && !platformCaps.length) return null;
670
+ return finding("note", "Concurrency limits are set", `${[`maxBuilds ${maxBuilds || "unlimited"}, maxDevices ${maxDevices || "unlimited"}`, ...platformCaps.map(([platform, setting]) => `${setting} ${platformMax[platform]}`)].join(", ")}. Right now ${typeof liveDevices === "number" ? `${liveDevices} Stim device(s) are booted` : `the number of booted Stim devices is unknown (${liveDevices.unknown})`} and ${activeBuilds} build slot(s) are in use on this machine. At the device cap a new \`stim ios\`/\`android\` waits in FIFO order for 600s (--wait changes it; --no-wait refuses with STIM_AT_CAPACITY); at the build cap a compile waits for a free slot.` + (platformCaps.length ? " A per-platform cap bounds its platform alone, and a boot must also fit maxDevices; maxMacosApps bounds hosted macOS apps only." : ""), null);
662
671
  }
663
672
  async function easCliOutsideRepository(projectRoot, operation) {
664
673
  const found = (String(getExecutor().findExecutable("eas") ?? "").split("\n")[0] ?? "").trim();
@@ -797,9 +806,11 @@ async function runDoctor(projectRoot, options = {}, inspectors = []) {
797
806
  };
798
807
  const limits = typeof concurrency === "function" ? concurrency() : concurrency;
799
808
  let concurrencyFinding = null;
800
- if (limits && (limits.maxBuilds || limits.maxDevices)) concurrencyFinding = checkConcurrency({
801
- maxBuilds: limits.maxBuilds,
802
- maxDevices: limits.maxDevices,
809
+ const platformMax = getPlatformDeviceLimits();
810
+ if (limits && (limits.maxBuilds || limits.maxDevices) || platformMax.ios || platformMax.android || platformMax.macos) concurrencyFinding = checkConcurrency({
811
+ maxBuilds: limits?.maxBuilds,
812
+ maxDevices: limits?.maxDevices,
813
+ platformMax,
803
814
  liveDevices: liveDevices ? liveDevices() : options.operation ? await countLiveOwnedDevicesAsync(options.operation) : countLiveOwnedDevices(),
804
815
  activeBuilds: activeBuilds ? activeBuilds() : countActiveBuilds()
805
816
  });
@@ -1,8 +1,8 @@
1
- import { E as upsertProject, O as withConfigLockAsync$1, d as getConfigDir, p as getProject } from "./config-AbUjIBOQ.mjs";
1
+ import { D as upsertProject, d as getConfigDir, k as withConfigLockAsync$1, m as getProject } from "./config-D5qNWJEP.mjs";
2
2
  import { l as gitQuietAsync } from "./operation-exec-Dp4FuIGR.mjs";
3
- import { Vt as repoRootAsync, jt as listWorktreesAsync } from "./settings-D776ygML.mjs";
4
- import { f as projectRegistry } from "./project-DPQjnpcI.mjs";
5
- import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-CW3l-inB.mjs";
3
+ import { Vt as repoRootAsync, jt as listWorktreesAsync } from "./settings-C6UTYW2K.mjs";
4
+ import { f as projectRegistry } from "./project-DCLkDM8C.mjs";
5
+ import { d as parseWatchRoots, m as runWatchman, s as compareStimVersions } from "./eas-session-ledger-aFBLTZr2.mjs";
6
6
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
7
7
  import { dirname, isAbsolute, join, relative, sep } from "node:path";
8
8
  import { isJsonObject } from "@stim-cli/core/state";
@@ -1,7 +1,7 @@
1
1
  import { D as ownership_claim_exports, c as throwIfCancelled, t as getExecutor } from "./exec-aULwtNly.mjs";
2
2
  import { a as killOnAbort, r as childEnvironment } from "./operation-exec-Dp4FuIGR.mjs";
3
- import { Gn as easCliSupport, Kn as easCliUpgradeRemedy, Ln as resolveEasCliBin, Vn as remoteCliInvocation } from "./ccache-B8gY50-h.mjs";
4
- import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-BTaUf0tc.mjs";
3
+ import { Gn as easCliSupport, Kn as easCliUpgradeRemedy, Ln as resolveEasCliBin, Vn as remoteCliInvocation } from "./ccache-DVDO2ocE.mjs";
4
+ import { M as acquireBuildLock, P as releaseBuildLock } from "./activity-Dw4N_RFe.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { existsSync, realpathSync, statSync } from "node:fs";
7
7
  //#region src/engine/eas-build.ts
@@ -1,9 +1,9 @@
1
1
  import { c as throwIfCancelled, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { p as getProject } from "./config-AbUjIBOQ.mjs";
2
+ import { m as getProject } from "./config-D5qNWJEP.mjs";
3
3
  import { r as childEnvironment } from "./operation-exec-Dp4FuIGR.mjs";
4
- import { dt as detectProviders, ft as planMetroReach } from "./settings-D776ygML.mjs";
5
- import { M as readMetroTunnel, P as readRemoteSession } from "./project-DPQjnpcI.mjs";
6
- import { Gn as easCliSupport, Hn as remoteCommand, Ln as resolveEasCliBin, Mn as isEasAuthFailureText, Un as MIN_EAS_CLI_DEVICE_VERSION, Wn as MIN_EAS_CLI_SIMULATOR_VERSION, jt as readInstalledEasCliVersionAsync } from "./ccache-B8gY50-h.mjs";
4
+ import { dt as detectProviders, ft as planMetroReach } from "./settings-C6UTYW2K.mjs";
5
+ import { M as readMetroTunnel, P as readRemoteSession } from "./project-DCLkDM8C.mjs";
6
+ import { Gn as easCliSupport, Hn as remoteCommand, Ln as resolveEasCliBin, Mn as isEasAuthFailureText, Un as MIN_EAS_CLI_DEVICE_VERSION, Wn as MIN_EAS_CLI_SIMULATOR_VERSION, jt as readInstalledEasCliVersionAsync } from "./ccache-DVDO2ocE.mjs";
7
7
  //#region src/engine/eas-fallback.ts
8
8
  const AVAILABILITY_TIMEOUT_MS = 3e4;
9
9
  function unusable(code, reason) {
@@ -1,9 +1,9 @@
1
1
  import { C as reportSignal, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { M as withDirLock$1, N as withDirLockAsync$1, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
3
- import { G as projectDeviceSlots, V as deviceSlotKey } from "./config-AbUjIBOQ.mjs";
4
- import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-BBW8eWPL.mjs";
5
- import { n as isInsideProject } from "./metro-BMQHczcf.mjs";
6
- import { r as cdpEndpoint } from "./state-D5ZxwCGJ.mjs";
2
+ import { M as withDirLock$1, N as withDirLockAsync$1, w as workspaceAgentDeviceDir } from "./workspace-state-3bF4TB8P.mjs";
3
+ import { H as deviceSlotKey, K as projectDeviceSlots } from "./config-D5qNWJEP.mjs";
4
+ import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-VrXd6qPX.mjs";
5
+ import { n as isInsideProject } from "./metro-mKHEMO-a.mjs";
6
+ import { r as cdpEndpoint } from "./state-CM_HvvkS.mjs";
7
7
  import { accessSync, constants, existsSync, mkdirSync, realpathSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
8
8
  import { delimiter, dirname, join, resolve } from "node:path";
9
9
  import { workspaceId } from "@stim-cli/core";
@@ -362,7 +362,7 @@ function loadLine({ loadPerCore, busyAt, limit }) {
362
362
  return `load ${loadPerCore}/core (busy at ${busyAt}${limit === null ? "" : `, holding at ${limit}`})`;
363
363
  }
364
364
  /** The plain status lines for the `concurrency.maxBuilds` and `concurrency.maxDevices` caps that are set. */
365
- function slotUsageLines({ builds, devices }) {
365
+ function slotUsageLines({ builds, devices, platformDevices }) {
366
366
  const lines = [];
367
367
  if (builds) {
368
368
  const holders = builds.holders.map((holder) => holder.unresolved ? `slot ${holder.slot} unresolved` : holder.client ? `offloaded for ${holder.client}` : holder.workspace ? basename$1(holder.workspace) : `slot ${holder.slot}`);
@@ -375,6 +375,19 @@ function slotUsageLines({ builds, devices }) {
375
375
  lines.push(`devices ${devices.inUse}/${devices.max} (concurrency.maxDevices)${holders.length ? `: ${holders.join(", ")}` : ""}`);
376
376
  }
377
377
  }
378
+ for (const [platform, setting, noun] of [[
379
+ "ios",
380
+ "concurrency.maxIosDevices",
381
+ "iOS simulators"
382
+ ], [
383
+ "android",
384
+ "concurrency.maxAndroidDevices",
385
+ "Android emulators"
386
+ ]]) {
387
+ const slots = platformDevices?.[platform];
388
+ if (!slots) continue;
389
+ lines.push(slots.inUse === null ? `${noun} ?/${slots.max} (${setting}): ${slots.unknown ?? "not counted"}` : `${noun} ${slots.inUse}/${slots.max} (${setting})`);
390
+ }
378
391
  return lines;
379
392
  }
380
393
  function parseDfFree(output) {
@@ -1,12 +1,12 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
3
- import { H as deviceSlotPlatforms, V as deviceSlotKey, p as getProject } from "./config-AbUjIBOQ.mjs";
4
- import { v as launchErrorPreview } from "./command-output-BBW8eWPL.mjs";
5
- import { I as readWorkspaceLaunches } from "./project-DPQjnpcI.mjs";
6
- import { o as androidHome, u as androidToolCwd } from "./android-DdKG6lyD.mjs";
7
- import { d as resolveProjectMetro } from "./metro-BMQHczcf.mjs";
8
- import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-BEQUDpOg.mjs";
9
- import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-BTaUf0tc.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-3bF4TB8P.mjs";
3
+ import { H as deviceSlotKey, U as deviceSlotPlatforms, m as getProject } from "./config-D5qNWJEP.mjs";
4
+ import { v as launchErrorPreview } from "./command-output-VrXd6qPX.mjs";
5
+ import { I as readWorkspaceLaunches } from "./project-DCLkDM8C.mjs";
6
+ import { o as androidHome, u as androidToolCwd } from "./android-DsEj2CCs.mjs";
7
+ import { d as resolveProjectMetro } from "./metro-mKHEMO-a.mjs";
8
+ import { i as parseLogcatLine, n as androidLogGroups, r as isAndroidCrashText } from "./android-BeeC15Ve.mjs";
9
+ import { S as parseLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-Dw4N_RFe.mjs";
10
10
  import { r as deviceConsoleLevel } from "./ios-device-CiBA-er9.mjs";
11
11
  import { createHash, randomUUID } from "node:crypto";
12
12
  import { existsSync, readFileSync, renameSync } from "node:fs";
@@ -1,24 +1,24 @@
1
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-aULwtNly.mjs";
2
- import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-DGwkPXwq.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-AbUjIBOQ.mjs";
4
- import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-BBW8eWPL.mjs";
2
+ import { E as workspaceDir, u as workspaceLastUsed } from "./workspace-state-3bF4TB8P.mjs";
3
+ import { C as removeProject, F as formatBytes, I as isOnMountedVolume, K as projectDeviceSlots, L as listMountedVolumes, M as acquireAvdClaim, P as directorySizeAsync, R as measuredDirectorySizeAsync, d as getConfigDir, k as withConfigLockAsync$1, v as loadConfig$1, z as volumeRootFor } from "./config-D5qNWJEP.mjs";
4
+ import { d as quotedPath$1, h as shortUdid, o as formatLongDuration, u as plural } from "./command-output-VrXd6qPX.mjs";
5
5
  import { t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
6
- import { $t as TRASH_MANIFEST, Ft as matchWorktreeEntry, Wt as resolveSourceCheckoutAsync, Zt as TRASH_CLAIMS, en as deleteTrashEntry, jt as listWorktreesAsync } from "./settings-D776ygML.mjs";
7
- import { i as findProjectRoot$1, v as detectIsExpo } from "./project-DPQjnpcI.mjs";
8
- import { Ct as forgetCreatedDeviceAsync, I as listAvdsAsync, R as listOrphanedAvdDirectories, V as ownedAvdDirectory, ft as POOL_SETTING_REMEDY, h as avdNameAbsent, vt as parkedMaxSetting, wt as readCreatedDevices$1 } from "./android-DdKG6lyD.mjs";
9
- import { $ as gradleVersionLines, $n as memoryCacheKind, B as includesArchives, Ct as describeError, En as runProcessOperation, F as gcOptionsOf, Ft as withEasProjectLock, G as planCacheEmptying, H as includesRecordings, J as selectsBeyondCaches, Jn as parseArchiveSelector, K as previewScopedEmptying, L as openGcLog, Q as deleteGradleVersions, St as deleteEasSessions, U as includesWorkspaceOutputs, V as includesParkedDevices, W as isWorkspacesScope, X as collectGradleVersions, Y as trimCaches, Zn as collectMemoryReport, _t as findStaleDeviceRecords, ar as scopedMemoryReport, at as DEVICE_LIST_TIMEOUT_MS, bt as withAndroidAvdSizes, ct as collectParkedSims, dt as deleteProjectDevices, er as memoryLines, et as gradleVersionsPending, fr as sizeCaches, gt as findOrphanedDevices, ht as eraseParkedDevices, ir as reclaimMemory, it as collectInventory, lt as deleteParkedAvds, mt as deviceSweepIsScoped, nr as memorySweepIsScoped, ot as collectDeviceLeases, pt as describeUnverifiableDevices, q as selectCaches, rr as memoryWorkPending, rt as getMachineCacheReport, sr as phase, st as collectParkedAvds, tr as memoryScope, tt as includesGradleVersions, ur as discoverCaches, ut as deleteParkedSims, vt as findStaleProjectDevices, wt as withRemoteSessionGcLocks, xt as collectEasSessionSweep, yt as unverifiedDeviceCommand, z as emptyCaches } from "./ccache-B8gY50-h.mjs";
10
- import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-CW3l-inB.mjs";
11
- import { At as mapLimited, Dt as createGcResults, Et as GC_OUTPUT, I as idleDeviceLines, M as collectIdleDevices, Mt as sizeConcurrency, N as collectIdleDevicesAsync, R as parseIdleDuration, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, f as rootPresence, g as ARTIFACT_DIRS, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, n as REBUILD_COST, o as collectWorkspaceOutputs, p as sizeText, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, wt as listBuildSlots, z as shutDownIdleDevices } from "./workspaces-7_RWoi6c.mjs";
6
+ import { $t as TRASH_MANIFEST, Ft as matchWorktreeEntry, Wt as resolveSourceCheckoutAsync, Zt as TRASH_CLAIMS, en as deleteTrashEntry, jt as listWorktreesAsync } from "./settings-C6UTYW2K.mjs";
7
+ import { i as findProjectRoot$1, v as detectIsExpo } from "./project-DCLkDM8C.mjs";
8
+ import { B as listOrphanedAvdDirectories, Et as readCreatedDevices$1, R as listAvdsAsync, Tt as forgetCreatedDeviceAsync, U as ownedAvdDirectory, bt as parkedMaxSetting, h as avdNameAbsent, mt as POOL_SETTING_REMEDY } from "./android-DsEj2CCs.mjs";
9
+ import { $ as gradleVersionLines, $n as memoryCacheKind, B as includesArchives, Ct as describeError, En as runProcessOperation, F as gcOptionsOf, Ft as withEasProjectLock, G as planCacheEmptying, H as includesRecordings, J as selectsBeyondCaches, Jn as parseArchiveSelector, K as previewScopedEmptying, L as openGcLog, Q as deleteGradleVersions, St as deleteEasSessions, U as includesWorkspaceOutputs, V as includesParkedDevices, W as isWorkspacesScope, X as collectGradleVersions, Y as trimCaches, Zn as collectMemoryReport, _t as findStaleDeviceRecords, ar as scopedMemoryReport, at as DEVICE_LIST_TIMEOUT_MS, bt as withAndroidAvdSizes, ct as collectParkedSims, dt as deleteProjectDevices, er as memoryLines, et as gradleVersionsPending, fr as sizeCaches, gt as findOrphanedDevices, ht as eraseParkedDevices, ir as reclaimMemory, it as collectInventory, lt as deleteParkedAvds, mt as deviceSweepIsScoped, nr as memorySweepIsScoped, ot as collectDeviceLeases, pt as describeUnverifiableDevices, q as selectCaches, rr as memoryWorkPending, rt as getMachineCacheReport, sr as phase, st as collectParkedAvds, tr as memoryScope, tt as includesGradleVersions, ur as discoverCaches, ut as deleteParkedSims, vt as findStaleProjectDevices, wt as withRemoteSessionGcLocks, xt as collectEasSessionSweep, yt as unverifiedDeviceCommand, z as emptyCaches } from "./ccache-DVDO2ocE.mjs";
10
+ import { n as easMachineStateRoot$1, o as removeEasSessionClaimAsync, r as readEasSessionLedger$1 } from "./eas-session-ledger-aFBLTZr2.mjs";
11
+ import { At as mapLimited, Dt as createGcResults, Et as GC_OUTPUT, I as idleDeviceLines, M as collectIdleDevices, Mt as sizeConcurrency, N as collectIdleDevicesAsync, R as parseIdleDuration, a as collectOrphanedWorkspaces, b as workspaceInUseAsync, c as isInsideWorkspaces, f as rootPresence, g as ARTIFACT_DIRS, i as clearWorkspaceOutputs, jt as readConcurrency, kt as eachLimited, n as REBUILD_COST, o as collectWorkspaceOutputs, p as sizeText, r as WORKSPACE_OUTPUT_DIRS, s as deleteOrphanedWorkspaces, t as LIGHTEN_AFTER_MS, u as listWorkspaceDirs, v as withIdleWorkspace, wt as listBuildSlots, z as shutDownIdleDevices } from "./workspaces-BNEyJ1B_.mjs";
12
12
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
13
- import { N as listBuildLocks, k as removeExpiredLease } from "./activity-BTaUf0tc.mjs";
14
- import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-CXnoVO_z.mjs";
13
+ import { N as listBuildLocks, k as removeExpiredLease } from "./activity-Dw4N_RFe.mjs";
14
+ import { d as listAllIosSims, f as listAllIosSimsAsync } from "./ios-CdAV4-1E.mjs";
15
15
  import { t as resolveMaintenanceSettings } from "./settings-D9LtQaUw.mjs";
16
- import { r as readCollectors } from "./ownership-Dtz9G5Gl.mjs";
17
- import { A as deleteSelectedArchives, O as describeDereferenced, j as sweepArchiveStaging, k as reclaimProject } from "./worktree-qKJ3x07S.mjs";
18
- import { p as writeCacheFile } from "./warm-progress-DQ2wQZKp.mjs";
19
- import { a as restoreProblem, o as workspaceKeys } from "./lightened-23pqe7LS.mjs";
20
- import { C as candidateRootsAsync, D as worktreeRemovalReason, E as worktreePullRequestNote, S as maintenancePinned, T as removeWorktrees, _ as finishedWorkspaces, a as previewMaintenance, b as cachedDeviceActivity, c as deleteTempLeftovers, d as appRoots, f as artifactWorktrees, g as stopIdleWorkspace, h as planIdleStop, l as tempLeftoverLines, m as collectArtifactsAsync, o as triggeringRoot, p as clearArtifact, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, w as collectWorktreeSweep, x as cachedDeviceActivityAsync, y as ownedDeviceUsage } from "./act-BaKjDWGw.mjs";
21
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-DYBpO17K.mjs";
16
+ import { r as readCollectors } from "./ownership-CCfiBfOP.mjs";
17
+ import { A as deleteSelectedArchives, O as describeDereferenced, j as sweepArchiveStaging, k as reclaimProject } from "./worktree-BTrii9e_.mjs";
18
+ import { p as writeCacheFile } from "./warm-progress-_aTMvkIH.mjs";
19
+ import { a as restoreProblem, o as workspaceKeys } from "./lightened-DZ9Ip0T3.mjs";
20
+ import { C as candidateRootsAsync, D as worktreeRemovalReason, E as worktreePullRequestNote, S as maintenancePinned, T as removeWorktrees, _ as finishedWorkspaces, a as previewMaintenance, b as cachedDeviceActivity, c as deleteTempLeftovers, d as appRoots, f as artifactWorktrees, g as stopIdleWorkspace, h as planIdleStop, l as tempLeftoverLines, m as collectArtifactsAsync, o as triggeringRoot, p as clearArtifact, s as collectTempLeftovers, t as deleteIdleWorkspaceDevices, u as tempLeftoverSection, w as collectWorktreeSweep, x as cachedDeviceActivityAsync, y as ownedDeviceUsage } from "./act-lcOIEy32.mjs";
21
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-Boie2yB-.mjs";
22
22
  import { claimRemoveCommand, isClaimRefusal, isClaimUnavailable, readClaimSet, releaseClaim, tryAcquireClaim } from "@stim-cli/core/ownership-claim";
23
23
  import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from "node:fs";
24
24
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
@@ -1,3 +1,3 @@
1
- import { _t as findStaleDeviceRecords, ft as describeParkedSims, gt as findOrphanedDevices, pt as describeUnverifiableDevices, q as selectCaches, ut as deleteParkedSims, vt as findStaleProjectDevices } from "./ccache-B8gY50-h.mjs";
2
- import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-Co7PE36D.mjs";
1
+ import { _t as findStaleDeviceRecords, ft as describeParkedSims, gt as findOrphanedDevices, pt as describeUnverifiableDevices, q as selectCaches, ut as deleteParkedSims, vt as findStaleProjectDevices } from "./ccache-DVDO2ocE.mjs";
2
+ import { a as runGc, i as readGcReport, n as executeGc, o as withGcMaintenanceClaim, r as gcCommand, s as formatGcReport, t as collectGcReport } from "./gc-B0K4d_PL.mjs";
3
3
  export { collectGcReport, gcCommand as default, deleteParkedSims, describeParkedSims, describeUnverifiableDevices, executeGc, findOrphanedDevices, findStaleDeviceRecords, findStaleProjectDevices, formatGcReport, readGcReport, runGc, selectCaches, withGcMaintenanceClaim };
@@ -1,8 +1,8 @@
1
- import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-D776ygML.mjs";
2
- import { i as findProjectRoot$1 } from "./project-DPQjnpcI.mjs";
3
- import { h as RECENT_LAUNCH_MS } from "./eas-session-ledger-CW3l-inB.mjs";
4
- import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-D1IyMle9.mjs";
5
- import "./status-watch-CnSyXUmj.mjs";
1
+ import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-C6UTYW2K.mjs";
2
+ import { i as findProjectRoot$1 } from "./project-DCLkDM8C.mjs";
3
+ import { h as RECENT_LAUNCH_MS } from "./eas-session-ledger-aFBLTZr2.mjs";
4
+ import { o as guideStatus, t as WATCHMAN_NESTED_WORKTREES } from "./doctor-watchman-DJY550yz.mjs";
5
+ import "./status-watch-BwG4lJ1q.mjs";
6
6
  import { SETTINGS, SETTINGS_SCHEMA_URL, TUTORIAL_VERSION } from "@stim-cli/core/state";
7
7
  import chalk from "chalk";
8
8
  //#region src/guide/agent.ts
@@ -2504,8 +2504,9 @@ RULES
2504
2504
  \`guide lifecycle\`), so the sums can differ from what they sum.
2505
2505
 
2506
2506
  capacity.load is always present. capacity.builds is present only while
2507
- concurrency.maxBuilds is set, and capacity.devices only while
2508
- concurrency.maxDevices is set (see \`guide lifecycle concurrency\`):
2507
+ concurrency.maxBuilds is set, capacity.devices only while
2508
+ concurrency.maxDevices is set, and capacity.platformDevices only for the
2509
+ platforms whose cap is set (see \`guide lifecycle concurrency\`):
2509
2510
 
2510
2511
  load { cpus, loadPerCore, busyAt, limit, state }. loadPerCore is the
2511
2512
  5-minute load average divided by cpus, to one decimal. busyAt is
@@ -2528,6 +2529,11 @@ RULES
2528
2529
  device, with its device slot; for a device no workspace records,
2529
2530
  label is its name and workspace and slot are null. inUse is null
2530
2531
  and unknown says why when the devices could not be listed.
2532
+ platformDevices { ios?: { max, inUse, unknown? }, android?: { max, inUse,
2533
+ unknown? } }, the booted owned simulators and emulators counted
2534
+ against concurrency.maxIosDevices and concurrency.maxAndroidDevices.
2535
+ Each key is present only while its cap is set, whether or not
2536
+ concurrency.maxDevices is.
2531
2537
 
2532
2538
  The memory budget plans before a boot
2533
2539
  and always uses the estimate. What is using CPU and memory now is the
@@ -2668,7 +2674,9 @@ CAPACITY REFUSALS
2668
2674
  capacityRefusals?: [{ at, kind: "device", platform: "ios" | "android",
2669
2675
  max, workspace }]
2670
2676
  Only device refusals with STIM_AT_CAPACITY are recorded; build caps wait.
2671
- at is the ISO timestamp, max is concurrency.maxDevices, and workspace is
2677
+ at is the ISO timestamp, max is the cap of the limit that was full
2678
+ (concurrency.maxDevices, or the platform's concurrency.maxIosDevices or
2679
+ concurrency.maxAndroidDevices), and workspace is
2672
2680
  the workspace id used by status and Desktop. The list is newest first:
2673
2681
  the last 50 from the last 7 days, omitted when empty. Desktop uses events
2674
2682
  within 6 hours for its device-limit suggestion, including terminal runs.
@@ -4779,8 +4787,10 @@ so a Debug run on one is wired to a LAN origin instead of localhost.`,
4779
4787
  STIM_AT_CAPACITY: {
4780
4788
  summary: "owned-device slot wait timed out, or --no-wait reached the cap or queue",
4781
4789
  body: () => `STIM_AT_CAPACITY
4782
- Only when concurrency.maxDevices is set (unset by default). New owned
4783
- devices queue in FIFO order across $STIM_HOME for 600 seconds by default.
4790
+ Only when concurrency.maxDevices, concurrency.maxIosDevices or
4791
+ concurrency.maxAndroidDevices is set (all unset by default). A boot must fit
4792
+ its platform cap and concurrency.maxDevices; the message names the limit that
4793
+ was full with its count and cap. New owned devices queue in FIFO order across $STIM_HOME for 600 seconds by default.
4784
4794
  This refusal means the wait expired, or \`--no-wait\` / \`--wait 0\`
4785
4795
  found the cap full or another run queued. The message gives the current
4786
4796
  count and, on timeout, how long it waited. iOS waits beside its build,
@@ -4798,7 +4808,10 @@ so a Debug run on one is wired to a LAN origin instead of localhost.`,
4798
4808
  --no-wait and --wait 0 refuse at once. Builds under remote-only refuse with
4799
4809
  STIM_OFFLOAD_REFUSED instead.
4800
4810
  Stop an environment (\`stim stop\`), pass a longer \`--wait <seconds>\`,
4801
- or raise concurrency.maxDevices. With --remote auto, remote.machines and
4811
+ or raise the limit the message names (concurrency.maxDevices, or the
4812
+ platform's concurrency.maxIosDevices / maxAndroidDevices). On a stim-server
4813
+ worker the hosted offer and reserve name the full limit too, including
4814
+ concurrency.maxMacosApps. With --remote auto, remote.machines and
4802
4815
  the opt-in remote.easFallback (billed EAS Simulator) are tried before this
4803
4816
  wait; \`stim logs --source placement\` says why neither took the run. Waiting prints holder names and elapsed
4804
4817
  time; status JSON exposes build.waitingFor independently of phase.
@@ -6319,7 +6332,7 @@ The same setup serves macos --remote and macos.remote. Approval is separate from
6319
6332
  and phone control. Set ios.remote to the machine name for a default (machine scope for every app on this machine);
6320
6333
  no flag or setting runs here. eas and proxy keep their remote backend meanings.
6321
6334
  --remote auto (or ios.remote = auto / android.remote = auto) stays here when
6322
- there is a free concurrency.maxDevices slot (0 means unlimited), no device
6335
+ there is a free concurrency.maxDevices slot and platform cap slot (0 means unlimited), no device
6323
6336
  waiter ahead, normal host memory pressure, no budget shortfall,
6324
6337
  and 5-minute load per core below server.maxLoadPerCore. Without remote.machines,
6325
6338
  auto and remote are local and remote-only refuses with STIM_HOSTING_REFUSED. An unknown local device count also stays local; boot admission
@@ -6354,7 +6367,7 @@ when it names a machine, then remote.machines order, so the first listed host wi
6354
6367
  room fills before the next gets a run. Load and free memory do not rank hosts.
6355
6368
  Automatic build offload resolves later, after the device architecture is known.
6356
6369
 
6357
- When no host admits and this machine is at its concurrency.maxDevices cap (or runs
6370
+ When no host admits and this machine is at its concurrency.maxDevices or per-platform cap (or runs
6358
6371
  are queued ahead), remote.easFallback (default false; EAS Simulator is billed)
6359
6372
  runs the device on an EAS Simulator exactly as --remote eas would: the build
6360
6373
  stays here, nothing starts an EAS cloud build, stop ends the session, and
@@ -6395,7 +6408,8 @@ refuses. The host boots headless and ignores this Mac's iosSimulatorApp setting.
6395
6408
  the offered simulator architecture, not this machine's. --remote-build remains
6396
6409
  independent and selects a compatible build worker for a Debug cache miss.
6397
6410
 
6398
- The host's own owned devices count toward concurrency.maxDevices.
6411
+ The host's own owned devices count toward concurrency.maxDevices and its per-platform cap
6412
+ (concurrency.maxIosDevices, concurrency.maxAndroidDevices; hosted macOS apps use concurrency.maxMacosApps).
6399
6413
 
6400
6414
  The host's person sees Hosted here rows in stim-server devices; --json adds
6401
6415
  hostedSessions beside devices. Rows show client, platform, device, installed
@@ -7739,7 +7753,8 @@ OPT-IN CONCURRENCY LIMITS (UNLIMITED BY DEFAULT)
7739
7753
  wait also records a capacityWaits event in stats,
7740
7754
  with reclaimed when one or more devices were
7741
7755
  shut down for it.
7742
- While at the cap, only the queue head reclaims:
7756
+ While at the cap, only the queue head reclaims (or a run behind a
7757
+ head held back only by its own platform's cap):
7743
7758
  it shuts down the longest-idle eligible owned
7744
7759
  device in another workspace of this Stim home,
7745
7760
  one per attempt, at most once every 15 seconds,
@@ -7759,6 +7774,35 @@ OPT-IN CONCURRENCY LIMITS (UNLIMITED BY DEFAULT)
7759
7774
  and the command to remove that exact claim.
7760
7775
  See \`guide errors STIM_AT_CAPACITY\`.
7761
7776
 
7777
+ concurrency.maxIosDevices booted owned iOS simulators at once.
7778
+ concurrency.maxAndroidDevices booted owned Android emulators at once.
7779
+ concurrency.maxMacosApps hosted macOS apps on a worker at once.
7780
+ Each is 0 (no per-platform limit) unless set, and
7781
+ each only tightens: a run must fit its platform's
7782
+ cap AND concurrency.maxDevices. maxDevices counts
7783
+ simulators and emulators together, local and
7784
+ hosted, and counts hosted macOS apps as a pool of
7785
+ their own, so a macOS app is bounded by
7786
+ maxMacosApps and by maxDevices, and never adds to
7787
+ the simulator and emulator total. Leaving the new
7788
+ settings unset changes no existing cap.
7789
+ Local admission applies the iOS and Android caps
7790
+ with the same queue and reclaim as maxDevices; a
7791
+ waiter held back only by its own platform's cap
7792
+ does not hold up a waiter of another platform.
7793
+ Reclaim for a full platform cap only shuts down
7794
+ devices of that platform. Hosted admission on a
7795
+ worker (offer and reserve) applies all three,
7796
+ counting the worker's local devices too.
7797
+ Local \`stim macos\` runs are not counted, so
7798
+ maxMacosApps limits hosted macOS apps only.
7799
+ A refusal names the full limit, its count and its
7800
+ cap, for example "1 Stim iOS simulator(s) are
7801
+ already booted and concurrency.maxIosDevices is 1".
7802
+ Status JSON capacity.platformDevices reports
7803
+ { max, inUse } for each of ios and android whose
7804
+ cap is set.
7805
+
7762
7806
  \`stim doctor\` prints one note echoing the caps and the current active count,
7763
7807
  but ONLY when a cap is set. \`stim gc\` reports stale build slots the way it
7764
7808
  reports stale build locks, and \`gc --delete\` clears them. Set the caps
@@ -10415,8 +10459,9 @@ ${ANDROID_AVD_CONFIG_HELP.map((line) => ` ${line}`).joi
10415
10459
  lifecycle hosted-android.
10416
10460
  remote.easFallback true lets "auto" or "remote" (ios.remote, android.remote
10417
10461
  or --remote) run the simulator or emulator on a
10418
- billed EAS Simulator when this machine is at its
10419
- concurrency.maxDevices cap (or has runs queued) and no
10462
+ billed EAS Simulator when this machine is at a
10463
+ device cap (concurrency.maxDevices or a per-platform
10464
+ cap, or has runs queued) and no
10420
10465
  remote.machines entry takes the run, instead of waiting
10421
10466
  or refusing with STIM_AT_CAPACITY. Default false. A
10422
10467
  busy machine with a free slot never uses it. Stim checks
@@ -10650,12 +10695,20 @@ machine's. They live under a top-level \`concurrency\` key in
10650
10695
  "concurrency": { "maxBuilds": 2, "maxDevices": 3 }
10651
10696
  }
10652
10697
 
10653
- The keys are concurrency.maxBuilds and concurrency.maxDevices.
10698
+ The keys are concurrency.maxBuilds and concurrency.maxDevices, plus the
10699
+ per-platform device caps concurrency.maxIosDevices,
10700
+ concurrency.maxAndroidDevices and concurrency.maxMacosApps. A boot must fit
10701
+ its platform cap and concurrency.maxDevices; the per-platform caps only
10702
+ tighten (see \`guide lifecycle concurrency\`).
10654
10703
 
10655
10704
  or via the environment, which overrides the file:
10656
10705
 
10657
10706
  STIM_MAX_BUILDS=2 STIM_MAX_DEVICES=3 stim ios
10658
10707
 
10708
+ concurrency.maxIosDevices STIM_MAX_IOS_DEVICES
10709
+ concurrency.maxAndroidDevices STIM_MAX_ANDROID_DEVICES
10710
+ concurrency.maxMacosApps STIM_MAX_MACOS_APPS
10711
+
10659
10712
  Unset, 0, or any non-positive value means NO enforcement -- the default, where
10660
10713
  Stim limits nothing. See \`guide lifecycle concurrency\` for what each cap
10661
10714
  does.
@@ -12284,9 +12337,9 @@ script such as mini-desktop.sh use these instead:
12284
12337
  quit stim stop (verified stop; the host frees the slot
12285
12338
  and removes the app's defaults)
12286
12339
  clean stim worktree remove
12287
- 3 concurrent slots concurrency.maxDevices on the host, counted apart
12288
- from simulators and emulators; one bundle id
12289
- slot per session
12340
+ 3 concurrent slots concurrency.maxMacosApps and concurrency.maxDevices
12341
+ on the host, counted apart from simulators and
12342
+ emulators; one bundle id slot per session
12290
12343
 
12291
12344
  The agent-device rows work once the host's agent field names agent-device.
12292
12345
 
@@ -1,7 +1,7 @@
1
1
  import { c as throwIfCancelled } from "./exec-aULwtNly.mjs";
2
- import { c as call, l as connectHost } from "./hosted-client-Cect92SZ.mjs";
3
- import { i as requestHostedMetro } from "./metro-request-BtF7ox53.mjs";
4
- import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-DmdLSmvu.mjs";
2
+ import { c as call, l as connectHost } from "./hosted-client-5ur3YpxY.mjs";
3
+ import { i as requestHostedMetro } from "./metro-request-RDhyx85c.mjs";
4
+ import { a as stopHostedNative, i as prepareHostedNative, r as placeHostedNative } from "./hosted-native-kaR4nUHk.mjs";
5
5
  //#region src/device-host/hosted-android.ts
6
6
  async function prepareHostedAndroid(machine, selectors, recorded, mode) {
7
7
  return await prepareHostedNative(machine, selectors, recorded, "android", false, mode);
@@ -1,7 +1,7 @@
1
1
  import { c as throwIfCancelled, o as cancellableSleep } from "./exec-aULwtNly.mjs";
2
- import { Y as diagnoseConnectFailure, st as resolveEndpoint } from "./config-AbUjIBOQ.mjs";
3
- import { t as BuildConnection } from "./client-DrHykA24.mjs";
4
- import { g as configuredMachines } from "./selection-PCMT97XD.mjs";
2
+ import { X as diagnoseConnectFailure, ct as resolveEndpoint } from "./config-D5qNWJEP.mjs";
3
+ import { t as BuildConnection } from "./client-DhJOvSvh.mjs";
4
+ import { g as configuredMachines } from "./selection-C95m--1_.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -232,25 +232,49 @@ function bundleManifest(bundle) {
232
232
  content
233
233
  };
234
234
  }
235
+ /** stim-server answers one connection's requests in arrival order, so chunks sent in order reach it in order. */
236
+ const UPLOAD_WINDOW = 64;
235
237
  async function upload(host, ids, missing, content) {
236
238
  if (!Array.isArray(missing)) throw new Error(`${host.machine} answered device-host.app.offer without missing content.`);
237
- for (const entry of missing) {
239
+ const files = missing.map((entry) => {
238
240
  const read = isJsonObject(entry) && typeof entry.sha256 === "string" ? content.get(entry.sha256) : void 0;
239
- if (!read || !isJsonObject(entry) || typeof entry.offset !== "number") throw new Error(`${host.machine} asked for content this app does not have.`);
240
- const bytes = read();
241
- let offset = entry.offset;
242
- do {
243
- const data = bytes.subarray(offset, offset + HOSTED_APP_CHUNK_BYTES).toString("base64");
241
+ if (!read || !isJsonObject(entry) || typeof entry.sha256 !== "string" || typeof entry.offset !== "number") throw new Error(`${host.machine} asked for content this app does not have.`);
242
+ return {
243
+ digest: entry.sha256,
244
+ start: entry.offset,
245
+ read
246
+ };
247
+ });
248
+ const inFlight = /* @__PURE__ */ new Set();
249
+ let failure;
250
+ const send = async (digest, offset, end, data) => {
251
+ try {
244
252
  const next = (await call(host, "device-host.app.chunk", {
245
253
  ...ids,
246
- sha256: entry.sha256,
254
+ sha256: digest,
247
255
  offset,
248
256
  data
249
257
  })).offset;
250
- if (typeof next !== "number" || next <= offset && next !== bytes.length) throw new Error(`${host.machine} did not accept app content at byte ${offset}.`);
251
- offset = next;
258
+ if (typeof next !== "number" || next < end) throw new Error(`${host.machine} did not accept app content at byte ${offset}.`);
259
+ } catch (error) {
260
+ failure ??= error instanceof Error ? error : new Error(String(error));
261
+ }
262
+ };
263
+ for (const { digest, start, read } of files) {
264
+ if (failure) break;
265
+ const bytes = read();
266
+ let offset = start;
267
+ do {
268
+ if (inFlight.size >= UPLOAD_WINDOW) await Promise.race(inFlight);
269
+ if (failure) break;
270
+ const end = Math.min(offset + HOSTED_APP_CHUNK_BYTES, bytes.length);
271
+ const pending = send(digest, offset, end, bytes.subarray(offset, end).toString("base64")).finally(() => inFlight.delete(pending));
272
+ inFlight.add(pending);
273
+ offset = end;
252
274
  } while (offset < bytes.length);
253
275
  }
276
+ await Promise.all(inFlight);
277
+ if (failure) throw failure;
254
278
  }
255
279
  //#endregion
256
280
  export { stoppedSession as _, SESSION_TIMEOUT_MS as a, call as c, hostConnector as d, hostedSession as f, sha256 as g, settle as h, RESERVE_TIMEOUT_MS as i, connectHost as l, requireHostedAppMode as m, OFFER_TIMEOUT_MS as n, attach as o, probeHostedSession as p, PREPARE_TIMEOUT_MS as r, bundleManifest as s, INSTALL_TIMEOUT_MS as t, heldNoLonger as u, unknownSession as v, upload as y };