stim 1.4.0 → 1.6.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 (59) hide show
  1. package/README.md +3 -3
  2. package/dist/{android-BkM4qTaN.mjs → android-BkYmndPp.mjs} +5 -5
  3. package/dist/{android-BTR1KTMP.mjs → android-DLJB8ljN.mjs} +22 -22
  4. package/dist/{android-cas-BjLRZyks.mjs → android-cas-CrzI_Zha.mjs} +5 -5
  5. package/dist/{build-slots-D6sDzOe-.mjs → build-slots-CuPszJDu.mjs} +1 -1
  6. package/dist/{cache-manifest-D02TpYjA.mjs → cache-manifest-uoOKhgUD.mjs} +1 -1
  7. package/dist/cache-manifest.mjs +1 -1
  8. package/dist/cli.mjs +14 -14
  9. package/dist/collector-run.mjs +3 -3
  10. package/dist/{config-6vdGngKa.mjs → config-DMP7L7H6.mjs} +1 -1
  11. package/dist/{dependency-state-BMirHEPD.mjs → dependency-state-CTL8A9p3.mjs} +1 -1
  12. package/dist/{deps-Ck4wuTwa.mjs → deps-C1zGnr61.mjs} +1 -1
  13. package/dist/{dev-client-Cd0v7iZk.mjs → dev-client-BaTXAAnC.mjs} +9 -9
  14. package/dist/{device-CMDFzx7C.mjs → device-XY_5eGdN.mjs} +8 -8
  15. package/dist/{device-lease-DDJr85OK.mjs → device-lease-DBW-IL4p.mjs} +3 -3
  16. package/dist/{device-pool-DJvbIBGW.mjs → device-pool-C0s_83Og.mjs} +2 -2
  17. package/dist/{device-remote-CMfHhoc8.mjs → device-remote-D9wN3CdE.mjs} +6 -6
  18. package/dist/{device-CKXLnRRb.mjs → device-xoQxw8hR.mjs} +5 -5
  19. package/dist/{doctor-B_mfURdt.mjs → doctor-BRO8UKlK.mjs} +25 -168
  20. package/dist/{error-diagnostics-_VmkqRZo.mjs → error-diagnostics-B5STzxqN.mjs} +6 -6
  21. package/dist/{gc-0AyxmECv.mjs → gc-C-6grAQI.mjs} +12 -12
  22. package/dist/{guide-CGxdmQ0K.mjs → guide-CYtd7xbA.mjs} +49 -21
  23. package/dist/guide-status-BF6RsJJp.mjs +271 -0
  24. package/dist/{ios-CtmGLx3X.mjs → ios-Ccm6c8Hj.mjs} +21 -21
  25. package/dist/{logs-BF3qPA7w.mjs → logs-D4Poojxy.mjs} +4 -4
  26. package/dist/{metro-DFLmaVz8.mjs → metro-ato6ef3J.mjs} +3 -3
  27. package/dist/{named-ports-BO7Zpjp0.mjs → named-ports-DH9SXd0f.mjs} +3 -3
  28. package/dist/{ownership-BvSpZVBk.mjs → ownership-CD_XnpDu.mjs} +3 -3
  29. package/dist/{ownership-C08Yzrp7.mjs → ownership-CVY9cqCr.mjs} +3 -3
  30. package/dist/{ports-BiKqP92J.mjs → ports-A6uTJSPj.mjs} +3 -3
  31. package/dist/{ports-ClqG8GPt.mjs → ports-BZprTJRa.mjs} +1 -1
  32. package/dist/{project-CBFCwnN5.mjs → project-B_SDt4ip.mjs} +2 -2
  33. package/dist/{reclaim-DpDVo-AP.mjs → reclaim-WXTbXPX4.mjs} +10 -10
  34. package/dist/{reload-ByTqg6ZI.mjs → reload-xlQvHKfN.mjs} +6 -6
  35. package/dist/{server-bare-Buk-k8tI.mjs → server-bare-CCLb90FS.mjs} +11 -32
  36. package/dist/{server-expo-D4P7iTvf.mjs → server-expo-CX-zkgWl.mjs} +6 -14
  37. package/dist/server-expo-CjeTJ273.mjs +2 -0
  38. package/dist/{settings-DwfltIXQ.mjs → settings-CGHTt5vb.mjs} +7 -4
  39. package/dist/{slot-launch-DeKen9e5.mjs → slot-launch-BYjnljAs.mjs} +3 -3
  40. package/dist/{start-BpKUHcU_.mjs → start-DHYAyGzm.mjs} +16 -20
  41. package/dist/{state-CDbvmZdt.mjs → state-CnWzvCWP.mjs} +2 -2
  42. package/dist/{stats-k5qMjyxo.mjs → stats-DHrO0frH.mjs} +3 -3
  43. package/dist/{stats-C59QLKm2.mjs → stats-Fo9ACIv7.mjs} +1 -1
  44. package/dist/{status-Y2ij3dm6.mjs → status-QeLZb8SM.mjs} +14 -12
  45. package/dist/{stop-vKmmxhea.mjs → stop-CHTaw65F.mjs} +2 -2
  46. package/dist/{stop-_P2OQwmZ.mjs → stop-DsdOx9Hj.mjs} +11 -11
  47. package/dist/supervisor-run.d.mts +4 -1
  48. package/dist/supervisor-run.mjs +18 -10
  49. package/dist/{teardown-KsPpvldq.mjs → teardown-sm1FwF6V.mjs} +5 -5
  50. package/dist/{workspace-process-lock-UEIrvZMJ.mjs → workspace-process-lock-Bz19_R9R.mjs} +1 -1
  51. package/dist/{workspace-state-Do1e2mOH.mjs → workspace-state-WVwWw_hB.mjs} +1 -1
  52. package/dist/{worktree-BvcAIMdJ.mjs → worktree-CCNPg_f0.mjs} +25 -20
  53. package/dist/{worktree-DWNx4tUg.mjs → worktree-DJnBbQZ9.mjs} +49 -22
  54. package/dist/{xcode-D9tVItl-.mjs → xcode-DUF7jrXj.mjs} +89 -14
  55. package/package.json +5 -5
  56. package/shim/expo-metro-config.cjs +11 -17
  57. package/dist/server-expo-Dho5Raiw.mjs +0 -2
  58. package/shim/metro-cache-generation.cjs +0 -20
  59. package/shim/metro-cache-generation.d.cts +0 -5
@@ -1,13 +1,13 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { D as withDirLock, F as deviceSlotPlatforms, P as deviceSlotKey, f as getProject } from "./config-6vdGngKa.mjs";
3
- import { r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
4
- import { d as readWorkspaceLaunches } from "./state-CDbvmZdt.mjs";
2
+ import { D as withDirLock, F as deviceSlotPlatforms, P as deviceSlotKey, f as getProject } from "./config-DMP7L7H6.mjs";
3
+ import { r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
4
+ import { d as readWorkspaceLaunches } from "./state-CnWzvCWP.mjs";
5
5
  import { n as deviceConsoleLevel } from "./ios-device-D3pzTKQE.mjs";
6
- import { i as resolveProjectMetro } from "./metro-DFLmaVz8.mjs";
6
+ import { i as resolveProjectMetro } from "./metro-ato6ef3J.mjs";
7
7
  import { n as parseLogcatLine, t as androidClockOffset } from "./android-BW8i_YxU.mjs";
8
8
  import { _ as launchErrorPreview } from "./command-output-BuIb_ZOI.mjs";
9
- import { n as androidHome } from "./android-BkM4qTaN.mjs";
10
- import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-DDJr85OK.mjs";
9
+ import { n as androidHome } from "./android-BkYmndPp.mjs";
10
+ import { a as parseLease, n as fileLeaseIo, t as deviceLeasePath } from "./device-lease-DBW-IL4p.mjs";
11
11
  import { l as readLogRecords, t as attachExpoErrorContext } from "./logs-query-Cdp5aaCH.mjs";
12
12
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
13
13
  import { createHash, randomUUID } from "node:crypto";
@@ -1,18 +1,18 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { A as isOnMountedVolume, C as withConfigLock, E as ownership_claim_exports, F as deviceSlotPlatforms, L as projectDeviceSlots, M as volumeRootFor, O as directorySize, f as getProject, g as loadConfig, i as clearDevice, j as listMountedVolumes, k as formatBytes, u as getConfigDir, v as removeProject } from "./config-6vdGngKa.mjs";
3
- import { i as registeredCaches } from "./cache-manifest-D02TpYjA.mjs";
4
- import { h as workspaceDir, y as workspaceStateFile } from "./workspace-state-Do1e2mOH.mjs";
5
- import { _ as repoRoot, s as gitCommonDir } from "./worktree-DWNx4tUg.mjs";
6
- import { a as findProjectRoot, i as detectIsExpo } from "./project-CBFCwnN5.mjs";
2
+ import { A as isOnMountedVolume, C as withConfigLock, E as ownership_claim_exports, F as deviceSlotPlatforms, L as projectDeviceSlots, M as volumeRootFor, O as directorySize, f as getProject, g as loadConfig, i as clearDevice, j as listMountedVolumes, k as formatBytes, u as getConfigDir, v as removeProject } from "./config-DMP7L7H6.mjs";
3
+ import { i as registeredCaches } from "./cache-manifest-uoOKhgUD.mjs";
4
+ import { h as workspaceDir, y as workspaceStateFile } from "./workspace-state-WVwWw_hB.mjs";
5
+ import { g as repoRoot, s as gitCommonDir } from "./worktree-DJnBbQZ9.mjs";
6
+ import { a as findProjectRoot, i as detectIsExpo } from "./project-B_SDt4ip.mjs";
7
7
  import { m as shortUdid, o as formatLongDuration, u as plural } from "./command-output-BuIb_ZOI.mjs";
8
- import { B as listBuildLocks, S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-BkM4qTaN.mjs";
9
- import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-DwfltIXQ.mjs";
10
- import { S as resolveEasCliBin, a as POOL_SETTING_REMEDY, i as teardownParkedIosSim, l as parkedMaxSetting, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, u as readParked } from "./teardown-KsPpvldq.mjs";
8
+ import { B as listBuildLocks, S as listOrphanedAvdDirectories, T as ownedAvdDirectory, b as listAvds } from "./android-BkYmndPp.mjs";
9
+ import { A as resolveSettings, N as settingShapeErrors, a as SETTING_SHAPE_REMEDY } from "./settings-CGHTt5vb.mjs";
10
+ import { S as resolveEasCliBin, a as POOL_SETTING_REMEDY, i as teardownParkedIosSim, l as parkedMaxSetting, n as teardownOwnedIosSim, r as teardownParkedAvd, s as dropParked, t as teardownOwnedAvd, u as readParked } from "./teardown-sm1FwF6V.mjs";
11
11
  import { d as listIosDeviceTypes, g as parseRuntimeVersion, u as listAllIosSims } from "./ios-Deh5js5V.mjs";
12
- import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-DDJr85OK.mjs";
13
- import { n as listBuildSlots } from "./build-slots-D6sDzOe-.mjs";
14
- import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-CMfHhoc8.mjs";
15
- import { n as reclaimProject, t as describeDereferenced } from "./reclaim-DpDVo-AP.mjs";
12
+ import { i as listLeaseFiles, r as leaseIsExpired, u as removeExpiredLease } from "./device-lease-DBW-IL4p.mjs";
13
+ import { n as listBuildSlots } from "./build-slots-CuPszJDu.mjs";
14
+ import { C as verifyStoppedSession, S as stopSessionArgs, _ as inspectSessionForTeardown, d as withEasProjectLock, f as easMachineStateRoot, g as getSessionArgs, h as findOrphanedOwnedSessions, m as removeEasSessionClaim, p as readEasSessionLedger, u as withRemoteSessionLock, v as isDefinitiveMissingSessionError, x as parseSessionListPage, y as listOwnedSessionsArgs } from "./device-remote-D9wN3CdE.mjs";
15
+ import { n as reclaimProject, t as describeDereferenced } from "./reclaim-WXTbXPX4.mjs";
16
16
  import { InvalidArgumentError } from "commander";
17
17
  import { existsSync, readFileSync, readdirSync, realpathSync, rmSync, statSync } from "fs";
18
18
  import { homedir, tmpdir } from "os";
@@ -1,4 +1,6 @@
1
- import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-DwfltIXQ.mjs";
1
+ import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
2
+ import { t as ANDROID_AVD_CONFIG_HELP } from "./settings-CGHTt5vb.mjs";
3
+ import { t as guideStatus } from "./guide-status-BF6RsJJp.mjs";
2
4
  import chalk from "chalk";
3
5
  //#endregion
4
6
  //#region src/guide/index.ts
@@ -65,8 +67,12 @@ If warm fails or reports incomplete, resolve the reported failure first.
65
67
  A warm that cannot record its ownership claim refuses before copying. Follow
66
68
  the printed remedy and keep concurrent runs on the same STIM_HOME.
67
69
 
68
- Before native worktree work, run doctor for the platform in scope. It checks
69
- the source checkout from a linked worktree. Fix relevant findings and inspect the
70
+ Before native worktree work, run doctor for the platform in scope. The STATUS
71
+ block at the top of this topic says when it is due here: never run in this
72
+ checkout, older than seven days, or run under another Stim version. No block
73
+ means doctor is current and Stim is up to date; the same block names a newer
74
+ Stim release when one exists. Doctor checks the source
75
+ checkout from a linked worktree. Fix relevant findings and inspect the
70
76
  upstream gap; in the single-checkout workflow those seed findings do not
71
77
  appear. It also prints the running CLI version and the stim installation
72
78
  resolved from PATH. If that resolved installation is older than another one,
@@ -153,7 +159,7 @@ RULES DURING THE LOOP
153
159
  change does not need one.
154
160
  - For stale Metro transforms or file-map state, use stim start --reset-cache.
155
161
  It restarts only this app's verified owned Metro, preserving devices and other
156
- apps' caches. See guide lifecycle for reset scope and Expo requirements.
162
+ apps' caches. See guide lifecycle for reset scope.
157
163
  - Reload is not part of the normal workflow. Use stim reload on an owned local
158
164
  simulator or emulator when an error screen remains after the fix, and on
159
165
  Android after a failed first bundle load. It reloads JavaScript and never
@@ -2425,12 +2431,11 @@ a seed belongs to this workflow.
2425
2431
 
2426
2432
  # If stale Metro transforms or file-map state require recovery:
2427
2433
  stim start --reset-cache
2428
- # Restarts only this app's verified owned Metro, retaining its port/devices.
2429
- # Uses a fresh persistent cache namespace, not deletion of shared cache files.
2430
- # Other apps and worktrees keep their caches. Subsequent starts reuse the new
2431
- # namespace; another reset changes it again. Native build caches are unchanged.
2432
- # Expo requires SDK 54+ and Stim's config adapter. Custom file-map cache
2433
- # managers must honor Metro's fileMapCacheDirectory for file-map invalidation.
2434
+ # Restarts only this app's verified owned Metro, retaining its port/devices,
2435
+ # with Metro's own reset (resetCache on a bare server, expo start --clear).
2436
+ # That clears every store in the app's Metro config, including this app's
2437
+ # shared transform store, so other worktrees of the SAME app rebuild their
2438
+ # transforms too. Other apps and native build caches are unchanged.
2434
2439
 
2435
2440
  # 3. Owned device booted, native inputs fingerprinted, cached build
2436
2441
  # installed (or built), app launched wired to port 8082, device-log
@@ -3072,8 +3077,13 @@ with machine or project optimization settings; see \`guide settings\`:
3072
3077
  ios xcodebuild carries COMPILATION_CACHE_ENABLE_CACHING, a shared
3073
3078
  COMPILATION_CACHE_CAS_PATH and a clang prefix mapping of this
3074
3079
  workspace's root, so compiled output crosses worktrees with no
3075
- Podfile post_install block. Xcode 26+ only, and skipped entirely
3076
- when the project configured ccache (the two defeat each other).
3080
+ Podfile post_install block. Swift joins in, with its own prefix
3081
+ mapping, once xcrun swift reports 6.4 or newer (Xcode 27) and
3082
+ react-native is 0.87 or newer; the cache line names Swift on or
3083
+ off and why. Xcode still excludes Swift targets built without
3084
+ explicit modules; the post-build cache line counts those.
3085
+ Xcode 26+ only, and skipped entirely when the project
3086
+ configured ccache (the two defeat each other).
3077
3087
  android gradlew carries --build-cache, so task outputs cross worktrees with
3078
3088
  no org.gradle.caching=true in gradle.properties. Debug builds also
3079
3089
  carry -PreactNativeArchitectures=<target ABI>, using the owned
@@ -4537,9 +4547,10 @@ be setup steps are supplied by Stim on the command lines it composes itself:
4537
4547
 
4538
4548
  xcodebuild COMPILATION_CACHE_ENABLE_CACHING / COMPILATION_CACHE_CAS_PATH /
4539
4549
  SWIFT_ENABLE_COMPILE_CACHE / CLANG_ENABLE_PREFIX_MAPPING /
4540
- CLANG_OTHER_PREFIX_MAPPINGS -- so no Podfile post_install block
4541
- (Xcode 26+ only, and skipped when the project configured ccache,
4542
- which defeats it)
4550
+ CLANG_OTHER_PREFIX_MAPPINGS, plus SWIFT_ENABLE_PREFIX_MAPPING /
4551
+ SWIFT_OTHER_PREFIX_MAPPINGS on a Swift 6.4+ toolchain -- so no
4552
+ Podfile post_install block (Xcode 26+ only, and skipped when the
4553
+ project configured ccache, which defeats it)
4543
4554
  gradlew --build-cache -- so no org.gradle.caching=true in a committed
4544
4555
  gradle.properties. Debug builds add
4545
4556
  -PreactNativeArchitectures=<target ABI> when the owned
@@ -4577,7 +4588,6 @@ key inherits the next layer. Changes apply on the next build or Metro restart.
4577
4588
  "metroWarmup": true,
4578
4589
  "ios": {
4579
4590
  "compilationCache": true,
4580
- "swiftCompilationCache": false,
4581
4591
  "prefixMapping": true
4582
4592
  },
4583
4593
  "android": {
@@ -4614,7 +4624,18 @@ The example shows the defaults. Full setting names and behavior:
4614
4624
  optimizations.ios.compilationCache
4615
4625
  controls Xcode compilation caching (Xcode 26+).
4616
4626
  optimizations.ios.swiftCompilationCache
4617
- opts into experimental Swift caching, requiring compilationCache=true.
4627
+ unset by default: Swift caching turns on, with Swift prefix mapping, when
4628
+ xcrun swift reports Swift 6.4 or newer (Xcode 27), where swift-frontend no
4629
+ longer crashes on prefix-mapped batches, and the project's react-native is
4630
+ 0.87 or newer. Older toolchains leave it off. React Native before 0.87
4631
+ sets SWIFT_ENABLE_EXPLICIT_MODULES=NO on every target for its prebuilt
4632
+ core, and Xcode refuses Swift caching without explicit modules, so those
4633
+ projects stay off too; the cache line names which gate applied.
4634
+ true forces it on any toolchain and React Native version, unmapped below
4635
+ Swift 6.4, so entries only hit within one checkout. false keeps it off.
4636
+ Requires compilationCache=true. A project that still disables explicit
4637
+ modules itself sees the excluded target count on the post-build cache
4638
+ line. Stim does not override that project setting.
4618
4639
  optimizations.ios.prefixMapping
4619
4640
  controls Clang source/DerivedData prefix mapping. false clears Stim's
4620
4641
  mappings. The existing Xcode version and project-ccache guards still apply.
@@ -4819,10 +4840,17 @@ function renderIndex(version) {
4819
4840
  lines.push("", "Read one with: stim guide <topic> (sectioned topics: stim guide <topic> <section>)");
4820
4841
  return lines.join("\n");
4821
4842
  }
4822
- function guideCommand(program, version) {
4823
- program.command("guide [topic] [section]").description("Print reference documentation for THIS version of Stim (topics: " + topicNames().join(", ") + "). A topic with sections prints its section index; name a section to print only it, e.g. `stim guide errors STIM_NO_METRO` or `stim guide lifecycle builds`. Generated by the binary, so it cannot drift from the installed CLI.").action((topic, section) => {
4843
+ function guideCommand(program, version, status = (running) => guideStatus({
4844
+ projectRoot: findProjectRoot(process.cwd()),
4845
+ running
4846
+ })) {
4847
+ program.command("guide [topic] [section]").description("Print reference documentation for THIS version of Stim (topics: " + topicNames().join(", ") + "). A topic with sections prints its section index; name a section to print only it, e.g. `stim guide errors STIM_NO_METRO` or `stim guide lifecycle builds`. Generated by the binary, so it cannot drift from the installed CLI.").action(async (topic, section) => {
4848
+ const withStatus = async (body) => {
4849
+ const block = await status(version);
4850
+ return block ? `${block}\n\n${body}` : body;
4851
+ };
4824
4852
  if (!topic) {
4825
- console.log(renderIndex(version));
4853
+ console.log(await withStatus(renderIndex(version)));
4826
4854
  return;
4827
4855
  }
4828
4856
  const body = renderTopic(topic);
@@ -4834,7 +4862,7 @@ function guideCommand(program, version) {
4834
4862
  process.exit(1);
4835
4863
  }
4836
4864
  if (!section) {
4837
- console.log(body);
4865
+ console.log(topic === "agent" ? await withStatus(body) : body);
4838
4866
  return;
4839
4867
  }
4840
4868
  const index = renderSectionIndex(topic);
@@ -0,0 +1,271 @@
1
+ import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
+ import { S as upsertProject, f as getProject, u as getConfigDir } from "./config-DMP7L7H6.mjs";
3
+ import { accessSync, constants, mkdirSync, readFileSync, realpathSync, renameSync, statSync, unlinkSync, writeFileSync } from "node:fs";
4
+ import { delimiter, join, resolve } from "node:path";
5
+ //#region src/stim-installations.ts
6
+ const VERSION_OUTPUT_LIMIT = 4096;
7
+ function parsedVersion(version) {
8
+ const match = /^v?(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$/.exec(version);
9
+ if (!match) return null;
10
+ const core = [
11
+ match[1],
12
+ match[2],
13
+ match[3]
14
+ ];
15
+ if (core.some((part) => part.length > 1 && part.startsWith("0"))) return null;
16
+ const prereleaseParts = match[4]?.split(".");
17
+ if (prereleaseParts?.some((part) => !part || /^\d+$/.test(part) && part.length > 1 && part.startsWith("0"))) return null;
18
+ const prerelease = prereleaseParts?.map((part) => /^\d+$/.test(part) ? Number(part) : part);
19
+ return {
20
+ core: core.map(Number),
21
+ prerelease: prerelease ?? null
22
+ };
23
+ }
24
+ function compareStimVersions(left, right) {
25
+ const a = parsedVersion(left);
26
+ const b = parsedVersion(right);
27
+ if (!a || !b) return null;
28
+ for (let index = 0; index < a.core.length; index += 1) {
29
+ const difference = (a.core[index] ?? 0) - (b.core[index] ?? 0);
30
+ if (difference !== 0) return difference;
31
+ }
32
+ if (!a.prerelease && !b.prerelease) return 0;
33
+ if (!a.prerelease) return 1;
34
+ if (!b.prerelease) return -1;
35
+ for (let index = 0; index < Math.max(a.prerelease.length, b.prerelease.length); index += 1) {
36
+ const x = a.prerelease[index];
37
+ const y = b.prerelease[index];
38
+ if (x === void 0) return -1;
39
+ if (y === void 0) return 1;
40
+ if (x === y) continue;
41
+ if (typeof x === "number" && typeof y === "number") return x - y;
42
+ if (typeof x === "number") return -1;
43
+ if (typeof y === "number") return 1;
44
+ return x < y ? -1 : 1;
45
+ }
46
+ return 0;
47
+ }
48
+ function parseStimVersionOutput(output) {
49
+ const version = output?.split("\n")[0]?.trim() ?? "";
50
+ return parsedVersion(version) ? version.replace(/^v/, "") : null;
51
+ }
52
+ function executableNames(platform) {
53
+ return platform === "win32" ? [
54
+ "stim.cmd",
55
+ "stim.exe",
56
+ "stim"
57
+ ] : ["stim"];
58
+ }
59
+ function stimExecutablePaths(pathValue, { platform = process.platform, cwd = process.cwd() } = {}) {
60
+ const found = [];
61
+ const seen = /* @__PURE__ */ new Set();
62
+ for (const entry of pathValue.split(delimiter)) {
63
+ const directory = resolve(cwd, entry || ".");
64
+ for (const name of executableNames(platform)) {
65
+ const path = join(directory, name);
66
+ try {
67
+ accessSync(path, platform === "win32" ? constants.F_OK : constants.X_OK);
68
+ if (!statSync(path).isFile()) continue;
69
+ const realPath = realpathSync(path);
70
+ if (seen.has(realPath)) continue;
71
+ seen.add(realPath);
72
+ found.push({
73
+ path,
74
+ realPath
75
+ });
76
+ } catch {}
77
+ }
78
+ }
79
+ return found;
80
+ }
81
+ function canonicalPath(path) {
82
+ if (!path) return null;
83
+ try {
84
+ return realpathSync(resolve(path));
85
+ } catch {
86
+ return resolve(path);
87
+ }
88
+ }
89
+ function analyzeStimVersions(runningVersion, runningPath, installations) {
90
+ const candidates = [runningVersion, ...installations.map((entry) => entry.version)];
91
+ const versions = [...new Set(candidates)].filter((version) => version !== null && compareStimVersions(version, version) !== null).toSorted((left, right) => -(compareStimVersions(left, right) ?? 0));
92
+ const highestVersion = versions[0] ?? null;
93
+ const resolved = installations[0] ?? null;
94
+ return {
95
+ runningVersion,
96
+ runningPath,
97
+ resolved,
98
+ installations,
99
+ versions,
100
+ highestVersion,
101
+ resolvedIsOlder: Boolean(resolved?.version && highestVersion && (compareStimVersions(resolved.version, highestVersion) ?? 0) < 0)
102
+ };
103
+ }
104
+ function probeStimVersion(path, timeoutMs) {
105
+ return new Promise((resolveProbe) => {
106
+ let settled = false;
107
+ let output = "";
108
+ const finish = (version) => {
109
+ if (settled) return;
110
+ settled = true;
111
+ clearTimeout(timer);
112
+ resolveProbe(version);
113
+ };
114
+ let child;
115
+ try {
116
+ child = getExecutor().spawn(path, ["--version"], {
117
+ stdio: [
118
+ "ignore",
119
+ "pipe",
120
+ "ignore"
121
+ ],
122
+ detached: process.platform !== "win32"
123
+ });
124
+ } catch {
125
+ resolveProbe(null);
126
+ return;
127
+ }
128
+ const timer = setTimeout(() => {
129
+ try {
130
+ if (process.platform !== "win32" && child.pid) process.kill(-child.pid, "SIGKILL");
131
+ else child.kill("SIGKILL");
132
+ } catch {}
133
+ finish(null);
134
+ }, timeoutMs);
135
+ child.stdout?.on("data", (chunk) => {
136
+ if (output.length < VERSION_OUTPUT_LIMIT) output += String(chunk).slice(0, VERSION_OUTPUT_LIMIT - output.length);
137
+ });
138
+ child.on("error", () => finish(null));
139
+ child.on("close", (code) => finish(code === 0 ? parseStimVersionOutput(output) : null));
140
+ });
141
+ }
142
+ async function inspectStimVersions(runningVersion, { pathValue = process.env.PATH ?? "", runningPath = process.argv[1], probeTimeoutMs = 5e3 } = {}) {
143
+ const paths = stimExecutablePaths(pathValue);
144
+ const versions = await Promise.all(paths.map((entry) => probeStimVersion(entry.path, probeTimeoutMs)));
145
+ const installations = paths.map((entry, index) => ({
146
+ path: entry.path,
147
+ realPath: entry.realPath,
148
+ version: versions[index] ?? null
149
+ }));
150
+ return analyzeStimVersions(runningVersion, canonicalPath(runningPath), installations);
151
+ }
152
+ //#endregion
153
+ //#region src/guide-status.ts
154
+ const DAY_MS = 864e5;
155
+ const DOCTOR_STALE_MS = 7 * DAY_MS;
156
+ const UPDATE_CHECK_INTERVAL_MS = DAY_MS;
157
+ const UPDATE_CHECK_TIMEOUT_MS = 2e3;
158
+ const LATEST_URL = "https://registry.npmjs.org/stim/latest";
159
+ const PLATFORMS = ["ios", "android"];
160
+ function recordDoctorRun(projectRoot, platform, version, now = /* @__PURE__ */ new Date()) {
161
+ const run = {
162
+ at: now.toISOString(),
163
+ version
164
+ };
165
+ try {
166
+ upsertProject(projectRoot, (existing) => {
167
+ const doctorRuns = { ...existing.doctorRuns };
168
+ for (const target of platform ? [platform] : PLATFORMS) doctorRuns[target] = run;
169
+ return { doctorRuns };
170
+ });
171
+ } catch {}
172
+ }
173
+ function doctorDueReason(record, running, now) {
174
+ const at = record ? Date.parse(record.at) : NaN;
175
+ if (!record || Number.isNaN(at)) return "never run";
176
+ if (record.version !== running) return `last run with stim ${record.version}`;
177
+ const age = now.getTime() - at;
178
+ if (age > DOCTOR_STALE_MS) return `last run ${Math.floor(age / DAY_MS)} days ago`;
179
+ return null;
180
+ }
181
+ function updateCacheFile() {
182
+ return join(getConfigDir(), "update-check.json");
183
+ }
184
+ function readUpdateCache() {
185
+ try {
186
+ const parsed = JSON.parse(readFileSync(updateCacheFile(), "utf-8"));
187
+ if (typeof parsed?.checkedAt !== "string") return null;
188
+ return {
189
+ checkedAt: parsed.checkedAt,
190
+ latest: typeof parsed.latest === "string" ? parsed.latest : null
191
+ };
192
+ } catch {
193
+ return null;
194
+ }
195
+ }
196
+ function writeUpdateCache(cache) {
197
+ const target = updateCacheFile();
198
+ const tmp = `${target}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
199
+ try {
200
+ mkdirSync(getConfigDir(), { recursive: true });
201
+ writeFileSync(tmp, `${JSON.stringify(cache)}\n`);
202
+ renameSync(tmp, target);
203
+ } catch {
204
+ try {
205
+ unlinkSync(tmp);
206
+ } catch {}
207
+ }
208
+ }
209
+ async function fetchLatest(fetchImpl) {
210
+ const res = await fetchImpl(LATEST_URL, { signal: AbortSignal.timeout(UPDATE_CHECK_TIMEOUT_MS) });
211
+ if (!res.ok) return null;
212
+ const body = await res.json();
213
+ return typeof body.version === "string" ? body.version : null;
214
+ }
215
+ async function checkForUpdate(running, { now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch } = {}) {
216
+ if (process.env.STIM_NO_UPDATE_CHECK) return null;
217
+ const cached = readUpdateCache();
218
+ const checkedAt = cached ? Date.parse(cached.checkedAt) : NaN;
219
+ let latest = cached?.latest ?? null;
220
+ if (Number.isNaN(checkedAt) || now.getTime() - checkedAt > UPDATE_CHECK_INTERVAL_MS) {
221
+ try {
222
+ latest = await fetchLatest(fetchImpl);
223
+ } catch {
224
+ latest = null;
225
+ }
226
+ writeUpdateCache({
227
+ checkedAt: now.toISOString(),
228
+ latest
229
+ });
230
+ }
231
+ if (!latest) return null;
232
+ const comparison = compareStimVersions(latest, running);
233
+ return comparison !== null && comparison > 0 ? latest : null;
234
+ }
235
+ function renderGuideStatus({ running, doctor, latest }) {
236
+ const lines = [];
237
+ if (doctor.length) {
238
+ const named = doctor.map((due) => `${due.platform} (${due.reason})`).join(" and ");
239
+ const command = doctor.length === 1 ? `stim doctor --platform ${doctor[0]?.platform}` : "stim doctor";
240
+ lines.push(` Doctor is due for ${named}.`, ` Run before native work: ${command}`);
241
+ }
242
+ if (latest) lines.push(` stim ${latest} is available (running ${running}): npm install -g stim@latest`);
243
+ if (!lines.length) return null;
244
+ return ["STATUS", ...lines].join("\n");
245
+ }
246
+ async function guideStatus({ projectRoot, running, now = /* @__PURE__ */ new Date(), fetch: fetchImpl = fetch }) {
247
+ const doctor = [];
248
+ if (projectRoot) {
249
+ let runs = null;
250
+ try {
251
+ runs = getProject(projectRoot)?.doctorRuns ?? {};
252
+ } catch {}
253
+ if (runs) for (const platform of PLATFORMS) {
254
+ const reason = doctorDueReason(runs[platform], running, now);
255
+ if (reason) doctor.push({
256
+ platform,
257
+ reason
258
+ });
259
+ }
260
+ }
261
+ return renderGuideStatus({
262
+ running,
263
+ doctor,
264
+ latest: await checkForUpdate(running, {
265
+ now,
266
+ fetch: fetchImpl
267
+ })
268
+ });
269
+ }
270
+ //#endregion
271
+ export { inspectStimVersions as i, recordDoctorRun as n, compareStimVersions as r, guideStatus as t };
@@ -1,31 +1,31 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { E as ownership_claim_exports, P as deviceSlotKey, S as upsertProject, f as getProject, l as getConcurrencyLimits, z as validateDeviceSlot } from "./config-6vdGngKa.mjs";
2
+ import { E as ownership_claim_exports, P as deviceSlotKey, S as upsertProject, f as getProject, l as getConcurrencyLimits, z as validateDeviceSlot } from "./config-DMP7L7H6.mjs";
3
3
  import { r as createNdjsonWriter } from "./ndjson-BZwI1NBv.mjs";
4
- import { _ as workspaceLogsDir, h as workspaceDir, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
5
- import { C as makeTemporaryDirectory, _ as repoRoot, s as gitCommonDir, w as removeTemporaryEntry } from "./worktree-DWNx4tUg.mjs";
6
- import { a as findProjectRoot, c as projectShortcut, i as detectIsExpo, r as detectBundleId, t as appProjectProblem } from "./project-CBFCwnN5.mjs";
7
- import { n as MODE_EXPO, p as writeWorkspaceLaunch, t as MODE_BARE } from "./state-CDbvmZdt.mjs";
8
- import { i as resolveProjectMetro, r as pidExists } from "./metro-DFLmaVz8.mjs";
9
- import { n as verifyCollectorOwnership } from "./ownership-BvSpZVBk.mjs";
4
+ import { _ as workspaceLogsDir, h as workspaceDir, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
5
+ import { T as removeTemporaryEntry, g as repoRoot, s as gitCommonDir, w as makeTemporaryDirectory } from "./worktree-DJnBbQZ9.mjs";
6
+ import { a as findProjectRoot, c as projectShortcut, i as detectIsExpo, r as detectBundleId, t as appProjectProblem } from "./project-B_SDt4ip.mjs";
7
+ import { n as MODE_EXPO, p as writeWorkspaceLaunch, t as MODE_BARE } from "./state-CnWzvCWP.mjs";
8
+ import { i as resolveProjectMetro, r as pidExists } from "./metro-ato6ef3J.mjs";
9
+ import { n as verifyCollectorOwnership } from "./ownership-CD_XnpDu.mjs";
10
10
  import { _ as launchErrorPreview, c as launchErrorReport, g as stepTimer, h as stepClock, i as formatDuration, l as phaseLine, m as shortUdid, n as appReadinessMessage, p as shortHash } from "./command-output-BuIb_ZOI.mjs";
11
- import { $ as providerDownloadPath, G as buildCacheKey, J as filesystemBuildCapability, K as describeFingerprintMiss, Q as prepareProviderDownloadDir, R as WAIT_CEILING_MS, U as takeoverLine, V as releaseBuildLock, W as waitForBuild, X as fingerprintDiffSuffix, Y as fingerprintDiffRecord, Z as fingerprintProject, at as untrackedMissLine, et as providerUploadOutcome, nt as resolveBuild, ot as untrackedNativeFiles, rt as storeBuild, tt as refingerprintAfterMutation, z as acquireBuildLock } from "./android-BkM4qTaN.mjs";
12
- import { A as resolveSettings, B as artifactCachePolicy, D as remoteDeviceSettingError, F as tunnelModeSetting, H as optimizationBuildProfile, I as unknownSettingKeys, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, T as publicUrlSetting, U as resolveOptimizations, _ as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, f as iosLanHostSetting, g as iosSigningIdentitySha1Setting, h as iosSigningIdentitySettingError, k as resolveCacheProviderConfig, m as iosSigningIdentitySetting, p as iosLanHostSettingError, r as REMOTE_DEVICE_BACKENDS, x as metroWarmupUrlSetting } from "./settings-DwfltIXQ.mjs";
13
- import { C as resolveRemote, S as resolveEasCliBin, _ as exitAfterFlush, a as POOL_SETTING_REMEDY, f as RESOLVE_TIMEOUT_MS, g as easAuthNote, h as checkEasAuth, l as parkedMaxSetting, m as cacheLevel, p as UPLOAD_TIMEOUT_MS, v as isEasAuthFailureText, w as uploadRemote, y as loadProjectProvider } from "./teardown-KsPpvldq.mjs";
14
- import { _ as easDeviceBuildRemedy, a as swapJsBundle, c as ensureWorkspaceStorageSafely, d as launchOutcomeRecord, f as noMetroMessage, g as warmMetro, h as sleep, l as gateShouldRetry, m as resolveMetroWithRetry, n as pickDevClientScheme, o as needsPrebuild, p as noMetroRemedy, r as schemesFromInfoPlist, s as runPrebuild, t as devClientScheme, u as isPhysicalDeviceRequest, v as isEasBuildFailure, y as resolveEasDevelopmentBuild } from "./dev-client-Cd0v7iZk.mjs";
15
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-UEIrvZMJ.mjs";
11
+ import { $ as providerDownloadPath, G as buildCacheKey, J as filesystemBuildCapability, K as describeFingerprintMiss, Q as prepareProviderDownloadDir, R as WAIT_CEILING_MS, U as takeoverLine, V as releaseBuildLock, W as waitForBuild, X as fingerprintDiffSuffix, Y as fingerprintDiffRecord, Z as fingerprintProject, at as untrackedMissLine, et as providerUploadOutcome, nt as resolveBuild, ot as untrackedNativeFiles, rt as storeBuild, tt as refingerprintAfterMutation, z as acquireBuildLock } from "./android-BkYmndPp.mjs";
12
+ import { A as resolveSettings, B as artifactCachePolicy, D as remoteDeviceSettingError, F as tunnelModeSetting, H as optimizationBuildProfile, I as unknownSettingKeys, N as settingShapeErrors, O as remoteIosSetting, R as detectProviders, T as publicUrlSetting, U as resolveOptimizations, _ as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, d as cacheProviderSettingError, f as iosLanHostSetting, g as iosSigningIdentitySha1Setting, h as iosSigningIdentitySettingError, k as resolveCacheProviderConfig, m as iosSigningIdentitySetting, p as iosLanHostSettingError, r as REMOTE_DEVICE_BACKENDS, x as metroWarmupUrlSetting } from "./settings-CGHTt5vb.mjs";
13
+ import { C as resolveRemote, S as resolveEasCliBin, _ as exitAfterFlush, a as POOL_SETTING_REMEDY, f as RESOLVE_TIMEOUT_MS, g as easAuthNote, h as checkEasAuth, l as parkedMaxSetting, m as cacheLevel, p as UPLOAD_TIMEOUT_MS, v as isEasAuthFailureText, w as uploadRemote, y as loadProjectProvider } from "./teardown-sm1FwF6V.mjs";
14
+ import { _ as easDeviceBuildRemedy, a as swapJsBundle, c as ensureWorkspaceStorageSafely, d as launchOutcomeRecord, f as noMetroMessage, g as warmMetro, h as sleep, l as gateShouldRetry, m as resolveMetroWithRetry, n as pickDevClientScheme, o as needsPrebuild, p as noMetroRemedy, r as schemesFromInfoPlist, s as runPrebuild, t as devClientScheme, u as isPhysicalDeviceRequest, v as isEasBuildFailure, y as resolveEasDevelopmentBuild } from "./dev-client-BaTXAAnC.mjs";
15
+ import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
16
16
  import { C as launchIosApp, E as unverifiedLaunchLines, O as verifyLaunch, T as readMetroRecords, b as isBundleProof, c as RELEASE_VERIFY_WAIT_MS, f as clearOtherUserApps, i as LAUNCH_BUNDLING, k as verifyReleaseLaunch, m as devClientUrl, n as DEFAULT_METRO_PORT, o as LAUNCH_FATAL, s as LAUNCH_UNVERIFIED, v as installIosApp, w as readCollectorRecords, y as iosAppProcess } from "./app-install--PAocWvq.mjs";
17
17
  import { f as listIosRuntimes } from "./ios-Deh5js5V.mjs";
18
- import { a as lostLine, c as releaseLeaseOnSignal, i as leaseExpiryText, l as runLease, n as DEBUG_VERIFY_STEP_MS, o as lostRefusal, r as acquireRunLease, s as parseDeviceWait, t as selectFromPool, u as waitFlagConflict } from "./device-pool-DJvbIBGW.mjs";
19
- import { r as releaseBuildSlot, t as acquireBuildSlot } from "./build-slots-D6sDzOe-.mjs";
20
- import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-C59QLKm2.mjs";
21
- import { c as unknownIosRuntimeRefusal, i as ensureOwnedDevice, n as clearIosAdoptionPending, r as ensureBooted, s as unknownIosDeviceTypeRefusal, t as checkDeviceCapacity } from "./device-CMDFzx7C.mjs";
22
- import { a as ensureMetroReachable, b as ownedSessionName, c as remoteIosDeps, l as resolveRemoteContext, n as binOnPath, o as ensureRemoteBootOwned, r as bundleEntryPoint, w as gateMetroOrigin } from "./device-remote-CMfHhoc8.mjs";
23
- import { a as compilationCacheActivityLine, c as readBundleExecutable, l as readBundleId, p as describeDiagnostic, r as buildIos, s as discoverXcodeProject, t as COMPILATION_CACHE_NOT_RUN, u as resolveScheme } from "./xcode-D9tVItl-.mjs";
24
- import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-DeKen9e5.mjs";
18
+ import { a as lostLine, c as releaseLeaseOnSignal, i as leaseExpiryText, l as runLease, n as DEBUG_VERIFY_STEP_MS, o as lostRefusal, r as acquireRunLease, s as parseDeviceWait, t as selectFromPool, u as waitFlagConflict } from "./device-pool-C0s_83Og.mjs";
19
+ import { r as releaseBuildSlot, t as acquireBuildSlot } from "./build-slots-CuPszJDu.mjs";
20
+ import { a as statsProjectKey, i as recordRunStats, n as readRunEstimates, t as createRunRecorder } from "./stats-Fo9ACIv7.mjs";
21
+ import { c as unknownIosRuntimeRefusal, i as ensureOwnedDevice, n as clearIosAdoptionPending, r as ensureBooted, s as unknownIosDeviceTypeRefusal, t as checkDeviceCapacity } from "./device-XY_5eGdN.mjs";
22
+ import { a as ensureMetroReachable, b as ownedSessionName, c as remoteIosDeps, l as resolveRemoteContext, n as binOnPath, o as ensureRemoteBootOwned, r as bundleEntryPoint, w as gateMetroOrigin } from "./device-remote-D9wN3CdE.mjs";
23
+ import { a as compilationCacheActivityLine, c as readBundleExecutable, l as readBundleId, p as describeDiagnostic, r as buildIos, s as discoverXcodeProject, t as COMPILATION_CACHE_NOT_RUN, u as resolveScheme } from "./xcode-DUF7jrXj.mjs";
24
+ import { n as nativeRunCommand, t as launchSlotScope } from "./slot-launch-BYjnljAs.mjs";
25
25
  import { t as spawnEntry } from "./spawn-entry-nCE6m770.mjs";
26
- import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-_VmkqRZo.mjs";
26
+ import { a as printNativeCrashReport, n as IOS_CRASH_REPORT_RETRY, o as simulatorConsolePaths, r as captureNativeCrashes, t as errorDiagnostics } from "./error-diagnostics-B5STzxqN.mjs";
27
27
  import { a as iosDeviceProcess, c as listIosDevices, d as verifyIosDeviceReleaseLaunch, i as installIosDeviceApp, l as localNetworkPending, n as LAUNCH_PROBE_TIMEOUT_MS, o as iosPoolCandidates, r as awaitIosDeviceLaunch, s as iosPoolNoCandidatesRefusal, t as DEVICECTL_INSTALL_TIMEOUT_MS, u as resolveIosPhysicalDevice } from "./ios-device-DJOi9FR5.mjs";
28
- import { a as runPodInstall, n as podsAreStale, r as readPodState } from "./deps-Ck4wuTwa.mjs";
28
+ import { a as runPodInstall, n as podsAreStale, r as readPodState } from "./deps-C1zGnr61.mjs";
29
29
  import { existsSync, mkdirSync, mkdtempSync, openSync, rmSync, writeFileSync } from "node:fs";
30
30
  import { InvalidArgumentError } from "commander";
31
31
  import { X509Certificate } from "node:crypto";
@@ -1,9 +1,9 @@
1
- import { g as loadConfig, h as isPathPrefix, z as validateDeviceSlot } from "./config-6vdGngKa.mjs";
1
+ import { g as loadConfig, h as isPathPrefix, z as validateDeviceSlot } from "./config-DMP7L7H6.mjs";
2
2
  import { n as SOURCES, t as LEVELS } from "./ndjson-BZwI1NBv.mjs";
3
- import { _ as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
4
- import { a as findProjectRoot } from "./project-CBFCwnN5.mjs";
3
+ import { _ as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
4
+ import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
5
5
  import { _ as launchErrorPreview } from "./command-output-BuIb_ZOI.mjs";
6
- import { i as captureWorkspaceCrashes, t as errorDiagnostics } from "./error-diagnostics-_VmkqRZo.mjs";
6
+ import { i as captureWorkspaceCrashes, t as errorDiagnostics } from "./error-diagnostics-B5STzxqN.mjs";
7
7
  import { a as followLogs, c as queryLogs, i as fileSizes, n as buildCriteria, o as logFiles, r as compileGrep, s as parseSince } from "./logs-query-Cdp5aaCH.mjs";
8
8
  import { realpathSync } from "node:fs";
9
9
  import { relative, sep } from "node:path";
@@ -1,7 +1,7 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { w as process_identity_exports } from "./config-6vdGngKa.mjs";
3
- import { r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
4
- import { t as isMetroRunning } from "./ports-ClqG8GPt.mjs";
2
+ import { w as process_identity_exports } from "./config-DMP7L7H6.mjs";
3
+ import { r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
4
+ import { t as isMetroRunning } from "./ports-BZprTJRa.mjs";
5
5
  import { readlinkSync, realpathSync } from "fs";
6
6
  import { sep } from "path";
7
7
  //#region src/metro.ts
@@ -1,7 +1,7 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { C as withConfigLock, f as getProject, g as loadConfig, s as ensureConfig, u as getConfigDir, w as process_identity_exports, y as saveConfig } from "./config-6vdGngKa.mjs";
3
- import { n as isPortFree } from "./ports-ClqG8GPt.mjs";
4
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-UEIrvZMJ.mjs";
2
+ import { C as withConfigLock, f as getProject, g as loadConfig, s as ensureConfig, u as getConfigDir, w as process_identity_exports, y as saveConfig } from "./config-DMP7L7H6.mjs";
3
+ import { n as isPortFree } from "./ports-BZprTJRa.mjs";
4
+ import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
5
5
  import { realpathSync } from "node:fs";
6
6
  //#region src/named-ports.ts
7
7
  const FIRST_PORT = 8900;
@@ -1,6 +1,6 @@
1
- import { w as process_identity_exports } from "./config-6vdGngKa.mjs";
2
- import { a as withWorkspaceStateLock, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-Do1e2mOH.mjs";
3
- import { r as pidExists } from "./metro-DFLmaVz8.mjs";
1
+ import { w as process_identity_exports } from "./config-DMP7L7H6.mjs";
2
+ import { a as withWorkspaceStateLock, o as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-WVwWw_hB.mjs";
3
+ import { r as pidExists } from "./metro-ato6ef3J.mjs";
4
4
  import { realpathSync } from "node:fs";
5
5
  //#region src/collector/state.ts
6
6
  function collectorRoot(root) {
@@ -1,8 +1,8 @@
1
1
  import { t as getExecutor } from "./exec-CyylIdq9.mjs";
2
- import { u as getConfigDir, w as process_identity_exports } from "./config-6vdGngKa.mjs";
2
+ import { u as getConfigDir, w as process_identity_exports } from "./config-DMP7L7H6.mjs";
3
3
  import { t as createLineReader } from "./process-output-C7IlIzd7.mjs";
4
- import { r as pidExists } from "./metro-DFLmaVz8.mjs";
5
- import { t as withWorkspaceProcessLock } from "./workspace-process-lock-UEIrvZMJ.mjs";
4
+ import { r as pidExists } from "./metro-ato6ef3J.mjs";
5
+ import { t as withWorkspaceProcessLock } from "./workspace-process-lock-Bz19_R9R.mjs";
6
6
  import { closeSync, mkdirSync, openSync, readFileSync, unlinkSync } from "node:fs";
7
7
  import { createHash, randomUUID } from "node:crypto";
8
8
  import { basename, join, resolve, sep } from "node:path";
@@ -1,6 +1,6 @@
1
- import { f as getProject } from "./config-6vdGngKa.mjs";
2
- import { a as findProjectRoot } from "./project-CBFCwnN5.mjs";
3
- import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-BO7Zpjp0.mjs";
1
+ import { f as getProject } from "./config-DMP7L7H6.mjs";
2
+ import { a as findProjectRoot } from "./project-B_SDt4ip.mjs";
3
+ import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-DH9SXd0f.mjs";
4
4
  //#region src/commands/ports.ts
5
5
  async function inProject(action) {
6
6
  try {
@@ -1,4 +1,4 @@
1
- import { A as isOnMountedVolume, g as loadConfig, j as listMountedVolumes, n as allMetroPorts, r as claimMetroPort, v as removeProject } from "./config-6vdGngKa.mjs";
1
+ import { A as isOnMountedVolume, g as loadConfig, j as listMountedVolumes, n as allMetroPorts, r as claimMetroPort, v as removeProject } from "./config-DMP7L7H6.mjs";
2
2
  import { existsSync } from "fs";
3
3
  import { request } from "http";
4
4
  import { connect } from "net";
@@ -1,5 +1,5 @@
1
- import { c as findEnclosingWorktreeRoot, f as getProject } from "./config-6vdGngKa.mjs";
2
- import { _ as repoRoot } from "./worktree-DWNx4tUg.mjs";
1
+ import { c as findEnclosingWorktreeRoot, f as getProject } from "./config-DMP7L7H6.mjs";
2
+ import { g as repoRoot } from "./worktree-DJnBbQZ9.mjs";
3
3
  import { existsSync, readFileSync, readdirSync, realpathSync } from "fs";
4
4
  import { basename, dirname, join, resolve } from "path";
5
5
  import { createRequire } from "module";