peachsim 0.1.570 → 0.1.572
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 +108 -108
- 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 +28 -20
- 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 +3 -2
- package/cli/cloud-session.ts +12 -12
- package/cli/cloud-test-result-files.ts +97 -0
- 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 +173 -71
- 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 +176 -18
- 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 +4 -2
- package/cli/main.ts +14 -14
- package/cli/outbound-endpoints.ts +32 -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 +3 -2
- 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/jest-preset.cjs +2 -2
- 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 +116 -0
- package/dist-lib/cloud-test-args.mjs +86 -0
- 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/detox/jest-preset.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +12 -12
- package/dist-lib/host/bridge-host.cjs +87 -77
- 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 +63 -73
- 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 +534 -520
- package/dist-lib/swift-compile.cjs +372 -0
- package/dist-lib/swift-compile.mjs +339 -0
- package/dist-lib/swift-package.cjs +78 -0
- package/dist-lib/swift-package.mjs +52 -0
- 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 +479 -161
- package/package.json +22 -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 +47 -47
- 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-test-args.ts +100 -0
- 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 +11 -10
- 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/swift-compile.ts +359 -0
- package/src/swift-package.ts +69 -0
- package/src/swift-submit.ts +3 -2
- package/src/vite-plugin-one.ts +8 -8
- package/src/vite-plugin-swift.ts +106 -110
- package/src/vite-plugin.ts +6 -19
package/src/menu.ts
CHANGED
|
@@ -196,7 +196,7 @@ function appMenu(): SootSimMenuDef {
|
|
|
196
196
|
},
|
|
197
197
|
{ type: 'separator' },
|
|
198
198
|
{
|
|
199
|
-
label:
|
|
199
|
+
label: `Hide ${rnxPublicBrand.name}`,
|
|
200
200
|
accelerator: 'CmdOrCtrl+H',
|
|
201
201
|
action: 'hide',
|
|
202
202
|
hiddenIn: 'browser',
|
|
@@ -210,7 +210,7 @@ function appMenu(): SootSimMenuDef {
|
|
|
210
210
|
{ label: 'Show All', action: 'unhide', hiddenIn: 'browser' },
|
|
211
211
|
{ type: 'separator' },
|
|
212
212
|
{
|
|
213
|
-
label:
|
|
213
|
+
label: `Quit ${rnxPublicBrand.name}`,
|
|
214
214
|
accelerator: 'CmdOrCtrl+Q',
|
|
215
215
|
action: 'quit',
|
|
216
216
|
hiddenIn: 'browser',
|
package/src/metro-plugin.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
// shell assets come from an engine runtime under ~/.
|
|
3
|
-
// by `
|
|
1
|
+
// peach metro plugin for dev shell and bundle module identity annotation.
|
|
2
|
+
// shell assets come from an engine runtime under ~/.peach/runtimes/, fetched
|
|
3
|
+
// by `peach runtime install`. ordinary localhost requests
|
|
4
4
|
// follow active; a version-owned localhost origin stays on its exact directory
|
|
5
5
|
// when active changes, so one loaded shell cannot mix runtime chunk trees.
|
|
6
6
|
//
|
|
@@ -121,7 +121,7 @@ function createMetroDefaultSerializer(projectRoot: string): MetroSerializer {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
// the only thing
|
|
124
|
+
// the only thing peach adds to an ordinary Metro bundle. production needs the
|
|
125
125
|
// footer because Metro drops the fourth `__d` argument when `dev` is false;
|
|
126
126
|
// development keeps that verbose name and receives the same identity without
|
|
127
127
|
// changing resolution, transforms, or the trailing source map.
|
|
@@ -231,7 +231,7 @@ export function withRNX<T extends Record<string, unknown>>(config: T): T {
|
|
|
231
231
|
try {
|
|
232
232
|
connect = require('connect')
|
|
233
233
|
} catch {
|
|
234
|
-
console.warn('[
|
|
234
|
+
console.warn('[peach] connect not available')
|
|
235
235
|
return middleware
|
|
236
236
|
}
|
|
237
237
|
|
|
@@ -313,7 +313,7 @@ export function withRNX<T extends Record<string, unknown>>(config: T): T {
|
|
|
313
313
|
|
|
314
314
|
server.use(middleware)
|
|
315
315
|
|
|
316
|
-
console.log(`[
|
|
316
|
+
console.log(`[peach] serving at ${prefix}/`)
|
|
317
317
|
return server
|
|
318
318
|
},
|
|
319
319
|
}
|
|
@@ -333,7 +333,7 @@ function resolveMetroPort(server: MetroConfigWithServer['server']): number {
|
|
|
333
333
|
inlinePort || splitPort || process.env.RCT_METRO_PORT || server?.port || 8081
|
|
334
334
|
const port = Number(rawPort)
|
|
335
335
|
if (!Number.isInteger(port) || port <= 0) {
|
|
336
|
-
throw new Error(`
|
|
336
|
+
throw new Error(`peach: Metro port must be a positive integer, got ${rawPort}`)
|
|
337
337
|
}
|
|
338
338
|
return port
|
|
339
339
|
}
|
|
@@ -24,7 +24,7 @@ export interface RNXMetroModuleIdentity extends RNXMetroModuleIdentityMetadata {
|
|
|
24
24
|
sourceMappingUrl: string | null
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
// the production bundle
|
|
27
|
+
// the production bundle peach loads is the app's ORDINARY production bundle.
|
|
28
28
|
// nothing about resolution changes, so these are plain Metro production
|
|
29
29
|
// options and the artifact is byte-identical to what the app ships apart
|
|
30
30
|
// from the identity footer the plugin's serializer appends.
|
|
@@ -214,7 +214,7 @@ export function readRNXMetroModuleIdentity(
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
// the exact layout Metro's baseJSBundle emits and the
|
|
217
|
+
// the exact layout Metro's baseJSBundle emits and the peach runtime contract
|
|
218
218
|
// depends on: a prelude, then one `__d(` or `__r(` statement per line, each
|
|
219
219
|
// running until the next statement starts its own line. one reader owns this
|
|
220
220
|
// recognition so the loader's identity validation, the source-map attribution
|
|
@@ -42,7 +42,7 @@ export function alignLoopbackBundleUrlWithProbe(
|
|
|
42
42
|
// unreliably on small CI runners (tens of seconds when metro is warm,
|
|
43
43
|
// minutes cold, sometimes past any wait-ready budget). a minified bundle
|
|
44
44
|
// parses/executes far faster and reboots reliably. gated on
|
|
45
|
-
// SOOTSIM_PREVIEW_PROD_BUNDLE so normal interactive `
|
|
45
|
+
// SOOTSIM_PREVIEW_PROD_BUNDLE so normal interactive `peach open` keeps
|
|
46
46
|
// dev=true. app-agnostic: rewrites whatever metro/launchAsset advertised.
|
|
47
47
|
function applyPreviewProdBundle(parsed: URL): void {
|
|
48
48
|
if (!process.env.SOOTSIM_PREVIEW_PROD_BUNDLE) return
|
|
@@ -95,7 +95,7 @@ export function normalizeNativeDevBundleUrl(bundleUrl: string): string {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
// explicit override used by `
|
|
98
|
+
// explicit override used by `peach open` to flip metro's `hot` query when
|
|
99
99
|
// the caller knows their context: interactive opens want `hot=true` so metro
|
|
100
100
|
// includes its HMR/react-refresh runtime in the bundle prelude and pushes
|
|
101
101
|
// edits as `update` events; `--driver playwright` / agent-test runs want
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (sootsim- -> rnx-) without the recorder following, which silently failed
|
|
6
6
|
// every hosted job with "run completed without hardware WebGL proof" even when
|
|
7
7
|
// the preview itself uploaded fine.
|
|
8
|
-
export const PLAYWRIGHT_HOST_LOG_PREFIX = '
|
|
8
|
+
export const PLAYWRIGHT_HOST_LOG_PREFIX = 'peach-playwright-host-'
|
|
9
9
|
|
|
10
10
|
export function playwrightHostLogName(nowMs: number, pid: number): string {
|
|
11
11
|
return `${PLAYWRIGHT_HOST_LOG_PREFIX}${nowMs.toString(36)}-${pid}.log`
|
package/src/public-brand.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* react-native specifiers whose upstream JavaScript must stay in a guest bundle.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* peach owns the rest of the react-native package through its host-module registry.
|
|
5
5
|
* these modules instead run against globals installed by the simulator, which
|
|
6
6
|
* preserves upstream platform, style, event-emitter, and TurboModule behavior.
|
|
7
7
|
*/
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
// swiftpm package to `/api/swift-compile` and answer every `.swift` import
|
|
3
3
|
// with the module that mounts the published artifact.
|
|
4
4
|
//
|
|
5
|
-
// this is the remote twin of `vite-plugin-swift.ts`. that plugin
|
|
6
|
-
//
|
|
7
|
-
// native engine is its own rolldown instance with no
|
|
8
|
-
// this plugin compiles nothing in-process and serves
|
|
9
|
-
// url the service answers is absolute (compile-cdn), so
|
|
10
|
-
// serve. same compiler, same store, same hash, same
|
|
11
|
-
// browser worker — one path, no second toolchain to install
|
|
5
|
+
// this is the remote twin of `vite-plugin-swift.ts`. that plugin calls the
|
|
6
|
+
// shared project-unit compiler and serves the artifact from dev-server
|
|
7
|
+
// middleware. the native engine is its own rolldown instance with no
|
|
8
|
+
// middleware seam, so this plugin compiles nothing in-process and serves
|
|
9
|
+
// nothing. the artifact url the service answers is absolute (compile-cdn), so
|
|
10
|
+
// there is nothing to serve. same compiler, same store, same hash, same
|
|
11
|
+
// credential as the browser worker — one path, no second toolchain to install
|
|
12
|
+
// for `one dev`.
|
|
12
13
|
//
|
|
13
14
|
// an app registers it through One's native plugin seam, not `config.plugins`
|
|
14
15
|
// (which never reach the native engine):
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
//
|
|
31
32
|
// no babel anywhere in this path: resolveId and load only, emitting an ESM
|
|
32
33
|
// module. offline `one dev` fails loud at the submit, the same as a browser
|
|
33
|
-
// build without a credential; the standalone `
|
|
34
|
+
// build without a credential; the standalone `peach` CLI keeps the local
|
|
34
35
|
// toolchain plugin for that case.
|
|
35
36
|
|
|
36
37
|
import fs from 'node:fs'
|
|
@@ -45,7 +46,7 @@ import { entryRootId } from './vite-plugin-swift'
|
|
|
45
46
|
import type { SwiftModuleAddress } from './swift-submit'
|
|
46
47
|
import type { Plugin } from 'vite'
|
|
47
48
|
|
|
48
|
-
const VIRTUAL_PREFIX = '\
|
|
49
|
+
const VIRTUAL_PREFIX = '\0peach-swift-remote:'
|
|
49
50
|
|
|
50
51
|
export interface SwiftRemotePluginOptions {
|
|
51
52
|
/** origin serving `/api/swift-compile` (the Contrast app). */
|
|
@@ -188,7 +189,7 @@ export function swiftRemotePlugin(options: SwiftRemotePluginOptions): Plugin {
|
|
|
188
189
|
)
|
|
189
190
|
}
|
|
190
191
|
return {
|
|
191
|
-
name: '
|
|
192
|
+
name: 'peach-swift-remote',
|
|
192
193
|
enforce: 'pre',
|
|
193
194
|
|
|
194
195
|
async resolveId(source, importer) {
|
package/src/runtime-assets.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// helpers for serving the installed sootsim engine runtime from framework
|
|
2
|
-
// dev servers. the runtime is managed by `
|
|
3
|
-
// under ~/.
|
|
2
|
+
// dev servers. the runtime is managed by `peach runtime install` and lives
|
|
3
|
+
// under ~/.peach/runtimes/<version>.
|
|
4
4
|
|
|
5
5
|
import fs from 'fs'
|
|
6
6
|
import path from 'path'
|
|
@@ -9,7 +9,7 @@ import { isValidRuntimeVersion } from '@contrast/runtime-delivery'
|
|
|
9
9
|
import { readActiveRuntime, runtimeDir } from './home-paths.ts'
|
|
10
10
|
|
|
11
11
|
export const SOOTSIM_RUNTIME_MISSING_MESSAGE =
|
|
12
|
-
'[
|
|
12
|
+
'[peach] no engine runtime installed. run `peach runtime install`'
|
|
13
13
|
|
|
14
14
|
// --- dev-checkout mode boundary --------------------------------------------
|
|
15
15
|
//
|
|
@@ -20,13 +20,13 @@ export const SOOTSIM_RUNTIME_MISSING_MESSAGE =
|
|
|
20
20
|
// boundary, not a preference or a runtime fallback chain — the check is
|
|
21
21
|
// structural (the monorepo layout is present next to this module) and
|
|
22
22
|
// deterministic (the dev build's files exist). it exists because the daemon and
|
|
23
|
-
// the /__soot plugin otherwise serve ~/.
|
|
23
|
+
// the /__soot plugin otherwise serve ~/.peach/runtimes/<active>, a PUBLISHED
|
|
24
24
|
// runtime that `bun dev` never refreshes, so local engine edits are invisible
|
|
25
25
|
// until a manual publish — the silent trap that cost a full night of
|
|
26
26
|
// already-fixed bugs re-reproducing.
|
|
27
27
|
//
|
|
28
28
|
// the isolated CI headless path (scripts/local-publish-runtime.sh) sets
|
|
29
|
-
//
|
|
29
|
+
// PEACH_HOME to a dedicated dir precisely to validate the published-runtime
|
|
30
30
|
// code path; keying off that EXISTING isolation env keeps it (and packaged
|
|
31
31
|
// electron with a custom home) on the installed runtime.
|
|
32
32
|
let _monorepoRootCache: string | null | undefined
|
|
@@ -52,16 +52,16 @@ function findMonorepoRoot(): string | null {
|
|
|
52
52
|
|
|
53
53
|
/** the fresh dev-stack engine build to serve when running inside the Contrast
|
|
54
54
|
* monorepo dev checkout, or null when the installed runtime should serve
|
|
55
|
-
* (published CLI, packaged electron, or an isolated
|
|
55
|
+
* (published CLI, packaged electron, or an isolated PEACH_HOME). */
|
|
56
56
|
export function resolveDevCheckoutRuntimeRoot(): string | null {
|
|
57
57
|
// an explicit home that has a STAGED/active runtime is the isolation the
|
|
58
58
|
// CI/local-publish path sets up to validate the installed-runtime code path —
|
|
59
59
|
// honor that staged runtime. an explicit home with NO active runtime is just
|
|
60
|
-
// an isolated dev daemon (own lockfile, doesn't clobber ~/.
|
|
61
|
-
// still wants the dev build; and the default home (
|
|
60
|
+
// an isolated dev daemon (own lockfile, doesn't clobber ~/.peach), which
|
|
61
|
+
// still wants the dev build; and the default home (PEACH_HOME unset) always
|
|
62
62
|
// does. keying on "explicit home + a runtime deliberately staged there" keeps
|
|
63
63
|
// it structural, not a bespoke toggle.
|
|
64
|
-
if (process.env.
|
|
64
|
+
if (process.env.PEACH_HOME && readActiveRuntime()) return null
|
|
65
65
|
const root = findMonorepoRoot()
|
|
66
66
|
if (!root) return null
|
|
67
67
|
const devBuild = path.join(root, 'public/sootsim')
|
|
@@ -130,11 +130,11 @@ const RUNTIME_VERSION_HOSTNAME_SUFFIX = '.runtime.localhost'
|
|
|
130
130
|
export function runtimeVersionHostname(version: string): string {
|
|
131
131
|
const trimmed = version.trim()
|
|
132
132
|
if (!isValidRuntimeVersion(trimmed)) {
|
|
133
|
-
throw new Error(`invalid
|
|
133
|
+
throw new Error(`invalid peach runtime version: ${version}`)
|
|
134
134
|
}
|
|
135
135
|
const encoded = Buffer.from(trimmed, 'utf8').toString('hex')
|
|
136
136
|
const labels = encoded.match(/.{1,60}/g)
|
|
137
|
-
if (!labels) throw new Error(`invalid
|
|
137
|
+
if (!labels) throw new Error(`invalid peach runtime version: ${version}`)
|
|
138
138
|
return `${labels.join('.')}${RUNTIME_VERSION_HOSTNAME_SUFFIX}`
|
|
139
139
|
}
|
|
140
140
|
|
package/src/runtime-delivery.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach's binding of the shared runtime-delivery machinery.
|
|
2
2
|
//
|
|
3
3
|
// the machinery itself (hosted manifest, sha256-verified tarballs, channels,
|
|
4
4
|
// channel resolution, and auto-update) lives in @contrast/runtime-delivery and
|
|
5
|
-
// knows nothing about
|
|
5
|
+
// knows nothing about peach. this file supplies peach's identity, public env
|
|
6
6
|
// overrides, and the contrast.dev/runtimes hosting layout.
|
|
7
7
|
//
|
|
8
8
|
// @contrast/runtime-delivery is an internal workspace package that is never
|
|
@@ -25,12 +25,12 @@ import { rnxPublicBrand } from './public-brand.ts'
|
|
|
25
25
|
export const DEFAULT_RUNTIME_CDN_ORIGIN = 'https://contrast.dev'
|
|
26
26
|
|
|
27
27
|
/** the official curated changelog and the machine-readable release feed. the
|
|
28
|
-
*
|
|
28
|
+
* peach site is static, so its /api traffic is owned by contrast.dev. */
|
|
29
29
|
export const RNX_CHANGELOG_URL = `${rnxPublicBrand.origin}/changelog`
|
|
30
30
|
export const RNX_CHANGELOG_API_URL = 'https://contrast.dev/api/changelog/sootsim'
|
|
31
31
|
|
|
32
32
|
export const RNX_RUNTIME_PRODUCT: RuntimeProduct = {
|
|
33
|
-
id: '
|
|
33
|
+
id: 'peach',
|
|
34
34
|
defaultCdnOrigin: DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
35
35
|
manifestPath: '/runtimes/manifest.json',
|
|
36
36
|
tarballPath: (version) => `/runtimes/sootsim-runtime-${version}.tar.gz`,
|
|
@@ -39,8 +39,8 @@ export const RNX_RUNTIME_PRODUCT: RuntimeProduct = {
|
|
|
39
39
|
// vite/metro plugins serve, so its absence means the tarball is not one.
|
|
40
40
|
installedMarker: 'index.html',
|
|
41
41
|
env: {
|
|
42
|
-
cdnOrigin: '
|
|
43
|
-
channel: '
|
|
42
|
+
cdnOrigin: 'PEACH_CDN_ORIGIN',
|
|
43
|
+
channel: 'PEACH_RUNTIME_CHANNEL',
|
|
44
44
|
},
|
|
45
45
|
ensureHome: ensureRnxHome,
|
|
46
46
|
configFile: configFilePath,
|
|
@@ -20,7 +20,7 @@ export interface RunScreenshotsOverrides {
|
|
|
20
20
|
captureOnly?: boolean
|
|
21
21
|
composeOnly?: boolean
|
|
22
22
|
// copy/colors pulled from the team's org deck to overlay onto the plan's
|
|
23
|
-
// compose slides (
|
|
23
|
+
// compose slides (peach screenshot appstore --org … --repo …).
|
|
24
24
|
orgDeckFrames?: OrgDeckFrame[] | null
|
|
25
25
|
}
|
|
26
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// fetch the team's screenshot deck (the copy / colors founders set up in the
|
|
2
2
|
// org dashboard) and overlay it onto a screenshots plan, so the programmatic
|
|
3
|
-
// `
|
|
3
|
+
// `peach screenshot appstore --plan … --org … --repo …` flow renders the org's
|
|
4
4
|
// words + brand gradient instead of the local yaml's. the plan still owns
|
|
5
5
|
// which screen each slide captures and the device frame; the deck owns copy +
|
|
6
6
|
// colors. 3d scenes don't translate to the cli's 2d composer, so only copy and
|
|
@@ -246,7 +246,7 @@ export function loadScreenshotsPlan(planPath: string): NormalizedScreenshotsPlan
|
|
|
246
246
|
const deviceModel = readDeviceModel(root.device, null)
|
|
247
247
|
const captureOutDir = resolvePlanPath(
|
|
248
248
|
planDir,
|
|
249
|
-
readString(capture.out, path.join('.
|
|
249
|
+
readString(capture.out, path.join('.peach', 'screenshots', 'capture')),
|
|
250
250
|
)
|
|
251
251
|
const captureFrom = readOptionalString(capture.from)
|
|
252
252
|
const flowPath = readOptionalString(capture.flow)
|
|
@@ -335,7 +335,7 @@ export function loadScreenshotsPlan(planPath: string): NormalizedScreenshotsPlan
|
|
|
335
335
|
compose: {
|
|
336
336
|
outDir: resolvePlanPath(
|
|
337
337
|
planDir,
|
|
338
|
-
readString(compose.out, path.join('.
|
|
338
|
+
readString(compose.out, path.join('.peach', 'screenshots', 'exports')),
|
|
339
339
|
),
|
|
340
340
|
locale: readString(compose.locale, 'en'),
|
|
341
341
|
canvases: normalizeCanvasList(compose.canvases),
|
package/src/sim-client.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// SimClient — the typed, promise-based client every
|
|
1
|
+
// SimClient — the typed, promise-based client every peach frontend drives a
|
|
2
2
|
// sim through. it wraps a bridge transport (the CLI's ws bridge, or any
|
|
3
3
|
// InspectBridge-shaped channel) and reuses the existing inspect verbs as its
|
|
4
4
|
// implementation; it never re-implements tap resolution, find, settling, or
|
|
@@ -4,14 +4,14 @@ import type { RNXSkill } from '../types'
|
|
|
4
4
|
|
|
5
5
|
export const skill: RNXSkill = {
|
|
6
6
|
name: 'compat-check',
|
|
7
|
-
description: 'Check package compatibility with
|
|
7
|
+
description: 'Check package compatibility with peach',
|
|
8
8
|
type: 'review',
|
|
9
9
|
version: '1.0.0',
|
|
10
10
|
triggers: ['compatibility', 'compat', 'check package', 'supported packages'],
|
|
11
11
|
tools: [
|
|
12
12
|
{
|
|
13
13
|
name: 'check_compatibility',
|
|
14
|
-
description: 'Scan project dependencies for
|
|
14
|
+
description: 'Scan project dependencies for peach compatibility',
|
|
15
15
|
parameters: {
|
|
16
16
|
packageName: {
|
|
17
17
|
type: 'string',
|