peachsim 0.1.2432 → 0.1.2434

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 (104) hide show
  1. package/cli/app-project.ts +5 -0
  2. package/cli/commands/box.ts +3 -0
  3. package/cli/commands/control.ts +14 -6
  4. package/cli/commands/platform.ts +3 -3
  5. package/cli/commands/stream.ts +8 -1
  6. package/dist-lib/agent-daemon-client.cjs +1 -1
  7. package/dist-lib/agent-events.cjs +1 -1
  8. package/dist-lib/attached-projects.cjs +1 -1
  9. package/dist-lib/auth/shared-session.cjs +1 -1
  10. package/dist-lib/backend-origin.cjs +1 -1
  11. package/dist-lib/beta.cjs +1 -1
  12. package/dist-lib/beta.mjs +1 -1
  13. package/dist-lib/bridge-constants.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.mjs +1 -1
  16. package/dist-lib/bridge-contract.cjs +1 -1
  17. package/dist-lib/bridge-contract.mjs +1 -1
  18. package/dist-lib/bundle-channel.cjs +105 -85
  19. package/dist-lib/capture-contract.cjs +1 -1
  20. package/dist-lib/capture-contract.mjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/config.mjs +1 -1
  29. package/dist-lib/detox/index.cjs +2 -2
  30. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  31. package/dist-lib/expo-swift-bundle.cjs +59 -18
  32. package/dist-lib/expo-swift-metadata.cjs +1 -1
  33. package/dist-lib/expo-swift-metadata.mjs +1 -1
  34. package/dist-lib/home-paths.cjs +1 -1
  35. package/dist-lib/host/bridge-host.cjs +96 -76
  36. package/dist-lib/host/fetch-proxy-handler.cjs +6 -4
  37. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  38. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  39. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  40. package/dist-lib/host/websocket-proxy.cjs +1 -1
  41. package/dist-lib/index.cjs +6 -4
  42. package/dist-lib/jump-to-source-babel.cjs +1 -1
  43. package/dist-lib/jump-to-source-native.cjs +1 -1
  44. package/dist-lib/kotlin-host.cjs +36 -57
  45. package/dist-lib/menu.cjs +1 -1
  46. package/dist-lib/menu.mjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  49. package/dist-lib/metro-production-bundle.cjs +1 -1
  50. package/dist-lib/metro-production-bundle.mjs +1 -1
  51. package/dist-lib/metro.cjs +6 -4
  52. package/dist-lib/native-app-identity-project.cjs +2 -2
  53. package/dist-lib/native-app-identity-project.mjs +2 -2
  54. package/dist-lib/native-app-identity.cjs +1 -1
  55. package/dist-lib/native-app-identity.mjs +1 -1
  56. package/dist-lib/native-firebase-metadata.cjs +1 -1
  57. package/dist-lib/native-firebase-metadata.mjs +1 -1
  58. package/dist-lib/pdfium-raster.cjs +1 -1
  59. package/dist-lib/pdfium-raster.mjs +1 -1
  60. package/dist-lib/plist.cjs +1 -1
  61. package/dist-lib/plist.mjs +1 -1
  62. package/dist-lib/profiles.cjs +1 -1
  63. package/dist-lib/public-brand.cjs +1 -1
  64. package/dist-lib/public-origins-lib-esm.json +25 -25
  65. package/dist-lib/public-origins-lib.json +56 -56
  66. package/dist-lib/react-native-host-modules.cjs +1 -1
  67. package/dist-lib/react-native-host-modules.mjs +1 -1
  68. package/dist-lib/reap-browser.cjs +1 -1
  69. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  70. package/dist-lib/sdk.cjs +1 -1
  71. package/dist-lib/sdk.mjs +1 -1
  72. package/dist-lib/skills.cjs +112 -79
  73. package/dist-lib/swift-compile.cjs +25 -16
  74. package/dist-lib/swift-compile.mjs +25 -16
  75. package/dist-lib/swift-package.cjs +1 -1
  76. package/dist-lib/swift-package.mjs +1 -1
  77. package/dist-lib/swift-submit.cjs +1 -1
  78. package/dist-lib/swift-submit.mjs +1 -1
  79. package/dist-lib/swift-toolchain.cjs +1 -1
  80. package/dist-lib/swift.cjs +1 -1
  81. package/dist-lib/vite-swift.cjs +61 -22
  82. package/dist-lib/vite.cjs +6 -4
  83. package/dist-lib/worklet-executable.cjs +1 -1
  84. package/dist-lib/worklet-executable.mjs +1 -1
  85. package/dist-types/packages/peach-engine/src/engine/image-loader-canvaskit.d.ts +3 -0
  86. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  87. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +2 -2
  88. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +3 -2
  89. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -1
  90. package/dist-types/packages/peach-globals/src/cameraInputBridgeContract.d.ts +26 -0
  91. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
  92. package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
  93. package/kotlin/README.md +3 -1
  94. package/kotlin/sdk.tar.gz +0 -0
  95. package/package.json +1 -1
  96. package/runtime-companion.json +1 -1
  97. package/src/java-module-abi.ts +11 -28
  98. package/src/kotlin-host.ts +13 -32
  99. package/src/kotlin-toolchain.ts +25 -0
  100. package/src/react-native-coverage/native-typescript-parser.ts +29 -1
  101. package/src/swift-guest-source-inputs.ts +5 -1
  102. package/src/swift-guest-source-plan.ts +25 -9
  103. package/src/swift-host.ts +28 -5
  104. package/src/swift-xcframework.ts +24 -0
@@ -21,6 +21,11 @@ export interface ResolvedAppProject {
21
21
  configPath: string | null
22
22
  }
23
23
 
24
+ export function appNameFromPath(pathOrUrl: string): string {
25
+ const segment = pathOrUrl.split(/[?#]/)[0]?.split(/[/\\]/).filter(Boolean).at(-1) ?? ''
26
+ return segment.replace(/\.[^.]+$/, '')
27
+ }
28
+
24
29
  function firstNamedFile(dir: string, names: readonly string[]): string | null {
25
30
  for (const name of names) {
26
31
  const candidate = path.join(dir, name)
@@ -535,6 +535,7 @@ export async function createPrebuiltBundleBox(options: {
535
535
  // the link the app launches with, as Linking.getInitialURL reports it
536
536
  initialUrl?: string | null
537
537
  name: string
538
+ appName: string
538
539
  endpoint: string
539
540
  apiOrigin: string
540
541
  apiKey: string
@@ -546,6 +547,7 @@ export async function createPrebuiltBundleBox(options: {
546
547
  const pending = Promise.withResolvers<{ source: BundleFilePlane; appFonts: string }>()
547
548
  const box = await cloudBoxClient(options).create({
548
549
  name: options.name,
550
+ simulator: { name: options.appName, device: options.device },
549
551
  stack: prebuiltBundleBoxTemplate.stack,
550
552
  template: BOX_TEMPLATES.resolve({ name: prebuiltBundleBoxTemplate.name }).provenance,
551
553
  source: async () => {
@@ -748,6 +750,7 @@ async function runCloudBoxCreate(
748
750
  nativeProjectDir,
749
751
  device: null,
750
752
  name,
753
+ appName: defaultName,
751
754
  ...(secrets ? { secrets } : {}),
752
755
  })
753
756
  : {
@@ -63,7 +63,7 @@ import {
63
63
  import { rnxRuntime } from '../../src/runtime-delivery'
64
64
  import { sleep } from '../../src/sleep'
65
65
  import { fetchOneNativeAppCatalogDeclaration } from '../app-catalog'
66
- import { findExpoAppConfig, resolveAppProject } from '../app-project'
66
+ import { appNameFromPath, findExpoAppConfig, resolveAppProject } from '../app-project'
67
67
  import { discoverOneNativeAppSplash } from '../app-splash'
68
68
  import { extractAppBinaryBundle, isAppBinaryPath } from '../binary-sidecar'
69
69
  import { printBridgeFailureDiagnostics } from '../bridge-diagnostics'
@@ -1410,12 +1410,14 @@ type OpenCommandOptions = ControlCommandOptions & {
1410
1410
  ownerPid?: number
1411
1411
  }
1412
1412
 
1413
+ type OpenedSimulator = { simId: string; launched: boolean; appName?: string }
1414
+
1413
1415
  // `--json` makes stdout exactly the {simId, url} payload: every other line
1414
1416
  // the open path prints (progress, describe tree, hints) goes to stderr.
1415
1417
  export async function runOpenCommand(
1416
1418
  args: string[],
1417
1419
  opts: OpenCommandOptions = {},
1418
- ): Promise<{ simId: string; launched: boolean } | undefined> {
1420
+ ): Promise<OpenedSimulator | undefined> {
1419
1421
  const { STREAM_FLAG, runStreamCommand } = await import('./stream')
1420
1422
  if (args.includes(STREAM_FLAG)) {
1421
1423
  const { authHeaderOrExit } = await import('../auth')
@@ -1425,7 +1427,10 @@ export async function runOpenCommand(
1425
1427
  opts,
1426
1428
  )
1427
1429
  if (opened)
1428
- await runStreamCommand(['start', '--sim', opened.simId], { port: opts.port })
1430
+ await runStreamCommand(['start', '--sim', opened.simId], {
1431
+ port: opts.port,
1432
+ appName: opened.appName,
1433
+ })
1429
1434
  return opened
1430
1435
  }
1431
1436
  if (!args.includes('--json')) return openSim(args, opts)
@@ -1441,7 +1446,7 @@ export async function runOpenCommand(
1441
1446
  async function openSim(
1442
1447
  args: string[],
1443
1448
  opts: OpenCommandOptions,
1444
- ): Promise<{ simId: string; launched: boolean } | undefined> {
1449
+ ): Promise<OpenedSimulator | undefined> {
1445
1450
  // an ipa or apk we built opens as the plain bundle it carries
1446
1451
  const binary = args.find((arg) => !arg.startsWith('-') && isAppBinaryPath(arg))
1447
1452
  if (binary) {
@@ -1735,6 +1740,9 @@ async function openSim(
1735
1740
  resolvedBundle?.manifestProjectRoot,
1736
1741
  opts.signal,
1737
1742
  )
1743
+ const appName =
1744
+ resolvedBundle?.projectName ??
1745
+ (appNameFromPath(project?.appDir ?? prebuiltBundle ?? '') || undefined)
1738
1746
  startExpoConfigRead(project)
1739
1747
  // playwright is the browser-sim launcher. it owns an isolated profile and
1740
1748
  // can reap exactly its own browser tree. desktop opens the native host and
@@ -2307,7 +2315,7 @@ async function openSim(
2307
2315
  )
2308
2316
  await maybeDescribeAfterOpen(parsed.wsPort, targetSim.id, args)
2309
2317
  printAgentHints(quiet)
2310
- return { simId: targetSim.id, launched: false }
2318
+ return { simId: targetSim.id, launched: false, appName }
2311
2319
  }
2312
2320
  } finally {
2313
2321
  bridge.close()
@@ -2483,7 +2491,7 @@ async function openSim(
2483
2491
  printOpenedSim(openUrl, match, `${driver.name} driver`, quiet, json)
2484
2492
  await maybeDescribeAfterOpen(parsed.wsPort, match.id, args)
2485
2493
  printAgentHints(quiet)
2486
- return { simId: match.id, launched: true }
2494
+ return { simId: match.id, launched: true, appName }
2487
2495
  }
2488
2496
 
2489
2497
  async function runUseLikeCommand(args: string[], opts: ControlCommandOptions = {}) {
@@ -18,6 +18,7 @@ import {
18
18
  import { isRecord } from '../../src/is-record'
19
19
  import { toPeachDevelopmentBundleUrl } from '../../src/metro-production-bundle'
20
20
  import { rnxPublicBrand } from '../../src/public-brand'
21
+ import { appNameFromPath } from '../app-project'
21
22
  import { UnsupportedRemoteHostError } from '../cloud-client'
22
23
  import { resolveCheckoutRepo } from '../run-registry'
23
24
  import { rethrowIfExit } from '../run-rnx'
@@ -157,9 +158,7 @@ function remoteInputFromArgs(
157
158
  * readable app name for both default and explicit-name creates.
158
159
  */
159
160
  function boxNameForBundle(bundlePath: string): string {
160
- const segment = bundlePath.split(/[?#]/)[0]?.split('/').filter(Boolean).at(-1) ?? ''
161
- const stem = segment.replace(/\.[^.]+$/, '')
162
- const name = stem
161
+ const name = appNameFromPath(bundlePath)
163
162
  .toLowerCase()
164
163
  .replace(/[^a-z0-9]+/g, '-')
165
164
  .replace(/^-+|-+$/g, '')
@@ -637,6 +636,7 @@ async function runRemoteBox(
637
636
  device: selectedDevice,
638
637
  initialUrl: input.initialUrl,
639
638
  name: input.name ?? boxNameForBundle(projectDir ?? input.bundlePath),
639
+ appName: appNameFromPath(projectDir ?? input.bundlePath),
640
640
  fresh: input.watch || input.name === null,
641
641
  endpoint,
642
642
  apiOrigin,
@@ -33,7 +33,7 @@ export function readLocalStreamRecord(simId: string) {
33
33
 
34
34
  export async function runStreamCommand(
35
35
  args: string[],
36
- opts: { port?: number } = {},
36
+ opts: { port?: number; appName?: string } = {},
37
37
  ): Promise<void> {
38
38
  const parsed = parseBridgeCliArgs(args, { port: opts.port })
39
39
  const action = parsed.positional[0] ?? 'status'
@@ -92,6 +92,12 @@ export async function runStreamCommand(
92
92
  bridge,
93
93
  'SootSim.bridges.settings.get',
94
94
  )
95
+ const name: unknown =
96
+ opts.appName ??
97
+ (await bridge.send({
98
+ type: 'evaluate',
99
+ code: 'globalThis.SootSim?.state?.engineSnapshot?.activeApp?.appName ?? null',
100
+ }))
95
101
  const response = await fetch(new URL('/api/v1/rnx/streams', origin), {
96
102
  method: 'POST',
97
103
  headers: { authorization: header, 'content-type': 'application/json' },
@@ -99,6 +105,7 @@ export async function runStreamCommand(
99
105
  accountId: cloudAccountIdOrExit(auth),
100
106
  device:
101
107
  typeof settings.deviceModel === 'string' ? settings.deviceModel : undefined,
108
+ name: typeof name === 'string' ? name : undefined,
102
109
  repo: resolveCheckoutRepo() ?? undefined,
103
110
  }),
104
111
  signal: AbortSignal.timeout(15_000),
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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;
@@ -44146,6 +44146,17 @@ function swiftPackageLinkage(target) {
44146
44146
  throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
44147
44147
  return linkage;
44148
44148
  }
44149
+ function linkEdges(targets, id) {
44150
+ const target = targets.get(id);
44151
+ if (!target) throw new Error(`unknown source target ${id}`);
44152
+ return target.dependencies.flatMap((edge) => {
44153
+ if (edge.attributes.length)
44154
+ throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
44155
+ const dependency = targets.get(edge.target);
44156
+ if (!dependency) throw new Error(`unknown source target ${edge.target}`);
44157
+ return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
44158
+ });
44159
+ }
44149
44160
  function guestSourceImages(graph) {
44150
44161
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
44151
44162
  const entry = targets.get(graph.entry);
@@ -44169,17 +44180,14 @@ function guestSourceImages(graph) {
44169
44180
  ownership.set(id, image.id);
44170
44181
  image.members.push(id);
44171
44182
  active.add(id);
44172
- for (const edge of target.dependencies) {
44173
- if (edge.attributes.length)
44174
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
44183
+ for (const edge of linkEdges(targets, id)) {
44175
44184
  const dependency = targets.get(edge.target);
44176
- if (!dependency) throw new Error(`unknown source target ${edge.target}`);
44177
44185
  const type = dependency.productType;
44178
44186
  let dynamic;
44179
44187
  if (type.startsWith("swiftpm.target.")) {
44180
44188
  if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
44181
44189
  throw new Error(`unsupported SwiftPM target ${edge.target}`);
44182
- dynamic = false;
44190
+ dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
44183
44191
  } else if (type.startsWith("swiftpm.library.")) {
44184
44192
  dynamic = swiftPackageLinkage(dependency) === "dynamic";
44185
44193
  } else if (type === "com.apple.product-type.library.static") {
@@ -44314,9 +44322,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
44314
44322
  (flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
44315
44323
  ))
44316
44324
  throw new Error(`unsupported special link flag for ${id}`);
44317
- for (const edge of target.dependencies) {
44318
- if (edge.attributes.length)
44319
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
44325
+ for (const edge of linkEdges(targets, id)) {
44320
44326
  const dependencyImage = ownerByTarget.get(edge.target);
44321
44327
  if (dependencyImage === void 0)
44322
44328
  throw new Error(`linked target ${edge.target} has no guest image`);
@@ -45933,6 +45939,15 @@ var init_swift_guest_link = __esm({
45933
45939
  }
45934
45940
  });
45935
45941
 
45942
+ // src/forked-script-contract.ts
45943
+ var PEACH_FORKED_SCRIPT_ENV;
45944
+ var init_forked_script_contract = __esm({
45945
+ "src/forked-script-contract.ts"() {
45946
+ "use strict";
45947
+ PEACH_FORKED_SCRIPT_ENV = "PEACH_RUNS_FORKED_SCRIPTS";
45948
+ }
45949
+ });
45950
+
45936
45951
  // src/swift-guest-source-inputs.ts
45937
45952
  function clangIrLinkOptions(ir) {
45938
45953
  const list2 = /^!llvm\.linker\.options = !\{([^\n]*)\}$/m.exec(ir);
@@ -46034,10 +46049,13 @@ function sourceGuestClangLinkOptions(options) {
46034
46049
  plan,
46035
46050
  JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
46036
46051
  );
46037
- (0, import_node_child_process23.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
46052
+ const script = import_node_path48.default.join(options.directory, "clang-link-replay.cjs");
46053
+ (0, import_node_fs49.writeFileSync)(script, PARALLEL_REPLAY);
46054
+ (0, import_node_child_process23.execFileSync)(process.execPath, [script], {
46038
46055
  stdio: "inherit",
46039
46056
  env: {
46040
46057
  ...process.env,
46058
+ [PEACH_FORKED_SCRIPT_ENV]: "1",
46041
46059
  PEACH_CLANG_REPLAYS: plan,
46042
46060
  PEACH_CLANG_JOBS: String(options.jobs)
46043
46061
  }
@@ -46282,6 +46300,7 @@ var init_swift_guest_source_inputs = __esm({
46282
46300
  import_node_crypto25 = require("node:crypto");
46283
46301
  import_node_fs49 = require("node:fs");
46284
46302
  import_node_path48 = __toESM(require("node:path"), 1);
46303
+ init_forked_script_contract();
46285
46304
  init_swift_guest_source_plan();
46286
46305
  init_swift_runtime_products();
46287
46306
  CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
@@ -47088,15 +47107,6 @@ var init_swift_guest_compile = __esm({
47088
47107
  }
47089
47108
  });
47090
47109
 
47091
- // src/forked-script-contract.ts
47092
- var PEACH_FORKED_SCRIPT_ENV;
47093
- var init_forked_script_contract = __esm({
47094
- "src/forked-script-contract.ts"() {
47095
- "use strict";
47096
- PEACH_FORKED_SCRIPT_ENV = "PEACH_RUNS_FORKED_SCRIPTS";
47097
- }
47098
- });
47099
-
47100
47110
  // src/swift-header-compiler.ts
47101
47111
  function compilerCheckpoint(root, recipe2, args, header) {
47102
47112
  const value = (flag) => {
@@ -53802,7 +53812,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
53802
53812
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
53803
53813
  MULTI_MANIFEST_VERSION = 72;
53804
53814
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
53805
- compilerSourceDigest = true ? "da253e49615973dfc65a40000574546cbf7dc4c9d44a36295773bd33442d8c1d" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
53815
+ compilerSourceDigest = true ? "2ff4da3ff6b56e29c8968a39135d8974f54c927608bde4993a6a2476beb749e6" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
53806
53816
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
53807
53817
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
53808
53818
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -58583,6 +58593,24 @@ var init_expo_autolinking = __esm({
58583
58593
  });
58584
58594
 
58585
58595
  // src/kotlin-toolchain.ts
58596
+ async function runKotlinTool(toolchain, sdkRoot, tool, args, maxBuffer = 16 * 1024 * 1024) {
58597
+ const lib = import_node_path68.default.resolve(import_node_path68.default.dirname(toolchain.kotlinc), "../lib");
58598
+ const { stdout } = await run3(
58599
+ import_node_path68.default.join(toolchain.javaHome, "bin", "java"),
58600
+ [
58601
+ "-cp",
58602
+ [
58603
+ import_node_path68.default.join(sdkRoot, "tools.jar"),
58604
+ import_node_path68.default.join(lib, "kotlin-compiler.jar"),
58605
+ import_node_path68.default.join(lib, "kotlin-stdlib.jar")
58606
+ ].join(import_node_path68.default.delimiter),
58607
+ tool,
58608
+ ...args
58609
+ ],
58610
+ { maxBuffer }
58611
+ );
58612
+ return stdout;
58613
+ }
58586
58614
  function readToolchain(moduleRoot) {
58587
58615
  const parsed2 = JSON.parse(
58588
58616
  import_node_fs67.default.readFileSync(import_node_path68.default.join(moduleRoot, "toolchain.json"), "utf8")
@@ -64675,6 +64703,28 @@ function simulatorNativeLibrary(dir) {
64675
64703
  if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
64676
64704
  return matches[0];
64677
64705
  }
64706
+ function isDynamicLibrary2(file) {
64707
+ const fd = import_node_fs80.default.openSync(file, "r");
64708
+ try {
64709
+ const read = (offset) => {
64710
+ const bytes = Buffer.alloc(16);
64711
+ import_node_fs80.default.readSync(fd, bytes, 0, 16, offset);
64712
+ return bytes;
64713
+ };
64714
+ let header = read(0);
64715
+ const universal = header.readUInt32BE(0);
64716
+ if (universal === 3405691582 || universal === 3405691583) {
64717
+ const arch = read(8);
64718
+ header = read(
64719
+ universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
64720
+ );
64721
+ }
64722
+ const magic = header.readUInt32LE(0);
64723
+ return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
64724
+ } finally {
64725
+ import_node_fs80.default.closeSync(fd);
64726
+ }
64727
+ }
64678
64728
  var import_node_fs80, import_node_path82;
64679
64729
  var init_swift_xcframework = __esm({
64680
64730
  "src/swift-xcframework.ts"() {
@@ -69051,7 +69101,7 @@ var init_swift_standin_digest = __esm({
69051
69101
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
69052
69102
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
69053
69103
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
69054
- STANDIN_SOURCE_DIGEST = true ? "3475ca483b1e5005a2c76ec887310c0d0f44c91ea427496b33acbb5bf6188684" : standinSourceDigest();
69104
+ STANDIN_SOURCE_DIGEST = true ? "1f6eece6339ce20859e9666fa0ad8e9076485c71ec1cd098fe6a45fd6e28a28f" : standinSourceDigest();
69055
69105
  }
69056
69106
  });
69057
69107
 
@@ -74519,6 +74569,7 @@ async function swiftPackages(entry, app) {
74519
74569
  packages,
74520
74570
  binaries: packages.binaries,
74521
74571
  standins: [],
74572
+ dynamicFrameworks: /* @__PURE__ */ new Map(),
74522
74573
  projectGaps: /* @__PURE__ */ new Map()
74523
74574
  };
74524
74575
  entry.packages = cached2;
@@ -74598,6 +74649,14 @@ async function swiftPackages(entry, app) {
74598
74649
  for (const target of new Set(built2.standins.map((standin) => standin.target)))
74599
74650
  console.error(`Peach: target ${target} was replaced with a stand-in`);
74600
74651
  cached2.standins = built2.standins;
74652
+ const stoodIn = new Set(built2.standins.map((standin) => standin.target));
74653
+ cached2.dynamicFrameworks = new Map(
74654
+ cxxArtifacts.flatMap((binary2) => {
74655
+ if (!stoodIn.has(binary2.target)) return [];
74656
+ const native = simulatorNativeLibrary(swiftBinaryFramework(binary2).dir);
74657
+ return native?.kind === "framework" && isDynamicLibrary2(native.file) ? [[binary2.target, native.name]] : [];
74658
+ })
74659
+ );
74601
74660
  cached2.projectGaps = new Map(
74602
74661
  vendored.flatMap(({ target }) => {
74603
74662
  const gap = built2.gaps.get(target);
@@ -74657,10 +74716,7 @@ async function buildXcodeLayout(root) {
74657
74716
  nativeModules: registered.nativeModules
74658
74717
  }
74659
74718
  );
74660
- const { packages, standins, projectGaps, binaries } = await swiftPackages(
74661
- registered,
74662
- appTarget
74663
- );
74719
+ const { packages, standins, dynamicFrameworks, projectGaps, binaries } = await swiftPackages(registered, appTarget);
74664
74720
  const sourceFrameworks = new Map(
74665
74721
  packages.sourceFrameworks.map(
74666
74722
  ({
@@ -75264,7 +75320,8 @@ async function buildXcodeLayout(root) {
75264
75320
  (owner) => owner.module === original.moduleName
75265
75321
  )?.products ?? [] : [];
75266
75322
  const packageTarget = target.productType.startsWith("swiftpm.");
75267
- const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : null;
75323
+ const binaryFramework = target.productType === "swiftpm.target.binary" ? dynamicFrameworks.get(target.productName) ?? null : null;
75324
+ const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : binaryFramework;
75268
75325
  const buildVersion = {
75269
75326
  platform: packageTarget ? applicationBuildVersion.platform : target.buildVersion.platform,
75270
75327
  minimumOS: target.buildVersion.minimumOS ?? (packageTarget ? applicationBuildVersion.minimumOS : null),
@@ -75279,6 +75336,7 @@ async function buildXcodeLayout(root) {
75279
75336
  id: relative4(target.id),
75280
75337
  productName: packageFramework === null ? target.productName : `${packageFramework}.framework`,
75281
75338
  installName: packageFramework === null ? target.installName : `@rpath/${packageFramework}.framework/${packageFramework}`,
75339
+ machOType: binaryFramework === null ? target.machOType : "mh_dylib",
75282
75340
  sourceTarget: target.sourceTarget === null ? first ?? null : original ? frameworkNames.get(original) ?? original.moduleName : target.sourceTarget,
75283
75341
  buildVersion,
75284
75342
  dependencies: [
@@ -76616,6 +76674,7 @@ var init_swift_host = __esm({
76616
76674
  init_swift_standins();
76617
76675
  init_swift_submit();
76618
76676
  init_swift_toolchain();
76677
+ init_swift_xcframework();
76619
76678
  init_swiftContract();
76620
76679
  init_swiftContract();
76621
76680
  init_xcode_project();
@@ -83607,7 +83666,7 @@ var init_nitro_superset = __esm({
83607
83666
  init_nitroContract();
83608
83667
  init_swift_standin_digest();
83609
83668
  NITRO_SUPERSET_ENTRY_NAME = "superset";
83610
- NITRO_COMPILER_DIGEST = true ? "9e2716e3f26f690d5a0d470e7b2118aff9b949481b423a382bede1ae3bb9e5ed" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
83669
+ NITRO_COMPILER_DIGEST = true ? "6764c6ea26594f3a00f19cd9e5f36dd70b5b7512565469477e6ea04833ce04ae" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
83611
83670
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
83612
83671
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
83613
83672
  published = /* @__PURE__ */ new Map();
@@ -84846,7 +84905,7 @@ var init_expo_native_compiler_digest = __esm({
84846
84905
 
84847
84906
  // src/expo-native-prebuilt.ts
84848
84907
  function expoNativeCompilerDigestValue() {
84849
- return true ? "f2fb186e69b4b3f0e35305bf95234939be22ee1973dcbe16eb71a4db272ce1ba" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
84908
+ return true ? "412a013232d2ba79e33dcada2fa52a4b06e11bdaa1404a1d5ad312b7fe1522b5" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
84850
84909
  }
84851
84910
  function readSources(value) {
84852
84911
  const sources = isRecord(value) ? value.sources : null;
@@ -88712,19 +88771,11 @@ async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
88712
88771
  import_node_fs119.default.writeFileSync(target, bytes);
88713
88772
  origins.set(target, file);
88714
88773
  }
88715
- const { stdout } = await run8(
88716
- import_node_path120.default.join(toolchain.javaHome, "bin", "java"),
88717
- [
88718
- "-cp",
88719
- [
88720
- import_node_path120.default.join(sdkRoot, "tools.jar"),
88721
- import_node_path120.default.resolve(import_node_path120.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
88722
- import_node_path120.default.resolve(import_node_path120.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
88723
- ].join(import_node_path120.default.delimiter),
88724
- "dev.peach.tools.javaabi.JavaModuleSpecsKt",
88725
- ...origins.keys()
88726
- ],
88727
- { maxBuffer: 16 * 1024 * 1024 }
88774
+ const stdout = await runKotlinTool(
88775
+ toolchain,
88776
+ sdkRoot,
88777
+ "dev.peach.tools.javaabi.JavaModuleSpecsKt",
88778
+ [...origins.keys()]
88728
88779
  ).catch((cause) => {
88729
88780
  if (!isRecord(cause) || typeof cause.stderr !== "string") throw cause;
88730
88781
  let diagnostic = cause.stderr;
@@ -88795,20 +88846,11 @@ async function compileJavaModuleAbi(input) {
88795
88846
  { maxBuffer: 16 * 1024 * 1024 }
88796
88847
  );
88797
88848
  const library = import_node_path120.default.join(directory2, "java-abi.klib");
88798
- await run8(
88799
- import_node_path120.default.join(toolchain.javaHome, "bin", "java"),
88800
- [
88801
- "-cp",
88802
- [
88803
- import_node_path120.default.join(sdkRoot, "tools.jar"),
88804
- import_node_path120.default.resolve(import_node_path120.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
88805
- import_node_path120.default.resolve(import_node_path120.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
88806
- ].join(import_node_path120.default.delimiter),
88807
- "dev.peach.tools.platform.JavaPlatformTypesKt",
88808
- import_node_path120.default.join(directory2, `${name3}.klib`),
88809
- library
88810
- ],
88811
- { maxBuffer: 16 * 1024 * 1024 }
88849
+ await runKotlinTool(
88850
+ toolchain,
88851
+ sdkRoot,
88852
+ "dev.peach.tools.platform.JavaPlatformTypesKt",
88853
+ [import_node_path120.default.join(directory2, `${name3}.klib`), library]
88812
88854
  );
88813
88855
  return library;
88814
88856
  }
@@ -89548,23 +89590,7 @@ async function scanSources(tool, parse11, toolchain, moduleRoot, files2) {
89548
89590
  const key2 = digest4.digest("hex");
89549
89591
  let scan3 = toolScans.get(key2);
89550
89592
  if (!scan3) {
89551
- scan3 = (async () => {
89552
- const { kotlinc } = await ensureToolchain(toolchain);
89553
- const { stdout } = await run10(
89554
- import_node_path124.default.join(import_node_path124.default.dirname(kotlinc), "kotlin"),
89555
- [
89556
- "-cp",
89557
- [
89558
- import_node_path124.default.resolve(import_node_path124.default.dirname(kotlinc), "../lib/kotlin-compiler.jar"),
89559
- import_node_path124.default.join(sdk2.root, "tools.jar")
89560
- ].join(import_node_path124.default.delimiter),
89561
- tool,
89562
- ...files2
89563
- ],
89564
- { maxBuffer: 16 * 1024 * 1024 }
89565
- );
89566
- return stdout;
89567
- })().catch((error) => {
89593
+ scan3 = ensureToolchain(toolchain).then((ready) => runKotlinTool(ready, sdk2.root, tool, files2)).catch((error) => {
89568
89594
  toolScans.delete(key2);
89569
89595
  throw error;
89570
89596
  });
@@ -90321,18 +90347,12 @@ async function compileKotlin(input, origin) {
90321
90347
  ({ file, bytes }) => sources.includes(file) && bytes.includes("ViewModel")
90322
90348
  )) {
90323
90349
  await compileKlib(import_node_path124.default.join(work, "abi"));
90324
- const { stdout } = await run10(
90325
- import_node_path124.default.join(import_node_path124.default.dirname(kotlinc), "kotlin"),
90326
- [
90327
- "-cp",
90328
- [
90329
- import_node_path124.default.resolve(import_node_path124.default.dirname(kotlinc), "../lib/kotlin-compiler.jar"),
90330
- import_node_path124.default.join(sdk2.root, "tools.jar")
90331
- ].join(import_node_path124.default.delimiter),
90332
- viewModels.toolClass,
90333
- import_node_path124.default.join(work, "abi")
90334
- ],
90335
- { maxBuffer: 64 * 1024 * 1024 }
90350
+ const stdout = await runKotlinTool(
90351
+ ready,
90352
+ sdk2.root,
90353
+ viewModels.toolClass,
90354
+ [import_node_path124.default.join(work, "abi")],
90355
+ 64 * 1024 * 1024
90336
90356
  );
90337
90357
  import_node_fs123.default.writeFileSync(
90338
90358
  import_node_path124.default.join(generatedDir, viewModels.file),
@@ -91741,7 +91761,7 @@ var import_node_path5 = require("node:path");
91741
91761
  init_src();
91742
91762
 
91743
91763
  // runtime-companion.json
91744
- var runtime_companion_default = { abi: 1, sha256: "c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b", file: "node/cli-c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b.cjs" };
91764
+ var runtime_companion_default = { abi: 1, sha256: "2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367", file: "node/cli-2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367.cjs" };
91745
91765
 
91746
91766
  // src/cli-runtime.ts
91747
91767
  init_answeredNativePackages();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (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.2432 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2434 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var AGENT_IDENTITY_MAX_CHARS = 200;