peachsim 0.1.1465 → 0.1.1469

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 (80) hide show
  1. package/cli/bridge-flow-runner.ts +25 -17
  2. package/cli/cloud-client.ts +12 -19
  3. package/cli/commands/inspect/settling.ts +4 -1
  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 +2 -2
  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 +1 -1
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +2 -2
  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 +69 -12
  34. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  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 +5 -2
  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 +1 -1
  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/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/react-native-host-modules.cjs +1 -1
  61. package/dist-lib/react-native-host-modules.mjs +1 -1
  62. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  63. package/dist-lib/sdk.cjs +5 -2
  64. package/dist-lib/sdk.mjs +5 -2
  65. package/dist-lib/skills.cjs +90 -23
  66. package/dist-lib/swift-compile.cjs +2 -2
  67. package/dist-lib/swift-compile.mjs +2 -2
  68. package/dist-lib/swift-package.cjs +1 -1
  69. package/dist-lib/swift-package.mjs +1 -1
  70. package/dist-lib/swift-submit.cjs +1 -1
  71. package/dist-lib/swift-submit.mjs +1 -1
  72. package/dist-lib/swift-toolchain.cjs +1 -1
  73. package/dist-lib/swift.cjs +1 -1
  74. package/dist-lib/vite-swift.cjs +2 -2
  75. package/dist-lib/vite.cjs +1 -1
  76. package/dist-lib/worklet-executable.cjs +1 -1
  77. package/dist-lib/worklet-executable.mjs +1 -1
  78. package/package.json +1 -1
  79. package/src/bundle-asset-resource.ts +8 -0
  80. package/src/swift-compile.ts +4 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (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.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/native-app-identity-project.ts
4
4
  import fs2 from "node:fs";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/openstep-plist.ts
4
4
  function parseOpenStepPlist(text) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/native-firebase-metadata.ts
4
4
  var PREFIX = "globalThis.__peachNativeFirebaseConfig=";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  import plist from "plist";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1843,6 +1843,7 @@ async function waitForSootsimIdle({
1843
1843
  return true
1844
1844
  }
1845
1845
  while (Date.now() < deadline) {
1846
+ const pollStarted = Date.now()
1846
1847
  const snapshot = await readSnapshot()
1847
1848
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
1848
1849
  polls++
@@ -1915,7 +1916,9 @@ async function waitForSootsimIdle({
1915
1916
  lastRequestTotal = snapshot.requestTotal
1916
1917
  lastAppCommits = snapshot.appCommits
1917
1918
  lastNodeCount = snapshot.nodeCount
1918
- await sleep(pollMs)
1919
+ // reply latency belongs inside the poll interval; the stillness window
1920
+ // above remains measured from completed observations.
1921
+ await sleep(Math.max(0, pollMs - (Date.now() - pollStarted)))
1919
1922
  }
1920
1923
  const last = await readSnapshot()
1921
1924
  if (last.runtimeUnsupported) return last.runtimeUnsupported
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (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);
@@ -1737,6 +1737,7 @@ async function waitForSootsimIdle({
1737
1737
  return true
1738
1738
  }
1739
1739
  while (Date.now() < deadline) {
1740
+ const pollStarted = Date.now()
1740
1741
  const snapshot = await readSnapshot()
1741
1742
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
1742
1743
  polls++
@@ -1809,7 +1810,9 @@ async function waitForSootsimIdle({
1809
1810
  lastRequestTotal = snapshot.requestTotal
1810
1811
  lastAppCommits = snapshot.appCommits
1811
1812
  lastNodeCount = snapshot.nodeCount
1812
- await sleep(pollMs)
1813
+ // reply latency belongs inside the poll interval; the stillness window
1814
+ // above remains measured from completed observations.
1815
+ await sleep(Math.max(0, pollMs - (Date.now() - pollStarted)))
1813
1816
  }
1814
1817
  const last = await readSnapshot()
1815
1818
  if (last.runtimeUnsupported) return last.runtimeUnsupported
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -32104,7 +32104,7 @@ function compileSwiftProjectUnit(input, options) {
32104
32104
  };
32105
32105
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
32106
32106
  return serialize(root, async () => {
32107
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === import_node_path10.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
32107
+ if (process.platform === "darwin" && process.env.TM_SESSION && !process.env.CONTRAST_REMOTE_BUILD && process.env.CI !== "true" && moduleRoot === import_node_path10.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
32108
32108
  const requestRoot = (0, import_node_fs10.mkdtempSync)(import_node_path10.default.join(root, ".builder-request-"));
32109
32109
  const output = import_node_path10.default.join(requestRoot, "output");
32110
32110
  const request = import_node_path10.default.join(requestRoot, "request.json");
@@ -45217,6 +45217,15 @@ var init_metro_production_bundle = __esm({
45217
45217
  }
45218
45218
  });
45219
45219
 
45220
+ // src/bundle-asset-resource.ts
45221
+ var PEACH_BUNDLE_ASSET_PREFIX;
45222
+ var init_bundle_asset_resource = __esm({
45223
+ "src/bundle-asset-resource.ts"() {
45224
+ "use strict";
45225
+ PEACH_BUNDLE_ASSET_PREFIX = "peach-asset://";
45226
+ }
45227
+ });
45228
+
45220
45229
  // ../contrast-bundler/src/metroAssetArtifact.ts
45221
45230
  function isEmbeddedAssetDescriptor(descriptor) {
45222
45231
  return descriptor.fileUris?.length === descriptor.scales.length && descriptor.fileHashes?.length === descriptor.scales.length;
@@ -45758,6 +45767,56 @@ async function assertSelfContainedMetroArtifactAssets(bundle) {
45758
45767
  sizes: sortedAssetSizes(sizes)
45759
45768
  };
45760
45769
  }
45770
+ async function separateMetroArtifactAssets(bundle) {
45771
+ const assets2 = await assertSelfContainedMetroArtifactAssets(bundle);
45772
+ const sites = scanAssetDescriptorSites(bundle);
45773
+ const resources = /* @__PURE__ */ new Map();
45774
+ const entries = /* @__PURE__ */ new Map();
45775
+ for (const site of sites) {
45776
+ const descriptor = site.descriptor;
45777
+ const key2 = assetDescriptorKey(descriptor);
45778
+ if (entries.has(key2)) continue;
45779
+ const contentType = metroAssetContentType(descriptor.type);
45780
+ const prefix = `data:${contentType};base64,`;
45781
+ const fileUris = [];
45782
+ const fileHashes = [];
45783
+ for (let index = 0; index < descriptor.scales.length; index++) {
45784
+ const dataUri = descriptor.fileUris?.[index];
45785
+ const sha256 = descriptor.fileHashes?.[index];
45786
+ if (!dataUri || !sha256) throw new Error("verified Metro asset is incomplete");
45787
+ const scale = descriptor.scales[index];
45788
+ if (scale === void 0) throw new Error("verified Metro asset scale is missing");
45789
+ const filename = metroAssetScaleFilename(descriptor.name, descriptor.type, scale);
45790
+ const uri = `${PEACH_BUNDLE_ASSET_PREFIX}${sha256}/${encodeURIComponent(filename)}`;
45791
+ if (!resources.has(uri)) {
45792
+ const bytes = decodeBase64ToBytes(dataUri.slice(prefix.length));
45793
+ resources.set(uri, {
45794
+ uri,
45795
+ sha256,
45796
+ contentType,
45797
+ bytes,
45798
+ byteLength: bytes.byteLength
45799
+ });
45800
+ }
45801
+ fileUris.push(uri);
45802
+ fileHashes.push(sha256);
45803
+ }
45804
+ entries.set(key2, { fileUris, fileHashes, scales: descriptor.scales });
45805
+ }
45806
+ const pieces = [];
45807
+ let cursor = 0;
45808
+ for (const site of sites) {
45809
+ const entry = entries.get(assetDescriptorKey(site.descriptor));
45810
+ if (!entry) throw new Error("verified Metro asset descriptor is missing");
45811
+ pieces.push(
45812
+ bundle.slice(cursor, site.start),
45813
+ rewriteDescriptorObject(bundle, site, entry)
45814
+ );
45815
+ cursor = site.end;
45816
+ }
45817
+ pieces.push(bundle.slice(cursor));
45818
+ return { code: pieces.join(""), assets: assets2, resources: [...resources.values()] };
45819
+ }
45761
45820
  function metroAssetScaleFilename(name2, type, scale) {
45762
45821
  const suffix = scale === 1 ? "" : `@${scale}x`;
45763
45822
  return `${name2}${suffix}.${type}`;
@@ -45952,6 +46011,7 @@ var EXPRESSION_KEYWORDS, PLACEHOLDER_JPEG, METRO_ASSET_PLACEHOLDERS;
45952
46011
  var init_metroAssetArtifact = __esm({
45953
46012
  "../contrast-bundler/src/metroAssetArtifact.ts"() {
45954
46013
  "use strict";
46014
+ init_bundle_asset_resource();
45955
46015
  EXPRESSION_KEYWORDS = /* @__PURE__ */ new Set([
45956
46016
  "await",
45957
46017
  "case",
@@ -48020,11 +48080,6 @@ function searchMetroAssetDest(bundlePath, descriptors, assetsDirectory) {
48020
48080
  }
48021
48081
  return { dest: winner.dest, searched, truncated, unconfirmed: best === 0 };
48022
48082
  }
48023
- function largestEmbeddedAssets(sizes, count) {
48024
- if (sizes.length === 0) return "";
48025
- const largest = sizes.slice(0, count).map((entry) => `${entry.asset} ${entry.bytes} bytes`).join(", ");
48026
- return ` Largest embedded assets: ${largest}.`;
48027
- }
48028
48083
  async function inferCloudModuleIdentity(source) {
48029
48084
  let receipt;
48030
48085
  try {
@@ -48144,9 +48199,10 @@ async function produceArtifact(bundlePath, maxBytes, command, assetPolicy, asset
48144
48199
  });
48145
48200
  const bytes = Buffer.from(artifact.code, "utf8");
48146
48201
  const assets2 = artifact.receipt.assets;
48147
- if (bytes.length > maxBytes) {
48202
+ const executableBytes = command === PREVIEW_COMMAND ? bytes.length : Buffer.byteLength((await separateMetroArtifactAssets(artifact.code)).code, "utf8");
48203
+ if (executableBytes > maxBytes) {
48148
48204
  throw new Error(
48149
- `${REMOTE_COMMAND} artifact is ${bytes.length} bytes and exceeds the ${maxBytes}-byte limit. Embedded assets weigh ${assets2.bytes} bytes on disk, and base64 embedding costs about a third on top of that, so the practical asset budget is roughly ${Math.round(maxBytes * 0.75 / 1e6)} MB.${largestEmbeddedAssets(assets2.sizes, 10)}`
48205
+ `${command} executable is ${executableBytes} bytes and exceeds the ${maxBytes}-byte limit. The ${assets2.bytes} asset bytes are stored outside guest code.`
48150
48206
  );
48151
48207
  }
48152
48208
  const warnings = [];
@@ -48160,9 +48216,9 @@ async function produceArtifact(bundlePath, maxBytes, command, assetPolicy, asset
48160
48216
  `${command} embedded a placeholder image for ${prepared.substituted.length} asset(s) no scale of which is in ${prepared.search.searched.join(", ") || "any asset dest directory"}: ${prepared.substituted.join(", ")}. Rebuild with \`react-native bundle --assets-dest\` to ship the real images.`
48161
48217
  );
48162
48218
  }
48163
- if (bytes.length >= Math.floor(maxBytes * 0.8)) {
48219
+ if (executableBytes >= Math.floor(maxBytes * 0.8)) {
48164
48220
  warnings.push(
48165
- `${command} artifact is ${bytes.length} bytes, ${Math.round(bytes.length / maxBytes * 100)}% of the ${maxBytes}-byte limit.${largestEmbeddedAssets(assets2.sizes, 5)}`
48221
+ `${command} executable is ${executableBytes} bytes, ${Math.round(executableBytes / maxBytes * 100)}% of the ${maxBytes}-byte limit.`
48166
48222
  );
48167
48223
  }
48168
48224
  return {
@@ -48312,7 +48368,7 @@ function createCloudBridgeForParsed(parsed) {
48312
48368
  if (!session) return null;
48313
48369
  return session.service === "box" ? new CloudBoxBridge(session) : new CloudBridge(session);
48314
48370
  }
48315
- var import_node_crypto16, import_node_fs33, import_node_path34, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, CloudBridge, CloudBoxBridge;
48371
+ var import_node_crypto16, import_node_fs33, import_node_path34, import_node_vm, DEFAULT_RNX_CLOUD_ORIGIN, MAX_RNX_CLOUD_BUNDLE_BYTES, REMOTE_COMMAND, PREVIEW_COMMAND, MAX_ASSET_DEST_FILES, ACCOUNT_CHOICE_REFUSALS, PROJECT_ONLY_DIRECTORIES, MAX_PLACEMENT_COMBINATIONS, CloudBridge, CloudBoxBridge;
48316
48372
  var init_cloud_client = __esm({
48317
48373
  "cli/cloud-client.ts"() {
48318
48374
  "use strict";
@@ -48337,6 +48393,7 @@ var init_cloud_client = __esm({
48337
48393
  DEFAULT_RNX_CLOUD_ORIGIN = rnxPublicBrand.origin;
48338
48394
  MAX_RNX_CLOUD_BUNDLE_BYTES = RNX_CLOUD_MAX_ARTIFACT_BYTES;
48339
48395
  REMOTE_COMMAND = "peach remote";
48396
+ PREVIEW_COMMAND = "peach preview";
48340
48397
  MAX_ASSET_DEST_FILES = 25e3;
48341
48398
  ACCOUNT_CHOICE_REFUSALS = /* @__PURE__ */ new Set([
48342
48399
  "accountId is required",
@@ -59257,6 +59314,7 @@ async function waitForSootsimIdle({
59257
59314
  return true
59258
59315
  }
59259
59316
  while (Date.now() < deadline) {
59317
+ const pollStarted = Date.now()
59260
59318
  const snapshot = await readSnapshot()
59261
59319
  if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
59262
59320
  polls++
@@ -59329,7 +59387,9 @@ async function waitForSootsimIdle({
59329
59387
  lastRequestTotal = snapshot.requestTotal
59330
59388
  lastAppCommits = snapshot.appCommits
59331
59389
  lastNodeCount = snapshot.nodeCount
59332
- await sleep(pollMs)
59390
+ // reply latency belongs inside the poll interval; the stillness window
59391
+ // above remains measured from completed observations.
59392
+ await sleep(Math.max(0, pollMs - (Date.now() - pollStarted)))
59333
59393
  }
59334
59394
  const last = await readSnapshot()
59335
59395
  if (last.runtimeUnsupported) return last.runtimeUnsupported
@@ -60560,7 +60620,7 @@ var init_bridge_flow_runner = __esm({
60560
60620
  // engine's XCTest accessibility projection — one bridge evaluate, then the
60561
60621
  // same Orchestra.buildFilter semantics the render resolver implements, over
60562
60622
  // PeachAccessibilityNode instead of the visible semantic tree.
60563
- async findElementAccessibilityTree(opts) {
60623
+ async resolveAccessibilityElement(opts, command) {
60564
60624
  const tree = await this.evaluate(`(async () => {
60565
60625
  const test = window.__sootsimTest
60566
60626
  if (!test || typeof test.captureAccessibilityTree !== 'function') throw new Error('engine accessibility snapshot is unavailable')
@@ -60569,11 +60629,15 @@ var init_bridge_flow_runner = __esm({
60569
60629
  if (!isPeachAccessibilityTree(tree))
60570
60630
  throw new Error("engine returned an invalid accessibility snapshot");
60571
60631
  if (tree.length === 0) return null;
60572
- if (tree.some((node2) => node2.platform !== "ios"))
60573
- throw new Error(
60574
- "containsChild, containsDescendants and focused require the iOS accessibility hierarchy"
60575
- );
60576
- const node = resolveAccessibilitySelector(tree, opts);
60632
+ if (tree.some((node) => node.platform !== "ios"))
60633
+ throw new Error(`${command} requires the iOS accessibility hierarchy`);
60634
+ return resolveAccessibilitySelector(tree, opts);
60635
+ }
60636
+ async findElementAccessibilityTree(opts) {
60637
+ const node = await this.resolveAccessibilityElement(
60638
+ opts,
60639
+ "containsChild, containsDescendants and focused"
60640
+ );
60577
60641
  if (!node) return null;
60578
60642
  const frame = node.frame;
60579
60643
  return {
@@ -61793,14 +61857,17 @@ var init_bridge_flow_runner = __esm({
61793
61857
  }
61794
61858
  // maestro copyTextFrom: find an element and capture its text for use in
61795
61859
  // later steps via ${maestro.copiedText} (upstream form) or the legacy
61796
- // ${maestroCopiedText}. the matcher shape matches tapOn.
61860
+ // ${maestroCopiedText}. the string form is a text selector, as in tapOn.
61861
+ // the copied text is Orchestra.resolveText over the XCTest attributes:
61862
+ // text (the value), then hintText (the placeholder), then the label.
61797
61863
  async copyTextFrom(target) {
61798
- const opts = typeof target === "string" ? { id: target } : target;
61799
- const node = await this.findElement(opts);
61864
+ const opts = typeof target === "string" ? { text: target } : target;
61865
+ assertSupportedSelector(opts);
61866
+ const node = await this.resolveAccessibilityElement(opts, "copyTextFrom");
61800
61867
  if (!node) {
61801
61868
  throw new Error(`copyTextFrom: element not found: ${JSON.stringify(opts)}`);
61802
61869
  }
61803
- const captured = node.text ?? node.testID ?? "";
61870
+ const captured = node.value || node.placeholder || node.label || "";
61804
61871
  this.js.setCopiedText(captured);
61805
61872
  this.js.putEnv("maestroCopiedText", captured);
61806
61873
  console.log(`[flow] copied text: ${JSON.stringify(captured)}`);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -2343,7 +2343,7 @@ function compileSwiftProjectUnit(input, options) {
2343
2343
  };
2344
2344
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
2345
2345
  return serialize(root, async () => {
2346
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2346
+ if (process.platform === "darwin" && process.env.TM_SESSION && !process.env.CONTRAST_REMOTE_BUILD && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2347
2347
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
2348
2348
  const output = import_node_path2.default.join(requestRoot, "output");
2349
2349
  const request = import_node_path2.default.join(requestRoot, "request.json");
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (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";
@@ -2289,7 +2289,7 @@ function compileSwiftProjectUnit(input, options) {
2289
2289
  };
2290
2290
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
2291
2291
  return serialize(root, async () => {
2292
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === path2.resolve(import.meta.dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2292
+ if (process.platform === "darwin" && process.env.TM_SESSION && !process.env.CONTRAST_REMOTE_BUILD && process.env.CI !== "true" && moduleRoot === path2.resolve(import.meta.dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
2293
2293
  const requestRoot = mkdtempSync(path2.join(root, ".builder-request-"));
2294
2294
  const output = path2.join(requestRoot, "output");
2295
2295
  const request = path2.join(requestRoot, "request.json");
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (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
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swiftContract.ts
4
4
  function isSwiftResourcePath(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -4038,7 +4038,7 @@ function compileSwiftProjectUnit(input, options) {
4038
4038
  };
4039
4039
  const hash = swiftArtifactHash(input, options.release, moduleRoot);
4040
4040
  return serialize(root, async () => {
4041
- if (process.platform === "darwin" && process.env.TM_SESSION && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
4041
+ if (process.platform === "darwin" && process.env.TM_SESSION && !process.env.CONTRAST_REMOTE_BUILD && process.env.CI !== "true" && moduleRoot === import_node_path2.default.resolve(__sootsim_import_meta_dirname, "../../sootsim-swift") && !swiftDistributionAt(moduleRoot)) {
4042
4042
  const requestRoot = (0, import_node_fs2.mkdtempSync)(import_node_path2.default.join(root, ".builder-request-"));
4043
4043
  const output = import_node_path2.default.join(requestRoot, "output");
4044
4044
  const request = import_node_path2.default.join(requestRoot, "request.json");
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1465 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1469 | (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.1465",
3
+ "version": "0.1.1469",
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",
@@ -0,0 +1,8 @@
1
+ export const PEACH_BUNDLE_ASSET_PREFIX = 'peach-asset://'
2
+
3
+ export interface PeachBundleAssetReference {
4
+ uri: string
5
+ sha256: string
6
+ contentType: string
7
+ byteLength: number
8
+ }
@@ -2690,9 +2690,13 @@ export function compileSwiftProjectUnit(
2690
2690
  }
2691
2691
  const hash = swiftArtifactHash(input, options.release, moduleRoot)
2692
2692
  return serialize(root, async () => {
2693
+ // a remote builder slot (CONTRAST_REMOTE_BUILD) already admitted this work
2694
+ // and every builder mac carries the pinned toolchain, so it compiles in
2695
+ // place. offloading again from there adds a second workspace and install.
2693
2696
  if (
2694
2697
  process.platform === 'darwin' &&
2695
2698
  process.env.TM_SESSION &&
2699
+ !process.env.CONTRAST_REMOTE_BUILD &&
2696
2700
  process.env.CI !== 'true' &&
2697
2701
  moduleRoot === path.resolve(import.meta.dirname, '../../sootsim-swift') &&
2698
2702
  !swiftDistributionAt(moduleRoot)