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 __defProp = Object.defineProperty;
|
|
@@ -34,7 +34,7 @@ function agentSessionIdFromCliIdentity(identity) {
|
|
|
34
34
|
if (colon < 0) return identity.trim() || null;
|
|
35
35
|
const source = identity.slice(0, colon);
|
|
36
36
|
const value = identity.slice(colon + 1).trim();
|
|
37
|
-
return source === "
|
|
37
|
+
return source === "PEACH_CLI_IDENTITY" && value ? value : null;
|
|
38
38
|
}
|
|
39
39
|
function teamMachineSessionIdFromCliIdentity(identity) {
|
|
40
40
|
if (!identity?.startsWith("TM_SESSION:")) return null;
|
|
@@ -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;
|
|
@@ -58,11 +58,11 @@ var import_node_path = require("node:path");
|
|
|
58
58
|
var import_node_url = require("node:url");
|
|
59
59
|
|
|
60
60
|
// src/public-brand.ts
|
|
61
|
-
var name = "
|
|
61
|
+
var name = "Peach";
|
|
62
62
|
var rnxPublicBrand = Object.freeze({
|
|
63
63
|
name,
|
|
64
64
|
packageName: "peachsim",
|
|
65
|
-
commandName: "
|
|
65
|
+
commandName: "peach",
|
|
66
66
|
domain: "rnxsim.com",
|
|
67
67
|
origin: "https://rnxsim.com"
|
|
68
68
|
});
|
|
@@ -146,11 +146,11 @@ var import_node_path3 = __toESM(require("node:path"), 1);
|
|
|
146
146
|
// src/home-paths.ts
|
|
147
147
|
var import_node_os = require("node:os");
|
|
148
148
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
149
|
-
var
|
|
149
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
150
150
|
function rnxHomeDir() {
|
|
151
|
-
const override = process.env[
|
|
151
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
152
152
|
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
153
|
-
return import_node_path2.default.join((0, import_node_os.homedir)(), ".
|
|
153
|
+
return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
|
|
154
154
|
}
|
|
155
155
|
function electronDir() {
|
|
156
156
|
return import_node_path2.default.join(rnxHomeDir(), "electron");
|
|
@@ -348,8 +348,8 @@ function pidIsAlive(pid, sessionId) {
|
|
|
348
348
|
return true;
|
|
349
349
|
}
|
|
350
350
|
function resolveSootsimInvocation() {
|
|
351
|
-
if (process.env.
|
|
352
|
-
return { executable: process.env.
|
|
351
|
+
if (process.env.PEACH_BIN) {
|
|
352
|
+
return { executable: process.env.PEACH_BIN, prefixArgs: [] };
|
|
353
353
|
}
|
|
354
354
|
if (IS_STANDALONE) return rnxSelfInvocation();
|
|
355
355
|
if (process.versions.electron) {
|
|
@@ -371,14 +371,14 @@ function resolveSootsimInvocation() {
|
|
|
371
371
|
return { executable: process.argv[0], prefixArgs: [argv1] };
|
|
372
372
|
}
|
|
373
373
|
throw new Error(
|
|
374
|
-
"
|
|
374
|
+
"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`."
|
|
375
375
|
);
|
|
376
376
|
}
|
|
377
377
|
function tryWorkspaceSootsim() {
|
|
378
378
|
try {
|
|
379
379
|
const sootsimDir = resolveSootsimPackageDir();
|
|
380
380
|
if (!sootsimDir) return null;
|
|
381
|
-
const binaryName = `
|
|
381
|
+
const binaryName = `peach-${process.platform === "win32" ? "windows" : process.platform}-${process.arch}${process.platform === "win32" ? ".exe" : ""}`;
|
|
382
382
|
const distBinary = import_node_path4.default.join(sootsimDir, "dist-bin", binaryName);
|
|
383
383
|
if (import_node_fs3.default.existsSync(distBinary)) return { executable: distBinary, prefixArgs: [] };
|
|
384
384
|
const distBin = import_node_path4.default.join(sootsimDir, "dist-cli", "bin.js");
|
|
@@ -390,7 +390,7 @@ function tryWorkspaceSootsim() {
|
|
|
390
390
|
const buildMtime = import_node_fs3.default.statSync(distBin).mtimeMs;
|
|
391
391
|
if (buildMtime < srcMtime) {
|
|
392
392
|
console.warn(
|
|
393
|
-
`[
|
|
393
|
+
`[peach] dist-cli/bin.js is older than agent-wrapper.ts \u2014 rebuild with \`bun run --cwd packages/peachsim build:cli\`.`
|
|
394
394
|
);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
@@ -542,7 +542,7 @@ async function startSession(opts) {
|
|
|
542
542
|
if (existingLive) {
|
|
543
543
|
throw new AgentSessionError(
|
|
544
544
|
"ALREADY_RUNNING",
|
|
545
|
-
`session already running for project=${project.id} provider=${provider} (session ${existingLive.id}, pid ${existingLive.wrapperPid}). end it first with \`
|
|
545
|
+
`session already running for project=${project.id} provider=${provider} (session ${existingLive.id}, pid ${existingLive.wrapperPid}). end it first with \`peach agent end <sessionId>\`.`
|
|
546
546
|
);
|
|
547
547
|
}
|
|
548
548
|
const claudeSessionUuid = provider === "claude" ? (0, import_node_crypto2.randomUUID)() : void 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;
|
|
@@ -132,11 +132,11 @@ var import_node_path3 = __toESM(require("node:path"), 1);
|
|
|
132
132
|
// src/home-paths.ts
|
|
133
133
|
var import_node_os = require("node:os");
|
|
134
134
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
135
|
-
var
|
|
135
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
136
136
|
function rnxHomeDir() {
|
|
137
|
-
const override = process.env[
|
|
137
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
138
138
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
139
|
-
return import_node_path.default.join((0, import_node_os.homedir)(), ".
|
|
139
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
|
|
140
140
|
}
|
|
141
141
|
function electronDir() {
|
|
142
142
|
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
@@ -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;
|
|
@@ -46,11 +46,11 @@ var import_node_path2 = require("node:path");
|
|
|
46
46
|
// src/home-paths.ts
|
|
47
47
|
var import_node_os = require("node:os");
|
|
48
48
|
var import_node_path = __toESM(require("node:path"), 1);
|
|
49
|
-
var
|
|
49
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
50
50
|
function rnxHomeDir() {
|
|
51
|
-
const override = process.env[
|
|
51
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
52
52
|
if (override && override.length > 0) return import_node_path.default.resolve(override);
|
|
53
|
-
return import_node_path.default.join((0, import_node_os.homedir)(), ".
|
|
53
|
+
return import_node_path.default.join((0, import_node_os.homedir)(), ".peach");
|
|
54
54
|
}
|
|
55
55
|
function electronDir() {
|
|
56
56
|
return import_node_path.default.join(rnxHomeDir(), "electron");
|
|
@@ -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;
|
package/dist-lib/beta.cjs
CHANGED
|
@@ -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;
|
package/dist-lib/beta.mjs
CHANGED
|
@@ -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;
|
|
@@ -118,16 +118,16 @@ function resolveSootsimBridgePortForRuntimeLocation(input = {}) {
|
|
|
118
118
|
function resolveSootsimWebSocketProxyUrl(input) {
|
|
119
119
|
const pageUrl = parseHrefUrl(input.href);
|
|
120
120
|
if (!pageUrl || pageUrl.protocol !== "http:" && pageUrl.protocol !== "https:") {
|
|
121
|
-
throw new Error(`invalid
|
|
121
|
+
throw new Error(`invalid peach websocket proxy page URL: ${input.href}`);
|
|
122
122
|
}
|
|
123
123
|
let targetUrl;
|
|
124
124
|
try {
|
|
125
125
|
targetUrl = new URL(input.targetUrl);
|
|
126
126
|
} catch {
|
|
127
|
-
throw new Error(`invalid
|
|
127
|
+
throw new Error(`invalid peach websocket proxy target URL: ${input.targetUrl}`);
|
|
128
128
|
}
|
|
129
129
|
if (targetUrl.protocol !== "ws:" && targetUrl.protocol !== "wss:") {
|
|
130
|
-
throw new Error(`invalid
|
|
130
|
+
throw new Error(`invalid peach websocket proxy target URL: ${input.targetUrl}`);
|
|
131
131
|
}
|
|
132
132
|
const proxyUrl = new URL("/__websocket-proxy", pageUrl);
|
|
133
133
|
proxyUrl.protocol = pageUrl.protocol === "https:" ? "wss:" : "ws:";
|
|
@@ -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
|
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;
|
|
@@ -105,7 +105,7 @@ var SIM_LONG_PRESS_MAX_MS = 5e3;
|
|
|
105
105
|
var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
106
106
|
var SEMANTIC_READY_NODE_STABLE_MS = 750;
|
|
107
107
|
var SEMANTIC_READY_POLL_MS = 150;
|
|
108
|
-
var PUBLIC_NO_NETWORK_MARKER = "public
|
|
108
|
+
var PUBLIC_NO_NETWORK_MARKER = "public Peach Cloud simulators have no network";
|
|
109
109
|
var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
|
|
110
110
|
function readyProbeHasContent(probe) {
|
|
111
111
|
return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
@@ -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/bridge-contract.ts
|
|
4
4
|
var REFUSED_PERFORM_STEP_TYPES = [
|
|
@@ -70,7 +70,7 @@ var SIM_LONG_PRESS_MAX_MS = 5e3;
|
|
|
70
70
|
var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
71
71
|
var SEMANTIC_READY_NODE_STABLE_MS = 750;
|
|
72
72
|
var SEMANTIC_READY_POLL_MS = 150;
|
|
73
|
-
var PUBLIC_NO_NETWORK_MARKER = "public
|
|
73
|
+
var PUBLIC_NO_NETWORK_MARKER = "public Peach Cloud simulators have no network";
|
|
74
74
|
var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
|
|
75
75
|
function readyProbeHasContent(probe) {
|
|
76
76
|
return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
@@ -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
|
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
|
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
|
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/cloud.cjs
CHANGED
|
@@ -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;
|
|
@@ -170,11 +170,11 @@ function rnxCloudScopesAllowCommand(scopes, type) {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
// src/public-brand.ts
|
|
173
|
-
var name = "
|
|
173
|
+
var name = "Peach";
|
|
174
174
|
var rnxPublicBrand = Object.freeze({
|
|
175
175
|
name,
|
|
176
176
|
packageName: "peachsim",
|
|
177
|
-
commandName: "
|
|
177
|
+
commandName: "peach",
|
|
178
178
|
domain: "rnxsim.com",
|
|
179
179
|
origin: "https://rnxsim.com"
|
|
180
180
|
});
|
|
@@ -192,18 +192,18 @@ function normalizeCloudOrigin(source) {
|
|
|
192
192
|
try {
|
|
193
193
|
parsed = new URL(source);
|
|
194
194
|
} catch {
|
|
195
|
-
throw new Error(`invalid
|
|
195
|
+
throw new Error(`invalid Peach Cloud origin: ${source}`);
|
|
196
196
|
}
|
|
197
197
|
if (parsed.protocol !== "https:" && parsed.protocol !== "http:" || parsed.username || parsed.password || parsed.pathname !== "/" || parsed.search || parsed.hash) {
|
|
198
|
-
throw new Error(`
|
|
198
|
+
throw new Error(`Peach Cloud origin must be an HTTP(S) origin: ${source}`);
|
|
199
199
|
}
|
|
200
200
|
if (parsed.protocol === "http:" && !isLoopbackHost(parsed.hostname)) {
|
|
201
|
-
throw new Error(`
|
|
201
|
+
throw new Error(`Peach Cloud origin requires HTTPS outside loopback: ${source}`);
|
|
202
202
|
}
|
|
203
203
|
return parsed.origin;
|
|
204
204
|
}
|
|
205
205
|
function resolveOrigin(value) {
|
|
206
|
-
const configured = value?.trim() || process.env.
|
|
206
|
+
const configured = value?.trim() || process.env.PEACH_CLOUD_ORIGIN?.trim();
|
|
207
207
|
return normalizeCloudOrigin(configured || rnxPublicBrand.origin);
|
|
208
208
|
}
|
|
209
209
|
function responseError(status, text) {
|
|
@@ -212,13 +212,13 @@ function responseError(status, text) {
|
|
|
212
212
|
const parsed = JSON.parse(text);
|
|
213
213
|
const error = isRecord(parsed) ? parsed.error : null;
|
|
214
214
|
if (isRecord(error) && typeof error.message === "string") {
|
|
215
|
-
return new Error(`
|
|
215
|
+
return new Error(`Peach Cloud request failed (${status}): ${error.message}`);
|
|
216
216
|
}
|
|
217
217
|
} catch {
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
return new Error(
|
|
221
|
-
`
|
|
221
|
+
`Peach Cloud request failed (${status})${text.trim() ? `: ${text.trim()}` : ""}`
|
|
222
222
|
);
|
|
223
223
|
}
|
|
224
224
|
function readCloudErrorCode(text) {
|
|
@@ -294,16 +294,16 @@ function readJsArtifact(bytes) {
|
|
|
294
294
|
try {
|
|
295
295
|
source = new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
296
296
|
} catch {
|
|
297
|
-
throw new Error("
|
|
297
|
+
throw new Error("peach Cloud artifact must be valid UTF-8 JavaScript, not bytecode");
|
|
298
298
|
}
|
|
299
299
|
if (source.includes("\0") || !source.includes("__d(") || !source.includes("__r(")) {
|
|
300
|
-
throw new Error("
|
|
300
|
+
throw new Error("peach Cloud artifact must be a Metro JavaScript bundle");
|
|
301
301
|
}
|
|
302
302
|
return source;
|
|
303
303
|
}
|
|
304
304
|
function readClaim(value) {
|
|
305
305
|
if (!isRecord(value) || typeof value.id !== "string" || !value.id || typeof value.expiresAt !== "number") {
|
|
306
|
-
throw new Error("
|
|
306
|
+
throw new Error("Peach Cloud returned an invalid claim");
|
|
307
307
|
}
|
|
308
308
|
return { id: value.id, expiresAt: value.expiresAt };
|
|
309
309
|
}
|
|
@@ -312,15 +312,15 @@ function artifactDigestId(sha256) {
|
|
|
312
312
|
}
|
|
313
313
|
function readArtifact(value, expectedId, expectedBytes) {
|
|
314
314
|
if (!isRecord(value) || value.id !== expectedId || typeof value.bytes !== "number" || !Number.isInteger(value.bytes) || value.bytes !== expectedBytes) {
|
|
315
|
-
throw new Error("
|
|
315
|
+
throw new Error("Peach Cloud returned an invalid artifact receipt");
|
|
316
316
|
}
|
|
317
317
|
return { id: expectedId, bytes: expectedBytes };
|
|
318
318
|
}
|
|
319
319
|
function readSimulatorCreate(value, expectedId, expectedBytes) {
|
|
320
|
-
if (!isRecord(value)) throw new Error("
|
|
320
|
+
if (!isRecord(value)) throw new Error("Peach Cloud create returned an invalid simulator");
|
|
321
321
|
const claim = readClaim(value.claim);
|
|
322
322
|
if (typeof value.simId !== "string" || !value.simId || typeof value.token !== "string") {
|
|
323
|
-
throw new Error("
|
|
323
|
+
throw new Error("Peach Cloud create returned an invalid simulator");
|
|
324
324
|
}
|
|
325
325
|
return {
|
|
326
326
|
simId: value.simId,
|
|
@@ -331,10 +331,10 @@ function readSimulatorCreate(value, expectedId, expectedBytes) {
|
|
|
331
331
|
}
|
|
332
332
|
function readBoxCreate(value, expectedBytes, expectedSha256) {
|
|
333
333
|
const artifactId = artifactDigestId(expectedSha256);
|
|
334
|
-
if (!isRecord(value)) throw new Error("
|
|
334
|
+
if (!isRecord(value)) throw new Error("Peach Cloud create returned invalid JSON");
|
|
335
335
|
const simulator = readSimulatorCreate(value.simulator, artifactId, expectedBytes);
|
|
336
336
|
if (typeof value.boxId !== "string" || !value.boxId || value.size !== "nano" || typeof value.token !== "string" || !value.token) {
|
|
337
|
-
throw new Error("
|
|
337
|
+
throw new Error("Peach Cloud create returned an invalid box receipt");
|
|
338
338
|
}
|
|
339
339
|
return {
|
|
340
340
|
receipt: {
|
|
@@ -357,11 +357,11 @@ function cloudCommand(command, scopes) {
|
|
|
357
357
|
if (key !== "id" && key !== "simId") clean[key] = value;
|
|
358
358
|
}
|
|
359
359
|
if (!isRnxCloudCommandType(command.type)) {
|
|
360
|
-
throw new Error(`
|
|
360
|
+
throw new Error(`Peach Cloud does not support bridge command type ${command.type}`);
|
|
361
361
|
}
|
|
362
362
|
if (!rnxCloudScopesAllowCommand(scopes, command.type)) {
|
|
363
363
|
throw new Error(
|
|
364
|
-
`
|
|
364
|
+
`Peach Cloud command ${command.type} requires the ${rnxCloudCommandScope(command.type)} scope`
|
|
365
365
|
);
|
|
366
366
|
}
|
|
367
367
|
return { ...clean, type: command.type };
|
|
@@ -395,23 +395,23 @@ var RemoteSimulator = class {
|
|
|
395
395
|
layers: options?.layers ?? "tenant"
|
|
396
396
|
});
|
|
397
397
|
if (typeof result !== "string" || !result.startsWith("data:image/")) {
|
|
398
|
-
throw new Error("
|
|
398
|
+
throw new Error("Peach Cloud screenshot did not return an image data url");
|
|
399
399
|
}
|
|
400
400
|
return result;
|
|
401
401
|
},
|
|
402
402
|
capture: async () => {
|
|
403
403
|
const result = await this.sendCommand({ type: "capture" });
|
|
404
404
|
if (!isRnxScreenCapture(result)) {
|
|
405
|
-
throw new Error("
|
|
405
|
+
throw new Error("Peach Cloud capture returned an invalid screen capture");
|
|
406
406
|
}
|
|
407
407
|
return result;
|
|
408
408
|
},
|
|
409
409
|
reset: (options) => {
|
|
410
410
|
if (options?.strategy !== void 0 && options.strategy !== "data" && options.strategy !== "full") {
|
|
411
|
-
throw new Error("
|
|
411
|
+
throw new Error("Peach Cloud reset strategy must be data or full");
|
|
412
412
|
}
|
|
413
413
|
if (options?.from !== void 0 && (typeof options.from !== "string" || options.from.length === 0)) {
|
|
414
|
-
throw new Error("
|
|
414
|
+
throw new Error("Peach Cloud reset from must name a simulator");
|
|
415
415
|
}
|
|
416
416
|
return this.sendCommand(
|
|
417
417
|
options === void 0 ? { type: "reset" } : {
|
|
@@ -471,7 +471,7 @@ var RemoteSimulator = class {
|
|
|
471
471
|
);
|
|
472
472
|
} catch (error) {
|
|
473
473
|
throw new Error(
|
|
474
|
-
`could not reach
|
|
474
|
+
`could not reach Peach Cloud at ${this.session.origin}: ${error instanceof Error ? error.message : String(error)}`
|
|
475
475
|
);
|
|
476
476
|
}
|
|
477
477
|
const text = await response.text();
|
|
@@ -480,14 +480,14 @@ var RemoteSimulator = class {
|
|
|
480
480
|
try {
|
|
481
481
|
parsed = JSON.parse(text);
|
|
482
482
|
} catch {
|
|
483
|
-
throw new Error("
|
|
483
|
+
throw new Error("Peach Cloud command returned unreadable JSON");
|
|
484
484
|
}
|
|
485
485
|
if (!isRecord(parsed) || parsed.id !== body.id) {
|
|
486
|
-
throw new Error("
|
|
486
|
+
throw new Error("Peach Cloud command returned an invalid command receipt");
|
|
487
487
|
}
|
|
488
488
|
if (typeof parsed.error === "string" && parsed.error) throw new Error(parsed.error);
|
|
489
489
|
if (!Object.hasOwn(parsed, "result")) {
|
|
490
|
-
throw new Error("
|
|
490
|
+
throw new Error("Peach Cloud command receipt has no result");
|
|
491
491
|
}
|
|
492
492
|
return parsed.result;
|
|
493
493
|
}
|
|
@@ -513,11 +513,11 @@ var RemoteSimulator = class {
|
|
|
513
513
|
try {
|
|
514
514
|
parsed = JSON.parse(text);
|
|
515
515
|
} catch {
|
|
516
|
-
throw new Error("
|
|
516
|
+
throw new Error("Peach Cloud claim returned unreadable JSON");
|
|
517
517
|
}
|
|
518
518
|
const claim = readClaim(isRecord(parsed) ? parsed.claim : null);
|
|
519
519
|
if (claim.id !== claimId) {
|
|
520
|
-
throw new Error("
|
|
520
|
+
throw new Error("Peach Cloud confirmation replaced the initial claim");
|
|
521
521
|
}
|
|
522
522
|
this.session = { ...this.session, claim };
|
|
523
523
|
return claim;
|
|
@@ -543,17 +543,17 @@ var RemoteSimulator = class {
|
|
|
543
543
|
async function createRemoteSimulator(input) {
|
|
544
544
|
if (input.artifact.byteLength > RNX_CLOUD_MAX_ARTIFACT_BYTES) {
|
|
545
545
|
throw new Error(
|
|
546
|
-
`
|
|
546
|
+
`peach Cloud artifact is ${input.artifact.byteLength} bytes and exceeds the ${RNX_CLOUD_MAX_ARTIFACT_BYTES}-byte limit`
|
|
547
547
|
);
|
|
548
548
|
}
|
|
549
549
|
if (input.artifact.byteLength <= 0) {
|
|
550
|
-
throw new Error("
|
|
550
|
+
throw new Error("peach Cloud artifact is empty");
|
|
551
551
|
}
|
|
552
552
|
readJsArtifact(input.artifact);
|
|
553
553
|
const origin = resolveOrigin(input.origin);
|
|
554
554
|
const sha256 = await sha256Hex(input.artifact);
|
|
555
555
|
if (input.sha256 && input.sha256 !== sha256) {
|
|
556
|
-
throw new Error("
|
|
556
|
+
throw new Error("peach Cloud artifact sha256 does not match the provided digest");
|
|
557
557
|
}
|
|
558
558
|
const device = input.device?.trim() || DEFAULT_DEVICE;
|
|
559
559
|
let response;
|
|
@@ -572,7 +572,7 @@ async function createRemoteSimulator(input) {
|
|
|
572
572
|
});
|
|
573
573
|
} catch (error) {
|
|
574
574
|
throw new Error(
|
|
575
|
-
`could not reach
|
|
575
|
+
`could not reach Peach Cloud at ${origin}: ${error instanceof Error ? error.message : String(error)}`
|
|
576
576
|
);
|
|
577
577
|
}
|
|
578
578
|
const responseText = await response.text();
|
|
@@ -581,7 +581,7 @@ async function createRemoteSimulator(input) {
|
|
|
581
581
|
try {
|
|
582
582
|
parsed = JSON.parse(responseText);
|
|
583
583
|
} catch {
|
|
584
|
-
throw new Error("
|
|
584
|
+
throw new Error("Peach Cloud create returned unreadable JSON");
|
|
585
585
|
}
|
|
586
586
|
const created = readBoxCreate(parsed, input.artifact.byteLength, sha256);
|
|
587
587
|
const simulator = new RemoteSimulator({
|
|
@@ -599,7 +599,7 @@ async function createRemoteSimulator(input) {
|
|
|
599
599
|
}
|
|
600
600
|
function readSimArtifact(value) {
|
|
601
601
|
if (!isRecord(value) || typeof value.sha256 !== "string" || !/^[a-f0-9]{64}$/.test(value.sha256) || typeof value.bytes !== "number" || !Number.isInteger(value.bytes) || value.bytes <= 0) {
|
|
602
|
-
throw new Error("
|
|
602
|
+
throw new Error("Peach Cloud returned an invalid simulator artifact");
|
|
603
603
|
}
|
|
604
604
|
return { id: `sha256:${value.sha256}`, bytes: value.bytes };
|
|
605
605
|
}
|
|
@@ -612,13 +612,13 @@ function readConnectScopes(value, token) {
|
|
|
612
612
|
if (!isRecord(value) || typeof value.id !== "string" || !value.id || !Array.isArray(value.scopes) || value.scopes.length === 0 || !value.scopes.every(
|
|
613
613
|
(scope) => typeof scope === "string" && isRnxCloudCommandScope(scope)
|
|
614
614
|
) || typeof value.expiresAt !== "number") {
|
|
615
|
-
throw new Error("
|
|
615
|
+
throw new Error("Peach Cloud returned an invalid scoped token");
|
|
616
616
|
}
|
|
617
617
|
return Object.freeze([...value.scopes]);
|
|
618
618
|
}
|
|
619
619
|
async function connect(input) {
|
|
620
|
-
if (!input.id) throw new Error("
|
|
621
|
-
if (!input.token) throw new Error("
|
|
620
|
+
if (!input.id) throw new Error("Peach Cloud connect needs a simulator id");
|
|
621
|
+
if (!input.token) throw new Error("Peach Cloud connect needs a token");
|
|
622
622
|
const origin = resolveOrigin(input.origin);
|
|
623
623
|
let response;
|
|
624
624
|
try {
|
|
@@ -628,7 +628,7 @@ async function connect(input) {
|
|
|
628
628
|
);
|
|
629
629
|
} catch (error) {
|
|
630
630
|
throw new Error(
|
|
631
|
-
`could not reach
|
|
631
|
+
`could not reach Peach Cloud at ${origin}: ${error instanceof Error ? error.message : String(error)}`
|
|
632
632
|
);
|
|
633
633
|
}
|
|
634
634
|
const text = await response.text();
|
|
@@ -637,14 +637,14 @@ async function connect(input) {
|
|
|
637
637
|
try {
|
|
638
638
|
parsed = JSON.parse(text);
|
|
639
639
|
} catch {
|
|
640
|
-
throw new Error("
|
|
640
|
+
throw new Error("Peach Cloud connect returned unreadable JSON");
|
|
641
641
|
}
|
|
642
642
|
if (!isRecord(parsed) || !isRecord(parsed.sim)) {
|
|
643
|
-
throw new Error("
|
|
643
|
+
throw new Error("Peach Cloud connect returned an invalid simulator");
|
|
644
644
|
}
|
|
645
645
|
const sim = parsed.sim;
|
|
646
646
|
if (typeof sim.simId !== "string" || !sim.simId) {
|
|
647
|
-
throw new Error("
|
|
647
|
+
throw new Error("Peach Cloud connect returned an invalid simulator");
|
|
648
648
|
}
|
|
649
649
|
return new RemoteSimulator({
|
|
650
650
|
origin,
|