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.
Files changed (190) hide show
  1. package/cli/commands/box/checkout-plane.ts +4 -0
  2. package/cli/commands/compat.ts +93 -4
  3. package/cli/commands/detect.ts +11 -7
  4. package/dist-cli/bin.js +5 -5
  5. package/dist-cli/chunks/{agent-EKKIAKP5.js → agent-OUUFWDLF.js} +2 -2
  6. package/dist-cli/chunks/{agent-wrapper-MHLQUGA6.js → agent-wrapper-7BE7DR4R.js} +2 -2
  7. package/dist-cli/chunks/{app-fonts-HN6ADRTQ.js → app-fonts-66V7TL26.js} +2 -2
  8. package/dist-cli/chunks/{assert-IMR6QCN6.js → assert-I3CMRNS7.js} +2 -2
  9. package/dist-cli/chunks/{auth-27LPMQNH.js → auth-3FMWUVJH.js} +2 -2
  10. package/dist-cli/chunks/{beta-6RXBB5AI.js → beta-BHSKY4K4.js} +2 -2
  11. package/dist-cli/chunks/{box-DORLF3GP.js → box-3CVWXVTT.js} +345 -345
  12. package/dist-cli/chunks/{camera-2G7JZ5DL.js → camera-MNK73TYV.js} +2 -2
  13. package/dist-cli/chunks/{chunk-WI5V4TYG.js → chunk-2APXX4RN.js} +2 -2
  14. package/dist-cli/chunks/{chunk-GRN2FHVW.js → chunk-2PVVIPQS.js} +1 -1
  15. package/dist-cli/chunks/{chunk-JMSLXZFW.js → chunk-3454VMHD.js} +2 -2
  16. package/dist-cli/chunks/{chunk-4BWGLTKU.js → chunk-3NLB5LCN.js} +2 -2
  17. package/dist-cli/chunks/{chunk-JPXQKLNH.js → chunk-45X3D6CI.js} +1 -1
  18. package/dist-cli/chunks/{chunk-VFU2SJ7M.js → chunk-4G4VCT2M.js} +2 -2
  19. package/dist-cli/chunks/{chunk-HNT2OXPZ.js → chunk-4SCVGBOX.js} +1 -1
  20. package/dist-cli/chunks/{chunk-AXMMLO7D.js → chunk-5QFJFASW.js} +1 -1
  21. package/dist-cli/chunks/{chunk-IPEURNLI.js → chunk-5RWUFIZW.js} +2 -2
  22. package/dist-cli/chunks/{chunk-75EFOPXE.js → chunk-6BMM6OCW.js} +2 -2
  23. package/dist-cli/chunks/{chunk-YV7ERO2V.js → chunk-6F3WOWFC.js} +2 -2
  24. package/dist-cli/chunks/{chunk-SH5ETJKG.js → chunk-A56GQVNF.js} +1 -1
  25. package/dist-cli/chunks/{chunk-URLVQHC3.js → chunk-A72MIIJI.js} +1 -1
  26. package/dist-cli/chunks/{chunk-DNVABCEC.js → chunk-AJJCYLBC.js} +2 -2
  27. package/dist-cli/chunks/{chunk-BSEXEYNX.js → chunk-AKJYEX54.js} +2 -2
  28. package/dist-cli/chunks/{chunk-TWUE7WF5.js → chunk-B5NW4TT3.js} +2 -2
  29. package/dist-cli/chunks/{chunk-PHNURIH3.js → chunk-CCI3DZKE.js} +2 -2
  30. package/dist-cli/chunks/{chunk-QXLLY4IM.js → chunk-COXCR6UU.js} +2 -2
  31. package/dist-cli/chunks/{chunk-YINACV32.js → chunk-CZ2HCNRK.js} +1 -1
  32. package/dist-cli/chunks/{chunk-GMLOCV3E.js → chunk-D6MGELKZ.js} +1 -1
  33. package/dist-cli/chunks/{chunk-EV4P5UBP.js → chunk-DCPDMF27.js} +2 -2
  34. package/dist-cli/chunks/{chunk-G5IUIGGC.js → chunk-DKSZZABN.js} +1 -1
  35. package/dist-cli/chunks/{chunk-AVOROGA3.js → chunk-EKAEEWC2.js} +1 -1
  36. package/dist-cli/chunks/{chunk-IR44SFBA.js → chunk-F4OTMARL.js} +2 -2
  37. package/dist-cli/chunks/{chunk-3VBVEDDA.js → chunk-FBMNYSSW.js} +1 -1
  38. package/dist-cli/chunks/{chunk-E33A4AIR.js → chunk-FGGESBWD.js} +2 -2
  39. package/dist-cli/chunks/{chunk-N3BXQEUF.js → chunk-FHRG772G.js} +1 -1
  40. package/dist-cli/chunks/{chunk-XWUTJLBM.js → chunk-H2GB2PLY.js} +2 -2
  41. package/dist-cli/chunks/{chunk-T6J4YP56.js → chunk-IYPMULI7.js} +2 -2
  42. package/dist-cli/chunks/{chunk-EFMOXYDD.js → chunk-JH5KE2OI.js} +2 -2
  43. package/dist-cli/chunks/{chunk-U44VEQRN.js → chunk-JLOOLA47.js} +1 -1
  44. package/dist-cli/chunks/{chunk-KHX65HAU.js → chunk-JXARZBWS.js} +2 -2
  45. package/dist-cli/chunks/{chunk-YBFB3RM7.js → chunk-LU3AHE6T.js} +2 -2
  46. package/dist-cli/chunks/{chunk-A5AJFVOF.js → chunk-MXWME7ET.js} +1 -1
  47. package/dist-cli/chunks/{chunk-W5PATILQ.js → chunk-N5KDDGV6.js} +2 -2
  48. package/dist-cli/chunks/{chunk-HG6T4OOR.js → chunk-NPVEBXU3.js} +2 -2
  49. package/dist-cli/chunks/{chunk-5DGMFUZG.js → chunk-OROUEG22.js} +2 -2
  50. package/dist-cli/chunks/{chunk-VB2YBH46.js → chunk-QE5MC4V3.js} +1 -1
  51. package/dist-cli/chunks/{chunk-VUBJ6FXU.js → chunk-ROISJKH3.js} +2 -2
  52. package/dist-cli/chunks/{chunk-6DBS5EGX.js → chunk-RV76U3EI.js} +2 -2
  53. package/dist-cli/chunks/{chunk-CM6ZKZW7.js → chunk-RYGQ6LZN.js} +2 -2
  54. package/dist-cli/chunks/{chunk-3QZJLNYY.js → chunk-SSBZA5VZ.js} +1 -1
  55. package/dist-cli/chunks/{chunk-PP2KNVXP.js → chunk-SUHAD6N2.js} +3 -3
  56. package/dist-cli/chunks/{chunk-6SO6I3D5.js → chunk-TAC4CEIX.js} +2 -2
  57. package/dist-cli/chunks/{chunk-RZGHV2WI.js → chunk-TBK5UXW2.js} +2 -2
  58. package/dist-cli/chunks/{chunk-SGGL3AFV.js → chunk-TIB3CTRX.js} +3 -3
  59. package/dist-cli/chunks/{chunk-4XSNO374.js → chunk-TTUZ5MCK.js} +1 -1
  60. package/dist-cli/chunks/{chunk-LWOVKHRC.js → chunk-UDXQCEJU.js} +2 -2
  61. package/dist-cli/chunks/{chunk-RNQTOGM7.js → chunk-UQJY6O72.js} +1 -1
  62. package/dist-cli/chunks/{chunk-XTRHQAOV.js → chunk-USHV3QFZ.js} +2 -2
  63. package/dist-cli/chunks/{chunk-MQN5DWTI.js → chunk-V7I4CTAX.js} +2 -2
  64. package/dist-cli/chunks/{chunk-YGQVQ2VG.js → chunk-VGJLCFSC.js} +1 -1
  65. package/dist-cli/chunks/{chunk-AM2ODYAN.js → chunk-WGE2P25F.js} +1 -1
  66. package/dist-cli/chunks/{chunk-RPNKKVBN.js → chunk-WUR4FXWT.js} +3 -3
  67. package/dist-cli/chunks/{chunk-XYRUQQUR.js → chunk-X3PEDNLV.js} +2 -2
  68. package/dist-cli/chunks/{chunk-RSNLI2NH.js → chunk-YFZLDFZK.js} +2 -2
  69. package/dist-cli/chunks/{chunk-PROKNJVY.js → chunk-YLNSLMQM.js} +2 -2
  70. package/dist-cli/chunks/{chunk-K3EC6JDE.js → chunk-YPBDPVLR.js} +2 -2
  71. package/dist-cli/chunks/{chunk-VANZFTUE.js → chunk-ZEF57HQO.js} +1 -1
  72. package/dist-cli/chunks/{chunk-HFFXPUEP.js → chunk-ZNNE5MAV.js} +1 -1
  73. package/dist-cli/chunks/{chunk-N5OSV26B.js → chunk-ZW6JXEVX.js} +2 -2
  74. package/dist-cli/chunks/{cleanup-GVFHQ3KH.js → cleanup-H4XFRMZV.js} +2 -2
  75. package/dist-cli/chunks/cli-version-MJWLDXBW.js +4 -0
  76. package/dist-cli/chunks/compat-NKGYERLN.js +23 -0
  77. package/dist-cli/chunks/{config-K7LOOV62.js → config-WK7467KI.js} +2 -2
  78. package/dist-cli/chunks/{connect-H3CNY4IO.js → connect-WWWAVVCF.js} +2 -2
  79. package/dist-cli/chunks/{control-SMHZ2CF5.js → control-ESI7IZNN.js} +2 -2
  80. package/dist-cli/chunks/daemon-UCLO27YP.js +4 -0
  81. package/dist-cli/chunks/{debug-ELGHG57T.js → debug-RO6GLDIM.js} +3 -3
  82. package/dist-cli/chunks/{desktop-4G7FK3MP.js → desktop-FF34Z5X4.js} +3 -3
  83. package/dist-cli/chunks/{detox-JKXGEJIZ.js → detox-Q3CWY5UX.js} +2 -2
  84. package/dist-cli/chunks/{device-IV3AR6KG.js → device-WN4ZWLES.js} +2 -2
  85. package/dist-cli/chunks/{diagnose-3ERGF7EW.js → diagnose-HDRTUPDO.js} +2 -2
  86. package/dist-cli/chunks/{disk-cleanup-ALFEVZ4B.js → disk-cleanup-QP2NYN43.js} +2 -2
  87. package/dist-cli/chunks/{do-chain-K2B4OHM7.js → do-chain-6LP6SV5J.js} +2 -2
  88. package/dist-cli/chunks/drivers-OR2JPAXD.js +4 -0
  89. package/dist-cli/chunks/{env-2KF6IYZE.js → env-4XD5D2G6.js} +2 -2
  90. package/dist-cli/chunks/{film-UQXJFAD5.js → film-I5SIXLS5.js} +3 -3
  91. package/dist-cli/chunks/flow-4GWW5DYT.js +4 -0
  92. package/dist-cli/chunks/help-MIIWOT3C.js +4 -0
  93. package/dist-cli/chunks/{hidden-runtime-alias-VJCWCFVO.js → hidden-runtime-alias-LJV2S4M2.js} +2 -2
  94. package/dist-cli/chunks/{home-paths-EGUZZ6J6.js → home-paths-RFI2QRC3.js} +2 -2
  95. package/dist-cli/chunks/inspect-3ZGNJENJ.js +4 -0
  96. package/dist-cli/chunks/install-desktop-BYOJVTLS.js +4 -0
  97. package/dist-cli/chunks/{login-6KQGD7HK.js → login-GNIFSAFE.js} +2 -2
  98. package/dist-cli/chunks/{logout-2FCOVLBC.js → logout-DKXZZ6HU.js} +2 -2
  99. package/dist-cli/chunks/{maestro-HPSSEVJD.js → maestro-WKGVVWRA.js} +3 -3
  100. package/dist-cli/chunks/{maestro-generate-KQQ6JHMR.js → maestro-generate-KCK6RK2C.js} +3 -3
  101. package/dist-cli/chunks/{mode-SH7KRZET.js → mode-YVMX7OJY.js} +2 -2
  102. package/dist-cli/chunks/{optional-demo-registry-NAMCAVFX.js → optional-demo-registry-EUSKBIPP.js} +2 -2
  103. package/dist-cli/chunks/{perf-LWKAHXUL.js → perf-IMZMA5MT.js} +2 -2
  104. package/dist-cli/chunks/{permissions-EZTKWTXV.js → permissions-SLWXTLH6.js} +2 -2
  105. package/dist-cli/chunks/{platform-KSOJIVN5.js → platform-HQ735LAE.js} +3 -3
  106. package/dist-cli/chunks/privacy-EDC7PF7G.js +4 -0
  107. package/dist-cli/chunks/{record-2IC7BAQN.js → record-N4KTTVDI.js} +3 -3
  108. package/dist-cli/chunks/{report-issue-MMX6HOQO.js → report-issue-PP752HAD.js} +2 -2
  109. package/dist-cli/chunks/reset-DRMKGVP4.js +4 -0
  110. package/dist-cli/chunks/resolve-target-7WWI32R3.js +4 -0
  111. package/dist-cli/chunks/runtime-EKJV2ZVI.js +4 -0
  112. package/dist-cli/chunks/{screenshot-command-JYUXDVSA.js → screenshot-command-HAJB5FHK.js} +3 -3
  113. package/dist-cli/chunks/{screenshot-layers-OGRY6AA3.js → screenshot-layers-GOCJVM2G.js} +2 -2
  114. package/dist-cli/chunks/{screenshots-capture-QHDN65XS.js → screenshots-capture-YYJLYA3V.js} +2 -2
  115. package/dist-cli/chunks/{serve-W4BKAG4J.js → serve-TM46TKFW.js} +2 -2
  116. package/dist-cli/chunks/setup-FVPVIYE4.js +4 -0
  117. package/dist-cli/chunks/{sim-client-UOQGFBPO.js → sim-client-LQUZSO45.js} +2 -2
  118. package/dist-cli/chunks/{skills-OPPXOD63.js → skills-V5TE57FN.js} +2 -2
  119. package/dist-cli/chunks/{state-TDAN7BOM.js → state-RUVM4Z4S.js} +2 -2
  120. package/dist-cli/chunks/{storage-CFB2YGLY.js → storage-GQ33UTYN.js} +2 -2
  121. package/dist-cli/chunks/store-IKNBDDKM.js +4 -0
  122. package/dist-cli/chunks/telemetry-2ZVU6WLK.js +4 -0
  123. package/dist-cli/chunks/{timeline-ASOOVP4C.js → timeline-LP7DMJYT.js} +2 -2
  124. package/dist-cli/chunks/{upgrade-6MVJISHG.js → upgrade-AZDZLUIT.js} +2 -2
  125. package/dist-cli/chunks/upload-DFQK2Q7X.js +4 -0
  126. package/dist-cli/chunks/{version-5GS7CWRL.js → version-N3ALB75G.js} +2 -2
  127. package/dist-cli/chunks/{web-QRRMYMV4.js → web-XPHFZATA.js} +2 -2
  128. package/dist-cli/chunks/welcome-2NFYLWLJ.js +5 -0
  129. package/dist-cli/chunks/{what-happened-GAZJGKXX.js → what-happened-EJ5PHKT7.js} +2 -2
  130. package/dist-cli/chunks/{ws-bridge-DIXUAPLQ.js → ws-bridge-RUXOYOU6.js} +2 -2
  131. package/dist-lib/agent-daemon-client.cjs +1 -1
  132. package/dist-lib/agent-events.cjs +1 -1
  133. package/dist-lib/agent-identity.cjs +1 -1
  134. package/dist-lib/agent-sessions.cjs +1 -1
  135. package/dist-lib/attached-projects.cjs +1 -1
  136. package/dist-lib/auth/shared-session.cjs +1 -1
  137. package/dist-lib/backend-origin.cjs +1 -1
  138. package/dist-lib/beta.cjs +1 -1
  139. package/dist-lib/beta.mjs +1 -1
  140. package/dist-lib/bridge-constants.cjs +1 -1
  141. package/dist-lib/bridge-contract-input.cjs +1 -1
  142. package/dist-lib/bridge-contract-input.mjs +1 -1
  143. package/dist-lib/bridge-contract.cjs +1 -1
  144. package/dist-lib/bridge-contract.mjs +1 -1
  145. package/dist-lib/cli-constants.cjs +1 -1
  146. package/dist-lib/config.cjs +1 -1
  147. package/dist-lib/detox/index.cjs +1 -1
  148. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  149. package/dist-lib/home-paths.cjs +1 -1
  150. package/dist-lib/host/bridge-host.cjs +1 -1
  151. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  152. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  153. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  154. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  155. package/dist-lib/host/websocket-proxy.cjs +1 -1
  156. package/dist-lib/index.cjs +1 -1
  157. package/dist-lib/jump-to-source-babel.cjs +1 -1
  158. package/dist-lib/menu.cjs +1 -1
  159. package/dist-lib/menu.mjs +1 -1
  160. package/dist-lib/metro-production-bundle.cjs +1 -1
  161. package/dist-lib/metro-production-bundle.mjs +1 -1
  162. package/dist-lib/metro.cjs +1 -1
  163. package/dist-lib/profiles.cjs +1 -1
  164. package/dist-lib/public-brand.cjs +1 -1
  165. package/dist-lib/react-native-host-modules.cjs +1 -1
  166. package/dist-lib/react-native-host-modules.mjs +1 -1
  167. package/dist-lib/render-mode.cjs +1 -1
  168. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  169. package/dist-lib/sdk.cjs +1 -1
  170. package/dist-lib/sdk.mjs +1 -1
  171. package/dist-lib/skills.cjs +482 -2
  172. package/dist-lib/vite.cjs +1 -1
  173. package/package.json +1 -1
  174. package/dist-cli/chunks/cli-version-DPX5MA2M.js +0 -4
  175. package/dist-cli/chunks/compat-AYRTXYAM.js +0 -20
  176. package/dist-cli/chunks/daemon-TEZUNI73.js +0 -4
  177. package/dist-cli/chunks/drivers-KJYXA3M3.js +0 -4
  178. package/dist-cli/chunks/flow-ASTUH56E.js +0 -4
  179. package/dist-cli/chunks/help-SNNYFELA.js +0 -4
  180. package/dist-cli/chunks/inspect-XANAADQT.js +0 -4
  181. package/dist-cli/chunks/install-desktop-JKQA7UY6.js +0 -4
  182. package/dist-cli/chunks/privacy-EJULWP7L.js +0 -4
  183. package/dist-cli/chunks/reset-PKFZA4NC.js +0 -4
  184. package/dist-cli/chunks/resolve-target-AFKU3BRE.js +0 -4
  185. package/dist-cli/chunks/runtime-XHWWPOIN.js +0 -4
  186. package/dist-cli/chunks/setup-WJPMPSAC.js +0 -4
  187. package/dist-cli/chunks/store-4TEED4ZU.js +0 -4
  188. package/dist-cli/chunks/telemetry-S6N7CV6G.js +0 -4
  189. package/dist-cli/chunks/upload-CBNIRFEW.js +0 -4
  190. 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 })
@@ -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
- const result = packageName ? scanOnePackage(pkg, packageName) : scanDeps(pkg)
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(pkg: PackageManifest, packageName: string): ScanResult {
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
- pkg.dependencies?.[packageName] ?? pkg.devDependencies?.[packageName] ?? '*'
172
+ installed.dependencies?.[packageName] ??
173
+ installed.devDependencies?.[packageName] ??
174
+ '*'
86
175
  return scanDeps({ dependencies: { [packageName]: version } })
87
176
  }
@@ -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
- hasViteConfig:
106
- existsSync(join(dir, 'vite.config.ts')) || existsSync(join(dir, 'vite.config.js')),
107
- hasMetroConfig:
108
- existsSync(join(dir, 'metro.config.js')) ||
109
- existsSync(join(dir, 'metro.config.ts')),
110
- hasSootsimDependency: Boolean(deps.sootsim),
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-YGQVQ2VG.js";import{a as m}from"./chunks/chunk-A5AJFVOF.js";import"./chunks/chunk-G5IUIGGC.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}
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-VJCWCFVO.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-EJULWP7L.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-EGUZZ6J6.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-ALFEVZ4B.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}
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-S6N7CV6G.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-DPX5MA2M.js"),{IS_BETA:t,BETA_LABEL:r}=await import("./chunks/beta-6RXBB5AI.js"),d=t?` \xB7 ${r}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-EGUZZ6J6.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-SNNYFELA.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-4TEED4ZU.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-33FXMAMB.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-SNNYFELA.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-OPPXOD63.js");await r(e.commandArgs),await o(0)}if(s==="state"){let{runState:r}=await import("./chunks/state-TDAN7BOM.js");await o(await r(i,{port:n}))}if(s==="reset"){let{runReset:r}=await import("./chunks/reset-PKFZA4NC.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-SNNYFELA.js");r(s)&&await o(0)}else{let{printCommandHelp:r}=await import("./chunks/help-SNNYFELA.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-K2B4OHM7.js");t(i)&&await o(await r(i,{port:n}))}let{runInspect:a}=await import("./chunks/inspect-XANAADQT.js");await a([s,...i],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-IMR6QCN6.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-JKXGEJIZ.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-HPSSEVJD.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-2IC7BAQN.js");await a(i,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-UQXJFAD5.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-CFB2YGLY.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-TDAN7BOM.js"),t=await a(i,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-PKFZA4NC.js"),t=await a(i,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-LWKAHXUL.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-JYUXDVSA.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-2G7JZ5DL.js"),t=await a(i,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-SH7KRZET.js");await a(i,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-EZTKWTXV.js"),t=await a(i,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-ELGHG57T.js");await a(i,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-ASOOVP4C.js");await a(i,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-GAZJGKXX.js");await a(i,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-SMHZ2CF5.js");await a(i,{port:n});break}case"ios":case"android":{let{runPlatformCommand:a}=await import("./chunks/platform-KSOJIVN5.js"),t=await a(s,i,{port:n});await o(typeof t=="number"?t:0)}case"box":{let{runBox:a}=await import("./chunks/box-DORLF3GP.js");await o(await a(i,{port:n,verbose:c}))}case"use":{let{runUseCommand:a}=await import("./chunks/control-SMHZ2CF5.js");await a(i,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-SMHZ2CF5.js");await a(i,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-SMHZ2CF5.js");await a(i,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-IV3AR6KG.js");await a(i,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-AYRTXYAM.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-MMX6HOQO.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-4G7FK3MP.js");await a(e.commandArgs,{port:n,device:u});break}case"login":{let{runLogin:a}=await import("./chunks/login-6KQGD7HK.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-2FCOVLBC.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-27LPMQNH.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-WJPMPSAC.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-W4BKAG4J.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-TEZUNI73.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-XHWWPOIN.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-6MVJISHG.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-5GS7CWRL.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-EKKIAKP5.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-MHLQUGA6.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-OPPXOD63.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-HN6ADRTQ.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-K7LOOV62.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-GVFHQ3KH.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();
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-VFU2SJ7M.js";import"./chunk-HNT2OXPZ.js";import{c as $}from"./chunk-E33A4AIR.js";import"./chunk-PHNURIH3.js";import"./chunk-W5PATILQ.js";import"./chunk-JPXQKLNH.js";import"./chunk-YV7ERO2V.js";import"./chunk-IR44SFBA.js";import"./chunk-XWUTJLBM.js";import"./chunk-VANZFTUE.js";import"./chunk-AXMMLO7D.js";import{j as y}from"./chunk-3VBVEDDA.js";import"./chunk-6SO6I3D5.js";import"./chunk-A5AJFVOF.js";import"./chunk-G5IUIGGC.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}
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-HNT2OXPZ.js";import"./chunk-G5IUIGGC.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)+`
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-LWOVKHRC.js";import"./chunk-U44VEQRN.js";import"./chunk-RNQTOGM7.js";import"./chunk-G5IUIGGC.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};
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-G5IUIGGC.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(`
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-EFMOXYDD.js";import{d as t}from"./chunk-N5OSV26B.js";import"./chunk-3VBVEDDA.js";import"./chunk-G5IUIGGC.js";function i(){console.log(`
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.367 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
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-JPXQKLNH.js";import"./chunk-G5IUIGGC.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
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};