peachsim 0.1.1874 → 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
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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;
@@ -59026,22 +59026,37 @@ function readCompiledMetadata(label, value, readPackage, names) {
59026
59026
  return { platform: "ios", packages, url, hash, icuUrl: icuUrl2, bundleFiles };
59027
59027
  }
59028
59028
  function readTurboMetadata(value) {
59029
+ if (value === null || value === void 0) return null;
59030
+ if (typeof value !== "object" || Array.isArray(value) || Reflect.get(value, "platform") !== NITRO_GUEST_PLATFORM)
59031
+ throw new Error("invalid TurboModule compilation metadata");
59032
+ const listed = Reflect.get(value, "unavailable");
59033
+ if (listed !== void 0 && !Array.isArray(listed))
59034
+ throw new Error("invalid TurboModule compilation metadata");
59035
+ const unavailable2 = listed?.map((entry) => {
59036
+ if (!isRecord(entry) || typeof entry.name !== "string" || !entry.name || typeof entry.diagnostic !== "string" || !entry.diagnostic)
59037
+ throw new Error("invalid TurboModule compilation metadata");
59038
+ return { name: entry.name, diagnostic: entry.diagnostic };
59039
+ });
59040
+ const packages = Reflect.get(value, "packages");
59041
+ const packed = Reflect.get(value, "bundleFiles");
59042
+ 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) {
59043
+ return {
59044
+ platform: "ios",
59045
+ packages: [],
59046
+ url: "",
59047
+ hash: "",
59048
+ icuUrl: "",
59049
+ bundleFiles: {},
59050
+ unavailable: unavailable2
59051
+ };
59052
+ }
59029
59053
  const metadata = readCompiledMetadata(
59030
59054
  "TurboModule",
59031
59055
  value,
59032
59056
  readCompiledPackage,
59033
59057
  () => []
59034
59058
  );
59035
- if (!metadata) return null;
59036
- const listed = Reflect.get(Object(value), "unavailable");
59037
- if (listed === void 0) return metadata;
59038
- if (!Array.isArray(listed)) throw new Error("invalid TurboModule compilation metadata");
59039
- const unavailable2 = listed.map((entry) => {
59040
- if (!isRecord(entry) || typeof entry.name !== "string" || typeof entry.diagnostic !== "string")
59041
- throw new Error("invalid TurboModule compilation metadata");
59042
- return { name: entry.name, diagnostic: entry.diagnostic };
59043
- });
59044
- return { ...metadata, unavailable: unavailable2 };
59059
+ return metadata && (unavailable2 ? { ...metadata, unavailable: unavailable2 } : metadata);
59045
59060
  }
59046
59061
  var NITRO_GUEST_PLATFORM, readNitroMetadata;
59047
59062
  var init_nitroContract = __esm({
@@ -59110,8 +59125,9 @@ function readSources(value) {
59110
59125
  function packageRootOf(appRoot, file) {
59111
59126
  const parts = file.split("/");
59112
59127
  if (parts[0] !== "node_modules") return null;
59113
- const depth = parts[1]?.startsWith("@") ? 3 : 2;
59114
- return parts.length > depth ? import_node_path57.default.join(appRoot, ...parts.slice(0, depth)) : null;
59128
+ const at = parts.lastIndexOf("node_modules") + 1;
59129
+ const end = at + (parts[at]?.startsWith("@") ? 2 : 1);
59130
+ return parts.length > end ? import_node_path57.default.join(appRoot, ...parts.slice(0, end)) : null;
59115
59131
  }
59116
59132
  async function expoNativeInputs(appRoot) {
59117
59133
  appRoot = import_node_fs59.default.realpathSync(appRoot);
@@ -59294,7 +59310,7 @@ var init_expo_native_prebuilt = __esm({
59294
59310
  init_swift_native_pin();
59295
59311
  init_xcode_project();
59296
59312
  EXPO_NATIVE_ENTRY_NAME = "ios";
59297
- EXPO_NATIVE_COMPILER_DIGEST = true ? "56768b586c8abed368bc0b809466dd18e971de9e5684301bed01591bcbb3a12c" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59313
+ EXPO_NATIVE_COMPILER_DIGEST = true ? "c19c10cb13f53c55d6312f5229410857ba6b6af4a47aec45ed8b581e313603a5" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59298
59314
  IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
59299
59315
  expoNativeEntryUrl = (key2, file) => `${NATIVE_PREBUILT_ORIGIN}/${nativeEntryPrefix("expo", EXPO_NATIVE_ENTRY_NAME, key2)}/${file}`;
59300
59316
  isStringRecord = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
@@ -68374,8 +68390,9 @@ function sourceContentStamp(packagePath, moduleRootOverride) {
68374
68390
  hash.update(JSON.stringify(projects().get(packagePath)?.nativeFiles ?? {}));
68375
68391
  hash.update(JSON.stringify(projects().get(packagePath)?.resourceBundles ?? []));
68376
68392
  hash.update(JSON.stringify(projects().get(packagePath)?.bundleFiles ?? null));
68393
+ const root = import_node_fs73.default.realpathSync(packagePath);
68377
68394
  for (const file of [...new Set(packageFiles(packagePath))].sort()) {
68378
- hash.update(import_node_path70.default.relative(packagePath, file));
68395
+ hash.update(import_node_path70.default.relative(root, file));
68379
68396
  hash.update(import_node_fs73.default.readFileSync(file));
68380
68397
  }
68381
68398
  hash.update(moduleStamp(packagePath, moduleRootOverride, false));
@@ -71310,9 +71327,9 @@ function registersReactModule(source) {
71310
71327
  return OBJC_BRIDGE.test(stripped2) && !/-Swift\.h\b/.test(stripped2);
71311
71328
  }
71312
71329
  function fabricComponents(root) {
71313
- const manifest = JSON.parse(
71314
- import_node_fs77.default.readFileSync(import_node_path74.default.join(root, "package.json"), "utf8")
71315
- );
71330
+ const manifestPath = import_node_path74.default.join(root, "package.json");
71331
+ if (!import_node_fs77.default.existsSync(manifestPath)) return false;
71332
+ const manifest = JSON.parse(import_node_fs77.default.readFileSync(manifestPath, "utf8"));
71316
71333
  if (!object3(manifest) || !object3(manifest.codegenConfig)) return false;
71317
71334
  return manifest.codegenConfig.type !== "modules";
71318
71335
  }
@@ -77070,7 +77087,7 @@ var init_nitro_superset = __esm({
77070
77087
  init_swift_standin_digest();
77071
77088
  NITRO_SUPERSET_ENTRY_NAME = "superset";
77072
77089
  packageVersion = (root) => JSON.parse((0, import_node_fs86.readFileSync)((0, import_node_path83.join)(root, "package.json"), "utf8")).version;
77073
- NITRO_COMPILER_DIGEST = true ? "5a02e7fa03e20f7cc2acbe461109d7f5fbb6d88c7377335749c98c5d31329376" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
77090
+ NITRO_COMPILER_DIGEST = true ? "6cb2069b8076b1a3a0418395301a5cf231a5fae13c2758814eeddcadefb70171" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
77074
77091
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
77075
77092
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
77076
77093
  published2 = /* @__PURE__ */ new Map();
@@ -77318,7 +77335,7 @@ var init_expo_widgets_bundle = __esm({
77318
77335
  var runtime_companion_default;
77319
77336
  var init_runtime_companion = __esm({
77320
77337
  "runtime-companion.json"() {
77321
- runtime_companion_default = { abi: 1, sha256: "1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373", file: "node/cli-1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373.cjs" };
77338
+ runtime_companion_default = { abi: 1, sha256: "f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467", file: "node/cli-f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467.cjs" };
77322
77339
  }
77323
77340
  });
77324
77341
 
@@ -77798,7 +77815,18 @@ async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget) {
77798
77815
  const compiled = providers.filter(({ name: name3 }) => !installed2?.unavailable.has(name3));
77799
77816
  if (compiled.length === 0) {
77800
77817
  for (const { diagnostic } of unavailable2) console.warn(`[peach] ${diagnostic}`);
77801
- return null;
77818
+ return unavailable2.length > 0 ? {
77819
+ artifact: null,
77820
+ metadata: {
77821
+ platform: "ios",
77822
+ packages: [],
77823
+ url: "",
77824
+ hash: "",
77825
+ icuUrl: "",
77826
+ bundleFiles: {},
77827
+ unavailable: unavailable2
77828
+ }
77829
+ } : null;
77802
77830
  }
77803
77831
  const { artifact, collection } = await compileTurboModule({
77804
77832
  appRoot,
@@ -116781,6 +116809,105 @@ var init_maestro_accessibility = __esm({
116781
116809
  });
116782
116810
 
116783
116811
  // cli/commands/inspect/settling.ts
116812
+ function renderActivityIdleScript({
116813
+ maxMs,
116814
+ requiredStillMs,
116815
+ transitionStartWindowMs,
116816
+ transitionTimeoutMs
116817
+ }) {
116818
+ return `(async () => {
116819
+ const start = Date.now()
116820
+ const budgetMs = ${Math.max(0, Math.round(maxMs))}
116821
+ const requiredStillMs = ${Math.max(1, Math.round(requiredStillMs))}
116822
+ let deadline = start + budgetMs
116823
+ // with no tenant running, nothing an app draws can move.
116824
+ const host = window.__sootsimRenderHost ?? null
116825
+ const initial = host ? host.getRenderActivity() : null
116826
+ // a published frame proves the idle flag is an observed worker state, not
116827
+ // the host's pre-boot default, so its idle interval counts from now even
116828
+ // when the busy-to-idle edge preceded this wait.
116829
+ let busySeen = !initial || initial.busy || initial.frameToken > 0
116830
+ let idleSince = !initial || (!initial.busy && initial.frameToken > 0) ? start : null
116831
+ let wake = null
116832
+ const notify = () => {
116833
+ const resolve = wake
116834
+ wake = null
116835
+ resolve?.()
116836
+ }
116837
+ const unsubscribe = host?.subscribeRenderActivity(() => {
116838
+ if (host.getRenderActivity().busy) {
116839
+ busySeen = true
116840
+ idleSince = null
116841
+ } else if (busySeen && idleSince === null) {
116842
+ idleSince = Date.now()
116843
+ }
116844
+ notify()
116845
+ })
116846
+ // a started screen transition moves the deadline: it drains, then the
116847
+ // budget proves the new screen. a loaded host runs a push past a tap's
116848
+ // budget, so the transition carries its own timeout.
116849
+ let transitionEndedAt = null
116850
+ let transitionPending = budgetMs > 120 && typeof window.__sootsimTest?.waitForScreenTransitions === 'function'
116851
+ if (transitionPending) {
116852
+ Promise.resolve()
116853
+ .then(() => window.__sootsimTest.waitForScreenTransitions({
116854
+ timeoutMs: ${Math.max(0, Math.round(transitionTimeoutMs))},
116855
+ settleMs: 64,
116856
+ startWindowMs: ${Math.max(0, Math.round(transitionStartWindowMs))},
116857
+ }))
116858
+ .then((transition) => {
116859
+ if (transition?.started !== true) return
116860
+ // a loaded worker replies after the motion stopped and says how long ago.
116861
+ transitionEndedAt = Date.now() - Math.max(0, transition.restedMs ?? 0)
116862
+ deadline = Math.max(deadline, transitionEndedAt + budgetMs)
116863
+ }, () => {})
116864
+ .finally(() => {
116865
+ transitionPending = false
116866
+ notify()
116867
+ })
116868
+ }
116869
+ try {
116870
+ while (true) {
116871
+ const now = Date.now()
116872
+ const quietSince = idleSince === null ? null : Math.max(idleSince, transitionEndedAt ?? idleSince)
116873
+ if (!transitionPending && quietSince !== null && now - quietSince >= requiredStillMs) {
116874
+ return { settled: true, elapsed: now - start, blockedBy: '' }
116875
+ }
116876
+ if (!transitionPending && now >= deadline) break
116877
+ const until = !transitionPending && quietSince !== null
116878
+ ? Math.min(quietSince + requiredStillMs, deadline)
116879
+ : deadline
116880
+ let timer = null
116881
+ await new Promise((resolve) => {
116882
+ wake = resolve
116883
+ if (until > now) timer = setTimeout(notify, until - now)
116884
+ })
116885
+ clearTimeout(timer)
116886
+ }
116887
+ } finally {
116888
+ unsubscribe?.()
116889
+ }
116890
+ const blockers = []
116891
+ const stats = await Promise.race([
116892
+ Promise.resolve().then(() => host?.queryStats()).catch(() => null),
116893
+ new Promise((resolve) => setTimeout(() => resolve(null), 500)),
116894
+ ])
116895
+ if (stats) {
116896
+ if (stats.hasActiveAnims) blockers.push('animations still running')
116897
+ if (stats.hasActiveBlockingNativeAnimations) blockers.push('native animations still running')
116898
+ if (stats.hasPendingBlockingAnimationFrames) blockers.push('frame callbacks still pending')
116899
+ if (stats.layoutDirty && stats.renderRequested) blockers.push('layout still dirty')
116900
+ }
116901
+ if (!blockers.length) blockers.push(idleSince === null ? 'tenant render activity still busy' : 'motion ended before stillness was proven')
116902
+ return {
116903
+ settled: false,
116904
+ elapsed: Date.now() - start,
116905
+ blockedBy: blockers.join(', ') + '; tenant activity ' + JSON.stringify({
116906
+ initial, current: host?.getRenderActivity() ?? null, busySeen, idleSince, transitionEndedAt, startedAt: start,
116907
+ }),
116908
+ }
116909
+ })()`;
116910
+ }
116784
116911
  async function waitForSootsimIdle({
116785
116912
  bridge,
116786
116913
  simId,
@@ -116802,7 +116929,12 @@ async function waitForSootsimIdle({
116802
116929
  {
116803
116930
  type: "evaluate",
116804
116931
  simId,
116805
- code: `(async () => {
116932
+ code: motionOnly ? renderActivityIdleScript({
116933
+ maxMs,
116934
+ requiredStillMs: Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs)),
116935
+ transitionStartWindowMs,
116936
+ transitionTimeoutMs
116937
+ }) : `(async () => {
116806
116938
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
116807
116939
  // tests inject a virtual clock as window.__sootsimIdleClock ({ now, sleep })
116808
116940
  // so the stillness window is proven in virtual time: real-timer polls under
@@ -116825,13 +116957,12 @@ async function waitForSootsimIdle({
116825
116957
  const maestro = ${maestro ? "true" : "false"}
116826
116958
  const accessibilityBounds = ${accessibilityBounds.toString()}
116827
116959
  const sameNativeAccessibilityShape = ${sameNativeAccessibilityShape.toString()}
116828
- const motionOnly = ${motionOnly ? "true" : "false"}
116829
116960
  const readyPlayback = ${readyPlayback ? "true" : "false"}
116830
116961
  // full mounted-geometry observation needs at least two hierarchy reads
116831
116962
  // plus the stillness window, which a sub-second budget cannot afford:
116832
116963
  // tight budgets (auto-wait) settle on worker stillness plus root
116833
116964
  // membership, generous ones confirm the geometry too.
116834
- const fullGeometry = ${!maestro && !motionOnly && maxMs >= 1e3 ? "true" : "false"}
116965
+ const fullGeometry = ${!maestro && maxMs >= 1e3 ? "true" : "false"}
116835
116966
  const requiredStillMs = paintStill ? 0 : ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
116836
116967
  const minimumStablePolls = paintStill ? 1 : ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
116837
116968
  const composite = paintStill ? window.SootSim?.bridges?.liveComposite : null
@@ -116841,50 +116972,7 @@ async function waitForSootsimIdle({
116841
116972
  // subscribe to presented frames; authoritative screenshots force a
116842
116973
  // worker render, which changes the very counter we used to inspect.
116843
116974
  const unsubscribe = composite?.subscribe(() => {})
116844
- // the tenant pushes each busy change to the page on the port its stats
116845
- // replies use, so a wait on motion alone learns when the worker went
116846
- // idle without asking it. its busy flag covers render work, guest and
116847
- // blocking native animation, blocking frame callbacks and text waits,
116848
- // everything a motion-only poll reads from it, so once it has held idle
116849
- // for the still window that proves stillness without a poll: a worker
116850
- // too loaded to answer twice within a gesture's budget still settles
116851
- // once its motion ends.
116852
- const activityHost = motionOnly ? window.__sootsimRenderHost : null
116853
- const initialActivity = activityHost?.getRenderActivity?.()
116854
- // a published frame proves this is an observed worker state, rather than
116855
- // the host's pre-boot default. subscribe to its continuous idle interval
116856
- // even when the busy-to-idle edge preceded this command.
116857
- let busySeen = initialActivity?.busy === true || initialActivity?.frameToken > 0
116858
- let idleSince = initialActivity?.busy === false && initialActivity?.frameToken > 0
116859
- ? clockNow()
116860
- : null
116861
- let idleWaiters = []
116862
- const unsubscribeActivity = activityHost?.subscribeRenderActivity?.(() => {
116863
- if (activityHost.getRenderActivity().busy) {
116864
- busySeen = true
116865
- idleSince = null
116866
- } else if (busySeen && idleSince === null) {
116867
- idleSince = clockNow()
116868
- const waiters = idleWaiters
116869
- idleWaiters = []
116870
- for (const waiter of waiters) waiter()
116871
- }
116872
- })
116873
116975
  let transitionEndedAt = null
116874
- // resolves once both the tenant and any drained transition have held idle.
116875
- const idleHeld = () =>
116876
- new Promise((resolve) => {
116877
- const check = () => {
116878
- if (idleSince === null) idleWaiters.push(check)
116879
- else {
116880
- const quietSince = Math.max(idleSince, transitionEndedAt ?? idleSince)
116881
- const remaining = requiredStillMs - (clockNow() - quietSince)
116882
- if (remaining <= 0) resolve(true)
116883
- else setTimeout(check, Math.max(1, remaining))
116884
- }
116885
- }
116886
- check()
116887
- })
116888
116976
  let pixelFrameToken = -1
116889
116977
  let screenPixels = null
116890
116978
  // the hierarchy read last taken and the geometry revision it answered.
@@ -116966,7 +117054,7 @@ async function waitForSootsimIdle({
116966
117054
  // and realizes its pixels. both owners must finish before settling.
116967
117055
  // the compositor rejects a stats request it is too busy to answer.
116968
117056
  const compositorRead = answer(() => window.__sootsimCompositor.getStats({ detail: 'readiness' })).catch(() => BUSY)
116969
- const countsRead = motionOnly ? null : answer(() => window.__sootsimTest?.getRequestCounts?.()).catch(() => null)
117057
+ const countsRead = answer(() => window.__sootsimTest?.getRequestCounts?.()).catch(() => null)
116970
117058
  // the mounted hierarchy in render-worker mode comes from the test
116971
117059
  // bridge: window.__sootsimRoot is an empty placeholder there, so a
116972
117060
  // walk over it hashes every screen to the same empty string while
@@ -117255,7 +117343,6 @@ async function waitForSootsimIdle({
117255
117343
  const hierarchyUnchanged = (current, previous) =>
117256
117344
  current !== null && previous !== null && current.length === previous.length &&
117257
117345
  current.every((node, index) => sameNativeAccessibilityShape(node, previous[index], accessibilityBounds))
117258
- const IDLE_HELD = { idleHeld: true }
117259
117346
  while (true) {
117260
117347
  if (clockNow() >= deadline) {
117261
117348
  if (!transitionWait) break
@@ -117267,33 +117354,7 @@ async function waitForSootsimIdle({
117267
117354
  if (clockNow() >= deadline) break
117268
117355
  }
117269
117356
  const pollStarted = clockNow()
117270
- const read = readSnapshot()
117271
- let snapshot = activityHost
117272
- ? await Promise.race([read, idleHeld().then(() => IDLE_HELD)])
117273
- : await read
117274
- // a completed read can win the race before a delayed timer callback.
117275
- // the recorded idle interval remains evidence even on that turn.
117276
- const idleProven = () => {
117277
- const quietSince = Math.max(idleSince ?? Infinity, transitionEndedAt ?? 0)
117278
- return idleSince !== null && quietSince + requiredStillMs <= deadline && clockNow() - quietSince >= requiredStillMs
117279
- }
117280
- while (activityHost && (snapshot === IDLE_HELD || idleProven())) {
117281
- if (transitionWait) {
117282
- await transitionWait
117283
- transitionWait = null
117284
- }
117285
- if (idleProven()) {
117286
- return { settled: true, elapsed: clockNow() - start, blockedBy: '' }
117287
- }
117288
- if (clockNow() >= deadline) {
117289
- snapshot = await read
117290
- break
117291
- }
117292
- // a transition can drain after the first idle interval. keep the
117293
- // pushed evidence armed while its remaining quiet interval holds;
117294
- // awaiting only the in-flight stats read would discard that proof.
117295
- snapshot = await Promise.race([read, idleHeld().then(() => IDLE_HELD)])
117296
- }
117357
+ const snapshot = await readSnapshot()
117297
117358
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
117298
117359
  // a read the deadline cut short observed nothing: the last full poll
117299
117360
  // names what held the settle, not a worker that ran out of budget.
@@ -117338,7 +117399,7 @@ async function waitForSootsimIdle({
117338
117399
  !snapshot.animating &&
117339
117400
  !snapshot.shellAnimating &&
117340
117401
  !snapshot.layoutDirty &&
117341
- (motionOnly || snapshot.pendingFetches === 0) &&
117402
+ snapshot.pendingFetches === 0 &&
117342
117403
  !snapshot.workerBusy &&
117343
117404
  !snapshot.webViewStarting
117344
117405
  const visuallyStill = maestro ? maestroStill :
@@ -117370,7 +117431,7 @@ async function waitForSootsimIdle({
117370
117431
  // grace (continuous background traffic must not block forever).
117371
117432
  if (
117372
117433
  stillProven() &&
117373
- (maestro || motionOnly || networkQuiet || clockNow() - visuallyStillSince >= networkQuietGraceMs)
117434
+ (maestro || networkQuiet || clockNow() - visuallyStillSince >= networkQuietGraceMs)
117374
117435
  ) {
117375
117436
  if (transitionWait) {
117376
117437
  await transitionWait
@@ -117395,13 +117456,6 @@ async function waitForSootsimIdle({
117395
117456
  const remainingPollMs = pollMs - (clockNow() - pollStarted)
117396
117457
  if (remainingPollMs > 0) await clockSleep(remainingPollMs)
117397
117458
  }
117398
- if (activityHost && idleSince !== null && idleSince + requiredStillMs <= deadline) {
117399
- if (transitionWait) await transitionWait
117400
- const quietSince = Math.max(idleSince ?? Infinity, transitionEndedAt ?? 0)
117401
- if (quietSince + requiredStillMs <= deadline && clockNow() - quietSince >= requiredStillMs) {
117402
- return { settled: true, elapsed: clockNow() - start, blockedBy: '' }
117403
- }
117404
- }
117405
117459
  if (!report) {
117406
117460
  return { settled: false, elapsed: clockNow() - start, blockedBy: 'no poll fit the budget' }
117407
117461
  }
@@ -117413,15 +117467,15 @@ async function waitForSootsimIdle({
117413
117467
  if (!maestro && last.layoutDirty) blockers.push('layout still dirty')
117414
117468
  if (!maestro && last.appCommits !== null && report.appCommits !== null && last.appCommits !== report.appCommits) blockers.push('layout commits still landing')
117415
117469
  if (!maestro && last.nodeCount !== null && report.nodeCount !== null && last.nodeCount !== report.nodeCount) blockers.push('node count still changing')
117416
- if (!maestro && !motionOnly && last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
117470
+ if (!maestro && last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
117417
117471
  if (last.workerBusy) blockers.push('a render worker too busy to report')
117418
117472
  if (last.webViewStarting) blockers.push(last.webViewBlocker || 'webView still starting')
117419
117473
  if (!maestro && last.layout !== report.layout) blockers.push('layout still changing')
117420
117474
  if (maestro && !hierarchyUnchanged(last.nativeHierarchy, report.nativeHierarchy)) blockers.push(last.nativeHierarchy === null ? 'native accessibility hierarchy unavailable' : 'native accessibility hierarchy still changing')
117421
117475
  if (paintStill && !last.screenPixels) blockers.push('screen pixels unavailable')
117422
117476
  else if (paintStill && !screenUnchanged(last.screenPixels, report.screenPixels)) blockers.push('screen pixels still changing')
117423
- if (!maestro && !motionOnly && last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
117424
- else if (!maestro && !motionOnly && last.requestTotal !== report.requestTotal) blockers.push('new requests issued')
117477
+ if (!maestro && last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
117478
+ else if (!maestro && last.requestTotal !== report.requestTotal) blockers.push('new requests issued')
117425
117479
  if (polls < 2) blockers.push('sim too busy to poll twice')
117426
117480
  // the last read is still: motion ended too near the deadline for the
117427
117481
  // stillness window to hold before it.
@@ -117432,12 +117486,10 @@ async function waitForSootsimIdle({
117432
117486
  blockedBy:
117433
117487
  blockers.join(', ') + ' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
117434
117488
  'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, webViewStarting ' + webViewStartingPolls + 'x, screen changed ' + screenChangedPolls + 'x)' +
117435
- (lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : '') +
117436
- (activityHost ? '; tenant activity ' + JSON.stringify({ initial: initialActivity, current: activityHost.getRenderActivity?.(), busySeen, idleSince, transitionEndedAt, startedAt: start }) : ''),
117489
+ (lastLayoutChange ? '; last layout change ' + JSON.stringify(lastLayoutChange) : ''),
117437
117490
  }
117438
117491
  } finally {
117439
117492
  unsubscribe?.()
117440
- unsubscribeActivity?.()
117441
117493
  }
117442
117494
  })()`
117443
117495
  },
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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.1874 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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.1874 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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.1874 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (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
- /*! peach v0.1.1874 | (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.1874 | (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.1874 | (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;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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;
@@ -203,7 +203,7 @@ function isValidRuntimeVersion(value) {
203
203
  }
204
204
 
205
205
  // runtime-companion.json
206
- var runtime_companion_default = { abi: 1, sha256: "1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373", file: "node/cli-1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373.cjs" };
206
+ var runtime_companion_default = { abi: 1, sha256: "f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467", file: "node/cli-f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467.cjs" };
207
207
 
208
208
  // src/answeredNativePackages.ts
209
209
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1874 | (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.1874 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1875 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1874",
3
+ "version": "0.1.1875",
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",
@@ -1 +1 @@
1
- {"abi":1,"sha256":"1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373","file":"node/cli-1e9d1926d6b063b7e648e1d5c73450253a26fa9c9d64ed164b9cde20eb45f373.cjs"}
1
+ {"abi":1,"sha256":"f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467","file":"node/cli-f4d0f1f81d2b1da32bc29c46144f871a0455de78cbad62a2eaa660f63aed2467.cjs"}
@@ -123,8 +123,9 @@ commands in your own `sleep` or chain `do settle` "just to be safe"**.
123
123
  - **after write commands** (`tap`, `tap-text`, `tap-id`, `type`,
124
124
  `type-into`, `key`, `key-sequence`, `keycode`, `drag`, `swipe`,
125
125
  `long-press`, `touch`, `gesture`, `pinch`, `scroll`, `shell`)
126
- the CLI polls the layout hash until it is stable for two consecutive
127
- frames. budget: **800 ms for agents** (`PEACH_AGENT=1`, set by the
126
+ the CLI waits for the app's render activity to go idle and stay idle
127
+ for two frames (plus any screen transition it started), without polling
128
+ the app. budget: **800 ms for agents** (`PEACH_AGENT=1`, set by the
128
129
  harness), 200 ms for humans.
129
130
 
130
131
  what this means:
@@ -85,8 +85,10 @@ function readSources(value: unknown): FingerprintSource[] {
85
85
  function packageRootOf(appRoot: string, file: string): string | null {
86
86
  const parts = file.split('/')
87
87
  if (parts[0] !== 'node_modules') return null
88
- const depth = parts[1]?.startsWith('@') ? 3 : 2
89
- return parts.length > depth ? path.join(appRoot, ...parts.slice(0, depth)) : null
88
+ // pnpm keeps a package at node_modules/.pnpm/<id>/node_modules/<name>
89
+ const at = parts.lastIndexOf('node_modules') + 1
90
+ const end = at + (parts[at]?.startsWith('@') ? 2 : 1)
91
+ return parts.length > end ? path.join(appRoot, ...parts.slice(0, end)) : null
90
92
  }
91
93
 
92
94
  /**
@@ -115,7 +115,11 @@ export function insertNativeBundleFooters(
115
115
  }
116
116
  if (natives.turbo) {
117
117
  const turbo = natives.turbo.metadata
118
- metadata.turbo = { ...turbo, url: served(turbo.url), icuUrl: served(turbo.icuUrl) }
118
+ metadata.turbo = {
119
+ ...turbo,
120
+ url: turbo.url && served(turbo.url),
121
+ icuUrl: turbo.icuUrl && served(turbo.icuUrl),
122
+ }
119
123
  source = insertTurboFooter(source, metadata.turbo)
120
124
  }
121
125
  return { source, metadata: Object.keys(metadata).length ? metadata : null }