peachsim 0.1.2406 → 0.1.2408

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/cli/agent-note.ts +231 -0
  2. package/cli/cloud-dispatch.ts +1 -1
  3. package/cli/commands/agent.ts +29 -26
  4. package/cli/commands/stream.ts +11 -7
  5. package/cli/main.ts +16 -2
  6. package/cli/outbound-endpoints.ts +15 -0
  7. package/dist-lib/agent-daemon-client.cjs +23 -3
  8. package/dist-lib/agent-events.cjs +1 -1
  9. package/dist-lib/attached-projects.cjs +1 -1
  10. package/dist-lib/auth/shared-session.cjs +1 -1
  11. package/dist-lib/backend-origin.cjs +1 -1
  12. package/dist-lib/beta.cjs +1 -1
  13. package/dist-lib/beta.mjs +1 -1
  14. package/dist-lib/bridge-constants.cjs +1 -1
  15. package/dist-lib/bridge-contract-input.cjs +1 -1
  16. package/dist-lib/bridge-contract-input.mjs +1 -1
  17. package/dist-lib/bridge-contract.cjs +1 -1
  18. package/dist-lib/bridge-contract.mjs +1 -1
  19. package/dist-lib/bundle-channel.cjs +201 -60
  20. package/dist-lib/capture-contract.cjs +1 -1
  21. package/dist-lib/capture-contract.mjs +1 -1
  22. package/dist-lib/cloud-contract.cjs +1 -1
  23. package/dist-lib/cloud-contract.mjs +1 -1
  24. package/dist-lib/cloud-test-args.cjs +1 -1
  25. package/dist-lib/cloud-test-args.mjs +1 -1
  26. package/dist-lib/cloud.cjs +1 -1
  27. package/dist-lib/cloud.mjs +1 -1
  28. package/dist-lib/config.cjs +1 -1
  29. package/dist-lib/config.mjs +1 -1
  30. package/dist-lib/detox/index.cjs +1 -1
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/expo-swift-bundle.cjs +200 -59
  33. package/dist-lib/expo-swift-metadata.cjs +1 -1
  34. package/dist-lib/expo-swift-metadata.mjs +1 -1
  35. package/dist-lib/home-paths.cjs +1 -1
  36. package/dist-lib/host/bridge-host.cjs +356 -100
  37. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  38. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  39. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  40. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  41. package/dist-lib/host/websocket-proxy.cjs +1 -1
  42. package/dist-lib/index.cjs +4 -4
  43. package/dist-lib/jump-to-source-babel.cjs +1 -1
  44. package/dist-lib/jump-to-source-native.cjs +1 -1
  45. package/dist-lib/kotlin-host.cjs +1 -1
  46. package/dist-lib/menu.cjs +1 -1
  47. package/dist-lib/menu.mjs +1 -1
  48. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  49. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  50. package/dist-lib/metro-production-bundle.cjs +1 -1
  51. package/dist-lib/metro-production-bundle.mjs +1 -1
  52. package/dist-lib/metro.cjs +4 -4
  53. package/dist-lib/native-app-identity-project.cjs +3 -3
  54. package/dist-lib/native-app-identity-project.mjs +3 -3
  55. package/dist-lib/native-app-identity.cjs +1 -1
  56. package/dist-lib/native-app-identity.mjs +1 -1
  57. package/dist-lib/native-firebase-metadata.cjs +1 -1
  58. package/dist-lib/native-firebase-metadata.mjs +1 -1
  59. package/dist-lib/pdfium-raster.cjs +1 -1
  60. package/dist-lib/pdfium-raster.mjs +1 -1
  61. package/dist-lib/plist.cjs +1 -1
  62. package/dist-lib/plist.mjs +1 -1
  63. package/dist-lib/profiles.cjs +1 -1
  64. package/dist-lib/public-brand.cjs +1 -1
  65. package/dist-lib/public-origins-lib-esm.json +24 -24
  66. package/dist-lib/public-origins-lib.json +56 -55
  67. package/dist-lib/react-native-host-modules.cjs +1 -1
  68. package/dist-lib/react-native-host-modules.mjs +1 -1
  69. package/dist-lib/reap-browser.cjs +1 -1
  70. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  71. package/dist-lib/sdk.cjs +1 -1
  72. package/dist-lib/sdk.mjs +1 -1
  73. package/dist-lib/skills.cjs +367 -106
  74. package/dist-lib/swift-compile.cjs +195 -54
  75. package/dist-lib/swift-compile.mjs +195 -54
  76. package/dist-lib/swift-package.cjs +1 -1
  77. package/dist-lib/swift-package.mjs +1 -1
  78. package/dist-lib/swift-submit.cjs +1 -1
  79. package/dist-lib/swift-submit.mjs +1 -1
  80. package/dist-lib/swift-toolchain.cjs +1 -1
  81. package/dist-lib/swift.cjs +1 -1
  82. package/dist-lib/vite-swift.cjs +198 -57
  83. package/dist-lib/vite.cjs +4 -4
  84. package/dist-lib/worklet-executable.cjs +1 -1
  85. package/dist-lib/worklet-executable.mjs +1 -1
  86. package/kotlin/sdk.tar.gz +0 -0
  87. package/package.json +1 -1
  88. package/skills/peach-setup/SKILL.md +8 -3
  89. package/src/agent-daemon-client.ts +35 -2
  90. package/src/agent-prompt.ts +68 -0
  91. package/src/canvas-agent-note-delivery.ts +83 -0
  92. package/src/host/agent-host.ts +128 -18
  93. package/src/swift-compile.ts +124 -66
  94. package/src/swift-host.ts +2 -1
  95. package/src/swift-objc-import.ts +99 -0
  96. package/src/xcode-header-search.ts +33 -0
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2406 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2408 | (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;
@@ -7099,7 +7099,7 @@ var swiftCoverageProvenance;
7099
7099
  var init_provenance = __esm({
7100
7100
  "src/swift-coverage/provenance.ts"() {
7101
7101
  "use strict";
7102
- swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"d61be5d97c018bef4cf2a423f3625bac9757ab2c8e8541a00a4f29ebf048640f","xcode-project.ts":"092e07d3f9154f5aaf9f7c668f16c933c3ac5d8c57e5c32df0222ae6f785eaf7","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
7102
+ swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"dec93d0206df8efbd9f538d1f3e3f6173f6eb022cb9ad6b02271481db7578d77","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"092e07d3f9154f5aaf9f7c668f16c933c3ac5d8c57e5c32df0222ae6f785eaf7","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
7103
7103
  }
7104
7104
  });
7105
7105
 
@@ -24008,6 +24008,61 @@ function swiftClangImporterFlags(flags) {
24008
24008
  (flag) => flag !== "-fobjc-arc" && flag !== "-fno-objc-arc" && !/^-std=(?:c(?!\+\+)|gnu(?!\+\+)|iso9899:)/.test(flag)
24009
24009
  );
24010
24010
  }
24011
+ function compactSwiftClangDefines(flags) {
24012
+ const definitions = /* @__PURE__ */ new Map();
24013
+ const macros = [];
24014
+ for (let index = 0; index < flags.length; index++) {
24015
+ if (flags[index].startsWith("@")) return flags;
24016
+ if (flags[index] !== "-Xcc") continue;
24017
+ const flag = flags[++index];
24018
+ if (flag === void 0 || flags[index - 2] === "-Xfrontend" || flag === "-Xclang" || flag === "-Xpreprocessor" || flag.startsWith("-Wp,") || flag.startsWith("--config") || flag.startsWith("@"))
24019
+ return flags;
24020
+ if (CLANG_PATH_OPTIONS.has(flag) && flags[index + 1] === "-Xcc") {
24021
+ index += 2;
24022
+ continue;
24023
+ }
24024
+ if (!flag.startsWith("-D") && !flag.startsWith("-U")) continue;
24025
+ const name3 = /^-[DU]([A-Za-z_$][\w$]*)(?=[(=]|$)/.exec(flag)?.[1];
24026
+ if (!name3) return flags;
24027
+ const previous = definitions.get(name3);
24028
+ definitions.set(name3, previous === void 0 || previous === flag ? flag : null);
24029
+ macros.push({ index, name: name3, flag });
24030
+ }
24031
+ const seen = /* @__PURE__ */ new Set();
24032
+ const duplicates = /* @__PURE__ */ new Set();
24033
+ for (const { index, name: name3, flag } of macros) {
24034
+ if (definitions.get(name3) !== flag) continue;
24035
+ if (seen.has(name3)) {
24036
+ duplicates.add(index - 1);
24037
+ duplicates.add(index);
24038
+ }
24039
+ seen.add(name3);
24040
+ }
24041
+ return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
24042
+ }
24043
+ function compactSwiftClangOverlays(flags, generated) {
24044
+ if (generated.size === 0) return flags;
24045
+ const overlays = /* @__PURE__ */ new Map();
24046
+ const duplicates = /* @__PURE__ */ new Set();
24047
+ for (let index = 0; index < flags.length; index++) {
24048
+ const flag = flags[index];
24049
+ if (flag.startsWith("@")) return flags;
24050
+ if (flag === "-Xcc" && flags[index - 1] === "-Xfrontend") return flags;
24051
+ if (flags[index - 1] === "-Xcc" && (flag.startsWith("--config") || flag === "-Xclang"))
24052
+ return flags;
24053
+ if (!flag.startsWith("-ivfsoverlay") && !flag.startsWith("-vfsoverlay")) continue;
24054
+ if (flag !== "-ivfsoverlay" || flags[index - 1] !== "-Xcc" || flags[index + 1] !== "-Xcc")
24055
+ return flags;
24056
+ const file = flags[index + 2];
24057
+ if (file === void 0 || !generated.has(file)) return flags;
24058
+ const previous = overlays.get(file);
24059
+ if (previous !== void 0)
24060
+ for (let offset = -1; offset < 3; offset++) duplicates.add(previous + offset);
24061
+ overlays.set(file, index);
24062
+ index += 2;
24063
+ }
24064
+ return duplicates.size === 0 ? flags : flags.filter((_, index) => !duplicates.has(index));
24065
+ }
24011
24066
  function swiftSubmoduleImports(sources) {
24012
24067
  const imports2 = /* @__PURE__ */ new Map();
24013
24068
  for (const source of sources)
@@ -24032,7 +24087,7 @@ function swiftObjCModuleMap(module2, headers, submodules = /* @__PURE__ */ new S
24032
24087
  ""
24033
24088
  ].join("\n");
24034
24089
  }
24035
- var SWIFT_OBJC_INTEROP_FLAGS, SWIFT_SUBMODULE_IMPORT;
24090
+ var SWIFT_OBJC_INTEROP_FLAGS, CLANG_PATH_OPTIONS, SWIFT_SUBMODULE_IMPORT;
24036
24091
  var init_swift_objc_import = __esm({
24037
24092
  "src/swift-objc-import.ts"() {
24038
24093
  "use strict";
@@ -24046,6 +24101,23 @@ var init_swift_objc_import = __esm({
24046
24101
  "-Xcc",
24047
24102
  "-fblocks"
24048
24103
  ];
24104
+ CLANG_PATH_OPTIONS = /* @__PURE__ */ new Set([
24105
+ "-I",
24106
+ "-F",
24107
+ "-idirafter",
24108
+ "-iframework",
24109
+ "-iframeworkwithsysroot",
24110
+ "-imacros",
24111
+ "-include",
24112
+ "-iprefix",
24113
+ "-iquote",
24114
+ "-isystem",
24115
+ "-isysroot",
24116
+ "-ivfsoverlay",
24117
+ "-iwithprefix",
24118
+ "-iwithprefixbefore",
24119
+ "--sysroot"
24120
+ ]);
24049
24121
  SWIFT_SUBMODULE_IMPORT = /^[ \t]*(?:@\w+(?:\([^)]*\))?[ \t]+)*import[ \t]+([A-Za-z_]\w*)\.([A-Za-z_]\w*)[ \t]*(?:\/\/.*)?$/gm;
24050
24122
  }
24051
24123
  });
@@ -24415,6 +24487,30 @@ var init_swift_uniform_type_constants = __esm({
24415
24487
  });
24416
24488
 
24417
24489
  // src/xcode-header-search.ts
24490
+ function coalescibleHeaderOverlays(files2) {
24491
+ const aliases = /* @__PURE__ */ new Map();
24492
+ const key2 = (file) => file.replace(/[A-Z]/g, (letter) => letter.toLowerCase());
24493
+ const index = (directory2, entry) => {
24494
+ const name3 = import_node_path52.default.resolve(directory2, entry.name);
24495
+ if (entry.type === "directory")
24496
+ return entry.contents.every((child) => index(name3, child));
24497
+ const source = entry["external-contents"];
24498
+ const previous = aliases.get(key2(name3));
24499
+ if (previous !== void 0 && previous !== source) return false;
24500
+ aliases.set(key2(name3), source);
24501
+ return true;
24502
+ };
24503
+ for (const file of files2) {
24504
+ const overlay = JSON.parse(import_node_fs54.default.readFileSync(file, "utf8"));
24505
+ if (!overlay.roots.every((entry) => index(import_node_path52.default.dirname(file), entry)))
24506
+ return /* @__PURE__ */ new Set();
24507
+ }
24508
+ for (const file of [...files2, ...aliases.values()]) {
24509
+ const source = aliases.get(key2(import_node_path52.default.normalize(file)));
24510
+ if (source !== void 0 && source !== file) return /* @__PURE__ */ new Set();
24511
+ }
24512
+ return files2;
24513
+ }
24418
24514
  function headerMap(entries) {
24419
24515
  const unique = /* @__PURE__ */ new Map();
24420
24516
  for (const entry of entries)
@@ -25339,6 +25435,15 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
25339
25435
  )
25340
25436
  );
25341
25437
  const names = /* @__PURE__ */ new Set([...frameworks, ...targets.map((target) => target.name)]);
25438
+ const entriesByPrefix = new Map(
25439
+ targets.map(({ path: path79 }) => [path79 === "." ? "" : `${path79}/`, []])
25440
+ );
25441
+ for (const entry of Object.entries(files2)) {
25442
+ const [file] = entry;
25443
+ entriesByPrefix.get("")?.push(entry);
25444
+ for (let end = file.indexOf("/"); end !== -1; end = file.indexOf("/", end + 1))
25445
+ entriesByPrefix.get(file.slice(0, end + 1))?.push(entry);
25446
+ }
25342
25447
  const siblings = /* @__PURE__ */ new Map();
25343
25448
  for (const target of targets) {
25344
25449
  const prefix = target.path === "." ? "" : `${target.path}/`;
@@ -25352,8 +25457,11 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
25352
25457
  (dependency) => dependency.kind === "target" && dependency.name !== target.name && names.has(dependency.name) || dependency.kind === "product" && dependency.package === "sootsim-swift" && OPTIONAL_FRAMEWORKS.has(dependency.name) ? [dependency.name] : []
25353
25458
  )
25354
25459
  );
25355
- for (const [file, contents2] of Object.entries(files2)) {
25356
- if (file === "Package.swift" || !file.startsWith(prefix)) continue;
25460
+ const nested = target.sources === void 0 ? targets.flatMap(
25461
+ (candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) ? [`${candidate.path}/`] : []
25462
+ ) : [];
25463
+ for (const [file, contents2] of entriesByPrefix.get(prefix) ?? []) {
25464
+ if (file === "Package.swift") continue;
25357
25465
  const relative3 = file.slice(prefix.length);
25358
25466
  if (target.sources !== void 0 && !target.sources.some(
25359
25467
  (source) => source === "." || relative3 === source || relative3.startsWith(`${source}/`)
@@ -25363,10 +25471,7 @@ function swiftTargetDependencies(files2, targets, frameworks = OPTIONAL_FRAMEWOR
25363
25471
  (excluded) => relative3 === excluded || relative3.startsWith(`${excluded}/`)
25364
25472
  ))
25365
25473
  continue;
25366
- if (target.sources === void 0 && targets.some(
25367
- (candidate) => candidate.name !== target.name && candidate.path !== "." && candidate.path.startsWith(prefix) && file.startsWith(`${candidate.path}/`)
25368
- ))
25369
- continue;
25474
+ if (nested.some((path79) => file.startsWith(path79))) continue;
25370
25475
  const imports2 = file.endsWith(".swift") ? swiftImportNames(contents2) : SWIFT_NATIVE_SOURCE_EXTENSIONS.some((extension) => file.endsWith(extension)) ? clangImportNames(contents2, ownsHeader) : [];
25371
25476
  for (const name3 of imports2) {
25372
25477
  if (names.has(name3) && name3 !== target.name && !(target.dependencies !== void 0 && localNames.has(name3)))
@@ -25611,7 +25716,9 @@ function emitSwiftPackageManifest(args) {
25611
25716
  const flags = JSON.parse(literal2.replace(/,\s*]$/, "]")).filter(
25612
25717
  (flag, index, all) => !mapsPackageModule(flag) && !(flag === "-Xcc" && mapsPackageModule(all[index + 1] ?? ""))
25613
25718
  );
25614
- const content = flags.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
25719
+ const macros = compactSwiftClangDefines(flags);
25720
+ const compact = args.coalescibleOverlays ? compactSwiftClangOverlays(macros, args.coalescibleOverlays) : macros;
25721
+ const content = compact.map((flag) => JSON.stringify(flag)).join("\n") + "\n";
25615
25722
  const digest3 = (0, import_node_crypto24.createHash)("sha256").update(content).digest("hex");
25616
25723
  const file = import_node_path53.default.join(args.root, ".peach-swift-arguments", `${digest3}.rsp`);
25617
25724
  args.files.set(file, content);
@@ -25702,7 +25809,7 @@ function emitSwiftPackageManifest(args) {
25702
25809
  ].map((flag) => `, ${JSON.stringify(flag)}`).join("");
25703
25810
  const header = args.headerDirectory && (args.nativeHeaderDeclarations?.[target.name] || [...args.native?.values() ?? []].some(
25704
25811
  (value) => value.late?.producers.includes(target.name)
25705
- )) ? `, "-emit-objc-header-path", ${JSON.stringify(import_node_path53.default.join(args.headerDirectory, `${target.name}-Swift${args.nativeHeaderDeclarations?.[target.name] ? ".original" : ""}.h`))}` : "";
25812
+ )) ? `, "-emit-objc-header-path", ${JSON.stringify(import_node_path53.default.join(args.headerDirectory, `${target.name}-Swift.original.h`))}` : "";
25706
25813
  const clangMode = target.cxxInterop ? "" : ', "-Xcc", "-fno-cxx-modules"';
25707
25814
  const deployment = `, "-Xfrontend", "-peach-ios-deployment-target", "-Xfrontend", ${JSON.stringify(target.iosDeploymentTarget ?? SWIFTPM_DEFAULT_IOS_DEPLOYMENT_TARGET)}`;
25708
25815
  const swiftSettings = `swiftSettings: [.swiftLanguageMode(.v${target.languageMode}),${isolation}${interoperability}${defines}${features}${upcoming} .unsafeFlags(${swiftFlagArray(`["-Osize", "-Xfrontend", "-enable-cross-import-overlays"${overlayFlags}${FOUNDATION_IMPLICIT_FLAGS}${oneModule ? ONE_IMPLICIT_FLAGS : ""}${imports2}${nativeImportFlags}${objcFlags}${header}${clangMode}${deployment}${upstream}]`)})]`;
@@ -27784,6 +27891,9 @@ module ${moduleName}.Swift {
27784
27891
  nativeHeaderDeclarations[module2] = [...declared];
27785
27892
  }
27786
27893
  const nativeFlags = native.size > 0 ? /* @__PURE__ */ new Map() : void 0;
27894
+ const generatedOverlays = new Set(
27895
+ headerSearch.files.filter((file) => file.endsWith(".yaml"))
27896
+ );
27787
27897
  if (nativeFlags) {
27788
27898
  const toolchainBin = nativeToolchain();
27789
27899
  const headers = import_node_path53.default.join(swiftSdkPaths(moduleRoot, toolchainBin).sysroot, "darwin");
@@ -27804,8 +27914,11 @@ module ${moduleName}.Swift {
27804
27914
  throw new Error(
27805
27915
  target.name + ": missing or unsupported declared iOS deployment target " + JSON.stringify(version2)
27806
27916
  );
27917
+ const sdkIntake = objcSdkIntakeFlags(headers, toolchainBin, minimum);
27918
+ const sdkOverlay = sdkIntake.indexOf("-ivfsoverlay");
27919
+ if (sdkOverlay >= 0) generatedOverlays.add(sdkIntake[sdkOverlay + 1]);
27807
27920
  const intake = [
27808
- ...objcSdkIntakeFlags(headers, toolchainBin, minimum),
27921
+ ...sdkIntake,
27809
27922
  "-ivfsoverlay",
27810
27923
  headerSearch.files[0],
27811
27924
  "-I",
@@ -27974,6 +28087,7 @@ module ${moduleName}.Swift {
27974
28087
  sourceSwiftTargets: swiftTargets,
27975
28088
  nativeFlags,
27976
28089
  nativeImportFlags,
28090
+ coalescibleOverlays: nativeFlags ? coalescibleHeaderOverlays(generatedOverlays) : void 0,
27977
28091
  nativeHeaderFlags,
27978
28092
  nativeSwiftHeaderMaps,
27979
28093
  nativeHeaderDeclarations,
@@ -29272,6 +29386,7 @@ function compileSwiftProjectOnce(input, options) {
29272
29386
  report("compiling and linking Swift modules");
29273
29387
  const frameworkInterfaces = /* @__PURE__ */ new Map();
29274
29388
  const nativeDeclarations = /* @__PURE__ */ new Map();
29389
+ const nativeHeaders = Object.entries(input.files).filter(([name3]) => name3.endsWith(".h") && !name3.endsWith("-Swift.h")).map(([, source]) => source);
29275
29390
  for (const [file, contents2] of Object.entries(input.files)) {
29276
29391
  if (!file.endsWith(".modulemap")) continue;
29277
29392
  const name3 = moduleMapName(contents2);
@@ -29359,54 +29474,83 @@ function compileSwiftProjectOnce(input, options) {
29359
29474
  );
29360
29475
  return value;
29361
29476
  };
29362
- try {
29363
- for (const build of preparation.headerBuilds) {
29364
- await runCompiler(
29365
- swift,
29366
- [...buildArgs, "--target", build.target],
29367
- appOptions,
29368
- SWIFTPM_PROGRESS,
29369
- SWIFTPM_NOISE
29477
+ const compileApp = async () => {
29478
+ const stages = [
29479
+ ...preparation.headerBuilds,
29480
+ ...preparation.nativeProductTarget ? [{ target: preparation.nativeProductTarget, producers: [] }] : []
29481
+ ];
29482
+ const checkpoints = import_node_path53.default.join(root, ".build", "peach-product-checkpoints");
29483
+ const recipe2 = (0, import_node_crypto24.createHash)("sha256").update(hash).update((0, import_node_fs55.readFileSync)(import_node_path53.default.join(root, "Package.swift"))).update(JSON.stringify(buildArgs)).digest("hex");
29484
+ for (const { target, producers } of stages) {
29485
+ const receipt = import_node_path53.default.join(
29486
+ checkpoints,
29487
+ (0, import_node_crypto24.createHash)("sha256").update(target).digest("hex")
29370
29488
  );
29371
- for (const producer of build.producers) {
29372
- const emitted = import_node_path53.default.join(
29489
+ const headers = producers.map((producer) => {
29490
+ const stem = import_node_path53.default.join(
29373
29491
  root,
29374
29492
  ".build",
29375
29493
  "peach-cxx-headers",
29376
- `${producer}-Swift.h`
29494
+ `${producer}-Swift`
29377
29495
  );
29378
- const original = preparation.nativeHeaderDeclarations[producer] ? emitted.replace(/-Swift\.h$/, "-Swift.original.h") : emitted;
29379
- if ((0, import_node_fs55.existsSync)(original)) {
29380
- const generated = clangInterfaceHeader(
29381
- (0, import_node_fs55.readFileSync)(original, "utf8")
29382
- );
29383
- writeBuildFile(
29384
- emitted,
29385
- withoutSwiftDeclarations(
29386
- swiftHeaderWithSuperclassImports(generated, frameworkInterface),
29387
- /* @__PURE__ */ new Set([
29388
- ...preparation.nativeHeaderDeclarations[producer] ?? [],
29389
- ...nativelyDeclaredFunctions(
29390
- generated,
29391
- Object.entries(input.files).filter(
29392
- ([name3]) => name3.endsWith(".h") && !name3.endsWith("-Swift.h")
29393
- ).map(([, source]) => source)
29394
- )
29395
- ]),
29396
- `#import <${producer}/${producer}.h>`
29397
- )
29496
+ return {
29497
+ producer,
29498
+ original: `${stem}.original.h`,
29499
+ emitted: `${stem}.h`
29500
+ };
29501
+ });
29502
+ const fingerprint = () => {
29503
+ const digest3 = (0, import_node_crypto24.createHash)("sha256").update(recipe2);
29504
+ for (const { emitted } of headers) {
29505
+ if (!(0, import_node_fs55.existsSync)(emitted)) return;
29506
+ digest3.update(
29507
+ (0, import_node_crypto24.createHash)("sha256").update((0, import_node_fs55.readFileSync)(emitted)).digest()
29398
29508
  );
29399
29509
  }
29400
- }
29401
- }
29402
- if (preparation.nativeProductTarget) {
29510
+ return digest3.digest("hex");
29511
+ };
29512
+ if (!options.project && (0, import_node_fs55.existsSync)(receipt) && (0, import_node_fs55.readFileSync)(receipt, "utf8") === fingerprint())
29513
+ continue;
29514
+ if (!options.project) (0, import_node_fs55.rmSync)(receipt, { force: true });
29515
+ for (const { producer, original } of headers)
29516
+ if (!(0, import_node_fs55.existsSync)(original))
29517
+ (0, import_node_fs55.rmSync)(
29518
+ import_node_path53.default.join(
29519
+ root,
29520
+ ".build",
29521
+ WASM_TRIPLE,
29522
+ "release",
29523
+ "Modules",
29524
+ `${swiftTargetModuleName(producer)}.swiftmodule`
29525
+ ),
29526
+ { force: true }
29527
+ );
29403
29528
  await runCompiler(
29404
29529
  swift,
29405
- [...buildArgs, "--target", preparation.nativeProductTarget],
29530
+ [...buildArgs, "--target", target],
29406
29531
  appOptions,
29407
29532
  SWIFTPM_PROGRESS,
29408
29533
  SWIFTPM_NOISE
29409
29534
  );
29535
+ for (const { producer, original, emitted } of headers) {
29536
+ const generated = clangInterfaceHeader((0, import_node_fs55.readFileSync)(original, "utf8"));
29537
+ writeBuildFile(
29538
+ emitted,
29539
+ withoutSwiftDeclarations(
29540
+ swiftHeaderWithSuperclassImports(generated, frameworkInterface),
29541
+ /* @__PURE__ */ new Set([
29542
+ ...preparation.nativeHeaderDeclarations[producer] ?? [],
29543
+ ...nativelyDeclaredFunctions(generated, nativeHeaders)
29544
+ ]),
29545
+ `#import <${producer}/${producer}.h>`
29546
+ )
29547
+ );
29548
+ }
29549
+ if (!options.project) {
29550
+ (0, import_node_fs55.mkdirSync)(checkpoints, { recursive: true });
29551
+ (0, import_node_fs55.writeFileSync)(`${receipt}.partial`, fingerprint());
29552
+ (0, import_node_fs55.renameSync)(`${receipt}.partial`, receipt);
29553
+ }
29410
29554
  }
29411
29555
  await runCompiler(
29412
29556
  swift,
@@ -29415,6 +29559,9 @@ function compileSwiftProjectOnce(input, options) {
29415
29559
  SWIFTPM_PROGRESS,
29416
29560
  SWIFTPM_NOISE
29417
29561
  );
29562
+ };
29563
+ try {
29564
+ await compileApp();
29418
29565
  } catch (error) {
29419
29566
  const output3 = outputOf(error);
29420
29567
  const moduleCache = import_node_path53.default.join(
@@ -29427,13 +29574,7 @@ function compileSwiftProjectOnce(input, options) {
29427
29574
  if (output3.includes("was compiled with module cache path") && (0, import_node_fs55.existsSync)(moduleCache)) {
29428
29575
  (0, import_node_fs55.rmSync)(moduleCache, { recursive: true, force: true });
29429
29576
  try {
29430
- await runCompiler(
29431
- swift,
29432
- buildArgs,
29433
- appOptions,
29434
- SWIFTPM_PROGRESS,
29435
- SWIFTPM_NOISE
29436
- );
29577
+ await compileApp();
29437
29578
  } catch (retryError) {
29438
29579
  throw new Error(
29439
29580
  [
@@ -29764,9 +29905,9 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
29764
29905
  `;
29765
29906
  darwinRecordsRegion = (quoted2) => quoted2.length ? ["-Wl,--start-lib", ...quoted2, "-Wl,--end-lib"] : [];
29766
29907
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
29767
- MULTI_MANIFEST_VERSION = 69;
29908
+ MULTI_MANIFEST_VERSION = 71;
29768
29909
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
29769
- compilerSourceDigest = true ? "5f7b13ec00e56a1f8e36b1e4f1688c4eb10836e9afffb80f5e63e4fbf23e9070" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
29910
+ compilerSourceDigest = true ? "36b1496faf39a688e5ab3ee63bdab89a3afde2b9c6355443c3162f4b1e3b9144" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
29770
29911
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
29771
29912
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
29772
29913
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -34011,7 +34152,7 @@ var init_swift_standin_digest = __esm({
34011
34152
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
34012
34153
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
34013
34154
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
34014
- STANDIN_SOURCE_DIGEST = true ? "2e7f1f173feffee6e539b11d8cd6fa9540f7418a23e3563c8b2d9aa747495bd6" : standinSourceDigest();
34155
+ STANDIN_SOURCE_DIGEST = true ? "80b89d414ee068d747a0859811608daad7d3c46ca66f7bf589cc5c82b820de93" : standinSourceDigest();
34015
34156
  }
34016
34157
  });
34017
34158
 
@@ -43496,7 +43637,7 @@ async function swiftPackages(entry, app) {
43496
43637
  ] : []
43497
43638
  );
43498
43639
  let reached = [...cached2.binaries.filter((binary2) => binary2.reached), ...vendored];
43499
- const standinArtifact = (binary2) => binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0;
43640
+ const standinArtifact = (binary2) => !binary2.rustCrate && (binary2.publicHeaders === void 0 || binary2.unloweredSources !== void 0);
43500
43641
  const artifacts = reached.filter(standinArtifact);
43501
43642
  if (entry.moduleRoot && entry.provided && artifacts.length > 0) {
43502
43643
  const { provided } = entry;
@@ -56541,7 +56682,7 @@ init_swift_native_pin();
56541
56682
  init_xcode_project();
56542
56683
  var EXPO_NATIVE_ENTRY_NAME = "ios";
56543
56684
  function expoNativeCompilerDigestValue() {
56544
- return true ? "a21e70334c74419c8ca0427886adcfb457911bc210711ce2210c3f98b2dabf6b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
56685
+ return true ? "3860d02e968c4e679b7669066efdc2302ff559ff6014934ad88d4fad7996909d" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
56545
56686
  }
56546
56687
  var IDENTITY_SOURCE_SKIPS = 1 | 4 | 8 | 16 | 32 | 64 | 128 | 4096;
56547
56688
  function readSources(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2406 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2408 | (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.2406 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2408 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../peach-globals/src/bundle-global-footer.ts
4
4
  function findBundleFooter(source, prefix) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2406 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2408 | (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;