peachsim 0.1.2423 → 0.1.2425

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 (90) hide show
  1. package/cli/outbound-endpoints.ts +138 -23
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +113 -26
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +112 -25
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +113 -26
  32. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +24 -9
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +22 -7
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +24 -9
  48. package/dist-lib/native-app-identity-project.cjs +2 -2
  49. package/dist-lib/native-app-identity-project.mjs +2 -2
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +1 -1
  67. package/dist-lib/sdk.mjs +1 -1
  68. package/dist-lib/skills.cjs +115 -28
  69. package/dist-lib/swift-compile.cjs +87 -15
  70. package/dist-lib/swift-compile.mjs +87 -15
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +88 -16
  78. package/dist-lib/vite.cjs +24 -9
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  82. package/kotlin/README.md +4 -3
  83. package/kotlin/sdk.tar.gz +0 -0
  84. package/kotlin/toolchain.json +2 -2
  85. package/package.json +1 -1
  86. package/src/swift-compile.ts +1 -0
  87. package/src/swift-guest-compile.ts +2 -0
  88. package/src/swift-guest-image-ledger.ts +37 -2
  89. package/src/swift-guest-source-inputs.ts +45 -6
  90. package/src/visit-parsed-program.ts +21 -6
@@ -1173,27 +1173,70 @@ function isFetchBinding(node: Expression): boolean {
1173
1173
  )
1174
1174
  }
1175
1175
 
1176
+ const EMPTY_ALIASES: Set<string> = new Set()
1177
+ const EXPORT_VARIABLE_DECLARATION = /\bexport\s+(?:const|let|var)\b/
1178
+
1179
+ interface OutboundScanCaches {
1180
+ trackedSet: Set<string>
1181
+ sources: Map<string, string>
1182
+ diskFiles: Map<string, boolean>
1183
+ parsed: Map<string, { source: string; program: Program }>
1184
+ exportedFetchAliases: Map<string, Set<string>>
1185
+ networkNames: Map<string, NetworkNames>
1186
+ exporterScanDone: boolean
1187
+ }
1188
+
1189
+ function isCachedFile(candidate: string, caches: OutboundScanCaches): boolean {
1190
+ if (caches.trackedSet.has(candidate)) return true
1191
+ let found = caches.diskFiles.get(candidate)
1192
+ if (found === undefined) {
1193
+ found = fs.existsSync(candidate) && fs.statSync(candidate).isFile()
1194
+ caches.diskFiles.set(candidate, found)
1195
+ }
1196
+ return found
1197
+ }
1198
+
1199
+ function loadParsedFile(
1200
+ file: string,
1201
+ caches: OutboundScanCaches,
1202
+ ): { source: string; program: Program } {
1203
+ let cached = caches.parsed.get(file)
1204
+ if (!cached) {
1205
+ const source = caches.sources.get(file) ?? fs.readFileSync(file, 'utf8')
1206
+ const program = parseSync(file, source, {
1207
+ lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1208
+ }).program
1209
+ cached = { source, program }
1210
+ caches.parsed.set(file, cached)
1211
+ }
1212
+ return cached
1213
+ }
1214
+
1176
1215
  // names a relative module exports as fetch aliases, so a call through the
1177
1216
  // imported binding is declared like a direct fetch.
1178
1217
  function exportedFetchAliases(
1179
1218
  importer: string,
1180
1219
  specifier: string,
1181
- exportedFetchAliasCache: Map<string, Set<string>>,
1220
+ caches: OutboundScanCaches,
1182
1221
  ): Set<string> {
1183
- if (!specifier.startsWith('.')) return new Set()
1222
+ if (!specifier.startsWith('.')) return EMPTY_ALIASES
1184
1223
  const base = path.resolve(path.dirname(importer), specifier)
1185
1224
  const file = [`${base}.ts`, `${base}.tsx`, base, path.join(base, 'index.ts')].find(
1186
- (candidate) => fs.existsSync(candidate) && fs.statSync(candidate).isFile(),
1225
+ (candidate) => isCachedFile(candidate, caches),
1187
1226
  )
1188
- if (!file) return new Set()
1189
- const cached = exportedFetchAliasCache.get(file)
1227
+ if (!file) return EMPTY_ALIASES
1228
+ const cached = caches.exportedFetchAliases.get(file)
1190
1229
  if (cached) return cached
1230
+ if (caches.exporterScanDone && caches.trackedSet.has(file)) return EMPTY_ALIASES
1231
+ const text = caches.sources.get(file) ?? fs.readFileSync(file, 'utf8')
1232
+ if (!EXPORT_VARIABLE_DECLARATION.test(text)) {
1233
+ caches.exportedFetchAliases.set(file, EMPTY_ALIASES)
1234
+ return EMPTY_ALIASES
1235
+ }
1191
1236
  const aliases = new Set<string>()
1192
- exportedFetchAliasCache.set(file, aliases)
1193
- const program = parseSync(file, fs.readFileSync(file, 'utf8'), {
1194
- lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1195
- }).program
1196
- const names = networkNames(program, file, exportedFetchAliasCache)
1237
+ caches.exportedFetchAliases.set(file, aliases)
1238
+ const { program } = loadParsedFile(file, caches)
1239
+ const names = networkNames(program, file, caches)
1197
1240
  for (const statement of program.body) {
1198
1241
  if (statement.type !== 'ExportNamedDeclaration') continue
1199
1242
  if (statement.declaration?.type !== 'VariableDeclaration') continue
@@ -1208,8 +1251,10 @@ function exportedFetchAliases(
1208
1251
  function networkNames(
1209
1252
  source: Program,
1210
1253
  file: string,
1211
- exportedFetchAliasCache: Map<string, Set<string>>,
1254
+ caches: OutboundScanCaches,
1212
1255
  ): NetworkNames {
1256
+ const existing = caches.networkNames.get(file)
1257
+ if (existing) return existing
1213
1258
  const names: NetworkNames = {
1214
1259
  fetch: new Set(['fetch', 'fetchWithRetries']),
1215
1260
  httpClient: new Set(['http', 'https']),
@@ -1218,6 +1263,7 @@ function networkNames(
1218
1263
  nodeRequest: new Set(),
1219
1264
  nodeGet: new Set(),
1220
1265
  }
1266
+ caches.networkNames.set(file, names)
1221
1267
  const isClientExpression = (node: Expression, clients: Set<string>): boolean => {
1222
1268
  if (node.type === 'Identifier') return clients.has(node.name)
1223
1269
  if (node.type === 'ParenthesizedExpression')
@@ -1252,11 +1298,7 @@ function networkNames(
1252
1298
  },
1253
1299
  ImportDeclaration(node) {
1254
1300
  const moduleName = node.source.value.replace(/^node:/, '')
1255
- const fetchAliases = exportedFetchAliases(
1256
- file,
1257
- node.source.value,
1258
- exportedFetchAliasCache,
1259
- )
1301
+ const fetchAliases = exportedFetchAliases(file, node.source.value, caches)
1260
1302
  for (const specifier of node.specifiers) {
1261
1303
  if (
1262
1304
  specifier.type === 'ImportSpecifier' &&
@@ -1430,15 +1472,88 @@ export function detectOutboundCalls(repositoryRoot: string): DetectedOutboundCal
1430
1472
  'packages/contrast-runtime-delivery/src',
1431
1473
  'packages/peach-cloud-box/src',
1432
1474
  ]
1475
+ const tracked = trackedSourceFiles(repositoryRoot, roots)
1476
+ const sources = new Map<string, string>()
1477
+ for (const file of tracked) sources.set(file, fs.readFileSync(file, 'utf8'))
1478
+
1479
+ const caches: OutboundScanCaches = {
1480
+ trackedSet: new Set(tracked),
1481
+ sources,
1482
+ diskFiles: new Map(),
1483
+ parsed: new Map(),
1484
+ exportedFetchAliases: new Map(),
1485
+ networkNames: new Map(),
1486
+ exporterScanDone: false,
1487
+ }
1488
+
1489
+ const escapeRegExp = (value: string): string =>
1490
+ value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
1491
+ const fetchTokens = new Set(['fetch', 'fetchWithRetries'])
1492
+ const checkedExporters = new Set<string>()
1493
+ let fetchTokenPattern = new RegExp(
1494
+ `\\b(?:${[...fetchTokens].map(escapeRegExp).join('|')})\\b`,
1495
+ )
1496
+ while (true) {
1497
+ let added = false
1498
+ for (const file of tracked) {
1499
+ if (checkedExporters.has(file) || file.endsWith('/outbound-endpoints.ts')) continue
1500
+ const text = sources.get(file)!
1501
+ if (!EXPORT_VARIABLE_DECLARATION.test(text) || !fetchTokenPattern.test(text))
1502
+ continue
1503
+ checkedExporters.add(file)
1504
+ const aliases = new Set<string>()
1505
+ caches.exportedFetchAliases.set(file, aliases)
1506
+ const { program } = loadParsedFile(file, caches)
1507
+ const names = networkNames(program, file, caches)
1508
+ for (const statement of program.body) {
1509
+ if (
1510
+ statement.type !== 'ExportNamedDeclaration' ||
1511
+ statement.declaration?.type !== 'VariableDeclaration'
1512
+ )
1513
+ continue
1514
+ for (const declarator of statement.declaration.declarations) {
1515
+ if (
1516
+ declarator.id.type === 'Identifier' &&
1517
+ names.fetch.has(declarator.id.name)
1518
+ ) {
1519
+ aliases.add(declarator.id.name)
1520
+ if (!fetchTokens.has(declarator.id.name)) {
1521
+ fetchTokens.add(declarator.id.name)
1522
+ added = true
1523
+ }
1524
+ }
1525
+ }
1526
+ }
1527
+ }
1528
+ if (!added) break
1529
+ fetchTokenPattern = new RegExp(
1530
+ `\\b(?:${[...fetchTokens].map(escapeRegExp).join('|')})\\b`,
1531
+ )
1532
+ }
1533
+ caches.exporterScanDone = true
1534
+
1535
+ const activeTokens = new Set([
1536
+ ...fetchTokens,
1537
+ 'WebSocket',
1538
+ 'NativeWebSocket',
1539
+ 'EventSource',
1540
+ 'XMLHttpRequest',
1541
+ 'sendBeacon',
1542
+ 'http',
1543
+ 'https',
1544
+ 'net',
1545
+ 'transport',
1546
+ ])
1547
+ const tokenPattern = new RegExp(
1548
+ `\\b(?:${[...activeTokens].map(escapeRegExp).join('|')})\\b`,
1549
+ )
1550
+
1433
1551
  const counts = new Map<string, number>()
1434
- const exportedFetchAliasCache = new Map<string, Set<string>>()
1435
- for (const file of trackedSourceFiles(repositoryRoot, roots)) {
1552
+ for (const file of tracked) {
1436
1553
  if (file.endsWith('/outbound-endpoints.ts')) continue
1437
- const source = fs.readFileSync(file, 'utf8')
1438
- const program = parseSync(file, source, {
1439
- lang: file.endsWith('.tsx') ? 'tsx' : 'ts',
1440
- }).program
1441
- const names = networkNames(program, file, exportedFetchAliasCache)
1554
+ if (!tokenPattern.test(sources.get(file)!)) continue
1555
+ const { source, program } = loadParsedFile(file, caches)
1556
+ const names = networkNames(program, file, caches)
1442
1557
  const relative = path.relative(repositoryRoot, file).split(path.sep).join('/')
1443
1558
  const recordCall = (node: CallExpression | NewExpression): void => {
1444
1559
  const kind = callKind(node, names, source)
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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;
@@ -25603,7 +25603,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25603
25603
  if (sectionName === "linking") {
25604
25604
  const version2 = number3();
25605
25605
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
25606
- const parts = [encodedString(sectionName), encodeNumber(version2)];
25606
+ const subsections = [];
25607
+ let objcLoader;
25607
25608
  while (offset < section.length) {
25608
25609
  const kind = section[offset++];
25609
25610
  const length = number3();
@@ -25666,6 +25667,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25666
25667
  }
25667
25668
  } else if (symbolKind === 3) number3();
25668
25669
  else throw new Error("unsupported wasm symbol kind");
25670
+ if (name3 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
25671
+ objcLoader = i;
25672
+ }
25669
25673
  const alias = names.get(name3);
25670
25674
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name3);
25671
25675
  if ((name3 === "dlsym" && usesDlsym || name3 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -25715,7 +25719,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
25715
25719
  content = Buffer.concat([...entries, ...extraEntries]);
25716
25720
  }
25717
25721
  offset = stop;
25718
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
25722
+ subsections.push({ kind, content });
25723
+ }
25724
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
25725
+ for (const subsection of subsections) {
25726
+ let content = subsection.content;
25727
+ if (subsection.kind === 6 && objcLoader !== void 0) {
25728
+ const [count, entriesStart] = readNumber(content, 0);
25729
+ const entries = [content.subarray(0, entriesStart)];
25730
+ let entryStart = entriesStart;
25731
+ for (let i = 0; i < count; i++) {
25732
+ const [, symbolStart] = readNumber(content, entryStart);
25733
+ const [symbol2, entryEnd] = readNumber(content, symbolStart);
25734
+ if (symbol2 === objcLoader) entries.push(encodeNumber(1));
25735
+ entries.push(
25736
+ content.subarray(
25737
+ symbol2 === objcLoader ? symbolStart : entryStart,
25738
+ entryEnd
25739
+ )
25740
+ );
25741
+ entryStart = entryEnd;
25742
+ }
25743
+ if (entryStart !== content.length)
25744
+ throw new Error("invalid init functions subsection");
25745
+ content = Buffer.concat(entries);
25746
+ }
25747
+ parts.push(
25748
+ Buffer.from([subsection.kind]),
25749
+ encodeNumber(content.length),
25750
+ content
25751
+ );
25719
25752
  }
25720
25753
  section = Buffer.concat(parts);
25721
25754
  }
@@ -26009,11 +26042,12 @@ function createGuestImageLedger(input) {
26009
26042
  llvmIR: ir.join("\n") + "\n"
26010
26043
  };
26011
26044
  }
26012
- var OBJC_INIT_RECORD;
26045
+ var OBJC_INIT_RECORD, OBJC_LOAD_FUNCTION;
26013
26046
  var init_swift_guest_image_ledger = __esm({
26014
26047
  "src/swift-guest-image-ledger.ts"() {
26015
26048
  "use strict";
26016
26049
  OBJC_INIT_RECORD = ".objc_init";
26050
+ OBJC_LOAD_FUNCTION = ".objcv2_load_function";
26017
26051
  }
26018
26052
  });
26019
26053
 
@@ -28670,7 +28704,7 @@ function sourceGuestClangLinkOptions(options) {
28670
28704
  commands.set(file, { tool, args: value });
28671
28705
  }
28672
28706
  }
28673
- const result = /* @__PURE__ */ new Map();
28707
+ const replays = [];
28674
28708
  for (const [index, file] of [...wanted].entries()) {
28675
28709
  const command = commands.get(file);
28676
28710
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -28696,16 +28730,33 @@ function sourceGuestClangLinkOptions(options) {
28696
28730
  throw new Error(`missing clang ${flag} for ${file}`);
28697
28731
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
28698
28732
  }
28699
- (0, import_node_child_process19.execFileSync)(
28700
- command.args[0],
28701
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
28702
- { stdio: "inherit" }
28703
- );
28733
+ replays.push({
28734
+ file,
28735
+ compiler: command.args[0],
28736
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
28737
+ output: output2
28738
+ });
28739
+ }
28740
+ const plan = import_node_path33.default.join(options.directory, "clang-link-replays.json");
28741
+ (0, import_node_fs34.writeFileSync)(
28742
+ plan,
28743
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
28744
+ );
28745
+ (0, import_node_child_process19.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
28746
+ stdio: "inherit",
28747
+ env: {
28748
+ ...process.env,
28749
+ PEACH_CLANG_REPLAYS: plan,
28750
+ PEACH_CLANG_JOBS: String(options.jobs)
28751
+ }
28752
+ });
28753
+ const result = /* @__PURE__ */ new Map();
28754
+ for (const { file, output: output2 } of replays) {
28704
28755
  const flags = clangIrLinkOptions((0, import_node_fs34.readFileSync)(output2, "utf8"));
28705
- for (let index2 = 0; index2 < flags.length; index2++) {
28706
- const flag = flags[index2];
28756
+ for (let index = 0; index < flags.length; index++) {
28757
+ const flag = flags[index];
28707
28758
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
28708
- const name3 = flags[++index2];
28759
+ const name3 = flags[++index];
28709
28760
  if (!name3 || name3.startsWith("-"))
28710
28761
  throw new Error(`missing clang link name after ${flag}`);
28711
28762
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -28931,7 +28982,7 @@ function logicalGuestLinkOptions(args, identities, roots) {
28931
28982
  }
28932
28983
  return output2;
28933
28984
  }
28934
- var import_node_child_process19, import_node_crypto18, import_node_fs34, import_node_path33, CLANG_TARGET_MODULE_WRAPPER;
28985
+ var import_node_child_process19, import_node_crypto18, import_node_fs34, import_node_path33, CLANG_TARGET_MODULE_WRAPPER, PARALLEL_REPLAY;
28935
28986
  var init_swift_guest_source_inputs = __esm({
28936
28987
  "src/swift-guest-source-inputs.ts"() {
28937
28988
  "use strict";
@@ -28942,6 +28993,25 @@ var init_swift_guest_source_inputs = __esm({
28942
28993
  init_swift_guest_source_plan();
28943
28994
  init_swift_runtime_products();
28944
28995
  CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
28996
+ PARALLEL_REPLAY = `
28997
+ const { spawn } = require('node:child_process')
28998
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
28999
+ let next = 0
29000
+ const run = () => {
29001
+ if (next >= commands.length) return Promise.resolve()
29002
+ const [file, ...args] = commands[next++]
29003
+ return new Promise((resolve, reject) => {
29004
+ const child = spawn(file, args, { stdio: 'inherit' })
29005
+ child.on('error', reject)
29006
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
29007
+ }).then(run)
29008
+ }
29009
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
29010
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
29011
+ console.error(error.message)
29012
+ process.exit(1)
29013
+ })
29014
+ `;
28945
29015
  }
28946
29016
  });
28947
29017
 
@@ -29516,7 +29586,8 @@ async function compileGuestLink(options) {
29516
29586
  directory: directory2,
29517
29587
  toolchainBin: options.toolchainBin,
29518
29588
  swiftCompiler: options.swiftCompiler,
29519
- objects: selectedSource.map((artifact) => artifact.path)
29589
+ objects: selectedSource.map((artifact) => artifact.path),
29590
+ jobs: options.jobs
29520
29591
  });
29521
29592
  const links = sourceGuestRuntimeLinks({
29522
29593
  toolchainBin: options.toolchainBin,
@@ -36161,7 +36232,8 @@ function compileSwiftProjectOnce(input, options) {
36161
36232
  generatedOwners: preparation.generatedOwners,
36162
36233
  output: output2,
36163
36234
  optimized,
36164
- optimize: input.optimize === true
36235
+ optimize: input.optimize === true,
36236
+ jobs: swiftBuildJobs()
36165
36237
  });
36166
36238
  else
36167
36239
  await lowerWasm(output2, optimized, { optimize: input.optimize === true });
@@ -36431,7 +36503,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
36431
36503
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
36432
36504
  MULTI_MANIFEST_VERSION = 72;
36433
36505
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
36434
- compilerSourceDigest = true ? "886349932526d72a5a1493acbcd1799ec941afd89998ad0eab64bbe9c48afb95" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36506
+ compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
36435
36507
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
36436
36508
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
36437
36509
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -52232,19 +52304,34 @@ var init_public_brand = __esm({
52232
52304
 
52233
52305
  // src/visit-parsed-program.ts
52234
52306
  function visitParsedProgram(program, visitor) {
52307
+ const enterByType = /* @__PURE__ */ new Map();
52308
+ const exitByType = /* @__PURE__ */ new Map();
52309
+ for (const key2 of Object.keys(visitor)) {
52310
+ const handler = Reflect.get(visitor, key2);
52311
+ if (typeof handler !== "function") continue;
52312
+ const invoke = (node) => {
52313
+ handler(node);
52314
+ };
52315
+ if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
52316
+ else enterByType.set(key2, invoke);
52317
+ }
52318
+ if (enterByType.size === 0 && exitByType.size === 0) return;
52319
+ const hasExit = exitByType.size > 0;
52235
52320
  function visit3(value) {
52236
52321
  if (Array.isArray(value)) {
52237
- for (const child of value) visit3(child);
52322
+ for (let i = 0; i < value.length; i++) visit3(value[i]);
52238
52323
  return;
52239
52324
  }
52240
52325
  if (!isRecord(value) || typeof value.type !== "string") return;
52241
52326
  const keys = import_oxc_parser.visitorKeys[value.type];
52242
52327
  if (!keys) return;
52243
- const enter = Reflect.get(visitor, value.type);
52244
- if (typeof enter === "function") enter(value);
52245
- for (const key2 of keys) visit3(value[key2]);
52246
- const exit = Reflect.get(visitor, `${value.type}:exit`);
52247
- if (typeof exit === "function") exit(value);
52328
+ const enter = enterByType.get(value.type);
52329
+ if (enter) enter(value);
52330
+ for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
52331
+ if (hasExit) {
52332
+ const exit = exitByType.get(value.type);
52333
+ if (exit) exit(value);
52334
+ }
52248
52335
  }
52249
52336
  visit3(program);
52250
52337
  }
@@ -58936,7 +59023,7 @@ var init_swift_standin_digest = __esm({
58936
59023
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
58937
59024
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
58938
59025
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
58939
- STANDIN_SOURCE_DIGEST = true ? "2913d6a693b8a1c42193c1962c3468c2f8bc68c78a2f2f52961ca5efe03d1e67" : standinSourceDigest();
59026
+ STANDIN_SOURCE_DIGEST = true ? "3a0e0016967d34924d12848e05752d3902596cc16a0f603a5fda32cb024d02f8" : standinSourceDigest();
58940
59027
  }
58941
59028
  });
58942
59029
 
@@ -73589,7 +73676,7 @@ var init_nitro_superset = __esm({
73589
73676
  init_nitroContract();
73590
73677
  init_swift_standin_digest();
73591
73678
  NITRO_SUPERSET_ENTRY_NAME = "superset";
73592
- NITRO_COMPILER_DIGEST = true ? "a6905cb4da4fec9b5ef03b34b0b2891e3ed553f5571d77e24e075fa7c483b0a9" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73679
+ NITRO_COMPILER_DIGEST = true ? "5e8f14caf06af284e971f4107b94fe6d6979dd2ac0da718416a93c6e36e8e2a0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
73593
73680
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
73594
73681
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
73595
73682
  published = /* @__PURE__ */ new Map();
@@ -74828,7 +74915,7 @@ var init_expo_native_compiler_digest = __esm({
74828
74915
 
74829
74916
  // src/expo-native-prebuilt.ts
74830
74917
  function expoNativeCompilerDigestValue() {
74831
- return true ? "5a193936cb2c362dd919d9127e9318122bd8e86f9c6e05cbe56c4c6580a4636a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74918
+ return true ? "305cb9d6b64ebf2397b29848afd9b634d4012fc3eb51d696e9bdda10ea074097" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
74832
74919
  }
74833
74920
  function readSources(value) {
74834
74921
  const sources = isRecord(value) ? value.sources : null;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var AGENT_IDENTITY_MAX_CHARS = 200;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../contrast-runtime-delivery/src/version.ts
4
4
  function isValidRuntimeVersion(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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.2423 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (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;