rnxsim 0.1.367 → 0.1.369
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/box/checkout-plane.ts +4 -0
- package/cli/commands/compat.ts +93 -4
- package/cli/commands/detect.ts +11 -7
- package/dist-cli/bin.js +5 -5
- package/dist-cli/chunks/{agent-EKKIAKP5.js → agent-OUUFWDLF.js} +2 -2
- package/dist-cli/chunks/{agent-wrapper-MHLQUGA6.js → agent-wrapper-7BE7DR4R.js} +2 -2
- package/dist-cli/chunks/{app-fonts-HN6ADRTQ.js → app-fonts-66V7TL26.js} +2 -2
- package/dist-cli/chunks/{assert-IMR6QCN6.js → assert-I3CMRNS7.js} +2 -2
- package/dist-cli/chunks/{auth-27LPMQNH.js → auth-3FMWUVJH.js} +2 -2
- package/dist-cli/chunks/{beta-6RXBB5AI.js → beta-BHSKY4K4.js} +2 -2
- package/dist-cli/chunks/{box-DORLF3GP.js → box-3CVWXVTT.js} +345 -345
- package/dist-cli/chunks/{camera-2G7JZ5DL.js → camera-MNK73TYV.js} +2 -2
- package/dist-cli/chunks/{chunk-WI5V4TYG.js → chunk-2APXX4RN.js} +2 -2
- package/dist-cli/chunks/{chunk-GRN2FHVW.js → chunk-2PVVIPQS.js} +1 -1
- package/dist-cli/chunks/{chunk-JMSLXZFW.js → chunk-3454VMHD.js} +2 -2
- package/dist-cli/chunks/{chunk-4BWGLTKU.js → chunk-3NLB5LCN.js} +2 -2
- package/dist-cli/chunks/{chunk-JPXQKLNH.js → chunk-45X3D6CI.js} +1 -1
- package/dist-cli/chunks/{chunk-VFU2SJ7M.js → chunk-4G4VCT2M.js} +2 -2
- package/dist-cli/chunks/{chunk-HNT2OXPZ.js → chunk-4SCVGBOX.js} +1 -1
- package/dist-cli/chunks/{chunk-AXMMLO7D.js → chunk-5QFJFASW.js} +1 -1
- package/dist-cli/chunks/{chunk-IPEURNLI.js → chunk-5RWUFIZW.js} +2 -2
- package/dist-cli/chunks/{chunk-75EFOPXE.js → chunk-6BMM6OCW.js} +2 -2
- package/dist-cli/chunks/{chunk-YV7ERO2V.js → chunk-6F3WOWFC.js} +2 -2
- package/dist-cli/chunks/{chunk-SH5ETJKG.js → chunk-A56GQVNF.js} +1 -1
- package/dist-cli/chunks/{chunk-URLVQHC3.js → chunk-A72MIIJI.js} +1 -1
- package/dist-cli/chunks/{chunk-DNVABCEC.js → chunk-AJJCYLBC.js} +2 -2
- package/dist-cli/chunks/{chunk-BSEXEYNX.js → chunk-AKJYEX54.js} +2 -2
- package/dist-cli/chunks/{chunk-TWUE7WF5.js → chunk-B5NW4TT3.js} +2 -2
- package/dist-cli/chunks/{chunk-PHNURIH3.js → chunk-CCI3DZKE.js} +2 -2
- package/dist-cli/chunks/{chunk-QXLLY4IM.js → chunk-COXCR6UU.js} +2 -2
- package/dist-cli/chunks/{chunk-YINACV32.js → chunk-CZ2HCNRK.js} +1 -1
- package/dist-cli/chunks/{chunk-GMLOCV3E.js → chunk-D6MGELKZ.js} +1 -1
- package/dist-cli/chunks/{chunk-EV4P5UBP.js → chunk-DCPDMF27.js} +2 -2
- package/dist-cli/chunks/{chunk-G5IUIGGC.js → chunk-DKSZZABN.js} +1 -1
- package/dist-cli/chunks/{chunk-AVOROGA3.js → chunk-EKAEEWC2.js} +1 -1
- package/dist-cli/chunks/{chunk-IR44SFBA.js → chunk-F4OTMARL.js} +2 -2
- package/dist-cli/chunks/{chunk-3VBVEDDA.js → chunk-FBMNYSSW.js} +1 -1
- package/dist-cli/chunks/{chunk-E33A4AIR.js → chunk-FGGESBWD.js} +2 -2
- package/dist-cli/chunks/{chunk-N3BXQEUF.js → chunk-FHRG772G.js} +1 -1
- package/dist-cli/chunks/{chunk-XWUTJLBM.js → chunk-H2GB2PLY.js} +2 -2
- package/dist-cli/chunks/{chunk-T6J4YP56.js → chunk-IYPMULI7.js} +2 -2
- package/dist-cli/chunks/{chunk-EFMOXYDD.js → chunk-JH5KE2OI.js} +2 -2
- package/dist-cli/chunks/{chunk-U44VEQRN.js → chunk-JLOOLA47.js} +1 -1
- package/dist-cli/chunks/{chunk-KHX65HAU.js → chunk-JXARZBWS.js} +2 -2
- package/dist-cli/chunks/{chunk-YBFB3RM7.js → chunk-LU3AHE6T.js} +2 -2
- package/dist-cli/chunks/{chunk-A5AJFVOF.js → chunk-MXWME7ET.js} +1 -1
- package/dist-cli/chunks/{chunk-W5PATILQ.js → chunk-N5KDDGV6.js} +2 -2
- package/dist-cli/chunks/{chunk-HG6T4OOR.js → chunk-NPVEBXU3.js} +2 -2
- package/dist-cli/chunks/{chunk-5DGMFUZG.js → chunk-OROUEG22.js} +2 -2
- package/dist-cli/chunks/{chunk-VB2YBH46.js → chunk-QE5MC4V3.js} +1 -1
- package/dist-cli/chunks/{chunk-VUBJ6FXU.js → chunk-ROISJKH3.js} +2 -2
- package/dist-cli/chunks/{chunk-6DBS5EGX.js → chunk-RV76U3EI.js} +2 -2
- package/dist-cli/chunks/{chunk-CM6ZKZW7.js → chunk-RYGQ6LZN.js} +2 -2
- package/dist-cli/chunks/{chunk-3QZJLNYY.js → chunk-SSBZA5VZ.js} +1 -1
- package/dist-cli/chunks/{chunk-PP2KNVXP.js → chunk-SUHAD6N2.js} +3 -3
- package/dist-cli/chunks/{chunk-6SO6I3D5.js → chunk-TAC4CEIX.js} +2 -2
- package/dist-cli/chunks/{chunk-RZGHV2WI.js → chunk-TBK5UXW2.js} +2 -2
- package/dist-cli/chunks/{chunk-SGGL3AFV.js → chunk-TIB3CTRX.js} +3 -3
- package/dist-cli/chunks/{chunk-4XSNO374.js → chunk-TTUZ5MCK.js} +1 -1
- package/dist-cli/chunks/{chunk-LWOVKHRC.js → chunk-UDXQCEJU.js} +2 -2
- package/dist-cli/chunks/{chunk-RNQTOGM7.js → chunk-UQJY6O72.js} +1 -1
- package/dist-cli/chunks/{chunk-XTRHQAOV.js → chunk-USHV3QFZ.js} +2 -2
- package/dist-cli/chunks/{chunk-MQN5DWTI.js → chunk-V7I4CTAX.js} +2 -2
- package/dist-cli/chunks/{chunk-YGQVQ2VG.js → chunk-VGJLCFSC.js} +1 -1
- package/dist-cli/chunks/{chunk-AM2ODYAN.js → chunk-WGE2P25F.js} +1 -1
- package/dist-cli/chunks/{chunk-RPNKKVBN.js → chunk-WUR4FXWT.js} +3 -3
- package/dist-cli/chunks/{chunk-XYRUQQUR.js → chunk-X3PEDNLV.js} +2 -2
- package/dist-cli/chunks/{chunk-RSNLI2NH.js → chunk-YFZLDFZK.js} +2 -2
- package/dist-cli/chunks/{chunk-PROKNJVY.js → chunk-YLNSLMQM.js} +2 -2
- package/dist-cli/chunks/{chunk-K3EC6JDE.js → chunk-YPBDPVLR.js} +2 -2
- package/dist-cli/chunks/{chunk-VANZFTUE.js → chunk-ZEF57HQO.js} +1 -1
- package/dist-cli/chunks/{chunk-HFFXPUEP.js → chunk-ZNNE5MAV.js} +1 -1
- package/dist-cli/chunks/{chunk-N5OSV26B.js → chunk-ZW6JXEVX.js} +2 -2
- package/dist-cli/chunks/{cleanup-GVFHQ3KH.js → cleanup-H4XFRMZV.js} +2 -2
- package/dist-cli/chunks/cli-version-MJWLDXBW.js +4 -0
- package/dist-cli/chunks/compat-NKGYERLN.js +23 -0
- package/dist-cli/chunks/{config-K7LOOV62.js → config-WK7467KI.js} +2 -2
- package/dist-cli/chunks/{connect-H3CNY4IO.js → connect-WWWAVVCF.js} +2 -2
- package/dist-cli/chunks/{control-SMHZ2CF5.js → control-ESI7IZNN.js} +2 -2
- package/dist-cli/chunks/daemon-UCLO27YP.js +4 -0
- package/dist-cli/chunks/{debug-ELGHG57T.js → debug-RO6GLDIM.js} +3 -3
- package/dist-cli/chunks/{desktop-4G7FK3MP.js → desktop-FF34Z5X4.js} +3 -3
- package/dist-cli/chunks/{detox-JKXGEJIZ.js → detox-Q3CWY5UX.js} +2 -2
- package/dist-cli/chunks/{device-IV3AR6KG.js → device-WN4ZWLES.js} +2 -2
- package/dist-cli/chunks/{diagnose-3ERGF7EW.js → diagnose-HDRTUPDO.js} +2 -2
- package/dist-cli/chunks/{disk-cleanup-ALFEVZ4B.js → disk-cleanup-QP2NYN43.js} +2 -2
- package/dist-cli/chunks/{do-chain-K2B4OHM7.js → do-chain-6LP6SV5J.js} +2 -2
- package/dist-cli/chunks/drivers-OR2JPAXD.js +4 -0
- package/dist-cli/chunks/{env-2KF6IYZE.js → env-4XD5D2G6.js} +2 -2
- package/dist-cli/chunks/{film-UQXJFAD5.js → film-I5SIXLS5.js} +3 -3
- package/dist-cli/chunks/flow-4GWW5DYT.js +4 -0
- package/dist-cli/chunks/help-MIIWOT3C.js +4 -0
- package/dist-cli/chunks/{hidden-runtime-alias-VJCWCFVO.js → hidden-runtime-alias-LJV2S4M2.js} +2 -2
- package/dist-cli/chunks/{home-paths-EGUZZ6J6.js → home-paths-RFI2QRC3.js} +2 -2
- package/dist-cli/chunks/inspect-3ZGNJENJ.js +4 -0
- package/dist-cli/chunks/install-desktop-BYOJVTLS.js +4 -0
- package/dist-cli/chunks/{login-6KQGD7HK.js → login-GNIFSAFE.js} +2 -2
- package/dist-cli/chunks/{logout-2FCOVLBC.js → logout-DKXZZ6HU.js} +2 -2
- package/dist-cli/chunks/{maestro-HPSSEVJD.js → maestro-WKGVVWRA.js} +3 -3
- package/dist-cli/chunks/{maestro-generate-KQQ6JHMR.js → maestro-generate-KCK6RK2C.js} +3 -3
- package/dist-cli/chunks/{mode-SH7KRZET.js → mode-YVMX7OJY.js} +2 -2
- package/dist-cli/chunks/{optional-demo-registry-NAMCAVFX.js → optional-demo-registry-EUSKBIPP.js} +2 -2
- package/dist-cli/chunks/{perf-LWKAHXUL.js → perf-IMZMA5MT.js} +2 -2
- package/dist-cli/chunks/{permissions-EZTKWTXV.js → permissions-SLWXTLH6.js} +2 -2
- package/dist-cli/chunks/{platform-KSOJIVN5.js → platform-HQ735LAE.js} +3 -3
- package/dist-cli/chunks/privacy-EDC7PF7G.js +4 -0
- package/dist-cli/chunks/{record-2IC7BAQN.js → record-N4KTTVDI.js} +3 -3
- package/dist-cli/chunks/{report-issue-MMX6HOQO.js → report-issue-PP752HAD.js} +2 -2
- package/dist-cli/chunks/reset-DRMKGVP4.js +4 -0
- package/dist-cli/chunks/resolve-target-7WWI32R3.js +4 -0
- package/dist-cli/chunks/runtime-EKJV2ZVI.js +4 -0
- package/dist-cli/chunks/{screenshot-command-JYUXDVSA.js → screenshot-command-HAJB5FHK.js} +3 -3
- package/dist-cli/chunks/{screenshot-layers-OGRY6AA3.js → screenshot-layers-GOCJVM2G.js} +2 -2
- package/dist-cli/chunks/{screenshots-capture-QHDN65XS.js → screenshots-capture-YYJLYA3V.js} +2 -2
- package/dist-cli/chunks/{serve-W4BKAG4J.js → serve-TM46TKFW.js} +2 -2
- package/dist-cli/chunks/setup-FVPVIYE4.js +4 -0
- package/dist-cli/chunks/{sim-client-UOQGFBPO.js → sim-client-LQUZSO45.js} +2 -2
- package/dist-cli/chunks/{skills-OPPXOD63.js → skills-V5TE57FN.js} +2 -2
- package/dist-cli/chunks/{state-TDAN7BOM.js → state-RUVM4Z4S.js} +2 -2
- package/dist-cli/chunks/{storage-CFB2YGLY.js → storage-GQ33UTYN.js} +2 -2
- package/dist-cli/chunks/store-IKNBDDKM.js +4 -0
- package/dist-cli/chunks/telemetry-2ZVU6WLK.js +4 -0
- package/dist-cli/chunks/{timeline-ASOOVP4C.js → timeline-LP7DMJYT.js} +2 -2
- package/dist-cli/chunks/{upgrade-6MVJISHG.js → upgrade-AZDZLUIT.js} +2 -2
- package/dist-cli/chunks/upload-DFQK2Q7X.js +4 -0
- package/dist-cli/chunks/{version-5GS7CWRL.js → version-N3ALB75G.js} +2 -2
- package/dist-cli/chunks/{web-QRRMYMV4.js → web-XPHFZATA.js} +2 -2
- package/dist-cli/chunks/welcome-2NFYLWLJ.js +5 -0
- package/dist-cli/chunks/{what-happened-GAZJGKXX.js → what-happened-EJ5PHKT7.js} +2 -2
- package/dist-cli/chunks/{ws-bridge-DIXUAPLQ.js → ws-bridge-RUXOYOU6.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-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/config.cjs +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/replacement-module-handler.cjs +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-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.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/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +482 -2
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
- package/dist-cli/chunks/cli-version-DPX5MA2M.js +0 -4
- package/dist-cli/chunks/compat-AYRTXYAM.js +0 -20
- package/dist-cli/chunks/daemon-TEZUNI73.js +0 -4
- package/dist-cli/chunks/drivers-KJYXA3M3.js +0 -4
- package/dist-cli/chunks/flow-ASTUH56E.js +0 -4
- package/dist-cli/chunks/help-SNNYFELA.js +0 -4
- package/dist-cli/chunks/inspect-XANAADQT.js +0 -4
- package/dist-cli/chunks/install-desktop-JKQA7UY6.js +0 -4
- package/dist-cli/chunks/privacy-EJULWP7L.js +0 -4
- package/dist-cli/chunks/reset-PKFZA4NC.js +0 -4
- package/dist-cli/chunks/resolve-target-AFKU3BRE.js +0 -4
- package/dist-cli/chunks/runtime-XHWWPOIN.js +0 -4
- package/dist-cli/chunks/setup-WJPMPSAC.js +0 -4
- package/dist-cli/chunks/store-4TEED4ZU.js +0 -4
- package/dist-cli/chunks/telemetry-S6N7CV6G.js +0 -4
- package/dist-cli/chunks/upload-CBNIRFEW.js +0 -4
- package/dist-cli/chunks/welcome-33FXMAMB.js +0 -5
|
@@ -109,6 +109,10 @@ export class CheckoutFilePlane implements ProjectFilePlane {
|
|
|
109
109
|
return fs.promises.readFile(this.absolute(planePath), 'utf8')
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
+
async readBytes(planePath: string): Promise<Uint8Array> {
|
|
113
|
+
return fs.promises.readFile(this.absolute(planePath))
|
|
114
|
+
}
|
|
115
|
+
|
|
112
116
|
async write(planePath: string, content: string): Promise<void> {
|
|
113
117
|
const absolute = this.absolute(planePath)
|
|
114
118
|
await fs.promises.mkdir(path.dirname(absolute), { recursive: true })
|
package/cli/commands/compat.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// sootsim compat — scan dependencies with the shared compatibility engine.
|
|
2
2
|
|
|
3
3
|
import { existsSync, readFileSync } from 'node:fs'
|
|
4
|
-
import { resolve } from 'node:path'
|
|
4
|
+
import { dirname, join, relative, resolve } from 'node:path'
|
|
5
5
|
import {
|
|
6
6
|
COMPAT_RESULT_CAVEAT,
|
|
7
7
|
formatDetailedScanLines,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
scanDeps,
|
|
10
10
|
type ScanResult,
|
|
11
11
|
} from '@sootsim/compat/web'
|
|
12
|
+
import { findProjectRoot, scanWorkspace } from './detect'
|
|
12
13
|
|
|
13
14
|
interface PackageManifest {
|
|
14
15
|
name?: string
|
|
@@ -47,7 +48,47 @@ flags:
|
|
|
47
48
|
return
|
|
48
49
|
}
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
if (packageName) {
|
|
52
|
+
report(args, scanOnePackage(appDir, pkg, packageName))
|
|
53
|
+
return
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const here = scanDeps(installedManifest(appDir, pkg))
|
|
57
|
+
if (here.packages.length > 0 || appIndex >= 0) {
|
|
58
|
+
report(args, here)
|
|
59
|
+
return
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// a monorepo root manifest is not the app. it carries react-native and expo
|
|
63
|
+
// so the workspace resolves and little else, so scanning it reports a
|
|
64
|
+
// project with nothing to check while the real app sits in a subdirectory.
|
|
65
|
+
const workspaceRoot = findProjectRoot(appDir)
|
|
66
|
+
const elsewhere = scanWorkspace(workspaceRoot).apps.flatMap((app) => {
|
|
67
|
+
if (resolve(app.dir) === appDir) return []
|
|
68
|
+
const manifest = readPackageJson(app.dir)
|
|
69
|
+
if (!manifest) return []
|
|
70
|
+
const result = scanDeps(installedManifest(app.dir, manifest))
|
|
71
|
+
return result.packages.length > 0 ? [{ dir: app.dir, result }] : []
|
|
72
|
+
})
|
|
73
|
+
|
|
74
|
+
if (elsewhere.length === 1) {
|
|
75
|
+
const only = elsewhere[0]
|
|
76
|
+
console.log(`\n scanning ${relative(appDir, only.dir) || '.'}`)
|
|
77
|
+
report(args, only.result)
|
|
78
|
+
return
|
|
79
|
+
}
|
|
80
|
+
if (elsewhere.length > 1) {
|
|
81
|
+
console.log(`\n this workspace has more than one app. scan one with --app:`)
|
|
82
|
+
for (const entry of elsewhere) {
|
|
83
|
+
console.log(` rnx compat --app ${relative(appDir, entry.dir)}`)
|
|
84
|
+
}
|
|
85
|
+
console.log()
|
|
86
|
+
return
|
|
87
|
+
}
|
|
88
|
+
report(args, here)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function report(args: string[], result: ScanResult): void {
|
|
51
92
|
if (args.includes('--json')) {
|
|
52
93
|
console.log(JSON.stringify(result, null, 2))
|
|
53
94
|
return
|
|
@@ -73,6 +114,47 @@ flags:
|
|
|
73
114
|
console.log(`\n ${COMPAT_RESULT_CAVEAT}\n`)
|
|
74
115
|
}
|
|
75
116
|
|
|
117
|
+
// the declared range is often not a version: pnpm and bun catalogs write
|
|
118
|
+
// `catalog:`, a workspace dependency writes `workspace:*`, and a pinned tarball
|
|
119
|
+
// writes a URL. none of those match a verified version range, so a whole app
|
|
120
|
+
// reports as unverified. the installed tree holds the version that will
|
|
121
|
+
// actually run, so ask it, and keep the declared range for anything the project
|
|
122
|
+
// has not installed.
|
|
123
|
+
function installedManifest(appDir: string, pkg: PackageManifest): PackageManifest {
|
|
124
|
+
const resolveVersion = (name: string, declared: string): string => {
|
|
125
|
+
let dir = appDir
|
|
126
|
+
while (true) {
|
|
127
|
+
const manifest = join(dir, 'node_modules', name, 'package.json')
|
|
128
|
+
if (existsSync(manifest)) {
|
|
129
|
+
try {
|
|
130
|
+
const parsed: unknown = JSON.parse(readFileSync(manifest, 'utf8'))
|
|
131
|
+
if (parsed && typeof parsed === 'object' && 'version' in parsed) {
|
|
132
|
+
const version = parsed.version
|
|
133
|
+
if (typeof version === 'string') return version
|
|
134
|
+
}
|
|
135
|
+
} catch {}
|
|
136
|
+
return declared
|
|
137
|
+
}
|
|
138
|
+
const parent = dirname(dir)
|
|
139
|
+
if (parent === dir) return declared
|
|
140
|
+
dir = parent
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const mapped = (deps: Record<string, string> | undefined) =>
|
|
144
|
+
deps &&
|
|
145
|
+
Object.fromEntries(
|
|
146
|
+
Object.entries(deps).map(([name, declared]) => [
|
|
147
|
+
name,
|
|
148
|
+
resolveVersion(name, declared),
|
|
149
|
+
]),
|
|
150
|
+
)
|
|
151
|
+
return {
|
|
152
|
+
name: pkg.name,
|
|
153
|
+
dependencies: mapped(pkg.dependencies),
|
|
154
|
+
devDependencies: mapped(pkg.devDependencies),
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
76
158
|
function readPackageJson(appDir: string): PackageManifest | null {
|
|
77
159
|
const packagePath = resolve(appDir, 'package.json')
|
|
78
160
|
if (!existsSync(packagePath)) return null
|
|
@@ -80,8 +162,15 @@ function readPackageJson(appDir: string): PackageManifest | null {
|
|
|
80
162
|
return parsed && typeof parsed === 'object' ? parsed : null
|
|
81
163
|
}
|
|
82
164
|
|
|
83
|
-
function scanOnePackage(
|
|
165
|
+
function scanOnePackage(
|
|
166
|
+
appDir: string,
|
|
167
|
+
pkg: PackageManifest,
|
|
168
|
+
packageName: string,
|
|
169
|
+
): ScanResult {
|
|
170
|
+
const installed = installedManifest(appDir, pkg)
|
|
84
171
|
const version =
|
|
85
|
-
|
|
172
|
+
installed.dependencies?.[packageName] ??
|
|
173
|
+
installed.devDependencies?.[packageName] ??
|
|
174
|
+
'*'
|
|
86
175
|
return scanDeps({ dependencies: { [packageName]: version } })
|
|
87
176
|
}
|
package/cli/commands/detect.ts
CHANGED
|
@@ -13,7 +13,6 @@ export interface DetectedProject {
|
|
|
13
13
|
framework: Framework
|
|
14
14
|
hasViteConfig: boolean
|
|
15
15
|
hasMetroConfig: boolean
|
|
16
|
-
hasSootsimDependency: boolean
|
|
17
16
|
devCommand: string | null
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -24,6 +23,8 @@ export interface DetectedWorkspace {
|
|
|
24
23
|
apps: DetectedProject[]
|
|
25
24
|
}
|
|
26
25
|
|
|
26
|
+
const CONFIG_EXTENSIONS = ['ts', 'js', 'cjs', 'mjs', 'mts', 'cts']
|
|
27
|
+
|
|
27
28
|
export function findProjectRoot(cwd: string): string {
|
|
28
29
|
let dir = cwd
|
|
29
30
|
while (true) {
|
|
@@ -102,12 +103,15 @@ export function detectProject(dir: string): DetectedProject | null {
|
|
|
102
103
|
dir,
|
|
103
104
|
name: pkg.name || basename(dir),
|
|
104
105
|
framework,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
existsSync(join(dir,
|
|
110
|
-
|
|
106
|
+
// a config file is a config file whatever module system it declares. real
|
|
107
|
+
// apps write .cjs as often as .js, and missing one reads as "this project
|
|
108
|
+
// has no bundler config" and sends the user to create a second one.
|
|
109
|
+
hasViteConfig: CONFIG_EXTENSIONS.some((ext) =>
|
|
110
|
+
existsSync(join(dir, `vite.config.${ext}`)),
|
|
111
|
+
),
|
|
112
|
+
hasMetroConfig: CONFIG_EXTENSIONS.some((ext) =>
|
|
113
|
+
existsSync(join(dir, `metro.config.${ext}`)),
|
|
114
|
+
),
|
|
111
115
|
devCommand: pkg.scripts?.dev || null,
|
|
112
116
|
}
|
|
113
117
|
}
|
package/dist-cli/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/*! rnx v0.1.
|
|
2
|
+
/*! rnx v0.1.369 | (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-VGJLCFSC.js";import{a as m}from"./chunks/chunk-MXWME7ET.js";import"./chunks/chunk-DKSZZABN.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 k=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,S=new Set(["desktop"]);function C(a){!k||!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 v(){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-LJV2S4M2.js");e=a(e)}var $=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker",_=!e.command&&e.commandArgs.length===0;if(!$&&!_&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="setup"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-EDC7PF7G.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-RFI2QRC3.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 v(){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-QP2NYN43.js");if(a())return;let{spawn:t}=await import("node:child_process"),r=["cleanup","--automatic-worker"],d=process.argv[1],p=k?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",w=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${w.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-2ZVU6WLK.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-MJWLDXBW.js"),{IS_BETA:t,BETA_LABEL:r}=await import("./chunks/beta-BHSKY4K4.js"),d=t?` \xB7 ${r}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-RFI2QRC3.js"),w=p();console.log(w?`runtime v${w}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-MIIWOT3C.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,u=e.globalFlags.device,l=e.globalFlags.theme,y=e.globalFlags.driver,W=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,i=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(u||l){let{settingsStore:a}=await import("./chunks/store-IKNBDDKM.js"),t={};u&&(t.deviceModel=u),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runWelcome:a}=await import("./chunks/welcome-2NFYLWLJ.js");await o(await a())}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 \`${m.commandName} --help\` to see the full surface.`),await o(1)}let{printHelp:a}=await import("./chunks/help-MIIWOT3C.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-V5TE57FN.js");await r(e.commandArgs),await o(0)}if(s==="state"){let{runState:r}=await import("./chunks/state-RUVM4Z4S.js");await o(await r(i,{port:n}))}if(s==="reset"){let{runReset:r}=await import("./chunks/reset-DRMKGVP4.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-MIIWOT3C.js");r(s)&&await o(0)}else{let{printCommandHelp:r}=await import("./chunks/help-MIIWOT3C.js");r(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}C(s);if(g.has(s)){if(s==="do"){let{hasDoChain:t,runDoChain:r}=await import("./chunks/do-chain-6LP6SV5J.js");t(i)&&await o(await r(i,{port:n}))}let{runInspect:a}=await import("./chunks/inspect-3ZGNJENJ.js");await a([s,...i],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-I3CMRNS7.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-Q3CWY5UX.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-WKGVVWRA.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-N4KTTVDI.js");await a(i,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-I5SIXLS5.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-GQ33UTYN.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-RUVM4Z4S.js"),t=await a(i,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-DRMKGVP4.js"),t=await a(i,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-IMZMA5MT.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-HAJB5FHK.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-MNK73TYV.js"),t=await a(i,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-YVMX7OJY.js");await a(i,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-SLWXTLH6.js"),t=await a(i,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-RO6GLDIM.js");await a(i,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-LP7DMJYT.js");await a(i,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-EJ5PHKT7.js");await a(i,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-ESI7IZNN.js");await a(i,{port:n});break}case"ios":case"android":{let{runPlatformCommand:a}=await import("./chunks/platform-HQ735LAE.js"),t=await a(s,i,{port:n});await o(typeof t=="number"?t:0)}case"box":{let{runBox:a}=await import("./chunks/box-3CVWXVTT.js");await o(await a(i,{port:n,verbose:c}))}case"use":{let{runUseCommand:a}=await import("./chunks/control-ESI7IZNN.js");await a(i,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-ESI7IZNN.js");await a(i,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-ESI7IZNN.js");await a(i,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-WN4ZWLES.js");await a(i,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-NKGYERLN.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-PP752HAD.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-FF34Z5X4.js");await a(e.commandArgs,{port:n,device:u});break}case"login":{let{runLogin:a}=await import("./chunks/login-GNIFSAFE.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-DKXZZ6HU.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-3FMWUVJH.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-FVPVIYE4.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-TM46TKFW.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-UCLO27YP.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-EKJV2ZVI.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-AZDZLUIT.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-N3ALB75G.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-OUUFWDLF.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-7BE7DR4R.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-V5TE57FN.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-66V7TL26.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-WK7467KI.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-H4XFRMZV.js"),t=await a(e.commandArgs);await o(t)}default:console.error(` unknown command: ${s}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}await v();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.369 | (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-4G4VCT2M.js";import"./chunk-4SCVGBOX.js";import{c as $}from"./chunk-FGGESBWD.js";import"./chunk-CCI3DZKE.js";import"./chunk-N5KDDGV6.js";import"./chunk-45X3D6CI.js";import"./chunk-6F3WOWFC.js";import"./chunk-F4OTMARL.js";import"./chunk-H2GB2PLY.js";import"./chunk-ZEF57HQO.js";import"./chunk-5QFJFASW.js";import{j as y}from"./chunk-FBMNYSSW.js";import"./chunk-TAC4CEIX.js";import"./chunk-MXWME7ET.js";import"./chunk-DKSZZABN.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 \`rnx daemon install\` to enable the faster background service, or \`rnx 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 \`rnx 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: rnx 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.369 | (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-4SCVGBOX.js";import"./chunk-DKSZZABN.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: rnx 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.369 | (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{p}from"./chunk-
|
|
4
|
+
import{p}from"./chunk-UDXQCEJU.js";import"./chunk-JLOOLA47.js";import"./chunk-UQJY6O72.js";import"./chunk-DKSZZABN.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 r=t.find(i=>i.startsWith(`--${e}=`));return r?r.slice(e.length+3):void 0}async function x(t){let e=f(t,"wire")||"",o=f(t,"out-dir"),r=f(t,"manifest");if((!o||!r)&&(console.error(" usage: rnx 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 i=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 i){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(r))try{let n=JSON.parse(y(r,"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(r,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.369 | (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-DKSZZABN.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.369 | (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 r}from"./chunk-
|
|
4
|
+
import{a as r}from"./chunk-JH5KE2OI.js";import{d as t}from"./chunk-ZW6JXEVX.js";import"./chunk-FBMNYSSW.js";import"./chunk-DKSZZABN.js";function i(){console.log(`
|
|
5
5
|
rnx auth \u2014 inspect CLI auth
|
|
6
6
|
|
|
7
7
|
usage:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.369 | (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-45X3D6CI.js";import"./chunk-DKSZZABN.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
|