reasonix 0.49.0 → 0.50.0

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 (326) hide show
  1. package/dashboard/dist/app.css +1 -0
  2. package/dashboard/dist/app.js +28 -30531
  3. package/dashboard/dist/app.js.map +1 -1
  4. package/dashboard/dist/assets/KaTeX_AMS-Regular.ttf +0 -0
  5. package/dashboard/dist/assets/KaTeX_AMS-Regular.woff +0 -0
  6. package/dashboard/dist/assets/KaTeX_AMS-Regular.woff2 +0 -0
  7. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.ttf +0 -0
  8. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.woff +0 -0
  9. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.woff2 +0 -0
  10. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.ttf +0 -0
  11. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.woff +0 -0
  12. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.woff2 +0 -0
  13. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.ttf +0 -0
  14. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.woff +0 -0
  15. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.woff2 +0 -0
  16. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.ttf +0 -0
  17. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.woff +0 -0
  18. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.woff2 +0 -0
  19. package/dashboard/dist/assets/KaTeX_Main-Bold.ttf +0 -0
  20. package/dashboard/dist/assets/KaTeX_Main-Bold.woff +0 -0
  21. package/dashboard/dist/assets/KaTeX_Main-Bold.woff2 +0 -0
  22. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.ttf +0 -0
  23. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.woff +0 -0
  24. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.woff2 +0 -0
  25. package/dashboard/dist/assets/KaTeX_Main-Italic.ttf +0 -0
  26. package/dashboard/dist/assets/KaTeX_Main-Italic.woff +0 -0
  27. package/dashboard/dist/assets/KaTeX_Main-Italic.woff2 +0 -0
  28. package/dashboard/dist/assets/KaTeX_Main-Regular.ttf +0 -0
  29. package/dashboard/dist/assets/KaTeX_Main-Regular.woff +0 -0
  30. package/dashboard/dist/assets/KaTeX_Main-Regular.woff2 +0 -0
  31. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.ttf +0 -0
  32. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.woff +0 -0
  33. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.woff2 +0 -0
  34. package/dashboard/dist/assets/KaTeX_Math-Italic.ttf +0 -0
  35. package/dashboard/dist/assets/KaTeX_Math-Italic.woff +0 -0
  36. package/dashboard/dist/assets/KaTeX_Math-Italic.woff2 +0 -0
  37. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.ttf +0 -0
  38. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.woff +0 -0
  39. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.woff2 +0 -0
  40. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.ttf +0 -0
  41. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.woff +0 -0
  42. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.woff2 +0 -0
  43. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.ttf +0 -0
  44. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.woff +0 -0
  45. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.woff2 +0 -0
  46. package/dashboard/dist/assets/KaTeX_Script-Regular.ttf +0 -0
  47. package/dashboard/dist/assets/KaTeX_Script-Regular.woff +0 -0
  48. package/dashboard/dist/assets/KaTeX_Script-Regular.woff2 +0 -0
  49. package/dashboard/dist/assets/KaTeX_Size1-Regular.ttf +0 -0
  50. package/dashboard/dist/assets/KaTeX_Size1-Regular.woff +0 -0
  51. package/dashboard/dist/assets/KaTeX_Size1-Regular.woff2 +0 -0
  52. package/dashboard/dist/assets/KaTeX_Size2-Regular.ttf +0 -0
  53. package/dashboard/dist/assets/KaTeX_Size2-Regular.woff +0 -0
  54. package/dashboard/dist/assets/KaTeX_Size2-Regular.woff2 +0 -0
  55. package/dashboard/dist/assets/KaTeX_Size3-Regular.ttf +0 -0
  56. package/dashboard/dist/assets/KaTeX_Size3-Regular.woff +0 -0
  57. package/dashboard/dist/assets/KaTeX_Size4-Regular.ttf +0 -0
  58. package/dashboard/dist/assets/KaTeX_Size4-Regular.woff +0 -0
  59. package/dashboard/dist/assets/KaTeX_Size4-Regular.woff2 +0 -0
  60. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.ttf +0 -0
  61. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.woff +0 -0
  62. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.woff2 +0 -0
  63. package/dashboard/dist/assets/geist-cyrillic-400-normal.woff +0 -0
  64. package/dashboard/dist/assets/geist-cyrillic-400-normal.woff2 +0 -0
  65. package/dashboard/dist/assets/geist-cyrillic-500-normal.woff +0 -0
  66. package/dashboard/dist/assets/geist-cyrillic-500-normal.woff2 +0 -0
  67. package/dashboard/dist/assets/geist-cyrillic-600-normal.woff +0 -0
  68. package/dashboard/dist/assets/geist-cyrillic-600-normal.woff2 +0 -0
  69. package/dashboard/dist/assets/geist-cyrillic-700-normal.woff +0 -0
  70. package/dashboard/dist/assets/geist-cyrillic-700-normal.woff2 +0 -0
  71. package/dashboard/dist/assets/geist-cyrillic-ext-500-normal.woff +0 -0
  72. package/dashboard/dist/assets/geist-cyrillic-ext-600-normal.woff +0 -0
  73. package/dashboard/dist/assets/geist-cyrillic-ext-700-normal.woff +0 -0
  74. package/dashboard/dist/assets/geist-latin-400-normal.woff +0 -0
  75. package/dashboard/dist/assets/geist-latin-400-normal.woff2 +0 -0
  76. package/dashboard/dist/assets/geist-latin-500-normal.woff +0 -0
  77. package/dashboard/dist/assets/geist-latin-500-normal.woff2 +0 -0
  78. package/dashboard/dist/assets/geist-latin-600-normal.woff +0 -0
  79. package/dashboard/dist/assets/geist-latin-600-normal.woff2 +0 -0
  80. package/dashboard/dist/assets/geist-latin-700-normal.woff +0 -0
  81. package/dashboard/dist/assets/geist-latin-700-normal.woff2 +0 -0
  82. package/dashboard/dist/assets/geist-latin-ext-400-normal.woff +0 -0
  83. package/dashboard/dist/assets/geist-latin-ext-400-normal.woff2 +0 -0
  84. package/dashboard/dist/assets/geist-latin-ext-500-normal.woff +0 -0
  85. package/dashboard/dist/assets/geist-latin-ext-500-normal.woff2 +0 -0
  86. package/dashboard/dist/assets/geist-latin-ext-600-normal.woff +0 -0
  87. package/dashboard/dist/assets/geist-latin-ext-600-normal.woff2 +0 -0
  88. package/dashboard/dist/assets/geist-latin-ext-700-normal.woff +0 -0
  89. package/dashboard/dist/assets/geist-latin-ext-700-normal.woff2 +0 -0
  90. package/dashboard/dist/assets/geist-mono-cyrillic-400-normal.woff +0 -0
  91. package/dashboard/dist/assets/geist-mono-cyrillic-400-normal.woff2 +0 -0
  92. package/dashboard/dist/assets/geist-mono-cyrillic-500-normal.woff +0 -0
  93. package/dashboard/dist/assets/geist-mono-cyrillic-500-normal.woff2 +0 -0
  94. package/dashboard/dist/assets/geist-mono-cyrillic-600-normal.woff +0 -0
  95. package/dashboard/dist/assets/geist-mono-cyrillic-600-normal.woff2 +0 -0
  96. package/dashboard/dist/assets/geist-mono-latin-400-normal.woff +0 -0
  97. package/dashboard/dist/assets/geist-mono-latin-400-normal.woff2 +0 -0
  98. package/dashboard/dist/assets/geist-mono-latin-500-normal.woff +0 -0
  99. package/dashboard/dist/assets/geist-mono-latin-500-normal.woff2 +0 -0
  100. package/dashboard/dist/assets/geist-mono-latin-600-normal.woff +0 -0
  101. package/dashboard/dist/assets/geist-mono-latin-600-normal.woff2 +0 -0
  102. package/dashboard/dist/assets/geist-mono-latin-ext-400-normal.woff +0 -0
  103. package/dashboard/dist/assets/geist-mono-latin-ext-400-normal.woff2 +0 -0
  104. package/dashboard/dist/assets/geist-mono-latin-ext-500-normal.woff +0 -0
  105. package/dashboard/dist/assets/geist-mono-latin-ext-500-normal.woff2 +0 -0
  106. package/dashboard/dist/assets/geist-mono-latin-ext-600-normal.woff +0 -0
  107. package/dashboard/dist/assets/geist-mono-latin-ext-600-normal.woff2 +0 -0
  108. package/dashboard/dist/assets/geist-mono-symbols2-400-normal.woff +0 -0
  109. package/dashboard/dist/assets/geist-mono-symbols2-500-normal.woff +0 -0
  110. package/dashboard/dist/assets/geist-mono-symbols2-600-normal.woff +0 -0
  111. package/dashboard/dist/assets/geist-mono-vietnamese-400-normal.woff +0 -0
  112. package/dashboard/dist/assets/geist-mono-vietnamese-500-normal.woff +0 -0
  113. package/dashboard/dist/assets/geist-mono-vietnamese-600-normal.woff +0 -0
  114. package/dashboard/dist/assets/geist-vietnamese-400-normal.woff +0 -0
  115. package/dashboard/dist/assets/geist-vietnamese-500-normal.woff +0 -0
  116. package/dashboard/dist/assets/geist-vietnamese-600-normal.woff +0 -0
  117. package/dashboard/dist/assets/geist-vietnamese-600-normal.woff2 +0 -0
  118. package/dashboard/dist/assets/geist-vietnamese-700-normal.woff +0 -0
  119. package/dashboard/dist/assets/inter-cyrillic-400-normal.woff +0 -0
  120. package/dashboard/dist/assets/inter-cyrillic-400-normal.woff2 +0 -0
  121. package/dashboard/dist/assets/inter-cyrillic-500-normal.woff +0 -0
  122. package/dashboard/dist/assets/inter-cyrillic-500-normal.woff2 +0 -0
  123. package/dashboard/dist/assets/inter-cyrillic-600-normal.woff +0 -0
  124. package/dashboard/dist/assets/inter-cyrillic-600-normal.woff2 +0 -0
  125. package/dashboard/dist/assets/inter-cyrillic-700-normal.woff +0 -0
  126. package/dashboard/dist/assets/inter-cyrillic-700-normal.woff2 +0 -0
  127. package/dashboard/dist/assets/inter-cyrillic-ext-400-normal.woff +0 -0
  128. package/dashboard/dist/assets/inter-cyrillic-ext-400-normal.woff2 +0 -0
  129. package/dashboard/dist/assets/inter-cyrillic-ext-500-normal.woff +0 -0
  130. package/dashboard/dist/assets/inter-cyrillic-ext-500-normal.woff2 +0 -0
  131. package/dashboard/dist/assets/inter-cyrillic-ext-600-normal.woff +0 -0
  132. package/dashboard/dist/assets/inter-cyrillic-ext-600-normal.woff2 +0 -0
  133. package/dashboard/dist/assets/inter-cyrillic-ext-700-normal.woff +0 -0
  134. package/dashboard/dist/assets/inter-cyrillic-ext-700-normal.woff2 +0 -0
  135. package/dashboard/dist/assets/inter-greek-400-normal.woff +0 -0
  136. package/dashboard/dist/assets/inter-greek-400-normal.woff2 +0 -0
  137. package/dashboard/dist/assets/inter-greek-500-normal.woff +0 -0
  138. package/dashboard/dist/assets/inter-greek-500-normal.woff2 +0 -0
  139. package/dashboard/dist/assets/inter-greek-600-normal.woff +0 -0
  140. package/dashboard/dist/assets/inter-greek-600-normal.woff2 +0 -0
  141. package/dashboard/dist/assets/inter-greek-700-normal.woff +0 -0
  142. package/dashboard/dist/assets/inter-greek-700-normal.woff2 +0 -0
  143. package/dashboard/dist/assets/inter-greek-ext-400-normal.woff +0 -0
  144. package/dashboard/dist/assets/inter-greek-ext-400-normal.woff2 +0 -0
  145. package/dashboard/dist/assets/inter-greek-ext-500-normal.woff +0 -0
  146. package/dashboard/dist/assets/inter-greek-ext-500-normal.woff2 +0 -0
  147. package/dashboard/dist/assets/inter-greek-ext-600-normal.woff +0 -0
  148. package/dashboard/dist/assets/inter-greek-ext-600-normal.woff2 +0 -0
  149. package/dashboard/dist/assets/inter-greek-ext-700-normal.woff +0 -0
  150. package/dashboard/dist/assets/inter-greek-ext-700-normal.woff2 +0 -0
  151. package/dashboard/dist/assets/inter-latin-400-normal.woff +0 -0
  152. package/dashboard/dist/assets/inter-latin-400-normal.woff2 +0 -0
  153. package/dashboard/dist/assets/inter-latin-500-normal.woff +0 -0
  154. package/dashboard/dist/assets/inter-latin-500-normal.woff2 +0 -0
  155. package/dashboard/dist/assets/inter-latin-600-normal.woff +0 -0
  156. package/dashboard/dist/assets/inter-latin-600-normal.woff2 +0 -0
  157. package/dashboard/dist/assets/inter-latin-700-normal.woff +0 -0
  158. package/dashboard/dist/assets/inter-latin-700-normal.woff2 +0 -0
  159. package/dashboard/dist/assets/inter-latin-ext-400-normal.woff +0 -0
  160. package/dashboard/dist/assets/inter-latin-ext-400-normal.woff2 +0 -0
  161. package/dashboard/dist/assets/inter-latin-ext-500-normal.woff +0 -0
  162. package/dashboard/dist/assets/inter-latin-ext-500-normal.woff2 +0 -0
  163. package/dashboard/dist/assets/inter-latin-ext-600-normal.woff +0 -0
  164. package/dashboard/dist/assets/inter-latin-ext-600-normal.woff2 +0 -0
  165. package/dashboard/dist/assets/inter-latin-ext-700-normal.woff +0 -0
  166. package/dashboard/dist/assets/inter-latin-ext-700-normal.woff2 +0 -0
  167. package/dashboard/dist/assets/inter-vietnamese-400-normal.woff +0 -0
  168. package/dashboard/dist/assets/inter-vietnamese-400-normal.woff2 +0 -0
  169. package/dashboard/dist/assets/inter-vietnamese-500-normal.woff +0 -0
  170. package/dashboard/dist/assets/inter-vietnamese-500-normal.woff2 +0 -0
  171. package/dashboard/dist/assets/inter-vietnamese-600-normal.woff +0 -0
  172. package/dashboard/dist/assets/inter-vietnamese-600-normal.woff2 +0 -0
  173. package/dashboard/dist/assets/inter-vietnamese-700-normal.woff +0 -0
  174. package/dashboard/dist/assets/inter-vietnamese-700-normal.woff2 +0 -0
  175. package/dashboard/dist/vendor-icons.js +102 -0
  176. package/dashboard/dist/vendor-icons.js.map +1 -0
  177. package/dashboard/dist/vendor-katex.css +1 -0
  178. package/dashboard/dist/vendor-katex.js +258 -0
  179. package/dashboard/dist/vendor-katex.js.map +1 -0
  180. package/dashboard/dist/vendor-markdown.js +36 -0
  181. package/dashboard/dist/vendor-markdown.js.map +1 -0
  182. package/dashboard/dist/vendor-prism.js +15 -0
  183. package/dashboard/dist/vendor-prism.js.map +1 -0
  184. package/dashboard/dist/vendor-react.js +50 -0
  185. package/dashboard/dist/vendor-react.js.map +1 -0
  186. package/dashboard/index.html +4 -3
  187. package/dist/cli/{acp-WFQIC6SO.js → acp-6B25WIFF.js} +48 -49
  188. package/dist/cli/acp-6B25WIFF.js.map +1 -0
  189. package/dist/cli/chat-7WASPB4O.js +50 -0
  190. package/dist/cli/{chunk-QF32ROX2.js → chunk-3KRRTLC5.js} +955 -788
  191. package/dist/cli/chunk-3KRRTLC5.js.map +1 -0
  192. package/dist/cli/{chunk-TEDWJKEI.js → chunk-3RNFYDDM.js} +11 -27
  193. package/dist/cli/chunk-3RNFYDDM.js.map +1 -0
  194. package/dist/cli/{chunk-ZWHSHFDP.js → chunk-6IUMTRFP.js} +35 -7
  195. package/dist/cli/chunk-6IUMTRFP.js.map +1 -0
  196. package/dist/cli/{chunk-GNS7BAT2.js → chunk-7WITYWKN.js} +2 -2
  197. package/dist/cli/{chunk-HIYTRCSW.js → chunk-7YPMTE3U.js} +65 -28
  198. package/dist/cli/chunk-7YPMTE3U.js.map +1 -0
  199. package/dist/cli/{chunk-DFX5ZH5L.js → chunk-AAHB2PFX.js} +2 -2
  200. package/dist/cli/{chunk-PB3MAFEI.js → chunk-AJIZ5KFK.js} +3 -3
  201. package/dist/cli/{chunk-U5XQDCK7.js → chunk-ALCOQP6R.js} +10 -9
  202. package/dist/cli/chunk-ALCOQP6R.js.map +1 -0
  203. package/dist/cli/{chunk-6OWJV3YW.js → chunk-CAGKEGNE.js} +1 -2
  204. package/dist/cli/{chunk-JNTMOX7G.js → chunk-ENFBF6HI.js} +15 -3
  205. package/dist/cli/chunk-ENFBF6HI.js.map +1 -0
  206. package/dist/cli/{chunk-J2IHQGPQ.js → chunk-EZ57UEZQ.js} +2 -2
  207. package/dist/cli/{chunk-QX5TWXRZ.js → chunk-FQSQFCBI.js} +41 -2
  208. package/dist/cli/chunk-FQSQFCBI.js.map +1 -0
  209. package/dist/cli/{chunk-ZAEJWKXB.js → chunk-GMSAB2TC.js} +2 -2
  210. package/dist/cli/{chunk-MQWO32ZD.js → chunk-GPUH2BNM.js} +123 -286
  211. package/dist/cli/chunk-GPUH2BNM.js.map +1 -0
  212. package/dist/cli/{chunk-7AST3QQ3.js → chunk-I4Q3QT4W.js} +2 -2
  213. package/dist/cli/{chunk-O5LIHAMP.js → chunk-I6FBSTTR.js} +3 -3
  214. package/dist/cli/{chunk-AWEULQG6.js → chunk-IBRTU5WO.js} +25 -15
  215. package/dist/cli/{chunk-AWEULQG6.js.map → chunk-IBRTU5WO.js.map} +1 -1
  216. package/dist/cli/{chunk-RRXUIPWG.js → chunk-IK6WWRIX.js} +1 -1
  217. package/dist/cli/chunk-IK6WWRIX.js.map +1 -0
  218. package/dist/cli/{chunk-WMTMMSXU.js → chunk-MXWPAPZW.js} +315 -233
  219. package/dist/cli/chunk-MXWPAPZW.js.map +1 -0
  220. package/dist/cli/{chunk-7JTKBJ2G.js → chunk-NLRC3DWQ.js} +3 -3
  221. package/dist/cli/{chunk-PXBQ6IZ7.js → chunk-OPGWCKKU.js} +2 -2
  222. package/dist/cli/{chunk-23ZPCIPR.js → chunk-OWA42BKS.js} +21 -20
  223. package/dist/cli/chunk-OWA42BKS.js.map +1 -0
  224. package/dist/cli/{chunk-YEF7C4XI.js → chunk-PYIZZAVQ.js} +102 -94
  225. package/dist/cli/chunk-PYIZZAVQ.js.map +1 -0
  226. package/dist/cli/{chunk-EQATK2L2.js → chunk-SVD4UPRQ.js} +4 -3
  227. package/dist/cli/chunk-SVD4UPRQ.js.map +1 -0
  228. package/dist/cli/{chunk-PEMG6CUB.js → chunk-TX652NBA.js} +2 -2
  229. package/dist/cli/{chunk-W46ZMNKO.js → chunk-VVMY4M7J.js} +21 -2
  230. package/dist/cli/chunk-VVMY4M7J.js.map +1 -0
  231. package/dist/cli/{chunk-TAIKVL35.js → chunk-WSBFVOCO.js} +2 -2
  232. package/dist/cli/{chunk-ASOLXV67.js → chunk-X2BQZQEE.js} +3 -3
  233. package/dist/cli/{chunk-E5WCLUIU.js → chunk-XJZWMU5P.js} +2 -2
  234. package/dist/cli/{chunk-MGTBP7GG.js → chunk-XWPZHWC2.js} +20 -7
  235. package/dist/cli/chunk-XWPZHWC2.js.map +1 -0
  236. package/dist/cli/{chunk-JGTX4RRQ.js → chunk-ZAXMJANP.js} +2 -2
  237. package/dist/cli/{code-R4IHI7SR.js → code-TBK2TASK.js} +49 -57
  238. package/dist/cli/code-TBK2TASK.js.map +1 -0
  239. package/dist/cli/{commands-DRHFCYMO.js → commands-NXTKSQTN.js} +4 -4
  240. package/dist/cli/{commit-AG5KB4YP.js → commit-IR5SPP7A.js} +7 -8
  241. package/dist/cli/commit-IR5SPP7A.js.map +1 -0
  242. package/dist/cli/config-XK5WQGTS.js +194 -0
  243. package/dist/cli/{desktop-JGL6GORA.js → desktop-5NTQBADL.js} +200 -113
  244. package/dist/cli/desktop-5NTQBADL.js.map +1 -0
  245. package/dist/cli/{diff-4Z7ETWZO.js → diff-JNYX5BSZ.js} +8 -8
  246. package/dist/cli/{doctor-VA3RHQLB.js → doctor-IKYLUFXX.js} +11 -11
  247. package/dist/cli/{events-VRYXOSKI.js → events-HSC57ONU.js} +12 -8
  248. package/dist/cli/{events-VRYXOSKI.js.map → events-HSC57ONU.js.map} +1 -1
  249. package/dist/cli/index.js +87 -84
  250. package/dist/cli/index.js.map +1 -1
  251. package/dist/cli/{mcp-LZO4HXFA.js → mcp-BDJJWOCD.js} +3 -3
  252. package/dist/cli/{mcp-browse-C3GXVMYZ.js → mcp-browse-NJRZDI6V.js} +8 -8
  253. package/dist/cli/{mcp-inspect-ZMYUNFDS.js → mcp-inspect-Y62NWZQL.js} +7 -6
  254. package/dist/cli/mcp-inspect-Y62NWZQL.js.map +1 -0
  255. package/dist/cli/{prompt-MC3U5KRP.js → prompt-UTOIFUQC.js} +5 -5
  256. package/dist/cli/{prune-sessions-OEPFH4N6.js → prune-sessions-UCUD4XAP.js} +4 -4
  257. package/dist/cli/{replay-4TP7ZUMZ.js → replay-VVIN64MN.js} +10 -19
  258. package/dist/cli/replay-VVIN64MN.js.map +1 -0
  259. package/dist/cli/{run-6MXQYBOE.js → run-76OBDZFB.js} +28 -25
  260. package/dist/cli/run-76OBDZFB.js.map +1 -0
  261. package/dist/cli/{server-Z3IMJNNI.js → server-SZZDKTH2.js} +404 -163
  262. package/dist/cli/server-SZZDKTH2.js.map +1 -0
  263. package/dist/cli/{sessions-NXQ5SAV7.js → sessions-FZTGRCM5.js} +18 -18
  264. package/dist/cli/{setup-LHZELI6I.js → setup-4UNENGOE.js} +14 -40
  265. package/dist/cli/setup-4UNENGOE.js.map +1 -0
  266. package/dist/cli/{stats-SUIJ3QWY.js → stats-F4NDOD7D.js} +6 -6
  267. package/dist/cli/stats-F4NDOD7D.js.map +1 -0
  268. package/dist/cli/version-LUVTWHLL.js +33 -0
  269. package/dist/index.d.ts +325 -299
  270. package/dist/index.js +438 -528
  271. package/dist/index.js.map +1 -1
  272. package/package.json +5 -3
  273. package/dist/cli/acp-WFQIC6SO.js.map +0 -1
  274. package/dist/cli/chat-D32JGNVH.js +0 -51
  275. package/dist/cli/chunk-23ZPCIPR.js.map +0 -1
  276. package/dist/cli/chunk-EQATK2L2.js.map +0 -1
  277. package/dist/cli/chunk-HIYTRCSW.js.map +0 -1
  278. package/dist/cli/chunk-JNTMOX7G.js.map +0 -1
  279. package/dist/cli/chunk-LGEKVMMV.js +0 -59
  280. package/dist/cli/chunk-LGEKVMMV.js.map +0 -1
  281. package/dist/cli/chunk-MGTBP7GG.js.map +0 -1
  282. package/dist/cli/chunk-MQWO32ZD.js.map +0 -1
  283. package/dist/cli/chunk-QF32ROX2.js.map +0 -1
  284. package/dist/cli/chunk-QX5TWXRZ.js.map +0 -1
  285. package/dist/cli/chunk-RRXUIPWG.js.map +0 -1
  286. package/dist/cli/chunk-TEDWJKEI.js.map +0 -1
  287. package/dist/cli/chunk-U5XQDCK7.js.map +0 -1
  288. package/dist/cli/chunk-W46ZMNKO.js.map +0 -1
  289. package/dist/cli/chunk-WMTMMSXU.js.map +0 -1
  290. package/dist/cli/chunk-YEF7C4XI.js.map +0 -1
  291. package/dist/cli/chunk-ZWHSHFDP.js.map +0 -1
  292. package/dist/cli/code-R4IHI7SR.js.map +0 -1
  293. package/dist/cli/commit-AG5KB4YP.js.map +0 -1
  294. package/dist/cli/desktop-JGL6GORA.js.map +0 -1
  295. package/dist/cli/mcp-inspect-ZMYUNFDS.js.map +0 -1
  296. package/dist/cli/replay-4TP7ZUMZ.js.map +0 -1
  297. package/dist/cli/run-6MXQYBOE.js.map +0 -1
  298. package/dist/cli/server-Z3IMJNNI.js.map +0 -1
  299. package/dist/cli/setup-LHZELI6I.js.map +0 -1
  300. package/dist/cli/version-BIFONEUB.js +0 -33
  301. /package/dist/cli/{chat-D32JGNVH.js.map → chat-7WASPB4O.js.map} +0 -0
  302. /package/dist/cli/{chunk-GNS7BAT2.js.map → chunk-7WITYWKN.js.map} +0 -0
  303. /package/dist/cli/{chunk-DFX5ZH5L.js.map → chunk-AAHB2PFX.js.map} +0 -0
  304. /package/dist/cli/{chunk-PB3MAFEI.js.map → chunk-AJIZ5KFK.js.map} +0 -0
  305. /package/dist/cli/{chunk-6OWJV3YW.js.map → chunk-CAGKEGNE.js.map} +0 -0
  306. /package/dist/cli/{chunk-J2IHQGPQ.js.map → chunk-EZ57UEZQ.js.map} +0 -0
  307. /package/dist/cli/{chunk-ZAEJWKXB.js.map → chunk-GMSAB2TC.js.map} +0 -0
  308. /package/dist/cli/{chunk-7AST3QQ3.js.map → chunk-I4Q3QT4W.js.map} +0 -0
  309. /package/dist/cli/{chunk-O5LIHAMP.js.map → chunk-I6FBSTTR.js.map} +0 -0
  310. /package/dist/cli/{chunk-7JTKBJ2G.js.map → chunk-NLRC3DWQ.js.map} +0 -0
  311. /package/dist/cli/{chunk-PXBQ6IZ7.js.map → chunk-OPGWCKKU.js.map} +0 -0
  312. /package/dist/cli/{chunk-PEMG6CUB.js.map → chunk-TX652NBA.js.map} +0 -0
  313. /package/dist/cli/{chunk-TAIKVL35.js.map → chunk-WSBFVOCO.js.map} +0 -0
  314. /package/dist/cli/{chunk-ASOLXV67.js.map → chunk-X2BQZQEE.js.map} +0 -0
  315. /package/dist/cli/{chunk-E5WCLUIU.js.map → chunk-XJZWMU5P.js.map} +0 -0
  316. /package/dist/cli/{chunk-JGTX4RRQ.js.map → chunk-ZAXMJANP.js.map} +0 -0
  317. /package/dist/cli/{commands-DRHFCYMO.js.map → commands-NXTKSQTN.js.map} +0 -0
  318. /package/dist/cli/{doctor-VA3RHQLB.js.map → config-XK5WQGTS.js.map} +0 -0
  319. /package/dist/cli/{diff-4Z7ETWZO.js.map → diff-JNYX5BSZ.js.map} +0 -0
  320. /package/dist/cli/{prompt-MC3U5KRP.js.map → doctor-IKYLUFXX.js.map} +0 -0
  321. /package/dist/cli/{mcp-LZO4HXFA.js.map → mcp-BDJJWOCD.js.map} +0 -0
  322. /package/dist/cli/{mcp-browse-C3GXVMYZ.js.map → mcp-browse-NJRZDI6V.js.map} +0 -0
  323. /package/dist/cli/{stats-SUIJ3QWY.js.map → prompt-UTOIFUQC.js.map} +0 -0
  324. /package/dist/cli/{prune-sessions-OEPFH4N6.js.map → prune-sessions-UCUD4XAP.js.map} +0 -0
  325. /package/dist/cli/{sessions-NXQ5SAV7.js.map → sessions-FZTGRCM5.js.map} +0 -0
  326. /package/dist/cli/{version-BIFONEUB.js.map → version-LUVTWHLL.js.map} +0 -0
package/dist/index.d.ts CHANGED
@@ -24,6 +24,275 @@ interface RetryInfo {
24
24
  }
25
25
  declare function fetchWithRetry(fetchFn: typeof fetch, url: string, init: RequestInit, opts?: RetryOptions): Promise<Response>;
26
26
 
27
+ type ThemeName = "dark" | "light" | "midnight" | "deep-blue" | "high-contrast";
28
+
29
+ type LanguageCode = "EN" | "zh-CN";
30
+
31
+ /** Shared exclude defaults + resolver — chunker, directory_tree, and dashboard read from here. */
32
+ interface IndexUserConfig {
33
+ excludeDirs?: string[];
34
+ excludeFiles?: string[];
35
+ excludeExts?: string[];
36
+ excludePatterns?: string[];
37
+ respectGitignore?: boolean;
38
+ maxFileBytes?: number;
39
+ }
40
+
41
+ /** Plain http:// stays HTTP+SSE for back-compat; Streamable HTTP is opt-in via the `streamable+` URL prefix. */
42
+ interface StdioMcpSpec {
43
+ transport: "stdio";
44
+ /** Namespace prefix applied to each registered tool, or null if anonymous. */
45
+ name: string | null;
46
+ /** Argv[0]. */
47
+ command: string;
48
+ /** Remaining argv. */
49
+ args: string[];
50
+ }
51
+ interface SseMcpSpec {
52
+ transport: "sse";
53
+ name: string | null;
54
+ /** Fully qualified SSE endpoint URL. */
55
+ url: string;
56
+ }
57
+ interface StreamableHttpMcpSpec {
58
+ transport: "streamable-http";
59
+ name: string | null;
60
+ /** Fully qualified Streamable HTTP endpoint URL (no `streamable+` prefix). */
61
+ url: string;
62
+ }
63
+ type McpSpec = StdioMcpSpec | SseMcpSpec | StreamableHttpMcpSpec;
64
+ declare function parseMcpSpec(input: string): McpSpec;
65
+
66
+ /** Sliding-window limits for per-session tool dispatch, with aggregate and per-tool buckets. */
67
+ interface ToolRateLimitBucketConfig {
68
+ maxCalls?: number;
69
+ windowSeconds?: number;
70
+ }
71
+ interface ToolRateLimitConfig {
72
+ enabled?: boolean;
73
+ aggregate?: ToolRateLimitBucketConfig;
74
+ tools?: Record<string, false | ToolRateLimitBucketConfig>;
75
+ }
76
+ interface NormalizedToolRateLimitBucket {
77
+ maxCalls: number;
78
+ windowSeconds: number;
79
+ }
80
+ interface NormalizedToolRateLimitConfig {
81
+ aggregate: NormalizedToolRateLimitBucket;
82
+ tools: Record<string, false | NormalizedToolRateLimitBucket>;
83
+ }
84
+ type ToolRateLimitOption = false | ToolRateLimitConfig;
85
+
86
+ /** Library reads only DEEPSEEK_API_KEY from env; the CLI bridges config.json → env var. */
87
+
88
+ /** Single trust dial: review queues edits + gates shell; auto applies + gates shell; yolo skips both gates; plan blocks every non-readonly tool (write_file / edit_file / multi_edit / run_command) at dispatch. */
89
+ type EditMode = "review" | "auto" | "yolo" | "plan";
90
+ type ReasoningEffort = "low" | "medium" | "high" | "max";
91
+ type EngineeringLifecycleMode = "off" | "strict";
92
+ type EmbeddingProvider = "ollama" | "openai-compat";
93
+ interface OllamaEmbeddingUserConfig {
94
+ baseUrl?: string;
95
+ model?: string;
96
+ }
97
+ interface OpenAICompatEmbeddingUserConfig {
98
+ baseUrl?: string;
99
+ apiKey?: string;
100
+ model?: string;
101
+ extraBody?: Record<string, unknown>;
102
+ batchSize?: number;
103
+ }
104
+ interface SemanticEmbeddingUserConfig {
105
+ provider?: EmbeddingProvider;
106
+ ollama?: OllamaEmbeddingUserConfig;
107
+ openaiCompat?: OpenAICompatEmbeddingUserConfig;
108
+ }
109
+ interface McpServerConfig {
110
+ command?: string;
111
+ args?: string[];
112
+ env?: Record<string, string>;
113
+ transport?: "stdio" | "sse" | "streamable-http";
114
+ /** Claude `.mcp.json` alias for `transport`; `"http"` is treated as `"streamable-http"`. */
115
+ type?: "stdio" | "sse" | "streamable-http" | "http";
116
+ url?: string;
117
+ headers?: Record<string, string>;
118
+ disabled?: boolean;
119
+ }
120
+ interface QQBotConfig {
121
+ appId?: string;
122
+ appSecret?: string;
123
+ sandbox?: boolean;
124
+ enabled?: boolean;
125
+ ownerOpenId?: string;
126
+ allowlist?: string[];
127
+ }
128
+ interface PricingOverride {
129
+ inputCacheHit?: number;
130
+ inputCacheMiss?: number;
131
+ output?: number;
132
+ }
133
+ interface RateLimitConfig {
134
+ /** Client-side self-throttle in requests/minute — paces outbound chat calls with a min-interval timer. NOT a DeepSeek-enforced limit: DeepSeek's actual cap is concurrency, not RPM (500 for v4-pro, 2500 for v4-flash, account-wide), surfaced as HTTP 429. Set this only to be a polite neighbor on shared infra; single-user CLI rarely needs it. */
135
+ rpm?: number;
136
+ }
137
+ interface ProxyConfig {
138
+ /** Skip proxy detection entirely — equivalent to launching with `--no-proxy`. */
139
+ disabled?: boolean;
140
+ /** Additional NO_PROXY patterns (curl syntax). Additive on top of env NO_PROXY and the default DeepSeek-bypass whitelist. */
141
+ noProxy?: string[];
142
+ /** When false, route api.deepseek.com / *.deepseek.com through the proxy too (issue #1497 — corporate firewalls that block direct egress). Default true preserves the clash/v2ray US-exit-IP 403 fix. Env `REASONIX_PROXY_DEEPSEEK_DIRECT` overrides. */
143
+ bypassDeepSeekDirect?: boolean;
144
+ }
145
+ interface ReasonixConfig {
146
+ apiKey?: string;
147
+ baseUrl?: string;
148
+ lang?: LanguageCode;
149
+ /** Persisted DeepSeek model id — `/model <id>` and the dashboard model picker write through this. */
150
+ model?: string;
151
+ editMode?: EditMode;
152
+ editModeHintShown?: boolean;
153
+ mouseClipboardHintShown?: boolean;
154
+ /** When false, skip the boot splash animation and show the main UI immediately. Default true. */
155
+ banner?: boolean;
156
+ reasoningEffort?: ReasoningEffort;
157
+ /** Default workspace root for the desktop client. CLI uses cwd. */
158
+ workspaceDir?: string;
159
+ /** Last N workspace paths the desktop client has opened, most recent first. */
160
+ recentWorkspaces?: string[];
161
+ /** Desktop only — open tabs in tab order, each with its workspace dir, loaded session and focus, persisted so restart restores every tab and its conversation (issues #933, #1244). Empty/absent → boot with a single default tab. */
162
+ desktopOpenTabs?: DesktopOpenTab[];
163
+ /** Desktop only — `openWith` value for clicking file links. Empty/undefined = OS default app. Examples: "code", "cursor", "C:\\path\\to\\editor.exe". */
164
+ editor?: string;
165
+ theme?: ThemeName | "auto";
166
+ /** Stored as `--mcp`-format strings so one parser handles both flag and config. */
167
+ mcp?: string[];
168
+ /** Names of servers in `mcp` to skip on bridge — see `/mcp disable <name>`. */
169
+ mcpDisabled?: string[];
170
+ /** Env overlay per MCP server name (matches the `name=` prefix of the spec). Stdio transports merge this over process.env; SSE/HTTP ignore it. */
171
+ mcpEnv?: Record<string, Record<string, string>>;
172
+ /** Canonical MCP server configuration — merges with and overrides legacy `mcp`/`mcpEnv`/`mcpDisabled`. */
173
+ mcpServers?: Record<string, McpServerConfig>;
174
+ session?: string | null;
175
+ setupCompleted?: boolean;
176
+ search?: boolean;
177
+ /** Web search engine backend: "bing" (default, scrapes cn.bing.com), "searxng" (self-hosted SearXNG), "metaso" (Metaso API), "tavily" (LLM-friendly API, free tier), "perplexity" (Perplexity AI), or "exa" (Exa API). */
178
+ webSearchEngine?: "bing" | "searxng" | "metaso" | "tavily" | "perplexity" | "exa";
179
+ /** Base URL for SearXNG instance (default http://localhost:8080). */
180
+ webSearchEndpoint?: string;
181
+ /** Metaso API key. Falls back to METASO_API_KEY env var. */
182
+ metasoApiKey?: string;
183
+ /** Tavily API key. Falls back to TAVILY_API_KEY env var. No baked-in default — free tier is 1000/mo per account, sharing would burn out. */
184
+ tavilyApiKey?: string;
185
+ /** Perplexity API key. Falls back to PERPLEXITY_API_KEY env var. Get one at https://perplexity.ai/settings/api */
186
+ perplexityApiKey?: string;
187
+ /** Exa API key. Falls back to EXA_API_KEY env var. Free 1000/mo signup at https://exa.ai */
188
+ exaApiKey?: string;
189
+ /** TUI mouse-wheel scrolling via SGR mouse tracking. Default true. Set false to fall back to native terminal drag-select for copy (then wheel is terminal-dependent — most terminals translate wheel→arrow in alt-screen, some don't). */
190
+ mouseTracking?: boolean;
191
+ /** Rows scrolled per single SGR mouse-wheel report. Default 1 — most terminals emit 2-5 reports per physical notch, so 1 already produces 2-5 rows per notch (#1419). Bump to 3-5 only if your terminal emits one report per notch and scrolling feels slow (#1494). Clamped to [1, 10]. */
192
+ mouseWheelRows?: number;
193
+ dashboard?: {
194
+ /** Whether the embedded dashboard auto-starts on launch. Default true. Set false to disable without passing --no-dashboard each time. */
195
+ enabled?: boolean;
196
+ /** Pin the embedded dashboard to a fixed port — required for stable SSH tunnels. 0/absent → ephemeral. */
197
+ port?: number;
198
+ /** Bind address (#968). Defaults to 127.0.0.1 (loopback only). Set to 0.0.0.0 / :: / a LAN IP to expose to other devices; the URL token is then the only auth, so keep it secret. */
199
+ host?: string;
200
+ /** Stable URL token (#968). If unset, a fresh token is minted each boot. Min 16 chars enforced at load time. */
201
+ token?: string;
202
+ };
203
+ /** Thread-area visibility toggles. */
204
+ thread?: {
205
+ /** When false, suppresses the quiet inline dividers for fold / abort / rate-limit
206
+ * warnings (severity="high" from the kernel). Default true. */
207
+ showSystemEvents?: boolean;
208
+ };
209
+ /** Per-field visibility toggles for the bottom status row. All default to true (visible). */
210
+ statusBar?: {
211
+ showBalance?: boolean;
212
+ showSessionCost?: boolean;
213
+ showTurnCost?: boolean;
214
+ showCacheHit?: boolean;
215
+ showCtxUsage?: boolean;
216
+ showVersion?: boolean;
217
+ showFeedbackHint?: boolean;
218
+ };
219
+ projects?: {
220
+ [absoluteRootDir: string]: {
221
+ shellAllowed?: string[];
222
+ /** Project-scoped hooks are arbitrary shell commands; load only after explicit trust. */
223
+ hooksTrusted?: boolean;
224
+ /** Absolute directory prefixes the user pre-approved for outside-sandbox file access (#684). */
225
+ pathAllowed?: string[];
226
+ };
227
+ };
228
+ /** Issue #259 — user-configurable sensitive-path prefixes and filename patterns.
229
+ * Commands touching these paths are demoted to the confirm gate even when allowlisted. */
230
+ sensitivePaths?: {
231
+ /** Path prefixes (tilde-relative or absolute) that trigger confirmation. */
232
+ prefixes?: string[];
233
+ /** Glob-style filename patterns (matched against basename, case-insensitive). */
234
+ patterns?: string[];
235
+ };
236
+ index?: IndexUserConfig;
237
+ semantic?: SemanticEmbeddingUserConfig;
238
+ skills?: {
239
+ paths?: string[];
240
+ };
241
+ /** Per-skill model override for `runAs: subagent` skills, keyed by skill name. Empty / missing entry → spawn site's default. */
242
+ subagentModels?: Record<string, "flash" | "pro">;
243
+ /** Enable the `java_source` tool for finding and decompiling Java class source. Default off. */
244
+ javaSource?: boolean;
245
+ /** User-declared extensions to the built-in memory types (#709). Unknown types round-trip even without a declaration; declaring one lets you attach a default priority + lifecycle. */
246
+ memory?: {
247
+ customTypes?: CustomMemoryTypeConfig[];
248
+ };
249
+ pricingOverride?: Record<string, PricingOverride>;
250
+ /** Per-app proxy override. Layered on top of HTTPS_PROXY / NO_PROXY env vars + the default DeepSeek-bypass whitelist. */
251
+ proxy?: ProxyConfig;
252
+ rateLimit?: RateLimitConfig;
253
+ toolRateLimit?: ToolRateLimitConfig;
254
+ /** Host-enforced engineering lifecycle. Defaults to off so opt-outs pay zero prefix cost. */
255
+ engineeringLifecycle?: {
256
+ mode?: EngineeringLifecycleMode;
257
+ };
258
+ filesystem?: {
259
+ /** read_file flips to outline mode for files above this. Default 64 KiB — keeps the cache prefix slim while covering ~99% of source files. Raise to 524288 (512 KiB) for the pre-0.46.0 "trust the cache" behavior. */
260
+ outlineThresholdBytes?: number;
261
+ };
262
+ /** QQ Bot configuration */
263
+ qq?: QQBotConfig;
264
+ }
265
+ interface CustomMemoryTypeConfig {
266
+ name: string;
267
+ description?: string;
268
+ priority?: "low" | "medium" | "high";
269
+ expires?: "project_end";
270
+ }
271
+ declare function loadMetasoApiKey(path?: string): string | undefined;
272
+ /** Perplexity API key — env > config > undefined. Get one at https://perplexity.ai/settings/api */
273
+ declare function loadPerplexityApiKey(path?: string): string | undefined;
274
+ /** Exa API key — env > config > undefined. Free 1000/mo signup at https://exa.ai */
275
+ declare function loadExaApiKey(path?: string): string | undefined;
276
+ declare function defaultConfigPath(): string;
277
+ declare function readConfig(path?: string): ReasonixConfig;
278
+ declare function writeConfig(cfg: ReasonixConfig, path?: string): void;
279
+ declare function loadApiKey(path?: string): string | undefined;
280
+ declare function loadBaseUrl(path?: string): string | undefined;
281
+ declare function saveBaseUrl(url: string, path?: string): void;
282
+ declare function saveApiKey(key: string, path?: string): void;
283
+ /** Desktop only — one open tab's restorable state. */
284
+ interface DesktopOpenTab {
285
+ dir: string;
286
+ /** Session the tab had loaded; reopened on boot if its jsonl still exists. */
287
+ session?: string;
288
+ /** Whether this was the focused tab. */
289
+ active?: boolean;
290
+ }
291
+ /** Self-hosted DeepSeek-compatible endpoints may issue any token shape, so we only typo-guard here — the real auth check is the first API call against `baseUrl`. */
292
+ declare function isPlausibleKey(key: string): boolean;
293
+ /** Mask a key for display: `sk-abcd...wxyz`. */
294
+ declare function redactKey(key: string): string;
295
+
27
296
  interface JSONSchema {
28
297
  type?: string;
29
298
  properties?: Record<string, JSONSchema>;
@@ -80,7 +349,7 @@ interface ChatRequestOptions {
80
349
  type: "json_object" | "text";
81
350
  };
82
351
  thinking?: "enabled" | "disabled";
83
- reasoningEffort?: "high" | "max";
352
+ reasoningEffort?: ReasoningEffort;
84
353
  }
85
354
 
86
355
  declare class Usage {
@@ -556,6 +825,7 @@ declare class SessionStats {
556
825
  private _carryoverTurns;
557
826
  private _carryoverCacheHit;
558
827
  private _carryoverCacheMiss;
828
+ private _carryoverCompletion;
559
829
  /** Last turn's promptTokens before exit — surfaced via summary() until the next live turn lands. */
560
830
  private _carryoverLastPromptTokens;
561
831
  /** Seed totals from a resumed session's persisted meta — only call once at construction. */
@@ -564,10 +834,20 @@ declare class SessionStats {
564
834
  turnCount?: number;
565
835
  cacheHitTokens?: number;
566
836
  cacheMissTokens?: number;
837
+ totalCompletionTokens?: number;
567
838
  lastPromptTokens?: number;
568
839
  }): void;
840
+ /** Cumulative cache hit tokens across carryover + current turns. */
841
+ get cumulativeCacheHitTokens(): number;
842
+ /** Cumulative cache miss tokens across carryover + current turns. */
843
+ get cumulativeCacheMissTokens(): number;
844
+ /** Cumulative completion (output) tokens across carryover + current turns. */
845
+ get cumulativeCompletionTokens(): number;
569
846
  reset(): void;
570
847
  record(turn: number, model: string, usage: Usage): TurnStats;
848
+ /** Drop oldest turns beyond MAX_TURNS, folding their costs into carryover so
849
+ * session totals remain accurate even after trimming. */
850
+ private trimOldTurns;
571
851
  get totalCost(): number;
572
852
  get totalClaudeEquivalent(): number;
573
853
  get savingsVsClaude(): number;
@@ -586,10 +866,15 @@ type EventRole = "assistant_delta" | "assistant_final"
586
866
  | "status"
587
867
  /** Mid-turn steer injected as queued user guidance without aborting the current turn. */
588
868
  | "steer";
869
+ /** "low" = chatty / self-correcting / counter — Desktop+Dashboard filter these out by default.
870
+ * Undefined / "high" = real event the user should see (compaction, abort, budget, rate-limit, etc.).
871
+ * TUI ignores this and renders every warning. */
872
+ type EventSeverity = "low" | "high";
589
873
  interface LoopEvent {
590
874
  turn: number;
591
875
  role: EventRole;
592
876
  content: string;
877
+ severity?: EventSeverity;
593
878
  reasoningDelta?: string;
594
879
  toolName?: string;
595
880
  /** Raw args JSON — needed by `reasonix diff` to explain why a tool was called. */
@@ -636,42 +921,22 @@ declare class ImmutablePrefix {
636
921
  verifyFingerprint(): string;
637
922
  private computeFingerprint;
638
923
  }
639
- declare class AppendOnlyLog {
640
- private _entries;
641
- append(message: ChatMessage): void;
642
- extend(messages: ChatMessage[]): void;
643
- /** The one append-only-breaking path — reserved for `/compact` + recovery. Use `append()` otherwise. */
644
- compactInPlace(replacement: ChatMessage[]): void;
645
- get entries(): readonly ChatMessage[];
646
- toMessages(): ChatMessage[];
647
- get length(): number;
648
- }
649
- declare class VolatileScratch {
650
- reasoning: string | null;
651
- planState: Record<string, unknown> | null;
652
- notes: string[];
653
- reset(): void;
654
- }
655
-
656
- /** Sliding-window limits for per-session tool dispatch, with aggregate and per-tool buckets. */
657
- interface ToolRateLimitBucketConfig {
658
- maxCalls?: number;
659
- windowSeconds?: number;
660
- }
661
- interface ToolRateLimitConfig {
662
- enabled?: boolean;
663
- aggregate?: ToolRateLimitBucketConfig;
664
- tools?: Record<string, false | ToolRateLimitBucketConfig>;
665
- }
666
- interface NormalizedToolRateLimitBucket {
667
- maxCalls: number;
668
- windowSeconds: number;
669
- }
670
- interface NormalizedToolRateLimitConfig {
671
- aggregate: NormalizedToolRateLimitBucket;
672
- tools: Record<string, false | NormalizedToolRateLimitBucket>;
924
+ declare class AppendOnlyLog {
925
+ private _entries;
926
+ append(message: ChatMessage): void;
927
+ extend(messages: ChatMessage[]): void;
928
+ /** The one append-only-breaking path — reserved for `/compact` + recovery. Use `append()` otherwise. */
929
+ compactInPlace(replacement: ChatMessage[]): void;
930
+ get entries(): readonly ChatMessage[];
931
+ toMessages(): ChatMessage[];
932
+ get length(): number;
933
+ }
934
+ declare class VolatileScratch {
935
+ reasoning: string | null;
936
+ planState: Record<string, unknown> | null;
937
+ notes: string[];
938
+ reset(): void;
673
939
  }
674
- type ToolRateLimitOption = false | ToolRateLimitConfig;
675
940
 
676
941
  /** Tracks files the model has had byte-exact visibility into this session. `edit_file` and `multi_edit` consult it before mutating, so the SEARCH text matches the on-disk bytes the model actually saw — not what it guessed. */
677
942
  declare class ReadTracker {
@@ -778,8 +1043,7 @@ interface CacheFirstLoopOptions {
778
1043
  tools?: ToolRegistry;
779
1044
  model?: string;
780
1045
  stream?: boolean;
781
- reasoningEffort?: "high" | "max";
782
- autoEscalate?: boolean;
1046
+ reasoningEffort?: ReasoningEffort;
783
1047
  /** Soft USD cap — warns at 80%, refuses next turn at 100%. Opt-in (default no cap). */
784
1048
  budgetUsd?: number;
785
1049
  session?: string;
@@ -796,9 +1060,11 @@ interface ReconfigurableOptions {
796
1060
  model?: string;
797
1061
  stream?: boolean;
798
1062
  /** V4 thinking mode only; deepseek-chat ignores. */
799
- reasoningEffort?: "high" | "max";
800
- /** `false` pins to `model` — disables the model-marker scavenge that flips flash→pro. */
801
- autoEscalate?: boolean;
1063
+ reasoningEffort?: ReasoningEffort;
1064
+ }
1065
+ interface LoopAbortOptions {
1066
+ /** Explicit user interrupts can discard the unfinished turn so the next prompt starts clean. */
1067
+ discardCurrentTurn?: boolean;
802
1068
  }
803
1069
  declare class CacheFirstLoop {
804
1070
  readonly client: DeepSeekClient;
@@ -812,8 +1078,7 @@ declare class CacheFirstLoop {
812
1078
  readonly readTracker: ReadTracker;
813
1079
  model: string;
814
1080
  stream: boolean;
815
- reasoningEffort: "high" | "max";
816
- autoEscalate: boolean;
1081
+ reasoningEffort: ReasoningEffort;
817
1082
  budgetUsd: number | null;
818
1083
  /** One-shot 80% warning latch — cleared by setBudget so a bump re-arms at the new boundary. */
819
1084
  private _budgetWarned;
@@ -829,6 +1094,7 @@ declare class CacheFirstLoop {
829
1094
  private _streamPreference;
830
1095
  /** Threaded through HTTP + every tool dispatch so Esc cancels in-flight work, not after. */
831
1096
  private _turnAbort;
1097
+ private _discardAbortRequested;
832
1098
  /** Authoritative running-id set — UI cards consult this instead of trusting end-event delivery. Insert at dispatch entry, delete in finally. */
833
1099
  private readonly _inflight;
834
1100
  /** Typeahead steer messages set by the UI; step() consumes one at each iter boundary. */
@@ -840,8 +1106,6 @@ declare class CacheFirstLoop {
840
1106
  steer(text: string | null): void;
841
1107
  /** True when a steer was consumed this turn (UI gate to avoid double-submit). */
842
1108
  get steerConsumed(): boolean;
843
- private _proArmedForNextTurn;
844
- private _escalateThisTurn;
845
1109
  private _turnSelfCorrected;
846
1110
  private _foldedThisTurn;
847
1111
  private context;
@@ -879,17 +1143,8 @@ declare class CacheFirstLoop {
879
1143
  configure(opts: ReconfigurableOptions): void;
880
1144
  /** `null` disables the cap; any change re-arms the 80% warning. */
881
1145
  setBudget(usd: number | null): void;
882
- /** Single-turn upgrade consumed at next step() distinct from `/preset max` (persistent). */
883
- armProForNextTurn(): void;
884
- /** Cancel `/pro` arming before the next turn starts. */
885
- disarmPro(): void;
886
- /** UI surface — true while `/pro` is queued but hasn't fired yet. */
887
- get proArmed(): boolean;
888
- /** UI surface — true while the current turn is running on pro (armed or auto-escalated). */
889
- get escalatedThisTurn(): boolean;
890
- /** UI surface — model id of the call about to run (or running) right now, including escalation. */
1146
+ /** UI surface model id of the call about to run (or running) right now. */
891
1147
  get currentCallModel(): string;
892
- private modelForCurrentCall;
893
1148
  /** A call counts as mutating when its definition reports `readOnly !== true` and any dynamic `readOnlyCheck` doesn't override that for these args. */
894
1149
  private isMutating;
895
1150
  private runOneToolCall;
@@ -898,7 +1153,9 @@ declare class CacheFirstLoop {
898
1153
  private _inflightCounter;
899
1154
  private buildMessages;
900
1155
  private healActiveLogBeforeSend;
901
- abort(): void;
1156
+ abort(opts?: LoopAbortOptions): void;
1157
+ private resetAbortState;
1158
+ private discardLogFrom;
902
1159
  /** Drop the last user message + everything after; caller re-sends. Persists to session file. */
903
1160
  retryLastUser(): string | null;
904
1161
  /** Rewind to the N-th user turn (0-indexed). Drops that turn + everything after. */
@@ -1059,248 +1316,6 @@ declare function memoryEnabled(): boolean;
1059
1316
  /** Deterministic — same memory file always yields the same prefix hash. */
1060
1317
  declare function applyProjectMemory(basePrompt: string, rootDir: string): string;
1061
1318
 
1062
- type ThemeName = "default" | "dark" | "light" | "tokyo-night" | "github-dark" | "github-light" | "high-contrast";
1063
-
1064
- type LanguageCode = "EN" | "zh-CN";
1065
-
1066
- /** Shared exclude defaults + resolver — chunker, directory_tree, and dashboard read from here. */
1067
- interface IndexUserConfig {
1068
- excludeDirs?: string[];
1069
- excludeFiles?: string[];
1070
- excludeExts?: string[];
1071
- excludePatterns?: string[];
1072
- respectGitignore?: boolean;
1073
- maxFileBytes?: number;
1074
- }
1075
-
1076
- /** Plain http:// stays HTTP+SSE for back-compat; Streamable HTTP is opt-in via the `streamable+` URL prefix. */
1077
- interface StdioMcpSpec {
1078
- transport: "stdio";
1079
- /** Namespace prefix applied to each registered tool, or null if anonymous. */
1080
- name: string | null;
1081
- /** Argv[0]. */
1082
- command: string;
1083
- /** Remaining argv. */
1084
- args: string[];
1085
- }
1086
- interface SseMcpSpec {
1087
- transport: "sse";
1088
- name: string | null;
1089
- /** Fully qualified SSE endpoint URL. */
1090
- url: string;
1091
- }
1092
- interface StreamableHttpMcpSpec {
1093
- transport: "streamable-http";
1094
- name: string | null;
1095
- /** Fully qualified Streamable HTTP endpoint URL (no `streamable+` prefix). */
1096
- url: string;
1097
- }
1098
- type McpSpec = StdioMcpSpec | SseMcpSpec | StreamableHttpMcpSpec;
1099
- declare function parseMcpSpec(input: string): McpSpec;
1100
-
1101
- /** Library reads only DEEPSEEK_API_KEY from env; the CLI bridges config.json → env var. */
1102
-
1103
- /** Legacy `fast|smart|max` kept for back-compat with existing config.json files. */
1104
- type PresetName = "auto" | "flash" | "pro" | "fast" | "smart" | "max";
1105
- /** Single trust dial: review queues edits + gates shell; auto applies + gates shell; yolo skips both gates. */
1106
- type EditMode = "review" | "auto" | "yolo";
1107
- type ReasoningEffort = "high" | "max";
1108
- type EngineeringLifecycleMode = "off" | "strict";
1109
- type EmbeddingProvider = "ollama" | "openai-compat";
1110
- interface OllamaEmbeddingUserConfig {
1111
- baseUrl?: string;
1112
- model?: string;
1113
- }
1114
- interface OpenAICompatEmbeddingUserConfig {
1115
- baseUrl?: string;
1116
- apiKey?: string;
1117
- model?: string;
1118
- extraBody?: Record<string, unknown>;
1119
- batchSize?: number;
1120
- }
1121
- interface SemanticEmbeddingUserConfig {
1122
- provider?: EmbeddingProvider;
1123
- ollama?: OllamaEmbeddingUserConfig;
1124
- openaiCompat?: OpenAICompatEmbeddingUserConfig;
1125
- }
1126
- interface McpServerConfig {
1127
- command?: string;
1128
- args?: string[];
1129
- env?: Record<string, string>;
1130
- transport?: "stdio" | "sse" | "streamable-http";
1131
- /** Claude `.mcp.json` alias for `transport`; `"http"` is treated as `"streamable-http"`. */
1132
- type?: "stdio" | "sse" | "streamable-http" | "http";
1133
- url?: string;
1134
- headers?: Record<string, string>;
1135
- disabled?: boolean;
1136
- }
1137
- interface QQBotConfig {
1138
- appId?: string;
1139
- appSecret?: string;
1140
- sandbox?: boolean;
1141
- enabled?: boolean;
1142
- ownerOpenId?: string;
1143
- allowlist?: string[];
1144
- }
1145
- interface PricingOverride {
1146
- inputCacheHit?: number;
1147
- inputCacheMiss?: number;
1148
- output?: number;
1149
- }
1150
- interface RateLimitConfig {
1151
- /** Client-side self-throttle in requests/minute — paces outbound chat calls with a min-interval timer. NOT a DeepSeek-enforced limit: DeepSeek's actual cap is concurrency, not RPM (500 for v4-pro, 2500 for v4-flash, account-wide), surfaced as HTTP 429. Set this only to be a polite neighbor on shared infra; single-user CLI rarely needs it. */
1152
- rpm?: number;
1153
- }
1154
- interface ProxyConfig {
1155
- /** Skip proxy detection entirely — equivalent to launching with `--no-proxy`. */
1156
- disabled?: boolean;
1157
- /** Additional NO_PROXY patterns (curl syntax). Additive on top of env NO_PROXY and the default DeepSeek-bypass whitelist. */
1158
- noProxy?: string[];
1159
- /** When false, route api.deepseek.com / *.deepseek.com through the proxy too (issue #1497 — corporate firewalls that block direct egress). Default true preserves the clash/v2ray US-exit-IP 403 fix. Env `REASONIX_PROXY_DEEPSEEK_DIRECT` overrides. */
1160
- bypassDeepSeekDirect?: boolean;
1161
- }
1162
- interface ReasonixConfig {
1163
- apiKey?: string;
1164
- baseUrl?: string;
1165
- lang?: LanguageCode;
1166
- preset?: PresetName;
1167
- editMode?: EditMode;
1168
- editModeHintShown?: boolean;
1169
- mouseClipboardHintShown?: boolean;
1170
- /** When false, skip the boot splash animation and show the main UI immediately. Default true. */
1171
- banner?: boolean;
1172
- reasoningEffort?: ReasoningEffort;
1173
- /** Default workspace root for the desktop client. CLI uses cwd. */
1174
- workspaceDir?: string;
1175
- /** Last N workspace paths the desktop client has opened, most recent first. */
1176
- recentWorkspaces?: string[];
1177
- /** Desktop only — open tabs in tab order, each with its workspace dir, loaded session and focus, persisted so restart restores every tab and its conversation (issues #933, #1244). Empty/absent → boot with a single default tab. */
1178
- desktopOpenTabs?: DesktopOpenTab[];
1179
- /** Desktop only — `openWith` value for clicking file links. Empty/undefined = OS default app. Examples: "code", "cursor", "C:\\path\\to\\editor.exe". */
1180
- editor?: string;
1181
- theme?: ThemeName | "auto";
1182
- /** Stored as `--mcp`-format strings so one parser handles both flag and config. */
1183
- mcp?: string[];
1184
- /** Names of servers in `mcp` to skip on bridge — see `/mcp disable <name>`. */
1185
- mcpDisabled?: string[];
1186
- /** Env overlay per MCP server name (matches the `name=` prefix of the spec). Stdio transports merge this over process.env; SSE/HTTP ignore it. */
1187
- mcpEnv?: Record<string, Record<string, string>>;
1188
- /** Canonical MCP server configuration — merges with and overrides legacy `mcp`/`mcpEnv`/`mcpDisabled`. */
1189
- mcpServers?: Record<string, McpServerConfig>;
1190
- session?: string | null;
1191
- setupCompleted?: boolean;
1192
- search?: boolean;
1193
- /** Web search engine backend: "bing" (default, scrapes cn.bing.com), "searxng" (self-hosted SearXNG), "metaso" (Metaso API), "tavily" (LLM-friendly API, free tier), "perplexity" (Perplexity AI), or "exa" (Exa API). */
1194
- webSearchEngine?: "bing" | "searxng" | "metaso" | "tavily" | "perplexity" | "exa";
1195
- /** Base URL for SearXNG instance (default http://localhost:8080). */
1196
- webSearchEndpoint?: string;
1197
- /** Metaso API key. Falls back to METASO_API_KEY env var. */
1198
- metasoApiKey?: string;
1199
- /** Tavily API key. Falls back to TAVILY_API_KEY env var. No baked-in default — free tier is 1000/mo per account, sharing would burn out. */
1200
- tavilyApiKey?: string;
1201
- /** Perplexity API key. Falls back to PERPLEXITY_API_KEY env var. Get one at https://perplexity.ai/settings/api */
1202
- perplexityApiKey?: string;
1203
- /** Exa API key. Falls back to EXA_API_KEY env var. Free 1000/mo signup at https://exa.ai */
1204
- exaApiKey?: string;
1205
- /** TUI mouse-wheel scrolling via SGR mouse tracking. Default true. Set false to fall back to native terminal drag-select for copy (then wheel is terminal-dependent — most terminals translate wheel→arrow in alt-screen, some don't). */
1206
- mouseTracking?: boolean;
1207
- /** Rows scrolled per single SGR mouse-wheel report. Default 1 — most terminals emit 2-5 reports per physical notch, so 1 already produces 2-5 rows per notch (#1419). Bump to 3-5 only if your terminal emits one report per notch and scrolling feels slow (#1494). Clamped to [1, 10]. */
1208
- mouseWheelRows?: number;
1209
- dashboard?: {
1210
- /** Pin the embedded dashboard to a fixed port — required for stable SSH tunnels. 0/absent → ephemeral. */
1211
- port?: number;
1212
- /** Bind address (#968). Defaults to 127.0.0.1 (loopback only). Set to 0.0.0.0 / :: / a LAN IP to expose to other devices; the URL token is then the only auth, so keep it secret. */
1213
- host?: string;
1214
- /** Stable URL token (#968). If unset, a fresh token is minted each boot. Min 16 chars enforced at load time. */
1215
- token?: string;
1216
- };
1217
- /** Per-field visibility toggles for the bottom status row. All default to true (visible). */
1218
- statusBar?: {
1219
- showBalance?: boolean;
1220
- showSessionCost?: boolean;
1221
- showTurnCost?: boolean;
1222
- showCacheHit?: boolean;
1223
- showCtxUsage?: boolean;
1224
- showVersion?: boolean;
1225
- showFeedbackHint?: boolean;
1226
- };
1227
- projects?: {
1228
- [absoluteRootDir: string]: {
1229
- shellAllowed?: string[];
1230
- /** Project-scoped hooks are arbitrary shell commands; load only after explicit trust. */
1231
- hooksTrusted?: boolean;
1232
- /** Absolute directory prefixes the user pre-approved for outside-sandbox file access (#684). */
1233
- pathAllowed?: string[];
1234
- };
1235
- };
1236
- /** Issue #259 — user-configurable sensitive-path prefixes and filename patterns.
1237
- * Commands touching these paths are demoted to the confirm gate even when allowlisted. */
1238
- sensitivePaths?: {
1239
- /** Path prefixes (tilde-relative or absolute) that trigger confirmation. */
1240
- prefixes?: string[];
1241
- /** Glob-style filename patterns (matched against basename, case-insensitive). */
1242
- patterns?: string[];
1243
- };
1244
- index?: IndexUserConfig;
1245
- semantic?: SemanticEmbeddingUserConfig;
1246
- skills?: {
1247
- paths?: string[];
1248
- };
1249
- /** Enable the `java_source` tool for finding and decompiling Java class source. Default off. */
1250
- javaSource?: boolean;
1251
- /** User-declared extensions to the built-in memory types (#709). Unknown types round-trip even without a declaration; declaring one lets you attach a default priority + lifecycle. */
1252
- memory?: {
1253
- customTypes?: CustomMemoryTypeConfig[];
1254
- };
1255
- pricingOverride?: Record<string, PricingOverride>;
1256
- /** Per-app proxy override. Layered on top of HTTPS_PROXY / NO_PROXY env vars + the default DeepSeek-bypass whitelist. */
1257
- proxy?: ProxyConfig;
1258
- rateLimit?: RateLimitConfig;
1259
- toolRateLimit?: ToolRateLimitConfig;
1260
- /** Host-enforced engineering lifecycle. Defaults to off so opt-outs pay zero prefix cost. */
1261
- engineeringLifecycle?: {
1262
- mode?: EngineeringLifecycleMode;
1263
- };
1264
- filesystem?: {
1265
- /** read_file flips to outline mode for files above this. Default 64 KiB — keeps the cache prefix slim while covering ~99% of source files. Raise to 524288 (512 KiB) for the pre-0.46.0 "trust the cache" behavior. */
1266
- outlineThresholdBytes?: number;
1267
- };
1268
- /** QQ Bot configuration */
1269
- qq?: QQBotConfig;
1270
- }
1271
- interface CustomMemoryTypeConfig {
1272
- name: string;
1273
- description?: string;
1274
- priority?: "low" | "medium" | "high";
1275
- expires?: "project_end";
1276
- }
1277
- declare function loadMetasoApiKey(path?: string): string | undefined;
1278
- /** Perplexity API key — env > config > undefined. Get one at https://perplexity.ai/settings/api */
1279
- declare function loadPerplexityApiKey(path?: string): string | undefined;
1280
- /** Exa API key — env > config > undefined. Free 1000/mo signup at https://exa.ai */
1281
- declare function loadExaApiKey(path?: string): string | undefined;
1282
- declare function defaultConfigPath(): string;
1283
- declare function readConfig(path?: string): ReasonixConfig;
1284
- declare function writeConfig(cfg: ReasonixConfig, path?: string): void;
1285
- /** Resolve the API key from env var first, then the config file. */
1286
- declare function loadApiKey(path?: string): string | undefined;
1287
- /** env > config > undefined. Client falls back to api.deepseek.com when undefined. */
1288
- declare function loadBaseUrl(path?: string): string | undefined;
1289
- declare function saveBaseUrl(url: string, path?: string): void;
1290
- declare function saveApiKey(key: string, path?: string): void;
1291
- /** Desktop only — one open tab's restorable state. */
1292
- interface DesktopOpenTab {
1293
- dir: string;
1294
- /** Session the tab had loaded; reopened on boot if its jsonl still exists. */
1295
- session?: string;
1296
- /** Whether this was the focused tab. */
1297
- active?: boolean;
1298
- }
1299
- /** Self-hosted DeepSeek-compatible endpoints may issue any token shape, so we only typo-guard here — the real auth check is the first API call against `baseUrl`. */
1300
- declare function isPlausibleKey(key: string): boolean;
1301
- /** Mask a key for display: `sk-abcd...wxyz`. */
1302
- declare function redactKey(key: string): string;
1303
-
1304
1319
  /** User-private memory pinned into the immutable prefix; distinct from committable REASONIX.md. */
1305
1320
 
1306
1321
  declare const USER_MEMORY_DIR = "memory";
@@ -1657,6 +1672,8 @@ interface JobRecord {
1657
1672
  declare class JobRegistry {
1658
1673
  private readonly jobs;
1659
1674
  private nextId;
1675
+ /** Max completed jobs to retain for list_jobs / job_output lookups. */
1676
+ private static readonly MAX_COMPLETED_JOBS;
1660
1677
  /** Resolves on (a) ready signal, (b) early exit, or (c) waitSec deadline — child keeps running regardless. */
1661
1678
  start(command: string, opts: JobStartOptions): Promise<JobStartResult>;
1662
1679
  read(id: number, opts?: {
@@ -1675,6 +1692,8 @@ declare class JobRegistry {
1675
1692
  shutdown(deadlineMs?: number): Promise<void>;
1676
1693
  /** Count of still-running jobs — drives the TUI status-bar indicator. */
1677
1694
  runningCount(): number;
1695
+ /** Evict oldest completed jobs when the map exceeds MAX_COMPLETED_JOBS. */
1696
+ private maybeCleanup;
1678
1697
  }
1679
1698
  interface JobReadResult {
1680
1699
  output: string;
@@ -1835,6 +1854,8 @@ interface SessionMeta {
1835
1854
  /** Cumulative cache hit / miss tokens across the session — survives resume so /status cache% isn't 0 on a fresh boot. */
1836
1855
  cacheHitTokens?: number;
1837
1856
  cacheMissTokens?: number;
1857
+ /** Cumulative completion (output) tokens across the session. */
1858
+ totalCompletionTokens?: number;
1838
1859
  /** Last turn's promptTokens — lets /status render the context bar before the next turn fires. */
1839
1860
  lastPromptTokens?: number;
1840
1861
  /** True when the session filename/summary was generated from conversation content. */
@@ -2166,12 +2187,15 @@ declare class StdioTransport implements McpTransport {
2166
2187
  interface McpClientOptions {
2167
2188
  transport: McpTransport;
2168
2189
  clientInfo?: McpClientInfo;
2190
+ workspaceDir?: string;
2169
2191
  /** Per-request timeout. Default 60s. */
2170
2192
  requestTimeoutMs?: number;
2171
2193
  }
2172
2194
  declare class McpClient {
2173
2195
  private readonly transport;
2174
2196
  private readonly clientInfo;
2197
+ private readonly workspaceDir;
2198
+ private readonly workspaceRoot;
2175
2199
  private readonly requestTimeoutMs;
2176
2200
  private readonly pending;
2177
2201
  private nextId;
@@ -2192,6 +2216,7 @@ declare class McpClient {
2192
2216
  get protocolVersion(): string;
2193
2217
  /** Optional free-form instructions the server provides at handshake. */
2194
2218
  get serverInstructions(): string | undefined;
2219
+ get workspaceRootDir(): string | undefined;
2195
2220
  /** Compliant servers reject other methods until this completes. */
2196
2221
  initialize(opts?: {
2197
2222
  signal?: AbortSignal;
@@ -2217,6 +2242,7 @@ declare class McpClient {
2217
2242
  private startReaderIfNeeded;
2218
2243
  private readLoop;
2219
2244
  private dispatch;
2245
+ private handleServerRequest;
2220
2246
  }
2221
2247
 
2222
2248
  /** MCP HTTP+SSE transport (spec 2024-11-05) — POST endpoint URL arrives as the first `event: endpoint` SSE frame. */
@@ -2612,4 +2638,4 @@ declare function aggregateUsage(records: UsageRecord[], opts?: AggregateOptions)
2612
2638
  /** File-size helper for the stats header — "1.2 MB" etc. Returns "" if missing. */
2613
2639
  declare function formatLogSize(path?: string): string;
2614
2640
 
2615
- export { AT_MENTION_PATTERN, AT_PICKER_PREFIX, type AggregateOptions, AppendOnlyLog, type AppendUsageInput, type ApplyResult, type ApplyStatus, type AtMentionExpansion, type AtMentionOptions, type BridgeOptions, type BridgeResult, CODE_SYSTEM_PROMPT, CacheFirstLoop, type CacheFirstLoopOptions, type CallToolResult, type ChatMessage, type ChatResponse, type ChoiceOption, ChoiceRequestedError, type ChoiceToolOptions, type CodeSystemPromptOptions, DEFAULT_AT_DIR_MAX_ENTRIES, DEFAULT_AT_MENTION_MAX_BYTES, DEFAULT_MAX_RESULT_CHARS, DEFAULT_MAX_RESULT_TOKENS, DEFAULT_PICKER_IGNORE_DIRS, DEFAULT_SPAWN_STORM_THRESHOLD, DeepSeekClient, type DeepSeekClientOptions, type RenderOptions as DiffRenderOptions, type DiffReport, type DiffSide, type DirEntry, type EditBlock, type EditSnapshot, type EventRole, type FileWithStats, type FilesystemToolsOptions, type FlattenDecision, type FlattenOptions, type GetLatestVersionOptions, type GetPromptResult, HOOK_EVENTS, HOOK_SETTINGS_DIRNAME, HOOK_SETTINGS_FILENAME, type HookConfig, type HookEvent, type HookOutcome, type HookPayload, type HookReport, type HookScope, type HookSettings, type HookSpawnInput, type HookSpawnResult, type HookSpawner, ImmutablePrefix, type ImmutablePrefixOptions, type InitializeResult, type InspectionReport, type InstallSource, type JSONSchema, type JsonRpcMessage, type JsonRpcRequest, type JsonRpcResponse, LATEST_CACHE_TTL_MS, LATEST_FETCH_TIMEOUT_MS, type ListDirectoryOptions, type ListFilesOptions, type ListPromptsResult, type ListResourcesResult, type ListToolsResult, type LoadHookSettingsOptions, type LoopEvent, MCP_PROTOCOL_VERSION, MEMORY_INDEX_FILE, MEMORY_INDEX_MAX_CHARS, McpClient, type McpClientOptions, type McpContentBlock, type McpProgressHandler, type McpProgressInfo, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResourceBlock, type McpResource, type McpResourceContents, type McpResourceContentsBlob, type McpResourceContentsText, type McpSpec, type McpTool, type McpToolSchema, type McpTransport, type MemoryEntry, type MemoryScope, MemoryStore, type MemoryStoreOptions, type MemoryToolsOptions, type MemoryType, type WriteInput as MemoryWriteInput, NeedsConfirmationError, PROJECT_MEMORY_FILE, PROJECT_MEMORY_FILES, PROJECT_MEMORY_MAX_CHARS, type PageContent, type ParsedAtQuery, type PickerCandidate, PlanProposedError, PlanRevisionProposedError, type PlanStep, type PlanStepRisk, type PlanToolOptions, type ProgressNotificationParams, type ProjectMemory, type RankPickerOptions, type ReadResourceResult, type ReadTranscriptResult, type ReasonixConfig, type ReconfigurableOptions, type RepairReport, type ReplayStats, type ResolvedHook, type RetryInfo, type RetryOptions, type Role, type RunCommandResult, type RunHooksOptions, type ScavengeOptions, type ScavengeResult, type SearchResult, type SectionResult, type SessionInfo, SessionStats, type SessionSummary, type ShellToolsOptions, type SpawnDistillation, type SseMcpSpec, SseTransport, type SseTransportOptions, type StdioMcpSpec, StdioTransport, type StdioTransportOptions, type StepCompletion, StormBreaker, type StreamChunk, type StreamWalkOptions, type StreamableHttpMcpSpec, StreamableHttpTransport, type StreamableHttpTransportOptions, type SubagentEvent, type SubagentResult, type SubagentResultLike, type SubagentSessionSummary, type SubagentSink, SubagentTelemetry, type SubagentToolOptions, type TodoItem, type TodoStatus, type TodoToolOptions, type ToolCall, type ToolCallContext, ToolCallRepair, type ToolCallRepairOptions, type ToolDefinition, type ToolFunctionSpec, ToolRegistry, type ToolSpec, type TranscriptMeta, type TranscriptRecord, type TruncationRepairResult, type TurnPair, type TurnStats, USER_MEMORY_DIR, Usage, type UsageAggregate, type UsageBucket, type UsageRecord, VERSION, VolatileScratch, type WebFetchOptions, type WebSearchOptions, type WebToolsOptions, aggregateUsage, analyzeSchema, appendSessionMessage, appendUsage, applyEditBlock, applyEditBlocks, applyMemoryStack, applyProjectMemory, applyUserMemory, bridgeMcpTools, bucketCacheHitRatio, bucketSavingsFraction, claudeEquivalentCost, codeSystemPrompt, compareVersions, computeReplayStats, computeSpawnDistillation, costUsd, countSpawnStorms, decideOutcome, defaultConfigPath, defaultUsageLogPath, deleteSession, detectAtPicker, detectInstallSource, detectNpmInstallPrefix, detectShellOperator, diffTranscripts, expandAtMentions, fetchWithRetry, findProjectMemoryPath, fixToolCallPairing, flattenMcpResult, flattenSchema, forkRegistryExcluding, formatCommandResult, formatHookOutcomeMessage, formatLogSize, formatLoopError, formatSearchResults, getLatestVersion, globalSettingsPath, healLoadedMessages, healLoadedMessagesByTokens, htmlToText, injectPowerShellUtf8, inputCostUsd, inspectMcpServer, isAllowed, isJsonRpcError, isNpxInstall, isPlausibleKey, listDirectory, listFilesSync, listFilesWithStatsAsync, listFilesWithStatsSync, listSessions, loadApiKey, loadBaseUrl, loadDotenv, loadExaApiKey, loadHooks, loadMetasoApiKey, loadPerplexityApiKey, loadSessionMessages, matchesTool, memoryEnabled, nestArguments, openTranscriptFile, outputCostUsd, parseAtQuery, parseBingResults, parseEditBlocks, parseMcpSpec, parseSearxngHtmlResults, parseTranscript, prepareSpawn, projectHash, projectSettingsPath, quoteForCmdExe, rankPickerCandidates, readConfig, readProjectMemory, readTranscript, readUsageLog, recordFromLoopEvent, redactKey, registerChoiceTool, registerFilesystemTools, registerMemoryTools, registerPlanTool, registerShellTools, registerSubagentTool, registerTodoTool, registerWebTools, renderMarkdown as renderDiffMarkdown, renderSummaryTable as renderDiffSummary, repairTruncatedJson, replayFromFile, resolveExecutable, resolveProjectMemoryWritePath, restoreSnapshots, runCommand, runHooks, sanitizeMemoryName, sanitizeName as sanitizeSessionName, saveApiKey, saveBaseUrl, scavengeToolCalls, sessionPath, sessionsDir, similarity, snapshotBeforeEdits, stripHallucinatedToolMarkup, summarizeSubagentSession, tokenizeCommand, truncateForModel, truncateForModelByTokens, walkFilesStream, webFetch, webSearch, withUtf8Codepage, writeConfig, writeMeta, writeRecord };
2641
+ export { AT_MENTION_PATTERN, AT_PICKER_PREFIX, type AggregateOptions, AppendOnlyLog, type AppendUsageInput, type ApplyResult, type ApplyStatus, type AtMentionExpansion, type AtMentionOptions, type BridgeOptions, type BridgeResult, CODE_SYSTEM_PROMPT, CacheFirstLoop, type CacheFirstLoopOptions, type CallToolResult, type ChatMessage, type ChatResponse, type ChoiceOption, ChoiceRequestedError, type ChoiceToolOptions, type CodeSystemPromptOptions, DEFAULT_AT_DIR_MAX_ENTRIES, DEFAULT_AT_MENTION_MAX_BYTES, DEFAULT_MAX_RESULT_CHARS, DEFAULT_MAX_RESULT_TOKENS, DEFAULT_PICKER_IGNORE_DIRS, DEFAULT_SPAWN_STORM_THRESHOLD, DeepSeekClient, type DeepSeekClientOptions, type RenderOptions as DiffRenderOptions, type DiffReport, type DiffSide, type DirEntry, type EditBlock, type EditSnapshot, type EventRole, type FileWithStats, type FilesystemToolsOptions, type FlattenDecision, type FlattenOptions, type GetLatestVersionOptions, type GetPromptResult, HOOK_EVENTS, HOOK_SETTINGS_DIRNAME, HOOK_SETTINGS_FILENAME, type HookConfig, type HookEvent, type HookOutcome, type HookPayload, type HookReport, type HookScope, type HookSettings, type HookSpawnInput, type HookSpawnResult, type HookSpawner, ImmutablePrefix, type ImmutablePrefixOptions, type InitializeResult, type InspectionReport, type InstallSource, type JSONSchema, type JsonRpcMessage, type JsonRpcRequest, type JsonRpcResponse, LATEST_CACHE_TTL_MS, LATEST_FETCH_TIMEOUT_MS, type ListDirectoryOptions, type ListFilesOptions, type ListPromptsResult, type ListResourcesResult, type ListToolsResult, type LoadHookSettingsOptions, type LoopAbortOptions, type LoopEvent, MCP_PROTOCOL_VERSION, MEMORY_INDEX_FILE, MEMORY_INDEX_MAX_CHARS, McpClient, type McpClientOptions, type McpContentBlock, type McpProgressHandler, type McpProgressInfo, type McpPrompt, type McpPromptArgument, type McpPromptMessage, type McpPromptResourceBlock, type McpResource, type McpResourceContents, type McpResourceContentsBlob, type McpResourceContentsText, type McpSpec, type McpTool, type McpToolSchema, type McpTransport, type MemoryEntry, type MemoryScope, MemoryStore, type MemoryStoreOptions, type MemoryToolsOptions, type MemoryType, type WriteInput as MemoryWriteInput, NeedsConfirmationError, PROJECT_MEMORY_FILE, PROJECT_MEMORY_FILES, PROJECT_MEMORY_MAX_CHARS, type PageContent, type ParsedAtQuery, type PickerCandidate, PlanProposedError, PlanRevisionProposedError, type PlanStep, type PlanStepRisk, type PlanToolOptions, type ProgressNotificationParams, type ProjectMemory, type RankPickerOptions, type ReadResourceResult, type ReadTranscriptResult, type ReasonixConfig, type ReconfigurableOptions, type RepairReport, type ReplayStats, type ResolvedHook, type RetryInfo, type RetryOptions, type Role, type RunCommandResult, type RunHooksOptions, type ScavengeOptions, type ScavengeResult, type SearchResult, type SectionResult, type SessionInfo, SessionStats, type SessionSummary, type ShellToolsOptions, type SpawnDistillation, type SseMcpSpec, SseTransport, type SseTransportOptions, type StdioMcpSpec, StdioTransport, type StdioTransportOptions, type StepCompletion, StormBreaker, type StreamChunk, type StreamWalkOptions, type StreamableHttpMcpSpec, StreamableHttpTransport, type StreamableHttpTransportOptions, type SubagentEvent, type SubagentResult, type SubagentResultLike, type SubagentSessionSummary, type SubagentSink, SubagentTelemetry, type SubagentToolOptions, type TodoItem, type TodoStatus, type TodoToolOptions, type ToolCall, type ToolCallContext, ToolCallRepair, type ToolCallRepairOptions, type ToolDefinition, type ToolFunctionSpec, ToolRegistry, type ToolSpec, type TranscriptMeta, type TranscriptRecord, type TruncationRepairResult, type TurnPair, type TurnStats, USER_MEMORY_DIR, Usage, type UsageAggregate, type UsageBucket, type UsageRecord, VERSION, VolatileScratch, type WebFetchOptions, type WebSearchOptions, type WebToolsOptions, aggregateUsage, analyzeSchema, appendSessionMessage, appendUsage, applyEditBlock, applyEditBlocks, applyMemoryStack, applyProjectMemory, applyUserMemory, bridgeMcpTools, bucketCacheHitRatio, bucketSavingsFraction, claudeEquivalentCost, codeSystemPrompt, compareVersions, computeReplayStats, computeSpawnDistillation, costUsd, countSpawnStorms, decideOutcome, defaultConfigPath, defaultUsageLogPath, deleteSession, detectAtPicker, detectInstallSource, detectNpmInstallPrefix, detectShellOperator, diffTranscripts, expandAtMentions, fetchWithRetry, findProjectMemoryPath, fixToolCallPairing, flattenMcpResult, flattenSchema, forkRegistryExcluding, formatCommandResult, formatHookOutcomeMessage, formatLogSize, formatLoopError, formatSearchResults, getLatestVersion, globalSettingsPath, healLoadedMessages, healLoadedMessagesByTokens, htmlToText, injectPowerShellUtf8, inputCostUsd, inspectMcpServer, isAllowed, isJsonRpcError, isNpxInstall, isPlausibleKey, listDirectory, listFilesSync, listFilesWithStatsAsync, listFilesWithStatsSync, listSessions, loadApiKey, loadBaseUrl, loadDotenv, loadExaApiKey, loadHooks, loadMetasoApiKey, loadPerplexityApiKey, loadSessionMessages, matchesTool, memoryEnabled, nestArguments, openTranscriptFile, outputCostUsd, parseAtQuery, parseBingResults, parseEditBlocks, parseMcpSpec, parseSearxngHtmlResults, parseTranscript, prepareSpawn, projectHash, projectSettingsPath, quoteForCmdExe, rankPickerCandidates, readConfig, readProjectMemory, readTranscript, readUsageLog, recordFromLoopEvent, redactKey, registerChoiceTool, registerFilesystemTools, registerMemoryTools, registerPlanTool, registerShellTools, registerSubagentTool, registerTodoTool, registerWebTools, renderMarkdown as renderDiffMarkdown, renderSummaryTable as renderDiffSummary, repairTruncatedJson, replayFromFile, resolveExecutable, resolveProjectMemoryWritePath, restoreSnapshots, runCommand, runHooks, sanitizeMemoryName, sanitizeName as sanitizeSessionName, saveApiKey, saveBaseUrl, scavengeToolCalls, sessionPath, sessionsDir, similarity, snapshotBeforeEdits, stripHallucinatedToolMarkup, summarizeSubagentSession, tokenizeCommand, truncateForModel, truncateForModelByTokens, walkFilesStream, webFetch, webSearch, withUtf8Codepage, writeConfig, writeMeta, writeRecord };