peachsim 0.1.1873 → 0.1.1875

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 (92) hide show
  1. package/cli/commands/do-chain.ts +1 -1
  2. package/cli/commands/inspect/settling.ts +132 -92
  3. package/cli/outbound-endpoints.ts +4 -0
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +53 -21
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +141 -102
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +32 -15
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +49 -21
  34. package/dist-lib/host/fetch-proxy-handler.cjs +2 -2
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +120 -94
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +2 -2
  50. package/dist-lib/native-app-identity-project.cjs +1 -1
  51. package/dist-lib/native-app-identity-project.mjs +1 -1
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +24 -24
  63. package/dist-lib/public-origins-lib.json +53 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +119 -93
  69. package/dist-lib/sdk.mjs +119 -93
  70. package/dist-lib/skills.cjs +163 -111
  71. package/dist-lib/swift-compile.cjs +1 -1
  72. package/dist-lib/swift-compile.mjs +1 -1
  73. package/dist-lib/swift-package.cjs +1 -1
  74. package/dist-lib/swift-package.mjs +1 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +1 -1
  80. package/dist-lib/vite.cjs +2 -2
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/package.json +1 -1
  84. package/runtime-companion.json +1 -1
  85. package/skills/contrast/SKILL.md +3 -2
  86. package/src/expo-native-prebuilt.ts +4 -2
  87. package/src/native-bundles.ts +5 -1
  88. package/src/nitroContract.ts +43 -12
  89. package/src/sim-client.ts +4 -2
  90. package/src/swift-host.ts +5 -1
  91. package/src/turbo-bundle.ts +14 -1
  92. package/src/turbo-source.ts +4 -3
@@ -431,7 +431,7 @@ export async function runDoChain(
431
431
  if (!skipSettle) {
432
432
  try {
433
433
  const budgetMs = autoWaitBudgetMs()
434
- const settled = await sim.settle({ maxMs: budgetMs })
434
+ const settled = await sim.settle({ maxMs: budgetMs, motionOnly: true })
435
435
  if (!settled.settled) {
436
436
  process.stderr.write(
437
437
  ` ⚠ auto-wait timed out after ${settled.elapsed ?? budgetMs}ms (${settled.blockedBy}). next command may see mid-animation state. use \`peach do settle\` for a longer wait.\n`,
@@ -27,8 +27,9 @@ export type WaitForSootsimIdleOptions = {
27
27
  // native maestro ios: pixel stability first, then native hierarchy equality.
28
28
  maestro?: boolean
29
29
  // settle on motion alone, for the waits around a gesture: image loads and
30
- // network traffic move nothing on screen, and the hierarchy walk costs
31
- // seconds per poll on a large tree under load.
30
+ // network traffic move nothing on screen. it waits on pushed render
31
+ // activity and reads nothing per tick (renderActivityIdleScript); the
32
+ // still window is stablePolls * pollMs.
32
33
  motionOnly?: boolean
33
34
  // after the app paints, a callback's own next frame is ongoing playback.
34
35
  readyPlayback?: boolean
@@ -76,6 +77,117 @@ export class IdleObservationError extends Error {
76
77
  }
77
78
  }
78
79
 
80
+ // the waits around a gesture settle on motion alone, from pushes: the tenant
81
+ // posts each busy change of its render activity (render work, guest and
82
+ // blocking native animation, blocking frame callbacks, text waits), and a
83
+ // screen transition reports its own drain. nothing is read from the tenant
84
+ // while the wait runs, so it costs the motion it observes no worker time.
85
+ // a wait that ends unsettled reads the tenant's stats once to name the cause.
86
+ function renderActivityIdleScript({
87
+ maxMs,
88
+ requiredStillMs,
89
+ transitionStartWindowMs,
90
+ transitionTimeoutMs,
91
+ }: {
92
+ maxMs: number
93
+ requiredStillMs: number
94
+ transitionStartWindowMs: number
95
+ transitionTimeoutMs: number
96
+ }): string {
97
+ return `(async () => {
98
+ const start = Date.now()
99
+ const budgetMs = ${Math.max(0, Math.round(maxMs))}
100
+ const requiredStillMs = ${Math.max(1, Math.round(requiredStillMs))}
101
+ let deadline = start + budgetMs
102
+ // with no tenant running, nothing an app draws can move.
103
+ const host = window.__sootsimRenderHost ?? null
104
+ const initial = host ? host.getRenderActivity() : null
105
+ // a published frame proves the idle flag is an observed worker state, not
106
+ // the host's pre-boot default, so its idle interval counts from now even
107
+ // when the busy-to-idle edge preceded this wait.
108
+ let busySeen = !initial || initial.busy || initial.frameToken > 0
109
+ let idleSince = !initial || (!initial.busy && initial.frameToken > 0) ? start : null
110
+ let wake = null
111
+ const notify = () => {
112
+ const resolve = wake
113
+ wake = null
114
+ resolve?.()
115
+ }
116
+ const unsubscribe = host?.subscribeRenderActivity(() => {
117
+ if (host.getRenderActivity().busy) {
118
+ busySeen = true
119
+ idleSince = null
120
+ } else if (busySeen && idleSince === null) {
121
+ idleSince = Date.now()
122
+ }
123
+ notify()
124
+ })
125
+ // a started screen transition moves the deadline: it drains, then the
126
+ // budget proves the new screen. a loaded host runs a push past a tap's
127
+ // budget, so the transition carries its own timeout.
128
+ let transitionEndedAt = null
129
+ let transitionPending = budgetMs > 120 && typeof window.__sootsimTest?.waitForScreenTransitions === 'function'
130
+ if (transitionPending) {
131
+ Promise.resolve()
132
+ .then(() => window.__sootsimTest.waitForScreenTransitions({
133
+ timeoutMs: ${Math.max(0, Math.round(transitionTimeoutMs))},
134
+ settleMs: 64,
135
+ startWindowMs: ${Math.max(0, Math.round(transitionStartWindowMs))},
136
+ }))
137
+ .then((transition) => {
138
+ if (transition?.started !== true) return
139
+ // a loaded worker replies after the motion stopped and says how long ago.
140
+ transitionEndedAt = Date.now() - Math.max(0, transition.restedMs ?? 0)
141
+ deadline = Math.max(deadline, transitionEndedAt + budgetMs)
142
+ }, () => {})
143
+ .finally(() => {
144
+ transitionPending = false
145
+ notify()
146
+ })
147
+ }
148
+ try {
149
+ while (true) {
150
+ const now = Date.now()
151
+ const quietSince = idleSince === null ? null : Math.max(idleSince, transitionEndedAt ?? idleSince)
152
+ if (!transitionPending && quietSince !== null && now - quietSince >= requiredStillMs) {
153
+ return { settled: true, elapsed: now - start, blockedBy: '' }
154
+ }
155
+ if (!transitionPending && now >= deadline) break
156
+ const until = !transitionPending && quietSince !== null
157
+ ? Math.min(quietSince + requiredStillMs, deadline)
158
+ : deadline
159
+ let timer = null
160
+ await new Promise((resolve) => {
161
+ wake = resolve
162
+ if (until > now) timer = setTimeout(notify, until - now)
163
+ })
164
+ clearTimeout(timer)
165
+ }
166
+ } finally {
167
+ unsubscribe?.()
168
+ }
169
+ const blockers = []
170
+ const stats = await Promise.race([
171
+ Promise.resolve().then(() => host?.queryStats()).catch(() => null),
172
+ new Promise((resolve) => setTimeout(() => resolve(null), 500)),
173
+ ])
174
+ if (stats) {
175
+ if (stats.hasActiveAnims) blockers.push('animations still running')
176
+ if (stats.hasActiveBlockingNativeAnimations) blockers.push('native animations still running')
177
+ if (stats.hasPendingBlockingAnimationFrames) blockers.push('frame callbacks still pending')
178
+ if (stats.layoutDirty && stats.renderRequested) blockers.push('layout still dirty')
179
+ }
180
+ if (!blockers.length) blockers.push(idleSince === null ? 'tenant render activity still busy' : 'motion ended before stillness was proven')
181
+ return {
182
+ settled: false,
183
+ elapsed: Date.now() - start,
184
+ blockedBy: blockers.join(', ') + '; tenant activity ' + JSON.stringify({
185
+ initial, current: host?.getRenderActivity() ?? null, busySeen, idleSince, transitionEndedAt, startedAt: start,
186
+ }),
187
+ }
188
+ })()`
189
+ }
190
+
79
191
  export async function waitForSootsimIdle({
80
192
  bridge,
81
193
  simId,
@@ -99,7 +211,15 @@ export async function waitForSootsimIdle({
99
211
  {
100
212
  type: 'evaluate',
101
213
  simId,
102
- code: `(async () => {
214
+ code: motionOnly
215
+ ? renderActivityIdleScript({
216
+ maxMs,
217
+ requiredStillMs:
218
+ Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs)),
219
+ transitionStartWindowMs,
220
+ transitionTimeoutMs,
221
+ })
222
+ : `(async () => {
103
223
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
104
224
  // tests inject a virtual clock as window.__sootsimIdleClock ({ now, sleep })
105
225
  // so the stillness window is proven in virtual time: real-timer polls under
@@ -122,13 +242,12 @@ export async function waitForSootsimIdle({
122
242
  const maestro = ${maestro ? 'true' : 'false'}
123
243
  const accessibilityBounds = ${accessibilityBounds.toString()}
124
244
  const sameNativeAccessibilityShape = ${sameNativeAccessibilityShape.toString()}
125
- const motionOnly = ${motionOnly ? 'true' : 'false'}
126
245
  const readyPlayback = ${readyPlayback ? 'true' : 'false'}
127
246
  // full mounted-geometry observation needs at least two hierarchy reads
128
247
  // plus the stillness window, which a sub-second budget cannot afford:
129
248
  // tight budgets (auto-wait) settle on worker stillness plus root
130
249
  // membership, generous ones confirm the geometry too.
131
- const fullGeometry = ${!maestro && !motionOnly && maxMs >= 1000 ? 'true' : 'false'}
250
+ const fullGeometry = ${!maestro && maxMs >= 1000 ? 'true' : 'false'}
132
251
  const requiredStillMs = paintStill ? 0 : ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
133
252
  const minimumStablePolls = paintStill ? 1 : ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
134
253
  const composite = paintStill ? window.SootSim?.bridges?.liveComposite : null
@@ -138,50 +257,7 @@ export async function waitForSootsimIdle({
138
257
  // subscribe to presented frames; authoritative screenshots force a
139
258
  // worker render, which changes the very counter we used to inspect.
140
259
  const unsubscribe = composite?.subscribe(() => {})
141
- // the tenant pushes each busy change to the page on the port its stats
142
- // replies use, so a wait on motion alone learns when the worker went
143
- // idle without asking it. its busy flag covers render work, guest and
144
- // blocking native animation, blocking frame callbacks and text waits,
145
- // everything a motion-only poll reads from it, so once it has held idle
146
- // for the still window that proves stillness without a poll: a worker
147
- // too loaded to answer twice within a gesture's budget still settles
148
- // once its motion ends.
149
- const activityHost = motionOnly ? window.__sootsimRenderHost : null
150
- const initialActivity = activityHost?.getRenderActivity?.()
151
- // a published frame proves this is an observed worker state, rather than
152
- // the host's pre-boot default. subscribe to its continuous idle interval
153
- // even when the busy-to-idle edge preceded this command.
154
- let busySeen = initialActivity?.busy === true || initialActivity?.frameToken > 0
155
- let idleSince = initialActivity?.busy === false && initialActivity?.frameToken > 0
156
- ? clockNow()
157
- : null
158
- let idleWaiters = []
159
- const unsubscribeActivity = activityHost?.subscribeRenderActivity?.(() => {
160
- if (activityHost.getRenderActivity().busy) {
161
- busySeen = true
162
- idleSince = null
163
- } else if (busySeen && idleSince === null) {
164
- idleSince = clockNow()
165
- const waiters = idleWaiters
166
- idleWaiters = []
167
- for (const waiter of waiters) waiter()
168
- }
169
- })
170
260
  let transitionEndedAt = null
171
- // resolves once both the tenant and any drained transition have held idle.
172
- const idleHeld = () =>
173
- new Promise((resolve) => {
174
- const check = () => {
175
- if (idleSince === null) idleWaiters.push(check)
176
- else {
177
- const quietSince = Math.max(idleSince, transitionEndedAt ?? idleSince)
178
- const remaining = requiredStillMs - (clockNow() - quietSince)
179
- if (remaining <= 0) resolve(true)
180
- else setTimeout(check, Math.max(1, remaining))
181
- }
182
- }
183
- check()
184
- })
185
261
  let pixelFrameToken = -1
186
262
  let screenPixels = null
187
263
  // the hierarchy read last taken and the geometry revision it answered.
@@ -263,7 +339,7 @@ export async function waitForSootsimIdle({
263
339
  // and realizes its pixels. both owners must finish before settling.
264
340
  // the compositor rejects a stats request it is too busy to answer.
265
341
  const compositorRead = answer(() => window.__sootsimCompositor.getStats({ detail: 'readiness' })).catch(() => BUSY)
266
- const countsRead = motionOnly ? null : answer(() => window.__sootsimTest?.getRequestCounts?.()).catch(() => null)
342
+ const countsRead = answer(() => window.__sootsimTest?.getRequestCounts?.()).catch(() => null)
267
343
  // the mounted hierarchy in render-worker mode comes from the test
268
344
  // bridge: window.__sootsimRoot is an empty placeholder there, so a
269
345
  // walk over it hashes every screen to the same empty string while
@@ -552,7 +628,6 @@ export async function waitForSootsimIdle({
552
628
  const hierarchyUnchanged = (current, previous) =>
553
629
  current !== null && previous !== null && current.length === previous.length &&
554
630
  current.every((node, index) => sameNativeAccessibilityShape(node, previous[index], accessibilityBounds))
555
- const IDLE_HELD = { idleHeld: true }
556
631
  while (true) {
557
632
  if (clockNow() >= deadline) {
558
633
  if (!transitionWait) break
@@ -564,33 +639,7 @@ export async function waitForSootsimIdle({
564
639
  if (clockNow() >= deadline) break
565
640
  }
566
641
  const pollStarted = clockNow()
567
- const read = readSnapshot()
568
- let snapshot = activityHost
569
- ? await Promise.race([read, idleHeld().then(() => IDLE_HELD)])
570
- : await read
571
- // a completed read can win the race before a delayed timer callback.
572
- // the recorded idle interval remains evidence even on that turn.
573
- const idleProven = () => {
574
- const quietSince = Math.max(idleSince ?? Infinity, transitionEndedAt ?? 0)
575
- return idleSince !== null && quietSince + requiredStillMs <= deadline && clockNow() - quietSince >= requiredStillMs
576
- }
577
- while (activityHost && (snapshot === IDLE_HELD || idleProven())) {
578
- if (transitionWait) {
579
- await transitionWait
580
- transitionWait = null
581
- }
582
- if (idleProven()) {
583
- return { settled: true, elapsed: clockNow() - start, blockedBy: '' }
584
- }
585
- if (clockNow() >= deadline) {
586
- snapshot = await read
587
- break
588
- }
589
- // a transition can drain after the first idle interval. keep the
590
- // pushed evidence armed while its remaining quiet interval holds;
591
- // awaiting only the in-flight stats read would discard that proof.
592
- snapshot = await Promise.race([read, idleHeld().then(() => IDLE_HELD)])
593
- }
642
+ const snapshot = await readSnapshot()
594
643
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
595
644
  // a read the deadline cut short observed nothing: the last full poll
596
645
  // names what held the settle, not a worker that ran out of budget.
@@ -635,7 +684,7 @@ export async function waitForSootsimIdle({
635
684
  !snapshot.animating &&
636
685
  !snapshot.shellAnimating &&
637
686
  !snapshot.layoutDirty &&
638
- (motionOnly || snapshot.pendingFetches === 0) &&
687
+ snapshot.pendingFetches === 0 &&
639
688
  !snapshot.workerBusy &&
640
689
  !snapshot.webViewStarting
641
690
  const visuallyStill = maestro ? maestroStill :
@@ -667,7 +716,7 @@ export async function waitForSootsimIdle({
667
716
  // grace (continuous background traffic must not block forever).
668
717
  if (
669
718
  stillProven() &&
670
- (maestro || motionOnly || networkQuiet || clockNow() - visuallyStillSince >= networkQuietGraceMs)
719
+ (maestro || networkQuiet || clockNow() - visuallyStillSince >= networkQuietGraceMs)
671
720
  ) {
672
721
  if (transitionWait) {
673
722
  await transitionWait
@@ -692,13 +741,6 @@ export async function waitForSootsimIdle({
692
741
  const remainingPollMs = pollMs - (clockNow() - pollStarted)
693
742
  if (remainingPollMs > 0) await clockSleep(remainingPollMs)
694
743
  }
695
- if (activityHost && idleSince !== null && idleSince + requiredStillMs <= deadline) {
696
- if (transitionWait) await transitionWait
697
- const quietSince = Math.max(idleSince ?? Infinity, transitionEndedAt ?? 0)
698
- if (quietSince + requiredStillMs <= deadline && clockNow() - quietSince >= requiredStillMs) {
699
- return { settled: true, elapsed: clockNow() - start, blockedBy: '' }
700
- }
701
- }
702
744
  if (!report) {
703
745
  return { settled: false, elapsed: clockNow() - start, blockedBy: 'no poll fit the budget' }
704
746
  }
@@ -710,15 +752,15 @@ export async function waitForSootsimIdle({
710
752
  if (!maestro && last.layoutDirty) blockers.push('layout still dirty')
711
753
  if (!maestro && last.appCommits !== null && report.appCommits !== null && last.appCommits !== report.appCommits) blockers.push('layout commits still landing')
712
754
  if (!maestro && last.nodeCount !== null && report.nodeCount !== null && last.nodeCount !== report.nodeCount) blockers.push('node count still changing')
713
- if (!maestro && !motionOnly && last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
755
+ if (!maestro && last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
714
756
  if (last.workerBusy) blockers.push('a render worker too busy to report')
715
757
  if (last.webViewStarting) blockers.push(last.webViewBlocker || 'webView still starting')
716
758
  if (!maestro && last.layout !== report.layout) blockers.push('layout still changing')
717
759
  if (maestro && !hierarchyUnchanged(last.nativeHierarchy, report.nativeHierarchy)) blockers.push(last.nativeHierarchy === null ? 'native accessibility hierarchy unavailable' : 'native accessibility hierarchy still changing')
718
760
  if (paintStill && !last.screenPixels) blockers.push('screen pixels unavailable')
719
761
  else if (paintStill && !screenUnchanged(last.screenPixels, report.screenPixels)) blockers.push('screen pixels still changing')
720
- if (!maestro && !motionOnly && last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
721
- else if (!maestro && !motionOnly && last.requestTotal !== report.requestTotal) blockers.push('new requests issued')
762
+ if (!maestro && last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
763
+ else if (!maestro && last.requestTotal !== report.requestTotal) blockers.push('new requests issued')
722
764
  if (polls < 2) blockers.push('sim too busy to poll twice')
723
765
  // the last read is still: motion ended too near the deadline for the
724
766
  // stillness window to hold before it.
@@ -729,12 +771,10 @@ export async function waitForSootsimIdle({
729
771
  blockedBy:
730
772
  blockers.join(', ') + ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
731
773
  'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, webViewStarting ' + webViewStartingPolls + 'x, screen changed ' + screenChangedPolls + 'x)' +
732
- (lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : '') +
733
- (activityHost ? '; tenant activity ' + JSON.stringify({ initial: initialActivity, current: activityHost.getRenderActivity?.(), busySeen, idleSince, transitionEndedAt, startedAt: start }) : ''),
774
+ (lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : ''),
734
775
  }
735
776
  } finally {
736
777
  unsubscribe?.()
737
- unsubscribeActivity?.()
738
778
  }
739
779
  })()`,
740
780
  },
@@ -843,6 +843,10 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
843
843
  category: 'cli_release_publish',
844
844
  count: 1,
845
845
  },
846
+ 'packages/peachsim/scripts/publish-cli-binaries.ts :: fetch :: url': {
847
+ category: 'cli_release_publish',
848
+ count: 1,
849
+ },
846
850
  'packages/peachsim/cli/commands/upload.ts :: fetch :: manifestUrl': {
847
851
  category: 'local_development',
848
852
  count: 1,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1173,22 +1173,37 @@ function readCompiledMetadata(label, value, readPackage, names) {
1173
1173
  return { platform: "ios", packages, url, hash, icuUrl: icuUrl2, bundleFiles };
1174
1174
  }
1175
1175
  function readTurboMetadata(value) {
1176
+ if (value === null || value === void 0) return null;
1177
+ if (typeof value !== "object" || Array.isArray(value) || Reflect.get(value, "platform") !== NITRO_GUEST_PLATFORM)
1178
+ throw new Error("invalid TurboModule compilation metadata");
1179
+ const listed = Reflect.get(value, "unavailable");
1180
+ if (listed !== void 0 && !Array.isArray(listed))
1181
+ throw new Error("invalid TurboModule compilation metadata");
1182
+ const unavailable2 = listed?.map((entry) => {
1183
+ if (!isRecord(entry) || typeof entry.name !== "string" || !entry.name || typeof entry.diagnostic !== "string" || !entry.diagnostic)
1184
+ throw new Error("invalid TurboModule compilation metadata");
1185
+ return { name: entry.name, diagnostic: entry.diagnostic };
1186
+ });
1187
+ const packages = Reflect.get(value, "packages");
1188
+ const packed = Reflect.get(value, "bundleFiles");
1189
+ if (Array.isArray(packages) && packages.length === 0 && unavailable2 && unavailable2.length > 0 && Reflect.get(value, "url") === "" && Reflect.get(value, "hash") === "" && Reflect.get(value, "icuUrl") === "" && isRecord(packed) && Object.keys(packed).length === 0) {
1190
+ return {
1191
+ platform: "ios",
1192
+ packages: [],
1193
+ url: "",
1194
+ hash: "",
1195
+ icuUrl: "",
1196
+ bundleFiles: {},
1197
+ unavailable: unavailable2
1198
+ };
1199
+ }
1176
1200
  const metadata = readCompiledMetadata(
1177
1201
  "TurboModule",
1178
1202
  value,
1179
1203
  readCompiledPackage,
1180
1204
  () => []
1181
1205
  );
1182
- if (!metadata) return null;
1183
- const listed = Reflect.get(Object(value), "unavailable");
1184
- if (listed === void 0) return metadata;
1185
- if (!Array.isArray(listed)) throw new Error("invalid TurboModule compilation metadata");
1186
- const unavailable2 = listed.map((entry) => {
1187
- if (!isRecord(entry) || typeof entry.name !== "string" || typeof entry.diagnostic !== "string")
1188
- throw new Error("invalid TurboModule compilation metadata");
1189
- return { name: entry.name, diagnostic: entry.diagnostic };
1190
- });
1191
- return { ...metadata, unavailable: unavailable2 };
1206
+ return metadata && (unavailable2 ? { ...metadata, unavailable: unavailable2 } : metadata);
1192
1207
  }
1193
1208
  function insertNitroFooter(source, metadata) {
1194
1209
  readNitroMetadata(metadata);
@@ -33893,8 +33908,9 @@ function readSources(value) {
33893
33908
  function packageRootOf(appRoot, file) {
33894
33909
  const parts = file.split("/");
33895
33910
  if (parts[0] !== "node_modules") return null;
33896
- const depth = parts[1]?.startsWith("@") ? 3 : 2;
33897
- return parts.length > depth ? import_node_path55.default.join(appRoot, ...parts.slice(0, depth)) : null;
33911
+ const at = parts.lastIndexOf("node_modules") + 1;
33912
+ const end = at + (parts[at]?.startsWith("@") ? 2 : 1);
33913
+ return parts.length > end ? import_node_path55.default.join(appRoot, ...parts.slice(0, end)) : null;
33898
33914
  }
33899
33915
  async function expoNativeInputs(appRoot) {
33900
33916
  appRoot = import_node_fs56.default.realpathSync(appRoot);
@@ -34077,7 +34093,7 @@ var init_expo_native_prebuilt = __esm({
34077
34093
  init_swift_native_pin();
34078
34094
  init_xcode_project();
34079
34095
  EXPO_NATIVE_ENTRY_NAME = "ios";
34080
- EXPO_NATIVE_COMPILER_DIGEST = true ? "56768b586c8abed368bc0b809466dd18e971de9e5684301bed01591bcbb3a12c" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
34096
+ EXPO_NATIVE_COMPILER_DIGEST = true ? "c19c10cb13f53c55d6312f5229410857ba6b6af4a47aec45ed8b581e313603a5" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
34081
34097
  IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
34082
34098
  expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
34083
34099
  isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
@@ -43020,8 +43036,9 @@ function sourceContentStamp(packagePath, moduleRootOverride) {
43020
43036
  hash.update(JSON.stringify(projects().get(packagePath)?.nativeFiles ?? {}));
43021
43037
  hash.update(JSON.stringify(projects().get(packagePath)?.resourceBundles ?? []));
43022
43038
  hash.update(JSON.stringify(projects().get(packagePath)?.bundleFiles ?? null));
43039
+ const root = import_node_fs70.default.realpathSync(packagePath);
43023
43040
  for (const file of [...new Set(packageFiles(packagePath))].sort()) {
43024
- hash.update(import_node_path68.default.relative(packagePath, file));
43041
+ hash.update(import_node_path68.default.relative(root, file));
43025
43042
  hash.update(import_node_fs70.default.readFileSync(file));
43026
43043
  }
43027
43044
  hash.update(moduleStamp(packagePath, moduleRootOverride, false));
@@ -45762,9 +45779,9 @@ function registersReactModule(source) {
45762
45779
  return OBJC_BRIDGE.test(stripped2) && !/-Swift\.h\b/.test(stripped2);
45763
45780
  }
45764
45781
  function fabricComponents(root) {
45765
- const manifest = JSON.parse(
45766
- import_node_fs74.default.readFileSync(import_node_path72.default.join(root, "package.json"), "utf8")
45767
- );
45782
+ const manifestPath = import_node_path72.default.join(root, "package.json");
45783
+ if (!import_node_fs74.default.existsSync(manifestPath)) return false;
45784
+ const manifest = JSON.parse(import_node_fs74.default.readFileSync(manifestPath, "utf8"));
45768
45785
  if (!object3(manifest) || !object3(manifest.codegenConfig)) return false;
45769
45786
  return manifest.codegenConfig.type !== "modules";
45770
45787
  }
@@ -50979,7 +50996,7 @@ var init_nitro_superset = __esm({
50979
50996
  init_swift_standin_digest();
50980
50997
  NITRO_SUPERSET_ENTRY_NAME = "superset";
50981
50998
  packageVersion = (root) => JSON.parse((0, import_node_fs80.readFileSync)((0, import_node_path78.join)(root, "package.json"), "utf8")).version;
50982
- NITRO_COMPILER_DIGEST = true ? "5a02e7fa03e20f7cc2acbe461109d7f5fbb6d88c7377335749c98c5d31329376" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
50999
+ NITRO_COMPILER_DIGEST = true ? "6cb2069b8076b1a3a0418395301a5cf231a5fae13c2758814eeddcadefb70171" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
50983
51000
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
50984
51001
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
50985
51002
  published2 = /* @__PURE__ */ new Map();
@@ -51571,7 +51588,18 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget) {
51571
51588
  const compiled = providers.filter(({ name: name3 }) => !installed?.unavailable.has(name3));
51572
51589
  if (compiled.length === 0) {
51573
51590
  for (const { diagnostic } of unavailable2) console.warn(`[peach] ${diagnostic}`);
51574
- return null;
51591
+ return unavailable2.length > 0 ? {
51592
+ artifact: null,
51593
+ metadata: {
51594
+ platform: "ios",
51595
+ packages: [],
51596
+ url: "",
51597
+ hash: "",
51598
+ icuUrl: "",
51599
+ bundleFiles: {},
51600
+ unavailable: unavailable2
51601
+ }
51602
+ } : null;
51575
51603
  }
51576
51604
  const { artifact, collection } = await compileTurboModule({
51577
51605
  appRoot,
@@ -57783,7 +57811,11 @@ function insertNativeBundleFooters(source, natives, locate) {
57783
57811
  }
57784
57812
  if (natives.turbo) {
57785
57813
  const turbo = natives.turbo.metadata;
57786
- metadata.turbo = { ...turbo, url: served(turbo.url), icuUrl: served(turbo.icuUrl) };
57814
+ metadata.turbo = {
57815
+ ...turbo,
57816
+ url: turbo.url && served(turbo.url),
57817
+ icuUrl: turbo.icuUrl && served(turbo.icuUrl)
57818
+ };
57787
57819
  source = insertTurboFooter(source, metadata.turbo);
57788
57820
  }
57789
57821
  return { source, metadata: Object.keys(metadata).length ? metadata : null };
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1873 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (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);