peachsim 0.1.2431 → 0.1.2433

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 (96) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +91 -75
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +54 -17
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +91 -75
  31. package/dist-lib/host/fetch-proxy-handler.cjs +5 -4
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +5 -4
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +36 -57
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +5 -4
  47. package/dist-lib/native-app-identity-project.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.mjs +2 -2
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +53 -53
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +95 -80
  68. package/dist-lib/swift-compile.cjs +16 -10
  69. package/dist-lib/swift-compile.mjs +16 -10
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +52 -16
  77. package/dist-lib/vite.cjs +5 -4
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/dist-types/packages/peach-engine/src/engine/image-loader-canvaskit.d.ts +3 -0
  81. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  82. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +3 -2
  83. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -1
  84. package/dist-types/packages/peach-globals/src/cameraInputBridgeContract.d.ts +26 -0
  85. package/dist-types/packages/peach-globals/src/globalsContract.d.ts +2 -0
  86. package/dist-types/packages/peach-globals/src/index.d.ts +1 -0
  87. package/kotlin/README.md +3 -1
  88. package/kotlin/sdk.tar.gz +0 -0
  89. package/package.json +1 -1
  90. package/runtime-companion.json +1 -1
  91. package/src/java-module-abi.ts +11 -28
  92. package/src/kotlin-host.ts +13 -32
  93. package/src/kotlin-toolchain.ts +25 -0
  94. package/src/swift-guest-source-plan.ts +25 -9
  95. package/src/swift-host.ts +28 -5
  96. package/src/swift-xcframework.ts +24 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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;
@@ -13448,9 +13448,9 @@ var init_registry = __esm({
13448
13448
  {
13449
13449
  range: ">=1.0.0",
13450
13450
  coverage: 0.25,
13451
- note: "iOS native seam uses shared microphone input and recorder DSP for actual PCM; Android retains its existing implementation pending an AudioRecord configuration owner",
13451
+ note: "iOS uses shared microphone input and recorder DSP for actual PCM. Android reports the upstream AudioRecord initialization failure",
13452
13452
  working: "published AudioRecord wrapper unchanged; iOS init uses native 44100/mono/16-bit/2048-byte defaults, start configures the shared audio session and capture/DSP, data carries actual base64 PCM packets, and stop prevents later delivery",
13453
- missing: "Android AudioRecord minimum buffer and audioSource ownership are absent and its previous generated-silence behavior remains; no physical microphone or paired iOS AudioQueue certification"
13453
+ missing: "Android AudioRecord minimum buffer and audio-source configuration, physical microphone verification and paired iOS AudioQueue certification"
13454
13454
  }
13455
13455
  ]
13456
13456
  },
@@ -16670,8 +16670,7 @@ var init_registry = __esm({
16670
16670
  {
16671
16671
  range: ">=0.3.0 <0.4.0",
16672
16672
  coverage: 0,
16673
- note: "the AppearanceControl native setters are noops and never change the canvas color scheme",
16674
- missing: "no runtime override of the host appearance in the simulator"
16673
+ note: "the published AppearanceControl JavaScript uses the shared guest window appearance override for dark, light and system mode"
16675
16674
  }
16676
16675
  ]
16677
16676
  },
@@ -19357,7 +19356,7 @@ var init_registry = __esm({
19357
19356
  coverage: 0.6,
19358
19357
  note: "iOS CallKit as the iOS 27 simulator runs it: no call screen, so incoming and outgoing calls end as the simulator ends them. verified against 1.0.0, including its per-call supportsHolding and supportsDTMF options and the pre-call audio configuration restored once the last call ends",
19359
19358
  working: "outgoing and incoming call sessions, answer fulfill requests, end, report ended, mute, hold, DTMF and video actions, per-call supportsHolding and supportsDTMF on the session and incoming call event, call timeouts, session events with JS-ready queueing, audio session configuration and state with the pre-call configuration restored when the last call ends, capture session state, and the VoIP push token",
19360
- missing: "device call screen and status bar pill, VoIP push delivery, Siri and recents call intents, audio session activation and the dialtone, and the Android Core-Telecom module"
19359
+ missing: "device call screen and status bar pill, VoIP push delivery, Siri and recents call intents, WebRTC default configuration, audio session activation and the dialtone, and the Android Core-Telecom module"
19361
19360
  }
19362
19361
  ]
19363
19362
  },
@@ -30812,6 +30811,24 @@ var init_config = __esm({
30812
30811
  });
30813
30812
 
30814
30813
  // src/kotlin-toolchain.ts
30814
+ async function runKotlinTool(toolchain, sdkRoot, tool, args, maxBuffer = 16 * 1024 * 1024) {
30815
+ const lib = import_node_path9.default.resolve(import_node_path9.default.dirname(toolchain.kotlinc), "../lib");
30816
+ const { stdout } = await run2(
30817
+ import_node_path9.default.join(toolchain.javaHome, "bin", "java"),
30818
+ [
30819
+ "-cp",
30820
+ [
30821
+ import_node_path9.default.join(sdkRoot, "tools.jar"),
30822
+ import_node_path9.default.join(lib, "kotlin-compiler.jar"),
30823
+ import_node_path9.default.join(lib, "kotlin-stdlib.jar")
30824
+ ].join(import_node_path9.default.delimiter),
30825
+ tool,
30826
+ ...args
30827
+ ],
30828
+ { maxBuffer }
30829
+ );
30830
+ return stdout;
30831
+ }
30815
30832
  function readToolchain(moduleRoot) {
30816
30833
  const parsed2 = JSON.parse(
30817
30834
  import_node_fs13.default.readFileSync(import_node_path9.default.join(moduleRoot, "toolchain.json"), "utf8")
@@ -71956,6 +71973,17 @@ function swiftPackageLinkage(target) {
71956
71973
  throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
71957
71974
  return linkage;
71958
71975
  }
71976
+ function linkEdges(targets, id) {
71977
+ const target = targets.get(id);
71978
+ if (!target) throw new Error(`unknown source target ${id}`);
71979
+ return target.dependencies.flatMap((edge) => {
71980
+ if (edge.attributes.length)
71981
+ throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
71982
+ const dependency = targets.get(edge.target);
71983
+ if (!dependency) throw new Error(`unknown source target ${edge.target}`);
71984
+ return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
71985
+ });
71986
+ }
71959
71987
  function guestSourceImages(graph) {
71960
71988
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
71961
71989
  const entry = targets.get(graph.entry);
@@ -71979,17 +72007,14 @@ function guestSourceImages(graph) {
71979
72007
  ownership.set(id, image.id);
71980
72008
  image.members.push(id);
71981
72009
  active.add(id);
71982
- for (const edge of target.dependencies) {
71983
- if (edge.attributes.length)
71984
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
72010
+ for (const edge of linkEdges(targets, id)) {
71985
72011
  const dependency = targets.get(edge.target);
71986
- if (!dependency) throw new Error(`unknown source target ${edge.target}`);
71987
72012
  const type = dependency.productType;
71988
72013
  let dynamic;
71989
72014
  if (type.startsWith("swiftpm.target.")) {
71990
72015
  if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
71991
72016
  throw new Error(`unsupported SwiftPM target ${edge.target}`);
71992
- dynamic = false;
72017
+ dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
71993
72018
  } else if (type.startsWith("swiftpm.library.")) {
71994
72019
  dynamic = swiftPackageLinkage(dependency) === "dynamic";
71995
72020
  } else if (type === "com.apple.product-type.library.static") {
@@ -72124,9 +72149,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
72124
72149
  (flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
72125
72150
  ))
72126
72151
  throw new Error(`unsupported special link flag for ${id}`);
72127
- for (const edge of target.dependencies) {
72128
- if (edge.attributes.length)
72129
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
72152
+ for (const edge of linkEdges(targets, id)) {
72130
72153
  const dependencyImage = ownerByTarget.get(edge.target);
72131
72154
  if (dependencyImage === void 0)
72132
72155
  throw new Error(`linked target ${edge.target} has no guest image`);
@@ -81644,7 +81667,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
81644
81667
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
81645
81668
  MULTI_MANIFEST_VERSION = 72;
81646
81669
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
81647
- compilerSourceDigest = true ? "da253e49615973dfc65a40000574546cbf7dc4c9d44a36295773bd33442d8c1d" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
81670
+ compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
81648
81671
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
81649
81672
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
81650
81673
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -88386,7 +88409,7 @@ var init_swift_standin_digest = __esm({
88386
88409
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
88387
88410
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
88388
88411
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
88389
- STANDIN_SOURCE_DIGEST = true ? "3475ca483b1e5005a2c76ec887310c0d0f44c91ea427496b33acbb5bf6188684" : standinSourceDigest();
88412
+ STANDIN_SOURCE_DIGEST = true ? "edbd6d6714a42d5d22c4d8b74e605e5c897358beb450af3e5605c81299e68531" : standinSourceDigest();
88390
88413
  }
88391
88414
  });
88392
88415
 
@@ -88881,7 +88904,7 @@ __export(expo_native_prebuilt_exports, {
88881
88904
  servedExpoSwift: () => servedExpoSwift
88882
88905
  });
88883
88906
  function expoNativeCompilerDigestValue() {
88884
- return true ? "f2fb186e69b4b3f0e35305bf95234939be22ee1973dcbe16eb71a4db272ce1ba" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
88907
+ return true ? "92f2e3795e852982bdccd3a73ae36de137f0eb97ab0ada5e0624f164f9c024b8" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
88885
88908
  }
88886
88909
  function readSources(value) {
88887
88910
  const sources = isRecord(value) ? value.sources : null;
@@ -89192,6 +89215,28 @@ function simulatorNativeLibrary(dir) {
89192
89215
  if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
89193
89216
  return matches[0];
89194
89217
  }
89218
+ function isDynamicLibrary2(file) {
89219
+ const fd = import_node_fs88.default.openSync(file, "r");
89220
+ try {
89221
+ const read = (offset) => {
89222
+ const bytes = Buffer.alloc(16);
89223
+ import_node_fs88.default.readSync(fd, bytes, 0, 16, offset);
89224
+ return bytes;
89225
+ };
89226
+ let header = read(0);
89227
+ const universal = header.readUInt32BE(0);
89228
+ if (universal === 3405691582 || universal === 3405691583) {
89229
+ const arch = read(8);
89230
+ header = read(
89231
+ universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
89232
+ );
89233
+ }
89234
+ const magic = header.readUInt32LE(0);
89235
+ return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
89236
+ } finally {
89237
+ import_node_fs88.default.closeSync(fd);
89238
+ }
89239
+ }
89195
89240
  var import_node_fs88, import_node_path87;
89196
89241
  var init_swift_xcframework = __esm({
89197
89242
  "src/swift-xcframework.ts"() {
@@ -99419,6 +99464,7 @@ async function swiftPackages(entry, app) {
99419
99464
  packages,
99420
99465
  binaries: packages.binaries,
99421
99466
  standins: [],
99467
+ dynamicFrameworks: /* @__PURE__ */ new Map(),
99422
99468
  projectGaps: /* @__PURE__ */ new Map()
99423
99469
  };
99424
99470
  entry.packages = cached4;
@@ -99498,6 +99544,14 @@ async function swiftPackages(entry, app) {
99498
99544
  for (const target of new Set(built2.standins.map((standin) => standin.target)))
99499
99545
  console.error(`Peach: target ${target} was replaced with a stand-in`);
99500
99546
  cached4.standins = built2.standins;
99547
+ const stoodIn = new Set(built2.standins.map((standin) => standin.target));
99548
+ cached4.dynamicFrameworks = new Map(
99549
+ cxxArtifacts.flatMap((binary2) => {
99550
+ if (!stoodIn.has(binary2.target)) return [];
99551
+ const native = simulatorNativeLibrary(swiftBinaryFramework(binary2).dir);
99552
+ return native?.kind === "framework" && isDynamicLibrary2(native.file) ? [[binary2.target, native.name]] : [];
99553
+ })
99554
+ );
99501
99555
  cached4.projectGaps = new Map(
99502
99556
  vendored.flatMap(({ target }) => {
99503
99557
  const gap = built2.gaps.get(target);
@@ -99557,10 +99611,7 @@ async function buildXcodeLayout(root) {
99557
99611
  nativeModules: registered.nativeModules
99558
99612
  }
99559
99613
  );
99560
- const { packages, standins, projectGaps, binaries } = await swiftPackages(
99561
- registered,
99562
- appTarget
99563
- );
99614
+ const { packages, standins, dynamicFrameworks, projectGaps, binaries } = await swiftPackages(registered, appTarget);
99564
99615
  const sourceFrameworks = new Map(
99565
99616
  packages.sourceFrameworks.map(
99566
99617
  ({
@@ -100164,7 +100215,8 @@ async function buildXcodeLayout(root) {
100164
100215
  (owner) => owner.module === original.moduleName
100165
100216
  )?.products ?? [] : [];
100166
100217
  const packageTarget = target.productType.startsWith("swiftpm.");
100167
- const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : null;
100218
+ const binaryFramework = target.productType === "swiftpm.target.binary" ? dynamicFrameworks.get(target.productName) ?? null : null;
100219
+ const packageFramework = target.productType === "swiftpm.library.dynamic" ? target.productName : binaryFramework;
100168
100220
  const buildVersion = {
100169
100221
  platform: packageTarget ? applicationBuildVersion.platform : target.buildVersion.platform,
100170
100222
  minimumOS: target.buildVersion.minimumOS ?? (packageTarget ? applicationBuildVersion.minimumOS : null),
@@ -100179,6 +100231,7 @@ async function buildXcodeLayout(root) {
100179
100231
  id: relative6(target.id),
100180
100232
  productName: packageFramework === null ? target.productName : `${packageFramework}.framework`,
100181
100233
  installName: packageFramework === null ? target.installName : `@rpath/${packageFramework}.framework/${packageFramework}`,
100234
+ machOType: binaryFramework === null ? target.machOType : "mh_dylib",
100182
100235
  sourceTarget: target.sourceTarget === null ? first ?? null : original ? frameworkNames.get(original) ?? original.moduleName : target.sourceTarget,
100183
100236
  buildVersion,
100184
100237
  dependencies: [
@@ -101721,6 +101774,7 @@ var init_swift_host = __esm({
101721
101774
  init_swift_standins();
101722
101775
  init_swift_submit();
101723
101776
  init_swift_toolchain();
101777
+ init_swift_xcframework();
101724
101778
  init_swiftContract();
101725
101779
  init_swiftContract();
101726
101780
  init_xcode_project();
@@ -112053,7 +112107,7 @@ var init_nitro_superset = __esm({
112053
112107
  init_nitroContract();
112054
112108
  init_swift_standin_digest();
112055
112109
  NITRO_SUPERSET_ENTRY_NAME = "superset";
112056
- NITRO_COMPILER_DIGEST = true ? "9e2716e3f26f690d5a0d470e7b2118aff9b949481b423a382bede1ae3bb9e5ed" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
112110
+ NITRO_COMPILER_DIGEST = true ? "98a615e818fd7ecd108090fffd262f6b9726b3f0350a386bea66b62b3395a63d" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
112057
112111
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
112058
112112
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
112059
112113
  published2 = /* @__PURE__ */ new Map();
@@ -112745,7 +112799,7 @@ var init_one_sdk_bundle = __esm({
112745
112799
  var runtime_companion_default;
112746
112800
  var init_runtime_companion = __esm({
112747
112801
  "runtime-companion.json"() {
112748
- runtime_companion_default = { abi: 1, sha256: "c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b", file: "node/cli-c3e71b5eaf9166fc3fdc4333c354332e1ff41e1a6c71b6814afebe7c7d14bf9b.cjs" };
112802
+ runtime_companion_default = { abi: 1, sha256: "2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367", file: "node/cli-2d42441f509451bf1c660a06ac087056d0cc7d96ca43aead02f6fd91f5e4e367.cjs" };
112749
112803
  }
112750
112804
  });
112751
112805
 
@@ -122622,19 +122676,11 @@ async function readJavaModuleSpecs(files2, sdkRoot, toolchain) {
122622
122676
  import_node_fs138.default.writeFileSync(target, bytes);
122623
122677
  origins.set(target, file);
122624
122678
  }
122625
- const { stdout } = await run9(
122626
- import_node_path142.default.join(toolchain.javaHome, "bin", "java"),
122627
- [
122628
- "-cp",
122629
- [
122630
- import_node_path142.default.join(sdkRoot, "tools.jar"),
122631
- import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
122632
- import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
122633
- ].join(import_node_path142.default.delimiter),
122634
- "dev.peach.tools.javaabi.JavaModuleSpecsKt",
122635
- ...origins.keys()
122636
- ],
122637
- { maxBuffer: 16 * 1024 * 1024 }
122679
+ const stdout = await runKotlinTool(
122680
+ toolchain,
122681
+ sdkRoot,
122682
+ "dev.peach.tools.javaabi.JavaModuleSpecsKt",
122683
+ [...origins.keys()]
122638
122684
  ).catch((cause) => {
122639
122685
  if (!isRecord(cause) || typeof cause.stderr !== "string") throw cause;
122640
122686
  let diagnostic = cause.stderr;
@@ -122705,20 +122751,11 @@ async function compileJavaModuleAbi(input) {
122705
122751
  { maxBuffer: 16 * 1024 * 1024 }
122706
122752
  );
122707
122753
  const library = import_node_path142.default.join(directory2, "java-abi.klib");
122708
- await run9(
122709
- import_node_path142.default.join(toolchain.javaHome, "bin", "java"),
122710
- [
122711
- "-cp",
122712
- [
122713
- import_node_path142.default.join(sdkRoot, "tools.jar"),
122714
- import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-compiler.jar"),
122715
- import_node_path142.default.resolve(import_node_path142.default.dirname(toolchain.kotlinc), "../lib/kotlin-stdlib.jar")
122716
- ].join(import_node_path142.default.delimiter),
122717
- "dev.peach.tools.platform.JavaPlatformTypesKt",
122718
- import_node_path142.default.join(directory2, `${name3}.klib`),
122719
- library
122720
- ],
122721
- { maxBuffer: 16 * 1024 * 1024 }
122754
+ await runKotlinTool(
122755
+ toolchain,
122756
+ sdkRoot,
122757
+ "dev.peach.tools.platform.JavaPlatformTypesKt",
122758
+ [import_node_path142.default.join(directory2, `${name3}.klib`), library]
122722
122759
  );
122723
122760
  return library;
122724
122761
  }
@@ -123458,23 +123495,7 @@ async function scanSources(tool, parse14, toolchain, moduleRoot, files2) {
123458
123495
  const key2 = digest3.digest("hex");
123459
123496
  let scan3 = toolScans.get(key2);
123460
123497
  if (!scan3) {
123461
- scan3 = (async () => {
123462
- const { kotlinc } = await ensureToolchain(toolchain);
123463
- const { stdout } = await run11(
123464
- import_node_path146.default.join(import_node_path146.default.dirname(kotlinc), "kotlin"),
123465
- [
123466
- "-cp",
123467
- [
123468
- import_node_path146.default.resolve(import_node_path146.default.dirname(kotlinc), "../lib/kotlin-compiler.jar"),
123469
- import_node_path146.default.join(sdk2.root, "tools.jar")
123470
- ].join(import_node_path146.default.delimiter),
123471
- tool,
123472
- ...files2
123473
- ],
123474
- { maxBuffer: 16 * 1024 * 1024 }
123475
- );
123476
- return stdout;
123477
- })().catch((error) => {
123498
+ scan3 = ensureToolchain(toolchain).then((ready) => runKotlinTool(ready, sdk2.root, tool, files2)).catch((error) => {
123478
123499
  toolScans.delete(key2);
123479
123500
  throw error;
123480
123501
  });
@@ -124231,18 +124252,12 @@ async function compileKotlin(input, origin) {
124231
124252
  ({ file, bytes }) => sources.includes(file) && bytes.includes("ViewModel")
124232
124253
  )) {
124233
124254
  await compileKlib(import_node_path146.default.join(work, "abi"));
124234
- const { stdout } = await run11(
124235
- import_node_path146.default.join(import_node_path146.default.dirname(kotlinc), "kotlin"),
124236
- [
124237
- "-cp",
124238
- [
124239
- import_node_path146.default.resolve(import_node_path146.default.dirname(kotlinc), "../lib/kotlin-compiler.jar"),
124240
- import_node_path146.default.join(sdk2.root, "tools.jar")
124241
- ].join(import_node_path146.default.delimiter),
124242
- viewModels.toolClass,
124243
- import_node_path146.default.join(work, "abi")
124244
- ],
124245
- { maxBuffer: 64 * 1024 * 1024 }
124255
+ const stdout = await runKotlinTool(
124256
+ ready,
124257
+ sdk2.root,
124258
+ viewModels.toolClass,
124259
+ [import_node_path146.default.join(work, "abi")],
124260
+ 64 * 1024 * 1024
124246
124261
  );
124247
124262
  import_node_fs142.default.writeFileSync(
124248
124263
  import_node_path146.default.join(generatedDir, viewModels.file),
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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;
@@ -8466,6 +8466,17 @@ function swiftPackageLinkage(target) {
8466
8466
  throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
8467
8467
  return linkage;
8468
8468
  }
8469
+ function linkEdges(targets, id) {
8470
+ const target = targets.get(id);
8471
+ if (!target) throw new Error(`unknown source target ${id}`);
8472
+ return target.dependencies.flatMap((edge) => {
8473
+ if (edge.attributes.length)
8474
+ throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8475
+ const dependency = targets.get(edge.target);
8476
+ if (!dependency) throw new Error(`unknown source target ${edge.target}`);
8477
+ return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
8478
+ });
8479
+ }
8469
8480
  function guestSourceImages(graph) {
8470
8481
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
8471
8482
  const entry = targets.get(graph.entry);
@@ -8489,17 +8500,14 @@ function guestSourceImages(graph) {
8489
8500
  ownership.set(id, image.id);
8490
8501
  image.members.push(id);
8491
8502
  active.add(id);
8492
- for (const edge of target.dependencies) {
8493
- if (edge.attributes.length)
8494
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8503
+ for (const edge of linkEdges(targets, id)) {
8495
8504
  const dependency = targets.get(edge.target);
8496
- if (!dependency) throw new Error(`unknown source target ${edge.target}`);
8497
8505
  const type = dependency.productType;
8498
8506
  let dynamic;
8499
8507
  if (type.startsWith("swiftpm.target.")) {
8500
8508
  if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
8501
8509
  throw new Error(`unsupported SwiftPM target ${edge.target}`);
8502
- dynamic = false;
8510
+ dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
8503
8511
  } else if (type.startsWith("swiftpm.library.")) {
8504
8512
  dynamic = swiftPackageLinkage(dependency) === "dynamic";
8505
8513
  } else if (type === "com.apple.product-type.library.static") {
@@ -8634,9 +8642,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
8634
8642
  (flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
8635
8643
  ))
8636
8644
  throw new Error(`unsupported special link flag for ${id}`);
8637
- for (const edge of target.dependencies) {
8638
- if (edge.attributes.length)
8639
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8645
+ for (const edge of linkEdges(targets, id)) {
8640
8646
  const dependencyImage = ownerByTarget.get(edge.target);
8641
8647
  if (dependencyImage === void 0)
8642
8648
  throw new Error(`linked target ${edge.target} has no guest image`);
@@ -14058,7 +14064,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
14058
14064
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
14059
14065
  var MULTI_MANIFEST_VERSION = 72;
14060
14066
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
14061
- var compilerSourceDigest = true ? "da253e49615973dfc65a40000574546cbf7dc4c9d44a36295773bd33442d8c1d" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
14067
+ var compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
14062
14068
  function swiftArtifactHash(input, release, moduleRoot) {
14063
14069
  const hash = (0, import_node_crypto15.createHash)("sha256");
14064
14070
  hash.update(`swift-compile
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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);
@@ -8420,6 +8420,17 @@ function swiftPackageLinkage(target) {
8420
8420
  throw new Error(`conflicting SwiftPM library linkage for ${target.id}`);
8421
8421
  return linkage;
8422
8422
  }
8423
+ function linkEdges(targets, id) {
8424
+ const target = targets.get(id);
8425
+ if (!target) throw new Error(`unknown source target ${id}`);
8426
+ return target.dependencies.flatMap((edge) => {
8427
+ if (edge.attributes.length)
8428
+ throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8429
+ const dependency = targets.get(edge.target);
8430
+ if (!dependency) throw new Error(`unknown source target ${edge.target}`);
8431
+ return dependency.productType.startsWith("swiftpm.library.") && swiftPackageLinkage(dependency) === "static" ? linkEdges(targets, edge.target) : [edge];
8432
+ });
8433
+ }
8423
8434
  function guestSourceImages(graph) {
8424
8435
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
8425
8436
  const entry = targets.get(graph.entry);
@@ -8443,17 +8454,14 @@ function guestSourceImages(graph) {
8443
8454
  ownership.set(id, image.id);
8444
8455
  image.members.push(id);
8445
8456
  active.add(id);
8446
- for (const edge of target.dependencies) {
8447
- if (edge.attributes.length)
8448
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8457
+ for (const edge of linkEdges(targets, id)) {
8449
8458
  const dependency = targets.get(edge.target);
8450
- if (!dependency) throw new Error(`unknown source target ${edge.target}`);
8451
8459
  const type = dependency.productType;
8452
8460
  let dynamic;
8453
8461
  if (type.startsWith("swiftpm.target.")) {
8454
8462
  if (type !== "swiftpm.target.regular" && type !== "swiftpm.target.binary" && type !== "swiftpm.target.system")
8455
8463
  throw new Error(`unsupported SwiftPM target ${edge.target}`);
8456
- dynamic = false;
8464
+ dynamic = type === "swiftpm.target.binary" && dependency.machOType === "mh_dylib";
8457
8465
  } else if (type.startsWith("swiftpm.library.")) {
8458
8466
  dynamic = swiftPackageLinkage(dependency) === "dynamic";
8459
8467
  } else if (type === "com.apple.product-type.library.static") {
@@ -8588,9 +8596,7 @@ function planGuestSourceLink(graph, images, callers, artifacts, symbols) {
8588
8596
  (flag) => /(?:^|,)-(?:weak|reexport|upward|lazy)(?:[_-]|$)/.test(flag)
8589
8597
  ))
8590
8598
  throw new Error(`unsupported special link flag for ${id}`);
8591
- for (const edge of target.dependencies) {
8592
- if (edge.attributes.length)
8593
- throw new Error(`unsupported link attributes for ${id} -> ${edge.target}`);
8599
+ for (const edge of linkEdges(targets, id)) {
8594
8600
  const dependencyImage = ownerByTarget.get(edge.target);
8595
8601
  if (dependencyImage === void 0)
8596
8602
  throw new Error(`linked target ${edge.target} has no guest image`);
@@ -14057,7 +14063,7 @@ var darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...q
14057
14063
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
14058
14064
  var MULTI_MANIFEST_VERSION = 72;
14059
14065
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
14060
- var compilerSourceDigest = true ? "da253e49615973dfc65a40000574546cbf7dc4c9d44a36295773bd33442d8c1d" : swiftCompilerSourceDigest(import.meta.dirname);
14066
+ var compilerSourceDigest = true ? "cdc5ec2138bb4a158f783cf86ed87144cd455551e18374805c743783ac04aa46" : swiftCompilerSourceDigest(import.meta.dirname);
14061
14067
  function swiftArtifactHash(input, release, moduleRoot) {
14062
14068
  const hash = createHash15("sha256");
14063
14069
  hash.update(`swift-compile
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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.2431 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2433 | (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;