rnxsim 0.1.375 → 0.1.377
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/README.md +28 -25
- package/cli/app-config.ts +9 -12
- package/cli/app-fonts.ts +3 -3
- package/cli/app-project.ts +8 -8
- package/cli/auth.ts +7 -9
- package/cli/bin.ts +16 -31
- package/cli/bridge-flow-runner.ts +3 -3
- package/cli/browser-backend.ts +44 -0
- package/cli/command-contract.ts +221 -0
- package/cli/command-registry.ts +291 -0
- package/cli/commands/agent-wrapper.ts +2 -2
- package/cli/commands/app-fonts.ts +2 -2
- package/cli/commands/assert.ts +3 -3
- package/cli/commands/auth.ts +1 -1
- package/cli/commands/box/cloud-box.ts +1 -1
- package/cli/commands/box/plane-share.ts +2 -2
- package/cli/commands/box.ts +4 -6
- package/cli/commands/compat.ts +1 -1
- package/cli/commands/config.ts +2 -2
- package/cli/commands/control.ts +42 -28
- package/cli/commands/cpu-profile.ts +7 -7
- package/cli/commands/daemon-mac-app.ts +7 -7
- package/cli/commands/daemon.ts +10 -10
- package/cli/commands/debug.ts +11 -11
- package/cli/commands/detox.ts +13 -13
- package/cli/commands/diagnose.ts +6 -6
- package/cli/commands/do-chain.ts +1 -2
- package/cli/commands/electron.ts +1 -3
- package/cli/commands/film.ts +3 -3
- package/cli/commands/flow.ts +43 -43
- 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/get-layout.ts +1 -1
- package/cli/commands/inspect/keyboard.ts +1 -1
- package/cli/commands/inspect/list.ts +1 -1
- 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/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 +34 -34
- package/cli/commands/install-desktop.ts +3 -3
- package/cli/commands/login.ts +6 -6
- package/cli/commands/maestro-generate.ts +5 -5
- package/cli/commands/maestro.ts +5 -5
- package/cli/commands/profile.ts +1 -1
- package/cli/commands/record.ts +9 -9
- package/cli/commands/runtime.ts +18 -18
- package/cli/commands/screenshot-command.ts +1 -1
- package/cli/commands/screenshot-layers.ts +5 -5
- package/cli/commands/screenshot-mode.ts +1 -1
- package/cli/commands/screenshot.ts +8 -8
- package/cli/commands/screenshots-capture.ts +5 -5
- package/cli/commands/serve.ts +3 -3
- package/cli/commands/setup.ts +20 -12
- package/cli/commands/skills.ts +5 -5
- package/cli/commands/slides.ts +1 -1
- package/cli/commands/telemetry.ts +1 -1
- package/cli/commands/three-mode.ts +1 -1
- package/cli/commands/timeline.ts +8 -8
- package/cli/commands/upgrade.ts +116 -131
- package/cli/commands/upload.ts +12 -12
- package/cli/commands/version.ts +7 -7
- package/cli/commands/what-happened.ts +9 -9
- package/cli/current-sim.ts +3 -3
- package/cli/desktop-companion.ts +1 -1
- package/cli/drivers/playwright.ts +9 -9
- package/cli/drivers/registry.ts +1 -1
- package/cli/drivers/types.ts +1 -1
- package/cli/flow-file.ts +2 -2
- package/cli/flow-session.ts +1 -1
- package/cli/help-core.ts +136 -0
- package/cli/help.ts +17 -53
- package/cli/hints.ts +5 -5
- package/cli/inspect-notice-state.ts +1 -1
- package/cli/maestro-js.ts +1 -1
- package/cli/outbound-endpoints.ts +23 -5
- package/cli/parse-args.ts +19 -66
- package/cli/recording-access.ts +1 -1
- package/cli/registry.ts +1 -0
- package/cli/run-registry.ts +1 -1
- package/cli/run-rnx-core.ts +148 -0
- package/cli/run-rnx.ts +6 -9
- package/cli/runtime-notes.ts +3 -3
- package/cli/standalone.ts +4 -0
- package/cli/ws-bridge.ts +8 -8
- package/detox/config-loader.ts +2 -2
- package/detox/index.ts +8 -8
- package/detox/jest-preset.cjs +1 -1
- package/detox/navigation.ts +2 -2
- package/dist-lib/agent-daemon-client.cjs +5 -5
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +2 -2
- package/dist-lib/agent-sessions.cjs +10 -10
- package/dist-lib/attached-projects.cjs +6 -6
- package/dist-lib/auth/shared-session.cjs +6 -6
- 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 +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +25 -25
- package/dist-lib/detox/index.cjs +9 -9
- package/dist-lib/detox/jest-preset.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +29 -29
- package/dist-lib/host/bridge-host.cjs +274 -181
- 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 +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +14 -14
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.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 +8 -8
- package/dist-lib/profiles.cjs +12 -12
- package/dist-lib/public-brand.cjs +1 -1
- 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 +25 -11
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +470 -322
- package/dist-lib/vite.cjs +9 -9
- package/package.json +4 -11
- package/scripts/dev-server-scanner.ts +25 -7
- package/scripts/optional-demo-registry.ts +1 -1
- package/skills/contrast/SKILL.md +3 -3
- package/skills/rnx-debug/SKILL.md +1 -1
- package/skills/rnx-test/SKILL.md +2 -2
- package/src/agent-identity.ts +1 -1
- package/src/agent-sessions.ts +7 -5
- package/src/cli-version.ts +12 -4
- package/src/config.ts +26 -28
- package/src/disk-cleanup.ts +11 -11
- package/src/home-paths.ts +28 -28
- package/src/host/bridge-host.ts +16 -16
- package/src/metro-plugin.ts +2 -2
- package/src/profiles.ts +2 -2
- package/src/runtime-assets.ts +7 -7
- package/src/runtime-delivery.ts +13 -13
- package/src/screenshots/orchestrate.ts +1 -1
- package/src/screenshots/schema.ts +2 -2
- package/src/skills/builtin/a11y-review.ts +2 -2
- package/src/skills/builtin/compat-check.ts +2 -2
- package/src/skills/builtin/maestro-test.ts +2 -2
- package/src/skills/builtin/perf-profile.ts +2 -2
- package/src/skills/builtin/screenshot-all.ts +2 -2
- package/src/skills/builtin/visual-diff.ts +2 -2
- package/src/skills/registry.ts +8 -8
- package/src/skills/types.ts +1 -1
- package/src/vite-plugin-one.ts +3 -3
- package/src/vite-plugin.ts +15 -2
- package/dist-cli/bin.js +0 -15
- package/dist-cli/chunks/agent-JJN7U6FR.js +0 -48
- package/dist-cli/chunks/agent-wrapper-AVVUJ3WF.js +0 -17
- package/dist-cli/chunks/app-fonts-QJ22CNAZ.js +0 -4
- package/dist-cli/chunks/assert-PZZKIY3K.js +0 -49
- package/dist-cli/chunks/auth-5AVDJO33.js +0 -12
- package/dist-cli/chunks/beta-PFRGP266.js +0 -4
- package/dist-cli/chunks/box-ILC2O7ZO.js +0 -1730
- package/dist-cli/chunks/camera-J3V62PP7.js +0 -33
- package/dist-cli/chunks/chunk-25KRGDZT.js +0 -4
- package/dist-cli/chunks/chunk-2BRBFLWA.js +0 -38
- package/dist-cli/chunks/chunk-2GXNAZHB.js +0 -74
- package/dist-cli/chunks/chunk-2IUMRRYV.js +0 -7
- package/dist-cli/chunks/chunk-4ALPWIMP.js +0 -10
- package/dist-cli/chunks/chunk-4CEZZKRY.js +0 -4
- package/dist-cli/chunks/chunk-4EUKOIAV.js +0 -4
- package/dist-cli/chunks/chunk-4IKE4YUS.js +0 -32
- package/dist-cli/chunks/chunk-4ZXR2M3D.js +0 -4
- package/dist-cli/chunks/chunk-5CGJFU27.js +0 -7
- package/dist-cli/chunks/chunk-5HHWECGT.js +0 -4
- package/dist-cli/chunks/chunk-5PZVYF42.js +0 -312
- package/dist-cli/chunks/chunk-7NCPUZ52.js +0 -27
- package/dist-cli/chunks/chunk-7OSIJCBR.js +0 -107
- package/dist-cli/chunks/chunk-AQ5TMOAI.js +0 -4
- package/dist-cli/chunks/chunk-BQCEI37V.js +0 -5
- package/dist-cli/chunks/chunk-C6B5FOP3.js +0 -4
- package/dist-cli/chunks/chunk-CCMZSHJB.js +0 -71
- package/dist-cli/chunks/chunk-CX7VCKAT.js +0 -14
- package/dist-cli/chunks/chunk-DQUPSAHE.js +0 -4
- package/dist-cli/chunks/chunk-DSD2UBZI.js +0 -4
- package/dist-cli/chunks/chunk-EWPAI4MO.js +0 -7
- package/dist-cli/chunks/chunk-EZXV6U2N.js +0 -497
- package/dist-cli/chunks/chunk-F5F7FIPM.js +0 -6
- package/dist-cli/chunks/chunk-FUTYK55H.js +0 -30
- package/dist-cli/chunks/chunk-FW6AN7I2.js +0 -3
- package/dist-cli/chunks/chunk-FZDRA7Z4.js +0 -4
- package/dist-cli/chunks/chunk-GDLE4NIV.js +0 -4
- package/dist-cli/chunks/chunk-GEX7RVHY.js +0 -5
- package/dist-cli/chunks/chunk-H4MYYOYJ.js +0 -5
- package/dist-cli/chunks/chunk-HEV7BAPE.js +0 -11
- package/dist-cli/chunks/chunk-HNDWYCND.js +0 -506
- package/dist-cli/chunks/chunk-HNPHODBD.js +0 -4
- package/dist-cli/chunks/chunk-HWDVC6YA.js +0 -11
- package/dist-cli/chunks/chunk-JOHJZUGG.js +0 -4
- package/dist-cli/chunks/chunk-JWUDT4QK.js +0 -5
- package/dist-cli/chunks/chunk-K7QQWKGE.js +0 -4
- package/dist-cli/chunks/chunk-LAOKTKT4.js +0 -4
- package/dist-cli/chunks/chunk-LD7I266X.js +0 -24
- package/dist-cli/chunks/chunk-LMHBU5LZ.js +0 -4
- package/dist-cli/chunks/chunk-LSOGXSDV.js +0 -535
- package/dist-cli/chunks/chunk-MP2GPO4T.js +0 -4
- package/dist-cli/chunks/chunk-MXJ2UWRV.js +0 -4
- package/dist-cli/chunks/chunk-OJNKRIZF.js +0 -15
- package/dist-cli/chunks/chunk-PBOWUNXO.js +0 -4
- package/dist-cli/chunks/chunk-PNRJFHX4.js +0 -4
- package/dist-cli/chunks/chunk-QJQOK34O.js +0 -28
- package/dist-cli/chunks/chunk-RLCQLMFF.js +0 -142
- package/dist-cli/chunks/chunk-S65CK3RI.js +0 -9
- package/dist-cli/chunks/chunk-SWBUNMQS.js +0 -4
- package/dist-cli/chunks/chunk-SXBFGGAM.js +0 -4
- package/dist-cli/chunks/chunk-T4ISWS5H.js +0 -4
- package/dist-cli/chunks/chunk-TPPVAA7Z.js +0 -5
- package/dist-cli/chunks/chunk-USM3P74H.js +0 -4
- package/dist-cli/chunks/chunk-V4EJJHF5.js +0 -4
- package/dist-cli/chunks/chunk-V7RGRZOL.js +0 -423
- package/dist-cli/chunks/chunk-XUBV77WH.js +0 -130
- package/dist-cli/chunks/chunk-XYSDYGKC.js +0 -4
- package/dist-cli/chunks/chunk-YNHRSDVG.js +0 -5
- package/dist-cli/chunks/chunk-YX52RJKO.js +0 -4
- package/dist-cli/chunks/chunk-Z5O5H4O7.js +0 -99
- package/dist-cli/chunks/chunk-Z6LOIW46.js +0 -7
- package/dist-cli/chunks/chunk-ZXFVBYJY.js +0 -5
- package/dist-cli/chunks/cleanup-KPUW4SFK.js +0 -25
- package/dist-cli/chunks/cli-version-APGT6GAT.js +0 -4
- package/dist-cli/chunks/compat-XXRFD2TW.js +0 -23
- package/dist-cli/chunks/config-DDMFDQ7F.js +0 -13
- package/dist-cli/chunks/connect-IPG47YXM.js +0 -4
- package/dist-cli/chunks/control-O22Z3UJ5.js +0 -4
- package/dist-cli/chunks/daemon-PADUIMJV.js +0 -4
- package/dist-cli/chunks/debug-MYIP46TM.js +0 -200
- package/dist-cli/chunks/desktop-ENFFBQAA.js +0 -31
- package/dist-cli/chunks/detox-J5WVK6OH.js +0 -52
- package/dist-cli/chunks/device-RAVQVL75.js +0 -18
- package/dist-cli/chunks/diagnose-PJMPXKJY.js +0 -43
- package/dist-cli/chunks/disk-cleanup-YLAY445J.js +0 -4
- package/dist-cli/chunks/do-chain-UBE7GIOU.js +0 -5
- package/dist-cli/chunks/drivers-ZFNX3T5Z.js +0 -4
- package/dist-cli/chunks/env-Y5XJSNRD.js +0 -4
- package/dist-cli/chunks/film-W3V6VURB.js +0 -74
- package/dist-cli/chunks/flow-VMLI7BYM.js +0 -4
- package/dist-cli/chunks/help-PKZCWHJJ.js +0 -4
- package/dist-cli/chunks/hidden-runtime-alias-S5DJ7EDF.js +0 -4
- package/dist-cli/chunks/home-paths-5O4IZPYV.js +0 -4
- package/dist-cli/chunks/inspect-LT4MXK37.js +0 -4
- package/dist-cli/chunks/install-desktop-EXCFMXFS.js +0 -4
- package/dist-cli/chunks/login-V6TZ54ZH.js +0 -26
- package/dist-cli/chunks/logout-SPMLFWYA.js +0 -4
- package/dist-cli/chunks/maestro-5ISTBAZE.js +0 -108
- package/dist-cli/chunks/maestro-generate-WUI64NHR.js +0 -36
- package/dist-cli/chunks/mode-QPNBYXUF.js +0 -26
- package/dist-cli/chunks/optional-demo-registry-CBSYF4CG.js +0 -4
- package/dist-cli/chunks/perf-T6N5PVYV.js +0 -48
- package/dist-cli/chunks/permissions-YZ7RRSZJ.js +0 -13
- package/dist-cli/chunks/platform-XDQAA72X.js +0 -6
- package/dist-cli/chunks/privacy-54FIGXLT.js +0 -4
- package/dist-cli/chunks/record-QGYXRUKP.js +0 -72
- package/dist-cli/chunks/report-issue-VUUTGX7V.js +0 -29
- package/dist-cli/chunks/reset-CGO52KBW.js +0 -4
- package/dist-cli/chunks/resolve-target-NNQCALDM.js +0 -4
- package/dist-cli/chunks/runtime-4EP6YJVL.js +0 -4
- package/dist-cli/chunks/screenshot-command-NZCMSJ4P.js +0 -159
- package/dist-cli/chunks/screenshot-layers-VMTQ6XIU.js +0 -20
- package/dist-cli/chunks/screenshots-capture-K3MWIDBK.js +0 -42
- package/dist-cli/chunks/serve-QJRIB2BV.js +0 -56
- package/dist-cli/chunks/setup-6XXEJQVF.js +0 -4
- package/dist-cli/chunks/sim-client-5YUVL45C.js +0 -4
- package/dist-cli/chunks/skills-T3CS7CXK.js +0 -50
- package/dist-cli/chunks/state-AJC3VK3G.js +0 -14
- package/dist-cli/chunks/storage-KVGZKC3Y.js +0 -37
- package/dist-cli/chunks/store-AWUMOQUH.js +0 -4
- package/dist-cli/chunks/telemetry-W5ZDGWK6.js +0 -4
- package/dist-cli/chunks/timeline-DXDCAZUA.js +0 -24
- package/dist-cli/chunks/upgrade-SRPTJACU.js +0 -7
- package/dist-cli/chunks/upload-ZDV4BFED.js +0 -4
- package/dist-cli/chunks/version-SOLPSBMG.js +0 -6
- package/dist-cli/chunks/web-RT75LD7A.js +0 -4
- package/dist-cli/chunks/welcome-IJ55EC7U.js +0 -5
- package/dist-cli/chunks/what-happened-CEIWJIWK.js +0 -25
- package/dist-cli/chunks/ws-bridge-YK5R3HOI.js +0 -4
- package/scripts/postinstall.cjs +0 -3
- package/scripts/preuninstall.cjs +0 -118
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// plain-language Maestro authoring for `
|
|
1
|
+
// plain-language Maestro authoring for `rnx maestro generate`.
|
|
2
2
|
|
|
3
3
|
import { mkdtempSync, writeFileSync } from 'fs'
|
|
4
4
|
import { tmpdir } from 'os'
|
|
@@ -10,7 +10,7 @@ import { createBridgeFromParsed, parseBridgeCliArgs } from '../ws-bridge'
|
|
|
10
10
|
import { inspectDescribe } from './inspect/core'
|
|
11
11
|
import { resolveDefaultUploadOrigin } from './upload'
|
|
12
12
|
|
|
13
|
-
const DEFAULT_TEST_MODEL = process.env.
|
|
13
|
+
const DEFAULT_TEST_MODEL = process.env.RNX_TEST_MODEL || 'deepseek-v4-flash'
|
|
14
14
|
const DESCRIBE_CONTEXT_LIMIT = 18_000
|
|
15
15
|
const LLM_TIMEOUT_MS = 180_000
|
|
16
16
|
|
|
@@ -96,7 +96,7 @@ async function describeCurrentSim(args: string[], promptIndex: number): Promise<
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
const
|
|
99
|
+
const RNX_TEST_SYSTEM_PROMPT = `
|
|
100
100
|
You write Maestro-compatible rnx YAML flows from a user's plain-language test goal.
|
|
101
101
|
Return only JSON, no markdown, with this exact shape:
|
|
102
102
|
{"summary":"short human-readable result goal","steps":[{"waitFor":{"text":"...","timeout":10000}}]}
|
|
@@ -145,7 +145,7 @@ async function generateFlowJson(args: {
|
|
|
145
145
|
body: JSON.stringify({
|
|
146
146
|
modelId: DEFAULT_TEST_MODEL,
|
|
147
147
|
context: {
|
|
148
|
-
systemPrompt:
|
|
148
|
+
systemPrompt: RNX_TEST_SYSTEM_PROMPT,
|
|
149
149
|
messages: [
|
|
150
150
|
{
|
|
151
151
|
role: 'user',
|
|
@@ -320,7 +320,7 @@ export async function runMaestroGenerate(args: string[]): Promise<number> {
|
|
|
320
320
|
console.log(' generating Maestro flow…')
|
|
321
321
|
const generated = await generateFlowJson({ prompt, describe, origin, authHeader })
|
|
322
322
|
const flow = parseGeneratedFlow(generated)
|
|
323
|
-
const tempDir = mkdtempSync(join(tmpdir(), '
|
|
323
|
+
const tempDir = mkdtempSync(join(tmpdir(), 'rnx-maestro-generate-'))
|
|
324
324
|
const flowPath = join(tempDir, 'flow.yaml')
|
|
325
325
|
writeFileSync(flowPath, flow.yamlText)
|
|
326
326
|
console.log(` flow: ${flowPath}`)
|
package/cli/commands/maestro.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx maestro — drop-in replacement for the real `maestro` cli.
|
|
2
2
|
//
|
|
3
3
|
// users with an existing `.maestro/` directory can swap `maestro test`
|
|
4
|
-
// for `
|
|
4
|
+
// for `rnx maestro test` and have their flows execute against
|
|
5
5
|
// sootsim's in-browser engine. the heavy lifting lives in `flow.ts` +
|
|
6
6
|
// `bridge-flow-runner.ts`; this file just re-maps the maestro argv shape
|
|
7
7
|
// onto the existing flow runner and handles directory iteration + init.
|
|
@@ -145,7 +145,7 @@ function applyEnvFlags(args: string[]): string[] {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// Remove Maestro-only flags that the shared runner does not know.
|
|
148
|
-
// these are accepted so users can literally s/maestro/
|
|
148
|
+
// these are accepted so users can literally s/maestro/rnx maestro/ in
|
|
149
149
|
// their scripts without edits.
|
|
150
150
|
function stripUnknownMaestroFlags(args: string[]): string[] {
|
|
151
151
|
const out: string[] = []
|
|
@@ -324,7 +324,7 @@ export async function runMaestro(
|
|
|
324
324
|
let forwardArgs: string[]
|
|
325
325
|
|
|
326
326
|
if (sub === 'test') {
|
|
327
|
-
// `
|
|
327
|
+
// `rnx maestro test <flow-or-dir> [flags...]`
|
|
328
328
|
const positional = remaining.slice(1).find((a) => !looksLikeFlag(a))
|
|
329
329
|
if (positional) {
|
|
330
330
|
target = path.resolve(cwd, positional)
|
|
@@ -334,7 +334,7 @@ export async function runMaestro(
|
|
|
334
334
|
forwardArgs = remaining.slice(1)
|
|
335
335
|
}
|
|
336
336
|
} else if (sub && !looksLikeFlag(sub)) {
|
|
337
|
-
// `
|
|
337
|
+
// `rnx maestro <flow-or-dir>` — tolerate the shorthand.
|
|
338
338
|
target = path.resolve(cwd, sub)
|
|
339
339
|
forwardArgs = remaining.slice(1)
|
|
340
340
|
} else {
|
package/cli/commands/profile.ts
CHANGED
package/cli/commands/record.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx record — drives the engine's built-in canvas recorder over
|
|
2
2
|
// the WS bridge. no playwright, no ffmpeg. encoding happens in the
|
|
3
3
|
// running sootsim page (webm via MediaRecorder, mp4 via WebCodecs, gif
|
|
4
4
|
// via gifenc, raw png frames via a shared bitmap sampler).
|
|
@@ -375,7 +375,7 @@ export async function runRecord(args: string[], opts: RecordOptions) {
|
|
|
375
375
|
|
|
376
376
|
if (format === 'png') {
|
|
377
377
|
const count = framesCount ?? 10
|
|
378
|
-
const outDir = resolveRecordingOutput(outputArg, `
|
|
378
|
+
const outDir = resolveRecordingOutput(outputArg, `rnx-frames-${stamp()}`)
|
|
379
379
|
// --frames writes one png PER frame, so --output names a directory, not
|
|
380
380
|
// a file. a caller passing `--output shot.png` gets a directory literally
|
|
381
381
|
// named `shot.png` — flag the likely mistake rather than silently doing it.
|
|
@@ -445,7 +445,7 @@ export async function runRecord(args: string[], opts: RecordOptions) {
|
|
|
445
445
|
|
|
446
446
|
if (format === 'gif') {
|
|
447
447
|
const count = framesCount ?? Math.max(10, Math.round((durationSec * fps) / 3))
|
|
448
|
-
const out = resolveRecordingOutput(outputArg, `
|
|
448
|
+
const out = resolveRecordingOutput(outputArg, `rnx-${stamp()}.gif`)
|
|
449
449
|
mkdirSync(dirname(out), { recursive: true })
|
|
450
450
|
console.log(` encoding gif: ${count} frames over ${durationSec}s → ${out}`)
|
|
451
451
|
const result: { data: string; size: number } | null = await evalCaptureStep(
|
|
@@ -466,7 +466,7 @@ export async function runRecord(args: string[], opts: RecordOptions) {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
// video path: webm or mp4
|
|
469
|
-
const out = resolveRecordingOutput(outputArg, `
|
|
469
|
+
const out = resolveRecordingOutput(outputArg, `rnx-${stamp()}.${format}`)
|
|
470
470
|
mkdirSync(dirname(out), { recursive: true })
|
|
471
471
|
|
|
472
472
|
const startOpts: {
|
|
@@ -658,10 +658,10 @@ function stamp(): string {
|
|
|
658
658
|
|
|
659
659
|
// default home for recordings when --output is omitted. writing into the
|
|
660
660
|
// process cwd litters whatever directory the CLI was invoked from (the repo
|
|
661
|
-
// root, most often) with
|
|
661
|
+
// root, most often) with rnx-*.mp4 / rnx-frames-*/ — F11-2. an
|
|
662
662
|
// explicit --output still resolves relative to cwd as the caller expects.
|
|
663
663
|
function recordingsDir(): string {
|
|
664
|
-
const dir = join(homedir(), '.
|
|
664
|
+
const dir = join(homedir(), '.rnx', 'recordings')
|
|
665
665
|
mkdirSync(dir, { recursive: true })
|
|
666
666
|
return dir
|
|
667
667
|
}
|
|
@@ -698,7 +698,7 @@ function parseMode(raw: string | undefined): RecordMode {
|
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
function recordingStatePath(): string {
|
|
701
|
-
return join(tmpdir(), `
|
|
701
|
+
return join(tmpdir(), `rnx-recording-${getCliIdentityKey()}.json`)
|
|
702
702
|
}
|
|
703
703
|
|
|
704
704
|
function readRecordingState(): RecordingState | null {
|
|
@@ -1165,7 +1165,7 @@ async function recordStop(args: string[], opts: RecordOptions) {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
1167
|
const outputArg = valueOf(args, '--output')
|
|
1168
|
-
const out = resolveRecordingOutput(outputArg, `
|
|
1168
|
+
const out = resolveRecordingOutput(outputArg, `rnx-${stamp()}.${state.format}`)
|
|
1169
1169
|
mkdirSync(dirname(out), { recursive: true })
|
|
1170
1170
|
const stopResult: {
|
|
1171
1171
|
ok: boolean
|
|
@@ -1219,7 +1219,7 @@ async function assertStoreBridgesAvailable(bridge: WsBridge) {
|
|
|
1219
1219
|
|
|
1220
1220
|
// CLI-driven live/combined recording runs in a headless browser that was
|
|
1221
1221
|
// never logged in, so browser-side upload has no bearer. push the CLI's own
|
|
1222
|
-
// auth — the same RNX_API_KEY / `
|
|
1222
|
+
// auth — the same RNX_API_KEY / `rnx login` / GitHub token
|
|
1223
1223
|
// ensureCliRecordingEntitlement just verified — into the page's shared-session
|
|
1224
1224
|
// store before starting. GitHub PR-preview auth also needs its repo identity
|
|
1225
1225
|
// in the upload init body so the server treats the bearer as a GitHub upload
|
package/cli/commands/runtime.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx runtime — manage engine runtimes under ~/.rnx/runtimes/.
|
|
2
2
|
//
|
|
3
3
|
// runtimes are versioned tarballs hosted behind the configured CDN origin
|
|
4
4
|
// (default https://contrast.dev/runtimes/). each install:
|
|
5
5
|
// 1. fetches manifest.json to resolve a version (or confirm the literal)
|
|
6
6
|
// 2. downloads sootsim-runtime-<version>.tar.gz to an operation temp directory
|
|
7
7
|
// 3. verifies sha256
|
|
8
|
-
// 4. extracts to ~/.
|
|
8
|
+
// 4. extracts to ~/.rnx/runtimes/<version>/
|
|
9
9
|
// 5. (optionally) sets it active + tells the daemon to hot-swap
|
|
10
10
|
//
|
|
11
|
-
// the daemon-side state (active runtime) is mirrored in ~/.
|
|
11
|
+
// the daemon-side state (active runtime) is mirrored in ~/.rnx/runtimes/active
|
|
12
12
|
// so the CLI can change it even when the daemon isn't running.
|
|
13
13
|
|
|
14
14
|
import fs from 'fs'
|
|
15
15
|
import { compareSemver } from '@contrast/runtime-delivery'
|
|
16
16
|
import { WebSocket } from 'ws'
|
|
17
17
|
import {
|
|
18
|
-
|
|
18
|
+
ensureRnxHome,
|
|
19
19
|
readActiveRuntime,
|
|
20
20
|
readLiveRuntimeVersions,
|
|
21
21
|
runtimeDir,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
} from '../../src/home-paths'
|
|
24
24
|
import {
|
|
25
25
|
DEFAULT_RUNTIME_CDN_ORIGIN,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
RNX_CHANGELOG_URL,
|
|
27
|
+
rnxRuntime,
|
|
28
28
|
} from '../../src/runtime-delivery'
|
|
29
|
-
import {
|
|
29
|
+
import { resolveRNXAppConfig } from '../app-config'
|
|
30
30
|
import { rnxExit } from '../run-rnx'
|
|
31
31
|
import { fetchRuntimeReleaseNotes, formatRuntimeReleaseNotes } from '../runtime-notes'
|
|
32
32
|
import { resolveDefaultBridgePort } from '../ws-bridge'
|
|
@@ -63,7 +63,7 @@ export async function runRuntime(args: string[], opts: RuntimeOptions = {}) {
|
|
|
63
63
|
|
|
64
64
|
function printHelp() {
|
|
65
65
|
console.log(`
|
|
66
|
-
rnx runtime — manage engine runtimes under ~/.
|
|
66
|
+
rnx runtime — manage engine runtimes under ~/.rnx/runtimes/
|
|
67
67
|
|
|
68
68
|
usage:
|
|
69
69
|
rnx runtime install [version] install a version (default: channel latest)
|
|
@@ -79,7 +79,7 @@ flags:
|
|
|
79
79
|
--set-active=false do not switch active runtime after install
|
|
80
80
|
|
|
81
81
|
environment:
|
|
82
|
-
|
|
82
|
+
RNX_CDN_ORIGIN override the CDN base URL (default: ${DEFAULT_RUNTIME_CDN_ORIGIN})
|
|
83
83
|
|
|
84
84
|
examples:
|
|
85
85
|
rnx runtime install
|
|
@@ -98,13 +98,13 @@ async function runtimeInstall(args: string[], opts: RuntimeOptions) {
|
|
|
98
98
|
const force = flags.force === true
|
|
99
99
|
const setActive = flags.setActive !== false
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
ensureRnxHome()
|
|
102
102
|
|
|
103
103
|
console.log(`rnx runtime install`)
|
|
104
|
-
console.log(` cdn: ${
|
|
104
|
+
console.log(` cdn: ${rnxRuntime.resolveCdnOrigin()}`)
|
|
105
105
|
|
|
106
106
|
try {
|
|
107
|
-
const result = await
|
|
107
|
+
const result = await rnxRuntime.install({
|
|
108
108
|
version: versionArg,
|
|
109
109
|
channel,
|
|
110
110
|
force,
|
|
@@ -201,8 +201,8 @@ async function tellDaemonRuntimeChanged(version: string): Promise<boolean> {
|
|
|
201
201
|
// --- list -----------------------------------------------------------------
|
|
202
202
|
|
|
203
203
|
async function runtimeList(_args: string[]) {
|
|
204
|
-
|
|
205
|
-
const installed =
|
|
204
|
+
ensureRnxHome()
|
|
205
|
+
const installed = rnxRuntime.listInstalled()
|
|
206
206
|
const active = readActiveRuntime()
|
|
207
207
|
console.log(`installed:`)
|
|
208
208
|
if (installed.length === 0) {
|
|
@@ -214,7 +214,7 @@ async function runtimeList(_args: string[]) {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
try {
|
|
217
|
-
const manifest = await
|
|
217
|
+
const manifest = await rnxRuntime.fetchManifest()
|
|
218
218
|
console.log(`available (latest per channel):`)
|
|
219
219
|
for (const [name, ch] of Object.entries(manifest.channels)) {
|
|
220
220
|
console.log(` ${name.padEnd(8)} ${ch.latest}`)
|
|
@@ -237,7 +237,7 @@ async function runtimeUse(args: string[]) {
|
|
|
237
237
|
console.error(` usage: rnx runtime use <version>`)
|
|
238
238
|
rnxExit(1)
|
|
239
239
|
}
|
|
240
|
-
const installed =
|
|
240
|
+
const installed = rnxRuntime.listInstalled()
|
|
241
241
|
if (!installed.includes(version)) {
|
|
242
242
|
console.error(` version ${version} is not installed`)
|
|
243
243
|
console.error(` installed: ${installed.join(', ') || '(none)'}`)
|
|
@@ -294,11 +294,11 @@ async function runtimeNotes(args: string[]) {
|
|
|
294
294
|
console.error(` usage: rnx runtime notes`)
|
|
295
295
|
rnxExit(1)
|
|
296
296
|
}
|
|
297
|
-
const { config } = await
|
|
297
|
+
const { config } = await resolveRNXAppConfig()
|
|
298
298
|
const version = config?.runtimeVersion ?? readActiveRuntime()
|
|
299
299
|
if (!version) {
|
|
300
300
|
console.log(` no active runtime`)
|
|
301
|
-
console.log(` release notes: ${
|
|
301
|
+
console.log(` release notes: ${RNX_CHANGELOG_URL}`)
|
|
302
302
|
return
|
|
303
303
|
}
|
|
304
304
|
console.log(formatRuntimeReleaseNotes(version, await fetchRuntimeReleaseNotes(version)))
|
|
@@ -85,7 +85,7 @@ export async function runScreenshotCommand(
|
|
|
85
85
|
// repo-only tooling: screenshots-capture statically imports playwright-core,
|
|
86
86
|
// which the published CLI never ships (it's external in build-cli.ts). a
|
|
87
87
|
// static import here would put that bare import at the top of THIS chunk,
|
|
88
|
-
// so every published `
|
|
88
|
+
// so every published `rnx screenshot` printed ERR_MODULE_NOT_FOUND —
|
|
89
89
|
// keep it a runtime dynamic import that only evaluates when capture runs.
|
|
90
90
|
try {
|
|
91
91
|
const { runScreenshotsCapture } = await import('./screenshots-capture')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx screenshot layers — engine-rendered layer isolation export.
|
|
2
2
|
//
|
|
3
3
|
// captures one screen as a stack the 3d stage can pull apart: `full.png` is
|
|
4
4
|
// the normal frame, `base.png` re-renders the frame with the target subtrees
|
|
@@ -26,14 +26,14 @@ export async function runScreenshotLayers(
|
|
|
26
26
|
): Promise<void> {
|
|
27
27
|
if (args.includes('--help') || args.includes('-h')) {
|
|
28
28
|
console.log(`
|
|
29
|
-
|
|
29
|
+
rnx screenshot layers — export a screen as engine-isolated layers
|
|
30
30
|
|
|
31
31
|
usage:
|
|
32
|
-
|
|
32
|
+
rnx screenshot layers --ids <testID,testID,...> [--out-dir <dir>]
|
|
33
33
|
|
|
34
34
|
options:
|
|
35
35
|
--ids <list> comma-separated testIDs of the subtrees to isolate
|
|
36
|
-
--out-dir <dir> output directory (default: /tmp/
|
|
36
|
+
--out-dir <dir> output directory (default: /tmp/rnx-layers)
|
|
37
37
|
|
|
38
38
|
output:
|
|
39
39
|
full.png the normal frame
|
|
@@ -58,7 +58,7 @@ output:
|
|
|
58
58
|
rnxExit(1)
|
|
59
59
|
}
|
|
60
60
|
const outDirArg = args.find((_, i) => args[i - 1] === '--out-dir')
|
|
61
|
-
const outDir = resolve(process.cwd(), outDirArg ?? '/tmp/
|
|
61
|
+
const outDir = resolve(process.cwd(), outDirArg ?? '/tmp/rnx-layers')
|
|
62
62
|
|
|
63
63
|
const parsed = parseBridgeCliArgs(args, {
|
|
64
64
|
port: opts.port,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx mode screenshot — toggle the "screenshot mode" chrome overlay
|
|
2
2
|
// in the running sootsim sim. orthogonal to `--no-shell` on the
|
|
3
3
|
// `screenshot` command: this hides the DOM browser chrome (rail, menubar,
|
|
4
4
|
// window controls) while still rendering the iOS shell inside the canvas.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx screenshot — capture the canvas as a PNG
|
|
2
2
|
//
|
|
3
3
|
// prefers the WS bridge when one is reachable so the screenshot comes from
|
|
4
4
|
// the user's current sim (and can be cropped to a logical
|
|
@@ -42,7 +42,7 @@ usage:
|
|
|
42
42
|
rnx screenshot [options] --output <path>
|
|
43
43
|
|
|
44
44
|
options:
|
|
45
|
-
--output <path> output file path (default: /tmp/
|
|
45
|
+
--output <path> output file path (default: /tmp/rnx-inspect.png)
|
|
46
46
|
first positional arg works too: \`screenshot /tmp/x.png\`
|
|
47
47
|
--with-frame wrap the captured screen in a tight device frame
|
|
48
48
|
--no-frame capture the raw screen bitmap (default)
|
|
@@ -222,7 +222,7 @@ async function captureViaBridge(
|
|
|
222
222
|
)
|
|
223
223
|
}
|
|
224
224
|
// re-assert readiness on THIS bridge connection right before capturing.
|
|
225
|
-
// the readiness gate (`
|
|
225
|
+
// the readiness gate (`rnx wait ready`) and this capture run as
|
|
226
226
|
// separate CLI processes; between them the engine can re-enter its
|
|
227
227
|
// boot/connect overlay — a late reload fires `sootsim:externalAppReloadStart`
|
|
228
228
|
// and clears `__sootsimExternalAppReady` — so a capture taken now can grab
|
|
@@ -286,7 +286,7 @@ async function captureViaBridge(
|
|
|
286
286
|
const dataUrl: string = await bridge.send(request)
|
|
287
287
|
const pngPrefix = 'data:image/png;base64,'
|
|
288
288
|
// never write a 0-byte "saved" file from an empty or malformed payload —
|
|
289
|
-
// the sim may be alive but not painting (check `
|
|
289
|
+
// the sim may be alive but not painting (check `rnx get errors`)
|
|
290
290
|
if (typeof dataUrl !== 'string' || dataUrl.length <= pngPrefix.length) {
|
|
291
291
|
throw new Error(
|
|
292
292
|
'screenshot capture returned no image data — the sim is connected but not painting; check `rnx get errors`',
|
|
@@ -300,7 +300,7 @@ async function captureViaBridge(
|
|
|
300
300
|
}
|
|
301
301
|
if (layers) console.log(` layers: ${layers}`)
|
|
302
302
|
|
|
303
|
-
const outputPath = resolve(process.cwd(), outputArg || '/tmp/
|
|
303
|
+
const outputPath = resolve(process.cwd(), outputArg || '/tmp/rnx-inspect.png')
|
|
304
304
|
mkdirSync(dirname(outputPath), { recursive: true })
|
|
305
305
|
const rawBuffer = Buffer.from(base64, 'base64')
|
|
306
306
|
if (withFrame) {
|
|
@@ -347,7 +347,7 @@ function resolveLayers(args: string[]): 'full' | 'tenant' | 'shell' | undefined
|
|
|
347
347
|
return undefined
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
// known flags for `
|
|
350
|
+
// known flags for `rnx screenshot`. booleans take no value, value flags
|
|
351
351
|
// consume the next arg. kept local so this validation can't drift from the
|
|
352
352
|
// flags the command actually reads.
|
|
353
353
|
const SCREENSHOT_BOOLEAN_FLAGS = new Set([
|
|
@@ -435,7 +435,7 @@ function findUnknownFlags(args: string[]): Array<{ flag: string; suggestion?: st
|
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
// resolve output path: prefer --output <path>, fall back to the first
|
|
438
|
-
// positional arg so `
|
|
438
|
+
// positional arg so `rnx screenshot /tmp/foo.png` works the way every
|
|
439
439
|
// other screenshot tool does.
|
|
440
440
|
function resolveOutputPath(args: string[]): string | undefined {
|
|
441
441
|
const explicit = args.find((_, i) => args[i - 1] === '--output')
|
|
@@ -454,7 +454,7 @@ function resolveOutputPath(args: string[]): string | undefined {
|
|
|
454
454
|
// legacy playwright path kept for --gallery / --themes and for no-bridge
|
|
455
455
|
// captures from CI. unchanged except for being extracted into its own fn.
|
|
456
456
|
async function runPlaywrightScreenshot(args: string[], opts: ScreenshotOptions) {
|
|
457
|
-
const output = resolveOutputPath(args) || '
|
|
457
|
+
const output = resolveOutputPath(args) || 'rnx-screenshot.png'
|
|
458
458
|
const gallery = args.includes('--gallery')
|
|
459
459
|
const url =
|
|
460
460
|
args.find((_, i) => args[i - 1] === '--url') ||
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx screenshot appstore capture — headlessly (re)capture an app's App-Store
|
|
2
2
|
// slides as EDITABLE 3-layer refs (captureRef + cleanRef + screenRef, plus
|
|
3
3
|
// threeScene for 3d) and let the shell's existing auto-upload push them to the
|
|
4
4
|
// signed-in user's org deck. NOT a reimplementation of capture/upload: it
|
|
5
5
|
// launches a GPU headless Chrome, loads the org-mode build shell, seeds the
|
|
6
|
-
// `
|
|
6
|
+
// `rnx login` session into the page so the in-browser auto-upload PUTs
|
|
7
7
|
// authenticate as the user, drives the same `SootSim.bridges.screenshotControl`
|
|
8
8
|
// surface the rail UI uses, then waits for the deck/capture PUTs to flush.
|
|
9
9
|
//
|
|
10
|
-
// auth: `
|
|
10
|
+
// auth: `rnx login` (resolveCliAuth → session token). the token is seeded
|
|
11
11
|
// into the shell page's localStorage (`sootsim.session.token`) — the exact key
|
|
12
12
|
// `getSession()` reads, which both the deck PUT (projects-persistence) and the
|
|
13
13
|
// per-ref capture PUT (capture-store) attach as `Authorization: Bearer`.
|
|
@@ -121,7 +121,7 @@ function parseFlags(args: string[]): Flags {
|
|
|
121
121
|
// the session token + origin power both the page auth seed and the API calls.
|
|
122
122
|
// only a logged-in session works here (the in-browser PUTs read a bearer); an
|
|
123
123
|
// api-key/github CliAuth has no browser session origin, so we direct those to
|
|
124
|
-
// `
|
|
124
|
+
// `rnx login` rather than silently failing mid-capture.
|
|
125
125
|
function resolveSessionAuth(): { token: string; origin: string } {
|
|
126
126
|
const auth: CliAuth | null = resolveCliAuth()
|
|
127
127
|
if (auth && auth.kind === 'session') return { token: auth.token, origin: auth.origin }
|
|
@@ -417,7 +417,7 @@ export async function runScreenshotsCapture(args: string[]): Promise<number> {
|
|
|
417
417
|
`${shellOrigin}/build/${encodeURIComponent(flags.org)}/${encodeURIComponent(flags.repo)}/` +
|
|
418
418
|
`${encodeURIComponent(flags.branch)}?platform=${encodeURIComponent(flags.platform)}&ssMode=1`
|
|
419
419
|
|
|
420
|
-
const profileDir = mkdtempSync(join(tmpdir(), '
|
|
420
|
+
const profileDir = mkdtempSync(join(tmpdir(), 'rnx-capture-'))
|
|
421
421
|
const { browser: ctx, reapNow } = await launchReapedChromeScoped(
|
|
422
422
|
(options) => chromium.launchPersistentContext(profileDir, options),
|
|
423
423
|
{
|
package/cli/commands/serve.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx serve — foreground bridge host
|
|
2
2
|
//
|
|
3
3
|
// hosts the WS bridge + runtime HTTP server on port 7668 (or --port) so
|
|
4
4
|
// CLI commands and electron windows both work against one bridge. sims
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import { DEFAULT_SOOTSIM_BRIDGE_PORT } from '../../src/bridge-constants'
|
|
12
12
|
import {
|
|
13
|
-
|
|
13
|
+
ensureRnxHome,
|
|
14
14
|
isDaemonLockfileFresh,
|
|
15
15
|
readDaemonLockfile,
|
|
16
16
|
} from '../../src/home-paths'
|
|
@@ -68,7 +68,7 @@ examples:
|
|
|
68
68
|
rnxExit(1)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
ensureRnxHome()
|
|
72
72
|
// use the explicit upload/auth origin when configured, otherwise production.
|
|
73
73
|
// never probe a local Contrast stack during bridge startup.
|
|
74
74
|
const contrastOrigin = await resolveDefaultUploadOrigin()
|
package/cli/commands/setup.ts
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
writeOnboardingPreferences,
|
|
16
16
|
writePrivacyPreferences,
|
|
17
17
|
} from '../../src/home-paths'
|
|
18
|
-
import {
|
|
18
|
+
import { rnxRuntime } from '../../src/runtime-delivery'
|
|
19
19
|
import { findDesktopCompanion } from '../desktop-companion'
|
|
20
20
|
import { confirm, select } from '../prompt'
|
|
21
21
|
import {
|
|
@@ -87,17 +87,23 @@ export async function runSetup(
|
|
|
87
87
|
const serviceStatus = getDaemonServiceStatus()
|
|
88
88
|
const privacy = readPrivacyPreferences()
|
|
89
89
|
const service = await decideService(options, serviceStatus)
|
|
90
|
+
if (options.dryRun && service && !serviceStatus.installed && !options.json) {
|
|
91
|
+
console.log(` ${muted('Would enable')} ${accent('the background service')}`)
|
|
92
|
+
}
|
|
90
93
|
if (!service && !serviceStatus.installed && !options.json) {
|
|
91
94
|
console.log(` ${muted('Enable it later with')} ${accent('rnx daemon install')}`)
|
|
92
95
|
}
|
|
93
96
|
const simulatorDriver = await decideSimulatorDriver(options)
|
|
97
|
+
if (options.dryRun && !options.json) {
|
|
98
|
+
console.log(
|
|
99
|
+
` ${muted('Would use')} ${accent(simulatorDriver === 'playwright' ? 'Browser' : 'Desktop')}`,
|
|
100
|
+
)
|
|
101
|
+
}
|
|
94
102
|
|
|
95
103
|
const manifest = options.json
|
|
96
|
-
? await
|
|
97
|
-
: await withSpinner('Checking the rnx runtime', () =>
|
|
98
|
-
|
|
99
|
-
)
|
|
100
|
-
const runtimeVersion = sootsimRuntime.resolveVersion(manifest, {
|
|
104
|
+
? await rnxRuntime.fetchManifest()
|
|
105
|
+
: await withSpinner('Checking the rnx runtime', () => rnxRuntime.fetchManifest())
|
|
106
|
+
const runtimeVersion = rnxRuntime.resolveVersion(manifest, {
|
|
101
107
|
channel: 'stable',
|
|
102
108
|
}).version
|
|
103
109
|
const cliVersion = getCliVersion()
|
|
@@ -109,7 +115,7 @@ export async function runSetup(
|
|
|
109
115
|
if (!options.dryRun) {
|
|
110
116
|
const activeRuntime = readActiveRuntime()
|
|
111
117
|
const install = () =>
|
|
112
|
-
|
|
118
|
+
rnxRuntime.install({
|
|
113
119
|
version: runtimeVersion,
|
|
114
120
|
channel: 'stable',
|
|
115
121
|
setActive: true,
|
|
@@ -196,7 +202,9 @@ export async function runSetup(
|
|
|
196
202
|
)
|
|
197
203
|
} else {
|
|
198
204
|
console.log(
|
|
199
|
-
|
|
205
|
+
options.dryRun
|
|
206
|
+
? `\n ${success('✓')} Dry run complete.`
|
|
207
|
+
: `\n ${success('✓')} ${launchConnectRN ? 'ConnectRN is open. ' : ''}rnx is ready.`,
|
|
200
208
|
)
|
|
201
209
|
}
|
|
202
210
|
|
|
@@ -282,7 +290,7 @@ async function decideService(
|
|
|
282
290
|
return true
|
|
283
291
|
}
|
|
284
292
|
if (options.service !== undefined) return options.service
|
|
285
|
-
if (options.yes) return true
|
|
293
|
+
if (options.yes || options.dryRun) return true
|
|
286
294
|
requireInteractive(options, '--service or --no-service')
|
|
287
295
|
printPromptBlock('Background service', [
|
|
288
296
|
'Keeps the local bridge and runtime ready between commands.',
|
|
@@ -297,7 +305,7 @@ async function decideSimulatorDriver(
|
|
|
297
305
|
if (options.simulatorDriver) return options.simulatorDriver
|
|
298
306
|
const current = readSimulatorDriverPreference()
|
|
299
307
|
if (current) return current
|
|
300
|
-
if (options.ci || options.yes) return 'playwright'
|
|
308
|
+
if (options.ci || options.yes || options.dryRun) return 'playwright'
|
|
301
309
|
requireInteractive(options, '--desktop or --browser')
|
|
302
310
|
const desktopDescription =
|
|
303
311
|
process.platform === 'darwin'
|
|
@@ -368,7 +376,7 @@ function runtimeCacheMetadata(runtimeVersion: string) {
|
|
|
368
376
|
const arch = os.arch()
|
|
369
377
|
return {
|
|
370
378
|
path: runtimeDir(runtimeVersion),
|
|
371
|
-
key: `
|
|
379
|
+
key: `rnx-runtime-${platform}-${arch}-${runtimeVersion}`,
|
|
372
380
|
inputs: { platform, arch, runtimeVersion },
|
|
373
381
|
}
|
|
374
382
|
}
|
|
@@ -390,7 +398,7 @@ usage:
|
|
|
390
398
|
rnx setup
|
|
391
399
|
rnx setup --yes
|
|
392
400
|
rnx setup --ci --yes --json
|
|
393
|
-
rnx setup --dry-run
|
|
401
|
+
rnx setup --dry-run
|
|
394
402
|
|
|
395
403
|
choices:
|
|
396
404
|
--service | --no-service
|
package/cli/commands/skills.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx skill - install and inspect agent skill files
|
|
2
2
|
//
|
|
3
3
|
// usage:
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// rnx skill install install all skills to supported agents
|
|
5
|
+
// rnx skill install codex debug install specific skills to Codex only
|
|
6
|
+
// rnx skill show [name] list skills or print one skill
|
|
7
7
|
|
|
8
8
|
import * as fs from 'fs'
|
|
9
9
|
import * as os from 'os'
|
|
@@ -174,7 +174,7 @@ function matchSkills(skills: SkillInfo[], filters: string[]): SkillInfo[] {
|
|
|
174
174
|
if (filters.length === 0) return skills
|
|
175
175
|
const matched = skills.filter((skill) =>
|
|
176
176
|
filters.some((filter) => {
|
|
177
|
-
const needle = filter.replace(/^
|
|
177
|
+
const needle = filter.replace(/^rnx-/, '')
|
|
178
178
|
return (
|
|
179
179
|
skill.name.includes(filter) || skill.name.replace(/^rnx-/, '').includes(needle)
|
|
180
180
|
)
|
package/cli/commands/slides.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx screenshot slides — drive the live screenshot-mode composition from the
|
|
2
2
|
// terminal. same pipeline as the in-shell UI (rail/strip): every mutation
|
|
3
3
|
// goes through the shell's screenshotControl bridge so the browser UI
|
|
4
4
|
// reflects each step live, captures auto-upload, and exports are the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// `
|
|
1
|
+
// `rnx config telemetry on|off` — retained as the command spelling for the
|
|
2
2
|
// product analytics preference shown by guided setup and Settings.
|
|
3
3
|
//
|
|
4
4
|
// this is the process-wide preference; `DO_NOT_TRACK=1` still forces opt-out
|
package/cli/commands/timeline.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
//
|
|
1
|
+
// rnx timeline — control the semantic agent-facing event log
|
|
2
2
|
//
|
|
3
|
-
// `
|
|
3
|
+
// `rnx record` is for video/screen capture; `rnx debug record` is
|
|
4
4
|
// for the engine-internal debug-channel ring; this command is the third
|
|
5
5
|
// surface and explicitly distinct: it manages SootSim.bridges.timeline,
|
|
6
6
|
// the unified, agent-facing semantic event stream across host / shell
|
|
7
7
|
// worker / tenant worker.
|
|
8
8
|
//
|
|
9
9
|
// usage:
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
//
|
|
14
|
-
//
|
|
10
|
+
// rnx timeline status # what's enabled
|
|
11
|
+
// rnx timeline start [kinds] # enable kinds (default: opt-in defaults)
|
|
12
|
+
// rnx timeline stop [kinds] # disable kinds (or 'all')
|
|
13
|
+
// rnx timeline clear # drop all events + cursors
|
|
14
|
+
// rnx timeline dump <file> # write current ring to JSON
|
|
15
15
|
//
|
|
16
|
-
// see `
|
|
16
|
+
// see `rnx what-happened` for the read side.
|
|
17
17
|
|
|
18
18
|
import { writeFileSync } from 'fs'
|
|
19
19
|
import { rnxExit } from '../run-rnx'
|