stim 1.27.0 → 1.29.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 (154) hide show
  1. package/dist/{acquire-artifact-BKN2Yuhg.mjs → acquire-artifact-C2DKfenN.mjs} +1 -1
  2. package/dist/{act-ROviTF_t.mjs → act-CrTcskiE.mjs} +502 -34
  3. package/dist/{activity-Cd-ysFes.mjs → activity-BR5oHSO5.mjs} +6 -5
  4. package/dist/{agent-device-usage-output-C5nCKWp9.mjs → agent-device-usage-output-W0x4SoC7.mjs} +4 -4
  5. package/dist/{android-DriNoAVy.mjs → android-BHKgeOuq.mjs} +5 -5
  6. package/dist/{android--HBgpvpW.mjs → android-BPmCmyAy.mjs} +5 -5
  7. package/dist/{android-Deb9X3_Y.mjs → android-CLU_MMnb.mjs} +1 -1
  8. package/dist/{android-cas-D5e6ecUg.mjs → android-cas-BH6K12__.mjs} +4 -4
  9. package/dist/{android-Cd6w7_qw.mjs → android-l616dRP1.mjs} +42 -39
  10. package/dist/{android-project-DUGMbq28.d.mts → android-project-CCEQyYJK.d.mts} +6 -2
  11. package/dist/api.d.mts +8 -5
  12. package/dist/api.mjs +27 -27
  13. package/dist/{apk-signed-tail-BHQHx3Rm.mjs → apk-signed-tail-B-wKoF_8.mjs} +2 -2
  14. package/dist/{artifact-0AGJYB9O.mjs → artifact-DHuFYfhD.mjs} +12 -12
  15. package/dist/{artifact-faemIZv5.mjs → artifact-Dm9ScLrh.mjs} +12 -12
  16. package/dist/{auto-placement-z-H5pJza.mjs → auto-placement-C8sJsyMN.mjs} +8 -8
  17. package/dist/{browser-web-slD8AvLp.mjs → browser-web-_tQTbQUs.mjs} +12 -12
  18. package/dist/{build-hS0QyFlQ.mjs → build-DtCU9Kim.mjs} +23 -23
  19. package/dist/{build-cache-gBJ-WKzA.mjs → build-cache-BGwTsIEa.mjs} +4 -4
  20. package/dist/{build-plan-CBqYbzYM.mjs → build-plan-CWyjMPKo.mjs} +6 -6
  21. package/dist/{cache-manifest-DEjqGGat.mjs → cache-manifest-evF_zJ9U.mjs} +1 -1
  22. package/dist/cache-manifest.mjs +1 -1
  23. package/dist/{ccache-BWTze1Ls.mjs → ccache-DsDkdP72.mjs} +19 -18
  24. package/dist/{cli-ftXDLto1.mjs → cli-3fjOg-Oc.mjs} +19 -19
  25. package/dist/cli.mjs +1 -1
  26. package/dist/{client-xsdxrhWA.mjs → client-BTUH8TF1.mjs} +41 -8
  27. package/dist/collector-run.mjs +5 -5
  28. package/dist/{command-output-Dj-WT4BP.mjs → command-output-DjCsmzLZ.mjs} +1 -1
  29. package/dist/{config-Cn94Jc0g.mjs → config-AbUjIBOQ.mjs} +121 -19
  30. package/dist/{dependencies-BGokZ-Ng.mjs → dependencies-CHNqX6Pr.mjs} +38 -38
  31. package/dist/{dependency-state-C3OtgG94.mjs → dependency-state-CPKAKCZ8.mjs} +1 -1
  32. package/dist/{dev-client-BMca82xo.mjs → dev-client-CROrxj1x.mjs} +2 -2
  33. package/dist/{device-tM41-TUq.mjs → device-Bmm5qjM-.mjs} +14 -14
  34. package/dist/device-BvpasThQ.mjs +297 -0
  35. package/dist/{device-capacity-6LP7QsaA.mjs → device-capacity-B2ChA-bz.mjs} +86 -18
  36. package/dist/device-host-worker.mjs +15 -13
  37. package/dist/{device-ios-534c14fz.mjs → device-ios-CYzivd31.mjs} +9 -9
  38. package/dist/{device-lease-run-DwsGfjUN.mjs → device-lease-run-qRq_2W2V.mjs} +4 -4
  39. package/dist/{device-pool-BnQqvs6o.mjs → device-pool-CrmiE4_x.mjs} +3 -3
  40. package/dist/{device-BJm0irrq.mjs → device-provision-CK2XiEp1.mjs} +11 -302
  41. package/dist/{doctor-Dbx1ZpD2.mjs → doctor-BO_kaFWX.mjs} +1 -1
  42. package/dist/{doctor-DyqE9n1J.mjs → doctor-Cp4-HN1f.mjs} +20 -15
  43. package/dist/{doctor-F-3VUUyN.mjs → doctor-Dr3C1iXV.mjs} +19 -19
  44. package/dist/doctor-fingerprint.mjs +1 -1
  45. package/dist/{doctor-watchman-CxDbyrrt.mjs → doctor-watchman-CJr2aXXv.mjs} +4 -4
  46. package/dist/{eas-build-CjNSWmjo.mjs → eas-build-D-9HmGZS.mjs} +2 -2
  47. package/dist/{eas-fallback-9fqb46kW.mjs → eas-fallback-Cemt2GVL.mjs} +4 -4
  48. package/dist/{eas-session-ledger-DrP4OuuM.mjs → eas-session-ledger-B0KLZx5m.mjs} +36 -7
  49. package/dist/{error-diagnostics-snej9k4j.mjs → error-diagnostics-CV_1RoEH.mjs} +8 -8
  50. package/dist/{gc-CGZ1Yg88.mjs → gc-CKHqL4aS.mjs} +81 -18
  51. package/dist/{gc-BRwAY3qT.mjs → gc-DjXwQXHK.mjs} +2 -2
  52. package/dist/{guide-_rfEh_zM.mjs → guide-CeRlWVsS.mjs} +230 -62
  53. package/dist/{hosted-android-BMKzUNnY.mjs → hosted-android-DI_vvv7U.mjs} +5 -6
  54. package/dist/{hosted-client-D7Pk_Oo1.mjs → hosted-client-CgoxdU9j.mjs} +44 -17
  55. package/dist/{hosted-logs-B1gqQuva.mjs → hosted-logs-C-4INmkn.mjs} +17 -8
  56. package/dist/{hosted-logs-sync-Dg3qrZmV.mjs → hosted-logs-sync-Bf5s02fi.mjs} +5 -5
  57. package/dist/{hosted-macos-B9w4H8hc.mjs → hosted-macos-Doh85YUM.mjs} +5 -5
  58. package/dist/{hosted-native-CdgaiuyP.mjs → hosted-native-DvZENAL-.mjs} +11 -8
  59. package/dist/{idle-shutdown-Cbvo5KEh.mjs → idle-shutdown-BM37gMfU.mjs} +7 -7
  60. package/dist/{ios-Bk4mWbtS.mjs → ios-CNDH6fNF.mjs} +8 -8
  61. package/dist/{ios-E26qSpkb.mjs → ios-CoMCWfub.mjs} +4 -4
  62. package/dist/{ios-B5HlVMhQ.mjs → ios-UM_dManb.mjs} +31 -29
  63. package/dist/{ios-device-C_QkIf1Z.mjs → ios-device-L1-pota_.mjs} +1 -1
  64. package/dist/{ios-project-D8Jcy_br.mjs → ios-project-DJYptOCh.mjs} +7 -7
  65. package/dist/{ios-state-BZ03NFgF.mjs → ios-state-Ce_dystM.mjs} +1 -1
  66. package/dist/{js-swap-Dg2a945i.mjs → js-swap-BthE4kZC.mjs} +4 -4
  67. package/dist/{launch-CRyBeNsA.mjs → launch-D798aSm8.mjs} +19 -19
  68. package/dist/{lightened-BCsdAGj_.mjs → lightened-vSxkstg6.mjs} +4 -4
  69. package/dist/{logs-aJQb-RDg.mjs → logs-BND8MiBq.mjs} +9 -8
  70. package/dist/{logs-CC_-ZzEE.mjs → logs-CilPftm3.mjs} +5 -5
  71. package/dist/{macos-BGmTpnv9.mjs → macos-BOQrKYeJ.mjs} +1 -1
  72. package/dist/{macos-DlCBhMw5.mjs → macos-CxUi9xcE.mjs} +20 -20
  73. package/dist/macos-run.mjs +1 -1
  74. package/dist/maintenance-run.mjs +13 -9
  75. package/dist/{metro-CvyD-xwe.mjs → metro-BMQHczcf.mjs} +2 -2
  76. package/dist/{metro-gateway-BnHdqMO_.mjs → metro-request-BtF7ox53.mjs} +25 -46
  77. package/dist/{named-ports-BCyMWA6b.mjs → named-ports-DcktE2Pw.mjs} +2 -2
  78. package/dist/{native-android-DlpxCyOP.mjs → native-android-BkhrCjdX.mjs} +16 -16
  79. package/dist/{native-gradle-artifact-inputs-C13qT7R_.mjs → native-gradle-artifact-inputs-Cw4P6Gyr.mjs} +3 -3
  80. package/dist/{native-runtime-DqaIBO5w.mjs → native-runtime-DyH2gkXK.mjs} +6 -6
  81. package/dist/{native-xcode-inputs-B1W8SrxB.mjs → native-xcode-inputs-DV8jr3kJ.mjs} +2 -2
  82. package/dist/{native-xcode-ios-QPP0Rm68.mjs → native-xcode-ios-DdpPG2iT.mjs} +15 -15
  83. package/dist/{ndjson-Dy2W4vRa.mjs → ndjson-CrjIsGzw.mjs} +2 -2
  84. package/dist/offload-worker.d.mts +1 -1
  85. package/dist/offload-worker.mjs +22 -22
  86. package/dist/{ownership-Bx-0cku-.mjs → ownership-Dtz9G5Gl.mjs} +2 -2
  87. package/dist/{phone-reverses-C9yAaKEv.mjs → phone-reverses-DZRad8HT.mjs} +4 -4
  88. package/dist/{placement-log-BXUbiZM6.mjs → placement-log-CoN6xrjY.mjs} +1 -1
  89. package/dist/{plan-placement-UxnQjv5Z.mjs → plan-placement-7sHuqR-r.mjs} +6 -6
  90. package/dist/{ports-uUrghqWN.mjs → ports-VQSAPZhl.mjs} +3 -3
  91. package/dist/{prebuild-BDpToDgR.mjs → prebuild-Bqp0LFGN.mjs} +9 -9
  92. package/dist/{project-DYj-HVx6.mjs → project-D1n0K4yg.mjs} +15 -15
  93. package/dist/{react-native-android-DDBccgJw.mjs → react-native-android-FQ-yX3Mv.mjs} +22 -22
  94. package/dist/{react-native-build-DaK2IFyP.mjs → react-native-build-D58bIqV9.mjs} +7 -7
  95. package/dist/{react-native-doctor-B-Mw6DcR.mjs → react-native-doctor-AkUH2aca.mjs} +5 -5
  96. package/dist/{react-native-ios-DjYwUF9U.mjs → react-native-ios-Dmsv8j7T.mjs} +14 -14
  97. package/dist/{recordings-C20iUZfp.mjs → recordings-CHMaF73C.mjs} +1 -1
  98. package/dist/{reload-fUdkH2_p.mjs → reload-BV0nD-k9.mjs} +14 -14
  99. package/dist/{reload-DJBeF_rC.mjs → reload-CDKEzzaf.mjs} +1 -1
  100. package/dist/{remote-y6n99WMW.mjs → remote-C8xyslUa.mjs} +9 -9
  101. package/dist/{result-CTqBw2Te.mjs → result-9fqcJ90W.mjs} +16 -16
  102. package/dist/{run-DaCeNKRm.mjs → run-BQAmrohh.mjs} +2 -2
  103. package/dist/{selection-Bs8phwhN.mjs → selection-D1ZDzHFX.mjs} +105 -62
  104. package/dist/{server-bare-BOh-iZEj.mjs → server-bare-CEQdB_F4.mjs} +37 -1
  105. package/dist/{server-command-8CuA51Cv.mjs → server-command-RlS-Kl4a.mjs} +5 -5
  106. package/dist/server-expo-BVV9qy31.mjs +2 -0
  107. package/dist/{server-expo-ABQs2XFA.mjs → server-expo-bB1VV2k-.mjs} +8 -5
  108. package/dist/{settings-CMHhQNwI.mjs → settings-BcVCcAT5.mjs} +2 -2
  109. package/dist/{settings-BDVI8Ivc.mjs → settings-D776ygML.mjs} +47 -3
  110. package/dist/{settings-Djl-mpjX.mjs → settings-D9LtQaUw.mjs} +2 -1
  111. package/dist/{settings-payload-cm60Zhib.mjs → settings-payload-_aatELz2.mjs} +4 -4
  112. package/dist/{settings-write-BdNRLlBn.mjs → settings-write-CkTVGQ4O.mjs} +5 -5
  113. package/dist/settings.schema.json +58 -9
  114. package/dist/{simslim-DCQwzoPy.mjs → simslim-CbpHERcv.mjs} +1 -1
  115. package/dist/{slot-launch-0l7RqSpr.mjs → slot-launch-Dbgfh8gc.mjs} +6 -6
  116. package/dist/{stage-F4cAfJGi.mjs → stage-BuHuRj1y.mjs} +1 -1
  117. package/dist/{start-DcqnF9p8.mjs → start-Cr-c3Xhq.mjs} +1 -1
  118. package/dist/{start-DrPwER_2.mjs → start-Dlv4XXTP.mjs} +11 -11
  119. package/dist/{state-CZxLyetD.mjs → state-C2AUjjhg.mjs} +1 -1
  120. package/dist/{state-BX1y5syV.mjs → state-D5ZxwCGJ.mjs} +2 -2
  121. package/dist/{stats-GxuCbles.mjs → stats-D5c-uIBp.mjs} +4 -4
  122. package/dist/{status-7ULDEJ1e.mjs → status-CK7ZoEhV.mjs} +2 -2
  123. package/dist/{status-BfnK9pUd.mjs → status-D6PBK6_-.mjs} +49 -26
  124. package/dist/{status-Bj7ZYvvc.mjs → status-DbQv--Yb.mjs} +1 -1
  125. package/dist/{status-watch-BfabQn03.mjs → status-watch-okrpea4i.mjs} +17 -6
  126. package/dist/status-worker.mjs +1 -1
  127. package/dist/{stim-desktop-CbWo21kb.mjs → stim-desktop-CYXLFpFS.mjs} +1 -1
  128. package/dist/{stop-x1Yu3He4.mjs → stop-CHtAiv79.mjs} +2 -2
  129. package/dist/{stop-D-EAr25B.mjs → stop-p9uSKuGE.mjs} +20 -19
  130. package/dist/{stop-CH79S3IZ.mjs → stop-uRQ-zYcl.mjs} +9 -5
  131. package/dist/supervisor-run.d.mts +1 -0
  132. package/dist/supervisor-run.mjs +243 -65
  133. package/dist/{support-Be0UeVZU.mjs → support-BMpQIug0.mjs} +11 -10
  134. package/dist/{support-CNg_YsOk.mjs → support-PFyTkrnr.mjs} +4 -4
  135. package/dist/{swiftpm-artifact-inputs-uPqYvGBv.mjs → swiftpm-artifact-inputs-Cddq6jN2.mjs} +1 -1
  136. package/dist/{swiftpm-macos-Ch4YjY_A.mjs → swiftpm-macos-BSj9iZlI.mjs} +8 -8
  137. package/dist/{toolchain-JYAOquPg.mjs → toolchain-B-mzR9Rh.mjs} +1 -1
  138. package/dist/{toolchain-CbCG6C5Z.mjs → toolchain-CLGnEUgT.mjs} +4 -4
  139. package/dist/{trigger-DMou-X7j.mjs → trigger-CfnOfpDd.mjs} +1 -1
  140. package/dist/trigger-DBZ-GBrl.mjs +2 -0
  141. package/dist/{warm-progress-C0RsbngN.mjs → warm-progress--KkkBBaq.mjs} +3 -3
  142. package/dist/web-BxSo493O.mjs +2 -0
  143. package/dist/web-run.mjs +5 -5
  144. package/dist/{web-Cq_AQ4DK.mjs → web-xlVssjQf.mjs} +8 -8
  145. package/dist/{workspace-state-BjqdjnJR.mjs → workspace-state-DGwkPXwq.mjs} +2 -2
  146. package/dist/{workspaces-DFbj07jp.mjs → workspaces-CvSYD_78.mjs} +106 -26
  147. package/dist/{worktree-COAJ3-OD.mjs → worktree-CaQBf6kh.mjs} +26 -47
  148. package/dist/worktree-DTOIohFe.mjs +2 -0
  149. package/package.json +7 -7
  150. package/shim/bundle-response.cjs +37 -0
  151. package/dist/server-expo-Ba_Y21vB.mjs +0 -2
  152. package/dist/trigger-qp2ji5wE.mjs +0 -2
  153. package/dist/web-Je6abcpz.mjs +0 -2
  154. package/dist/worktree-JGUd_53L.mjs +0 -2
@@ -1,7 +1,7 @@
1
1
  import { c as throwIfCancelled, o as cancellableSleep } from "./exec-aULwtNly.mjs";
2
- import { Y as diagnoseConnectFailure, ot as resolveEndpoint } from "./config-Cn94Jc0g.mjs";
3
- import { t as BuildConnection } from "./client-xsdxrhWA.mjs";
4
- import { g as configuredMachines } from "./selection-Bs8phwhN.mjs";
2
+ import { Y as diagnoseConnectFailure, st as resolveEndpoint } from "./config-AbUjIBOQ.mjs";
3
+ import { t as BuildConnection } from "./client-BTUH8TF1.mjs";
4
+ import { g as configuredMachines } from "./selection-D1ZDzHFX.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { lstatSync, readFileSync, readdirSync, readlinkSync } from "node:fs";
7
7
  import { join } from "node:path";
@@ -42,6 +42,11 @@ function hostingCredential(machine) {
42
42
  }
43
43
  return credential;
44
44
  }
45
+ function turnedAway(machine, opened) {
46
+ if (opened.code === "server-outdated") return `${machine} runs a stim-server that speaks an older protocol than this Stim. Run stim doctor for the command that updates it there, then retry.`;
47
+ if (opened.refused) return `${machine} refused this machine: ${opened.failure.replace(/\.+$/, "")}. Run stim doctor.`;
48
+ return null;
49
+ }
45
50
  /** Connects only to the stim-server that proves it holds the approved machine's pinned key, and only for `device-host`. */
46
51
  async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = false, signal) {
47
52
  signal?.throwIfAborted();
@@ -55,8 +60,9 @@ async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = fal
55
60
  if (signal?.aborted && opened instanceof BuildConnection) opened.close();
56
61
  signal?.throwIfAborted();
57
62
  if (!(opened instanceof BuildConnection)) {
58
- const diagnosis = opened.refused || opened.code === "server-outdated" ? null : await diagnoseConnectFailure(machine, opened, signal);
59
- throw Object.assign(new Error(opened.code === "server-outdated" ? `${machine} runs a stim-server that speaks an older protocol than this Stim. Run stim doctor for the command that updates it there, then retry.` : opened.refused ? `${machine} refused this machine: ${opened.failure.replace(/\.+$/, "")}. Run stim doctor.` : diagnosis?.message ?? `${machine} is unreachable: ${opened.failure}. Run stim doctor to see which layer failed.`), {
63
+ const refusal = turnedAway(machine, opened);
64
+ const diagnosis = refusal === null ? await diagnoseConnectFailure(machine, opened, signal) : null;
65
+ throw Object.assign(new Error(refusal ?? diagnosis?.message ?? `${machine} is unreachable: ${opened.failure}. Run stim doctor to see which layer failed.`), {
60
66
  code: strict ? "STIM_HOSTING_REFUSED" : opened.refused ? "STIM_HOSTING_REFUSED" : opened.code ?? "closed",
61
67
  hostCode: opened.code,
62
68
  ...diagnosis ? { remedy: diagnosis.remedy } : {}
@@ -68,24 +74,45 @@ async function connectHost(machine, timeoutMs = CONNECT_TIMEOUT_MS, strict = fal
68
74
  connection: opened
69
75
  };
70
76
  }
77
+ /**
78
+ * Opens `device-host` connections to `machine` for a caller that retries on its own, as `connectHost` does but without
79
+ * diagnosing failures, resolving the machine's address again only after one fails. Only a failure a retry cannot fix,
80
+ * such as a refusal or a missing approval, carries a `STIM_` code; Tailscale not running or not listing the machine is
81
+ * worth retrying.
82
+ */
83
+ function hostConnector(machine) {
84
+ let resolving;
85
+ return async () => {
86
+ const credential = hostingCredential(machine);
87
+ const pending = resolving ??= resolveEndpoint(credential);
88
+ const target = await pending.catch((error) => {
89
+ if (resolving === pending) resolving = void 0;
90
+ throw error;
91
+ });
92
+ if (typeof target === "string") {
93
+ if (resolving === pending) resolving = void 0;
94
+ throw Object.assign(/* @__PURE__ */ new Error(`Stim does not connect to ${machine}: ${target}.`), { code: "closed" });
95
+ }
96
+ const opened = await BuildConnection.open(target, credential.serverKey, CONNECT_TIMEOUT_MS, "device-host").catch((error) => ({
97
+ failure: error instanceof Error ? error.message : String(error),
98
+ refused: false
99
+ }));
100
+ if (opened instanceof BuildConnection) return opened;
101
+ const refusal = turnedAway(machine, opened);
102
+ if (refusal !== null) throw credentialRefusal(refusal);
103
+ if (resolving === pending) resolving = void 0;
104
+ throw Object.assign(/* @__PURE__ */ new Error(`${machine} is unreachable: ${opened.failure}. Run stim doctor to see which layer failed.`), { code: opened.code ?? "closed" });
105
+ };
106
+ }
71
107
  function requireHostedAppMode(host, platform, mode) {
72
108
  if (mode !== "process") return;
73
109
  if (!host.connection.supports(platform === "ios" ? "hosted-ios-process" : "hosted-android-process")) throw credentialRefusal(`${host.machine} does not support hosted ${platform} process apps.`, `Update stim-server on ${host.machine} to a version supporting hosted ${platform} process apps, then retry.`);
74
110
  }
75
- const gatewaySecrets = /* @__PURE__ */ new WeakMap();
76
- function redactHostText(host, message) {
77
- const secret = gatewaySecrets.get(host);
78
- return secret ? message.replaceAll(secret, "[redacted]") : message;
79
- }
80
111
  async function call(host, method, params, timeoutMs) {
81
- if (method === "device-host.metro.open" && isJsonObject(params) && typeof params.secret === "string") gatewaySecrets.set(host, params.secret);
82
112
  const reply = await host.connection.request(method, params, timeoutMs);
83
- if ("error" in reply) throw Object.assign(/* @__PURE__ */ new Error(`${host.machine} refused ${method}: ${redactHostText(host, reply.error.message)}`), { code: reply.error.code });
113
+ if ("error" in reply) throw Object.assign(/* @__PURE__ */ new Error(`${host.machine} refused ${method}: ${reply.error.message}`), { code: reply.error.code });
84
114
  if (!isJsonObject(reply.result)) throw new Error(`${host.machine} answered ${method} without a result.`);
85
- return typeof reply.result.notice === "string" ? {
86
- ...reply.result,
87
- notice: redactHostText(host, reply.result.notice)
88
- } : reply.result;
115
+ return reply.result;
89
116
  }
90
117
  function hostedSession(host, value, platform = "macos") {
91
118
  if (typeof value.id !== "string" || typeof value.state !== "string" || value.platform !== platform) throw new Error(`${host.machine} answered with a session that is not a hosted ${platform} session.`);
@@ -226,4 +253,4 @@ async function upload(host, ids, missing, content) {
226
253
  }
227
254
  }
228
255
  //#endregion
229
- export { unknownSession as _, SESSION_TIMEOUT_MS as a, call as c, hostedSession as d, probeHostedSession as f, stoppedSession as g, sha256 as h, RESERVE_TIMEOUT_MS as i, connectHost as l, settle as m, OFFER_TIMEOUT_MS as n, attach as o, requireHostedAppMode as p, PREPARE_TIMEOUT_MS as r, bundleManifest as s, INSTALL_TIMEOUT_MS as t, heldNoLonger as u, upload as v };
256
+ export { stoppedSession as _, SESSION_TIMEOUT_MS as a, call as c, hostConnector as d, hostedSession as f, sha256 as g, settle as h, RESERVE_TIMEOUT_MS as i, connectHost as l, requireHostedAppMode as m, OFFER_TIMEOUT_MS as n, attach as o, probeHostedSession as p, PREPARE_TIMEOUT_MS as r, bundleManifest as s, INSTALL_TIMEOUT_MS as t, heldNoLonger as u, unknownSession as v, upload as y };
@@ -1,11 +1,11 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, k as workspaceLogsDir$1 } from "./workspace-state-BjqdjnJR.mjs";
3
- import { B as deviceSlotFileKey, q as validateDeviceSlot, rt as parseMachine$1 } from "./config-Cn94Jc0g.mjs";
4
- import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
5
- import { n as macosDir } from "./state-CZxLyetD.mjs";
6
- import { n as androidLogGroups, r as isAndroidCrashText } from "./android-Deb9X3_Y.mjs";
7
- import { c as readNdjsonGenerations$1, i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
8
- import { c as call } from "./hosted-client-D7Pk_Oo1.mjs";
2
+ import { E as workspaceDir, k as workspaceLogsDir$1 } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { B as deviceSlotFileKey, it as parseMachine$1, q as validateDeviceSlot } from "./config-AbUjIBOQ.mjs";
4
+ import { l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
5
+ import { n as macosDir } from "./state-C2AUjjhg.mjs";
6
+ import { n as androidLogGroups, r as isAndroidCrashText } from "./android-CLU_MMnb.mjs";
7
+ import { c as readNdjsonGenerations$1, i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
8
+ import { c as call } from "./hosted-client-CgoxdU9j.mjs";
9
9
  import { mkdirSync, readFileSync, realpathSync, renameSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { dirname, join } from "node:path";
11
11
  import { LOG_ROTATE_BYTES, ambientWrite, withDirLockAsync } from "@stim-cli/core";
@@ -47,11 +47,20 @@ async function removeAgentAccess(file, keep) {
47
47
  }
48
48
  }
49
49
  async function agentAccess(file, credential, grant, note, platform = "macos") {
50
+ const machine = parseMachine$1(credential.machine);
51
+ if (machine?.transport === "local") {
52
+ if (grant !== void 0) note(`Agent control of apps hosted on ${credential.machine} needs a tailnet machine; the local network does not carry it.`);
53
+ await removeAgentAccess(file);
54
+ return {
55
+ driver: "none",
56
+ setting: "hosting.agentDriver"
57
+ };
58
+ }
50
59
  const parsed = grant === void 0 ? null : parseHostedAgentGrant(grant);
51
60
  const issued = parsed && "token" in parsed ? parsed : null;
52
61
  const loaded = issued ? await agentDriverClient(issued.driver) : null;
53
62
  if (grant !== void 0 && !parsed || loaded && "unavailable" in loaded) note(`${credential.machine} offered agent control this Stim does not support.`);
54
- const port = parseMachine$1(credential.machine)?.port ?? 443;
63
+ const port = machine?.port ?? 443;
55
64
  const client = loaded && "client" in loaded ? loaded.client : null;
56
65
  const target = client ? join(dirname(file), client.configFile) : file;
57
66
  const access = client && issued ? client.access({
@@ -1,8 +1,8 @@
1
- import { n as pullHostedNativeLogs, r as readHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-B1gqQuva.mjs";
2
- import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
3
- import { l as connectHost } from "./hosted-client-D7Pk_Oo1.mjs";
4
- import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-BZ03NFgF.mjs";
5
- import "./hosted-macos-B9w4H8hc.mjs";
1
+ import { n as pullHostedNativeLogs, r as readHostedNativeLogs, t as pullHostedMacosLogs } from "./hosted-logs-C-4INmkn.mjs";
2
+ import { l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
3
+ import { l as connectHost } from "./hosted-client-CgoxdU9j.mjs";
4
+ import { n as readHostedIos, t as readHostedAndroid } from "./ios-state-Ce_dystM.mjs";
5
+ import "./hosted-macos-Doh85YUM.mjs";
6
6
  import { watch } from "node:fs";
7
7
  import { dirname, relative, resolve, sep } from "node:path";
8
8
  import { ambientWrite, configDir } from "@stim-cli/core";
@@ -1,9 +1,9 @@
1
1
  import { o as cancellableSleep } from "./exec-aULwtNly.mjs";
2
- import { a as agentAccess, i as closeAgentConnection, o as removeAgentAccess, t as pullHostedMacosLogs } from "./hosted-logs-B1gqQuva.mjs";
3
- import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
4
- import { n as macosDir } from "./state-CZxLyetD.mjs";
5
- import { ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
6
- import { _ as unknownSession, a as SESSION_TIMEOUT_MS, c as call, d as hostedSession, g as stoppedSession, h as sha256, i as RESERVE_TIMEOUT_MS, l as connectHost, m as settle, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as upload } from "./hosted-client-D7Pk_Oo1.mjs";
2
+ import { a as agentAccess, i as closeAgentConnection, o as removeAgentAccess, t as pullHostedMacosLogs } from "./hosted-logs-C-4INmkn.mjs";
3
+ import { l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
4
+ import { n as macosDir } from "./state-C2AUjjhg.mjs";
5
+ import { ot as runCancellationSignal } from "./toolchain-CLGnEUgT.mjs";
6
+ import { _ as stoppedSession, a as SESSION_TIMEOUT_MS, c as call, f as hostedSession, g as sha256, h as settle, i as RESERVE_TIMEOUT_MS, l as connectHost, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as unknownSession, y as upload } from "./hosted-client-CgoxdU9j.mjs";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import { join } from "node:path";
9
9
  import { ambientContext, ambientWrite } from "@stim-cli/core";
@@ -1,10 +1,10 @@
1
1
  import { o as cancellableSleep, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
3
- import { a as agentAccess, i as closeAgentConnection, n as pullHostedNativeLogs, o as removeAgentAccess } from "./hosted-logs-B1gqQuva.mjs";
4
- import { ot as runCancellationSignal } from "./toolchain-CbCG6C5Z.mjs";
5
- import { _ as unknownSession, a as SESSION_TIMEOUT_MS, c as call, d as hostedSession, g as stoppedSession, h as sha256, i as RESERVE_TIMEOUT_MS, l as connectHost, m as settle, n as OFFER_TIMEOUT_MS, o as attach, p as requireHostedAppMode, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as upload } from "./hosted-client-D7Pk_Oo1.mjs";
6
- import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-gateway-BnHdqMO_.mjs";
7
- import { s as writeHostedNative } from "./ios-state-BZ03NFgF.mjs";
2
+ import { E as workspaceDir, l as withWorkspaceStateLockAsync, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { a as agentAccess, i as closeAgentConnection, n as pullHostedNativeLogs, o as removeAgentAccess } from "./hosted-logs-C-4INmkn.mjs";
4
+ import { ot as runCancellationSignal } from "./toolchain-CLGnEUgT.mjs";
5
+ import { _ as stoppedSession, a as SESSION_TIMEOUT_MS, c as call, f as hostedSession, g as sha256, h as settle, i as RESERVE_TIMEOUT_MS, l as connectHost, m as requireHostedAppMode, n as OFFER_TIMEOUT_MS, o as attach, r as PREPARE_TIMEOUT_MS, s as bundleManifest, t as INSTALL_TIMEOUT_MS, u as heldNoLonger, v as unknownSession, y as upload } from "./hosted-client-CgoxdU9j.mjs";
6
+ import { a as requireHostedMetro, i as requestHostedMetro, n as closeHostedMetro } from "./metro-request-BtF7ox53.mjs";
7
+ import { s as writeHostedNative } from "./ios-state-Ce_dystM.mjs";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { readFileSync } from "node:fs";
10
10
  import { join } from "node:path";
@@ -139,6 +139,10 @@ async function placeHostedNativeOnce(target, { root, slot, bundle, handoff, bund
139
139
  host = await connectHost(host.machine, void 0, true, signal);
140
140
  target.host = host;
141
141
  requireHostedAppMode(host, platform, mode);
142
+ if (mode === "development" && !host.connection.supports("hosted-metro-link")) throw Object.assign(/* @__PURE__ */ new Error(`${host.machine} runs a stim-server that cannot link Metro.`), {
143
+ code: "STIM_HOSTING_REFUSED",
144
+ remedy: `Update stim-server on ${host.machine}, then retry.`
145
+ });
142
146
  let session = (target.session ? await attach(host, target.session.id, void 0, platform) : null) ?? await reserveHostedNative(host, target, {
143
147
  platform,
144
148
  workspace: root,
@@ -174,10 +178,9 @@ async function placeHostedNativeOnce(target, { root, slot, bundle, handoff, bund
174
178
  };
175
179
  await reserved(placement);
176
180
  if (mode === "development") {
177
- const gateway = await metro(root, session.id, host.credential);
181
+ await metro(root, session.id, host.credential);
178
182
  await call(host, "device-host.metro.open", {
179
183
  session: session.id,
180
- ...gateway,
181
184
  ...platform === "android" || devClientScheme ? { clientMetroPort: metroPort } : {}
182
185
  }).catch((error) => {
183
186
  if (platform === "ios" && devClientScheme && error.code === "device-busy") throw Object.assign(error, { remedy: devClientPortRemedy(host.machine) });
@@ -1,11 +1,11 @@
1
- import { k as workspaceLogsDir$1, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-BjqdjnJR.mjs";
2
- import { V as deviceSlotKey, _ as loadConfig$1 } from "./config-Cn94Jc0g.mjs";
3
- import { o as formatLongDuration } from "./command-output-Dj-WT4BP.mjs";
4
- import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
5
- import { L as workspaceBuildInProgress, ft as teardownOwnedIosSim, j as collectOwnedDeviceActivity, ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
1
+ import { k as workspaceLogsDir$1, r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { V as deviceSlotKey, _ as loadConfig$1 } from "./config-AbUjIBOQ.mjs";
3
+ import { o as formatLongDuration } from "./command-output-DjCsmzLZ.mjs";
4
+ import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
5
+ import { B as workspaceBuildInProgress, P as collectOwnedDeviceActivity, ht as teardownOwnedIosSim, pt as teardownOwnedAvd } from "./workspaces-CvSYD_78.mjs";
6
6
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
7
- import { _ as workspaceDeviceLastUseAt } from "./activity-Cd-ysFes.mjs";
8
- import { d as listAllIosSims } from "./ios-E26qSpkb.mjs";
7
+ import { _ as workspaceDeviceLastUseAt } from "./activity-BR5oHSO5.mjs";
8
+ import { d as listAllIosSims } from "./ios-CoMCWfub.mjs";
9
9
  import { join } from "node:path";
10
10
  import { LOG_ROTATE_BYTES } from "@stim-cli/core";
11
11
  import { DEVICE_IDLE_SHUTDOWN_KEY, DEVICE_RECLAIM_REASON, readDeviceIdleShutdowns } from "@stim-cli/core/state";
@@ -1,9 +1,9 @@
1
- import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-Dj-WT4BP.mjs";
2
- import { xn as schemesFromInfoPlist, yn as pickDevClientScheme } from "./ccache-BWTze1Ls.mjs";
3
- import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-Be0UeVZU.mjs";
4
- import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DqaIBO5w.mjs";
5
- import { t as devClientScheme } from "./dev-client-BMca82xo.mjs";
6
- import { c as writeLastBuild, i as iosFacts, n as cacheDescription, o as lastBuildRecord } from "./ios-project-D8Jcy_br.mjs";
7
- import { d as replaceCollector, u as collectorEntry } from "./dependencies-BGokZ-Ng.mjs";
8
- import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-B5HlVMhQ.mjs";
1
+ import { h as shortUdid, i as formatDuration, l as phaseLine, m as shortHash } from "./command-output-DjCsmzLZ.mjs";
2
+ import { xn as schemesFromInfoPlist, yn as pickDevClientScheme } from "./ccache-DsDkdP72.mjs";
3
+ import { f as podAction, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, s as iosConfigurationSetting, t as appNameFromPath, u as isReleaseConfiguration, v as resolveRuntime } from "./support-BMpQIug0.mjs";
4
+ import { n as ensureWorkspaceStorageSafely } from "./native-runtime-DyH2gkXK.mjs";
5
+ import { t as devClientScheme } from "./dev-client-CROrxj1x.mjs";
6
+ import { c as writeLastBuild, i as iosFacts, n as cacheDescription, o as lastBuildRecord } from "./ios-project-DJYptOCh.mjs";
7
+ import { d as replaceCollector, u as collectorEntry } from "./dependencies-CHNqX6Pr.mjs";
8
+ import { n as registerIos, r as runIosOperation, t as iosCommand } from "./ios-UM_dManb.mjs";
9
9
  export { appNameFromPath, buildLogFile, cacheDescription, collectorEntry, iosCommand as default, devClientScheme, deviceLabel, ensureWorkspaceStorageSafely, formatDuration, iosConfigurationSetting, iosFacts, isReleaseConfiguration, lastBuildRecord, phaseLine, pickDevClientScheme, podAction, registerIos, replaceCollector, resolveConfiguration, resolveDeviceType, resolveRuntime, runIosOperation, schemesFromInfoPlist, shortHash, shortUdid, writeLastBuild };
@@ -1,10 +1,10 @@
1
1
  import { l as WorkspaceProcessCleanupError, n as isTimeoutError, o as cancellableSleep, t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { P as formatBytes, _ as loadConfig$1 } from "./config-Cn94Jc0g.mjs";
2
+ import { P as formatBytes, _ as loadConfig$1 } from "./config-AbUjIBOQ.mjs";
3
3
  import { n as stripAnsi, r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
4
4
  import { n as runOperationFileQuiet, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
5
- import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-CbWo21kb.mjs";
6
- import { Ct as forgetCreatedDeviceAsync, Et as recordCreatedDeviceAsync, dt as isStimOwnedSim } from "./android-DriNoAVy.mjs";
7
- import { n as signedTailFor } from "./apk-signed-tail-BHQHx3Rm.mjs";
5
+ import { i as stimDesktopInstalledAsync, n as settingDefault, t as STIM_DESKTOP_OPEN_OPTIONS } from "./stim-desktop-CYXLFpFS.mjs";
6
+ import { Ct as forgetCreatedDeviceAsync, Et as recordCreatedDeviceAsync, dt as isStimOwnedSim } from "./android-BHKgeOuq.mjs";
7
+ import { n as signedTailFor } from "./apk-signed-tail-B-wKoF_8.mjs";
8
8
  import { createHash } from "node:crypto";
9
9
  import { closeSync, existsSync, lstatSync, mkdtempSync, openSync, readSync, readdirSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { tmpdir, totalmem } from "node:os";
@@ -1,40 +1,40 @@
1
- import { a as recordWorkspaceUseAsync, k as workspaceLogsDir$1 } from "./workspace-state-BjqdjnJR.mjs";
2
- import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-Cn94Jc0g.mjs";
3
- import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
4
- import { B as publicUrlSetting, C as iosSigningIdentitySettingError, F as metroWarmupUrlSetting, N as metroPortSetting, S as iosSigningIdentitySetting, T as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, ot as tunnelModeSetting, v as iosLanHostSetting, w as iosSigningIdentitySha1Setting, y as iosLanHostSettingError, z as projectSettingsContextAsync } from "./settings-BDVI8Ivc.mjs";
5
- import { t as NO_PROJECT_REFUSAL } from "./project-DYj-HVx6.mjs";
6
- import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-DriNoAVy.mjs";
7
- import { En as runProcessOperation, Et as binOnPath, Qt as DEFAULT_METRO_PORT, qn as ownedSessionName, wn as exitAfterFlush } from "./ccache-BWTze1Ls.mjs";
8
- import { J as runFailureRecord, X as tapBuildLog, Y as startBuildProgress, Z as thrownRunFailureRecord, et as createRunRecorder, ot as statsProjectKey$1, z as NO_BUILD_PROGRESS } from "./workspaces-DFbj07jp.mjs";
9
- import { Q as cancelledFailure, at as runCancellation, k as COMPILATION_CACHE_NOT_RUN, ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CbCG6C5Z.mjs";
10
- import { i as createIosSimSnapshot } from "./ios-E26qSpkb.mjs";
1
+ import { a as recordWorkspaceUseAsync, k as workspaceLogsDir$1 } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { B as deviceSlotFileKey, W as parseDeviceSlotOption, q as validateDeviceSlot } from "./config-AbUjIBOQ.mjs";
3
+ import { _ as stepTimer, g as stepClock, i as formatDuration, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
4
+ import { B as publicUrlSetting, C as iosSigningIdentitySettingError, F as metroWarmupUrlSetting, N as metroPortSetting, S as iosSigningIdentitySetting, T as iosSigningIdentitySha1SettingError, a as SETTING_SHAPE_REMEDY, g as deviceReclaimIdleMinutesSetting, ot as tunnelModeSetting, v as iosLanHostSetting, w as iosSigningIdentitySha1Setting, y as iosLanHostSettingError, z as projectSettingsContextAsync } from "./settings-D776ygML.mjs";
5
+ import { t as NO_PROJECT_REFUSAL } from "./project-D1n0K4yg.mjs";
6
+ import { ft as POOL_SETTING_REMEDY, vt as parkedMaxSetting } from "./android-BHKgeOuq.mjs";
7
+ import { En as runProcessOperation, Et as binOnPath, Qt as DEFAULT_METRO_PORT, qn as ownedSessionName, wn as exitAfterFlush } from "./ccache-DsDkdP72.mjs";
8
+ import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, Z as runFailureRecord, et as thrownRunFailureRecord, lt as statsProjectKey$1, rt as createRunRecorder } from "./workspaces-CvSYD_78.mjs";
9
+ import { Q as cancelledFailure, at as runCancellation, k as COMPILATION_CACHE_NOT_RUN, ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CLGnEUgT.mjs";
10
+ import { i as createIosSimSnapshot } from "./ios-CoMCWfub.mjs";
11
11
  import { d as optimizationBuildProfile, l as artifactCachePolicy } from "./errors-DHm_U5gv.mjs";
12
- import { S as setRemoteLogSink, d as simulatorRuntime } from "./client-xsdxrhWA.mjs";
13
- import { s as parseBuildMachineOption } from "./selection-Bs8phwhN.mjs";
14
- import { r as hostedMetroSettings } from "./metro-gateway-BnHdqMO_.mjs";
15
- import { i as writeDevicePlacementAsync } from "./ios-state-BZ03NFgF.mjs";
16
- import { t as devClientPortBusy } from "./hosted-native-CdgaiuyP.mjs";
17
- import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-BCsdAGj_.mjs";
18
- import { f as waitFlagConflict, o as leaseExpiryText } from "./device-lease-run-DwsGfjUN.mjs";
19
- import { _ as resolveIosWait, a as deviceModelRefusal, b as resolveSimulatorAppFlag, c as iosProjectPathError, d as ownedSimFailure, g as resolveIosBuildSetup, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, r as createIosDeviceWaitRun, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-Be0UeVZU.mjs";
20
- import { r as isEasBuildFailure } from "./eas-build-CjNSWmjo.mjs";
21
- import { i as launchOutcomeRecord, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-DqaIBO5w.mjs";
22
- import "./dev-client-BMca82xo.mjs";
23
- import { t as didSetUpDevice } from "./device-tM41-TUq.mjs";
12
+ import { S as setRemoteLogSink, d as simulatorRuntime } from "./client-BTUH8TF1.mjs";
13
+ import { s as parseBuildMachineOption } from "./selection-D1ZDzHFX.mjs";
14
+ import { r as hostedMetroSettings } from "./metro-request-BtF7ox53.mjs";
15
+ import { i as writeDevicePlacementAsync } from "./ios-state-Ce_dystM.mjs";
16
+ import { t as devClientPortBusy } from "./hosted-native-DvZENAL-.mjs";
17
+ import { i as restoreLightenedDependencies, n as printLightenedFailure } from "./lightened-vSxkstg6.mjs";
18
+ import { f as waitFlagConflict, o as leaseExpiryText } from "./device-lease-run-qRq_2W2V.mjs";
19
+ import { _ as resolveIosWait, a as deviceModelRefusal, b as resolveSimulatorAppFlag, c as iosProjectPathError, d as ownedSimFailure, g as resolveIosBuildSetup, h as resolveDeviceType, i as deviceLabel, m as resolveConfiguration, n as buildLogFile, r as createIosDeviceWaitRun, u as isReleaseConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-BMpQIug0.mjs";
20
+ import { r as isEasBuildFailure } from "./eas-build-D-9HmGZS.mjs";
21
+ import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-L1-pota_.mjs";
22
+ import { i as launchOutcomeRecord, r as isPhysicalDeviceRequest, t as ensureDevServer } from "./native-runtime-DyH2gkXK.mjs";
23
+ import "./dev-client-CROrxj1x.mjs";
24
+ import { t as didSetUpDevice } from "./device-Bmm5qjM-.mjs";
24
25
  import { t as unsupportedPlan } from "./project-plan-BPwbLwQu.mjs";
25
- import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-CBqYbzYM.mjs";
26
- import { a as iosLedgerDevice, c as writeLastBuild, o as lastBuildRecord, s as reportIosResult } from "./ios-project-D8Jcy_br.mjs";
27
- import { t as acquireIosArtifact } from "./artifact-faemIZv5.mjs";
28
- import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-y6n99WMW.mjs";
29
- import { a as iosPoolCandidates, c as isWirelessIosDevice, f as resolveIosPhysicalDevice, o as iosPoolNoCandidatesRefusal, r as iosDeviceBounds } from "./ios-device-C_QkIf1Z.mjs";
30
- import { i as lanOriginUrlFor, l as verifyIosMetroRun, n as chooseLanAddress, o as finishIosRun, t as DEFAULT_DEPS } from "./dependencies-BGokZ-Ng.mjs";
26
+ import { a as refusePlan, i as printPlan, n as planFlagRefusal } from "./build-plan-CWyjMPKo.mjs";
27
+ import { a as iosLedgerDevice, c as writeLastBuild, o as lastBuildRecord, s as reportIosResult } from "./ios-project-DJYptOCh.mjs";
28
+ import { t as acquireIosArtifact } from "./artifact-Dm9ScLrh.mjs";
29
+ import { a as hostedIosSelectors, i as hostedIosMetroNote, n as connectIosTarget, o as iosPlacementBudget, r as deviceRemoteConflict, s as selectIosPlacement, t as connectIosBackend } from "./remote-C8xyslUa.mjs";
30
+ import { i as lanOriginUrlFor, l as verifyIosMetroRun, n as chooseLanAddress, o as finishIosRun, t as DEFAULT_DEPS } from "./dependencies-CHNqX6Pr.mjs";
31
31
  import { join } from "node:path";
32
32
  import { workspaceId } from "@stim-cli/core";
33
33
  import { hostedIosStatus, parseMachine } from "@stim-cli/core/state";
34
34
  import chalk from "chalk";
35
35
  import { InvalidArgumentError } from "commander";
36
36
  //#region src/commands/ios/hosted.ts
37
- async function finishHostedIosRun({ target, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, phase, enterPhase, enterActivity, selectors, projectBundleId, logWriter, ...report }) {
37
+ async function finishHostedIosRun({ target, operation, d, artifact, root, slot, release, appMode, isExpo, metroCheck, metroPort, logsDir, fail, note, phase, enterPhase, enterActivity, selectors, projectBundleId, logWriter, ...report }) {
38
38
  const bundleId = artifact.bundleId ?? (await d.readBundleId(artifact.path) || await projectBundleId());
39
39
  if (!bundleId) return fail({
40
40
  code: "STIM_INSTALL_FAILED",
@@ -102,6 +102,7 @@ async function finishHostedIosRun({ target, d, artifact, root, slot, release, ap
102
102
  let verification;
103
103
  try {
104
104
  verification = await verifyIosMetroRun({
105
+ operation,
105
106
  root,
106
107
  slot,
107
108
  appPath: artifact.path,
@@ -1147,6 +1148,7 @@ async function runIos(context, projectRoot, opts = {}, overrides = {}, progress
1147
1148
  };
1148
1149
  compilationCache = artifact.cache.compilation;
1149
1150
  if (hostedTarget) return await finishHostedIosRun({
1151
+ operation: context,
1150
1152
  output: context.output,
1151
1153
  target: hostedTarget,
1152
1154
  projectBundleId: integration.bundleId,
@@ -1,5 +1,5 @@
1
1
  import { t as getExecutor } from "./exec-aULwtNly.mjs";
2
- import { $t as INSTALL_ERROR, rn as appProcessFromPid } from "./ccache-BWTze1Ls.mjs";
2
+ import { $t as INSTALL_ERROR, rn as appProcessFromPid } from "./ccache-DsDkdP72.mjs";
3
3
  import { n as TOOL_ERROR_PREFIX } from "./ios-device-CiBA-er9.mjs";
4
4
  import { mkdtempSync, readFileSync, rmSync } from "node:fs";
5
5
  import { tmpdir } from "node:os";
@@ -1,10 +1,10 @@
1
- import { w as workspaceAgentDeviceDir } from "./workspace-state-BjqdjnJR.mjs";
2
- import { i as formatDuration, l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
3
- import { a as workspaceLinkLine } from "./stim-desktop-CbWo21kb.mjs";
4
- import { Mn as isEasAuthFailureText, On as UPLOAD_TIMEOUT_MS, jn as easAuthNote, kn as cacheLevel } from "./ccache-BWTze1Ls.mjs";
5
- import { q as recordFinishedBuild } from "./workspaces-DFbj07jp.mjs";
6
- import { P as compilationCacheActivityLine, k as COMPILATION_CACHE_NOT_RUN } from "./toolchain-CbCG6C5Z.mjs";
7
- import { i as deviceLabel } from "./support-Be0UeVZU.mjs";
1
+ import { w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { i as formatDuration, l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
3
+ import { a as workspaceLinkLine } from "./stim-desktop-CYXLFpFS.mjs";
4
+ import { Mn as isEasAuthFailureText, On as UPLOAD_TIMEOUT_MS, jn as easAuthNote, kn as cacheLevel } from "./ccache-DsDkdP72.mjs";
5
+ import { X as recordFinishedBuild } from "./workspaces-CvSYD_78.mjs";
6
+ import { P as compilationCacheActivityLine, k as COMPILATION_CACHE_NOT_RUN } from "./toolchain-CLGnEUgT.mjs";
7
+ import { i as deviceLabel } from "./support-BMpQIug0.mjs";
8
8
  import { buildDiagnostics } from "@stim-cli/core/state";
9
9
  import chalk from "chalk";
10
10
  //#region src/commands/ios/result.ts
@@ -1,4 +1,4 @@
1
- import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
1
+ import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
2
2
  import { HOSTED_METRO_REQUESTS_KEY, hostedMetroRequests, hostedNativeRecords, isJsonObject, parseHostedNativePlacement, unreadableHostedNative } from "@stim-cli/core/state";
3
3
  //#region src/device-host/ios-state.ts
4
4
  function readHostedNative(root, platform, slot) {
@@ -1,10 +1,10 @@
1
1
  import { _ as spawnDeclared, b as operationState, c as throwIfCancelled, t as getExecutor } from "./exec-aULwtNly.mjs";
2
2
  import { r as waitForChild, t as createLineReader } from "./process-output-Fpl8PYi8.mjs";
3
3
  import { a as killOnAbort, t as runOperationFile } from "./operation-exec-Dp4FuIGR.mjs";
4
- import { $t as makeTemporaryDirectory, en as removeTemporaryEntry } from "./settings-BDVI8Ivc.mjs";
5
- import { Bn as bundleInvocation } from "./ccache-BWTze1Ls.mjs";
6
- import { G as tailLines, U as startBuildHeartbeat, j as HEARTBEAT_INTERVAL_MS } from "./toolchain-CbCG6C5Z.mjs";
7
- import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-ABQs2XFA.mjs";
4
+ import { an as makeTemporaryDirectory, on as removeTemporaryEntry } from "./settings-D776ygML.mjs";
5
+ import { Bn as bundleInvocation } from "./ccache-DsDkdP72.mjs";
6
+ import { G as tailLines, U as startBuildHeartbeat, j as HEARTBEAT_INTERVAL_MS } from "./toolchain-CLGnEUgT.mjs";
7
+ import { s as expoTelemetryEnv, t as cleanLine } from "./server-expo-bB1VV2k-.mjs";
8
8
  import { randomUUID } from "node:crypto";
9
9
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
10
10
  import { basename, join } from "node:path";
@@ -1,24 +1,24 @@
1
1
  import { x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { k as workspaceLogsDir } from "./workspace-state-BjqdjnJR.mjs";
3
- import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-Cn94Jc0g.mjs";
4
- import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-Dj-WT4BP.mjs";
5
- import { L as workspaceDevServerMode } from "./project-DYj-HVx6.mjs";
6
- import { o as workspaceLinks } from "./stim-desktop-CbWo21kb.mjs";
7
- import { i as androidDataFreeBytes, ot as trimAndroidCaches, tt as resetAdoptedAvd, u as androidToolCwd } from "./android-DriNoAVy.mjs";
8
- import { c as pidExists, f as signalProcessTree } from "./metro-CvyD-xwe.mjs";
9
- import { Bt as RELEASE_VERIFY_WAIT_MS, Gt as unattributedLaunchLines, It as LAUNCH_BUNDLING, Kt as unverifiedLaunchLines, Lt as LAUNCH_FATAL, Rt as LAUNCH_UNVERIFIED, Vt as VERIFY_TIMEOUT_MS, Zt as ADB_INSTALL_TIMEOUT_MS, gn as restartedAppNote, nn as androidDevClientUrl, tn as androidAppProcess, un as installConflictKind } from "./ccache-BWTze1Ls.mjs";
10
- import { ut as teardownOwnedAvd } from "./workspaces-DFbj07jp.mjs";
11
- import { x as providerUploadOutcome } from "./build-cache-gBJ-WKzA.mjs";
12
- import { t as recordPhoneReverse } from "./phone-reverses-C9yAaKEv.mjs";
13
- import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-Bx-0cku-.mjs";
14
- import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-0l7RqSpr.mjs";
2
+ import { k as workspaceLogsDir } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { B as deviceSlotFileKey, C as saveConfig, E as upsertProject, H as deviceSlotPlatforms, O as withConfigLockAsync, P as formatBytes, V as deviceSlotKey, _ as loadConfig, w as setDevice } from "./config-AbUjIBOQ.mjs";
4
+ import { _ as stepTimer, c as launchErrorReport, i as formatDuration, l as phaseLine, n as appReadinessMessage, v as launchErrorPreview } from "./command-output-DjCsmzLZ.mjs";
5
+ import { L as workspaceDevServerMode } from "./project-D1n0K4yg.mjs";
6
+ import { o as workspaceLinks } from "./stim-desktop-CYXLFpFS.mjs";
7
+ import { i as androidDataFreeBytes, ot as trimAndroidCaches, tt as resetAdoptedAvd, u as androidToolCwd } from "./android-BHKgeOuq.mjs";
8
+ import { c as pidExists, f as signalProcessTree } from "./metro-BMQHczcf.mjs";
9
+ import { Bt as RELEASE_VERIFY_WAIT_MS, Gt as unattributedLaunchLines, It as LAUNCH_BUNDLING, Kt as unverifiedLaunchLines, Lt as LAUNCH_FATAL, Rt as LAUNCH_UNVERIFIED, Vt as VERIFY_TIMEOUT_MS, Zt as ADB_INSTALL_TIMEOUT_MS, gn as restartedAppNote, nn as androidDevClientUrl, tn as androidAppProcess, un as installConflictKind } from "./ccache-DsDkdP72.mjs";
10
+ import { pt as teardownOwnedAvd } from "./workspaces-CvSYD_78.mjs";
11
+ import { x as providerUploadOutcome } from "./build-cache-BGwTsIEa.mjs";
12
+ import { t as recordPhoneReverse } from "./phone-reverses-DZRad8HT.mjs";
13
+ import { n as verifyCollectorOwnership, r as readCollectors } from "./ownership-Dtz9G5Gl.mjs";
14
+ import { n as nativeRunCommand, r as siblingPlatformSlots, t as launchSlotScope } from "./slot-launch-Dbgfh8gc.mjs";
15
15
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
16
- import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-DwsGfjUN.mjs";
17
- import { a as captureNativeCrashes, r as androidCrashClockOffset, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-snej9k4j.mjs";
18
- import { f as settleFingerprintCheck } from "./prebuild-BDpToDgR.mjs";
19
- import { i as launchOutcomeRecord } from "./native-runtime-DqaIBO5w.mjs";
20
- import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-CNg_YsOk.mjs";
21
- import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-CTqBw2Te.mjs";
16
+ import { c as lostRefusal, s as lostLine, t as DEBUG_VERIFY_STEP_MS } from "./device-lease-run-qRq_2W2V.mjs";
17
+ import { a as captureNativeCrashes, r as androidCrashClockOffset, s as printNativeCrashReport, t as errorDiagnostics } from "./error-diagnostics-CV_1RoEH.mjs";
18
+ import { f as settleFingerprintCheck } from "./prebuild-Bqp0LFGN.mjs";
19
+ import { i as launchOutcomeRecord } from "./native-runtime-DyH2gkXK.mjs";
20
+ import { a as PLATFORM, b as noDeviceDiagnostic, h as displayPath, n as LAUNCH_FAILED, r as NO_DEVICE, t as INSTALL_FAILED } from "./support-PFyTkrnr.mjs";
21
+ import { a as persistLastBuild, n as finishAndroidUpload, s as reportAndroidResult } from "./result-9fqcJ90W.mjs";
22
22
  import { mkdirSync, openSync, statSync } from "node:fs";
23
23
  import { basename, join } from "node:path";
24
24
  import { ambientEnv } from "@stim-cli/core";
@@ -1,9 +1,9 @@
1
1
  import { l as WorkspaceProcessCleanupError } from "./exec-aULwtNly.mjs";
2
- import { c as withWorkspaceStateLock } from "./workspace-state-BjqdjnJR.mjs";
3
- import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
4
- import { Nt as podsOutOfSync, Ot as listCarryableIgnoredEntries, Pt as readWorktreeExclude, Q as resolveSettings, Wt as warmWorktreePaths, _t as depsOutOfSync } from "./settings-BDVI8Ivc.mjs";
2
+ import { c as withWorkspaceStateLock } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
4
+ import { Jt as warmWorktreePaths, Lt as podsOutOfSync, Q as resolveSettings, Rt as readWorktreeExclude, kt as listCarryableIgnoredEntries, vt as depsOutOfSync } from "./settings-D776ygML.mjs";
5
5
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
6
- import { h as warmWorktreeTarget } from "./worktree-COAJ3-OD.mjs";
6
+ import { m as warmWorktreeTarget } from "./worktree-CaQBf6kh.mjs";
7
7
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
8
8
  import { basename, dirname, join, relative } from "node:path";
9
9
  import { isJsonObject, readJsonObject, workspaceLightenedFile, workspaceMetadataFile } from "@stim-cli/core/state";
@@ -1,11 +1,11 @@
1
- import { k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-BjqdjnJR.mjs";
2
- import { W as parseDeviceSlotOption, _ as loadConfig$1, g as isPathPrefix$1 } from "./config-Cn94Jc0g.mjs";
3
- import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-Dj-WT4BP.mjs";
4
- import { n as findCommandWorkspace } from "./project-DYj-HVx6.mjs";
5
- import { n as SOURCES$1, t as LEVELS$1 } from "./ndjson-Dy2W4vRa.mjs";
6
- import { i as followAgentActions, n as openWorkspaceLogs } from "./logs-CC_-ZzEE.mjs";
7
- import { t as errorDiagnostics } from "./error-diagnostics-snej9k4j.mjs";
8
- import { n as followHostedLogs } from "./hosted-logs-sync-Dg3qrZmV.mjs";
1
+ import { i as recordWorkspaceUse, k as workspaceLogsDir$1, r as readWorkspaceState$1 } from "./workspace-state-DGwkPXwq.mjs";
2
+ import { W as parseDeviceSlotOption, _ as loadConfig$1, g as isPathPrefix$1 } from "./config-AbUjIBOQ.mjs";
3
+ import { f as refuseNoProject, v as launchErrorPreview } from "./command-output-DjCsmzLZ.mjs";
4
+ import { n as findCommandWorkspace } from "./project-D1n0K4yg.mjs";
5
+ import { n as SOURCES$1, t as LEVELS$1 } from "./ndjson-CrjIsGzw.mjs";
6
+ import { i as followAgentActions, n as openWorkspaceLogs } from "./logs-CilPftm3.mjs";
7
+ import { t as errorDiagnostics } from "./error-diagnostics-CV_1RoEH.mjs";
8
+ import { n as followHostedLogs } from "./hosted-logs-sync-Bf5s02fi.mjs";
9
9
  import { t as watchStdoutReader } from "./stdout-reader-C8yjre1x.mjs";
10
10
  import { realpathSync } from "node:fs";
11
11
  import { relative, sep } from "node:path";
@@ -116,6 +116,7 @@ function logsCommand(program) {
116
116
  const dir = workspaceLogsDir$1(root);
117
117
  const { sources, minLevel, tail } = validateOptions(opts);
118
118
  requireLogsWorkspace(root, dir);
119
+ recordWorkspaceUse(root);
119
120
  const query = {
120
121
  slot: opts.slot,
121
122
  dir,
@@ -1,9 +1,9 @@
1
1
  import { S as process_identity_exports } from "./exec-aULwtNly.mjs";
2
- import { k as workspaceLogsDir$1 } from "./workspace-state-BjqdjnJR.mjs";
3
- import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-Cn94Jc0g.mjs";
4
- import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-Cd-ysFes.mjs";
5
- import { o as captureWorkspaceCrashes } from "./error-diagnostics-snej9k4j.mjs";
6
- import { n as followHostedLogs, r as syncHostedLogs } from "./hosted-logs-sync-Dg3qrZmV.mjs";
2
+ import { k as workspaceLogsDir$1 } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { G as projectDeviceSlots, _ as loadConfig$1 } from "./config-AbUjIBOQ.mjs";
4
+ import { f as readAgentDeviceRecordsAsync, n as agentDeviceLiveness, o as envDir } from "./activity-BR5oHSO5.mjs";
5
+ import { o as captureWorkspaceCrashes } from "./error-diagnostics-CV_1RoEH.mjs";
6
+ import { n as followHostedLogs, r as syncHostedLogs } from "./hosted-logs-sync-Bf5s02fi.mjs";
7
7
  import { readdirSync, statSync, watch } from "node:fs";
8
8
  import { homedir } from "node:os";
9
9
  import { dirname, join, relative, resolve, sep } from "node:path";
@@ -1,2 +1,2 @@
1
- import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-DlCBhMw5.mjs";
1
+ import { n as runMacos, r as waitForLaunchServices, t as macosCommand } from "./macos-CxUi9xcE.mjs";
2
2
  export { macosCommand as default, runMacos, waitForLaunchServices };
@@ -1,24 +1,24 @@
1
1
  import { _ as spawnDeclared, c as throwIfCancelled, t as getExecutor, u as withWorkspaceProcessLock, x as withDrainingCancellation } from "./exec-aULwtNly.mjs";
2
- import { E as workspaceDir, a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, k as workspaceLogsDir$1, v as ensureWorkspaceStorageAsync, w as workspaceAgentDeviceDir } from "./workspace-state-BjqdjnJR.mjs";
3
- import { E as upsertProject, O as withConfigLockAsync$1, u as getConcurrencyLimits } from "./config-Cn94Jc0g.mjs";
4
- import { l as phaseLine } from "./command-output-Dj-WT4BP.mjs";
5
- import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, it as settingValueAt, rt as settingShapeErrors } from "./settings-BDVI8Ivc.mjs";
6
- import { f as projectRegistry, i as findProjectRoot$1, s as ownedDeviceLabel } from "./project-DYj-HVx6.mjs";
7
- import { i as macosProcess, n as macosDir, o as requiredMacosRecord, r as macosLogFile } from "./state-CZxLyetD.mjs";
8
- import { i as createNdjsonWriter } from "./ndjson-Dy2W4vRa.mjs";
9
- import { En as runProcessOperation, Tn as processContext } from "./ccache-BWTze1Ls.mjs";
10
- import { K as recordBuildPhase, Q as errorRemedy, X as tapBuildLog, Y as startBuildProgress, q as recordFinishedBuild, xt as releaseBuildSlot, yt as acquireBuildSlot, z as NO_BUILD_PROGRESS } from "./workspaces-DFbj07jp.mjs";
11
- import { ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CbCG6C5Z.mjs";
12
- import { O as sanitizeDeviceLabel } from "./ios-E26qSpkb.mjs";
13
- import { S as setRemoteLogSink, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-xsdxrhWA.mjs";
14
- import { d as resolveBuildPlacement, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, s as parseBuildMachineOption, t as OffloadRefusal } from "./selection-Bs8phwhN.mjs";
15
- import { l as connectHost } from "./hosted-client-D7Pk_Oo1.mjs";
16
- import { t as placeHostedMacos } from "./hosted-macos-B9w4H8hc.mjs";
17
- import { r as stopMacosAppHeld, t as stopBundleInstances } from "./stop-CH79S3IZ.mjs";
2
+ import { E as workspaceDir, a as recordWorkspaceUseAsync, f as writeWorkspaceStateAsync, k as workspaceLogsDir$1, v as ensureWorkspaceStorageAsync, w as workspaceAgentDeviceDir } from "./workspace-state-DGwkPXwq.mjs";
3
+ import { E as upsertProject, O as withConfigLockAsync$1, u as getConcurrencyLimits } from "./config-AbUjIBOQ.mjs";
4
+ import { l as phaseLine } from "./command-output-DjCsmzLZ.mjs";
5
+ import { Z as resolveProjectSettingsAsync, a as SETTING_SHAPE_REMEDY, it as settingValueAt, rt as settingShapeErrors } from "./settings-D776ygML.mjs";
6
+ import { f as projectRegistry, i as findProjectRoot$1, s as ownedDeviceLabel } from "./project-D1n0K4yg.mjs";
7
+ import { i as macosProcess, n as macosDir, o as requiredMacosRecord, r as macosLogFile } from "./state-C2AUjjhg.mjs";
8
+ import { i as createNdjsonWriter } from "./ndjson-CrjIsGzw.mjs";
9
+ import { En as runProcessOperation, Tn as processContext } from "./ccache-DsDkdP72.mjs";
10
+ import { $ as tapBuildLog, H as NO_BUILD_PROGRESS, Q as startBuildProgress, St as acquireBuildSlot, Tt as releaseBuildSlot, X as recordFinishedBuild, Y as recordBuildPhase, tt as errorRemedy } from "./workspaces-CvSYD_78.mjs";
11
+ import { ot as runCancellationSignal, st as withNativeBuildRun } from "./toolchain-CLGnEUgT.mjs";
12
+ import { O as sanitizeDeviceLabel } from "./ios-CoMCWfub.mjs";
13
+ import { S as setRemoteLogSink, c as offloadPlacement, i as closeOffload, l as placementLoad, n as buildPlacementCandidates, o as offloadBuild, r as chooseBuildMachine, u as remotePhaseText } from "./client-BTUH8TF1.mjs";
14
+ import { d as resolveBuildPlacement, l as requireLocalBuild, n as automaticBuild, o as namedBuildMachine, s as parseBuildMachineOption, t as OffloadRefusal } from "./selection-D1ZDzHFX.mjs";
15
+ import { l as connectHost } from "./hosted-client-CgoxdU9j.mjs";
16
+ import { t as placeHostedMacos } from "./hosted-macos-Doh85YUM.mjs";
17
+ import { i as stopMacosAppHeld, t as stopBundleInstances } from "./stop-uRQ-zYcl.mjs";
18
18
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
19
- import { t as buildPlacementRecord } from "./placement-log-BXUbiZM6.mjs";
20
- import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-z-H5pJza.mjs";
21
- import { t as reidentifyBundle } from "./stage-F4cAfJGi.mjs";
19
+ import { t as buildPlacementRecord } from "./placement-log-CoN6xrjY.mjs";
20
+ import { n as devicePlacementLine, t as automaticDevicePlacement } from "./auto-placement-C8sJsyMN.mjs";
21
+ import { t as reidentifyBundle } from "./stage-BuHuRj1y.mjs";
22
22
  import { t as validateMacosArtifactPlatform } from "./artifact-platform-BO2Uvk_A.mjs";
23
23
  import { t as waitForMacosRegistration } from "./registration-BwCe64PH.mjs";
24
24
  import { createHash, randomUUID } from "node:crypto";
@@ -344,7 +344,7 @@ async function planMacos(context, root, buildMachineFlag) {
344
344
  if (selected.failure) throw Object.assign(new Error(selected.failure.message), selected.failure);
345
345
  const macos = settings.macos;
346
346
  if (!macos?.product || !macos.infoPlist) throw Object.assign(/* @__PURE__ */ new Error("Set macos.product and macos.infoPlist explicitly in .stim.json. See stim guide macos."), { code: "STIM_BAD_ARG" });
347
- const { swiftpmMacosProject } = await import("./swiftpm-macos-Ch4YjY_A.mjs");
347
+ const { swiftpmMacosProject } = await import("./swiftpm-macos-BSj9iZlI.mjs");
348
348
  const recipe = await swiftpmMacosProject(root).prepare(context, settings);
349
349
  let identity = null;
350
350
  let cacheHit = false;