rnxsim 0.1.315 → 0.1.317
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/cli/commands/control.ts +20 -3
- package/cli/commands/flow.ts +23 -11
- package/cli/commands/inspect.ts +51 -3
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-CBU2WDKV.js → agent-EKGLRJEN.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-UNB4R27L.js → agent-wrapper-FONNWB7J.js} +2 -2
- package/dist-cli/chunks/{app-fonts-YMLRF3JD.js → app-fonts-XPM54HRY.js} +2 -2
- package/dist-cli/chunks/{assert-5N6HUCL5.js → assert-PILHTZRZ.js} +2 -2
- package/dist-cli/chunks/{auth-BHDR3A6G.js → auth-Q2VUD5NQ.js} +2 -2
- package/dist-cli/chunks/{beta-LWUVCPYK.js → beta-P4XLZ3KL.js} +2 -2
- package/dist-cli/chunks/{camera-CNO6B2JZ.js → camera-O4PEVPI4.js} +2 -2
- package/dist-cli/chunks/{chunk-MSSY4EEZ.js → chunk-2SAOKV6V.js} +1 -1
- package/dist-cli/chunks/{chunk-ZWX6DDIS.js → chunk-3G7I72XV.js} +2 -2
- package/dist-cli/chunks/{chunk-26WMWUH4.js → chunk-5BYFLVSZ.js} +1 -1
- package/dist-cli/chunks/{chunk-Y2MWQKOS.js → chunk-5XVHBFAT.js} +3 -3
- package/dist-cli/chunks/{chunk-RVM4EZ4E.js → chunk-67OCUGZD.js} +2 -2
- package/dist-cli/chunks/{chunk-C5O5CTXJ.js → chunk-67ZR7PU7.js} +1 -1
- package/dist-cli/chunks/{chunk-AOGGOC4V.js → chunk-6WG4RQKM.js} +2 -2
- package/dist-cli/chunks/{chunk-PVL7XSPN.js → chunk-744422UA.js} +1 -1
- package/dist-cli/chunks/{chunk-XSSHENNY.js → chunk-7Q7IQ2SS.js} +2 -2
- package/dist-cli/chunks/{chunk-UROXJVY3.js → chunk-A3GVXVSG.js} +2 -2
- package/dist-cli/chunks/{chunk-MCKQH4AM.js → chunk-ADAIY3DX.js} +2 -2
- package/dist-cli/chunks/{chunk-OF2HTH25.js → chunk-ARICQ4CG.js} +2 -2
- package/dist-cli/chunks/{chunk-XOXGC3EH.js → chunk-ATOUAYJP.js} +1 -1
- package/dist-cli/chunks/{chunk-JZ6VTZ5B.js → chunk-BJ5CYKA7.js} +3 -3
- package/dist-cli/chunks/{chunk-WMZ7NJAO.js → chunk-CHKTOWRH.js} +131 -131
- package/dist-cli/chunks/{chunk-SZKSFMWS.js → chunk-CUILVYWI.js} +1 -1
- package/dist-cli/chunks/{chunk-XZ6O67AR.js → chunk-EL23MRFL.js} +1 -1
- package/dist-cli/chunks/{chunk-YY24QI25.js → chunk-FIPCJ5OS.js} +1 -1
- package/dist-cli/chunks/{chunk-6ZMRJPKI.js → chunk-GMWPCQ63.js} +1 -1
- package/dist-cli/chunks/{chunk-QR7MWAWE.js → chunk-GQ3D2D4O.js} +1 -1
- package/dist-cli/chunks/{chunk-KQSJVNFE.js → chunk-HF4NZ5SD.js} +2 -2
- package/dist-cli/chunks/{chunk-54MIRTFE.js → chunk-HJKQ6NEU.js} +5 -5
- package/dist-cli/chunks/{chunk-D3M36D7O.js → chunk-J4MCKLWE.js} +23 -23
- package/dist-cli/chunks/{chunk-PVPAP3TV.js → chunk-JQ4Y2XVT.js} +1 -1
- package/dist-cli/chunks/{chunk-TEL7G234.js → chunk-JZXCQEKO.js} +2 -2
- package/dist-cli/chunks/{chunk-4LTBK3ZN.js → chunk-KO7UG262.js} +2 -2
- package/dist-cli/chunks/{chunk-WUXCH6WN.js → chunk-KZS5VM6Y.js} +1 -1
- package/dist-cli/chunks/{chunk-DNCNFZ7V.js → chunk-LSC2HFAB.js} +1 -1
- package/dist-cli/chunks/{chunk-PXNAZYGV.js → chunk-NA4AMR2E.js} +1 -1
- package/dist-cli/chunks/{chunk-QR3HTFRB.js → chunk-NF63TOPI.js} +2 -2
- package/dist-cli/chunks/{chunk-N5ZCYP5F.js → chunk-NUSBQSRQ.js} +2 -2
- package/dist-cli/chunks/{chunk-RJIEZ2NY.js → chunk-O6OIXJ54.js} +1 -1
- package/dist-cli/chunks/{chunk-BPCDO7ST.js → chunk-ODHQKXLB.js} +2 -2
- package/dist-cli/chunks/{chunk-2JZ53D4A.js → chunk-OO5D7IJE.js} +1 -1
- package/dist-cli/chunks/{chunk-56H6EVO4.js → chunk-OWADERTW.js} +2 -2
- package/dist-cli/chunks/{chunk-NCKAD3V7.js → chunk-OXSCF4UD.js} +2 -2
- package/dist-cli/chunks/{chunk-L4JZKVCC.js → chunk-QCQQ2VDW.js} +2 -2
- package/dist-cli/chunks/{chunk-FNTTIR2P.js → chunk-QGPNBTHT.js} +2 -2
- package/dist-cli/chunks/{chunk-OXS2IWO2.js → chunk-R6DDJVBB.js} +2 -2
- package/dist-cli/chunks/{chunk-LT6UC7I3.js → chunk-R6MEMDNB.js} +2 -2
- package/dist-cli/chunks/{chunk-CMM64PPR.js → chunk-RCPPPW7B.js} +1 -1
- package/dist-cli/chunks/{chunk-MF7WUHQ3.js → chunk-RG3CME4Y.js} +2 -2
- package/dist-cli/chunks/{chunk-H362IX2I.js → chunk-S23KHLTR.js} +2 -2
- package/dist-cli/chunks/{chunk-J6HMTUZH.js → chunk-SZIPYT3D.js} +2 -2
- package/dist-cli/chunks/{chunk-U2HNIHBY.js → chunk-T6W3B2KA.js} +1 -1
- package/dist-cli/chunks/{chunk-O2KRHVTU.js → chunk-TUFL7CQK.js} +2 -2
- package/dist-cli/chunks/{chunk-LP2BTEJ6.js → chunk-VB2ZZ4JI.js} +2 -2
- package/dist-cli/chunks/{chunk-25VCR44B.js → chunk-VUKB6JW3.js} +1 -1
- package/dist-cli/chunks/{chunk-WM32MGTJ.js → chunk-W4YHMJOO.js} +2 -2
- package/dist-cli/chunks/{chunk-657SQG4D.js → chunk-WJVNVBAI.js} +1 -1
- package/dist-cli/chunks/{chunk-26CSIR76.js → chunk-WWW5DC3G.js} +2 -2
- package/dist-cli/chunks/{chunk-2POODCTW.js → chunk-YRVJHPCU.js} +2 -2
- package/dist-cli/chunks/{cleanup-F3NUJ3SL.js → cleanup-O6IWLGDY.js} +2 -2
- package/dist-cli/chunks/cli-version-F2R7SUY7.js +4 -0
- package/dist-cli/chunks/{compat-AX2SEPTH.js → compat-562BT6JM.js} +2 -2
- package/dist-cli/chunks/{config-4QQO5JVU.js → config-7RO6O45J.js} +2 -2
- package/dist-cli/chunks/{control-OCKKSOWA.js → control-XYKZG442.js} +2 -2
- package/dist-cli/chunks/daemon-WE37QLQC.js +4 -0
- package/dist-cli/chunks/{debug-T6MWVEVX.js → debug-3VCEOVRM.js} +3 -3
- package/dist-cli/chunks/{desktop-NCW7R7CB.js → desktop-K3PPS6VL.js} +3 -3
- package/dist-cli/chunks/{detox-G6GITO2X.js → detox-6ODNKASO.js} +2 -2
- package/dist-cli/chunks/{device-7BTEJCTH.js → device-NZCR7JIN.js} +2 -2
- package/dist-cli/chunks/{diagnose-SC5LACE3.js → diagnose-VVJY6RF2.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-KK56QQZA.js → disk-cleanup-2VJMHUIY.js} +2 -2
- package/dist-cli/chunks/drivers-44ZJZ37B.js +4 -0
- package/dist-cli/chunks/{film-WGYEHGIA.js → film-CEMBA2DA.js} +3 -3
- package/dist-cli/chunks/flow-ORGIXYVS.js +4 -0
- package/dist-cli/chunks/help-UW52M7FZ.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-CWTZWH3L.js → hidden-runtime-alias-R2QQLZZA.js} +2 -2
- package/dist-cli/chunks/{home-paths-EBT4XHAS.js → home-paths-TKPTU62O.js} +2 -2
- package/dist-cli/chunks/inspect-TNFI6C6G.js +4 -0
- package/dist-cli/chunks/install-desktop-NEJEPL4L.js +4 -0
- package/dist-cli/chunks/{login-GSYOTGVQ.js → login-CIQT627K.js} +4 -4
- package/dist-cli/chunks/{logout-JPRIR7YK.js → logout-V2DJVY3U.js} +2 -2
- package/dist-cli/chunks/{maestro-LXKDNO5M.js → maestro-YSZ6ZC5C.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-5ZIKOU53.js → maestro-generate-6JUELIXK.js} +3 -3
- package/dist-cli/chunks/{mode-N3QHXCES.js → mode-D4HQ6YN3.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-XDH6X24N.js → optional-demo-registry-AC6YJKT4.js} +2 -2
- package/dist-cli/chunks/{perf-VOPL26FM.js → perf-5GRZ4G5X.js} +2 -2
- package/dist-cli/chunks/{permissions-CZFKM4UD.js → permissions-4V6UVWGK.js} +2 -2
- package/dist-cli/chunks/{record-FODSOGMA.js → record-IDNLOQLR.js} +3 -3
- package/dist-cli/chunks/{report-issue-FBPCZKOV.js → report-issue-TF6R77TT.js} +2 -2
- package/dist-cli/chunks/reset-D7WAFOZO.js +4 -0
- package/dist-cli/chunks/runtime-O5TNQBYH.js +4 -0
- package/dist-cli/chunks/{screenshot-command-7S3FYVO7.js → screenshot-command-CHJN7WUT.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-CDYHPNC3.js → screenshot-layers-MSDCGYNE.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-EBIIY2YU.js → screenshots-capture-OGP3OQYR.js} +2 -2
- package/dist-cli/chunks/{serve-NELNSCZP.js → serve-GPBLCMXX.js} +2 -2
- package/dist-cli/chunks/{setup-DF5ZDDIV.js → setup-S2KYWZZO.js} +2 -2
- package/dist-cli/chunks/{skills-E2QZF6WZ.js → skills-AUS5DTUE.js} +2 -2
- package/dist-cli/chunks/{state-MBZDKZ7U.js → state-QLYTMIKF.js} +2 -2
- package/dist-cli/chunks/{storage-J5BMNVXM.js → storage-2MNS4TYO.js} +2 -2
- package/dist-cli/chunks/store-UT52X7AA.js +4 -0
- package/dist-cli/chunks/telemetry-CAQVTTHY.js +4 -0
- package/dist-cli/chunks/{timeline-MC6N5BHY.js → timeline-EUHPXPFP.js} +2 -2
- package/dist-cli/chunks/{upgrade-7UTU53DH.js → upgrade-JMMBM3ZN.js} +2 -2
- package/dist-cli/chunks/upload-CEX4UBJL.js +4 -0
- package/dist-cli/chunks/{version-VNACNYQK.js → version-QCF7RCA2.js} +2 -2
- package/dist-cli/chunks/{web-MGJ2TUKR.js → web-WPYHMOVH.js} +2 -2
- package/dist-cli/chunks/{what-happened-7DLKH3OD.js → what-happened-3RNZP4MB.js} +2 -2
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- 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.cjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +1 -1
- 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/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +1 -1
- 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.cjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +21 -4
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/cli-version-XIW6O3FG.js +0 -4
- package/dist-cli/chunks/daemon-N5VLMYKQ.js +0 -4
- package/dist-cli/chunks/drivers-NPGVBWMG.js +0 -4
- package/dist-cli/chunks/flow-KQBIBM3N.js +0 -4
- package/dist-cli/chunks/help-G7CAKI65.js +0 -4
- package/dist-cli/chunks/inspect-CCPZXVDU.js +0 -4
- package/dist-cli/chunks/install-desktop-NZ3VGTQZ.js +0 -4
- package/dist-cli/chunks/reset-3H35GFO3.js +0 -4
- package/dist-cli/chunks/runtime-4OVFRXV5.js +0 -4
- package/dist-cli/chunks/store-U3DXC7HH.js +0 -4
- package/dist-cli/chunks/telemetry-XIPJVT5E.js +0 -4
- package/dist-cli/chunks/upload-2M2KOTYI.js +0 -4
package/cli/commands/control.ts
CHANGED
|
@@ -70,6 +70,7 @@ import type { DriverId, DriverLaunchResult } from '../drivers/types'
|
|
|
70
70
|
interface ControlCommandOptions {
|
|
71
71
|
port?: number
|
|
72
72
|
timeoutMs?: number
|
|
73
|
+
runtimeConfig?: SootSimConfig
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
interface DriverConnectWaitOptions {
|
|
@@ -1233,11 +1234,24 @@ function printOpenedSim(
|
|
|
1233
1234
|
| 'current sim'
|
|
1234
1235
|
| `${string} driver`,
|
|
1235
1236
|
) {
|
|
1236
|
-
|
|
1237
|
+
const [printableOpenUrl, printableSimUrl] = [openUrl, sim.url].map((value) => {
|
|
1238
|
+
if (!value) return value
|
|
1239
|
+
try {
|
|
1240
|
+
const parsed = new URL(value)
|
|
1241
|
+
if (parsed.searchParams.has('sootsimConfig')) {
|
|
1242
|
+
parsed.searchParams.set('sootsimConfig', '[redacted]')
|
|
1243
|
+
return parsed.toString()
|
|
1244
|
+
}
|
|
1245
|
+
} catch {}
|
|
1246
|
+
return value
|
|
1247
|
+
})
|
|
1248
|
+
console.log(
|
|
1249
|
+
` ${mode === 'current sim' ? 'loaded' : 'opened'}: ${printableOpenUrl} [${mode}]`,
|
|
1250
|
+
)
|
|
1237
1251
|
// agents pipe around the JSON to grab the id; humans just want to know
|
|
1238
1252
|
// the current sim got updated without scanning the JSON blob.
|
|
1239
1253
|
console.log(` current sim: ${sim.id}`)
|
|
1240
|
-
console.log(JSON.stringify({ simId: sim.id, url:
|
|
1254
|
+
console.log(JSON.stringify({ simId: sim.id, url: printableSimUrl }, null, 2))
|
|
1241
1255
|
}
|
|
1242
1256
|
|
|
1243
1257
|
// after a successful open, agents almost always want to know what's on the
|
|
@@ -1513,7 +1527,10 @@ export async function runOpenCommand(args: string[], opts: ControlCommandOptions
|
|
|
1513
1527
|
const appConfig = await loadSootSimAppConfig(project)
|
|
1514
1528
|
const configuredRuntimeVersion = appConfig?.runtimeVersion
|
|
1515
1529
|
const runtimeConfig = mergeSootSimConfig(
|
|
1516
|
-
|
|
1530
|
+
mergeSootSimConfig(
|
|
1531
|
+
appConfig ? { ...appConfig, runtimeVersion: undefined } : undefined,
|
|
1532
|
+
opts.runtimeConfig,
|
|
1533
|
+
),
|
|
1517
1534
|
commandConfig,
|
|
1518
1535
|
)
|
|
1519
1536
|
if (configuredRuntimeVersion) {
|
package/cli/commands/flow.ts
CHANGED
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
} from './control'
|
|
35
35
|
import { printShellPerfReport } from './inspect'
|
|
36
36
|
import { resolveDefaultUploadOrigin } from './upload'
|
|
37
|
+
import type { SootSimConfig } from '../../src/config'
|
|
37
38
|
import type { UploadResult } from './upload'
|
|
38
39
|
|
|
39
40
|
export { parseFlowFile, validateFlowFile } from '../flow-file'
|
|
@@ -53,23 +54,32 @@ export function getLastFlowTraceSteps(): SootSimFlowTraceStep[] {
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
// resolve a frontmatter `app:` value that may be a port, a URL, or a
|
|
56
|
-
// registered demo name (`bluesky`, `3pc`, `uniswap`, …).
|
|
57
|
-
//
|
|
58
|
-
// the
|
|
59
|
-
async function resolveAppFrontmatterTarget(
|
|
60
|
-
|
|
57
|
+
// registered demo name (`bluesky`, `3pc`, `uniswap`, …). ports and URLs pass
|
|
58
|
+
// through untouched. a registered name also carries the launcher's preferred
|
|
59
|
+
// port and runtime config into the open command.
|
|
60
|
+
export async function resolveAppFrontmatterTarget(
|
|
61
|
+
raw: string,
|
|
62
|
+
): Promise<{ target: string; runtimeConfig?: SootSimConfig }> {
|
|
63
|
+
if (!raw) return { target: '' }
|
|
61
64
|
const trimmed = raw.trim()
|
|
62
|
-
if (!trimmed) return ''
|
|
63
|
-
if (/^\d+$/.test(trimmed)) return trimmed
|
|
64
|
-
if (trimmed.startsWith('http://') || trimmed.startsWith('https://'))
|
|
65
|
+
if (!trimmed) return { target: '' }
|
|
66
|
+
if (/^\d+$/.test(trimmed)) return { target: trimmed }
|
|
67
|
+
if (trimmed.startsWith('http://') || trimmed.startsWith('https://')) {
|
|
68
|
+
return { target: trimmed }
|
|
69
|
+
}
|
|
65
70
|
// try a case-insensitive name match against the OPTIONAL internal demo
|
|
66
71
|
// registry (in-repo only; empty on a published install). unknown strings
|
|
67
72
|
// fall through unchanged so other targets (host:port, raw bundle URLs
|
|
68
73
|
// without a scheme) still reach the legacy resolver.
|
|
69
74
|
const apps = await loadOptionalDemoApps()
|
|
70
75
|
const match = apps.find((app) => app.name.toLowerCase() === trimmed.toLowerCase())
|
|
71
|
-
if (match)
|
|
72
|
-
|
|
76
|
+
if (match) {
|
|
77
|
+
return {
|
|
78
|
+
target: String(match.preferredPort),
|
|
79
|
+
runtimeConfig: match.runtimeConfig,
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return { target: trimmed }
|
|
73
83
|
}
|
|
74
84
|
|
|
75
85
|
// discover a sootsim shell URL — prefer patched servers, fall back to any match.
|
|
@@ -276,7 +286,8 @@ flow extension:
|
|
|
276
286
|
: frontmatter.app
|
|
277
287
|
// accept `app: <demo-name>` (e.g. `app: 3pc`) in addition to ports/URLs.
|
|
278
288
|
// resolve via APPS — the launcher's preferredPort is the explicit target.
|
|
279
|
-
const
|
|
289
|
+
const targetAppResolution = await resolveAppFrontmatterTarget(rawTargetApp)
|
|
290
|
+
const targetApp = targetAppResolution.target
|
|
280
291
|
|
|
281
292
|
const bridgeArgOptions = {
|
|
282
293
|
stripBooleanFlags: [
|
|
@@ -422,6 +433,7 @@ flow extension:
|
|
|
422
433
|
await runOpenCommand(openArgs, {
|
|
423
434
|
port: parsedBridgeArgs.wsPort,
|
|
424
435
|
timeoutMs: parsedBridgeArgs.commandTimeoutMs,
|
|
436
|
+
runtimeConfig: targetAppResolution.runtimeConfig,
|
|
425
437
|
})
|
|
426
438
|
if (closeManagedDriverSimAfterRun) {
|
|
427
439
|
const openedSimId = readCurrentSimId()
|
package/cli/commands/inspect.ts
CHANGED
|
@@ -500,6 +500,11 @@ function printRenderProfile(worker: string, rp: Record<string, any> | undefined)
|
|
|
500
500
|
export function printShellPerfReport(result: Record<string, any>) {
|
|
501
501
|
const fps = result.avgMs > 0 ? (1000 / result.avgMs).toFixed(1) : '?'
|
|
502
502
|
const jank = result.jank && typeof result.jank === 'object' ? result.jank : null
|
|
503
|
+
const production =
|
|
504
|
+
result.compositorProduction && typeof result.compositorProduction === 'object'
|
|
505
|
+
? result.compositorProduction
|
|
506
|
+
: null
|
|
507
|
+
const budgetMs = production?.budgetMs ?? 8
|
|
503
508
|
console.log(` shell frame profile:\n`)
|
|
504
509
|
if (jank) {
|
|
505
510
|
const compositor = Array.isArray(jank.compositor) ? jank.compositor : []
|
|
@@ -521,21 +526,64 @@ export function printShellPerfReport(result: Record<string, any>) {
|
|
|
521
526
|
console.log(` shell p50/95/99:${result.p50} / ${result.p95} / ${result.p99} ms`)
|
|
522
527
|
if (jank) {
|
|
523
528
|
console.log(
|
|
524
|
-
` shell jank: ${jank.shell?.jankFrames ?? 0}/${jank.shell?.sampledFrames ?? 0} (${jank.shell?.jankPct ?? 0}%)
|
|
529
|
+
` shell jank: ${jank.shell?.jankFrames ?? 0}/${jank.shell?.sampledFrames ?? 0} (${jank.shell?.jankPct ?? 0}%) >${budgetMs}ms · max ${jank.shell?.maxMs ?? 0}ms`,
|
|
525
530
|
)
|
|
526
531
|
for (const surface of Array.isArray(jank.compositor) ? jank.compositor : []) {
|
|
527
532
|
console.log(
|
|
528
|
-
` ${String(surface.surfaceId).padEnd(12)} ${surface.jankPaints}/${surface.sampledPaints} compositor paints (${surface.jankPct}%)
|
|
533
|
+
` ${String(surface.surfaceId).padEnd(12)} ${surface.jankPaints}/${surface.sampledPaints} compositor paints (${surface.jankPct}%) >${budgetMs}ms · max ${surface.maxMs}ms`,
|
|
529
534
|
)
|
|
530
535
|
}
|
|
531
536
|
} else {
|
|
532
537
|
console.log(
|
|
533
|
-
` jank: ${result.jankFrames} frames (${result.jankPct}%)
|
|
538
|
+
` jank: ${result.jankFrames} frames (${result.jankPct}%) >${budgetMs}ms`,
|
|
534
539
|
)
|
|
535
540
|
}
|
|
536
541
|
console.log(
|
|
537
542
|
` avg per frame: overlay ${result.avgOverlayMs}ms · aux ${result.avgAuxMs}ms · layout ${result.avgLayoutMs}ms`,
|
|
538
543
|
)
|
|
544
|
+
if (production) {
|
|
545
|
+
const frames = production.frames ?? {}
|
|
546
|
+
console.log(``)
|
|
547
|
+
console.log(` compositor production (${budgetMs}ms budget):`)
|
|
548
|
+
console.log(
|
|
549
|
+
` frames: ${frames.count ?? 0} · avg ${Number(frames.avg ?? 0).toFixed(2)} / p95 ${Number(frames.p95 ?? 0).toFixed(2)} / max ${Number(frames.max ?? 0).toFixed(2)} ms · ${production.overBudget ?? 0} over budget (${production.overBudgetPct ?? 0}%)`,
|
|
550
|
+
)
|
|
551
|
+
const phaseNames = [
|
|
552
|
+
['javascript', 'javascript'],
|
|
553
|
+
['layout', 'layout'],
|
|
554
|
+
['paint', 'paint'],
|
|
555
|
+
['prewarm', 'prewarm'],
|
|
556
|
+
['texture upload', 'textureUpload'],
|
|
557
|
+
['gpu submit', 'gpuSubmit'],
|
|
558
|
+
['composite', 'composite'],
|
|
559
|
+
['capture/readback', 'capture'],
|
|
560
|
+
] as const
|
|
561
|
+
for (const [label, key] of phaseNames) {
|
|
562
|
+
const phase = production.phases?.[key]
|
|
563
|
+
if (!phase?.count || (!phase.max && !phase.avg)) continue
|
|
564
|
+
console.log(
|
|
565
|
+
` ${label.padEnd(16)} avg ${Number(phase.avg ?? 0).toFixed(2)} / p95 ${Number(phase.p95 ?? 0).toFixed(2)} / max ${Number(phase.max ?? 0).toFixed(2)} ms`,
|
|
566
|
+
)
|
|
567
|
+
}
|
|
568
|
+
const capture = production.captureBetweenFrames
|
|
569
|
+
if (capture?.count && capture.max > 0) {
|
|
570
|
+
console.log(
|
|
571
|
+
` capture between p95 ${Number(capture.p95 ?? 0).toFixed(2)} / max ${Number(capture.max ?? 0).toFixed(2)} ms between compositor rAF callbacks`,
|
|
572
|
+
)
|
|
573
|
+
}
|
|
574
|
+
const worstProduction = Array.isArray(production.worstFrames)
|
|
575
|
+
? production.worstFrames.slice(0, 5)
|
|
576
|
+
: []
|
|
577
|
+
if (worstProduction.length > 0) {
|
|
578
|
+
console.log(` worst frames:`)
|
|
579
|
+
for (const frame of worstProduction) {
|
|
580
|
+
const phases = frame.phases ?? {}
|
|
581
|
+
console.log(
|
|
582
|
+
` ${Number(frame.productionMs ?? 0).toFixed(2)}ms frame ${frame.frameToken ?? '?'} · js ${Number(phases.javascriptMs ?? 0).toFixed(2)} · layout ${Number(phases.layoutMs ?? 0).toFixed(2)} · paint ${Number(phases.paintMs ?? 0).toFixed(2)} · prewarm ${Number(phases.prewarmMs ?? 0).toFixed(2)} · upload ${Number(phases.textureUploadMs ?? 0).toFixed(2)} · submit ${Number(phases.gpuSubmitMs ?? 0).toFixed(2)} · composite ${Number(phases.compositeMs ?? 0).toFixed(2)} · capture ${Number(phases.captureMs ?? 0).toFixed(2)}`,
|
|
583
|
+
)
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}
|
|
539
587
|
const cadence = result.cadence
|
|
540
588
|
if (cadence && typeof cadence === 'object') {
|
|
541
589
|
console.log(``)
|
package/dist-cli/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! rnx v0.1.
|
|
2
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
3
3
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
4
4
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
5
|
-
import{a as g,b as f}from"./chunks/chunk-
|
|
5
|
+
import{a as g,b as f}from"./chunks/chunk-O6OIXJ54.js";import{a as m}from"./chunks/chunk-CUILVYWI.js";import"./chunks/chunk-5BYFLVSZ.js";function A(a){let t=a instanceof Error?a.message:String(a);(/^command timed out after \d+s$/.test(t)||t.startsWith("sim disconnected:")||t.startsWith("bridge never reconnected")||t.startsWith("multiple sims are connected:")||t.startsWith("saved sim ")||t.startsWith("no sim connected with id ")||t.startsWith("could not connect to ws://")||t.startsWith("rnx bridge daemon is not running")||t.startsWith("rnx bridge lockfile is fresh")||t.startsWith("rnx bridge exited before becoming ready")||t.startsWith(`${m.commandName} open: requested bridge port`)||t.startsWith("background daemon setup is unavailable")||t.startsWith("rnx bridge did not start within"))&&!process.env.SOOTSIM_VERBOSE&&(process.stderr.write(` ${t}
|
|
6
6
|
`),process.exit(1)),a instanceof Error&&a.stack?process.stderr.write(`${a.stack}
|
|
7
7
|
`):process.stderr.write(`${t}
|
|
8
8
|
`),process.exit(1)}process.on("unhandledRejection",A);process.on("uncaughtException",A);var v=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,S=new Set(["desktop"]);function _(a){!v||!S.has(a)||(process.stderr.write(` ${m.commandName} ${a} isn't available in the standalone binary \u2014
|
|
9
9
|
it needs vite / electron / playwright from a project's node_modules.
|
|
10
10
|
run the npm package instead:
|
|
11
11
|
${m.commandName} ${a}
|
|
12
|
-
`),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-
|
|
13
|
-
`)}var h=!1;async function k(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-
|
|
12
|
+
`),process.exit(1))}var e=f(process.argv);if(!e.command&&e.commandArgs.length>0){let{resolveHiddenRuntimeAlias:a}=await import("./chunks/hidden-runtime-alias-R2QQLZZA.js");e=a(e)}var C=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker";if(!C){let{trackCliEvent:a}=await import("./chunks/telemetry-CAQVTTHY.js");a({event:"cli_command_invoked",properties:{command:e.command||(e.version?"version":e.help?"help":"none"),arg_count:e.commandArgs.length,platform:process.platform,arch:process.arch,node_version:process.versions.node}})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-TKPTU62O.js"),t=a();t&&process.stderr.write(` ${m.name} engine upgraded to v${t.to}`+(t.from?` (from v${t.from})`:"")+` \xB7 what's new: ${m.origin}/changelog
|
|
13
|
+
`)}var h=!1;async function k(){if(!h&&(h=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{isAutomaticSootsimCleanupComplete:a}=await import("./chunks/disk-cleanup-2VJMHUIY.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=v?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",u=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${u.message}
|
|
14
14
|
`)}),p.unref()}catch(a){process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${a instanceof Error?a.message:String(a)}
|
|
15
|
-
`)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-
|
|
15
|
+
`)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-CAQVTTHY.js");await t(),await k(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-F2R7SUY7.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-P4XLZ3KL.js"),d=t?` \xB7 ${i}`:"";console.log(`rnxsim v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-TKPTU62O.js"),u=p();console.log(u?`runtime v${u}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-UW52M7FZ.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,w=e.globalFlags.device,l=e.globalFlags.theme,E=e.globalFlags.driver,N=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-UT52X7AA.js"),t={};w&&(t.deviceModel=w),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runSetup:a,shouldRunSetupForBareCommand:t}=await import("./chunks/setup-S2KYWZZO.js");t()&&(await a(["--from-welcome"]),await o(0));let{printHelp:i}=await import("./chunks/help-UW52M7FZ.js");i(),await o(0)}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(" run `rnxsim --help` to see the full surface."),await o(1)}let{printHelp:a}=await import("./chunks/help-UW52M7FZ.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-AUS5DTUE.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-QLYTMIKF.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-D7WAFOZO.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-UW52M7FZ.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-UW52M7FZ.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}_(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-TNFI6C6G.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-PILHTZRZ.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-6ODNKASO.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-YSZ6ZC5C.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-IDNLOQLR.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-CEMBA2DA.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-2MNS4TYO.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-QLYTMIKF.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-D7WAFOZO.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-5GRZ4G5X.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-CHJN7WUT.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-O4PEVPI4.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-D4HQ6YN3.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-4V6UVWGK.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"inspect":{let{runInspect:a}=await import("./chunks/inspect-TNFI6C6G.js");await a(r,{port:n,verbose:c});break}case"debug":{let{runDebug:a}=await import("./chunks/debug-3VCEOVRM.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-EUHPXPFP.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-3RNZP4MB.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-XYKZG442.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-XYKZG442.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-XYKZG442.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-XYKZG442.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-NZCR7JIN.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-562BT6JM.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-TF6R77TT.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-K3PPS6VL.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-CIQT627K.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-V2DJVY3U.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-Q2VUD5NQ.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-S2KYWZZO.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-GPBLCMXX.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-WE37QLQC.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-O5TNQBYH.js");await a(e.commandArgs);break}case"upgrade":case"update":{let{runUpgrade:a}=await import("./chunks/upgrade-JMMBM3ZN.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-QCF7RCA2.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-EKGLRJEN.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-FONNWB7J.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-AUS5DTUE.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-XPM54HRY.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-7RO6O45J.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-O6IWLGDY.js"),t=await a(e.commandArgs);await o(t)}default:console.error(` unknown command: ${s}`),console.error(" run `rnxsim --help` to see the full surface."),await o(1)}await k();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-
|
|
4
|
+
import{a as b,b as E,c as A,d as l,e as S,g as x,h as j,j as T,n as I,o as k,p as D,q as g,r as O,s as C}from"./chunk-RG3CME4Y.js";import"./chunk-NA4AMR2E.js";import{c as $}from"./chunk-NUSBQSRQ.js";import"./chunk-S23KHLTR.js";import"./chunk-TUFL7CQK.js";import"./chunk-67OCUGZD.js";import"./chunk-R6MEMDNB.js";import"./chunk-A3GVXVSG.js";import"./chunk-GMWPCQ63.js";import"./chunk-VUKB6JW3.js";import{j as y}from"./chunk-ATOUAYJP.js";import"./chunk-OXSCF4UD.js";import"./chunk-CUILVYWI.js";import"./chunk-2SAOKV6V.js";import"./chunk-5BYFLVSZ.js";import w from"node:fs";import d from"node:path";import{spawn as _}from"node:child_process";import F from"node:net";import{WebSocket as R}from"ws";var c=class extends Error{code;constructor(e,t){super(e),this.name="AgentDaemonError",this.code=t}},f=class{ws;port;commandTimeoutMs;ready;closed=!1;nextId=1;pending=new Map;eventListeners=new Set;statusListeners=new Set;disconnectListeners=new Set;constructor(e={}){this.port=e.port??7668,this.commandTimeoutMs=e.commandTimeoutMs??15e3,this.ws=new R(`ws://localhost:${this.port}`),this.ready=new Promise((t,r)=>{let s=()=>{this.ws.off("error",o),t()},o=i=>{this.ws.off("open",s),r(new c(`could not connect to rnx daemon on port ${this.port}: ${i.message}`,"NO_DAEMON"))};this.ws.once("open",s),this.ws.once("error",o)}),this.ws.on("message",t=>this.handleMessage(t)),this.ws.on("close",()=>this.handleClose()),this.ws.on("error",()=>{})}async waitReady(){return this.ready}async listProjects(){return this.send("agent:list-projects")}async upsertProject(e){return this.send("agent:upsert-project",{input:e})}async deleteProject(e){return this.send("agent:delete-project",{projectId:e})}async autoAttachForUrl(e){return this.send("agent:auto-attach-for-url",{input:e})}async listSessions(e){return this.send("agent:list-sessions",{projectId:e})}async startSession(e){return this.send("agent:start-session",{input:e})}async sendPrompt(e,t){return this.send("agent:send-prompt",{sessionId:e,prompt:t})}async sendClaimedPrompt(e,t){return this.send("agent:send-claimed-prompt",{simId:e,prompt:t})}async endSession(e){return this.send("agent:end-session",{sessionId:e})}async getTranscript(e){return this.send("agent:get-transcript",{sessionId:e})}async getPaths(){return this.send("agent:get-paths")}async subscribeEvents(e){return this.send("agent:subscribe-events",{sessionId:e})}async unsubscribeEvents(e){return this.send("agent:unsubscribe-events",{sessionId:e})}onAgentEvent(e){return this.eventListeners.add(e),()=>this.eventListeners.delete(e)}onSessionStatusChange(e){return this.statusListeners.add(e),()=>this.statusListeners.delete(e)}onDisconnect(e){return this.disconnectListeners.add(e),()=>this.disconnectListeners.delete(e)}close(){if(!this.closed){this.closed=!0;try{this.ws.close()}catch{}}}async send(e,t={}){if(await this.ready,this.closed||this.ws.readyState!==R.OPEN)throw new c("daemon connection is closed","NO_DAEMON");let r=this.nextId++;return new Promise((s,o)=>{let i=setTimeout(()=>{this.pending.delete(r),o(new c(`${e} timed out after ${Math.round(this.commandTimeoutMs/1e3)}s`,"TIMEOUT"))},this.commandTimeoutMs);this.pending.set(r,{resolve:s,reject:o,timer:i});try{this.ws.send(JSON.stringify({id:r,type:e,...t}))}catch(a){clearTimeout(i),this.pending.delete(r),o(a instanceof Error?a:new Error(String(a)))}})}handleMessage(e){let t;try{t=JSON.parse(String(e))}catch{return}if(!t||typeof t!="object")return;if(t.type==="agent:event"){for(let s of this.eventListeners)try{s({sessionId:t.sessionId,event:t.event})}catch{}return}if(t.type==="agent:session-status"){for(let s of this.statusListeners)try{s(t.session)}catch{}return}if(typeof t.id!="number")return;let r=this.pending.get(t.id);r&&(this.pending.delete(t.id),clearTimeout(r.timer),t.error?r.reject(new c(t.error,t.code)):r.resolve(t.result))}handleClose(){if(!this.closed){this.closed=!0;for(let[,e]of this.pending)clearTimeout(e.timer),e.reject(new c("daemon disconnected","DISCONNECT"));this.pending.clear();for(let e of this.disconnectListeners)try{e()}catch{}}}};function M(n=7668,e=400){return new Promise(t=>{let r=new F.Socket,s=!1,o=i=>{s||(s=!0,r.destroy(),t(i))};r.setTimeout(e),r.once("connect",()=>o(!0)),r.once("timeout",()=>o(!1)),r.once("error",()=>o(!1)),r.connect(n,"127.0.0.1")})}async function B(n={}){let e=n.port??7668;if(await M(e))return{alreadyRunning:!0};if(y())throw new c(`no rnx bridge on port ${e}. run \`rnxsim setup\` to install the background daemon, or \`rnxsim serve\` in another shell.`,"DEV_HOST_REFUSED");let{cmd:t,prefixArgs:r}=C(),s=[...r,"serve","--quiet"];e!==7668&&s.push("--port",String(e));let o=_(t,s,{detached:!0,stdio:"ignore",env:process.env,cwd:process.cwd()});o.unref();let i=Date.now()+(n.startupTimeoutMs??5e3);for(;Date.now()<i;){if(await M(e))return{alreadyRunning:!1,pid:o.pid};await new Promise(a=>setTimeout(a,100))}throw new c(`spawned rnx daemon on port ${e} but it did not come up in time. run \`rnxsim serve\` manually to diagnose.`,"SPAWN_TIMEOUT")}async function h(n={}){await B({port:n.port,startupTimeoutMs:n.startupTimeoutMs});let e=new f(n);try{await e.waitReady()}catch(t){throw e.close(),t}return e}async function ge(n){let[e,...t]=n;try{switch(e){case void 0:case"--help":case"-h":case"help":return L(),0;case"attach":return await W(t);case"projects":return await J();case"project":return await V(t);case"sessions":return await H(t);case"start":return await G(t);case"prompt":return await q(t);case"watch":return await K(t);case"transcript":return await z(t);case"end":return await Q(t);case"paths":return await Y();default:return process.stderr.write(`unknown agent subcommand: ${e}
|
|
5
5
|
`),L(),2}}catch(r){if(r instanceof c)return process.stderr.write(`${r.message}
|
|
6
6
|
`),1;throw r}}async function v(n){let e=await h({clientLabel:"sootsim-agent-cli"});try{return await n(e)}finally{e.close()}}function L(){$("agent")}function P(n,e){let t={},r=[];for(let s=0;s<n.length;s++){let o=n[s],i=e[o];i==="value"?(t[o]=n[s+1]??"",s++):i==="bool"?t[o]=!0:r.push(o)}return{flags:t,positional:r}}function U(n,e="codex"){return n==="codex"||n==="claude"?n:e}async function W(n){let{flags:e,positional:t}=P(n,{"--name":"value","--provider":"value"}),r=t[0];if(!r)return process.stderr.write(`usage: rnxsim agent attach <dir> [--name X] [--provider codex|claude]
|
|
7
7
|
`),2;let s=d.resolve(r);if(!w.existsSync(s))return process.stderr.write(`directory does not exist: ${s}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{b as M}from"./chunk-
|
|
4
|
+
import{b as M}from"./chunk-NA4AMR2E.js";import"./chunk-5BYFLVSZ.js";import{execFile as G,spawn as q}from"node:child_process";import{randomUUID as X}from"node:crypto";import{constants as R,createReadStream as Y,createWriteStream as j,existsSync as C,openSync as J}from"node:fs";import V from"node:fs/promises";import z from"node:path";import K from"node:readline";import{promisify as Q}from"node:util";import{spawn as H}from"node:child_process";import L from"node:readline";var b=class extends Error{code;data;constructor(t,r,m){super(t),this.name="CodexRpcError",this.code=r,this.data=m}};function W(d){let t=H(d.bin,["app-server"],{cwd:d.cwd,env:{...process.env,...d.env},stdio:["pipe","pipe","pipe"]}),r=new Map,m=new Map,u=1,f=!1,a=new Promise(s=>{t.on("exit",(o,e)=>{f=!0;let p=new Error(`codex app-server exited (code=${o}, signal=${e??""})`);for(let{reject:y}of r.values())y(p);r.clear(),s({code:o,signal:e})})});L.createInterface({input:t.stdout,crlfDelay:1/0}).on("line",s=>{let o=s.trim();if(!o)return;let e;try{e=JSON.parse(o)}catch{return}if(e.id!=null&&(e.result!==void 0||e.error!==void 0)){let p=typeof e.id=="string"?Number(e.id):e.id,y=p!=null?r.get(p):void 0;if(!y)return;r.delete(p),e.error?y.reject(new b(e.error.message,e.error.code,e.error.data)):y.resolve(e.result);return}if(e.method){let p=m.get(e.method);if(!p)return;for(let y of p)try{y(e.params)}catch(l){console.error(`[codex-client] handler for "${e.method}" threw:`,l instanceof Error?l.stack??l.message:l)}}}),t.stderr.setEncoding("utf8"),t.stderr.on("data",s=>{let o=m.get("__stderr__");if(o)for(let e of o)try{e({text:s})}catch{}});function n(s){if(!f)try{t.stdin.write(JSON.stringify(s)+`
|
|
5
5
|
`)}catch{}}return{exited:a,on(s,o){let e=m.get(s);return e||(e=new Set,m.set(s,e)),e.add(o),()=>{e?.delete(o)}},request(s,o){if(f)return Promise.reject(new Error(`codex app-server closed; cannot call ${s}`));let e=u++;return new Promise((p,y)=>{r.set(e,{resolve:l=>p(l),reject:y,method:s}),n({jsonrpc:"2.0",id:e,method:s,params:o})})},notify(s,o){n({jsonrpc:"2.0",method:s,params:o})},async shutdown(s=1500){if(f)return;try{t.stdin.end()}catch{}let o=setTimeout(()=>{if(!f)try{t.kill("SIGTERM")}catch{}},s);try{await a}finally{clearTimeout(o)}},kill(s="SIGTERM"){if(!f)try{t.kill(s)}catch{}}}}var O="never",F="danger-full-access",Z={type:"dangerFullAccess"},D="fast",ee="medium",te=Q(G);async function ne(d,t){let r=t||d;if(r.includes("/")||r.includes("\\"))return C(r)?{ok:!0,path:r}:{ok:!1,message:`agent binary not found at path: ${r}`};try{let{stdout:m}=await te("which",[r],{timeout:1500}),u=m.trim();return u?{ok:!0,path:u}:{ok:!1,message:`${r} not found on PATH`}}catch{return{ok:!1,message:`${r} not found on PATH. install the ${d} CLI and retry, or pass --${d}-bin /path/to/${d} to agent start.`}}}function re(d){let t={"--session-id":"sessionId","--project-id":"projectId","--provider":"provider","--cwd":"cwd","--prompt-in":"promptIn","--events-out":"eventsOut","--transcript":"transcript","--codex-bin":"codexBin","--claude-bin":"claudeBin","--claude-session-uuid":"claudeSessionUuid"},r={};for(let m=0;m<d.length;m++){let u=d[m];if(u==="--fresh-thread"){r.freshThread=!0;continue}let f=t[u];f&&(r[f]=d[m+1],m++)}return r}async function Ie(d){let t=re(d);if(!t.sessionId||!t.projectId||!t.provider||!t.cwd||!t.promptIn||!t.eventsOut)return process.stderr.write(`usage: rnxsim agent-wrapper --session-id <id> --project-id <id>
|
|
6
6
|
--provider codex|claude --cwd <path>
|
|
7
7
|
--prompt-in <fifo> --events-out <fifo>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{k as p}from"./chunk-
|
|
4
|
+
import{k as p}from"./chunk-3G7I72XV.js";import"./chunk-FIPCJ5OS.js";import"./chunk-JQ4Y2XVT.js";import"./chunk-5BYFLVSZ.js";import{existsSync as h,mkdirSync as d,readFileSync as y,writeFileSync as g}from"node:fs";import{join as m}from"node:path";import{gzipSync as w}from"node:zlib";function f(t,e){let o=t.indexOf(`--${e}`);if(o!==-1&&o+1<t.length)return t[o+1];let i=t.find(r=>r.startsWith(`--${e}=`));return i?i.slice(e.length+3):void 0}async function x(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),i=f(t,"manifest");if((!o||!i)&&(console.error(" usage: rnxsim app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),process.exit(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}d(o,{recursive:!0});let r=await p(e,{onStaged:({url:n,byteLength:s})=>console.log(` staged app font: ${n} (${(s/1024).toFixed(1)} KiB)`),onError:(n,s)=>console.error(` warning: failed to fetch app font ${n}: ${s instanceof Error?s.message:s}`)}),a=[];for(let n of r){let s=w(n.bytes);g(m(o,n.urlhash),s),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:s.length,rawBytes:n.bytes.byteLength})}let c=[];if(h(i))try{let n=JSON.parse(y(i,"utf8"));Array.isArray(n)&&(c=n)}catch{}let u=new Set(c.map(n=>n.urlhash)),l=[...c,...a.filter(n=>!u.has(n.urlhash))];g(i,JSON.stringify(l)),console.log(`staged ${a.length} app font(s); manifest now has ${l.length} file(s)`)}async function E(t){let e=t[0];if(e==="stage"){await x(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),process.exit(1)}export{E as runAppFonts};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import"./chunk-
|
|
4
|
+
import"./chunk-5BYFLVSZ.js";import{spawn as v}from"child_process";var w=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),S=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),q=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),P=new Set(["--path-equals"]);function j(s){let r=[],u=[],n=0,e=!1,t=!1,i=!1;for(let o=0;o<s.length;o++){let a=s[o];if(a==="--within"){let c=Number(s[o+1]);if(!Number.isFinite(c)||c<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=c,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(S.has(a)){u.push({kind:a,args:[]});continue}if(q.has(a)){let c=s[o+1];if(c==null)return{error:`${a} requires a value`};u.push({kind:a,args:[c]}),o++;continue}if(P.has(a)){let c=s[o+1],f=s[o+2];if(c==null||f==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[c,f]}),o+=2;continue}r.push(a)}return r.length===0?{error:"assert requires a verb (e.g. find, describe, get errors)"}:{verbArgs:r,predicates:u,withinMs:n,negate:e,quiet:t,allowTimeout:i}}function N(s){return s[0]==="get"||s[0]==="debug"?w.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:w.has(s[0])?s[0]:null}async function R(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=v(process.execPath,u,{stdio:["ignore","pipe","pipe"],env:process.env}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",o=>{n({ok:!1,payload:null,reason:`spawn failed: ${o.message}`})}),e.on("close",o=>{if(o!==0){let a=i.trim().split(`
|
|
5
5
|
`).slice(-2).join(" | ").slice(0,200);n({ok:!1,payload:null,reason:`verb exited ${o}${a?`: ${a}`:""}`});return}if(!t.trim()){n({ok:!1,payload:null,reason:"verb produced no output"});return}try{let a=JSON.parse(t);n({ok:!0,payload:a})}catch{n({ok:!1,payload:null,reason:`verb output was not valid json: ${t.slice(0,120)}`})}})})}function y(s,r){let u=r.split(".").filter(e=>e.length>0),n=s;for(let e of u){if(n==null)return{found:!1};if(Array.isArray(n)){let t=Number(e);if(!Number.isInteger(t)||t<0||t>=n.length)return{found:!1};n=n[t];continue}if(typeof n=="object"){let t=n;if(!(e in t))return{found:!1};n=t[e];continue}return{found:!1}}return{found:!0,value:n}}function d(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function A(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:d(r)===0?{ok:!1,reason:"payload is empty"}:{ok:!0,reason:"exists"};case"--empty":{if(r==null)return{ok:!0,reason:"payload is null"};let e=d(r);return e===0?{ok:!0,reason:"payload is empty"}:{ok:!1,reason:`payload has ${e} item(s)`}}case"--count":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:`payload not countable (${typeof r})`}:{ok:t===e,reason:`count=${t}, want=${e}`}}case"--count-at-least":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t>=e,reason:`count=${t}, want>=${e}`}}case"--count-at-most":{let e=Number(n[0]),t=d(r);return t==null?{ok:!1,reason:"payload not countable"}:{ok:t<=e,reason:`count=${t}, want<=${e}`}}case"--contains":{let e=n[0],t=JSON.stringify(r);return{ok:t.includes(e),reason:t.includes(e)?`contains "${e}"`:`missing "${e}"`}}case"--not-contains":{let e=n[0],t=JSON.stringify(r);return{ok:!t.includes(e),reason:t.includes(e)?`unexpected "${e}"`:`not contains "${e}"`}}case"--matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=e.test(t);return{ok:i,reason:i?`matches /${n[0]}/`:`no match for /${n[0]}/`}}case"--not-matches":{let e=new RegExp(n[0]),t=JSON.stringify(r),i=!e.test(t);return{ok:i,reason:i?`not matches /${n[0]}/`:`unexpected /${n[0]}/`}}case"--equals":{let e=n[0],t=typeof r=="string"?r:typeof r=="number"||typeof r=="boolean"?String(r):JSON.stringify(r);return{ok:t===e,reason:`got=${JSON.stringify(t)}, want=${JSON.stringify(e)}`}}case"--has-path":{let e=y(r,n[0]);return{ok:e.found,reason:e.found?`path ${n[0]} present`:`path ${n[0]} missing`}}case"--path-equals":{let[e,t]=n,i=y(r,e);if(!i.found)return{ok:!1,reason:`path ${e} missing`};let o=typeof i.value=="string"||typeof i.value=="number"||typeof i.value=="boolean"?String(i.value):JSON.stringify(i.value);return{ok:o===t,reason:`${e}=${o}, want=${t}`}}case"--jq":{let e=n[0];try{let i=(await O(e,r)).trim();return{ok:i.length>0&&i!=="null"&&i!=="false"&&i!=='""',reason:`jq: ${i.slice(0,120)}`}}catch(t){throw new Error(`jq evaluation failed: ${t.message}`)}}default:return{ok:!1,reason:`unknown predicate ${u}`}}}function O(s,r){return new Promise((u,n)=>{let e=v("jq",[s],{stdio:["pipe","pipe","pipe"]}),t="",i="";e.stdout.on("data",o=>t+=o.toString()),e.stderr.on("data",o=>i+=o.toString()),e.on("error",n),e.on("close",o=>{if(o!==0){n(new Error(i.trim()||`jq exited ${o}`));return}u(t)}),e.stdin.end(JSON.stringify(r))})}async function T(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),process.exit(s.length===0?2:0));let r=j(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
|
|
6
6
|
`),process.exit(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;N(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
|
|
7
7
|
supported: ${Array.from(w).sort().join(", ")}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a as s}from"./chunk-
|
|
4
|
+
import{a as s}from"./chunk-OWADERTW.js";import{d as i}from"./chunk-W4YHMJOO.js";import"./chunk-ATOUAYJP.js";import"./chunk-5BYFLVSZ.js";function t(){console.log(`
|
|
5
5
|
rnxsim auth \u2014 inspect CLI auth
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{a,b,c,d}from"./chunk-
|
|
4
|
+
import{a,b,c,d}from"./chunk-2SAOKV6V.js";import"./chunk-5BYFLVSZ.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
|
-
import{m as O}from"./chunk-
|
|
4
|
+
import{m as O}from"./chunk-HF4NZ5SD.js";import"./chunk-KZS5VM6Y.js";import{q as E,s as F,u as N}from"./chunk-A3GVXVSG.js";import"./chunk-GMWPCQ63.js";import{r as S}from"./chunk-ATOUAYJP.js";import"./chunk-5BYFLVSZ.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import l from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
|
|
5
5
|
rnxsim camera \u2014 control the simulator camera source
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.317 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
import { createRequire as __sootsimCreateRequire } from 'node:module'
|
|
3
3
|
var require = __sootsimCreateRequire(import.meta.url)
|
|
4
4
|
var o=!0,e="public beta",t=e,n="we send anonymous error and dependency data while you use it";export{o as a,e as b,t as c,n as d};
|