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;
|
|
@@ -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/swift.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 __create = Object.create;
|
package/dist-lib/vite.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 __create = Object.create;
|
|
@@ -57,20 +57,20 @@ function resolveRnxDesktopAppName(open, projectRoot) {
|
|
|
57
57
|
if (!open) return null;
|
|
58
58
|
if (typeof open === "object") {
|
|
59
59
|
const appName = open.appName.trim();
|
|
60
|
-
if (!appName) throw new Error("
|
|
60
|
+
if (!appName) throw new Error("peach: open.appName must not be empty");
|
|
61
61
|
return appName;
|
|
62
62
|
}
|
|
63
63
|
const packageJsonPath = import_node_path.default.join(projectRoot, "package.json");
|
|
64
64
|
const packageJson = JSON.parse(import_node_fs.default.readFileSync(packageJsonPath, "utf8"));
|
|
65
65
|
const packageName = packageJson && typeof packageJson === "object" ? Reflect.get(packageJson, "name") : void 0;
|
|
66
66
|
if (typeof packageName !== "string" || !packageName.trim()) {
|
|
67
|
-
throw new Error(`
|
|
67
|
+
throw new Error(`peach: ${packageJsonPath} must declare a package name`);
|
|
68
68
|
}
|
|
69
69
|
return packageName.trim();
|
|
70
70
|
}
|
|
71
71
|
function tagRnxBundleForPlugin(bundleUrl, replacementOrigin, replacementToken, projectRoot, appName) {
|
|
72
72
|
const absolute = /^[a-z][a-z\d+.-]*:\/\//i.test(bundleUrl);
|
|
73
|
-
const url = new URL(bundleUrl, absolute ? void 0 : "http://
|
|
73
|
+
const url = new URL(bundleUrl, absolute ? void 0 : "http://peach.local");
|
|
74
74
|
if (appName) {
|
|
75
75
|
url.searchParams.set("rnxAppName", appName);
|
|
76
76
|
url.searchParams.set(
|
|
@@ -97,22 +97,22 @@ function observeRnxDesktopLaunch(child, appName) {
|
|
|
97
97
|
});
|
|
98
98
|
child.once("error", (error) => {
|
|
99
99
|
spawnFailed = true;
|
|
100
|
-
console.error(`[
|
|
100
|
+
console.error(`[peach] could not open ${appName}: ${error.message}`);
|
|
101
101
|
});
|
|
102
102
|
child.once("close", (code, signal) => {
|
|
103
103
|
if (spawnFailed) return;
|
|
104
104
|
if (code === 0) {
|
|
105
|
-
console.log(`[
|
|
105
|
+
console.log(`[peach] opened ${appName} in the desktop simulator`);
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
108
|
const detail = stderr.trim() || (signal ? `signal ${signal}` : `exit ${code}`);
|
|
109
|
-
console.error(`[
|
|
109
|
+
console.error(`[peach] could not open ${appName}: ${detail}`);
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
function launchRnxDesktop(bundleUrl, appName) {
|
|
113
113
|
const packageRoot = import_node_path.default.resolve(import_node_path.default.dirname((0, import_node_url.fileURLToPath)(__sootsim_import_meta_url)), "..");
|
|
114
114
|
const binPath = import_node_path.default.join(packageRoot, "dist-cli", "bin.js");
|
|
115
|
-
console.log(`[
|
|
115
|
+
console.log(`[peach] opening ${appName} in the desktop simulator`);
|
|
116
116
|
const child = (0, import_node_child_process.spawn)(
|
|
117
117
|
process.execPath,
|
|
118
118
|
[binPath, ...buildRnxDesktopOpenArgs(bundleUrl)],
|
|
@@ -128,14 +128,14 @@ function launchRnxDesktop(bundleUrl, appName) {
|
|
|
128
128
|
var import_node_fs2 = __toESM(require("node:fs"), 1);
|
|
129
129
|
var import_node_os = require("node:os");
|
|
130
130
|
var import_node_path2 = __toESM(require("node:path"), 1);
|
|
131
|
-
var
|
|
131
|
+
var PEACH_HOME_ENV = "PEACH_HOME";
|
|
132
132
|
var ACTIVE_RUNTIME_FILE = "active";
|
|
133
133
|
var DAEMON_LOCKFILE = "daemon.json";
|
|
134
134
|
var DAEMON_HEARTBEAT_STALE_MS = 3e4;
|
|
135
135
|
function rnxHomeDir() {
|
|
136
|
-
const override = process.env[
|
|
136
|
+
const override = process.env[PEACH_HOME_ENV];
|
|
137
137
|
if (override && override.length > 0) return import_node_path2.default.resolve(override);
|
|
138
|
-
return import_node_path2.default.join((0, import_node_os.homedir)(), ".
|
|
138
|
+
return import_node_path2.default.join((0, import_node_os.homedir)(), ".peach");
|
|
139
139
|
}
|
|
140
140
|
function runtimesDir() {
|
|
141
141
|
return import_node_path2.default.join(rnxHomeDir(), "runtimes");
|
|
@@ -327,7 +327,7 @@ function unsupportedSpecifier(specifier) {
|
|
|
327
327
|
);
|
|
328
328
|
}
|
|
329
329
|
function bridgeDeclaration(name, specifier) {
|
|
330
|
-
const notReady = (what) => JSON.stringify(`[
|
|
330
|
+
const notReady = (what) => JSON.stringify(`[peach] replacement ${what} bridge is not ready`);
|
|
331
331
|
if (specifier === "react") {
|
|
332
332
|
return `const ${name} = ${REACT_BRIDGE}; if (!${name}) throw new Error(${notReady("React")});`;
|
|
333
333
|
}
|
|
@@ -335,12 +335,12 @@ function bridgeDeclaration(name, specifier) {
|
|
|
335
335
|
return `const ${name} = ${REACT_NATIVE_BRIDGE}; if (!${name}) throw new Error(${notReady("React Native")});`;
|
|
336
336
|
}
|
|
337
337
|
if (isContrastKitSpecifier(specifier)) {
|
|
338
|
-
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(`[
|
|
338
|
+
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`)});`;
|
|
339
339
|
}
|
|
340
340
|
if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
|
|
341
341
|
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 }; })();`;
|
|
342
342
|
}
|
|
343
|
-
return `const ${name} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[
|
|
343
|
+
return `const ${name} = (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[peach] replacement package bridge ${specifier} is not ready`)});`;
|
|
344
344
|
}
|
|
345
345
|
var DEFAULT_INTEROP = "__rnxReplacementDefault";
|
|
346
346
|
var DEFAULT_INTEROP_DECLARATION = `const ${DEFAULT_INTEROP} = (bridge) => (bridge && bridge.__esModule ? bridge.default : bridge);`;
|
|
@@ -510,7 +510,7 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
|
|
|
510
510
|
const rawUrl = req.url || "";
|
|
511
511
|
let url;
|
|
512
512
|
try {
|
|
513
|
-
url = new URL(rawUrl, "http://
|
|
513
|
+
url = new URL(rawUrl, "http://peach.local");
|
|
514
514
|
} catch {
|
|
515
515
|
return false;
|
|
516
516
|
}
|
|
@@ -616,7 +616,7 @@ function isValidRuntimeVersion(value) {
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
// src/runtime-assets.ts
|
|
619
|
-
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[
|
|
619
|
+
var SOOTSIM_RUNTIME_MISSING_MESSAGE = "[peach] no engine runtime installed. run `peach runtime install`";
|
|
620
620
|
var _monorepoRootCache;
|
|
621
621
|
function findMonorepoRoot() {
|
|
622
622
|
if (_monorepoRootCache !== void 0) return _monorepoRootCache;
|
|
@@ -632,7 +632,7 @@ function findMonorepoRoot() {
|
|
|
632
632
|
return null;
|
|
633
633
|
}
|
|
634
634
|
function resolveDevCheckoutRuntimeRoot() {
|
|
635
|
-
if (process.env.
|
|
635
|
+
if (process.env.PEACH_HOME && readActiveRuntime()) return null;
|
|
636
636
|
const root = findMonorepoRoot();
|
|
637
637
|
if (!root) return null;
|
|
638
638
|
const devBuild = import_path.default.join(root, "public/sootsim");
|
|
@@ -1174,9 +1174,9 @@ function compileSwiftProjectUnit(input, options) {
|
|
|
1174
1174
|
}
|
|
1175
1175
|
|
|
1176
1176
|
// src/vite-plugin-swift.ts
|
|
1177
|
-
var ARTIFACT_PATH = "/
|
|
1178
|
-
var RESOURCE_PATH = "/
|
|
1179
|
-
var VIRTUAL_PREFIX = "\
|
|
1177
|
+
var ARTIFACT_PATH = "/__peach/swift/";
|
|
1178
|
+
var RESOURCE_PATH = "/__peach/swift-res/";
|
|
1179
|
+
var VIRTUAL_PREFIX = "\0peach-swift:";
|
|
1180
1180
|
var projects = /* @__PURE__ */ new Map();
|
|
1181
1181
|
var devServer;
|
|
1182
1182
|
function projectFor(packagePath) {
|
|
@@ -1636,7 +1636,7 @@ async function compileSwiftProject(submit, work, origin) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
1638
|
// src/rolldown-plugin-swift.ts
|
|
1639
|
-
var VIRTUAL_PREFIX2 = "\
|
|
1639
|
+
var VIRTUAL_PREFIX2 = "\0peach-swift-remote:";
|
|
1640
1640
|
var projects2 = /* @__PURE__ */ new Map();
|
|
1641
1641
|
function projectFor2(packagePath) {
|
|
1642
1642
|
const existing = projects2.get(packagePath);
|
|
@@ -1726,7 +1726,7 @@ function swiftRemotePlugin(options) {
|
|
|
1726
1726
|
);
|
|
1727
1727
|
}
|
|
1728
1728
|
return {
|
|
1729
|
-
name: "
|
|
1729
|
+
name: "peach-swift-remote",
|
|
1730
1730
|
enforce: "pre",
|
|
1731
1731
|
async resolveId(source, importer) {
|
|
1732
1732
|
if (source.startsWith(VIRTUAL_PREFIX2)) return source;
|
|
@@ -1900,8 +1900,8 @@ function rnxPlugin(options = {}) {
|
|
|
1900
1900
|
});
|
|
1901
1901
|
const port = configuredPort;
|
|
1902
1902
|
const sootsimUrl = `http://localhost:${port}${prefix}/`;
|
|
1903
|
-
console.log(`[
|
|
1904
|
-
if (appName && !process.env.CI && !process.env.
|
|
1903
|
+
console.log(`[peach] serving at ${sootsimUrl}`);
|
|
1904
|
+
if (appName && !process.env.CI && !process.env.PEACH_NO_OPEN) {
|
|
1905
1905
|
server.httpServer?.once("listening", () => {
|
|
1906
1906
|
const openPort = listeningPort();
|
|
1907
1907
|
launchRnxDesktop(
|
package/package.json
CHANGED
|
@@ -122,7 +122,7 @@ export interface DiscoveredServer {
|
|
|
122
122
|
* COULD NOT LOOK MUST NEVER ANSWER AS THOUGH IT LOOKED. silence, timeout and
|
|
123
123
|
* empty are three different answers, and only `no-manifest` means "there is
|
|
124
124
|
* nothing there". reading `no-answer` as `no-manifest` is what made
|
|
125
|
-
* `
|
|
125
|
+
* `peach open` hand back `<base>/index.bundle` for a One app whose manifest
|
|
126
126
|
* names a different entry point entirely. */
|
|
127
127
|
type ManifestState = 'resolved' | 'no-manifest' | 'no-answer'
|
|
128
128
|
|
|
@@ -871,7 +871,7 @@ export async function probePort(
|
|
|
871
871
|
buildIconProxyUrl?: (externalUrl: string) => string,
|
|
872
872
|
listeningProcess?: ListeningProcess,
|
|
873
873
|
): Promise<DiscoveredServer | null> {
|
|
874
|
-
// callers such as `
|
|
874
|
+
// callers such as `peach open <port>` probe one port directly instead of
|
|
875
875
|
// going through scanDevServers. wait for the optional in-repo registry here
|
|
876
876
|
// too, or a cold CLI process can build the known app's bundle url before its
|
|
877
877
|
// runtime config is available.
|
|
@@ -1110,6 +1110,7 @@ export interface ScanOptions {
|
|
|
1110
1110
|
function isSootSimSelfServer(server: DiscoveredServer): boolean {
|
|
1111
1111
|
const bundleId = server.bundleId?.trim().toLowerCase()
|
|
1112
1112
|
if (bundleId?.startsWith('dev.sootsim.')) return true
|
|
1113
|
+
if (bundleId?.startsWith('dev.peachsim.')) return true
|
|
1113
1114
|
|
|
1114
1115
|
return false
|
|
1115
1116
|
}
|
|
@@ -1175,7 +1176,7 @@ export function __shouldReuseScannerCacheEntry(
|
|
|
1175
1176
|
return true
|
|
1176
1177
|
}
|
|
1177
1178
|
|
|
1178
|
-
// exported for tests / `
|
|
1179
|
+
// exported for tests / `peach debug` — forces the next scan to re-probe.
|
|
1179
1180
|
export function __resetScannerCache() {
|
|
1180
1181
|
portCache.clear()
|
|
1181
1182
|
knownNonPatched.clear()
|
package/skills/contrast/SKILL.md
CHANGED
|
@@ -14,68 +14,68 @@ overview of all available skills and CLI commands in this repo.
|
|
|
14
14
|
|
|
15
15
|
## Peach CLI commands
|
|
16
16
|
|
|
17
|
-
the `
|
|
17
|
+
the `peach` CLI is the operational surface for booting shells, driving
|
|
18
18
|
automation, inspecting the render tree, and managing sims.
|
|
19
19
|
|
|
20
20
|
| command | description |
|
|
21
21
|
| --- | --- |
|
|
22
|
-
| `
|
|
23
|
-
| `
|
|
24
|
-
| `
|
|
25
|
-
| `
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
22
|
+
| `peach maestro` | author, generate, and run Maestro YAML flows against peach |
|
|
23
|
+
| `peach detox` | run existing Detox suites against peach on headless Chromium |
|
|
24
|
+
| `peach cleanup` | inspect and reclaim local peach disk usage |
|
|
25
|
+
| `peach record` | capture the live sim as webm/mp4/gif, or sample N png frames (--frames) |
|
|
26
|
+
| `peach film` | record a flow on the flat canvas, play it back on the 3d device stage under a camera cinematic, save a clip |
|
|
27
|
+
| `peach storage` | manage guest app storage and launch profiles |
|
|
28
|
+
| `peach permissions` | inspect and change simulated operating-system permissions |
|
|
29
|
+
| `peach perf` | CPU, React render, shell frame, and scroll-layer profiling |
|
|
30
|
+
| `peach describe` | curated human-readable UI summary (default inspection tool) |
|
|
31
|
+
| `peach find` | locate nodes by text / testID / role / type / predicate |
|
|
32
|
+
| `peach assert` | run any read verb and convert its output into an exit code |
|
|
33
|
+
| `peach screenshot` | capture PNGs and manage App Store screenshot assets |
|
|
34
|
+
| `peach get` | read runtime state (tree, a11y, layout, url, count, errors, …) |
|
|
35
|
+
| `peach do` | drive the app (tap, type, scroll, swipe, key, reload, …) |
|
|
36
|
+
| `peach wait` | block until the runtime reaches a known state |
|
|
37
|
+
| `peach shell` | drive shell state and simulator chrome |
|
|
38
|
+
| `peach mode` | toggle screenshot and 3D display modes |
|
|
39
|
+
| `peach device` | inspect or change the live device preset for a sim |
|
|
40
|
+
| `peach network` | inspect live network traffic from the running peach worker |
|
|
41
|
+
| `peach logs` | inspect live console output from the running peach worker |
|
|
42
|
+
| `peach debug` | drive __sootsimDebug: channels, snapshots, and inspectors |
|
|
43
|
+
| `peach what-happened` | show recent semantic events: toasts, keyboards, screens, alerts, fetches, errors |
|
|
44
|
+
| `peach timeline` | control the semantic event timeline (enable opt-in kinds, clear, dump) |
|
|
45
|
+
| `peach box` | start a local Box or create a cloud Box |
|
|
46
|
+
| `peach ios` | start an iOS simulator |
|
|
47
|
+
| `peach android` | start an Android simulator |
|
|
48
|
+
| `peach open` | load a target into the current sim or open a new one |
|
|
49
|
+
| `peach list` | list connected sims or available launch drivers |
|
|
50
|
+
| `peach use` | select a connected sim |
|
|
51
|
+
| `peach skill` | install and inspect bundled peach agent skills |
|
|
52
|
+
| `peach claim` | take an exclusive lease on a sim |
|
|
53
|
+
| `peach agent` | attached projects + local agent sessions (codex/claude) |
|
|
54
|
+
| `peach close` | close a connected sim |
|
|
55
|
+
| `peach setup` | configure optional local conveniences |
|
|
56
|
+
| `peach compat` | check package compatibility |
|
|
57
|
+
| `peach report-issue` | send an explicitly approved compatibility report |
|
|
58
|
+
| `peach desktop` | launch or install the desktop companion |
|
|
59
|
+
| `peach daemon` | manage the recommended background bridge service |
|
|
60
|
+
| `peach version` | show the CLI + engine runtime versions you are running |
|
|
61
|
+
| `peach upgrade` | update the peach CLI and engine runtime to the latest |
|
|
62
|
+
| `peach serve` | run the peach bridge in the foreground |
|
|
63
|
+
| `peach runtime` | manage engine runtimes under ~/.peach/runtimes/ |
|
|
64
|
+
| `peach auth` | inspect active CLI auth |
|
|
65
|
+
| `peach login` | sign in for preview uploads |
|
|
66
|
+
| `peach logout` | clear the local desktop auth session |
|
|
67
|
+
| `peach config` | manage local CLI preferences |
|
|
68
68
|
|
|
69
69
|
### runtime verb groups
|
|
70
70
|
|
|
71
71
|
every runtime verb is organized under one of these grouping prefixes.
|
|
72
|
-
run `
|
|
72
|
+
run `peach --help` to see the full list under each group.
|
|
73
73
|
|
|
74
|
-
- `
|
|
75
|
-
- `
|
|
76
|
-
- `
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
74
|
+
- `peach describe` — summarize the current UI
|
|
75
|
+
- `peach find <...>` — unified finder (bare text, --testid, --role, --type, --pressable, --visible)
|
|
76
|
+
- `peach get <noun>` — read runtime state (tree, a11y, url, count, errors, warnings, requests, globals, layout, node)
|
|
77
|
+
- `peach do <action>` — drive the app (tap, tap-text, tap-id, type, type-into, key, dismiss, scroll, drag, swipe, pinch, reload, shell, sleep, settle, wait)
|
|
78
|
+
- `peach debug <tool>` — instrumentation (state, js, eval, perf, sample-color, enable/disable channels, snapshots, diff, record, recent)
|
|
79
79
|
|
|
80
80
|
### global flags
|
|
81
81
|
|
|
@@ -93,11 +93,11 @@ skills for working with the Peach native preview engine:
|
|
|
93
93
|
|
|
94
94
|
| skill | description |
|
|
95
95
|
| --- | --- |
|
|
96
|
-
| `/
|
|
97
|
-
| `/
|
|
98
|
-
| `/
|
|
99
|
-
| `/
|
|
100
|
-
| `/
|
|
96
|
+
| `/peach-debug` | Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app running under Peach. Reach for this whenever an animation looks wrong (janky, stutters, snaps, only updates once, or doesn't move at all), a swipe/transition/gesture misbehaves or feels broken, scrolling drops frames or feels slow, the UI renders the wrong tree/props, or a screen reader can't reach something — and drive the peach CLI debug tooling first, not screenshots or ad-hoc logging. |
|
|
97
|
+
| `/peach-perf` | Optimize Peach engine and app performance — scroll jank, dropped frames, slow animation, idle CPU, memory growth, and "smooth normally but laggy under load" (video calls, busy machines). Covers measuring on the right thread with the right browser, proving each perf tier actually engages via its counters, a CPU-contention test harness, and the map of existing perf machinery so you improve it instead of reinventing it. For general app debugging load /peach-debug first. |
|
|
98
|
+
| `/peach-setup` | Get Peach connected to your React Native app with no project setup |
|
|
99
|
+
| `/peach-test` | Run automated tests against your React Native app under Peach with Maestro YAML or Detox/Jest |
|
|
100
|
+
| `/peach-visual` | Pixel-level rendering comparison between Peach and native iOS — fonts, gradients, shadows, image fidelity |
|
|
101
101
|
|
|
102
102
|
## automatic settling
|
|
103
103
|
|
|
@@ -115,18 +115,18 @@ commands in your own `sleep` or chain `do settle` "just to be safe"**.
|
|
|
115
115
|
`type-into`, `key`, `key-sequence`, `keycode`, `drag`, `swipe`,
|
|
116
116
|
`long-press`, `touch`, `gesture`, `pinch`, `scroll`, `shell`)
|
|
117
117
|
the CLI polls the layout hash until it is stable for two consecutive
|
|
118
|
-
frames. budget: **400 ms for agents** (`
|
|
118
|
+
frames. budget: **400 ms for agents** (`PEACH_AGENT=1`, set by the
|
|
119
119
|
harness), 200 ms for humans.
|
|
120
120
|
|
|
121
121
|
what this means:
|
|
122
122
|
|
|
123
|
-
- `
|
|
124
|
-
- you only need `
|
|
123
|
+
- `peach do tap-id login` then `peach find "Welcome"` Just Works™.
|
|
124
|
+
- you only need `peach do settle <seconds>` or `peach wait idle
|
|
125
125
|
--max-ms <N>` when the CLI explicitly prints
|
|
126
126
|
`⚠ auto-wait timed out after Nms — next command may see mid-animation
|
|
127
127
|
state`, or when the transition you care about lasts longer than ~400 ms
|
|
128
128
|
(full stack navigation, crossfades, video load).
|
|
129
|
-
- opt-out: `--no-wait` on a single command, `
|
|
129
|
+
- opt-out: `--no-wait` on a single command, `PEACH_NO_AUTO_WAIT=1`
|
|
130
130
|
for a whole lane.
|
|
131
131
|
- if a read keeps racing its write, the fix is **never** a blind `sleep` —
|
|
132
132
|
prefer `wait selector`, `wait ready`, `wait idle`, or a longer
|
|
@@ -139,27 +139,27 @@ what this means:
|
|
|
139
139
|
|
|
140
140
|
```sh
|
|
141
141
|
bun dev # start everything
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
peach dev -- pnpm dev # wrap a bundler
|
|
143
|
+
peach open 8081 # load an app
|
|
144
|
+
peach describe # inspect the UI tree
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
### debugging
|
|
148
148
|
|
|
149
149
|
```sh
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
150
|
+
peach get errors 5 # recent console errors
|
|
151
|
+
peach get requests 5 # recent failed requests
|
|
152
|
+
peach debug snapshot before # capture state
|
|
153
|
+
peach debug diff before after # compare snapshots
|
|
154
|
+
peach debug state shell # runtime state dump
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
### inspection
|
|
158
158
|
|
|
159
159
|
```sh
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
peach describe # visible elements
|
|
161
|
+
peach find "Sign in" # find by text
|
|
162
|
+
peach find --testid loginButton # find by testID
|
|
163
|
+
peach do tap-text "Submit" # tap by text
|
|
164
|
+
peach do type "hello" # type text
|
|
165
165
|
```
|