stim 1.20.2 → 1.21.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 (217) hide show
  1. package/README.md +88 -8
  2. package/dist/acquire-artifact-CD4lbiWE.mjs +153 -0
  3. package/dist/act-DHAw2A2S.mjs +2667 -0
  4. package/dist/activity-BzVfHSrY.mjs +1376 -0
  5. package/dist/{agent-device-usage-output-Dzgv6lgR.mjs → agent-device-usage-output-zh1vhbLp.mjs} +21 -65
  6. package/dist/{android-HqP1_vB_.mjs → android-BEJ8Jpl7.mjs} +2 -2
  7. package/dist/{android-DCKZrNvV.mjs → android-BLgbNqox.mjs} +128 -78
  8. package/dist/{android-Dlzxshgp.mjs → android-CV_GCELZ.mjs} +5 -5
  9. package/dist/{android-Mz_Inn3w.mjs → android-DUYkNF4u.mjs} +184 -102
  10. package/dist/{android-cas-Bl-cLJBk.mjs → android-cas-Ct5b1xCK.mjs} +7 -6
  11. package/dist/android-cas-compiler.mjs +2 -2
  12. package/dist/android-project-BCAAmMwz.mjs +12 -0
  13. package/dist/api.d.mts +740 -8
  14. package/dist/api.mjs +585 -1
  15. package/dist/{artifact-HSwkIWEQ.mjs → artifact-B8T3S5gi.mjs} +223 -201
  16. package/dist/{artifact-D3czlUvT.mjs → artifact-DAuZ-FNU.mjs} +158 -148
  17. package/dist/{browser-web-CA-F1GQo.mjs → browser-web-QQzVjz3O.mjs} +26 -24
  18. package/dist/budget-Bs6SxxzO.mjs +9154 -0
  19. package/dist/{build-DYDbfkk5.mjs → build-CoPzQRNw.mjs} +144 -96
  20. package/dist/build-cache-DmyR9Zzc.mjs +602 -0
  21. package/dist/build-plan-CaFskB7_.mjs +188 -0
  22. package/dist/{cache-manifest-XH-fvDUj.mjs → cache-manifest-DkkqguoK.mjs} +2 -2
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-zdKiYQ3E.mjs → ccache-BJRZ9pG3.mjs} +10 -9
  25. package/dist/{cdp-Dq_ypAlJ.mjs → cdp-CWmIUMbw.mjs} +18 -5
  26. package/dist/{chrome-BnzZMqsR.mjs → chrome-B6tfCta1.mjs} +7 -4
  27. package/dist/{cli-CLP3diBm.mjs → cli-0DYf8QhQ.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/client-B7QVOlCr.d.mts +253 -0
  30. package/dist/client-UXD70ZbM.mjs +1406 -0
  31. package/dist/collector-run.d.mts +4 -40
  32. package/dist/collector-run.mjs +9 -8
  33. package/dist/{command-output-BTy8hZ0F.mjs → command-output-B1UrjZHL.mjs} +1 -1
  34. package/dist/config-CYcBF478.mjs +949 -0
  35. package/dist/{created-devices-Dzd5C2LF.mjs → created-devices-CqeBlrEn.mjs} +3 -3
  36. package/dist/{dependency-state-DG0p31-y.mjs → dependency-state-BbKQW83h.mjs} +20 -5
  37. package/dist/{detached-entry-B9C_zeQC.mjs → detached-entry-DFRyG1_o.mjs} +1 -1
  38. package/dist/{dev-client-DAWVIGBu.mjs → dev-client-UOeESKm6.mjs} +2 -2
  39. package/dist/device-DCxH7_By.mjs +1068 -0
  40. package/dist/{device-BECOiufl.mjs → device-ExJq8Ei7.mjs} +35 -35
  41. package/dist/{device-capacity-CBUAcRyQ.mjs → device-capacity-CMlqEcvw.mjs} +43 -13
  42. package/dist/device-host-worker.mjs +65 -61
  43. package/dist/{device-ios-COSi6oS1.mjs → device-ios-DRUeKaFV.mjs} +48 -45
  44. package/dist/{device-lease-run-Cw2M4z51.mjs → device-lease-run-C8raGFoP.mjs} +14 -26
  45. package/dist/{device-pool-Bf-pOhSw.mjs → device-pool-DMRpVX9a.mjs} +5 -5
  46. package/dist/doctor-BLHCYxzi.mjs +2 -0
  47. package/dist/{doctor-kfMBnUw6.mjs → doctor-DTvaDOda.mjs} +281 -317
  48. package/dist/{doctor-CB8oZKCk.mjs → doctor-Dhqebm0q.mjs} +183 -91
  49. package/dist/doctor-fingerprint.mjs +19 -0
  50. package/dist/{doctor-watchman-BRyV2adA.mjs → doctor-watchman-Cv1F10Kj.mjs} +40 -21
  51. package/dist/{eas-build-JyfqyHfC.mjs → eas-build-BomfRnFT.mjs} +53 -20
  52. package/dist/{build-plan-B7SZsc2N.mjs → eas-fallback-DJwZpy0c.mjs} +26 -208
  53. package/dist/{watchman-CPQFZLXY.mjs → eas-session-ledger-op6A54yi.mjs} +229 -11
  54. package/dist/{error-diagnostics-BR677IDM.mjs → error-diagnostics-Bf0rZvG9.mjs} +172 -82
  55. package/dist/exec-H20xSg2T.d.mts +65 -0
  56. package/dist/exec-_UbtCQcG.mjs +750 -0
  57. package/dist/gc-C-WwL0yi.mjs +3 -0
  58. package/dist/{gc-qWOMdnER.mjs → gc-_-dCXdyL.mjs} +584 -796
  59. package/dist/git-C3iTsJaZ.mjs +73 -0
  60. package/dist/{guide-G9cAbVAc.mjs → guide-Yqwt2bd6.mjs} +941 -269
  61. package/dist/{hosted-android-C3MHGld1.mjs → hosted-android-Bw-honsd.mjs} +8 -6
  62. package/dist/{hosted-client-ZEKpS9vw.mjs → hosted-client-DB_gBPfY.mjs} +34 -19
  63. package/dist/{hosted-ios-l-o3iM9J.mjs → hosted-ios-CUvOf4Vr.mjs} +1 -1
  64. package/dist/{hosted-logs-EzQM7-3Z.mjs → hosted-logs-DL_P5AdN.mjs} +77 -43
  65. package/dist/{hosted-macos-BACVAVqE.mjs → hosted-macos-QI141yKk.mjs} +21 -17
  66. package/dist/{hosted-native-A4s1QPXe.mjs → hosted-native-Ksyjgzq-.mjs} +30 -21
  67. package/dist/idle-BVeRGroT.d.mts +24 -0
  68. package/dist/{idle-shutdown-DtxhPTKe.mjs → idle-shutdown-DaKmZi0z.mjs} +11 -10
  69. package/dist/{ios-BwVCF7oA.mjs → ios-CQ68hG9s.mjs} +8 -8
  70. package/dist/{ios-RkW4pnQf.mjs → ios-CpByZy12.mjs} +140 -80
  71. package/dist/{ios-device-B5veSDDQ.mjs → ios-device-CXGP1bsD.mjs} +1 -1
  72. package/dist/{ios-device-D7pi2Sca.mjs → ios-device-CwFMehUS.mjs} +51 -26
  73. package/dist/{ios-project-K9hY_Jab.mjs → ios-project-WuwwBdvW.mjs} +13 -13
  74. package/dist/{ios-nOLJGVdy.mjs → ios-qNJt4dFm.mjs} +1 -1
  75. package/dist/ios-signing-DTTIChGs.mjs +489 -0
  76. package/dist/{ios-state-CBLe1xYw.mjs → ios-state-DvFX-K_l.mjs} +1 -1
  77. package/dist/{ios-Ce7bc7br.mjs → ios-ubFsBzwq.mjs} +129 -86
  78. package/dist/{js-swap-Bb3nsS07.mjs → js-swap-Cc1dttps.mjs} +53 -26
  79. package/dist/{launch-F4sOqAhB.mjs → launch-CD1yVc7U.mjs} +91 -90
  80. package/dist/{launch-C3qJ6Agb.mjs → launch-Zq2mOSDy.mjs} +82 -541
  81. package/dist/logs-BS00Anxf.mjs +352 -0
  82. package/dist/logs-CMm05HxN.mjs +255 -0
  83. package/dist/{macos-D7uDvO-z.mjs → macos-B65--pPd.mjs} +1 -1
  84. package/dist/{macos-Ch5VJmcS.mjs → macos-C-0qJ6zq.mjs} +225 -212
  85. package/dist/macos-run.mjs +1 -1
  86. package/dist/maintenance-run.mjs +122 -247
  87. package/dist/{metro-DnCEjCxs.mjs → metro-DEXpIhHC.mjs} +67 -12
  88. package/dist/{metro-gateway-CX9Xlkq2.mjs → metro-gateway-BMJNlj3E.mjs} +20 -12
  89. package/dist/{named-ports-4WopRPg-.mjs → named-ports-BWTzt6mu.mjs} +8 -63
  90. package/dist/native-android-JACyjTZs.mjs +844 -0
  91. package/dist/{native-gradle-inputs-BsLRrl7u.mjs → native-gradle-inputs-Bep9JcSF.mjs} +128 -140
  92. package/dist/native-inputs-TRTTTRxt.mjs +91 -0
  93. package/dist/native-run-DY_RLx3C.mjs +277 -0
  94. package/dist/{native-runtime-k8dTIrbK.mjs → native-runtime-Dg1Q7tfF.mjs} +9 -8
  95. package/dist/{native-xcode-inputs-CykopJdM.mjs → native-xcode-inputs-CB2iQeWq.mjs} +27 -18
  96. package/dist/{native-xcode-ios-Bbf30Gm0.mjs → native-xcode-ios-CXX39F7o.mjs} +96 -47
  97. package/dist/{ndjson-GOnbyvso.mjs → ndjson-CgE_o3Dl.mjs} +3 -3
  98. package/dist/offload-worker.d.mts +1 -46
  99. package/dist/offload-worker.mjs +197 -66
  100. package/dist/{ownership-DCtw_2IA.mjs → ownership-DEmM5vhh.mjs} +3 -3
  101. package/dist/{page-DRHy329N.mjs → page-CPaHeYqj.mjs} +7 -4
  102. package/dist/paths-BsJMoPP2.mjs +12 -0
  103. package/dist/paths-DQtTgsBf.mjs +42 -0
  104. package/dist/{placement-log-MOfPVgaM.mjs → placement-log-BqGbTa61.mjs} +5 -5
  105. package/dist/{plan-placement-V0TdzYXp.mjs → plan-placement-Bwj-IjY1.mjs} +6 -6
  106. package/dist/{ports-DdSUicVo.mjs → ports-D-MmCTdv.mjs} +3 -3
  107. package/dist/prebuild-uD_ipCxF.mjs +449 -0
  108. package/dist/{project-_phNIJfs.mjs → project-BZNjmW_8.mjs} +65 -37
  109. package/dist/{pull-request-CQ8sPbZa.mjs → pull-request-Lfetn8Kr.mjs} +2 -2
  110. package/dist/pull-request-zjCSAryH.d.mts +120 -0
  111. package/dist/pull-requests.d.mts +1 -119
  112. package/dist/pull-requests.mjs +1 -1
  113. package/dist/{react-native-android-CM1XRDwv.mjs → react-native-android-DuzH0cn3.mjs} +74 -48
  114. package/dist/{gradle-DSrXb6lG.mjs → react-native-build-rhk4smwQ.mjs} +292 -15
  115. package/dist/react-native-doctor-CQpuIMso.mjs +234 -0
  116. package/dist/{react-native-ios-Dhq_eiYQ.mjs → react-native-ios-Bhq1rJeV.mjs} +46 -28
  117. package/dist/{recordings-D0d5aQt0.mjs → recordings-DYteQSu4.mjs} +12 -9
  118. package/dist/{reload-C8JhxjSh.mjs → reload-CmTRFJaX.mjs} +93 -47
  119. package/dist/reload-DzjSl5P_.mjs +2 -0
  120. package/dist/{remote-BiR6aYjy.mjs → remote-ByYkXdGD.mjs} +15 -10
  121. package/dist/result-DNiS-tTP.mjs +434 -0
  122. package/dist/{run-BtPgpKks.mjs → run-D23HmJMs.mjs} +4 -5
  123. package/dist/selection-CSl9i5qU.mjs +619 -0
  124. package/dist/{server-bare-R2m_gsH8.mjs → server-bare-CxTrvDg8.mjs} +3 -4
  125. package/dist/{server-command-CTtCkmcQ.mjs → server-command-CtzloH3v.mjs} +14 -7
  126. package/dist/server-expo-C-90EhcG.mjs +2 -0
  127. package/dist/{server-expo-DsguMGUF.mjs → server-expo-DT_F_uVI.mjs} +50 -9
  128. package/dist/{settings-B717odTD.mjs → settings-CsJDEXgK.mjs} +234 -24
  129. package/dist/{settings-vk3mJGSm.d.mts → settings-DkdmlelE.d.mts} +6 -4
  130. package/dist/settings-T1gtc3bf.mjs +114 -0
  131. package/dist/settings-write-HyVZ8eQ8.mjs +359 -0
  132. package/dist/settings.schema.json +163 -16
  133. package/dist/{simslim-CCr3rE-A.mjs → simslim-Cgk17SXV.mjs} +14 -12
  134. package/dist/{slot-launch-DPt0m9Nd.mjs → slot-launch-DF8VfT64.mjs} +15 -20
  135. package/dist/{spawn-entry-Dcb7sDUz.mjs → spawn-entry-jw19m8Nl.mjs} +0 -1
  136. package/dist/stage-BIS0ydsV.mjs +183 -0
  137. package/dist/{start-BWqzODpb.mjs → start-7lpH7hmN.mjs} +63 -44
  138. package/dist/{start-TXeMmmO2.mjs → start-RChynRDp.mjs} +1 -1
  139. package/dist/{state-D1Icyjlu.mjs → state-C4ZtUisW.mjs} +40 -13
  140. package/dist/{state-CG_OFoaA.mjs → state-XMziexv2.mjs} +3 -2
  141. package/dist/{stats-BoY5sEPU.mjs → stats-53T7OTb9.mjs} +7 -13
  142. package/dist/stats-report-BFfMpWWF.mjs +16 -0
  143. package/dist/{status-WgFbkRzj.mjs → status-BL7jVyAB.mjs} +535 -447
  144. package/dist/status-CSi6tlRq.mjs +2 -0
  145. package/dist/{status-BTA7kKiQ.mjs → status-DqEUSSxs.mjs} +6 -4
  146. package/dist/{status-watch-C23ILtf9.mjs → status-watch-GDCfqpTE.mjs} +187 -22
  147. package/dist/status-worker.d.mts +1 -0
  148. package/dist/status-worker.mjs +19 -0
  149. package/dist/stim-desktop-C12we7lz.mjs +112 -0
  150. package/dist/{stop-DR6VoDIk.mjs → stop-Bk_1qiV6.mjs} +2 -2
  151. package/dist/{stop-BNmBMi1F.mjs → stop-CPzlM1L-.mjs} +138 -98
  152. package/dist/{stop-DPEhunlw.mjs → stop-D7h6jAXQ.mjs} +11 -10
  153. package/dist/supervisor-run.d.mts +8 -17
  154. package/dist/supervisor-run.mjs +63 -27
  155. package/dist/{support-DMTqj3Hm.mjs → support-67vraa1Q.mjs} +18 -11
  156. package/dist/{support-CwjbFs9H.mjs → support-Dlu37g6H.mjs} +12 -12
  157. package/dist/{swiftpm-macos-DRNVJWlb.mjs → swiftpm-macos-p8WZbxKU.mjs} +35 -24
  158. package/dist/toolchain-DhKwp9iI.mjs +2 -0
  159. package/dist/toolchain-Hp9sCpK4.mjs +873 -0
  160. package/dist/{trigger-CigAYjeL.mjs → trigger-BAahxUPq.mjs} +20 -5
  161. package/dist/trigger-Bf3uDcpv.mjs +2 -0
  162. package/dist/{warm-progress-BuY-Fvfn.mjs → warm-progress-BHX5r0Ei.mjs} +250 -156
  163. package/dist/{web-BDBMxDpx.mjs → web-CJmIj6AI.mjs} +18 -13
  164. package/dist/web-DknQETPs.mjs +2 -0
  165. package/dist/web-run.mjs +11 -12
  166. package/dist/windows-report.d.mts +1 -0
  167. package/dist/windows-report.mjs +18 -0
  168. package/dist/windows-report.ps1 +43 -0
  169. package/dist/workspace-process-lock-1_1OoVW5.mjs +57 -0
  170. package/dist/{workspace-state-DJt_MMvf.mjs → workspace-state-Cjuigeeu.mjs} +62 -58
  171. package/dist/{workspaces-C36s2jb9.mjs → workspaces-BccMFmGQ.mjs} +1188 -1079
  172. package/dist/worktree-CK2MpJW5.mjs +2 -0
  173. package/dist/{worktree-CgvJYJ-Q.mjs → worktree-DQ6Zi2Mv.mjs} +304 -53
  174. package/dist/xcode-Zlx3qjEs.mjs +896 -0
  175. package/package.json +7 -5
  176. package/shim/android-optimizations.gradle +7 -5
  177. package/dist/activity-BSV745Kz.mjs +0 -629
  178. package/dist/api-qvOzWyfO.mjs +0 -154
  179. package/dist/api-run.mjs +0 -294
  180. package/dist/app-install-BIKtMfPq.mjs +0 -896
  181. package/dist/artifact-lifecycle-DzPpBYvK.mjs +0 -30
  182. package/dist/budget-f7516Zk0.mjs +0 -4106
  183. package/dist/build-facts-DcLv2HSd.d.mts +0 -111
  184. package/dist/cancellation-C_22VQTH.mjs +0 -24
  185. package/dist/client-qQAaXSUs.mjs +0 -1771
  186. package/dist/config-BYDxlMY3.mjs +0 -562
  187. package/dist/device-DuiPJQSn.mjs +0 -290
  188. package/dist/device-lease-BX1sJQ2E.mjs +0 -1224
  189. package/dist/device-remote-xRT0Vmo9.mjs +0 -1272
  190. package/dist/eas-session-ledger-Cm0Gwq2F.mjs +0 -207
  191. package/dist/exec-DqKo9GKJ.mjs +0 -268
  192. package/dist/git-DDfFzkMm.mjs +0 -45
  193. package/dist/launch-verify-B6Q8hZP-.mjs +0 -428
  194. package/dist/logs-BGrEUaEs.mjs +0 -383
  195. package/dist/miss-reason-mKzZ4VvN.mjs +0 -238
  196. package/dist/native-android-D5qc3-_v.mjs +0 -226
  197. package/dist/ndjson-Du3j0AQ9.d.mts +0 -17
  198. package/dist/plan-C4TjdPsR.mjs +0 -260
  199. package/dist/prebuild-DYbucPXy.mjs +0 -212
  200. package/dist/preview-78a9kR_-.mjs +0 -1011
  201. package/dist/react-native-build-CtCccJtb.mjs +0 -239
  202. package/dist/react-native-doctor-CfRnFfjs.mjs +0 -78
  203. package/dist/remote-cache-OyOyVIS3.mjs +0 -526
  204. package/dist/result-CaJg5Iat.mjs +0 -186
  205. package/dist/server-expo-Bigriskl.mjs +0 -2
  206. package/dist/settings-BORNaaCO.mjs +0 -402
  207. package/dist/spawn-claims-DVS5RkMS.mjs +0 -72
  208. package/dist/stage-KNTQopqv.mjs +0 -157
  209. package/dist/stim-desktop-BzBN2Em2.mjs +0 -63
  210. package/dist/tailnet-Dh-qiYzG.mjs +0 -265
  211. package/dist/toolchain-BFkAcstd.mjs +0 -2
  212. package/dist/toolchain-DxSsNssu.mjs +0 -1657
  213. package/dist/trigger-9_USgmxz.mjs +0 -2
  214. package/dist/web-Dq-i3wzJ.mjs +0 -2
  215. package/dist/worktree-DpLdCHga.mjs +0 -2
  216. package/dist/{api-run.d.mts → doctor-fingerprint.d.mts} +0 -0
  217. package/dist/{errors-DzkMYh8Q.mjs → errors-ccaPc4ox.mjs} +2 -2
@@ -1,383 +0,0 @@
1
- import { U as parseDeviceSlotOption, W as projectDeviceSlots, _ as loadConfig$1, g as isPathPrefix, k as process_identity_exports } from "./config-BYDxlMY3.mjs";
2
- import { r as readWorkspaceState$1, w as workspaceLogsDir$1 } from "./workspace-state-DJt_MMvf.mjs";
3
- import { f as refuseNoProject, l as phaseLine, v as launchErrorPreview } from "./command-output-BTy8hZ0F.mjs";
4
- import { n as findCommandWorkspace } from "./project-_phNIJfs.mjs";
5
- import { n as SOURCES, t as LEVELS } from "./ndjson-GOnbyvso.mjs";
6
- import { n as agentDeviceLiveness, u as readAgentDeviceRecords } from "./activity-BSV745Kz.mjs";
7
- import { c as connectHost } from "./hosted-client-ZEKpS9vw.mjs";
8
- import { n as pullHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-EzQM7-3Z.mjs";
9
- import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-CBLe1xYw.mjs";
10
- import { i as captureWorkspaceCrashes, t as errorDiagnostics } from "./error-diagnostics-BR677IDM.mjs";
11
- import "./hosted-macos-BACVAVqE.mjs";
12
- import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
13
- import { realpathSync } from "node:fs";
14
- import { dirname, join, relative, resolve, sep } from "node:path";
15
- import { agentDeviceStateDirs, buildCriteria, compileGrep, createAgentActionReader, fileSizes, followLogs, logFiles, parseSince, queryJsonLogs, queryLogs, readLogRecords, readMacosRecord, recordMatches, sortByTs } from "@stim-cli/core/state";
16
- import { homedir } from "node:os";
17
- import chalk from "chalk";
18
- //#region src/devices/agent-actions.ts
19
- function workspaceAgentTargets(project, macos) {
20
- const targets = [];
21
- if (macos?.app && macos.bundleId) targets.push({
22
- platform: "macos",
23
- id: macos.launchId,
24
- slot: "default",
25
- bundleId: macos.bundleId,
26
- launchedAt: macos.app.startedAtMicros / 1e3
27
- });
28
- let slots;
29
- try {
30
- slots = projectDeviceSlots(project);
31
- } catch {
32
- return [];
33
- }
34
- for (const { slot, platforms } of slots) {
35
- const { ios, android } = platforms;
36
- if (ios?.owned && typeof ios.deviceUdid === "string") targets.push({
37
- platform: "ios",
38
- id: ios.deviceUdid,
39
- slot
40
- });
41
- if (android?.owned && typeof android.consolePort === "number" && typeof android.avdName === "string") targets.push({
42
- platform: "android",
43
- id: `emulator-${android.consolePort}`,
44
- slot,
45
- name: android.avdName
46
- });
47
- }
48
- return targets;
49
- }
50
- function canonicalDir(path) {
51
- try {
52
- return realpathSync(path);
53
- } catch {
54
- return resolve(path);
55
- }
56
- }
57
- function createAgentActionReader$1({ targets, sinceTs, home = homedir(), now, startOf = process_identity_exports.inspectProcessStart }) {
58
- let claimed;
59
- const read = createAgentActionReader({
60
- sessionsDirs: () => agentDeviceStateDirs(home).map((root) => join(root, "sessions")),
61
- targets,
62
- sinceTs,
63
- now,
64
- claimedDevice: (session, sessionsDir) => {
65
- const byId = claimed ? /* @__PURE__ */ new Map() : new Map((typeof targets === "function" ? targets() : targets).map((target) => [target.id, target]));
66
- claimed ??= new Map(readAgentDeviceRecords(home).filter((record) => record.kind === "claim" && record.session && record.deviceId).filter((record) => {
67
- const target = byId.get(record.deviceId);
68
- return target?.platform !== "macos" && (target?.name === void 0 || target.name === record.deviceName);
69
- }).filter((record) => agentDeviceLiveness(record, startOf) === "live").map((record) => [`${record.stateDir ? canonicalDir(record.stateDir) : ""}\0${record.session}`, record.deviceId]));
70
- return claimed.get(`${canonicalDir(dirname(sessionsDir))}\0${session}`) ?? claimed.get(`\0${session}`) ?? null;
71
- }
72
- });
73
- return () => {
74
- claimed = void 0;
75
- return read();
76
- };
77
- }
78
- //#endregion
79
- //#region src/device-host/hosted-logs-sync.ts
80
- function warning(machine, error) {
81
- const message = error.message.replace(/\.$/, "");
82
- const hint = message.includes("refused device-host.logs.query") ? ` If ${machine} runs an older stim-server, update it.` : "";
83
- return phaseLine("device", `Could not read the app's logs from ${machine}: ${message}. Showing the logs already copied here.${hint}`);
84
- }
85
- async function syncHostedMacosLogs(root, placement, slot, warnings, platform = "ios") {
86
- let host;
87
- try {
88
- host = await connectHost(placement.machine);
89
- if (slot !== void 0) await pullHostedNativeLogs(root, slot, placement, host, false, platform);
90
- else await pullHostedMacosLogs(root, placement, host);
91
- return true;
92
- } catch (error) {
93
- if (!warnings?.has(placement.machine)) {
94
- process.stderr.write(`${warning(placement.machine, error)}\n`);
95
- warnings?.add(placement.machine);
96
- }
97
- return false;
98
- } finally {
99
- host?.connection.close();
100
- }
101
- }
102
- function followHostedMacosLogs(root, { failing = false, intervalMs = 500, retryMs = 5e3, slot, platform = "ios" } = {}) {
103
- let host;
104
- let retryAt = 0;
105
- let stopped = false;
106
- let running = false;
107
- const tick = async () => {
108
- if (running || stopped || Date.now() < retryAt) return;
109
- running = true;
110
- try {
111
- const placement = slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host;
112
- if (!placement) {
113
- host?.connection.close();
114
- host = void 0;
115
- return;
116
- }
117
- host ??= await connectHost(placement.machine);
118
- if (slot !== void 0) await pullHostedNativeLogs(root, slot, placement, host, false, platform);
119
- else await pullHostedMacosLogs(root, placement, host);
120
- failing = false;
121
- } catch (error) {
122
- host?.connection.close();
123
- host = void 0;
124
- if (!failing) process.stderr.write(`${warning((slot !== void 0 ? (platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))[slot] : readMacosRecord(root)?.host)?.machine ?? "the host", error)}\n`);
125
- failing = true;
126
- retryAt = Date.now() + retryMs;
127
- } finally {
128
- running = false;
129
- }
130
- };
131
- const timer = setInterval(() => void tick(), intervalMs);
132
- return () => {
133
- stopped = true;
134
- clearInterval(timer);
135
- host?.connection.close();
136
- };
137
- }
138
- async function syncHostedLogs(root) {
139
- const macos = readMacosRecord(root)?.host;
140
- const warnings = /* @__PURE__ */ new Set();
141
- return (await Promise.all([
142
- ...macos ? [syncHostedMacosLogs(root, macos)] : [],
143
- ...Object.entries(readHostedIos(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings)),
144
- ...Object.entries(readHostedAndroid(root)).map(([slot, placement]) => syncHostedMacosLogs(root, placement, slot, warnings, "android"))
145
- ])).every(Boolean);
146
- }
147
- function followHostedLogs(root, failing) {
148
- const stops = /* @__PURE__ */ new Map();
149
- const refresh = () => {
150
- if (readMacosRecord(root)?.host && !stops.has("macos")) stops.set("macos", followHostedMacosLogs(root, { failing }));
151
- for (const platform of ["ios", "android"]) for (const slot of Object.keys(platform === "ios" ? readHostedIos(root) : readHostedAndroid(root))) {
152
- const key = `${platform}:${slot}`;
153
- if (!stops.has(key)) stops.set(key, followHostedMacosLogs(root, {
154
- failing,
155
- slot,
156
- platform
157
- }));
158
- }
159
- };
160
- refresh();
161
- const timer = setInterval(refresh, 500);
162
- return () => {
163
- clearInterval(timer);
164
- for (const stop of stops.values()) stop();
165
- };
166
- }
167
- //#endregion
168
- //#region src/commands/logs.ts
169
- const LEVEL_WIDTH = 5;
170
- const SRC_WIDTH = 6;
171
- const INDENT = " ";
172
- function padTimePart(value, width = 2) {
173
- return String(value).padStart(width, "0");
174
- }
175
- function formatTime(ts) {
176
- if (typeof ts !== "number" || !Number.isFinite(ts)) return "--:--:--.---";
177
- const d = new Date(ts);
178
- return `${padTimePart(d.getHours())}:${padTimePart(d.getMinutes())}:${padTimePart(d.getSeconds())}.${padTimePart(d.getMilliseconds(), 3)}`;
179
- }
180
- function formatStackFrame(frame) {
181
- if (!frame || typeof frame !== "object") return null;
182
- const where = [
183
- frame.file,
184
- frame.line,
185
- frame.column
186
- ].filter((p) => p !== void 0 && p !== null && p !== "").join(":");
187
- if (frame.fn && where) return `at ${frame.fn} (${where})`;
188
- if (frame.fn) return `at ${frame.fn}`;
189
- if (where) return `at ${where}`;
190
- return null;
191
- }
192
- function formatRecord(record, { paint } = {}) {
193
- const colour = paint || ((t) => t);
194
- const level = String(record?.level ?? "").padEnd(LEVEL_WIDTH);
195
- const src = String(record?.src ?? "").padEnd(SRC_WIDTH);
196
- const [first, ...rest] = (record?.msg === void 0 || record?.msg === null ? "" : String(record.msg)).split("\n");
197
- const lines = [`${formatTime(record?.ts)} ${colour(level)} ${src} ${first}`];
198
- for (const line of rest) lines.push(`${INDENT}${line}`);
199
- for (const frame of Array.isArray(record?.stack) ? record.stack : []) {
200
- const rendered = formatStackFrame(frame);
201
- if (rendered) lines.push(`${INDENT}${rendered}`);
202
- }
203
- return lines.join("\n");
204
- }
205
- function parseTail(value) {
206
- if (typeof value === "number" && Number.isInteger(value) && value >= 0) return { n: value };
207
- if (typeof value !== "string" || !/^\d+$/.test(value.trim())) return { error: `Invalid --tail value ${JSON.stringify(value)}. Use a non-negative whole number, e.g. --tail 50.` };
208
- return { n: parseInt(value.trim(), 10) };
209
- }
210
- function validateSources(sources) {
211
- if (sources === void 0 || sources === null) return { sources: void 0 };
212
- const list = Array.isArray(sources) ? sources : [sources];
213
- if (list.includes("all")) return { sources: [...SOURCES] };
214
- const unknown = list.filter((s) => !SOURCES.includes(s));
215
- if (unknown.length > 0) return { error: `Unknown --source value(s): ${unknown.join(", ")}. Use one or more of: ${SOURCES.join(", ")}, or all.` };
216
- return { sources: list };
217
- }
218
- function validateLevel(level) {
219
- if (LEVELS.includes(level)) return { level };
220
- return { error: `Invalid --level value ${JSON.stringify(level)}. Use one of: ${LEVELS.join(", ")}.` };
221
- }
222
- const ERRORS_PRINT_CAP = 20;
223
- function nearestRegisteredLogsProject(root, candidates) {
224
- return candidates.filter((candidate) => candidate !== root && isPathPrefix(root, candidate)).toSorted((a, b) => {
225
- const depth = (path) => relative(root, path).split(sep).length;
226
- return depth(a) - depth(b) || a.length - b.length || a.localeCompare(b);
227
- })[0] ?? null;
228
- }
229
- function registeredDescendantWithLogs(root) {
230
- const candidates = Object.keys(loadConfig$1()?.projects ?? {}).flatMap((path) => {
231
- try {
232
- const canonical = realpathSync(path);
233
- return logFiles(workspaceLogsDir$1(canonical)).length > 0 ? [canonical] : [];
234
- } catch {
235
- return [];
236
- }
237
- });
238
- return nearestRegisteredLogsProject(root, [...new Set(candidates)]);
239
- }
240
- function requireLogsWorkspace(root, dir) {
241
- if (logFiles(dir).length > 0) return;
242
- const descendant = registeredDescendantWithLogs(root);
243
- fail(`STIM_NO_PROJECT: No Stim workspace has run in ${root}.${descendant ? ` The nearest registered app with logs is ${descendant}; run this command from there.` : " Run `stim start`, `stim ios`, or `stim android` in the app first."}`);
244
- }
245
- const LEVEL_COLOURS = {
246
- debug: chalk.dim,
247
- info: chalk.reset,
248
- warn: chalk.yellow,
249
- error: chalk.red,
250
- fatal: chalk.bgRed
251
- };
252
- function logsCommand(program) {
253
- program.command("logs").description("Query this workspace's merged NDJSON log timeline (bundler, client, device, build, agent actions, maintenance). Prints and exits; an existing timeline with nothing matching is a successful, empty result. Use --follow to stream.").option("--slot <name>", "Only this device slot's records, plus the shared Metro and app client records once it has launched", parseDeviceSlotOption).option("--source <s...>", "Only these sources: metro, client, device, build, agent, maintenance, placement, or all").option("--level <l>", `Minimum level: ${LEVELS.join(", ")}`).option("--since <d>", "Only records newer than this, e.g. 30s, 5m, 2h").option("--grep <re>", "Only records whose message matches this regular expression").option("--tail <n>", "Only the last n matching records").option("--errors", "Errors and fatals since the last marker, from metro, client and build, plus confirmed native app-crash reports and stim web browser errors. Add --source maintenance for maintenance failures, or --source device or --source all for general device errors.").option("--follow", "Keep streaming new records until interrupted").option("--json", "Emit the raw records, one per line (valid NDJSON; zero matches is zero bytes, exit 0)").action(async (opts) => {
254
- const root = findCommandWorkspace(process.cwd());
255
- if (!root) {
256
- refuseNoProject({ json: false });
257
- return;
258
- }
259
- const dir = workspaceLogsDir$1(root);
260
- let sources;
261
- if (opts.source !== void 0) {
262
- const checked = validateSources(opts.source);
263
- if (checked.error) fail(checked.error);
264
- sources = checked.sources;
265
- }
266
- let minLevel;
267
- if (opts.level !== void 0) {
268
- const checked = validateLevel(opts.level);
269
- if (checked.error) fail(checked.error);
270
- minLevel = checked.level;
271
- }
272
- if (opts.since !== void 0) {
273
- const parsed = parseSince(opts.since);
274
- if (parsed.error) fail(parsed.error);
275
- }
276
- let tail;
277
- if (opts.tail !== void 0) {
278
- const parsed = parseTail(opts.tail);
279
- if (parsed.error) fail(parsed.error);
280
- tail = parsed.n;
281
- }
282
- if (opts.grep !== void 0) {
283
- const compiled = compileGrep(opts.grep);
284
- if (compiled.error) fail(compiled.error);
285
- }
286
- requireLogsWorkspace(root, dir);
287
- const hostedReachable = await syncHostedLogs(root);
288
- const query = {
289
- slot: opts.slot,
290
- dir,
291
- sources,
292
- minLevel,
293
- since: opts.since,
294
- grep: opts.grep,
295
- tail,
296
- errorsOnly: Boolean(opts.errors),
297
- errorContext: Boolean(opts.errors && !opts.json && !opts.follow)
298
- };
299
- const emit = (record) => {
300
- if (opts.json) {
301
- console.log(JSON.stringify(record));
302
- return;
303
- }
304
- const rendered = {
305
- ...record,
306
- msg: launchErrorPreview([record], root, { full: true }).join("\n"),
307
- stack: void 0
308
- };
309
- console.log(formatRecord(rendered, { paint: record?.level ? LEVEL_COLOURS[record.level] : void 0 }));
310
- };
311
- const captured = captureWorkspaceCrashes(root, dir);
312
- const offsets = opts.follow ? fileSizes(dir) : null;
313
- const workspaceTimeline = opts.follow ? readLogRecords(dir) : captured;
314
- const agentSince = workspaceTimeline[0]?.ts ?? (opts.follow ? Date.now() : void 0);
315
- const project = loadConfig$1()?.projects?.[root];
316
- const readAgent = (sources ? sources.includes("agent") : !opts.errors) && agentSince !== void 0 ? createAgentActionReader$1({
317
- targets: () => workspaceAgentTargets(project, readMacosRecord(root)),
318
- sinceTs: agentSince
319
- }) : null;
320
- const timeline = readAgent ? sortByTs([...workspaceTimeline, ...readAgent()]) : workspaceTimeline;
321
- const rawRecords = (opts.json ? queryJsonLogs : queryLogs)({
322
- ...query,
323
- records: timeline
324
- });
325
- const supervisorPort = readWorkspaceState$1(root)?.supervisor?.port;
326
- const records = opts.json ? rawRecords : await errorDiagnostics(rawRecords, {
327
- root,
328
- logsDir: dir,
329
- port: typeof supervisorPort === "number" ? supervisorPort : null,
330
- allowRequest: true,
331
- timeline
332
- });
333
- const errorCount = records.filter((record) => record.errorContext !== true).length;
334
- let seenErrors = 0;
335
- const capped = opts.errors && !opts.json && tail === void 0 && errorCount > 20 ? records.filter((record) => {
336
- if (record.errorContext === true) return seenErrors <= 20;
337
- seenErrors += 1;
338
- return seenErrors <= 20;
339
- }) : records;
340
- for (const record of capped) emit(record);
341
- const hidden = errorCount - capped.filter((record) => record.errorContext !== true).length;
342
- if (hidden > 0) console.log(chalk.dim(`Showing 20 of ${errorCount} matching error records; ${hidden} not shown. Add --tail ${rawRecords.length} to include all captured records before grouping, or --json for raw records. Stacks are shown in full.`));
343
- if (!opts.follow) {
344
- if (records.length === 0 && !opts.json) console.error(chalk.dim(`No matching log records in ${dir}`));
345
- return;
346
- }
347
- const criteria = buildCriteria({
348
- slot: opts.slot,
349
- sources,
350
- minLevel,
351
- since: opts.since,
352
- grep: opts.grep,
353
- errorsOnly: Boolean(opts.errors)
354
- });
355
- const stop = followLogs({
356
- dir,
357
- offsets,
358
- criteria,
359
- onRecord: emit,
360
- errorContext: opts.errors ? opts.json ? "field" : "msg" : void 0
361
- });
362
- const agentTimer = readAgent ? setInterval(() => {
363
- for (const record of readAgent()) if (recordMatches(record, criteria)) emit(record);
364
- }, 500) : null;
365
- const stopHosted = followHostedLogs(root, !hostedReachable);
366
- const finish = () => {
367
- stop();
368
- stopHosted?.();
369
- stopReader();
370
- if (agentTimer) clearInterval(agentTimer);
371
- process.exit(0);
372
- };
373
- const stopReader = watchStdoutReader(finish);
374
- process.on("SIGINT", finish);
375
- process.on("SIGTERM", finish);
376
- });
377
- }
378
- function fail(message) {
379
- console.error(chalk.red(message));
380
- process.exit(1);
381
- }
382
- //#endregion
383
- export { ERRORS_PRINT_CAP, logsCommand as default, formatRecord, formatStackFrame, formatTime, parseTail, validateLevel, validateSources };
@@ -1,238 +0,0 @@
1
- import { gt as gitCommonDirOnDisk } from "./settings-B717odTD.mjs";
2
- import { C as diffFingerprintSources, I as storedSources } from "./device-lease-BX1sJQ2E.mjs";
3
- import { m as sharedBuildCache } from "./workspace-state-DJt_MMvf.mjs";
4
- import { existsSync, realpathSync } from "node:fs";
5
- import { dirname, join, relative } from "node:path";
6
- import { LAST_BUILD_KEYS, loadConfig, readWorkspaceState } from "@stim-cli/core/state";
7
- import * as expoFingerprint from "@expo/fingerprint";
8
- //#region src/cache/miss-reason.ts
9
- const MISS_CHANGE_CAP = 20;
10
- function recordedBuilds(state, platform) {
11
- const builds = [];
12
- for (const value of [state?.[LAST_BUILD_KEYS[platform]], state?.lastBuild]) {
13
- const record = value;
14
- if (record?.platform !== platform) continue;
15
- const startedAt = typeof record.startedAt === "string" ? record.startedAt : "";
16
- if (typeof record.fingerprint === "string" && typeof record.cacheKey === "string") builds.push({
17
- fingerprint: record.fingerprint,
18
- cacheKey: record.cacheKey,
19
- startedAt
20
- });
21
- const carried = record.missReason?.baseline;
22
- if (typeof carried?.fingerprint === "string" && typeof carried.cacheKey === "string") builds.push({
23
- fingerprint: carried.fingerprint,
24
- cacheKey: carried.cacheKey,
25
- startedAt
26
- });
27
- }
28
- return builds;
29
- }
30
- function projectIdentity(root) {
31
- let real;
32
- try {
33
- real = realpathSync.native(root);
34
- } catch {
35
- return null;
36
- }
37
- for (let dir = real;; dir = dirname(dir)) {
38
- if (existsSync(join(dir, ".git"))) {
39
- const common = gitCommonDirOnDisk(dir);
40
- return common ? `${common}\n${relative(dir, real)}` : null;
41
- }
42
- if (dirname(dir) === dir) return null;
43
- }
44
- }
45
- function findMissBaseline(root, platform, { readState = readWorkspaceState, projectRoots = () => Object.keys(loadConfig()?.projects ?? {}), identity = projectIdentity, sourcesOf = (p, key) => storedSources(p, key, sharedBuildCache()) } = {}) {
46
- for (const build of recordedBuilds(readState(root), platform)) {
47
- const sources = sourcesOf(platform, build.cacheKey);
48
- if (sources) return {
49
- fingerprint: build.fingerprint,
50
- cacheKey: build.cacheKey,
51
- sources,
52
- from: "workspace"
53
- };
54
- }
55
- const project = identity(root);
56
- if (!project) return null;
57
- const others = [];
58
- for (const other of projectRoots()) {
59
- if (other === root || identity(other) !== project) continue;
60
- others.push(...recordedBuilds(readState(other), platform));
61
- }
62
- for (const build of others.toSorted((a, b) => (Date.parse(b.startedAt) || 0) - (Date.parse(a.startedAt) || 0))) {
63
- const sources = sourcesOf(platform, build.cacheKey);
64
- if (sources) return {
65
- fingerprint: build.fingerprint,
66
- cacheKey: build.cacheKey,
67
- sources,
68
- from: "project"
69
- };
70
- }
71
- return null;
72
- }
73
- const CATEGORY_RANK = {
74
- "native-dependency": 0,
75
- "app-config": 1,
76
- "config-plugin": 2,
77
- package: 3,
78
- "native-dir": 4,
79
- file: 5,
80
- "app-asset": 6,
81
- other: 7,
82
- "package-scripts": 8,
83
- autolinking: 9
84
- };
85
- function packageIn(path) {
86
- return [...path.matchAll(/(?:^|\/)node_modules\/((?:@[^/]+\/)?[^/]+)/g)].at(-1)?.[1] ?? null;
87
- }
88
- function describeChange({ name, change, reasons }) {
89
- const pkg = packageIn(name);
90
- if (name === "expoConfig" || reasons.includes("expoConfig")) return {
91
- category: "app-config",
92
- label: "app config changed"
93
- };
94
- if (pkg && reasons.some((reason) => /^(expo|rncore)Autolinking(Ios|Android)?$/.test(reason))) return {
95
- category: "native-dependency",
96
- label: `native dependency ${change}: ${pkg}`
97
- };
98
- if (pkg && reasons.includes("expoConfigPlugins")) return {
99
- category: "config-plugin",
100
- label: `config plugin ${change}: ${pkg}`
101
- };
102
- if (/^(expoAutolinkingConfig|rncoreAutolinkingConfig)(:|$)/.test(name)) return {
103
- category: "autolinking",
104
- label: "autolinking config changed"
105
- };
106
- if (name.startsWith("package:")) return {
107
- category: "package",
108
- label: `${name.slice(8)} ${change}`
109
- };
110
- if (name === "packageJson:scripts") return {
111
- category: "package-scripts",
112
- label: "package.json scripts changed"
113
- };
114
- if (reasons.includes("expoConfigExternalFile")) return {
115
- category: "app-asset",
116
- label: `app asset ${change}: ${name}`
117
- };
118
- if (reasons.includes("bareNativeDir")) return {
119
- category: "native-dir",
120
- label: `${name}/ ${change}`
121
- };
122
- if (reasons.length || name.includes("/") || name.includes(".")) return {
123
- category: "file",
124
- label: `${name} ${change}`
125
- };
126
- return {
127
- category: "other",
128
- label: `${name} ${change}`
129
- };
130
- }
131
- function rekeyPrefix(rekeyedBy) {
132
- return rekeyedBy.length ? `${rekeyedBy.join(" and ")} changed native inputs; ` : "";
133
- }
134
- function missReasonFromChanges({ changes, baseline, rekeyedBy = [] }) {
135
- const prefix = rekeyPrefix(rekeyedBy);
136
- if (!baseline) return {
137
- kind: "no-baseline",
138
- summary: `${prefix}no earlier build of this project in the cache to compare with`,
139
- changes: [],
140
- changeCount: 0,
141
- baseline: null,
142
- rekeyedBy
143
- };
144
- if (!changes.length) return {
145
- kind: "same-sources",
146
- summary: `${prefix}native inputs match the last build; no cached app for this configuration or target`,
147
- changes: [],
148
- changeCount: 0,
149
- baseline,
150
- rekeyedBy
151
- };
152
- const described = changes.map((change, index) => ({
153
- change,
154
- index,
155
- ...describeChange(change)
156
- })).toSorted((a, b) => CATEGORY_RANK[a.category] - CATEGORY_RANK[b.category] || a.index - b.index);
157
- const dependencyMoved = described.some((entry) => entry.category === "native-dependency");
158
- const labels = [...new Set(described.filter((entry) => !(dependencyMoved && entry.category === "autolinking")).map((entry) => entry.label))];
159
- const more = labels.length > 1 ? ` (+${labels.length - 1} more)` : "";
160
- return {
161
- kind: "changed",
162
- summary: `${prefix}${labels[0]}${more}`,
163
- changes: described.slice(0, MISS_CHANGE_CAP).map(({ change, category }) => ({
164
- source: change.name,
165
- change: change.change,
166
- category
167
- })),
168
- changeCount: changes.length,
169
- baseline,
170
- rekeyedBy
171
- };
172
- }
173
- function explainBuildMiss({ root, platform, current, rekeyedBy = [], baselineDeps, differ = expoFingerprint.diffFingerprints }) {
174
- const baseline = findMissBaseline(root, platform, baselineDeps);
175
- const changes = baseline ? diffFingerprintSources({
176
- previous: baseline.sources,
177
- previousHash: baseline.fingerprint,
178
- current,
179
- differ
180
- }) : [];
181
- return {
182
- reason: missReasonFromChanges({
183
- changes,
184
- baseline: baseline ? {
185
- fingerprint: baseline.fingerprint,
186
- cacheKey: baseline.cacheKey,
187
- from: baseline.from
188
- } : null,
189
- rekeyedBy
190
- }),
191
- changedNames: changes.map((change) => change.name),
192
- previousHash: baseline?.fingerprint ?? null
193
- };
194
- }
195
- function predictBuildMiss({ root, platform, current, prebuild }) {
196
- const { reason } = explainBuildMiss({
197
- root,
198
- platform,
199
- current
200
- });
201
- const baseline = reason.baseline && {
202
- fingerprint: reason.baseline.fingerprint,
203
- from: reason.baseline.from
204
- };
205
- if (!prebuild || !baseline) return {
206
- ...reason,
207
- baseline
208
- };
209
- const dir = platform === "ios" ? "ios/" : "android/";
210
- return {
211
- ...reason,
212
- kind: "prebuild-pending",
213
- summary: `${reason.summary} (before prebuild ${prebuild}s ${dir})`,
214
- baseline
215
- };
216
- }
217
- function skippedMissReason(summary) {
218
- return {
219
- kind: "cache-skipped",
220
- summary,
221
- changes: [],
222
- changeCount: 0,
223
- baseline: null,
224
- rekeyedBy: []
225
- };
226
- }
227
- function fingerprintErrorMissReason(message) {
228
- return {
229
- kind: "fingerprint-error",
230
- summary: `fingerprinting failed: ${message}`,
231
- changes: [],
232
- changeCount: 0,
233
- baseline: null,
234
- rekeyedBy: []
235
- };
236
- }
237
- //#endregion
238
- export { skippedMissReason as i, fingerprintErrorMissReason as n, predictBuildMiss as r, explainBuildMiss as t };