peachsim 0.1.2422 → 0.1.2425

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/cli/command-agent.ts +14 -15
  2. package/cli/commands/box.ts +33 -28
  3. package/cli/commands/canvas.ts +54 -0
  4. package/cli/commands/platform.ts +28 -27
  5. package/cli/commands/preview.ts +2 -1
  6. package/cli/outbound-endpoints.ts +141 -23
  7. package/dist-lib/agent-daemon-client.cjs +1 -1
  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 +114 -28
  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 +22 -1
  23. package/dist-lib/cloud-contract.mjs +20 -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 +27 -13
  31. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  32. package/dist-lib/expo-swift-bundle.cjs +112 -26
  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 +114 -28
  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 +88 -59
  43. package/dist-lib/jump-to-source-babel.cjs +1 -1
  44. package/dist-lib/jump-to-source-native.cjs +22 -7
  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 +25 -10
  53. package/dist-lib/native-app-identity-project.cjs +2 -2
  54. package/dist-lib/native-app-identity-project.mjs +2 -2
  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 +54 -53
  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 +258 -150
  74. package/dist-lib/swift-compile.cjs +87 -16
  75. package/dist-lib/swift-compile.mjs +87 -16
  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 +88 -17
  83. package/dist-lib/vite.cjs +25 -10
  84. package/dist-lib/worklet-executable.cjs +1 -1
  85. package/dist-lib/worklet-executable.mjs +1 -1
  86. package/dist-types/packages/peach-engine/src/ios/apps/canvas-map-data.d.ts +83 -2
  87. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  88. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -0
  89. package/dist-types/packages/peach-globals/src/canvasAgentContract.d.ts +8 -0
  90. package/dist-types/packages/peach-globals/src/index.d.ts +4 -2
  91. package/dist-types/packages/peach-globals/src/lockstepCaptureBridgeContract.d.ts +1 -0
  92. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +12 -0
  93. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +5 -1
  94. package/kotlin/README.md +4 -3
  95. package/kotlin/sdk.tar.gz +0 -0
  96. package/kotlin/toolchain.json +2 -2
  97. package/package.json +1 -1
  98. package/runtime-companion.json +1 -1
  99. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/CoreData.apinotes +2 -0
  100. package/sdk/ios/System/Library/Frameworks/CoreData.framework/Headers/NSPersistentStore.h +2 -0
  101. package/sdk/ios/wasm/include/errno.h +10 -0
  102. package/src/agent-daemon-client.ts +1 -1
  103. package/src/agent-prompt.ts +1 -8
  104. package/src/canvas-agent-note-delivery.ts +2 -5
  105. package/src/canvas-groups.ts +11 -3
  106. package/src/cloud-contract.ts +31 -1
  107. package/src/swift-compile.ts +1 -1
  108. package/src/swift-guest-compile.ts +2 -0
  109. package/src/swift-guest-image-ledger.ts +37 -2
  110. package/src/swift-guest-source-inputs.ts +45 -6
  111. package/src/visit-parsed-program.ts +21 -6
  112. package/src/vite-plugin.ts +4 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2422 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2425 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -15718,7 +15718,7 @@ var init_registry = __esm({
15718
15718
  coverage: 0.88,
15719
15719
  note: "native-seam only - upstream WebSQL-compatible JS wrapper runs from the bundle; RNSqlite2.exec is backed by the shared bedrock-sqlite WASM engine",
15720
15720
  working: "openDatabase wrapper, transaction/readTransaction JS flow, exec query batches, rows/rowsAffected/insertId result shape, read-only transaction write rejection, multiply native smoke method",
15721
- missing: "exact native file locations, multi-connection throughput behavior, and platform-specific SQLite extension loading"
15721
+ missing: "exact native file locations, embedded NUL in returned text, multi-connection throughput behavior, and platform-specific SQLite extension loading"
15722
15722
  }
15723
15723
  ]
15724
15724
  },
@@ -15982,8 +15982,8 @@ var init_registry = __esm({
15982
15982
  {
15983
15983
  range: ">=1.0.0",
15984
15984
  coverage: 0.75,
15985
- note: "native-seam only \u2014 upstream JS runs from the bundle; SpotlightSearch accepts index/delete calls and initial item reads without a CoreSpotlight index",
15986
- working: "getInitialSearchItem, indexItem, indexItems, deleteItemsWithIdentifiers, deleteItemsInDomains, deleteAllItems, listener bookkeeping",
15985
+ note: "the published JS runs over the native seam. Index mutations reject with the CoreSpotlight indexingUnsupported error from an unavailable index.",
15986
+ working: "getInitialSearchItem resolves null without a tap-through launch; index and delete calls report CoreSpotlight indexingUnsupported through the React Native error bridge",
15987
15987
  missing: "no OS Spotlight index or tap-through launch events in the browser"
15988
15988
  }
15989
15989
  ]
@@ -31114,8 +31114,8 @@ function swiftNativeTargetsRefusal(value) {
31114
31114
  const products = field2("productHeaders");
31115
31115
  const inputPath = (value2) => typeof value2 === "string" && value2.startsWith(`${SWIFT_NATIVE_INPUT_ROOT}/`) && isSwiftResourcePath(value2.slice(SWIFT_NATIVE_INPUT_ROOT.length + 1));
31116
31116
  const deployment = field2("deploymentTarget");
31117
- const targetName2 = field2("name");
31118
- if (typeof targetName2 !== "string" || targetName2.length === 0 || targetName2.length > 4096 || targetName2.includes("\0") || targetName2.includes("/") || targetName2.includes("\\") || targetName2 === "." || targetName2 === "..")
31117
+ const targetName = field2("name");
31118
+ if (typeof targetName !== "string" || targetName.length === 0 || targetName.length > 4096 || targetName.includes("\0") || targetName.includes("/") || targetName.includes("\\") || targetName === "." || targetName === "..")
31119
31119
  return at("name");
31120
31120
  if (!(deployment === null || typeof deployment === "string" && /^\d+(?:\.\d+){0,2}$/.test(deployment)))
31121
31121
  return at("deploymentTarget");
@@ -44769,8 +44769,8 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44769
44769
  }
44770
44770
  return deps;
44771
44771
  };
44772
- const admitTextualIncludes = (root, targetName2, targetObj, searchRoots) => {
44773
- const prefix = `${targetPath(targetName2)}/upstream/`;
44772
+ const admitTextualIncludes = (root, targetName, targetObj, searchRoots) => {
44773
+ const prefix = `${targetPath(targetName)}/upstream/`;
44774
44774
  const queue2 = Object.keys(result.files).filter((key2) => key2.startsWith(prefix));
44775
44775
  const scanned = /* @__PURE__ */ new Set();
44776
44776
  const excludes = new Set(targetObj.exclude ?? []);
@@ -44829,22 +44829,22 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44829
44829
  for (const node of allModules) {
44830
44830
  const module2 = node.provider;
44831
44831
  const config = node.config;
44832
- const targetName2 = nitroProviderTarget(module2);
44833
- const targetObj = nodeTargets.get(targetName2);
44832
+ const targetName = nitroProviderTarget(module2);
44833
+ const targetObj = nodeTargets.get(targetName);
44834
44834
  const podName = node.podspec.podName ?? config.swiftModule ?? module2.name;
44835
44835
  const searchRoots = node.podspec.headerSearchPaths;
44836
44836
  for (const dir of searchRoots) searchRootDirs.add(dir);
44837
- const implementationHeaders = import_node_fs28.default.existsSync(import_node_path25.default.join(module2.root, "cpp")) ? collect(module2.root, "cpp", targetName2, podName) : /* @__PURE__ */ new Map();
44837
+ const implementationHeaders = import_node_fs28.default.existsSync(import_node_path25.default.join(module2.root, "cpp")) ? collect(module2.root, "cpp", targetName, podName) : /* @__PURE__ */ new Map();
44838
44838
  for (const dir of searchRoots.filter(
44839
44839
  (dir2) => dir2 !== "cpp" && !dir2.startsWith("cpp/") && dir2 !== "ios" && !dir2.startsWith("ios/") && !searchRoots.some((other) => other !== dir2 && dir2.startsWith(`${other}/`))
44840
44840
  )) {
44841
- collect(module2.root, dir, targetName2, podName);
44841
+ collect(module2.root, dir, targetName, podName);
44842
44842
  }
44843
44843
  if (import_node_fs28.default.existsSync(import_node_path25.default.join(module2.root, "ios"))) {
44844
44844
  const iosCollected = collect(
44845
44845
  module2.root,
44846
44846
  "ios",
44847
- targetName2,
44847
+ targetName,
44848
44848
  podName,
44849
44849
  /* @__PURE__ */ new Set(["Tests"]),
44850
44850
  () => true,
@@ -44852,24 +44852,24 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44852
44852
  );
44853
44853
  if (config.swiftModule) {
44854
44854
  const objcHeaders = [...iosCollected.entries()].filter(
44855
- ([name3, original]) => name3.endsWith(".h") && Object.hasOwn(result.files, `${targetPath(targetName2)}/include/${name3}`) && /(?:@(?:interface|protocol)\b|\b(?:NS_(?:ENUM|OPTIONS)|FOUNDATION_EXPORT)\b)/.test(
44855
+ ([name3, original]) => name3.endsWith(".h") && Object.hasOwn(result.files, `${targetPath(targetName)}/include/${name3}`) && /(?:@(?:interface|protocol)\b|\b(?:NS_(?:ENUM|OPTIONS)|FOUNDATION_EXPORT)\b)/.test(
44856
44856
  result.files[original] ?? ""
44857
44857
  )
44858
44858
  ).map(([name3]) => name3);
44859
- if (objcHeaders.length > 0) iosObjcHeadersByTarget.set(targetName2, objcHeaders);
44859
+ if (objcHeaders.length > 0) iosObjcHeadersByTarget.set(targetName, objcHeaders);
44860
44860
  }
44861
44861
  }
44862
- admitTextualIncludes(module2.root, targetName2, targetObj, searchRoots);
44862
+ admitTextualIncludes(module2.root, targetName, targetObj, searchRoots);
44863
44863
  const viewsDir = import_node_path25.default.join(module2.root, "nitrogen/generated/shared/c++/views");
44864
44864
  const viewHeaders = import_node_fs28.default.existsSync(viewsDir) ? import_node_fs28.default.readdirSync(viewsDir).filter((file) => /\.(?:h|hh|hpp|hxx)$/.test(file)) : [];
44865
- const upstreamPrefix = `${targetPath(targetName2)}/upstream/`;
44865
+ const upstreamPrefix = `${targetPath(targetName)}/upstream/`;
44866
44866
  const needsViews = viewHeaders.length > 0 && Object.entries(result.files).some(
44867
44867
  ([key2, text7]) => (key2.startsWith(`${upstreamPrefix}cpp/`) || key2.startsWith(`${upstreamPrefix}ios/`)) && viewHeaders.some((header) => text7.includes(header))
44868
44868
  );
44869
44869
  collect(
44870
44870
  module2.root,
44871
44871
  "nitrogen/generated/shared/c++",
44872
- targetName2,
44872
+ targetName,
44873
44873
  podName,
44874
44874
  needsViews ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set(["views"])
44875
44875
  );
@@ -44880,7 +44880,7 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44880
44880
  `${module2.root}: missing C++ implementation header ${entry.implementation}.hpp`
44881
44881
  );
44882
44882
  }
44883
- collect(module2.root, "nitrogen/generated/ios", targetName2, podName);
44883
+ collect(module2.root, "nitrogen/generated/ios", targetName, podName);
44884
44884
  if (config.swiftModule) {
44885
44885
  const companionDeps = collectCompanionPods(node);
44886
44886
  const peerModuleDeps = node.peerRoots.flatMap((peerRoot) => {
@@ -44891,7 +44891,7 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44891
44891
  ];
44892
44892
  });
44893
44893
  const packageSwift = target(config.swiftModule, [
44894
- targetName2,
44894
+ targetName,
44895
44895
  "NitroModules",
44896
44896
  .../* @__PURE__ */ new Set([...peerModuleDeps, ...companionDeps])
44897
44897
  ]);
@@ -44917,7 +44917,7 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44917
44917
  );
44918
44918
  add2(
44919
44919
  `${targetPath(config.swiftModule)}/PeachNitroExports.swift`,
44920
- `@_exported import ${targetName2}
44920
+ `@_exported import ${targetName}
44921
44921
  `
44922
44922
  );
44923
44923
  }
@@ -44925,21 +44925,21 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44925
44925
  const dependencyHeader = nitroDependencyReader(reactNative.version, reactNative.root);
44926
44926
  const admitted = /* @__PURE__ */ new Set();
44927
44927
  const dependencyTrees = /* @__PURE__ */ new Set();
44928
- const scan3 = (targetName2, text7, includer) => {
44928
+ const scan3 = (targetName, text7, includer) => {
44929
44929
  for (const [, quote, name3] of text7.matchAll(
44930
44930
  /^\s*#\s*include\s*([<"])([^>"\n]+)[>"]/gm
44931
44931
  )) {
44932
44932
  const relative6 = quote === '"' && includer ? [import_node_path25.default.posix.normalize(import_node_path25.default.posix.join(import_node_path25.default.posix.dirname(includer), name3))] : [];
44933
- for (const include of [...relative6, name3]) if (admit(targetName2, include)) break;
44933
+ for (const include of [...relative6, name3]) if (admit(targetName, include)) break;
44934
44934
  }
44935
44935
  };
44936
- const admit = (targetName2, include) => {
44937
- const key2 = `${targetName2}\0${include}`;
44936
+ const admit = (targetName, include) => {
44937
+ const key2 = `${targetName}\0${include}`;
44938
44938
  if (admitted.has(key2)) return true;
44939
44939
  const header = dependencyHeader(include);
44940
44940
  if (!header) return false;
44941
44941
  admitted.add(key2);
44942
- const original = `${targetPath(targetName2)}/include/${include}`;
44942
+ const original = `${targetPath(targetName)}/include/${include}`;
44943
44943
  add2(original, header.text);
44944
44944
  result.sources.push({
44945
44945
  file: original,
@@ -44947,8 +44947,8 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44947
44947
  sha256: header.sha256,
44948
44948
  ...header.derivation && { derivation: header.derivation }
44949
44949
  });
44950
- scan3(targetName2, header.text, include);
44951
- const tree2 = `${targetName2}\0${header.name}`;
44950
+ scan3(targetName, header.text, include);
44951
+ const tree2 = `${targetName}\0${header.name}`;
44952
44952
  if (!dependencyTrees.has(tree2)) {
44953
44953
  dependencyTrees.add(tree2);
44954
44954
  for (const name3 of nitroDependencyIncludes(
@@ -44956,15 +44956,15 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
44956
44956
  reactNative.root,
44957
44957
  header.name
44958
44958
  ))
44959
- admit(targetName2, name3);
44959
+ admit(targetName, name3);
44960
44960
  }
44961
44961
  return true;
44962
44962
  };
44963
44963
  for (const node of allModules) {
44964
- const targetName2 = nitroProviderTarget(node.provider);
44964
+ const targetName = nitroProviderTarget(node.provider);
44965
44965
  for (const [file, text7] of Object.entries(result.files))
44966
- if (file.startsWith(`${targetPath(targetName2)}/upstream/`))
44967
- scan3(targetName2, text7, null);
44966
+ if (file.startsWith(`${targetPath(targetName)}/upstream/`))
44967
+ scan3(targetName, text7, null);
44968
44968
  }
44969
44969
  add2(
44970
44970
  `${targetPath(jsiTarget)}/include/module.modulemap`,
@@ -45077,11 +45077,11 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
45077
45077
  for (const node of allModules) {
45078
45078
  const module2 = node.provider;
45079
45079
  const config = node.config;
45080
- const targetName2 = nitroProviderTarget(module2);
45081
- const iosObjcHeaders = iosObjcHeadersByTarget.get(targetName2) ?? [];
45080
+ const targetName = nitroProviderTarget(module2);
45081
+ const iosObjcHeaders = iosObjcHeadersByTarget.get(targetName) ?? [];
45082
45082
  if (iosObjcHeaders.length > 0) {
45083
45083
  add2(
45084
- `${targetPath(targetName2)}/include/PeachPodObjCUmbrella.h`,
45084
+ `${targetPath(targetName)}/include/PeachPodObjCUmbrella.h`,
45085
45085
  [
45086
45086
  "#pragma once",
45087
45087
  "#ifdef __OBJC__",
@@ -45099,8 +45099,8 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
45099
45099
  ...iosObjcHeaders.length > 0 ? ['header "PeachPodObjCUmbrella.h"'] : []
45100
45100
  ];
45101
45101
  add2(
45102
- `${targetPath(targetName2)}/include/module.modulemap`,
45103
- `module ${targetName2} { ${modulemapHeaders.length > 0 ? `${modulemapHeaders.join(" ")} ` : ""}export * }
45102
+ `${targetPath(targetName)}/include/module.modulemap`,
45103
+ `module ${targetName} { ${modulemapHeaders.length > 0 ? `${modulemapHeaders.join(" ")} ` : ""}export * }
45104
45104
  `
45105
45105
  );
45106
45106
  if (!node.registered) continue;
@@ -45113,7 +45113,7 @@ function collectNitroSources(options, nativeSourceKeys, sourceRoot) {
45113
45113
  extern "C" void ${registration.symbol}();
45114
45114
  `);
45115
45115
  add2(
45116
- `${targetPath(targetName2)}/PeachNitroRegistration.cpp`,
45116
+ `${targetPath(targetName)}/PeachNitroRegistration.cpp`,
45117
45117
  [
45118
45118
  '#include "PeachNitroRegistration.hpp"',
45119
45119
  "#include <NitroModules/HybridObjectRegistry.hpp>",
@@ -45193,19 +45193,34 @@ var init_nitro_source = __esm({
45193
45193
 
45194
45194
  // src/visit-parsed-program.ts
45195
45195
  function visitParsedProgram(program, visitor) {
45196
+ const enterByType = /* @__PURE__ */ new Map();
45197
+ const exitByType = /* @__PURE__ */ new Map();
45198
+ for (const key2 of Object.keys(visitor)) {
45199
+ const handler = Reflect.get(visitor, key2);
45200
+ if (typeof handler !== "function") continue;
45201
+ const invoke = (node) => {
45202
+ handler(node);
45203
+ };
45204
+ if (key2.endsWith(":exit")) exitByType.set(key2.slice(0, -5), invoke);
45205
+ else enterByType.set(key2, invoke);
45206
+ }
45207
+ if (enterByType.size === 0 && exitByType.size === 0) return;
45208
+ const hasExit = exitByType.size > 0;
45196
45209
  function visit3(value) {
45197
45210
  if (Array.isArray(value)) {
45198
- for (const child of value) visit3(child);
45211
+ for (let i = 0; i < value.length; i++) visit3(value[i]);
45199
45212
  return;
45200
45213
  }
45201
45214
  if (!isRecord(value) || typeof value.type !== "string") return;
45202
45215
  const keys = import_oxc_parser.visitorKeys[value.type];
45203
45216
  if (!keys) return;
45204
- const enter = Reflect.get(visitor, value.type);
45205
- if (typeof enter === "function") enter(value);
45206
- for (const key2 of keys) visit3(value[key2]);
45207
- const exit = Reflect.get(visitor, `${value.type}:exit`);
45208
- if (typeof exit === "function") exit(value);
45217
+ const enter = enterByType.get(value.type);
45218
+ if (enter) enter(value);
45219
+ for (let i = 0; i < keys.length; i++) visit3(value[keys[i]]);
45220
+ if (hasExit) {
45221
+ const exit = exitByType.get(value.type);
45222
+ if (exit) exit(value);
45223
+ }
45209
45224
  }
45210
45225
  visit3(program);
45211
45226
  }
@@ -49953,14 +49968,14 @@ function canonicalLabel(label, from) {
49953
49968
  const { repo, pkg } = splitLabel(from);
49954
49969
  return `${repo ? `@@${repo}` : ""}//${pkg}:${label.replace(/^:/, "")}`;
49955
49970
  }
49956
- function readBazelAppTarget(buildFile, targetName2, configurationName, options = {}) {
49957
- if (!targetName2)
49971
+ function readBazelAppTarget(buildFile, targetName, configurationName, options = {}) {
49972
+ if (!targetName)
49958
49973
  throw new Error(
49959
49974
  `${buildFile}: pass --target with the ios_application the bazel package builds`
49960
49975
  );
49961
49976
  const root = import_node_fs38.default.realpathSync.native(workspaceRoot(import_node_fs38.default.realpathSync.native(buildFile)));
49962
49977
  const pkg = import_node_path35.default.relative(root, import_node_path35.default.dirname(import_node_fs38.default.realpathSync.native(buildFile)));
49963
- const label = `//${pkg.split(import_node_path35.default.sep).join("/")}:${targetName2}`;
49978
+ const label = `//${pkg.split(import_node_path35.default.sep).join("/")}:${targetName}`;
49964
49979
  const configuration = configurationName ?? "Debug";
49965
49980
  const graph = bazelGraph(root, label, configuration);
49966
49981
  const files2 = new BazelFiles(graph, root);
@@ -50196,7 +50211,7 @@ ${published3.map(
50196
50211
  const appModule = {
50197
50212
  ...named,
50198
50213
  id: idOf(graph.app),
50199
- name: targetName2,
50214
+ name: targetName,
50200
50215
  targetIdentity: graph.app.label,
50201
50216
  targetDependencies: [
50202
50217
  ...new Set(appParts.flatMap(({ module: module2 }) => module2.targetDependencies))
@@ -50485,7 +50500,7 @@ ${published3.map(
50485
50500
  {
50486
50501
  id: appModule.id,
50487
50502
  sourceTarget: appModule.moduleName,
50488
- productName: `${targetName2}.app`,
50503
+ productName: `${targetName}.app`,
50489
50504
  productType: "com.apple.product-type.application",
50490
50505
  installName: null,
50491
50506
  buildVersion: { platform: "iphonesimulator", minimumOS, sdk: null },
@@ -50529,7 +50544,7 @@ ${published3.map(
50529
50544
  binaryFrameworks,
50530
50545
  sdkFrameworks,
50531
50546
  packageResolved: [],
50532
- appTargets: [targetName2],
50547
+ appTargets: [targetName],
50533
50548
  configuration,
50534
50549
  settings: (key2) => key2 === "PRODUCT_MODULE_NAME" ? appModule.moduleName : key2 === "IPHONEOS_DEPLOYMENT_TARGET" ? minimumOS : key2 === "PRODUCT_BUNDLE_IDENTIFIER" ? graph.app.attrs.get("bundle_id")?.value ?? "" : "",
50535
50550
  cocoapods: null
@@ -51796,7 +51811,7 @@ function parseBuildSettings(block2) {
51796
51811
  }
51797
51812
  return settings;
51798
51813
  }
51799
- function appTargetReleaseSettings(pbxproj, targetName2, infoPlistRelativePath) {
51814
+ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
51800
51815
  const configurationPattern = /\/\* (Release|Debug) \*\/ = \{/g;
51801
51816
  const candidates = [];
51802
51817
  let match;
@@ -51817,7 +51832,7 @@ function appTargetReleaseSettings(pbxproj, targetName2, infoPlistRelativePath) {
51817
51832
  const normalized = plist6.replace(/^"|"$/g, "");
51818
51833
  return normalized === infoPlistRelativePath || infoPlistRelativePath.endsWith(`/${normalized}`) || normalized.endsWith(`/${infoPlistRelativePath}`);
51819
51834
  };
51820
- const named = (settings) => resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings) === targetName2;
51835
+ const named = (settings) => resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings) === targetName;
51821
51836
  return candidates.find(
51822
51837
  (candidate) => candidate.name === "Release" && plistMatch(candidate.settings)
51823
51838
  )?.settings ?? candidates.find(
@@ -51861,31 +51876,31 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
51861
51876
  applicationTargetNames.add(match[1]);
51862
51877
  }
51863
51878
  }
51864
- let targetName2 = null;
51879
+ let targetName = null;
51865
51880
  if (iosTarget) {
51866
51881
  if (applicationTargetNames.has(iosTarget)) {
51867
- targetName2 = iosTarget;
51882
+ targetName = iosTarget;
51868
51883
  } else {
51869
51884
  return null;
51870
51885
  }
51871
51886
  } else if (applicationTargetNames.size === 1) {
51872
- targetName2 = [...applicationTargetNames][0];
51887
+ targetName = [...applicationTargetNames][0];
51873
51888
  } else if (applicationTargetNames.size > 1) {
51874
51889
  const delegateTargets = Object.keys(files2).filter((path154) => !path154.includes("/Pods/")).map((path154) => path154.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
51875
51890
  (name3) => typeof name3 === "string" && applicationTargetNames.has(name3)
51876
51891
  );
51877
51892
  if (delegateTargets.length === 1) {
51878
- targetName2 = delegateTargets[0];
51893
+ targetName = delegateTargets[0];
51879
51894
  } else {
51880
51895
  return null;
51881
51896
  }
51882
51897
  } else {
51883
51898
  return null;
51884
51899
  }
51885
- const selectedTarget = targets.find((t) => t.name === targetName2);
51900
+ const selectedTarget = targets.find((t) => t.name === targetName);
51886
51901
  const settings = {
51887
- TARGET_NAME: targetName2,
51888
- PRODUCT_NAME: targetName2
51902
+ TARGET_NAME: targetName,
51903
+ PRODUCT_NAME: targetName
51889
51904
  };
51890
51905
  for (const obj of Object.values(objects)) {
51891
51906
  if (isRecord(obj) && obj.isa === "PBXProject" && typeof obj.buildConfigurationList === "string") {
@@ -51921,8 +51936,8 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
51921
51936
  } else {
51922
51937
  const legacy2 = appTargetReleaseSettings(
51923
51938
  pbxproj,
51924
- targetName2,
51925
- `${targetName2}/Info.plist`
51939
+ targetName,
51940
+ `${targetName}/Info.plist`
51926
51941
  );
51927
51942
  if (legacy2) Object.assign(settings, legacy2);
51928
51943
  }
@@ -51933,7 +51948,7 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
51933
51948
  plist6 = files2[`ios/${normalized}`] ?? files2[normalized] ?? Object.entries(files2).find(([k]) => k.endsWith(`/${normalized}`))?.[1];
51934
51949
  }
51935
51950
  if (!plist6) {
51936
- plist6 = files2[`ios/${targetName2}/Info.plist`] ?? files2[`${targetName2}/Info.plist`] ?? Object.entries(files2).find(([k]) => k.endsWith(`/${targetName2}/Info.plist`))?.[1];
51951
+ plist6 = files2[`ios/${targetName}/Info.plist`] ?? files2[`${targetName}/Info.plist`] ?? Object.entries(files2).find(([k]) => k.endsWith(`/${targetName}/Info.plist`))?.[1];
51937
51952
  }
51938
51953
  if (!plist6) return null;
51939
51954
  const bundleIdentifier = identityFieldFrom(
@@ -51957,7 +51972,7 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
51957
51972
  settings,
51958
51973
  plistString(plist6, "CFBundleName"),
51959
51974
  settings.PRODUCT_NAME
51960
- ) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName2);
51975
+ ) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
51961
51976
  if (!bundleName) return null;
51962
51977
  const applicationName = identityFieldFrom(settings, plistString(plist6, "CFBundleDisplayName"), void 0) ?? bundleName;
51963
51978
  const dictionary2 = parseInfoPlist(plist6);
@@ -52123,7 +52138,7 @@ function nativeAppIdentityFromIos(files2, parseInfoPlist, iosTarget, resourceUri
52123
52138
  }
52124
52139
  const rootModuleName = readRootModuleName(
52125
52140
  Object.entries(files2).filter(
52126
- ([path154]) => !path154.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path154) || path154.match(APP_DELEGATE_PATH_RE)?.[1] === targetName2)
52141
+ ([path154]) => !path154.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path154) || path154.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
52127
52142
  ).map(([, source]) => source)
52128
52143
  );
52129
52144
  return {
@@ -60035,9 +60050,9 @@ function pruneSwiftWasmLink(directory2, toolchainBin, moduleRoot, staticClangTar
60035
60050
  const sLive = liveSegs.get(obj);
60036
60051
  const dLive = liveDataSyms.get(obj);
60037
60052
  const tLive = liveTypes.get(obj);
60038
- const targetName2 = obj.symNames[r.rs] ?? "";
60053
+ const targetName = obj.symNames[r.rs] ?? "";
60039
60054
  if (segName === "swift5_type_metadata") {
60040
- const raw2 = targetName2.startsWith(".Lgot.") ? targetName2.slice(6) : targetName2;
60055
+ const raw2 = targetName.startsWith(".Lgot.") ? targetName.slice(6) : targetName;
60041
60056
  if (raw2.endsWith("Mn")) {
60042
60057
  const pref = raw2.slice(0, -2);
60043
60058
  if (obj.typePrefixesInObj.has(pref)) return tLive.has(pref);
@@ -60718,7 +60733,8 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
60718
60733
  if (sectionName === "linking") {
60719
60734
  const version2 = number4();
60720
60735
  if (version2 !== 2) throw new Error("unsupported wasm linking version");
60721
- const parts = [encodedString(sectionName), encodeNumber(version2)];
60736
+ const subsections = [];
60737
+ let objcLoader;
60722
60738
  while (offset < section.length) {
60723
60739
  const kind = section[offset++];
60724
60740
  const length = number4();
@@ -60781,6 +60797,9 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
60781
60797
  }
60782
60798
  } else if (symbolKind === 3) number4();
60783
60799
  else throw new Error("unsupported wasm symbol kind");
60800
+ if (name3 === OBJC_LOAD_FUNCTION && symbolKind === 0 && !(flags & 16)) {
60801
+ objcLoader = i;
60802
+ }
60784
60803
  const alias = names.get(name3);
60785
60804
  if (flags & 16 && symbolKind === 1 && alias) usedSymbols.add(name3);
60786
60805
  if ((name3 === "dlsym" && usesDlsym || name3 === "dlerror" && usesDlerror) && flags & 16 && flags & 64 && symbolKind === 0) {
@@ -60830,7 +60849,36 @@ function rewriteObject(bytes, names, callerAlias, binding, instrumentDynamicLook
60830
60849
  content = Buffer.concat([...entries, ...extraEntries]);
60831
60850
  }
60832
60851
  offset = stop;
60833
- parts.push(Buffer.from([kind]), encodeNumber(content.length), content);
60852
+ subsections.push({ kind, content });
60853
+ }
60854
+ const parts = [encodedString(sectionName), encodeNumber(version2)];
60855
+ for (const subsection of subsections) {
60856
+ let content = subsection.content;
60857
+ if (subsection.kind === 6 && objcLoader !== void 0) {
60858
+ const [count, entriesStart] = readNumber(content, 0);
60859
+ const entries = [content.subarray(0, entriesStart)];
60860
+ let entryStart = entriesStart;
60861
+ for (let i = 0; i < count; i++) {
60862
+ const [, symbolStart] = readNumber(content, entryStart);
60863
+ const [symbol2, entryEnd] = readNumber(content, symbolStart);
60864
+ if (symbol2 === objcLoader) entries.push(encodeNumber(1));
60865
+ entries.push(
60866
+ content.subarray(
60867
+ symbol2 === objcLoader ? symbolStart : entryStart,
60868
+ entryEnd
60869
+ )
60870
+ );
60871
+ entryStart = entryEnd;
60872
+ }
60873
+ if (entryStart !== content.length)
60874
+ throw new Error("invalid init functions subsection");
60875
+ content = Buffer.concat(entries);
60876
+ }
60877
+ parts.push(
60878
+ Buffer.from([subsection.kind]),
60879
+ encodeNumber(content.length),
60880
+ content
60881
+ );
60834
60882
  }
60835
60883
  section = Buffer.concat(parts);
60836
60884
  }
@@ -61124,11 +61172,12 @@ function createGuestImageLedger(input) {
61124
61172
  llvmIR: ir.join("\n") + "\n"
61125
61173
  };
61126
61174
  }
61127
- var OBJC_INIT_RECORD;
61175
+ var OBJC_INIT_RECORD, OBJC_LOAD_FUNCTION;
61128
61176
  var init_swift_guest_image_ledger = __esm({
61129
61177
  "src/swift-guest-image-ledger.ts"() {
61130
61178
  "use strict";
61131
61179
  OBJC_INIT_RECORD = ".objc_init";
61180
+ OBJC_LOAD_FUNCTION = ".objcv2_load_function";
61132
61181
  }
61133
61182
  });
61134
61183
 
@@ -63785,7 +63834,7 @@ function sourceGuestClangLinkOptions(options) {
63785
63834
  commands.set(file, { tool, args: value });
63786
63835
  }
63787
63836
  }
63788
- const result = /* @__PURE__ */ new Map();
63837
+ const replays = [];
63789
63838
  for (const [index, file] of [...wanted].entries()) {
63790
63839
  const command = commands.get(file);
63791
63840
  if (!command) throw new Error(`missing source object producer ${file}`);
@@ -63811,16 +63860,33 @@ function sourceGuestClangLinkOptions(options) {
63811
63860
  throw new Error(`missing clang ${flag} for ${file}`);
63812
63861
  args[index2 + 1] = flag === "-o" ? output2 : `${output2}.d`;
63813
63862
  }
63814
- (0, import_node_child_process29.execFileSync)(
63815
- command.args[0],
63816
- [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
63817
- { stdio: "inherit" }
63818
- );
63863
+ replays.push({
63864
+ file,
63865
+ compiler: command.args[0],
63866
+ args: [...args, "-S", "-emit-llvm", "-Xclang", "-disable-llvm-passes"],
63867
+ output: output2
63868
+ });
63869
+ }
63870
+ const plan = import_node_path49.default.join(options.directory, "clang-link-replays.json");
63871
+ (0, import_node_fs53.writeFileSync)(
63872
+ plan,
63873
+ JSON.stringify(replays.map(({ compiler, args }) => [compiler, ...args]))
63874
+ );
63875
+ (0, import_node_child_process29.execFileSync)(process.execPath, ["-e", PARALLEL_REPLAY], {
63876
+ stdio: "inherit",
63877
+ env: {
63878
+ ...process.env,
63879
+ PEACH_CLANG_REPLAYS: plan,
63880
+ PEACH_CLANG_JOBS: String(options.jobs)
63881
+ }
63882
+ });
63883
+ const result = /* @__PURE__ */ new Map();
63884
+ for (const { file, output: output2 } of replays) {
63819
63885
  const flags = clangIrLinkOptions((0, import_node_fs53.readFileSync)(output2, "utf8"));
63820
- for (let index2 = 0; index2 < flags.length; index2++) {
63821
- const flag = flags[index2];
63886
+ for (let index = 0; index < flags.length; index++) {
63887
+ const flag = flags[index];
63822
63888
  if (flag === "-framework" || flag === "-l" || flag === "--library") {
63823
- const name3 = flags[++index2];
63889
+ const name3 = flags[++index];
63824
63890
  if (!name3 || name3.startsWith("-"))
63825
63891
  throw new Error(`missing clang link name after ${flag}`);
63826
63892
  } else if (!/^(-l.+|--library=.+)$/.test(flag)) {
@@ -64046,7 +64112,7 @@ function logicalGuestLinkOptions(args, identities, roots) {
64046
64112
  }
64047
64113
  return output2;
64048
64114
  }
64049
- var import_node_child_process29, import_node_crypto28, import_node_fs53, import_node_path49, CLANG_TARGET_MODULE_WRAPPER;
64115
+ var import_node_child_process29, import_node_crypto28, import_node_fs53, import_node_path49, CLANG_TARGET_MODULE_WRAPPER, PARALLEL_REPLAY;
64050
64116
  var init_swift_guest_source_inputs = __esm({
64051
64117
  "src/swift-guest-source-inputs.ts"() {
64052
64118
  "use strict";
@@ -64057,6 +64123,25 @@ var init_swift_guest_source_inputs = __esm({
64057
64123
  init_swift_guest_source_plan();
64058
64124
  init_swift_runtime_products();
64059
64125
  CLANG_TARGET_MODULE_WRAPPER = ".peach-clang";
64126
+ PARALLEL_REPLAY = `
64127
+ const { spawn } = require('node:child_process')
64128
+ const commands = JSON.parse(require('node:fs').readFileSync(process.env.PEACH_CLANG_REPLAYS, 'utf8'))
64129
+ let next = 0
64130
+ const run = () => {
64131
+ if (next >= commands.length) return Promise.resolve()
64132
+ const [file, ...args] = commands[next++]
64133
+ return new Promise((resolve, reject) => {
64134
+ const child = spawn(file, args, { stdio: 'inherit' })
64135
+ child.on('error', reject)
64136
+ child.on('close', (code) => (code === 0 ? resolve() : reject(new Error('clang link replay failed: ' + file))))
64137
+ }).then(run)
64138
+ }
64139
+ const jobs = Math.max(1, Number(process.env.PEACH_CLANG_JOBS) || 1)
64140
+ Promise.all(Array.from({ length: jobs }, run)).catch((error) => {
64141
+ console.error(error.message)
64142
+ process.exit(1)
64143
+ })
64144
+ `;
64060
64145
  }
64061
64146
  });
64062
64147
 
@@ -64631,7 +64716,8 @@ async function compileGuestLink(options) {
64631
64716
  directory: directory2,
64632
64717
  toolchainBin: options.toolchainBin,
64633
64718
  swiftCompiler: options.swiftCompiler,
64634
- objects: selectedSource.map((artifact) => artifact.path)
64719
+ objects: selectedSource.map((artifact) => artifact.path),
64720
+ jobs: options.jobs
64635
64721
  });
64636
64722
  const links = sourceGuestRuntimeLinks({
64637
64723
  toolchainBin: options.toolchainBin,
@@ -71308,7 +71394,8 @@ function compileSwiftProjectOnce(input, options) {
71308
71394
  generatedOwners: preparation.generatedOwners,
71309
71395
  output: output2,
71310
71396
  optimized,
71311
- optimize: input.optimize === true
71397
+ optimize: input.optimize === true,
71398
+ jobs: swiftBuildJobs()
71312
71399
  });
71313
71400
  else
71314
71401
  await lowerWasm(output2, optimized, { optimize: input.optimize === true });
@@ -71578,7 +71665,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
71578
71665
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
71579
71666
  MULTI_MANIFEST_VERSION = 72;
71580
71667
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
71581
- compilerSourceDigest = true ? "63f37c4a87253305166cb52435207eb3f74394734f1a77e562d79ab7d5d7dfc1" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
71668
+ compilerSourceDigest = true ? "714dbca336e958240697a0238ee5b0640b2b212c34df4843e82d0c1abe3e8c43" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
71582
71669
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
71583
71670
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
71584
71671
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -71662,7 +71749,6 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
71662
71749
  "NSSwappedDouble",
71663
71750
  "NSSwappedFloat",
71664
71751
  "NSUbiquitousKeyValueStore",
71665
- "NSValueTransformerName",
71666
71752
  "NSXPCCoder",
71667
71753
  "NSXPCConnection",
71668
71754
  "NSXPCInterface",
@@ -73520,10 +73606,10 @@ function readXcodeJsonProject(xcodeproj, source) {
73520
73606
  phases.set(`id:${phaseId}`, phaseId);
73521
73607
  }
73522
73608
  }
73523
- const phaseFiles = (reference, targetName2) => {
73609
+ const phaseFiles = (reference, targetName) => {
73524
73610
  const value = text6(reference);
73525
73611
  if (value === void 0) return null;
73526
- const key2 = value.startsWith("id:") || !targetName2 ? value : `${targetName2}/${value}`;
73612
+ const key2 = value.startsWith("id:") || !targetName ? value : `${targetName}/${value}`;
73527
73613
  const phase = objects[phases.get(key2) ?? ""];
73528
73614
  return phase && typeof phase === "object" && !Array.isArray(phase) && Array.isArray(phase.files) ? phase.files : null;
73529
73615
  };
@@ -74213,7 +74299,7 @@ function fileListEntries(file, absolute) {
74213
74299
  }
74214
74300
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
74215
74301
  const { project: project2, target, id: targetId } = ref;
74216
- const targetName2 = str2(target.name) ?? targetId;
74302
+ const targetName = str2(target.name) ?? targetId;
74217
74303
  const sources = /* @__PURE__ */ new Set();
74218
74304
  const allSources = /* @__PURE__ */ new Set();
74219
74305
  const headers = /* @__PURE__ */ new Set();
@@ -74286,7 +74372,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
74286
74372
  for (const { file } of lists)
74287
74373
  if (!import_node_fs67.default.existsSync(file))
74288
74374
  throw new Error(
74289
- `${targetName2}: Run Script "${script}" missing file list ${file}`
74375
+ `${targetName}: Run Script "${script}" missing file list ${file}`
74290
74376
  );
74291
74377
  const env = {
74292
74378
  ...process.env,
@@ -74382,7 +74468,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
74382
74468
  const output2 = error instanceof Error ? `${error.message}
74383
74469
  ${"stdout" in error ? String(error.stdout) : ""}${"stderr" in error ? String(error.stderr) : ""}` : String(error);
74384
74470
  throw new Error(
74385
- `${targetName2}: Run Script "${script}" failed preparing generated outputs:
74471
+ `${targetName}: Run Script "${script}" failed preparing generated outputs:
74386
74472
  ${output2}`
74387
74473
  );
74388
74474
  }
@@ -74391,7 +74477,7 @@ ${output2}`
74391
74477
  );
74392
74478
  if (missing2.length > 0)
74393
74479
  throw new Error(
74394
- `${targetName2}: Run Script "${script}" did not produce ${missing2.join(", ")}`
74480
+ `${targetName}: Run Script "${script}" did not produce ${missing2.join(", ")}`
74395
74481
  );
74396
74482
  preparedSourcePhases.set(key2, stamp);
74397
74483
  preparedXcodePhase(
@@ -74423,7 +74509,7 @@ ${output2}`
74423
74509
  if (options.requireSources === false) return;
74424
74510
  const script = scriptForOutput.get(import_node_path65.default.normalize(file));
74425
74511
  throw new Error(
74426
- script ? `${targetName2}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName2}: missing source ${file}`
74512
+ script ? `${targetName}: missing generated source ${file} (Run Script "${script}" declares it in outputPaths; run the script or check in its output)` : `${targetName}: missing source ${file}`
74427
74513
  );
74428
74514
  }
74429
74515
  allSources.add(file);
@@ -74446,7 +74532,7 @@ ${output2}`
74446
74532
  );
74447
74533
  if (runtimeInterfaceFiles.length > 0)
74448
74534
  throw new Error(
74449
- `${targetName2}: Interface Builder compilation requires macOS and Xcode`
74535
+ `${targetName}: Interface Builder compilation requires macOS and Xcode`
74450
74536
  );
74451
74537
  for (const file of interfaceFiles) resources.delete(file);
74452
74538
  interfaceFiles.length = 0;
@@ -74462,7 +74548,7 @@ ${output2}`
74462
74548
  import_node_path65.default.basename(file, import_node_path65.default.extname(file)) + extension
74463
74549
  );
74464
74550
  if (interfaceOutputs.has(output2))
74465
- throw new Error(`${targetName2}: duplicate Interface Builder output ${output2}`);
74551
+ throw new Error(`${targetName}: duplicate Interface Builder output ${output2}`);
74466
74552
  interfaceOutputs.add(output2);
74467
74553
  const args = [
74468
74554
  "ibtool",
@@ -74504,7 +74590,7 @@ ${output2}`
74504
74590
  );
74505
74591
  if (definitions.length > 0 && process.platform !== "darwin")
74506
74592
  throw new Error(
74507
- `${targetName2}: intent definition code generation requires macOS and Xcode`
74593
+ `${targetName}: intent definition code generation requires macOS and Xcode`
74508
74594
  );
74509
74595
  for (const definition2 of definitions) {
74510
74596
  const configuredLanguage = settings("INTENTS_CODEGEN_LANGUAGE");
@@ -74789,8 +74875,8 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
74789
74875
  if (!name3) {
74790
74876
  const declared = (project2 ? [project2] : projects2).flatMap(
74791
74877
  (candidate) => projectTargets(candidate).flatMap((ref) => {
74792
- const targetName2 = str2(ref.target.name);
74793
- return targetName2 ? [targetName2] : [];
74878
+ const targetName = str2(ref.target.name);
74879
+ return targetName ? [targetName] : [];
74794
74880
  })
74795
74881
  );
74796
74882
  throw new Error(
@@ -74892,9 +74978,9 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration) {
74892
74978
  );
74893
74979
  }
74894
74980
  }
74895
- function readXcodeAppTarget(input, targetName2, configurationName, options = {}) {
74981
+ function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
74896
74982
  if (isBazelPackage(input))
74897
- return readBazelAppTarget(input, targetName2, configurationName, options);
74983
+ return readBazelAppTarget(input, targetName, configurationName, options);
74898
74984
  const xcodeprojOrWorkspace = import_node_fs67.default.realpathSync.native(input);
74899
74985
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
74900
74986
  const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
@@ -74903,22 +74989,22 @@ function readXcodeAppTarget(input, targetName2, configurationName, options = {})
74903
74989
  );
74904
74990
  const allTargets = projects2.flatMap(projectTargets);
74905
74991
  const appTargets = allTargets.filter(
74906
- (ref) => options.frameworkMachOType ? ref.target.name === targetName2 && FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName2 !== void 0 && ref.target.name === targetName2 && ref.target.productType === APP_EXTENSION
74992
+ (ref) => options.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
74907
74993
  );
74908
74994
  const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
74909
74995
  const container = import_node_path65.default.basename(xcodeprojOrWorkspace);
74910
- const named = targetName2 ? appTargets.filter((ref) => ref.target.name === targetName2) : appTargets;
74996
+ const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
74911
74997
  if (named.length !== 1) {
74912
74998
  if (options.frameworkMachOType)
74913
74999
  throw new Error(
74914
- `${container} must declare one framework target named ${targetName2}`
75000
+ `${container} must declare one framework target named ${targetName}`
74915
75001
  );
74916
75002
  if (appTargets.length === 0)
74917
75003
  throw new Error(
74918
75004
  `${container} has no application targets; open a project or workspace that contains one`
74919
75005
  );
74920
75006
  throw new Error(
74921
- targetName2 && named.length === 0 ? `${container} has no application target ${targetName2}; it has ${appTargetNames.join(", ") || "none"}` : targetName2 ? `${container} has ${named.length} application targets named ${targetName2}; open its .xcodeproj` : `${container} has ${appTargetNames.length} application targets (${appTargetNames.join(", ")}); pass --target`
75007
+ targetName && named.length === 0 ? `${container} has no application target ${targetName}; it has ${appTargetNames.join(", ") || "none"}` : targetName ? `${container} has ${named.length} application targets named ${targetName}; open its .xcodeproj` : `${container} has ${appTargetNames.length} application targets (${appTargetNames.join(", ")}); pass --target`
74922
75008
  );
74923
75009
  }
74924
75010
  const app = named[0];
@@ -78328,7 +78414,7 @@ var init_swift_standin_digest = __esm({
78328
78414
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
78329
78415
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
78330
78416
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
78331
- STANDIN_SOURCE_DIGEST = true ? "1122424b1e57ea84e0c3c2fbd17ce18dee149a87374de8912d176aec8451bc86" : standinSourceDigest();
78417
+ STANDIN_SOURCE_DIGEST = true ? "3a0e0016967d34924d12848e05752d3902596cc16a0f603a5fda32cb024d02f8" : standinSourceDigest();
78332
78418
  }
78333
78419
  });
78334
78420
 
@@ -78823,7 +78909,7 @@ __export(expo_native_prebuilt_exports, {
78823
78909
  servedExpoSwift: () => servedExpoSwift
78824
78910
  });
78825
78911
  function expoNativeCompilerDigestValue() {
78826
- return true ? "707065782ce033b69a1af3ade8c72a07c2ee704ce46e59a30081384d07d8ecdc" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
78912
+ return true ? "305cb9d6b64ebf2397b29848afd9b634d4012fc3eb51d696e9bdda10ea074097" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
78827
78913
  }
78828
78914
  function readSources(value) {
78829
78915
  const sources = isRecord(value) ? value.sources : null;
@@ -93238,12 +93324,12 @@ async function collectTurboSources(options) {
93238
93324
  )
93239
93325
  )
93240
93326
  );
93241
- const original = (targetName2, label, root, relative6, compiled = true) => {
93327
+ const original = (targetName, label, root, relative6, compiled = true) => {
93242
93328
  const staged = relative6.replace(
93243
93329
  /(^|\/)main(\.(?:c|cc|cpp|cxx|m|mm))$/,
93244
93330
  "$1main.library$2"
93245
93331
  );
93246
- const key2 = `${targetPath(targetName2)}/upstream/${label}/${staged}`;
93332
+ const key2 = `${targetPath(targetName)}/upstream/${label}/${staged}`;
93247
93333
  if (UNIT.test(relative6) || OBJC2.test(relative6))
93248
93334
  (compiled ? compiledSources : textualSources).add(key2);
93249
93335
  if (Object.hasOwn(result.files, key2)) return key2;
@@ -93252,24 +93338,24 @@ async function collectTurboSources(options) {
93252
93338
  if (installed2?.flags.length) {
93253
93339
  let prefixHeader = null;
93254
93340
  if (installed2.prefixHeader) {
93255
- prefixHeader = `${targetPath(targetName2)}/${import_node_path98.default.basename(installed2.prefixHeader)}`;
93341
+ prefixHeader = `${targetPath(targetName)}/${import_node_path98.default.basename(installed2.prefixHeader)}`;
93256
93342
  add2(prefixHeader, import_node_fs101.default.readFileSync(installed2.prefixHeader, "utf8"));
93257
93343
  }
93258
93344
  result.nativeTargets ??= [];
93259
- let native = result.nativeTargets.find(({ name: name3 }) => name3 === targetName2);
93345
+ let native = result.nativeTargets.find(({ name: name3 }) => name3 === targetName);
93260
93346
  if (!native) {
93261
93347
  native = {
93262
- name: targetName2,
93348
+ name: targetName,
93263
93349
  deploymentTarget: null,
93264
93350
  headers: [],
93265
- publicHeaders: targetName2 === TURBO_CORE_TARGET ? [
93266
- `${targetPath(targetName2)}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`
93351
+ publicHeaders: targetName === TURBO_CORE_TARGET ? [
93352
+ `${targetPath(targetName)}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`
93267
93353
  ] : [],
93268
93354
  flattensPublicHeaders: false,
93269
93355
  bridgingHeader: null,
93270
93356
  prefixHeader,
93271
93357
  headerSearchPaths: [
93272
- `${targetPath(targetName2)}/${targetName2 === TURBO_CORE_TARGET ? TURBO_CORE_PUBLIC_HEADERS : "include"}`
93358
+ `${targetPath(targetName)}/${targetName === TURBO_CORE_TARGET ? TURBO_CORE_PUBLIC_HEADERS : "include"}`
93273
93359
  ],
93274
93360
  userHeaderSearchPaths: [],
93275
93361
  frameworkSearchPaths: [],
@@ -93297,7 +93383,7 @@ async function collectTurboSources(options) {
93297
93383
  throw new Error(`TurboModule source is not UTF-8: ${disk}`);
93298
93384
  add2(key2, text7);
93299
93385
  result.sources.push({ file: key2, source: disk, sha256: sha2564(bytes) });
93300
- pending2.push({ key: key2, targetName: targetName2, label, root, relative: relative6 });
93386
+ pending2.push({ key: key2, targetName, label, root, relative: relative6 });
93301
93387
  return key2;
93302
93388
  };
93303
93389
  const pending2 = [];
@@ -93652,9 +93738,9 @@ async function collectTurboSources(options) {
93652
93738
  const unregisteredObjcClasses = /* @__PURE__ */ new Set();
93653
93739
  const deferredDepUnits = [];
93654
93740
  for (const provider of providers) {
93655
- const targetName2 = providerTarget(provider.info.name);
93741
+ const targetName = providerTarget(provider.info.name);
93656
93742
  const label = provider.info.name;
93657
- const providerTargetInput = target(targetName2, [
93743
+ const providerTargetInput = target(targetName, [
93658
93744
  TURBO_CORE_TARGET
93659
93745
  ]);
93660
93746
  result.targets.push(providerTargetInput);
@@ -93672,11 +93758,11 @@ async function collectTurboSources(options) {
93672
93758
  if (provider.providerFabric) {
93673
93759
  fabric = true;
93674
93760
  fabricPackages.add(provider.name);
93675
- fabricTarget ??= { targetName: targetName2, label, root: provider.root };
93761
+ fabricTarget ??= { targetName, label, root: provider.root };
93676
93762
  }
93677
93763
  if (pod.installed?.library) {
93678
93764
  result.libraries ??= {};
93679
- result.libraries[targetName2] = import_node_fs101.default.readFileSync(pod.installed.library).toString("base64");
93765
+ result.libraries[targetName] = import_node_fs101.default.readFileSync(pod.installed.library).toString("base64");
93680
93766
  }
93681
93767
  const files2 = podFiles(pod).filter((file) => {
93682
93768
  if (!provider.reactModulesOnly || HEADER5.test(file)) return true;
@@ -93689,10 +93775,10 @@ async function collectTurboSources(options) {
93689
93775
  if (paper.length > 0) {
93690
93776
  fabric = true;
93691
93777
  paperClasses.push(...paper);
93692
- paperTarget ??= { targetName: targetName2, label, root: provider.root };
93778
+ paperTarget ??= { targetName, label, root: provider.root };
93693
93779
  }
93694
93780
  const headers = /* @__PURE__ */ new Map();
93695
- podHeaders.set(targetName2, {
93781
+ podHeaders.set(targetName, {
93696
93782
  headers,
93697
93783
  label,
93698
93784
  root,
@@ -94005,33 +94091,33 @@ async function collectTurboSources(options) {
94005
94091
  );
94006
94092
  if (filtered !== source) {
94007
94093
  if (definedFacebookReactComponentNames(filtered).size === 0) continue;
94008
- const key2 = original(targetName2, "ReactCodegen", generated, file);
94094
+ const key2 = original(targetName, "ReactCodegen", generated, file);
94009
94095
  result.files[key2] = filtered;
94010
94096
  continue;
94011
94097
  }
94012
94098
  }
94013
94099
  }
94014
- original(targetName2, "ReactCodegen", generated, file);
94100
+ original(targetName, "ReactCodegen", generated, file);
94015
94101
  }
94016
94102
  }
94017
94103
  }
94018
- for (const file of sources) original(targetName2, label, root, file);
94104
+ for (const file of sources) original(targetName, label, root, file);
94019
94105
  for (const unit2 of depUnits) {
94020
94106
  if (!unit2.companionHeader) {
94021
94107
  result.externalPodSources.push({
94022
94108
  moduleName: unit2.moduleName,
94023
- file: original(targetName2, unit2.label, unit2.root, unit2.relative)
94109
+ file: original(targetName, unit2.label, unit2.root, unit2.relative)
94024
94110
  });
94025
94111
  } else {
94026
- deferredDepUnits.push({ targetName: targetName2, ...unit2 });
94112
+ deferredDepUnits.push({ targetName, ...unit2 });
94027
94113
  }
94028
94114
  }
94029
94115
  const declared = [];
94030
94116
  for (const [count, { file, load: load2 }] of loads.entries()) {
94031
- const symbol2 = `peach_turbo_load_${targetName2}_${count}`;
94117
+ const symbol2 = `peach_turbo_load_${targetName}_${count}`;
94032
94118
  declared.push(symbol2);
94033
- result.loads.push({ symbol: symbol2, target: targetName2 });
94034
- const unit2 = `${targetPath(targetName2)}/PeachTurboLoad${count}.cpp`;
94119
+ result.loads.push({ symbol: symbol2, target: targetName });
94120
+ const unit2 = `${targetPath(targetName)}/PeachTurboLoad${count}.cpp`;
94035
94121
  add2(
94036
94122
  unit2,
94037
94123
  [
@@ -94043,21 +94129,21 @@ async function collectTurboSources(options) {
94043
94129
  ].join("\n")
94044
94130
  );
94045
94131
  scanText(
94046
- { key: unit2, targetName: targetName2, label, root, relative: file },
94132
+ { key: unit2, targetName, label, root, relative: file },
94047
94133
  result.files[unit2]
94048
94134
  );
94049
94135
  }
94050
94136
  add2(
94051
- `${targetPath(targetName2)}/include/PeachTurboLoad.hpp`,
94137
+ `${targetPath(targetName)}/include/PeachTurboLoad.hpp`,
94052
94138
  `#pragma once
94053
94139
  ${declared.map((symbol2) => `extern "C" void ${symbol2}();
94054
94140
  `).join("")}`
94055
94141
  );
94056
94142
  add2(
94057
- `${targetPath(targetName2)}/include/module.modulemap`,
94058
- `module ${targetName2} { header "PeachTurboLoad.hpp"${swiftSources.length > 0 || depSwiftPods.length > 0 ? publicHeaders.map((file) => {
94059
- const source = original(targetName2, label, root, file);
94060
- return ` header ${JSON.stringify(import_node_path98.default.posix.relative(`${targetPath(targetName2)}/include`, source))}`;
94143
+ `${targetPath(targetName)}/include/module.modulemap`,
94144
+ `module ${targetName} { header "PeachTurboLoad.hpp"${swiftSources.length > 0 || depSwiftPods.length > 0 ? publicHeaders.map((file) => {
94145
+ const source = original(targetName, label, root, file);
94146
+ return ` header ${JSON.stringify(import_node_path98.default.posix.relative(`${targetPath(targetName)}/include`, source))}`;
94061
94147
  }).join("") : ""} export * }
94062
94148
  `
94063
94149
  );
@@ -102026,7 +102112,7 @@ var init_nitro_superset = __esm({
102026
102112
  init_nitroContract();
102027
102113
  init_swift_standin_digest();
102028
102114
  NITRO_SUPERSET_ENTRY_NAME = "superset";
102029
- NITRO_COMPILER_DIGEST = true ? "63f3c15373db1e732c577919dd37e2c02c61f5829fc6a1b439ec2d8de8dd23f6" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
102115
+ NITRO_COMPILER_DIGEST = true ? "5e8f14caf06af284e971f4107b94fe6d6979dd2ac0da718416a93c6e36e8e2a0" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
102030
102116
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
102031
102117
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
102032
102118
  published2 = /* @__PURE__ */ new Map();
@@ -102718,7 +102804,7 @@ var init_one_sdk_bundle = __esm({
102718
102804
  var runtime_companion_default;
102719
102805
  var init_runtime_companion = __esm({
102720
102806
  "runtime-companion.json"() {
102721
- runtime_companion_default = { abi: 1, sha256: "9bc75c6ccfa87cb58eff71992a2fafa21b4e7acbb37f0b4bef6f74279c98317a", file: "node/cli-9bc75c6ccfa87cb58eff71992a2fafa21b4e7acbb37f0b4bef6f74279c98317a.cjs" };
102807
+ runtime_companion_default = { abi: 1, sha256: "50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474", file: "node/cli-50f7ba9b5269b150a6bd2189f202e3cde6ecd829f705d24a70a88f13e6a92474.cjs" };
102722
102808
  }
102723
102809
  });
102724
102810
 
@@ -116635,6 +116721,22 @@ var init_metroCloudArtifact = __esm({
116635
116721
  });
116636
116722
 
116637
116723
  // src/cloud-contract.ts
116724
+ function agentActionTarget(target) {
116725
+ if (!target) return void 0;
116726
+ const clean = (value) => {
116727
+ const text8 = value?.trim().replace(/\s+/g, " ");
116728
+ return text8 ? text8.slice(0, AGENT_IDENTITY_MAX_CHARS) : void 0;
116729
+ };
116730
+ const id = clean(target.id);
116731
+ const testID = clean(target.testID);
116732
+ const text7 = TEXT_FIELD_TYPE.test(target.type ?? "") ? void 0 : clean(target.text);
116733
+ if (!id && !testID && !text7) return void 0;
116734
+ return { ...id && { id }, ...testID && { testID }, ...text7 && { text: text7 } };
116735
+ }
116736
+ function agentActionTargetName(target) {
116737
+ const safe2 = agentActionTarget(target);
116738
+ return safe2?.text ?? safe2?.testID ?? safe2?.id ?? null;
116739
+ }
116638
116740
  function scopeTableKeys() {
116639
116741
  return Object.keys(RNX_CLOUD_COMMAND_SCOPES).filter(
116640
116742
  (key2) => Object.prototype.hasOwnProperty.call(RNX_CLOUD_COMMAND_SCOPES, key2)
@@ -116652,11 +116754,12 @@ function rnxCloudScopesAllowCommand(scopes, type) {
116652
116754
  function isRnxCloudSimStatus(value) {
116653
116755
  return value === "creating" || value === "open" || value === "hibernated" || value === "deleting" || value === "deleted";
116654
116756
  }
116655
- var AGENT_IDENTITY_MAX_CHARS, RNX_CLOUD_MAX_ARTIFACT_BYTES, RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES, RNX_CLOUD_COMMAND_SCOPES, RNX_CLOUD_COMMAND_TYPES, RNX_CLOUD_COMMAND_TYPE_SET, RNX_CLOUD_TOKEN_SCOPES, RNX_CLOUD_ALL_COMMAND_SCOPES;
116757
+ var AGENT_IDENTITY_MAX_CHARS, TEXT_FIELD_TYPE, RNX_CLOUD_MAX_ARTIFACT_BYTES, RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES, RNX_CLOUD_COMMAND_SCOPES, RNX_CLOUD_COMMAND_TYPES, RNX_CLOUD_COMMAND_TYPE_SET, RNX_CLOUD_TOKEN_SCOPES, RNX_CLOUD_ALL_COMMAND_SCOPES;
116656
116758
  var init_cloud_contract = __esm({
116657
116759
  "src/cloud-contract.ts"() {
116658
116760
  "use strict";
116659
116761
  AGENT_IDENTITY_MAX_CHARS = 200;
116762
+ TEXT_FIELD_TYPE = /text ?(input|field)/i;
116660
116763
  RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
116661
116764
  RNX_CLOUD_DESIGN_MAX_STORAGE_BYTES = 1024 * 1024;
116662
116765
  RNX_CLOUD_COMMAND_SCOPES = {
@@ -117334,23 +117437,19 @@ var init_current_sim = __esm({
117334
117437
  function clip(text7) {
117335
117438
  return text7.length > AGENT_IDENTITY_MAX_CHARS ? `${text7.slice(0, AGENT_IDENTITY_MAX_CHARS - 1)}\u2026` : text7;
117336
117439
  }
117337
- function targetName(target) {
117338
- const name3 = target?.text?.trim() || target?.testID?.trim() || target?.id?.trim();
117339
- return name3 ? name3.replace(/\s+/g, " ") : null;
117340
- }
117341
117440
  function verb(action, target) {
117342
117441
  return target ? `${action} ${target}` : action;
117343
117442
  }
117344
117443
  function describeStep(step) {
117345
117444
  switch (step.type) {
117346
117445
  case "tap":
117347
- return verb("Tapping", targetName(step.target));
117446
+ return verb("Tapping", agentActionTargetName(step.target));
117348
117447
  case "tapId":
117349
117448
  return verb("Tapping", step.id);
117350
117449
  case "doubleTap":
117351
117450
  return "Double tapping";
117352
117451
  case "longPress":
117353
- return verb("Long pressing", targetName(step.target));
117452
+ return verb("Long pressing", agentActionTargetName(step.target));
117354
117453
  case "drag":
117355
117454
  return "Dragging";
117356
117455
  case "pinch":
@@ -117393,9 +117492,9 @@ function describeStep(step) {
117393
117492
  function describeCommand(command) {
117394
117493
  switch (command.type) {
117395
117494
  case "tap":
117396
- return verb("Tapping", targetName(command.target));
117495
+ return verb("Tapping", agentActionTargetName(command.target));
117397
117496
  case "longPress":
117398
- return verb("Long pressing", targetName(command.target));
117497
+ return verb("Long pressing", agentActionTargetName(command.target));
117399
117498
  case "keyboard":
117400
117499
  return command.action === "dismiss" ? "Dismissing the keyboard" : command.action === "press" || command.action === "dispatchKey" ? "Pressing a key" : "Typing";
117401
117500
  case "screenshot":
@@ -117410,6 +117509,9 @@ function describeCommand(command) {
117410
117509
  return null;
117411
117510
  }
117412
117511
  }
117512
+ function cliAgentName(identityKey) {
117513
+ return readAgentId() ?? (process.env.PEACH_AGENT_ID?.trim() || formatLockOwner(identityKey));
117514
+ }
117413
117515
  function commandAgent(command) {
117414
117516
  const step = describeCommand(command);
117415
117517
  if (!step) return void 0;
@@ -117419,9 +117521,7 @@ function commandAgent(command) {
117419
117521
  if (!machine) return void 0;
117420
117522
  return {
117421
117523
  id: clip(identity2.key),
117422
- name: clip(
117423
- readAgentId() ?? (process.env.PEACH_AGENT_ID?.trim() || formatLockOwner(identity2.key))
117424
- ),
117524
+ name: clip(cliAgentName(identity2.key)),
117425
117525
  machine: clip(machine),
117426
117526
  step: clip(step)
117427
117527
  };
@@ -122131,6 +122231,13 @@ var init_timelineBridgeContract = __esm({
122131
122231
  }
122132
122232
  });
122133
122233
 
122234
+ // ../peach-globals/src/canvasAgentContract.ts
122235
+ var init_canvasAgentContract = __esm({
122236
+ "../peach-globals/src/canvasAgentContract.ts"() {
122237
+ "use strict";
122238
+ }
122239
+ });
122240
+
122134
122241
  // ../peach-globals/src/index.ts
122135
122242
  var init_src2 = __esm({
122136
122243
  "../peach-globals/src/index.ts"() {
@@ -122146,6 +122253,7 @@ var init_src2 = __esm({
122146
122253
  init_captureBridgeContract();
122147
122254
  init_timelineBridgeContract();
122148
122255
  init_replayBridgeContract();
122256
+ init_canvasAgentContract();
122149
122257
  }
122150
122258
  });
122151
122259
 
@@ -145211,16 +145319,16 @@ async function readKotlinApp(moduleArg, options) {
145211
145319
  const name3 = element.attributes[`${ANDROID_NS}name`];
145212
145320
  if (!name3) throw new Error(`${manifestFile}: <${element.name}> has no android:name`);
145213
145321
  if (element.name === "activity") return className2(name3);
145214
- const targetName2 = element.attributes[`${ANDROID_NS}targetActivity`];
145322
+ const targetName = element.attributes[`${ANDROID_NS}targetActivity`];
145215
145323
  const activity = activities.find(
145216
- (candidate) => className2(candidate.attributes[`${ANDROID_NS}name`] ?? "") === className2(targetName2 ?? "")
145324
+ (candidate) => className2(candidate.attributes[`${ANDROID_NS}name`] ?? "") === className2(targetName ?? "")
145217
145325
  );
145218
- if (!targetName2 || !activity)
145326
+ if (!targetName || !activity)
145219
145327
  throw new Error(
145220
145328
  `${manifestFile}: activity-alias ${name3} targets no declared activity`
145221
145329
  );
145222
145330
  if (!enabled(activity)) return null;
145223
- return className2(targetName2);
145331
+ return className2(targetName);
145224
145332
  };
145225
145333
  const applicationEnabled = enabled(application);
145226
145334
  let chosen;