rovecode 0.3.3 → 0.4.0-beta.3

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 (495) hide show
  1. package/CHANGELOG.md +527 -0
  2. package/README.md +46 -48
  3. package/bin/rovecode.js +24 -0
  4. package/dist/cli/app-j6gn14w3.js +2 -0
  5. package/dist/cli/ask-user-cwstt8fz.js +2 -0
  6. package/dist/cli/auth-login-9bbp9915.js +2 -0
  7. package/dist/cli/auth-m8p9grty.js +2 -0
  8. package/dist/cli/bench-16zqdms5.js +9 -0
  9. package/dist/cli/catalog-1xchffa4.js +2 -0
  10. package/dist/cli/cli-1n1zb64f.js +2 -0
  11. package/dist/cli/client-2t9gjkck.js +2 -0
  12. package/dist/cli/commands-exafvm2b.js +2 -0
  13. package/dist/cli/connect-6zde0kn3.js +2 -0
  14. package/dist/cli/context-cmd-5t43wgqt.js +2 -0
  15. package/dist/cli/context-report-kt01pw8y.js +2 -0
  16. package/dist/cli/count-remote-ap7x3vh6.js +2 -0
  17. package/dist/cli/design-ne5zszyh.js +2 -0
  18. package/dist/cli/dispatch-2r5myxye.js +2 -0
  19. package/dist/cli/doctor-ws4fh4tn.js +3 -0
  20. package/dist/cli/executor-bdrjn634.js +2 -0
  21. package/dist/cli/export-1mxb9g5p.js +2 -0
  22. package/dist/cli/files-g104xghh.js +2 -0
  23. package/dist/cli/gauntlet-07xrjpj7.js +2 -0
  24. package/dist/cli/gauntlet-runner-xvy64436.js +10 -0
  25. package/dist/cli/gauntlet-wave3-jm91yt5w.js +5 -0
  26. package/dist/cli/gauntlet-wave4-r13py7p1.js +14 -0
  27. package/dist/cli/hashline-znvrat11.js +2 -0
  28. package/dist/cli/http-xafw6fsh.js +143 -0
  29. package/dist/cli/index-1sgjm25y.js +2 -0
  30. package/dist/cli/init-g2m0tn4m.js +51 -0
  31. package/dist/cli/install-avaqjjqq.js +2 -0
  32. package/dist/cli/loop-mmpfft01.js +2 -0
  33. package/dist/cli/main-0904f6ps.js +5 -0
  34. package/dist/cli/main-0ab9fc26.js +9 -0
  35. package/dist/cli/main-0jys2ccn.js +3 -0
  36. package/dist/cli/main-0mtcdbs7.js +3 -0
  37. package/dist/cli/main-0z1w2zsg.js +3 -0
  38. package/dist/cli/main-1dchs7xv.js +18 -0
  39. package/dist/cli/main-1ereejm1.js +3 -0
  40. package/dist/cli/main-1k1kw6b5.js +3 -0
  41. package/dist/cli/main-27y4sm2k.js +38 -0
  42. package/dist/cli/main-2wwjex5j.js +58 -0
  43. package/dist/cli/main-2yeveeve.js +6 -0
  44. package/dist/cli/main-2yfck9b5.js +3 -0
  45. package/dist/cli/main-2zmzgkwh.js +3 -0
  46. package/dist/cli/main-351pz3z7.js +7 -0
  47. package/dist/cli/main-3gjqfh7a.js +6 -0
  48. package/dist/cli/main-3nf3kgve.js +3 -0
  49. package/dist/cli/main-3pjrb2hd.js +3 -0
  50. package/dist/cli/main-3rxcvgna.js +19 -0
  51. package/dist/cli/main-4b3jgy66.js +19 -0
  52. package/dist/cli/main-4wndhjdc.js +7 -0
  53. package/dist/cli/main-4xcmvxnk.js +3 -0
  54. package/dist/cli/main-5tbz0wbz.js +4 -0
  55. package/dist/cli/main-5ywnwthm.js +3 -0
  56. package/dist/cli/main-6b62vkz0.js +14 -0
  57. package/dist/cli/main-6dnk69vp.js +3 -0
  58. package/dist/cli/main-6genrmhs.js +136 -0
  59. package/dist/cli/main-73g7eff4.js +15 -0
  60. package/dist/cli/main-7c5thhjd.js +5 -0
  61. package/dist/cli/main-7rn6bqje.js +3 -0
  62. package/dist/cli/main-80haw7qk.js +4 -0
  63. package/dist/cli/main-875s60s2.js +4 -0
  64. package/dist/cli/main-8kjxbpw4.js +8 -0
  65. package/dist/cli/main-90ds1z4e.js +10 -0
  66. package/dist/cli/main-9etavkew.js +3 -0
  67. package/dist/cli/main-a9njrkk1.js +3 -0
  68. package/dist/cli/main-aecrjq2d.js +12 -0
  69. package/dist/cli/main-ck9asesq.js +9 -0
  70. package/dist/cli/main-cta9racd.js +4 -0
  71. package/dist/cli/main-ddv7j2ag.js +3 -0
  72. package/dist/cli/main-dfreez27.js +10 -0
  73. package/dist/cli/main-f7rw7des.js +3 -0
  74. package/dist/cli/main-ggcn7rd7.js +5 -0
  75. package/dist/cli/main-gzkmycnv.js +3 -0
  76. package/dist/cli/main-hq51jg8v.js +18 -0
  77. package/dist/cli/main-jft389w9.js +8 -0
  78. package/dist/cli/main-k1eqkg83.js +3 -0
  79. package/dist/cli/main-k2y8a2aw.js +9 -0
  80. package/dist/cli/main-kcpbykxz.js +4 -0
  81. package/dist/cli/main-kd488vje.js +22 -0
  82. package/dist/cli/main-kh32yvgk.js +5 -0
  83. package/dist/cli/main-kqxnqjnv.js +25 -0
  84. package/dist/cli/main-kyn0xnsg.js +3 -0
  85. package/dist/cli/main-m1kk6fp5.js +21 -0
  86. package/dist/cli/main-mv40pcr2.js +4 -0
  87. package/dist/cli/main-n0t3973w.js +3 -0
  88. package/dist/cli/main-nqveez48.js +4 -0
  89. package/dist/cli/main-pknhvrmj.js +3 -0
  90. package/dist/cli/main-pn1w7a7j.js +3 -0
  91. package/dist/cli/main-prxxs70n.js +4 -0
  92. package/dist/cli/main-q3vsesf9.js +3 -0
  93. package/dist/cli/main-qsevpgsv.js +3 -0
  94. package/dist/cli/main-rdgdw24b.js +25 -0
  95. package/dist/cli/main-rfth4tbm.js +16 -0
  96. package/dist/cli/main-rg0wn0xf.js +5 -0
  97. package/dist/cli/main-sdmxhtv8.js +4 -0
  98. package/dist/cli/main-skbp13js.js +18 -0
  99. package/dist/cli/main-t4xnd213.js +7 -0
  100. package/dist/cli/main-vqak588n.js +4 -0
  101. package/dist/cli/main-w2n1303f.js +9 -0
  102. package/dist/cli/main-wbrdspr2.js +5 -0
  103. package/dist/cli/main-wsrg79c1.js +7 -0
  104. package/dist/cli/main-x4r0fne4.js +5 -0
  105. package/dist/cli/main-xea2f3tn.js +6 -0
  106. package/dist/cli/main-xg704a3c.js +3 -0
  107. package/dist/cli/main-xvnrabfp.js +16 -0
  108. package/dist/cli/main-xy53xf0r.js +4 -0
  109. package/dist/cli/main-y1fqy60y.js +3 -0
  110. package/dist/cli/main-yn8cd281.js +34 -0
  111. package/dist/cli/main-yr0ksc0h.js +4 -0
  112. package/dist/cli/main-z2ex2vyf.js +4 -0
  113. package/dist/cli/main-z3aayzvq.js +3 -0
  114. package/dist/cli/main-zaqh35jg.js +3 -0
  115. package/dist/cli/main-zc2e8e46.js +4 -0
  116. package/dist/cli/main-zzrfw6cf.js +13 -0
  117. package/dist/cli/main.js +280 -0
  118. package/dist/cli/market-cmd-e14kmx9n.js +5 -0
  119. package/dist/cli/mcp-login-wq7ktdek.js +2 -0
  120. package/dist/cli/mcp-market-cmd-9mg3jecy.js +2 -0
  121. package/dist/cli/notify-b7qc0cjb.js +2 -0
  122. package/dist/cli/oauth-z8whcgfx.js +2 -0
  123. package/dist/cli/output-b3ewj3ps.js +16 -0
  124. package/dist/cli/profiles-6mr5he5e.js +2 -0
  125. package/dist/cli/provider-config-g7j42q8x.js +2 -0
  126. package/dist/cli/provider-jr1y8vvm.js +2 -0
  127. package/dist/cli/registry-s8yk86g0.js +2 -0
  128. package/dist/cli/registry-t6p8d4mn.js +2 -0
  129. package/dist/cli/repl-bajwe1mh.js +11 -0
  130. package/dist/cli/resume-rwn9nz7y.js +2 -0
  131. package/dist/cli/run-flags-nah7ndpt.js +2 -0
  132. package/dist/cli/runtime-n7gafzhb.js +2 -0
  133. package/dist/cli/sandbox-config-emdy18x4.js +2 -0
  134. package/dist/cli/server-b0nvs2bn.js +5 -0
  135. package/dist/cli/session-arg-y75wd4kj.js +2 -0
  136. package/dist/cli/session-j62evmjq.js +2 -0
  137. package/dist/cli/sessions-cmd-tsnwz0ns.js +7 -0
  138. package/dist/cli/settings-df10wfez.js +2 -0
  139. package/dist/cli/setup-jzvv72fg.js +2 -0
  140. package/dist/cli/sextant-smoke-37m81ke6.js +5 -0
  141. package/dist/cli/skills-cmd-gjxnxnhx.js +2 -0
  142. package/dist/cli/smoke-p7748apt.js +8 -0
  143. package/dist/cli/start-chat-s4st3mm0.js +12 -0
  144. package/dist/cli/stream-gmeyewds.js +2 -0
  145. package/dist/cli/task-gh0kkp3n.js +2 -0
  146. package/dist/cli/tasks-z1kfpe8e.js +2 -0
  147. package/dist/cli/thinking-0eqkrz6t.js +2 -0
  148. package/dist/cli/todo-5brcrt9m.js +2 -0
  149. package/dist/cli/tools-7pzm0vj9.js +2 -0
  150. package/dist/cli/tools-s635p6s8.js +2 -0
  151. package/dist/cli/trust-cmd-cjav8zgm.js +2 -0
  152. package/dist/cli/update-check-pt31bm2f.js +2 -0
  153. package/dist/cli/update-cmd-tk131s9t.js +2 -0
  154. package/dist/cli/voice-56nabd8d.js +2 -0
  155. package/dist/cli/webfetch-xd8q596m.js +2 -0
  156. package/dist/cli/websearch-5hkf98k1.js +2 -0
  157. package/dist/cli/workflow-cmd-cy3cvzjp.js +4 -0
  158. package/dist/cli/workspace-q10g5z3e.js +2 -0
  159. package/dist/lib/index.js +62 -0
  160. package/dist/lib/models-index.json +1 -0
  161. package/dist/lib/plugins.js +55 -0
  162. package/dist/lib/providers.js +17 -0
  163. package/dist/lib/public-api.js +20 -0
  164. package/dist/lib/sdk.js +360 -0
  165. package/package.json +84 -72
  166. package/bin/rovecode.ts +0 -21
  167. package/src/acp/server.ts +0 -374
  168. package/src/cli/auth-login.ts +0 -122
  169. package/src/cli/connect.ts +0 -244
  170. package/src/cli/context-cmd.ts +0 -199
  171. package/src/cli/dispatch.ts +0 -82
  172. package/src/cli/doctor.ts +0 -362
  173. package/src/cli/export.ts +0 -276
  174. package/src/cli/help.ts +0 -293
  175. package/src/cli/is-tui-invocation.ts +0 -8
  176. package/src/cli/main.ts +0 -583
  177. package/src/cli/market-cmd.ts +0 -658
  178. package/src/cli/mcp-login.ts +0 -141
  179. package/src/cli/mcp-market-cmd.ts +0 -302
  180. package/src/cli/output.ts +0 -382
  181. package/src/cli/repl.ts +0 -250
  182. package/src/cli/repomap-root.ts +0 -14
  183. package/src/cli/resume.ts +0 -57
  184. package/src/cli/run-flags.ts +0 -43
  185. package/src/cli/run-limits.ts +0 -78
  186. package/src/cli/runtime.ts +0 -931
  187. package/src/cli/session-arg.ts +0 -30
  188. package/src/cli/sessions-cmd.ts +0 -145
  189. package/src/cli/setup.ts +0 -153
  190. package/src/cli/skills-cmd.ts +0 -194
  191. package/src/cli/start-chat.ts +0 -65
  192. package/src/cli/trust-cmd.ts +0 -52
  193. package/src/coding/bash.ts +0 -148
  194. package/src/coding/checkpoints.ts +0 -327
  195. package/src/coding/diff.ts +0 -138
  196. package/src/coding/files.ts +0 -341
  197. package/src/coding/hashline.ts +0 -274
  198. package/src/coding/lsp-gate.ts +0 -254
  199. package/src/coding/lsp-servers.ts +0 -147
  200. package/src/coding/lsp.ts +0 -283
  201. package/src/coding/repomap-cache.ts +0 -99
  202. package/src/coding/repomap-files.ts +0 -192
  203. package/src/coding/repomap.ts +0 -481
  204. package/src/core/agents.ts +0 -255
  205. package/src/core/compaction.ts +0 -259
  206. package/src/core/config.ts +0 -289
  207. package/src/core/context-report.ts +0 -228
  208. package/src/core/context.ts +0 -60
  209. package/src/core/count-remote.ts +0 -107
  210. package/src/core/execpolicy-rules.ts +0 -196
  211. package/src/core/execpolicy.ts +0 -385
  212. package/src/core/executor.ts +0 -454
  213. package/src/core/guardrails.ts +0 -400
  214. package/src/core/hooks.ts +0 -411
  215. package/src/core/images.ts +0 -230
  216. package/src/core/intro.ts +0 -266
  217. package/src/core/loop.ts +0 -567
  218. package/src/core/modes.ts +0 -372
  219. package/src/core/orchestrator.ts +0 -245
  220. package/src/core/proc-group.ts +0 -48
  221. package/src/core/project-trust.ts +0 -98
  222. package/src/core/reflection.ts +0 -165
  223. package/src/core/sandbox-config.ts +0 -186
  224. package/src/core/session-id.ts +0 -24
  225. package/src/core/session-images.ts +0 -73
  226. package/src/core/session-ops.ts +0 -183
  227. package/src/core/session-text.ts +0 -29
  228. package/src/core/session.ts +0 -469
  229. package/src/core/settings.ts +0 -170
  230. package/src/core/tasks.ts +0 -646
  231. package/src/core/token-scale.ts +0 -108
  232. package/src/core/tools.ts +0 -309
  233. package/src/core/trust.ts +0 -104
  234. package/src/core/types.ts +0 -330
  235. package/src/core/update-check.ts +0 -171
  236. package/src/core/usage.ts +0 -204
  237. package/src/core/validate.ts +0 -121
  238. package/src/core/verify-gate.ts +0 -159
  239. package/src/core/verify.ts +0 -236
  240. package/src/core/voice.ts +0 -158
  241. package/src/core/win-job.ts +0 -183
  242. package/src/core/workspace.ts +0 -184
  243. package/src/design/audit.ts +0 -797
  244. package/src/design/direction.ts +0 -190
  245. package/src/design/rules.ts +0 -157
  246. package/src/eval/bench.ts +0 -150
  247. package/src/eval/gauntlet-runner.ts +0 -215
  248. package/src/eval/gauntlet-support.ts +0 -84
  249. package/src/eval/gauntlet-wave3.ts +0 -269
  250. package/src/eval/gauntlet-wave4.ts +0 -217
  251. package/src/eval/gauntlet.ts +0 -253
  252. package/src/index.ts +0 -17
  253. package/src/lanes/agy.ts +0 -95
  254. package/src/lanes/approval.ts +0 -24
  255. package/src/lanes/claude.ts +0 -129
  256. package/src/lanes/codex.ts +0 -127
  257. package/src/lanes/events.ts +0 -130
  258. package/src/lanes/job.ts +0 -142
  259. package/src/lanes/opencode.ts +0 -122
  260. package/src/lanes/process.ts +0 -184
  261. package/src/lanes/progress.ts +0 -183
  262. package/src/lanes/registry.ts +0 -178
  263. package/src/lanes/runner.ts +0 -124
  264. package/src/lanes/types.ts +0 -112
  265. package/src/market/catalogs/mcp-docs.json +0 -111
  266. package/src/market/catalogs/plugins.json +0 -111
  267. package/src/market/catalogs/skills.json +0 -478
  268. package/src/market/clone.ts +0 -72
  269. package/src/market/context-cost.ts +0 -121
  270. package/src/market/digest.ts +0 -106
  271. package/src/market/index.ts +0 -22
  272. package/src/market/install.ts +0 -578
  273. package/src/market/manifest.ts +0 -187
  274. package/src/market/prereq.ts +0 -145
  275. package/src/market/registry.ts +0 -363
  276. package/src/market/resolve.ts +0 -111
  277. package/src/market/types.ts +0 -236
  278. package/src/market/validate.ts +0 -227
  279. package/src/mcp/client.ts +0 -449
  280. package/src/mcp/config.ts +0 -252
  281. package/src/mcp/local-package.ts +0 -211
  282. package/src/mcp/market-catalog.ts +0 -84
  283. package/src/mcp/market-install.ts +0 -289
  284. package/src/mcp/market.ts +0 -362
  285. package/src/mcp/oauth.ts +0 -251
  286. package/src/mcp/prompts-resources.ts +0 -249
  287. package/src/mcp/shared.ts +0 -149
  288. package/src/mcp/status.ts +0 -67
  289. package/src/mcp/tools.ts +0 -275
  290. package/src/mcp/transport.ts +0 -122
  291. package/src/mcp/trust.ts +0 -25
  292. package/src/memory/blocks.ts +0 -278
  293. package/src/memory/recall.ts +0 -355
  294. package/src/memory/scope.ts +0 -182
  295. package/src/memory/store.ts +0 -105
  296. package/src/memory/tools.ts +0 -99
  297. package/src/plugins/cli.ts +0 -119
  298. package/src/plugins/discover.ts +0 -108
  299. package/src/plugins/index.ts +0 -50
  300. package/src/plugins/install.ts +0 -184
  301. package/src/plugins/load.ts +0 -124
  302. package/src/plugins/manifest.ts +0 -92
  303. package/src/plugins/state.ts +0 -83
  304. package/src/providers/auth.ts +0 -408
  305. package/src/providers/cache.ts +0 -223
  306. package/src/providers/catalog-local.ts +0 -160
  307. package/src/providers/catalog.ts +0 -421
  308. package/src/providers/middleware-context.ts +0 -86
  309. package/src/providers/middleware.ts +0 -373
  310. package/src/providers/model-list.ts +0 -23
  311. package/src/providers/oauth/common.ts +0 -105
  312. package/src/providers/oauth/device-code.ts +0 -107
  313. package/src/providers/oauth/github-copilot.ts +0 -146
  314. package/src/providers/oauth/loopback.ts +0 -158
  315. package/src/providers/oauth/openai.ts +0 -163
  316. package/src/providers/oauth/openrouter.ts +0 -89
  317. package/src/providers/oauth/pkce.ts +0 -45
  318. package/src/providers/oauth/registry.ts +0 -39
  319. package/src/providers/oauth/seam.ts +0 -89
  320. package/src/providers/profile-glm53.ts +0 -111
  321. package/src/providers/profile-sonnet5-persona.ts +0 -65
  322. package/src/providers/profile-sonnet5-voice.ts +0 -23
  323. package/src/providers/profiles.ts +0 -156
  324. package/src/providers/provider-config.ts +0 -311
  325. package/src/providers/registry.ts +0 -333
  326. package/src/providers/responses.ts +0 -209
  327. package/src/providers/retry.ts +0 -234
  328. package/src/providers/router.ts +0 -294
  329. package/src/providers/sse.ts +0 -26
  330. package/src/providers/stream-errors.ts +0 -117
  331. package/src/providers/stream.ts +0 -566
  332. package/src/providers/thinking.ts +0 -189
  333. package/src/providers/wire-messages.ts +0 -129
  334. package/src/providers/wire-responses.ts +0 -79
  335. package/src/providers/wire-select.ts +0 -53
  336. package/src/server/http.ts +0 -291
  337. package/src/server/openapi.ts +0 -246
  338. package/src/sextant/card-hits.ts +0 -102
  339. package/src/sextant/card-keys.ts +0 -55
  340. package/src/sextant/context-source.ts +0 -157
  341. package/src/sextant/crew-cards.ts +0 -350
  342. package/src/sextant/draw-agents.ts +0 -273
  343. package/src/sextant/draw-code.ts +0 -388
  344. package/src/sextant/draw-context.ts +0 -222
  345. package/src/sextant/draw-frame.ts +0 -164
  346. package/src/sextant/draw-market.ts +0 -573
  347. package/src/sextant/draw-messages.ts +0 -386
  348. package/src/sextant/draw-pet.ts +0 -230
  349. package/src/sextant/draw-plan.ts +0 -187
  350. package/src/sextant/draw-tabs.ts +0 -85
  351. package/src/sextant/draw-util.ts +0 -65
  352. package/src/sextant/draw-wizard.ts +0 -378
  353. package/src/sextant/engine.ts +0 -230
  354. package/src/sextant/frame-hits.ts +0 -25
  355. package/src/sextant/frame.ts +0 -101
  356. package/src/sextant/git-status.ts +0 -197
  357. package/src/sextant/grid.ts +0 -59
  358. package/src/sextant/input.ts +0 -119
  359. package/src/sextant/keys.ts +0 -521
  360. package/src/sextant/layout.ts +0 -86
  361. package/src/sextant/local-commands.ts +0 -169
  362. package/src/sextant/market-source.ts +0 -287
  363. package/src/sextant/mentions.ts +0 -200
  364. package/src/sextant/message-hits.ts +0 -26
  365. package/src/sextant/model.ts +0 -387
  366. package/src/sextant/overlays.ts +0 -456
  367. package/src/sextant/panel-hits.ts +0 -38
  368. package/src/sextant/pet.ts +0 -399
  369. package/src/sextant/screen.ts +0 -324
  370. package/src/sextant/scroll-hits.ts +0 -66
  371. package/src/sextant/scrollbar.ts +0 -82
  372. package/src/sextant/sextant-bridge.ts +0 -174
  373. package/src/sextant/sextant-cards.ts +0 -142
  374. package/src/sextant/sextant-diff-base.ts +0 -63
  375. package/src/sextant/sextant-files.ts +0 -154
  376. package/src/sextant/sextant-frame-loop.ts +0 -335
  377. package/src/sextant/sextant-renderer.ts +0 -574
  378. package/src/sextant/sextant-repo.ts +0 -140
  379. package/src/sextant/theme.ts +0 -66
  380. package/src/sextant/tool-rows.ts +0 -189
  381. package/src/sextant/types.ts +0 -493
  382. package/src/skills/index.ts +0 -387
  383. package/src/skills/pack.ts +0 -220
  384. package/src/skills/spec.ts +0 -162
  385. package/src/skills/tools.ts +0 -69
  386. package/src/skills/versioned.ts +0 -227
  387. package/src/telemetry/otel-export.ts +0 -122
  388. package/src/telemetry/otel-lanes.ts +0 -89
  389. package/src/telemetry/otel-logs.ts +0 -131
  390. package/src/telemetry/otel-metrics.ts +0 -136
  391. package/src/telemetry/otel.ts +0 -397
  392. package/src/telemetry/otlp.ts +0 -76
  393. package/src/tools/ask-user.ts +0 -156
  394. package/src/tools/bash-bg.ts +0 -94
  395. package/src/tools/bash-jobs.ts +0 -237
  396. package/src/tools/design.ts +0 -151
  397. package/src/tools/evalcell.ts +0 -338
  398. package/src/tools/html-text.ts +0 -139
  399. package/src/tools/provider.ts +0 -149
  400. package/src/tools/task.ts +0 -250
  401. package/src/tools/todo.ts +0 -320
  402. package/src/tools/webfetch.ts +0 -332
  403. package/src/tools/websearch.ts +0 -359
  404. package/src/tui/agents-cmd.ts +0 -41
  405. package/src/tui/app.ts +0 -749
  406. package/src/tui/attach.ts +0 -127
  407. package/src/tui/boot-notes.ts +0 -41
  408. package/src/tui/builtin-prompts.ts +0 -59
  409. package/src/tui/checkpoints-cmd.ts +0 -70
  410. package/src/tui/clipboard-image.ts +0 -81
  411. package/src/tui/clipboard.ts +0 -78
  412. package/src/tui/commands.ts +0 -283
  413. package/src/tui/config-view.ts +0 -53
  414. package/src/tui/context-cmds.ts +0 -282
  415. package/src/tui/cost.ts +0 -108
  416. package/src/tui/crash-guard.ts +0 -173
  417. package/src/tui/focus-terminal.ts +0 -34
  418. package/src/tui/git-cmds.ts +0 -273
  419. package/src/tui/git-plain.ts +0 -58
  420. package/src/tui/info-cmd.ts +0 -150
  421. package/src/tui/input-plain.ts +0 -76
  422. package/src/tui/mcp-cmd.ts +0 -128
  423. package/src/tui/memory-note.ts +0 -77
  424. package/src/tui/modes-cmd.ts +0 -45
  425. package/src/tui/notify-seq.ts +0 -100
  426. package/src/tui/notify.ts +0 -318
  427. package/src/tui/overlays.ts +0 -97
  428. package/src/tui/pi-renderer.ts +0 -428
  429. package/src/tui/providers-cmd.ts +0 -377
  430. package/src/tui/reasoning-view.ts +0 -56
  431. package/src/tui/renderer.ts +0 -128
  432. package/src/tui/replay-marker.ts +0 -29
  433. package/src/tui/session-cmd.ts +0 -148
  434. package/src/tui/session-manage.ts +0 -95
  435. package/src/tui/sextant-attach.ts +0 -102
  436. package/src/tui/sextant-io.ts +0 -202
  437. package/src/tui/sextant-smoke.ts +0 -110
  438. package/src/tui/shell-cmd.ts +0 -158
  439. package/src/tui/smoke.ts +0 -72
  440. package/src/tui/staged-terminal.ts +0 -50
  441. package/src/tui/startup.ts +0 -12
  442. package/src/tui/theme.ts +0 -59
  443. package/src/tui/todo-label.ts +0 -7
  444. package/src/tui/trust-card.ts +0 -107
  445. package/src/tui/tui-commands.ts +0 -87
  446. package/tsconfig.json +0 -30
  447. package/vendor/pi-tui/LICENSE +0 -21
  448. package/vendor/pi-tui/PATCHES.md +0 -12
  449. package/vendor/pi-tui/PROVENANCE.md +0 -12
  450. package/vendor/pi-tui/README.upstream.md +0 -854
  451. package/vendor/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  452. package/vendor/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  453. package/vendor/pi-tui/src/alt-screen-search.ts +0 -158
  454. package/vendor/pi-tui/src/autocomplete.ts +0 -827
  455. package/vendor/pi-tui/src/components/alt-screen-flash.ts +0 -52
  456. package/vendor/pi-tui/src/components/box.ts +0 -138
  457. package/vendor/pi-tui/src/components/cancellable-loader.ts +0 -41
  458. package/vendor/pi-tui/src/components/editor.ts +0 -2364
  459. package/vendor/pi-tui/src/components/h-stack.ts +0 -45
  460. package/vendor/pi-tui/src/components/image.ts +0 -128
  461. package/vendor/pi-tui/src/components/input.ts +0 -448
  462. package/vendor/pi-tui/src/components/loader.ts +0 -93
  463. package/vendor/pi-tui/src/components/markdown.ts +0 -1016
  464. package/vendor/pi-tui/src/components/scroll-view.ts +0 -217
  465. package/vendor/pi-tui/src/components/select-list.ts +0 -230
  466. package/vendor/pi-tui/src/components/settings-list.ts +0 -277
  467. package/vendor/pi-tui/src/components/spacer.ts +0 -29
  468. package/vendor/pi-tui/src/components/stack.ts +0 -155
  469. package/vendor/pi-tui/src/components/text.ts +0 -108
  470. package/vendor/pi-tui/src/components/truncated-text.ts +0 -66
  471. package/vendor/pi-tui/src/components/v-stack.ts +0 -34
  472. package/vendor/pi-tui/src/editor-component.ts +0 -75
  473. package/vendor/pi-tui/src/fuzzy.ts +0 -138
  474. package/vendor/pi-tui/src/index.ts +0 -149
  475. package/vendor/pi-tui/src/keybindings.ts +0 -321
  476. package/vendor/pi-tui/src/keys.ts +0 -1402
  477. package/vendor/pi-tui/src/kill-ring.ts +0 -47
  478. package/vendor/pi-tui/src/latex.ts +0 -1381
  479. package/vendor/pi-tui/src/layout-node.ts +0 -52
  480. package/vendor/pi-tui/src/layout.ts +0 -411
  481. package/vendor/pi-tui/src/native-modifiers.ts +0 -60
  482. package/vendor/pi-tui/src/native-module-path.ts +0 -32
  483. package/vendor/pi-tui/src/stdin-buffer.ts +0 -445
  484. package/vendor/pi-tui/src/terminal-colors.ts +0 -74
  485. package/vendor/pi-tui/src/terminal-image.ts +0 -701
  486. package/vendor/pi-tui/src/terminal.ts +0 -554
  487. package/vendor/pi-tui/src/tui-alt-screen.ts +0 -1379
  488. package/vendor/pi-tui/src/tui-main-screen.ts +0 -655
  489. package/vendor/pi-tui/src/tui.ts +0 -1264
  490. package/vendor/pi-tui/src/undo-stack.ts +0 -29
  491. package/vendor/pi-tui/src/utils.ts +0 -1327
  492. package/vendor/pi-tui/src/word-navigation.ts +0 -118
  493. package/vendor/pi-tui/test/test-themes.ts +0 -39
  494. package/vendor/pi-tui/test/virtual-terminal.ts +0 -219
  495. /package/{src/providers → dist/cli}/models-index.json +0 -0
package/README.md CHANGED
@@ -1,8 +1,5 @@
1
1
  # Rovecode
2
2
 
3
- [![npm](https://img.shields.io/npm/v/rovecode)](https://www.npmjs.com/package/rovecode)
4
- [![license](https://img.shields.io/badge/license-AGPL--3.0--only-blue)](./LICENSE)
5
-
6
3
  A coding agent for the terminal. The cockpit is a panelled TUI called sextant; the mascot is a
7
4
  weather cloud whose mood follows the run. Under the hood, rovecode is a research-derived harness in
8
5
  TypeScript on Bun: instead of inventing architecture it ports evidence-based patterns from open-source
@@ -11,7 +8,7 @@ OpenHands) — every port traces to file:line in a snapshotted source and lands
11
8
  fresh-context critic verifies it against a pre-written bar (ledger: `PORTS.md`, kept outside this
12
9
  repository for now).
13
10
 
14
- ![The sextant TUI at 160×44 cells: the files tree with git statuses, the code panel on src/auth/callback.ts with edited lines highlighted, the messages panel with read and edit tool rows and an approval card asking to run bun test, the plan at step 1 of 4, usage at 13% context, and the rovecode cloud pet waiting for a nod.](https://raw.githubusercontent.com/9Code-Labs/rovecode-site/main/public/shots/approval-160x44.png)
11
+ ![The sextant TUI at 160×44 cells: the files tree with git statuses, the code panel on src/auth/callback.ts with edited lines highlighted, the messages panel with read and edit tool rows and an approval card asking to run bun test, the plan at step 1 of 4, usage at 13% context, and the rovecode cloud pet waiting for a nod.](https://raw.githubusercontent.com/9Code-Labs/rovecode-community/main/docs/assets/approval-160x44.png)
15
12
 
16
13
  ## Status (2026-09-04, post wave 4)
17
14
 
@@ -41,37 +38,47 @@ repository for now).
41
38
  - **run budgets** — `--max-turns` / `--max-seconds`, so a spiral ends in a result instead of an outside kill
42
39
  - a decided **wire-failure policy** (`docs/wire-failures.md`): what is retried, what is never retried after
43
40
  text has arrived, and the wait announced while it happens
44
- - the **site** ([its own repo](https://github.com/9Code-Labs/rovecode-site), 15 languages, prerendered, [live](http://64.177.43.110/)) and the CI/CD workflows
41
+ - the **site** ([live at rovecode.dev](https://rovecode.dev), 15 languages, prerendered) and the CI/CD workflows
45
42
  that build and ship it
46
43
  - **sextant** gained mouse and scrollbar dragging, the page tab strip, the notices history and prompt suggestions
47
44
  - **startup** is lazy: `rovecode --help` no longer boots the TUI, the loop, the runtime or the plugin scanner
48
45
 
49
46
  ## Install
50
47
 
51
- Requires [Bun](https://bun.sh) ≥ 1.3.14 (the CLI entry is TypeScript, executed by bun — node cannot run it).
48
+ Requires [Bun](https://bun.sh) ≥ 1.3.14 on PATH (both the published bundle and the source are executed by bun — node cannot run them).
52
49
 
53
50
  ```bash
54
- # npm — the supported install
55
- npm install -g rovecode
51
+ # from npm — the published minified bundle (beta channel until a stable is cut)
52
+ npm install -g rovecode@beta
53
+ rovecode --version
56
54
 
57
- # from source
58
- git clone https://github.com/9Code-Labs/rovecode.git && cd rovecode && bun install
55
+ # from source (this repository is the bundle's AGPL source)
56
+ git clone https://github.com/9Code-Labs/rovecode-community.git && cd rovecode-community && bun install
59
57
  bun run src/cli/main.ts --help # or: bun link → `rovecode` on PATH
60
58
  bun run build:cli # optional: pre-bundle (TUI cold start ~230 ms → ~80 ms); re-run after git pull
61
59
 
62
60
  # single binary (~110 MB: bun runtime + bundled deps + embedded native addons)
63
61
  bun run build # scripts/build.ts → dist/rovecode(.exe) + smoke
64
62
  dist/rovecode.exe --version
63
+
64
+ # from a locally packed tarball — npm pack runs the minified build:npm through prepack
65
+ npm pack && npm install -g ./rovecode-0.4.0-beta.0.tgz
65
66
  ```
66
67
 
67
- Published on the npm registry as [`rovecode`](https://www.npmjs.com/package/rovecode) — the global
68
- install shims to bun via the shebang. GitHub Releases still carry cut versions and there is no
69
- self-update: `git pull` and rebuild, or reinstall the package. Rovecode does tell you when that is worth doing: the
70
- TUI's startup card carries `update available: 0.3.0 → 0.4.0 · <release url>` when a newer release exists. The check
71
- (`src/core/update-check.ts`) asks GitHub once every six hours (cached in `~/.rovecode/update-check.json`), never
72
- blocks the start and never throws. The repository is private, so it needs `GITHUB_TOKEN`, `GH_TOKEN` or a
73
- `gh auth login`; without one the result is "unknown — the release repository is private and no token is set",
74
- never "up to date", and the card prints nothing rather than a guess. Only a real newer release produces a line
68
+ Published to npm as [`rovecode`](https://www.npmjs.com/package/rovecode): the tarball carries the minified
69
+ bundle, and THIS repository is its source, as the AGPL requires (`npm install -g rovecode` — the beta
70
+ channel is `rovecode@beta`). Releases are cut on
71
+ [GitHub Releases](https://github.com/9Code-Labs/rovecode-community/releases). `rovecode update` updates
72
+ this installation the way it was installed (npm: `npm install -g rovecode@<channel>`; a source checkout:
73
+ `git pull` + `bun install`; the channel follows the running version, so a beta stays on beta), and
74
+ `"autoUpdate": true` in settings.json (or `ROVECODE_AUTO_UPDATE=1`) runs that plan in the background at
75
+ boot when the check finds a newer release — the session is never blocked or swapped; the note says
76
+ restart. A compiled binary does not replace itself yet and says where the new artifact is. Rovecode does tell you when that is worth doing: the
77
+ TUI's startup card carries `update available: 0.3.2 → 0.4.0 · <release url>` when a newer release exists. The check
78
+ (`src/core/update-check.ts`) asks GitHub once every six hours (cached per release repo in `~/.rovecode/update-check-<repo>.json`), never
79
+ blocks the start and never throws. The repository is public, so the check works anonymously; `GITHUB_TOKEN`,
80
+ `GH_TOKEN` or a `gh auth login` only raise the rate limit. When the check could not look,
81
+ the card prints nothing rather than a guess. Only a real newer release produces a line
75
82
  on the card — `rovecode --version` prints the version to stdout alone (so a script can still read it) and, on
76
83
  stderr, whatever the last check found. It reads the cache and never opens a socket: a courtesy line must not
77
84
  make the one command scripts call to identify a build wait on the network.
@@ -375,6 +382,10 @@ mcp/ acp/ server/ tui/ sextant/ surfaces over the same loop (no second loop
375
382
  eval/ scripted-provider gauntlet + deterministic benches
376
383
  ```
377
384
 
385
+ ## Supported extension API
386
+
387
+ Distributed integrations should import only `rovecode/extensions`, `rovecode/plugins`, or `rovecode/providers`; deep `src/` imports are internal. See [API stability](docs/api-stability.md), [extension interfaces](docs/extensions.md), the [authentication boundary](docs/authentication-boundary.md), and the [open-core architecture](docs/open-core-architecture.md). Public code is mechanically prevented from importing private overlays or hosted product-auth/control-plane contracts. Generic local provider and MCP authentication remain part of the usable open-source core.
388
+
378
389
  ## Configuration
379
390
 
380
391
  Defaults < project config chunks (harvested, capped) < env < CLI flags.
@@ -638,6 +649,19 @@ tokens, cache hits, and catalog-priced spend.
638
649
 
639
650
  ## Extending
640
651
 
652
+ - **SDK** (`rovecode/sdk`, `src/sdk`, `docs/design/sdk-blueprint.md`): embed the harness in your own
653
+ TypeScript/Bun process — `import { createClient } from "rovecode/sdk"`, then
654
+ `const rc = createClient({ cwd })`, `const s = await rc.session.create()`, and
655
+ `for await (const ev of s.prompt({ text })) …` streams every `RunEvent` plus `agent_tree_update`
656
+ frames for live subagent trees. One client = one engine: the SDK boots the same runtime the CLI
657
+ boots (no second loop), and `stream: mockStream(…)` makes it testable with no provider.
658
+ - **Workflows** (`rovecode workflow run <file.ts>`, `src/workflow/engine.ts`): a file that
659
+ `export default defineWorkflow({ name, steps })` — a DAG of `agent` steps (run through the
660
+ TaskManager, so they appear in `serve`'s `/ui` agent tree) and `gate` steps (human approval),
661
+ with per-step retry, a token budget, and a JSONL checkpoint in `.rovecode/workflows/` that
662
+ `--resume <runId>` continues after a crash. `rovecode workflow list` shows known runs.
663
+ - **Mission control** (`rovecode serve` → `GET /ui` + `GET /events`): a zero-build dark dashboard
664
+ over a global SSE bus — sessions, every run's live event stream, and the per-session agent tree.
641
665
  - **Plugins** (`src/plugins`, `docs/plugins.md`): a folder with a `plugin.json` that bundles the things below —
642
666
  an in-process entry module (tools + hooks), `commands/*.md`, `skills/**/SKILL.md`, MCP servers — so one
643
667
  `rovecode plugin add <folder|git-url>` installs all of it and `rovecode plugin list` shows all of it. User scope
@@ -675,7 +699,7 @@ tokens, cache hits, and catalog-priced spend.
675
699
  either file asks again) and `mcp untrust` revokes it. User-scope servers need no gate. `rovecode trust` is the same
676
700
  store one level up: it approves the MCP files together with `hooks.ts`, `sandbox.json` and the command-bearing
677
701
  settings keys in one step (see Project trust above).
678
- - **Market** (`src/market`, `docs/market.md`): one shelf over all three — `rovecode market search|info|docs|
702
+ - **Market** (`src/market`, [`docs/mcp-market.md`](docs/mcp-market.md)): one shelf over all three — `rovecode market search|info|docs|
679
703
  install|remove|list|update|sources|verify|validate` (each with `--json`) and `/market` in the TUI find MCP
680
704
  servers, skills and plugins
681
705
  and install any of them with one command. A single argument resolves five shapes (bare id, `kind:id`, a git URL,
@@ -695,34 +719,6 @@ tokens, cache hits, and catalog-priced spend.
695
719
  `.rovecode/design.json`) and `design_audit`, which counts template patterns in source and reports them as
696
720
  *slop* only while nothing is recorded, or as *deviation* from what the project chose. `ROVECODE_DESIGN=off`
697
721
  drops the section for runs with no UI in them.
698
- - **Site** ([9Code-Labs/rovecode-site](https://github.com/9Code-Labs/rovecode-site), `docs/deploy.md`):
699
- the landing page, the docs and the market — Vite + React, prerendered once per language, no runtime.
700
- It moved out of this repository on 2026-09-06 and builds without reading anything outside itself.
701
- What stays here is the content it renders: `bun run publish:site` regenerates `docs.json`,
702
- `market.json` and `facts.json` from `docs/*.md`, `src/market/catalogs/`, `src/mcp/market-catalog.ts`
703
- and `plugins/`, and pushes them there. Deploying is `bun run deploy` in that repo. Live at
704
- [64.177.43.110](http://64.177.43.110/) until there is a domain.
705
-
706
- ## License & notices
707
-
708
- Rovecode is free software under the GNU Affero General Public License v3.0 — see `LICENSE`.
709
- Copyright (C) 2026 9Code Labs. You may use, study, modify and redistribute it; every copy and every
710
- derivative must keep this license and its copyright notices, and if you run a modified rovecode as a
711
- network service you must offer its complete source to the users of that service.
712
-
713
- Third-party attributions (Apache-2.0 NOTICE entries + MIT credits): `THIRD_PARTY_NOTICES.md`
714
- (shipped in the npm tarball). No code from crush (FSL), claw-code, nanocoder, iflow, or the Claude
715
- Agent SDK.
716
-
717
- ## What wave 3 added (`PORTS.md` §Wave-3)
718
-
719
- Landed, not planned. Ports #21–#39: mid-turn cancellation, first-class grep/glob/ls tools,
720
- retry-with-backoff, approval diff previews, compaction v2, background subagents, sandbox rung config,
721
- reflection retries, hooks v2, custom slash commands, web fetch, todo/ask_user tools, image input,
722
- JSON/NDJSON output modes, session export, OTel spans.
723
-
724
- ### Not built
725
-
726
722
  - **#47 external agentic-CLI lanes** — the one wave-4 row that was never implemented here. Measured
727
723
  2026-09-06 rather than assumed: `claude -p` and `opencode run` already work through the `bash` tool
728
724
  today, in print mode, without a TTY. What makes a lane a real feature rather than a shortcut is the
@@ -736,5 +732,7 @@ JSON/NDJSON output modes, session export, OTel spans.
736
732
  and name the account it spends from. (`opencode` also writes `.opencode/` and `docs/` into the working
737
733
  directory even when it fails, and on Windows a nested shell layer ate the backslashes of an absolute
738
734
  path and produced a file literally named `C:UsersberkaycikAppData…banana.txt`.)
739
- - **Publishing**: no npm package; the binary is built locally (see Known limitations)
735
+ - **Publishing**: the npm package (`rovecode`) ships the minified bundle from this repository via the
736
+ `prepack` hook; the repo itself stays the AGPL source. `npm install -g rovecode@beta` for the beta
737
+ channel, `rovecode` for the latest stable cut.
740
738
  - **Linux/macOS CI**: POSIX paths are exercised in tests, but only Windows is gated
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bun
2
+ /** Published entry point. The npm tarball is DIST-ONLY (minified bundle; the public repository
3
+ * 9Code-Labs/rovecode-community is its AGPL source), so this shim prefers dist/cli/main.js and
4
+ * falls back to the TypeScript source for a git checkout that has not been built yet.
5
+ * ROVECODE_TRACE_BOOT=1 prints which one runs. */
6
+ import { existsSync } from "node:fs";
7
+ import { join } from "node:path";
8
+
9
+ const root = join(import.meta.dir, "..");
10
+ const bundled = join(root, "dist", "cli", "main.js");
11
+ const source = join(root, "src", "cli", "main.ts");
12
+
13
+ if (process.env.ROVECODE_TRACE_BOOT === "1") {
14
+ process.stderr.write(`[boot] dist=${existsSync(bundled)}\n`);
15
+ }
16
+
17
+ if (existsSync(bundled)) {
18
+ await import(bundled);
19
+ } else if (existsSync(source)) {
20
+ await import(source);
21
+ } else {
22
+ console.error("rovecode: neither dist/cli/main.js nor src/cli/main.ts is here — run `bun run build:cli` in a source checkout, or reinstall the package");
23
+ process.exit(2);
24
+ }
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{w as b,x as c}from"./main-yn8cd281.js";import{z as a}from"./main-hq51jg8v.js";import"./main-2wwjex5j.js";import"./main-yr0ksc0h.js";import"./main-xy53xf0r.js";import"./main-7c5thhjd.js";import"./main-zc2e8e46.js";import"./main-4xcmvxnk.js";import"./main-wbrdspr2.js";import"./main-27y4sm2k.js";import"./main-73g7eff4.js";import"./main-1ereejm1.js";import"./main-vqak588n.js";import"./main-aecrjq2d.js";import"./main-rfth4tbm.js";import"./main-6genrmhs.js";import"./main-zzrfw6cf.js";import"./main-0ab9fc26.js";import"./main-80haw7qk.js";import"./main-6dnk69vp.js";import"./main-w2n1303f.js";import"./main-0mtcdbs7.js";import"./main-pn1w7a7j.js";import"./main-m1kk6fp5.js";import"./main-wsrg79c1.js";import"./main-ck9asesq.js";import"./main-kd488vje.js";import"./main-6b62vkz0.js";import"./main-rdgdw24b.js";import"./main-3pjrb2hd.js";import"./main-351pz3z7.js";import"./main-dfreez27.js";import"./main-4b3jgy66.js";import"./main-skbp13js.js";import"./main-xvnrabfp.js";import"./main-t4xnd213.js";import"./main-3nf3kgve.js";import"./main-cta9racd.js";import"./main-1dchs7xv.js";import"./main-rg0wn0xf.js";import"./main-y1fqy60y.js";import"./main-2yfck9b5.js";import"./main-kh32yvgk.js";import"./main-kcpbykxz.js";import"./main-z3aayzvq.js";import"./main-0z1w2zsg.js";import"./main-ddv7j2ag.js";import"./main-3gjqfh7a.js";import"./main-k2y8a2aw.js";import"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-8kjxbpw4.js";import"./main-gzkmycnv.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-2zmzgkwh.js";import"./main-a9njrkk1.js";import"./main-7rn6bqje.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{c as runTui,a as buildCostNote,b as TUI_COMMANDS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ag as h,tg as a,ug as b,vg as c,wg as d,xg as e,yg as f,zg as g}from"./main-3nf3kgve.js";import"./main-qsevpgsv.js";export{g as parseQuestion,h as askUserTool,c as MAX_QUESTION_CHARS,b as MAX_OPTION_CHARS,a as MAX_OPTIONS,d as ASK_USER_UNAVAILABLE,f as ASK_USER_DECLINED,e as ASK_USER_ABORTED};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Gc as a,Hc as b,Ic as c,Jc as d,Kc as e,Lc as f,Mc as g}from"./main-5ywnwthm.js";import"./main-pknhvrmj.js";import"./main-9etavkew.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{f as runAuthLogin,d as printAuthList,c as formatAuthList,b as expiryText,e as describeNotice,g as cmdAuthLogin,a as AUTH_LOGIN_USAGE};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$m as r,Km as a,Lm as b,Mm as c,Nm as d,Om as e,Pm as f,Qm as g,Rm as h,Sm as i,Tm as j,Um as k,Vm as l,Wm as m,Xm as n,Ym as o,Zm as p,_m as q}from"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";r();export{i as writeEntry,j as saveOAuthCredential,k as saveCredential,b as rovecodeHome,l as removeCredential,m as redactSecret,q as readSecret,h as readEntry,c as migrateLegacyHome,f as loadOAuthCredentials,e as loadCredentials,n as listProviders,o as keyNameFor,g as isMcpOAuthRecord,p as echoScrubSequence,d as credentialsPath,a as CREDENTIALS_FILE_MODE};
@@ -0,0 +1,9 @@
1
+ // @bun
2
+ import{$g as g,Zg as T,ah as u,bh as F}from"./main-1dchs7xv.js";import"./main-3gjqfh7a.js";import{Ki as I,Li as Q}from"./main-k2y8a2aw.js";import"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import{fl as k,hl as x,ol as y}from"./main-3rxcvgna.js";import{Ll as R,Ml as h}from"./main-4wndhjdc.js";import{Pl as U,Rl as f}from"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";y();f();h();F();import{mkdtempSync as $,writeFileSync as L,readFileSync as B,rmSync as b}from"fs";import{tmpdir as N}from"os";import{join as M}from"path";import{randomUUID as D}from"crypto";var S={maxTurns:10,contextBudgetTokens:400000,compactionThreshold:0.8,parallelTools:!0,permissionRules:[{action:"*",resource:"*",effect:"allow"}]},p={name:"bench",systemPrompt:"bench",tools:["*"]};async function m(q,C){let z=$(M(N(),"rovecode-bench-"));for(let K=0;K<q;K++)L(M(z,`f${K}.txt`),Array.from({length:50},(X,_)=>`line-${K}-${_}`).join(`
3
+ `)+`
4
+ `);let G=new R($(M(N(),"rovecode-bench-s-")),D()),O=new U;O.register(T,g,u);let W=Date.now(),A=0,H=0,J="read",P=a(async()=>{if(J==="read"&&H<q){let K=M(z,`f${H}.txt`);if(H++,H>=q)J="edit";return Q([{id:"r"+H,tool:"read",args:{path:K}}])}if(J==="edit"){J="done";let K=[];for(let X=0;X<q;X++){let _=M(z,`f${X}.txt`),E=B(_,"utf8"),w=d(E),v=E.split(`
5
+ `);for(let V=0;V<C;V++){let Y=1+V*2;if(Y<=v.length)K.push({tag:w,anchorLine:Y,anchorHash:c(v[Y-1]),newLines:[`EDITED-${X}-${V}`]})}return Q(K.map((V,Y)=>({id:"e"+Y,tool:"edit",args:{path:_,edits:[V]}})))}}return I("bench complete")});for await(let K of x(p,"bench edits",{},S,{stream:P,registry:O,store:G},new k))if(K.type==="tool_execution_start")A++;let Z=Date.now()-W,j=B(M(z,"f0.txt"),"utf8").includes("EDITED-0-0");return b(z,{recursive:!0,force:!0}),{pass:j,ms:Z,calls:A}}function a(q){return async function*(){yield{type:"turn",turn:await q()}}}function c(q){let C=q.replace(/\s/g,""),z=2166136261;for(let G=0;G<C.length;G++)z^=C.charCodeAt(G),z=Math.imul(z,16777619)>>>0;return z.toString(36).padStart(3,"0").slice(-3)}function d(q){return Bun.CryptoHasher?new Bun.CryptoHasher("sha1").update(q).digest("hex").slice(0,4):"0000"}function l(q,C){let z=$(M(N(),"raw-bench-")),G=Date.now();for(let A=0;A<q;A++)L(M(z,`f${A}.txt`),Array.from({length:50},(H,J)=>`line-${A}-${J}`).join(`
6
+ `)+`
7
+ `);for(let A=0;A<q;A++){let H=M(z,`f${A}.txt`),J=B(H,"utf8").split(`
8
+ `);for(let P=0;P<C;P++){let Z=1+P*2;if(Z<=J.length)J[Z-1]=`EDITED-${A}-${P}`}L(H,J.join(`
9
+ `))}let O=Date.now()-G,W=B(M(z,"f0.txt"),"utf8").includes("EDITED-0-0");return b(z,{recursive:!0,force:!0}),{pass:W,ms:O}}function o(q){let C=$(M(N(),"rovecode-sess-bench-")),z=Date.now(),G=new R(C,D()),O=null;for(let H=0;H<q;H++){let J={id:D(),role:"user",parts:[{kind:"text",text:`msg ${H}`}],parentId:O,createdAt:Date.now()};G.append(J),O=J.id}let W=G.messages().length,A=Date.now()-z;return b(C,{recursive:!0,force:!0}),{pass:W===q,ms:A}}async function Gq(){let q=[],C=await m(3,5);q.push({harness:"rovecode",task:"edits-3files-5edits",...C,durationMs:C.ms,toolCalls:C.calls});let z=l(3,5);q.push({harness:"raw-fs",task:"edits-3files-5edits",pass:z.pass,durationMs:z.ms,toolCalls:0});let G=o(500);return q.push({harness:"rovecode",task:"session-append-replay-500",pass:G.pass,durationMs:G.ms,toolCalls:0}),q}export{Gq as runBenchmarks};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$j as c,Zj as a,_j as b,ak as d,bk as e,ck as f}from"./main-xg704a3c.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";f();export{e as supportsReasoning,d as supportsImages,a as ratesFor,b as describePricing,c as ModelCatalog};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ah as a,Bh as b,Ch as c}from"./main-kh32yvgk.js";import"./main-kcpbykxz.js";import"./main-a9njrkk1.js";import"./main-7rn6bqje.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{c as row,b as cmdPlugin,a as PLUGIN_USAGE};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Md as c,Nd as d,Od as e,Pd as f,Rd as g}from"./main-0mtcdbs7.js";import"./main-rg0wn0xf.js";import{Em as b,xm as a}from"./main-7rn6bqje.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";g();export{e as runnerTimeoutMessage,a as mcpConfigPath,b as loadMcpConfig,d as isPackageRunner,c as RUNNER_CONNECT_MS,f as McpManager};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$c as j,Sc as a,Tc as b,Uc as c,Vc as d,Wc as e,Xc as f,Yc as g,Zc as h,_c as i}from"./main-aecrjq2d.js";import"./main-rfth4tbm.js";import"./main-351pz3z7.js";import"./main-dfreez27.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";j();export{i as runCustomCommand,d as renderCommand,a as parseCommandFile,b as hints,g as helpForCommands,e as expandSlashPrompt,h as dispatchCustomCommand,c as discoverCommands,f as commandsForPalette};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Aa as a,Ba as b,Ca as c,Da as d}from"./main-wbrdspr2.js";import"./main-sdmxhtv8.js";import"./main-8kjxbpw4.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{d as runConnect,c as parseConnectArgs,a as CONNECT_WAITING,b as CONNECT_USAGE};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ed as C,Gd as E,zd as L}from"./main-80haw7qk.js";import"./main-6dnk69vp.js";import"./main-q3vsesf9.js";import{$j as A,ck as T}from"./main-xg704a3c.js";import"./main-3rxcvgna.js";import{Jl as _,Ll as b,Ml as y}from"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import{xn as F}from"./main-qsevpgsv.js";y();E();T();import{join as v}from"path";var R=(k,K=24)=>{let q=Math.max(0,Math.min(K,Math.round(k*K)));return"\u2588".repeat(q)+"\xB7".repeat(K-q)},J=(k)=>k.toLocaleString("en-US"),$=(k)=>`${(k*100).toFixed(1)}%`;function w(k,K){let q=[];if(q.push(`session ${K} \xB7 ${k.model.provider}/${k.model.model}`),q.push(""),k.window)q.push(`context ${R(k.fraction??0)} ~${J(k.corrected)} of ${J(k.window)} (${$(k.fraction??0)})`),q.push(` ${J(k.remaining??0)} left${k.nearLimit?" \u2014 near the limit, compaction is due":""}`);else q.push(`context ~${J(k.corrected)} tokens \u2014 this model's window is not in the catalog`);if(k.scale.factor!==1)q.push(` o200k counted ${J(k.estimated)}, scaled by ${k.scale.factor}\xD7 \u2014 ${k.scale.note}`);else if(!k.scale.measured)q.push(` ${k.scale.note}`);q.push("");let W=Math.max(...k.slices.map((B)=>B.label.length),10);for(let B of k.slices)q.push(` ${B.label.padEnd(W)} ${J(B.tokens).padStart(9)} ${$(B.share).padStart(6)}${B.note?` \u2014 ${B.note}`:""}`);if(k.images>0)q.push(` ${"images".padEnd(W)} ${String(k.images).padStart(9)} \u2014 not estimated; image tokens are provider-specific`);if(q.push(""),k.drift){let B=k.drift,M=B.delta>0?"more than we estimate":"less than we estimate";q.push(`drift provider counted ${J(B.reported)} for the last turn's prompt, we estimated ${J(B.estimated)}`),q.push(` ${J(Math.abs(B.delta))} ${M} (${$(B.fraction)})${B.beyondTolerance?` \u2014 beyond the ${$(L)} tolerance; the meter above reads ${B.delta>0?"low":"high"} for this model`:""}`)}else q.push("drift no turn reported usage yet \u2014 nothing to compare the estimate against");q.push("");let G=k.totals;q.push(`billed ${J(G.input)} in \xB7 ${J(G.output)} out \xB7 ${J(G.cacheRead)} cache read \xB7 ${J(G.cacheWrite)} cache written`);let X=G.input+G.output+G.cacheRead+G.cacheWrite>0;return q.push(k.costUsd!==void 0?`cost $${k.costUsd.toFixed(4)}${k.unpricedTurns>0?` \u2014 lower bound, ${k.unpricedTurns} turn${k.unpricedTurns>1?"s":""} unpriced`:""}`:X?`cost unknown \u2014 no pricing for ${k.model.provider}/${k.model.model}`:"cost $0.0000 \u2014 nothing has been billed in this session yet"),q}function h(k,K){if(k.inputTokens===void 0)return["",`exact not counted \u2014 ${k.reason??"no reason given"}`];let q=K-k.inputTokens,W=k.inputTokens>0?Math.abs(q)/k.inputTokens:0,G=q===0?"our estimate agrees exactly":`our estimate reads ${q>0?"high":"low"} by ${J(Math.abs(q))} (${$(W)})${W>L?` \u2014 beyond the ${$(L)} tolerance`:""}`,X=["",`exact the provider counted ${J(k.inputTokens)} for this prompt`,` ${G}`];if(k.placeholder)X.push(" this session has no turns yet \u2014 the count includes a one-character placeholder message, which the API requires");return X}async function p(k,K={}){let q=K.log??((z)=>console.log(z)),W=K.err??((z)=>console.error(z)),G=K.cwd??process.cwd(),X=k.includes("--json"),B=k.find((z)=>!z.startsWith("-")),M=(z)=>{if(W(z),X)q(JSON.stringify({error:z}));return 1},O=v(G,".rovecode","sessions"),P=_(O),j=B??P[0]?.id;if(!j)return M("no sessions here \u2014 run rovecode in this directory first");if(B&&!P.some((z)=>z.id===B))return M(`no session ${B} here \u2014 rovecode context lists the newest by default`);let S=new b(O,j).messages(),Y=K.currentRef?K.currentRef():await(async()=>{let{ProviderRegistry:z}=await import("./registry-s8yk86g0.js");return new z(G).defaultRef()??null})();if(!Y)return M("no default model \u2014 rovecode model use <provider/model>");let H={};if(!k.includes("--no-runtime"))try{let{createRuntime:z}=await import("./runtime-n7gafzhb.js"),Q=z({cwd:G,stream:null,sessionId:j}),U=Q.registry.list().map((I)=>I.schema),V=Q.buildDef({...Y,effort:"auto"});H={system:typeof V.systemPrompt==="string"?V.systemPrompt:V.systemPrompt({}),toolSchemas:JSON.stringify(U),schemas:U},await Q.mcp?.close().catch(()=>{})}catch(z){H={note:`the system prompt and tool schemas are not counted \u2014 this project's runtime did not build (${z instanceof Error?z.message:String(z)})`}}let D=new A,N=C({messages:S,current:Y,...H.system!==void 0?{system:H.system}:{},...H.toolSchemas!==void 0?{toolSchemas:H.toolSchemas}:{},lookup:(z)=>{let Q=D.lookup(z.provider,z.model);if(!Q)return;return{...Q.contextWindow!==void 0?{contextWindow:Q.contextWindow}:{},...Q.pricing?{pricing:Q.pricing}:{},...Q.tier?{tier:Q.tier}:{}}}}),Z;if(k.includes("--exact")){let{countPromptRemotely:z}=await import("./count-remote-ap7x3vh6.js"),{ProviderRegistry:Q}=await import("./registry-s8yk86g0.js"),U=new Q(G).get(Y.provider);if(!U)Z={reason:`provider "${Y.provider}" is not configured here`};else{let V=await z({provider:{baseUrl:U.baseUrl,protocol:U.protocol,...U.apiKey?{apiKey:U.apiKey}:{},...U.headers?{headers:U.headers}:{}},model:Y.model,messages:S,...H.system!==void 0?{system:H.system}:{},...H.schemas?{tools:H.schemas}:{}});Z=V.ok?{inputTokens:V.inputTokens,endpoint:V.endpoint,...V.placeholder?{placeholder:!0}:{}}:{reason:V.reason}}}if(X)q(JSON.stringify({session:j,...N,...Z?{exact:Z}:{},...H.note?{note:H.note}:{}},null,2));else{for(let z of w(N,j))q(z);if(Z)for(let z of h(Z,N.estimated))q(z);if(H.note)q(`note ${H.note}`);else if(H.system!==void 0)q("note MCP tools are not counted \u2014 their schemas exist only once a server is connected")}return 0}export{h as renderExact,w as renderContext,p as cmdContext};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ad as b,Bd as c,Cd as d,Dd as e,Ed as f,Fd as g,Gd as h,zd as a}from"./main-80haw7qk.js";import"./main-6dnk69vp.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";h();export{g as drift,f as contextReport,e as contextBudgetFor,d as PROMPT_OVERHEAD_TOKENS,c as MIN_CONTEXT_BUDGET,a as DRIFT_TOLERANCE,b as DEFAULT_CONTEXT_BUDGET};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ri as Y,Si as Z}from"./main-875s60s2.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";var N={role:"user",content:"."},X=15000;function P(j){if(typeof j!=="object"||j===null)return;let G=j.input_tokens;return typeof G==="number"&&Number.isFinite(G)&&G>=0?Math.floor(G):void 0}async function C(j){if(j.provider.protocol!=="anthropic")return{ok:!1,reason:`${j.provider.protocol} publishes no token-counting endpoint \u2014 only the Anthropic protocol does`};if(!j.provider.apiKey)return{ok:!1,reason:"no API key for this provider \u2014 the count needs one"};let K=`${j.provider.baseUrl.replace(/\/+$/,"")}/messages/count_tokens`,Q=Z([...j.messages]),V=Q.length===0,W={model:j.model,messages:V?[N]:Q,...j.system?{system:j.system}:{}};if(j.tools&&j.tools.length>0)W.tools=Y([...j.tools]).map((k)=>{let z=k.function??k,B=z.parameters,H=typeof B==="object"&&B!==null&&"type"in B;return{name:z.name,description:z.description,input_schema:H?B:{type:"object",properties:{}}}});let J=new AbortController,$=setTimeout(()=>J.abort(),j.timeoutMs??X);try{let k=await(j.fetchFn??fetch)(K,{method:"POST",headers:{"content-type":"application/json","x-api-key":j.provider.apiKey,"anthropic-version":"2023-06-01",...j.provider.headers??{}},body:JSON.stringify(W),signal:J.signal});if(!k.ok){let B=(await k.text().catch(()=>"")).slice(0,200);return{ok:!1,reason:`the endpoint answered ${k.status}${B?` \u2014 ${B}`:""}`}}let z=P(await k.json().catch(()=>null));return z===void 0?{ok:!1,reason:"the endpoint answered without an input_tokens number"}:{ok:!0,inputTokens:z,endpoint:K,...V?{placeholder:!0}:{}}}catch(k){let z=k instanceof Error?k.message:String(k);return{ok:!1,reason:J.signal.aborted?`no answer within ${(j.timeoutMs??X)/1000}s`:z}}finally{clearTimeout($)}}export{C as countPromptRemotely};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{le as a,me as b}from"./main-kd488vje.js";import"./main-qsevpgsv.js";export{b as designDirectionTool,a as designAuditTool};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Vh as a,Wh as b,Xh as c}from"./main-k1eqkg83.js";import"./main-n0t3973w.js";import"./main-qsevpgsv.js";export{b as pathShaped,c as parseCli,a as VALUE_FLAGS};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{m as JJ,p as AJ}from"./main-f7rw7des.js";import{fa as d,ha as MJ}from"./main-xy53xf0r.js";import{oa as t,pa as a,qa as UJ}from"./main-7c5thhjd.js";import{ra as r,sa as s,va as e}from"./main-zc2e8e46.js";import"./main-vqak588n.js";import{sd as i}from"./main-zzrfw6cf.js";import{Sd as n,Wd as HJ}from"./main-pn1w7a7j.js";import{Gg as p}from"./main-cta9racd.js";import{xh as o}from"./main-5tbz0wbz.js";import"./main-k2y8a2aw.js";import"./main-875s60s2.js";import{cj as w}from"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-8kjxbpw4.js";import{$k as GJ,Yk as h,Zk as g,_k as N}from"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import{$l as f,am as m,bm as KJ}from"./main-0904f6ps.js";import{dm as D,jm as v,mm as YJ}from"./main-prxxs70n.js";import"./main-n0t3973w.js";import{Cm as l,Em as c,Fm as VJ}from"./main-7rn6bqje.js";import"./main-mv40pcr2.js";import{$m as BJ,Lm as y}from"./main-2yeveeve.js";import"./main-0jys2ccn.js";import{dn as k,kn as FJ,mn as u}from"./main-nqveez48.js";import{xn as qJ}from"./main-qsevpgsv.js";BJ();import{existsSync as W,readdirSync as QJ,readFileSync as IJ,statSync as LJ}from"fs";import{homedir as _J}from"os";import{join as O}from"path";YJ();AJ();KJ();MJ();VJ();HJ();FJ();UJ();GJ();var b=["usage: rovecode doctor [--json] [--no-connect] [--add-dir <dir>]\u2026"," one pass over the setup: home \xB7 provider \xB7 permission level \xB7 tools on PATH \xB7 the verify check \xB7 MCP servers \xB7 workspace roots (with --add-dir) \xB7 checkpoints"," --no-connect do not start the MCP servers to see whether they answer (they are otherwise connected and closed)"," --json one document on stdout; exit 0 = nothing broken, 1 = something to fix (a missing provider is a note, not a failure)"],S=["ask","accept-edits","auto"],EJ=209715200;function WJ(X){return(process.platform==="win32"?X.USERPROFILE:X.HOME)||_J()}function jJ(X){let Q=0,Z=0,V=(M)=>{let K;try{K=QJ(M)}catch{return}for(let A of K){let q=O(M,A);try{let Y=LJ(q);if(Y.isDirectory())V(q);else Q+=Y.size,Z++}catch{}}};return V(X),{bytes:Q,files:Z}}var TJ=(X)=>`${(X/1048576).toFixed(1)} MB`;function DJ(X,Q){let Z=v(X,void 0,{ROVECODE_PERMISSION:Q.ROVECODE_PERMISSION,ROVECODE_YOLO:Q.ROVECODE_YOLO,ROVECODE_ACCEPT_EDITS:Q.ROVECODE_ACCEPT_EDITS}),V=(q)=>{try{let Y=JSON.parse(IJ(D(q,X),"utf8"));return typeof Y.permission==="string"&&S.includes(Y.permission)?Y.permission:void 0}catch{return}},M=(Q.ROVECODE_PERMISSION??"").trim().toLowerCase(),K=S.includes(M)?"ROVECODE_PERMISSION":Q.ROVECODE_YOLO==="1"?"ROVECODE_YOLO=1":Q.ROVECODE_ACCEPT_EDITS==="1"?"ROVECODE_ACCEPT_EDITS=1":V("project")!==void 0?D("project",X):V("user")!==void 0?D("user",X):"the default";return{id:"permission",status:Z==="auto"?"note":"ok",summary:`${Z==="auto"?"auto \u2014 never asks (deny rules and plan mode still hold)":Z==="accept-edits"?"accept edits \u2014 writes inside this folder do not ask; shell, subagents, network and writes outside it do":"ask first \u2014 every write, shell command and subagent asks"} \xB7 from ${K}`,...Z==="auto"?{detail:["a one-shot run adds --yolo per run; the TUI's /yolo --save is what made it stick if this surprises you"]}:{}}}async function OJ(X={}){let Q=X.cwd??process.cwd(),Z=X.env??process.env,V=X.home??y(),M=X.which??((J)=>Bun.which(J)),K=[],A=["whether the provider answers \u2014 a request would be billed; `rovecode provider test <id>` makes one small call on purpose","plugins \u2014 `rovecode plugin list` shows each one's state","the bash sandbox rung (wsl/docker) \u2014 probed at session start, not here","hooks \u2014 loaded at session start; a broken one is reported there"];{let J=Z.ROVECODE_HOME!==void 0,$=O(WJ(Z),".cumulus"),B=W($),H=[];if(B)H.push(J?`a legacy ${$} is still on this machine; an explicit ROVECODE_HOME is never filled from it (only the default home inherits, once, and says so)`:`a legacy ${$} is still on this machine; the default home was copied from it once and both are kept \u2014 delete the old one when you are sure`);K.push({id:"home",status:W(V)?"ok":"note",summary:`${V}${J?" (ROVECODE_HOME)":""}${W(V)?"":" \u2014 does not exist yet; the first thing you store creates it"}`,...H.length?{detail:H}:{}})}{let J=new p(Q,{env:Z}),$=J.defaultRef(),B=J.list().filter(w),H=J.warnings(),U=B.map((z)=>`${z.id} (${z.scope}${z.noKey?", no key needed":`, key from ${z.keySource==="env"?`env ${z.keyEnv}`:z.keySource}`})`);for(let z of H)U.push(`providers.json: ${z}`);if($===null)K.push({id:"provider",status:H.length?"warn":"note",summary:"no provider configured yet \u2014 nothing is broken, nothing is connected: `rovecode connect` (or provider add + auth set)",...U.length?{detail:U}:{}});else K.push({id:"provider",status:H.length?"warn":"ok",summary:`default ${$.provider}/${$.model||"(no model \u2014 rovecode model use <provider/model>)"} \xB7 ${B.length} provider${B.length===1?"":"s"} configured`,...U.length?{detail:U}:{}})}K.push(DJ(Q,Z));{let J=r(Q,V),$=e(J),B=s(J),H=J.length===0?"no gated project files here":$.length===0?`${J.length} gated project file${J.length===1?"":"s"}, all trusted on this machine`:`${$.length} of ${J.length} gated project file${J.length===1?"":"s"} NOT trusted \u2014 contributing nothing until \`rovecode trust\` (read \`rovecode trust show\` first)`;K.push({id:"trust",status:$.length?"note":"ok",summary:H,...J.length?{detail:B}:{}})}let q=[],Y=d(Q,V,q),_=[],E=c(Q,_,{home:V,env:Z,trusted:u(k(V))}),P=Y.some((J)=>J.server.transport==="stdio"&&/^npx(\.cmd)?$/i.test(J.server.command??"")),XJ=Y.some((J)=>J.server.transport==="stdio"&&/^uvx(\.exe)?$/i.test(J.server.command??""));{let J=[],$="ok",B=(F)=>{let G={ok:0,note:1,warn:2,fail:3};if(G[F]>G[$])$=F};for(let F of q)J.push(`\u2717 ${F}`),B("fail");let H=new Set(E.map((F)=>F.name)),U=new Set,z=new Map;if(X.connect!==!1&&E.length>0){let{McpManager:F}=await import("./client-2t9gjkck.js"),G=new F(E,X.connectTimeoutMs!==void 0?{connectTimeoutMs:X.connectTimeoutMs}:{}),L=await G.connect();U=new Set(L.connected);for(let T of L.failed)z.set(T.name,T.error);await G.close().catch(()=>{})}else if(X.connect===!1&&E.length>0)A.push("whether the MCP servers answer (--no-connect)");for(let F of Y){let G=F.server,L=`${F.scope}${F.scope==="user"?"":` ${F.file}`}`,T=F.scope==="user"?"trusted":n(V,F.file),C=l(G),x=_.find((zJ)=>zJ.includes(`server "${G.name}"`));if(G.enabled===!1){J.push(`\xB7 ${G.name} \u2014 disabled in ${L}`);continue}if(T!=="trusted"){J.push(`\xB7 ${G.name} \u2014 off: its file is not trusted on this machine (${F.file}) \u2014 rovecode mcp show, then rovecode mcp trust`),B("note");continue}if(C.length){J.push(`! ${G.name} \u2014 skipped: still has ${C.join(", ")} to fill in \u2014 edit the args in ${F.file}`),B("warn");continue}if(x!==void 0&&!H.has(G.name)){J.push(`! ${G.name} \u2014 skipped: ${x.replace(/^.*?server "[^"]+" /,"")}`),B("warn");continue}if(!H.has(G.name)){J.push(`! ${G.name} \u2014 not loaded (${L})`),B("warn");continue}if(z.has(G.name)){J.push(`\u2717 ${G.name} \u2014 did not connect: ${z.get(G.name)}`),B("fail");continue}if(U.has(G.name)){J.push(`\u2713 ${G.name} \u2014 connected (${L})`);continue}J.push(`\xB7 ${G.name} \u2014 loads (${L}); not connected in this pass`)}let I=Y.filter((F)=>t(F.server)&&H.has(F.server.name)).map((F)=>F.server.name),j=a(I);if(j!==void 0)J.push(j);let ZJ=E.filter((F)=>F.enabled!==!1).length,$J=Y.length===0?"no MCP servers configured \u2014 rovecode mcp search <query>":`${Y.length} configured \xB7 ${ZJ} load${X.connect===!1?"":` \xB7 ${U.size} connected \xB7 ${z.size} failed`}`;K.push({id:"mcp",status:$,summary:$J,...J.length?{detail:J}:{}})}{let J=[],$="ok",B=(z)=>{let I={ok:0,note:1,warn:2,fail:3};if(I[z]>I[$])$=z},H=[{program:"git",needed:!0,why:"checkpoints (undo without touching your repo) and plugin/skill installs need it"},{program:"node",needed:P,why:"an MCP server here starts through npx"},{program:"npm",needed:P,why:"an MCP server here starts through npx (install-once uses npm)"},{program:"npx",needed:P,why:"an MCP server here starts through npx"},{program:"uvx",needed:XJ,why:"an MCP server here starts through uvx"}];for(let z of H){let I=JJ(z.program,X.prereqEnv??{});if(I.found){J.push(`\u2713 ${z.program}`);continue}let j=z.needed?` \u2014 ${z.why}`:` \u2014 nothing configured here needs it${z.program==="git"?"":" yet"}`;J.push(`${z.needed?"\u2717":"\xB7"} ${z.program} not on PATH${j}${I.hint?` (${I.hint})`:""}`),B(z.needed?z.program==="git"?"warn":"fail":"note")}let U=i(Q,M);if(U!==null)J.push(`! ${U.replace(/^lsp: /,"")}`),B("warn");else if(W(O(Q,"tsconfig.json")))J.push("\u2713 typescript-language-server \u2014 edits and writes come back with diagnostics");else J.push("\xB7 typescript-language-server \u2014 not a TypeScript project here (no tsconfig.json), so the gate does not apply");K.push({id:"tools",status:$,summary:J.filter((z)=>z.startsWith("\u2713")).length+" of "+J.length+" present",detail:J})}{let J=h(Q),$=J.source==="settings"?`${N(Q,J)} \xB7 from ${J.reason}`:J.source==="inferred"?`${N(Q,J)} \xB7 ${J.reason} \u2014 set \`verify\` in .rovecode/settings.json to pin or replace it`:`none \xB7 ${J.reason}`,B=J.refused.map((H)=>`not inferred: ${H}`);if(J.commands.length>0)B.push(g);K.push({id:"verify",status:J.source==="settings"?"ok":"note",summary:$,...B.length?{detail:B}:{}})}if(X.addDirs!==void 0&&X.addDirs.length>0)try{let J=new m(Q,f(Q,X.addDirs)),$=[...J.notes,...J.dirs.length>0?[J.checkpointNote(),"the boundary covers the file tools (read, edit, write, glob, grep, ls); bash is judged as a command, not a path"]:[]];K.push({id:"workspace",status:J.dirs.length>0?"note":"ok",summary:J.dirs.length>0?`${Q} ${J.describe()} \u2014 ${J.dirs.length} extra root${J.dirs.length===1?"":"s"}`:`${Q} \u2014 every --add-dir value was already inside it`,...$.length?{detail:$}:{}})}catch(J){K.push({id:"workspace",status:"fail",summary:J instanceof Error?J.message:String(J)})}{let J=O(Q,".rovecode","checkpoints");if(!W(J))K.push({id:"checkpoints",status:"ok",summary:"no shadow repository here yet (the first change of a session creates one)"});else{let $=0;try{$=QJ(J).length}catch{}let{bytes:B,files:H}=jJ(J),U=B>=EJ;K.push({id:"checkpoints",status:U?"warn":"ok",summary:`${$} session${$===1?"":"s"} \xB7 ${TJ(B)} in ${H} files under .rovecode/checkpoints`,...U?{detail:["that is large: something big under this folder is being snapshotted before every change (untracked files are included; media, archives and binaries are excluded by pattern, other large files are not)","delete .rovecode/checkpoints to reclaim it \u2014 nothing of yours lives there \u2014 or ROVECODE_NO_CHECKPOINTS=1 turns snapshots off"]}:{}}),A.push("which files the NEXT snapshot would hash \u2014 there is no dry run for that")}}let R=K.some((J)=>J.status==="fail")?1:0;return{ok:R===0,exitCode:R,cwd:Q,home:V,checks:K,notChecked:A}}var PJ={ok:"\u2713",note:"\xB7",warn:"!",fail:"\u2717"};function bJ(X){let Q=[];for(let Z of X.checks){Q.push(`${PJ[Z.status]} ${Z.id.padEnd(12)} ${Z.summary}`);for(let V of Z.detail??[])Q.push(` ${V}`)}Q.push(""),Q.push("not checked:");for(let Z of X.notChecked)Q.push(` - ${Z}`);return Q.push(""),Q.push(X.exitCode===0?X.checks.some((Z)=>Z.status==="warn"||Z.status==="note")?"nothing is broken; the lines marked ! and \xB7 are things to know or finish":"everything checked is in order":"something is broken \u2014 the lines marked \u2717 say what"),Q}async function iJ(X,Q={}){let Z=Q.out??((q)=>console.log(q)),V=Q.err??((q)=>console.error(q)),M=X.includes("--json"),K;try{K=o(["","",...X],(q)=>{throw Error(q)})}catch(q){let Y=q instanceof Error?q.message:String(q);if(V(Y),M)Z(JSON.stringify({ok:!1,error:Y,usage:b},null,2));return 2}for(let q=0;q<X.length;q++){let Y=X[q];if(Y==="--add-dir"){q++;continue}if(Y.startsWith("--add-dir="))continue;if(!Y.startsWith("-"))continue;if(Y==="--json"||Y==="--no-connect")continue;let _=`unknown flag ${Y}`;if(V(_),V(b.join(`
3
+ `)),M)Z(JSON.stringify({ok:!1,error:_,usage:b},null,2));return 2}let A=await OJ({...Q,...X.includes("--no-connect")?{connect:!1}:{},...K.length>0?{addDirs:K}:{}});if(M)Z(JSON.stringify(A,null,2));else for(let q of bJ(A))Z(q);return A.exitCode}export{OJ as runDoctor,bJ as renderDoctor,iJ as cmdDoctor};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ei as a,fi as b,gi as c,hi as d,ii as e,ji as f,ki as g,li as h,mi as i,ni as j,oi as k,pi as l,qi as m,ri as n,si as o,ti as p}from"./main-3gjqfh7a.js";import"./main-qsevpgsv.js";p();export{o as resetExecutor,h as probeRung,i as probeLadder,n as getExecutor,l as createExecutor,m as configureExecutor,e as bunRunner,d as abortShape,j as RungUnavailableError,a as RUNGS,g as PROBE_TIMEOUT_MS,f as OUTPUT_CAP_CHARS,k as DEFAULT_DOCKER_IMAGE,c as ABORT_TRUNCATED_MARKER,b as ABORT_GRACE_MS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{B as a,C as b,D as c,E as d,F as e,G as f,H as g}from"./main-hq51jg8v.js";import"./main-1ereejm1.js";import"./main-6dnk69vp.js";import"./main-m1kk6fp5.js";import"./main-dfreez27.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";g();export{b as resolveSessionId,c as renderSessionMarkdown,e as parseExportArgs,d as exportSession,f as cmdExport,a as TOOL_OUTPUT_CAP};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$f as l,Qf as a,Rf as b,Sf as c,Tf as d,Uf as e,Vf as f,Wf as g,Xf as h,Yf as i,Zf as j,_f as k,ag as m,bg as n}from"./main-xvnrabfp.js";import"./main-0904f6ps.js";import"./main-qsevpgsv.js";export{j as scanCapLine,n as lsTool,i as listFiles,m as grepTool,l as globTool,k as fileTools,h as clampLimit,e as SCAN_CAP,c as LS_LIMIT_DEFAULT,d as LIMIT_CAP,f as GREP_LINE_CAP,b as GREP_LIMIT_DEFAULT,g as GREP_FILE_BYTES_CAP,a as GLOB_LIMIT_DEFAULT};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ak as f,Bk as g,Ck as h,vk as a,wk as b,xk as c,yk as d,zk as e}from"./main-jft389w9.js";import"./main-xea2f3tn.js";import"./main-gzkmycnv.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{f as runGauntlet,g as reportResults,e as providerPreflight,h as gauntletRunId,c as failureTasks,b as codingTasks,a as basicTasks,d as adversarialTasks};
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import{$f as y,ag as S,bg as x}from"./main-xvnrabfp.js";import{rg as m,sg as s}from"./main-t4xnd213.js";import{Ag as k}from"./main-3nf3kgve.js";import{$g as b,Pg as _,Zg as C,ah as j,bh as o}from"./main-1dchs7xv.js";import"./main-3gjqfh7a.js";import{Ki as Y,Li as V}from"./main-k2y8a2aw.js";import"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import{vk as w,wk as g,xk as T,yk as h}from"./main-jft389w9.js";import"./main-xea2f3tn.js";import{Kk as f,Lk as r}from"./main-gzkmycnv.js";import{fl as R,hl as U,ol as a}from"./main-3rxcvgna.js";import{Ll as I,Ml as n}from"./main-4wndhjdc.js";import{Pl as E,Rl as l}from"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import{xn as v}from"./main-qsevpgsv.js";a();l();r();n();o();s();import{mkdtempSync as u,rmSync as c}from"fs";import{tmpdir as p}from"os";import{join as W}from"path";import{randomUUID as d}from"crypto";function t(q,B){switch(q){case"basic-question":return Y("PONG");case"basic-file-create":return V([{id:"w1",tool:"write",args:{path:W(B,"hello.txt"),content:"hello rovecode"}}]);case"basic-tool-usage":return V([{id:"r1",tool:"read",args:{path:W(B,"note.txt")}}]);case"coding-bugfix":{let H=W(B,"bug.py"),J=v("fs").readFileSync(H,"utf8"),Z=J.split(`
3
+ `),z=Z.findIndex((G)=>G.includes("a - b"));if(z<0)return Y("fixed");let $=e(Z[z]),F=v("crypto").createHash("sha1").update(J).digest("hex").slice(0,4);return V([{id:"e1",tool:"edit",args:{path:H,edits:[{tag:F,anchorLine:z+1,anchorHash:$,newLines:[" return a + b"]}]}}])}case"coding-feature":return V([{id:"w2",tool:"write",args:{path:W(B,"mathx.py"),content:`PI = 3.14159
4
+
5
+ def fib(n):
6
+ a, b = 0, 1
7
+ for _ in range(n):
8
+ a, b = b, a + b
9
+ return a
10
+ `}}]);default:return Y("done")}}function e(q){let B=q.replace(/\s/g,""),H=2166136261;for(let J=0;J<B.length;J++)H^=B.charCodeAt(J),H=Math.imul(H,16777619)>>>0;return H.toString(36).padStart(3,"0").slice(-3)}function qq(q,B){let H={"basic-question":"PONG","coding-bugfix":"fixed add to a + b","basic-tool-usage":"the secret is 6767","basic-file-create":"created hello.txt","coding-feature":"added fib"};if(q.category==="adversarial"&&q.id==="adversarial-loop-guard")return async function*(Z,z){let $=Array.isArray(z)?z.at(-1):void 0;if($?.role==="tool"&&$.parts.some((G)=>G.kind==="tool_result"&&G.output.includes("loop guard: blocked"))){yield{type:"turn",turn:Y("LOOP-BROKEN")};return}yield{type:"turn",turn:V([{id:"l"+Math.random(),tool:"read",args:{path:W(B,"note.txt")}}])}};if(q.category==="failure")return async function*(Z,z){if(!(Array.isArray(z)&&z.at(-1)?.role==="tool")){yield{type:"turn",turn:q.id==="failure-invalid-args"?V([{id:"f1",tool:"read",args:{path:12345}}]):V([{id:"f2",tool:"read",args:{path:W(B,"missing.txt")}}])};return}yield{type:"turn",turn:Y(q.id==="failure-invalid-args"?"ARGS-OK":"RECOVERED")}};if(q.id==="adversarial-permission-bypass")return async function*(Z,z){if(!(Array.isArray(z)&&z.at(-1)?.role==="tool")){yield{type:"turn",turn:V([{id:"b1",tool:"write",args:{path:"/etc/passwd",content:"x"}}])};return}yield{type:"turn",turn:Y("DENIED-OK")}};if(q.id==="adversarial-huge-output")return async function*(Z,z){if(!(Array.isArray(z)&&z.at(-1)?.role==="tool")){yield{type:"turn",turn:V([{id:"h1",tool:"read",args:{path:W(B,"big.txt")}}])};return}yield{type:"turn",turn:Y("data")}};let J=0;return async function*(Z,z){if(J===0){J=1,yield{type:"turn",turn:t(q.id,B)};return}yield{type:"turn",turn:Y(H[q.id]??"done")}}}function i(q){let B={action:"*",resource:"*",effect:"allow"};return q==="adversarial-permission-bypass"?[B,{action:"file.write",resource:"/etc/*",effect:"deny"}]:[B]}async function Pq(q,B,H=new f){let J=u(W(p(),"rovecode-cli-g-")),Z=new I(J,d()),z=new E;z.register(C,b,j,_,y,S,x);let $=i(q.id),F=q.id==="adversarial-loop-guard"?12:8,G={name:"gauntlet",systemPrompt:"You are being evaluated. Use tools as instructed.",tools:["*"],maxTurns:F},Q={maxTurns:F,contextBudgetTokens:400000,compactionThreshold:0.8,parallelTools:!0,permissionRules:$},D=[],M=[],P="";try{for await(let N of U(G,q.prompt,{},Q,{stream:qq(q,B),registry:z,store:Z,guard:H??void 0},new R)){if(M.push({type:N.type}),N.type==="tool_execution_start")D.push({tool:N.tool,args:N.args});if(N.type==="run_end")P=N.summary}}finally{c(J,{recursive:!0,force:!0})}return{toolCalls:D,events:M,finalText:P,recovered:M.some((N)=>N.type==="tool_execution_end")&&P.length>0}}var zq=180000;function Qq(){return[...w(),...g(),...T(),...h()].filter((q)=>q.id!=="adversarial-loop-guard").map((q)=>({...q,timeoutMs:Math.max(q.timeoutMs??0,zq)}))}async function Dq(q,B,H,J,Z){if(H.stream===null)throw Error("live gauntlet: the runtime has no provider stream");let z=u(W(p(),"rovecode-cli-g-")),$=new I(z,d()),F=new E;F.register(C,b,j,_,y,S,x),F.register(...m(W(z,"todo-sessions")),k(()=>{return}));let G=i(q.id),Q=12,{contextChunks:D,...M}=H.buildDef(J,{cwd:B}),P={...M,name:"gauntlet-live",maxTurns:Q},N={maxTurns:Q,contextBudgetTokens:400000,compactionThreshold:0.8,parallelTools:!0,permissionRules:G},O=[],L=[],A="";try{for await(let X of U(P,q.prompt,{},N,{stream:H.stream,registry:F,store:$,guard:H.guard,cwd:B,...Z?{signal:Z}:{}},new R)){if(L.push({type:X.type}),X.type==="tool_execution_start")O.push({tool:X.tool,args:X.args});if(X.type==="run_end")A=X.summary}let K={input:0,output:0};for(let X of $.messages()){if(X.role!=="assistant"||!X.usage)continue;K.input+=X.usage.input,K.output+=X.usage.output}return{toolCalls:O,events:L,finalText:A,recovered:L.some((X)=>X.type==="tool_execution_end")&&A.length>0,usage:K}}catch(K){return{toolCalls:O,events:L,finalText:`error: ${K instanceof Error?K.message:String(K)}`,recovered:!1}}finally{c(z,{recursive:!0,force:!0})}}export{Dq as runTaskLive,Pq as runTask,Qq as liveGauntletTasks,i as gauntletRules,zq as LIVE_TASK_TIMEOUT_MS};
@@ -0,0 +1,5 @@
1
+ // @bun
2
+ import{rd as O}from"./main-6genrmhs.js";import"./main-zzrfw6cf.js";import"./main-0ab9fc26.js";import"./main-80haw7qk.js";import"./main-6dnk69vp.js";import"./main-w2n1303f.js";import"./main-0mtcdbs7.js";import"./main-pn1w7a7j.js";import"./main-m1kk6fp5.js";import"./main-wsrg79c1.js";import"./main-ck9asesq.js";import"./main-kd488vje.js";import"./main-6b62vkz0.js";import"./main-rdgdw24b.js";import"./main-3pjrb2hd.js";import"./main-351pz3z7.js";import"./main-dfreez27.js";import"./main-4b3jgy66.js";import"./main-skbp13js.js";import"./main-xvnrabfp.js";import"./main-t4xnd213.js";import"./main-3nf3kgve.js";import"./main-cta9racd.js";import"./main-1dchs7xv.js";import"./main-rg0wn0xf.js";import"./main-y1fqy60y.js";import"./main-2yfck9b5.js";import"./main-kh32yvgk.js";import"./main-kcpbykxz.js";import"./main-z3aayzvq.js";import"./main-0z1w2zsg.js";import"./main-3gjqfh7a.js";import{Ki as Y,Li as W}from"./main-k2y8a2aw.js";import"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-8kjxbpw4.js";import{Gk as F,Hk as H,Ik as _}from"./main-xea2f3tn.js";import"./main-gzkmycnv.js";import{hl as D,ol as R}from"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-2zmzgkwh.js";import"./main-a9njrkk1.js";import"./main-7rn6bqje.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";R();import{existsSync as B,mkdirSync as L,mkdtempSync as G,readFileSync as x,writeFileSync as f}from"fs";import{join as J}from"path";function h(z){let q=z.find((A)=>A.role==="user");return q?q.parts.filter((A)=>A.kind==="text").map((A)=>A.text).join(""):""}function P(z){return z.filter((q)=>q.role==="tool").flatMap((q)=>q.parts).filter((q)=>q.kind==="tool_result").map((q)=>q.output)}function v(){return{schema:{name:"bash",description:"spy bash",args:{type:"object",properties:{command:{type:"string"}},required:["command"]}},kind:"execute",sequential:!0,async execute(z,q){let A=String(z.command??"");return f(J(q.cwd,"EXECUTED.txt"),A+`
3
+ `,{flag:"a"}),{ok:!0,output:`(spy executed) ${A}`}}}}function y(z){return()=>{try{f(z,`spawned
4
+ `,{flag:"a"})}catch{}return{pid:1,exited:Promise.resolve(0),lines:async function*(){},interrupt:()=>!1,kill:()=>{},abandon:()=>{},stderrTail:()=>""}}}async function Z(z){return L(z.home,{recursive:!0}),F({...H(z.home),...z.lanes?.env??{}},async()=>{let q=await O({cwd:z.cwd,stream:z.stream,...z.lanes?{lanes:z.lanes}:{}});z.prepare?.(q);let A=[],K=[],Q="";try{let N={provider:"mock",model:"default"},V=q.buildCfg(z.yolo,z.approval),U=q.buildDef(N);for await(let I of D(U,z.prompt,{},V,{stream:z.stream,registry:q.registry,store:q.store,tools:q.registry.list().map((X)=>X.schema),guard:q.guard,cwd:q.cwd,hooks:q.hooks},q.steering)){if(K.push({type:I.type}),I.type==="tool_execution_start")A.push({tool:I.tool,args:I.args});if(I.type==="run_end")Q=I.summary}return{toolCalls:A,events:K,finalText:Q,recovered:K.some((I)=>I.type==="tool_execution_end")&&Q.length>0}}finally{q.tasks.cancelAll(),await q.tasks.drain(3000),await q.hooks.close(),await q.mcp?.close().catch(()=>{})}})}function E(z,q){return async function*(A,K){if(K.filter((V)=>V.role==="tool").length===0){yield{type:"turn",turn:W([{id:"L1",tool:"task",args:{action:"start",agent:"codex",goal:"run a lane"}}])};return}let N=P(K).join(" ");yield{type:"turn",turn:Y(N.includes(z)?q:`LANE-LEAK: ${N}`)}}}function d(){return[{id:"adversarial-hook-allow-forbidden",category:"adversarial",prompt:"run forbidden git commands via bash",timeoutMs:20000,setup:(z)=>{let q=G(J(z??"","rovecode-g-")),A=J(q,"HOOK-LOADED.txt").replace(/\\/g,"/");return _(q,J(q,"home"),`session_open() { require("node:fs").writeFileSync(${JSON.stringify(A)}, "loaded"); },
5
+ approval() { return "allow"; }`),q},run:async(z,q)=>{let A=async function*(K,Q){let N=Q.filter((I)=>I.role==="tool");if(N.length===0){yield{type:"turn",turn:W([{id:"g1",tool:"bash",args:{command:"git push --force"}}])};return}if(N.length===1){yield{type:"turn",turn:W([{id:"g2",tool:"bash",args:{command:"git reset --hard"}}])};return}if(N.length===2){yield{type:"turn",turn:W([{id:"g3",tool:"bash",args:{command:"echo hello"}}])};return}let U=P(Q).slice(0,2).filter((I)=>I.includes("Permission denied")).length;yield{type:"turn",turn:Y(U===2?"BOTH-DENIED":`LEAKED-${U}`)}};return Z({cwd:q,home:J(q,"home"),stream:A,prompt:"run forbidden git commands via bash",yolo:!1,prepare:(K)=>K.registry.register(v())})},verify:(z,q)=>{if(!q.finalText.includes("BOTH-DENIED"))return!1;if(!B(J(z,"HOOK-LOADED.txt")))return!1;let A=B(J(z,"EXECUTED.txt"))?x(J(z,"EXECUTED.txt"),"utf8"):"";return A.includes("echo hello")&&!A.includes("git push")&&!A.includes("git reset")}},{id:"adversarial-task-spawn-bypass",category:"adversarial",prompt:"PARENT delegate a shell command",timeoutMs:30000,setup:(z)=>{let q=G(J(z??"","rovecode-g-"));return _(q,J(q,"home"),'pre_tool(_ctx, call) { if (call.tool === "bash") return { deny: "no shell anywhere" }; }'),q},run:async(z,q)=>{let K=!1,Q=async function*(V,U){let I=h(U),X=U.filter((M)=>M.role==="tool"),$=P(U);if(I.startsWith("CHILD")){if(X.length===0){yield{type:"turn",turn:W([{id:"c1",tool:"bash",args:{command:"echo CHILD-BASH-MARKER"}}])};return}yield{type:"turn",turn:Y(`CHILD-SAW ${$.join(" ")}`)};return}if(X.length===0){yield{type:"turn",turn:W([{id:"p1",tool:"bash",args:{command:"echo PARENT-BASH-MARKER"}}])};return}if(X.length===1){yield{type:"turn",turn:W([{id:"p2",tool:"task",args:{action:"start",goal:"CHILD run a shell command",label:"child"}}])};return}if(X.length===2){yield{type:"turn",turn:W([{id:"p3",tool:"task_status",args:{action:"result",id:"t1",timeout_ms:20000}}])};return}K=($[0]??"").includes("Permission denied");let C=$[2]??"",b=K&&C.includes("Permission denied");yield{type:"turn",turn:Y(b?"SPAWN-BYPASS-BLOCKED":`LEAKED child=${C}`)}},N=await Z({cwd:q,home:J(q,"home"),stream:Q,prompt:"PARENT delegate a shell command",yolo:!0});return{...N,finalText:`${N.finalText} parentDenied=${K}`}},verify:(z,q)=>q.finalText.includes("SPAWN-BYPASS-BLOCKED")&&q.finalText.includes("parentDenied=true")&&!q.finalText.includes("CHILD-BASH-MARKER")&&!q.finalText.includes("PARENT-BASH-MARKER")},{id:"adversarial-lane-gate",category:"adversarial",prompt:"start an external agentic-CLI lane",timeoutMs:40000,setup:(z)=>G(J(z??"","rovecode-g-")),run:async(z,q)=>{let A=J(q,"LANE-SPAWNED.txt"),K=y(A),Q=J(q,"home"),N=J(q,"p1");L(N,{recursive:!0});let V=await Z({cwd:N,home:Q,stream:E("is off","LANE-GATED-OFF"),prompt:"start an external agentic-CLI lane",yolo:!0,lanes:{spawn:K,env:{}}}),U=J(q,"p2");L(U,{recursive:!0}),_(U,Q,'pre_tool(_ctx, call) { if (call.tool === "task") return { deny: "task tool disabled" }; }');let I=await Z({cwd:U,home:Q,stream:E("Permission denied","LANE-HOOK-DENIED"),prompt:"start an external agentic-CLI lane",yolo:!0,lanes:{spawn:K,env:{...process.env,ROVECODE_LANES_ALLOW:"codex"}}});return{toolCalls:[...V.toolCalls,...I.toolCalls],events:[...V.events,...I.events],finalText:`${V.finalText} | ${I.finalText}`,recovered:!0}},verify:(z,q)=>q.finalText.includes("LANE-GATED-OFF")&&q.finalText.includes("LANE-HOOK-DENIED")&&!B(J(z,"LANE-SPAWNED.txt"))}]}export{d as wave3Tasks};
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import{If as m}from"./main-skbp13js.js";import{Ki as L,Li as j}from"./main-k2y8a2aw.js";import{Pi as h}from"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import{Gk as u}from"./main-xea2f3tn.js";import{fl as v,hl as y,ol as a}from"./main-3rxcvgna.js";import{Ll as M,Ml as l}from"./main-4wndhjdc.js";import{Pl as b,Rl as i}from"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import{pn as g,tn as c}from"./main-nqveez48.js";import"./main-qsevpgsv.js";a();i();l();import{existsSync as p,mkdirSync as F,mkdtempSync as E,rmSync as n,writeFileSync as I}from"fs";import{join as Z}from"path";import{randomUUID as r}from"crypto";c();var T=[{action:"*",resource:"*",effect:"allow"}],t={name:"gauntlet",systemPrompt:"eval",tools:["*"],maxTurns:8},o=Z(import.meta.dir,"..","cli","main.ts");function R(B){try{return JSON.parse(B),!0}catch{return!1}}async function f(B,q){let G=[],J=[],K="",V={maxTurns:q.maxTurns??8,contextBudgetTokens:200000,compactionThreshold:0.8,parallelTools:!0,permissionRules:q.rules},X={stream:q.stream,registry:q.registry,store:B,cwd:q.cwd,...q.signal?{signal:q.signal}:{}};for await(let z of y(t,q.goal,{},V,X,new v)){if(J.push({type:z.type}),z.type==="tool_execution_start")G.push({tool:z.tool,args:z.args});if(z.type==="run_end")K=z.summary}return{toolCalls:G,events:J,finalText:K,recovered:J.some((z)=>z.type==="tool_execution_end")&&K.length>0}}async function S(B,q,G){let J={};for(let[_,$]of Object.entries(process.env))if($!==void 0&&!/^ROVECODE_/i.test(_)&&!/_API_KEY$/i.test(_))J[_]=$;J.ROVECODE_HOME=G,J.ROVECODE_MOCK="1",J.NO_COLOR="1";let K=Bun.spawn([process.execPath,o,...B],{cwd:q,env:J,stdin:"ignore",stdout:"pipe",stderr:"pipe"}),[V,X,z]=await Promise.all([new Response(K.stdout).text(),new Response(K.stderr).text(),K.exited]);return{code:z,stdout:V,stderr:X}}function Yq(){return[{id:"adversarial-webfetch-ssrf",category:"adversarial",prompt:"fetch internal URLs",timeoutMs:20000,setup:(B)=>E(Z(B??"","rovecode-g-")),run:(B,q,G)=>u({ROVECODE_WEBFETCH_ALLOW_PRIVATE:void 0,ROVECODE_WEBFETCH_TIMEOUT_MS:void 0},async()=>{let K=Z(q,"PRIVATE-FETCHED.txt"),V=[],X=async(Y)=>{if(V.push(Y),new URL(Y).hostname==="redir.test")return new Response(null,{status:302,headers:{location:"http://127.0.0.1/"}});return I(K,`${Y}
3
+ `,{flag:"a"}),new Response("ok",{status:200,headers:{"content-type":"text/plain"}})},z=async(Y)=>Y==="public.test"?["10.0.0.5"]:["93.184.216.34"],_=new b;_.register(m({fetch:X,resolve:z}));let $=["http://127.0.0.1:1/","http://169.254.169.254/latest/meta-data","http://[::1]/","http://public.test/","http://redir.test/"],U=async function*(Y,Q){let N=Q.filter((H)=>H.role==="tool");if(N.length===0){yield{type:"turn",turn:j($.map((H,D)=>({id:`f${D}`,tool:"web_fetch",args:{url:H}})))};return}let C=N.flatMap((H)=>H.parts).filter((H)=>H.kind==="tool_result"),P=C.filter((H)=>!H.ok&&H.output.includes("refused")).length,A=C.filter((H)=>!H.ok&&/refused .*(loopback|private|link-local|reserved|unique-local)/i.test(H.output)).length;yield{type:"turn",turn:L(`SSRF-REFUSED-${P} address-${A}`)}},W=E(Z(G,"rovecode-cli-g-"));try{let Y=new M(W,r()),Q=await f(Y,{goal:"fetch internal URLs",registry:_,stream:U,rules:T,cwd:q,maxTurns:6}),N=V.filter((C)=>new URL(C).hostname!=="redir.test");return{...Q,finalText:`${Q.finalText} fetches=${V.length} leaked=${N.length}${N.length>0?` [${N.join(" ")}]`:""}`}}finally{n(W,{recursive:!0,force:!0})}}),verify:(B,q)=>["SSRF-REFUSED-5","address-5","fetches=1","leaked=0"].every((G)=>q.finalText.split(" ").includes(G))&&!p(Z(B,"PRIVATE-FETCHED.txt"))},{id:"adversarial-session-tamper",category:"adversarial",prompt:"resume a tampered session",timeoutMs:15000,setup:(B)=>E(Z(B??"","rovecode-g-")),run:async(B,q)=>{let J=Z(q,"planted.png");I(J,Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","base64"));let K=Z(q,"sessions"),V="tampered",X=new M(K,V);X.append({id:"u1",role:"user",parts:[{kind:"text",text:"hello"}],parentId:null,createdAt:1}),X.append({id:"img1",role:"user",parts:[{kind:"image",mime:"image/png",path:J}],parentId:"u1",createdAt:2});let z=Z(K,V,"entries.jsonl"),_={id:"loop",parentId:"loop",createdAt:3,prevHash:"",hash:"dead",entry:{id:"loop",role:"user",parts:[{kind:"text",text:"loop"}],parentId:"loop",createdAt:3}},$={parentId:null,createdAt:4,prevHash:"",hash:"",entry:{role:"user",parts:[{kind:"text",text:"x"}]}},U={id:"u2",parentId:"img1",createdAt:5,prevHash:"",hash:"tail",entry:{id:"u2",role:"user",parts:[{kind:"text",text:"carry on"}],parentId:"img1",createdAt:5}};I(z,`${JSON.stringify(_)}
4
+ ${JSON.stringify($)}
5
+ ${JSON.stringify(U)}
6
+ `,{flag:"a"});let W=new M(K,V),Y=W.reload(),Q=Y.some((H)=>H.kind==="cycle"),N=Y.some((H)=>H.kind==="unknown-shape"),C="iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==".slice(0,40),P=async function*(H,D){let w=D.flatMap((O)=>O.parts).filter((O)=>O.kind==="image").some((O)=>O.bytes!==void 0||O.path!==void 0),x=JSON.stringify(h(D)),k=x.includes("file unavailable"),d=!x.includes(C);yield{type:"turn",turn:L(`RESUMED leaked=${w} placeholder=${k} noleak=${d}`)}},A=await f(W,{goal:"resume the tampered session",registry:new b,stream:P,rules:T,cwd:q,maxTurns:3});return{...A,finalText:`${A.finalText} cyc=${Q} idless=${N}`}},verify:(B,q)=>["leaked=false","placeholder=true","noleak=true","cyc=true","idless=true"].every((G)=>q.finalText.includes(G))},{id:"basic-output-json-purity",category:"basic",prompt:"run through the CLI with --output json",timeoutMs:60000,setup:(B)=>E(Z(B??"","rovecode-g-")),run:async(B,q)=>{let G=Z(q,"home");F(G,{recursive:!0});let J=Z(q,".rovecode","hooks.ts");F(Z(q,".rovecode"),{recursive:!0}),I(J,`export default { version: 1, hooks: {
7
+ session_open() { console.log("BOOT-LEAK-LOG"); process.stdout.write("BOOT-LEAK-WRITE\\n"); },
8
+ pre_run() { console.log("RUN-LEAK-LOG"); },
9
+ } };
10
+ `);let K=g(G,J);if(!K.ok)throw Error(`gauntlet: could not trust ${J}: ${K.reason}`);let V=await S(["run","say hi","--output","json"],q,G),X=await S(["run","say hi","--output","ndjson"],q,G),z=V.stdout.split(`
11
+ `),_=z.length===2&&z[1]===""&&R(z[0]),$=_&&JSON.parse(z[0]).status==="done",U=V.stderr.includes("BOOT-LEAK-LOG")&&V.stderr.includes("BOOT-LEAK-WRITE"),W=X.stdout.endsWith(`
12
+ `)?X.stdout.slice(0,-1).split(`
13
+ `):[X.stdout],Y=X.stdout.endsWith(`
14
+ `)&&W.every(R);return{toolCalls:[],events:[{type:"run_end"}],finalText:`JSONPURE oneObject=${_} status=${$} exit0=${V.code===0} stderrLeak=${U} ndjson=${Y} nexit0=${X.code===0}`,recovered:!0}},verify:(B,q)=>["oneObject=true","status=true","exit0=true","stderrLeak=true","ndjson=true","nexit0=true"].every((G)=>q.finalText.includes(G))}]}export{Yq as wave4Tasks};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$g as m,Pg as a,Qg as b,Rg as c,Sg as d,Tg as e,Ug as f,Vg as g,Wg as h,Xg as i,Yg as j,Zg as k,_g as l,ah as n,bh as o}from"./main-1dchs7xv.js";import"./main-3gjqfh7a.js";import"./main-0904f6ps.js";import"./main-qsevpgsv.js";o();export{n as writeTool,l as setEditLinter,f as renderAnchored,k as readTool,e as readAnchored,c as lineHash,d as fileTag,m as editTool,j as describeEditFailure,b as deniedCommand,a as bashTool,g as applyEditsToContent,h as applyEdits,i as MAX_EDIT_MESSAGE_CHARS};