peachsim 0.1.631 → 0.1.632

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 (75) hide show
  1. package/README.md +9 -1
  2. package/cli/commands/maestro.ts +5 -1
  3. package/cli/commands/test.ts +29 -1
  4. package/cli/drivers/playwright-core-pin.ts +10 -0
  5. package/cli/drivers/playwright-provisioning.ts +36 -1
  6. package/cli/drivers/playwright.ts +26 -19
  7. package/cli/shell-init.ts +6 -1
  8. package/cli/ws-bridge.ts +8 -2
  9. package/dist-lib/agent-daemon-client.cjs +1 -1
  10. package/dist-lib/agent-events.cjs +1 -1
  11. package/dist-lib/agent-identity.cjs +1 -1
  12. package/dist-lib/agent-sessions.cjs +1 -1
  13. package/dist-lib/attached-projects.cjs +1 -1
  14. package/dist-lib/auth/shared-session.cjs +1 -1
  15. package/dist-lib/backend-origin.cjs +1 -1
  16. package/dist-lib/beta.cjs +1 -1
  17. package/dist-lib/beta.mjs +1 -1
  18. package/dist-lib/bridge-constants.cjs +1 -1
  19. package/dist-lib/bridge-contract-input.cjs +1 -1
  20. package/dist-lib/bridge-contract-input.mjs +1 -1
  21. package/dist-lib/bridge-contract.cjs +1 -1
  22. package/dist-lib/bridge-contract.mjs +1 -1
  23. package/dist-lib/capture-contract.cjs +1 -1
  24. package/dist-lib/capture-contract.mjs +1 -1
  25. package/dist-lib/cli-constants.cjs +1 -1
  26. package/dist-lib/cloud-contract.cjs +1 -1
  27. package/dist-lib/cloud-contract.mjs +1 -1
  28. package/dist-lib/cloud-test-args.cjs +17 -5
  29. package/dist-lib/cloud-test-args.mjs +17 -5
  30. package/dist-lib/cloud.cjs +1 -1
  31. package/dist-lib/cloud.mjs +1 -1
  32. package/dist-lib/config.cjs +1 -1
  33. package/dist-lib/detox/index.cjs +1 -1
  34. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  35. package/dist-lib/home-paths.cjs +6 -1
  36. package/dist-lib/host/bridge-host.cjs +48 -47
  37. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  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 +7 -2
  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 +1 -1
  53. package/dist-lib/native-app-identity.cjs +1 -1
  54. package/dist-lib/native-app-identity.mjs +1 -1
  55. package/dist-lib/profiles.cjs +1 -1
  56. package/dist-lib/public-brand.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.mjs +1 -1
  59. package/dist-lib/render-mode.cjs +1 -1
  60. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  61. package/dist-lib/sdk.cjs +1 -1
  62. package/dist-lib/sdk.mjs +1 -1
  63. package/dist-lib/skills.cjs +112 -62
  64. package/dist-lib/swift-compile.cjs +1 -1
  65. package/dist-lib/swift-compile.mjs +1 -1
  66. package/dist-lib/swift-package.cjs +1 -1
  67. package/dist-lib/swift-package.mjs +1 -1
  68. package/dist-lib/swift-submit.cjs +1 -1
  69. package/dist-lib/swift-submit.mjs +1 -1
  70. package/dist-lib/swift.cjs +5 -7
  71. package/dist-lib/vite-swift.cjs +1 -1
  72. package/dist-lib/vite.cjs +1 -1
  73. package/package.json +1 -1
  74. package/src/cloud-test-args.ts +18 -6
  75. package/src/home-paths.ts +8 -0
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -6164,48 +6164,16 @@ function createRuntimeDelivery(product) {
6164
6164
  manifest
6165
6165
  };
6166
6166
  }
6167
- const tarUrl = entry.tarball || tarballUrl(version, cdnOrigin);
6168
- const downloadDir = import_node_fs7.default.mkdtempSync(
6169
- import_node_path7.default.join(import_node_os2.default.tmpdir(), `${product.id}-runtime-download-`)
6170
- );
6171
- const runtimeArchivePath = import_node_path7.default.join(
6172
- downloadDir,
6173
- runtimeTarballCacheName(product, version)
6174
- );
6175
- const tmpDir = import_node_path7.default.join(
6176
- import_node_path7.default.dirname(destDir),
6177
- `.installing-${version}-${process.pid}`
6178
- );
6179
- import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
6180
- try {
6181
- if (!opts.quiet)
6182
- process.stderr.write(`${product.id}: downloading runtime ${version}\u2026
6183
- `);
6184
- await downloadToFile(tarUrl, runtimeArchivePath);
6185
- if (!opts.quiet)
6186
- process.stderr.write(`${product.id}: extracting runtime ${version}\u2026
6167
+ if (!opts.quiet)
6168
+ process.stderr.write(`${product.id}: downloading runtime ${version}\u2026
6187
6169
  `);
6188
- const actualSha = await sha256File(runtimeArchivePath);
6189
- if (actualSha !== entry.sha256) {
6190
- throw new Error(
6191
- `sha256 mismatch for runtime ${version}: expected ${entry.sha256}, actual ${actualSha}`
6192
- );
6193
- }
6194
- import_node_fs7.default.mkdirSync(tmpDir, { recursive: true });
6195
- await extractTarball(runtimeArchivePath, tmpDir);
6196
- if (!import_node_fs7.default.existsSync(import_node_path7.default.join(tmpDir, product.installedMarker))) {
6197
- throw new Error(
6198
- `extracted tarball for runtime ${version} is missing ${product.installedMarker}`
6199
- );
6200
- }
6201
- import_node_fs7.default.rmSync(destDir, { recursive: true, force: true });
6202
- import_node_fs7.default.renameSync(tmpDir, destDir);
6203
- } catch (err) {
6204
- import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
6205
- throw err;
6206
- } finally {
6207
- import_node_fs7.default.rmSync(downloadDir, { recursive: true, force: true });
6208
- }
6170
+ await installVerifiedTarball({
6171
+ url: entry.tarball || tarballUrl(version, cdnOrigin),
6172
+ digest: { algorithm: "sha256", encoding: "hex", value: entry.sha256 },
6173
+ destDir,
6174
+ installedMarker: product.installedMarker,
6175
+ label: `runtime ${version}`
6176
+ });
6209
6177
  if (setActive) product.writeActiveRuntime(version);
6210
6178
  pruneLocalRetention({ protectVersions });
6211
6179
  return {
@@ -6395,6 +6363,37 @@ function createRuntimeDelivery(product) {
6395
6363
  listInstalled: () => listInstalledRuntimes(product)
6396
6364
  };
6397
6365
  }
6366
+ async function installVerifiedTarball(tarball) {
6367
+ const { url, digest, destDir, installedMarker, label } = tarball;
6368
+ const downloadDir = import_node_fs7.default.mkdtempSync(import_node_path7.default.join(import_node_os2.default.tmpdir(), "runtime-delivery-download-"));
6369
+ const archivePath = import_node_path7.default.join(downloadDir, "archive.tar.gz");
6370
+ const tmpDir = import_node_path7.default.join(
6371
+ import_node_path7.default.dirname(destDir),
6372
+ `.installing-${import_node_path7.default.basename(destDir)}-${process.pid}`
6373
+ );
6374
+ import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
6375
+ try {
6376
+ await downloadToFile(url, archivePath);
6377
+ const actual = await digestFile(archivePath, digest.algorithm, digest.encoding);
6378
+ if (actual !== digest.value) {
6379
+ throw new Error(
6380
+ `${digest.algorithm} mismatch for ${label}: expected ${digest.value}, actual ${actual}`
6381
+ );
6382
+ }
6383
+ import_node_fs7.default.mkdirSync(tmpDir, { recursive: true });
6384
+ await extractTarball(archivePath, tmpDir, tarball.stripComponents ?? 0);
6385
+ if (!import_node_fs7.default.existsSync(import_node_path7.default.join(tmpDir, installedMarker))) {
6386
+ throw new Error(`extracted tarball for ${label} is missing ${installedMarker}`);
6387
+ }
6388
+ import_node_fs7.default.rmSync(destDir, { recursive: true, force: true });
6389
+ import_node_fs7.default.renameSync(tmpDir, destDir);
6390
+ } catch (err) {
6391
+ import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
6392
+ throw err;
6393
+ } finally {
6394
+ import_node_fs7.default.rmSync(downloadDir, { recursive: true, force: true });
6395
+ }
6396
+ }
6398
6397
  async function downloadToFile(url, destPath) {
6399
6398
  const res = await fetch(url);
6400
6399
  if (!res.ok || !res.body) {
@@ -6416,18 +6415,20 @@ async function downloadToFile(url, destPath) {
6416
6415
  throw err;
6417
6416
  }
6418
6417
  }
6419
- function sha256File(filePath) {
6418
+ function digestFile(filePath, algorithm, encoding) {
6420
6419
  return new Promise((resolve5, reject) => {
6421
- const hash = import_node_crypto2.default.createHash("sha256");
6420
+ const hash = import_node_crypto2.default.createHash(algorithm);
6422
6421
  const stream = import_node_fs7.default.createReadStream(filePath);
6423
6422
  stream.on("data", (chunk) => hash.update(chunk));
6424
6423
  stream.on("error", reject);
6425
- stream.on("end", () => resolve5(hash.digest("hex")));
6424
+ stream.on("end", () => resolve5(hash.digest(encoding)));
6426
6425
  });
6427
6426
  }
6428
- function extractTarball(tarPath, destDir) {
6427
+ function extractTarball(tarPath, destDir, stripComponents) {
6429
6428
  return new Promise((resolve5, reject) => {
6430
- const child = (0, import_node_child_process2.spawn)("tar", ["-xzf", tarPath, "-C", destDir], {
6429
+ const args = ["-xzf", tarPath, "-C", destDir];
6430
+ if (stripComponents > 0) args.push(`--strip-components=${stripComponents}`);
6431
+ const child = (0, import_node_child_process2.spawn)("tar", args, {
6431
6432
  stdio: ["ignore", "inherit", "inherit"]
6432
6433
  });
6433
6434
  child.on("error", reject);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1136,7 +1136,12 @@ function createBridge(wsPort, opts = {}) {
1136
1136
  });
1137
1137
  ws.on("error", (err) => {
1138
1138
  const cause = err.message ? `: ${err.message}` : "";
1139
- reject(new Error(`could not connect to ${bridgeWsUrl(wsPort)}${cause}`));
1139
+ reject(
1140
+ new Error(
1141
+ `could not connect to ${bridgeWsUrl(wsPort)}${cause}
1142
+ for sandboxed or agent runners, keep \`peach serve --port ${wsPort}\` running in a persistent terminal or background task.`
1143
+ )
1144
+ );
1140
1145
  });
1141
1146
  });
1142
1147
  ready.catch(() => {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/native-app-identity.ts
4
4
  var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -20487,6 +20487,7 @@ __export(home_paths_exports, {
20487
20487
  isDevWorkstation: () => isDevWorkstation,
20488
20488
  isOnboardingComplete: () => isOnboardingComplete,
20489
20489
  isSootsimDevCheckout: () => isSootsimDevCheckout,
20490
+ playwrightCoreDir: () => playwrightCoreDir,
20490
20491
  profilesDir: () => profilesDir,
20491
20492
  readActiveRuntime: () => readActiveRuntime,
20492
20493
  readDaemonLockfile: () => readDaemonLockfile,
@@ -20557,6 +20558,9 @@ function electronUserDataDir() {
20557
20558
  function electronVersionDir(version) {
20558
20559
  return import_node_path4.default.join(electronDir(), version);
20559
20560
  }
20561
+ function playwrightCoreDir(version) {
20562
+ return import_node_path4.default.join(rnxHomeDir(), "playwright-core", version);
20563
+ }
20560
20564
  function profilesDir() {
20561
20565
  return import_node_path4.default.join(rnxHomeDir(), "profiles");
20562
20566
  }
@@ -21215,48 +21219,16 @@ function createRuntimeDelivery(product) {
21215
21219
  manifest
21216
21220
  };
21217
21221
  }
21218
- const tarUrl = entry.tarball || tarballUrl(version, cdnOrigin);
21219
- const downloadDir = import_node_fs7.default.mkdtempSync(
21220
- import_node_path7.default.join(import_node_os2.default.tmpdir(), `${product.id}-runtime-download-`)
21221
- );
21222
- const runtimeArchivePath = import_node_path7.default.join(
21223
- downloadDir,
21224
- runtimeTarballCacheName(product, version)
21225
- );
21226
- const tmpDir = import_node_path7.default.join(
21227
- import_node_path7.default.dirname(destDir),
21228
- `.installing-${version}-${process.pid}`
21229
- );
21230
- import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
21231
- try {
21232
- if (!opts.quiet)
21233
- process.stderr.write(`${product.id}: downloading runtime ${version}\u2026
21222
+ if (!opts.quiet)
21223
+ process.stderr.write(`${product.id}: downloading runtime ${version}\u2026
21234
21224
  `);
21235
- await downloadToFile(tarUrl, runtimeArchivePath);
21236
- if (!opts.quiet)
21237
- process.stderr.write(`${product.id}: extracting runtime ${version}\u2026
21238
- `);
21239
- const actualSha = await sha256File(runtimeArchivePath);
21240
- if (actualSha !== entry.sha256) {
21241
- throw new Error(
21242
- `sha256 mismatch for runtime ${version}: expected ${entry.sha256}, actual ${actualSha}`
21243
- );
21244
- }
21245
- import_node_fs7.default.mkdirSync(tmpDir, { recursive: true });
21246
- await extractTarball(runtimeArchivePath, tmpDir);
21247
- if (!import_node_fs7.default.existsSync(import_node_path7.default.join(tmpDir, product.installedMarker))) {
21248
- throw new Error(
21249
- `extracted tarball for runtime ${version} is missing ${product.installedMarker}`
21250
- );
21251
- }
21252
- import_node_fs7.default.rmSync(destDir, { recursive: true, force: true });
21253
- import_node_fs7.default.renameSync(tmpDir, destDir);
21254
- } catch (err) {
21255
- import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
21256
- throw err;
21257
- } finally {
21258
- import_node_fs7.default.rmSync(downloadDir, { recursive: true, force: true });
21259
- }
21225
+ await installVerifiedTarball({
21226
+ url: entry.tarball || tarballUrl(version, cdnOrigin),
21227
+ digest: { algorithm: "sha256", encoding: "hex", value: entry.sha256 },
21228
+ destDir,
21229
+ installedMarker: product.installedMarker,
21230
+ label: `runtime ${version}`
21231
+ });
21260
21232
  if (setActive) product.writeActiveRuntime(version);
21261
21233
  pruneLocalRetention({ protectVersions });
21262
21234
  return {
@@ -21446,6 +21418,37 @@ function createRuntimeDelivery(product) {
21446
21418
  listInstalled: () => listInstalledRuntimes(product)
21447
21419
  };
21448
21420
  }
21421
+ async function installVerifiedTarball(tarball) {
21422
+ const { url, digest, destDir, installedMarker, label } = tarball;
21423
+ const downloadDir = import_node_fs7.default.mkdtempSync(import_node_path7.default.join(import_node_os2.default.tmpdir(), "runtime-delivery-download-"));
21424
+ const archivePath = import_node_path7.default.join(downloadDir, "archive.tar.gz");
21425
+ const tmpDir = import_node_path7.default.join(
21426
+ import_node_path7.default.dirname(destDir),
21427
+ `.installing-${import_node_path7.default.basename(destDir)}-${process.pid}`
21428
+ );
21429
+ import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
21430
+ try {
21431
+ await downloadToFile(url, archivePath);
21432
+ const actual = await digestFile(archivePath, digest.algorithm, digest.encoding);
21433
+ if (actual !== digest.value) {
21434
+ throw new Error(
21435
+ `${digest.algorithm} mismatch for ${label}: expected ${digest.value}, actual ${actual}`
21436
+ );
21437
+ }
21438
+ import_node_fs7.default.mkdirSync(tmpDir, { recursive: true });
21439
+ await extractTarball(archivePath, tmpDir, tarball.stripComponents ?? 0);
21440
+ if (!import_node_fs7.default.existsSync(import_node_path7.default.join(tmpDir, installedMarker))) {
21441
+ throw new Error(`extracted tarball for ${label} is missing ${installedMarker}`);
21442
+ }
21443
+ import_node_fs7.default.rmSync(destDir, { recursive: true, force: true });
21444
+ import_node_fs7.default.renameSync(tmpDir, destDir);
21445
+ } catch (err) {
21446
+ import_node_fs7.default.rmSync(tmpDir, { recursive: true, force: true });
21447
+ throw err;
21448
+ } finally {
21449
+ import_node_fs7.default.rmSync(downloadDir, { recursive: true, force: true });
21450
+ }
21451
+ }
21449
21452
  async function downloadToFile(url, destPath) {
21450
21453
  const res = await fetch(url);
21451
21454
  if (!res.ok || !res.body) {
@@ -21467,18 +21470,20 @@ async function downloadToFile(url, destPath) {
21467
21470
  throw err;
21468
21471
  }
21469
21472
  }
21470
- function sha256File(filePath) {
21473
+ function digestFile(filePath, algorithm, encoding) {
21471
21474
  return new Promise((resolve9, reject) => {
21472
- const hash = import_node_crypto2.default.createHash("sha256");
21475
+ const hash = import_node_crypto2.default.createHash(algorithm);
21473
21476
  const stream = import_node_fs7.default.createReadStream(filePath);
21474
21477
  stream.on("data", (chunk) => hash.update(chunk));
21475
21478
  stream.on("error", reject);
21476
- stream.on("end", () => resolve9(hash.digest("hex")));
21479
+ stream.on("end", () => resolve9(hash.digest(encoding)));
21477
21480
  });
21478
21481
  }
21479
- function extractTarball(tarPath, destDir) {
21482
+ function extractTarball(tarPath, destDir, stripComponents) {
21480
21483
  return new Promise((resolve9, reject) => {
21481
- const child = (0, import_node_child_process3.spawn)("tar", ["-xzf", tarPath, "-C", destDir], {
21484
+ const args = ["-xzf", tarPath, "-C", destDir];
21485
+ if (stripComponents > 0) args.push(`--strip-components=${stripComponents}`);
21486
+ const child = (0, import_node_child_process3.spawn)("tar", args, {
21482
21487
  stdio: ["ignore", "inherit", "inherit"]
21483
21488
  });
21484
21489
  child.on("error", reject);
@@ -31690,7 +31695,12 @@ function createBridge(wsPort, opts = {}) {
31690
31695
  });
31691
31696
  ws.on("error", (err) => {
31692
31697
  const cause = err.message ? `: ${err.message}` : "";
31693
- reject(new Error(`could not connect to ${bridgeWsUrl(wsPort)}${cause}`));
31698
+ reject(
31699
+ new Error(
31700
+ `could not connect to ${bridgeWsUrl(wsPort)}${cause}
31701
+ for sandboxed or agent runners, keep \`peach serve --port ${wsPort}\` running in a persistent terminal or background task.`
31702
+ )
31703
+ );
31694
31704
  });
31695
31705
  });
31696
31706
  ready.catch(() => {
@@ -34132,11 +34142,24 @@ var init_internal_child = __esm({
34132
34142
  }
34133
34143
  });
34134
34144
 
34145
+ // cli/drivers/playwright-core-pin.ts
34146
+ var PINNED_PLAYWRIGHT_CORE;
34147
+ var init_playwright_core_pin = __esm({
34148
+ "cli/drivers/playwright-core-pin.ts"() {
34149
+ "use strict";
34150
+ PINNED_PLAYWRIGHT_CORE = {
34151
+ version: "1.61.0",
34152
+ integrity: "sha512-caX7TrY3Ml6egyDX0WUcTHDxodl/b51y5wJOdCEA36QviK/s2g081hvmGs8eaE3DWb6NYZQ6BjO/QkNRPenoPA=="
34153
+ };
34154
+ }
34155
+ });
34156
+
34135
34157
  // cli/drivers/playwright-provisioning.ts
34136
34158
  function resolvePlaywright() {
34137
34159
  const roots = [`${process.cwd()}/`];
34138
34160
  const self = rnxSelfInvocation();
34139
34161
  roots.push(self.prefixArgs[0] ?? self.executable);
34162
+ roots.push(`${playwrightCoreDir(PINNED_PLAYWRIGHT_CORE.version)}/`);
34140
34163
  for (const root of roots) {
34141
34164
  try {
34142
34165
  const requireFromRoot = (0, import_node_module5.createRequire)(root);
@@ -34172,6 +34195,33 @@ function resolvePlaywright() {
34172
34195
  }
34173
34196
  return null;
34174
34197
  }
34198
+ async function provisionPlaywright() {
34199
+ const existing = resolvePlaywright();
34200
+ if (existing) return existing;
34201
+ const { version, integrity } = PINNED_PLAYWRIGHT_CORE;
34202
+ const [algorithm, digest] = integrity.split("-", 2);
34203
+ if (algorithm !== "sha512" || !digest) {
34204
+ throw new Error(`pinned playwright-core integrity is not sha512: ${integrity}`);
34205
+ }
34206
+ process.stderr.write(`peach: installing playwright-core ${version}\u2026
34207
+ `);
34208
+ await installVerifiedTarball({
34209
+ url: `https://registry.npmjs.org/playwright-core/-/playwright-core-${version}.tgz`,
34210
+ digest: { algorithm, encoding: "base64", value: digest },
34211
+ destDir: (0, import_node_path25.join)(playwrightCoreDir(version), "node_modules", "playwright-core"),
34212
+ installedMarker: "package.json",
34213
+ // npm tarballs hold the package under a leading `package/`
34214
+ stripComponents: 1,
34215
+ label: `playwright-core ${version}`
34216
+ });
34217
+ const installed2 = resolvePlaywright();
34218
+ if (!installed2) {
34219
+ throw new Error(
34220
+ `playwright-core ${version} installed to ${playwrightCoreDir(version)} but does not resolve`
34221
+ );
34222
+ }
34223
+ return installed2;
34224
+ }
34175
34225
  function probeBrowser(resolved, env) {
34176
34226
  const self = rnxSelfInvocation();
34177
34227
  const probe3 = (0, import_node_child_process6.spawnSync)(
@@ -34260,25 +34310,22 @@ var init_playwright_provisioning = __esm({
34260
34310
  import_node_fs23 = require("node:fs");
34261
34311
  import_node_module5 = require("node:module");
34262
34312
  import_node_path25 = require("node:path");
34313
+ init_src();
34314
+ init_home_paths();
34263
34315
  init_is_record();
34264
34316
  init_internal_child();
34265
34317
  init_self_invocation();
34318
+ init_playwright_core_pin();
34266
34319
  }
34267
34320
  });
34268
34321
 
34269
34322
  // cli/drivers/playwright.ts
34270
34323
  function probe2() {
34271
34324
  const resolved = resolvePlaywright();
34272
- if (!resolved) {
34273
- return {
34274
- available: false,
34275
- reason: "playwright not installed in the current workspace"
34276
- };
34277
- }
34278
34325
  return {
34279
34326
  available: true,
34280
34327
  reason: null,
34281
- detail: `resolved via ${resolved.spec}@${resolved.version}`
34328
+ detail: resolved ? `resolved via ${resolved.spec}@${resolved.version}` : `installs playwright-core@${PINNED_PLAYWRIGHT_CORE.version} on first launch`
34282
34329
  };
34283
34330
  }
34284
34331
  function headlessHintForLinuxFailure(opts, detail) {
@@ -34300,13 +34347,6 @@ function resolveUserDataDir(opts) {
34300
34347
  return "";
34301
34348
  }
34302
34349
  async function launch2(opts) {
34303
- const resolved = resolvePlaywright();
34304
- if (!resolved) {
34305
- return {
34306
- launched: false,
34307
- message: "playwright not installed \u2014 run `bun add -D playwright` first"
34308
- };
34309
- }
34310
34350
  if (!opts.url) {
34311
34351
  return { launched: false, message: "playwright driver requires a target url" };
34312
34352
  }
@@ -34317,6 +34357,15 @@ async function launch2(opts) {
34317
34357
  message: "playwright driver requires a valid owning session process"
34318
34358
  };
34319
34359
  }
34360
+ let resolved;
34361
+ try {
34362
+ resolved = await provisionPlaywright();
34363
+ } catch (error) {
34364
+ return {
34365
+ launched: false,
34366
+ message: `playwright provisioning failed: ${error instanceof Error ? error.message : String(error)}`
34367
+ };
34368
+ }
34320
34369
  const playwrightEnv = { ...process.env };
34321
34370
  const provisioning = ensurePlaywrightBrowser(resolved, playwrightEnv);
34322
34371
  if (!provisioning.ok) {
@@ -34407,6 +34456,7 @@ var init_playwright = __esm({
34407
34456
  init_internal_child();
34408
34457
  init_parent_pid();
34409
34458
  init_self_invocation();
34459
+ init_playwright_core_pin();
34410
34460
  init_playwright_provisioning();
34411
34461
  playwrightDriver = {
34412
34462
  id: "playwright",
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.631 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.632 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {