@surething/cockpit 1.0.253 → 1.0.254

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 (638) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +7 -4
  3. package/.next-prod/build-manifest.json +2 -2
  4. package/.next-prod/prerender-manifest.json +3 -3
  5. package/.next-prod/routes-manifest.json +18 -0
  6. package/.next-prod/server/app/_global-error/page.js +3 -3
  7. package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next-prod/server/app/_global-error.html +1 -1
  10. package/.next-prod/server/app/_global-error.rsc +1 -1
  11. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next-prod/server/app/_not-found/page.js +2 -2
  18. package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
  19. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next-prod/server/app/_not-found.html +2 -2
  21. package/.next-prod/server/app/_not-found.rsc +3 -3
  22. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
  23. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
  25. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  26. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  27. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  28. package/.next-prod/server/app/api/agent/test/route.js +1 -1
  29. package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
  30. package/.next-prod/server/app/api/bash/route.js +1 -1
  31. package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
  32. package/.next-prod/server/app/api/chat/codex/route.js +2 -2
  33. package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
  34. package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
  35. package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
  36. package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
  37. package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
  38. package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
  39. package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
  40. package/.next-prod/server/app/api/chat/pty-input/route.js +1 -1
  41. package/.next-prod/server/app/api/chat/pty-input/route.js.nft.json +1 -1
  42. package/.next-prod/server/app/api/chat/route.js +1 -1
  43. package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
  44. package/.next-prod/server/app/api/chat/stop/route.js +1 -1
  45. package/.next-prod/server/app/api/chat/stop/route.js.nft.json +1 -1
  46. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  47. package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
  48. package/.next-prod/server/app/api/commands/route.js +1 -1
  49. package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
  50. package/.next-prod/server/app/api/comments/route.js +1 -1
  51. package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
  52. package/.next-prod/server/app/api/db/columns/route.js +1 -1
  53. package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
  54. package/.next-prod/server/app/api/db/connect/route.js +2 -2
  55. package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
  56. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  57. package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
  58. package/.next-prod/server/app/api/db/export/route.js +1 -1
  59. package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
  60. package/.next-prod/server/app/api/db/query/route.js +1 -1
  61. package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
  62. package/.next-prod/server/app/api/db/schemas/route.js +1 -1
  63. package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
  64. package/.next-prod/server/app/api/deepseek/balance/route.js +1 -0
  65. package/.next-prod/server/app/api/deepseek/balance/route.js.nft.json +1 -0
  66. package/.next-prod/server/app/api/deepseek/balance/route_client-reference-manifest.js +1 -0
  67. package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
  68. package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -1
  69. package/.next-prod/server/app/api/deepseek/models/route.js +1 -0
  70. package/.next-prod/server/app/api/deepseek/models/route.js.nft.json +1 -0
  71. package/.next-prod/server/app/api/deepseek/models/route_client-reference-manifest.js +1 -0
  72. package/.next-prod/server/app/api/dev/spans/route.js +1 -1
  73. package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
  74. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  75. package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
  76. package/.next-prod/server/app/api/file/route.js +1 -1
  77. package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
  78. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  79. package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
  80. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  81. package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
  82. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  83. package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
  84. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  85. package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
  86. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  87. package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
  88. package/.next-prod/server/app/api/files/index/route.js +1 -1
  89. package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
  90. package/.next-prod/server/app/api/files/init/route.js +1 -1
  91. package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
  92. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  93. package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
  94. package/.next-prod/server/app/api/files/read/route.js +1 -1
  95. package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
  96. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  97. package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
  98. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  99. package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
  100. package/.next-prod/server/app/api/files/save/route.js +1 -1
  101. package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
  102. package/.next-prod/server/app/api/files/search/route.js +1 -1
  103. package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
  104. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  105. package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
  106. package/.next-prod/server/app/api/files/text/route.js +1 -1
  107. package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
  108. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  109. package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
  110. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  111. package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
  112. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  113. package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
  114. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  115. package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
  116. package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
  117. package/.next-prod/server/app/api/git/current-branch/route.js.nft.json +1 -1
  118. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  119. package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
  120. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  121. package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
  122. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  123. package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
  124. package/.next-prod/server/app/api/git/status/route.js +1 -1
  125. package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
  126. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  127. package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
  128. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  129. package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
  130. package/.next-prod/server/app/api/global-state/route.js +1 -1
  131. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  132. package/.next-prod/server/app/api/health/route.js +1 -1
  133. package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
  134. package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
  135. package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
  136. package/.next-prod/server/app/api/html-apps/route.js +1 -1
  137. package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
  138. package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
  139. package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
  140. package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
  141. package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
  142. package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
  143. package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
  144. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  145. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  146. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  147. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  148. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  149. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  150. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  151. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  152. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  153. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  154. package/.next-prod/server/app/api/mysql/columns/route.js +1 -1
  155. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  156. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  157. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  158. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  159. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  160. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  161. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  162. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  163. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  164. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  165. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  166. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  167. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  168. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  169. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  170. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  171. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  172. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  173. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  174. package/.next-prod/server/app/api/note/route.js +1 -1
  175. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  176. package/.next-prod/server/app/api/ollama/config/route.js +1 -1
  177. package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
  178. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  179. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  180. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  181. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  182. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  183. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  184. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  185. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  186. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  187. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
  188. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  189. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  190. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  191. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  192. package/.next-prod/server/app/api/project-state/route.js +1 -1
  193. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  194. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  195. package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
  196. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  197. package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
  198. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  199. package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
  200. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  201. package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
  202. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  203. package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
  204. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  205. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  206. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  207. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  208. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  209. package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
  210. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  211. package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
  212. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  213. package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
  214. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  215. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  216. package/.next-prod/server/app/api/projects/route.js +1 -1
  217. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  218. package/.next-prod/server/app/api/prompts/config/route.js +1 -0
  219. package/.next-prod/server/app/api/prompts/config/route.js.nft.json +1 -0
  220. package/.next-prod/server/app/api/prompts/config/route_client-reference-manifest.js +1 -0
  221. package/.next-prod/server/app/api/push/public-key/route.js +1 -1
  222. package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
  223. package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
  224. package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
  225. package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
  226. package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
  227. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  228. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  229. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  230. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  231. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  232. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  233. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  234. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  235. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  236. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  237. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  238. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  239. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  240. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  241. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  242. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  243. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  244. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  245. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  246. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  247. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  248. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  249. package/.next-prod/server/app/api/review/order/route.js +1 -1
  250. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  251. package/.next-prod/server/app/api/review/route.js +1 -1
  252. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  253. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  254. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  255. package/.next-prod/server/app/api/review/users/route.js +1 -1
  256. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  257. package/.next-prod/server/app/api/scheduled-tasks/route.js +3 -3
  258. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  259. package/.next-prod/server/app/api/services/config/route.js +1 -1
  260. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  261. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  262. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  263. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  264. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  265. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  266. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  267. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  268. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  269. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  270. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  271. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  272. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  273. package/.next-prod/server/app/api/sessions/route.js +1 -1
  274. package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
  275. package/.next-prod/server/app/api/settings/route.js +1 -1
  276. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  277. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  278. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  279. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  280. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  281. package/.next-prod/server/app/api/skills/route.js +1 -1
  282. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  283. package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
  284. package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
  285. package/.next-prod/server/app/api/snapshots/route.js +1 -1
  286. package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
  287. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  288. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  289. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  290. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  291. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  292. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  293. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  294. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  295. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  296. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  297. package/.next-prod/server/app/api/version/route.js +1 -1
  298. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  299. package/.next-prod/server/app/apps/[...path]/route.js +1 -1
  300. package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
  301. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  302. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  303. package/.next-prod/server/app/m/page.js +2 -2
  304. package/.next-prod/server/app/m/page.js.nft.json +1 -1
  305. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  306. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  307. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  308. package/.next-prod/server/app/page.js +2 -2
  309. package/.next-prod/server/app/page.js.nft.json +1 -1
  310. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  311. package/.next-prod/server/app/project/page.js +2 -2
  312. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  313. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  314. package/.next-prod/server/app/review/[id]/page.js +2 -2
  315. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  316. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  317. package/.next-prod/server/app-paths-manifest.json +7 -4
  318. package/.next-prod/server/chunks/304.js +1 -1
  319. package/.next-prod/server/chunks/3863.js +2 -2
  320. package/.next-prod/server/chunks/{4848.js → 4338.js} +2 -2
  321. package/.next-prod/server/chunks/6038.js +1 -1
  322. package/.next-prod/server/chunks/{293.js → 7139.js} +4 -4
  323. package/.next-prod/server/chunks/9419.js +89 -0
  324. package/.next-prod/server/chunks/9658.js +12 -12
  325. package/.next-prod/server/chunks/9830.js +1 -1
  326. package/.next-prod/server/functions-config-manifest.json +1 -0
  327. package/.next-prod/server/middleware-build-manifest.js +1 -1
  328. package/.next-prod/server/pages/404.html +2 -2
  329. package/.next-prod/server/pages/500.html +1 -1
  330. package/.next-prod/server/server-reference-manifest.json +1 -1
  331. package/.next-prod/static/chunks/{4304-408f5bddd7583676.js → 2308-c6b5ed3c19252dce.js} +3 -3
  332. package/.next-prod/static/chunks/6260-f566ccfbd8e8809c.js +25 -0
  333. package/.next-prod/static/chunks/6784-d35737ae5f04a2d2.js +0 -0
  334. package/.next-prod/static/chunks/9530-870e97119b45f025.js +15 -0
  335. package/.next-prod/static/chunks/app/_global-error/{page-51252a3b116b8135.js → page-0ad1f48c09ff2c02.js} +1 -1
  336. package/.next-prod/static/chunks/app/api/agent/test/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
  337. package/.next-prod/static/chunks/app/api/bash/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
  338. package/.next-prod/static/chunks/app/api/chat/codex/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
  339. package/.next-prod/static/chunks/app/api/chat/deepseek/route-0ad1f48c09ff2c02.js +1 -0
  340. package/.next-prod/static/chunks/app/api/chat/kimi/route-0ad1f48c09ff2c02.js +1 -0
  341. package/.next-prod/static/chunks/app/api/chat/ollama/route-0ad1f48c09ff2c02.js +1 -0
  342. package/.next-prod/static/chunks/app/api/chat/pty-input/route-0ad1f48c09ff2c02.js +1 -0
  343. package/.next-prod/static/chunks/app/api/chat/route-0ad1f48c09ff2c02.js +1 -0
  344. package/.next-prod/static/chunks/app/api/chat/stop/route-0ad1f48c09ff2c02.js +1 -0
  345. package/.next-prod/static/chunks/app/api/claude-stats/route-0ad1f48c09ff2c02.js +1 -0
  346. package/.next-prod/static/chunks/app/api/commands/route-0ad1f48c09ff2c02.js +1 -0
  347. package/.next-prod/static/chunks/app/api/comments/route-0ad1f48c09ff2c02.js +1 -0
  348. package/.next-prod/static/chunks/app/api/db/columns/route-0ad1f48c09ff2c02.js +1 -0
  349. package/.next-prod/static/chunks/app/api/db/connect/route-0ad1f48c09ff2c02.js +1 -0
  350. package/.next-prod/static/chunks/app/api/db/disconnect/route-0ad1f48c09ff2c02.js +1 -0
  351. package/.next-prod/static/chunks/app/api/db/export/route-0ad1f48c09ff2c02.js +1 -0
  352. package/.next-prod/static/chunks/app/api/db/query/route-0ad1f48c09ff2c02.js +1 -0
  353. package/.next-prod/static/chunks/app/api/db/schemas/route-0ad1f48c09ff2c02.js +1 -0
  354. package/.next-prod/static/chunks/app/api/deepseek/balance/route-0ad1f48c09ff2c02.js +1 -0
  355. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-0ad1f48c09ff2c02.js +1 -0
  356. package/.next-prod/static/chunks/app/api/deepseek/models/route-0ad1f48c09ff2c02.js +1 -0
  357. package/.next-prod/static/chunks/app/api/dev/spans/route-0ad1f48c09ff2c02.js +1 -0
  358. package/.next-prod/static/chunks/app/api/extension/version/route-0ad1f48c09ff2c02.js +1 -0
  359. package/.next-prod/static/chunks/app/api/file/route-0ad1f48c09ff2c02.js +1 -0
  360. package/.next-prod/static/chunks/app/api/files/blame/route-0ad1f48c09ff2c02.js +1 -0
  361. package/.next-prod/static/chunks/app/api/files/clipboard/route-0ad1f48c09ff2c02.js +1 -0
  362. package/.next-prod/static/chunks/app/api/files/copy/route-0ad1f48c09ff2c02.js +1 -0
  363. package/.next-prod/static/chunks/app/api/files/delete/route-0ad1f48c09ff2c02.js +1 -0
  364. package/.next-prod/static/chunks/app/api/files/expanded/route-0ad1f48c09ff2c02.js +1 -0
  365. package/.next-prod/static/chunks/app/api/files/index/route-0ad1f48c09ff2c02.js +1 -0
  366. package/.next-prod/static/chunks/app/api/files/init/route-0ad1f48c09ff2c02.js +1 -0
  367. package/.next-prod/static/chunks/app/api/files/paste/route-0ad1f48c09ff2c02.js +1 -0
  368. package/.next-prod/static/chunks/app/api/files/read/route-0ad1f48c09ff2c02.js +1 -0
  369. package/.next-prod/static/chunks/app/api/files/readdir/route-0ad1f48c09ff2c02.js +1 -0
  370. package/.next-prod/static/chunks/app/api/files/recent/route-0ad1f48c09ff2c02.js +1 -0
  371. package/.next-prod/static/chunks/app/api/files/save/route-0ad1f48c09ff2c02.js +1 -0
  372. package/.next-prod/static/chunks/app/api/files/search/route-0ad1f48c09ff2c02.js +1 -0
  373. package/.next-prod/static/chunks/app/api/files/stat/route-0ad1f48c09ff2c02.js +1 -0
  374. package/.next-prod/static/chunks/app/api/files/text/route-0ad1f48c09ff2c02.js +1 -0
  375. package/.next-prod/static/chunks/app/api/git/branch-diff/route-0ad1f48c09ff2c02.js +1 -0
  376. package/.next-prod/static/chunks/app/api/git/branches/route-0ad1f48c09ff2c02.js +1 -0
  377. package/.next-prod/static/chunks/app/api/git/commit-diff/route-0ad1f48c09ff2c02.js +1 -0
  378. package/.next-prod/static/chunks/app/api/git/commits/route-0ad1f48c09ff2c02.js +1 -0
  379. package/.next-prod/static/chunks/app/api/git/current-branch/route-0ad1f48c09ff2c02.js +1 -0
  380. package/.next-prod/static/chunks/app/api/git/diff/route-0ad1f48c09ff2c02.js +1 -0
  381. package/.next-prod/static/chunks/app/api/git/discard/route-0ad1f48c09ff2c02.js +1 -0
  382. package/.next-prod/static/chunks/app/api/git/stage/route-0ad1f48c09ff2c02.js +1 -0
  383. package/.next-prod/static/chunks/app/api/git/status/route-0ad1f48c09ff2c02.js +1 -0
  384. package/.next-prod/static/chunks/app/api/git/unstage/route-0ad1f48c09ff2c02.js +1 -0
  385. package/.next-prod/static/chunks/app/api/git/worktree/route-0ad1f48c09ff2c02.js +1 -0
  386. package/.next-prod/static/chunks/app/api/global-state/route-0ad1f48c09ff2c02.js +1 -0
  387. package/.next-prod/static/chunks/app/api/health/route-0ad1f48c09ff2c02.js +1 -0
  388. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-0ad1f48c09ff2c02.js +1 -0
  389. package/.next-prod/static/chunks/app/api/html-apps/route-0ad1f48c09ff2c02.js +1 -0
  390. package/.next-prod/static/chunks/app/api/jupyter/load/route-0ad1f48c09ff2c02.js +1 -0
  391. package/.next-prod/static/chunks/app/api/jupyter/save/route-0ad1f48c09ff2c02.js +1 -0
  392. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-0ad1f48c09ff2c02.js +1 -0
  393. package/.next-prod/static/chunks/app/api/lsp/definition/route-0ad1f48c09ff2c02.js +1 -0
  394. package/.next-prod/static/chunks/app/api/lsp/hover/route-0ad1f48c09ff2c02.js +1 -0
  395. package/.next-prod/static/chunks/app/api/lsp/references/route-0ad1f48c09ff2c02.js +1 -0
  396. package/.next-prod/static/chunks/app/api/lsp/status/route-0ad1f48c09ff2c02.js +1 -0
  397. package/.next-prod/static/chunks/app/api/lsp/warmup/route-0ad1f48c09ff2c02.js +1 -0
  398. package/.next-prod/static/chunks/app/api/mysql/columns/route-0ad1f48c09ff2c02.js +1 -0
  399. package/.next-prod/static/chunks/app/api/mysql/connect/route-0ad1f48c09ff2c02.js +1 -0
  400. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-0ad1f48c09ff2c02.js +1 -0
  401. package/.next-prod/static/chunks/app/api/mysql/export/route-0ad1f48c09ff2c02.js +1 -0
  402. package/.next-prod/static/chunks/app/api/mysql/query/route-0ad1f48c09ff2c02.js +1 -0
  403. package/.next-prod/static/chunks/app/api/mysql/schemas/route-0ad1f48c09ff2c02.js +1 -0
  404. package/.next-prod/static/chunks/app/api/neo4j/connect/route-0ad1f48c09ff2c02.js +1 -0
  405. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-0ad1f48c09ff2c02.js +1 -0
  406. package/.next-prod/static/chunks/app/api/neo4j/query/route-0ad1f48c09ff2c02.js +1 -0
  407. package/.next-prod/static/chunks/app/api/neo4j/schema/route-0ad1f48c09ff2c02.js +1 -0
  408. package/.next-prod/static/chunks/app/api/note/route-0ad1f48c09ff2c02.js +1 -0
  409. package/.next-prod/static/chunks/app/api/ollama/config/route-0ad1f48c09ff2c02.js +1 -0
  410. package/.next-prod/static/chunks/app/api/ollama/models/route-0ad1f48c09ff2c02.js +1 -0
  411. package/.next-prod/static/chunks/app/api/ollama/start/route-0ad1f48c09ff2c02.js +1 -0
  412. package/.next-prod/static/chunks/app/api/open-cursor/route-0ad1f48c09ff2c02.js +1 -0
  413. package/.next-prod/static/chunks/app/api/open-vscode/route-0ad1f48c09ff2c02.js +1 -0
  414. package/.next-prod/static/chunks/app/api/pick-folder/route-0ad1f48c09ff2c02.js +1 -0
  415. package/.next-prod/static/chunks/app/api/pinned-sessions/route-0ad1f48c09ff2c02.js +1 -0
  416. package/.next-prod/static/chunks/app/api/project-settings/route-0ad1f48c09ff2c02.js +1 -0
  417. package/.next-prod/static/chunks/app/api/project-state/route-0ad1f48c09ff2c02.js +1 -0
  418. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-0ad1f48c09ff2c02.js +1 -0
  419. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-0ad1f48c09ff2c02.js +1 -0
  420. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-0ad1f48c09ff2c02.js +1 -0
  421. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-0ad1f48c09ff2c02.js +1 -0
  422. package/.next-prod/static/chunks/app/api/projectGraph/context/route-0ad1f48c09ff2c02.js +1 -0
  423. package/.next-prod/static/chunks/app/api/projectGraph/file/route-0ad1f48c09ff2c02.js +1 -0
  424. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-0ad1f48c09ff2c02.js +1 -0
  425. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-0ad1f48c09ff2c02.js +1 -0
  426. package/.next-prod/static/chunks/app/api/projectGraph/related/route-0ad1f48c09ff2c02.js +1 -0
  427. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-0ad1f48c09ff2c02.js +1 -0
  428. package/.next-prod/static/chunks/app/api/projectGraph/search/route-0ad1f48c09ff2c02.js +1 -0
  429. package/.next-prod/static/chunks/app/api/projects/route-0ad1f48c09ff2c02.js +1 -0
  430. package/.next-prod/static/chunks/app/api/prompts/config/route-0ad1f48c09ff2c02.js +1 -0
  431. package/.next-prod/static/chunks/app/api/push/public-key/route-0ad1f48c09ff2c02.js +1 -0
  432. package/.next-prod/static/chunks/app/api/push/subscribe/route-0ad1f48c09ff2c02.js +1 -0
  433. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-0ad1f48c09ff2c02.js +1 -0
  434. package/.next-prod/static/chunks/app/api/redis/command/route-0ad1f48c09ff2c02.js +1 -0
  435. package/.next-prod/static/chunks/app/api/redis/connect/route-0ad1f48c09ff2c02.js +1 -0
  436. package/.next-prod/static/chunks/app/api/redis/delete/route-0ad1f48c09ff2c02.js +1 -0
  437. package/.next-prod/static/chunks/app/api/redis/disconnect/route-0ad1f48c09ff2c02.js +1 -0
  438. package/.next-prod/static/chunks/app/api/redis/get/route-0ad1f48c09ff2c02.js +1 -0
  439. package/.next-prod/static/chunks/app/api/redis/keys/route-0ad1f48c09ff2c02.js +1 -0
  440. package/.next-prod/static/chunks/app/api/redis/set/route-0ad1f48c09ff2c02.js +1 -0
  441. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-0ad1f48c09ff2c02.js +1 -0
  442. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-0ad1f48c09ff2c02.js +1 -0
  443. package/.next-prod/static/chunks/app/api/review/[id]/route-0ad1f48c09ff2c02.js +1 -0
  444. package/.next-prod/static/chunks/app/api/review/identify/route-0ad1f48c09ff2c02.js +1 -0
  445. package/.next-prod/static/chunks/app/api/review/order/route-0ad1f48c09ff2c02.js +1 -0
  446. package/.next-prod/static/chunks/app/api/review/route-0ad1f48c09ff2c02.js +1 -0
  447. package/.next-prod/static/chunks/app/api/review/share-info/route-0ad1f48c09ff2c02.js +1 -0
  448. package/.next-prod/static/chunks/app/api/review/users/route-0ad1f48c09ff2c02.js +1 -0
  449. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-0ad1f48c09ff2c02.js +1 -0
  450. package/.next-prod/static/chunks/app/api/services/config/route-0ad1f48c09ff2c02.js +1 -0
  451. package/.next-prod/static/chunks/app/api/services/scripts/route-0ad1f48c09ff2c02.js +1 -0
  452. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-0ad1f48c09ff2c02.js +1 -0
  453. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-0ad1f48c09ff2c02.js +1 -0
  454. package/.next-prod/static/chunks/app/api/session-by-path/route-0ad1f48c09ff2c02.js +1 -0
  455. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-0ad1f48c09ff2c02.js +1 -0
  456. package/.next-prod/static/chunks/app/api/sessions/projects/route-0ad1f48c09ff2c02.js +1 -0
  457. package/.next-prod/static/chunks/app/api/sessions/route-0ad1f48c09ff2c02.js +1 -0
  458. package/.next-prod/static/chunks/app/api/settings/route-0ad1f48c09ff2c02.js +1 -0
  459. package/.next-prod/static/chunks/app/api/skills/[id]/route-0ad1f48c09ff2c02.js +1 -0
  460. package/.next-prod/static/chunks/app/api/skills/content/route-0ad1f48c09ff2c02.js +1 -0
  461. package/.next-prod/static/chunks/app/api/skills/route-0ad1f48c09ff2c02.js +1 -0
  462. package/.next-prod/static/chunks/app/api/snapshots/diff/route-0ad1f48c09ff2c02.js +1 -0
  463. package/.next-prod/static/chunks/app/api/snapshots/route-0ad1f48c09ff2c02.js +1 -0
  464. package/.next-prod/static/chunks/app/api/terminal/aliases/route-0ad1f48c09ff2c02.js +1 -0
  465. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-0ad1f48c09ff2c02.js +1 -0
  466. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-0ad1f48c09ff2c02.js +1 -0
  467. package/.next-prod/static/chunks/app/api/terminal/env/route-0ad1f48c09ff2c02.js +1 -0
  468. package/.next-prod/static/chunks/app/api/terminal/history/route-0ad1f48c09ff2c02.js +1 -0
  469. package/.next-prod/static/chunks/app/api/version/route-0ad1f48c09ff2c02.js +1 -0
  470. package/.next-prod/static/chunks/app/apps/[...path]/route-0ad1f48c09ff2c02.js +1 -0
  471. package/.next-prod/static/chunks/app/{layout-145570f39a827c0f.js → layout-d43dd702b3ee9d15.js} +1 -1
  472. package/.next-prod/static/chunks/app/manifest.webmanifest/route-0ad1f48c09ff2c02.js +1 -0
  473. package/.next-prod/static/chunks/app/{page-487095ac01a4c1ef.js → page-8e7a3d723260097a.js} +1 -1
  474. package/.next-prod/static/chunks/app/project/{page-487095ac01a4c1ef.js → page-8e7a3d723260097a.js} +1 -1
  475. package/.next-prod/static/chunks/app/review/[id]/page-c0136423507b7547.js +1 -0
  476. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-0ad1f48c09ff2c02.js +1 -0
  477. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-0ad1f48c09ff2c02.js +1 -0
  478. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-0ad1f48c09ff2c02.js +1 -0
  479. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-0ad1f48c09ff2c02.js +1 -0
  480. package/.next-prod/static/css/05889d4d244bd7d5.css +1 -0
  481. package/.next-prod/static/xXMzxSYQCcHCrntVXcycC/_buildManifest.js +1 -0
  482. package/.next-prod/trace +14 -14
  483. package/.next-prod/trace-build +1 -1
  484. package/.next-prod/types/app/api/deepseek/balance/route.ts +351 -0
  485. package/.next-prod/types/app/api/deepseek/models/route.ts +351 -0
  486. package/.next-prod/types/app/api/prompts/config/route.ts +351 -0
  487. package/.next-prod/types/routes.d.ts +4 -1
  488. package/.next-prod/types/validator.ts +27 -0
  489. package/dist/{chunk-BRW4ZEIC.mjs → chunk-7G4OXJJ4.mjs} +52 -7
  490. package/dist/{chunk-RUNUGDPP.mjs → chunk-H3JSYJCZ.mjs} +25 -29
  491. package/dist/{chunk-7WPYQYA6.mjs → chunk-HIW2SGCF.mjs} +4 -4
  492. package/dist/httpApi.mjs +2 -2
  493. package/dist/scheduledTasks.mjs +326 -275
  494. package/dist/{server-MCN5AIEU.mjs → server-O434I7QD.mjs} +2 -2
  495. package/dist/wsServer.mjs +7 -6
  496. package/package.json +1 -1
  497. package/.next-prod/server/chunks/7338.js +0 -89
  498. package/.next-prod/static/8aWX4sRFsO4Rx4DD9L9w-/_buildManifest.js +0 -1
  499. package/.next-prod/static/chunks/2876-4336c42044f38302.js +0 -25
  500. package/.next-prod/static/chunks/6784-c9969c13c13b25af.js +0 -0
  501. package/.next-prod/static/chunks/9530-27352e6f8bafeb3c.js +0 -15
  502. package/.next-prod/static/chunks/app/api/chat/deepseek/route-51252a3b116b8135.js +0 -1
  503. package/.next-prod/static/chunks/app/api/chat/kimi/route-51252a3b116b8135.js +0 -1
  504. package/.next-prod/static/chunks/app/api/chat/ollama/route-51252a3b116b8135.js +0 -1
  505. package/.next-prod/static/chunks/app/api/chat/pty-input/route-51252a3b116b8135.js +0 -1
  506. package/.next-prod/static/chunks/app/api/chat/route-51252a3b116b8135.js +0 -1
  507. package/.next-prod/static/chunks/app/api/chat/stop/route-51252a3b116b8135.js +0 -1
  508. package/.next-prod/static/chunks/app/api/claude-stats/route-51252a3b116b8135.js +0 -1
  509. package/.next-prod/static/chunks/app/api/commands/route-51252a3b116b8135.js +0 -1
  510. package/.next-prod/static/chunks/app/api/comments/route-51252a3b116b8135.js +0 -1
  511. package/.next-prod/static/chunks/app/api/db/columns/route-51252a3b116b8135.js +0 -1
  512. package/.next-prod/static/chunks/app/api/db/connect/route-51252a3b116b8135.js +0 -1
  513. package/.next-prod/static/chunks/app/api/db/disconnect/route-51252a3b116b8135.js +0 -1
  514. package/.next-prod/static/chunks/app/api/db/export/route-51252a3b116b8135.js +0 -1
  515. package/.next-prod/static/chunks/app/api/db/query/route-51252a3b116b8135.js +0 -1
  516. package/.next-prod/static/chunks/app/api/db/schemas/route-51252a3b116b8135.js +0 -1
  517. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-51252a3b116b8135.js +0 -1
  518. package/.next-prod/static/chunks/app/api/dev/spans/route-51252a3b116b8135.js +0 -1
  519. package/.next-prod/static/chunks/app/api/extension/version/route-51252a3b116b8135.js +0 -1
  520. package/.next-prod/static/chunks/app/api/file/route-51252a3b116b8135.js +0 -1
  521. package/.next-prod/static/chunks/app/api/files/blame/route-51252a3b116b8135.js +0 -1
  522. package/.next-prod/static/chunks/app/api/files/clipboard/route-51252a3b116b8135.js +0 -1
  523. package/.next-prod/static/chunks/app/api/files/copy/route-51252a3b116b8135.js +0 -1
  524. package/.next-prod/static/chunks/app/api/files/delete/route-51252a3b116b8135.js +0 -1
  525. package/.next-prod/static/chunks/app/api/files/expanded/route-51252a3b116b8135.js +0 -1
  526. package/.next-prod/static/chunks/app/api/files/index/route-51252a3b116b8135.js +0 -1
  527. package/.next-prod/static/chunks/app/api/files/init/route-51252a3b116b8135.js +0 -1
  528. package/.next-prod/static/chunks/app/api/files/paste/route-51252a3b116b8135.js +0 -1
  529. package/.next-prod/static/chunks/app/api/files/read/route-51252a3b116b8135.js +0 -1
  530. package/.next-prod/static/chunks/app/api/files/readdir/route-51252a3b116b8135.js +0 -1
  531. package/.next-prod/static/chunks/app/api/files/recent/route-51252a3b116b8135.js +0 -1
  532. package/.next-prod/static/chunks/app/api/files/save/route-51252a3b116b8135.js +0 -1
  533. package/.next-prod/static/chunks/app/api/files/search/route-51252a3b116b8135.js +0 -1
  534. package/.next-prod/static/chunks/app/api/files/stat/route-51252a3b116b8135.js +0 -1
  535. package/.next-prod/static/chunks/app/api/files/text/route-51252a3b116b8135.js +0 -1
  536. package/.next-prod/static/chunks/app/api/git/branch-diff/route-51252a3b116b8135.js +0 -1
  537. package/.next-prod/static/chunks/app/api/git/branches/route-51252a3b116b8135.js +0 -1
  538. package/.next-prod/static/chunks/app/api/git/commit-diff/route-51252a3b116b8135.js +0 -1
  539. package/.next-prod/static/chunks/app/api/git/commits/route-51252a3b116b8135.js +0 -1
  540. package/.next-prod/static/chunks/app/api/git/current-branch/route-51252a3b116b8135.js +0 -1
  541. package/.next-prod/static/chunks/app/api/git/diff/route-51252a3b116b8135.js +0 -1
  542. package/.next-prod/static/chunks/app/api/git/discard/route-51252a3b116b8135.js +0 -1
  543. package/.next-prod/static/chunks/app/api/git/stage/route-51252a3b116b8135.js +0 -1
  544. package/.next-prod/static/chunks/app/api/git/status/route-51252a3b116b8135.js +0 -1
  545. package/.next-prod/static/chunks/app/api/git/unstage/route-51252a3b116b8135.js +0 -1
  546. package/.next-prod/static/chunks/app/api/git/worktree/route-51252a3b116b8135.js +0 -1
  547. package/.next-prod/static/chunks/app/api/global-state/route-51252a3b116b8135.js +0 -1
  548. package/.next-prod/static/chunks/app/api/health/route-51252a3b116b8135.js +0 -1
  549. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-51252a3b116b8135.js +0 -1
  550. package/.next-prod/static/chunks/app/api/html-apps/route-51252a3b116b8135.js +0 -1
  551. package/.next-prod/static/chunks/app/api/jupyter/load/route-51252a3b116b8135.js +0 -1
  552. package/.next-prod/static/chunks/app/api/jupyter/save/route-51252a3b116b8135.js +0 -1
  553. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-51252a3b116b8135.js +0 -1
  554. package/.next-prod/static/chunks/app/api/lsp/definition/route-51252a3b116b8135.js +0 -1
  555. package/.next-prod/static/chunks/app/api/lsp/hover/route-51252a3b116b8135.js +0 -1
  556. package/.next-prod/static/chunks/app/api/lsp/references/route-51252a3b116b8135.js +0 -1
  557. package/.next-prod/static/chunks/app/api/lsp/status/route-51252a3b116b8135.js +0 -1
  558. package/.next-prod/static/chunks/app/api/lsp/warmup/route-51252a3b116b8135.js +0 -1
  559. package/.next-prod/static/chunks/app/api/mysql/columns/route-51252a3b116b8135.js +0 -1
  560. package/.next-prod/static/chunks/app/api/mysql/connect/route-51252a3b116b8135.js +0 -1
  561. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-51252a3b116b8135.js +0 -1
  562. package/.next-prod/static/chunks/app/api/mysql/export/route-51252a3b116b8135.js +0 -1
  563. package/.next-prod/static/chunks/app/api/mysql/query/route-51252a3b116b8135.js +0 -1
  564. package/.next-prod/static/chunks/app/api/mysql/schemas/route-51252a3b116b8135.js +0 -1
  565. package/.next-prod/static/chunks/app/api/neo4j/connect/route-51252a3b116b8135.js +0 -1
  566. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-51252a3b116b8135.js +0 -1
  567. package/.next-prod/static/chunks/app/api/neo4j/query/route-51252a3b116b8135.js +0 -1
  568. package/.next-prod/static/chunks/app/api/neo4j/schema/route-51252a3b116b8135.js +0 -1
  569. package/.next-prod/static/chunks/app/api/note/route-51252a3b116b8135.js +0 -1
  570. package/.next-prod/static/chunks/app/api/ollama/config/route-51252a3b116b8135.js +0 -1
  571. package/.next-prod/static/chunks/app/api/ollama/models/route-51252a3b116b8135.js +0 -1
  572. package/.next-prod/static/chunks/app/api/ollama/start/route-51252a3b116b8135.js +0 -1
  573. package/.next-prod/static/chunks/app/api/open-cursor/route-51252a3b116b8135.js +0 -1
  574. package/.next-prod/static/chunks/app/api/open-vscode/route-51252a3b116b8135.js +0 -1
  575. package/.next-prod/static/chunks/app/api/pick-folder/route-51252a3b116b8135.js +0 -1
  576. package/.next-prod/static/chunks/app/api/pinned-sessions/route-51252a3b116b8135.js +0 -1
  577. package/.next-prod/static/chunks/app/api/project-settings/route-51252a3b116b8135.js +0 -1
  578. package/.next-prod/static/chunks/app/api/project-state/route-51252a3b116b8135.js +0 -1
  579. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-51252a3b116b8135.js +0 -1
  580. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-51252a3b116b8135.js +0 -1
  581. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-51252a3b116b8135.js +0 -1
  582. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-51252a3b116b8135.js +0 -1
  583. package/.next-prod/static/chunks/app/api/projectGraph/context/route-51252a3b116b8135.js +0 -1
  584. package/.next-prod/static/chunks/app/api/projectGraph/file/route-51252a3b116b8135.js +0 -1
  585. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-51252a3b116b8135.js +0 -1
  586. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-51252a3b116b8135.js +0 -1
  587. package/.next-prod/static/chunks/app/api/projectGraph/related/route-51252a3b116b8135.js +0 -1
  588. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-51252a3b116b8135.js +0 -1
  589. package/.next-prod/static/chunks/app/api/projectGraph/search/route-51252a3b116b8135.js +0 -1
  590. package/.next-prod/static/chunks/app/api/projects/route-51252a3b116b8135.js +0 -1
  591. package/.next-prod/static/chunks/app/api/push/public-key/route-51252a3b116b8135.js +0 -1
  592. package/.next-prod/static/chunks/app/api/push/subscribe/route-51252a3b116b8135.js +0 -1
  593. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-51252a3b116b8135.js +0 -1
  594. package/.next-prod/static/chunks/app/api/redis/command/route-51252a3b116b8135.js +0 -1
  595. package/.next-prod/static/chunks/app/api/redis/connect/route-51252a3b116b8135.js +0 -1
  596. package/.next-prod/static/chunks/app/api/redis/delete/route-51252a3b116b8135.js +0 -1
  597. package/.next-prod/static/chunks/app/api/redis/disconnect/route-51252a3b116b8135.js +0 -1
  598. package/.next-prod/static/chunks/app/api/redis/get/route-51252a3b116b8135.js +0 -1
  599. package/.next-prod/static/chunks/app/api/redis/keys/route-51252a3b116b8135.js +0 -1
  600. package/.next-prod/static/chunks/app/api/redis/set/route-51252a3b116b8135.js +0 -1
  601. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-51252a3b116b8135.js +0 -1
  602. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-51252a3b116b8135.js +0 -1
  603. package/.next-prod/static/chunks/app/api/review/[id]/route-51252a3b116b8135.js +0 -1
  604. package/.next-prod/static/chunks/app/api/review/identify/route-51252a3b116b8135.js +0 -1
  605. package/.next-prod/static/chunks/app/api/review/order/route-51252a3b116b8135.js +0 -1
  606. package/.next-prod/static/chunks/app/api/review/route-51252a3b116b8135.js +0 -1
  607. package/.next-prod/static/chunks/app/api/review/share-info/route-51252a3b116b8135.js +0 -1
  608. package/.next-prod/static/chunks/app/api/review/users/route-51252a3b116b8135.js +0 -1
  609. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-51252a3b116b8135.js +0 -1
  610. package/.next-prod/static/chunks/app/api/services/config/route-51252a3b116b8135.js +0 -1
  611. package/.next-prod/static/chunks/app/api/services/scripts/route-51252a3b116b8135.js +0 -1
  612. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-51252a3b116b8135.js +0 -1
  613. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-51252a3b116b8135.js +0 -1
  614. package/.next-prod/static/chunks/app/api/session-by-path/route-51252a3b116b8135.js +0 -1
  615. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-51252a3b116b8135.js +0 -1
  616. package/.next-prod/static/chunks/app/api/sessions/projects/route-51252a3b116b8135.js +0 -1
  617. package/.next-prod/static/chunks/app/api/sessions/route-51252a3b116b8135.js +0 -1
  618. package/.next-prod/static/chunks/app/api/settings/route-51252a3b116b8135.js +0 -1
  619. package/.next-prod/static/chunks/app/api/skills/[id]/route-51252a3b116b8135.js +0 -1
  620. package/.next-prod/static/chunks/app/api/skills/content/route-51252a3b116b8135.js +0 -1
  621. package/.next-prod/static/chunks/app/api/skills/route-51252a3b116b8135.js +0 -1
  622. package/.next-prod/static/chunks/app/api/snapshots/diff/route-51252a3b116b8135.js +0 -1
  623. package/.next-prod/static/chunks/app/api/snapshots/route-51252a3b116b8135.js +0 -1
  624. package/.next-prod/static/chunks/app/api/terminal/aliases/route-51252a3b116b8135.js +0 -1
  625. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-51252a3b116b8135.js +0 -1
  626. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-51252a3b116b8135.js +0 -1
  627. package/.next-prod/static/chunks/app/api/terminal/env/route-51252a3b116b8135.js +0 -1
  628. package/.next-prod/static/chunks/app/api/terminal/history/route-51252a3b116b8135.js +0 -1
  629. package/.next-prod/static/chunks/app/api/version/route-51252a3b116b8135.js +0 -1
  630. package/.next-prod/static/chunks/app/apps/[...path]/route-51252a3b116b8135.js +0 -1
  631. package/.next-prod/static/chunks/app/manifest.webmanifest/route-51252a3b116b8135.js +0 -1
  632. package/.next-prod/static/chunks/app/review/[id]/page-c9716ea0049cc328.js +0 -1
  633. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-51252a3b116b8135.js +0 -1
  634. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-51252a3b116b8135.js +0 -1
  635. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-51252a3b116b8135.js +0 -1
  636. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-51252a3b116b8135.js +0 -1
  637. package/.next-prod/static/css/5aa1c710591e36bb.css +0 -1
  638. /package/.next-prod/static/{8aWX4sRFsO4Rx4DD9L9w- → xXMzxSYQCcHCrntVXcycC}/_ssgManifest.js +0 -0
@@ -10,7 +10,7 @@ import {
10
10
  setRunAbort,
11
11
  startRun,
12
12
  updateGlobalState
13
- } from "./chunk-RUNUGDPP.mjs";
13
+ } from "./chunk-H3JSYJCZ.mjs";
14
14
  import {
15
15
  AgentError,
16
16
  AppRuntime,
@@ -24,20 +24,24 @@ import {
24
24
  SKILLS_FILE,
25
25
  SnapshotService,
26
26
  createOllamaModel,
27
+ createOpenAiCompatModel,
27
28
  encodePath,
28
29
  findCodexSessionPath,
29
30
  findKimiSessionPath,
31
+ getBuiltinSessionsRoot,
30
32
  getClaude2SessionPath,
31
33
  getClaudeSessionPath,
34
+ getDeepseekBuiltinSessionPath,
32
35
  getDeepseekSessionPath,
33
36
  getOllamaSessionPath,
34
37
  mutateJsonFile,
35
38
  notePendingRecord,
36
39
  readJsonFile,
40
+ sanitizedSpawnEnv,
37
41
  settlePendingRecord,
38
42
  withFileLock,
39
43
  writeJsonFile
40
- } from "./chunk-BRW4ZEIC.mjs";
44
+ } from "./chunk-7G4OXJJ4.mjs";
41
45
  import {
42
46
  __export
43
47
  } from "./chunk-7P6ASYW6.mjs";
@@ -2577,7 +2581,7 @@ ${tempImageFiles.map((f) => f.path).join("\n")}` : prompt;
2577
2581
  cols,
2578
2582
  rows,
2579
2583
  cwd,
2580
- env: process.env
2584
+ env: sanitizedSpawnEnv()
2581
2585
  });
2582
2586
  } catch (e) {
2583
2587
  cleanupImages();
@@ -3037,8 +3041,10 @@ function buildClaudeOptions(ctx) {
3037
3041
  },
3038
3042
  includePartialMessages: true,
3039
3043
  abortController: abort,
3040
- // claude2 engine: override config directory to ~/.claude2.
3041
- ...engine === "claude2" && { env: { ...process.env, CLAUDE_CONFIG_DIR: CLAUDE2_DIR } }
3044
+ // env is ALWAYS passed (not just for claude2): without it the SDK inherits
3045
+ // process.env verbatim, handing the agent this server's NODE_ENV=production.
3046
+ // See sanitizedSpawnEnv. claude2 additionally points at ~/.claude2.
3047
+ env: sanitizedSpawnEnv(engine === "claude2" ? { CLAUDE_CONFIG_DIR: CLAUDE2_DIR } : {})
3042
3048
  });
3043
3049
  }
3044
3050
  var claudeSpec = {
@@ -3062,93 +3068,82 @@ async function readDeepseekApiKey() {
3062
3068
  return creds.apiKey?.trim() ?? "";
3063
3069
  }
3064
3070
 
3065
- // packages/feature/agent/src/server/engines/deepseek.ts
3066
- var DEEPSEEK_BASE_URL = "https://api.deepseek.com/anthropic";
3067
- var DEFAULT_MODEL = "deepseek-v4-pro";
3068
- var SMALL_FAST_MODEL = "deepseek-v4-flash";
3069
- var ALLOWED_MODELS = /* @__PURE__ */ new Set(["deepseek-v4-flash", "deepseek-v4-pro"]);
3070
- async function readSettings() {
3071
- return readJsonFile(SETTINGS_FILE, {});
3072
- }
3073
- function resolveModel(requested, saved) {
3074
- if (typeof requested === "string" && ALLOWED_MODELS.has(requested)) return requested;
3075
- if (saved && ALLOWED_MODELS.has(saved)) return saved;
3076
- return DEFAULT_MODEL;
3077
- }
3078
- function buildDeepseekEnv(apiKey, model) {
3079
- const { ANTHROPIC_AUTH_TOKEN: _t, ANTHROPIC_API_KEY: _k, ...inherited } = process.env;
3080
- void _t;
3081
- void _k;
3082
- return {
3083
- ...inherited,
3084
- ANTHROPIC_BASE_URL: DEEPSEEK_BASE_URL,
3085
- ANTHROPIC_API_KEY: apiKey,
3086
- // DeepSeek sends this as x-api-key (fully supported)
3087
- ANTHROPIC_MODEL: model,
3088
- ANTHROPIC_SMALL_FAST_MODEL: SMALL_FAST_MODEL,
3089
- CLAUDE_CONFIG_DIR: DEEPSEEK_DIR,
3090
- DISABLE_PROMPT_CACHING: "1",
3091
- // DeepSeek runs its own server-side prefix KV cache
3092
- CLAUDE_CODE_USE_BEDROCK: "0",
3093
- CLAUDE_CODE_USE_VERTEX: "0",
3094
- CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1"
3095
- };
3096
- }
3097
- function buildDeepseekOptions(ctx, env) {
3098
- return (abort, resume) => ({
3099
- ...resume && { resume },
3100
- ...ctx.cwd && { cwd: ctx.cwd },
3101
- settingSources: ["user", "project", "local"],
3102
- permissionMode: "bypassPermissions",
3103
- allowDangerouslySkipPermissions: true,
3104
- includePartialMessages: true,
3105
- abortController: abort,
3106
- env
3107
- });
3108
- }
3109
- var deepseekSpec = {
3110
- name: "deepseek",
3111
- // Pre-check BEFORE startRun: API key must exist; resolve model into params (no registry pollution).
3112
- async preflight(params) {
3113
- const settings = await readSettings();
3114
- const apiKey = await readDeepseekApiKey();
3115
- if (!apiKey) {
3116
- return {
3117
- ok: false,
3118
- status: 400,
3119
- error: "DeepSeek API key is not configured. Open the DeepSeek picker in the chat header to set one."
3120
- };
3121
- }
3122
- params.model = resolveModel(typeof params.model === "string" ? params.model : void 0, settings.engines?.deepseek?.model);
3123
- return { ok: true };
3124
- },
3125
- runner: {
3126
- async run(ctx) {
3127
- const apiKey = await readDeepseekApiKey();
3128
- const model = typeof ctx.params.model === "string" ? ctx.params.model : DEFAULT_MODEL;
3129
- const env = buildDeepseekEnv(apiKey, model);
3130
- await runSdkLoop(ctx, buildDeepseekOptions(ctx, env));
3131
- },
3132
- resolveTitle: (cwd, sessionId) => getSessionTitle(cwd, sessionId)
3133
- }
3134
- };
3135
-
3136
- // packages/feature/agent/src/server/engines/ollama/index.ts
3071
+ // packages/feature/agent/src/server/engines/builtinAgent/index.ts
3137
3072
  import { streamText, stepCountIs } from "ai";
3138
3073
  import { randomUUID as randomUUID3 } from "crypto";
3139
3074
 
3140
- // packages/feature/agent/src/server/engines/ollama/session.ts
3075
+ // packages/feature/agent/src/server/engines/builtinAgent/prompt.ts
3076
+ function buildSystemPrompt(cwd) {
3077
+ return `You are a coding agent. You help the user build and modify software using the provided tools.
3078
+
3079
+ CWD: ${cwd}
3080
+
3081
+ ## Language
3082
+
3083
+ ALWAYS reply in the SAME language as the user's most recent message \u2014 whatever language they used (Chinese, English, Japanese, French, Spanish, \u2026), mirror it. Do NOT default to English just because this system prompt is written in English. If the user switches language mid-conversation, switch with them on the next reply.
3084
+
3085
+ Exceptions that stay as-is regardless of reply language:
3086
+ - Tool "thought" parameters: keep the "PREVIOUS / THIS / EXPECT" template in English.
3087
+ - Code, identifiers, file paths, shell commands, and error messages quoted from tool output: keep original.
3088
+ - Only your natural-language prose to the user follows the user's language.
3089
+
3090
+ ## Workflow
3091
+
3092
+ 1. Plan: call TodoWrite FIRST to break down the task into steps (all pending, first one in_progress).
3093
+ 2. Act: execute steps one by one. After completing each step, call TodoWrite to update progress (mark completed, set next in_progress).
3094
+ 3. Check: after each tool call, assess \u2014 did it succeed? Is the overall task done? If not, continue to the next step.
3095
+ 4. Respond: you MUST always end with a text response to the user. Summarize what was done, what was found, or what remains.
3096
+
3097
+ IMPORTANT: never stop in the middle of a task silently. If you cannot continue (error, missing info, blocked), respond to the user explaining why and what is needed.
3098
+
3099
+ NEVER repeat a tool call with the same or similar arguments. When a search finds nothing, follow this escalation:
3100
+ 1. Simplify the pattern (shorter keyword, remove qualifiers, use a single core term)
3101
+ 2. Broaden the path (search parent directory, or omit path to search entire CWD)
3102
+ 3. Switch tool (Grep \u2192 Glob for filenames, Grep \u2192 Bash with find, or Read a likely file directly)
3103
+ 4. Give up after 3 failed attempts on the same topic \u2014 tell the user what you tried and ask for guidance.
3104
+
3105
+ ## Tools
3106
+
3107
+ - Read: read a file by line range.
3108
+ - Edit: exact string replacement in an existing file (prefer over Write).
3109
+ - Write: create new files or full rewrites only.
3110
+ - Bash: run shell commands.
3111
+ - Grep: ripgrep search. ALWAYS use Grep (never rg/grep via Bash).
3112
+ - Glob: fast file listing by glob pattern.
3113
+ - TodoWrite: plan tasks and track progress. ALWAYS call this first.
3114
+
3115
+ Every tool has a "thought" parameter \u2014 ALWAYS fill it using this format:
3116
+ "PREVIOUS: [what the last tool returned and whether it achieved the goal] \u2192 THIS: [what I am doing now and why] \u2192 EXPECT: [what result I expect]"
3117
+ Example: "PREVIOUS: Grep found 3 matches in cache.go \u2192 THIS: Read cache.go to see full implementation \u2192 EXPECT: understand the caching logic"
3118
+ If this is the first tool call, write "PREVIOUS: n/a" for the first part.
3119
+
3120
+ ## Rules
3121
+
3122
+ Tool usage:
3123
+ - Read before modify: do NOT edit a file you haven't Read.
3124
+ - Absolute paths only: resolve relative paths against CWD.
3125
+
3126
+ Accuracy:
3127
+ - Verify before retracting: when the user questions you, use tools to verify first, then respond based on evidence. Do NOT blindly agree you were wrong.
3128
+ - Honesty over confidence: only state what is backed by tool output. If unsure, say so and state what info is needed or propose a verification plan. Never fabricate data.
3129
+
3130
+ ## Output
3131
+
3132
+ - Be concise. Lead with the action or answer.
3133
+ - Only elaborate on decisions, blockers, or milestones.`;
3134
+ }
3135
+
3136
+ // packages/feature/agent/src/server/engines/builtinAgent/session.ts
3141
3137
  import { readFileSync as readFileSync3, existsSync, mkdirSync as mkdirSync2, appendFileSync } from "fs";
3142
3138
  import { join as join3 } from "path";
3143
- var SESSIONS_ROOT = join3(COCKPIT_DIR, "ollama-sessions");
3144
- function getSessionDir(cwd) {
3145
- return join3(SESSIONS_ROOT, encodePath(cwd));
3139
+ function getSessionDir(root, cwd) {
3140
+ return join3(root, encodePath(cwd));
3146
3141
  }
3147
- function getSessionPath(cwd, sessionId) {
3148
- return join3(getSessionDir(cwd), `${sessionId}.jsonl`);
3142
+ function getSessionPath(root, cwd, sessionId) {
3143
+ return join3(getSessionDir(root, cwd), `${sessionId}.jsonl`);
3149
3144
  }
3150
- function readSessionMessages(cwd, sessionId) {
3151
- const path2 = getSessionPath(cwd, sessionId);
3145
+ function readSessionMessages(root, cwd, sessionId) {
3146
+ const path2 = getSessionPath(root, cwd, sessionId);
3152
3147
  if (!existsSync(path2)) return [];
3153
3148
  const lines = readFileSync3(path2, "utf-8").split("\n").filter(Boolean);
3154
3149
  const transcriptEntries = [];
@@ -3240,14 +3235,14 @@ function readSessionMessages(cwd, sessionId) {
3240
3235
  }
3241
3236
  return messages;
3242
3237
  }
3243
- function appendSessionLine(cwd, sessionId, line) {
3244
- const dir = getSessionDir(cwd);
3238
+ function appendSessionLine(root, cwd, sessionId, line) {
3239
+ const dir = getSessionDir(root, cwd);
3245
3240
  mkdirSync2(dir, { recursive: true });
3246
- const path2 = getSessionPath(cwd, sessionId);
3241
+ const path2 = getSessionPath(root, cwd, sessionId);
3247
3242
  appendFileSync(path2, JSON.stringify(line) + "\n", "utf-8");
3248
3243
  }
3249
- function appendUserText(cwd, sessionId, text, opts) {
3250
- appendSessionLine(cwd, sessionId, {
3244
+ function appendUserText(root, cwd, sessionId, text, opts) {
3245
+ appendSessionLine(root, cwd, sessionId, {
3251
3246
  type: "user",
3252
3247
  uuid: opts?.uuid,
3253
3248
  sessionId,
@@ -3255,8 +3250,8 @@ function appendUserText(cwd, sessionId, text, opts) {
3255
3250
  message: { role: "user", content: [{ type: "text", text }] }
3256
3251
  });
3257
3252
  }
3258
- function appendAssistantMessage(cwd, sessionId, content, opts) {
3259
- appendSessionLine(cwd, sessionId, {
3253
+ function appendAssistantMessage(root, cwd, sessionId, content, opts) {
3254
+ appendSessionLine(root, cwd, sessionId, {
3260
3255
  type: "assistant",
3261
3256
  uuid: opts?.uuid,
3262
3257
  sessionId,
@@ -3264,8 +3259,8 @@ function appendAssistantMessage(cwd, sessionId, content, opts) {
3264
3259
  message: { role: "assistant", content, ...opts?.usage ? { usage: opts.usage } : {} }
3265
3260
  });
3266
3261
  }
3267
- function appendToolResult(cwd, sessionId, toolUseId, content, opts) {
3268
- appendSessionLine(cwd, sessionId, {
3262
+ function appendToolResult(root, cwd, sessionId, toolUseId, content, opts) {
3263
+ appendSessionLine(root, cwd, sessionId, {
3269
3264
  type: "user",
3270
3265
  uuid: opts?.uuid,
3271
3266
  sessionId,
@@ -3283,7 +3278,7 @@ function appendToolResult(cwd, sessionId, toolUseId, content, opts) {
3283
3278
  });
3284
3279
  }
3285
3280
 
3286
- // packages/feature/agent/src/server/engines/ollama/tools.ts
3281
+ // packages/feature/agent/src/server/engines/builtinAgent/tools.ts
3287
3282
  import { tool, zodSchema } from "ai";
3288
3283
 
3289
3284
  // node_modules/zod/v4/classic/external.js
@@ -17054,7 +17049,7 @@ function date4(params) {
17054
17049
  // node_modules/zod/v4/classic/external.js
17055
17050
  config(en_default());
17056
17051
 
17057
- // packages/feature/agent/src/server/engines/ollama/tools.ts
17052
+ // packages/feature/agent/src/server/engines/builtinAgent/tools.ts
17058
17053
  import { readFileSync as readFileSync4, writeFileSync as writeFileSync3 } from "fs";
17059
17054
  import { writeFile, mkdir, readdir, stat, unlink } from "fs/promises";
17060
17055
  import { isAbsolute, join as join4 } from "path";
@@ -17233,7 +17228,7 @@ function createTools(context) {
17233
17228
  encoding: "utf-8",
17234
17229
  timeout: timeout ?? 6e4,
17235
17230
  maxBuffer: 10 * 1024 * 1024,
17236
- env: { ...process.env, FORCE_COLOR: "0", CI: "1" }
17231
+ env: sanitizedSpawnEnv({ FORCE_COLOR: "0", CI: "1" })
17237
17232
  });
17238
17233
  if (stdout.length === 0) {
17239
17234
  if (stderr.length === 0) {
@@ -17332,7 +17327,7 @@ ${stderrCapped}`;
17332
17327
  encoding: "utf-8",
17333
17328
  timeout: 15e3,
17334
17329
  maxBuffer: 10 * 1024 * 1024,
17335
- env: { ...process.env, FORCE_COLOR: "0" }
17330
+ env: sanitizedSpawnEnv({ FORCE_COLOR: "0" })
17336
17331
  });
17337
17332
  const GREP_CAP = 32e3;
17338
17333
  const spillPath = stdout.length > GREP_CAP ? await spillToFile(stdout, "grep") : void 0;
@@ -17372,7 +17367,7 @@ ${summary}`;
17372
17367
  };
17373
17368
  }
17374
17369
 
17375
- // packages/feature/agent/src/server/engines/ollama/stream.ts
17370
+ // packages/feature/agent/src/server/engines/builtinAgent/stream.ts
17376
17371
  async function consumeStream(fullStream, safeEnqueue, _sessionId, opts) {
17377
17372
  let text = "";
17378
17373
  const toolCalls = [];
@@ -17466,194 +17461,242 @@ function emitResultMessage(promptTokens, completionTokens, safeEnqueue) {
17466
17461
  );
17467
17462
  }
17468
17463
 
17469
- // packages/feature/agent/src/server/engines/ollama/index.ts
17470
- var DEFAULT_MODEL2 = "qwen3.5:35b-a3b-coding-nvfp4";
17471
- function buildSystemPrompt(cwd) {
17472
- return `You are a coding agent. You help the user build and modify software using the provided tools.
17473
-
17474
- CWD: ${cwd}
17475
-
17476
- ## Language
17477
-
17478
- ALWAYS reply in the SAME language as the user's most recent message \u2014 whatever language they used (Chinese, English, Japanese, French, Spanish, \u2026), mirror it. Do NOT default to English just because this system prompt is written in English. If the user switches language mid-conversation, switch with them on the next reply.
17479
-
17480
- Exceptions that stay as-is regardless of reply language:
17481
- - Tool "thought" parameters: keep the "PREVIOUS / THIS / EXPECT" template in English.
17482
- - Code, identifiers, file paths, shell commands, and error messages quoted from tool output: keep original.
17483
- - Only your natural-language prose to the user follows the user's language.
17484
-
17485
- ## Workflow
17486
-
17487
- 1. Plan: call TodoWrite FIRST to break down the task into steps (all pending, first one in_progress).
17488
- 2. Act: execute steps one by one. After completing each step, call TodoWrite to update progress (mark completed, set next in_progress).
17489
- 3. Check: after each tool call, assess \u2014 did it succeed? Is the overall task done? If not, continue to the next step.
17490
- 4. Respond: you MUST always end with a text response to the user. Summarize what was done, what was found, or what remains.
17491
-
17492
- IMPORTANT: never stop in the middle of a task silently. If you cannot continue (error, missing info, blocked), respond to the user explaining why and what is needed.
17493
-
17494
- NEVER repeat a tool call with the same or similar arguments. When a search finds nothing, follow this escalation:
17495
- 1. Simplify the pattern (shorter keyword, remove qualifiers, use a single core term)
17496
- 2. Broaden the path (search parent directory, or omit path to search entire CWD)
17497
- 3. Switch tool (Grep \u2192 Glob for filenames, Grep \u2192 Bash with find, or Read a likely file directly)
17498
- 4. Give up after 3 failed attempts on the same topic \u2014 tell the user what you tried and ask for guidance.
17499
-
17500
- ## Tools
17501
-
17502
- - Read: read a file by line range.
17503
- - Edit: exact string replacement in an existing file (prefer over Write).
17504
- - Write: create new files or full rewrites only.
17505
- - Bash: run shell commands.
17506
- - Grep: ripgrep search. ALWAYS use Grep (never rg/grep via Bash).
17507
- - Glob: fast file listing by glob pattern.
17508
- - TodoWrite: plan tasks and track progress. ALWAYS call this first.
17509
-
17510
- Every tool has a "thought" parameter \u2014 ALWAYS fill it using this format:
17511
- "PREVIOUS: [what the last tool returned and whether it achieved the goal] \u2192 THIS: [what I am doing now and why] \u2192 EXPECT: [what result I expect]"
17512
- Example: "PREVIOUS: Grep found 3 matches in cache.go \u2192 THIS: Read cache.go to see full implementation \u2192 EXPECT: understand the caching logic"
17513
- If this is the first tool call, write "PREVIOUS: n/a" for the first part.
17514
-
17515
- ## Rules
17516
-
17517
- Tool usage:
17518
- - Read before modify: do NOT edit a file you haven't Read.
17519
- - Absolute paths only: resolve relative paths against CWD.
17520
-
17521
- Accuracy:
17522
- - Verify before retracting: when the user questions you, use tools to verify first, then respond based on evidence. Do NOT blindly agree you were wrong.
17523
- - Honesty over confidence: only state what is backed by tool output. If unsure, say so and state what info is needed or propose a verification plan. Never fabricate data.
17524
-
17525
- ## Output
17526
-
17527
- - Be concise. Lead with the action or answer.
17528
- - Only elaborate on decisions, blockers, or milestones.`;
17464
+ // packages/feature/agent/src/server/engines/builtinAgent/index.ts
17465
+ function requireTextPrompt(params) {
17466
+ return typeof params.prompt === "string" && params.prompt.trim() ? { ok: true } : { ok: false, status: 400, error: "The built-in agent requires a text prompt" };
17529
17467
  }
17530
- var ollamaSpec = {
17531
- name: "ollama",
17532
- // Ollama has no image support here — require a text prompt (the SDK orchestrator allows
17533
- // images-only for claude/deepseek; without this an images-only message reaches the runner
17534
- // with an undefined prompt).
17535
- async preflight(params) {
17536
- return typeof params.prompt === "string" && params.prompt.trim() ? { ok: true } : { ok: false, status: 400, error: "ollama requires a text prompt" };
17537
- },
17538
- runner: {
17539
- async run(ctx) {
17540
- const cwd = ctx.cwd || process.cwd();
17541
- const sid = ctx.currentKey();
17542
- ctx.rekey(sid);
17543
- const model = typeof ctx.params.model === "string" && ctx.params.model || DEFAULT_MODEL2;
17544
- const prompt = ctx.prompt;
17545
- const emit = (data) => {
17546
- if (data.startsWith("data: [DONE]")) return;
17547
- try {
17548
- ctx.emit(JSON.parse(data.slice(6)));
17549
- } catch {
17550
- }
17551
- };
17552
- const existing = readSessionMessages(cwd, sid);
17553
- const messages = [...existing, { role: "user", content: prompt }];
17554
- appendUserText(cwd, sid, prompt, { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17555
- emit(`data: ${JSON.stringify({ type: "system", subtype: "init", session_id: sid })}
17468
+ async function runBuiltinAgent(ctx, config2) {
17469
+ const { sessionsRoot } = config2;
17470
+ const cwd = ctx.cwd || process.cwd();
17471
+ const sid = ctx.currentKey();
17472
+ ctx.rekey(sid);
17473
+ const model = typeof ctx.params.model === "string" && ctx.params.model || config2.defaultModel;
17474
+ const prompt = ctx.prompt;
17475
+ const emit = (data) => {
17476
+ if (data.startsWith("data: [DONE]")) return;
17477
+ try {
17478
+ ctx.emit(JSON.parse(data.slice(6)));
17479
+ } catch {
17480
+ }
17481
+ };
17482
+ const noHistory = ctx.params.noHistory === true;
17483
+ const existing = noHistory ? [] : readSessionMessages(sessionsRoot, cwd, sid);
17484
+ const messages = [...existing, { role: "user", content: prompt }];
17485
+ appendUserText(sessionsRoot, cwd, sid, prompt, { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() });
17486
+ emit(`data: ${JSON.stringify({ type: "system", subtype: "init", session_id: sid })}
17556
17487
 
17557
17488
  `);
17558
- const context = { cwd, todos: [] };
17559
- const languageModel = await createOllamaModel(model);
17560
- const result = streamText({
17561
- model: languageModel,
17562
- system: buildSystemPrompt(cwd),
17563
- messages,
17564
- tools: createTools(context),
17565
- stopWhen: stepCountIs(256),
17566
- temperature: 0,
17567
- abortSignal: ctx.signal
17568
- });
17569
- const pendingToolCalls = /* @__PURE__ */ new Map();
17570
- const flushPendingToolCallsAsErrors = (reason) => {
17571
- if (pendingToolCalls.size === 0) return;
17572
- for (const [toolUseId] of pendingToolCalls) {
17489
+ const context = { cwd, todos: [] };
17490
+ const languageModel = await config2.createModel(model);
17491
+ const result = streamText({
17492
+ model: languageModel,
17493
+ system: buildSystemPrompt(cwd),
17494
+ messages,
17495
+ tools: createTools(context),
17496
+ stopWhen: stepCountIs(256),
17497
+ temperature: 0,
17498
+ abortSignal: ctx.signal
17499
+ });
17500
+ const pendingToolCalls = /* @__PURE__ */ new Map();
17501
+ const flushPendingToolCallsAsErrors = (reason) => {
17502
+ if (pendingToolCalls.size === 0) return;
17503
+ for (const [toolUseId] of pendingToolCalls) {
17504
+ try {
17505
+ appendToolResult(sessionsRoot, cwd, sid, toolUseId, reason, {
17506
+ uuid: randomUUID3(),
17507
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
17508
+ is_error: true
17509
+ });
17510
+ } catch {
17511
+ }
17512
+ try {
17513
+ emit(
17514
+ `data: ${JSON.stringify({
17515
+ type: "user",
17516
+ message: { content: [{ type: "tool_result", tool_use_id: toolUseId, content: reason, is_error: true }] }
17517
+ })}
17518
+
17519
+ `
17520
+ );
17521
+ } catch {
17522
+ }
17523
+ }
17524
+ pendingToolCalls.clear();
17525
+ };
17526
+ try {
17527
+ const { text } = await consumeStream(
17528
+ result.fullStream,
17529
+ emit,
17530
+ sid,
17531
+ {
17532
+ onToolCall: (toolUseId, toolName, input) => {
17573
17533
  try {
17574
- appendToolResult(cwd, sid, toolUseId, reason, {
17534
+ pendingToolCalls.set(toolUseId, { name: toolName, input });
17535
+ appendAssistantMessage(
17536
+ sessionsRoot,
17537
+ cwd,
17538
+ sid,
17539
+ [{ type: "tool_use", id: toolUseId, name: toolName, input }],
17540
+ { uuid: randomUUID3(), timestamp: (/* @__PURE__ */ new Date()).toISOString() }
17541
+ );
17542
+ } catch {
17543
+ }
17544
+ },
17545
+ onToolResult: (toolUseId, content) => {
17546
+ try {
17547
+ pendingToolCalls.delete(toolUseId);
17548
+ appendToolResult(sessionsRoot, cwd, sid, toolUseId, content, {
17575
17549
  uuid: randomUUID3(),
17576
17550
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
17577
- is_error: true
17551
+ is_error: false
17578
17552
  });
17579
17553
  } catch {
17580
17554
  }
17555
+ },
17556
+ onTextFlush: (flushedText) => {
17581
17557
  try {
17582
- emit(
17583
- `data: ${JSON.stringify({
17584
- type: "user",
17585
- message: { content: [{ type: "tool_result", tool_use_id: toolUseId, content: reason, is_error: true }] }
17586
- })}
17587
-
17588
- `
17589
- );
17558
+ appendAssistantMessage(sessionsRoot, cwd, sid, [{ type: "text", text: flushedText }], {
17559
+ uuid: randomUUID3(),
17560
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
17561
+ });
17590
17562
  } catch {
17591
17563
  }
17592
17564
  }
17593
- pendingToolCalls.clear();
17594
- };
17595
- try {
17596
- const { text } = await consumeStream(
17597
- result.fullStream,
17598
- emit,
17599
- sid,
17600
- {
17601
- onToolCall: (toolUseId, toolName, input) => {
17602
- try {
17603
- pendingToolCalls.set(toolUseId, { name: toolName, input });
17604
- appendAssistantMessage(cwd, sid, [{ type: "tool_use", id: toolUseId, name: toolName, input }], {
17605
- uuid: randomUUID3(),
17606
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
17607
- });
17608
- } catch {
17609
- }
17610
- },
17611
- onToolResult: (toolUseId, content) => {
17612
- try {
17613
- pendingToolCalls.delete(toolUseId);
17614
- appendToolResult(cwd, sid, toolUseId, content, {
17615
- uuid: randomUUID3(),
17616
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
17617
- is_error: false
17618
- });
17619
- } catch {
17620
- }
17621
- },
17622
- onTextFlush: (flushedText) => {
17623
- try {
17624
- appendAssistantMessage(cwd, sid, [{ type: "text", text: flushedText }], {
17625
- uuid: randomUUID3(),
17626
- timestamp: (/* @__PURE__ */ new Date()).toISOString()
17627
- });
17628
- } catch {
17629
- }
17630
- }
17631
- }
17632
- );
17633
- const usage = await result.usage;
17634
- emitResultMessage(usage.inputTokens || 0, usage.outputTokens || 0, emit);
17635
- if (!ctx.signal.aborted) {
17636
- appendAssistantMessage(cwd, sid, text ? [{ type: "text", text }] : [], {
17637
- uuid: randomUUID3(),
17638
- timestamp: (/* @__PURE__ */ new Date()).toISOString(),
17639
- usage: {
17640
- input_tokens: usage.inputTokens || 0,
17641
- output_tokens: usage.outputTokens || 0,
17642
- cache_creation_input_tokens: 0,
17643
- cache_read_input_tokens: 0
17644
- }
17645
- });
17646
- }
17647
- } catch (error48) {
17648
- if (ctx.signal.aborted) {
17649
- flushPendingToolCallsAsErrors("Tool call cancelled (request aborted).");
17650
- return;
17651
- }
17652
- flushPendingToolCallsAsErrors("Tool call failed (stream error).");
17653
- throw error48;
17654
17565
  }
17566
+ );
17567
+ const usage = await result.usage;
17568
+ emitResultMessage(usage.inputTokens || 0, usage.outputTokens || 0, emit);
17569
+ if (!ctx.signal.aborted) {
17570
+ appendAssistantMessage(sessionsRoot, cwd, sid, text ? [{ type: "text", text }] : [], {
17571
+ uuid: randomUUID3(),
17572
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
17573
+ usage: {
17574
+ input_tokens: usage.inputTokens || 0,
17575
+ output_tokens: usage.outputTokens || 0,
17576
+ cache_creation_input_tokens: 0,
17577
+ cache_read_input_tokens: 0
17578
+ }
17579
+ });
17655
17580
  }
17656
- // No resolveTitle → teardown uses 'unread' with undefined title (matches original).
17581
+ } catch (error48) {
17582
+ if (ctx.signal.aborted) {
17583
+ flushPendingToolCallsAsErrors("Tool call cancelled (request aborted).");
17584
+ return;
17585
+ }
17586
+ flushPendingToolCallsAsErrors("Tool call failed (stream error).");
17587
+ throw error48;
17588
+ }
17589
+ }
17590
+
17591
+ // packages/feature/agent/src/server/engines/deepseek.ts
17592
+ var DEEPSEEK_BASE_URL = "https://api.deepseek.com/anthropic";
17593
+ var DEFAULT_MODEL = "deepseek-v4-pro";
17594
+ var SMALL_FAST_MODEL = "deepseek-v4-flash";
17595
+ var ALLOWED_MODELS = /* @__PURE__ */ new Set(["deepseek-v4-flash", "deepseek-v4-pro"]);
17596
+ var DEEPSEEK_OPENAI_BASE_URL = "https://api.deepseek.com/v1";
17597
+ var BUILTIN_DEFAULT_MODEL = DEFAULT_MODEL;
17598
+ async function readSettings() {
17599
+ return readJsonFile(SETTINGS_FILE, {});
17600
+ }
17601
+ function resolveModel(requested, saved) {
17602
+ if (typeof requested === "string" && ALLOWED_MODELS.has(requested)) return requested;
17603
+ if (saved && ALLOWED_MODELS.has(saved)) return saved;
17604
+ return DEFAULT_MODEL;
17605
+ }
17606
+ function resolveBuiltinModel(requested, saved) {
17607
+ if (typeof requested === "string" && requested.trim()) return requested.trim();
17608
+ if (saved && saved.trim()) return saved.trim();
17609
+ return BUILTIN_DEFAULT_MODEL;
17610
+ }
17611
+ function buildBuiltinConfig(apiKey) {
17612
+ return {
17613
+ sessionsRoot: getBuiltinSessionsRoot("deepseek"),
17614
+ defaultModel: BUILTIN_DEFAULT_MODEL,
17615
+ createModel: async (modelName) => createOpenAiCompatModel({ baseURL: DEEPSEEK_OPENAI_BASE_URL, apiKey, modelName })
17616
+ };
17617
+ }
17618
+ function buildDeepseekEnv(apiKey, model) {
17619
+ return sanitizedSpawnEnv({
17620
+ ANTHROPIC_AUTH_TOKEN: void 0,
17621
+ ANTHROPIC_BASE_URL: DEEPSEEK_BASE_URL,
17622
+ ANTHROPIC_API_KEY: apiKey,
17623
+ // DeepSeek sends this as x-api-key (fully supported)
17624
+ ANTHROPIC_MODEL: model,
17625
+ ANTHROPIC_SMALL_FAST_MODEL: SMALL_FAST_MODEL,
17626
+ CLAUDE_CONFIG_DIR: DEEPSEEK_DIR,
17627
+ DISABLE_PROMPT_CACHING: "1",
17628
+ // DeepSeek runs its own server-side prefix KV cache
17629
+ CLAUDE_CODE_USE_BEDROCK: "0",
17630
+ CLAUDE_CODE_USE_VERTEX: "0",
17631
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1"
17632
+ });
17633
+ }
17634
+ function buildDeepseekOptions(ctx, env) {
17635
+ return (abort, resume) => ({
17636
+ ...resume && { resume },
17637
+ ...ctx.cwd && { cwd: ctx.cwd },
17638
+ settingSources: ["user", "project", "local"],
17639
+ permissionMode: "bypassPermissions",
17640
+ allowDangerouslySkipPermissions: true,
17641
+ includePartialMessages: true,
17642
+ abortController: abort,
17643
+ env
17644
+ });
17645
+ }
17646
+ var isBuiltinMode = (params) => params.mode === "builtin";
17647
+ var deepseekSpec = {
17648
+ name: "deepseek",
17649
+ // Pre-check BEFORE startRun: API key must exist; resolve model into params (no registry pollution).
17650
+ async preflight(params) {
17651
+ const settings = await readSettings();
17652
+ const apiKey = await readDeepseekApiKey();
17653
+ if (!apiKey) {
17654
+ return {
17655
+ ok: false,
17656
+ status: 400,
17657
+ error: "DeepSeek API key is not configured. Open the DeepSeek picker in the chat header to set one."
17658
+ };
17659
+ }
17660
+ const requested = typeof params.model === "string" ? params.model : void 0;
17661
+ if (isBuiltinMode(params)) {
17662
+ const textCheck = requireTextPrompt(params);
17663
+ if (!textCheck.ok) return textCheck;
17664
+ params.model = resolveBuiltinModel(requested, settings.engines?.deepseek?.builtinModel);
17665
+ return { ok: true };
17666
+ }
17667
+ params.model = resolveModel(requested, settings.engines?.deepseek?.model);
17668
+ return { ok: true };
17669
+ },
17670
+ runner: {
17671
+ async run(ctx) {
17672
+ const apiKey = await readDeepseekApiKey();
17673
+ if (isBuiltinMode(ctx.params)) {
17674
+ await runBuiltinAgent(ctx, buildBuiltinConfig(apiKey));
17675
+ return;
17676
+ }
17677
+ const model = typeof ctx.params.model === "string" ? ctx.params.model : DEFAULT_MODEL;
17678
+ const env = buildDeepseekEnv(apiKey, model);
17679
+ await runSdkLoop(ctx, buildDeepseekOptions(ctx, env));
17680
+ },
17681
+ resolveTitle: (cwd, sessionId) => getSessionTitle(cwd, sessionId)
17682
+ }
17683
+ };
17684
+
17685
+ // packages/feature/agent/src/server/engines/ollama.ts
17686
+ var DEFAULT_MODEL2 = "qwen3.5:35b-a3b-coding-nvfp4";
17687
+ var OLLAMA_CONFIG = {
17688
+ sessionsRoot: getBuiltinSessionsRoot("ollama"),
17689
+ defaultModel: DEFAULT_MODEL2,
17690
+ createModel: (model) => createOllamaModel(model)
17691
+ };
17692
+ var ollamaSpec = {
17693
+ name: "ollama",
17694
+ async preflight(params) {
17695
+ return requireTextPrompt(params);
17696
+ },
17697
+ runner: {
17698
+ run: (ctx) => runBuiltinAgent(ctx, OLLAMA_CONFIG)
17699
+ // No resolveTitle → teardown uses 'unread' with undefined title.
17657
17700
  }
17658
17701
  };
17659
17702
 
@@ -17711,7 +17754,7 @@ var kimiSpec = {
17711
17754
  const child = spawn2("kimi", args, {
17712
17755
  stdio: ["ignore", "pipe", "pipe"],
17713
17756
  cwd: cwd || void 0,
17714
- env: { ...process.env }
17757
+ env: sanitizedSpawnEnv()
17715
17758
  });
17716
17759
  ctx.signal.addEventListener("abort", () => child.kill("SIGTERM"), { once: true });
17717
17760
  if (sessionId) {
@@ -17848,7 +17891,7 @@ var codexSpec = {
17848
17891
  const child = spawn3("codex", args, {
17849
17892
  stdio: ["ignore", "pipe", "pipe"],
17850
17893
  cwd: cwd || void 0,
17851
- env: { ...process.env }
17894
+ env: sanitizedSpawnEnv()
17852
17895
  });
17853
17896
  ctx.signal.addEventListener("abort", () => child.kill("SIGTERM"), { once: true });
17854
17897
  const pendingToolCalls = /* @__PURE__ */ new Map();
@@ -18035,7 +18078,11 @@ var dispatchEngineMessageEff = (task, engine, startFresh) => Effect_exports.tryP
18035
18078
  cwd: task.cwd,
18036
18079
  engine,
18037
18080
  // selects claude2's CLAUDE_CONFIG_DIR; no-op for the others
18038
- ...task.model && { model: task.model }
18081
+ ...task.model && { model: task.model },
18082
+ // Execution mode is NOT snapshotted on the task — it is derived from where the
18083
+ // session actually lives, so a task made from a Built-in Agent tab keeps running
18084
+ // the built-in loop instead of silently switching backends mid-schedule.
18085
+ ...isDeepseekBuiltinSession(engine, task) && { mode: "builtin" }
18039
18086
  });
18040
18087
  if (!outcome.ok) {
18041
18088
  throw new Error(`${engine} dispatch rejected (${outcome.status}): ${outcome.error}`);
@@ -18069,9 +18116,13 @@ var dispatchEngineMessageEff = (task, engine, startFresh) => Effect_exports.tryP
18069
18116
  cause
18070
18117
  })
18071
18118
  });
18119
+ function isDeepseekBuiltinSession(engine, task) {
18120
+ return engine === "deepseek" && existsSync3(getDeepseekBuiltinSessionPath(task.cwd, task.sessionId));
18121
+ }
18072
18122
  function sessionPathFor(engine, task) {
18073
18123
  if (engine === "claude2") return getClaude2SessionPath(task.cwd, task.sessionId);
18074
18124
  if (engine === "ollama") return getOllamaSessionPath(task.cwd, task.sessionId);
18125
+ if (isDeepseekBuiltinSession(engine, task)) return getDeepseekBuiltinSessionPath(task.cwd, task.sessionId);
18075
18126
  if (engine === "deepseek") return getDeepseekSessionPath(task.cwd, task.sessionId);
18076
18127
  if (engine === "codex") return findCodexSessionPath(task.sessionId);
18077
18128
  if (engine === "kimi") return findKimiSessionPath(task.sessionId);