reasonix 0.49.0 → 0.50.1

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 (327) 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 +6 -3
  273. package/scripts/postinstall.mjs +12 -0
  274. package/dist/cli/acp-WFQIC6SO.js.map +0 -1
  275. package/dist/cli/chat-D32JGNVH.js +0 -51
  276. package/dist/cli/chunk-23ZPCIPR.js.map +0 -1
  277. package/dist/cli/chunk-EQATK2L2.js.map +0 -1
  278. package/dist/cli/chunk-HIYTRCSW.js.map +0 -1
  279. package/dist/cli/chunk-JNTMOX7G.js.map +0 -1
  280. package/dist/cli/chunk-LGEKVMMV.js +0 -59
  281. package/dist/cli/chunk-LGEKVMMV.js.map +0 -1
  282. package/dist/cli/chunk-MGTBP7GG.js.map +0 -1
  283. package/dist/cli/chunk-MQWO32ZD.js.map +0 -1
  284. package/dist/cli/chunk-QF32ROX2.js.map +0 -1
  285. package/dist/cli/chunk-QX5TWXRZ.js.map +0 -1
  286. package/dist/cli/chunk-RRXUIPWG.js.map +0 -1
  287. package/dist/cli/chunk-TEDWJKEI.js.map +0 -1
  288. package/dist/cli/chunk-U5XQDCK7.js.map +0 -1
  289. package/dist/cli/chunk-W46ZMNKO.js.map +0 -1
  290. package/dist/cli/chunk-WMTMMSXU.js.map +0 -1
  291. package/dist/cli/chunk-YEF7C4XI.js.map +0 -1
  292. package/dist/cli/chunk-ZWHSHFDP.js.map +0 -1
  293. package/dist/cli/code-R4IHI7SR.js.map +0 -1
  294. package/dist/cli/commit-AG5KB4YP.js.map +0 -1
  295. package/dist/cli/desktop-JGL6GORA.js.map +0 -1
  296. package/dist/cli/mcp-inspect-ZMYUNFDS.js.map +0 -1
  297. package/dist/cli/replay-4TP7ZUMZ.js.map +0 -1
  298. package/dist/cli/run-6MXQYBOE.js.map +0 -1
  299. package/dist/cli/server-Z3IMJNNI.js.map +0 -1
  300. package/dist/cli/setup-LHZELI6I.js.map +0 -1
  301. package/dist/cli/version-BIFONEUB.js +0 -33
  302. /package/dist/cli/{chat-D32JGNVH.js.map → chat-7WASPB4O.js.map} +0 -0
  303. /package/dist/cli/{chunk-GNS7BAT2.js.map → chunk-7WITYWKN.js.map} +0 -0
  304. /package/dist/cli/{chunk-DFX5ZH5L.js.map → chunk-AAHB2PFX.js.map} +0 -0
  305. /package/dist/cli/{chunk-PB3MAFEI.js.map → chunk-AJIZ5KFK.js.map} +0 -0
  306. /package/dist/cli/{chunk-6OWJV3YW.js.map → chunk-CAGKEGNE.js.map} +0 -0
  307. /package/dist/cli/{chunk-J2IHQGPQ.js.map → chunk-EZ57UEZQ.js.map} +0 -0
  308. /package/dist/cli/{chunk-ZAEJWKXB.js.map → chunk-GMSAB2TC.js.map} +0 -0
  309. /package/dist/cli/{chunk-7AST3QQ3.js.map → chunk-I4Q3QT4W.js.map} +0 -0
  310. /package/dist/cli/{chunk-O5LIHAMP.js.map → chunk-I6FBSTTR.js.map} +0 -0
  311. /package/dist/cli/{chunk-7JTKBJ2G.js.map → chunk-NLRC3DWQ.js.map} +0 -0
  312. /package/dist/cli/{chunk-PXBQ6IZ7.js.map → chunk-OPGWCKKU.js.map} +0 -0
  313. /package/dist/cli/{chunk-PEMG6CUB.js.map → chunk-TX652NBA.js.map} +0 -0
  314. /package/dist/cli/{chunk-TAIKVL35.js.map → chunk-WSBFVOCO.js.map} +0 -0
  315. /package/dist/cli/{chunk-ASOLXV67.js.map → chunk-X2BQZQEE.js.map} +0 -0
  316. /package/dist/cli/{chunk-E5WCLUIU.js.map → chunk-XJZWMU5P.js.map} +0 -0
  317. /package/dist/cli/{chunk-JGTX4RRQ.js.map → chunk-ZAXMJANP.js.map} +0 -0
  318. /package/dist/cli/{commands-DRHFCYMO.js.map → commands-NXTKSQTN.js.map} +0 -0
  319. /package/dist/cli/{doctor-VA3RHQLB.js.map → config-XK5WQGTS.js.map} +0 -0
  320. /package/dist/cli/{diff-4Z7ETWZO.js.map → diff-JNYX5BSZ.js.map} +0 -0
  321. /package/dist/cli/{prompt-MC3U5KRP.js.map → doctor-IKYLUFXX.js.map} +0 -0
  322. /package/dist/cli/{mcp-LZO4HXFA.js.map → mcp-BDJJWOCD.js.map} +0 -0
  323. /package/dist/cli/{mcp-browse-C3GXVMYZ.js.map → mcp-browse-NJRZDI6V.js.map} +0 -0
  324. /package/dist/cli/{stats-SUIJ3QWY.js.map → prompt-UTOIFUQC.js.map} +0 -0
  325. /package/dist/cli/{prune-sessions-OEPFH4N6.js.map → prune-sessions-UCUD4XAP.js.map} +0 -0
  326. /package/dist/cli/{sessions-NXQ5SAV7.js.map → sessions-FZTGRCM5.js.map} +0 -0
  327. /package/dist/cli/{version-BIFONEUB.js.map → version-LUVTWHLL.js.map} +0 -0
@@ -13,8 +13,8 @@ import {
13
13
  listCheckpoints,
14
14
  loadCheckpoint,
15
15
  restoreCheckpoint
16
- } from "./chunk-TEDWJKEI.js";
17
- import "./chunk-E5WCLUIU.js";
16
+ } from "./chunk-3RNFYDDM.js";
17
+ import "./chunk-XJZWMU5P.js";
18
18
  import {
19
19
  fetchSmitheryDetail,
20
20
  handleToFetchResult,
@@ -24,11 +24,11 @@ import {
24
24
  } from "./chunk-XJXDHAES.js";
25
25
  import {
26
26
  registerSemanticSearchTool
27
- } from "./chunk-TAIKVL35.js";
27
+ } from "./chunk-WSBFVOCO.js";
28
28
  import {
29
29
  BUILTIN_ALLOWLIST,
30
30
  lineDiff
31
- } from "./chunk-ZWHSHFDP.js";
31
+ } from "./chunk-6IUMTRFP.js";
32
32
  import {
33
33
  PROJECT_MEMORY_FILE,
34
34
  SKILLS_DIRNAME,
@@ -38,13 +38,13 @@ import {
38
38
  parseFrontmatter,
39
39
  resolveProjectMemoryWritePath,
40
40
  validateSkillFrontmatter
41
- } from "./chunk-JNTMOX7G.js";
41
+ } from "./chunk-ENFBF6HI.js";
42
42
  import "./chunk-PLHAZOLZ.js";
43
43
  import {
44
44
  checkOllamaStatus,
45
45
  pullOllamaModel,
46
46
  startOllamaDaemon
47
- } from "./chunk-PEMG6CUB.js";
47
+ } from "./chunk-TX652NBA.js";
48
48
  import {
49
49
  INDEX_DIR_NAME,
50
50
  buildIndex,
@@ -53,47 +53,51 @@ import {
53
53
  querySemantic,
54
54
  readIndexMeta,
55
55
  walkChunks
56
- } from "./chunk-DFX5ZH5L.js";
56
+ } from "./chunk-AAHB2PFX.js";
57
57
  import {
58
58
  HOOK_EVENTS,
59
59
  globalSettingsPath,
60
60
  loadHooks,
61
61
  projectSettingsPath
62
- } from "./chunk-PB3MAFEI.js";
62
+ } from "./chunk-AJIZ5KFK.js";
63
63
  import "./chunk-S4XVGLRW.js";
64
64
  import {
65
65
  deleteSession,
66
66
  listSessions,
67
67
  sessionPath,
68
68
  sessionsDir
69
- } from "./chunk-RRXUIPWG.js";
69
+ } from "./chunk-IK6WWRIX.js";
70
70
  import {
71
71
  aggregateUsage,
72
72
  bucketCacheHitRatio,
73
73
  formatLogSize,
74
74
  readUsageLog
75
- } from "./chunk-ZAEJWKXB.js";
75
+ } from "./chunk-GMSAB2TC.js";
76
76
  import {
77
77
  DEEPSEEK_PRICING,
78
78
  cacheSavingsUsd
79
- } from "./chunk-QX5TWXRZ.js";
79
+ } from "./chunk-FQSQFCBI.js";
80
80
  import {
81
81
  getLanguage,
82
82
  getSupportedLanguages,
83
83
  setLanguage
84
- } from "./chunk-YEF7C4XI.js";
84
+ } from "./chunk-PYIZZAVQ.js";
85
85
  import {
86
86
  DEFAULT_INDEX_EXCLUDES,
87
87
  DEFAULT_MAX_FILE_BYTES,
88
+ DEFAULT_MODEL,
88
89
  DEFAULT_RESPECT_GITIGNORE,
90
+ REASONING_EFFORT_VALUES,
89
91
  addProjectShellAllowed,
90
92
  clearProjectShellAllowed,
91
93
  isPlausibleKey,
94
+ isReasoningEffort,
92
95
  loadIndexConfig,
93
96
  loadIndexUserConfig,
94
97
  loadProjectShellAllowed,
95
98
  loadResolvedSkillPaths,
96
99
  loadSemanticEmbeddingUserConfig,
100
+ loadSubagentModels,
97
101
  normalizeSkillPathEntries,
98
102
  normalizeSkillPaths,
99
103
  readConfig,
@@ -102,11 +106,12 @@ import {
102
106
  removeProjectShellAllowed,
103
107
  resolveIndexConfig,
104
108
  resolveSemanticEmbeddingConfig,
109
+ saveEditMode,
105
110
  saveSemanticEmbeddingConfig,
106
111
  trustProjectHooks,
107
112
  webSearchEngine,
108
113
  writeConfig
109
- } from "./chunk-WMTMMSXU.js";
114
+ } from "./chunk-MXWPAPZW.js";
110
115
  import {
111
116
  VERSION
112
117
  } from "./chunk-XXC2BYTV.js";
@@ -183,12 +188,13 @@ function resolveAssetDir() {
183
188
  return candidates[0];
184
189
  }
185
190
  var ASSET_DIR = resolveAssetDir();
186
- var fileCache = /* @__PURE__ */ new Map();
187
- function loadCachedFile(path) {
191
+ var textCache = /* @__PURE__ */ new Map();
192
+ var binaryCache = /* @__PURE__ */ new Map();
193
+ function loadCachedText(path) {
188
194
  const fd = openSync(path, "r");
189
195
  try {
190
196
  const stat = fstatSync(fd);
191
- const cached = fileCache.get(path);
197
+ const cached = textCache.get(path);
192
198
  if (cached && cached.mtimeMs === stat.mtimeMs) return cached.body;
193
199
  const buf = Buffer.alloc(stat.size);
194
200
  let read = 0;
@@ -198,27 +204,73 @@ function loadCachedFile(path) {
198
204
  read += n;
199
205
  }
200
206
  const body = buf.toString("utf8", 0, read);
201
- fileCache.set(path, { body, mtimeMs: stat.mtimeMs });
207
+ textCache.set(path, { body, mtimeMs: stat.mtimeMs });
202
208
  return body;
203
209
  } finally {
204
210
  closeSync(fd);
205
211
  }
206
212
  }
213
+ function loadCachedBinary(path) {
214
+ const fd = openSync(path, "r");
215
+ try {
216
+ const stat = fstatSync(fd);
217
+ const cached = binaryCache.get(path);
218
+ if (cached && cached.mtimeMs === stat.mtimeMs) return cached.body;
219
+ const buf = Buffer.alloc(stat.size);
220
+ let read = 0;
221
+ while (read < stat.size) {
222
+ const n = readSync(fd, buf, read, stat.size - read, read);
223
+ if (n <= 0) break;
224
+ read += n;
225
+ }
226
+ binaryCache.set(path, { body: buf.slice(0, read), mtimeMs: stat.mtimeMs });
227
+ return buf.slice(0, read);
228
+ } finally {
229
+ closeSync(fd);
230
+ }
231
+ }
207
232
  function loadIndexTemplate() {
208
- return loadCachedFile(join(ASSET_DIR, "index.html"));
233
+ return loadCachedText(join(ASSET_DIR, "index.html"));
234
+ }
235
+ function injectTokenIntoChunkImports(body, token) {
236
+ return body.replace(
237
+ /(from\s*|import\s*)(["'])(\.\/[\w.-]+\.js)\2/g,
238
+ (_, kw, q, path) => `${kw}${q}${path}?token=${token}${q}`
239
+ );
209
240
  }
210
- function loadApp() {
211
- return loadCachedFile(join(ASSET_DIR, "dist", "app.js"));
241
+ function injectTokenIntoCssAssetUrls(body, token) {
242
+ return body.replace(
243
+ /url\((['"]?)(\/assets\/[\w./-]+\.(?:woff2?|ttf|otf|png|svg))(?:\?[^)'"]*)?\1\)/g,
244
+ (_, q, path) => `url(${q}${path}?token=${token}${q})`
245
+ );
246
+ }
247
+ function loadApp(token) {
248
+ const raw = loadCachedText(join(ASSET_DIR, "dist", "app.js"));
249
+ return injectTokenIntoChunkImports(raw, token);
250
+ }
251
+ function loadChunk(name, token) {
252
+ try {
253
+ const raw = loadCachedText(join(ASSET_DIR, "dist", name));
254
+ return injectTokenIntoChunkImports(raw, token);
255
+ } catch {
256
+ return null;
257
+ }
212
258
  }
213
259
  function loadAppMap() {
214
260
  try {
215
- return loadCachedFile(join(ASSET_DIR, "dist", "app.js.map"));
261
+ return loadCachedText(join(ASSET_DIR, "dist", "app.js.map"));
216
262
  } catch {
217
263
  return null;
218
264
  }
219
265
  }
220
- function loadCss() {
221
- return loadCachedFile(join(ASSET_DIR, "app.css"));
266
+ function loadCss(token) {
267
+ let raw;
268
+ try {
269
+ raw = loadCachedText(join(ASSET_DIR, "dist", "app.css"));
270
+ } catch {
271
+ raw = loadCachedText(join(ASSET_DIR, "app.css"));
272
+ }
273
+ return injectTokenIntoCssAssetUrls(raw, token);
222
274
  }
223
275
  function renderIndexHtml(token, mode) {
224
276
  const tpl = loadIndexTemplate();
@@ -226,22 +278,77 @@ function renderIndexHtml(token, mode) {
226
278
  return tpl.replaceAll("__REASONIX_TOKEN__", safeToken).replaceAll("__REASONIX_MODE__", mode);
227
279
  }
228
280
  var VENDOR_CSS_NAMES = /* @__PURE__ */ new Set(["vendor-hljs.css", "vendor-uplot.css"]);
229
- function loadVendorCss(name) {
230
- return loadCachedFile(join(ASSET_DIR, "dist", name));
281
+ function loadVendorCss(name, token) {
282
+ try {
283
+ return injectTokenIntoCssAssetUrls(loadCachedText(join(ASSET_DIR, "dist", name)), token);
284
+ } catch {
285
+ return null;
286
+ }
231
287
  }
232
- function serveAsset(name) {
288
+ var MIME_MAP = {
289
+ ".js": "application/javascript; charset=utf-8",
290
+ ".mjs": "application/javascript; charset=utf-8",
291
+ ".css": "text/css; charset=utf-8",
292
+ ".woff2": "font/woff2",
293
+ ".woff": "font/woff",
294
+ ".ttf": "font/ttf",
295
+ ".svg": "image/svg+xml",
296
+ ".png": "image/png",
297
+ ".ico": "image/x-icon",
298
+ ".json": "application/json; charset=utf-8"
299
+ };
300
+ var BINARY_EXTS = /* @__PURE__ */ new Set([".woff2", ".woff", ".ttf", ".png", ".ico"]);
301
+ function mimetypeFor(name) {
302
+ for (const [ext, mt] of Object.entries(MIME_MAP)) {
303
+ if (name.endsWith(ext)) return mt;
304
+ }
305
+ return null;
306
+ }
307
+ function isBinaryAsset(name) {
308
+ for (const ext of BINARY_EXTS) {
309
+ if (name.endsWith(ext)) return true;
310
+ }
311
+ return false;
312
+ }
313
+ function loadDistFile(name) {
314
+ const paths = [join(ASSET_DIR, "dist", "assets", name), join(ASSET_DIR, "dist", name)];
315
+ const binary = isBinaryAsset(name);
316
+ for (const p of paths) {
317
+ try {
318
+ return {
319
+ body: binary ? loadCachedBinary(p) : loadCachedText(p),
320
+ isBinary: binary
321
+ };
322
+ } catch {
323
+ }
324
+ }
325
+ return null;
326
+ }
327
+ function serveAsset(name, token = "") {
233
328
  if (name === "app.js") {
234
- return { body: loadApp(), contentType: "application/javascript; charset=utf-8" };
329
+ return { body: loadApp(token), contentType: "application/javascript; charset=utf-8" };
235
330
  }
236
331
  if (name === "app.js.map") {
237
332
  const body = loadAppMap();
238
333
  return body == null ? null : { body, contentType: "application/json; charset=utf-8" };
239
334
  }
240
335
  if (name === "app.css") {
241
- return { body: loadCss(), contentType: "text/css; charset=utf-8" };
336
+ return { body: loadCss(token), contentType: "text/css; charset=utf-8" };
337
+ }
338
+ if (/^vendor-[\w.-]+\.js$/.test(name)) {
339
+ const body = loadChunk(name, token);
340
+ if (body == null) return null;
341
+ return { body, contentType: "application/javascript; charset=utf-8" };
242
342
  }
243
343
  if (VENDOR_CSS_NAMES.has(name)) {
244
- return { body: loadVendorCss(name), contentType: "text/css; charset=utf-8" };
344
+ const body = loadVendorCss(name, token);
345
+ if (body == null) return null;
346
+ return { body, contentType: "text/css; charset=utf-8" };
347
+ }
348
+ const mt = mimetypeFor(name);
349
+ if (mt) {
350
+ const result = loadDistFile(name);
351
+ if (result != null) return { body: result.body, contentType: mt };
245
352
  }
246
353
  return null;
247
354
  }
@@ -262,6 +369,121 @@ async function handleAbort(method, _rest, _body, ctx) {
262
369
  return { status: 202, body: { aborted: true } };
263
370
  }
264
371
 
372
+ // src/server/api/browse.ts
373
+ import { execSync } from "child_process";
374
+ import { existsSync, readdirSync, statSync } from "fs";
375
+ import { homedir } from "os";
376
+ import { dirname as dirname2, isAbsolute, resolve } from "path";
377
+ var SKIP_DIRS = /* @__PURE__ */ new Set([
378
+ "node_modules",
379
+ ".git",
380
+ ".svn",
381
+ ".hg",
382
+ ".next",
383
+ ".cache",
384
+ "__pycache__",
385
+ ".venv",
386
+ "venv",
387
+ ".pytest_cache",
388
+ ".mypy_cache",
389
+ ".tox",
390
+ "dist",
391
+ "build"
392
+ ]);
393
+ var cachedDriveList = null;
394
+ function listWindowsDrives() {
395
+ if (cachedDriveList) return cachedDriveList;
396
+ try {
397
+ const raw = execSync("wmic logicaldisk get deviceid /value", {
398
+ encoding: "utf8",
399
+ timeout: 1500
400
+ });
401
+ const drives = raw.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.startsWith("DeviceID=")).map((l) => `${l.slice("DeviceID=".length)}\\`).filter((d) => existsSync(d));
402
+ cachedDriveList = drives.length > 0 ? drives : ["C:\\"];
403
+ } catch {
404
+ const found = [];
405
+ for (const letter of "CDEFGHIJKLMNOPQRSTUVWXYZ") {
406
+ const p = `${letter}:\\`;
407
+ try {
408
+ if (existsSync(p)) found.push(p);
409
+ } catch {
410
+ }
411
+ }
412
+ cachedDriveList = found.length > 0 ? found : ["C:\\"];
413
+ }
414
+ return cachedDriveList;
415
+ }
416
+ function isWindowsDriveRoot(p) {
417
+ return /^[A-Za-z]:[\\/]?$/.test(p);
418
+ }
419
+ function defaultRoot() {
420
+ try {
421
+ return homedir();
422
+ } catch {
423
+ return process.platform === "win32" ? "C:\\" : "/";
424
+ }
425
+ }
426
+ function readSubdirs(path) {
427
+ let names;
428
+ try {
429
+ names = readdirSync(path);
430
+ } catch {
431
+ return [];
432
+ }
433
+ const out = [];
434
+ for (const name of names) {
435
+ if (SKIP_DIRS.has(name)) continue;
436
+ if (name.startsWith(".") && name.length > 1) continue;
437
+ const full = resolve(path, name);
438
+ try {
439
+ if (!statSync(full).isDirectory()) continue;
440
+ } catch {
441
+ continue;
442
+ }
443
+ out.push({ name, full });
444
+ }
445
+ out.sort((a, b) => a.name.localeCompare(b.name, void 0, { sensitivity: "base" }));
446
+ return out;
447
+ }
448
+ async function handleBrowse(method, _rest, _body, _ctx, query) {
449
+ if (method !== "GET") return { status: 405, body: { error: "GET only" } };
450
+ const rawPath = (query.get("path") ?? "").trim();
451
+ const isWin = process.platform === "win32";
452
+ if (!rawPath) {
453
+ const home = defaultRoot();
454
+ const entries = readSubdirs(home);
455
+ if (isWin) {
456
+ const drives = listWindowsDrives().filter((d) => resolve(d) !== resolve(home)).map((d) => ({ name: d, full: d }));
457
+ entries.unshift(...drives);
458
+ }
459
+ const result2 = { path: home, parent: null, entries };
460
+ return { status: 200, body: result2 };
461
+ }
462
+ if (!isAbsolute(rawPath)) {
463
+ return { status: 400, body: { error: "path must be absolute" } };
464
+ }
465
+ const absolute = resolve(rawPath);
466
+ if (!existsSync(absolute)) {
467
+ return { status: 404, body: { error: `no such directory: ${absolute}` } };
468
+ }
469
+ let isDir = false;
470
+ try {
471
+ isDir = statSync(absolute).isDirectory();
472
+ } catch {
473
+ }
474
+ if (!isDir) {
475
+ return { status: 400, body: { error: `not a directory: ${absolute}` } };
476
+ }
477
+ let parent = dirname2(absolute);
478
+ if (parent === absolute || isWin && isWindowsDriveRoot(absolute)) parent = null;
479
+ const result = {
480
+ path: absolute,
481
+ parent,
482
+ entries: readSubdirs(absolute)
483
+ };
484
+ return { status: 200, body: result };
485
+ }
486
+
265
487
  // src/server/api/checkpoint-create.ts
266
488
  async function handleCheckpointCreate(method, _rest, body, ctx) {
267
489
  if (method !== "POST") return { status: 405, body: { error: "POST only" } };
@@ -276,12 +498,12 @@ async function handleCheckpointCreate(method, _rest, body, ctx) {
276
498
  if (!parsed.name) return { status: 400, body: { error: "missing name" } };
277
499
  let paths;
278
500
  try {
279
- const { execSync: execSync2 } = await import("child_process");
501
+ const { execSync: execSync3 } = await import("child_process");
280
502
  const env = { ...process.env };
281
503
  for (const k of Object.keys(env)) {
282
504
  if (k.startsWith("GIT_")) delete env[k];
283
505
  }
284
- const stdout = execSync2("git ls-files --cached --others --exclude-standard", {
506
+ const stdout = execSync3("git ls-files --cached --others --exclude-standard", {
285
507
  cwd: rootDir,
286
508
  env,
287
509
  encoding: "utf8",
@@ -337,7 +559,7 @@ async function handleCheckpointDelete(method, _rest, body, ctx) {
337
559
 
338
560
  // src/server/api/checkpoint-diffs.ts
339
561
  import { readFileSync as readFileSync2 } from "fs";
340
- import { resolve } from "path";
562
+ import { resolve as resolve2 } from "path";
341
563
  async function handleCheckpointDiffs(method, _rest, _body, ctx, query = new URLSearchParams()) {
342
564
  if (method !== "GET") return { status: 405, body: { error: "GET only" } };
343
565
  const rootDir = ctx.getCurrentCwd?.();
@@ -348,7 +570,7 @@ async function handleCheckpointDiffs(method, _rest, _body, ctx, query = new URLS
348
570
  if (!checkpoint) return { status: 404, body: { error: "checkpoint not found" } };
349
571
  const diffs = [];
350
572
  for (const snap of checkpoint.files) {
351
- const absPath = resolve(rootDir, snap.path);
573
+ const absPath = resolve2(rootDir, snap.path);
352
574
  let currentContent = null;
353
575
  try {
354
576
  currentContent = readFileSync2(absPath, "utf8");
@@ -484,9 +706,9 @@ async function handleEditMode(method, _rest, body, ctx) {
484
706
 
485
707
  // src/server/api/file-read.ts
486
708
  import { closeSync as closeSync2, fstatSync as fstatSync2, openSync as openSync2, readSync as readSync2 } from "fs";
487
- import { extname, join as join2, resolve as resolve2, sep } from "path";
709
+ import { extname, join as join2, resolve as resolve3, sep } from "path";
488
710
  var MAX_FILE_SIZE = 500 * 1024;
489
- var BINARY_EXTS = /* @__PURE__ */ new Set([
711
+ var BINARY_EXTS2 = /* @__PURE__ */ new Set([
490
712
  ".png",
491
713
  ".jpg",
492
714
  ".jpeg",
@@ -522,13 +744,13 @@ async function handleFileRead(method, rest, _body, ctx) {
522
744
  if (!filePath) return { status: 400, body: { error: "file path required" } };
523
745
  const cwd = ctx.getCurrentCwd?.();
524
746
  if (!cwd) return { status: 503, body: { error: "no project directory available" } };
525
- const resolved = resolve2(join2(cwd, filePath));
526
- const normalizedCwd = resolve2(cwd);
747
+ const resolved = resolve3(join2(cwd, filePath));
748
+ const normalizedCwd = resolve3(cwd);
527
749
  if (!resolved.startsWith(normalizedCwd + sep) && resolved !== normalizedCwd) {
528
750
  return { status: 403, body: { error: "path escapes workspace" } };
529
751
  }
530
752
  const ext = extname(filePath).toLowerCase();
531
- if (BINARY_EXTS.has(ext)) {
753
+ if (BINARY_EXTS2.has(ext)) {
532
754
  return { status: 400, body: { error: "binary file not supported" } };
533
755
  }
534
756
  let fd;
@@ -561,11 +783,11 @@ async function handleFileRead(method, rest, _body, ctx) {
561
783
  }
562
784
 
563
785
  // src/server/api/files.ts
564
- import { existsSync, readdirSync, statSync } from "fs";
786
+ import { existsSync as existsSync2, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
565
787
  import { extname as extname2, join as join3, relative, sep as sep2 } from "path";
566
788
  var RESULT_CAP = 50;
567
789
  var MAX_DEPTH = 4;
568
- var SKIP_DIRS = /* @__PURE__ */ new Set([
790
+ var SKIP_DIRS2 = /* @__PURE__ */ new Set([
569
791
  "node_modules",
570
792
  ".git",
571
793
  ".reasonix",
@@ -598,7 +820,7 @@ var SKIP_EXTS = /* @__PURE__ */ new Set([
598
820
  async function handleFiles(method, _rest, body, ctx) {
599
821
  if (method !== "POST") return { status: 405, body: { error: "POST only" } };
600
822
  const cwd = ctx.getCurrentCwd?.();
601
- if (!cwd || !existsSync(cwd)) {
823
+ if (!cwd || !existsSync2(cwd)) {
602
824
  return { status: 503, body: { error: "@-mention picker requires a code-mode session" } };
603
825
  }
604
826
  let parsed;
@@ -619,18 +841,18 @@ function walk(root, prefix) {
619
841
  if (depth > MAX_DEPTH) continue;
620
842
  let names;
621
843
  try {
622
- names = readdirSync(path);
844
+ names = readdirSync2(path);
623
845
  } catch {
624
846
  continue;
625
847
  }
626
848
  for (const name of names) {
627
849
  if (out.length >= RESULT_CAP) break;
628
850
  if (name.startsWith(".") && depth === 0) continue;
629
- if (SKIP_DIRS.has(name)) continue;
851
+ if (SKIP_DIRS2.has(name)) continue;
630
852
  const full = join3(path, name);
631
853
  let st;
632
854
  try {
633
- st = statSync(full);
855
+ st = statSync2(full);
634
856
  } catch {
635
857
  continue;
636
858
  }
@@ -649,7 +871,7 @@ function walk(root, prefix) {
649
871
  }
650
872
 
651
873
  // src/server/api/git-diffs.ts
652
- import { execSync } from "child_process";
874
+ import { execSync as execSync2 } from "child_process";
653
875
  function parseGitDiff(stdout) {
654
876
  const files = [];
655
877
  const blocks = stdout.split(/\ndiff --git /).filter(Boolean);
@@ -679,17 +901,17 @@ async function handleGitDiffs(method, _rest, _body, _ctx) {
679
901
  let stagedStdout;
680
902
  let untracked;
681
903
  try {
682
- diffStdout = execSync("git diff --no-color --unified=3 HEAD", {
904
+ diffStdout = execSync2("git diff --no-color --unified=3 HEAD", {
683
905
  encoding: "utf8",
684
906
  maxBuffer: 10 * 1024 * 1024,
685
907
  windowsHide: true
686
908
  });
687
- stagedStdout = execSync("git diff --no-color --unified=3 --cached", {
909
+ stagedStdout = execSync2("git diff --no-color --unified=3 --cached", {
688
910
  encoding: "utf8",
689
911
  maxBuffer: 10 * 1024 * 1024,
690
912
  windowsHide: true
691
913
  });
692
- untracked = execSync("git ls-files --others --exclude-standard", {
914
+ untracked = execSync2("git ls-files --others --exclude-standard", {
693
915
  encoding: "utf8",
694
916
  maxBuffer: 1024 * 1024,
695
917
  windowsHide: true
@@ -722,28 +944,28 @@ ${stagedStdout}` : "");
722
944
  }
723
945
 
724
946
  // src/server/api/health.ts
725
- import { existsSync as existsSync2, readdirSync as readdirSync2, statSync as statSync2 } from "fs";
726
- import { homedir } from "os";
947
+ import { existsSync as existsSync3, readdirSync as readdirSync3, statSync as statSync3 } from "fs";
948
+ import { homedir as homedir2 } from "os";
727
949
  import { join as join4 } from "path";
728
950
  function dirSize(path) {
729
- if (!existsSync2(path)) return { path, exists: false, fileCount: 0, totalBytes: 0 };
951
+ if (!existsSync3(path)) return { path, exists: false, fileCount: 0, totalBytes: 0 };
730
952
  let fileCount = 0;
731
953
  let totalBytes = 0;
732
954
  try {
733
- const entries = readdirSync2(path);
955
+ const entries = readdirSync3(path);
734
956
  for (const name of entries) {
735
957
  const full = join4(path, name);
736
958
  try {
737
- const s = statSync2(full);
959
+ const s = statSync3(full);
738
960
  if (s.isFile()) {
739
961
  fileCount++;
740
962
  totalBytes += s.size;
741
963
  } else if (s.isDirectory()) {
742
964
  try {
743
- const inner = readdirSync2(full);
965
+ const inner = readdirSync3(full);
744
966
  for (const child of inner) {
745
967
  try {
746
- const cs = statSync2(join4(full, child));
968
+ const cs = statSync3(join4(full, child));
747
969
  if (cs.isFile()) {
748
970
  fileCount++;
749
971
  totalBytes += cs.size;
@@ -766,15 +988,15 @@ async function handleHealth(method, _rest, _body, ctx) {
766
988
  if (method !== "GET") {
767
989
  return { status: 405, body: { error: "GET only" } };
768
990
  }
769
- const home = homedir();
991
+ const home = homedir2();
770
992
  const reasonixHome = join4(home, ".reasonix");
771
993
  const sessionsStat = dirSize(join4(reasonixHome, "sessions"));
772
994
  const memoryStat = dirSize(join4(reasonixHome, "memory"));
773
995
  const semanticStat = dirSize(join4(reasonixHome, "semantic"));
774
996
  let usageBytes = 0;
775
- if (existsSync2(ctx.usageLogPath)) {
997
+ if (existsSync3(ctx.usageLogPath)) {
776
998
  try {
777
- usageBytes = statSync2(ctx.usageLogPath).size;
999
+ usageBytes = statSync3(ctx.usageLogPath).size;
778
1000
  } catch {
779
1001
  }
780
1002
  }
@@ -811,15 +1033,15 @@ async function handleHealth(method, _rest, _body, ctx) {
811
1033
  }
812
1034
 
813
1035
  // src/server/api/hooks.ts
814
- import { existsSync as existsSync4, mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
815
- import { dirname as dirname2 } from "path";
1036
+ import { existsSync as existsSync5, mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
1037
+ import { dirname as dirname3 } from "path";
816
1038
 
817
1039
  // src/server/api/hooks-events.ts
818
- import { existsSync as existsSync3 } from "fs";
1040
+ import { existsSync as existsSync4 } from "fs";
819
1041
  var HOOK_LOG_CAP = 12;
820
1042
  function readRecentHookRuns(now = Date.now(), sessionsDirOverride) {
821
1043
  const dir = sessionsDirOverride ?? sessionsDir();
822
- if (!existsSync3(dir)) return null;
1044
+ if (!existsSync4(dir)) return null;
823
1045
  const files = recentEventFiles(dir, now);
824
1046
  if (files.length === 0) return null;
825
1047
  const rows = [];
@@ -852,7 +1074,7 @@ function parseBody2(raw) {
852
1074
  }
853
1075
  }
854
1076
  function readSettingsFile(path) {
855
- if (!existsSync4(path)) return {};
1077
+ if (!existsSync5(path)) return {};
856
1078
  try {
857
1079
  const raw = readFileSync3(path, "utf8");
858
1080
  const parsed = JSON.parse(raw);
@@ -864,7 +1086,7 @@ function readSettingsFile(path) {
864
1086
  function writeSettingsFile(path, hooksBlock) {
865
1087
  const existing = readSettingsFile(path);
866
1088
  existing.hooks = hooksBlock;
867
- mkdirSync(dirname2(path), { recursive: true });
1089
+ mkdirSync(dirname3(path), { recursive: true });
868
1090
  writeFileSync(path, `${JSON.stringify(existing, null, 2)}
869
1091
  `, "utf8");
870
1092
  }
@@ -1414,24 +1636,24 @@ async function handleMcp(method, rest, body, ctx, query = new URLSearchParams())
1414
1636
  // src/server/api/memory.ts
1415
1637
  import { createHash } from "crypto";
1416
1638
  import {
1417
- existsSync as existsSync5,
1639
+ existsSync as existsSync6,
1418
1640
  mkdirSync as mkdirSync2,
1419
1641
  readFileSync as readFileSync4,
1420
- readdirSync as readdirSync3,
1421
- statSync as statSync3,
1642
+ readdirSync as readdirSync4,
1643
+ statSync as statSync4,
1422
1644
  unlinkSync,
1423
1645
  writeFileSync as writeFileSync2
1424
1646
  } from "fs";
1425
- import { homedir as homedir2 } from "os";
1426
- import { basename, dirname as dirname3, join as join5, resolve as resolvePath } from "path";
1647
+ import { homedir as homedir3 } from "os";
1648
+ import { basename, dirname as dirname4, join as join5, resolve as resolvePath } from "path";
1427
1649
  function projectHash(rootDir) {
1428
1650
  return createHash("sha1").update(resolvePath(rootDir)).digest("hex").slice(0, 16);
1429
1651
  }
1430
1652
  function globalMemoryDir() {
1431
- return join5(homedir2(), ".reasonix", "memory", "global");
1653
+ return join5(homedir3(), ".reasonix", "memory", "global");
1432
1654
  }
1433
1655
  function projectMemoryDir(rootDir) {
1434
- return join5(homedir2(), ".reasonix", "memory", projectHash(rootDir));
1656
+ return join5(homedir3(), ".reasonix", "memory", projectHash(rootDir));
1435
1657
  }
1436
1658
  function parseBody6(raw) {
1437
1659
  if (!raw) return {};
@@ -1444,10 +1666,10 @@ function parseBody6(raw) {
1444
1666
  }
1445
1667
  var SAFE_NAME = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;
1446
1668
  function listMemoryFiles(dir) {
1447
- if (!existsSync5(dir)) return [];
1669
+ if (!existsSync6(dir)) return [];
1448
1670
  try {
1449
- return readdirSync3(dir).filter((f) => f.endsWith(".md")).map((f) => {
1450
- const stat = statSync3(join5(dir, f));
1671
+ return readdirSync4(dir).filter((f) => f.endsWith(".md")).map((f) => {
1672
+ const stat = statSync4(join5(dir, f));
1451
1673
  return {
1452
1674
  name: f.replace(/\.md$/, ""),
1453
1675
  size: stat.size,
@@ -1498,7 +1720,7 @@ async function handleMemory(method, rest, body, ctx) {
1498
1720
  const dir = scope === "global" ? globalDir : projectMemDir;
1499
1721
  if (!dir) return { status: 503, body: { error: "no project root for project-mem" } };
1500
1722
  const path = join5(dir, `${name}.md`);
1501
- if (!existsSync5(path)) return { status: 404, body: { error: "not found" } };
1723
+ if (!existsSync6(path)) return { status: 404, body: { error: "not found" } };
1502
1724
  return { status: 200, body: { path, body: readFileSync4(path, "utf8") } };
1503
1725
  }
1504
1726
  return { status: 400, body: { error: "bad scope or name" } };
@@ -1511,7 +1733,7 @@ async function handleMemory(method, rest, body, ctx) {
1511
1733
  if (scope === "project") {
1512
1734
  if (!cwd) return { status: 503, body: { error: "no active project" } };
1513
1735
  const path = resolveProjectMemoryWritePath(cwd);
1514
- mkdirSync2(dirname3(path), { recursive: true });
1736
+ mkdirSync2(dirname4(path), { recursive: true });
1515
1737
  writeFileSync2(path, contents, "utf8");
1516
1738
  ctx.audit?.({ ts: Date.now(), action: "save-memory", payload: { scope, path } });
1517
1739
  return { status: 200, body: { saved: true, path } };
@@ -1532,7 +1754,7 @@ async function handleMemory(method, rest, body, ctx) {
1532
1754
  const dir = scope === "global" ? globalDir : projectMemDir;
1533
1755
  if (!dir) return { status: 503, body: { error: "no project root for project-mem" } };
1534
1756
  const path = join5(dir, `${name}.md`);
1535
- if (existsSync5(path)) {
1757
+ if (existsSync6(path)) {
1536
1758
  unlinkSync(path);
1537
1759
  ctx.audit?.({ ts: Date.now(), action: "delete-memory", payload: { scope, name, path } });
1538
1760
  return { status: 200, body: { deleted: true } };
@@ -1752,14 +1974,14 @@ async function handleModels(method, _rest, _body, ctx) {
1752
1974
  }
1753
1975
 
1754
1976
  // src/server/api/cockpit-events.ts
1755
- import { existsSync as existsSync6 } from "fs";
1977
+ import { existsSync as existsSync7 } from "fs";
1756
1978
  var DAY_MS = 864e5;
1757
1979
  var RECENT_FILES_CAP = 8;
1758
1980
  var PLAN_FEED_CAP = 4;
1759
1981
  var TOOL_FEED_CAP = 6;
1760
1982
  function computeEventsCockpit(now = Date.now(), sessionsDirOverride) {
1761
1983
  const dir = sessionsDirOverride ?? sessionsDir();
1762
- if (!existsSync6(dir)) {
1984
+ if (!existsSync7(dir)) {
1763
1985
  return { toolCalls24h: null, recentPlans: null, toolActivity: null };
1764
1986
  }
1765
1987
  const files = recentEventFiles(dir, now, RECENT_FILES_CAP);
@@ -2002,8 +2224,7 @@ async function handleOverview(method, _rest, _body, ctx) {
2002
2224
  pendingEdits: ctx.getPendingEditCount?.() ?? null,
2003
2225
  mcpServerCount: ctx.getMcpServers?.().length ?? null,
2004
2226
  toolCount: ctx.tools ? ctx.tools.size : null,
2005
- preset: cfg.preset ?? "auto",
2006
- reasoningEffort: cfg.reasoningEffort ?? "max",
2227
+ reasoningEffort: isReasoningEffort(cfg.reasoningEffort) ? cfg.reasoningEffort : "high",
2007
2228
  budgetUsd: ctx.loop?.budgetUsd ?? null,
2008
2229
  stats: ctx.getStats?.() ?? null,
2009
2230
  semanticIndexExists,
@@ -2142,10 +2363,10 @@ async function handlePlans(method, _rest, _body, _ctx) {
2142
2363
  }
2143
2364
 
2144
2365
  // src/server/api/project-tree.ts
2145
- import { existsSync as existsSync7, readdirSync as readdirSync4, statSync as statSync4 } from "fs";
2366
+ import { existsSync as existsSync8, readdirSync as readdirSync5, statSync as statSync5 } from "fs";
2146
2367
  import { extname as extname3, join as join6, relative as relative2, sep as sep3 } from "path";
2147
2368
  var MAX_DEPTH2 = 6;
2148
- var SKIP_DIRS2 = /* @__PURE__ */ new Set([
2369
+ var SKIP_DIRS3 = /* @__PURE__ */ new Set([
2149
2370
  "node_modules",
2150
2371
  ".git",
2151
2372
  ".reasonix",
@@ -2178,7 +2399,7 @@ var SKIP_EXTS2 = /* @__PURE__ */ new Set([
2178
2399
  async function handleProjectTree(method, _rest, _body, ctx) {
2179
2400
  if (method !== "GET") return { status: 405, body: { error: "GET only" } };
2180
2401
  const cwd = ctx.getCurrentCwd?.();
2181
- if (!cwd || !existsSync7(cwd)) {
2402
+ if (!cwd || !existsSync8(cwd)) {
2182
2403
  return { status: 503, body: { error: "no project directory available" } };
2183
2404
  }
2184
2405
  const tree = buildTree(cwd, cwd, 0);
@@ -2188,7 +2409,7 @@ function buildTree(root, dirPath, depth) {
2188
2409
  if (depth > MAX_DEPTH2) return [];
2189
2410
  let names;
2190
2411
  try {
2191
- names = readdirSync4(dirPath);
2412
+ names = readdirSync5(dirPath);
2192
2413
  } catch {
2193
2414
  return [];
2194
2415
  }
@@ -2196,11 +2417,11 @@ function buildTree(root, dirPath, depth) {
2196
2417
  const dirs = [];
2197
2418
  const files = [];
2198
2419
  for (const name of names) {
2199
- if (SKIP_DIRS2.has(name)) continue;
2420
+ if (SKIP_DIRS3.has(name)) continue;
2200
2421
  const full = join6(dirPath, name);
2201
2422
  let st;
2202
2423
  try {
2203
- st = statSync4(full);
2424
+ st = statSync5(full);
2204
2425
  } catch {
2205
2426
  continue;
2206
2427
  }
@@ -2670,7 +2891,7 @@ function isAbortError(err) {
2670
2891
  }
2671
2892
 
2672
2893
  // src/server/api/sessions.ts
2673
- import { existsSync as existsSync8, readFileSync as readFileSync5 } from "fs";
2894
+ import { existsSync as existsSync9, readFileSync as readFileSync5 } from "fs";
2674
2895
  function parseTranscript(path, maxBytes = 4 * 1024 * 1024) {
2675
2896
  let raw;
2676
2897
  try {
@@ -2688,8 +2909,23 @@ function parseTranscript(path, maxBytes = 4 * 1024 * 1024) {
2688
2909
  const msg = { role };
2689
2910
  if (typeof rec.content === "string") msg.content = rec.content;
2690
2911
  else if (rec.content !== void 0) msg.content = JSON.stringify(rec.content);
2912
+ if (typeof rec.reasoning_content === "string") msg.reasoning = rec.reasoning_content;
2913
+ if (Array.isArray(rec.tool_calls)) {
2914
+ const calls = [];
2915
+ for (const c of rec.tool_calls) {
2916
+ const fn = c?.function ?? {};
2917
+ const id = typeof c?.id === "string" ? c.id : "";
2918
+ const name = typeof fn.name === "string" ? fn.name : "";
2919
+ const args = typeof fn.arguments === "string" ? fn.arguments : "";
2920
+ if (id || name) calls.push({ id, name, arguments: args });
2921
+ }
2922
+ if (calls.length > 0) msg.toolCalls = calls;
2923
+ }
2924
+ if (typeof rec.tool_call_id === "string") msg.toolCallId = rec.tool_call_id;
2925
+ else if (typeof rec.toolCallId === "string") msg.toolCallId = rec.toolCallId;
2691
2926
  if (typeof rec.tool_name === "string") msg.toolName = rec.tool_name;
2692
- if (typeof rec.toolName === "string") msg.toolName = rec.toolName;
2927
+ else if (typeof rec.toolName === "string") msg.toolName = rec.toolName;
2928
+ else if (typeof rec.name === "string" && role === "tool") msg.toolName = rec.name;
2693
2929
  out.push(msg);
2694
2930
  } catch {
2695
2931
  }
@@ -2698,7 +2934,8 @@ function parseTranscript(path, maxBytes = 4 * 1024 * 1024) {
2698
2934
  }
2699
2935
  async function handleSessions(method, rest, _body, ctx) {
2700
2936
  if (method === "GET" && rest.length === 0) {
2701
- const sessions = listSessions();
2937
+ const workspaceFilter = ctx.getCurrentCwd?.();
2938
+ const sessions = workspaceFilter ? listSessions({ workspaceFilter }) : listSessions();
2702
2939
  const currentName2 = ctx.getSessionName?.() ?? null;
2703
2940
  return {
2704
2941
  status: 200,
@@ -2708,7 +2945,8 @@ async function handleSessions(method, rest, _body, ctx) {
2708
2945
  path: s.path,
2709
2946
  size: s.size,
2710
2947
  messageCount: s.messageCount,
2711
- mtime: s.mtime.getTime()
2948
+ mtime: s.mtime.getTime(),
2949
+ summary: s.meta?.summary
2712
2950
  })),
2713
2951
  currentSession: currentName2,
2714
2952
  canSwitch: Boolean(ctx.switchSession)
@@ -2724,7 +2962,7 @@ async function handleSessions(method, rest, _body, ctx) {
2724
2962
  }
2725
2963
  const result = ctx.switchSession(void 0);
2726
2964
  if (!result.ok) return { status: 500, body: { error: result.reason } };
2727
- return { status: 200, body: { ok: true } };
2965
+ return { status: 200, body: { ok: true, name: ctx.getSessionName?.() ?? null } };
2728
2966
  }
2729
2967
  if (rest.length === 0) {
2730
2968
  return { status: 405, body: { error: `method ${method} not supported on /sessions` } };
@@ -2739,7 +2977,7 @@ async function handleSessions(method, rest, _body, ctx) {
2739
2977
  body: { error: "live session swap requires an attached CLI session." }
2740
2978
  };
2741
2979
  }
2742
- if (!existsSync8(path)) return { status: 404, body: { error: `no such session: ${name}` } };
2980
+ if (!existsSync9(path)) return { status: 404, body: { error: `no such session: ${name}` } };
2743
2981
  const result = ctx.switchSession(name);
2744
2982
  if (!result.ok) return { status: 500, body: { error: result.reason } };
2745
2983
  return { status: 200, body: { ok: true } };
@@ -2754,7 +2992,7 @@ async function handleSessions(method, rest, _body, ctx) {
2754
2992
  body: { error: "cannot delete the currently-active session \u2014 switch away first." }
2755
2993
  };
2756
2994
  }
2757
- if (!existsSync8(path)) return { status: 404, body: { error: `no such session: ${name}` } };
2995
+ if (!existsSync9(path)) return { status: 404, body: { error: `no such session: ${name}` } };
2758
2996
  const removed = deleteSession(name);
2759
2997
  if (!removed) return { status: 500, body: { error: `failed to delete ${name}` } };
2760
2998
  ctx.audit?.({ ts: Date.now(), action: "delete-session", payload: { name } });
@@ -2764,7 +3002,7 @@ async function handleSessions(method, rest, _body, ctx) {
2764
3002
  if (rest.length !== 1) {
2765
3003
  return { status: 405, body: { error: `method ${method} not supported on this path` } };
2766
3004
  }
2767
- if (!existsSync8(path)) return { status: 404, body: { error: `no such session: ${name}` } };
3005
+ if (!existsSync9(path)) return { status: 404, body: { error: `no such session: ${name}` } };
2768
3006
  const messages = parseTranscript(path);
2769
3007
  return {
2770
3008
  status: 200,
@@ -2775,7 +3013,6 @@ async function handleSessions(method, rest, _body, ctx) {
2775
3013
  }
2776
3014
 
2777
3015
  // src/server/api/settings.ts
2778
- import { appendFileSync } from "fs";
2779
3016
  function parseBody9(raw) {
2780
3017
  if (!raw) return {};
2781
3018
  try {
@@ -2785,8 +3022,6 @@ function parseBody9(raw) {
2785
3022
  return {};
2786
3023
  }
2787
3024
  }
2788
- var VALID_PRESETS = /* @__PURE__ */ new Set(["auto", "flash", "pro", "fast", "smart", "max"]);
2789
- var VALID_EFFORTS = /* @__PURE__ */ new Set(["high", "max"]);
2790
3025
  var VALID_WEB_SEARCH_ENGINES = /* @__PURE__ */ new Set([
2791
3026
  "bing",
2792
3027
  "searxng",
@@ -2795,19 +3030,7 @@ var VALID_WEB_SEARCH_ENGINES = /* @__PURE__ */ new Set([
2795
3030
  "perplexity",
2796
3031
  "exa"
2797
3032
  ]);
2798
- function debugLogPresetWriteFromDashboard(preset) {
2799
- const debugPath = process.env.REASONIX_DEBUG_PRESET;
2800
- if (!debugPath) return;
2801
- try {
2802
- const stack = new Error("trace").stack ?? "";
2803
- const line = `${(/* @__PURE__ */ new Date()).toISOString()} dashboard PATCH /api/settings { preset: ${JSON.stringify(preset)} }
2804
- ${stack.split("\n").slice(1, 8).map((l) => ` ${l.trim()}`).join("\n")}
2805
-
2806
- `;
2807
- appendFileSync(debugPath, line);
2808
- } catch {
2809
- }
2810
- }
3033
+ var VALID_EDIT_MODES = /* @__PURE__ */ new Set(["review", "auto", "yolo"]);
2811
3034
  async function handleSettings(method, _rest, body, ctx) {
2812
3035
  if (method === "GET") {
2813
3036
  const cfg = readConfig(ctx.configPath);
@@ -2823,14 +3046,12 @@ async function handleSettings(method, _rest, body, ctx) {
2823
3046
  apiKeySet: Boolean(cfg.apiKey),
2824
3047
  baseUrl: cfg.baseUrl ?? null,
2825
3048
  lang: getLanguage(),
2826
- preset: cfg.preset ?? "auto",
2827
- reasoningEffort: cfg.reasoningEffort ?? "max",
3049
+ reasoningEffort: isReasoningEffort(cfg.reasoningEffort) ? cfg.reasoningEffort : "high",
2828
3050
  search: cfg.search !== false,
2829
3051
  webSearchEngine: webSearchEngine(ctx.configPath),
2830
- editMode: cfg.editMode ?? "review",
3052
+ editMode: ctx.getEditMode?.() ?? cfg.editMode ?? "review",
2831
3053
  session: cfg.session ?? null,
2832
- model: live?.model ?? null,
2833
- proNext: live?.proArmed ?? false,
3054
+ model: live?.model ?? cfg.model ?? DEFAULT_MODEL,
2834
3055
  budgetUsd: live?.budgetUsd ?? null,
2835
3056
  sessionSpendUsd: ctx.getStats?.()?.totalCostUsd ?? null,
2836
3057
  skillPaths: normalizeSkillPaths(
@@ -2841,18 +3062,17 @@ async function handleSettings(method, _rest, body, ctx) {
2841
3062
  cfg.skills?.paths ?? [],
2842
3063
  ctx.getCurrentCwd?.() ?? process.cwd()
2843
3064
  ),
2844
- // Hint to the SPA which fields require restart.
3065
+ subagentModels: cfg.subagentModels ?? {},
2845
3066
  appliesAt: {
2846
3067
  apiKey: "next-session",
2847
3068
  baseUrl: "next-session",
2848
- preset: "next-session",
2849
3069
  reasoningEffort: "next-turn",
2850
3070
  search: "next-session",
2851
3071
  webSearchEngine: "next-turn",
2852
3072
  model: "next-turn",
2853
- proNext: "next-turn",
2854
3073
  budgetUsd: "live",
2855
- skillPaths: "next-session"
3074
+ skillPaths: "next-session",
3075
+ subagentModels: "next-skill-run"
2856
3076
  }
2857
3077
  }
2858
3078
  };
@@ -2862,7 +3082,6 @@ async function handleSettings(method, _rest, body, ctx) {
2862
3082
  const cfg = readConfig(ctx.configPath);
2863
3083
  const changed = [];
2864
3084
  let langPending = null;
2865
- let presetPendingLive = null;
2866
3085
  let effortPendingLive = null;
2867
3086
  if (fields.lang !== void 0) {
2868
3087
  const raw = String(fields.lang);
@@ -2890,21 +3109,23 @@ async function handleSettings(method, _rest, body, ctx) {
2890
3109
  cfg.baseUrl = trimmed.length > 0 ? trimmed : void 0;
2891
3110
  changed.push("baseUrl");
2892
3111
  }
2893
- if (fields.preset !== void 0) {
2894
- if (typeof fields.preset !== "string" || !VALID_PRESETS.has(fields.preset)) {
2895
- return { status: 400, body: { error: "preset must be auto | flash | pro" } };
3112
+ if (fields.editMode !== void 0) {
3113
+ if (typeof fields.editMode !== "string" || !VALID_EDIT_MODES.has(fields.editMode)) {
3114
+ return { status: 400, body: { error: "editMode must be review | auto | yolo" } };
2896
3115
  }
2897
- debugLogPresetWriteFromDashboard(fields.preset);
2898
- cfg.preset = fields.preset;
2899
- presetPendingLive = fields.preset;
2900
- changed.push("preset");
3116
+ cfg.editMode = fields.editMode;
3117
+ changed.push("editMode");
2901
3118
  }
2902
3119
  if (fields.reasoningEffort !== void 0) {
2903
- if (typeof fields.reasoningEffort !== "string" || !VALID_EFFORTS.has(fields.reasoningEffort)) {
2904
- return { status: 400, body: { error: "reasoningEffort must be high | max" } };
3120
+ const raw = typeof fields.reasoningEffort === "string" ? fields.reasoningEffort.toLowerCase() : "";
3121
+ if (!isReasoningEffort(raw)) {
3122
+ return {
3123
+ status: 400,
3124
+ body: { error: `reasoningEffort must be one of: ${REASONING_EFFORT_VALUES.join(" | ")}` }
3125
+ };
2905
3126
  }
2906
- cfg.reasoningEffort = fields.reasoningEffort;
2907
- effortPendingLive = fields.reasoningEffort;
3127
+ cfg.reasoningEffort = raw;
3128
+ effortPendingLive = raw;
2908
3129
  changed.push("reasoningEffort");
2909
3130
  }
2910
3131
  if (fields.search !== void 0) {
@@ -2927,22 +3148,16 @@ async function handleSettings(method, _rest, body, ctx) {
2927
3148
  changed.push("webSearchEngine");
2928
3149
  }
2929
3150
  let modelPendingLive = null;
2930
- let proNextPending = null;
2931
3151
  let budgetPending;
2932
3152
  if (fields.model !== void 0) {
2933
3153
  if (typeof fields.model !== "string" || !fields.model.trim()) {
2934
3154
  return { status: 400, body: { error: "model must be a non-empty string" } };
2935
3155
  }
2936
- modelPendingLive = fields.model.trim();
3156
+ const trimmed = fields.model.trim();
3157
+ cfg.model = trimmed;
3158
+ modelPendingLive = trimmed;
2937
3159
  changed.push("model");
2938
3160
  }
2939
- if (fields.proNext !== void 0) {
2940
- if (typeof fields.proNext !== "boolean") {
2941
- return { status: 400, body: { error: "proNext must be a boolean" } };
2942
- }
2943
- proNextPending = fields.proNext;
2944
- changed.push("proNext");
2945
- }
2946
3161
  if (fields.budgetUsd !== void 0) {
2947
3162
  if (fields.budgetUsd === null) {
2948
3163
  budgetPending = null;
@@ -2967,13 +3182,32 @@ async function handleSettings(method, _rest, body, ctx) {
2967
3182
  };
2968
3183
  changed.push("skillPaths");
2969
3184
  }
3185
+ if (fields.subagentModels !== void 0) {
3186
+ if (typeof fields.subagentModels !== "object" || fields.subagentModels === null || Array.isArray(fields.subagentModels)) {
3187
+ return {
3188
+ status: 400,
3189
+ body: { error: "subagentModels must be an object mapping skill name \u2192 'flash' | 'pro'" }
3190
+ };
3191
+ }
3192
+ const sanitized = /* @__PURE__ */ new Map();
3193
+ for (const [name, value] of Object.entries(fields.subagentModels)) {
3194
+ if (typeof name !== "string" || !name) continue;
3195
+ if (name === "__proto__" || name === "constructor" || name === "prototype") continue;
3196
+ if (value === "flash" || value === "pro") sanitized.set(name, value);
3197
+ }
3198
+ cfg.subagentModels = sanitized.size > 0 ? Object.fromEntries(sanitized) : void 0;
3199
+ changed.push("subagentModels");
3200
+ }
2970
3201
  if (changed.length > 0) {
2971
3202
  writeConfig(cfg, ctx.configPath);
2972
3203
  if (langPending) setLanguage(langPending);
2973
- if (presetPendingLive) ctx.applyPresetLive?.(presetPendingLive);
3204
+ if (fields.editMode !== void 0) {
3205
+ const mode = fields.editMode;
3206
+ if (ctx.setEditMode) ctx.setEditMode(mode);
3207
+ else saveEditMode(mode, ctx.configPath);
3208
+ }
2974
3209
  if (effortPendingLive) ctx.applyEffortLive?.(effortPendingLive);
2975
3210
  if (modelPendingLive) ctx.applyModelLive?.(modelPendingLive);
2976
- if (proNextPending !== null) ctx.setProNextLive?.(proNextPending);
2977
3211
  if (budgetPending !== void 0) ctx.setBudgetUsdLive?.(budgetPending);
2978
3212
  ctx.audit?.({ ts: Date.now(), action: "set-settings", payload: { fields: changed } });
2979
3213
  }
@@ -2985,19 +3219,19 @@ async function handleSettings(method, _rest, body, ctx) {
2985
3219
  // src/server/api/skills.ts
2986
3220
  import {
2987
3221
  closeSync as closeSync4,
2988
- existsSync as existsSync9,
3222
+ existsSync as existsSync10,
2989
3223
  fstatSync as fstatSync4,
2990
3224
  mkdirSync as mkdirSync3,
2991
3225
  openSync as openSync4,
2992
3226
  readFileSync as readFileSync6,
2993
3227
  readSync as readSync4,
2994
- readdirSync as readdirSync5,
3228
+ readdirSync as readdirSync6,
2995
3229
  rmSync,
2996
- statSync as statSync5,
3230
+ statSync as statSync6,
2997
3231
  writeFileSync as writeFileSync3
2998
3232
  } from "fs";
2999
- import { homedir as homedir3 } from "os";
3000
- import { dirname as dirname4, join as join8 } from "path";
3233
+ import { homedir as homedir4 } from "os";
3234
+ import { dirname as dirname5, join as join8 } from "path";
3001
3235
  function parseBody10(raw) {
3002
3236
  if (!raw) return {};
3003
3237
  try {
@@ -3009,7 +3243,7 @@ function parseBody10(raw) {
3009
3243
  }
3010
3244
  var SAFE_NAME2 = /^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$/;
3011
3245
  function globalSkillsDir() {
3012
- return join8(homedir3(), ".reasonix", SKILLS_DIRNAME);
3246
+ return join8(homedir4(), ".reasonix", SKILLS_DIRNAME);
3013
3247
  }
3014
3248
  function projectSkillsDir(rootDir) {
3015
3249
  return join8(rootDir, ".reasonix", SKILLS_DIRNAME);
@@ -3054,12 +3288,12 @@ function readSkillListEntry(skillPath, name, scope) {
3054
3288
  function resolveSkillPath(dir, name) {
3055
3289
  const folderPath = join8(dir, name, SKILL_FILE);
3056
3290
  try {
3057
- if (statSync5(folderPath).isFile()) return { path: folderPath, layout: "folder" };
3291
+ if (statSync6(folderPath).isFile()) return { path: folderPath, layout: "folder" };
3058
3292
  } catch {
3059
3293
  }
3060
3294
  const flatPath = join8(dir, `${name}.md`);
3061
3295
  try {
3062
- if (statSync5(flatPath).isFile()) return { path: flatPath, layout: "flat" };
3296
+ if (statSync6(flatPath).isFile()) return { path: flatPath, layout: "flat" };
3063
3297
  } catch {
3064
3298
  }
3065
3299
  return null;
@@ -3068,10 +3302,10 @@ function defaultSkillPath(dir, name) {
3068
3302
  return { path: join8(dir, name, SKILL_FILE), layout: "folder" };
3069
3303
  }
3070
3304
  function listSkills(dir, scope) {
3071
- if (!existsSync9(dir)) return [];
3305
+ if (!existsSync10(dir)) return [];
3072
3306
  const out = [];
3073
3307
  try {
3074
- for (const entry of readdirSync5(dir, { withFileTypes: true })) {
3308
+ for (const entry of readdirSync6(dir, { withFileTypes: true })) {
3075
3309
  let name;
3076
3310
  let skillPath;
3077
3311
  if (entry.isDirectory()) {
@@ -3110,7 +3344,8 @@ async function handleSkills(method, rest, body, ctx) {
3110
3344
  const tag = (rows) => rows.map((r) => ({ ...r, runs7d: runs7d.get(r.name) ?? 0 }));
3111
3345
  const store = new SkillStore({
3112
3346
  projectRoot: cwd,
3113
- customSkillPaths: loadResolvedSkillPaths(cwd ?? process.cwd(), ctx.configPath)
3347
+ customSkillPaths: loadResolvedSkillPaths(cwd ?? process.cwd(), ctx.configPath),
3348
+ subagentModels: loadSubagentModels(ctx.configPath)
3114
3349
  });
3115
3350
  const customRoots = store.customRoots();
3116
3351
  return {
@@ -3182,7 +3417,7 @@ async function handleSkills(method, rest, body, ctx) {
3182
3417
  return { status: 400, body: { error: fm.error } };
3183
3418
  }
3184
3419
  const target = resolved ?? defaultSkillPath(dir, name);
3185
- mkdirSync3(dirname4(target.path), { recursive: true });
3420
+ mkdirSync3(dirname5(target.path), { recursive: true });
3186
3421
  writeFileSync3(target.path, contents, "utf8");
3187
3422
  ctx.audit?.({
3188
3423
  ts: Date.now(),
@@ -3193,7 +3428,7 @@ async function handleSkills(method, rest, body, ctx) {
3193
3428
  }
3194
3429
  if (method === "DELETE") {
3195
3430
  if (!resolved) return { status: 404, body: { error: "skill not found" } };
3196
- rmSync(resolved.layout === "folder" ? dirname4(resolved.path) : resolved.path, {
3431
+ rmSync(resolved.layout === "folder" ? dirname5(resolved.path) : resolved.path, {
3197
3432
  recursive: true,
3198
3433
  force: true
3199
3434
  });
@@ -3404,6 +3639,8 @@ async function handleApi(pathTail, method, body, ctx, query = new URLSearchParam
3404
3639
  return await handleSlash(method, rest, body, ctx);
3405
3640
  case "files":
3406
3641
  return await handleFiles(method, rest, body, ctx);
3642
+ case "browse":
3643
+ return await handleBrowse(method, rest, body, ctx, query);
3407
3644
  case "project-tree":
3408
3645
  return await handleProjectTree(method, rest, body, ctx);
3409
3646
  case "git-diffs":
@@ -3477,7 +3714,7 @@ var MAX_BODY_BYTES = 256 * 1024;
3477
3714
  async function readBody(req) {
3478
3715
  let total = 0;
3479
3716
  const chunks = [];
3480
- return new Promise((resolve3, reject) => {
3717
+ return new Promise((resolve4, reject) => {
3481
3718
  req.on("data", (chunk) => {
3482
3719
  total += chunk.length;
3483
3720
  if (total > MAX_BODY_BYTES) {
@@ -3487,7 +3724,7 @@ async function readBody(req) {
3487
3724
  }
3488
3725
  chunks.push(chunk);
3489
3726
  });
3490
- req.on("end", () => resolve3(Buffer.concat(chunks).toString("utf8")));
3727
+ req.on("end", () => resolve4(Buffer.concat(chunks).toString("utf8")));
3491
3728
  req.on("error", reject);
3492
3729
  });
3493
3730
  }
@@ -3515,7 +3752,7 @@ async function dispatch(req, res, ctx, expectedToken) {
3515
3752
  res.end();
3516
3753
  return;
3517
3754
  }
3518
- const asset = serveAsset(path.slice("/assets/".length));
3755
+ const asset = serveAsset(path.slice("/assets/".length), expectedToken);
3519
3756
  if (!asset) {
3520
3757
  res.writeHead(404);
3521
3758
  res.end("not found");
@@ -3564,9 +3801,10 @@ function startDashboardServer(ctx, opts = {}) {
3564
3801
  const token = opts.token ?? mintToken();
3565
3802
  const host = opts.host ?? "127.0.0.1";
3566
3803
  const port = opts.port ?? 0;
3567
- return new Promise((resolve3, reject) => {
3804
+ const ctxRef = { current: ctx };
3805
+ return new Promise((resolve4, reject) => {
3568
3806
  const server = createServer((req, res) => {
3569
- dispatch(req, res, ctx, token).catch((err) => {
3807
+ dispatch(req, res, ctxRef.current, token).catch((err) => {
3570
3808
  if (!res.headersSent) {
3571
3809
  res.writeHead(500, { "content-type": "application/json" });
3572
3810
  }
@@ -3591,7 +3829,10 @@ function startDashboardServer(ctx, opts = {}) {
3591
3829
  server.close(() => doneResolve());
3592
3830
  setTimeout(() => server.closeAllConnections?.(), 1e3).unref();
3593
3831
  });
3594
- resolve3({ url, token, port: finalPort, close });
3832
+ const updateContext = (next) => {
3833
+ ctxRef.current = next;
3834
+ };
3835
+ resolve4({ url, token, port: finalPort, close, updateContext });
3595
3836
  });
3596
3837
  });
3597
3838
  }
@@ -3602,4 +3843,4 @@ export {
3602
3843
  readBody,
3603
3844
  startDashboardServer
3604
3845
  };
3605
- //# sourceMappingURL=server-Z3IMJNNI.js.map
3846
+ //# sourceMappingURL=server-SZZDKTH2.js.map