rnxsim 0.1.317 → 0.1.318
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/bin.ts +1 -8
- package/cli/commands/debug.ts +1 -8
- package/cli/commands/detox.ts +2 -1
- package/cli/commands/flow.ts +1 -2
- package/cli/commands/inspect/wait-event.ts +1 -1
- package/cli/commands/inspect/wait-selector.ts +1 -1
- package/cli/commands/inspect.ts +21 -25
- package/cli/commands/profile.ts +4 -6
- package/cli/commands/runtime.ts +0 -4
- package/cli/commands/storage.ts +1 -1
- package/cli/commands/telemetry.ts +0 -2
- package/cli/commands/timeline.ts +2 -4
- package/cli/parse-args.ts +0 -3
- package/detox/jest-preset.cjs +0 -1
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-EKGLRJEN.js → agent-OFH7IJEA.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-FONNWB7J.js → agent-wrapper-VF6BEPVN.js} +2 -2
- package/dist-cli/chunks/{app-fonts-XPM54HRY.js → app-fonts-ERM34FJ5.js} +2 -2
- package/dist-cli/chunks/{assert-PILHTZRZ.js → assert-IGMBFTLH.js} +2 -2
- package/dist-cli/chunks/{auth-Q2VUD5NQ.js → auth-HSBBTE4P.js} +2 -2
- package/dist-cli/chunks/{beta-P4XLZ3KL.js → beta-347FXXJ7.js} +2 -2
- package/dist-cli/chunks/{camera-O4PEVPI4.js → camera-OM4DK5HE.js} +2 -2
- package/dist-cli/chunks/{chunk-W4YHMJOO.js → chunk-36N5TMLR.js} +2 -2
- package/dist-cli/chunks/{chunk-A3GVXVSG.js → chunk-435RMSZJ.js} +2 -2
- package/dist-cli/chunks/{chunk-TUFL7CQK.js → chunk-526RTRUB.js} +2 -2
- package/dist-cli/chunks/{chunk-J4MCKLWE.js → chunk-53S3KEIU.js} +4 -4
- package/dist-cli/chunks/{chunk-YRVJHPCU.js → chunk-5FR3XPEJ.js} +2 -2
- package/dist-cli/chunks/{chunk-OO5D7IJE.js → chunk-6HOIAQW4.js} +1 -1
- package/dist-cli/chunks/{chunk-GMWPCQ63.js → chunk-6VF3A4CX.js} +1 -1
- package/dist-cli/chunks/{chunk-R6DDJVBB.js → chunk-6YA7ITPB.js} +2 -2
- package/dist-cli/chunks/{chunk-5BYFLVSZ.js → chunk-7IZ5QXUO.js} +1 -1
- package/dist-cli/chunks/{chunk-SZIPYT3D.js → chunk-ANCTBUP7.js} +2 -2
- package/dist-cli/chunks/{chunk-FIPCJ5OS.js → chunk-BLBN76IW.js} +1 -1
- package/dist-cli/chunks/{chunk-OWADERTW.js → chunk-BPXQP2WT.js} +2 -2
- package/dist-cli/chunks/{chunk-QGPNBTHT.js → chunk-C43A3HRV.js} +2 -2
- package/dist-cli/chunks/{chunk-T6W3B2KA.js → chunk-CCJGCZII.js} +1 -1
- package/dist-cli/chunks/{chunk-HJKQ6NEU.js → chunk-D35X4DGV.js} +2 -2
- package/dist-cli/chunks/{chunk-67OCUGZD.js → chunk-DCAN7GYY.js} +2 -2
- package/dist-cli/chunks/{chunk-ADAIY3DX.js → chunk-DD2XEHRT.js} +2 -2
- package/dist-cli/chunks/{chunk-CUILVYWI.js → chunk-EBZQKLA4.js} +1 -1
- package/dist-cli/chunks/{chunk-EL23MRFL.js → chunk-FF6XN63V.js} +1 -1
- package/dist-cli/chunks/{chunk-NF63TOPI.js → chunk-FL5R6QVE.js} +2 -2
- package/dist-cli/chunks/{chunk-CHKTOWRH.js → chunk-GLMYWXLH.js} +78 -80
- package/dist-cli/chunks/{chunk-GQ3D2D4O.js → chunk-GMR5HH6U.js} +1 -1
- package/dist-cli/chunks/chunk-HGEVJQ2Z.js +124 -0
- package/dist-cli/chunks/{chunk-6WG4RQKM.js → chunk-IYCPNB23.js} +2 -2
- package/dist-cli/chunks/{chunk-7Q7IQ2SS.js → chunk-JBX2GVTM.js} +2 -2
- package/dist-cli/chunks/{chunk-ARICQ4CG.js → chunk-JD5O4M44.js} +2 -2
- package/dist-cli/chunks/{chunk-WWW5DC3G.js → chunk-KRYYXTD6.js} +2 -2
- package/dist-cli/chunks/{chunk-NUSBQSRQ.js → chunk-KX5YGB6L.js} +2 -2
- package/dist-cli/chunks/{chunk-2SAOKV6V.js → chunk-L7W6D2IV.js} +1 -1
- package/dist-cli/chunks/{chunk-QCQQ2VDW.js → chunk-MA5RZO4L.js} +2 -2
- package/dist-cli/chunks/{chunk-JQ4Y2XVT.js → chunk-MXSNB6VA.js} +1 -1
- package/dist-cli/chunks/chunk-MY37MGCH.js +4 -0
- package/dist-cli/chunks/{chunk-BJ5CYKA7.js → chunk-NOD2WL7K.js} +4 -4
- package/dist-cli/chunks/{chunk-ATOUAYJP.js → chunk-NZ3MD6WX.js} +1 -1
- package/dist-cli/chunks/{chunk-S23KHLTR.js → chunk-PCS73SCM.js} +2 -2
- package/dist-cli/chunks/{chunk-3G7I72XV.js → chunk-PO5I6Q3N.js} +2 -2
- package/dist-cli/chunks/{chunk-R6MEMDNB.js → chunk-PYKSLOEU.js} +2 -2
- package/dist-cli/chunks/chunk-QZ73ZUC7.js +4 -0
- package/dist-cli/chunks/{chunk-HF4NZ5SD.js → chunk-RUULSEKH.js} +2 -2
- package/dist-cli/chunks/{chunk-NA4AMR2E.js → chunk-SIGP7L6X.js} +1 -1
- package/dist-cli/chunks/{chunk-RCPPPW7B.js → chunk-SOWFP3GB.js} +1 -1
- package/dist-cli/chunks/{chunk-67ZR7PU7.js → chunk-SYUJCAYN.js} +1 -1
- package/dist-cli/chunks/{chunk-KZS5VM6Y.js → chunk-TEVDJAWR.js} +1 -1
- package/dist-cli/chunks/{chunk-WJVNVBAI.js → chunk-UPTSCAXP.js} +1 -1
- package/dist-cli/chunks/{chunk-VB2ZZ4JI.js → chunk-V43DZ6MG.js} +2 -2
- package/dist-cli/chunks/{chunk-JZXCQEKO.js → chunk-VAYHTDE7.js} +2 -2
- package/dist-cli/chunks/{chunk-5XVHBFAT.js → chunk-VWAZ2YDF.js} +3 -3
- package/dist-cli/chunks/{chunk-LSC2HFAB.js → chunk-W6BKNLC4.js} +1 -1
- package/dist-cli/chunks/{chunk-KO7UG262.js → chunk-X2SNFQUB.js} +2 -2
- package/dist-cli/chunks/{chunk-OXSCF4UD.js → chunk-XJPT7YWG.js} +2 -2
- package/dist-cli/chunks/chunk-YDK3RMDM.js +4 -0
- package/dist-cli/chunks/{chunk-RG3CME4Y.js → chunk-YLTTM35B.js} +2 -2
- package/dist-cli/chunks/{chunk-ODHQKXLB.js → chunk-ZRQ5OUC3.js} +2 -2
- package/dist-cli/chunks/{cleanup-O6IWLGDY.js → cleanup-JQOSDZEP.js} +2 -2
- package/dist-cli/chunks/cli-version-4ZJSLJIZ.js +4 -0
- package/dist-cli/chunks/{compat-562BT6JM.js → compat-QHZRG5QJ.js} +2 -2
- package/dist-cli/chunks/{config-7RO6O45J.js → config-YF4L25Q3.js} +2 -2
- package/dist-cli/chunks/{control-XYKZG442.js → control-GRLJ3W27.js} +2 -2
- package/dist-cli/chunks/daemon-4ICA6HT6.js +4 -0
- package/dist-cli/chunks/{debug-3VCEOVRM.js → debug-PZOHF6WI.js} +4 -4
- package/dist-cli/chunks/{desktop-K3PPS6VL.js → desktop-YX6QID7C.js} +3 -3
- package/dist-cli/chunks/{detox-6ODNKASO.js → detox-ZCPGXLXA.js} +5 -5
- package/dist-cli/chunks/{device-NZCR7JIN.js → device-ZRHEHJ7R.js} +2 -2
- package/dist-cli/chunks/{diagnose-VVJY6RF2.js → diagnose-ULSJOYWK.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-2VJMHUIY.js → disk-cleanup-KLLOHU4N.js} +2 -2
- package/dist-cli/chunks/drivers-IANQ4PS2.js +4 -0
- package/dist-cli/chunks/{film-CEMBA2DA.js → film-FDMTLO5O.js} +3 -3
- package/dist-cli/chunks/flow-2NM5A2NB.js +4 -0
- package/dist-cli/chunks/help-ZFLHXXET.js +4 -0
- package/dist-cli/chunks/hidden-runtime-alias-J5MGI3FF.js +4 -0
- package/dist-cli/chunks/{home-paths-TKPTU62O.js → home-paths-XNVF5J2H.js} +2 -2
- package/dist-cli/chunks/inspect-JBEVVCFB.js +4 -0
- package/dist-cli/chunks/install-desktop-I4K4ESL3.js +4 -0
- package/dist-cli/chunks/{login-CIQT627K.js → login-BIBNRKGQ.js} +4 -4
- package/dist-cli/chunks/{logout-V2DJVY3U.js → logout-KI43UF3Y.js} +2 -2
- package/dist-cli/chunks/{maestro-YSZ6ZC5C.js → maestro-4TUWVBVF.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-6JUELIXK.js → maestro-generate-TWM4EXUJ.js} +3 -3
- package/dist-cli/chunks/{mode-D4HQ6YN3.js → mode-AAHQAKIM.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-AC6YJKT4.js → optional-demo-registry-E5QZ2HAL.js} +2 -2
- package/dist-cli/chunks/{perf-5GRZ4G5X.js → perf-YYUZEBF7.js} +2 -2
- package/dist-cli/chunks/{permissions-4V6UVWGK.js → permissions-IGD736BA.js} +2 -2
- package/dist-cli/chunks/{record-IDNLOQLR.js → record-MOHHUJAY.js} +3 -3
- package/dist-cli/chunks/{report-issue-TF6R77TT.js → report-issue-NQT5KFBX.js} +2 -2
- package/dist-cli/chunks/reset-KC4YU4RE.js +4 -0
- package/dist-cli/chunks/runtime-UB6LX3HK.js +4 -0
- package/dist-cli/chunks/{screenshot-command-CHJN7WUT.js → screenshot-command-GR5UBZGY.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-MSDCGYNE.js → screenshot-layers-ZO3RNBJY.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-OGP3OQYR.js → screenshots-capture-LKZID6SS.js} +2 -2
- package/dist-cli/chunks/{serve-GPBLCMXX.js → serve-GW3TH5HX.js} +2 -2
- package/dist-cli/chunks/{setup-S2KYWZZO.js → setup-N3JKRPQK.js} +2 -2
- package/dist-cli/chunks/{skills-AUS5DTUE.js → skills-IGHG3SV4.js} +2 -2
- package/dist-cli/chunks/{state-QLYTMIKF.js → state-CXCLASA5.js} +2 -2
- package/dist-cli/chunks/storage-RO6GHQ5L.js +37 -0
- package/dist-cli/chunks/store-SFC4MMBY.js +4 -0
- package/dist-cli/chunks/telemetry-B5SBPVLX.js +4 -0
- package/dist-cli/chunks/{timeline-EUHPXPFP.js → timeline-TUPEWR6V.js} +3 -3
- package/dist-cli/chunks/{upgrade-JMMBM3ZN.js → upgrade-HTNHXQDP.js} +2 -2
- package/dist-cli/chunks/upload-NXMYH3HR.js +4 -0
- package/dist-cli/chunks/{version-QCF7RCA2.js → version-7ZYXM64U.js} +2 -2
- package/dist-cli/chunks/{web-WPYHMOVH.js → web-PMRPY2NY.js} +2 -2
- package/dist-cli/chunks/{what-happened-3RNZP4MB.js → what-happened-QSFD6H7W.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/detox/jest-preset.cjs +0 -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 +9 -12
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/skills/contrast/SKILL.md +0 -1
- package/src/vite-plugin.ts +69 -42
- package/dist-cli/chunks/chunk-744422UA.js +0 -4
- package/dist-cli/chunks/chunk-O6OIXJ54.js +0 -4
- package/dist-cli/chunks/chunk-VUKB6JW3.js +0 -125
- package/dist-cli/chunks/cli-version-F2R7SUY7.js +0 -4
- package/dist-cli/chunks/daemon-WE37QLQC.js +0 -4
- package/dist-cli/chunks/drivers-44ZJZ37B.js +0 -4
- package/dist-cli/chunks/flow-ORGIXYVS.js +0 -4
- package/dist-cli/chunks/help-UW52M7FZ.js +0 -4
- package/dist-cli/chunks/hidden-runtime-alias-R2QQLZZA.js +0 -4
- package/dist-cli/chunks/inspect-TNFI6C6G.js +0 -4
- package/dist-cli/chunks/install-desktop-NEJEPL4L.js +0 -4
- package/dist-cli/chunks/reset-D7WAFOZO.js +0 -4
- package/dist-cli/chunks/runtime-O5TNQBYH.js +0 -4
- package/dist-cli/chunks/storage-2MNS4TYO.js +0 -37
- package/dist-cli/chunks/store-UT52X7AA.js +0 -4
- package/dist-cli/chunks/telemetry-CAQVTTHY.js +0 -4
- package/dist-cli/chunks/upload-CEX4UBJL.js +0 -4
package/cli/bin.ts
CHANGED
|
@@ -420,12 +420,6 @@ if (TOP_LEVEL_RUNTIME_COMMANDS.has(command)) {
|
|
|
420
420
|
await exitWithFlush(code)
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
case 'inspect': {
|
|
424
|
-
const { runInspect } = await import('./commands/inspect')
|
|
425
|
-
await runInspect(commandArgsWithSim, { port, verbose })
|
|
426
|
-
break
|
|
427
|
-
}
|
|
428
|
-
|
|
429
423
|
case 'debug': {
|
|
430
424
|
const { runDebug } = await import('./commands/debug')
|
|
431
425
|
await runDebug(commandArgsWithSim, { port, verbose })
|
|
@@ -534,8 +528,7 @@ if (TOP_LEVEL_RUNTIME_COMMANDS.has(command)) {
|
|
|
534
528
|
break
|
|
535
529
|
}
|
|
536
530
|
|
|
537
|
-
case 'upgrade':
|
|
538
|
-
case 'update': {
|
|
531
|
+
case 'upgrade': {
|
|
539
532
|
const { runUpgrade } = await import('./commands/upgrade')
|
|
540
533
|
await runUpgrade(parsed.commandArgs)
|
|
541
534
|
break
|
package/cli/commands/debug.ts
CHANGED
|
@@ -408,14 +408,7 @@ export async function runDebug(args: string[], opts: DebugOptions) {
|
|
|
408
408
|
// implementation lives in inspect.ts. forward to runInspect with the raw
|
|
409
409
|
// `debug` prefix intact — runInspect strips it. done before we open a
|
|
410
410
|
// debug-side bridge so we don't hold two bridges at once.
|
|
411
|
-
const INSPECT_FORWARDED = new Set([
|
|
412
|
-
'state',
|
|
413
|
-
'js',
|
|
414
|
-
'eval',
|
|
415
|
-
'perf',
|
|
416
|
-
'memory',
|
|
417
|
-
'sample-color',
|
|
418
|
-
])
|
|
411
|
+
const INSPECT_FORWARDED = new Set(['state', 'js', 'perf', 'memory', 'sample-color'])
|
|
419
412
|
if (INSPECT_FORWARDED.has(sub)) {
|
|
420
413
|
const { runInspect } = await import('./inspect')
|
|
421
414
|
// pass the raw arg list through so every flag (--sim, --json,
|
package/cli/commands/detox.ts
CHANGED
|
@@ -89,7 +89,8 @@ export async function runDetox(args: string[], opts: RunDetoxOpts = {}): Promise
|
|
|
89
89
|
return true
|
|
90
90
|
})
|
|
91
91
|
const passthroughJestFlags = args.filter(
|
|
92
|
-
(a) =>
|
|
92
|
+
(a) =>
|
|
93
|
+
a === '--runInBand' || a.startsWith('--maxWorkers=') || a.startsWith('--shard='),
|
|
93
94
|
)
|
|
94
95
|
|
|
95
96
|
// test dir discovery. external test suites set SOOTSIM_TEST_DIR; otherwise
|
package/cli/commands/flow.ts
CHANGED
|
@@ -966,8 +966,7 @@ async function runFlowSession(args: string[]) {
|
|
|
966
966
|
return
|
|
967
967
|
}
|
|
968
968
|
|
|
969
|
-
case 'keep':
|
|
970
|
-
case 'good': {
|
|
969
|
+
case 'keep': {
|
|
971
970
|
const result = keepFlowCandidate()
|
|
972
971
|
if (!result.active) {
|
|
973
972
|
console.error(' no active flow draft — run `sootsim maestro start` first')
|
|
@@ -116,7 +116,7 @@ export async function runWaitEventSubcommand(opts: WaitEventOptions): Promise<vo
|
|
|
116
116
|
if (!kind) {
|
|
117
117
|
console.error(
|
|
118
118
|
inspectUsage(
|
|
119
|
-
'
|
|
119
|
+
'event',
|
|
120
120
|
'<kind> [--max-ms 5000] [--filter <substring>] [--equals <exact>] [--since now|cursor]',
|
|
121
121
|
),
|
|
122
122
|
)
|
|
@@ -13,7 +13,7 @@ export async function runWaitSelectorSubcommand(opts: {
|
|
|
13
13
|
const { bridge, args, positional, inspectUsage } = opts
|
|
14
14
|
const testId = positional[1]
|
|
15
15
|
if (!testId) {
|
|
16
|
-
console.error(inspectUsage('
|
|
16
|
+
console.error(inspectUsage('selector', '<testid> [--max-ms 5000] [--gone]'))
|
|
17
17
|
process.exit(1)
|
|
18
18
|
}
|
|
19
19
|
const maxMsIdx = args.indexOf('--max-ms')
|
package/cli/commands/inspect.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// sootsim inspect — dump node tree, accessibility info, query nodes
|
|
2
2
|
// connects to the sootsim WS bridge (no Playwright)
|
|
3
3
|
|
|
4
|
+
import { getCliInspectVerbMeta } from '@sootsim/skills/cli'
|
|
4
5
|
import { renderCliCommandHelp, renderCliGroupHelp } from '@sootsim/skills/cli/renderers'
|
|
5
6
|
import { DEFAULT_SOOTSIM_BRIDGE_PORT } from '../../src/bridge-constants'
|
|
6
7
|
import { DEFAULT_SOOTSIM_SHELL_URL } from '../../src/cli-constants'
|
|
@@ -875,9 +876,9 @@ function keyCodeToVisualKey(code: string) {
|
|
|
875
876
|
}
|
|
876
877
|
|
|
877
878
|
function getInspectCommandName(subcommand: string, directSubcommand: string | null) {
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
if (directSubcommand === subcommand) return `rnxsim ${subcommand}`
|
|
880
|
+
const group = getCliInspectVerbMeta(subcommand)?.group
|
|
881
|
+
return group ? `rnxsim ${group} ${subcommand}` : `rnxsim ${subcommand}`
|
|
881
882
|
}
|
|
882
883
|
|
|
883
884
|
function getInspectUsage(
|
|
@@ -1062,25 +1063,24 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1062
1063
|
const positional = parsed.positional
|
|
1063
1064
|
const subcommand = positional[0]
|
|
1064
1065
|
// used by inspectCommand() below to format usage/error strings with the
|
|
1065
|
-
// same prefix the user actually typed. when
|
|
1066
|
-
//
|
|
1067
|
-
const invocationPrefix: 'get' | 'do' | 'debug' | 'wait' |
|
|
1068
|
-
verbPrefix === 'get' ||
|
|
1069
|
-
verbPrefix === 'do' ||
|
|
1070
|
-
verbPrefix === 'debug' ||
|
|
1071
|
-
verbPrefix === 'wait'
|
|
1072
|
-
? verbPrefix
|
|
1073
|
-
: 'inspect'
|
|
1066
|
+
// same prefix the user actually typed. null when they typed a top-level
|
|
1067
|
+
// command, and inspectCommand asks the registry for the group instead.
|
|
1068
|
+
const invocationPrefix: 'get' | 'do' | 'debug' | 'wait' | null = verbPrefix
|
|
1074
1069
|
const isTopLevel =
|
|
1075
1070
|
typeof effectiveArgs[0] === 'string' &&
|
|
1076
1071
|
TOP_LEVEL_RUNTIME_COMMANDS.has(effectiveArgs[0])
|
|
1077
1072
|
const topLevelCommand = isTopLevel ? effectiveArgs[0] : null
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1073
|
+
// a usage string has to name something the user can actually type. the
|
|
1074
|
+
// registry knows which group each verb belongs to, so an unprefixed
|
|
1075
|
+
// invocation still renders `rnxsim get tree` rather than a bare verb.
|
|
1076
|
+
const inspectCommand = (name: string) => {
|
|
1077
|
+
if (opts.internalPerfCommand && name === 'perf') {
|
|
1078
|
+
return `rnxsim perf ${opts.internalPerfCommand}`
|
|
1079
|
+
}
|
|
1080
|
+
if (isTopLevel && name === effectiveArgs[0]) return `rnxsim ${name}`
|
|
1081
|
+
const group = invocationPrefix ?? getCliInspectVerbMeta(name)?.group
|
|
1082
|
+
return group ? `rnxsim ${group} ${name}` : `rnxsim ${name}`
|
|
1083
|
+
}
|
|
1084
1084
|
const inspectUsage = (name: string, tail: string) =>
|
|
1085
1085
|
` usage: ${inspectCommand(name)}${tail ? ` ${tail}` : ''}`
|
|
1086
1086
|
|
|
@@ -1118,14 +1118,12 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
|
|
1121
|
-
// catch-all
|
|
1122
|
-
// each group's listing stitched together.
|
|
1123
|
-
const inspectMeta = renderCliCommandHelp('inspect', docContext)
|
|
1121
|
+
// catch-all help — every group's listing stitched together.
|
|
1124
1122
|
const groupSections = ['do', 'get', 'debug', 'wait']
|
|
1125
1123
|
.map((g) => renderCliGroupHelp(g, docContext))
|
|
1126
1124
|
.filter((s): s is string => s != null)
|
|
1127
1125
|
.join('\n\n')
|
|
1128
|
-
console.log(`${
|
|
1126
|
+
console.log(`${groupSections}\n`)
|
|
1129
1127
|
process.exit(0)
|
|
1130
1128
|
}
|
|
1131
1129
|
|
|
@@ -1190,7 +1188,6 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
1190
1188
|
'warnings',
|
|
1191
1189
|
'requests',
|
|
1192
1190
|
'js',
|
|
1193
|
-
'eval',
|
|
1194
1191
|
'reload',
|
|
1195
1192
|
'globals',
|
|
1196
1193
|
'perf',
|
|
@@ -3571,7 +3568,6 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
3571
3568
|
break
|
|
3572
3569
|
}
|
|
3573
3570
|
|
|
3574
|
-
case 'eval':
|
|
3575
3571
|
case 'js': {
|
|
3576
3572
|
const code = positional.slice(1).join(' ')
|
|
3577
3573
|
if (!code) {
|
|
@@ -4501,7 +4497,7 @@ export async function runInspect(args: string[], opts: InspectOptions) {
|
|
|
4501
4497
|
}
|
|
4502
4498
|
} catch (err: any) {
|
|
4503
4499
|
const message = err instanceof Error ? err.message : String(err)
|
|
4504
|
-
console.error(` ${subcommand ?? '
|
|
4500
|
+
console.error(` ${subcommand ?? 'rnxsim'} failed: ${message}`)
|
|
4505
4501
|
const unknownSim = /^no sim connected with id ([^;]+)(?:; connected sims: .+)?$/.exec(
|
|
4506
4502
|
message,
|
|
4507
4503
|
)
|
package/cli/commands/profile.ts
CHANGED
|
@@ -18,7 +18,7 @@ function printHelp() {
|
|
|
18
18
|
rnxsim storage profile — manage isolated storage profiles
|
|
19
19
|
|
|
20
20
|
usage:
|
|
21
|
-
rnxsim storage profile
|
|
21
|
+
rnxsim storage profile list
|
|
22
22
|
rnxsim storage profile create <id>
|
|
23
23
|
rnxsim storage profile clear <id>
|
|
24
24
|
rnxsim storage profile delete <id>
|
|
@@ -28,7 +28,7 @@ service workers in Electron and Playwright launches. Plain browser-tab launches
|
|
|
28
28
|
cannot honor profiles and will fail clearly if a profile is requested.
|
|
29
29
|
|
|
30
30
|
examples:
|
|
31
|
-
rnxsim storage profile
|
|
31
|
+
rnxsim storage profile list
|
|
32
32
|
rnxsim storage profile create qa
|
|
33
33
|
rnxsim open 8081 --profile qa
|
|
34
34
|
rnxsim open 8081 --profile qa --driver playwright
|
|
@@ -43,10 +43,9 @@ export async function runProfile(args: string[], _opts: ProfileOptions): Promise
|
|
|
43
43
|
return 0
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
const subcommand = args[0] ?? '
|
|
46
|
+
const subcommand = args[0] ?? 'list'
|
|
47
47
|
try {
|
|
48
48
|
switch (subcommand) {
|
|
49
|
-
case 'ls':
|
|
50
49
|
case 'list': {
|
|
51
50
|
const profiles = listProfiles()
|
|
52
51
|
for (const profile of profiles) {
|
|
@@ -85,8 +84,7 @@ export async function runProfile(args: string[], _opts: ProfileOptions): Promise
|
|
|
85
84
|
console.log(` cleared profile: ${id}`)
|
|
86
85
|
return 0
|
|
87
86
|
}
|
|
88
|
-
case 'delete':
|
|
89
|
-
case 'rm': {
|
|
87
|
+
case 'delete': {
|
|
90
88
|
const id = args[1]
|
|
91
89
|
if (!id) {
|
|
92
90
|
console.error(' profile delete expects <id>')
|
package/cli/commands/runtime.ts
CHANGED
|
@@ -44,18 +44,14 @@ export async function runRuntime(args: string[], opts: RuntimeOptions = {}) {
|
|
|
44
44
|
case 'install':
|
|
45
45
|
return runtimeInstall(rest, opts)
|
|
46
46
|
case 'list':
|
|
47
|
-
case 'ls':
|
|
48
47
|
return runtimeList(rest)
|
|
49
48
|
case 'use':
|
|
50
49
|
return runtimeUse(rest)
|
|
51
50
|
case 'remove':
|
|
52
|
-
case 'rm':
|
|
53
51
|
return runtimeRemove(rest)
|
|
54
52
|
case 'which':
|
|
55
|
-
case 'active':
|
|
56
53
|
return runtimeWhich()
|
|
57
54
|
case 'notes':
|
|
58
|
-
case 'changelog':
|
|
59
55
|
return runtimeNotes(rest)
|
|
60
56
|
default:
|
|
61
57
|
console.error(` unknown runtime subcommand: ${sub}`)
|
package/cli/commands/storage.ts
CHANGED
|
@@ -33,14 +33,12 @@ export async function runTelemetry(args: string[]): Promise<void> {
|
|
|
33
33
|
return
|
|
34
34
|
|
|
35
35
|
case 'on':
|
|
36
|
-
case 'enable':
|
|
37
36
|
writePrivacyPreferences({ ...readPrivacyPreferences(), productAnalytics: true })
|
|
38
37
|
console.log(' product analytics ON')
|
|
39
38
|
console.log(` config: ${configFilePath()}`)
|
|
40
39
|
return
|
|
41
40
|
|
|
42
41
|
case 'off':
|
|
43
|
-
case 'disable':
|
|
44
42
|
writePrivacyPreferences({ ...readPrivacyPreferences(), productAnalytics: false })
|
|
45
43
|
console.log(' product analytics OFF')
|
|
46
44
|
console.log(` config: ${configFilePath()}`)
|
package/cli/commands/timeline.ts
CHANGED
|
@@ -74,16 +74,14 @@ export async function runTimeline(args: string[], opts: TimelineOptions) {
|
|
|
74
74
|
console.log(JSON.stringify(status, null, json ? 0 : 2))
|
|
75
75
|
break
|
|
76
76
|
}
|
|
77
|
-
case 'start':
|
|
78
|
-
case 'enable': {
|
|
77
|
+
case 'start': {
|
|
79
78
|
if (kinds.length === 0) kinds.push('all')
|
|
80
79
|
await callInBridge(bridge, 'SootSim.bridges.timeline.enable', ...kinds)
|
|
81
80
|
const status = await callInBridge(bridge, 'SootSim.bridges.timeline.status')
|
|
82
81
|
console.log(JSON.stringify(status, null, json ? 0 : 2))
|
|
83
82
|
break
|
|
84
83
|
}
|
|
85
|
-
case 'stop':
|
|
86
|
-
case 'disable': {
|
|
84
|
+
case 'stop': {
|
|
87
85
|
if (kinds.length === 0) kinds.push('all')
|
|
88
86
|
await callInBridge(bridge, 'SootSim.bridges.timeline.disable', ...kinds)
|
|
89
87
|
const status = await callInBridge(bridge, 'SootSim.bridges.timeline.status')
|
package/cli/parse-args.ts
CHANGED
|
@@ -33,7 +33,6 @@ const GLOBAL_FLAGS: Record<
|
|
|
33
33
|
// - `sootsim get <noun>` reads
|
|
34
34
|
// - `sootsim do <action>` writes
|
|
35
35
|
// - `sootsim debug <tool>` instrumentation (handled by runDebug)
|
|
36
|
-
// - `sootsim inspect <sub>` full legacy surface, all subcommands
|
|
37
36
|
// `describe` and `find` stay at root as the most common entrypoints.
|
|
38
37
|
// `list` stays at root because it's a sim-management read.
|
|
39
38
|
export const TOP_LEVEL_RUNTIME_COMMANDS = new Set([
|
|
@@ -70,7 +69,6 @@ const COMMANDS = new Set([
|
|
|
70
69
|
'reset',
|
|
71
70
|
'camera',
|
|
72
71
|
'mode',
|
|
73
|
-
'inspect',
|
|
74
72
|
'debug',
|
|
75
73
|
'timeline',
|
|
76
74
|
'what-happened',
|
|
@@ -93,7 +91,6 @@ const COMMANDS = new Set([
|
|
|
93
91
|
'daemon',
|
|
94
92
|
'runtime',
|
|
95
93
|
'upgrade',
|
|
96
|
-
'update',
|
|
97
94
|
'version',
|
|
98
95
|
'skill',
|
|
99
96
|
'config',
|
package/detox/jest-preset.cjs
CHANGED
package/dist-cli/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! rnx v0.1.
|
|
2
|
+
/*! rnx v0.1.318 | (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-MY37MGCH.js";import{a as m}from"./chunks/chunk-EBZQKLA4.js";import"./chunks/chunk-7IZ5QXUO.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-J5MGI3FF.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-B5SBPVLX.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-XNVF5J2H.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-KLLOHU4N.js");if(a())return;let{spawn:t}=await import("node:child_process"),r=["cleanup","--automatic-worker"],d=process.argv[1],p=v?t(process.execPath,r,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...r],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,r,{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-B5SBPVLX.js");await t(),await k(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-4ZJSLJIZ.js"),{IS_BETA:t,BETA_LABEL:r}=await import("./chunks/beta-347FXXJ7.js"),d=t?` \xB7 ${r}`:"";console.log(`rnxsim v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-XNVF5J2H.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-ZFLHXXET.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,i=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-SFC4MMBY.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-N3JKRPQK.js");t()&&(await a(["--from-welcome"]),await o(0));let{printHelp:r}=await import("./chunks/help-ZFLHXXET.js");r(),await o(0)}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(r=>!r.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-ZFLHXXET.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:r}=await import("./chunks/skills-IGHG3SV4.js");await r(e.commandArgs),await o(0)}if(s==="state"){let{runState:r}=await import("./chunks/state-CXCLASA5.js");await o(await r(i,{port:n}))}if(s==="reset"){let{runReset:r}=await import("./chunks/reset-KC4YU4RE.js");await o(await r(i,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(r=>!r.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:r}=await import("./chunks/help-ZFLHXXET.js");r(s)&&await o(0)}else{let{printCommandHelp:r}=await import("./chunks/help-ZFLHXXET.js");r(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-JBEVVCFB.js");await a([s,...i],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-IGMBFTLH.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-ZCPGXLXA.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-4TUWVBVF.js"),t=await a(i,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-MOHHUJAY.js");await a(i,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-FDMTLO5O.js"),t=await a(i,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-RO6GHQ5L.js"),t=await a(i,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-CXCLASA5.js"),t=await a(i,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-KC4YU4RE.js"),t=await a(i,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-YYUZEBF7.js"),t=await a(i,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-GR5UBZGY.js"),t=await a(i,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-OM4DK5HE.js"),t=await a(i,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-AAHQAKIM.js");await a(i,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-IGD736BA.js"),t=await a(i,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-PZOHF6WI.js");await a(i,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-TUPEWR6V.js");await a(i,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-QSFD6H7W.js");await a(i,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-GRLJ3W27.js");await a(i,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-GRLJ3W27.js");await a(i,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-GRLJ3W27.js");await a(i,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-GRLJ3W27.js");await a(i,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-ZRHEHJ7R.js");await a(i,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-QHZRG5QJ.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-NQT5KFBX.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-YX6QID7C.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-BIBNRKGQ.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-KI43UF3Y.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-HSBBTE4P.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-N3JKRPQK.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-GW3TH5HX.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-4ICA6HT6.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-UB6LX3HK.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-HTNHXQDP.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-7ZYXM64U.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-OFH7IJEA.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-VF6BEPVN.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-IGHG3SV4.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-ERM34FJ5.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-YF4L25Q3.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-JQOSDZEP.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.318 | (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-YLTTM35B.js";import"./chunk-SIGP7L6X.js";import{c as $}from"./chunk-KX5YGB6L.js";import"./chunk-PCS73SCM.js";import"./chunk-526RTRUB.js";import"./chunk-DCAN7GYY.js";import"./chunk-PYKSLOEU.js";import"./chunk-435RMSZJ.js";import"./chunk-6VF3A4CX.js";import"./chunk-HGEVJQ2Z.js";import{j as y}from"./chunk-NZ3MD6WX.js";import"./chunk-XJPT7YWG.js";import"./chunk-EBZQKLA4.js";import"./chunk-L7W6D2IV.js";import"./chunk-7IZ5QXUO.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.318 | (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-SIGP7L6X.js";import"./chunk-7IZ5QXUO.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.318 | (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-PO5I6Q3N.js";import"./chunk-BLBN76IW.js";import"./chunk-MXSNB6VA.js";import"./chunk-7IZ5QXUO.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.318 | (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-7IZ5QXUO.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.318 | (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-BPXQP2WT.js";import{d as i}from"./chunk-36N5TMLR.js";import"./chunk-NZ3MD6WX.js";import"./chunk-7IZ5QXUO.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.318 | (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-L7W6D2IV.js";import"./chunk-7IZ5QXUO.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.318 | (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-RUULSEKH.js";import"./chunk-TEVDJAWR.js";import{q as E,s as F,u as N}from"./chunk-435RMSZJ.js";import"./chunk-6VF3A4CX.js";import{r as S}from"./chunk-NZ3MD6WX.js";import"./chunk-7IZ5QXUO.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,5 +1,5 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.318 | (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{o as d}from"./chunk-
|
|
4
|
+
import{o as d}from"./chunk-NZ3MD6WX.js";import{chmodSync as S,existsSync as f,mkdirSync as A,readFileSync as k,rmSync as o,writeFileSync as y}from"node:fs";import{dirname as c,join as D,resolve as m}from"node:path";var s=1,p="SOOTSIM_SHARED_AUTH_FILE",u="https://contrast.dev";function w(){let t=process.env[p];return t?.trim()?c(m(t)):d()}function a(){let t=process.env[p];return t?.trim()?m(t):D(w(),"desktop-auth.json")}function g(t){if(!t||typeof t!="object")return null;let e=t;return typeof e.id!="string"||!e.id.trim()?null:{id:e.id.trim(),name:typeof e.name=="string"?e.name:void 0,email:typeof e.email=="string"?e.email:void 0,image:typeof e.image=="string"?e.image:void 0,githubUsername:typeof e.githubUsername=="string"?e.githubUsername:void 0,isAdmin:e.isAdmin===!0,teams:Array.isArray(e.teams)?e.teams.map(r=>{if(!r||typeof r!="object")return null;let n=r;return typeof n.id!="string"||typeof n.name!="string"?null:{id:n.id,name:n.name,role:n.role==="owner"?"owner":"member",githubOrg:typeof n.githubOrg=="string"?n.githubOrg:null}}).filter(r=>!!r):void 0}}function v(t){if(!t||typeof t!="object")return null;let e=t;if(e.version!==s||typeof e.token!="string"||!e.token.trim())return null;let r=typeof e.origin=="string"&&e.origin.trim()?e.origin.trim():u,n=e.source==="cli"||e.source==="electron"||e.source==="browser"||e.source==="unknown"?e.source:"unknown",i=typeof e.updatedAt=="string"&&e.updatedAt?e.updatedAt:new Date().toISOString(),h=typeof e.validatedAt=="string"&&e.validatedAt?e.validatedAt:void 0;return{version:s,token:e.token.trim(),user:g(e.user),origin:r,source:n,updatedAt:i,validatedAt:h}}function b(){let t=a();if(!f(t))return null;try{let e=JSON.parse(k(t,"utf8")),r=v(e);return r||(o(t,{force:!0}),null)}catch{return o(t,{force:!0}),null}}function O(t){let e=a();A(c(e),{recursive:!0});let r={version:s,token:t.token.trim(),user:t.user?g(t.user):null,origin:t.origin?.trim()||u,source:t.source,updatedAt:t.updatedAt||new Date().toISOString(),validatedAt:t.validatedAt};y(e,JSON.stringify(r,null,2)+`
|
|
5
5
|
`);try{S(e,384)}catch{}return r}function l(){o(a(),{force:!0})}async function E(t){let e=b();if(!e?.token)return null;let r=t||e.origin||u;try{let n=await fetch(`${r.replace(/\/$/,"")}/api/auth/me`,{headers:{authorization:`Bearer ${e.token}`}});if(n.status===401)return l(),null;if(!n.ok)return e;let i=await n.json();return i.user?.id?O({token:e.token,user:i.user,origin:r,source:e.source,validatedAt:new Date().toISOString()}):(l(),null)}catch{return e}}export{b as a,O as b,l as c,E as d};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.318 | (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 O,b as B}from"./chunk-
|
|
4
|
+
import{a as O,b as B}from"./chunk-6VF3A4CX.js";import{M as T,N,O as _,P as W,g as F}from"./chunk-NZ3MD6WX.js";var Ie="http://localhost:7668/";function H(e){if(typeof e=="number")return Number.isInteger(e)&&e>0?e:null;if(typeof e!="string")return null;let t=e.trim();if(!t)return null;let r=Number(t);return Number.isInteger(r)&&r>0?r:null}function X(e){let t=H(e);return t===null?0:t}function V(e={}){let t=H(e.explicitPort);return t!==null?t:7668+X(e.portOffset)}var z=5173;var Q=2e3;function Pe(e){let t=e-7668;return t<0||t>Q?null:`http://localhost:${z+t}/`}var ye=4001,Te="sootsim close";import{existsSync as Z,mkdirSync as ee,readFileSync as te,rmSync as E,writeFileSync as re}from"fs";import{tmpdir as ne}from"os";import{dirname as ie,join as oe,resolve as se}from"path";var v=1,G="SOOTSIM_CLI_CURRENT_SIM_PATH",le=["SOOTSIM_CLI_IDENTITY","TM_SESSION","CLAUDE_CODE_SESSION_ID","CODEX_THREAD_ID","TERM_SESSION_ID","ITERM_SESSION_ID","TMUX_PANE","STY","KITTY_WINDOW_ID","WEZTERM_PANE","ALACRITTY_WINDOW_ID","WINDOWID","VSCODE_INJECTION"],j=/^(?:tmux|screen)|^tm$/i;function q(e,t=20){let r=e,n=O(e);if(!n||n<=1){let o=B(e);return e>1&&o&&!j.test(o)?e:null}for(let o=0;o<t;o++){let s=B(n);if(s&&j.test(s))return r;let u=O(n);if(!u||u<=1)return s?n:r;r=n,n=u}return n}function x(){for(let t of le){let r=process.env[t];if(r&&r.trim())return{key:`${t}:${r.trim()}`,source:t,stable:!0}}let e=q(process.ppid);return e&&e>1?{key:`gppid-${e}`,source:"grand-ppid",stable:!0}:{key:`pid-${process.ppid}`,source:"ppid",stable:!1}}function ce(){return x().key}function ve(){return q(process.ppid)}function k(){if(process.env[G])return se(process.env[G]);let e=ce();return oe(ne(),`sootsim-current-sim-${e}.json`)}function de(){let e=k();if(!Z(e))return null;try{let t=JSON.parse(te(e,"utf8"));return t.version!==v||typeof t.simId!="string"||!t.simId.trim()||typeof t.updatedAt!="string"?(E(e,{force:!0}),null):{version:v,simId:t.simId.trim(),updatedAt:t.updatedAt}}catch{return E(e,{force:!0}),null}}function R(){return de()?.simId||null}function xe(e){let t=e.trim();if(!t)return;let r=k();ee(ie(r),{recursive:!0}),re(r,JSON.stringify({version:v,simId:t,updatedAt:new Date().toISOString()},null,2)+`
|
|
5
5
|
`)}function J(){E(k(),{force:!0})}var h="http://localhost:5173/";import ue from"node:fs";import S from"node:path";import{WebSocket as D}from"ws";var C=null;function M(){return N().filter(e=>W(e))}function Y(e){let t=S.resolve(e);for(;;){if(ue.existsSync(S.join(t,".git")))return t;let r=S.dirname(t);if(r===t)return null;t=r}}function K(e,t){let r=S.relative(e,t);return r===""||r!==".."&&!r.startsWith(`..${S.sep}`)&&!S.isAbsolute(r)}function ae(){let e=M();if(e.length===0)return null;if(process.env.SOOTSIM_BRIDGE_PORT!==void 0||process.env.PORT_OFFSET!==void 0){let r=V({explicitPort:process.env.SOOTSIM_BRIDGE_PORT,portOffset:process.env.PORT_OFFSET}),n=e.find(o=>o.bridgePort===r);if(n)return n}let t=null;try{t=process.cwd()}catch{}if(t){let r=Y(t),n=e.filter(o=>{let s=Y(o.cwd);return r&&s?r===s:K(t,o.cwd)||K(o.cwd,t)});if(n.length>0)return n.find(o=>o.bridgePort===7668)??n[0]}return e.find(r=>r.bridgePort===7668)??e[0]}function me(){let e=F();if(C?.homeDir===e)return C.world;let t=fe();return C={homeDir:e,world:t},t}function fe(){let e=ae();if(e)return{source:"dev-bridge",bridgePort:e.bridgePort,shellBaseUrl:e.shellPort?`http://localhost:${e.shellPort}/`:h};let t=T();return t&&_(t)?{source:"daemon",bridgePort:t.bridgePort,shellBaseUrl:t.runtimePort>0?`http://localhost:${t.runtimePort}/`:h}:{source:"default",bridgePort:7668,shellBaseUrl:h}}function ge(e){let t=M().find(n=>n.bridgePort===e);if(t)return{source:"dev-bridge",shellBaseUrl:t.shellPort?`http://localhost:${t.shellPort}/`:h};let r=T();return r&&_(r)&&r.bridgePort===e?{source:"daemon",shellBaseUrl:r.runtimePort>0?`http://localhost:${r.runtimePort}/`:h}:null}function Fe(e){let t;try{let o=new URL(e);t=o.port?Number(o.port):o.protocol==="https:"?443:80}catch{return null}if(!Number.isFinite(t)||t<=0)return null;let r=M().find(o=>o.shellPort===t||o.runtimePort===t||o.bridgePort===t);if(r)return r.bridgePort;let n=T();return n&&_(n)&&(n.runtimePort===t||n.bridgePort===t)?n.bridgePort:null}function pe(){return me().bridgePort}function Ne(e,t){let r=ge(e),n=r?.source==="dev-bridge"?"dev bridge":r?.source==="daemon"?"daemon bridge":"bridge",o=r?.source==="dev-bridge"?`dev-bridges/${e}.json`:r?.source==="daemon"?"daemon.json":"no lockfile",s=t??r?.shellBaseUrl;process.stderr.write(` \u2192 ${n} :${e} (${s?`shell ${s}, `:""}${o})
|
|
6
6
|
`)}var A=class extends Error{lock;constructor(t,r){super(t),this.name="BridgeSimLockedError",this.lock=r}};function he(e){return e==="flag"?"via --sim":e==="saved"?"saved via `rnxsim use`":"primary fallback \u2014 no sim pinned"}function We(e,t={}){let r=new Set,n=t.port??pe(),o=t.port!==void 0,s=t.commandTimeoutMs??15e3,u,a="none",I=new Set(t.stripBooleanFlags??[]),P=new Set(t.stripValueFlags??[]);for(let l=0;l<e.length;l++){let i=e[l];if(i==="--port"||i==="-p"){r.add(l),o=!0,l+1<e.length&&(r.add(l+1),n=Number(e[l+1])),l++;continue}if(i.startsWith("--port=")){r.add(l),o=!0,n=Number(i.slice(7));continue}if(i==="--timeout"){r.add(l),l+1<e.length&&(r.add(l+1),s=Number(e[l+1])),l++;continue}if(i==="--sim"||i==="--session"||i==="--tab"){r.add(l),l+1<e.length&&(r.add(l+1),u=e[l+1]?.trim()||void 0,a="flag"),l++;continue}let c=i.startsWith("--sim=")?i.slice(6):i.startsWith("--session=")?i.slice(10):i.startsWith("--tab=")?i.slice(6):void 0;if(c!==void 0){r.add(l),u=c.trim()||void 0,a="flag";continue}if(I.has(i)){r.add(l);continue}P.has(i)&&(r.add(l),l+1<e.length&&r.add(l+1),l++)}if(!u){let l=R();l&&(u=l.trim()||void 0,a="saved")}return{positional:e.filter((l,i)=>!r.has(i)),wsPort:n,explicitPort:o,simId:u,simIdSource:a,commandTimeoutMs:s}}function Se(e,t={}){let r=1,n=t.commandTimeoutMs??15e3,o=new Map,s=new D(`ws://localhost:${e}`),u=x(),a=new Promise((i,c)=>{s.on("open",()=>{try{s.send(JSON.stringify({type:"bridge:hello",id:0,cliIdentityKey:u.key,cliIdentitySource:u.source,cliLabel:t.cliLabel}))}catch{}i()}),s.on("error",d=>{let m=d.message?`: ${d.message}`:"";c(new Error(`could not connect to ws://localhost:${e}${m}`))})});a.catch(()=>{});let I=!1,P=!1;function l(i,c){if(P||process.env.SOOTSIM_QUIET_TARGET_NOTICE==="1"||i.startsWith("bridge:")||i==="focus"||i==="close")return;P=!0;let d=c??"primary",m=he(c?t.simIdSource:"none");process.stderr.write(` \u2192 ${d} (${m})
|
|
7
7
|
`)}return s.on("message",i=>{let c;try{c=JSON.parse(i.toString())}catch{return}if(c.id===0)return;let d=o.get(c.id);d&&(o.delete(c.id),c._otherCliCount>0&&!I&&(I=!0,process.stderr.write(`
|