stim 1.17.2 → 1.18.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 (150) hide show
  1. package/README.md +50 -1
  2. package/dist/{activity-IRvJY_ru.mjs → activity-BxnkDZDi.mjs} +4 -4
  3. package/dist/{agent-device-usage-output-BK41vnzN.mjs → agent-device-usage-output-CZ66YA4T.mjs} +8 -8
  4. package/dist/android-BKA16DTf.mjs +4 -0
  5. package/dist/{android-B9yaNKwa.mjs → android-BvwuMUJ9.mjs} +192 -98
  6. package/dist/{android-DE4v59Mb.mjs → android-CBwCNicO.mjs} +2 -2
  7. package/dist/{android-B_YNZy61.mjs → android-DC3ZLuw0.mjs} +9 -9
  8. package/dist/{android-cas-ZFpjJBL_.mjs → android-cas-BBFyr9CA.mjs} +5 -5
  9. package/dist/android-cas-compiler.mjs +2 -2
  10. package/dist/api-D0VtFhqk.mjs +152 -0
  11. package/dist/api-run.d.mts +1 -0
  12. package/dist/api-run.mjs +145 -0
  13. package/dist/api.d.mts +212 -0
  14. package/dist/api.mjs +2 -0
  15. package/dist/{app-install-VPkI5WEg.mjs → app-install-D-PUENug.mjs} +3 -3
  16. package/dist/{attempt-Bk2ouQVL.mjs → attempt-DW-mQqM7.mjs} +14 -4
  17. package/dist/{budget-DfcgFdQB.mjs → budget-DIhL2BKx.mjs} +1578 -58
  18. package/dist/build-facts-DcLv2HSd.d.mts +111 -0
  19. package/dist/{cache-manifest-DnUHBJaU.mjs → cache-manifest-BI7ozfmH.mjs} +3 -3
  20. package/dist/cache-manifest.mjs +1 -1
  21. package/dist/{chrome-BrcVWQyD.mjs → chrome-DJnmnS5q.mjs} +1 -1
  22. package/dist/cli-DNJMwADx.mjs +68 -0
  23. package/dist/cli.mjs +1 -1
  24. package/dist/{client-SvBdgObD.mjs → client-DzhapoMB.mjs} +139 -32
  25. package/dist/collector-run.mjs +9 -9
  26. package/dist/{command-output-CDAIFD-8.mjs → command-output-CBtzyIgF.mjs} +2 -2
  27. package/dist/{config-D0DbpZtM.mjs → config-CgYMahz7.mjs} +5 -5
  28. package/dist/{created-devices-CpvzBL25.mjs → created-devices-DKbeWsiK.mjs} +2 -2
  29. package/dist/{dependency-state-CLcBHH2M.mjs → dependency-state-xKoOypBm.mjs} +2 -2
  30. package/dist/{detached-entry-CiTEgMR1.mjs → detached-entry-BLfcgc4O.mjs} +1 -1
  31. package/dist/{dev-client-B-XC4uRH.mjs → dev-client-CLnIH02x.mjs} +2 -2
  32. package/dist/{device-C8IOoJPv.mjs → device-D7oCHGWi.mjs} +8 -8
  33. package/dist/{device-capacity-ZC4XSZ4R.mjs → device-capacity-EUOOYr8T.mjs} +13 -13
  34. package/dist/device-host-worker.mjs +19 -19
  35. package/dist/{device-ios-C2Um-XUR.mjs → device-ios-6MewKKnc.mjs} +13 -13
  36. package/dist/{device-lease-DpoS36_u.mjs → device-lease-Co-EwifR.mjs} +9 -9
  37. package/dist/{device-lease-run-B8YltIH_.mjs → device-lease-run-w1xhCqIW.mjs} +4 -4
  38. package/dist/{device-pool-3o7s5lo4.mjs → device-pool-F5WvRPtD.mjs} +3 -3
  39. package/dist/{device-remote-hFSkpfQu.mjs → device-remote-tHbd1fKy.mjs} +15 -15
  40. package/dist/{doctor-CFv1fCrF.mjs → doctor-B9ckYUoU.mjs} +33 -30
  41. package/dist/{error-diagnostics-C-NMnhrk.mjs → error-diagnostics-BRXOqDzG.mjs} +11 -11
  42. package/dist/{exec-CaErVv7t.mjs → exec-DWhCZDGm.mjs} +65 -2
  43. package/dist/{gc-DEmkg3Xh.mjs → gc-Dh6mXOKC.mjs} +23 -469
  44. package/dist/{gradle-dJpre3Yn.mjs → gradle-C6GKnunQ.mjs} +6 -6
  45. package/dist/{guide-status-Du-ZQ3FD.mjs → guide-status-Bhf9SJXc.mjs} +3 -3
  46. package/dist/{guide-CSmhMTf8.mjs → guide-tm6igAaa.mjs} +290 -53
  47. package/dist/{hosted-android-E1Heoqnv.mjs → hosted-android-Bv285t_t.mjs} +3 -3
  48. package/dist/{hosted-client-Bp4knSwu.mjs → hosted-client-C-rMtppF.mjs} +2 -2
  49. package/dist/{hosted-ios-BnbeYOUD.mjs → hosted-ios-D5mNmtj4.mjs} +1 -1
  50. package/dist/{hosted-logs-OcgIBvCT.mjs → hosted-logs-DN8Iz4mJ.mjs} +9 -9
  51. package/dist/{hosted-macos-DcxKjtfH.mjs → hosted-macos-B-wEjlwG.mjs} +5 -5
  52. package/dist/{hosted-native-1Ebbig4w.mjs → hosted-native-DeeOG8xZ.mjs} +6 -6
  53. package/dist/{idle-shutdown-IGyNV8Cr.mjs → idle-shutdown-jjtxAn5C.mjs} +7 -8
  54. package/dist/{ios-DSfnPfse.mjs → ios-B3SbOWdw.mjs} +19 -7
  55. package/dist/{ios-Cr1h5gnO.mjs → ios-Bvbf0SGY.mjs} +1 -1
  56. package/dist/{ios-BJ4XUSe1.mjs → ios-CPdkoKaa.mjs} +181 -95
  57. package/dist/ios-DNpdygiv.mjs +7 -0
  58. package/dist/{ios-device-Ee7sDXfp.mjs → ios-device-Bn7jWDB1.mjs} +1 -1
  59. package/dist/{ios-device-pAN4t54-.mjs → ios-device-vOaByMhw.mjs} +3 -3
  60. package/dist/{ios-state-8L3lgum6.mjs → ios-state-B2pES6Vs.mjs} +1 -1
  61. package/dist/{launch-verify-lTnWZikR.mjs → launch-verify-hskNcWkZ.mjs} +5 -5
  62. package/dist/{logs-BAaS7gS2.mjs → logs-1Ylc1Ri6.mjs} +13 -13
  63. package/dist/macos-Ck7OBMNY.mjs +2 -0
  64. package/dist/{macos-BIRQS90f.mjs → macos-DF6C7wUU.mjs} +118 -34
  65. package/dist/macos-run.mjs +1 -1
  66. package/dist/maintenance-run.mjs +349 -47
  67. package/dist/{metro-g8NqiJp-.mjs → metro-Dh8T4Ytd.mjs} +5 -5
  68. package/dist/{metro-gateway-C-ijGI2F.mjs → metro-gateway-CEUw9RMH.mjs} +4 -4
  69. package/dist/{metro-store-CDDZHtPl.mjs → metro-store-BAHFcJm6.mjs} +16 -2
  70. package/dist/{named-ports-C8m8EQs2.mjs → named-ports-BFIz1Shz.mjs} +61 -6
  71. package/dist/{native-run-D1Q56rAD.mjs → native-run-B06FkmZx.mjs} +4 -4
  72. package/dist/{native-runtime-BEK171xQ.mjs → native-runtime-D_603JiC.mjs} +6 -6
  73. package/dist/{ndjson-PclOIwVY.mjs → ndjson-LGZAMsqa.mjs} +8 -4
  74. package/dist/offload-worker.d.mts +3 -17
  75. package/dist/offload-worker.mjs +10 -11
  76. package/dist/{ownership-DyRQru0q.mjs → ownership-D6Se7gg_.mjs} +3 -3
  77. package/dist/{page-QF_Ke10s.mjs → page-Bv9s2KwY.mjs} +1 -1
  78. package/dist/placement-log-BcPhRwR4.mjs +84 -0
  79. package/dist/{build-plan-BDsSi09V.mjs → plan-placement-CtxkCO54.mjs} +122 -48
  80. package/dist/{ports-4nYqxPWC.mjs → ports-BLTtfBq-.mjs} +3 -3
  81. package/dist/{prebuild-D7RUMkwN.mjs → prebuild-juCyreaR.mjs} +5 -5
  82. package/dist/preview-D5V07Nrl.mjs +987 -0
  83. package/dist/{rolldown-runtime-BsOwBuO_.mjs → process-identity-Biv3arCO.mjs} +11 -1
  84. package/dist/{project-D47Rh0ly.mjs → project-C3ChRLZy.mjs} +4 -68
  85. package/dist/projects-DD7dBTCj.mjs +92 -0
  86. package/dist/{pull-request-pxnDCQzn.mjs → pull-request-u4vp7zmK.mjs} +1 -1
  87. package/dist/pull-requests.mjs +1 -1
  88. package/dist/{recordings-BNgsD1Tr.mjs → recordings-BAWltsVt.mjs} +1 -1
  89. package/dist/{reload-DcRxj3qG.mjs → reload-DvyWzVjJ.mjs} +15 -15
  90. package/dist/{remote-cache-Ci4DQYYj.mjs → remote-cache-BGg7aGIZ.mjs} +5 -5
  91. package/dist/{run-CkE9y0nc.mjs → run-vhtDgpHO.mjs} +5 -5
  92. package/dist/{server-bare-BkrSxSsZ.mjs → server-bare-B9E7S1aR.mjs} +4 -5
  93. package/dist/server-expo-Db9HBUoa.mjs +2 -0
  94. package/dist/{server-expo-CHTyXD0G.mjs → server-expo-DoBHhuzK.mjs} +5 -6
  95. package/dist/{settings-SR9OmW9h.mjs → settings-Byp2AQ_E.mjs} +6 -5
  96. package/dist/{settings-Cfd-0r2d.mjs → settings-CQyMElEP.mjs} +24 -763
  97. package/dist/{settings-BBpMcDbD.mjs → settings-Djl-mpjX.mjs} +1 -1
  98. package/dist/settings.schema.json +126 -3
  99. package/dist/{simslim-BWNrc3M3.mjs → simslim-EHBQ2R4G.mjs} +7 -7
  100. package/dist/{slot-launch-DmjBmpQV.mjs → slot-launch-C1nqh4mu.mjs} +6 -6
  101. package/dist/{spawn-claims-D0XfSe8u.mjs → spawn-claims-Kqiifsk2.mjs} +1 -1
  102. package/dist/{spawn-entry-jw19m8Nl.mjs → spawn-entry-Dcb7sDUz.mjs} +1 -0
  103. package/dist/{stage-CzaiwFsI.mjs → stage-g_WqWeaE.mjs} +14 -3
  104. package/dist/{start-DUz3mYdb.mjs → start-D-IeOyoK.mjs} +19 -19
  105. package/dist/{start-AlfCPRVU.mjs → start-NTc1Ifqs.mjs} +1 -1
  106. package/dist/{state-PeQiJuIu.mjs → state-BG-aAk4k.mjs} +4 -4
  107. package/dist/{state-B4PQFXMW.d.mts → state-lKh8shBp.d.mts} +2 -3
  108. package/dist/{state-DyaNTgfR.mjs → state-xnqpx3AD.mjs} +2 -2
  109. package/dist/{stats-Bq4fJOdB.mjs → stats-DY6ekz8F.mjs} +5 -5
  110. package/dist/{status-DlKvVJBE.mjs → status-BEeL6IKz.mjs} +6 -4
  111. package/dist/{status-BA2pehwf.mjs → status-DCjZeE-K.mjs} +33 -34
  112. package/dist/{status-CzS4bPO9.mjs → status-Dcr0Qexd.mjs} +5 -5
  113. package/dist/{stim-desktop-Cnz8CPnl.mjs → stim-desktop-Behws_fi.mjs} +1 -1
  114. package/dist/{stim-installations-QMEI32v1.mjs → stim-installations-aR_WsNOA.mjs} +1 -1
  115. package/dist/{stop-BIiM49EY.mjs → stop-BGhKMOuH.mjs} +5 -5
  116. package/dist/{stop-DQIasgKp.mjs → stop-BTjs3xbc.mjs} +17 -18
  117. package/dist/{stop-zF1y04f2.mjs → stop-DIJtD2GL.mjs} +2 -2
  118. package/dist/supervisor-run.d.mts +24 -22
  119. package/dist/supervisor-run.mjs +21 -22
  120. package/dist/{support-CsJNVfOc.mjs → support-BaayeYCf.mjs} +7 -7
  121. package/dist/{support-WvD__tSV.mjs → support-Bwvbrq5-.mjs} +5 -5
  122. package/dist/{toolchain-DNyR3NPq.mjs → toolchain-Bnyd_K3A.mjs} +471 -22
  123. package/dist/{trigger-Bemu8ytw.mjs → trigger-CJMhwXe8.mjs} +5 -5
  124. package/dist/trigger-DWAq9hkw.mjs +2 -0
  125. package/dist/{warm-progress-DF4JRvYI.mjs → warm-progress-CjB-MP6H.mjs} +7 -7
  126. package/dist/web-B6_bFDn7.mjs +2 -0
  127. package/dist/{web-Dl0KSRHf.mjs → web-DTU0uiWj.mjs} +22 -22
  128. package/dist/web-run.mjs +10 -10
  129. package/dist/{workspace-state-DqcCbpE7.mjs → workspace-state-C59dqG-Z.mjs} +3 -3
  130. package/dist/{ownership-BMLqyBgJ.mjs → workspaces-xXItD8Dj.mjs} +577 -23
  131. package/dist/{worktree-j3IcFAI5.mjs → worktree-BJfnU6r5.mjs} +1 -1
  132. package/dist/{worktree-Be_7NLKy.mjs → worktree-BSYlofkq.mjs} +234 -35
  133. package/dist/worktree-CsKYexJM.mjs +753 -0
  134. package/package.json +10 -5
  135. package/dist/build-progress-D0WkjCPd.mjs +0 -1036
  136. package/dist/build-slots-41v_d2x9.mjs +0 -142
  137. package/dist/cli-CYXb29oE.mjs +0 -51
  138. package/dist/deps-iKw0eD4P.mjs +0 -438
  139. package/dist/errors-B6W7FkxQ.mjs +0 -15
  140. package/dist/idle-BXG__1BA.mjs +0 -176
  141. package/dist/in-use-CvGOUn-x.mjs +0 -130
  142. package/dist/preview-B-g9d7kV.mjs +0 -318
  143. package/dist/process-identity-BmRm1qV0.mjs +0 -12
  144. package/dist/server-expo-CeakhI8P.mjs +0 -2
  145. package/dist/state-BKa8wNN5.mjs +0 -148
  146. package/dist/stop-cause-rhmGfwvt.mjs +0 -97
  147. package/dist/trigger-CXts6qt1.mjs +0 -2
  148. package/dist/watchman-APYjXSQa.mjs +0 -48
  149. package/dist/workspace-process-lock-2mNzOlaB.mjs +0 -58
  150. package/dist/workspaces-Bcib97-6.mjs +0 -306
@@ -4,7 +4,7 @@ function resolveMaintenanceSettings(config = loadConfig(), env = process.env) {
4
4
  const result = {};
5
5
  const invalid = [];
6
6
  let disabled = false;
7
- for (const setting of SETTINGS.filter((entry) => entry.key.startsWith("maintenance.") || /^caches\..*MaxGb$/.test(entry.key))) {
7
+ for (const setting of SETTINGS.filter((entry) => entry.key.startsWith("maintenance.") && entry.key !== "maintenance.keep" || /^caches\..*MaxGb$/.test(entry.key))) {
8
8
  const [group, name] = setting.key.split(".");
9
9
  const rawEnv = setting.env ? env[setting.env] : void 0;
10
10
  const layer = config?.[group];
@@ -854,6 +854,26 @@
854
854
  },
855
855
  "additionalProperties": false
856
856
  },
857
+ "maintenance": {
858
+ "type": "object",
859
+ "properties": {
860
+ "keep": {
861
+ "description": "Pin this workspace: automatic maintenance never clears its build outputs or removes its worktree",
862
+ "type": "boolean",
863
+ "default": false,
864
+ "x-stim": {
865
+ "key": "maintenance.keep",
866
+ "kind": "boolean",
867
+ "scopes": [
868
+ "workspace",
869
+ "repo",
870
+ "committed"
871
+ ]
872
+ }
873
+ }
874
+ },
875
+ "additionalProperties": false
876
+ },
857
877
  "$schema": {
858
878
  "type": "string"
859
879
  }
@@ -1528,13 +1548,14 @@
1528
1548
  "type": "object",
1529
1549
  "properties": {
1530
1550
  "mode": {
1531
- "description": "Automatic resource maintenance. report measures, plans and logs what it would do and never deletes or stops anything; off disables it. Off under STIM_HOME or CI unless STIM_MAINTENANCE is set",
1551
+ "description": "Automatic resource maintenance. on removes what gc would remove under the caps and floors below and logs every action; report measures, plans and logs what it would do and never deletes anything; off disables it. Off under STIM_HOME or CI unless STIM_MAINTENANCE is set",
1532
1552
  "type": "string",
1533
1553
  "enum": [
1534
1554
  "off",
1535
- "report"
1555
+ "report",
1556
+ "on"
1536
1557
  ],
1537
- "default": "report",
1558
+ "default": "on",
1538
1559
  "x-stim": {
1539
1560
  "key": "maintenance.mode",
1540
1561
  "kind": "choice",
@@ -1687,6 +1708,75 @@
1687
1708
  "env": "STIM_MAINTENANCE_CAP_TARGET_PERCENT"
1688
1709
  }
1689
1710
  },
1711
+ "worktreeCheckMinutes": {
1712
+ "description": "Finished-worktree check interval in minutes",
1713
+ "type": "integer",
1714
+ "minimum": 1,
1715
+ "default": 15,
1716
+ "x-stim": {
1717
+ "key": "maintenance.worktreeCheckMinutes",
1718
+ "kind": "number",
1719
+ "scopes": [
1720
+ "machine"
1721
+ ],
1722
+ "env": "STIM_MAINTENANCE_WORKTREE_CHECK_MINUTES"
1723
+ }
1724
+ },
1725
+ "sweepHours": {
1726
+ "description": "Age sweep interval in hours; 0 turns the age sweep off",
1727
+ "type": "integer",
1728
+ "minimum": 0,
1729
+ "default": 24,
1730
+ "x-stim": {
1731
+ "key": "maintenance.sweepHours",
1732
+ "kind": "number",
1733
+ "scopes": [
1734
+ "machine"
1735
+ ],
1736
+ "env": "STIM_MAINTENANCE_SWEEP_HOURS"
1737
+ }
1738
+ },
1739
+ "olderThanDays": {
1740
+ "description": "Age in days for the age sweep: unused workspace build outputs and shared cache entries",
1741
+ "type": "integer",
1742
+ "minimum": 1,
1743
+ "default": 7,
1744
+ "x-stim": {
1745
+ "key": "maintenance.olderThanDays",
1746
+ "kind": "number",
1747
+ "scopes": [
1748
+ "machine"
1749
+ ],
1750
+ "env": "STIM_MAINTENANCE_OLDER_THAN_DAYS"
1751
+ }
1752
+ },
1753
+ "protectRecentHours": {
1754
+ "description": "Cache entries used within this many hours are never evicted",
1755
+ "type": "integer",
1756
+ "minimum": 0,
1757
+ "default": 2,
1758
+ "x-stim": {
1759
+ "key": "maintenance.protectRecentHours",
1760
+ "kind": "number",
1761
+ "scopes": [
1762
+ "machine"
1763
+ ],
1764
+ "env": "STIM_MAINTENANCE_PROTECT_RECENT_HOURS"
1765
+ }
1766
+ },
1767
+ "removeFinishedWorktrees": {
1768
+ "description": "Remove clean linked worktrees whose branch or pull request finished, under gc.worktreeGraceMinutes",
1769
+ "type": "boolean",
1770
+ "default": true,
1771
+ "x-stim": {
1772
+ "key": "maintenance.removeFinishedWorktrees",
1773
+ "kind": "boolean",
1774
+ "scopes": [
1775
+ "machine"
1776
+ ],
1777
+ "env": "STIM_MAINTENANCE_REMOVE_FINISHED_WORKTREES"
1778
+ }
1779
+ },
1690
1780
  "workspaceOutputsMaxGb": {
1691
1781
  "description": "Workspace build-output cap in GiB; 0 means no cap",
1692
1782
  "type": "number",
@@ -1749,6 +1839,20 @@
1749
1839
  "env": "STIM_CACHES_SWIFT_COMPILATION_CACHE_MAX_GB"
1750
1840
  }
1751
1841
  },
1842
+ "ccacheMaxGb": {
1843
+ "description": "ccache size limit in GiB, passed to ccache as CCACHE_MAXSIZE; ccache evicts by itself",
1844
+ "type": "number",
1845
+ "exclusiveMinimum": 0,
1846
+ "default": 5,
1847
+ "x-stim": {
1848
+ "key": "caches.ccacheMaxGb",
1849
+ "kind": "number",
1850
+ "scopes": [
1851
+ "machine"
1852
+ ],
1853
+ "env": "STIM_CACHES_CCACHE_MAX_GB"
1854
+ }
1855
+ },
1752
1856
  "buildCache": {
1753
1857
  "description": "Absolute path of the shared build cache",
1754
1858
  "type": "string",
@@ -1832,6 +1936,25 @@
1832
1936
  },
1833
1937
  "additionalProperties": false
1834
1938
  },
1939
+ "debug": {
1940
+ "type": "object",
1941
+ "properties": {
1942
+ "logs": {
1943
+ "description": "Debug-level logging. While on, the CLI records its commands, child processes and requests to other Macs, and stim-server records every request with its timings, under STIM_HOME/logs/debug/ with rotation. Nothing is sent anywhere, and records never carry arguments, tokens or tickets",
1944
+ "type": "boolean",
1945
+ "default": false,
1946
+ "x-stim": {
1947
+ "key": "debug.logs",
1948
+ "kind": "boolean",
1949
+ "scopes": [
1950
+ "machine"
1951
+ ],
1952
+ "env": "STIM_DEBUG"
1953
+ }
1954
+ }
1955
+ },
1956
+ "additionalProperties": false
1957
+ },
1835
1958
  "hosting": {
1836
1959
  "type": "object",
1837
1960
  "properties": {
@@ -1,13 +1,13 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { d as getConfigDir } from "./config-D0DbpZtM.mjs";
3
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
4
3
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
5
- import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-DpoS36_u.mjs";
6
- import { f as resolveEasCliBin } from "./remote-cache-Ci4DQYYj.mjs";
7
- import { _ as easCliSupport, s as readInstalledEasCliVersion, v as easCliUpgradeRemedy } from "./device-remote-hFSkpfQu.mjs";
8
- import { createHash } from "node:crypto";
4
+ import { d as getConfigDir } from "./config-CgYMahz7.mjs";
5
+ import { g as releaseBuildLock, m as acquireBuildLock } from "./device-lease-Co-EwifR.mjs";
6
+ import { f as resolveEasCliBin } from "./remote-cache-BGg7aGIZ.mjs";
7
+ import { _ as easCliSupport, s as readInstalledEasCliVersion, v as easCliUpgradeRemedy } from "./device-remote-tHbd1fKy.mjs";
9
8
  import { existsSync, realpathSync, statSync } from "node:fs";
10
9
  import { join } from "node:path";
10
+ import { createHash } from "node:crypto";
11
11
  //#region src/engine/eas-build.ts
12
12
  const MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION = "18.9.0";
13
13
  function isEasBuildFailure(result) {
@@ -1,9 +1,9 @@
1
- import { B as parseDeviceSlotKey, H as projectDeviceSlots, p as getProject } from "./config-D0DbpZtM.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-DqcCbpE7.mjs";
3
- import { n as fileLeaseIo } from "./device-lease-DpoS36_u.mjs";
4
- import { E as getAvdNameForSerial, O as listAdbDevices } from "./android-B_YNZy61.mjs";
5
- import { u as listAllIosSims } from "./ios-DSfnPfse.mjs";
6
- import { f as deviceShellArg } from "./app-install-VPkI5WEg.mjs";
1
+ import { B as parseDeviceSlotKey, H as projectDeviceSlots, p as getProject } from "./config-CgYMahz7.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-C59dqG-Z.mjs";
3
+ import { n as fileLeaseIo } from "./device-lease-Co-EwifR.mjs";
4
+ import { E as getAvdNameForSerial, O as listAdbDevices } from "./android-DC3ZLuw0.mjs";
5
+ import { d as listAllIosSims } from "./ios-B3SbOWdw.mjs";
6
+ import { f as deviceShellArg } from "./app-install-D-PUENug.mjs";
7
7
  import { hostedNativeRecords } from "@stim-cli/core/state";
8
8
  //#region src/engine/slot-launch.ts
9
9
  function launchSlotScope(root, slot = "default") {
@@ -1,4 +1,4 @@
1
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
2
  //#region src/engine/spawn-claims.ts
3
3
  const declaring = /* @__PURE__ */ new Set();
4
4
  const running = /* @__PURE__ */ new Set();
@@ -2,6 +2,7 @@ import { basename, dirname, join } from "node:path";
2
2
  import { fileURLToPath } from "node:url";
3
3
  //#region src/spawn-entry.ts
4
4
  const DEV_ENTRIES = {
5
+ "api-run": "./api-run.ts",
5
6
  "supervisor-run": "./supervisor/run.ts",
6
7
  "collector-run": "./collector/run.ts",
7
8
  "web-run": "./web/run.ts",
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
2
  import { cpSync, existsSync, mkdirSync, readdirSync, realpathSync, rmSync, statSync } from "node:fs";
3
3
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
4
4
  import { validMacosResourceDestination } from "@stim-cli/core";
@@ -19,6 +19,16 @@ function validateInfoPlist(root, product, infoPlist) {
19
19
  minimumSystemVersion: plist.LSMinimumSystemVersion
20
20
  };
21
21
  }
22
+ function setBundleName(plistPath, name) {
23
+ const exec = getExecutor();
24
+ for (const key of ["CFBundleDisplayName", "CFBundleName"]) exec.runFile("plutil", [
25
+ "-replace",
26
+ key,
27
+ "-string",
28
+ name,
29
+ plistPath
30
+ ]);
31
+ }
22
32
  function resourceError(key, entry, reason) {
23
33
  throw new Error(`${key} entry ${JSON.stringify(entry)}: ${reason}. See stim guide macos.`);
24
34
  }
@@ -73,7 +83,7 @@ function resolveBundleExtras(root, repository, resources = {}, assetCatalog) {
73
83
  assetCatalog: catalog
74
84
  };
75
85
  }
76
- function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = { resources: {} }) {
86
+ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = { resources: {} }, displayName) {
77
87
  const { minimumSystemVersion } = validateInfoPlist(root, product, infoPlist);
78
88
  for (const entry of readdirSync(bin).filter((name) => name.endsWith(".bundle"))) for (const [destination, source] of Object.entries(extras.resources)) if (overlaps(destination, entry)) resourceError(`macos.resources[${JSON.stringify(destination)}]`, source, `destination collides with ${entry}`);
79
89
  const exec = getExecutor();
@@ -93,6 +103,7 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
93
103
  `Set :CFBundleIdentifier ${bundleId}`,
94
104
  join(contents, "Info.plist")
95
105
  ]);
106
+ if (displayName !== void 0) setBundleName(join(contents, "Info.plist"), displayName);
96
107
  for (const entry of readdirSync(bin)) if (entry.endsWith(".framework")) {
97
108
  const target = join(contents, "Frameworks", entry);
98
109
  cpSync(join(bin, entry), target, {
@@ -140,4 +151,4 @@ function stageBundle(root, product, infoPlist, bin, bundle, bundleId, extras = {
140
151
  ]);
141
152
  }
142
153
  //#endregion
143
- export { stageBundle as n, validateInfoPlist as r, resolveBundleExtras as t };
154
+ export { validateInfoPlist as i, setBundleName as n, stageBundle as r, resolveBundleExtras as t };
@@ -1,28 +1,28 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { E as upsertProject, p as getProject } from "./config-D0DbpZtM.mjs";
3
- import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
4
- import { n as windowsLauncherArgs } from "./detached-entry-CiTEgMR1.mjs";
5
- import { _ as stepTimer, l as phaseLine } from "./command-output-CDAIFD-8.mjs";
6
- import { G as detectProviders, H as unknownSettingKeys, K as planMetroReach, M as remoteIosSetting, N as resolveCacheProviderConfig, P as resolveSettings, R as settingShapeErrors, S as metroTunnelSettingError, V as tunnelModeSetting, W as PUBLIC_METRO_ENV, b as metroIdleStopMinutesSetting, d as deviceIdleShutdownMinutesSetting, gt as repoRoot, i as SETTING_SHAPE_REMEDY, it as gitCommonDir, j as remoteAndroidSetting, k as publicUrlSetting, u as cacheProviderSettingError, w as ngrokUrlSetting, x as metroPortSetting } from "./settings-Cfd-0r2d.mjs";
7
- import { f as readAppConfigText, n as appProjectProblem, p as readAppJson, r as detectIsExpo, s as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-D47Rh0ly.mjs";
8
- import { l as resolveProjectMetro, o as pidExists, p as reserveMetroPort, u as signalProcessTree } from "./metro-g8NqiJp-.mjs";
9
- import { c as writeWorkspaceState, g as workspaceAgentDeviceDir, i as recordWorkspaceUse, m as supervisorLogFile, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, u as ensureWorkspaceStorage, x as workspaceLogsDir$1 } from "./workspace-state-DqcCbpE7.mjs";
10
- import { l as stopOwnedMetroForReset, t as budgetGate } from "./budget-DfcgFdQB.mjs";
11
- import { c as readMetroTunnel, i as clearManagedMetroTunnel } from "./state-BKa8wNN5.mjs";
12
- import { a as workspaceLinks, i as workspaceLinkLine } from "./stim-desktop-Cnz8CPnl.mjs";
13
- import { a as terminateChild, c as withManagedTunnelLock, i as stopTunnel, o as withManagedRemoteWorktreeLock, r as startTunnelSequence, t as resolveSupervisorTarget } from "./ownership-BMLqyBgJ.mjs";
14
- import { n as workspaceProcessLockError, t as withWorkspaceProcessLock } from "./workspace-process-lock-2mNzOlaB.mjs";
15
- import { i as levelRank } from "./ndjson-PclOIwVY.mjs";
16
- import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
17
- import { d as readProjectConfig } from "./remote-cache-Ci4DQYYj.mjs";
1
+ import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
3
+ import { t as spawnEntry } from "./spawn-entry-Dcb7sDUz.mjs";
4
+ import { _ as stepTimer, l as phaseLine } from "./command-output-CBtzyIgF.mjs";
5
+ import { E as upsertProject, p as getProject } from "./config-CgYMahz7.mjs";
6
+ import { s as gitCommonDir, y as repoRoot } from "./worktree-CsKYexJM.mjs";
7
+ import { f as readAppConfigText, i as detectIsExpo, n as appProjectProblem, p as readAppJson, s as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-C3ChRLZy.mjs";
8
+ import { l as resolveProjectMetro, o as pidExists, p as reserveMetroPort, u as signalProcessTree } from "./metro-Dh8T4Ytd.mjs";
9
+ import { c as writeWorkspaceState, g as workspaceAgentDeviceDir, i as recordWorkspaceUse, m as supervisorLogFile, n as clearWorkspaceStateKeys, r as readWorkspaceState$1, u as ensureWorkspaceStorage, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
10
+ import { Ht as readMetroTunnel, Rt as clearManagedMetroTunnel, d as stopOwnedMetroForReset, t as budgetGate } from "./budget-DIhL2BKx.mjs";
11
+ import { _ as terminateChild, b as withManagedTunnelLock, g as stopTunnel, h as startTunnelSequence, m as resolveSupervisorTarget, v as withManagedRemoteWorktreeLock } from "./workspaces-xXItD8Dj.mjs";
12
+ import { a as workspaceLinks, i as workspaceLinkLine } from "./stim-desktop-Behws_fi.mjs";
13
+ import { A as publicUrlSetting, F as resolveSettings, G as PUBLIC_METRO_ENV, H as tunnelModeSetting, K as detectProviders, M as remoteAndroidSetting, N as remoteIosSetting, P as resolveCacheProviderConfig, S as metroTunnelSettingError, U as unknownSettingKeys, b as metroIdleStopMinutesSetting, d as deviceIdleShutdownMinutesSetting, i as SETTING_SHAPE_REMEDY, q as planMetroReach, u as cacheProviderSettingError, w as ngrokUrlSetting, x as metroPortSetting, z as settingShapeErrors } from "./settings-CQyMElEP.mjs";
14
+ import { a as withWorkspaceProcessLock, o as workspaceProcessLockError } from "./named-ports-BFIz1Shz.mjs";
15
+ import { i as levelRank } from "./ndjson-LGZAMsqa.mjs";
16
+ import { d as readProjectConfig } from "./remote-cache-BGg7aGIZ.mjs";
17
+ import { n as windowsLauncherArgs } from "./detached-entry-BLfcgc4O.mjs";
18
18
  import { appendFileSync, mkdirSync, openSync, readFileSync } from "node:fs";
19
19
  import { dirname } from "node:path";
20
- import { EventEmitter } from "node:events";
21
- import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1 } from "fs";
22
20
  import { join as join$1 } from "path";
23
21
  import { IDLE_STOP_KEY, queryLogs } from "@stim-cli/core/state";
24
22
  import chalk from "chalk";
23
+ import { existsSync as existsSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1 } from "fs";
25
24
  import { CACHE_PROVIDER_ENV, cacheProviderEnv } from "@stim-cli/cache";
25
+ import { EventEmitter } from "node:events";
26
26
  //#region src/workspace/app-id.ts
27
27
  function configString(config, platform, key) {
28
28
  if (!config || typeof config !== "object") return null;
@@ -1,2 +1,2 @@
1
- import { a as registerStart, c as startDevServer, d as tailLines, f as wantsExpoOwnTunnel, i as readLogTail, l as startFacts, n as liveSupervisor, o as resolveWorkspaceMetroPort, r as parseWait, s as startCommand, t as failureEvidence, u as supervisorEntry } from "./start-DUz3mYdb.mjs";
1
+ import { a as registerStart, c as startDevServer, d as tailLines, f as wantsExpoOwnTunnel, i as readLogTail, l as startFacts, n as liveSupervisor, o as resolveWorkspaceMetroPort, r as parseWait, s as startCommand, t as failureEvidence, u as supervisorEntry } from "./start-D-IeOyoK.mjs";
2
2
  export { startCommand as default, failureEvidence, liveSupervisor, parseWait, readLogTail, registerStart, resolveWorkspaceMetroPort, startDevServer, startFacts, supervisorEntry, tailLines, wantsExpoOwnTunnel };
@@ -1,11 +1,11 @@
1
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
2
- import { o as pidExists } from "./metro-g8NqiJp-.mjs";
3
- import { a as updateWorkspaceState, c as writeWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-DqcCbpE7.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { o as pidExists } from "./metro-Dh8T4Ytd.mjs";
3
+ import { a as updateWorkspaceState, c as writeWorkspaceState, r as readWorkspaceState$1, t as clearWorkspaceStateKey, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
4
4
  import { readFileSync, readlinkSync, rmSync } from "node:fs";
5
5
  import { join } from "node:path";
6
- import { rotatedLogPath } from "@stim-cli/core";
7
6
  import { WEB_VIEWPORTS } from "@stim-cli/core/state";
8
7
  import { hostname } from "node:os";
8
+ import { rotatedLogPath } from "@stim-cli/core";
9
9
  //#region src/web/profile.ts
10
10
  const SINGLETON_FILES = [
11
11
  "SingletonLock",
@@ -1,10 +1,9 @@
1
1
  import "@stim-cli/core/state";
2
- import * as import__stim_cli_core_process_identity from "@stim-cli/core/process-identity";
3
- //#endregion
2
+ import { ProcessRecord } from "@stim-cli/core/process-identity";
4
3
  //#region src/supervisor/state.d.ts
5
4
  declare const MODE_BARE = "bare-inproc";
6
5
  declare const MODE_EXPO = "expo-child";
7
- declare function clearWorkspaceSupervisor(root: string, expected?: process_identity_d_exports.ProcessRecord | null): boolean;
6
+ declare function clearWorkspaceSupervisor(root: string, expected?: ProcessRecord | null): boolean;
8
7
  declare function clearExpoMetroTunnel(root: string): void;
9
8
  declare function writePidFile(root: string, pid: number): string;
10
9
  declare function readPidFile(root: string): number | null;
@@ -1,5 +1,5 @@
1
- import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
2
- import { a as updateWorkspaceState, r as readWorkspaceState$1, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-DqcCbpE7.mjs";
1
+ import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { a as updateWorkspaceState, r as readWorkspaceState$1, v as workspaceDir, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
3
3
  import { join } from "node:path";
4
4
  import { readMacosRecord } from "@stim-cli/core/state";
5
5
  //#region src/macos/state.ts
@@ -1,8 +1,8 @@
1
- import { j as formatBytes } from "./config-D0DbpZtM.mjs";
2
- import { o as formatLongDuration } from "./command-output-CDAIFD-8.mjs";
3
- import { gt as repoRoot, it as gitCommonDir } from "./settings-Cfd-0r2d.mjs";
4
- import { s as findProjectRoot$1 } from "./project-D47Rh0ly.mjs";
5
- import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-BK41vnzN.mjs";
1
+ import { o as formatLongDuration } from "./command-output-CBtzyIgF.mjs";
2
+ import { j as formatBytes } from "./config-CgYMahz7.mjs";
3
+ import { s as gitCommonDir, y as repoRoot } from "./worktree-CsKYexJM.mjs";
4
+ import { s as findProjectRoot$1 } from "./project-C3ChRLZy.mjs";
5
+ import { i as getSwiftpmCacheUsage, n as swiftpmCacheLines, r as getAgentDeviceUsage, t as agentDeviceLines } from "./agent-device-usage-output-CZ66YA4T.mjs";
6
6
  import { archivedUsage, readArchives, readStatsReport, statsProjectKey } from "@stim-cli/core/state";
7
7
  import chalk from "chalk";
8
8
  //#region src/commands/stats.ts
@@ -1,4 +1,4 @@
1
- import { t as resolveMaintenanceSettings } from "./settings-BBpMcDbD.mjs";
1
+ import { t as resolveMaintenanceSettings } from "./settings-Djl-mpjX.mjs";
2
2
  import { maintenanceRunClaims, readMaintenanceState } from "@stim-cli/core/state";
3
3
  import { claimRemoveCommand, readClaimSet } from "@stim-cli/core/ownership-claim";
4
4
  //#region src/maintenance/status.ts
@@ -17,7 +17,9 @@ function maintenanceStatus() {
17
17
  } } : {},
18
18
  lastChecks: {
19
19
  pressure: state?.lastAt.pressure ?? null,
20
- size: state?.lastAt.size ?? null
20
+ size: state?.lastAt.size ?? null,
21
+ worktree: state?.lastAt.worktree ?? null,
22
+ sweep: state?.lastAt.sweep ?? null
21
23
  },
22
24
  pressure: state?.pressure ?? null,
23
25
  sizes: state?.sizes ?? [],
@@ -37,9 +39,9 @@ function maintenanceLine(status, includeLabel = true) {
37
39
  minute: "2-digit"
38
40
  }) : null;
39
41
  const outputs = status.plan.filter((action) => action.kind === "would-clear-outputs");
40
- const summary = outputs.length ? `would clear build outputs of ${outputs.length} ${outputs.length === 1 ? "workspace" : "workspaces"} (${(outputs.reduce((sum, action) => sum + action.bytes, 0) / 1024 ** 3).toFixed(1)} GB)` : `${status.plan.length} planned actions`;
42
+ const summary = status.mode === "on" && status.lastPass ? `${status.lastPass.actions} actions, ${(status.lastPass.freedBytes / 1024 ** 3).toFixed(1)} GB freed` : outputs.length ? `would clear build outputs of ${outputs.length} ${outputs.length === 1 ? "workspace" : "workspaces"} (${(outputs.reduce((sum, action) => sum + action.bytes, 0) / 1024 ** 3).toFixed(1)} GB)` : `${status.plan.length} planned actions`;
41
43
  const disk = status.pressure?.disk.map((volume) => `disk ${(volume.freeMb / 1024).toFixed(1)} GB free on ${volume.volume}`).join(", ");
42
- return `${includeLabel ? `Auto maintenance (${status.mode === "report" ? "report only" : "off"}): ` : ""}${at ? `${at}: ` : ""}${status.lastPass ? summary : "no pass has run yet"}${disk ? `; ${disk}` : ""}${status.running ? "; running" : ""}${status.lastPass?.blocked.length ? `; ${status.lastPass.blocked.join("; ")}` : ""}${status.invalid ? `; invalid: ${status.invalid}` : ""}${status.claim ? `; unresolved claim: ${status.claim.unresolved}; ${status.claim.removeCommand}` : ""}`;
44
+ return `${includeLabel ? `Auto maintenance (${status.mode === "report" ? "report only" : status.mode}): ` : ""}${at ? `${at}: ` : ""}${status.lastPass ? summary : "no pass has run yet"}${disk ? `; ${disk}` : ""}${status.running ? "; running" : ""}${status.lastPass?.blocked.length ? `; ${status.lastPass.blocked.join("; ")}` : ""}${status.invalid ? `; invalid: ${status.invalid}` : ""}${status.claim ? `; unresolved claim: ${status.claim.unresolved}; ${status.claim.removeCommand}` : ""}`;
43
45
  }
44
46
  function maintenanceLines(status) {
45
47
  const line = maintenanceLine(status);
@@ -1,43 +1,42 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
2
- import { B as parseDeviceSlotKey, F as volumeRootFor, H as projectDeviceSlots, R as deviceSlotKey, _ as loadConfig$1, d as getConfigDir, j as formatBytes } from "./config-D0DbpZtM.mjs";
3
- import { t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
4
- import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-CDAIFD-8.mjs";
5
- import { P as resolveSettings, at as gitCommonDirOnDisk, gt as repoRoot, it as gitCommonDir, ut as linkedWorktreesOnDisk } from "./settings-Cfd-0r2d.mjs";
6
- import { a as detectTutorial, c as findServerWorkspace, d as projectShortcut, i as detectPlatforms, p as readAppJson, r as detectIsExpo } from "./project-D47Rh0ly.mjs";
7
- import { a as listeningPidsByPort, c as processCwds, d as isMetroRunning, i as listeningPids, l as resolveProjectMetro, o as pidExists, s as processCwd } from "./metro-g8NqiJp-.mjs";
8
- import { b as workspaceLogErrorIndex, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-DqcCbpE7.mjs";
9
- import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-PeQiJuIu.mjs";
10
- import { _ as statusActivity, a as capacity, b as withWebFacts, c as diskLine, d as gitSummaryText, f as metroReverseTargets, g as remoteDeviceState, h as remoteDeviceLine, i as applyMachineMemory, l as environmentState, m as poolLine, n as activityLabel, o as deviceLeaseLines, p as parseDfFree, r as addReverseMissingIssue, s as deviceLeaseStates, v as tightVolumes, y as unprovisionedWorktrees } from "./status-CzS4bPO9.mjs";
11
- import { X as attributeMachineUsage, Z as readFootprints, a as machineNumber } from "./budget-DfcgFdQB.mjs";
12
- import { d as readWebActivity, f as tailLines, i as createDeviceProcessTables, r as createActivityReader } from "./activity-IRvJY_ru.mjs";
13
- import { i as listLeaseFiles, r as leaseIsExpired, s as parseWorkspaceLeases } from "./device-lease-DpoS36_u.mjs";
14
- import { c as readMetroTunnel, f as readWorkspaceLaunches, u as readRemoteSession } from "./state-BKa8wNN5.mjs";
15
- import { F as ownedAvdDeviceProfile, O as listAdbDevices, d as androidToolPath, ft as parkedMaxSetting, ot as POOL_SETTING_REMEDY, pt as readParked, z as ownedAvdSerialResolver } from "./android-B_YNZy61.mjs";
16
- import { d as listAllIosSimsAsync, v as parseSimctlList } from "./ios-DSfnPfse.mjs";
17
- import { t as resolveSupervisorTarget } from "./ownership-BMLqyBgJ.mjs";
18
- import { _ as statsProjectKey$1, a as buildStatusLine, i as buildReport, p as readStats$1, r as activeBuildState, s as parseActiveBuild, t as ACTIVE_BUILD_KEY } from "./build-progress-D0WkjCPd.mjs";
19
- import { a as parseNdjsonLine } from "./ndjson-PclOIwVY.mjs";
20
- import { n as describeMetroLastStop, o as metroLastStop } from "./stop-cause-rhmGfwvt.mjs";
21
- import { l as probeHostedSession } from "./hosted-client-Bp4knSwu.mjs";
22
- import { m as hasMetroReverse } from "./app-install-VPkI5WEg.mjs";
23
- import "./hosted-macos-DcxKjtfH.mjs";
24
- import { m as readEasSessionLedger$1, p as easMachineStateRoot$1 } from "./device-remote-hFSkpfQu.mjs";
25
- import { d as readIosDevices, s as isReachable } from "./ios-device-pAN4t54-.mjs";
26
- import { n as maintenanceLines, r as maintenanceStatus } from "./status-DlKvVJBE.mjs";
27
- import { i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures, s as mergeState } from "./warm-progress-DF4JRvYI.mjs";
28
- import { r as workspaceRecordingEnabled } from "./recordings-BNgsD1Tr.mjs";
1
+ import { t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
3
+ import { a as formatElapsed, i as formatDuration, r as clockTime, u as plural } from "./command-output-CBtzyIgF.mjs";
4
+ import { B as parseDeviceSlotKey, F as volumeRootFor, H as projectDeviceSlots, R as deviceSlotKey, _ as loadConfig$1, d as getConfigDir, j as formatBytes } from "./config-CgYMahz7.mjs";
5
+ import { c as gitCommonDirOnDisk, p as linkedWorktreesOnDisk, s as gitCommonDir, y as repoRoot } from "./worktree-CsKYexJM.mjs";
6
+ import { a as detectTutorial, c as findServerWorkspace, d as projectShortcut, i as detectIsExpo, p as readAppJson } from "./project-C3ChRLZy.mjs";
7
+ import { a as listeningPidsByPort, c as processCwds, d as isMetroRunning, i as listeningPids, l as resolveProjectMetro, o as pidExists, s as processCwd } from "./metro-Dh8T4Ytd.mjs";
8
+ import { b as workspaceLogErrorIndex, r as readWorkspaceState$1, x as workspaceLogsDir$1 } from "./workspace-state-C59dqG-Z.mjs";
9
+ import { a as readWebPage, o as readWebRecord, u as webFacts } from "./state-BG-aAk4k.mjs";
10
+ import { _ as statusActivity, a as capacity, b as withWebFacts, c as diskLine, d as gitSummaryText, f as metroReverseTargets, g as remoteDeviceState, h as remoteDeviceLine, i as applyMachineMemory, l as environmentState, m as poolLine, n as activityLabel, o as deviceLeaseLines, p as parseDfFree, r as addReverseMissingIssue, s as deviceLeaseStates, v as tightVolumes, y as unprovisionedWorktrees } from "./status-Dcr0Qexd.mjs";
11
+ import { A as buildReport, B as readStats$1, D as ACTIVE_BUILD_KEY, Ht as readMetroTunnel, Kt as readWorkspaceLaunches, N as parseActiveBuild, W as statsProjectKey$1, Wt as readRemoteSession, Xt as readFootprints, Yt as attributeMachineUsage, _ as metroLastStop, j as buildStatusLine, k as activeBuildState, o as machineNumber, p as describeMetroLastStop } from "./budget-DIhL2BKx.mjs";
12
+ import { m as resolveSupervisorTarget } from "./workspaces-xXItD8Dj.mjs";
13
+ import { d as readWebActivity, f as tailLines, i as createDeviceProcessTables, r as createActivityReader } from "./activity-BxnkDZDi.mjs";
14
+ import { i as listLeaseFiles, r as leaseIsExpired, s as parseWorkspaceLeases } from "./device-lease-Co-EwifR.mjs";
15
+ import { F as ownedAvdDeviceProfile, O as listAdbDevices, d as androidToolPath, ft as parkedMaxSetting, ot as POOL_SETTING_REMEDY, pt as readParked, z as ownedAvdSerialResolver } from "./android-DC3ZLuw0.mjs";
16
+ import { f as listAllIosSimsAsync, y as parseSimctlList } from "./ios-B3SbOWdw.mjs";
17
+ import { F as resolveSettings } from "./settings-CQyMElEP.mjs";
18
+ import { a as parseNdjsonLine } from "./ndjson-LGZAMsqa.mjs";
19
+ import { l as probeHostedSession } from "./hosted-client-C-rMtppF.mjs";
20
+ import { m as hasMetroReverse } from "./app-install-D-PUENug.mjs";
21
+ import { m as readEasSessionLedger$1, p as easMachineStateRoot$1 } from "./device-remote-tHbd1fKy.mjs";
22
+ import { d as readIosDevices, s as isReachable } from "./ios-device-vOaByMhw.mjs";
23
+ import "./hosted-macos-B-wEjlwG.mjs";
24
+ import { i as readSupervisorState } from "./stop-BTjs3xbc.mjs";
25
+ import { i as createStatusMeasurer, n as workspacePhase, r as applyStatusMeasures, s as mergeState } from "./warm-progress-CjB-MP6H.mjs";
26
+ import { r as workspaceRecordingEnabled } from "./recordings-BAWltsVt.mjs";
27
+ import { t as detectPlatforms } from "./projects-DD7dBTCj.mjs";
28
+ import { n as maintenanceLines, r as maintenanceStatus } from "./status-BEeL6IKz.mjs";
29
29
  import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
30
- import { t as triggerMaintenance } from "./trigger-Bemu8ytw.mjs";
31
- import { i as readSupervisorState } from "./stop-DQIasgKp.mjs";
32
- import { createHash, randomUUID } from "node:crypto";
30
+ import { t as triggerMaintenance } from "./trigger-CJMhwXe8.mjs";
33
31
  import { mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
34
32
  import { join, posix, resolve } from "node:path";
35
- import { closeSync as closeSync$1, existsSync as existsSync$1, fstatSync as fstatSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readSync as readSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
36
- import { homedir, totalmem } from "os";
37
33
  import { basename as basename$1, dirname as dirname$1, join as join$1 } from "path";
38
- import { rotatedLogPath } from "@stim-cli/core";
39
34
  import { DEVICE_RECLAIM_REASON, ERROR_SOURCES, archiveRoot, archivedUsage, bundleMarkerPlatform, countErrorEntries, gitMergeCacheDir, hostedAndroidPlacements, hostedAndroidRecords, hostedAndroidStatus, hostedIosPlacements, hostedIosRecords, hostedIosStatus, linkReplacedArchives, logFiles, macosAppState, parseHostedAndroidPlacement, parseHostedIosPlacement, queryLogs, readArchives, readBuildDetail, readBuildHistory, readDeviceIdleShutdowns, readDevicePlacement, readIdleStop, readLastBuilds, readMacosRecord, recordMatches, sortByTs, unreadableHostedAndroid, unreadableHostedIos, withDerivedFacts, withGitChip, withStateReadCache } from "@stim-cli/core/state";
40
35
  import chalk from "chalk";
36
+ import { closeSync as closeSync$1, existsSync as existsSync$1, fstatSync as fstatSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readSync as readSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, writeFileSync as writeFileSync$1 } from "fs";
37
+ import { rotatedLogPath } from "@stim-cli/core";
38
+ import { homedir, totalmem } from "os";
39
+ import { createHash, randomUUID } from "node:crypto";
41
40
  //#region src/device-host/hosted-native-status.ts
42
41
  function hostedNativeProbe(placement, probe, slot, platform) {
43
42
  const label = platform === "ios" ? "iOS" : "Android";
@@ -1,8 +1,8 @@
1
- import { H as projectDeviceSlots, R as deviceSlotKey } from "./config-D0DbpZtM.mjs";
2
- import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-CDAIFD-8.mjs";
3
- import { n as isInsideProject } from "./metro-g8NqiJp-.mjs";
4
- import { g as workspaceAgentDeviceDir } from "./workspace-state-DqcCbpE7.mjs";
5
- import { r as cdpEndpoint } from "./state-PeQiJuIu.mjs";
1
+ import { a as formatElapsed, o as formatLongDuration, r as clockTime, u as plural } from "./command-output-CBtzyIgF.mjs";
2
+ import { H as projectDeviceSlots, R as deviceSlotKey } from "./config-CgYMahz7.mjs";
3
+ import { n as isInsideProject } from "./metro-Dh8T4Ytd.mjs";
4
+ import { g as workspaceAgentDeviceDir } from "./workspace-state-C59dqG-Z.mjs";
5
+ import { r as cdpEndpoint } from "./state-BG-aAk4k.mjs";
6
6
  import { basename, sep } from "path";
7
7
  import { ACTIVITY_RECENCY_BASES } from "@stim-cli/core/state";
8
8
  //#region src/status.ts
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
2
  //#region src/devices/stim-desktop.ts
3
3
  const LAUNCH_SERVICES_LOOKUP = `ObjC.import('AppKit'); const url = $.NSWorkspace.sharedWorkspace.URLForApplicationWithBundleIdentifier('dev.stim.desktop'); url.isNil() ? '' : url.path.js`;
4
4
  const SCHEME_HANDLER_LOOKUP = `ObjC.import('AppKit'); const url = $.NSWorkspace.sharedWorkspace.URLForApplicationToOpenURL($.NSURL.URLWithString('stim-desktop://workspace')); url.isNil() ? '' : url.path.js`;
@@ -1,4 +1,4 @@
1
- import { t as getExecutor } from "./exec-CaErVv7t.mjs";
1
+ import { t as getExecutor } from "./exec-DWhCZDGm.mjs";
2
2
  import { accessSync, constants, realpathSync, statSync } from "node:fs";
3
3
  import { delimiter, join, resolve } from "node:path";
4
4
  //#region src/diagnostics/stim-installations.ts
@@ -1,8 +1,8 @@
1
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
2
- import { c as writeWorkspaceState, v as workspaceDir } from "./workspace-state-DqcCbpE7.mjs";
3
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-2mNzOlaB.mjs";
4
- import { a as requiredMacosRecord, i as macosRuntimeClaim } from "./state-DyaNTgfR.mjs";
5
- import { n as stopHostedMacos } from "./hosted-macos-DcxKjtfH.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { c as writeWorkspaceState, v as workspaceDir } from "./workspace-state-C59dqG-Z.mjs";
3
+ import { a as withWorkspaceProcessLock } from "./named-ports-BFIz1Shz.mjs";
4
+ import { a as requiredMacosRecord, i as macosRuntimeClaim } from "./state-xnqpx3AD.mjs";
5
+ import { n as stopHostedMacos } from "./hosted-macos-B-wEjlwG.mjs";
6
6
  import { readMacosRecord } from "@stim-cli/core/state";
7
7
  //#region src/macos/stop.ts
8
8
  async function stopProcess(record) {
@@ -1,21 +1,20 @@
1
- import { B as parseDeviceSlotKey, D as withConfigLock$1, E as upsertProject, H as projectDeviceSlots, V as parseDeviceSlotOption, W as validateDeviceSlot, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-D0DbpZtM.mjs";
2
- import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-BmRm1qV0.mjs";
3
- import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-CDAIFD-8.mjs";
4
- import { o as findCommandWorkspace } from "./project-D47Rh0ly.mjs";
5
- import { l as resolveProjectMetro, o as pidExists, r as killMetroTree, u as signalProcessTree } from "./metro-g8NqiJp-.mjs";
6
- import { a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-DqcCbpE7.mjs";
7
- import { n as fileLeaseIo, u as releaseWorkspaceLeases } from "./device-lease-DpoS36_u.mjs";
8
- import { a as clearRemoteSession, c as readMetroTunnel, i as clearManagedMetroTunnel, o as clearWorkspaceLaunches, s as clearWorkspaceSupervisor, u as readRemoteSession } from "./state-BKa8wNN5.mjs";
9
- import { g as teardownOwnedIosSim, h as teardownOwnedBrowser, i as stopTunnel, m as teardownOwnedAvd, t as resolveSupervisorTarget } from "./ownership-BMLqyBgJ.mjs";
10
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-2mNzOlaB.mjs";
11
- import { a as logVanishedSupervisor, l as withdrawDevServerStopRequest, s as requestDevServerStop } from "./stop-cause-rhmGfwvt.mjs";
12
- import { n as verifyCollectorOwnership } from "./ownership-DyRQru0q.mjs";
13
- import { t as stopMacosApp } from "./stop-BIiM49EY.mjs";
14
- import { i as stopHostedAndroid } from "./hosted-android-E1Heoqnv.mjs";
15
- import { f as resolveEasCliBin } from "./remote-cache-Ci4DQYYj.mjs";
16
- import { i as endRecordedSession } from "./device-remote-hFSkpfQu.mjs";
17
- import { a as decideStopAction, c as nativeRunWaitNotice, i as clearNativeRunCancel, l as requestNativeRunCancel, n as NATIVE_RUN_WAIT_MS, o as describeNativeRunHolder, s as nativeRunHolder, t as NATIVE_RUN_LOCK } from "./native-run-D1Q56rAD.mjs";
18
- import { r as stopHostedIos } from "./hosted-ios-BnbeYOUD.mjs";
1
+ import { n as ownership_claim_exports, t as process_identity_exports } from "./process-identity-Biv3arCO.mjs";
2
+ import { f as refuseNoProject, l as phaseLine, p as releasedLeaseFact, u as plural } from "./command-output-CBtzyIgF.mjs";
3
+ import { B as parseDeviceSlotKey, D as withConfigLock$1, E as upsertProject, H as projectDeviceSlots, V as parseDeviceSlotOption, W as validateDeviceSlot, o as clearSupervisor, p as getProject, z as deviceSlotPlatforms } from "./config-CgYMahz7.mjs";
4
+ import { o as findCommandWorkspace } from "./project-C3ChRLZy.mjs";
5
+ import { l as resolveProjectMetro, o as pidExists, r as killMetroTree, u as signalProcessTree } from "./metro-Dh8T4Ytd.mjs";
6
+ import { a as updateWorkspaceState, c as writeWorkspaceState, n as clearWorkspaceStateKeys, o as withWorkspaceStateLock, r as readWorkspaceState$1, v as workspaceDir } from "./workspace-state-C59dqG-Z.mjs";
7
+ import { Bt as clearWorkspaceLaunches, Ht as readMetroTunnel, Rt as clearManagedMetroTunnel, Vt as clearWorkspaceSupervisor, Wt as readRemoteSession, b as withdrawDevServerStopRequest, g as logVanishedSupervisor, v as requestDevServerStop, zt as clearRemoteSession } from "./budget-DIhL2BKx.mjs";
8
+ import { D as teardownOwnedBrowser, E as teardownOwnedAvd, O as teardownOwnedIosSim, g as stopTunnel, m as resolveSupervisorTarget } from "./workspaces-xXItD8Dj.mjs";
9
+ import { n as fileLeaseIo, u as releaseWorkspaceLeases } from "./device-lease-Co-EwifR.mjs";
10
+ import { a as withWorkspaceProcessLock } from "./named-ports-BFIz1Shz.mjs";
11
+ import { i as stopHostedAndroid } from "./hosted-android-Bv285t_t.mjs";
12
+ import { f as resolveEasCliBin } from "./remote-cache-BGg7aGIZ.mjs";
13
+ import { i as endRecordedSession } from "./device-remote-tHbd1fKy.mjs";
14
+ import { a as decideStopAction, c as nativeRunWaitNotice, i as clearNativeRunCancel, l as requestNativeRunCancel, n as NATIVE_RUN_WAIT_MS, o as describeNativeRunHolder, s as nativeRunHolder, t as NATIVE_RUN_LOCK } from "./native-run-B06FkmZx.mjs";
15
+ import { n as verifyCollectorOwnership } from "./ownership-D6Se7gg_.mjs";
16
+ import { r as stopHostedIos } from "./hosted-ios-D5mNmtj4.mjs";
17
+ import { t as stopMacosApp } from "./stop-BGhKMOuH.mjs";
19
18
  import { hostedAndroidDeviceName, hostedAndroidRecords, hostedIosRecords, hostedNativeRecords, isJsonObject, parseHostedNativePlacement } from "@stim-cli/core/state";
20
19
  import chalk from "chalk";
21
20
  //#region src/commands/stop.ts