rnxsim 0.1.374 → 0.1.376

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 (196) hide show
  1. package/cli/commands/box.ts +5 -5
  2. package/cli/commands/control.ts +18 -4
  3. package/cli/ws-bridge.ts +5 -2
  4. package/dist-cli/bin.js +5 -5
  5. package/dist-cli/chunks/{agent-BKCNNEQV.js → agent-H42FCKFF.js} +2 -2
  6. package/dist-cli/chunks/{agent-wrapper-B3AS3ENV.js → agent-wrapper-BBZKTZS6.js} +2 -2
  7. package/dist-cli/chunks/{app-fonts-GWE22XIG.js → app-fonts-43VXIKF4.js} +2 -2
  8. package/dist-cli/chunks/{assert-ORX5Q6AH.js → assert-IXOLVO5Z.js} +2 -2
  9. package/dist-cli/chunks/{auth-REWJRBFP.js → auth-KFMFB6FU.js} +2 -2
  10. package/dist-cli/chunks/{beta-Q2VQZCLD.js → beta-5AO3SJB7.js} +2 -2
  11. package/dist-cli/chunks/{box-I5QZZJBJ.js → box-ZHM66L6K.js} +46 -46
  12. package/dist-cli/chunks/{camera-5HA2IJDC.js → camera-FNJVFCDQ.js} +2 -2
  13. package/dist-cli/chunks/{chunk-GH7XDCAP.js → chunk-37MCSPTE.js} +1 -1
  14. package/dist-cli/chunks/{chunk-N5GTOZJP.js → chunk-3PEMSUAQ.js} +3 -3
  15. package/dist-cli/chunks/chunk-4TQ5HOK3.js +7 -0
  16. package/dist-cli/chunks/{chunk-5VFQ7HKK.js → chunk-5YZYDEMI.js} +1 -1
  17. package/dist-cli/chunks/{chunk-XL53SSTO.js → chunk-6CV3R3XD.js} +2 -2
  18. package/dist-cli/chunks/{chunk-6PV4QLZ7.js → chunk-7LGK5XU6.js} +2 -2
  19. package/dist-cli/chunks/{chunk-XSXSVO4P.js → chunk-7R2TK2NY.js} +1 -1
  20. package/dist-cli/chunks/{chunk-HCORKEG6.js → chunk-7VZZQQEE.js} +3 -3
  21. package/dist-cli/chunks/{chunk-2QVA4PPE.js → chunk-AFOVILIL.js} +1 -1
  22. package/dist-cli/chunks/{chunk-PZYF2TKR.js → chunk-BEU7CD7E.js} +1 -1
  23. package/dist-cli/chunks/{chunk-ZAUPKGQP.js → chunk-CE4JQJ6Y.js} +2 -2
  24. package/dist-cli/chunks/{chunk-MHVH5IJU.js → chunk-CIE6CZXL.js} +2 -2
  25. package/dist-cli/chunks/{chunk-4S5CIP7Y.js → chunk-CSJ7L7ZL.js} +1 -1
  26. package/dist-cli/chunks/chunk-CWCQP53A.js +27 -0
  27. package/dist-cli/chunks/{chunk-HM5TGIVN.js → chunk-DCS5FK5N.js} +1 -1
  28. package/dist-cli/chunks/{chunk-R7NXLMFI.js → chunk-DEV3E3MV.js} +1 -1
  29. package/dist-cli/chunks/{chunk-PYH2MNFB.js → chunk-DGJMIVZM.js} +2 -2
  30. package/dist-cli/chunks/{chunk-2ZE4WXXF.js → chunk-DGX3MN65.js} +1 -1
  31. package/dist-cli/chunks/{chunk-KOSLTZXQ.js → chunk-DNPQMTW5.js} +2 -2
  32. package/dist-cli/chunks/{chunk-7DLC2M6S.js → chunk-DOVBJBVD.js} +2 -2
  33. package/dist-cli/chunks/{chunk-X2YXPZD4.js → chunk-DPBJ3S3J.js} +1 -1
  34. package/dist-cli/chunks/{chunk-PVGD4KKG.js → chunk-FVZBGPCU.js} +2 -2
  35. package/dist-cli/chunks/{chunk-XSWS6HY6.js → chunk-GDKMOIUT.js} +1 -1
  36. package/dist-cli/chunks/{chunk-SNMLG22Y.js → chunk-GIF2NJCS.js} +2 -2
  37. package/dist-cli/chunks/{chunk-VKOEADVP.js → chunk-GZE57ORL.js} +1 -1
  38. package/dist-cli/chunks/{chunk-KN6LU33B.js → chunk-H3U56DKI.js} +2 -2
  39. package/dist-cli/chunks/{chunk-4FYJOFJZ.js → chunk-HZLOYAPH.js} +2 -2
  40. package/dist-cli/chunks/{chunk-Y3LVGZKE.js → chunk-J2IKAEU2.js} +2 -2
  41. package/dist-cli/chunks/{chunk-6VPR6OTH.js → chunk-JXAXYK7W.js} +2 -2
  42. package/dist-cli/chunks/{chunk-IXYE6F2D.js → chunk-KJE2O2GK.js} +2 -2
  43. package/dist-cli/chunks/{chunk-G2IBWLBT.js → chunk-KMNVDZZI.js} +1 -1
  44. package/dist-cli/chunks/{chunk-7PBNTA3M.js → chunk-LC3QRIRB.js} +2 -2
  45. package/dist-cli/chunks/{chunk-A6JPQM7B.js → chunk-LGFTAQYC.js} +1 -1
  46. package/dist-cli/chunks/{chunk-I2C26UZ3.js → chunk-LQMUA5IY.js} +1 -1
  47. package/dist-cli/chunks/{chunk-IQ5HBVID.js → chunk-MFIQTWC5.js} +2 -2
  48. package/dist-cli/chunks/{chunk-TCB6DSON.js → chunk-MGALNF2F.js} +2 -2
  49. package/dist-cli/chunks/{chunk-DYE6WT2Q.js → chunk-MLBZZHOY.js} +2 -2
  50. package/dist-cli/chunks/{chunk-KVMYAHND.js → chunk-NNRF7GIB.js} +2 -2
  51. package/dist-cli/chunks/{chunk-6JBXWVSP.js → chunk-NORLYTTO.js} +2 -2
  52. package/dist-cli/chunks/{chunk-VSGEEW3N.js → chunk-P6KVGV3H.js} +11 -11
  53. package/dist-cli/chunks/chunk-PAJTUK33.js +4 -0
  54. package/dist-cli/chunks/{chunk-2W6ADNTG.js → chunk-QELIC5XP.js} +1 -1
  55. package/dist-cli/chunks/{chunk-GQVWJWCZ.js → chunk-QRDF33WD.js} +1 -1
  56. package/dist-cli/chunks/{chunk-AEMLIV3G.js → chunk-R76BA7C7.js} +3 -3
  57. package/dist-cli/chunks/{chunk-RXDJ422X.js → chunk-RVEB4CZ2.js} +2 -2
  58. package/dist-cli/chunks/{chunk-CBF7RQ3C.js → chunk-SK4M7NXT.js} +1 -1
  59. package/dist-cli/chunks/{chunk-RAYAIDJI.js → chunk-SKMG5DD7.js} +2 -2
  60. package/dist-cli/chunks/{chunk-VOYUOTN2.js → chunk-TEESPOYR.js} +1 -1
  61. package/dist-cli/chunks/{chunk-UQXSAYWY.js → chunk-TH2UFGVP.js} +1 -1
  62. package/dist-cli/chunks/{chunk-RE2IODEB.js → chunk-TLP3T3VO.js} +1 -1
  63. package/dist-cli/chunks/{chunk-2XDNHF7N.js → chunk-TZUABDIJ.js} +2 -2
  64. package/dist-cli/chunks/{chunk-R3HLZSGB.js → chunk-UB2W6OQM.js} +2 -2
  65. package/dist-cli/chunks/{chunk-UHTIDDI2.js → chunk-UYVXALPB.js} +2 -2
  66. package/dist-cli/chunks/{chunk-2MI2ROT4.js → chunk-VQDYFFIG.js} +2 -2
  67. package/dist-cli/chunks/{chunk-KWUKKULB.js → chunk-VWCNJPCJ.js} +2 -2
  68. package/dist-cli/chunks/{chunk-UAMMP7U7.js → chunk-VZIK4WIS.js} +2 -2
  69. package/dist-cli/chunks/{chunk-VDCYIT2N.js → chunk-W3FNXAQP.js} +1 -1
  70. package/dist-cli/chunks/{chunk-5WXRC4BW.js → chunk-XCDNVNP3.js} +1 -1
  71. package/dist-cli/chunks/{chunk-U52Z6BML.js → chunk-XSVILA4Z.js} +2 -2
  72. package/dist-cli/chunks/{chunk-WR6QFC62.js → chunk-XUTJ7ZWD.js} +2 -2
  73. package/dist-cli/chunks/{chunk-QKYOZQKE.js → chunk-YTXY3MHW.js} +2 -2
  74. package/dist-cli/chunks/{chunk-MU77ZSME.js → chunk-ZF7PVX44.js} +2 -2
  75. package/dist-cli/chunks/{chunk-RU565DEH.js → chunk-ZSSG7OR7.js} +1 -1
  76. package/dist-cli/chunks/{cleanup-4ZAL2PTZ.js → cleanup-MLOK2OZA.js} +2 -2
  77. package/dist-cli/chunks/cli-version-OBNR366V.js +4 -0
  78. package/dist-cli/chunks/{compat-6CEUDCO2.js → compat-SHMFSKU7.js} +2 -2
  79. package/dist-cli/chunks/{config-YHATX3ZX.js → config-TPEAEUJ2.js} +2 -2
  80. package/dist-cli/chunks/{connect-LXWD3ILH.js → connect-3LEXWTE5.js} +2 -2
  81. package/dist-cli/chunks/control-Z3FWA6BO.js +4 -0
  82. package/dist-cli/chunks/daemon-RSVYSC65.js +4 -0
  83. package/dist-cli/chunks/{debug-4RKDQCF4.js → debug-GUVAK2KR.js} +3 -3
  84. package/dist-cli/chunks/{desktop-ISJKVEQA.js → desktop-OOP2PTKP.js} +3 -3
  85. package/dist-cli/chunks/{detox-7P5NDA5M.js → detox-C2ILVBEC.js} +2 -2
  86. package/dist-cli/chunks/{device-JXBP6WUE.js → device-NXIQQJWR.js} +2 -2
  87. package/dist-cli/chunks/{diagnose-7JJWOZ23.js → diagnose-2JBGYE5L.js} +2 -2
  88. package/dist-cli/chunks/{disk-cleanup-MXIQGJWO.js → disk-cleanup-VURWJYQV.js} +2 -2
  89. package/dist-cli/chunks/{do-chain-KTAVIZMC.js → do-chain-DJ4UQC7A.js} +2 -2
  90. package/dist-cli/chunks/drivers-JMA2OIKU.js +4 -0
  91. package/dist-cli/chunks/{env-37X232UA.js → env-KTNPKEZR.js} +2 -2
  92. package/dist-cli/chunks/{film-5F5XDOIR.js → film-DCPS7EID.js} +3 -3
  93. package/dist-cli/chunks/flow-4DZ7B2OA.js +4 -0
  94. package/dist-cli/chunks/help-34CJMQY2.js +4 -0
  95. package/dist-cli/chunks/{hidden-runtime-alias-FAPVCHKI.js → hidden-runtime-alias-HHT2C7WE.js} +2 -2
  96. package/dist-cli/chunks/{home-paths-VW3CI5QK.js → home-paths-KTPGCPMS.js} +2 -2
  97. package/dist-cli/chunks/inspect-JF5WYJRD.js +4 -0
  98. package/dist-cli/chunks/install-desktop-ZIC4CDXI.js +4 -0
  99. package/dist-cli/chunks/{login-LDN6ETBS.js → login-TTJAOI2Q.js} +2 -2
  100. package/dist-cli/chunks/{logout-HOHKC7TH.js → logout-ERAQ6SKW.js} +2 -2
  101. package/dist-cli/chunks/{maestro-PCFZZHCH.js → maestro-W46QCF77.js} +3 -3
  102. package/dist-cli/chunks/{maestro-generate-6MSPC66O.js → maestro-generate-VBLM3MTU.js} +3 -3
  103. package/dist-cli/chunks/{mode-GRYQSTZH.js → mode-ZEDZK7R7.js} +2 -2
  104. package/dist-cli/chunks/{optional-demo-registry-RP2H6SQR.js → optional-demo-registry-ZUTPSVYQ.js} +2 -2
  105. package/dist-cli/chunks/{perf-WPW5FWOL.js → perf-YVT2WXT4.js} +2 -2
  106. package/dist-cli/chunks/{permissions-OXAWZHB2.js → permissions-L7VVDHFP.js} +2 -2
  107. package/dist-cli/chunks/{platform-SKTAMMLT.js → platform-7TJOU2FB.js} +3 -3
  108. package/dist-cli/chunks/privacy-57UOTB5J.js +4 -0
  109. package/dist-cli/chunks/{record-WFA3GUIX.js → record-VXG37P7U.js} +3 -3
  110. package/dist-cli/chunks/{report-issue-LB7QRUIO.js → report-issue-WNNOBZHC.js} +2 -2
  111. package/dist-cli/chunks/reset-H5NBFE5U.js +4 -0
  112. package/dist-cli/chunks/resolve-target-57TK5WLE.js +4 -0
  113. package/dist-cli/chunks/runtime-QU2NIF2K.js +4 -0
  114. package/dist-cli/chunks/{screenshot-command-OX4B5ZPE.js → screenshot-command-AN56TTG7.js} +3 -3
  115. package/dist-cli/chunks/{screenshot-layers-QOSO5ZRE.js → screenshot-layers-3W5R7DB2.js} +2 -2
  116. package/dist-cli/chunks/{screenshots-capture-XSRQO5SQ.js → screenshots-capture-6AWJY7XZ.js} +2 -2
  117. package/dist-cli/chunks/{serve-LNYA35IZ.js → serve-GLYO5Q7J.js} +2 -2
  118. package/dist-cli/chunks/setup-UA2HLD7S.js +4 -0
  119. package/dist-cli/chunks/{sim-client-MBY5YFOJ.js → sim-client-5C2RDQQO.js} +2 -2
  120. package/dist-cli/chunks/{skills-DVTU7NKR.js → skills-EYXWBRNQ.js} +2 -2
  121. package/dist-cli/chunks/{state-4AIXTMAN.js → state-REJ7W6K3.js} +2 -2
  122. package/dist-cli/chunks/{storage-OXHTXIRW.js → storage-CFMDHI3V.js} +2 -2
  123. package/dist-cli/chunks/store-XMCUA45G.js +4 -0
  124. package/dist-cli/chunks/telemetry-FBL3NAKB.js +4 -0
  125. package/dist-cli/chunks/{timeline-HY7NURFG.js → timeline-HMCHN5FO.js} +2 -2
  126. package/dist-cli/chunks/{upgrade-V6222XJR.js → upgrade-2QSPAA3P.js} +2 -2
  127. package/dist-cli/chunks/upload-DUQBKZYV.js +4 -0
  128. package/dist-cli/chunks/{version-32O3RRDO.js → version-IOA6QFGB.js} +2 -2
  129. package/dist-cli/chunks/{web-DA6HESOZ.js → web-NCGUYVCJ.js} +2 -2
  130. package/dist-cli/chunks/welcome-QYGSQCWQ.js +5 -0
  131. package/dist-cli/chunks/{what-happened-UEY6YRTH.js → what-happened-YTOUK4LO.js} +2 -2
  132. package/dist-cli/chunks/{ws-bridge-4WWOVU5V.js → ws-bridge-OF4OZARG.js} +2 -2
  133. package/dist-lib/agent-daemon-client.cjs +1 -1
  134. package/dist-lib/agent-events.cjs +1 -1
  135. package/dist-lib/agent-identity.cjs +1 -1
  136. package/dist-lib/agent-sessions.cjs +1 -1
  137. package/dist-lib/attached-projects.cjs +1 -1
  138. package/dist-lib/auth/shared-session.cjs +1 -1
  139. package/dist-lib/backend-origin.cjs +1 -1
  140. package/dist-lib/beta.cjs +1 -1
  141. package/dist-lib/beta.mjs +1 -1
  142. package/dist-lib/bridge-constants.cjs +1 -1
  143. package/dist-lib/bridge-contract-input.cjs +1 -1
  144. package/dist-lib/bridge-contract-input.mjs +1 -1
  145. package/dist-lib/bridge-contract.cjs +1 -1
  146. package/dist-lib/bridge-contract.mjs +1 -1
  147. package/dist-lib/cli-constants.cjs +1 -1
  148. package/dist-lib/config.cjs +1 -1
  149. package/dist-lib/detox/index.cjs +1 -1
  150. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  151. package/dist-lib/home-paths.cjs +1 -1
  152. package/dist-lib/host/bridge-host.cjs +148 -134
  153. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  154. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  155. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  156. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  157. package/dist-lib/host/websocket-proxy.cjs +1 -1
  158. package/dist-lib/index.cjs +3 -3
  159. package/dist-lib/jump-to-source-babel.cjs +1 -1
  160. package/dist-lib/menu.cjs +1 -1
  161. package/dist-lib/menu.mjs +1 -1
  162. package/dist-lib/metro-production-bundle.cjs +1 -1
  163. package/dist-lib/metro-production-bundle.mjs +1 -1
  164. package/dist-lib/metro.cjs +1 -1
  165. package/dist-lib/profiles.cjs +1 -1
  166. package/dist-lib/public-brand.cjs +1 -1
  167. package/dist-lib/react-native-host-modules.cjs +1 -1
  168. package/dist-lib/react-native-host-modules.mjs +1 -1
  169. package/dist-lib/render-mode.cjs +1 -1
  170. package/dist-lib/scripts/dev-server-scanner.cjs +18 -4
  171. package/dist-lib/sdk.cjs +1 -1
  172. package/dist-lib/sdk.mjs +1 -1
  173. package/dist-lib/skills.cjs +219 -198
  174. package/dist-lib/vite.cjs +1 -1
  175. package/package.json +1 -1
  176. package/scripts/dev-server-scanner.ts +23 -5
  177. package/dist-cli/chunks/chunk-DB2JB52S.js +0 -4
  178. package/dist-cli/chunks/chunk-L6VQSQ5O.js +0 -7
  179. package/dist-cli/chunks/chunk-OO7E4JTZ.js +0 -27
  180. package/dist-cli/chunks/cli-version-OZYTASIM.js +0 -4
  181. package/dist-cli/chunks/control-LBL5A6WE.js +0 -4
  182. package/dist-cli/chunks/daemon-JCFSBU66.js +0 -4
  183. package/dist-cli/chunks/drivers-IQ5GCHPH.js +0 -4
  184. package/dist-cli/chunks/flow-74OQVMSN.js +0 -4
  185. package/dist-cli/chunks/help-OCNTRGIJ.js +0 -4
  186. package/dist-cli/chunks/inspect-Z2NKYQEG.js +0 -4
  187. package/dist-cli/chunks/install-desktop-47P2MA4T.js +0 -4
  188. package/dist-cli/chunks/privacy-XEXZ6AIX.js +0 -4
  189. package/dist-cli/chunks/reset-CYS4XX4I.js +0 -4
  190. package/dist-cli/chunks/resolve-target-YYCTSFNM.js +0 -4
  191. package/dist-cli/chunks/runtime-JFQ6JIA6.js +0 -4
  192. package/dist-cli/chunks/setup-3W2UEM2H.js +0 -4
  193. package/dist-cli/chunks/store-43NVGPZX.js +0 -4
  194. package/dist-cli/chunks/telemetry-ZQRYJXGE.js +0 -4
  195. package/dist-cli/chunks/upload-DUKPPETT.js +0 -4
  196. package/dist-cli/chunks/welcome-X7PCNKS6.js +0 -5
@@ -363,11 +363,11 @@ async function runLocalBox(opts: BoxCommandOptions): Promise<number> {
363
363
  }
364
364
 
365
365
  try {
366
- // the checkout is shared with editors, agents, and the user's own terminal,
367
- // so re-read the file set before every command rather than trusting a
368
- // snapshot taken when the box started. a cloud box has no equivalent: its
369
- // store is the box, and the box refreshes on its own side.
370
- return await repl(shell, relative, () => plane.refresh())
366
+ // the checkout is shared with editors, agents, and the user's own terminal.
367
+ // HarnessProjectFs arms a stale bit on each shell turn and refreshes the
368
+ // plane synchronously on the first actual file access, so commands that
369
+ // never touch project files pay nothing, while reads always see fresh disk state.
370
+ return await repl(shell, relative)
371
371
  } finally {
372
372
  shared?.close()
373
373
  }
@@ -15,6 +15,7 @@ import { resolveSootsimShellBaseUrlForBridgePort } from '../../src/bridge-consta
15
15
  import {
16
16
  applySootSimConfigToUrl,
17
17
  mergeSootSimConfig,
18
+ SOOTSIM_CONFIG_QUERY_PARAM,
18
19
  type SootSimConfig,
19
20
  } from '../../src/config'
20
21
  import {
@@ -1194,7 +1195,7 @@ function resolveTargetSim(sims: BridgeSimInfo[], requestedId?: string): BridgeSi
1194
1195
  throw new Error('no sim connected')
1195
1196
  }
1196
1197
 
1197
- function printOpenedSim(
1198
+ export function printOpenedSim(
1198
1199
  openUrl: string,
1199
1200
  sim: BridgeSimInfo,
1200
1201
  mode:
@@ -1209,10 +1210,23 @@ function printOpenedSim(
1209
1210
  if (!value) return value
1210
1211
  try {
1211
1212
  const parsed = new URL(value)
1212
- if (parsed.searchParams.has('sootsimConfig')) {
1213
- parsed.searchParams.set('sootsimConfig', '[redacted]')
1214
- return parsed.toString()
1213
+ let changed = false
1214
+ if (parsed.searchParams.has(SOOTSIM_CONFIG_QUERY_PARAM)) {
1215
+ parsed.searchParams.set(SOOTSIM_CONFIG_QUERY_PARAM, '[redacted]')
1216
+ changed = true
1215
1217
  }
1218
+ const bundle = parsed.searchParams.get('bundle')
1219
+ if (bundle) {
1220
+ try {
1221
+ const parsedBundle = new URL(bundle)
1222
+ if (parsedBundle.searchParams.has(SOOTSIM_CONFIG_QUERY_PARAM)) {
1223
+ parsedBundle.searchParams.set(SOOTSIM_CONFIG_QUERY_PARAM, '[redacted]')
1224
+ parsed.searchParams.set('bundle', parsedBundle.toString())
1225
+ changed = true
1226
+ }
1227
+ } catch {}
1228
+ }
1229
+ if (changed) return parsed.toString()
1216
1230
  } catch {}
1217
1231
  return value
1218
1232
  })
package/cli/ws-bridge.ts CHANGED
@@ -698,11 +698,14 @@ export function createBridge(wsPort: number, opts: WsBridgeOptions = {}): WsBrid
698
698
  }
699
699
  } catch {}
700
700
  ws.close()
701
- const terminateTimer: ReturnType<typeof setTimeout> = setTimeout(() => {
701
+ // unref, or a one-shot `rnx` command is held on the event loop for the
702
+ // full 250ms after its work is done. that delay lands directly in in-box
703
+ // prompt latency, since the shell spawns rnx and waits on child close.
704
+ setTimeout(() => {
702
705
  if (ws.readyState !== WebSocket.CLOSED) {
703
706
  ws.terminate()
704
707
  }
705
- }, 250)
708
+ }, 250).unref()
706
709
  },
707
710
  }
708
711
  }
package/dist-cli/bin.js CHANGED
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
+ /*! rnx v0.1.376 | (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-I2C26UZ3.js";import{a as h}from"./chunks/chunk-UQXSAYWY.js";import{a as m}from"./chunks/chunk-5VFQ7HKK.js";import"./chunks/chunk-RU565DEH.js";function k(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-LQMUA5IY.js";import{a as h}from"./chunks/chunk-TH2UFGVP.js";import{a as m}from"./chunks/chunk-5YZYDEMI.js";import"./chunks/chunk-ZSSG7OR7.js";function k(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",k);process.on("uncaughtException",k);var v=typeof __SOOTSIM_STANDALONE__<"u"&&__SOOTSIM_STANDALONE__,C=new Set(["desktop"]);function $(a){!v||!C.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-FAPVCHKI.js");e=a(e)}var _=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker",x=!e.command&&e.commandArgs.length===0;if(!_&&!x&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="setup"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-XEXZ6AIX.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-VW3CI5QK.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 b=!1;async function S(){if(!b&&(b=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{shouldSkipAutomaticSootsimCleanup:a}=await import("./chunks/disk-cleanup-MXIQGJWO.js");if(a())return;let{spawn:t}=await import("node:child_process"),r=["cleanup","--automatic-worker"],d=process.argv[1],p=v?t(process.execPath,r,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...r],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,r,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",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-HHT2C7WE.js");e=a(e)}var _=e.command==="cleanup"&&e.commandArgs.length===1&&e.commandArgs[0]==="--automatic-worker",x=!e.command&&e.commandArgs.length===0;if(!_&&!x&&!e.help&&!e.version&&e.command!=="config"&&e.command!=="setup"&&e.command!=="telemetry"){let{ensurePrivacyChoice:a}=await import("./chunks/privacy-57UOTB5J.js");await a({prompt:!0})}if(e.command!=="serve"&&e.command!=="daemon"){let{consumeRuntimeUpgradeNotice:a}=await import("./chunks/home-paths-KTPGCPMS.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 b=!1;async function S(){if(!b&&(b=!0,!(e.command==="cleanup"||e.command==="serve"||e.command==="agent-wrapper"||e.command==="daemon"&&e.commandArgs[0]==="uninstall")))try{let{shouldSkipAutomaticSootsimCleanup:a}=await import("./chunks/disk-cleanup-VURWJYQV.js");if(a())return;let{spawn:t}=await import("node:child_process"),r=["cleanup","--automatic-worker"],d=process.argv[1],p=v?t(process.execPath,r,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):d?t(process.execPath,[d,...r],{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env}):t(m.commandName,r,{detached:!0,stdio:["ignore","ignore","inherit"],env:process.env});p.once("error",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 n(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-ZQRYJXGE.js");await t(),await S(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-OZYTASIM.js"),{IS_BETA:t,BETA_LABEL:r}=await import("./chunks/beta-Q2VQZCLD.js"),d=t?` \xB7 ${r}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-VW3CI5QK.js"),w=p();console.log(w?`runtime v${w}`:"runtime not installed"),await n(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-OCNTRGIJ.js");a(),await n(0)}var o=e.globalFlags.port,c=e.verbose,u=e.globalFlags.device,l=e.globalFlags.theme,E=e.globalFlags.driver,O=e.globalFlags.headless===!0,A=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,i=A?["--sim",A,...e.commandArgs]:e.commandArgs;if(u||l){let{settingsStore:a}=await import("./chunks/store-43NVGPZX.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-X7PCNKS6.js");await n(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 n(1)}let{printHelp:a}=await import("./chunks/help-OCNTRGIJ.js");a(),await n(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:r}=await import("./chunks/skills-DVTU7NKR.js");await r(e.commandArgs),await n(0)}if(s==="state"){let{runState:r}=await import("./chunks/state-4AIXTMAN.js");await n(await r(i,{port:o}))}if(s==="reset"){let{runReset:r}=await import("./chunks/reset-CYS4XX4I.js");await n(await r(i,{port:o}))}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-OCNTRGIJ.js");r(s)&&await n(0)}else{let{printCommandHelp:r}=await import("./chunks/help-OCNTRGIJ.js");r(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await n(0)}}$(s);try{if(g.has(s)){if(s==="do"){let{hasDoChain:t,runDoChain:r}=await import("./chunks/do-chain-KTAVIZMC.js");t(i)&&await n(await r(i,{port:o}))}let{runInspect:a}=await import("./chunks/inspect-Z2NKYQEG.js");await a([s,...i],{port:o,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-ORX5Q6AH.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-7P5NDA5M.js");await a(e.commandArgs,{port:o,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-PCFZZHCH.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-WFA3GUIX.js");await a(i,{port:o,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-5F5XDOIR.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-OXHTXIRW.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-4AIXTMAN.js"),t=await a(i,{port:o});await n(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-CYS4XX4I.js"),t=await a(i,{port:o});await n(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-WPW5FWOL.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-OX4B5ZPE.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-5HA2IJDC.js"),t=await a(i,{port:o});await n(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-GRYQSTZH.js");await a(i,{port:o,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-OXAWZHB2.js"),t=await a(i,{port:o,verbose:c});await n(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-4RKDQCF4.js");await a(i,{port:o,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-HY7NURFG.js");await a(i,{port:o,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-UEY6YRTH.js");await a(i,{port:o,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-LBL5A6WE.js");await a(i,{port:o});break}case"ios":case"android":{let{runPlatformCommand:a}=await import("./chunks/platform-SKTAMMLT.js"),t=await a(s,i,{port:o});await n(typeof t=="number"?t:0)}case"box":{let{runBox:a}=await import("./chunks/box-I5QZZJBJ.js");await n(await a(i,{port:o,verbose:c}))}case"use":{let{runUseCommand:a}=await import("./chunks/control-LBL5A6WE.js");await a(i,{port:o});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-LBL5A6WE.js");await a(i,{port:o});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-LBL5A6WE.js");await a(i,{port:o});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-JXBP6WUE.js");await a(i,{port:o});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-6CEUDCO2.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-LB7QRUIO.js"),t=await a(e.commandArgs);await n(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-ISJKVEQA.js");await a(e.commandArgs,{port:o,device:u});break}case"login":{let{runLogin:a}=await import("./chunks/login-LDN6ETBS.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-HOHKC7TH.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-REWJRBFP.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-3W2UEM2H.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-LNYA35IZ.js");await a(e.commandArgs,{port:o});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-JCFSBU66.js");await a(e.commandArgs,{port:o});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-JFQ6JIA6.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-V6222XJR.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-32O3RRDO.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-BKCNNEQV.js"),t=await a(e.commandArgs);await n(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-B3AS3ENV.js"),t=await a(e.commandArgs);await n(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-DVTU7NKR.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-GWE22XIG.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-YHATX3ZX.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-4ZAL2PTZ.js"),t=await a(e.commandArgs);await n(t)}default:console.error(` unknown command: ${s}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await n(1)}}catch(a){throw a instanceof h&&await n(a.code),a}await S();
15
+ `)}}async function n(a){let{flushCliTelemetry:t}=await import("./chunks/telemetry-FBL3NAKB.js");await t(),await S(),process.exit(a)}if(e.version){let{getCliVersion:a}=await import("./chunks/cli-version-OBNR366V.js"),{IS_BETA:t,BETA_LABEL:r}=await import("./chunks/beta-5AO3SJB7.js"),d=t?` \xB7 ${r}`:"";console.log(`${m.commandName} v${a()}${d}`);let{readActiveRuntime:p}=await import("./chunks/home-paths-KTPGCPMS.js"),w=p();console.log(w?`runtime v${w}`:"runtime not installed"),await n(0)}if(e.help&&!e.command){let{printHelp:a}=await import("./chunks/help-34CJMQY2.js");a(),await n(0)}var o=e.globalFlags.port,c=e.verbose,u=e.globalFlags.device,l=e.globalFlags.theme,E=e.globalFlags.driver,O=e.globalFlags.headless===!0,A=e.globalFlags.sim??e.globalFlags.session??e.globalFlags.tab,i=A?["--sim",A,...e.commandArgs]:e.commandArgs;if(u||l){let{settingsStore:a}=await import("./chunks/store-XMCUA45G.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-QYGSQCWQ.js");await n(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 n(1)}let{printHelp:a}=await import("./chunks/help-34CJMQY2.js");a(),await n(0)}if(e.help||e.commandArgs.includes("--help")||e.commandArgs.includes("-h")){if(s==="skill"){let{runSkill:r}=await import("./chunks/skills-EYXWBRNQ.js");await r(e.commandArgs),await n(0)}if(s==="state"){let{runState:r}=await import("./chunks/state-REJ7W6K3.js");await n(await r(i,{port:o}))}if(s==="reset"){let{runReset:r}=await import("./chunks/reset-H5NBFE5U.js");await n(await r(i,{port:o}))}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-34CJMQY2.js");r(s)&&await n(0)}else{let{printCommandHelp:r}=await import("./chunks/help-34CJMQY2.js");r(a&&t?t:s,{prefer:a&&t?"verb":"command",group:a&&t?s:void 0}),await n(0)}}$(s);try{if(g.has(s)){if(s==="do"){let{hasDoChain:t,runDoChain:r}=await import("./chunks/do-chain-DJ4UQC7A.js");t(i)&&await n(await r(i,{port:o}))}let{runInspect:a}=await import("./chunks/inspect-JF5WYJRD.js");await a([s,...i],{port:o,verbose:c})}else switch(s){case"assert":{let{runAssert:a}=await import("./chunks/assert-IXOLVO5Z.js");await a(e.commandArgs);break}case"detox":{let{runDetox:a}=await import("./chunks/detox-C2ILVBEC.js");await a(e.commandArgs,{port:o,verbose:c});break}case"maestro":{let{runMaestro:a}=await import("./chunks/maestro-W46QCF77.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"record":{let{runRecord:a}=await import("./chunks/record-VXG37P7U.js");await a(i,{port:o,verbose:c});break}case"film":{let{runFilm:a}=await import("./chunks/film-DCPS7EID.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"storage":{let{runStorage:a}=await import("./chunks/storage-CFMDHI3V.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"state":{let{runState:a}=await import("./chunks/state-REJ7W6K3.js"),t=await a(i,{port:o});await n(t)}case"reset":{let{runReset:a}=await import("./chunks/reset-H5NBFE5U.js"),t=await a(i,{port:o});await n(t)}case"perf":{let{runPerf:a}=await import("./chunks/perf-YVT2WXT4.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"screenshot":{let{runScreenshotCommand:a}=await import("./chunks/screenshot-command-AN56TTG7.js"),t=await a(i,{port:o,verbose:c});await n(typeof t=="number"?t:0)}case"camera":{let{runCamera:a}=await import("./chunks/camera-FNJVFCDQ.js"),t=await a(i,{port:o});await n(typeof t=="number"?t:0)}case"mode":{let{runMode:a}=await import("./chunks/mode-ZEDZK7R7.js");await a(i,{port:o,verbose:c});break}case"permissions":{let{runPermissions:a}=await import("./chunks/permissions-L7VVDHFP.js"),t=await a(i,{port:o,verbose:c});await n(t)}case"debug":{let{runDebug:a}=await import("./chunks/debug-GUVAK2KR.js");await a(i,{port:o,verbose:c});break}case"timeline":{let{runTimeline:a}=await import("./chunks/timeline-HMCHN5FO.js");await a(i,{port:o,verbose:c});break}case"what-happened":{let{runWhatHappened:a}=await import("./chunks/what-happened-YTOUK4LO.js");await a(i,{port:o,verbose:c});break}case"open":{let{runOpenCommand:a}=await import("./chunks/control-Z3FWA6BO.js");await a(i,{port:o});break}case"ios":case"android":{let{runPlatformCommand:a}=await import("./chunks/platform-7TJOU2FB.js"),t=await a(s,i,{port:o});await n(typeof t=="number"?t:0)}case"box":{let{runBox:a}=await import("./chunks/box-ZHM66L6K.js");await n(await a(i,{port:o,verbose:c}))}case"use":{let{runUseCommand:a}=await import("./chunks/control-Z3FWA6BO.js");await a(i,{port:o});break}case"claim":{let{runClaimCommand:a}=await import("./chunks/control-Z3FWA6BO.js");await a(i,{port:o});break}case"close":{let{runCloseCommand:a}=await import("./chunks/control-Z3FWA6BO.js");await a(i,{port:o});break}case"device":{let{runDeviceCommand:a}=await import("./chunks/device-NXIQQJWR.js");await a(i,{port:o});break}case"compat":{let{runCompat:a}=await import("./chunks/compat-SHMFSKU7.js");await a(e.commandArgs);break}case"report-issue":{let{runReportIssue:a}=await import("./chunks/report-issue-WNNOBZHC.js"),t=await a(e.commandArgs);await n(t)}case"desktop":{let{runDesktop:a}=await import("./chunks/desktop-OOP2PTKP.js");await a(e.commandArgs,{port:o,device:u});break}case"login":{let{runLogin:a}=await import("./chunks/login-TTJAOI2Q.js");await a(e.commandArgs);break}case"logout":{let{runLogout:a}=await import("./chunks/logout-ERAQ6SKW.js");await a();break}case"auth":{let{runAuth:a}=await import("./chunks/auth-KFMFB6FU.js");await a(e.commandArgs);break}case"setup":{let{runSetup:a}=await import("./chunks/setup-UA2HLD7S.js");await a(e.commandArgs);break}case"serve":{let{runServe:a}=await import("./chunks/serve-GLYO5Q7J.js");await a(e.commandArgs,{port:o});break}case"daemon":{let{runDaemon:a}=await import("./chunks/daemon-RSVYSC65.js");await a(e.commandArgs,{port:o});break}case"runtime":{let{runRuntime:a}=await import("./chunks/runtime-QU2NIF2K.js");await a(e.commandArgs);break}case"upgrade":{let{runUpgrade:a}=await import("./chunks/upgrade-2QSPAA3P.js");await a(e.commandArgs);break}case"version":{let{runVersion:a}=await import("./chunks/version-IOA6QFGB.js");await a(e.commandArgs);break}case"agent":{let{runAgentCommand:a}=await import("./chunks/agent-H42FCKFF.js"),t=await a(e.commandArgs);await n(t)}case"agent-wrapper":{let{runAgentWrapper:a}=await import("./chunks/agent-wrapper-BBZKTZS6.js"),t=await a(e.commandArgs);await n(t)}case"skill":{let{runSkill:a}=await import("./chunks/skills-EYXWBRNQ.js");await a(e.commandArgs);break}case"app-fonts":{let{runAppFonts:a}=await import("./chunks/app-fonts-43VXIKF4.js");await a(e.commandArgs);break}case"config":{let{runConfig:a}=await import("./chunks/config-TPEAEUJ2.js");await a(e.commandArgs);break}case"cleanup":{let{runCleanup:a}=await import("./chunks/cleanup-MLOK2OZA.js"),t=await a(e.commandArgs);await n(t)}default:console.error(` unknown command: ${s}`),console.error(` run \`${m.commandName} --help\` to see the full surface.`),await n(1)}}catch(a){throw a instanceof h&&await n(a.code),a}await S();
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-6JBXWVSP.js";import"./chunk-5WXRC4BW.js";import{c as $}from"./chunk-7PBNTA3M.js";import"./chunk-DYE6WT2Q.js";import"./chunk-2MI2ROT4.js";import"./chunk-VOYUOTN2.js";import"./chunk-7DLC2M6S.js";import"./chunk-PYH2MNFB.js";import"./chunk-OO7E4JTZ.js";import"./chunk-2ZE4WXXF.js";import"./chunk-2QVA4PPE.js";import{j as y}from"./chunk-GQVWJWCZ.js";import"./chunk-U52Z6BML.js";import"./chunk-5VFQ7HKK.js";import"./chunk-RU565DEH.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-NORLYTTO.js";import"./chunk-XCDNVNP3.js";import{c as $}from"./chunk-LC3QRIRB.js";import"./chunk-MLBZZHOY.js";import"./chunk-VQDYFFIG.js";import"./chunk-TEESPOYR.js";import"./chunk-DOVBJBVD.js";import"./chunk-DGJMIVZM.js";import"./chunk-CWCQP53A.js";import"./chunk-DGX3MN65.js";import"./chunk-AFOVILIL.js";import{j as y}from"./chunk-QRDF33WD.js";import"./chunk-XSVILA4Z.js";import"./chunk-5YZYDEMI.js";import"./chunk-ZSSG7OR7.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.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-5WXRC4BW.js";import"./chunk-RU565DEH.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-XCDNVNP3.js";import"./chunk-ZSSG7OR7.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.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 as g}from"./chunk-VSGEEW3N.js";import"./chunk-RE2IODEB.js";import"./chunk-VKOEADVP.js";import{c as f}from"./chunk-UQXSAYWY.js";import"./chunk-RU565DEH.js";import{existsSync as d,mkdirSync as y,readFileSync as m,writeFileSync as u}from"node:fs";import{join as w}from"node:path";import{gzipSync as x}from"node:zlib";function l(t,e){let r=t.indexOf(`--${e}`);if(r!==-1&&r+1<t.length)return t[r+1];let s=t.find(i=>i.startsWith(`--${e}=`));return s?s.slice(e.length+3):void 0}async function S(t){let e=l(t,"wire")||"",r=l(t,"out-dir"),s=l(t,"manifest");if((!r||!s)&&(console.error(" usage: rnx app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),f(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}y(r,{recursive:!0});let i=await g(e,{onStaged:({url:n,byteLength:o})=>console.log(` staged app font: ${n} (${(o/1024).toFixed(1)} KiB)`),onError:(n,o)=>console.error(` warning: failed to fetch app font ${n}: ${o instanceof Error?o.message:o}`)}),a=[];for(let n of i){let o=x(n.bytes);u(w(r,n.urlhash),o),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:o.length,rawBytes:n.bytes.byteLength})}let c=[];if(d(s))try{let n=JSON.parse(m(s,"utf8"));Array.isArray(n)&&(c=n)}catch{}let h=new Set(c.map(n=>n.urlhash)),p=[...c,...a.filter(n=>!h.has(n.urlhash))];u(s,JSON.stringify(p)),console.log(`staged ${a.length} app font(s); manifest now has ${p.length} file(s)`)}async function B(t){let e=t[0];if(e==="stage"){await S(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),f(1)}export{B as runAppFonts};
4
+ import{q as g}from"./chunk-P6KVGV3H.js";import"./chunk-TLP3T3VO.js";import"./chunk-GZE57ORL.js";import{c as f}from"./chunk-TH2UFGVP.js";import"./chunk-ZSSG7OR7.js";import{existsSync as d,mkdirSync as y,readFileSync as m,writeFileSync as u}from"node:fs";import{join as w}from"node:path";import{gzipSync as x}from"node:zlib";function l(t,e){let r=t.indexOf(`--${e}`);if(r!==-1&&r+1<t.length)return t[r+1];let s=t.find(i=>i.startsWith(`--${e}=`));return s?s.slice(e.length+3):void 0}async function S(t){let e=l(t,"wire")||"",r=l(t,"out-dir"),s=l(t,"manifest");if((!r||!s)&&(console.error(" usage: rnx app-fonts stage --wire <wire> --out-dir <dir> --manifest <path>"),f(1)),!e.trim()){console.log("no app fonts declared \u2014 nothing to stage");return}y(r,{recursive:!0});let i=await g(e,{onStaged:({url:n,byteLength:o})=>console.log(` staged app font: ${n} (${(o/1024).toFixed(1)} KiB)`),onError:(n,o)=>console.error(` warning: failed to fetch app font ${n}: ${o instanceof Error?o.message:o}`)}),a=[];for(let n of i){let o=x(n.bytes);u(w(r,n.urlhash),o),a.push({url:n.url,urlhash:n.urlhash,contentType:n.contentType,encoding:"gzip",sizeBytes:o.length,rawBytes:n.bytes.byteLength})}let c=[];if(d(s))try{let n=JSON.parse(m(s,"utf8"));Array.isArray(n)&&(c=n)}catch{}let h=new Set(c.map(n=>n.urlhash)),p=[...c,...a.filter(n=>!h.has(n.urlhash))];u(s,JSON.stringify(p)),console.log(`staged ${a.length} app font(s); manifest now has ${p.length} file(s)`)}async function B(t){let e=t[0];if(e==="stage"){await S(t.slice(1));return}console.error(` unknown app-fonts subcommand: ${e??"(none)"}`),console.error(" available: stage"),f(1)}export{B as runAppFonts};
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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{c}from"./chunk-UQXSAYWY.js";import"./chunk-RU565DEH.js";import{spawn as S}from"child_process";var k=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),q=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),P=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),j=new Set(["--path-equals"]);function N(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 l=Number(s[o+1]);if(!Number.isFinite(l)||l<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=l,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(q.has(a)){u.push({kind:a,args:[]});continue}if(P.has(a)){let l=s[o+1];if(l==null)return{error:`${a} requires a value`};u.push({kind:a,args:[l]}),o++;continue}if(j.has(a)){let l=s[o+1],p=s[o+2];if(l==null||p==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[l,p]}),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 R(s){return s[0]==="get"||s[0]==="debug"?k.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:k.has(s[0])?s[0]:null}async function A(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=S(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{c}from"./chunk-TH2UFGVP.js";import"./chunk-ZSSG7OR7.js";import{spawn as S}from"child_process";var k=new Set(["describe","find","list","network","logs","count","tree","url","a11y","node","layout","keyboard","errors","warnings","requests","animations","animation","state","sample-color"]),q=new Set(["--exists","--empty","--negate","--quiet","--allow-timeout","!"]),P=new Set(["--count","--count-at-least","--count-at-most","--contains","--not-contains","--matches","--not-matches","--equals","--jq","--has-path","--within"]),j=new Set(["--path-equals"]);function N(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 l=Number(s[o+1]);if(!Number.isFinite(l)||l<0)return{error:`--within requires a non-negative number, got: ${s[o+1]}`};n=l,o++;continue}if(a==="--negate"||a==="!"){e=!0;continue}if(a==="--quiet"){t=!0;continue}if(a==="--allow-timeout"){i=!0;continue}if(q.has(a)){u.push({kind:a,args:[]});continue}if(P.has(a)){let l=s[o+1];if(l==null)return{error:`${a} requires a value`};u.push({kind:a,args:[l]}),o++;continue}if(j.has(a)){let l=s[o+1],p=s[o+2];if(l==null||p==null)return{error:`${a} requires <path> <value>`};u.push({kind:a,args:[l,p]}),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 R(s){return s[0]==="get"||s[0]==="debug"?k.has(s[1])?s[1]:null:s[0]==="do"||s[0]==="wait"?null:k.has(s[0])?s[0]:null}async function A(s){let u=[process.argv[1],...s,"--json"];return new Promise(n=>{let e=S(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 v(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 g(s){return Array.isArray(s)?s.length:s&&typeof s=="object"?Object.keys(s).length:null}async function O(s,r){let{kind:u,args:n}=s;switch(u){case"--exists":return r==null?{ok:!1,reason:"payload is null"}:g(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=g(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=g(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=g(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=g(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=v(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=v(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 E(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 E(s,r){return new Promise((u,n)=>{let e=S("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 L(s){(s[0]==="--help"||s[0]==="-h"||s.length===0)&&(J(),c(s.length===0?2:0));let r=N(s);"error"in r&&(process.stderr.write(` assert: ${r.error}
6
6
  `),c(2));let{verbArgs:u,predicates:n,withinMs:e,negate:t,quiet:i,allowTimeout:o}=r;R(u)||(process.stderr.write(` assert: unknown or non-read verb: ${u.join(" ")}
7
7
  supported: ${Array.from(k).sort().join(", ")}
@@ -1,7 +1,7 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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 i}from"./chunk-6VPR6OTH.js";import{d as t}from"./chunk-RAYAIDJI.js";import{c as r}from"./chunk-UQXSAYWY.js";import"./chunk-GQVWJWCZ.js";import"./chunk-RU565DEH.js";function s(){console.log(`
4
+ import{a as i}from"./chunk-JXAXYK7W.js";import{d as t}from"./chunk-SKMG5DD7.js";import{c as r}from"./chunk-TH2UFGVP.js";import"./chunk-QRDF33WD.js";import"./chunk-ZSSG7OR7.js";function s(){console.log(`
5
5
  rnx auth \u2014 inspect CLI auth
6
6
 
7
7
  usage:
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.374 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.376 | (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-VOYUOTN2.js";import"./chunk-RU565DEH.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-TEESPOYR.js";import"./chunk-ZSSG7OR7.js";export{d as BETA_ASK_HEADLINE,b as BETA_LABEL,c as BETA_TAGLINE,a as IS_BETA};