peachsim 0.1.663 → 0.1.664

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 (73) hide show
  1. package/cli/commands/control.ts +9 -17
  2. package/cli/commands/inspect/core.ts +45 -32
  3. package/cli/commands/inspect/settling.ts +31 -21
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/agent-identity.cjs +1 -1
  7. package/dist-lib/agent-sessions.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +2 -6
  15. package/dist-lib/bridge-contract-input.mjs +2 -6
  16. package/dist-lib/bridge-contract.cjs +6 -1
  17. package/dist-lib/bridge-contract.mjs +5 -1
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +1 -1
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +17 -24
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity.cjs +1 -1
  49. package/dist-lib/native-app-identity.mjs +1 -1
  50. package/dist-lib/plist.cjs +1 -1
  51. package/dist-lib/plist.mjs +1 -1
  52. package/dist-lib/profiles.cjs +1 -1
  53. package/dist-lib/public-brand.cjs +1 -1
  54. package/dist-lib/react-native-host-modules.cjs +1 -1
  55. package/dist-lib/react-native-host-modules.mjs +1 -1
  56. package/dist-lib/render-mode.cjs +1 -1
  57. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  58. package/dist-lib/sdk.cjs +52 -39
  59. package/dist-lib/sdk.mjs +50 -39
  60. package/dist-lib/skills.cjs +38 -34
  61. package/dist-lib/swift-compile.cjs +1 -1
  62. package/dist-lib/swift-compile.mjs +1 -1
  63. package/dist-lib/swift-package.cjs +1 -1
  64. package/dist-lib/swift-package.mjs +1 -1
  65. package/dist-lib/swift-submit.cjs +1 -1
  66. package/dist-lib/swift-submit.mjs +1 -1
  67. package/dist-lib/swift.cjs +1 -1
  68. package/dist-lib/vite-swift.cjs +1 -1
  69. package/dist-lib/vite.cjs +1 -1
  70. package/kotlin/fixtures/kotlin-app-variants/Widgets.kt +56 -0
  71. package/package.json +1 -1
  72. package/src/bridge-contract-input.ts +1 -5
  73. package/src/bridge-contract.ts +16 -4
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plistModule from "@expo/plist";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -62,6 +62,7 @@ __export(sdk_exports, {
62
62
  inspectLogs: () => inspectLogs,
63
63
  inspectMemory: () => inspectMemory,
64
64
  inspectNodeCount: () => inspectNodeCount,
65
+ inspectReadySnapshot: () => inspectReadySnapshot,
65
66
  inspectRequests: () => inspectRequests,
66
67
  inspectScreens: () => inspectScreens,
67
68
  inspectScrollStateAt: () => inspectScrollStateAt,
@@ -84,6 +85,7 @@ __export(sdk_exports, {
84
85
  rankInteractive: () => rankInteractive,
85
86
  readyProbeHasContent: () => readyProbeHasContent,
86
87
  readyProbeHasTargetContent: () => readyProbeHasTargetContent,
88
+ readyProbeIsReady: () => readyProbeIsReady,
87
89
  resolveFindMode: () => resolveFindMode,
88
90
  resolveMaxMsFlag: () => resolveMaxMsFlag,
89
91
  scoreInteractive: () => scoreInteractive,
@@ -114,6 +116,9 @@ function readyProbeHasContent(probe) {
114
116
  function readyProbeHasTargetContent(probe) {
115
117
  return probe.liveFrameActive || probe.targets > 0;
116
118
  }
119
+ function readyProbeIsReady(probe) {
120
+ return (probe.flag === true ? readyProbeHasContent(probe) : readyProbeHasTargetContent(probe)) && probe.externalReady !== false && !probe.externalError && !probe.loadingText;
121
+ }
117
122
 
118
123
  // cli/commands/inspect/core.ts
119
124
  function resolveMaxMsFlag(args, fallbackMs) {
@@ -854,39 +859,38 @@ function waitReadyReason(status) {
854
859
  return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
855
860
  }
856
861
  async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
862
+ const result = await sendReadyWait(bridge, timeoutMs, timeoutMs + 1e3, options.simId);
863
+ const status = waitReadyStatus(result, result.matched && !result.probe?.externalError);
864
+ if (!status.ready && options.onProgress) options.onProgress(status);
865
+ return status;
866
+ }
867
+ async function inspectReadySnapshot(bridge, sendTimeoutMs, simId) {
868
+ const result = await sendReadyWait(bridge, 1, sendTimeoutMs, simId);
869
+ return waitReadyStatus(result, result.probe ? readyProbeIsReady(result.probe) : false);
870
+ }
871
+ async function sendReadyWait(bridge, timeoutMs, sendTimeoutMs, simId) {
857
872
  const start = Date.now();
858
- let result;
859
873
  try {
860
- result = await bridge.send(
874
+ return await bridge.send(
861
875
  {
862
876
  type: "waitFor",
863
- ...options.simId ? { simId: options.simId } : {},
864
- waitForOptions: {
865
- condition: {
866
- type: "ready",
867
- ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
868
- },
869
- timeoutMs
870
- }
877
+ ...simId ? { simId } : {},
878
+ waitForOptions: { condition: { type: "ready" }, timeoutMs }
871
879
  },
872
- { timeoutMs: timeoutMs + 1e3 }
880
+ { timeoutMs: sendTimeoutMs }
873
881
  );
874
882
  } catch (error) {
875
883
  const bridgeError = error instanceof Error ? error.message : String(error);
876
884
  if (bridgeError.startsWith("multiple sims are connected:") || bridgeError.startsWith("saved sim ")) {
877
885
  throw error;
878
886
  }
879
- result = {
880
- matched: false,
881
- elapsedMs: Date.now() - start,
882
- polls: 0,
883
- error: bridgeError
884
- };
887
+ return { matched: false, elapsedMs: Date.now() - start, polls: 0, error: bridgeError };
885
888
  }
889
+ }
890
+ function waitReadyStatus(result, ready) {
886
891
  const probe = result.probe;
887
- const externalError = probe?.externalError ?? "";
888
- const status = {
889
- ready: result.matched && !externalError,
892
+ return {
893
+ ready,
890
894
  elapsedMs: result.elapsedMs,
891
895
  nodes: probe?.nodes ?? 0,
892
896
  targets: probe?.targets ?? 0,
@@ -897,13 +901,11 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
897
901
  loadingText: probe?.loadingText ?? "",
898
902
  externalReady: probe?.externalReady ?? null,
899
903
  externalStatus: probe?.externalStatus ?? "",
900
- externalError,
904
+ externalError: probe?.externalError ?? "",
901
905
  suppressedEntryError: probe?.suppressedEntryError ?? "",
902
906
  errors: probe?.errors ?? 0,
903
907
  bridgeError: result.error ?? ""
904
908
  };
905
- if (!status.ready && options.onProgress) options.onProgress(status);
906
- return status;
907
909
  }
908
910
  async function inspectWaitSelector(bridge, testId, timeoutMs = 5e3, opts = {}) {
909
911
  const gone = opts.gone === true;
@@ -1692,22 +1694,31 @@ async function waitForSootsimIdle({
1692
1694
  }
1693
1695
  async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
1694
1696
  const start = Date.now();
1695
- const ready = await inspectWaitReady(bridge, timeoutMs, options);
1696
- if (!ready.ready) return { status: ready, idle: null, elapsedMs: Date.now() - start };
1697
- const idle = await waitForSootsimIdle({
1698
- bridge,
1699
- simId: options.simId,
1700
- maxMs: Math.max(100, Math.min(1e4, timeoutMs - (Date.now() - start))),
1701
- pollMs: 32,
1702
- stablePolls: 2
1697
+ const remaining = () => Math.max(0, start + timeoutMs - Date.now());
1698
+ const result = (status, idle2) => ({
1699
+ status,
1700
+ idle: idle2,
1701
+ elapsedMs: Date.now() - start
1703
1702
  });
1704
- if (!idle.settled) return { status: ready, idle, elapsedMs: Date.now() - start };
1705
- const settled = await inspectWaitReady(
1706
- bridge,
1707
- Math.max(1e3, timeoutMs - (Date.now() - start)),
1708
- { ...options.simId ? { simId: options.simId } : {}, stableMs: 0 }
1709
- );
1710
- return { status: settled, idle, elapsedMs: Date.now() - start };
1703
+ let idle = null;
1704
+ for (; ; ) {
1705
+ const ready = await inspectWaitReady(bridge, remaining(), options);
1706
+ if (!ready.ready) return result(ready, idle);
1707
+ idle = await waitForSootsimIdle({
1708
+ bridge,
1709
+ simId: options.simId,
1710
+ maxMs: Math.min(1e4, remaining()),
1711
+ pollMs: 32,
1712
+ stablePolls: 2
1713
+ });
1714
+ if (!idle.settled) return result(ready, idle);
1715
+ const settled = await inspectReadySnapshot(
1716
+ bridge,
1717
+ Math.max(1e3, remaining()),
1718
+ options.simId
1719
+ );
1720
+ if (settled.ready || remaining() === 0) return result(settled, idle);
1721
+ }
1711
1722
  }
1712
1723
 
1713
1724
  // cli/commands/inspect/actions.ts
@@ -2608,6 +2619,7 @@ var SimClient = class {
2608
2619
  inspectLogs,
2609
2620
  inspectMemory,
2610
2621
  inspectNodeCount,
2622
+ inspectReadySnapshot,
2611
2623
  inspectRequests,
2612
2624
  inspectScreens,
2613
2625
  inspectScrollStateAt,
@@ -2630,6 +2642,7 @@ var SimClient = class {
2630
2642
  rankInteractive,
2631
2643
  readyProbeHasContent,
2632
2644
  readyProbeHasTargetContent,
2645
+ readyProbeIsReady,
2633
2646
  resolveFindMode,
2634
2647
  resolveMaxMsFlag,
2635
2648
  scoreInteractive,
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -13,6 +13,9 @@ function readyProbeHasContent(probe) {
13
13
  function readyProbeHasTargetContent(probe) {
14
14
  return probe.liveFrameActive || probe.targets > 0;
15
15
  }
16
+ function readyProbeIsReady(probe) {
17
+ return (probe.flag === true ? readyProbeHasContent(probe) : readyProbeHasTargetContent(probe)) && probe.externalReady !== false && !probe.externalError && !probe.loadingText;
18
+ }
16
19
 
17
20
  // cli/commands/inspect/core.ts
18
21
  function resolveMaxMsFlag(args, fallbackMs) {
@@ -753,39 +756,38 @@ function waitReadyReason(status) {
753
756
  return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
754
757
  }
755
758
  async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
759
+ const result = await sendReadyWait(bridge, timeoutMs, timeoutMs + 1e3, options.simId);
760
+ const status = waitReadyStatus(result, result.matched && !result.probe?.externalError);
761
+ if (!status.ready && options.onProgress) options.onProgress(status);
762
+ return status;
763
+ }
764
+ async function inspectReadySnapshot(bridge, sendTimeoutMs, simId) {
765
+ const result = await sendReadyWait(bridge, 1, sendTimeoutMs, simId);
766
+ return waitReadyStatus(result, result.probe ? readyProbeIsReady(result.probe) : false);
767
+ }
768
+ async function sendReadyWait(bridge, timeoutMs, sendTimeoutMs, simId) {
756
769
  const start = Date.now();
757
- let result;
758
770
  try {
759
- result = await bridge.send(
771
+ return await bridge.send(
760
772
  {
761
773
  type: "waitFor",
762
- ...options.simId ? { simId: options.simId } : {},
763
- waitForOptions: {
764
- condition: {
765
- type: "ready",
766
- ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
767
- },
768
- timeoutMs
769
- }
774
+ ...simId ? { simId } : {},
775
+ waitForOptions: { condition: { type: "ready" }, timeoutMs }
770
776
  },
771
- { timeoutMs: timeoutMs + 1e3 }
777
+ { timeoutMs: sendTimeoutMs }
772
778
  );
773
779
  } catch (error) {
774
780
  const bridgeError = error instanceof Error ? error.message : String(error);
775
781
  if (bridgeError.startsWith("multiple sims are connected:") || bridgeError.startsWith("saved sim ")) {
776
782
  throw error;
777
783
  }
778
- result = {
779
- matched: false,
780
- elapsedMs: Date.now() - start,
781
- polls: 0,
782
- error: bridgeError
783
- };
784
+ return { matched: false, elapsedMs: Date.now() - start, polls: 0, error: bridgeError };
784
785
  }
786
+ }
787
+ function waitReadyStatus(result, ready) {
785
788
  const probe = result.probe;
786
- const externalError = probe?.externalError ?? "";
787
- const status = {
788
- ready: result.matched && !externalError,
789
+ return {
790
+ ready,
789
791
  elapsedMs: result.elapsedMs,
790
792
  nodes: probe?.nodes ?? 0,
791
793
  targets: probe?.targets ?? 0,
@@ -796,13 +798,11 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
796
798
  loadingText: probe?.loadingText ?? "",
797
799
  externalReady: probe?.externalReady ?? null,
798
800
  externalStatus: probe?.externalStatus ?? "",
799
- externalError,
801
+ externalError: probe?.externalError ?? "",
800
802
  suppressedEntryError: probe?.suppressedEntryError ?? "",
801
803
  errors: probe?.errors ?? 0,
802
804
  bridgeError: result.error ?? ""
803
805
  };
804
- if (!status.ready && options.onProgress) options.onProgress(status);
805
- return status;
806
806
  }
807
807
  async function inspectWaitSelector(bridge, testId, timeoutMs = 5e3, opts = {}) {
808
808
  const gone = opts.gone === true;
@@ -1591,22 +1591,31 @@ async function waitForSootsimIdle({
1591
1591
  }
1592
1592
  async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
1593
1593
  const start = Date.now();
1594
- const ready = await inspectWaitReady(bridge, timeoutMs, options);
1595
- if (!ready.ready) return { status: ready, idle: null, elapsedMs: Date.now() - start };
1596
- const idle = await waitForSootsimIdle({
1597
- bridge,
1598
- simId: options.simId,
1599
- maxMs: Math.max(100, Math.min(1e4, timeoutMs - (Date.now() - start))),
1600
- pollMs: 32,
1601
- stablePolls: 2
1594
+ const remaining = () => Math.max(0, start + timeoutMs - Date.now());
1595
+ const result = (status, idle2) => ({
1596
+ status,
1597
+ idle: idle2,
1598
+ elapsedMs: Date.now() - start
1602
1599
  });
1603
- if (!idle.settled) return { status: ready, idle, elapsedMs: Date.now() - start };
1604
- const settled = await inspectWaitReady(
1605
- bridge,
1606
- Math.max(1e3, timeoutMs - (Date.now() - start)),
1607
- { ...options.simId ? { simId: options.simId } : {}, stableMs: 0 }
1608
- );
1609
- return { status: settled, idle, elapsedMs: Date.now() - start };
1600
+ let idle = null;
1601
+ for (; ; ) {
1602
+ const ready = await inspectWaitReady(bridge, remaining(), options);
1603
+ if (!ready.ready) return result(ready, idle);
1604
+ idle = await waitForSootsimIdle({
1605
+ bridge,
1606
+ simId: options.simId,
1607
+ maxMs: Math.min(1e4, remaining()),
1608
+ pollMs: 32,
1609
+ stablePolls: 2
1610
+ });
1611
+ if (!idle.settled) return result(ready, idle);
1612
+ const settled = await inspectReadySnapshot(
1613
+ bridge,
1614
+ Math.max(1e3, remaining()),
1615
+ options.simId
1616
+ );
1617
+ if (settled.ready || remaining() === 0) return result(settled, idle);
1618
+ }
1610
1619
  }
1611
1620
 
1612
1621
  // cli/commands/inspect/actions.ts
@@ -2506,6 +2515,7 @@ export {
2506
2515
  inspectLogs,
2507
2516
  inspectMemory,
2508
2517
  inspectNodeCount,
2518
+ inspectReadySnapshot,
2509
2519
  inspectRequests,
2510
2520
  inspectScreens,
2511
2521
  inspectScrollStateAt,
@@ -2528,6 +2538,7 @@ export {
2528
2538
  rankInteractive,
2529
2539
  readyProbeHasContent,
2530
2540
  readyProbeHasTargetContent,
2541
+ readyProbeIsReady,
2531
2542
  resolveFindMode,
2532
2543
  resolveMaxMsFlag,
2533
2544
  scoreInteractive,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -33273,10 +33273,20 @@ var init_app_splash = __esm({
33273
33273
  });
33274
33274
 
33275
33275
  // src/bridge-contract.ts
33276
- var PUBLIC_NO_NETWORK_MARKER, HEADLESS_TENANT_FETCH_HUNG_MARKER;
33276
+ function readyProbeHasContent(probe3) {
33277
+ return probe3.liveFrameActive || probe3.targets > 0 || probe3.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
33278
+ }
33279
+ function readyProbeHasTargetContent(probe3) {
33280
+ return probe3.liveFrameActive || probe3.targets > 0;
33281
+ }
33282
+ function readyProbeIsReady(probe3) {
33283
+ return (probe3.flag === true ? readyProbeHasContent(probe3) : readyProbeHasTargetContent(probe3)) && probe3.externalReady !== false && !probe3.externalError && !probe3.loadingText;
33284
+ }
33285
+ var SEMANTIC_READY_CONTENT_NODE_FLOOR, PUBLIC_NO_NETWORK_MARKER, HEADLESS_TENANT_FETCH_HUNG_MARKER;
33277
33286
  var init_bridge_contract = __esm({
33278
33287
  "src/bridge-contract.ts"() {
33279
33288
  "use strict";
33289
+ SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
33280
33290
  PUBLIC_NO_NETWORK_MARKER = "public Peach Cloud simulators have no network";
33281
33291
  HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
33282
33292
  }
@@ -33762,39 +33772,38 @@ function waitReadyReason(status) {
33762
33772
  return !status.externalError && status.suppressedEntryError ? `${base} (suppressed entry error: ${status.suppressedEntryError})` : base;
33763
33773
  }
33764
33774
  async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
33775
+ const result = await sendReadyWait(bridge, timeoutMs, timeoutMs + 1e3, options.simId);
33776
+ const status = waitReadyStatus(result, result.matched && !result.probe?.externalError);
33777
+ if (!status.ready && options.onProgress) options.onProgress(status);
33778
+ return status;
33779
+ }
33780
+ async function inspectReadySnapshot(bridge, sendTimeoutMs, simId) {
33781
+ const result = await sendReadyWait(bridge, 1, sendTimeoutMs, simId);
33782
+ return waitReadyStatus(result, result.probe ? readyProbeIsReady(result.probe) : false);
33783
+ }
33784
+ async function sendReadyWait(bridge, timeoutMs, sendTimeoutMs, simId) {
33765
33785
  const start = Date.now();
33766
- let result;
33767
33786
  try {
33768
- result = await bridge.send(
33787
+ return await bridge.send(
33769
33788
  {
33770
33789
  type: "waitFor",
33771
- ...options.simId ? { simId: options.simId } : {},
33772
- waitForOptions: {
33773
- condition: {
33774
- type: "ready",
33775
- ...options.stableMs === void 0 ? {} : { stableMs: options.stableMs }
33776
- },
33777
- timeoutMs
33778
- }
33790
+ ...simId ? { simId } : {},
33791
+ waitForOptions: { condition: { type: "ready" }, timeoutMs }
33779
33792
  },
33780
- { timeoutMs: timeoutMs + 1e3 }
33793
+ { timeoutMs: sendTimeoutMs }
33781
33794
  );
33782
33795
  } catch (error) {
33783
33796
  const bridgeError = error instanceof Error ? error.message : String(error);
33784
33797
  if (bridgeError.startsWith("multiple sims are connected:") || bridgeError.startsWith("saved sim ")) {
33785
33798
  throw error;
33786
33799
  }
33787
- result = {
33788
- matched: false,
33789
- elapsedMs: Date.now() - start,
33790
- polls: 0,
33791
- error: bridgeError
33792
- };
33800
+ return { matched: false, elapsedMs: Date.now() - start, polls: 0, error: bridgeError };
33793
33801
  }
33802
+ }
33803
+ function waitReadyStatus(result, ready) {
33794
33804
  const probe3 = result.probe;
33795
- const externalError = probe3?.externalError ?? "";
33796
- const status = {
33797
- ready: result.matched && !externalError,
33805
+ return {
33806
+ ready,
33798
33807
  elapsedMs: result.elapsedMs,
33799
33808
  nodes: probe3?.nodes ?? 0,
33800
33809
  targets: probe3?.targets ?? 0,
@@ -33805,13 +33814,11 @@ async function inspectWaitReady(bridge, timeoutMs = 2e4, options = {}) {
33805
33814
  loadingText: probe3?.loadingText ?? "",
33806
33815
  externalReady: probe3?.externalReady ?? null,
33807
33816
  externalStatus: probe3?.externalStatus ?? "",
33808
- externalError,
33817
+ externalError: probe3?.externalError ?? "",
33809
33818
  suppressedEntryError: probe3?.suppressedEntryError ?? "",
33810
33819
  errors: probe3?.errors ?? 0,
33811
33820
  bridgeError: result.error ?? ""
33812
33821
  };
33813
- if (!status.ready && options.onProgress) options.onProgress(status);
33814
- return status;
33815
33822
  }
33816
33823
  function consoleEntriesEval(level, limit) {
33817
33824
  const getter = level === "error" ? "getErrors" : "getWarnings";
@@ -37440,17 +37447,14 @@ async function maybeDescribeAfterOpen(wsPort, simId, args) {
37440
37447
  if (noDescribe) return;
37441
37448
  let readyProbe = null;
37442
37449
  try {
37443
- readyProbe = await inspectWaitReady(bridge, 1);
37450
+ readyProbe = await inspectReadySnapshot(bridge, 3e3);
37444
37451
  } catch {
37445
37452
  }
37446
- if (readyProbe) {
37447
- if (!readyProbe.ready) {
37448
- const reason = readyProbe.loadingText ? `still showing "${readyProbe.loadingText}"` : readyProbe.flag !== true ? "guest ready event has not fired" : readyProbe.targets <= 0 ? "no visible app content is inspectable yet" : "app tree is still stabilizing";
37449
- console.log(
37450
- ` app still loading: ${reason} (nodes: ${readyProbe.nodes}, targets: ${readyProbe.targets})`
37451
- );
37452
- console.log(" before interacting, run: peach wait ready --max-ms 120000");
37453
- }
37453
+ if (readyProbe && !readyProbe.ready) {
37454
+ console.log(
37455
+ ` app still loading: ${waitReadyReason(readyProbe)} (nodes: ${readyProbe.nodes}, targets: ${readyProbe.targets})`
37456
+ );
37457
+ console.log(" before interacting, run: peach wait ready --max-ms 120000");
37454
37458
  }
37455
37459
  const result = await inspectDescribe(bridge, {
37456
37460
  describe: true,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.663 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.664 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;