peachsim 0.1.571 → 0.1.573
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.
- package/LICENSE +1 -1
- package/README.md +106 -106
- package/cli/app-config.ts +1 -1
- package/cli/app-fonts.ts +4 -4
- package/cli/auth.ts +11 -11
- package/cli/bin.ts +4 -4
- package/cli/bridge-flow-runner.ts +13 -13
- package/cli/browser-evals.ts +2 -2
- package/cli/cli-update.ts +6 -6
- package/cli/cloud-client.ts +16 -16
- package/cli/cloud-dispatch.ts +2 -2
- package/cli/cloud-session.ts +12 -12
- package/cli/cloud-test-tunnel.ts +4 -4
- package/cli/command-registry.ts +7 -7
- package/cli/commands/agent-wrapper.ts +7 -7
- package/cli/commands/agent.ts +16 -16
- package/cli/commands/app-fonts.ts +3 -3
- package/cli/commands/assert.ts +10 -10
- package/cli/commands/auth.ts +5 -5
- package/cli/commands/box/checkout-plane.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box/rnx-command.ts +5 -5
- package/cli/commands/box.ts +38 -38
- package/cli/commands/camera.ts +13 -13
- package/cli/commands/cleanup.ts +13 -13
- package/cli/commands/compat.ts +7 -7
- package/cli/commands/config.ts +5 -5
- package/cli/commands/control.ts +63 -63
- package/cli/commands/cpu-profile.ts +11 -11
- package/cli/commands/daemon-mac-app.ts +10 -10
- package/cli/commands/daemon.ts +29 -27
- package/cli/commands/debug.ts +35 -35
- package/cli/commands/desktop.ts +3 -3
- package/cli/commands/detox.ts +33 -33
- package/cli/commands/device.ts +9 -9
- package/cli/commands/diagnose.ts +17 -17
- package/cli/commands/do-chain.ts +4 -4
- package/cli/commands/electron.ts +9 -9
- package/cli/commands/film.ts +9 -9
- package/cli/commands/flow.ts +49 -49
- package/cli/commands/inspect/core.ts +12 -12
- package/cli/commands/inspect/count.ts +1 -1
- package/cli/commands/inspect/describe.ts +1 -1
- package/cli/commands/inspect/env.ts +2 -2
- package/cli/commands/inspect/find.ts +2 -2
- package/cli/commands/inspect/get-layout.ts +2 -2
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +4 -4
- package/cli/commands/inspect/memory.ts +1 -1
- package/cli/commands/inspect/resolve-target.ts +1 -1
- package/cli/commands/inspect/screens.ts +1 -1
- package/cli/commands/inspect/shared.ts +1 -1
- package/cli/commands/inspect/tree.ts +1 -1
- package/cli/commands/inspect/url.ts +1 -1
- package/cli/commands/inspect/wait-event.ts +5 -5
- package/cli/commands/inspect.ts +82 -82
- package/cli/commands/install-cli.ts +16 -16
- package/cli/commands/install-desktop.ts +26 -26
- package/cli/commands/login.ts +11 -11
- package/cli/commands/maestro-generate.ts +10 -10
- package/cli/commands/maestro.ts +77 -67
- package/cli/commands/mode.ts +4 -4
- package/cli/commands/no-bridge-hint.ts +12 -12
- package/cli/commands/perf.ts +11 -11
- package/cli/commands/permissions.ts +5 -5
- package/cli/commands/platform.ts +21 -21
- package/cli/commands/preview.ts +5 -5
- package/cli/commands/profile.ts +12 -12
- package/cli/commands/react.ts +15 -15
- package/cli/commands/record.ts +31 -31
- package/cli/commands/report-issue.ts +4 -4
- package/cli/commands/reset.ts +2 -2
- package/cli/commands/runtime.ts +23 -23
- package/cli/commands/screenshot-command.ts +2 -2
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +7 -7
- package/cli/commands/screenshot.ts +24 -24
- package/cli/commands/screenshots-capture.ts +13 -13
- package/cli/commands/screenshots.ts +6 -6
- package/cli/commands/serve.ts +12 -12
- package/cli/commands/setup.ts +25 -25
- package/cli/commands/skills.ts +30 -23
- package/cli/commands/slides.ts +20 -20
- package/cli/commands/state.ts +2 -2
- package/cli/commands/storage.ts +3 -3
- package/cli/commands/telemetry.ts +2 -2
- package/cli/commands/test.ts +15 -15
- package/cli/commands/three-mode.ts +17 -17
- package/cli/commands/timeline.ts +12 -12
- package/cli/commands/upgrade.ts +11 -11
- package/cli/commands/upload.ts +26 -26
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +20 -20
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +16 -16
- package/cli/drivers/electron.ts +4 -4
- package/cli/drivers/playwright-sim-host.ts +7 -7
- package/cli/drivers/playwright.ts +4 -4
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +5 -5
- package/cli/flow-export.ts +1 -1
- package/cli/flow-file.ts +5 -5
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +13 -13
- package/cli/hints.ts +14 -14
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/internal-child.ts +2 -2
- package/cli/maestro-js.ts +4 -4
- package/cli/maestro-report.ts +1 -1
- package/cli/main.ts +14 -14
- package/cli/outbound-endpoints.ts +30 -30
- package/cli/parse-args.ts +7 -7
- package/cli/privacy.ts +1 -1
- package/cli/recording-access.ts +10 -10
- package/cli/resolve-assets.ts +2 -2
- package/cli/rnx-in-process.ts +5 -5
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +3 -3
- package/cli/run-rnx.ts +1 -1
- package/cli/runtime-notes.ts +1 -1
- package/cli/self-invocation.ts +1 -1
- package/cli/send-to-box.ts +1 -1
- package/cli/shell-init.ts +40 -40
- package/cli/ui.ts +1 -1
- package/cli/ws-bridge.ts +22 -22
- package/detox/config-loader.ts +1 -1
- package/detox/index.ts +28 -28
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +12 -12
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +12 -12
- package/dist-lib/attached-projects.cjs +4 -4
- package/dist-lib/auth/shared-session.cjs +4 -4
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +4 -4
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +2 -2
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +42 -42
- package/dist-lib/cloud.mjs +42 -42
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/detox/index.cjs +29 -29
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +12 -12
- package/dist-lib/host/bridge-host.cjs +72 -71
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +6 -6
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +48 -48
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/menu.cjs +5 -5
- package/dist-lib/menu.mjs +5 -5
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +15 -15
- package/dist-lib/profiles.cjs +4 -4
- package/dist-lib/public-brand.cjs +3 -3
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +2 -1
- package/dist-lib/sdk.cjs +9 -9
- package/dist-lib/sdk.mjs +9 -9
- package/dist-lib/skills.cjs +416 -415
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite.cjs +24 -24
- package/package.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -3
- package/skills/contrast/SKILL.md +75 -75
- package/skills/{rnx-debug → peach-debug}/SKILL.md +90 -90
- package/skills/{rnx-perf → peach-perf}/SKILL.md +13 -13
- package/skills/{rnx-setup → peach-setup}/SKILL.md +60 -60
- package/skills/{rnx-test → peach-test}/SKILL.md +44 -44
- package/skills/{rnx-visual → peach-visual}/SKILL.md +26 -26
- package/src/agent-daemon-client.ts +5 -5
- package/src/agent-events.ts +1 -1
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +13 -13
- package/src/attached-projects.ts +1 -1
- package/src/auth/shared-session.ts +1 -1
- package/src/bridge-constants.ts +3 -3
- package/src/bridge-contract-input.ts +1 -1
- package/src/bridge-contract.ts +3 -3
- package/src/cli-version.ts +6 -6
- package/src/cloud.ts +40 -40
- package/src/config.ts +1 -1
- package/src/connect.ts +6 -6
- package/src/dev-server-open.ts +8 -8
- package/src/disk-cleanup.ts +3 -3
- package/src/home-paths.ts +26 -26
- package/src/host/agent-host.ts +3 -3
- package/src/host/bridge-host.ts +33 -33
- package/src/host/fetch-proxy-handler.ts +1 -1
- package/src/host/plane-host.ts +2 -2
- package/src/host/replacement-module-handler.ts +2 -2
- package/src/menu.ts +2 -2
- package/src/metro-plugin.ts +7 -7
- package/src/metro-production-bundle.ts +2 -2
- package/src/native-dev-bundle-url.ts +2 -2
- package/src/playwright-host-log.ts +1 -1
- package/src/public-brand.ts +2 -2
- package/src/react-native-host-modules.ts +1 -1
- package/src/rolldown-plugin-swift.ts +3 -3
- package/src/runtime-assets.ts +11 -11
- package/src/runtime-delivery.ts +6 -6
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/org-deck.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/sim-client.ts +1 -1
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/vite-plugin-one.ts +8 -8
- package/src/vite-plugin-swift.ts +3 -3
- package/src/vite-plugin.ts +6 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.573 | (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;
|
|
@@ -125,11 +125,11 @@ var name, rnxPublicBrand;
|
|
|
125
125
|
var init_public_brand = __esm({
|
|
126
126
|
"src/public-brand.ts"() {
|
|
127
127
|
"use strict";
|
|
128
|
-
name = "
|
|
128
|
+
name = "Peach";
|
|
129
129
|
rnxPublicBrand = Object.freeze({
|
|
130
130
|
name,
|
|
131
131
|
packageName: "peachsim",
|
|
132
|
-
commandName: "
|
|
132
|
+
commandName: "peach",
|
|
133
133
|
domain: "rnxsim.com",
|
|
134
134
|
origin: "https://rnxsim.com"
|
|
135
135
|
});
|
|
@@ -138,9 +138,9 @@ var init_public_brand = __esm({
|
|
|
138
138
|
|
|
139
139
|
// src/home-paths.ts
|
|
140
140
|
function rnxHomeDir() {
|
|
141
|
-
const override = process.env[
|
|
141
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
142
142
|
if (override && override.length > 0) return import_node_path4.default.resolve(override);
|
|
143
|
-
return import_node_path4.default.join((0, import_node_os.homedir)(), ".
|
|
143
|
+
return import_node_path4.default.join((0, import_node_os.homedir)(), ".peach");
|
|
144
144
|
}
|
|
145
145
|
function isSootsimDevCheckout() {
|
|
146
146
|
if (process.env.SOOTSIM_FORCE_DAEMON_INSTALL === "1") return false;
|
|
@@ -151,7 +151,7 @@ function isSootsimDevCheckout() {
|
|
|
151
151
|
if (!argv1) return false;
|
|
152
152
|
try {
|
|
153
153
|
const real = import_node_fs4.default.realpathSync(argv1);
|
|
154
|
-
return real.includes(`${import_node_path4.default.sep}packages${import_node_path4.default.sep}
|
|
154
|
+
return real.includes(`${import_node_path4.default.sep}packages${import_node_path4.default.sep}peachsim${import_node_path4.default.sep}`);
|
|
155
155
|
} catch {
|
|
156
156
|
return false;
|
|
157
157
|
}
|
|
@@ -306,10 +306,10 @@ function writeDaemonLockfile(data) {
|
|
|
306
306
|
const existing = readDaemonLockfile();
|
|
307
307
|
if (!existing) {
|
|
308
308
|
if (createDaemonLockfileExclusive(data)) return;
|
|
309
|
-
throw new Error("another
|
|
309
|
+
throw new Error("another peach daemon claimed the lockfile before this write");
|
|
310
310
|
}
|
|
311
311
|
if (!sameDaemonOwner(existing, data)) {
|
|
312
|
-
throw new Error("refusing to overwrite another
|
|
312
|
+
throw new Error("refusing to overwrite another peach daemon lockfile");
|
|
313
313
|
}
|
|
314
314
|
const tmp = `${lockfilePath}.${data.pid}.${(0, import_node_crypto.randomUUID)()}.tmp`;
|
|
315
315
|
import_node_fs4.default.writeFileSync(tmp, `${JSON.stringify(data, null, 2)}
|
|
@@ -317,7 +317,7 @@ function writeDaemonLockfile(data) {
|
|
|
317
317
|
try {
|
|
318
318
|
const current = readDaemonLockfile();
|
|
319
319
|
if (!current || !sameDaemonOwner(current, data)) {
|
|
320
|
-
throw new Error("
|
|
320
|
+
throw new Error("peach daemon lock ownership changed during heartbeat");
|
|
321
321
|
}
|
|
322
322
|
import_node_fs4.default.renameSync(tmp, lockfilePath);
|
|
323
323
|
} finally {
|
|
@@ -472,7 +472,7 @@ function removeDevBridgeLockfile(owner) {
|
|
|
472
472
|
} catch {
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
var import_node_crypto, import_node_fs4, import_node_os, import_node_path4,
|
|
475
|
+
var import_node_crypto, import_node_fs4, import_node_os, import_node_path4, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE, DEV_BRIDGES_DIR, CONFIG_FILE, DAEMON_HEARTBEAT_STALE_MS, DAEMON_LOCKFILE_MAX_BYTES, DAEMON_CLAIM_STALE_MS;
|
|
476
476
|
var init_home_paths = __esm({
|
|
477
477
|
"src/home-paths.ts"() {
|
|
478
478
|
"use strict";
|
|
@@ -480,7 +480,7 @@ var init_home_paths = __esm({
|
|
|
480
480
|
import_node_fs4 = __toESM(require("node:fs"), 1);
|
|
481
481
|
import_node_os = require("node:os");
|
|
482
482
|
import_node_path4 = __toESM(require("node:path"), 1);
|
|
483
|
-
|
|
483
|
+
PEACH_HOME_ENV = "PEACH_HOME";
|
|
484
484
|
ACTIVE_RUNTIME_FILE = "active";
|
|
485
485
|
DAEMON_LOCKFILE = "daemon.json";
|
|
486
486
|
DEV_BRIDGES_DIR = "dev-bridges";
|
|
@@ -597,7 +597,7 @@ var init_run_rnx = __esm({
|
|
|
597
597
|
RnxExit = class extends Error {
|
|
598
598
|
code;
|
|
599
599
|
constructor(code) {
|
|
600
|
-
super(`
|
|
600
|
+
super(`peach exited with code ${code}`);
|
|
601
601
|
this.name = "RnxExit";
|
|
602
602
|
this.code = code;
|
|
603
603
|
}
|
|
@@ -646,7 +646,7 @@ function isCliApiKeySecret(secret) {
|
|
|
646
646
|
return secret.startsWith("sk_rnx_");
|
|
647
647
|
}
|
|
648
648
|
function readApiKeyFromEnv() {
|
|
649
|
-
const envName = "
|
|
649
|
+
const envName = "PEACH_API_KEY";
|
|
650
650
|
const secret = process.env[envName]?.trim();
|
|
651
651
|
return secret && isCliApiKeySecret(secret) ? { secret, envName } : null;
|
|
652
652
|
}
|
|
@@ -700,11 +700,11 @@ function authHeaderOrExit(commandLabel) {
|
|
|
700
700
|
if (auth) return { auth, header: authHeaderValue(auth) };
|
|
701
701
|
process.stderr.write(
|
|
702
702
|
`
|
|
703
|
-
|
|
703
|
+
peach needs to be authenticated.
|
|
704
704
|
|
|
705
705
|
pick one:
|
|
706
|
-
\u2022 run \`
|
|
707
|
-
\u2022 set
|
|
706
|
+
\u2022 run \`peach login\` to sign in with your GH account
|
|
707
|
+
\u2022 set PEACH_API_KEY=sk_rnx_... (recommended for CI)
|
|
708
708
|
|
|
709
709
|
`
|
|
710
710
|
);
|
|
@@ -717,7 +717,7 @@ var init_auth = __esm({
|
|
|
717
717
|
init_shared_session();
|
|
718
718
|
init_run_rnx();
|
|
719
719
|
GITHUB_TOKEN_PREFIXES = ["ghs_", "ghp_", "gho_", "ghu_", "github_pat_"];
|
|
720
|
-
CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `
|
|
720
|
+
CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `peach login --account <name>` to choose the one to bill";
|
|
721
721
|
}
|
|
722
722
|
});
|
|
723
723
|
|
|
@@ -2101,7 +2101,7 @@ async function assertSelfContainedMetroArtifactAssets(bundle) {
|
|
|
2101
2101
|
descriptors = extractAssetDescriptors(bundle);
|
|
2102
2102
|
} catch (error) {
|
|
2103
2103
|
throw new Error(
|
|
2104
|
-
`
|
|
2104
|
+
`peach ios --remote bundle is not self-contained: ${error instanceof Error ? error.message : String(error)}`
|
|
2105
2105
|
);
|
|
2106
2106
|
}
|
|
2107
2107
|
let variants = 0;
|
|
@@ -2114,7 +2114,7 @@ async function assertSelfContainedMetroArtifactAssets(bundle) {
|
|
|
2114
2114
|
const hashes = descriptor.fileHashes;
|
|
2115
2115
|
if (!uris || !hashes || uris.length !== descriptor.scales.length || hashes.length !== descriptor.scales.length) {
|
|
2116
2116
|
throw new Error(
|
|
2117
|
-
`
|
|
2117
|
+
`peach ios --remote bundle is not self-contained: ${label} does not embed every scale variant`
|
|
2118
2118
|
);
|
|
2119
2119
|
}
|
|
2120
2120
|
const prefix = `data:${metroAssetContentType(descriptor.type)};base64,`;
|
|
@@ -2123,7 +2123,7 @@ async function assertSelfContainedMetroArtifactAssets(bundle) {
|
|
|
2123
2123
|
const expectedHash = hashes[index];
|
|
2124
2124
|
if (!uri.startsWith(prefix) || !/^[a-f0-9]{64}$/.test(expectedHash)) {
|
|
2125
2125
|
throw new Error(
|
|
2126
|
-
`
|
|
2126
|
+
`peach ios --remote bundle is not self-contained: ${label} scale ${descriptor.scales[index]} is not content-addressed embedded data`
|
|
2127
2127
|
);
|
|
2128
2128
|
}
|
|
2129
2129
|
let decoded;
|
|
@@ -2132,12 +2132,12 @@ async function assertSelfContainedMetroArtifactAssets(bundle) {
|
|
|
2132
2132
|
decoded = Uint8Array.from(binary, (character) => character.charCodeAt(0));
|
|
2133
2133
|
} catch {
|
|
2134
2134
|
throw new Error(
|
|
2135
|
-
`
|
|
2135
|
+
`peach ios --remote bundle is not self-contained: ${label} scale ${descriptor.scales[index]} has invalid embedded data`
|
|
2136
2136
|
);
|
|
2137
2137
|
}
|
|
2138
2138
|
if (await sha256HexBytes(decoded) !== expectedHash) {
|
|
2139
2139
|
throw new Error(
|
|
2140
|
-
`
|
|
2140
|
+
`peach ios --remote bundle is not self-contained: ${label} scale ${descriptor.scales[index]} bytes do not match their content hash`
|
|
2141
2141
|
);
|
|
2142
2142
|
}
|
|
2143
2143
|
variants++;
|
|
@@ -2260,13 +2260,13 @@ async function embedMetroAssetFiles(bundle, read) {
|
|
|
2260
2260
|
}
|
|
2261
2261
|
if (loaded.size === 0) {
|
|
2262
2262
|
throw new Error(
|
|
2263
|
-
`
|
|
2263
|
+
`peach ios --remote found no scale of ${site.descriptor.name}.${site.descriptor.type} in the asset dest graph for ${site.descriptor.httpServerLocation}`
|
|
2264
2264
|
);
|
|
2265
2265
|
}
|
|
2266
2266
|
const scales = [...loaded.keys()].sort((left, right) => left - right);
|
|
2267
2267
|
if (scales.length !== site.descriptor.scales.length && !site.scalesSpan) {
|
|
2268
2268
|
throw new Error(
|
|
2269
|
-
`
|
|
2269
|
+
`peach ios --remote could not narrow the scales of ${site.descriptor.name}.${site.descriptor.type} because its descriptor declares none`
|
|
2270
2270
|
);
|
|
2271
2271
|
}
|
|
2272
2272
|
let descriptorBytes = 0;
|
|
@@ -2298,7 +2298,7 @@ async function embedMetroAssetFiles(bundle, read) {
|
|
|
2298
2298
|
const code = parts.join("");
|
|
2299
2299
|
if (countNewlines(code) !== countNewlines(bundle)) {
|
|
2300
2300
|
throw new Error(
|
|
2301
|
-
"
|
|
2301
|
+
"peach Cloud asset embedding changed the bundle line count, which invalidates its source map"
|
|
2302
2302
|
);
|
|
2303
2303
|
}
|
|
2304
2304
|
return {
|
|
@@ -2453,11 +2453,11 @@ async function minify(code, sourceLine, options, withMap) {
|
|
|
2453
2453
|
...withMap ? { sourceMap: true } : {}
|
|
2454
2454
|
});
|
|
2455
2455
|
if (typeof result.code !== "string") {
|
|
2456
|
-
throw new Error(`
|
|
2456
|
+
throw new Error(`peach Cloud could not re-print the statement at line ${sourceLine}`);
|
|
2457
2457
|
}
|
|
2458
2458
|
const map = withMap && typeof result.map === "string" ? result.map : null;
|
|
2459
2459
|
if (withMap && map === null) {
|
|
2460
|
-
throw new Error(`
|
|
2460
|
+
throw new Error(`peach Cloud got no source map for the statement at line ${sourceLine}`);
|
|
2461
2461
|
}
|
|
2462
2462
|
return { code: result.code.trimEnd(), map, sourceLine };
|
|
2463
2463
|
}
|
|
@@ -2467,7 +2467,7 @@ async function minifyDefine(statement, moduleId, sourceLine, options, developmen
|
|
|
2467
2467
|
const define = layout.statements[0];
|
|
2468
2468
|
if (layout.statements.length !== 1 || define?.kind !== "define") {
|
|
2469
2469
|
throw new Error(
|
|
2470
|
-
`
|
|
2470
|
+
`peach Cloud could not re-read module ${moduleId} after minification: the minifier emitted ${layout.statements.length} statements rather than one \`__d(\` call.`
|
|
2471
2471
|
);
|
|
2472
2472
|
}
|
|
2473
2473
|
const factory = piece.code.slice(define.factory.start, define.factory.end);
|
|
@@ -2529,7 +2529,7 @@ async function buildRnxCloudArtifact(bundle, options = {}) {
|
|
|
2529
2529
|
const layout = (0, import_metro_production_bundle.readRNXMetroBundleLayout)(identity.source);
|
|
2530
2530
|
if (layout.moduleIdFailures > 0) {
|
|
2531
2531
|
throw new Error(
|
|
2532
|
-
`
|
|
2532
|
+
`peach Cloud could not read ${layout.moduleIdFailures} Metro module IDs from the bundle`
|
|
2533
2533
|
);
|
|
2534
2534
|
}
|
|
2535
2535
|
(0, import_metro_production_bundle.validateRNXMetroModulePaths)(identity.source, identity.modulePaths);
|
|
@@ -2619,8 +2619,8 @@ var init_metroCloudArtifact = __esm({
|
|
|
2619
2619
|
import_terser = require("terser");
|
|
2620
2620
|
init_metroAssetArtifact();
|
|
2621
2621
|
init_metroDebugSourceMap();
|
|
2622
|
-
MODULE_PATHS_REQUIRED = "
|
|
2623
|
-
SOURCE_MAP_REQUIRED = "
|
|
2622
|
+
MODULE_PATHS_REQUIRED = "peach Cloud requires a Metro bundle carrying rnx module identity. Build it through the published Metro plugin: withRNX(config).";
|
|
2623
|
+
SOURCE_MAP_REQUIRED = "peach Cloud development artifacts require the Metro source map for the bundle. Build it with --sourcemap-output, or serve the bundle with an inline source map.";
|
|
2624
2624
|
MINIFY_OPTIONS = {
|
|
2625
2625
|
ecma: 2020,
|
|
2626
2626
|
compress: false,
|
|
@@ -3770,7 +3770,7 @@ function responseError(status, text) {
|
|
|
3770
3770
|
);
|
|
3771
3771
|
}
|
|
3772
3772
|
function resolveCloudOrigin(value) {
|
|
3773
|
-
const configured = value?.trim() || process.env.
|
|
3773
|
+
const configured = value?.trim() || process.env.PEACH_CLOUD_ORIGIN?.trim();
|
|
3774
3774
|
const source = configured || DEFAULT_RNX_CLOUD_ORIGIN;
|
|
3775
3775
|
return normalizeCloudOrigin(source);
|
|
3776
3776
|
}
|
|
@@ -4304,7 +4304,7 @@ var init_cloud_client = __esm({
|
|
|
4304
4304
|
init_detect();
|
|
4305
4305
|
DEFAULT_RNX_CLOUD_ORIGIN = rnxPublicBrand.origin;
|
|
4306
4306
|
MAX_RNX_CLOUD_BUNDLE_BYTES = RNX_CLOUD_MAX_ARTIFACT_BYTES;
|
|
4307
|
-
REMOTE_COMMAND = "
|
|
4307
|
+
REMOTE_COMMAND = "peach remote";
|
|
4308
4308
|
MAX_ASSET_DEST_FILES = 25e3;
|
|
4309
4309
|
ACCOUNT_CHOICE_REFUSALS = /* @__PURE__ */ new Set([
|
|
4310
4310
|
"accountId is required",
|
|
@@ -5380,6 +5380,7 @@ async function probePort(port, buildIconProxyUrl, listeningProcess) {
|
|
|
5380
5380
|
function isSootSimSelfServer(server) {
|
|
5381
5381
|
const bundleId = server.bundleId?.trim().toLowerCase();
|
|
5382
5382
|
if (bundleId?.startsWith("dev.sootsim.")) return true;
|
|
5383
|
+
if (bundleId?.startsWith("dev.peachsim.")) return true;
|
|
5383
5384
|
return false;
|
|
5384
5385
|
}
|
|
5385
5386
|
var portCache = /* @__PURE__ */ new Map();
|
|
@@ -5515,8 +5516,8 @@ var import_meta = {};
|
|
|
5515
5516
|
var cached2 = null;
|
|
5516
5517
|
function getCliVersion() {
|
|
5517
5518
|
if (cached2 != null) return cached2;
|
|
5518
|
-
if (typeof
|
|
5519
|
-
cached2 =
|
|
5519
|
+
if (typeof __PEACH_CLI_VERSION__ !== "undefined" && typeof __PEACH_CLI_VERSION__ === "string" && __PEACH_CLI_VERSION__) {
|
|
5520
|
+
cached2 = __PEACH_CLI_VERSION__;
|
|
5520
5521
|
return cached2;
|
|
5521
5522
|
}
|
|
5522
5523
|
const candidates = [
|
|
@@ -5974,7 +5975,7 @@ function findMonorepoRoot() {
|
|
|
5974
5975
|
return null;
|
|
5975
5976
|
}
|
|
5976
5977
|
function resolveDevCheckoutRuntimeRoot() {
|
|
5977
|
-
if (process.env.
|
|
5978
|
+
if (process.env.PEACH_HOME && readActiveRuntime()) return null;
|
|
5978
5979
|
const root = findMonorepoRoot();
|
|
5979
5980
|
if (!root) return null;
|
|
5980
5981
|
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
@@ -6028,7 +6029,7 @@ init_public_brand();
|
|
|
6028
6029
|
var DEFAULT_RUNTIME_CDN_ORIGIN = "https://contrast.dev";
|
|
6029
6030
|
var RNX_CHANGELOG_URL = `${rnxPublicBrand.origin}/changelog`;
|
|
6030
6031
|
var RNX_RUNTIME_PRODUCT = {
|
|
6031
|
-
id: "
|
|
6032
|
+
id: "peach",
|
|
6032
6033
|
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
6033
6034
|
manifestPath: "/runtimes/manifest.json",
|
|
6034
6035
|
tarballPath: (version) => `/runtimes/sootsim-runtime-${version}.tar.gz`,
|
|
@@ -6037,8 +6038,8 @@ var RNX_RUNTIME_PRODUCT = {
|
|
|
6037
6038
|
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
6038
6039
|
installedMarker: "index.html",
|
|
6039
6040
|
env: {
|
|
6040
|
-
cdnOrigin: "
|
|
6041
|
-
channel: "
|
|
6041
|
+
cdnOrigin: "PEACH_CDN_ORIGIN",
|
|
6042
|
+
channel: "PEACH_RUNTIME_CHANNEL"
|
|
6042
6043
|
},
|
|
6043
6044
|
ensureHome: ensureRnxHome,
|
|
6044
6045
|
configFile: configFilePath,
|
|
@@ -6442,8 +6443,8 @@ function pidIsAlive(pid, sessionId) {
|
|
|
6442
6443
|
return true;
|
|
6443
6444
|
}
|
|
6444
6445
|
function resolveSootsimInvocation() {
|
|
6445
|
-
if (process.env.
|
|
6446
|
-
return { executable: process.env.
|
|
6446
|
+
if (process.env.PEACH_BIN) {
|
|
6447
|
+
return { executable: process.env.PEACH_BIN, prefixArgs: [] };
|
|
6447
6448
|
}
|
|
6448
6449
|
if (IS_STANDALONE) return rnxSelfInvocation();
|
|
6449
6450
|
if (process.versions.electron) {
|
|
@@ -6465,14 +6466,14 @@ function resolveSootsimInvocation() {
|
|
|
6465
6466
|
return { executable: process.argv[0], prefixArgs: [argv1] };
|
|
6466
6467
|
}
|
|
6467
6468
|
throw new Error(
|
|
6468
|
-
"
|
|
6469
|
+
"peach CLI not found. set PEACH_BIN to the path of the peach binary, or build the workspace CLI via `bun run --cwd packages/peachsim build:cli`."
|
|
6469
6470
|
);
|
|
6470
6471
|
}
|
|
6471
6472
|
function tryWorkspaceSootsim() {
|
|
6472
6473
|
try {
|
|
6473
6474
|
const sootsimDir = resolveSootsimPackageDir();
|
|
6474
6475
|
if (!sootsimDir) return null;
|
|
6475
|
-
const binaryName = `
|
|
6476
|
+
const binaryName = `peach-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
6476
6477
|
const distBinary = import_node_path9.default.join(sootsimDir, "dist-bin", binaryName);
|
|
6477
6478
|
if (import_node_fs9.default.existsSync(distBinary)) return { executable: distBinary, prefixArgs: [] };
|
|
6478
6479
|
const distBin = import_node_path9.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
@@ -6484,7 +6485,7 @@ function tryWorkspaceSootsim() {
|
|
|
6484
6485
|
const buildMtime = import_node_fs9.default.statSync(distBin).mtimeMs;
|
|
6485
6486
|
if (buildMtime < srcMtime) {
|
|
6486
6487
|
console.warn(
|
|
6487
|
-
`[
|
|
6488
|
+
`[peach] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with \`bun run --cwd packages/peachsim build:cli\`.`
|
|
6488
6489
|
);
|
|
6489
6490
|
}
|
|
6490
6491
|
}
|
|
@@ -6636,7 +6637,7 @@ async function startSession(opts) {
|
|
|
6636
6637
|
if (existingLive) {
|
|
6637
6638
|
throw new AgentSessionError(
|
|
6638
6639
|
"ALREADY_RUNNING",
|
|
6639
|
-
`session already running for project=${project.id} provider=${provider} (session ${existingLive.id}, pid ${existingLive.wrapperPid}). end it first with \`
|
|
6640
|
+
`session already running for project=${project.id} provider=${provider} (session ${existingLive.id}, pid ${existingLive.wrapperPid}). end it first with \`peach agent end <sessionId>\`.`
|
|
6640
6641
|
);
|
|
6641
6642
|
}
|
|
6642
6643
|
const claudeSessionUuid = provider === "claude" ? (0, import_node_crypto4.randomUUID)() : void 0;
|
|
@@ -6927,7 +6928,7 @@ var AgentHost = class {
|
|
|
6927
6928
|
// every session.
|
|
6928
6929
|
sessionsBySocket = /* @__PURE__ */ new Map();
|
|
6929
6930
|
// every connected socket (regardless of role) — gets session-status
|
|
6930
|
-
// pushes so a CLI `
|
|
6931
|
+
// pushes so a CLI `peach agent sessions --watch` can react to state
|
|
6931
6932
|
// changes driven by another client.
|
|
6932
6933
|
allSockets = /* @__PURE__ */ new Set();
|
|
6933
6934
|
// agent wrappers also emit prompt-received from the FIFO reader, but the
|
|
@@ -8163,7 +8164,7 @@ var PlaneHost = class {
|
|
|
8163
8164
|
const root = this.realRoot(String(msg.root ?? ""));
|
|
8164
8165
|
if (!this.registered.has(root)) {
|
|
8165
8166
|
throw new PlaneNotRegisteredError(
|
|
8166
|
-
`no box has registered ${root}; start one with \`
|
|
8167
|
+
`no box has registered ${root}; start one with \`peach box\` there`
|
|
8167
8168
|
);
|
|
8168
8169
|
}
|
|
8169
8170
|
const existingId = this.byRoot.get(root);
|
|
@@ -8373,7 +8374,7 @@ function unsupportedSpecifier(specifier) {
|
|
|
8373
8374
|
);
|
|
8374
8375
|
}
|
|
8375
8376
|
function bridgeDeclaration(name2, specifier) {
|
|
8376
|
-
const notReady = (what) => JSON.stringify(`[
|
|
8377
|
+
const notReady = (what) => JSON.stringify(`[peach] replacement ${what} bridge is not ready`);
|
|
8377
8378
|
if (specifier === "react") {
|
|
8378
8379
|
return `const ${name2} = ${REACT_BRIDGE}; if (!${name2}) throw new Error(${notReady("React")});`;
|
|
8379
8380
|
}
|
|
@@ -8381,12 +8382,12 @@ function bridgeDeclaration(name2, specifier) {
|
|
|
8381
8382
|
return `const ${name2} = ${REACT_NATIVE_BRIDGE}; if (!${name2}) throw new Error(${notReady("React Native")});`;
|
|
8382
8383
|
}
|
|
8383
8384
|
if (isContrastKitSpecifier(specifier)) {
|
|
8384
|
-
return `const ${name2} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[
|
|
8385
|
+
return `const ${name2} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[peach] replacement package bridge ${specifier} is not ready`)});`;
|
|
8385
8386
|
}
|
|
8386
8387
|
if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
|
|
8387
8388
|
return `const ${name2} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
|
|
8388
8389
|
}
|
|
8389
|
-
return `const ${name2} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[
|
|
8390
|
+
return `const ${name2} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[peach] replacement package bridge ${specifier} is not ready`)});`;
|
|
8390
8391
|
}
|
|
8391
8392
|
var DEFAULT_INTEROP = "__rnxReplacementDefault";
|
|
8392
8393
|
var DEFAULT_INTEROP_DECLARATION = `const ${DEFAULT_INTEROP} = (bridge) => (bridge && bridge.__esModule ? bridge.default : bridge);`;
|
|
@@ -8547,7 +8548,7 @@ function sendJavaScript(req, res, source) {
|
|
|
8547
8548
|
function isReplacementModuleRequestUrl(rawUrl) {
|
|
8548
8549
|
if (!rawUrl) return false;
|
|
8549
8550
|
try {
|
|
8550
|
-
const pathname = new URL(rawUrl, "http://
|
|
8551
|
+
const pathname = new URL(rawUrl, "http://peach.local").pathname;
|
|
8551
8552
|
return pathname === REPLACEMENT_MODULE_ROUTE;
|
|
8552
8553
|
} catch {
|
|
8553
8554
|
return false;
|
|
@@ -8557,7 +8558,7 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
8557
8558
|
const rawUrl = req.url || "";
|
|
8558
8559
|
let url;
|
|
8559
8560
|
try {
|
|
8560
|
-
url = new URL(rawUrl, "http://
|
|
8561
|
+
url = new URL(rawUrl, "http://peach.local");
|
|
8561
8562
|
} catch {
|
|
8562
8563
|
return false;
|
|
8563
8564
|
}
|
|
@@ -9017,8 +9018,8 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9017
9018
|
static USER_BOOT_LEASE_TTL_MS = 6e4;
|
|
9018
9019
|
static SIM_RECONNECT_TTL_MS = 3e4;
|
|
9019
9020
|
// abandoned-tab GC. the ws heartbeat only reaps sims whose socket went
|
|
9020
|
-
// dead — but a background tab from a prior `
|
|
9021
|
-
// keeps its socket alive (the page still pongs) forever, so `
|
|
9021
|
+
// dead — but a background tab from a prior `peach open` / QA / test run
|
|
9022
|
+
// keeps its socket alive (the page still pongs) forever, so `peach list`
|
|
9022
9023
|
// accretes dozens of zombie sims that all time out on every command (QA
|
|
9023
9024
|
// F21-3, carried F19-2). reap a sim only when it is provably nobody's:
|
|
9024
9025
|
// not primary, not user-focused, no CLI attached, no active lease, and no
|
|
@@ -9026,7 +9027,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9026
9027
|
// terminal 4001 code, so the client closes the abandoned window instead
|
|
9027
9028
|
// of reconnecting the zombie straight back in.
|
|
9028
9029
|
static SIM_IDLE_REAP_TTL_MS = 30 * 6e4;
|
|
9029
|
-
// automation sims (spawned by the playwright driver: `
|
|
9030
|
+
// automation sims (spawned by the playwright driver: `peach open --driver
|
|
9030
9031
|
// playwright`, the factory/screenshot capture path — `meta.sootsimHostDriver
|
|
9031
9032
|
// === 'playwright'`) are unattended one-shot browsers, never a human's tab. a
|
|
9032
9033
|
// capture run opens one per slide/app/retry and the 30-min human/dev TTL lets
|
|
@@ -9056,7 +9057,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9056
9057
|
// dropped, sim crashed) leave their server-side WebSocket sitting "open"
|
|
9057
9058
|
// forever. ping every WS_HEARTBEAT_INTERVAL_MS; if the previous round's
|
|
9058
9059
|
// ping was never answered, terminate(). that fires 'close' which runs the
|
|
9059
|
-
// sim-cleanup path and stops `
|
|
9060
|
+
// sim-cleanup path and stops `peach list` from showing 8 zombie
|
|
9060
9061
|
// sims that all time out on every command.
|
|
9061
9062
|
wsHeartbeatTimer = null;
|
|
9062
9063
|
wsIsAlive = /* @__PURE__ */ new WeakMap();
|
|
@@ -9405,7 +9406,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9405
9406
|
expiresAt: Date.now() + _SootSimBridgeHost.USER_BOOT_LEASE_TTL_MS
|
|
9406
9407
|
};
|
|
9407
9408
|
process.stderr.write(
|
|
9408
|
-
`
|
|
9409
|
+
`peach booted ${booted.length} cli client(s)${hadLease ? " (overrode prior lease)" : ""}; held sim for user [${sim.id}]
|
|
9409
9410
|
`
|
|
9410
9411
|
);
|
|
9411
9412
|
this.recordSimAction(sim.id, "sim booted cli clients");
|
|
@@ -9520,7 +9521,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9520
9521
|
ws.send(
|
|
9521
9522
|
JSON.stringify({
|
|
9522
9523
|
id: msg.id,
|
|
9523
|
-
error: `sim ${targetSim.id} is locked by another cli \u2014 use \`
|
|
9524
|
+
error: `sim ${targetSim.id} is locked by another cli \u2014 use \`peach claim ${targetSim.id} --force\` or \`peach open --new\``,
|
|
9524
9525
|
_locked: outcome.lock
|
|
9525
9526
|
})
|
|
9526
9527
|
);
|
|
@@ -9633,7 +9634,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9633
9634
|
const claimed = claimDaemonLockfile(this.buildLockfileSnapshot());
|
|
9634
9635
|
if (!claimed) {
|
|
9635
9636
|
throw new Error(
|
|
9636
|
-
"another
|
|
9637
|
+
"another peach daemon wrote the lockfile during startup \u2014 aborting"
|
|
9637
9638
|
);
|
|
9638
9639
|
}
|
|
9639
9640
|
} catch (err) {
|
|
@@ -9751,7 +9752,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9751
9752
|
return results;
|
|
9752
9753
|
}).catch((err) => {
|
|
9753
9754
|
const message = err instanceof Error ? err.message : String(err);
|
|
9754
|
-
console.error("[
|
|
9755
|
+
console.error("[peach] /__server-scan failed:", message);
|
|
9755
9756
|
return this.scanCache ?? [];
|
|
9756
9757
|
}).finally(() => {
|
|
9757
9758
|
this.inflightScan = null;
|
|
@@ -9759,7 +9760,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9759
9760
|
return this.inflightScan;
|
|
9760
9761
|
}
|
|
9761
9762
|
// serves one staged camera fixture. addressed by basename inside
|
|
9762
|
-
// ~/.
|
|
9763
|
+
// ~/.peach/camera-fixtures, never by a caller-supplied path, so there is
|
|
9763
9764
|
// no traversal surface to defend: a name that is not a plain basename is
|
|
9764
9765
|
// rejected outright. range support is not optional here — chrome asks for
|
|
9765
9766
|
// byte ranges on media and cannot seek or loop a fixture without it.
|
|
@@ -9874,7 +9875,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9874
9875
|
if (this.httpServer) this.writeLockfileSnapshot();
|
|
9875
9876
|
return;
|
|
9876
9877
|
}
|
|
9877
|
-
if (process.env.
|
|
9878
|
+
if (process.env.PEACH_HOME && isSootsimDevCheckout() && !readActiveRuntime()) {
|
|
9878
9879
|
return;
|
|
9879
9880
|
}
|
|
9880
9881
|
void this.runRuntimeUpdate("startup");
|
|
@@ -9889,7 +9890,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9889
9890
|
this.runtimeUpdateInFlight = (async () => {
|
|
9890
9891
|
try {
|
|
9891
9892
|
if (reason === "startup") {
|
|
9892
|
-
process.stderr.write("
|
|
9893
|
+
process.stderr.write("peach: checking for runtime updates\u2026\n");
|
|
9893
9894
|
}
|
|
9894
9895
|
const result = await rnxRuntime.updateToLatest({
|
|
9895
9896
|
protectVersions: this.connectedRuntimeVersions()
|
|
@@ -9897,7 +9898,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9897
9898
|
if (!result.updated || !result.latestVersion) {
|
|
9898
9899
|
if (reason === "startup") {
|
|
9899
9900
|
process.stderr.write(
|
|
9900
|
-
`
|
|
9901
|
+
`peach: runtime ${this.activeRuntimeVersion ?? "(none)"} is current
|
|
9901
9902
|
`
|
|
9902
9903
|
);
|
|
9903
9904
|
}
|
|
@@ -9905,7 +9906,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9905
9906
|
}
|
|
9906
9907
|
const previousVersion = this.activeRuntimeVersion;
|
|
9907
9908
|
const active = this.setActiveRuntime(result.latestVersion);
|
|
9908
|
-
process.stderr.write(`
|
|
9909
|
+
process.stderr.write(`peach runtime updated to ${active.version} (${reason})
|
|
9909
9910
|
`);
|
|
9910
9911
|
try {
|
|
9911
9912
|
writeRuntimeUpgradeNotice({
|
|
@@ -9917,7 +9918,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9917
9918
|
}
|
|
9918
9919
|
} catch (err) {
|
|
9919
9920
|
process.stderr.write(
|
|
9920
|
-
`
|
|
9921
|
+
`peach runtime update failed (${reason}): ${err instanceof Error ? err.message : String(err)}
|
|
9921
9922
|
`
|
|
9922
9923
|
);
|
|
9923
9924
|
} finally {
|
|
@@ -9930,7 +9931,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
9930
9931
|
} catch {
|
|
9931
9932
|
}
|
|
9932
9933
|
}
|
|
9933
|
-
process.stderr.write("
|
|
9934
|
+
process.stderr.write("peach: ready\n");
|
|
9934
9935
|
}
|
|
9935
9936
|
}
|
|
9936
9937
|
})();
|
|
@@ -10184,7 +10185,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
10184
10185
|
if (!baseDir) {
|
|
10185
10186
|
res.writeHead(503, { "Content-Type": "text/plain; charset=utf-8" });
|
|
10186
10187
|
res.end(
|
|
10187
|
-
versionedRuntimeRequest ? `
|
|
10188
|
+
versionedRuntimeRequest ? `peach: runtime ${requestedRuntime ?? "(invalid version origin)"} is not installed. run \`peach open\` from that app again.` : "peach: no active runtime installed. run `peach runtime install` to fetch one."
|
|
10188
10189
|
);
|
|
10189
10190
|
return;
|
|
10190
10191
|
}
|
|
@@ -10337,7 +10338,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
10337
10338
|
this.sweepRestorableSims(now);
|
|
10338
10339
|
this.reapIdleSims(now);
|
|
10339
10340
|
}
|
|
10340
|
-
// GC abandoned sims so `
|
|
10341
|
+
// GC abandoned sims so `peach list` stays usable across long dev / QA /
|
|
10341
10342
|
// test sessions (F21-3). conservative on purpose: a sim is only reaped
|
|
10342
10343
|
// when every "someone cares about this" signal is absent.
|
|
10343
10344
|
//
|
|
@@ -10353,7 +10354,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
10353
10354
|
// using is the primary and/or holds a fresh user-active lease; one that is
|
|
10354
10355
|
// none of those and idle past the TTL is abandoned regardless of a stale
|
|
10355
10356
|
// focus flag.
|
|
10356
|
-
// automation sims are spawned by the playwright driver (`
|
|
10357
|
+
// automation sims are spawned by the playwright driver (`peach open
|
|
10357
10358
|
// --driver playwright`, the factory/screenshot capture path), which tags them
|
|
10358
10359
|
// with `meta.sootsimHostDriver === 'playwright'` via the host's addInitScript.
|
|
10359
10360
|
// they are unattended one-shot browsers, never a human's tab, so they get a
|
|
@@ -10756,7 +10757,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
|
|
|
10756
10757
|
const candidates = this.getDefaultSimCandidates();
|
|
10757
10758
|
if (candidates.length > 1) {
|
|
10758
10759
|
throw new Error(
|
|
10759
|
-
`multiple sims are connected: ${candidates.map((sim) => sim.id).join(", ")}; run \`
|
|
10760
|
+
`multiple sims are connected: ${candidates.map((sim) => sim.id).join(", ")}; run \`peach use <sim>\` or pass \`--sim <sim>\``
|
|
10760
10761
|
);
|
|
10761
10762
|
}
|
|
10762
10763
|
const candidate = candidates[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.573 | (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.
|
|
1
|
+
/*! rnx v0.1.573 | (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.
|
|
1
|
+
/*! rnx v0.1.573 | (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.
|
|
1
|
+
/*! rnx v0.1.573 | (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;
|
|
@@ -175,7 +175,7 @@ function unsupportedSpecifier(specifier) {
|
|
|
175
175
|
);
|
|
176
176
|
}
|
|
177
177
|
function bridgeDeclaration(name, specifier) {
|
|
178
|
-
const notReady = (what) => JSON.stringify(`[
|
|
178
|
+
const notReady = (what) => JSON.stringify(`[peach] replacement ${what} bridge is not ready`);
|
|
179
179
|
if (specifier === "react") {
|
|
180
180
|
return `const ${name} = ${REACT_BRIDGE}; if (!${name}) throw new Error(${notReady("React")});`;
|
|
181
181
|
}
|
|
@@ -183,12 +183,12 @@ function bridgeDeclaration(name, specifier) {
|
|
|
183
183
|
return `const ${name} = ${REACT_NATIVE_BRIDGE}; if (!${name}) throw new Error(${notReady("React Native")});`;
|
|
184
184
|
}
|
|
185
185
|
if (isContrastKitSpecifier(specifier)) {
|
|
186
|
-
return `const ${name} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[
|
|
186
|
+
return `const ${name} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[peach] replacement package bridge ${specifier} is not ready`)});`;
|
|
187
187
|
}
|
|
188
188
|
if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
|
|
189
189
|
return `const ${name} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
|
|
190
190
|
}
|
|
191
|
-
return `const ${name} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[
|
|
191
|
+
return `const ${name} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[peach] replacement package bridge ${specifier} is not ready`)});`;
|
|
192
192
|
}
|
|
193
193
|
var DEFAULT_INTEROP = "__rnxReplacementDefault";
|
|
194
194
|
var DEFAULT_INTEROP_DECLARATION = `const ${DEFAULT_INTEROP} = (bridge) => (bridge && bridge.__esModule ? bridge.default : bridge);`;
|
|
@@ -357,7 +357,7 @@ function sendJavaScript(req, res, source) {
|
|
|
357
357
|
function isReplacementModuleRequestUrl(rawUrl) {
|
|
358
358
|
if (!rawUrl) return false;
|
|
359
359
|
try {
|
|
360
|
-
const pathname = new URL(rawUrl, "http://
|
|
360
|
+
const pathname = new URL(rawUrl, "http://peach.local").pathname;
|
|
361
361
|
return pathname === REPLACEMENT_MODULE_ROUTE;
|
|
362
362
|
} catch {
|
|
363
363
|
return false;
|
|
@@ -367,7 +367,7 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
367
367
|
const rawUrl = req.url || "";
|
|
368
368
|
let url;
|
|
369
369
|
try {
|
|
370
|
-
url = new URL(rawUrl, "http://
|
|
370
|
+
url = new URL(rawUrl, "http://peach.local");
|
|
371
371
|
} catch {
|
|
372
372
|
return false;
|
|
373
373
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.573 | (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;
|