peachsim 0.1.762 → 0.1.764

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 (74) hide show
  1. package/README.md +5 -0
  2. package/cli/bridge-flow-runner.ts +3 -4
  3. package/cli/commands/inspect/settling.ts +193 -162
  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 +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -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 +10 -16
  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 +191 -159
  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/native-firebase-metadata.cjs +1 -1
  51. package/dist-lib/native-firebase-metadata.mjs +1 -1
  52. package/dist-lib/plist.cjs +1 -1
  53. package/dist-lib/plist.mjs +1 -1
  54. package/dist-lib/profiles.cjs +1 -1
  55. package/dist-lib/public-brand.cjs +1 -1
  56. package/dist-lib/react-native-host-modules.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.mjs +1 -1
  58. package/dist-lib/render-mode.cjs +1 -1
  59. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  60. package/dist-lib/sdk.cjs +191 -159
  61. package/dist-lib/sdk.mjs +191 -159
  62. package/dist-lib/skills.cjs +206 -181
  63. package/dist-lib/swift-compile.cjs +1 -1
  64. package/dist-lib/swift-compile.mjs +1 -1
  65. package/dist-lib/swift-package.cjs +1 -1
  66. package/dist-lib/swift-package.mjs +1 -1
  67. package/dist-lib/swift-submit.cjs +1 -1
  68. package/dist-lib/swift-submit.mjs +1 -1
  69. package/dist-lib/swift-toolchain.cjs +1 -1
  70. package/dist-lib/swift.cjs +1 -1
  71. package/dist-lib/vite-swift.cjs +10 -16
  72. package/dist-lib/vite.cjs +1 -1
  73. package/package.json +1 -1
  74. package/src/swift-packages.ts +21 -19
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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;
@@ -24617,15 +24617,13 @@ function resolveSwiftPackages(options) {
24617
24617
  const files = swiftTargetFiles(pkg.manifest, target);
24618
24618
  if (files.some((file) => C_FAMILY.test(file)))
24619
24619
  return `${name2} is a C or Objective-C target`;
24620
- for (const dependency of target.dependencies) {
24621
- if (dependency.kind === "target") {
24622
- const nested2 = resolveTarget(pkg, dependency.name);
24623
- if (nested2) return nested2;
24624
- continue;
24625
- }
24620
+ const reasons = target.dependencies.map((dependency) => {
24621
+ if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
24626
24622
  const nested = resolveDependencyProduct(pkg, dependency.package, dependency.name);
24627
- if (nested) return `${dependency.name}: ${nested}`;
24628
- }
24623
+ return nested && `${dependency.name}: ${nested}`;
24624
+ });
24625
+ const blocked = reasons.find((reason) => reason !== null);
24626
+ if (blocked) return blocked;
24629
24627
  const relative3 = files.map((file) => import_node_path14.default.relative(target.dir, file));
24630
24628
  targets.set(`${pkg.manifest.dir}\0${name2}`, {
24631
24629
  name: name2,
@@ -24648,11 +24646,7 @@ function resolveSwiftPackages(options) {
24648
24646
  if (provided.has(product)) return null;
24649
24647
  const roots = pkg.manifest.products.get(product);
24650
24648
  if (!roots) return `${import_node_path14.default.basename(pkg.manifest.dir)} has no library ${product}`;
24651
- for (const name2 of roots) {
24652
- const reason = resolveTarget(pkg, name2);
24653
- if (reason) return reason;
24654
- }
24655
- return null;
24649
+ return roots.map((name2) => resolveTarget(pkg, name2)).find((reason) => reason !== null) ?? null;
24656
24650
  };
24657
24651
  const resolveDependencyProduct = (pkg, packageName, product) => {
24658
24652
  if (provided.has(product)) return null;
@@ -24693,7 +24687,7 @@ function resolveSwiftPackages(options) {
24693
24687
  const reached = /* @__PURE__ */ new Set();
24694
24688
  const reach = (pkg, name2) => {
24695
24689
  const key = `${pkg.manifest.dir}\0${name2}`;
24696
- if (reached.has(key) || !targets.has(key)) return;
24690
+ if (reached.has(key)) return;
24697
24691
  reached.add(key);
24698
24692
  for (const dependency of pkg.manifest.targets.get(name2)?.dependencies ?? []) {
24699
24693
  if (dependency.kind === "target") reach(pkg, dependency.name);
@@ -24708,7 +24702,7 @@ function resolveSwiftPackages(options) {
24708
24702
  };
24709
24703
  for (const { product, source } of products) {
24710
24704
  const pkg = source.kind === "unnamed" ? unnamed().find((candidate) => candidate.manifest.products.has(product)) : packages.get(source.kind === "local" ? import_node_path14.default.resolve(source.dir) : source.url);
24711
- if (!pkg || typeof pkg === "string" || result.unavailable.has(product)) continue;
24705
+ if (!pkg || typeof pkg === "string") continue;
24712
24706
  for (const root of pkg.manifest.products.get(product) ?? []) reach(pkg, root);
24713
24707
  }
24714
24708
  result.targets = [...targets.entries()].filter(([key]) => reached.has(key)).map(([, target]) => target);
@@ -44586,179 +44580,211 @@ async function waitForSootsimIdle({
44586
44580
  const start = Date.now()
44587
44581
  const deadline = start + ${Math.max(0, Math.round(maxMs))}
44588
44582
  const pollMs = ${Math.max(1, Math.round(pollMs))}
44589
- const requiredStillMs = ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
44590
- const minimumStablePolls = ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
44591
44583
  const strict = ${strict ? "true" : "false"}
44592
44584
  const paintStill = ${paintStill ? "true" : "false"}
44585
+ const requiredStillMs = paintStill ? 0 : ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
44586
+ const minimumStablePolls = paintStill ? 1 : ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
44593
44587
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
44594
-
44595
- // route-aware settle: a tap that pushes/pops a screen is async \u2014 the
44596
- // old screen still renders for a moment, then the new one mounts and
44597
- // its content loads. a pure layout-hash check reports "idle" on the
44598
- // outgoing screen or on the incoming skeleton, so a driver re-taps
44599
- // and stacks duplicate navigations. drain any in-flight screen
44600
- // transition FIRST, bounded by the overall budget. when no
44601
- // transition is happening this returns in ~80ms (startWindowMs), so
44602
- // a plain button tap barely pays for it.
44588
+ const composite = paintStill ? window.SootSim?.bridges?.liveComposite : null
44589
+ if (paintStill && !composite) {
44590
+ return { settled: false, elapsed: Date.now() - start, blockedBy: 'screen pixels unavailable' }
44591
+ }
44592
+ // subscribe to presented frames; authoritative screenshots force a
44593
+ // worker render, which changes the very counter we used to inspect.
44594
+ const unsubscribe = composite?.subscribe(() => {})
44595
+ let pixelFrameToken = -1
44596
+ let screenPixels = null
44603
44597
  try {
44604
- const wfst = window.__sootsimTest?.waitForScreenTransitions
44605
- if (typeof wfst === 'function') {
44606
- const remaining = deadline - Date.now()
44607
- if (remaining > 120) {
44608
- await wfst({
44609
- timeoutMs: Math.min(remaining - 80, 4000),
44610
- settleMs: 64,
44611
- startWindowMs: 80,
44612
- })
44613
- }
44614
- }
44615
- } catch {}
44616
44598
 
44617
- const readSnapshot = async () => {
44618
- let animating = false
44619
- let layoutDirty = false
44620
- let pendingFetches = 0
44621
- let requestTotal = 0
44622
- let requestInFlight = 0
44623
- let renderStatsAvailable = false
44624
- let frameCount = -1
44625
- let shellAnimating = false
44626
- // strict also waits out shell motion: a system alert, sheet or menu
44627
- // animates in the shell worker while the app's own stats read still,
44628
- // so its presentation is complete only once the shell's list empties.
44629
- if (strict) {
44630
- try {
44631
- const motion = await window.__sootsimTest?.listAnimations?.()
44632
- shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
44633
- } catch {}
44634
- }
44599
+ // route-aware settle: a tap that pushes/pops a screen is async \u2014 the
44600
+ // old screen still renders for a moment, then the new one mounts and
44601
+ // its content loads. a pure layout-hash check reports "idle" on the
44602
+ // outgoing screen or on the incoming skeleton, so a driver re-taps
44603
+ // and stacks duplicate navigations. drain any in-flight screen
44604
+ // transition FIRST, bounded by the overall budget. when no
44605
+ // transition is happening this returns in ~80ms (startWindowMs), so
44606
+ // a plain button tap barely pays for it.
44635
44607
  try {
44636
- const stats = await window.__sootsimRenderHost?.queryStats?.()
44637
- if (stats) {
44638
- renderStatsAvailable = true
44639
- frameCount = typeof stats.frameCount === 'number' ? stats.frameCount : -1
44640
- animating =
44641
- stats.hasActiveAnims === true ||
44642
- stats.hasActiveNativeAnimations === true ||
44643
- stats.hasPendingAnimationFrames === true
44644
- layoutDirty =
44645
- stats.layoutDirty === true && stats.renderRequested === true
44646
- // a freshly-pushed screen showing a skeleton is layout-stable
44647
- // but not actually settled \u2014 its data/images are still in
44648
- // flight. treat bounded image-loader fetches as not-idle so
44649
- // settle waits for real content, capped by the budget.
44650
- const pf = stats.memory && stats.memory.imageLoader
44651
- ? stats.memory.imageLoader.pendingFetches
44652
- : 0
44653
- pendingFetches = typeof pf === 'number' ? pf : 0
44608
+ const wfst = window.__sootsimTest?.waitForScreenTransitions
44609
+ if (typeof wfst === 'function') {
44610
+ const remaining = deadline - Date.now()
44611
+ if (remaining > 120) {
44612
+ await wfst({
44613
+ timeoutMs: Math.min(remaining - 80, 4000),
44614
+ settleMs: 64,
44615
+ startWindowMs: 80,
44616
+ })
44617
+ }
44654
44618
  }
44655
44619
  } catch {}
44656
- try {
44657
- const counts = await window.__sootsimTest?.getRequestCounts?.()
44658
- requestTotal = typeof counts?.total === 'number' ? counts.total : 0
44659
- requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
44660
- } catch {}
44661
- const root = window.__sootsimRoot
44662
- const nodes = []
44663
- if (root) {
44664
- const walk = (n) => {
44665
- if (n.layout && n.layout.width > 0) {
44666
- nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
44620
+
44621
+ const readSnapshot = async () => {
44622
+ let animating = false
44623
+ let layoutDirty = false
44624
+ let pendingFetches = 0
44625
+ let requestTotal = 0
44626
+ let requestInFlight = 0
44627
+ let renderStatsAvailable = false
44628
+ let shellAnimating = false
44629
+ // strict also waits out shell motion: a system alert, sheet or menu
44630
+ // animates in the shell worker while the app's own stats read still,
44631
+ // so its presentation is complete only once the shell's list empties.
44632
+ if (strict) {
44633
+ try {
44634
+ const motion = await window.__sootsimTest?.listAnimations?.()
44635
+ shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
44636
+ } catch {}
44637
+ }
44638
+ try {
44639
+ const stats = await window.__sootsimRenderHost?.queryStats?.()
44640
+ if (stats) {
44641
+ renderStatsAvailable = true
44642
+ animating =
44643
+ stats.hasActiveAnims === true ||
44644
+ stats.hasActiveNativeAnimations === true ||
44645
+ stats.hasPendingAnimationFrames === true
44646
+ layoutDirty =
44647
+ stats.layoutDirty === true && stats.renderRequested === true
44648
+ // a freshly-pushed screen showing a skeleton is layout-stable
44649
+ // but not actually settled \u2014 its data/images are still in
44650
+ // flight. treat bounded image-loader fetches as not-idle so
44651
+ // settle waits for real content, capped by the budget.
44652
+ const pf = stats.memory && stats.memory.imageLoader
44653
+ ? stats.memory.imageLoader.pendingFetches
44654
+ : 0
44655
+ pendingFetches = typeof pf === 'number' ? pf : 0
44656
+ }
44657
+ } catch {}
44658
+ try {
44659
+ const counts = await window.__sootsimTest?.getRequestCounts?.()
44660
+ requestTotal = typeof counts?.total === 'number' ? counts.total : 0
44661
+ requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
44662
+ } catch {}
44663
+ const root = window.__sootsimRoot
44664
+ const nodes = []
44665
+ if (root) {
44666
+ const walk = (n) => {
44667
+ if (n.layout && n.layout.width > 0) {
44668
+ nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
44669
+ }
44670
+ for (const c of n.children || []) walk(c)
44671
+ }
44672
+ walk(root)
44673
+ }
44674
+ if (paintStill) {
44675
+ const canvas = composite.getCanvas()
44676
+ const token = composite.getFrameToken()
44677
+ if (!canvas || canvas.width <= 1 || canvas.height <= 1) {
44678
+ screenPixels = null
44679
+ } else if (token !== pixelFrameToken || canvas.width !== screenPixels?.width || canvas.height !== screenPixels?.height) {
44680
+ const context = canvas.getContext('2d')
44681
+ const image = context?.getImageData(0, 0, canvas.width, canvas.height)
44682
+ screenPixels = image ? { width: image.width, height: image.height, data: new Uint32Array(image.data.buffer) } : null
44683
+ pixelFrameToken = token
44667
44684
  }
44668
- for (const c of n.children || []) walk(c)
44669
44685
  }
44670
- walk(root)
44686
+ return { layout: nodes.join(';'), screenPixels, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
44671
44687
  }
44672
- return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
44673
- }
44674
44688
 
44675
- // how long generic background network is allowed to keep us waiting AFTER
44676
- // the screen is otherwise visually settled. apps with continuous traffic
44677
- // (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
44678
- // requestInFlight===0 / a stable requestTotal, so requiring full network
44679
- // quiet burns the ENTIRE budget on every command \u2014 the leading idle that
44680
- // failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
44681
- // layout-stability + the image-loader already prove visible content
44682
- // loaded (a data load changes layout; an image load shows in the loader),
44683
- // so the generic request counters are a courtesy, not a gate: honor them
44684
- // only within this grace once the screen is visually still.
44685
- const networkQuietGraceMs = 1200
44686
- let lastLayout = ''
44687
- let lastFrameCount = -2
44688
- let paintedPolls = 0
44689
- let lastRequestTotal = -1
44690
- let stable = 0
44691
- let visuallyStillSince = 0
44692
- // counts across the whole budget: a flag that is true on every poll is a
44693
- // different bug from one that is true intermittently, and the two need
44694
- // opposite fixes (engine vs budget).
44695
- let polls = 0
44696
- let dirtyPolls = 0
44697
- let animatingPolls = 0
44698
- let layoutChangedPolls = 0
44699
- while (Date.now() < deadline) {
44700
- const snapshot = await readSnapshot()
44701
- polls++
44702
- if (snapshot.layoutDirty) dirtyPolls++
44703
- if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
44704
- if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
44705
- const painted = paintStill && snapshot.frameCount !== lastFrameCount
44706
- if (polls > 1 && painted) paintedPolls++
44707
- const strictOk =
44708
- !strict ||
44709
- (snapshot.renderStatsAvailable &&
44710
- !snapshot.animating &&
44711
- !snapshot.shellAnimating &&
44712
- !snapshot.layoutDirty)
44713
- // visually settled: no animations, no image content loading, layout
44714
- // unchanged since the last poll.
44715
- const visuallyStill =
44716
- strictOk &&
44717
- !painted &&
44718
- snapshot.pendingFetches === 0 &&
44719
- snapshot.layout === lastLayout
44720
- // generic network quiet: nothing in flight and no new requests issued.
44721
- const networkQuiet =
44722
- snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
44723
- if (visuallyStill) {
44724
- stable++
44725
- if (visuallyStillSince === 0) visuallyStillSince = Date.now()
44726
- // settle once the screen has held still long enough AND either the
44727
- // network is genuinely quiet OR it has refused to quiet within the
44728
- // grace (continuous background traffic must not block forever).
44729
- if (
44730
- stable >= minimumStablePolls &&
44731
- Date.now() - visuallyStillSince >= requiredStillMs &&
44732
- (networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
44733
- ) {
44734
- return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
44735
- }
44736
- } else {
44737
- stable = 0
44738
- visuallyStillSince = 0
44739
- }
44740
- lastLayout = snapshot.layout
44741
- lastFrameCount = snapshot.frameCount
44742
- lastRequestTotal = snapshot.requestTotal
44743
- await sleep(pollMs)
44744
- }
44745
- const last = await readSnapshot()
44746
- const blockers = []
44747
- if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
44748
- if (last.animating) blockers.push('animations still running')
44749
- if (last.shellAnimating) blockers.push('shell animations still running')
44750
- if (last.layoutDirty) blockers.push('layout still dirty')
44751
- if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
44752
- if (last.layout !== lastLayout) blockers.push('layout still changing')
44753
- if (paintStill && last.frameCount !== lastFrameCount) blockers.push('still painting')
44754
- if (last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
44755
- return {
44756
- settled: false,
44757
- elapsed: Date.now() - start,
44758
- blockedBy:
44759
- (blockers.length ? blockers.join(', ') : 'unknown') +
44760
- ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
44761
- 'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, painted ' + paintedPolls + 'x)',
44689
+ // how long generic background network is allowed to keep us waiting AFTER
44690
+ // the screen is otherwise visually settled. apps with continuous traffic
44691
+ // (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
44692
+ // requestInFlight===0 / a stable requestTotal, so requiring full network
44693
+ // quiet burns the ENTIRE budget on every command \u2014 the leading idle that
44694
+ // failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
44695
+ // layout-stability + the image-loader already prove visible content
44696
+ // loaded (a data load changes layout; an image load shows in the loader),
44697
+ // so the generic request counters are a courtesy, not a gate: honor them
44698
+ // only within this grace once the screen is visually still.
44699
+ const networkQuietGraceMs = 1200
44700
+ let lastLayout = ''
44701
+ let lastScreenPixels = null
44702
+ let screenChangedPolls = 0
44703
+ let lastRequestTotal = -1
44704
+ let stable = 0
44705
+ let visuallyStillSince = 0
44706
+ // counts across the whole budget: a flag that is true on every poll is a
44707
+ // different bug from one that is true intermittently, and the two need
44708
+ // opposite fixes (engine vs budget).
44709
+ let polls = 0
44710
+ let dirtyPolls = 0
44711
+ let animatingPolls = 0
44712
+ let layoutChangedPolls = 0
44713
+ const screenUnchanged = (pixels) => {
44714
+ if (!pixels || !lastScreenPixels || pixels.width !== lastScreenPixels.width || pixels.height !== lastScreenPixels.height) return false
44715
+ if (pixels === lastScreenPixels) return true
44716
+ for (let i = 0; i < pixels.data.length; i++) {
44717
+ if (pixels.data[i] !== lastScreenPixels.data[i]) return false
44718
+ }
44719
+ return true
44720
+ }
44721
+ while (Date.now() < deadline) {
44722
+ const snapshot = await readSnapshot()
44723
+ polls++
44724
+ if (snapshot.layoutDirty) dirtyPolls++
44725
+ if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
44726
+ if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
44727
+ const screenChanged = paintStill && !screenUnchanged(snapshot.screenPixels)
44728
+ if (polls > 1 && screenChanged) screenChangedPolls++
44729
+ const strictOk =
44730
+ !strict ||
44731
+ (snapshot.renderStatsAvailable &&
44732
+ !snapshot.animating &&
44733
+ !snapshot.shellAnimating &&
44734
+ !snapshot.layoutDirty)
44735
+ // visually settled: no animations, no image content loading, layout
44736
+ // unchanged since the last poll.
44737
+ const visuallyStill =
44738
+ strictOk &&
44739
+ !screenChanged &&
44740
+ snapshot.pendingFetches === 0 &&
44741
+ snapshot.layout === lastLayout
44742
+ // generic network quiet: nothing in flight and no new requests issued.
44743
+ const networkQuiet =
44744
+ snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
44745
+ if (visuallyStill) {
44746
+ stable++
44747
+ if (visuallyStillSince === 0) visuallyStillSince = Date.now()
44748
+ // settle once the screen has held still long enough AND either the
44749
+ // network is genuinely quiet OR it has refused to quiet within the
44750
+ // grace (continuous background traffic must not block forever).
44751
+ if (
44752
+ stable >= minimumStablePolls &&
44753
+ Date.now() - visuallyStillSince >= requiredStillMs &&
44754
+ (networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
44755
+ ) {
44756
+ return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
44757
+ }
44758
+ } else {
44759
+ stable = 0
44760
+ visuallyStillSince = 0
44761
+ }
44762
+ lastLayout = snapshot.layout
44763
+ lastScreenPixels = snapshot.screenPixels
44764
+ lastRequestTotal = snapshot.requestTotal
44765
+ await sleep(pollMs)
44766
+ }
44767
+ const last = await readSnapshot()
44768
+ const blockers = []
44769
+ if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
44770
+ if (last.animating) blockers.push('animations still running')
44771
+ if (last.shellAnimating) blockers.push('shell animations still running')
44772
+ if (last.layoutDirty) blockers.push('layout still dirty')
44773
+ if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
44774
+ if (last.layout !== lastLayout) blockers.push('layout still changing')
44775
+ if (paintStill && !last.screenPixels) blockers.push('screen pixels unavailable')
44776
+ else if (paintStill && !screenUnchanged(last.screenPixels)) blockers.push('screen pixels still changing')
44777
+ if (last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
44778
+ return {
44779
+ settled: false,
44780
+ elapsed: Date.now() - start,
44781
+ blockedBy:
44782
+ (blockers.length ? blockers.join(', ') : 'unknown') +
44783
+ ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
44784
+ 'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, screen changed ' + screenChangedPolls + 'x)',
44785
+ }
44786
+ } finally {
44787
+ unsubscribe?.()
44762
44788
  }
44763
44789
  })()`
44764
44790
  },
@@ -47083,9 +47109,9 @@ var init_bridge_flow_runner = __esm({
47083
47109
  // maestro waits around taps for the screen to stop changing, up to
47084
47110
  // its ios driver's 3 s settle budget, comparing screenshots, so an action
47085
47111
  // still in flight (a submit spinner, a sheet closing) finishes before the
47086
- // next command resolves its target. an app can take a few hundred ms to
47087
- // react to a press, so stillness must hold about half a second, and it
47088
- // counts painted frames because a spinner repaints without moving layout.
47112
+ // next command resolves its target. compare consecutive screen pixels,
47113
+ // rather than requiring frame publications to stop for half a second:
47114
+ // a focused input keeps repainting its native blinking caret.
47089
47115
  // a screen that never stops proceeds when the budget runs out, as there,
47090
47116
  // and names what kept it moving: every such step pays the whole budget.
47091
47117
  async waitForAppToSettle() {
@@ -47094,7 +47120,6 @@ var init_bridge_flow_runner = __esm({
47094
47120
  simId: this.opts.simId,
47095
47121
  maxMs: 3e3,
47096
47122
  pollMs: 32,
47097
- stablePolls: 16,
47098
47123
  strict: true,
47099
47124
  paintStill: true
47100
47125
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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;
@@ -3011,15 +3011,13 @@ function resolveSwiftPackages(options) {
3011
3011
  const files = swiftTargetFiles(pkg.manifest, target);
3012
3012
  if (files.some((file) => C_FAMILY.test(file)))
3013
3013
  return `${name} is a C or Objective-C target`;
3014
- for (const dependency of target.dependencies) {
3015
- if (dependency.kind === "target") {
3016
- const nested2 = resolveTarget(pkg, dependency.name);
3017
- if (nested2) return nested2;
3018
- continue;
3019
- }
3014
+ const reasons = target.dependencies.map((dependency) => {
3015
+ if (dependency.kind === "target") return resolveTarget(pkg, dependency.name);
3020
3016
  const nested = resolveDependencyProduct(pkg, dependency.package, dependency.name);
3021
- if (nested) return `${dependency.name}: ${nested}`;
3022
- }
3017
+ return nested && `${dependency.name}: ${nested}`;
3018
+ });
3019
+ const blocked = reasons.find((reason) => reason !== null);
3020
+ if (blocked) return blocked;
3023
3021
  const relative = files.map((file) => import_node_path9.default.relative(target.dir, file));
3024
3022
  targets.set(`${pkg.manifest.dir}\0${name}`, {
3025
3023
  name,
@@ -3042,11 +3040,7 @@ function resolveSwiftPackages(options) {
3042
3040
  if (provided.has(product)) return null;
3043
3041
  const roots = pkg.manifest.products.get(product);
3044
3042
  if (!roots) return `${import_node_path9.default.basename(pkg.manifest.dir)} has no library ${product}`;
3045
- for (const name of roots) {
3046
- const reason = resolveTarget(pkg, name);
3047
- if (reason) return reason;
3048
- }
3049
- return null;
3043
+ return roots.map((name) => resolveTarget(pkg, name)).find((reason) => reason !== null) ?? null;
3050
3044
  };
3051
3045
  const resolveDependencyProduct = (pkg, packageName, product) => {
3052
3046
  if (provided.has(product)) return null;
@@ -3087,7 +3081,7 @@ function resolveSwiftPackages(options) {
3087
3081
  const reached = /* @__PURE__ */ new Set();
3088
3082
  const reach = (pkg, name) => {
3089
3083
  const key = `${pkg.manifest.dir}\0${name}`;
3090
- if (reached.has(key) || !targets.has(key)) return;
3084
+ if (reached.has(key)) return;
3091
3085
  reached.add(key);
3092
3086
  for (const dependency of pkg.manifest.targets.get(name)?.dependencies ?? []) {
3093
3087
  if (dependency.kind === "target") reach(pkg, dependency.name);
@@ -3102,7 +3096,7 @@ function resolveSwiftPackages(options) {
3102
3096
  };
3103
3097
  for (const { product, source } of products) {
3104
3098
  const pkg = source.kind === "unnamed" ? unnamed().find((candidate) => candidate.manifest.products.has(product)) : packages.get(source.kind === "local" ? import_node_path9.default.resolve(source.dir) : source.url);
3105
- if (!pkg || typeof pkg === "string" || result.unavailable.has(product)) continue;
3099
+ if (!pkg || typeof pkg === "string") continue;
3106
3100
  for (const root of pkg.manifest.products.get(product) ?? []) reach(pkg, root);
3107
3101
  }
3108
3102
  result.targets = [...targets.entries()].filter(([key]) => reached.has(key)).map(([, target]) => target);
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.762 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.764 | (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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.762",
3
+ "version": "0.1.764",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",