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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// transport-agnostic
|
|
1
|
+
// transport-agnostic peach inspect-verb kernels.
|
|
2
2
|
//
|
|
3
3
|
// each function here sends the smallest bridge command its verb needs and
|
|
4
4
|
// returns *structured data* — no arg parsing or stdout. the
|
|
@@ -54,7 +54,7 @@ export function resolveMaxMsFlag(args: string[], fallbackMs: number): number {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// the minimal bridge an inspect kernel needs: a JSON command channel into a
|
|
57
|
-
//
|
|
57
|
+
// peach instance.
|
|
58
58
|
export interface InspectBridge {
|
|
59
59
|
readonly plane?: 'local' | 'cloud'
|
|
60
60
|
send(cmd: WsBridgeCommand, opts?: { timeoutMs?: number }): Promise<any>
|
|
@@ -289,7 +289,7 @@ export async function inspectDescribe(
|
|
|
289
289
|
// fields with `styling:true` / `--styling`.
|
|
290
290
|
//
|
|
291
291
|
// the SAME LayoutElement shape is produced by both preview surfaces:
|
|
292
|
-
// - native/
|
|
292
|
+
// - native/peach — `LAYOUT_GET_NATIVE_EVAL` reads the engine node tree via
|
|
293
293
|
// __sootsimTest.listInspectable() (the source `describe` uses), where each
|
|
294
294
|
// SootSimInspectInfo already carries absolute layout and optional style /
|
|
295
295
|
// box-model data.
|
|
@@ -662,7 +662,7 @@ export function layoutGetNativeEval(opts: LayoutExtractionOptions = {}): string
|
|
|
662
662
|
|
|
663
663
|
const screenshot = window.SootSim && window.SootSim.bridges && window.SootSim.bridges.screenshot
|
|
664
664
|
if (typeof screenshot !== 'function') {
|
|
665
|
-
throw new Error('styled native layout requires the
|
|
665
|
+
throw new Error('styled native layout requires the peach capture bridge')
|
|
666
666
|
}
|
|
667
667
|
const device = list.find((node) => node && node.device)?.device || {}
|
|
668
668
|
const width = Math.round(Number(device.width) || window.innerWidth || 0)
|
|
@@ -707,7 +707,7 @@ export function layoutGetNativeEval(opts: LayoutExtractionOptions = {}): string
|
|
|
707
707
|
export const LAYOUT_GET_NATIVE_EVAL = layoutGetNativeEval()
|
|
708
708
|
|
|
709
709
|
// `get-layout` (native) — bounding boxes for visible meaningful elements on the
|
|
710
|
-
//
|
|
710
|
+
// peach/native preview. transport-agnostic: the CLI runs it over its WS
|
|
711
711
|
// bridge, the agent runs it over its in-process preview bridge.
|
|
712
712
|
export async function inspectGetLayout(
|
|
713
713
|
bridge: InspectBridge,
|
|
@@ -981,16 +981,16 @@ export function scoreInteractive(n: InteractiveNode): number {
|
|
|
981
981
|
return score
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
-
// the copy-paste `
|
|
984
|
+
// the copy-paste `peach do` tap command for an interactive node.
|
|
985
985
|
export function tapCommandForNode(n: InteractiveNode): string {
|
|
986
|
-
if (n.testID) return `
|
|
986
|
+
if (n.testID) return `peach do tap-id ${shellEscape(n.testID)}`
|
|
987
987
|
const text = typeof n.text === 'string' ? n.text.trim() : ''
|
|
988
|
-
if (text.length > 0 && text.length <= 80) return `
|
|
988
|
+
if (text.length > 0 && text.length <= 80) return `peach do tap-text ${shellEscape(text)}`
|
|
989
989
|
const x =
|
|
990
990
|
Math.round(((n.absolutePosition?.x ?? 0) + (n.layout?.width ?? 0) / 2) * 10) / 10
|
|
991
991
|
const y =
|
|
992
992
|
Math.round(((n.absolutePosition?.y ?? 0) + (n.layout?.height ?? 0) / 2) * 10) / 10
|
|
993
|
-
return `
|
|
993
|
+
return `peach do tap ${x} ${y}`
|
|
994
994
|
}
|
|
995
995
|
|
|
996
996
|
function shellEscape(value: string): string {
|
|
@@ -1045,7 +1045,7 @@ export function waitReadyReason(
|
|
|
1045
1045
|
) {
|
|
1046
1046
|
return status.bridgeError
|
|
1047
1047
|
}
|
|
1048
|
-
return `sim unreachable: ${status.bridgeError} — the target tab is closed or no sim is connected (check \`
|
|
1048
|
+
return `sim unreachable: ${status.bridgeError} — the target tab is closed or no sim is connected (check \`peach list\`, reopen with \`peach open\`)`
|
|
1049
1049
|
}
|
|
1050
1050
|
const waitingOnGuestFetch =
|
|
1051
1051
|
status.externalReady === false && /https?:\/\//.test(status.externalStatus)
|
|
@@ -1417,7 +1417,7 @@ export async function inspectLogs(bridge: InspectBridge): Promise<LogEntry[]> {
|
|
|
1417
1417
|
return [
|
|
1418
1418
|
{
|
|
1419
1419
|
id: `cloud-${ts}-${index}`,
|
|
1420
|
-
source: '
|
|
1420
|
+
source: 'peach-cloud',
|
|
1421
1421
|
level,
|
|
1422
1422
|
ts,
|
|
1423
1423
|
args: [text],
|
|
@@ -1477,7 +1477,7 @@ export function filterLogEntries(
|
|
|
1477
1477
|
out = out.filter((e) => {
|
|
1478
1478
|
const first = e.args[0]
|
|
1479
1479
|
return !(
|
|
1480
|
-
typeof first === 'string' && /^\[(?:
|
|
1480
|
+
typeof first === 'string' && /^\[(?:peach|sootsim)(?:\s[^\]]*)?\]/.test(first)
|
|
1481
1481
|
)
|
|
1482
1482
|
})
|
|
1483
1483
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// budget and log more aggressively, because an agent can't see mid-animation
|
|
4
4
|
// flicker the way a human can.
|
|
5
5
|
const AGENT_ENV_VARS = [
|
|
6
|
-
'
|
|
6
|
+
'PEACH_AGENT',
|
|
7
7
|
'TM_SESSION',
|
|
8
8
|
'CLAUDECODE',
|
|
9
9
|
'CLAUDE_CODE_ENTRYPOINT',
|
|
@@ -16,7 +16,7 @@ const AGENT_ENV_VARS = [
|
|
|
16
16
|
export function isAgentEnv(
|
|
17
17
|
env: Readonly<Record<string, string | undefined>> = process.env,
|
|
18
18
|
): boolean {
|
|
19
|
-
if (env.
|
|
19
|
+
if (env.PEACH_AGENT === '0') return false
|
|
20
20
|
for (const name of AGENT_ENV_VARS) {
|
|
21
21
|
const v = env[name]
|
|
22
22
|
if (v && v.trim() && v !== '0') return true
|
|
@@ -33,7 +33,7 @@ export async function runFindSubcommand(opts: {
|
|
|
33
33
|
// ranked-tappable list — same data source as --pressable, but the
|
|
34
34
|
// output prioritises high-signal targets the agent likely wants to
|
|
35
35
|
// tap next (visible, has text or testID, has accessibilityLabel),
|
|
36
|
-
// and emits a copy-paste `
|
|
36
|
+
// and emits a copy-paste `peach do` command per row so the agent
|
|
37
37
|
// doesn't have to re-form a tap from raw fields.
|
|
38
38
|
const interactive = hasFlag('--interactive-targets') || hasFlag('--actions')
|
|
39
39
|
const bareText =
|
|
@@ -71,7 +71,7 @@ export async function runFindSubcommand(opts: {
|
|
|
71
71
|
if (jsonOut) {
|
|
72
72
|
if (mode === 'interactive-targets' && Array.isArray(result)) {
|
|
73
73
|
// include the `tap` command per row when emitting JSON for agents
|
|
74
|
-
// — the human renderer does the same. tooling that drives
|
|
74
|
+
// — the human renderer does the same. tooling that drives peach
|
|
75
75
|
// can pick the highest-scored entry and execute its `tap` field.
|
|
76
76
|
printJson(rankInteractive(result).map((n) => ({ ...n, tap: tapCommandForNode(n) })))
|
|
77
77
|
} else {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach get-layout` — bounding boxes for visible meaningful elements on the
|
|
2
2
|
// current screen. focused on the layout numbers a designer checks: on-screen
|
|
3
3
|
// box (x/y/w/h). pass --styling for computed borderRadius, per-side padding,
|
|
4
4
|
// fontSize, visual style fields, and native rendered text contrast. pass
|
|
@@ -30,7 +30,7 @@ export async function runGetLayoutSubcommand(opts: {
|
|
|
30
30
|
if (
|
|
31
31
|
styling &&
|
|
32
32
|
error instanceof Error &&
|
|
33
|
-
(error.message === 'unsupported
|
|
33
|
+
(error.message === 'unsupported Peach Cloud command type: evaluate' ||
|
|
34
34
|
error.message.includes('requires the debug scope'))
|
|
35
35
|
) {
|
|
36
36
|
throw new Error(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach get keyboard` — prints the current iOS keyboard's full state.
|
|
2
2
|
//
|
|
3
3
|
// shows visibility, keyboardType, returnKeyType, autoCapitalize policy,
|
|
4
4
|
// active QWERTY sub-mode, shift + capsLock, and the mounted accessory bar
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach list` — connected sims, with the active one marked.
|
|
2
2
|
|
|
3
3
|
import { resolveDevCheckoutRuntimeRoot } from '../../../src/runtime-assets'
|
|
4
4
|
import { type BridgeSimInfo, formatLockOwner, type WsBridge } from '../../ws-bridge'
|
|
@@ -92,7 +92,7 @@ function summarizeSimUrl(url: string | undefined): string | null {
|
|
|
92
92
|
parsed.pathname === '/sootsim/' ||
|
|
93
93
|
parsed.pathname === '/sootsim'
|
|
94
94
|
) {
|
|
95
|
-
return 'embedded
|
|
95
|
+
return 'embedded peach'
|
|
96
96
|
}
|
|
97
97
|
return null
|
|
98
98
|
} catch {
|
|
@@ -146,8 +146,8 @@ function printConnectedSims(sims: BridgeSimInfo[], selectedId?: string) {
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
// classify which engine a sim is running so dev-vs-published is never ambiguous
|
|
149
|
-
// to agents or humans reading `
|
|
150
|
-
// :5173; the Contrast app embeds
|
|
149
|
+
// to agents or humans reading `peach list`. dev shell serves local source on
|
|
150
|
+
// :5173; the Contrast app embeds peach on :3000; the bridge/daemon and the
|
|
151
151
|
// /__soot plugin serve the active runtime dir — which, inside a dev checkout, is
|
|
152
152
|
// the fresh dev-stack build (resolveDevCheckoutRuntimeRoot mode boundary), not a
|
|
153
153
|
// published runtime. keep this label honest so it never says "published" while
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach get memory` / `peach debug memory` — per-worker live object
|
|
2
2
|
// counts (nodes registered, pictures, raster images, paragraphs, yoga wasm
|
|
3
3
|
// nodes), image-loader cache, and JS heaps. one-shot by default; --watch
|
|
4
4
|
// samples repeatedly and reports per-counter slope, which is the leak-RCA
|
|
@@ -5,7 +5,7 @@ import { isSimSemanticTree, type InspectBridge } from './core'
|
|
|
5
5
|
//
|
|
6
6
|
// pass `positional` from a verb whose positionals are x/y coordinates (tap,
|
|
7
7
|
// double-tap, long-press) and a bare non-numeric first positional reads as a
|
|
8
|
-
// testID: `
|
|
8
|
+
// testID: `peach do tap my-button` works like `do tap-id my-button` and like
|
|
9
9
|
// `do scroll <id>`, instead of failing with a usage line for the one verb an
|
|
10
10
|
// agent is most likely to reach for. a coordinate is always numeric, so there
|
|
11
11
|
// is nothing to disambiguate.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach get screens` — print the current navigation stack + shell state +
|
|
2
2
|
// any presented modal + keyboard. answers "what screen am I on?" without
|
|
3
3
|
// having to dump the whole tree or scrape screen-specific testIDs.
|
|
4
4
|
//
|
|
@@ -224,7 +224,7 @@ export interface ReloadReadyResult {
|
|
|
224
224
|
errors: number
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
// post-reload readiness is the same engine-owned condition as `
|
|
227
|
+
// post-reload readiness is the same engine-owned condition as `peach wait ready`.
|
|
228
228
|
// keeping reload on that primitive prevents another polling implementation
|
|
229
229
|
// from drifting on loading text, live frames, or tree stability.
|
|
230
230
|
export async function pollForReloadReady(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `peach get tree` — pruned structured semantic tree, default depth 5.
|
|
2
2
|
|
|
3
3
|
import { formatSemanticTree, inspectTree, isSimSemanticTree } from './core'
|
|
4
4
|
import { printJson, wantsJson } from './shared'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
//
|
|
1
|
+
// peach wait event — block until a semantic timeline event of the
|
|
2
2
|
// given kind appears, or timeout.
|
|
3
3
|
//
|
|
4
4
|
// usage:
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
5
|
+
// peach wait event <kind> [--max-ms 5000] [--since now|cursor]
|
|
6
|
+
// peach wait event fetch [--filter <substring>]
|
|
7
|
+
// peach wait event screen [--equals SignInPage]
|
|
8
8
|
//
|
|
9
9
|
// the existing wait family is layout-driven: `wait selector` polls
|
|
10
10
|
// for a testID, `wait idle` polls for rAF + animation settling,
|
|
@@ -111,7 +111,7 @@ function eventMatches(
|
|
|
111
111
|
export async function runWaitEventSubcommand(opts: WaitEventOptions): Promise<void> {
|
|
112
112
|
const { bridge, args, positional, inspectUsage } = opts
|
|
113
113
|
// positional shape after verb-prefix strip and stripBooleanFlags:
|
|
114
|
-
//
|
|
114
|
+
// peach wait event <kind> → ['event', '<kind>']
|
|
115
115
|
// so positional[1] is the kind.
|
|
116
116
|
const kind = positional[1]
|
|
117
117
|
if (!kind) {
|