stim 1.34.0 → 1.36.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 (152) hide show
  1. package/dist/{acquire-artifact-B0SWoVNt.mjs → acquire-artifact-DGTHCd0Q.mjs} +19 -3
  2. package/dist/{act-7f7wIvCQ.mjs → act-CvN9xyV6.mjs} +18 -19
  3. package/dist/{activity-DkS-Ir6V.mjs → activity-BpdDvA8Q.mjs} +4 -4
  4. package/dist/{agent-device-usage-output-BVdgKbfz.mjs → agent-device-usage-output-pbhaW7_k.mjs} +4 -4
  5. package/dist/{android-B2DSKg-A.mjs → android-5wkcMFDG.mjs} +1 -1
  6. package/dist/{android-BU4uBX8I.mjs → android-B0qTdwnt.mjs} +5 -5
  7. package/dist/{android-Iq0M2t2d.mjs → android-SJx1V3R3.mjs} +5 -5
  8. package/dist/{android-cas-Dhcjkys1.mjs → android-cas-BS9_55U5.mjs} +4 -4
  9. package/dist/{android-D7qjT2fq.mjs → android-e9WP10cE.mjs} +47 -41
  10. package/dist/{android-image-DFk26aY6.mjs → android-image-BZ57YL6R.mjs} +2 -2
  11. package/dist/{android-project-DhO6el8N.d.mts → android-project-v_1nej_x.d.mts} +3 -1
  12. package/dist/api.d.mts +20 -6
  13. package/dist/api.mjs +31 -26
  14. package/dist/{apk-signed-tail-CPpA-3vu.mjs → apk-signed-tail-eZyXIrnc.mjs} +2 -2
  15. package/dist/{artifact-DmRtKFXW.mjs → artifact-C3srrGVU.mjs} +36 -14
  16. package/dist/{artifact-CNnTZs3R.mjs → artifact-ubNdxo_K.mjs} +52 -19
  17. package/dist/{auto-placement-DA65VQH7.mjs → auto-placement-CKFpFCuq.mjs} +7 -8
  18. package/dist/{browser-web-Dn_hgKZC.mjs → browser-web-B63vLrj6.mjs} +11 -11
  19. package/dist/{build-D7SuVoRX.mjs → build-B_Dx9SKJ.mjs} +72 -25
  20. package/dist/{build-cache-Cqj4FGnX.mjs → build-cache-BW8T4oD2.mjs} +10 -5
  21. package/dist/{build-plan-Ct1FiA3E.mjs → build-plan-CeIooJqn.mjs} +6 -6
  22. package/dist/{cache-manifest-8JX9S1QJ.mjs → cache-manifest-CxWkZmUr.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{cli-DjdvQG5U.mjs → cli-COdXswmc.mjs} +19 -18
  25. package/dist/cli.mjs +1 -1
  26. package/dist/{client-kU37gURU.mjs → client-KSWIeQLA.mjs} +9 -8
  27. package/dist/collector-run.mjs +4 -4
  28. package/dist/{command-output-DjExb_tZ.mjs → command-output-T3cDctRE.mjs} +1 -1
  29. package/dist/{config-BW0fAtoK.mjs → config-BA3TgoIP.mjs} +59 -10
  30. package/dist/{dependencies-CZ7c8XX_.mjs → dependencies-LH-7k1Vr.mjs} +35 -38
  31. package/dist/{dependency-state-mL5g4H6K.mjs → dependency-state-Blfp3AkG.mjs} +1 -1
  32. package/dist/{dev-client-D3wOllNd.mjs → dev-client-MO_DjTZr.mjs} +2 -2
  33. package/dist/{device-DH5yf6TU.mjs → device-BZWt_aPJ.mjs} +11 -11
  34. package/dist/{device-CWPFAqs0.mjs → device-DNTWFFB1.mjs} +12 -12
  35. package/dist/{device-android-ChfF5I9A.mjs → device-android-BB9Lugr8.mjs} +8 -8
  36. package/dist/{ccache-ChBMXlBq.mjs → device-capacity-CpAVcKgq.mjs} +1006 -23
  37. package/dist/device-host-worker.mjs +13 -14
  38. package/dist/{device-pool-EZziQ0uS.mjs → device-pool-BJToGG-q.mjs} +3 -3
  39. package/dist/{device-provision-CfpEy-Vm.mjs → device-provision-CxQDCtrc.mjs} +9 -9
  40. package/dist/{doctor-CGBsS_68.mjs → doctor-C-46SkBe.mjs} +1 -1
  41. package/dist/{doctor-dwRboaXx.mjs → doctor-CYZ45LnX.mjs} +20 -21
  42. package/dist/{doctor-B5uEZiKp.mjs → doctor-DV639Iw_.mjs} +15 -16
  43. package/dist/doctor-fingerprint.mjs +1 -1
  44. package/dist/{doctor-watchman-r7M9UPi0.mjs → doctor-watchman-TZxYt_98.mjs} +4 -4
  45. package/dist/{eas-build-BpHIt_M3.mjs → eas-build-Xf5Jd6LR.mjs} +2 -2
  46. package/dist/{eas-fallback-CNPcjq3K.mjs → eas-fallback-DNYPNinw.mjs} +4 -4
  47. package/dist/{eas-session-ledger-CXwagcQ7.mjs → eas-session-ledger-CXZ4aix0.mjs} +5 -5
  48. package/dist/{error-diagnostics-Ym2mjmJ0.mjs → error-diagnostics-CvB5bpPU.mjs} +8 -8
  49. package/dist/{gc-B464w_a5.mjs → gc-8Qm_K1iy.mjs} +2 -2
  50. package/dist/{gc-C7YxKNci.mjs → gc-DiUhrVFo.mjs} +17 -17
  51. package/dist/{guide-BFW-cB7R.mjs → guide-CuvHRP53.mjs} +130 -65
  52. package/dist/{hosted-android-B7yfqXEy.mjs → hosted-android-D__HGVIO.mjs} +3 -3
  53. package/dist/{hosted-client-CQuzZwAu.mjs → hosted-client-DMOOu8vD.mjs} +6 -6
  54. package/dist/{hosted-logs-DfYCqrrR.mjs → hosted-logs-CClIktQM.mjs} +6 -6
  55. package/dist/{hosted-logs-sync-Dlpa2mQF.mjs → hosted-logs-sync-B7XCeqVm.mjs} +5 -5
  56. package/dist/{hosted-macos-JKefapEm.mjs → hosted-macos-D4sDJIbB.mjs} +5 -5
  57. package/dist/{hosted-native-B7OFt5gB.mjs → hosted-native-BiiUG_Q6.mjs} +7 -7
  58. package/dist/{ios-sUPbWqEh.mjs → ios-BZuhvLGr.mjs} +8 -8
  59. package/dist/{ios-BdZdNsAj.mjs → ios-BhfpRfNf.mjs} +4 -4
  60. package/dist/{ios-DSBs9c6d.mjs → ios-BhpUWyN7.mjs} +39 -32
  61. package/dist/{ios-device-Drplrgzo.mjs → ios-device-vhYL1N--.mjs} +1 -1
  62. package/dist/{ios-project-DoTQYghg.mjs → ios-project-Cz0S1Sz-.mjs} +7 -7
  63. package/dist/{ios-signing-R34vbrNU.mjs → ios-signing-BcH88ecn.mjs} +1 -1
  64. package/dist/{ios-state-CWsBysyN.mjs → ios-state-Avwz2cbZ.mjs} +1 -1
  65. package/dist/{js-swap-DrokhOfo.mjs → js-swap-Desu2iII.mjs} +4 -4
  66. package/dist/{launch-Cy-MWEZc.mjs → launch-6ckG9UrC.mjs} +19 -19
  67. package/dist/{lightened-ALwQcQtV.mjs → lightened-B6TnpHMX.mjs} +4 -4
  68. package/dist/{logs-DuED-01Z.mjs → logs-B-DMy1K0.mjs} +7 -7
  69. package/dist/{logs-DWT7jGpF.mjs → logs-CO0CJRiC.mjs} +5 -5
  70. package/dist/{macos-CtBtA_hW.mjs → macos-B1aCXhem.mjs} +19 -19
  71. package/dist/{macos-kWGcfLzx.mjs → macos-CduEmWAK.mjs} +1 -1
  72. package/dist/macos-run.mjs +1 -1
  73. package/dist/maintenance-run.mjs +5 -5
  74. package/dist/{metro-B5PVz0Wv.mjs → metro-DM3yJL1M.mjs} +2 -2
  75. package/dist/{metro-request-2LmFpC1z.mjs → metro-request-O8Q-JvBg.mjs} +1 -1
  76. package/dist/{named-ports-CA0nB9Yw.mjs → named-ports-BvB_CO9B.mjs} +2 -2
  77. package/dist/{native-android-tISP2EVp.mjs → native-android-28NOG2-y.mjs} +17 -17
  78. package/dist/{native-gradle-artifact-inputs-DVoeZkrw.mjs → native-gradle-artifact-inputs-DxVEtS6_.mjs} +3 -3
  79. package/dist/{native-runtime-CNgxeOCG.mjs → native-runtime-C3_NkUlW.mjs} +6 -6
  80. package/dist/{native-xcode-inputs-DGzkhpu4.mjs → native-xcode-inputs-BWFTw5cJ.mjs} +2 -2
  81. package/dist/{native-xcode-ios-B9nsfId2.mjs → native-xcode-ios-B4Qoc7-U.mjs} +16 -16
  82. package/dist/offload-worker.d.mts +1 -1
  83. package/dist/offload-worker.mjs +19 -19
  84. package/dist/{ownership-hC7xvvxF.mjs → ownership-C3y8wLSl.mjs} +2 -2
  85. package/dist/{phone-reverses-Bo0EzJ-P.mjs → phone-reverses-BhSxbqom.mjs} +4 -4
  86. package/dist/{placement-log-BsGvKLtU.mjs → placement-log-B8RCSzOm.mjs} +1 -1
  87. package/dist/{plan-placement-Am0IjuxB.mjs → plan-placement-BI4r55aP.mjs} +6 -6
  88. package/dist/{ports-CNzg1LYD.mjs → ports-DhOSyWm9.mjs} +3 -3
  89. package/dist/{prebuild-BfJII57G.mjs → prebuild-Di2IhUue.mjs} +9 -9
  90. package/dist/{project-DU3jjnBE.mjs → project-Clk1JAWL.mjs} +15 -15
  91. package/dist/{react-native-android-3dZiJv-4.mjs → react-native-android-bdHBMrnf.mjs} +23 -23
  92. package/dist/{react-native-build-CuvNPt-q.mjs → react-native-build-CJega_NM.mjs} +7 -7
  93. package/dist/{react-native-doctor-a35BwMUO.mjs → react-native-doctor-CY7BGITE.mjs} +5 -5
  94. package/dist/{react-native-ios-CqnReM1t.mjs → react-native-ios-Bo5EDVel.mjs} +25 -20
  95. package/dist/recorded-build-BuGL_fnm.mjs +58 -0
  96. package/dist/{recordings-AKZfsW2W.mjs → recordings-6i2-x8LU.mjs} +1 -1
  97. package/dist/{reload-CC3sNo10.mjs → reload-A_axEbeS.mjs} +14 -14
  98. package/dist/{reload-YPnvXGlB.mjs → reload-BvDuvygc.mjs} +1 -1
  99. package/dist/remote-PD6CM0xp.mjs +158 -0
  100. package/dist/{remote-BfaIHnhM.mjs → remote-WK_swZEw.mjs} +8 -8
  101. package/dist/{result-H-AxY7Ud.mjs → result-BkDpN5Mz.mjs} +23 -18
  102. package/dist/{run-N-BbRxnC.mjs → run-CTFi4Nq2.mjs} +1 -1
  103. package/dist/{server-bare-BTlICuaX.mjs → server-bare-W0aPsRZE.mjs} +1 -1
  104. package/dist/{server-command-Bn_gOObU.mjs → server-command-S00-ddjK.mjs} +4 -4
  105. package/dist/server-expo-BWJDa7Qb.mjs +2 -0
  106. package/dist/{server-expo-CUJ2fuv1.mjs → server-expo-cc-cmfsl.mjs} +2 -2
  107. package/dist/{settings-B5IBDfTx.mjs → settings-Bap-qjnp.mjs} +1 -1
  108. package/dist/{settings-DoWHJopy.mjs → settings-C_Xu4RNZ.mjs} +2 -2
  109. package/dist/{settings-payload-Bxw3hid5.mjs → settings-payload-D5jjhmrw.mjs} +4 -4
  110. package/dist/{settings-write-C6d7EC54.mjs → settings-write-C5huI-iS.mjs} +5 -5
  111. package/dist/settings.schema.json +1 -1
  112. package/dist/{simslim-DKdJx0LL.mjs → simslim-DlBvwgeF.mjs} +1 -1
  113. package/dist/{slot-launch-kq0-7w9C.mjs → slot-launch-qEQVTth7.mjs} +6 -6
  114. package/dist/{stage-CBfMTUK3.mjs → stage-CxVI_MlP.mjs} +1 -1
  115. package/dist/{start-Diu8q6_U.mjs → start-CVzivp35.mjs} +1 -1
  116. package/dist/{start-WTMumMHi.mjs → start-YpT_JpQQ.mjs} +10 -10
  117. package/dist/{state-DSOUqO-o.mjs → state-B4B5P4LU.mjs} +1 -1
  118. package/dist/{state-CtmYTRWm.mjs → state-B9VFI6r0.mjs} +2 -2
  119. package/dist/{stats-D4cW247z.mjs → stats-COoePEri.mjs} +4 -4
  120. package/dist/{status-CEwxo-PS.mjs → status-CIg0k7Qb.mjs} +21 -22
  121. package/dist/{status-B-oeWS0Z.mjs → status-CIvU5-TF.mjs} +1 -1
  122. package/dist/{status-DTFhDnd1.mjs → status-CQWmNl1f.mjs} +1 -1
  123. package/dist/{status-watch-D63R5nSI.mjs → status-watch--rfZynD_.mjs} +4 -4
  124. package/dist/status-worker.mjs +1 -1
  125. package/dist/{stim-desktop-_WTria-r.mjs → stim-desktop-D0P_bzmd.mjs} +1 -1
  126. package/dist/{stop-HL2RvhrE.mjs → stop-BEBBruvD.mjs} +4 -4
  127. package/dist/{stop-Dm9ON6Os.mjs → stop-BiI4_VFG.mjs} +2 -2
  128. package/dist/{stop-vX4w3_8V.mjs → stop-C3d5qG7C.mjs} +15 -15
  129. package/dist/supervisor-run.mjs +12 -13
  130. package/dist/support-BJbXovoO.mjs +2089 -0
  131. package/dist/{support-BNe1_Hg7.mjs → support-Vckdzrmk.mjs} +5 -5
  132. package/dist/{swiftpm-artifact-inputs-uq5oV7xR.mjs → swiftpm-artifact-inputs-DbuF-Yrr.mjs} +1 -1
  133. package/dist/{swiftpm-macos-ClF203_2.mjs → swiftpm-macos-Bu8xeBfM.mjs} +8 -8
  134. package/dist/{toolchain-CECahBDa.mjs → toolchain-CIRdNl-c.mjs} +1 -1
  135. package/dist/{toolchain-CYonNjd_.mjs → toolchain-DCnWAxQL.mjs} +71 -7
  136. package/dist/{warm-progress-q11Vdvhh.mjs → warm-progress-DwsGBpph.mjs} +3 -3
  137. package/dist/{web-BdaMBr2O.mjs → web-D2En0Wa5.mjs} +8 -8
  138. package/dist/web-Dpj70t4p.mjs +2 -0
  139. package/dist/web-run.mjs +4 -4
  140. package/dist/{workspace-state-BdZ-QgmB.mjs → workspace-state-BhwAJBgA.mjs} +2 -2
  141. package/dist/{workspaces-B9v5V7Es.mjs → workspaces-Dh5N70qW.mjs} +11 -11
  142. package/dist/{worktree-C4MBOMz7.mjs → worktree-DLm4s2Ib.mjs} +1 -1
  143. package/dist/{worktree-C3N86KpI.mjs → worktree-Yw3EW77B.mjs} +24 -24
  144. package/package.json +7 -7
  145. package/dist/device-capacity-CHC3dKWg.mjs +0 -867
  146. package/dist/device-ios-B3-Ah--R.mjs +0 -716
  147. package/dist/device-lease-run-i3FNX4OE.mjs +0 -282
  148. package/dist/idle-shutdown-DPD8oV36.mjs +0 -142
  149. package/dist/selection-CH-MUVGD.mjs +0 -791
  150. package/dist/server-expo-B59N16uT.mjs +0 -2
  151. package/dist/support-ivsfDj0v.mjs +0 -287
  152. package/dist/web-CIpHpGp8.mjs +0 -2
@@ -2,7 +2,7 @@ import { D as ownership_claim_exports, T as process_identity_exports, a as track
2
2
  import { t as runOperationFile } from "./operation-exec-DKlBcKAL.mjs";
3
3
  import { join } from "node:path";
4
4
  import { ambientEnv, configDir, ensurePrivateDir } from "@stim-cli/core";
5
- import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1 } from "@stim-cli/core/state";
5
+ import { DEFAULT_SERVER_PORT, allMetroPorts, cannotHost, clientIdentity, configCorruptRepair, endpoint, endpoint as endpoint$1, findEnclosingWorktreeRoot, findPeer, findPeer as findPeer$1, getConcurrencyLimits, getConfigPath, getConfigPath as getConfigPath$1, getPlatformDeviceLimits, getProject, getProjectSettings, getRepoSettings, isJsonObject, isPathPrefix as isPathPrefix$1, loadConfig, loadConfig as loadConfig$1, machineEndpoint, parseMachine, parseMachine as parseMachine$1, validateAutomaticPool, withConfigLock, withConfigLock as withConfigLock$1, withConfigLockAsync, withConfigLockAsync as withConfigLockAsync$1, wrongTailnet } from "@stim-cli/core/state";
6
6
  import { dirname as dirname$1, isAbsolute as isAbsolute$1, join as join$1, normalize, parse, sep as sep$1 } from "path";
7
7
  import { existsSync, lstatSync, readdirSync, readlinkSync, renameSync, statSync, unlinkSync, writeFileSync } from "fs";
8
8
  import { InvalidArgumentError } from "commander";
@@ -353,7 +353,20 @@ function tailscaleDiagnosis(code) {
353
353
  };
354
354
  }
355
355
  }
356
- function notOnTailnetDiagnosis(entry, ambiguous) {
356
+ const tailnetLabel = (tailnet) => tailnet.suffix ? `${tailnet.name} (${tailnet.suffix})` : tailnet.name;
357
+ /** A machine that is not on the tailnet this Mac is signed in to now, but was on the one it was signed in to at approval. */
358
+ function wrongTailnetDiagnosis(entry, wrong) {
359
+ const owner = wrong.owner ? `, or to ${wrong.owner}, the tailnet that owns ${entry}` : "";
360
+ return {
361
+ layer: "peer",
362
+ code: "peer-wrong-tailnet",
363
+ title: "Other Tailscale account",
364
+ message: `This Mac asked ${entry} for access while it was signed in to the Tailscale tailnet ${tailnetLabel(wrong.recorded)}. This Mac is signed in to ${tailnetLabel(wrong.current)} now, and no peer there is named ${entry}.`,
365
+ remedy: `Switch Tailscale on this Mac to ${tailnetLabel(wrong.recorded)}${owner}, then run \`stim doctor\` again.`
366
+ };
367
+ }
368
+ function notOnTailnetDiagnosis(entry, ambiguous, wrong) {
369
+ if (wrong && !ambiguous) return wrongTailnetDiagnosis(entry, wrong);
357
370
  return {
358
371
  layer: "peer",
359
372
  code: ambiguous ? "peer-ambiguous" : "peer-not-found",
@@ -498,7 +511,7 @@ function unconfirmedKeyFinding(code, entry, fingerprint) {
498
511
  level: "note",
499
512
  title: `Remote machine ${entry} needs its server key confirmed`,
500
513
  detail: `${entry} approved this machine and answered with the stim-server key fingerprint ${fingerprint}. On the local network nothing vouches for that key, so Stim pins it only after a person checks it against the fingerprint \`stim-server setup\` printed there. Until then this machine does not use ${entry}.`,
501
- fix: `Run \`stim doctor --fix\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
514
+ fix: `Run \`stim remote list\` in a terminal here and answer y only if the fingerprint matches. If it does not, another machine answered at that address: do not confirm, and check the address in remote.machines.`
502
515
  };
503
516
  }
504
517
  function diagnosisFinding(code, entry, diagnosis) {
@@ -637,7 +650,7 @@ function outdatedServer(entry, version, command) {
637
650
  return {
638
651
  title: `Remote machine ${entry} runs an older stim-server`,
639
652
  detail: `The stim-server on ${entry} speaks an older protocol than this Stim, so it cannot authenticate this machine.`,
640
- fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `${update}, then run \`stim doctor --fix\` here.`
653
+ fix: command ? `${update}, then run this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `${update}, then run \`stim remote add ${entry}\` here.`
641
654
  };
642
655
  }
643
656
  /**
@@ -883,9 +896,19 @@ async function diagnoseTailscale(io) {
883
896
  const reading = readTailscale(io.rawStatus ? await io.rawStatus() : null);
884
897
  return tailscaleDiagnosis(reading.running ? "tailscale-unavailable" : reading.code);
885
898
  }
886
- /** Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. */
899
+ /**
900
+ * Where to reach a paired machine now, or why Stim cannot; the handshake then checks its pinned key. A machine
901
+ * missing from the tailnet this Mac is signed in to says so when the credential recorded another tailnet.
902
+ */
887
903
  async function resolveEndpoint(credential, status = () => tailscaleStatusAsync(signal), signal) {
888
- return machineEndpoint(credential.machine, parseMachine(credential.machine)?.transport === "tailscale" ? await status() : null);
904
+ const parsed = parseMachine(credential.machine);
905
+ const current = parsed?.transport === "tailscale" ? await status() : null;
906
+ const found = machineEndpoint(credential.machine, current);
907
+ if (typeof found !== "string" || parsed?.transport !== "tailscale" || findPeer(current, parsed.name) !== "missing") return found;
908
+ const wrong = wrongTailnet(credential, current);
909
+ if (!wrong) return found;
910
+ const { message, remedy } = wrongTailnetDiagnosis(credential.machine, wrong);
911
+ return `${message} ${remedy}`.replace(/\.$/, "");
889
912
  }
890
913
  /**
891
914
  * Shows a local network machine's server key fingerprint and asks a person whether it matches the one
@@ -910,7 +933,7 @@ function keyConfirmer(ask) {
910
933
  }
911
934
  /** The remedy for a pending request: the printed setup command, or where the person finds it. */
912
935
  function setupRemedy(entry, command) {
913
- return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim doctor\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
936
+ return command ? `A person on ${entry} runs this there to approve this machine: ${command}\nAfter approving, run \`stim remote list\` on this machine to reconnect.` : `A person on ${entry} runs the \`stim-server setup\` command Stim Desktop showed for this machine.`;
914
937
  }
915
938
  function setupCommand(machine, ticket, expiresAt, flags, version) {
916
939
  const parsed = parseMachine(machine);
@@ -928,10 +951,12 @@ function newPending(input, ticket, expiresAt, now) {
928
951
  state: "pending",
929
952
  requestedAt: new Date(now).toISOString(),
930
953
  ticket,
931
- ...expiresAt ? { expiresAt } : {}
954
+ ...expiresAt ? { expiresAt } : {},
955
+ ...input.tailnet ? { tailnet: input.tailnet } : {}
932
956
  };
933
957
  }
934
958
  function approved(input, reply, requestedAt) {
959
+ const tailnet = input.credential?.tailnet ?? input.tailnet;
935
960
  return {
936
961
  state: "approved",
937
962
  credential: {
@@ -941,7 +966,8 @@ function approved(input, reply, requestedAt) {
941
966
  state: "approved",
942
967
  requestedAt,
943
968
  serverKey: reply.serverKey,
944
- deviceId: reply.result.device.id
969
+ deviceId: reply.result.device.id,
970
+ ...tailnet ? { tailnet } : {}
945
971
  },
946
972
  result: reply.result
947
973
  };
@@ -1318,6 +1344,29 @@ async function writeConfigSettingAsync(target, dottedKey, value, signal) {
1318
1344
  const status = target.scope === "machine" && (dottedKey === "remote.machines" || localDevicePoolOff(dottedKey, value)) ? await tailscaleStatusAsync(signal) : null;
1319
1345
  return withConfigLockAsync(() => applyConfigSetting(target, dottedKey, value, status), signal);
1320
1346
  }
1347
+ /**
1348
+ * Replaces machine-scope `remote.machines` with `change` applied to the list read under the config lock, so a
1349
+ * concurrent writer's entries are kept. `status` is the `tailscale status` the automatic device pool check reads.
1350
+ * Returns the list before and after; null before when the setting is not a list of strings, in which case nothing is
1351
+ * written.
1352
+ */
1353
+ async function updateRemoteMachinesAsync(change, status, signal) {
1354
+ signal?.throwIfAborted();
1355
+ return withConfigLockAsync(() => {
1356
+ const remote = loadConfig()?.remote;
1357
+ const current = remote === void 0 ? [] : isJsonObject(remote) ? remote.machines === void 0 ? [] : remote.machines : null;
1358
+ if (!Array.isArray(current) || !current.every((each) => typeof each === "string")) return {
1359
+ before: null,
1360
+ after: []
1361
+ };
1362
+ const after = change(current);
1363
+ if (after.length !== current.length || after.some((each, at) => each !== current[at])) applyConfigSetting({ scope: "machine" }, "remote.machines", after, status);
1364
+ return {
1365
+ before: current,
1366
+ after
1367
+ };
1368
+ }, signal);
1369
+ }
1321
1370
  function applyConfigSetting(target, dottedKey, value, status) {
1322
1371
  const cfg = value === void 0 ? loadConfig() : ensureConfig();
1323
1372
  const settings = cfg ? targetSettings(cfg, target, value !== void 0) : null;
@@ -1389,4 +1438,4 @@ function allConsolePortsAndSerials({ isMounted = isOnMountedVolume } = {}) {
1389
1438
  return result;
1390
1439
  }
1391
1440
  //#endregion
1392
- export { unconfirmedKeyFinding as $, writeConfigSetting as A, keyConfirmer as B, removeProject as C, upsertProject as D, setSupervisor as E, diagnoseOutcome as F, realIo as G, outdatedServer as H, diagnoseTailscale as I, setupRemedy as J, resolveEndpoint as K, doctorIo as L, acquireAvdClaim as M, SERVER_OUTDATED as N, withConfigLock$1 as O, diagnoseConnectFailure as P, notOnTailnetDiagnosis as Q, endpoint$1 as R, releaseMetroPort as S, setDevice as T, parseMachine$1 as U, openAuthenticated as V, reachMachine as W, diagnoseLocalUnreachable as X, tailscaleStatusAsync as Y, diagnosisFinding as Z, isPathPrefix$1 as _, validateDeviceSlot as _t, clearDevice as a, isOnMountedVolume as at, refuseRelativeStimPaths as b, ensureConfig as c, volumeRootFor as ct, getConfigDir as d, deviceSlotKey as dt, readHostPermissions as et, getConfigPath$1 as f, deviceSlotPlatforms as ft, getRepoSettings as g, removeSlotDevice as gt, getProjectSettings as h, projectDeviceSlots as ht, clearAndroidBootPending as i, isAbsentPath as it, writeConfigSettingAsync as j, withConfigLockAsync$1 as k, findEnclosingWorktreeRoot as l, assignSlotDevice as lt, getProject as m, parseDeviceSlotOption as mt, allMetroPorts as n, directorySizeAsync as nt, clearSupervisor as o, listMountedVolumes as ot, getPlatformDeviceLimits as p, parseDeviceSlotKey as pt, sayHello as q, claimMetroPort as r, formatBytes as rt, configCorruptRepair as s, measuredDirectorySizeAsync as st, allConsolePortsAndSerials as t, directorySize as tt, getConcurrencyLimits as u, deviceSlotFileKey as ut, loadConfig$1 as v, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, findPeer$1 as z };
1441
+ export { notOnTailnetDiagnosis as $, withConfigLockAsync$1 as A, findPeer$1 as B, removeProject as C, updateRemoteMachinesAsync as D, setSupervisor as E, diagnoseConnectFailure as F, reachMachine as G, openAuthenticated as H, diagnoseOutcome as I, sayHello as J, realIo as K, diagnoseTailscale as L, writeConfigSettingAsync as M, acquireAvdClaim as N, upsertProject as O, SERVER_OUTDATED as P, diagnosisFinding as Q, doctorIo as R, releaseMetroPort as S, setDevice as T, outdatedServer as U, keyConfirmer as V, parseMachine$1 as W, tailscaleStatusAsync as X, setupRemedy as Y, diagnoseLocalUnreachable as Z, isPathPrefix$1 as _, removeSlotDevice as _t, clearDevice as a, isAbsentPath as at, refuseRelativeStimPaths as b, ensureConfig as c, measuredDirectorySizeAsync as ct, getConfigDir as d, deviceSlotFileKey as dt, unconfirmedKeyFinding as et, getConfigPath$1 as f, deviceSlotKey as ft, getRepoSettings as g, projectDeviceSlots as gt, getProjectSettings as h, parseDeviceSlotOption as ht, clearAndroidBootPending as i, formatBytes as it, writeConfigSetting as j, withConfigLock$1 as k, findEnclosingWorktreeRoot as l, volumeRootFor as lt, getProject as m, parseDeviceSlotKey as mt, allMetroPorts as n, directorySize as nt, clearSupervisor as o, isOnMountedVolume as ot, getPlatformDeviceLimits as p, deviceSlotPlatforms as pt, resolveEndpoint as q, claimMetroPort as r, directorySizeAsync as rt, configCorruptRepair as s, listMountedVolumes as st, allConsolePortsAndSerials as t, readHostPermissions as tt, getConcurrencyLimits as u, assignSlotDevice as ut, loadConfig$1 as v, validateDeviceSlot as vt, saveConfig as w, releaseAndroidConsolePort as x, recordIosSchemeApprovals as y, endpoint$1 as z };
@@ -1,44 +1,41 @@
1
1
  import { l as cancellableSleep, t as getExecutor, w as withDrainingCancellation } from "./exec-CGuDzt40.mjs";
2
- import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DjExb_tZ.mjs";
4
- import { D as upsertProject, dt as deviceSlotKey, k as withConfigLockAsync, m as getProject, u as getConcurrencyLimits, ut as deviceSlotFileKey, y as recordIosSchemeApprovals } from "./config-BW0fAtoK.mjs";
5
- import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-B5IBDfTx.mjs";
6
- import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-DU3jjnBE.mjs";
7
- import { o as workspaceLinks } from "./stim-desktop-_WTria-r.mjs";
8
- import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-B5PVz0Wv.mjs";
2
+ import { f as writeWorkspaceStateAsync, k as workspaceLogsDir, r as readWorkspaceState } from "./workspace-state-BhwAJBgA.mjs";
3
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-T3cDctRE.mjs";
4
+ import { A as withConfigLockAsync, O as upsertProject, dt as deviceSlotFileKey, ft as deviceSlotKey, m as getProject, u as getConcurrencyLimits, y as recordIosSchemeApprovals } from "./config-BA3TgoIP.mjs";
5
+ import { J as resolveCacheProviderConfig, Q as resolveSettings, St as gitCommonDirAsync, Vt as repoRootAsync, an as makeTemporaryDirectory, at as settingsLayers, dt as detectProviders, nt as settingOriginScope, on as removeTemporaryEntry } from "./settings-Bap-qjnp.mjs";
6
+ import { L as workspaceDevServerMode, f as projectRegistry, i as findProjectRoot, v as detectIsExpo, z as writeWorkspaceLaunchAsync } from "./project-Clk1JAWL.mjs";
7
+ import { o as workspaceLinks } from "./stim-desktop-D0P_bzmd.mjs";
8
+ import { c as pidExists, d as resolveProjectMetro, f as signalProcessTree } from "./metro-DM3yJL1M.mjs";
9
9
  import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
10
- import { An as loadProjectProvider, At as ensureRemoteBootOwned, Bt as RELEASE_VERIFY_WAIT_MS, Dn as checkEasAuth, Dt as bundleEntryPoint, Fn as resolveRemote, Gt as unattributedLaunchLines, Ht as isBundleProof, In as uploadRemote, It as LAUNCH_BUNDLING, Jt as verifyLaunch, Kt as unverifiedLaunchLines, Lt as LAUNCH_FATAL, Nt as remoteIosDeps, Pn as resolveEasCliBin, Pt as resolveRemoteContext, Rt as LAUNCH_UNVERIFIED, Ut as readCollectorRecords, Wt as readMetroRecords, Yt as verifyReleaseLaunch, an as devClientUrl, bn as gateMetroOrigin, c as budgetGate, dn as installIosApp, en as IOS_DEV_MENU_OFF_DEFAULTS_PLIST, fn as iosAppProcess, gn as restartedAppNote, hn as launchIosApp, in as clearOtherUserApps, kt as ensureMetroReachable, yn as readRemoteSimulatorArch } from "./ccache-ChBMXlBq.mjs";
11
- import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-B9v5V7Es.mjs";
12
- import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-CYonNjd_.mjs";
13
- import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-DkS-Ir6V.mjs";
14
- import { T as storeBuild, h as fingerprintProject, j as untrackedNativeFiles, l as evictBuild, w as resolveBuild } from "./build-cache-Cqj4FGnX.mjs";
15
- import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-BdZdNsAj.mjs";
16
- import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-CWsBysyN.mjs";
17
- import { n as hostedMetroPortProbe } from "./hosted-native-B7OFt5gB.mjs";
18
- import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-Bo0EzJ-P.mjs";
19
- import { n as verifyCollectorOwnership } from "./ownership-hC7xvvxF.mjs";
20
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-kq0-7w9C.mjs";
21
- import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-CuvNPt-q.mjs";
22
- import { c as startDevServer, g as detectBundleId } from "./start-WTMumMHi.mjs";
10
+ import { Bn as readRemoteSimulatorArch, En as devClientUrl, In as launchIosApp, Jn as checkEasAuth, Jt as bundleEntryPoint, Ln as restartedAppNote, Mn as installIosApp, Nn as iosAppProcess, Tn as clearOtherUserApps, Vn as gateMetroOrigin, Xt as ensureMetroReachable, Zn as loadProjectProvider, Zt as ensureRemoteBootOwned, an as LAUNCH_UNVERIFIED, dn as readMetroRecords, en as remoteIosDeps, fn as unattributedLaunchLines, gn as verifyReleaseLaunch, hn as verifyLaunch, in as LAUNCH_FATAL, k as budgetGate, ln as isBundleProof, nr as resolveRemote, pn as unverifiedLaunchLines, r as checkDeviceCapacity, rn as LAUNCH_BUNDLING, rr as uploadRemote, sn as RELEASE_VERIFY_WAIT_MS, tn as resolveRemoteContext, tr as resolveEasCliBin, un as readCollectorRecords, xn as IOS_DEV_MENU_OFF_DEFAULTS_PLIST } from "./device-capacity-CpAVcKgq.mjs";
11
+ import { St as acquireBuildSlot, Tt as releaseBuildSlot, ct as recordRunStats, it as readRunEstimates, ot as recordCapacityRefusal } from "./workspaces-Dh5N70qW.mjs";
12
+ import { E as readPodState, H as readBundleId, T as podsAreStale, U as resolveScheme, V as readBundleExecutable, c as iosToolchainAsync, k as runPodInstall } from "./toolchain-DCnWAxQL.mjs";
13
+ import { F as waitForBuild, M as acquireBuildLock, P as releaseBuildLock } from "./activity-BpdDvA8Q.mjs";
14
+ import { E as storeBuild, M as untrackedNativeFiles, T as resolveBuild, g as fingerprintProject, l as evictBuild } from "./build-cache-BW8T4oD2.mjs";
15
+ import { d as listAllIosSims, h as listIosRuntimesAsync, r as clearIosAppData } from "./ios-BhfpRfNf.mjs";
16
+ import { C as clearIosAdoptionPending, G as lostLine, J as releaseLeaseOnAbort, K as lostRefusal, U as acquireRunLease, Y as runLease, i as deviceLabel, o as deviceShortName, t as appNameFromPath, z as DEBUG_VERIFY_STEP_MS } from "./support-BJbXovoO.mjs";
17
+ import { n as readHostedIos, o as writeHostedIosAsync } from "./ios-state-Avwz2cbZ.mjs";
18
+ import { n as hostedMetroPortProbe } from "./hosted-native-BiiUG_Q6.mjs";
19
+ import { i as prepareHostedIos, r as placeHostedIos } from "./phone-reverses-BhSxbqom.mjs";
20
+ import { n as verifyCollectorOwnership } from "./ownership-C3y8wLSl.mjs";
21
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-qEQVTth7.mjs";
22
+ import { a as discoverXcodeProject, r as buildIos } from "./react-native-build-CJega_NM.mjs";
23
+ import { c as startDevServer, g as detectBundleId } from "./start-YpT_JpQQ.mjs";
23
24
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
24
- import { a as acquireRunLease, c as lostRefusal, d as runLease, s as lostLine, t as DEBUG_VERIFY_STEP_MS, u as releaseLeaseOnAbort } from "./device-lease-run-i3FNX4OE.mjs";
25
- import { r as checkDeviceCapacity } from "./device-capacity-CHC3dKWg.mjs";
26
- import { n as clearIosAdoptionPending } from "./device-ios-B3-Ah--R.mjs";
27
- import { i as deviceLabel, o as deviceShortName, t as appNameFromPath } from "./support-ivsfDj0v.mjs";
28
- import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-R34vbrNU.mjs";
29
- import { a as resolveEasDevelopmentBuild } from "./eas-build-BpHIt_M3.mjs";
30
- import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-Drplrgzo.mjs";
31
- import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-Ym2mjmJ0.mjs";
32
- import { t as followHostedLaunchLogs } from "./hosted-logs-sync-Dlpa2mQF.mjs";
33
- import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-BfJII57G.mjs";
34
- import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-CNgxeOCG.mjs";
35
- import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-D3wOllNd.mjs";
36
- import { t as automaticDevicePlacement } from "./auto-placement-DA65VQH7.mjs";
37
- import { t as checkEasFallback } from "./eas-fallback-CNPcjq3K.mjs";
38
- import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-DH5yf6TU.mjs";
39
- import { t as selectFromPool } from "./device-pool-EZziQ0uS.mjs";
40
- import { s as reportIosResult } from "./ios-project-DoTQYghg.mjs";
41
- import { i as swapJsBundle } from "./js-swap-DrokhOfo.mjs";
25
+ import { a as sealAppForDevice, r as gateProfileForDevice } from "./ios-signing-BcH88ecn.mjs";
26
+ import { a as resolveEasDevelopmentBuild } from "./eas-build-Xf5Jd6LR.mjs";
27
+ import { c as isWirelessIosDevice, i as iosDeviceProcess, l as listIosDevices, n as installIosDeviceApp, p as verifyIosDeviceReleaseLaunch, r as iosDeviceBounds, t as awaitIosDeviceLaunch, u as localNetworkPending } from "./ios-device-vhYL1N--.mjs";
28
+ import { a as captureNativeCrashes, c as simulatorConsolePaths, i as bundleBindFailure, n as IOS_CRASH_REPORT_RETRY, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-CvB5bpPU.mjs";
29
+ import { t as followHostedLaunchLogs } from "./hosted-logs-sync-B7XCeqVm.mjs";
30
+ import { a as runPrebuild, d as memoizedFingerprint, n as planPrebuildAsync } from "./prebuild-Di2IhUue.mjs";
31
+ import { i as launchOutcomeRecord, n as ensureWorkspaceStorageSafely } from "./native-runtime-C3_NkUlW.mjs";
32
+ import { n as devClientTakesDevMenuParams, r as hasDevClient, t as devClientScheme } from "./dev-client-MO_DjTZr.mjs";
33
+ import { t as automaticDevicePlacement } from "./auto-placement-CKFpFCuq.mjs";
34
+ import { t as checkEasFallback } from "./eas-fallback-DNYPNinw.mjs";
35
+ import { i as warmMetro, n as ensureBooted, r as ensureOwnedDevice } from "./device-BZWt_aPJ.mjs";
36
+ import { t as selectFromPool } from "./device-pool-BJToGG-q.mjs";
37
+ import { s as reportIosResult } from "./ios-project-Cz0S1Sz-.mjs";
38
+ import { i as swapJsBundle } from "./js-swap-Desu2iII.mjs";
42
39
  import { mkdirSync, openSync, writeFileSync } from "node:fs";
43
40
  import { networkInterfaces } from "node:os";
44
41
  import { basename, join } from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { Bt as repoRoot } from "./settings-B5IBDfTx.mjs";
2
+ import { Bt as repoRoot } from "./settings-Bap-qjnp.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import { existsSync } from "node:fs";
5
5
  import { dirname, join, relative } from "node:path";
@@ -1,5 +1,5 @@
1
- import { C as resolvePackageJson, b as isPackageResolvable } from "./project-DU3jjnBE.mjs";
2
- import { $ as readBundleSchemes, Q as pickDevClientScheme } from "./toolchain-CYonNjd_.mjs";
1
+ import { C as resolvePackageJson, b as isPackageResolvable } from "./project-Clk1JAWL.mjs";
2
+ import { $ as readBundleSchemes, Q as pickDevClientScheme } from "./toolchain-DCnWAxQL.mjs";
3
3
  import { dirname, join } from "node:path";
4
4
  import { isJsonObject, readJsonObject } from "@stim-cli/core/state";
5
5
  //#region src/commands/dev-client.ts
@@ -1,14 +1,14 @@
1
- import { ft as deviceSlotPlatforms } from "./config-BW0fAtoK.mjs";
2
- import { s as ownedDeviceLabel } from "./project-DU3jjnBE.mjs";
3
- import { x as configureNewOwnedAvd } from "./android-Iq0M2t2d.mjs";
4
- import { c as pidExists } from "./metro-B5PVz0Wv.mjs";
5
- import { pt as teardownOwnedAvd } from "./workspaces-B9v5V7Es.mjs";
6
- import { h as tailLines } from "./activity-DkS-Ir6V.mjs";
7
- import "./ios-BdZdNsAj.mjs";
8
- import { t as clearDeviceIdleShutdown } from "./idle-shutdown-DPD8oV36.mjs";
9
- import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-B3-Ah--R.mjs";
10
- import { t as reconcileSimSlim } from "./simslim-DKdJx0LL.mjs";
11
- import { n as ensureAndroidBooted, r as ensureOwnedAndroidDevice, t as ANDROID_BOOT_TIMEOUT_MS } from "./device-android-ChfF5I9A.mjs";
1
+ import { pt as deviceSlotPlatforms } from "./config-BA3TgoIP.mjs";
2
+ import { s as ownedDeviceLabel } from "./project-Clk1JAWL.mjs";
3
+ import { x as configureNewOwnedAvd } from "./android-SJx1V3R3.mjs";
4
+ import { c as pidExists } from "./metro-DM3yJL1M.mjs";
5
+ import { v as clearDeviceIdleShutdown } from "./device-capacity-CpAVcKgq.mjs";
6
+ import { pt as teardownOwnedAvd } from "./workspaces-Dh5N70qW.mjs";
7
+ import { h as tailLines } from "./activity-BpdDvA8Q.mjs";
8
+ import "./ios-BhfpRfNf.mjs";
9
+ import { T as ensureOwnedIosDevice, w as ensureIosBooted } from "./support-BJbXovoO.mjs";
10
+ import { t as reconcileSimSlim } from "./simslim-DlBvwgeF.mjs";
11
+ import { n as ensureAndroidBooted, r as ensureOwnedAndroidDevice, t as ANDROID_BOOT_TIMEOUT_MS } from "./device-android-BB9Lugr8.mjs";
12
12
  import { existsSync } from "node:fs";
13
13
  import { dirname, join, resolve, sep } from "node:path";
14
14
  import { rotatedLogPath } from "@stim-cli/core";
@@ -1,16 +1,16 @@
1
1
  import { t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { r as readWorkspaceState$1 } from "./workspace-state-BdZ-QgmB.mjs";
3
- import { r as clockTime } from "./command-output-DjExb_tZ.mjs";
4
- import { dt as deviceSlotKey, ft as deviceSlotPlatforms, ht as projectDeviceSlots, m as getProject, mt as parseDeviceSlotOption } from "./config-BW0fAtoK.mjs";
5
- import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-DU3jjnBE.mjs";
6
- import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-Iq0M2t2d.mjs";
7
- import { Cn as runProcessOperation } from "./ccache-ChBMXlBq.mjs";
8
- import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-DkS-Ir6V.mjs";
9
- import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-BdZdNsAj.mjs";
10
- import { l as parseDeviceWait, p as waitForDevice } from "./device-lease-run-i3FNX4OE.mjs";
11
- import { n as runProvision } from "./device-provision-CfpEy-Vm.mjs";
12
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-Drplrgzo.mjs";
13
- import { t as selectFromPool } from "./device-pool-EZziQ0uS.mjs";
2
+ import { r as readWorkspaceState$1 } from "./workspace-state-BhwAJBgA.mjs";
3
+ import { r as clockTime } from "./command-output-T3cDctRE.mjs";
4
+ import { ft as deviceSlotKey, gt as projectDeviceSlots, ht as parseDeviceSlotOption, m as getProject, pt as deviceSlotPlatforms } from "./config-BA3TgoIP.mjs";
5
+ import { I as readWorkspaceLaunches, P as readRemoteSession, i as findProjectRoot$1, t as NO_PROJECT_REFUSAL } from "./project-Clk1JAWL.mjs";
6
+ import { $ as probeEmulatorSerial, A as getAvdNameForSerialAsync, E as emulatorProbeSession, P as listAdbDevicesAsync, Z as physicalDeviceModel, at as resolvePhysicalDevice, c as androidPoolNoCandidatesRefusal, d as androidToolPath, it as resolveOwnedAvdSerialAsync, s as androidPoolCandidates, u as androidToolCwd } from "./android-SJx1V3R3.mjs";
7
+ import { Wn as runProcessOperation } from "./device-capacity-CpAVcKgq.mjs";
8
+ import { C as parseLeaseDuration, D as releaseWorkspaceLeases, j as takeLease, y as fileLeaseIo } from "./activity-BpdDvA8Q.mjs";
9
+ import { D as resolveOwnedIosSim, f as listAllIosSimsAsync } from "./ios-BhfpRfNf.mjs";
10
+ import { Z as waitForDevice, q as parseDeviceWait } from "./support-BJbXovoO.mjs";
11
+ import { n as runProvision } from "./device-provision-CxQDCtrc.mjs";
12
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, l as listIosDevices, o as iosPoolNoCandidatesRefusal } from "./ios-device-vhYL1N--.mjs";
13
+ import { t as selectFromPool } from "./device-pool-BJToGG-q.mjs";
14
14
  import { hostedNativeRecords } from "@stim-cli/core/state";
15
15
  import chalk from "chalk";
16
16
  //#region src/commands/device-tools.ts
@@ -1,12 +1,12 @@
1
1
  import { D as ownership_claim_exports, t as getExecutor } from "./exec-CGuDzt40.mjs";
2
- import { l as phaseLine } from "./command-output-DjExb_tZ.mjs";
3
- import { M as acquireAvdClaim, O as withConfigLock, T as setDevice, a as clearDevice, ft as deviceSlotPlatforms, ht as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLockAsync, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-BW0fAtoK.mjs";
4
- import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-B5IBDfTx.mjs";
5
- import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-Iq0M2t2d.mjs";
6
- import { c as pidExists } from "./metro-B5PVz0Wv.mjs";
7
- import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-B9v5V7Es.mjs";
8
- import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-BdZdNsAj.mjs";
9
- import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-CHC3dKWg.mjs";
2
+ import { l as phaseLine } from "./command-output-T3cDctRE.mjs";
3
+ import { A as withConfigLockAsync, N as acquireAvdClaim, T as setDevice, a as clearDevice, gt as projectDeviceSlots, i as clearAndroidBootPending, k as withConfigLock, pt as deviceSlotPlatforms, t as allConsolePortsAndSerials, v as loadConfig, x as releaseAndroidConsolePort } from "./config-BA3TgoIP.mjs";
4
+ import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-Bap-qjnp.mjs";
5
+ import { A as getAvdNameForSerialAsync, G as ownedAvdName, H as ownedAvdDeviceProfile, J as ownedAvdSystemImage, P as listAdbDevicesAsync, Q as pickDefaultSystemImage, R as listAvdsAsync, S as createOwnedAvd, V as nextConsolePort, W as ownedAvdMatchesConfiguration, _ as avdPoolConfiguration, b as bootAndroidEmulator, bt as parkedMaxSetting, ht as adoptParked, it as resolveOwnedAvdSerialAsync, n as OWNED_AVD_CONFIG_DEFAULTS, p as assertOwnedAvdStoppedAsync, t as DEFAULT_AVD_DEVICE_PROFILE, ut as waitForBoot, vt as isLegacyDeletionClaim, xt as readParked, z as listInstalledSystemImages } from "./android-SJx1V3R3.mjs";
6
+ import { c as pidExists } from "./metro-DM3yJL1M.mjs";
7
+ import { _ as withDeviceBootAdmission, n as DeviceAdmissionRefusal, s as countLiveOwnedDevicesFrom } from "./device-capacity-CpAVcKgq.mjs";
8
+ import { gt as teardownParkedAvd, pt as teardownOwnedAvd } from "./workspaces-Dh5N70qW.mjs";
9
+ import { B as reportMemoryCulprits, L as memoryCulpritsUnderAsync, R as readHostMemoryPressure, V as memoryCulpritAdvice, f as listAllIosSimsAsync } from "./ios-BhfpRfNf.mjs";
10
10
  import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
11
11
  import { randomUUID } from "node:crypto";
12
12
  import { existsSync } from "node:fs";