rnxsim 0.1.352 → 0.1.353

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 (198) hide show
  1. package/README.md +17 -16
  2. package/cli/bin.ts +5 -4
  3. package/cli/commands/control.ts +20 -5
  4. package/cli/commands/daemon-mac-app.ts +1 -1
  5. package/cli/commands/daemon.ts +6 -8
  6. package/cli/commands/install-desktop.ts +42 -32
  7. package/cli/commands/no-bridge-hint.ts +3 -3
  8. package/cli/commands/serve.ts +1 -1
  9. package/cli/commands/setup.ts +215 -176
  10. package/cli/commands/welcome.ts +9 -58
  11. package/cli/desktop-companion.ts +31 -16
  12. package/cli/prompt.ts +12 -7
  13. package/cli/setup-repository.ts +6 -2
  14. package/cli/ui.ts +68 -0
  15. package/dist-cli/bin.js +5 -5
  16. package/dist-cli/chunks/{agent-27WDUXK5.js → agent-YTAX6OQQ.js} +2 -2
  17. package/dist-cli/chunks/{agent-wrapper-XAUWPZ6O.js → agent-wrapper-2QSUXMNK.js} +2 -2
  18. package/dist-cli/chunks/{app-fonts-COAZFLDG.js → app-fonts-4EVHPXVG.js} +2 -2
  19. package/dist-cli/chunks/{assert-ZR2UE3EH.js → assert-IXMSQLVY.js} +2 -2
  20. package/dist-cli/chunks/{auth-LISHWKCC.js → auth-6QFWU2T5.js} +2 -2
  21. package/dist-cli/chunks/{beta-AQQUYVA5.js → beta-27I5WWRE.js} +2 -2
  22. package/dist-cli/chunks/{camera-KE44ZN3U.js → camera-4HFUBXPM.js} +2 -2
  23. package/dist-cli/chunks/{chunk-DJAYEBF3.js → chunk-37J74ASV.js} +1 -1
  24. package/dist-cli/chunks/{chunk-XI4W6LRQ.js → chunk-3IWR7KHR.js} +2 -2
  25. package/dist-cli/chunks/{chunk-CY6HBAOB.js → chunk-3UXMNDMH.js} +2 -2
  26. package/dist-cli/chunks/{chunk-R2BFC3AC.js → chunk-3XDGLCNP.js} +2 -2
  27. package/dist-cli/chunks/{chunk-6NSUY346.js → chunk-4IXIONDR.js} +2 -2
  28. package/dist-cli/chunks/{chunk-YAMKV3UB.js → chunk-4NPZ5FO2.js} +2 -2
  29. package/dist-cli/chunks/{chunk-QJTW4QQW.js → chunk-4PV6QASJ.js} +1 -1
  30. package/dist-cli/chunks/{chunk-PEBQKBEP.js → chunk-57YZEJ6J.js} +1 -1
  31. package/dist-cli/chunks/{chunk-4AOAJXE2.js → chunk-5DLBRZAG.js} +2 -2
  32. package/dist-cli/chunks/{chunk-7T7DR34H.js → chunk-6JBOKETZ.js} +2 -2
  33. package/dist-cli/chunks/{chunk-AR3CPCW3.js → chunk-6NE5Z6KG.js} +1 -1
  34. package/dist-cli/chunks/{chunk-RASWCAJJ.js → chunk-7FUSVOMH.js} +2 -2
  35. package/dist-cli/chunks/{chunk-5JE5PNIV.js → chunk-7SKQRS74.js} +1 -1
  36. package/dist-cli/chunks/chunk-7V5O6I4Q.js +9 -0
  37. package/dist-cli/chunks/{chunk-3Y7NWE22.js → chunk-BK5TJXUU.js} +2 -2
  38. package/dist-cli/chunks/{chunk-H4IF54WS.js → chunk-CMQIFA4L.js} +1 -1
  39. package/dist-cli/chunks/{chunk-3ZV4WSCR.js → chunk-CYS3D7RG.js} +2 -2
  40. package/dist-cli/chunks/{chunk-LRKODRWI.js → chunk-DSBUGNC5.js} +2 -2
  41. package/dist-cli/chunks/{chunk-EGKGCDG5.js → chunk-ECIDT6F5.js} +1 -1
  42. package/dist-cli/chunks/{chunk-EHQHK7KN.js → chunk-ELBDKQK2.js} +2 -2
  43. package/dist-cli/chunks/{chunk-ELNSQ352.js → chunk-GAYCF2O5.js} +1 -1
  44. package/dist-cli/chunks/{chunk-ESVF72YH.js → chunk-HVLZYUGF.js} +2 -2
  45. package/dist-cli/chunks/{chunk-5JINX2IB.js → chunk-HWMBTYJX.js} +2 -2
  46. package/dist-cli/chunks/{chunk-MJB6N7WS.js → chunk-HZTWQZUD.js} +2 -2
  47. package/dist-cli/chunks/{chunk-M6DC6JZL.js → chunk-IX7W5BXL.js} +2 -2
  48. package/dist-cli/chunks/{chunk-BZ32JGFC.js → chunk-JVVO63QH.js} +1 -1
  49. package/dist-cli/chunks/{chunk-JEPQ5YX3.js → chunk-KIQVNLVD.js} +2 -2
  50. package/dist-cli/chunks/chunk-KZLGVYCX.js +7 -0
  51. package/dist-cli/chunks/{chunk-QP7KGSU4.js → chunk-LAFKQUT7.js} +3 -3
  52. package/dist-cli/chunks/{chunk-E42ZJLPN.js → chunk-LMFAIAA5.js} +1 -1
  53. package/dist-cli/chunks/chunk-MA5E6HJR.js +15 -0
  54. package/dist-cli/chunks/chunk-OEU2MEZQ.js +124 -0
  55. package/dist-cli/chunks/{chunk-BQE4E24T.js → chunk-PBTG4UCS.js} +1 -1
  56. package/dist-cli/chunks/{chunk-XHZEKHB2.js → chunk-PNQ33FJB.js} +6 -6
  57. package/dist-cli/chunks/{chunk-MJJP2BEI.js → chunk-R4KBCGXX.js} +3 -3
  58. package/dist-cli/chunks/chunk-RMOSWLWG.js +32 -0
  59. package/dist-cli/chunks/{chunk-WNJDE2JT.js → chunk-RRX5RZI2.js} +1 -1
  60. package/dist-cli/chunks/{chunk-R4P7WO4L.js → chunk-T2ZZSSCP.js} +2 -2
  61. package/dist-cli/chunks/{chunk-DSF4WC4X.js → chunk-TX2T5KPQ.js} +2 -2
  62. package/dist-cli/chunks/{chunk-2OME2KGY.js → chunk-UEILOAPW.js} +1 -1
  63. package/dist-cli/chunks/{chunk-TF6VBUZ7.js → chunk-UNBVUOIC.js} +2 -2
  64. package/dist-cli/chunks/chunk-UQBXA3AK.js +24 -0
  65. package/dist-cli/chunks/{chunk-H6MTPXZS.js → chunk-V7X543SB.js} +1 -1
  66. package/dist-cli/chunks/{chunk-45D2GGIA.js → chunk-VLI54BKH.js} +2 -2
  67. package/dist-cli/chunks/{chunk-RH6FJI5O.js → chunk-VZDW2U64.js} +2 -2
  68. package/dist-cli/chunks/chunk-WKQ6W74M.js +11 -0
  69. package/dist-cli/chunks/{chunk-S2PJOB2C.js → chunk-WTGQUQ32.js} +2 -2
  70. package/dist-cli/chunks/{chunk-P5YC5VGA.js → chunk-WU25RTIX.js} +2 -2
  71. package/dist-cli/chunks/chunk-WV3TKN7D.js +4 -0
  72. package/dist-cli/chunks/{chunk-Q4ROOH3W.js → chunk-XVLYLZOM.js} +2 -2
  73. package/dist-cli/chunks/{chunk-VQDY7NEJ.js → chunk-YQJOM55S.js} +1 -1
  74. package/dist-cli/chunks/{chunk-AIGZ3TSW.js → chunk-YYYWU6LL.js} +3 -3
  75. package/dist-cli/chunks/{chunk-NQMZOJPX.js → chunk-ZF53H457.js} +2 -2
  76. package/dist-cli/chunks/{chunk-24CIPQT5.js → chunk-ZJ4O636U.js} +1 -1
  77. package/dist-cli/chunks/{chunk-ZK5HYQ4I.js → chunk-ZXHAAVTH.js} +2 -2
  78. package/dist-cli/chunks/{chunk-FHLEA4S5.js → chunk-ZYGWIVW4.js} +2 -2
  79. package/dist-cli/chunks/{cleanup-JUY2WU24.js → cleanup-ULH3BHAE.js} +2 -2
  80. package/dist-cli/chunks/cli-version-I2E56I4W.js +4 -0
  81. package/dist-cli/chunks/{compat-S2TBISY3.js → compat-ONN5DOHB.js} +2 -2
  82. package/dist-cli/chunks/{config-3PHD4J5N.js → config-OPZU73MX.js} +2 -2
  83. package/dist-cli/chunks/control-WNYEAI4K.js +4 -0
  84. package/dist-cli/chunks/daemon-5J6V2GLG.js +4 -0
  85. package/dist-cli/chunks/{debug-PFAJONVV.js → debug-GNI3HDAK.js} +3 -3
  86. package/dist-cli/chunks/{desktop-Z7EOBMNV.js → desktop-DF65PDJG.js} +4 -4
  87. package/dist-cli/chunks/{detox-KRSP5SLY.js → detox-N267KW2Y.js} +2 -2
  88. package/dist-cli/chunks/{device-ZXJ7GRBO.js → device-RFU44PE3.js} +2 -2
  89. package/dist-cli/chunks/{diagnose-JIMLEOEJ.js → diagnose-XR2JIGDE.js} +2 -2
  90. package/dist-cli/chunks/{disk-cleanup-YY7FFGVA.js → disk-cleanup-DPY6TYXA.js} +2 -2
  91. package/dist-cli/chunks/drivers-OIZC544W.js +4 -0
  92. package/dist-cli/chunks/{film-LKSJPU2A.js → film-NQQZPZ2W.js} +3 -3
  93. package/dist-cli/chunks/flow-3NHEHRF4.js +4 -0
  94. package/dist-cli/chunks/help-VACWNWEH.js +4 -0
  95. package/dist-cli/chunks/{hidden-runtime-alias-ZN3WZ3ND.js → hidden-runtime-alias-APCBIXJ6.js} +2 -2
  96. package/dist-cli/chunks/home-paths-27GY5EPD.js +4 -0
  97. package/dist-cli/chunks/inspect-2JELKZ5A.js +4 -0
  98. package/dist-cli/chunks/install-desktop-4R7UTGQU.js +4 -0
  99. package/dist-cli/chunks/{login-XKLIFTAU.js → login-6KIO5FR4.js} +2 -2
  100. package/dist-cli/chunks/{logout-DR22RB5H.js → logout-WMCYGTYA.js} +2 -2
  101. package/dist-cli/chunks/{maestro-SLCX6HBV.js → maestro-7QLOUZIE.js} +3 -3
  102. package/dist-cli/chunks/{maestro-generate-GBFZ5INV.js → maestro-generate-QIGCQANR.js} +3 -3
  103. package/dist-cli/chunks/{mode-F4R2KNXX.js → mode-3H662MUJ.js} +2 -2
  104. package/dist-cli/chunks/{optional-demo-registry-HM55KXGB.js → optional-demo-registry-FQV54ASP.js} +2 -2
  105. package/dist-cli/chunks/{perf-VBS5GEPG.js → perf-KC6LOGFD.js} +2 -2
  106. package/dist-cli/chunks/{permissions-F46PQIUE.js → permissions-UGVHA3L6.js} +2 -2
  107. package/dist-cli/chunks/privacy-E6KH2DRJ.js +4 -0
  108. package/dist-cli/chunks/{record-NLZ6DFAA.js → record-V72Q363I.js} +3 -3
  109. package/dist-cli/chunks/{report-issue-XIE5BVR4.js → report-issue-MILOOCMG.js} +2 -2
  110. package/dist-cli/chunks/reset-LEL5ZGFN.js +4 -0
  111. package/dist-cli/chunks/runtime-RT2OTIQC.js +4 -0
  112. package/dist-cli/chunks/{screenshot-command-SD4JPNKW.js → screenshot-command-FYMZF5AF.js} +3 -3
  113. package/dist-cli/chunks/{screenshot-layers-X65RC3GT.js → screenshot-layers-OXLW6GEJ.js} +2 -2
  114. package/dist-cli/chunks/{screenshots-capture-BBXN7FEZ.js → screenshots-capture-N3LKTUKB.js} +2 -2
  115. package/dist-cli/chunks/{serve-M6ZKMSAG.js → serve-USDREK3N.js} +2 -2
  116. package/dist-cli/chunks/setup-QC7W7NCL.js +4 -0
  117. package/dist-cli/chunks/{skills-KDWGQBOP.js → skills-3MIZF3DS.js} +2 -2
  118. package/dist-cli/chunks/{state-NWABXG2P.js → state-MCFLWQHV.js} +2 -2
  119. package/dist-cli/chunks/{storage-QQE3G65Q.js → storage-KXNS5WEC.js} +2 -2
  120. package/dist-cli/chunks/store-GL6DFPJL.js +4 -0
  121. package/dist-cli/chunks/telemetry-OOW5FMZQ.js +4 -0
  122. package/dist-cli/chunks/{timeline-2VZ45MMB.js → timeline-QJ3USMSX.js} +2 -2
  123. package/dist-cli/chunks/{upgrade-T7PDR6T5.js → upgrade-LXFD4DFX.js} +2 -2
  124. package/dist-cli/chunks/upload-EUEO4D5N.js +4 -0
  125. package/dist-cli/chunks/{version-BX6QX5XA.js → version-D5DLNPHP.js} +2 -2
  126. package/dist-cli/chunks/{web-4J6JRZN2.js → web-FRFNTTZ4.js} +2 -2
  127. package/dist-cli/chunks/welcome-YYYGS5WD.js +5 -0
  128. package/dist-cli/chunks/{what-happened-CHQKFNCM.js → what-happened-FJ6GRQAS.js} +2 -2
  129. package/dist-lib/agent-daemon-client.cjs +2 -2
  130. package/dist-lib/agent-events.cjs +1 -1
  131. package/dist-lib/agent-identity.cjs +1 -1
  132. package/dist-lib/agent-sessions.cjs +1 -1
  133. package/dist-lib/attached-projects.cjs +1 -1
  134. package/dist-lib/auth/shared-session.cjs +1 -1
  135. package/dist-lib/backend-origin.cjs +1 -1
  136. package/dist-lib/beta.cjs +1 -1
  137. package/dist-lib/beta.mjs +1 -1
  138. package/dist-lib/bridge-constants.cjs +1 -1
  139. package/dist-lib/bridge-contract.cjs +1 -1
  140. package/dist-lib/cli-constants.cjs +1 -1
  141. package/dist-lib/config.cjs +1 -1
  142. package/dist-lib/detox/index.cjs +1 -1
  143. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  144. package/dist-lib/home-paths.cjs +21 -1
  145. package/dist-lib/host/bridge-host.cjs +1 -1
  146. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  147. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  148. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  149. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  150. package/dist-lib/host/websocket-proxy.cjs +1 -1
  151. package/dist-lib/index.cjs +2 -2
  152. package/dist-lib/jump-to-source-babel.cjs +1 -1
  153. package/dist-lib/menu.cjs +1 -1
  154. package/dist-lib/menu.mjs +1 -1
  155. package/dist-lib/metro-production-bundle.cjs +1 -1
  156. package/dist-lib/metro-production-bundle.mjs +1 -1
  157. package/dist-lib/metro.cjs +2 -2
  158. package/dist-lib/profiles.cjs +1 -1
  159. package/dist-lib/public-brand.cjs +1 -1
  160. package/dist-lib/react-native-host-modules.cjs +1 -1
  161. package/dist-lib/react-native-host-modules.mjs +1 -1
  162. package/dist-lib/render-mode.cjs +1 -1
  163. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  164. package/dist-lib/sdk.cjs +1 -1
  165. package/dist-lib/sdk.mjs +1 -1
  166. package/dist-lib/skills.cjs +87 -22
  167. package/dist-lib/vite.cjs +2 -2
  168. package/package.json +1 -1
  169. package/skills/contrast/SKILL.md +3 -3
  170. package/skills/rnx-setup/SKILL.md +17 -5
  171. package/src/agent-daemon-client.ts +1 -1
  172. package/src/home-paths.ts +22 -0
  173. package/src/metro-plugin.ts +1 -1
  174. package/src/runtime-assets.ts +1 -1
  175. package/dist-cli/chunks/chunk-2JZXOHH6.js +0 -4
  176. package/dist-cli/chunks/chunk-2WJABJ6C.js +0 -15
  177. package/dist-cli/chunks/chunk-5OVXQKUP.js +0 -25
  178. package/dist-cli/chunks/chunk-DFTG53TX.js +0 -11
  179. package/dist-cli/chunks/chunk-HF2FZ2WN.js +0 -7
  180. package/dist-cli/chunks/chunk-S63ENXGH.js +0 -6
  181. package/dist-cli/chunks/chunk-UHP33XGC.js +0 -124
  182. package/dist-cli/chunks/cli-version-6SQSIFNQ.js +0 -4
  183. package/dist-cli/chunks/control-GLBCTKAA.js +0 -4
  184. package/dist-cli/chunks/daemon-H4OVIEMH.js +0 -4
  185. package/dist-cli/chunks/drivers-63LY2NCK.js +0 -4
  186. package/dist-cli/chunks/flow-JHKPF7BN.js +0 -4
  187. package/dist-cli/chunks/help-Q6OY6VVA.js +0 -4
  188. package/dist-cli/chunks/home-paths-UOATIRKF.js +0 -4
  189. package/dist-cli/chunks/inspect-DW3V2FD4.js +0 -4
  190. package/dist-cli/chunks/install-desktop-GWY5H22W.js +0 -4
  191. package/dist-cli/chunks/privacy-34FNXPJP.js +0 -4
  192. package/dist-cli/chunks/reset-BAGCFYTS.js +0 -4
  193. package/dist-cli/chunks/runtime-JTYB4CM7.js +0 -4
  194. package/dist-cli/chunks/setup-KTWKZOJB.js +0 -30
  195. package/dist-cli/chunks/store-6XW4YZM6.js +0 -4
  196. package/dist-cli/chunks/telemetry-MVSV7JHI.js +0 -4
  197. package/dist-cli/chunks/upload-RF2MNO2X.js +0 -4
  198. package/dist-cli/chunks/welcome-3MJHGERV.js +0 -5
@@ -24,7 +24,7 @@ const SOOTSIM_BUNDLE_ID = 'dev.sootsim.simulator'
24
24
  export interface DesktopCompanionInstall {
25
25
  path: string
26
26
  platform: NodeJS.Platform
27
- kind: 'mac-app' | 'linux-appimage' | 'linux-binary' | 'dev-electron'
27
+ kind: 'mac-app' | 'linux-appimage' | 'linux-binary' | 'win-exe' | 'dev-electron'
28
28
  // present for dev-electron: the sootsim-engine dir that electron treats
29
29
  // as the app root (its package.json "main" points at dist-electron/main.cjs).
30
30
  engineDir?: string
@@ -32,13 +32,13 @@ export interface DesktopCompanionInstall {
32
32
 
33
33
  export interface DesktopCompanionLaunchResult {
34
34
  launched: boolean
35
- via?: 'mac-app' | 'linux-appimage' | 'linux-binary' | 'dev-electron'
35
+ via?: 'mac-app' | 'linux-appimage' | 'linux-binary' | 'win-exe' | 'dev-electron'
36
36
  target?: string
37
37
  }
38
38
 
39
39
  // dev-electron: when running from inside the Contrast checkout with sootsim-engine
40
40
  // built and the electron dev dep present, prefer launching the local unpacked
41
- // electron instead of the stale packaged /Applications/sootsim.app.
41
+ // electron instead of the stale packaged /Applications/rnx.app.
42
42
  //
43
43
  // rationale: in dev we want electron to hit http://localhost:5173
44
44
  // (src-electron/main.ts does this when !app.isPackaged).
@@ -92,9 +92,9 @@ function findElectronBin(startDir: string): string | null {
92
92
  function findMacApp(): DesktopCompanionInstall | null {
93
93
  const root = getSootsimRoot()
94
94
  const candidates = [
95
- '/Applications/sootsim.app',
96
- resolve(process.env.HOME || '', 'Applications/sootsim.app'),
97
- ...(root ? [resolve(root, 'app/sootsim.app')] : []),
95
+ '/Applications/rnx.app',
96
+ resolve(process.env.HOME || '', 'Applications/rnx.app'),
97
+ ...(root ? [resolve(root, 'app/rnx.app')] : []),
98
98
  ]
99
99
 
100
100
  const found = candidates.find((candidate) => existsSync(candidate))
@@ -127,7 +127,7 @@ function findMacApp(): DesktopCompanionInstall | null {
127
127
  function findFirstAppImage(dir: string): string | null {
128
128
  if (!existsSync(dir)) return null
129
129
  const match = readdirSync(dir)
130
- .filter((entry) => entry.startsWith('sootsim') && entry.endsWith('.AppImage'))
130
+ .filter((entry) => entry.startsWith('rnx') && entry.endsWith('.AppImage'))
131
131
  .sort()
132
132
  .reverse()[0]
133
133
  return match ? join(dir, match) : null
@@ -136,15 +136,12 @@ function findFirstAppImage(dir: string): string | null {
136
136
  function findLinuxInstall(): DesktopCompanionInstall | null {
137
137
  const root = getSootsimRoot()
138
138
  const directCandidates = [
139
- resolve(process.env.HOME || '', 'Applications/sootsim.AppImage'),
140
- resolve(process.env.HOME || '', '.local/bin/sootsim.AppImage'),
141
- '/opt/sootsim/sootsim.AppImage',
142
- '/opt/sootsim/sootsim',
139
+ resolve(process.env.HOME || '', 'Applications/rnx.AppImage'),
140
+ resolve(process.env.HOME || '', '.local/bin/rnx.AppImage'),
141
+ '/opt/rnx/rnx.AppImage',
142
+ '/opt/rnx/rnx',
143
143
  ...(root
144
- ? [
145
- resolve(root, 'app/sootsim.AppImage'),
146
- resolve(root, 'release/linux-unpacked/sootsim'),
147
- ]
144
+ ? [resolve(root, 'app/rnx.AppImage'), resolve(root, 'release/linux-unpacked/rnx')]
148
145
  : []),
149
146
  ]
150
147
 
@@ -171,6 +168,23 @@ function findLinuxInstall(): DesktopCompanionInstall | null {
171
168
  }
172
169
  }
173
170
 
171
+ function findWindowsInstall(): DesktopCompanionInstall | null {
172
+ for (const hive of ['HKCU', 'HKLM']) {
173
+ try {
174
+ const output = execFileSync(
175
+ 'reg',
176
+ ['query', `${hive}\\Software\\Classes\\rnx\\shell\\open\\command`, '/ve'],
177
+ { encoding: 'utf8', timeout: 3000 },
178
+ )
179
+ const executable = /"([^"\r\n]+\.exe)"/i.exec(output)?.[1]
180
+ if (executable && existsSync(executable)) {
181
+ return { path: executable, platform: 'win32', kind: 'win-exe' }
182
+ }
183
+ } catch {}
184
+ }
185
+ return null
186
+ }
187
+
174
188
  export function findDesktopCompanion(): DesktopCompanionInstall | null {
175
189
  const dev = findDevElectron()
176
190
  if (dev) return dev
@@ -192,6 +206,7 @@ export function findDesktopCompanion(): DesktopCompanionInstall | null {
192
206
  }
193
207
  if (process.platform === 'darwin') return findMacApp()
194
208
  if (process.platform === 'linux') return findLinuxInstall()
209
+ if (process.platform === 'win32') return findWindowsInstall()
195
210
  return null
196
211
  }
197
212
 
@@ -289,7 +304,7 @@ export async function launchDesktopCompanion(
289
304
 
290
305
  function buildMacLaunchUrl(url: string, opts: LaunchCompanionOptions): string {
291
306
  if (!opts.profileId && !opts.ephemeralProfile && !opts.ownerPid) return url
292
- const deepLink = new URL('sootsim://dev')
307
+ const deepLink = new URL('rnx://dev')
293
308
  deepLink.searchParams.set('url', url)
294
309
  if (opts.profileId) deepLink.searchParams.set('profile', opts.profileId)
295
310
  if (opts.ephemeralProfile) deepLink.searchParams.set('ephemeral', '1')
package/cli/prompt.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // minimal readline prompts — no external dependencies
2
2
 
3
3
  import { createInterface } from 'readline'
4
+ import { accent, bold, muted } from './ui'
4
5
 
5
6
  const rl = () =>
6
7
  createInterface({
@@ -19,32 +20,36 @@ function ask(question: string): Promise<string> {
19
20
  }
20
21
 
21
22
  export async function confirm(message: string, defaultYes = true): Promise<boolean> {
22
- const hint = defaultYes ? '[Y/n]' : '[y/N]'
23
+ const hint = defaultYes ? 'Y/n' : 'y/N'
23
24
  // non-interactive stdin (piped, /dev/null, closed) — readline's question
24
25
  // callback would never fire, leaving the await unsettled and the process
25
26
  // exiting 0 with a `Detected unsettled top-level await` warning. degrade
26
27
  // to the default instead so scripted invocations behave predictably.
27
28
  if (!process.stdin.isTTY) {
28
- console.log(` ${message} ${hint} ${defaultYes ? 'y' : 'n'} (non-interactive)`)
29
+ console.log(
30
+ ` ${message} (${hint}) ${defaultYes ? 'y' : 'n'} ${muted('(non-interactive)')}`,
31
+ )
29
32
  return defaultYes
30
33
  }
31
- const answer = await ask(` ${message} ${hint} `)
34
+ const answer = await ask(
35
+ ` ${accent('?')} ${bold(message)} ${muted(`(${hint})`)} ${accent('›')} `,
36
+ )
32
37
  if (answer === '') return defaultYes
33
38
  return answer.toLowerCase().startsWith('y')
34
39
  }
35
40
 
36
41
  export async function select(message: string, options: string[]): Promise<number> {
37
- console.log(`\n ${message}\n`)
42
+ console.log(`\n ${accent('?')} ${bold(message)}\n`)
38
43
  for (let i = 0; i < options.length; i++) {
39
- console.log(` ${i + 1}. ${options[i]}`)
44
+ console.log(` ${accent(String(i + 1))} ${options[i]}`)
40
45
  }
41
46
  console.log()
42
47
  // non-interactive stdin — pick the first option rather than hanging.
43
48
  if (!process.stdin.isTTY) {
44
- console.log(` choose [1-${options.length}]: 1 (non-interactive)`)
49
+ console.log(` Choose (1-${options.length}): 1 ${muted('(non-interactive)')}`)
45
50
  return 0
46
51
  }
47
- const answer = await ask(` choose [1-${options.length}]: `)
52
+ const answer = await ask(` ${muted(`Choose 1-${options.length}`)} ${accent('›')} `)
48
53
  const num = parseInt(answer, 10)
49
54
  if (num >= 1 && num <= options.length) return num - 1
50
55
  return 0 // default to first
@@ -22,10 +22,14 @@ interface PackageManifest {
22
22
  devDependencies?: Record<string, string>
23
23
  }
24
24
 
25
- export function findPackageRoot(startDir: string): string | null {
25
+ export function findRepositoryPackageRoot(startDir: string): string | null {
26
26
  let current = path.resolve(startDir)
27
+ let packageRoot: string | null = null
27
28
  while (true) {
28
- if (fs.existsSync(path.join(current, 'package.json'))) return current
29
+ if (!packageRoot && fs.existsSync(path.join(current, 'package.json'))) {
30
+ packageRoot = current
31
+ }
32
+ if (fs.existsSync(path.join(current, '.git'))) return packageRoot
29
33
  const parent = path.dirname(current)
30
34
  if (parent === current) return null
31
35
  current = parent
package/cli/ui.ts ADDED
@@ -0,0 +1,68 @@
1
+ const RESET = '\x1b[0m'
2
+ const BOLD = '\x1b[1m'
3
+ const DIM = '\x1b[2m'
4
+ const BRAND_BLUE = '\x1b[38;2;42;95;255m'
5
+ const GREEN = '\x1b[38;5;84m'
6
+ const RED = '\x1b[38;5;203m'
7
+
8
+ function paint(code: string, value: string): string {
9
+ if (!process.stdout.isTTY || process.env.NO_COLOR !== undefined) return value
10
+ return `${code}${value}${RESET}`
11
+ }
12
+
13
+ export function accent(value: string): string {
14
+ return paint(BRAND_BLUE, value)
15
+ }
16
+
17
+ export function bold(value: string): string {
18
+ return paint(BOLD, value)
19
+ }
20
+
21
+ export function muted(value: string): string {
22
+ return paint(DIM, value)
23
+ }
24
+
25
+ export function success(value: string): string {
26
+ return paint(GREEN, value)
27
+ }
28
+
29
+ export function failure(value: string): string {
30
+ return paint(RED, value)
31
+ }
32
+
33
+ export function printBrand(subtitle?: string): void {
34
+ console.log()
35
+ console.log(` ${accent('◤◢')} ${bold('rnx')}`)
36
+ if (subtitle) console.log(` ${muted(subtitle)}`)
37
+ }
38
+
39
+ export function printPromptBlock(title: string, description: string[]): void {
40
+ console.log(`\n ${accent('◆')} ${bold(title)}`)
41
+ for (const line of description) console.log(` ${muted(line)}`)
42
+ }
43
+
44
+ export async function withSpinner<T>(label: string, run: () => Promise<T>): Promise<T> {
45
+ if (!process.stdout.isTTY) {
46
+ console.log(` ${label}...`)
47
+ return run()
48
+ }
49
+
50
+ const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']
51
+ let index = 0
52
+ const draw = () => {
53
+ process.stdout.write(`\r\x1b[2K ${accent(frames[index++ % frames.length])} ${label}`)
54
+ }
55
+ draw()
56
+ const timer = setInterval(draw, 80)
57
+
58
+ try {
59
+ const result = await run()
60
+ clearInterval(timer)
61
+ process.stdout.write(`\r\x1b[2K ${success('✓')} ${label}\n`)
62
+ return result
63
+ } catch (error) {
64
+ clearInterval(timer)
65
+ process.stdout.write(`\r\x1b[2K ${failure('×')} ${label}\n`)
66
+ throw error
67
+ }
68
+ }
package/dist-cli/bin.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- /*! rnx v0.1.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ /*! rnx v0.1.353 | (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-E42ZJLPN.js";import{a as m}from"./chunks/chunk-BQE4E24T.js";import"./chunks/chunk-WNJDE2JT.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-LMFAIAA5.js";import{a as m}from"./chunks/chunk-PBTG4UCS.js";import"./chunks/chunk-RRX5RZI2.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-ZN3WZ3ND.js");e=a(e)}var $=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker";if(!$&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-34FNXPJP.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-UOATIRKF.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-YY7FFGVA.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=k?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",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-APCBIXJ6.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-E6KH2DRJ.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-27GY5EPD.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-DPY6TYXA.js");if(a())return;let{spawn:t}=await import("node:child_process"),i=["cleanup","--automatic-worker"],d=process.argv[1],p=k?t(process.execPath,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...i],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,i,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",u=>{process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${u.message}
14
14
  `)}),p.unref()}catch(a){process.stderr.write(` ${m.name} automatic cleanup will retry on the next run: ${a instanceof Error?a.message:String(a)}
15
- `)}}async function o(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-MVSV7JHI.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-6SQSIFNQ.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-AQQUYVA5.js"),d=t?` \xB7 ${i}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-UOATIRKF.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-Q6OY6VVA.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,x=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(u||l){let{settingsStore:a}=await import("./chunks/store-6XW4YZM6.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-3MJHGERV.js");await o(await a())}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}let{printHelp:a}=await import("./chunks/help-Q6OY6VVA.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-KDWGQBOP.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-NWABXG2P.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-BAGCFYTS.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-Q6OY6VVA.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-Q6OY6VVA.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}C(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-DW3V2FD4.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-ZR2UE3EH.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-KRSP5SLY.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-SLCX6HBV.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-NLZ6DFAA.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-LKSJPU2A.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-QQE3G65Q.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-NWABXG2P.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-BAGCFYTS.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-VBS5GEPG.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-SD4JPNKW.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-KE44ZN3U.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-F4R2KNXX.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-F46PQIUE.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-PFAJONVV.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-2VZ45MMB.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-CHQKFNCM.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-GLBCTKAA.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-GLBCTKAA.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-GLBCTKAA.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-GLBCTKAA.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-ZXJ7GRBO.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-S2TBISY3.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-XIE5BVR4.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-Z7EOBMNV.js");await a(e.commandArgs,{port:n,device:u});break}case"login":{let{runLogin:a}=await import("./chunks/login-XKLIFTAU.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-DR22RB5H.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-LISHWKCC.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-KTWKZOJB.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-M6ZKMSAG.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-H4OVIEMH.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-JTYB4CM7.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-T7PDR6T5.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-BX6QX5XA.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-27WDUXK5.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-XAUWPZ6O.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-KDWGQBOP.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-COAZFLDG.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-3PHD4J5N.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-JUY2WU24.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-OOW5FMZQ.js");await t(),await v(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-I2E56I4W.js"),{IS_BETA:t,BETA_LABEL:i}=await import("./chunks/beta-27I5WWRE.js"),d=t?` \xB7 ${i}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-27GY5EPD.js"),u=p();console.log(u?`runtime v${u}`:"runtime not installed"),await o(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-VACWNWEH.js");a(),await o(0)}var n=e.globalFlags.port,c=e.verbose,w=e.globalFlags.device,l=e.globalFlags.theme,W=e.globalFlags.driver,x=e.globalFlags.headless===!0,b=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,r=b?["--sim",b,...e.commandArgs]:e.commandArgs;if(w||l){let{settingsStore:a}=await import("./chunks/store-GL6DFPJL.js"),t={};w&&(t.deviceModel=w),l&&(t.colorScheme=l),a.apply(t)}if(!e.command&&e.commandArgs.length===0){let{runWelcome:a}=await import("./chunks/welcome-YYYGS5WD.js");await o(await a())}var s=e.command??"";if(!s){if(e.commandArgs.length>0){let t=e.commandArgs.find(i=>!i.startsWith("-"))??e.commandArgs[0];console.error(` unknown command: ${t}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await o(1)}let{printHelp:a}=await import("./chunks/help-VACWNWEH.js");a(),await o(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:i}=await import("./chunks/skills-3MIZF3DS.js");await i(e.commandArgs),await o(0)}if(s==="state"){let{runState:i}=await import("./chunks/state-MCFLWQHV.js");await o(await i(r,{port:n}))}if(s==="reset"){let{runReset:i}=await import("./chunks/reset-LEL5ZGFN.js");await o(await i(r,{port:n}))}let a=s==="do"||s==="get"||s==="debug"||s==="shell"||s==="perf"||s==="wait",t=e.commandArgs.find(i=>!i.startsWith("-"));if(!(s==="shell"||s==="perf"))if(a&&!t){let{printGroupHelp:i}=await import("./chunks/help-VACWNWEH.js");i(s)&&await o(0)}else{let{printCommandHelp:i}=await import("./chunks/help-VACWNWEH.js");i(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await o(0)}}C(s);if(g.has(s)){let{runInspect:a}=await import("./chunks/inspect-2JELKZ5A.js");await a([s,...r],{port:n,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-IXMSQLVY.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-N267KW2Y.js");await a(e.commandArgs,{port:n,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-7QLOUZIE.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-V72Q363I.js");await a(r,{port:n,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-NQQZPZ2W.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-KXNS5WEC.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-MCFLWQHV.js"),t=await a(r,{port:n});await o(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-LEL5ZGFN.js"),t=await a(r,{port:n});await o(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-KC6LOGFD.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-FYMZF5AF.js"),t=await a(r,{port:n,verbose:c});await o(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-4HFUBXPM.js"),t=await a(r,{port:n});await o(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-3H662MUJ.js");await a(r,{port:n,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-UGVHA3L6.js"),t=await a(r,{port:n,verbose:c});await o(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-GNI3HDAK.js");await a(r,{port:n,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-QJ3USMSX.js");await a(r,{port:n,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-FJ6GRQAS.js");await a(r,{port:n,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-WNYEAI4K.js");await a(r,{port:n});break}case"use":{let{runUseCommand:a}=await import("./chunks/control-WNYEAI4K.js");await a(r,{port:n});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-WNYEAI4K.js");await a(r,{port:n});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-WNYEAI4K.js");await a(r,{port:n});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-RFU44PE3.js");await a(r,{port:n});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-ONN5DOHB.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-MILOOCMG.js"),t=await a(e.commandArgs);await o(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-DF65PDJG.js");await a(e.commandArgs,{port:n,device:w});break}case"login":{let{runLogin:a}=await import("./chunks/login-6KIO5FR4.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-WMCYGTYA.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-6QFWU2T5.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-QC7W7NCL.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-USDREK3N.js");await a(e.commandArgs,{port:n});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-5J6V2GLG.js");await a(e.commandArgs,{port:n});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-RT2OTIQC.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-LXFD4DFX.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-D5DLNPHP.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-YTAX6OQQ.js"),t=await a(e.commandArgs);await o(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-2QSUXMNK.js"),t=await a(e.commandArgs);await o(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-3MIZF3DS.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-4EVHPXVG.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-OPZU73MX.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-ULH3BHAE.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (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-Q4ROOH3W.js";import"./chunk-24CIPQT5.js";import{c as $}from"./chunk-P5YC5VGA.js";import"./chunk-JEPQ5YX3.js";import"./chunk-45D2GGIA.js";import"./chunk-5JINX2IB.js";import"./chunk-RH6FJI5O.js";import"./chunk-EHQHK7KN.js";import"./chunk-EGKGCDG5.js";import"./chunk-UHP33XGC.js";import{j as y}from"./chunk-DFTG53TX.js";import"./chunk-S2PJOB2C.js";import"./chunk-BQE4E24T.js";import"./chunk-BZ32JGFC.js";import"./chunk-WNJDE2JT.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 setup\` to install the background daemon, 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-XVLYLZOM.js";import"./chunk-ZJ4O636U.js";import{c as $}from"./chunk-WU25RTIX.js";import"./chunk-KIQVNLVD.js";import"./chunk-VLI54BKH.js";import"./chunk-HWMBTYJX.js";import"./chunk-VZDW2U64.js";import"./chunk-ELBDKQK2.js";import"./chunk-ECIDT6F5.js";import"./chunk-OEU2MEZQ.js";import{j as y}from"./chunk-WKQ6W74M.js";import"./chunk-WTGQUQ32.js";import"./chunk-PBTG4UCS.js";import"./chunk-JVVO63QH.js";import"./chunk-RRX5RZI2.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (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-24CIPQT5.js";import"./chunk-WNJDE2JT.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-ZJ4O636U.js";import"./chunk-RRX5RZI2.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{o as p}from"./chunk-4AOAJXE2.js";import"./chunk-PEBQKBEP.js";import"./chunk-ELNSQ352.js";import"./chunk-WNJDE2JT.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{o as p}from"./chunk-5DLBRZAG.js";import"./chunk-57YZEJ6J.js";import"./chunk-GAYCF2O5.js";import"./chunk-RRX5RZI2.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (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-WNJDE2JT.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-RRX5RZI2.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (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-XI4W6LRQ.js";import{d as t}from"./chunk-R4P7WO4L.js";import"./chunk-DFTG53TX.js";import"./chunk-WNJDE2JT.js";function i(){console.log(`
4
+ import{a as r}from"./chunk-3IWR7KHR.js";import{d as t}from"./chunk-T2ZZSSCP.js";import"./chunk-WKQ6W74M.js";import"./chunk-RRX5RZI2.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.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (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-BZ32JGFC.js";import"./chunk-WNJDE2JT.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-JVVO63QH.js";import"./chunk-RRX5RZI2.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.352 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.353 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  import { createRequire as __sootsimCreateRequire } from 'node:module'
3
3
  var require = __sootsimCreateRequire(import.meta.url)
4
- import{m as O}from"./chunk-TF6VBUZ7.js";import"./chunk-H4IF54WS.js";import{q as E,s as F,u as N}from"./chunk-EHQHK7KN.js";import"./chunk-EGKGCDG5.js";import{r as S}from"./chunk-DFTG53TX.js";import"./chunk-WNJDE2JT.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import m from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
4
+ import{m as O}from"./chunk-UNBVUOIC.js";import"./chunk-CMQIFA4L.js";import{q as E,s as F,u as N}from"./chunk-ELBDKQK2.js";import"./chunk-ECIDT6F5.js";import{r as S}from"./chunk-WKQ6W74M.js";import"./chunk-RRX5RZI2.js";import{createHash as I,randomUUID as q}from"node:crypto";import{createReadStream as D}from"node:fs";import m from"node:fs/promises";import f from"node:path";var T="/__camera-fixtures/",J=new Set([".m4v",".mov",".mp4",".webm"]);function _(){console.log(`
5
5
  rnx camera \u2014 control the simulator camera source
6
6
 
7
7
  usage: