@surething/cockpit 1.0.276 → 1.0.278

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 (727) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +5 -3
  3. package/.next-prod/build-manifest.json +2 -2
  4. package/.next-prod/cockpit-build.json +1 -1
  5. package/.next-prod/prerender-manifest.json +3 -3
  6. package/.next-prod/routes-manifest.json +18 -6
  7. package/.next-prod/server/app/_global-error/page.js +2 -2
  8. package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next-prod/server/app/_global-error.html +1 -1
  11. package/.next-prod/server/app/_global-error.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next-prod/server/app/_not-found/page.js +1 -1
  16. package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
  17. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  18. package/.next-prod/server/app/_not-found.html +2 -2
  19. package/.next-prod/server/app/_not-found.rsc +3 -3
  20. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
  21. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
  22. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  24. package/.next-prod/server/app/api/agent/test/route.js +1 -1
  25. package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
  26. package/.next-prod/server/app/api/bash/route.js +1 -1
  27. package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
  28. package/.next-prod/server/app/api/bots/[id]/route.js +1 -1
  29. package/.next-prod/server/app/api/bots/[id]/route.js.nft.json +1 -1
  30. package/.next-prod/server/app/api/bots/route.js +1 -1
  31. package/.next-prod/server/app/api/bots/route.js.nft.json +1 -1
  32. package/.next-prod/server/app/api/chat/codex/route.js +1 -1
  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/glm/route.js +1 -1
  37. package/.next-prod/server/app/api/chat/glm/route.js.nft.json +1 -1
  38. package/.next-prod/server/app/api/chat/kimi/route.js +1 -1
  39. package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
  40. package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
  41. package/.next-prod/server/app/api/chat/ollama/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 +2 -2
  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 +1 -1
  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 -1
  65. package/.next-prod/server/app/api/deepseek/balance/route.js.nft.json +1 -1
  66. package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
  67. package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -1
  68. package/.next-prod/server/app/api/deepseek/models/route.js +1 -1
  69. package/.next-prod/server/app/api/deepseek/models/route.js.nft.json +1 -1
  70. package/.next-prod/server/app/api/dev/spans/route.js +1 -1
  71. package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
  72. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  73. package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
  74. package/.next-prod/server/app/api/file/route.js +1 -1
  75. package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
  76. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  77. package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
  78. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  79. package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
  80. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  81. package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
  82. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  83. package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
  84. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  85. package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
  86. package/.next-prod/server/app/api/files/index/route.js +1 -1
  87. package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
  88. package/.next-prod/server/app/api/files/init/route.js +1 -1
  89. package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
  90. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  91. package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
  92. package/.next-prod/server/app/api/files/read/route.js +1 -1
  93. package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
  94. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  95. package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
  96. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  97. package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
  98. package/.next-prod/server/app/api/files/save/route.js +1 -1
  99. package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
  100. package/.next-prod/server/app/api/files/search/route.js +1 -1
  101. package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
  102. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  103. package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
  104. package/.next-prod/server/app/api/files/text/route.js +1 -1
  105. package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
  106. package/.next-prod/server/app/api/git/blob/route.js +1 -1
  107. package/.next-prod/server/app/api/git/blob/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/glm/credentials/route.js +1 -1
  131. package/.next-prod/server/app/api/glm/credentials/route.js.nft.json +1 -1
  132. package/.next-prod/server/app/api/glm/models/route.js +1 -1
  133. package/.next-prod/server/app/api/glm/models/route.js.nft.json +1 -1
  134. package/.next-prod/server/app/api/glm/usage/route.js +1 -1
  135. package/.next-prod/server/app/api/glm/usage/route.js.nft.json +1 -1
  136. package/.next-prod/server/app/api/global-state/route.js +2 -2
  137. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  138. package/.next-prod/server/app/api/health/route.js +1 -1
  139. package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
  140. package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
  141. package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
  142. package/.next-prod/server/app/api/html-apps/route.js +1 -1
  143. package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
  144. package/.next-prod/server/app/api/instructions/config/route.js +1 -1
  145. package/.next-prod/server/app/api/instructions/config/route.js.nft.json +1 -1
  146. package/.next-prod/server/app/api/kimi/credentials/route.js +1 -1
  147. package/.next-prod/server/app/api/kimi/credentials/route.js.nft.json +1 -1
  148. package/.next-prod/server/app/api/kimi/models/route.js +1 -1
  149. package/.next-prod/server/app/api/kimi/models/route.js.nft.json +1 -1
  150. package/.next-prod/server/app/api/kimi/usage/route.js +1 -1
  151. package/.next-prod/server/app/api/kimi/usage/route.js.nft.json +1 -1
  152. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  153. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  154. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  155. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  156. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  157. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  158. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  159. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  160. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  161. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  162. package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
  163. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  164. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  165. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  166. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  167. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  168. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  169. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  170. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  171. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  172. package/.next-prod/server/app/api/mysql/schemas/route.js +1 -1
  173. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  174. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  175. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  176. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  177. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  178. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  179. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  180. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  181. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  182. package/.next-prod/server/app/api/note/route.js +1 -1
  183. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  184. package/.next-prod/server/app/api/ollama/config/route.js +1 -1
  185. package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
  186. package/.next-prod/server/app/api/ollama/default-model/route.js +1 -0
  187. package/.next-prod/server/app/api/ollama/default-model/route.js.nft.json +1 -0
  188. package/.next-prod/server/app/api/ollama/default-model/route_client-reference-manifest.js +1 -0
  189. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  190. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  191. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  192. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  193. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  194. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  195. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  196. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  197. package/.next-prod/server/app/api/output-styles/config/route.js +1 -0
  198. package/.next-prod/server/app/api/output-styles/config/route.js.nft.json +1 -0
  199. package/.next-prod/server/app/api/output-styles/config/route_client-reference-manifest.js +1 -0
  200. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  201. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
  202. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  203. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  204. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  205. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  206. package/.next-prod/server/app/api/project-state/route.js +2 -2
  207. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  208. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  209. package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
  210. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  211. package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
  212. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  213. package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
  214. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  215. package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
  216. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  217. package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
  218. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  219. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  220. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  221. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  222. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  223. package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
  224. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  225. package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
  226. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  227. package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
  228. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  229. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  230. package/.next-prod/server/app/api/projects/route.js +1 -1
  231. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  232. package/.next-prod/server/app/api/push/public-key/route.js +1 -1
  233. package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
  234. package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
  235. package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
  236. package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
  237. package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
  238. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  239. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  240. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  241. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  242. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  243. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  244. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  245. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  246. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  247. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  248. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  249. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  250. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  251. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  252. package/.next-prod/server/app/api/restart/route.js +1 -1
  253. package/.next-prod/server/app/api/restart/route.js.nft.json +1 -1
  254. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  255. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  256. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  257. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  258. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  259. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  260. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  261. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  262. package/.next-prod/server/app/api/review/order/route.js +1 -1
  263. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  264. package/.next-prod/server/app/api/review/route.js +1 -1
  265. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  266. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  267. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  268. package/.next-prod/server/app/api/review/users/route.js +1 -1
  269. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  270. package/.next-prod/server/app/api/scheduled-tasks/route.js +2 -2
  271. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  272. package/.next-prod/server/app/api/services/config/route.js +1 -1
  273. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  274. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  275. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  276. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  277. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  278. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  279. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  280. package/.next-prod/server/app/api/session/[sessionId]/turn/route.js +2 -2
  281. package/.next-prod/server/app/api/session/[sessionId]/turn/route.js.nft.json +1 -1
  282. package/.next-prod/server/app/api/session/user-messages/route.js +1 -1
  283. package/.next-prod/server/app/api/session/user-messages/route.js.nft.json +1 -1
  284. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  285. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  286. package/.next-prod/server/app/api/sessions/delegate/route.js +1 -1
  287. package/.next-prod/server/app/api/sessions/delegate/route.js.nft.json +1 -1
  288. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  289. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  290. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  291. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  292. package/.next-prod/server/app/api/sessions/search/route.js +1 -1
  293. package/.next-prod/server/app/api/sessions/search/route.js.nft.json +1 -1
  294. package/.next-prod/server/app/api/sessions/status/route.js +1 -1
  295. package/.next-prod/server/app/api/sessions/status/route.js.nft.json +1 -1
  296. package/.next-prod/server/app/api/settings/route.js +1 -1
  297. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  298. package/.next-prod/server/app/api/shutdown/route.js +1 -1
  299. package/.next-prod/server/app/api/shutdown/route.js.nft.json +1 -1
  300. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  301. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  302. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  303. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  304. package/.next-prod/server/app/api/skills/route.js +1 -1
  305. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  306. package/.next-prod/server/app/api/snapshots/blob/route.js +1 -1
  307. package/.next-prod/server/app/api/snapshots/blob/route.js.nft.json +1 -1
  308. package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
  309. package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
  310. package/.next-prod/server/app/api/snapshots/range-diff/route.js +1 -0
  311. package/.next-prod/server/app/api/snapshots/range-diff/route.js.nft.json +1 -0
  312. package/.next-prod/server/app/api/snapshots/range-diff/route_client-reference-manifest.js +1 -0
  313. package/.next-prod/server/app/api/snapshots/route.js +1 -1
  314. package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
  315. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  316. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  317. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  318. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  319. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  320. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  321. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  322. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  323. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  324. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  325. package/.next-prod/server/app/api/update/route.js +1 -1
  326. package/.next-prod/server/app/api/update/route.js.nft.json +1 -1
  327. package/.next-prod/server/app/api/update-state/route.js +1 -1
  328. package/.next-prod/server/app/api/update-state/route.js.nft.json +1 -1
  329. package/.next-prod/server/app/api/version/route.js +1 -1
  330. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  331. package/.next-prod/server/app/apps/[...path]/route.js +1 -1
  332. package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
  333. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  334. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  335. package/.next-prod/server/app/m/page.js +1 -1
  336. package/.next-prod/server/app/m/page.js.nft.json +1 -1
  337. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  338. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  339. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  340. package/.next-prod/server/app/page.js +1 -1
  341. package/.next-prod/server/app/page.js.nft.json +1 -1
  342. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  343. package/.next-prod/server/app/project/page.js +1 -1
  344. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  345. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  346. package/.next-prod/server/app/review/[id]/page.js +1 -1
  347. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  348. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  349. package/.next-prod/server/app-paths-manifest.json +5 -3
  350. package/.next-prod/server/chunks/2493.js +33 -27
  351. package/.next-prod/server/chunks/4949.js +1 -1
  352. package/.next-prod/server/chunks/{3354.js → 5591.js} +5 -5
  353. package/.next-prod/server/chunks/6495.js +1 -1
  354. package/.next-prod/server/chunks/6548.js +1 -1
  355. package/.next-prod/server/chunks/7438.js +16 -15
  356. package/.next-prod/server/chunks/9830.js +1 -1
  357. package/.next-prod/server/functions-config-manifest.json +1 -0
  358. package/.next-prod/server/middleware-build-manifest.js +1 -1
  359. package/.next-prod/server/pages/404.html +2 -2
  360. package/.next-prod/server/pages/500.html +1 -1
  361. package/.next-prod/server/server-reference-manifest.json +1 -1
  362. package/.next-prod/static/I8gbcTQRiRdMF09goE7WI/_buildManifest.js +1 -0
  363. package/.next-prod/static/chunks/{88707-2ab6211efb1fae85.js → 15546-54f06dcff501835d.js} +2 -2
  364. package/.next-prod/static/chunks/{50015-b81552adf20a6a33.js → 21829-993d9bfd63c1ee9e.js} +3 -3
  365. package/.next-prod/static/chunks/60875-acaae14dd7ddcd91.js +35 -0
  366. package/.next-prod/static/chunks/95313-eb607273c688b022.js +17 -0
  367. package/.next-prod/static/chunks/99092-f94ee242866d22b9.js +716 -0
  368. package/.next-prod/static/chunks/app/_global-error/page-b3c86dd8f06140fe.js +1 -0
  369. package/.next-prod/static/chunks/app/api/agent/test/route-b3c86dd8f06140fe.js +1 -0
  370. package/.next-prod/static/chunks/app/api/bash/route-b3c86dd8f06140fe.js +1 -0
  371. package/.next-prod/static/chunks/app/api/bots/[id]/route-b3c86dd8f06140fe.js +1 -0
  372. package/.next-prod/static/chunks/app/api/bots/route-b3c86dd8f06140fe.js +1 -0
  373. package/.next-prod/static/chunks/app/api/chat/codex/route-b3c86dd8f06140fe.js +1 -0
  374. package/.next-prod/static/chunks/app/api/chat/deepseek/route-b3c86dd8f06140fe.js +1 -0
  375. package/.next-prod/static/chunks/app/api/chat/glm/route-b3c86dd8f06140fe.js +1 -0
  376. package/.next-prod/static/chunks/app/api/chat/kimi/route-b3c86dd8f06140fe.js +1 -0
  377. package/.next-prod/static/chunks/app/api/chat/ollama/route-b3c86dd8f06140fe.js +1 -0
  378. package/.next-prod/static/chunks/app/api/chat/route-b3c86dd8f06140fe.js +1 -0
  379. package/.next-prod/static/chunks/app/api/chat/stop/route-b3c86dd8f06140fe.js +1 -0
  380. package/.next-prod/static/chunks/app/api/claude-stats/route-b3c86dd8f06140fe.js +1 -0
  381. package/.next-prod/static/chunks/app/api/commands/route-b3c86dd8f06140fe.js +1 -0
  382. package/.next-prod/static/chunks/app/api/comments/route-b3c86dd8f06140fe.js +1 -0
  383. package/.next-prod/static/chunks/app/api/db/columns/route-b3c86dd8f06140fe.js +1 -0
  384. package/.next-prod/static/chunks/app/api/db/connect/route-b3c86dd8f06140fe.js +1 -0
  385. package/.next-prod/static/chunks/app/api/db/disconnect/route-b3c86dd8f06140fe.js +1 -0
  386. package/.next-prod/static/chunks/app/api/db/export/route-b3c86dd8f06140fe.js +1 -0
  387. package/.next-prod/static/chunks/app/api/db/query/route-b3c86dd8f06140fe.js +1 -0
  388. package/.next-prod/static/chunks/app/api/db/schemas/route-b3c86dd8f06140fe.js +1 -0
  389. package/.next-prod/static/chunks/app/api/deepseek/balance/route-b3c86dd8f06140fe.js +1 -0
  390. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-b3c86dd8f06140fe.js +1 -0
  391. package/.next-prod/static/chunks/app/api/deepseek/models/route-b3c86dd8f06140fe.js +1 -0
  392. package/.next-prod/static/chunks/app/api/dev/spans/route-b3c86dd8f06140fe.js +1 -0
  393. package/.next-prod/static/chunks/app/api/extension/version/route-b3c86dd8f06140fe.js +1 -0
  394. package/.next-prod/static/chunks/app/api/file/route-b3c86dd8f06140fe.js +1 -0
  395. package/.next-prod/static/chunks/app/api/files/blame/route-b3c86dd8f06140fe.js +1 -0
  396. package/.next-prod/static/chunks/app/api/files/clipboard/route-b3c86dd8f06140fe.js +1 -0
  397. package/.next-prod/static/chunks/app/api/files/copy/route-b3c86dd8f06140fe.js +1 -0
  398. package/.next-prod/static/chunks/app/api/files/delete/route-b3c86dd8f06140fe.js +1 -0
  399. package/.next-prod/static/chunks/app/api/files/expanded/route-b3c86dd8f06140fe.js +1 -0
  400. package/.next-prod/static/chunks/app/api/files/index/route-b3c86dd8f06140fe.js +1 -0
  401. package/.next-prod/static/chunks/app/api/files/init/route-b3c86dd8f06140fe.js +1 -0
  402. package/.next-prod/static/chunks/app/api/files/paste/route-b3c86dd8f06140fe.js +1 -0
  403. package/.next-prod/static/chunks/app/api/files/read/route-b3c86dd8f06140fe.js +1 -0
  404. package/.next-prod/static/chunks/app/api/files/readdir/route-b3c86dd8f06140fe.js +1 -0
  405. package/.next-prod/static/chunks/app/api/files/recent/route-b3c86dd8f06140fe.js +1 -0
  406. package/.next-prod/static/chunks/app/api/files/save/route-b3c86dd8f06140fe.js +1 -0
  407. package/.next-prod/static/chunks/app/api/files/search/route-b3c86dd8f06140fe.js +1 -0
  408. package/.next-prod/static/chunks/app/api/files/stat/route-b3c86dd8f06140fe.js +1 -0
  409. package/.next-prod/static/chunks/app/api/files/text/route-b3c86dd8f06140fe.js +1 -0
  410. package/.next-prod/static/chunks/app/api/git/blob/route-b3c86dd8f06140fe.js +1 -0
  411. package/.next-prod/static/chunks/app/api/git/branch-diff/route-b3c86dd8f06140fe.js +1 -0
  412. package/.next-prod/static/chunks/app/api/git/branches/route-b3c86dd8f06140fe.js +1 -0
  413. package/.next-prod/static/chunks/app/api/git/commit-diff/route-b3c86dd8f06140fe.js +1 -0
  414. package/.next-prod/static/chunks/app/api/git/commits/route-b3c86dd8f06140fe.js +1 -0
  415. package/.next-prod/static/chunks/app/api/git/current-branch/route-b3c86dd8f06140fe.js +1 -0
  416. package/.next-prod/static/chunks/app/api/git/diff/route-b3c86dd8f06140fe.js +1 -0
  417. package/.next-prod/static/chunks/app/api/git/discard/route-b3c86dd8f06140fe.js +1 -0
  418. package/.next-prod/static/chunks/app/api/git/stage/route-b3c86dd8f06140fe.js +1 -0
  419. package/.next-prod/static/chunks/app/api/git/status/route-b3c86dd8f06140fe.js +1 -0
  420. package/.next-prod/static/chunks/app/api/git/unstage/route-b3c86dd8f06140fe.js +1 -0
  421. package/.next-prod/static/chunks/app/api/git/worktree/route-b3c86dd8f06140fe.js +1 -0
  422. package/.next-prod/static/chunks/app/api/glm/credentials/route-b3c86dd8f06140fe.js +1 -0
  423. package/.next-prod/static/chunks/app/api/glm/models/route-b3c86dd8f06140fe.js +1 -0
  424. package/.next-prod/static/chunks/app/api/glm/usage/route-b3c86dd8f06140fe.js +1 -0
  425. package/.next-prod/static/chunks/app/api/global-state/route-b3c86dd8f06140fe.js +1 -0
  426. package/.next-prod/static/chunks/app/api/health/route-b3c86dd8f06140fe.js +1 -0
  427. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-b3c86dd8f06140fe.js +1 -0
  428. package/.next-prod/static/chunks/app/api/html-apps/route-b3c86dd8f06140fe.js +1 -0
  429. package/.next-prod/static/chunks/app/api/instructions/config/route-b3c86dd8f06140fe.js +1 -0
  430. package/.next-prod/static/chunks/app/api/kimi/credentials/route-b3c86dd8f06140fe.js +1 -0
  431. package/.next-prod/static/chunks/app/api/kimi/models/route-b3c86dd8f06140fe.js +1 -0
  432. package/.next-prod/static/chunks/app/api/kimi/usage/route-b3c86dd8f06140fe.js +1 -0
  433. package/.next-prod/static/chunks/app/api/lsp/definition/route-b3c86dd8f06140fe.js +1 -0
  434. package/.next-prod/static/chunks/app/api/lsp/hover/route-b3c86dd8f06140fe.js +1 -0
  435. package/.next-prod/static/chunks/app/api/lsp/references/route-b3c86dd8f06140fe.js +1 -0
  436. package/.next-prod/static/chunks/app/api/lsp/status/route-b3c86dd8f06140fe.js +1 -0
  437. package/.next-prod/static/chunks/app/api/lsp/warmup/route-b3c86dd8f06140fe.js +1 -0
  438. package/.next-prod/static/chunks/app/api/mysql/columns/route-b3c86dd8f06140fe.js +1 -0
  439. package/.next-prod/static/chunks/app/api/mysql/connect/route-b3c86dd8f06140fe.js +1 -0
  440. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-b3c86dd8f06140fe.js +1 -0
  441. package/.next-prod/static/chunks/app/api/mysql/export/route-b3c86dd8f06140fe.js +1 -0
  442. package/.next-prod/static/chunks/app/api/mysql/query/route-b3c86dd8f06140fe.js +1 -0
  443. package/.next-prod/static/chunks/app/api/mysql/schemas/route-b3c86dd8f06140fe.js +1 -0
  444. package/.next-prod/static/chunks/app/api/neo4j/connect/route-b3c86dd8f06140fe.js +1 -0
  445. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-b3c86dd8f06140fe.js +1 -0
  446. package/.next-prod/static/chunks/app/api/neo4j/query/route-b3c86dd8f06140fe.js +1 -0
  447. package/.next-prod/static/chunks/app/api/neo4j/schema/route-b3c86dd8f06140fe.js +1 -0
  448. package/.next-prod/static/chunks/app/api/note/route-b3c86dd8f06140fe.js +1 -0
  449. package/.next-prod/static/chunks/app/api/ollama/config/route-b3c86dd8f06140fe.js +1 -0
  450. package/.next-prod/static/chunks/app/api/ollama/default-model/route-b3c86dd8f06140fe.js +1 -0
  451. package/.next-prod/static/chunks/app/api/ollama/models/route-b3c86dd8f06140fe.js +1 -0
  452. package/.next-prod/static/chunks/app/api/ollama/start/route-b3c86dd8f06140fe.js +1 -0
  453. package/.next-prod/static/chunks/app/api/open-cursor/route-b3c86dd8f06140fe.js +1 -0
  454. package/.next-prod/static/chunks/app/api/open-vscode/route-b3c86dd8f06140fe.js +1 -0
  455. package/.next-prod/static/chunks/app/api/output-styles/config/route-b3c86dd8f06140fe.js +1 -0
  456. package/.next-prod/static/chunks/app/api/pick-folder/route-b3c86dd8f06140fe.js +1 -0
  457. package/.next-prod/static/chunks/app/api/pinned-sessions/route-b3c86dd8f06140fe.js +1 -0
  458. package/.next-prod/static/chunks/app/api/project-settings/route-b3c86dd8f06140fe.js +1 -0
  459. package/.next-prod/static/chunks/app/api/project-state/route-b3c86dd8f06140fe.js +1 -0
  460. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-b3c86dd8f06140fe.js +1 -0
  461. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-b3c86dd8f06140fe.js +1 -0
  462. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-b3c86dd8f06140fe.js +1 -0
  463. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-b3c86dd8f06140fe.js +1 -0
  464. package/.next-prod/static/chunks/app/api/projectGraph/context/route-b3c86dd8f06140fe.js +1 -0
  465. package/.next-prod/static/chunks/app/api/projectGraph/file/route-b3c86dd8f06140fe.js +1 -0
  466. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-b3c86dd8f06140fe.js +1 -0
  467. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-b3c86dd8f06140fe.js +1 -0
  468. package/.next-prod/static/chunks/app/api/projectGraph/related/route-b3c86dd8f06140fe.js +1 -0
  469. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-b3c86dd8f06140fe.js +1 -0
  470. package/.next-prod/static/chunks/app/api/projectGraph/search/route-b3c86dd8f06140fe.js +1 -0
  471. package/.next-prod/static/chunks/app/api/projects/route-b3c86dd8f06140fe.js +1 -0
  472. package/.next-prod/static/chunks/app/api/push/public-key/route-b3c86dd8f06140fe.js +1 -0
  473. package/.next-prod/static/chunks/app/api/push/subscribe/route-b3c86dd8f06140fe.js +1 -0
  474. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-b3c86dd8f06140fe.js +1 -0
  475. package/.next-prod/static/chunks/app/api/redis/command/route-b3c86dd8f06140fe.js +1 -0
  476. package/.next-prod/static/chunks/app/api/redis/connect/route-b3c86dd8f06140fe.js +1 -0
  477. package/.next-prod/static/chunks/app/api/redis/delete/route-b3c86dd8f06140fe.js +1 -0
  478. package/.next-prod/static/chunks/app/api/redis/disconnect/route-b3c86dd8f06140fe.js +1 -0
  479. package/.next-prod/static/chunks/app/api/redis/get/route-b3c86dd8f06140fe.js +1 -0
  480. package/.next-prod/static/chunks/app/api/redis/keys/route-b3c86dd8f06140fe.js +1 -0
  481. package/.next-prod/static/chunks/app/api/redis/set/route-b3c86dd8f06140fe.js +1 -0
  482. package/.next-prod/static/chunks/app/api/restart/route-b3c86dd8f06140fe.js +1 -0
  483. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-b3c86dd8f06140fe.js +1 -0
  484. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-b3c86dd8f06140fe.js +1 -0
  485. package/.next-prod/static/chunks/app/api/review/[id]/route-b3c86dd8f06140fe.js +1 -0
  486. package/.next-prod/static/chunks/app/api/review/identify/route-b3c86dd8f06140fe.js +1 -0
  487. package/.next-prod/static/chunks/app/api/review/order/route-b3c86dd8f06140fe.js +1 -0
  488. package/.next-prod/static/chunks/app/api/review/route-b3c86dd8f06140fe.js +1 -0
  489. package/.next-prod/static/chunks/app/api/review/share-info/route-b3c86dd8f06140fe.js +1 -0
  490. package/.next-prod/static/chunks/app/api/review/users/route-b3c86dd8f06140fe.js +1 -0
  491. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-b3c86dd8f06140fe.js +1 -0
  492. package/.next-prod/static/chunks/app/api/services/config/route-b3c86dd8f06140fe.js +1 -0
  493. package/.next-prod/static/chunks/app/api/services/scripts/route-b3c86dd8f06140fe.js +1 -0
  494. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-b3c86dd8f06140fe.js +1 -0
  495. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-b3c86dd8f06140fe.js +1 -0
  496. package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-b3c86dd8f06140fe.js +1 -0
  497. package/.next-prod/static/chunks/app/api/session/user-messages/route-b3c86dd8f06140fe.js +1 -0
  498. package/.next-prod/static/chunks/app/api/session-by-path/route-b3c86dd8f06140fe.js +1 -0
  499. package/.next-prod/static/chunks/app/api/sessions/delegate/route-b3c86dd8f06140fe.js +1 -0
  500. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-b3c86dd8f06140fe.js +1 -0
  501. package/.next-prod/static/chunks/app/api/sessions/projects/route-b3c86dd8f06140fe.js +1 -0
  502. package/.next-prod/static/chunks/app/api/sessions/search/route-b3c86dd8f06140fe.js +1 -0
  503. package/.next-prod/static/chunks/app/api/sessions/status/route-b3c86dd8f06140fe.js +1 -0
  504. package/.next-prod/static/chunks/app/api/settings/route-b3c86dd8f06140fe.js +1 -0
  505. package/.next-prod/static/chunks/app/api/shutdown/route-b3c86dd8f06140fe.js +1 -0
  506. package/.next-prod/static/chunks/app/api/skills/[id]/route-b3c86dd8f06140fe.js +1 -0
  507. package/.next-prod/static/chunks/app/api/skills/content/route-b3c86dd8f06140fe.js +1 -0
  508. package/.next-prod/static/chunks/app/api/skills/route-b3c86dd8f06140fe.js +1 -0
  509. package/.next-prod/static/chunks/app/api/snapshots/blob/route-b3c86dd8f06140fe.js +1 -0
  510. package/.next-prod/static/chunks/app/api/snapshots/diff/route-b3c86dd8f06140fe.js +1 -0
  511. package/.next-prod/static/chunks/app/api/snapshots/range-diff/route-b3c86dd8f06140fe.js +1 -0
  512. package/.next-prod/static/chunks/app/api/snapshots/route-b3c86dd8f06140fe.js +1 -0
  513. package/.next-prod/static/chunks/app/api/terminal/aliases/route-b3c86dd8f06140fe.js +1 -0
  514. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-b3c86dd8f06140fe.js +1 -0
  515. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-b3c86dd8f06140fe.js +1 -0
  516. package/.next-prod/static/chunks/app/api/terminal/env/route-b3c86dd8f06140fe.js +1 -0
  517. package/.next-prod/static/chunks/app/api/terminal/history/route-b3c86dd8f06140fe.js +1 -0
  518. package/.next-prod/static/chunks/app/api/update/route-b3c86dd8f06140fe.js +1 -0
  519. package/.next-prod/static/chunks/app/api/update-state/route-b3c86dd8f06140fe.js +1 -0
  520. package/.next-prod/static/chunks/app/api/version/route-b3c86dd8f06140fe.js +1 -0
  521. package/.next-prod/static/chunks/app/apps/[...path]/route-b3c86dd8f06140fe.js +1 -0
  522. package/.next-prod/static/chunks/app/{layout-347ca1b3228d5b23.js → layout-589122feb9071556.js} +1 -1
  523. package/.next-prod/static/chunks/app/m/page-ba0be89e67f08b6d.js +1 -0
  524. package/.next-prod/static/chunks/app/manifest.webmanifest/route-b3c86dd8f06140fe.js +1 -0
  525. package/.next-prod/static/chunks/app/{page-2ade7ecd21636624.js → page-a69072e6dbd4a059.js} +1 -1
  526. package/.next-prod/static/chunks/app/project/{page-2ade7ecd21636624.js → page-a69072e6dbd4a059.js} +1 -1
  527. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-b3c86dd8f06140fe.js +1 -0
  528. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-b3c86dd8f06140fe.js +1 -0
  529. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-b3c86dd8f06140fe.js +1 -0
  530. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-b3c86dd8f06140fe.js +1 -0
  531. package/.next-prod/static/css/2abfec9d3e93011f.css +1 -0
  532. package/.next-prod/trace +15 -15
  533. package/.next-prod/trace-build +1 -1
  534. package/.next-prod/types/app/api/{sessions → ollama/default-model}/route.ts +3 -3
  535. package/.next-prod/types/app/api/output-styles/config/route.ts +353 -0
  536. package/.next-prod/types/app/api/snapshots/range-diff/route.ts +353 -0
  537. package/.next-prod/types/routes.d.ts +4 -2
  538. package/.next-prod/types/validator.ts +27 -9
  539. package/README.md +2 -2
  540. package/README.zh.md +2 -2
  541. package/bin/cock-codegraph.mjs +58 -58
  542. package/bin/cock-connection.mjs +1 -1
  543. package/bin/cock-terminal.mjs +17 -17
  544. package/bin/cockpit-dev.mjs +3 -4
  545. package/bin/cockpit.mjs +243 -9
  546. package/bin/setup-dev.mjs +3 -4
  547. package/dist/{chunk-BCWVTDEZ.mjs → chunk-LPZXJPD6.mjs} +597 -142
  548. package/dist/{chunk-QY2K7YIF.mjs → chunk-W5MB7DIM.mjs} +1 -1
  549. package/dist/httpApi.mjs +2 -2
  550. package/dist/scheduledTasks.mjs +102 -15
  551. package/dist/wsServer.mjs +12 -3
  552. package/package.json +3 -4
  553. package/skills/bot/SKILL.md +3 -3
  554. package/skills/bot-run/SKILL.md +54 -117
  555. package/skills/bot-run/followup.md +38 -0
  556. package/skills/bot-run/wait.md +76 -0
  557. package/skills/bot-turn/SKILL.md +7 -0
  558. package/skills/cc/SKILL.md +0 -1
  559. package/skills/dl/SKILL.md +4 -1
  560. package/.next-prod/server/app/api/sessions/route.js +0 -1
  561. package/.next-prod/server/app/api/sessions/route.js.nft.json +0 -1
  562. package/.next-prod/server/app/api/sessions/route_client-reference-manifest.js +0 -1
  563. package/.next-prod/static/O8neHUIr3dQhe1jcOUsQ8/_buildManifest.js +0 -1
  564. package/.next-prod/static/chunks/72539-049ac78fc767d177.js +0 -17
  565. package/.next-prod/static/chunks/89656-d9dd3a8559041236.js +0 -34
  566. package/.next-prod/static/chunks/99092-5b836813f4b1d4b3.js +0 -716
  567. package/.next-prod/static/chunks/app/_global-error/page-e2f146f38bb4df42.js +0 -1
  568. package/.next-prod/static/chunks/app/api/agent/test/route-e2f146f38bb4df42.js +0 -1
  569. package/.next-prod/static/chunks/app/api/bash/route-e2f146f38bb4df42.js +0 -1
  570. package/.next-prod/static/chunks/app/api/bots/[id]/route-e2f146f38bb4df42.js +0 -1
  571. package/.next-prod/static/chunks/app/api/bots/route-e2f146f38bb4df42.js +0 -1
  572. package/.next-prod/static/chunks/app/api/chat/codex/route-e2f146f38bb4df42.js +0 -1
  573. package/.next-prod/static/chunks/app/api/chat/deepseek/route-e2f146f38bb4df42.js +0 -1
  574. package/.next-prod/static/chunks/app/api/chat/glm/route-e2f146f38bb4df42.js +0 -1
  575. package/.next-prod/static/chunks/app/api/chat/kimi/route-e2f146f38bb4df42.js +0 -1
  576. package/.next-prod/static/chunks/app/api/chat/ollama/route-e2f146f38bb4df42.js +0 -1
  577. package/.next-prod/static/chunks/app/api/chat/route-e2f146f38bb4df42.js +0 -1
  578. package/.next-prod/static/chunks/app/api/chat/stop/route-e2f146f38bb4df42.js +0 -1
  579. package/.next-prod/static/chunks/app/api/claude-stats/route-e2f146f38bb4df42.js +0 -1
  580. package/.next-prod/static/chunks/app/api/commands/route-e2f146f38bb4df42.js +0 -1
  581. package/.next-prod/static/chunks/app/api/comments/route-e2f146f38bb4df42.js +0 -1
  582. package/.next-prod/static/chunks/app/api/db/columns/route-e2f146f38bb4df42.js +0 -1
  583. package/.next-prod/static/chunks/app/api/db/connect/route-e2f146f38bb4df42.js +0 -1
  584. package/.next-prod/static/chunks/app/api/db/disconnect/route-e2f146f38bb4df42.js +0 -1
  585. package/.next-prod/static/chunks/app/api/db/export/route-e2f146f38bb4df42.js +0 -1
  586. package/.next-prod/static/chunks/app/api/db/query/route-e2f146f38bb4df42.js +0 -1
  587. package/.next-prod/static/chunks/app/api/db/schemas/route-e2f146f38bb4df42.js +0 -1
  588. package/.next-prod/static/chunks/app/api/deepseek/balance/route-e2f146f38bb4df42.js +0 -1
  589. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-e2f146f38bb4df42.js +0 -1
  590. package/.next-prod/static/chunks/app/api/deepseek/models/route-e2f146f38bb4df42.js +0 -1
  591. package/.next-prod/static/chunks/app/api/dev/spans/route-e2f146f38bb4df42.js +0 -1
  592. package/.next-prod/static/chunks/app/api/extension/version/route-e2f146f38bb4df42.js +0 -1
  593. package/.next-prod/static/chunks/app/api/file/route-e2f146f38bb4df42.js +0 -1
  594. package/.next-prod/static/chunks/app/api/files/blame/route-e2f146f38bb4df42.js +0 -1
  595. package/.next-prod/static/chunks/app/api/files/clipboard/route-e2f146f38bb4df42.js +0 -1
  596. package/.next-prod/static/chunks/app/api/files/copy/route-e2f146f38bb4df42.js +0 -1
  597. package/.next-prod/static/chunks/app/api/files/delete/route-e2f146f38bb4df42.js +0 -1
  598. package/.next-prod/static/chunks/app/api/files/expanded/route-e2f146f38bb4df42.js +0 -1
  599. package/.next-prod/static/chunks/app/api/files/index/route-e2f146f38bb4df42.js +0 -1
  600. package/.next-prod/static/chunks/app/api/files/init/route-e2f146f38bb4df42.js +0 -1
  601. package/.next-prod/static/chunks/app/api/files/paste/route-e2f146f38bb4df42.js +0 -1
  602. package/.next-prod/static/chunks/app/api/files/read/route-e2f146f38bb4df42.js +0 -1
  603. package/.next-prod/static/chunks/app/api/files/readdir/route-e2f146f38bb4df42.js +0 -1
  604. package/.next-prod/static/chunks/app/api/files/recent/route-e2f146f38bb4df42.js +0 -1
  605. package/.next-prod/static/chunks/app/api/files/save/route-e2f146f38bb4df42.js +0 -1
  606. package/.next-prod/static/chunks/app/api/files/search/route-e2f146f38bb4df42.js +0 -1
  607. package/.next-prod/static/chunks/app/api/files/stat/route-e2f146f38bb4df42.js +0 -1
  608. package/.next-prod/static/chunks/app/api/files/text/route-e2f146f38bb4df42.js +0 -1
  609. package/.next-prod/static/chunks/app/api/git/blob/route-e2f146f38bb4df42.js +0 -1
  610. package/.next-prod/static/chunks/app/api/git/branch-diff/route-e2f146f38bb4df42.js +0 -1
  611. package/.next-prod/static/chunks/app/api/git/branches/route-e2f146f38bb4df42.js +0 -1
  612. package/.next-prod/static/chunks/app/api/git/commit-diff/route-e2f146f38bb4df42.js +0 -1
  613. package/.next-prod/static/chunks/app/api/git/commits/route-e2f146f38bb4df42.js +0 -1
  614. package/.next-prod/static/chunks/app/api/git/current-branch/route-e2f146f38bb4df42.js +0 -1
  615. package/.next-prod/static/chunks/app/api/git/diff/route-e2f146f38bb4df42.js +0 -1
  616. package/.next-prod/static/chunks/app/api/git/discard/route-e2f146f38bb4df42.js +0 -1
  617. package/.next-prod/static/chunks/app/api/git/stage/route-e2f146f38bb4df42.js +0 -1
  618. package/.next-prod/static/chunks/app/api/git/status/route-e2f146f38bb4df42.js +0 -1
  619. package/.next-prod/static/chunks/app/api/git/unstage/route-e2f146f38bb4df42.js +0 -1
  620. package/.next-prod/static/chunks/app/api/git/worktree/route-e2f146f38bb4df42.js +0 -1
  621. package/.next-prod/static/chunks/app/api/glm/credentials/route-e2f146f38bb4df42.js +0 -1
  622. package/.next-prod/static/chunks/app/api/glm/models/route-e2f146f38bb4df42.js +0 -1
  623. package/.next-prod/static/chunks/app/api/glm/usage/route-e2f146f38bb4df42.js +0 -1
  624. package/.next-prod/static/chunks/app/api/global-state/route-e2f146f38bb4df42.js +0 -1
  625. package/.next-prod/static/chunks/app/api/health/route-e2f146f38bb4df42.js +0 -1
  626. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-e2f146f38bb4df42.js +0 -1
  627. package/.next-prod/static/chunks/app/api/html-apps/route-e2f146f38bb4df42.js +0 -1
  628. package/.next-prod/static/chunks/app/api/instructions/config/route-e2f146f38bb4df42.js +0 -1
  629. package/.next-prod/static/chunks/app/api/kimi/credentials/route-e2f146f38bb4df42.js +0 -1
  630. package/.next-prod/static/chunks/app/api/kimi/models/route-e2f146f38bb4df42.js +0 -1
  631. package/.next-prod/static/chunks/app/api/kimi/usage/route-e2f146f38bb4df42.js +0 -1
  632. package/.next-prod/static/chunks/app/api/lsp/definition/route-e2f146f38bb4df42.js +0 -1
  633. package/.next-prod/static/chunks/app/api/lsp/hover/route-e2f146f38bb4df42.js +0 -1
  634. package/.next-prod/static/chunks/app/api/lsp/references/route-e2f146f38bb4df42.js +0 -1
  635. package/.next-prod/static/chunks/app/api/lsp/status/route-e2f146f38bb4df42.js +0 -1
  636. package/.next-prod/static/chunks/app/api/lsp/warmup/route-e2f146f38bb4df42.js +0 -1
  637. package/.next-prod/static/chunks/app/api/mysql/columns/route-e2f146f38bb4df42.js +0 -1
  638. package/.next-prod/static/chunks/app/api/mysql/connect/route-e2f146f38bb4df42.js +0 -1
  639. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-e2f146f38bb4df42.js +0 -1
  640. package/.next-prod/static/chunks/app/api/mysql/export/route-e2f146f38bb4df42.js +0 -1
  641. package/.next-prod/static/chunks/app/api/mysql/query/route-e2f146f38bb4df42.js +0 -1
  642. package/.next-prod/static/chunks/app/api/mysql/schemas/route-e2f146f38bb4df42.js +0 -1
  643. package/.next-prod/static/chunks/app/api/neo4j/connect/route-e2f146f38bb4df42.js +0 -1
  644. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-e2f146f38bb4df42.js +0 -1
  645. package/.next-prod/static/chunks/app/api/neo4j/query/route-e2f146f38bb4df42.js +0 -1
  646. package/.next-prod/static/chunks/app/api/neo4j/schema/route-e2f146f38bb4df42.js +0 -1
  647. package/.next-prod/static/chunks/app/api/note/route-e2f146f38bb4df42.js +0 -1
  648. package/.next-prod/static/chunks/app/api/ollama/config/route-e2f146f38bb4df42.js +0 -1
  649. package/.next-prod/static/chunks/app/api/ollama/models/route-e2f146f38bb4df42.js +0 -1
  650. package/.next-prod/static/chunks/app/api/ollama/start/route-e2f146f38bb4df42.js +0 -1
  651. package/.next-prod/static/chunks/app/api/open-cursor/route-e2f146f38bb4df42.js +0 -1
  652. package/.next-prod/static/chunks/app/api/open-vscode/route-e2f146f38bb4df42.js +0 -1
  653. package/.next-prod/static/chunks/app/api/pick-folder/route-e2f146f38bb4df42.js +0 -1
  654. package/.next-prod/static/chunks/app/api/pinned-sessions/route-e2f146f38bb4df42.js +0 -1
  655. package/.next-prod/static/chunks/app/api/project-settings/route-e2f146f38bb4df42.js +0 -1
  656. package/.next-prod/static/chunks/app/api/project-state/route-e2f146f38bb4df42.js +0 -1
  657. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-e2f146f38bb4df42.js +0 -1
  658. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-e2f146f38bb4df42.js +0 -1
  659. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-e2f146f38bb4df42.js +0 -1
  660. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-e2f146f38bb4df42.js +0 -1
  661. package/.next-prod/static/chunks/app/api/projectGraph/context/route-e2f146f38bb4df42.js +0 -1
  662. package/.next-prod/static/chunks/app/api/projectGraph/file/route-e2f146f38bb4df42.js +0 -1
  663. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-e2f146f38bb4df42.js +0 -1
  664. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-e2f146f38bb4df42.js +0 -1
  665. package/.next-prod/static/chunks/app/api/projectGraph/related/route-e2f146f38bb4df42.js +0 -1
  666. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-e2f146f38bb4df42.js +0 -1
  667. package/.next-prod/static/chunks/app/api/projectGraph/search/route-e2f146f38bb4df42.js +0 -1
  668. package/.next-prod/static/chunks/app/api/projects/route-e2f146f38bb4df42.js +0 -1
  669. package/.next-prod/static/chunks/app/api/push/public-key/route-e2f146f38bb4df42.js +0 -1
  670. package/.next-prod/static/chunks/app/api/push/subscribe/route-e2f146f38bb4df42.js +0 -1
  671. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-e2f146f38bb4df42.js +0 -1
  672. package/.next-prod/static/chunks/app/api/redis/command/route-e2f146f38bb4df42.js +0 -1
  673. package/.next-prod/static/chunks/app/api/redis/connect/route-e2f146f38bb4df42.js +0 -1
  674. package/.next-prod/static/chunks/app/api/redis/delete/route-e2f146f38bb4df42.js +0 -1
  675. package/.next-prod/static/chunks/app/api/redis/disconnect/route-e2f146f38bb4df42.js +0 -1
  676. package/.next-prod/static/chunks/app/api/redis/get/route-e2f146f38bb4df42.js +0 -1
  677. package/.next-prod/static/chunks/app/api/redis/keys/route-e2f146f38bb4df42.js +0 -1
  678. package/.next-prod/static/chunks/app/api/redis/set/route-e2f146f38bb4df42.js +0 -1
  679. package/.next-prod/static/chunks/app/api/restart/route-e2f146f38bb4df42.js +0 -1
  680. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-e2f146f38bb4df42.js +0 -1
  681. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-e2f146f38bb4df42.js +0 -1
  682. package/.next-prod/static/chunks/app/api/review/[id]/route-e2f146f38bb4df42.js +0 -1
  683. package/.next-prod/static/chunks/app/api/review/identify/route-e2f146f38bb4df42.js +0 -1
  684. package/.next-prod/static/chunks/app/api/review/order/route-e2f146f38bb4df42.js +0 -1
  685. package/.next-prod/static/chunks/app/api/review/route-e2f146f38bb4df42.js +0 -1
  686. package/.next-prod/static/chunks/app/api/review/share-info/route-e2f146f38bb4df42.js +0 -1
  687. package/.next-prod/static/chunks/app/api/review/users/route-e2f146f38bb4df42.js +0 -1
  688. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-e2f146f38bb4df42.js +0 -1
  689. package/.next-prod/static/chunks/app/api/services/config/route-e2f146f38bb4df42.js +0 -1
  690. package/.next-prod/static/chunks/app/api/services/scripts/route-e2f146f38bb4df42.js +0 -1
  691. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-e2f146f38bb4df42.js +0 -1
  692. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-e2f146f38bb4df42.js +0 -1
  693. package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-e2f146f38bb4df42.js +0 -1
  694. package/.next-prod/static/chunks/app/api/session/user-messages/route-e2f146f38bb4df42.js +0 -1
  695. package/.next-prod/static/chunks/app/api/session-by-path/route-e2f146f38bb4df42.js +0 -1
  696. package/.next-prod/static/chunks/app/api/sessions/delegate/route-e2f146f38bb4df42.js +0 -1
  697. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-e2f146f38bb4df42.js +0 -1
  698. package/.next-prod/static/chunks/app/api/sessions/projects/route-e2f146f38bb4df42.js +0 -1
  699. package/.next-prod/static/chunks/app/api/sessions/route-e2f146f38bb4df42.js +0 -1
  700. package/.next-prod/static/chunks/app/api/sessions/search/route-e2f146f38bb4df42.js +0 -1
  701. package/.next-prod/static/chunks/app/api/sessions/status/route-e2f146f38bb4df42.js +0 -1
  702. package/.next-prod/static/chunks/app/api/settings/route-e2f146f38bb4df42.js +0 -1
  703. package/.next-prod/static/chunks/app/api/shutdown/route-e2f146f38bb4df42.js +0 -1
  704. package/.next-prod/static/chunks/app/api/skills/[id]/route-e2f146f38bb4df42.js +0 -1
  705. package/.next-prod/static/chunks/app/api/skills/content/route-e2f146f38bb4df42.js +0 -1
  706. package/.next-prod/static/chunks/app/api/skills/route-e2f146f38bb4df42.js +0 -1
  707. package/.next-prod/static/chunks/app/api/snapshots/blob/route-e2f146f38bb4df42.js +0 -1
  708. package/.next-prod/static/chunks/app/api/snapshots/diff/route-e2f146f38bb4df42.js +0 -1
  709. package/.next-prod/static/chunks/app/api/snapshots/route-e2f146f38bb4df42.js +0 -1
  710. package/.next-prod/static/chunks/app/api/terminal/aliases/route-e2f146f38bb4df42.js +0 -1
  711. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-e2f146f38bb4df42.js +0 -1
  712. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-e2f146f38bb4df42.js +0 -1
  713. package/.next-prod/static/chunks/app/api/terminal/env/route-e2f146f38bb4df42.js +0 -1
  714. package/.next-prod/static/chunks/app/api/terminal/history/route-e2f146f38bb4df42.js +0 -1
  715. package/.next-prod/static/chunks/app/api/update/route-e2f146f38bb4df42.js +0 -1
  716. package/.next-prod/static/chunks/app/api/update-state/route-e2f146f38bb4df42.js +0 -1
  717. package/.next-prod/static/chunks/app/api/version/route-e2f146f38bb4df42.js +0 -1
  718. package/.next-prod/static/chunks/app/apps/[...path]/route-e2f146f38bb4df42.js +0 -1
  719. package/.next-prod/static/chunks/app/m/page-8f4f88b0d67c4181.js +0 -1
  720. package/.next-prod/static/chunks/app/manifest.webmanifest/route-e2f146f38bb4df42.js +0 -1
  721. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-e2f146f38bb4df42.js +0 -1
  722. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-e2f146f38bb4df42.js +0 -1
  723. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-e2f146f38bb4df42.js +0 -1
  724. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-e2f146f38bb4df42.js +0 -1
  725. package/.next-prod/static/css/7a02a222d1299650.css +0 -1
  726. package/bin/cock.mjs +0 -239
  727. /package/.next-prod/static/{O8neHUIr3dQhe1jcOUsQ8 → I8gbcTQRiRdMF09goE7WI}/_ssgManifest.js +0 -0
@@ -7299,8 +7299,8 @@ var fromFlatLoop = (flat, prefix, config3, split3) => {
7299
7299
  }
7300
7300
  if (isRight2(left3) && isRight2(right3)) {
7301
7301
  const path5 = pipe(prefix, join("."));
7302
- const fail20 = fromFlatLoopFail(prefix, path5);
7303
- const [lefts, rights] = extend(fail20, fail20, pipe(left3.right, map3(right2)), pipe(right3.right, map3(right2)));
7302
+ const fail21 = fromFlatLoopFail(prefix, path5);
7303
+ const [lefts, rights] = extend(fail21, fail21, pipe(left3.right, map3(right2)), pipe(right3.right, map3(right2)));
7304
7304
  return pipe(lefts, zip(rights), forEachSequential(([left4, right4]) => pipe(zip2(left4, right4), map10(([left5, right5]) => op.zip(left5, right5)))));
7305
7305
  }
7306
7306
  throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues");
@@ -9625,21 +9625,21 @@ var tryPromise = (arg) => {
9625
9625
  evaluate3 = arg.try;
9626
9626
  catcher = arg.catch;
9627
9627
  }
9628
- const fail20 = (e) => catcher ? failSync(() => catcher(e)) : fail2(new UnknownException(e, "An unknown error occurred in Effect.tryPromise"));
9628
+ const fail21 = (e) => catcher ? failSync(() => catcher(e)) : fail2(new UnknownException(e, "An unknown error occurred in Effect.tryPromise"));
9629
9629
  if (evaluate3.length >= 1) {
9630
9630
  return async_((resolve3, signal) => {
9631
9631
  try {
9632
- evaluate3(signal).then((a) => resolve3(succeed(a)), (e) => resolve3(fail20(e)));
9632
+ evaluate3(signal).then((a) => resolve3(succeed(a)), (e) => resolve3(fail21(e)));
9633
9633
  } catch (e) {
9634
- resolve3(fail20(e));
9634
+ resolve3(fail21(e));
9635
9635
  }
9636
9636
  });
9637
9637
  }
9638
9638
  return async_((resolve3) => {
9639
9639
  try {
9640
- evaluate3().then((a) => resolve3(succeed(a)), (e) => resolve3(fail20(e)));
9640
+ evaluate3().then((a) => resolve3(succeed(a)), (e) => resolve3(fail21(e)));
9641
9641
  } catch (e) {
9642
- resolve3(fail20(e));
9642
+ resolve3(fail21(e));
9643
9643
  }
9644
9644
  });
9645
9645
  };
@@ -23391,9 +23391,9 @@ var txnCounter = {
23391
23391
  ref: 0
23392
23392
  };
23393
23393
  var make49 = () => {
23394
- const newId = txnCounter.ref + 1;
23395
- txnCounter.ref = newId;
23396
- return newId;
23394
+ const newId2 = txnCounter.ref + 1;
23395
+ txnCounter.ref = newId2;
23396
+ return newId2;
23397
23397
  };
23398
23398
 
23399
23399
  // node_modules/effect/dist/esm/internal/stm/core.js
@@ -27344,11 +27344,11 @@ var date = (name) => {
27344
27344
  return name === void 0 ? config3 : nested2(config3, name);
27345
27345
  };
27346
27346
  var fail17 = (message) => {
27347
- const fail20 = Object.create(proto13);
27348
- fail20._tag = OP_FAIL2;
27349
- fail20.message = message;
27350
- fail20.parse = () => left2(Unsupported([], message));
27351
- return fail20;
27347
+ const fail21 = Object.create(proto13);
27348
+ fail21._tag = OP_FAIL2;
27349
+ fail21.message = message;
27350
+ fail21.parse = () => left2(Unsupported([], message));
27351
+ return fail21;
27352
27352
  };
27353
27353
  var number4 = (name) => {
27354
27354
  const config3 = primitive("a number property", (text) => {
@@ -28706,6 +28706,9 @@ function getTerminalHistoryPath(cwd, tabId) {
28706
28706
  function getTerminalOutputPath(cwd, commandId) {
28707
28707
  return join4(getCockpitProjectDir(cwd), `terminal-output-${commandId}.txt`);
28708
28708
  }
28709
+ function getGlobalOutputStylesConfigPath() {
28710
+ return join4(COCKPIT_DIR, "output-styles.json");
28711
+ }
28709
28712
  function getBubbleOrderPath(cwd, tabId) {
28710
28713
  return join4(getCockpitProjectDir(cwd), `terminal-bubble-order-${tabId}.json`);
28711
28714
  }
@@ -29018,7 +29021,7 @@ function getUsageUpdateOutputTokens(message) {
29018
29021
  const outputTokens = message.output_tokens;
29019
29022
  return typeof outputTokens === "number" && Number.isFinite(outputTokens) ? Math.max(0, Math.round(outputTokens)) : null;
29020
29023
  }
29021
- function startRun(key, cwd, promptText, runId) {
29024
+ function startRun(key, cwd, promptText, runId, engine) {
29022
29025
  const prev = registry.get(key);
29023
29026
  if (prev?.status === "running") return false;
29024
29027
  const prevSeq = prev?.seq ?? seqByKey.get(key) ?? 0;
@@ -29035,6 +29038,7 @@ function startRun(key, cwd, promptText, runId) {
29035
29038
  events: [],
29036
29039
  startedAt,
29037
29040
  ...runId ? { runId } : {},
29041
+ ...engine ? { engine } : {},
29038
29042
  updatedAt: startedAt
29039
29043
  });
29040
29044
  if (promptText) {
@@ -29063,13 +29067,13 @@ function appendRun(key, message) {
29063
29067
  r.updatedAt = Date.now();
29064
29068
  fanout(r, { seq: r.seq, message });
29065
29069
  }
29066
- function rekeyRun(oldId, newId) {
29070
+ function rekeyRun(oldId, newId2) {
29067
29071
  const r = registry.get(oldId);
29068
29072
  if (!r) return;
29069
- r.sessionId = newId;
29070
- if (oldId !== newId) {
29071
- r.keys.add(newId);
29072
- registry.set(newId, r);
29073
+ r.sessionId = newId2;
29074
+ if (oldId !== newId2) {
29075
+ r.keys.add(newId2);
29076
+ registry.set(newId2, r);
29073
29077
  }
29074
29078
  }
29075
29079
  function markRunIdle(key, status3 = "idle") {
@@ -29105,7 +29109,7 @@ function getRunSessionId(key) {
29105
29109
  function getRunInfo(key) {
29106
29110
  const r = registry.get(key);
29107
29111
  if (!r) return null;
29108
- return { cwd: r.cwd, sessionId: r.sessionId ?? null };
29112
+ return { cwd: r.cwd, sessionId: r.sessionId ?? null, engine: r.engine ?? null };
29109
29113
  }
29110
29114
  function setRunAbort(key, abort) {
29111
29115
  const r = registry.get(key);
@@ -29144,6 +29148,41 @@ function normalizeBase(raw) {
29144
29148
  async function readOllamaStoredConfig() {
29145
29149
  return readJsonFile(OLLAMA_CONFIG_FILE, {});
29146
29150
  }
29151
+ async function writeOllamaStoredConfig(patch9) {
29152
+ return mutateJsonFile(OLLAMA_CONFIG_FILE, {}, (cur) => {
29153
+ const next4 = { ...cur };
29154
+ if (patch9.baseUrl !== void 0) {
29155
+ const v = patch9.baseUrl.trim();
29156
+ if (v) next4.baseUrl = v;
29157
+ else delete next4.baseUrl;
29158
+ }
29159
+ if (patch9.apiKey !== void 0) {
29160
+ const v = patch9.apiKey.trim();
29161
+ if (v) next4.apiKey = v;
29162
+ else delete next4.apiKey;
29163
+ }
29164
+ if (patch9.lastModel !== void 0) {
29165
+ const v = patch9.lastModel.trim();
29166
+ if (v) next4.lastModel = v;
29167
+ else delete next4.lastModel;
29168
+ }
29169
+ return next4;
29170
+ });
29171
+ }
29172
+ async function readOllamaLastModel() {
29173
+ return (await readOllamaStoredConfig()).lastModel?.trim() || void 0;
29174
+ }
29175
+ async function rememberOllamaLastModel(model) {
29176
+ const v = model.trim();
29177
+ if (!v) return;
29178
+ if ((await readOllamaStoredConfig()).lastModel === v) return;
29179
+ await writeOllamaStoredConfig({ lastModel: v });
29180
+ }
29181
+ async function resolveOllamaBaseURL() {
29182
+ const cfg = await readOllamaStoredConfig();
29183
+ const raw = cfg.baseUrl?.trim() || process.env.OLLAMA_BASE_URL || DEFAULT_BASE;
29184
+ return normalizeBase(raw);
29185
+ }
29147
29186
  async function resolveOllamaConnection() {
29148
29187
  const cfg = await readOllamaStoredConfig();
29149
29188
  const baseUrl = normalizeBase(
@@ -29192,6 +29231,14 @@ function estimateOutputUnits(text) {
29192
29231
  return Math.max(1, Math.ceil(cjk + other / 4));
29193
29232
  }
29194
29233
 
29234
+ // packages/feature/agent/src/shared/botSession.ts
29235
+ var BOT_TASK_LINE = /^Task:\s*@([a-z0-9][a-z0-9-]{0,63})(?=[\s:]|$)/;
29236
+ var detectBotName = (firstUserMessage) => {
29237
+ if (!firstUserMessage) return void 0;
29238
+ const firstLine = firstUserMessage.trimStart().split("\n", 1)[0];
29239
+ return BOT_TASK_LINE.exec(firstLine)?.[1];
29240
+ };
29241
+
29195
29242
  // packages/feature/agent/src/server/state/globalState.ts
29196
29243
  import { createReadStream, existsSync as existsSync2, statSync as statSync2 } from "fs";
29197
29244
  import { createInterface } from "readline";
@@ -29388,7 +29435,13 @@ async function updateGlobalState(cwd, sessionId, status3, title, lastUserMessage
29388
29435
  lastUserMessage: truncate(lastUserMessage || existing?.lastUserMessage),
29389
29436
  // Carried like title/lastUserMessage: status-only updates (the client's
29390
29437
  // /api/global-state PATCH) pass no engine and must not erase it.
29391
- engine: engine || existing?.engine
29438
+ engine: engine || existing?.engine,
29439
+ // A Bot names itself in the session's FIRST message, so only the first
29440
+ // write of a session can see it — by the second, `lastUserMessage` has
29441
+ // moved on. Hence: derive on insert, carry forward on every update. A
29442
+ // session that predates this field stays unmarked here and is marked from
29443
+ // disk by getSessionPreview instead, which is the slower but complete path.
29444
+ bot: existed ? existing?.bot : detectBotName(lastUserMessage)
29392
29445
  };
29393
29446
  if (existingIndex >= 0) {
29394
29447
  state.sessions[existingIndex] = newSession;
@@ -29488,13 +29541,15 @@ async function getSessionContent(cwd, sessionId) {
29488
29541
  async function getSessionPreview(cwd, sessionId, opts) {
29489
29542
  const { aiTitle, summary: summary5, messages } = await getSessionContent(cwd, sessionId);
29490
29543
  const title = generateTitle(aiTitle, summary5, messages);
29544
+ const bot = detectBotName(messages[0]);
29491
29545
  const lastUserMessage = messages[messages.length - 1];
29492
29546
  const searchText = opts?.includeSearchText ? [summary5, ...messages].join("\n").toLowerCase() : "";
29493
29547
  if (messages.length <= SUMMARY_THRESHOLD) {
29494
- return { title, lastUserMessage, firstMessages: messages.map((m) => truncate(m)), lastMessages: [], searchText };
29548
+ return { title, bot, lastUserMessage, firstMessages: messages.map((m) => truncate(m)), lastMessages: [], searchText };
29495
29549
  }
29496
29550
  return {
29497
29551
  title,
29552
+ bot,
29498
29553
  lastUserMessage,
29499
29554
  firstMessages: messages.slice(0, SUMMARY_HEAD).map((m) => truncate(m)),
29500
29555
  lastMessages: messages.slice(-SUMMARY_TAIL).map((m) => truncate(m)),
@@ -29537,6 +29592,9 @@ async function getGlobalSessionsSnapshot(limit = 15) {
29537
29592
  // (preview degrades to UNTITLED_SESSION). Mirrors /api/global-state.
29538
29593
  title: preview.title !== UNTITLED_SESSION ? preview.title : session.title ?? preview.title,
29539
29594
  lastUserMessage: preview.lastUserMessage ?? session.lastUserMessage,
29595
+ // Disk wins: it reads the true first message, while the persisted value
29596
+ // is only there for sessions this snapshot never opens (the running ones).
29597
+ bot: preview.bot ?? session.bot,
29540
29598
  firstMessages: preview.firstMessages,
29541
29599
  lastMessages: preview.lastMessages
29542
29600
  };
@@ -31458,29 +31516,7 @@ var blobImpl = (snapshotsRoot, cwd, rev, file2) => Effect_exports.gen(function*
31458
31516
  const bytes = yield* gitShowBytes(repoDir, cwd, rev, file2);
31459
31517
  return new Uint8Array(bytes);
31460
31518
  }).pipe(Effect_exports.withSpan("snapshot.blob", { attributes: { cwd, rev } }));
31461
- var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function* () {
31462
- if (!/^[0-9a-f]{6,40}$/i.test(commitHash)) {
31463
- return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "invalid commit hash" }));
31464
- }
31465
- const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
31466
- const repoExists = yield* fsTry(
31467
- "stat HEAD",
31468
- () => stat(join5(repoDir, "HEAD")).then(() => true)
31469
- ).pipe(Effect_exports.orElseSucceed(() => false));
31470
- if (!repoExists) {
31471
- return yield* Effect_exports.fail(new NotFoundError({ resource: "snapshot-repo", id: cwd }));
31472
- }
31473
- const log3 = yield* runGitOk(repoDir, cwd, [
31474
- "log",
31475
- "-1",
31476
- "--format=%x1e%H%x1f%P%x1f%ct%x1f%B",
31477
- commitHash
31478
- ]);
31479
- const commit3 = commitFromLogRecord(log3.stdout.split("").filter(Boolean)[0] ?? "");
31480
- if (!commit3) {
31481
- return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "commit not found" }));
31482
- }
31483
- const base = commit3.parent ?? EMPTY_TREE;
31519
+ var collectRangeFiles = (repoDir, cwd, base, head6) => Effect_exports.gen(function* () {
31484
31520
  const nameStatus = yield* runGitOk(repoDir, cwd, [
31485
31521
  "diff-tree",
31486
31522
  "-r",
@@ -31488,7 +31524,7 @@ var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function*
31488
31524
  "--no-renames",
31489
31525
  "--name-status",
31490
31526
  base,
31491
- commit3.hash
31527
+ head6
31492
31528
  ]);
31493
31529
  const numstat = yield* runGitOk(repoDir, cwd, [
31494
31530
  "diff-tree",
@@ -31497,7 +31533,7 @@ var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function*
31497
31533
  "--no-renames",
31498
31534
  "--numstat",
31499
31535
  base,
31500
- commit3.hash
31536
+ head6
31501
31537
  ]);
31502
31538
  const binarySet = /* @__PURE__ */ new Set();
31503
31539
  const lineStats = /* @__PURE__ */ new Map();
@@ -31521,7 +31557,7 @@ var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function*
31521
31557
  let newContent = null;
31522
31558
  if (!binary) {
31523
31559
  if (status3 !== "added") oldContent = yield* showFile(repoDir, cwd, base, path5);
31524
- if (status3 !== "deleted") newContent = yield* showFile(repoDir, cwd, commit3.hash, path5);
31560
+ if (status3 !== "deleted") newContent = yield* showFile(repoDir, cwd, head6, path5);
31525
31561
  if ((oldContent?.length ?? 0) > MAX_DIFF_CONTENT_BYTES || (newContent?.length ?? 0) > MAX_DIFF_CONTENT_BYTES) {
31526
31562
  oldContent = null;
31527
31563
  newContent = null;
@@ -31539,17 +31575,75 @@ var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function*
31539
31575
  newContent,
31540
31576
  ...isImage ? {
31541
31577
  isImage: true,
31542
- // A parentless day-root commit diffs against the empty tree, so
31543
- // every path comes back "added" — `base` is never handed out as
31544
- // a revision the client could ask for.
31578
+ // A range rooted at the empty tree reports every path as
31579
+ // "added", so EMPTY_TREE is never handed out as a revision the
31580
+ // client could ask for.
31545
31581
  oldRev: status3 === "added" ? null : base,
31546
- newRev: status3 === "deleted" ? null : commit3.hash
31582
+ newRev: status3 === "deleted" ? null : head6
31547
31583
  } : {}
31548
31584
  });
31549
31585
  }
31550
- const truncated = tokens.length / 2 > files.length;
31586
+ return { files, truncated: tokens.length / 2 > files.length };
31587
+ });
31588
+ var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function* () {
31589
+ if (!/^[0-9a-f]{6,40}$/i.test(commitHash)) {
31590
+ return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "invalid commit hash" }));
31591
+ }
31592
+ const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
31593
+ const repoExists = yield* fsTry(
31594
+ "stat HEAD",
31595
+ () => stat(join5(repoDir, "HEAD")).then(() => true)
31596
+ ).pipe(Effect_exports.orElseSucceed(() => false));
31597
+ if (!repoExists) {
31598
+ return yield* Effect_exports.fail(new NotFoundError({ resource: "snapshot-repo", id: cwd }));
31599
+ }
31600
+ const log3 = yield* runGitOk(repoDir, cwd, [
31601
+ "log",
31602
+ "-1",
31603
+ "--format=%x1e%H%x1f%P%x1f%ct%x1f%B",
31604
+ commitHash
31605
+ ]);
31606
+ const commit3 = commitFromLogRecord(log3.stdout.split("").filter(Boolean)[0] ?? "");
31607
+ if (!commit3) {
31608
+ return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "commit not found" }));
31609
+ }
31610
+ const base = commit3.parent ?? EMPTY_TREE;
31611
+ const { files, truncated } = yield* collectRangeFiles(repoDir, cwd, base, commit3.hash);
31551
31612
  return { commit: commit3, files, truncated };
31552
31613
  }).pipe(Effect_exports.withSpan("snapshot.diff", { attributes: { cwd, commit: commitHash } }));
31614
+ var rangeDiffImpl = (snapshotsRoot, cwd, base, head6) => Effect_exports.gen(function* () {
31615
+ if (base !== null && !/^[0-9a-f]{6,40}$/i.test(base)) {
31616
+ return yield* Effect_exports.fail(new ValidationError({ field: "base", reason: "invalid commit hash" }));
31617
+ }
31618
+ if (!/^[0-9a-f]{6,40}$/i.test(head6)) {
31619
+ return yield* Effect_exports.fail(new ValidationError({ field: "head", reason: "invalid commit hash" }));
31620
+ }
31621
+ const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
31622
+ const repoExists = yield* fsTry(
31623
+ "stat HEAD",
31624
+ () => stat(join5(repoDir, "HEAD")).then(() => true)
31625
+ ).pipe(Effect_exports.orElseSucceed(() => false));
31626
+ if (!repoExists) {
31627
+ return yield* Effect_exports.fail(new NotFoundError({ resource: "snapshot-repo", id: cwd }));
31628
+ }
31629
+ const log3 = yield* runGitOk(repoDir, cwd, [
31630
+ "log",
31631
+ "-1",
31632
+ "--format=%x1e%H%x1f%P%x1f%ct%x1f%B",
31633
+ head6
31634
+ ]);
31635
+ const headCommit = commitFromLogRecord(log3.stdout.split("").filter(Boolean)[0] ?? "");
31636
+ if (!headCommit) {
31637
+ return yield* Effect_exports.fail(new ValidationError({ field: "head", reason: "commit not found" }));
31638
+ }
31639
+ const { files, truncated } = yield* collectRangeFiles(
31640
+ repoDir,
31641
+ cwd,
31642
+ base ?? EMPTY_TREE,
31643
+ headCommit.hash
31644
+ );
31645
+ return { base, head: headCommit, files, truncated };
31646
+ }).pipe(Effect_exports.withSpan("snapshot.rangeDiff", { attributes: { cwd, base: base ?? "empty-tree", head: head6 } }));
31553
31647
  var cleanupImpl = (snapshotsRoot, keepDays, repoTtlDays) => Effect_exports.gen(function* () {
31554
31648
  const dirs = yield* fsTry("readdir", () => readdir(snapshotsRoot)).pipe(
31555
31649
  Effect_exports.orElseSucceed(() => [])
@@ -31673,6 +31767,7 @@ var SnapshotServiceLive = Layer_exports.scoped(
31673
31767
  baseline: (cwd, sessionKey, provider) => snapshotOnce(snapshotsRoot, maxFileBytes, { cwd, sessionKey, provider }, "baseline"),
31674
31768
  listByToolIds: (cwd, toolIds, sessionKey) => listByToolIdsImpl(snapshotsRoot, cwd, toolIds, sessionKey),
31675
31769
  diff: (cwd, commitHash) => diffImpl(snapshotsRoot, cwd, commitHash),
31770
+ rangeDiff: (cwd, base, head6) => rangeDiffImpl(snapshotsRoot, cwd, base, head6),
31676
31771
  blob: (cwd, rev, file2) => blobImpl(snapshotsRoot, cwd, rev, file2),
31677
31772
  cleanup
31678
31773
  });
@@ -32566,12 +32661,14 @@ async function parseTranscriptFile(filePath, page = {}) {
32566
32661
  }
32567
32662
  const allMessages = convertToChatMessages(rawMessages);
32568
32663
  const title = generateTitle(aiTitle, summary5, userTextMessages);
32664
+ const bot = detectBotName(userTextMessages[0]);
32569
32665
  const turns = splitTurns(allMessages);
32570
32666
  const totalTurns = turns.length;
32571
32667
  if (limit === void 0 && fromTurnIndex === void 0) {
32572
32668
  return {
32573
32669
  messages: allMessages,
32574
32670
  title,
32671
+ bot,
32575
32672
  usage: lastUsage,
32576
32673
  totalTurns,
32577
32674
  hasMore: false,
@@ -32583,7 +32680,7 @@ async function parseTranscriptFile(filePath, page = {}) {
32583
32680
  const hasMore = startIndex > 0;
32584
32681
  const selectedTurns = turns.slice(startIndex, endIndex);
32585
32682
  const messages = selectedTurns.flat();
32586
- return { messages, title, usage: lastUsage, totalTurns, hasMore, startTurnIndex: startIndex };
32683
+ return { messages, title, bot, usage: lastUsage, totalTurns, hasMore, startTurnIndex: startIndex };
32587
32684
  }
32588
32685
  function splitTurns(allMessages) {
32589
32686
  const turns = [];
@@ -32778,6 +32875,7 @@ async function parseCodexTranscriptFile(filePath) {
32778
32875
  const messages = [];
32779
32876
  let currentAssistant = null;
32780
32877
  let title = "Untitled Session";
32878
+ let firstUserText = null;
32781
32879
  let lastUsage;
32782
32880
  let msgCounter = 0;
32783
32881
  let toolSinceText = false;
@@ -32831,6 +32929,7 @@ async function parseCodexTranscriptFile(filePath) {
32831
32929
  });
32832
32930
  if (title === "Untitled Session") {
32833
32931
  title = (text || CODEX_IMAGE_ONLY_TEXT).slice(0, 80);
32932
+ firstUserText = text;
32834
32933
  }
32835
32934
  }
32836
32935
  if (payload.type === "message" && payload.role === "assistant") {
@@ -33008,7 +33107,7 @@ async function parseCodexTranscriptFile(filePath) {
33008
33107
  }
33009
33108
  }
33010
33109
  flushAssistant();
33011
- return { messages, title, usage: lastUsage };
33110
+ return { messages, title, bot: detectBotName(firstUserText), usage: lastUsage };
33012
33111
  }
33013
33112
 
33014
33113
  // packages/feature/agent/src/effect/sessionSearchLive.ts
@@ -33555,12 +33654,11 @@ function recoverStashedTranscripts(roots3 = [CLAUDE_PROJECTS_DIR]) {
33555
33654
  var PLAN_EDIT_TOOLS = /* @__PURE__ */ new Set(["Write", "Edit", "MultiEdit", "NotebookEdit"]);
33556
33655
  var isPlanFilePath = (p) => /(^|\/)\.claude\/plans\//.test(p);
33557
33656
  var CLAUDE_SDK_EFFORTS = /* @__PURE__ */ new Set(["low", "medium", "high", "xhigh", "max"]);
33558
- var CLAUDE_ULTRACODE_MODELS = /* @__PURE__ */ new Set(["claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-opus-4-8"]);
33559
- var CLAUDE_XHIGH_MODELS = /* @__PURE__ */ new Set(["claude-fable-5-1", "claude-fable-5", "claude-opus-5", "claude-opus-4-8", "claude-sonnet-5"]);
33657
+ var CLAUDE_ULTRACODE_MODELS = /* @__PURE__ */ new Set(["claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8"]);
33658
+ var CLAUDE_XHIGH_MODELS = /* @__PURE__ */ new Set(["claude-fable-5-1", "claude-fable-5", "claude-opus-5-5", "claude-opus-5", "claude-opus-4-8", "claude-sonnet-5"]);
33560
33659
  function resolveClaudeModel(ctx) {
33561
33660
  const model = typeof ctx.params.model === "string" && ctx.params.model.trim() ? ctx.params.model.trim() : void 0;
33562
- if (!model) return void 0;
33563
- return ctx.params.claudeContextWindow === "1m" ? `${model}[1m]` : model;
33661
+ return model || void 0;
33564
33662
  }
33565
33663
  function resolveClaudeEffort(ctx) {
33566
33664
  const model = typeof ctx.params.model === "string" ? ctx.params.model.trim() : "";
@@ -33610,6 +33708,7 @@ function planPermission(toolName, input, opts) {
33610
33708
  }
33611
33709
  return { behavior: "allow", updatedInput: input };
33612
33710
  }
33711
+ var SYSTEM_PROMPT_SNAPSHOT = false;
33613
33712
  var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
33614
33713
  function buildClaudeOptions(ctx, independent) {
33615
33714
  const { permissionMode } = ctx.params;
@@ -33628,6 +33727,25 @@ function buildClaudeOptions(ctx, independent) {
33628
33727
  ...model ? { model } : {},
33629
33728
  ...effort ? { effort } : {},
33630
33729
  ...settings ? { settings } : {},
33730
+ // System prompt: Claude Code's own preset, always. Omitting `systemPrompt` does NOT mean
33731
+ // "Claude Code's default" — the Agent SDK then sends an EMPTY custom prompt (sdk.mjs:
33732
+ // `systemPrompt === undefined → ""`), which is how sessions here ran without Claude Code's
33733
+ // instructions for a long time unnoticed.
33734
+ //
33735
+ // Output style rides on it as `append`, so selecting one adds a little text after the
33736
+ // preset instead of changing the base.
33737
+ //
33738
+ // `snapshot: false`: where system-prompt recording is enabled (a per-account rollout) the
33739
+ // SDK records the prompt on a session's first request and replays it on every resume. That
33740
+ // would ignore a style switched mid-session, and keep sessions recorded before this fix on
33741
+ // their empty prompt until compaction. Rendering per request behaves the same on every
33742
+ // account; an unchanged prompt renders byte-identical, so the prompt cache still hits.
33743
+ systemPrompt: {
33744
+ type: "preset",
33745
+ preset: "claude_code",
33746
+ ...ctx.outputStyle ? { append: ctx.outputStyle } : {},
33747
+ snapshot: SYSTEM_PROMPT_SNAPSHOT
33748
+ },
33631
33749
  settingSources: ["user", "project", "local"],
33632
33750
  // Permission mode: 'plan' (read-only) when requested, else skip all permission checks.
33633
33751
  permissionMode: isPlan ? "plan" : "bypassPermissions",
@@ -33692,7 +33810,15 @@ import { streamText as streamText2, stepCountIs } from "ai";
33692
33810
  import { randomUUID as randomUUID2 } from "crypto";
33693
33811
 
33694
33812
  // packages/feature/agent/src/server/engines/builtinAgent/prompt.ts
33695
- function buildSystemPrompt(cwd) {
33813
+ function buildSystemPrompt(cwd, outputStyle) {
33814
+ const base = buildBasePrompt(cwd);
33815
+ return outputStyle ? `${base}
33816
+
33817
+ ## Output style
33818
+
33819
+ ${outputStyle}` : base;
33820
+ }
33821
+ function buildBasePrompt(cwd) {
33696
33822
  return `You are a coding agent. You help the user build and modify software using the provided tools.
33697
33823
 
33698
33824
  CWD: ${cwd}
@@ -48000,6 +48126,43 @@ ${summary5}`;
48000
48126
  };
48001
48127
  }
48002
48128
 
48129
+ // packages/feature/agent/src/server/engines/sessionModel.ts
48130
+ var MODEL_MAP_KEY = {
48131
+ ollama: "ollamaModels",
48132
+ deepseek: "deepseekModels",
48133
+ kimi: "kimiModels",
48134
+ glm: "glmModels",
48135
+ claude: "claudeModels",
48136
+ codex: "codexModels"
48137
+ };
48138
+ var EMPTY = { sessions: [] };
48139
+ function mapOf(state, key) {
48140
+ const raw = state[key];
48141
+ return raw && typeof raw === "object" ? raw : {};
48142
+ }
48143
+ async function readSessionModel(engine, cwd, sessionId) {
48144
+ const key = MODEL_MAP_KEY[engine];
48145
+ if (!key || !cwd || !sessionId) return void 0;
48146
+ const state = await readJsonFile(getSessionFilePath(cwd), EMPTY);
48147
+ return mapOf(state, key)[sessionId]?.trim() || void 0;
48148
+ }
48149
+ async function recordSessionModel(engine, cwd, sessionId, model) {
48150
+ const key = MODEL_MAP_KEY[engine];
48151
+ if (!key || !cwd || !sessionId || !model.trim()) return;
48152
+ const value = model.trim();
48153
+ const filePath = getSessionFilePath(cwd);
48154
+ try {
48155
+ const before2 = await readJsonFile(filePath, EMPTY);
48156
+ if (mapOf(before2, key)[sessionId] === value) return;
48157
+ await mutateJsonFile(filePath, EMPTY, (cur) => ({
48158
+ ...cur,
48159
+ [key]: { ...mapOf(cur, key), [sessionId]: value }
48160
+ }));
48161
+ } catch (error48) {
48162
+ console.error(`[engine:${engine}] failed to record session model for ${sessionId}:`, error48);
48163
+ }
48164
+ }
48165
+
48003
48166
  // packages/feature/agent/src/server/engines/shared/providerError.ts
48004
48167
  function extractBodyMessage(body) {
48005
48168
  if (typeof body !== "string" || !body.trim()) return void 0;
@@ -48203,7 +48366,9 @@ async function runBuiltinAgent(ctx, config3) {
48203
48366
  const sid = ctx.currentKey();
48204
48367
  ctx.rekey(sid);
48205
48368
  const model = typeof ctx.params.model === "string" && ctx.params.model || config3.defaultModel;
48369
+ if (!model) throw new Error(`No model resolved for this ${config3.engine} run`);
48206
48370
  const prompt = ctx.prompt;
48371
+ void recordSessionModel(config3.engine, cwd, sid, model);
48207
48372
  const emit2 = (data) => {
48208
48373
  if (data.startsWith("data: [DONE]")) return;
48209
48374
  try {
@@ -48222,7 +48387,7 @@ async function runBuiltinAgent(ctx, config3) {
48222
48387
  const languageModel = await config3.createModel(model);
48223
48388
  const result = streamText2({
48224
48389
  model: languageModel,
48225
- system: buildSystemPrompt(cwd),
48390
+ system: buildSystemPrompt(cwd, ctx.outputStyle),
48226
48391
  messages,
48227
48392
  tools: createTools(context7),
48228
48393
  stopWhen: stepCountIs(256),
@@ -48348,13 +48513,15 @@ function resolveEndpoints(p, saved, language) {
48348
48513
  const id3 = saved.region || p.regions.defaultFor(language);
48349
48514
  return p.regions.byId[id3] ?? p.endpoints;
48350
48515
  }
48351
- function resolveModel(requested, saved, fallback) {
48516
+ function resolveModel(requested, session, saved, fallback) {
48352
48517
  if (typeof requested === "string" && requested.trim()) return requested.trim();
48518
+ if (session && session.trim()) return session.trim();
48353
48519
  if (saved && saved.trim()) return saved.trim();
48354
48520
  return fallback;
48355
48521
  }
48356
48522
  function buildConfig(p, apiKey, endpoints) {
48357
48523
  return {
48524
+ engine: p.name,
48358
48525
  sessionsRoot: getBuiltinSessionsRoot(p.name),
48359
48526
  defaultModel: p.defaultModel,
48360
48527
  createModel: async (modelName) => createOpenAiCompatModel({ baseURL: endpoints.openAiBaseUrl, apiKey, modelName }),
@@ -48380,6 +48547,7 @@ function makeAnthropicCompatSpec(p) {
48380
48547
  if (!textCheck.ok) return textCheck;
48381
48548
  params.model = resolveModel(
48382
48549
  typeof params.model === "string" ? params.model : void 0,
48550
+ await readSessionModel(p.name, params.cwd, params.sessionId),
48383
48551
  saved.builtinModel,
48384
48552
  p.defaultModel
48385
48553
  );
@@ -48410,17 +48578,126 @@ var deepseekProvider = {
48410
48578
  };
48411
48579
  var deepseekSpec = makeAnthropicCompatSpec(deepseekProvider);
48412
48580
 
48581
+ // packages/feature/agent/src/server/engines/ollamaCatalog.ts
48582
+ var LIST_TIMEOUT_MS = 3e3;
48583
+ function describeFailure(baseUrl, cause3) {
48584
+ const msg = cause3 instanceof Error ? cause3.message : String(cause3);
48585
+ if (/abort|timeout/i.test(msg)) {
48586
+ return `The Ollama server at ${baseUrl} did not answer within ${LIST_TIMEOUT_MS}ms.`;
48587
+ }
48588
+ if (/ECONNREFUSED|fetch failed|ENOTFOUND|EHOSTUNREACH/i.test(msg)) {
48589
+ return `Cannot reach the Ollama server at ${baseUrl} (${msg}). Start it with \`ollama serve\`, or set another URL in the Ollama picker.`;
48590
+ }
48591
+ return `Failed to list models from the Ollama server at ${baseUrl}: ${msg}`;
48592
+ }
48593
+ async function listOllamaModels() {
48594
+ const baseUrl = await resolveOllamaBaseURL();
48595
+ try {
48596
+ const res = await fetch(`${baseUrl}/api/tags`, { signal: AbortSignal.timeout(LIST_TIMEOUT_MS) });
48597
+ if (res.ok) {
48598
+ const data = await res.json();
48599
+ const models = Array.isArray(data.models) ? data.models : [];
48600
+ if (models.length > 0) {
48601
+ return {
48602
+ ok: true,
48603
+ baseUrl,
48604
+ models: models.map((m) => ({
48605
+ name: m.name,
48606
+ size: m.size,
48607
+ modified_at: m.modified_at,
48608
+ family: m.details?.family,
48609
+ parameter_size: m.details?.parameter_size
48610
+ }))
48611
+ };
48612
+ }
48613
+ }
48614
+ } catch {
48615
+ }
48616
+ try {
48617
+ const res = await fetch(`${baseUrl}/v1/models`, { signal: AbortSignal.timeout(LIST_TIMEOUT_MS) });
48618
+ if (!res.ok) {
48619
+ return {
48620
+ ok: false,
48621
+ baseUrl,
48622
+ reason: `The Ollama server at ${baseUrl} returned HTTP ${res.status} for its model list.`
48623
+ };
48624
+ }
48625
+ const data = await res.json();
48626
+ const models = Array.isArray(data.data) ? data.data : [];
48627
+ return {
48628
+ ok: true,
48629
+ baseUrl,
48630
+ models: models.map((m) => ({
48631
+ name: m.id,
48632
+ size: 0,
48633
+ modified_at: m.created ? new Date(m.created * 1e3).toISOString() : "",
48634
+ family: m.owned_by || void 0
48635
+ }))
48636
+ };
48637
+ } catch (cause3) {
48638
+ return { ok: false, baseUrl, reason: describeFailure(baseUrl, cause3) };
48639
+ }
48640
+ }
48641
+
48413
48642
  // packages/feature/agent/src/server/engines/ollama.ts
48414
- var DEFAULT_MODEL2 = "qwen3.5:35b-a3b-coding-nvfp4";
48415
48643
  var OLLAMA_CONFIG = {
48644
+ engine: "ollama",
48416
48645
  sessionsRoot: getBuiltinSessionsRoot("ollama"),
48417
- defaultModel: DEFAULT_MODEL2,
48418
48646
  createModel: (model) => createOllamaModel(model)
48419
48647
  };
48648
+ var fail20 = (error48) => ({ ok: false, status: 400, error: error48 });
48649
+ function matchInstalled(requested, models) {
48650
+ const exact = models.find((m) => m.name === requested);
48651
+ if (exact) return exact.name;
48652
+ const byTag = models.filter((m) => m.name.startsWith(`${requested}:`));
48653
+ return byTag.length === 1 ? byTag[0].name : void 0;
48654
+ }
48655
+ var nameList = (models) => models.map((m) => m.name).join(", ");
48656
+ async function resolveDefaultOllamaModel() {
48657
+ const catalog = await listOllamaModels();
48658
+ if (!catalog.ok) {
48659
+ return { ok: false, reason: `${catalog.reason} Cockpit picks the model from that list.` };
48660
+ }
48661
+ if (catalog.models.length === 0) {
48662
+ return {
48663
+ ok: false,
48664
+ reason: `The Ollama server at ${catalog.baseUrl} has no models installed. Pull one with \`ollama pull <model>\` (e.g. \`ollama pull qwen3\`), then try again.`
48665
+ };
48666
+ }
48667
+ const last5 = await readOllamaLastModel();
48668
+ return { ok: true, model: last5 && matchInstalled(last5, catalog.models) || catalog.models[0].name };
48669
+ }
48670
+ async function resolveOllamaModel(params) {
48671
+ const requested = typeof params.model === "string" ? params.model.trim() : "";
48672
+ if (!requested) {
48673
+ const recorded = await readSessionModel("ollama", params.cwd, params.sessionId);
48674
+ const choice2 = recorded ? { ok: true, model: recorded } : await resolveDefaultOllamaModel();
48675
+ if (!choice2.ok) return fail20(choice2.reason);
48676
+ params.model = choice2.model;
48677
+ await rememberOllamaLastModel(choice2.model);
48678
+ return { ok: true };
48679
+ }
48680
+ const catalog = await listOllamaModels();
48681
+ if (!catalog.ok) {
48682
+ params.model = requested;
48683
+ return { ok: true };
48684
+ }
48685
+ const installed = matchInstalled(requested, catalog.models);
48686
+ if (!installed) {
48687
+ return fail20(
48688
+ catalog.models.length === 0 ? `The Ollama server at ${catalog.baseUrl} has no models installed, so '${requested}' cannot run. Pull it with \`ollama pull ${requested}\`.` : `Model '${requested}' is not installed on the Ollama server at ${catalog.baseUrl}. Available: ${nameList(catalog.models)}.`
48689
+ );
48690
+ }
48691
+ params.model = installed;
48692
+ await rememberOllamaLastModel(installed);
48693
+ return { ok: true };
48694
+ }
48420
48695
  var ollamaSpec = {
48421
48696
  name: "ollama",
48422
48697
  async preflight(params) {
48423
- return requireTextPrompt(params);
48698
+ const textCheck = requireTextPrompt(params);
48699
+ if (!textCheck.ok) return textCheck;
48700
+ return resolveOllamaModel(params);
48424
48701
  },
48425
48702
  runner: {
48426
48703
  run: (ctx) => runBuiltinAgent(ctx, OLLAMA_CONFIG)
@@ -48430,12 +48707,12 @@ var ollamaSpec = {
48430
48707
 
48431
48708
  // packages/feature/agent/src/server/engines/kimi.ts
48432
48709
  var KIMI_OPENAI_BASE_URL = "https://api.kimi.com/coding/v1";
48433
- var DEFAULT_MODEL3 = "k3";
48710
+ var DEFAULT_MODEL2 = "k3";
48434
48711
  var kimiProvider = {
48435
48712
  name: "kimi",
48436
48713
  label: "Kimi",
48437
48714
  endpoints: { openAiBaseUrl: KIMI_OPENAI_BASE_URL },
48438
- defaultModel: DEFAULT_MODEL3,
48715
+ defaultModel: DEFAULT_MODEL2,
48439
48716
  apiKey: kimiApiKey,
48440
48717
  // Kimi's coding models are thinking-only and reject any temperature but 1 with
48441
48718
  // `invalid temperature: only 1 is allowed for this model`, which fails the turn before a
@@ -48450,7 +48727,7 @@ var GLM_REGIONS = {
48450
48727
  global: { openAiBaseUrl: "https://api.z.ai/api/coding/paas/v4" }
48451
48728
  };
48452
48729
  var GLM_REGION_IDS = Object.keys(GLM_REGIONS);
48453
- var DEFAULT_MODEL4 = "glm-5.3";
48730
+ var DEFAULT_MODEL3 = "glm-5.3";
48454
48731
  var glmProvider = {
48455
48732
  name: "glm",
48456
48733
  label: "GLM",
@@ -48460,7 +48737,7 @@ var glmProvider = {
48460
48737
  // Shared with the picker so the UI cannot claim one host while runs go to another.
48461
48738
  defaultFor: defaultRegionForLanguage
48462
48739
  },
48463
- defaultModel: DEFAULT_MODEL4,
48740
+ defaultModel: DEFAULT_MODEL3,
48464
48741
  apiKey: glmApiKey
48465
48742
  // No builtinTemperature override: temperature 0 with tools is accepted here (verified),
48466
48743
  // unlike Kimi's thinking-only models.
@@ -48912,7 +49189,7 @@ var CodexEventShim = class {
48912
49189
 
48913
49190
  // packages/feature/agent/src/server/engines/codex.ts
48914
49191
  import { randomUUID as randomUUID3 } from "crypto";
48915
- import { writeFileSync as writeFileSync5, unlinkSync as unlinkSync4, mkdirSync as mkdirSync5, existsSync as existsSync6, statSync as statSync4, openSync as openSync2, readSync as readSync2, closeSync as closeSync2 } from "fs";
49192
+ import { writeFileSync as writeFileSync6, unlinkSync as unlinkSync4, mkdirSync as mkdirSync5, existsSync as existsSync6, statSync as statSync4, openSync as openSync2, readSync as readSync2, closeSync as closeSync2 } from "fs";
48916
49193
  import { StringDecoder as StringDecoder2 } from "string_decoder";
48917
49194
  import { join as join13 } from "path";
48918
49195
  import { tmpdir as tmpdir2 } from "os";
@@ -49019,6 +49296,102 @@ function recoverStashedCodexRollouts(root = CODEX_SESSIONS_DIR) {
49019
49296
  return repaired;
49020
49297
  }
49021
49298
 
49299
+ // packages/feature/agent/src/server/engines/shared/codexOutputStyle.ts
49300
+ import * as fs4 from "fs";
49301
+ var OPEN = "<cockpit_output_style>";
49302
+ var CLOSE = "</cockpit_output_style>";
49303
+ function wrapCodexOutputStyle(style) {
49304
+ return `${OPEN}
49305
+ ${style}
49306
+ ${CLOSE}`;
49307
+ }
49308
+ var isOurs = (item) => typeof item?.text === "string" && item.text.startsWith(OPEN);
49309
+ function rewriteContent(content, desired) {
49310
+ let found = false;
49311
+ let changed = false;
49312
+ const next4 = [];
49313
+ for (const item of content) {
49314
+ if (!isOurs(item)) {
49315
+ next4.push(item);
49316
+ continue;
49317
+ }
49318
+ found = true;
49319
+ if (desired === void 0) {
49320
+ changed = true;
49321
+ continue;
49322
+ }
49323
+ if (item.text !== desired) changed = true;
49324
+ next4.push({ ...item, text: desired });
49325
+ }
49326
+ return [next4, changed, found];
49327
+ }
49328
+ function eachDeveloperContent(value, visit) {
49329
+ if (!value || typeof value !== "object") return;
49330
+ if (Array.isArray(value)) {
49331
+ for (const v of value) eachDeveloperContent(v, visit);
49332
+ return;
49333
+ }
49334
+ const obj = value;
49335
+ if (obj.type === "message" && obj.role === "developer" && Array.isArray(obj.content)) {
49336
+ visit(obj);
49337
+ return;
49338
+ }
49339
+ for (const v of Object.values(obj)) eachDeveloperContent(v, visit);
49340
+ }
49341
+ var isFirstDeveloperMessage = (entry) => entry.type === "response_item" && entry.payload?.type === "message" && entry.payload?.role === "developer" && Array.isArray(entry.payload?.content);
49342
+ function syncCodexOutputStyle(sessionPath, style) {
49343
+ const desired = style ? wrapCodexOutputStyle(style) : void 0;
49344
+ const raw = fs4.readFileSync(sessionPath, "utf-8");
49345
+ const lines = raw.split("\n");
49346
+ let found = false;
49347
+ let changed = false;
49348
+ let firstDeveloperLine = -1;
49349
+ for (let i = 0; i < lines.length; i++) {
49350
+ const line = lines[i];
49351
+ const marked = line.includes(OPEN);
49352
+ if (!marked && (firstDeveloperLine >= 0 || !line.includes('"developer"'))) continue;
49353
+ let entry;
49354
+ try {
49355
+ entry = JSON.parse(line);
49356
+ } catch {
49357
+ continue;
49358
+ }
49359
+ if (firstDeveloperLine < 0 && isFirstDeveloperMessage(entry)) firstDeveloperLine = i;
49360
+ if (!marked) continue;
49361
+ let lineChanged = false;
49362
+ eachDeveloperContent(entry, (msg) => {
49363
+ const [next4, c, f] = rewriteContent(msg.content, desired);
49364
+ if (f) found = true;
49365
+ if (c) {
49366
+ msg.content = next4;
49367
+ lineChanged = true;
49368
+ }
49369
+ });
49370
+ if (lineChanged) {
49371
+ lines[i] = JSON.stringify(entry);
49372
+ changed = true;
49373
+ }
49374
+ }
49375
+ let result;
49376
+ if (found) {
49377
+ result = !changed ? "unchanged" : desired === void 0 ? "removed" : "updated";
49378
+ } else if (desired === void 0) {
49379
+ return "unchanged";
49380
+ } else if (firstDeveloperLine < 0) {
49381
+ return "no-anchor";
49382
+ } else {
49383
+ const entry = JSON.parse(lines[firstDeveloperLine]);
49384
+ entry.payload.content = [{ type: "input_text", text: desired }, ...entry.payload.content];
49385
+ lines[firstDeveloperLine] = JSON.stringify(entry);
49386
+ result = "inserted";
49387
+ }
49388
+ if (result === "unchanged") return result;
49389
+ const tmp = `${sessionPath}.output-style.tmp`;
49390
+ fs4.writeFileSync(tmp, lines.join("\n"), "utf-8");
49391
+ fs4.renameSync(tmp, sessionPath);
49392
+ return result;
49393
+ }
49394
+
49022
49395
  // packages/feature/agent/src/server/engines/codex.ts
49023
49396
  var MEDIA_EXT = {
49024
49397
  "image/png": ".png",
@@ -49032,7 +49405,7 @@ function writeImagesToTemp(images) {
49032
49405
  return images.map((img, i) => {
49033
49406
  const ext = MEDIA_EXT[img.media_type] || ".png";
49034
49407
  const filePath = join13(dir, `img-${Date.now()}-${i}${ext}`);
49035
- writeFileSync5(filePath, Buffer.from(img.data, "base64"));
49408
+ writeFileSync6(filePath, Buffer.from(img.data, "base64"));
49036
49409
  return filePath;
49037
49410
  });
49038
49411
  }
@@ -49373,12 +49746,17 @@ function codexThreadParams(ctx) {
49373
49746
  ...effort ? { effort } : {},
49374
49747
  ...ctx.cwd ? { cwd: ctx.cwd } : {},
49375
49748
  sandbox: "danger-full-access",
49376
- approvalPolicy: "never"
49749
+ approvalPolicy: "never",
49750
+ // Output style. `developerInstructions` is appended to Codex's own instructions
49751
+ // (`baseInstructions` would REPLACE them), but only on `thread/start` — resume ignores
49752
+ // it. Mid-session switches are applied to the rollout instead (codexSpec.run →
49753
+ // syncCodexOutputStyle). Wrapped in a marker so that sync can find it again. Still sent
49754
+ // on resume: harmless, and the resume-failure fallback's thread/start reuses these params.
49755
+ ...ctx.outputStyle ? { developerInstructions: wrapCodexOutputStyle(ctx.outputStyle) } : {}
49377
49756
  };
49378
49757
  }
49379
49758
  function resolveCodexReasoningEffort(value) {
49380
49759
  switch (value) {
49381
- case "minimal":
49382
49760
  case "low":
49383
49761
  case "medium":
49384
49762
  case "high":
@@ -49520,11 +49898,18 @@ var codexSpec = {
49520
49898
  // No preflight: the orchestrator's own "prompt or images" check is sufficient.
49521
49899
  runner: {
49522
49900
  async run(ctx) {
49901
+ const sessionPath = ctx.sessionId ? findCodexSessionPath(ctx.sessionId) : null;
49902
+ if (sessionPath) {
49903
+ try {
49904
+ syncCodexOutputStyle(sessionPath, ctx.outputStyle);
49905
+ } catch (err) {
49906
+ console.warn(`[codex] output style sync failed for ${sessionPath}: ${String(err)}`);
49907
+ }
49908
+ }
49523
49909
  if (ctx.params.noHistory !== true || !ctx.sessionId) {
49524
49910
  await runCodexAppServer(ctx);
49525
49911
  return;
49526
49912
  }
49527
- const sessionPath = findCodexSessionPath(ctx.sessionId);
49528
49913
  const stashed = sessionPath ? stashCodexRollout(sessionPath) : false;
49529
49914
  try {
49530
49915
  await runCodexAppServer(ctx);
@@ -49550,22 +49935,22 @@ function getEngineSpec(engine) {
49550
49935
  }
49551
49936
 
49552
49937
  // packages/feature/agent/src/server/api/session/sessionStore.ts
49553
- import * as fs4 from "fs";
49938
+ import * as fs5 from "fs";
49554
49939
  function resolveSessionPath(cwd, sessionId) {
49555
49940
  const sessionPath = getClaudeSessionPath(cwd, sessionId);
49556
- if (fs4.existsSync(sessionPath)) {
49941
+ if (fs5.existsSync(sessionPath)) {
49557
49942
  return { sessionPath, engine: "claude" };
49558
49943
  }
49559
49944
  const deepseekPath = getDeepseekBuiltinSessionPath(cwd, sessionId);
49560
- if (fs4.existsSync(deepseekPath)) {
49945
+ if (fs5.existsSync(deepseekPath)) {
49561
49946
  return { sessionPath: deepseekPath, engine: "deepseek" };
49562
49947
  }
49563
49948
  const kimiPath = getKimiBuiltinSessionPath(cwd, sessionId);
49564
- if (fs4.existsSync(kimiPath)) {
49949
+ if (fs5.existsSync(kimiPath)) {
49565
49950
  return { sessionPath: kimiPath, engine: "kimi" };
49566
49951
  }
49567
49952
  const glmPath = getGlmBuiltinSessionPath(cwd, sessionId);
49568
- if (fs4.existsSync(glmPath)) {
49953
+ if (fs5.existsSync(glmPath)) {
49569
49954
  return { sessionPath: glmPath, engine: "glm" };
49570
49955
  }
49571
49956
  const codexPath = findCodexSessionPath(sessionId);
@@ -49573,7 +49958,7 @@ function resolveSessionPath(cwd, sessionId) {
49573
49958
  return { sessionPath: codexPath, engine: "codex" };
49574
49959
  }
49575
49960
  const ollamaPath = getOllamaSessionPath(cwd, sessionId);
49576
- if (fs4.existsSync(ollamaPath)) {
49961
+ if (fs5.existsSync(ollamaPath)) {
49577
49962
  return { sessionPath: ollamaPath, engine: "ollama" };
49578
49963
  }
49579
49964
  return null;
@@ -49602,11 +49987,15 @@ var fileExists = (p) => Effect_exports.tryPromise(() => stat5(p)).pipe(
49602
49987
  Effect_exports.map((s) => s.isFile()),
49603
49988
  Effect_exports.orElseSucceed(() => false)
49604
49989
  );
49605
- var validateRequest = (body) => Effect_exports.gen(function* () {
49990
+ var inheritedEngine = (parentRunId) => {
49991
+ const parent = parentRunId ? getRunInfo(parentRunId)?.engine : null;
49992
+ return parent && DELEGATION_ENGINES.includes(parent) ? parent : "claude";
49993
+ };
49994
+ var validateRequest = (body, parentRunId) => Effect_exports.gen(function* () {
49606
49995
  const cwd = str(body.cwd);
49607
49996
  if (!cwd || !isAbsolute3(cwd)) return yield* Effect_exports.fail(invalid("cwd", "must be an absolute path"));
49608
49997
  if (!(yield* isDirectory2(cwd))) return yield* Effect_exports.fail(invalid("cwd", "directory does not exist"));
49609
- const engine = str(body.engine) ?? "claude";
49998
+ const engine = str(body.engine) ?? inheritedEngine(parentRunId);
49610
49999
  if (!DELEGATION_ENGINES.includes(engine)) {
49611
50000
  return yield* Effect_exports.fail(invalid("engine", `expected one of ${DELEGATION_ENGINES.join(", ")}`));
49612
50001
  }
@@ -49807,18 +50196,19 @@ var DelegationServiceLive = Layer_exports.effect(
49807
50196
  if (!spec) return yield* Effect_exports.fail(invalid("engine", `no engine spec for ${request2.engine}`));
49808
50197
  const parent = yield* resolveParent(parentRunId);
49809
50198
  const presetId = randomUUID4();
50199
+ const dispatchParams = {
50200
+ prompt: buildChildPrompt(request2, parent),
50201
+ cwd: request2.cwd,
50202
+ engine: request2.engine,
50203
+ runId: presetId,
50204
+ ...request2.engine === "claude" && { newSessionId: presetId },
50205
+ ...request2.model && { model: request2.model }
50206
+ };
49810
50207
  const runKey = yield* Effect_exports.acquireUseRelease(
49811
50208
  reserve,
49812
50209
  () => Effect_exports.gen(function* () {
49813
50210
  const outcome = yield* Effect_exports.tryPromise({
49814
- try: () => dispatchChat2(spec, {
49815
- prompt: buildChildPrompt(request2, parent),
49816
- cwd: request2.cwd,
49817
- engine: request2.engine,
49818
- runId: presetId,
49819
- ...request2.engine === "claude" && { newSessionId: presetId },
49820
- ...request2.model && { model: request2.model }
49821
- }),
50211
+ try: () => dispatchChat2(spec, dispatchParams),
49822
50212
  catch: (cause3) => new AgentError({ provider: request2.engine, kind: "unknown", cause: cause3 })
49823
50213
  });
49824
50214
  if (!outcome.ok) return yield* Effect_exports.fail(invalid("engine", outcome.error));
@@ -49830,10 +50220,11 @@ var DelegationServiceLive = Layer_exports.effect(
49830
50220
  const sessionId = request2.engine === "codex" ? yield* waitForSessionId(runKey, SESSION_ID_TIMEOUT).pipe(
49831
50221
  Effect_exports.tapError(() => Effect_exports.sync(() => requestStop(runKey)))
49832
50222
  ) : presetId;
50223
+ const model = dispatchParams.model ?? request2.model;
49833
50224
  return {
49834
50225
  cwd: request2.cwd,
49835
50226
  engine: request2.engine,
49836
- ...request2.model && { model: request2.model },
50227
+ ...model && { model },
49837
50228
  sessionId,
49838
50229
  link: buildSessionLink(request2.cwd, sessionId),
49839
50230
  title: request2.title,
@@ -49851,7 +50242,7 @@ var DelegationServiceLive = Layer_exports.effect(
49851
50242
 
49852
50243
  // packages/feature/agent/src/effect/botRegistryLive.ts
49853
50244
  import { randomUUID as randomUUID5 } from "crypto";
49854
- import { readFileSync as readFileSync7, realpathSync as realpathSync3 } from "fs";
50245
+ import { readFileSync as readFileSync8, realpathSync as realpathSync3 } from "fs";
49855
50246
  import path3 from "path";
49856
50247
 
49857
50248
  // packages/feature/agent/src/shared/bots.ts
@@ -49904,14 +50295,14 @@ import {
49904
50295
  cpSync,
49905
50296
  existsSync as existsSync8,
49906
50297
  mkdirSync as mkdirSync6,
49907
- readFileSync as readFileSync6,
50298
+ readFileSync as readFileSync7,
49908
50299
  readdirSync as readdirSync4,
49909
50300
  realpathSync as realpathSync2,
49910
- renameSync as renameSync4,
50301
+ renameSync as renameSync5,
49911
50302
  rmdirSync,
49912
50303
  rmSync,
49913
50304
  statSync as statSync5,
49914
- writeFileSync as writeFileSync6
50305
+ writeFileSync as writeFileSync7
49915
50306
  } from "fs";
49916
50307
  import path2, { join as join14 } from "path";
49917
50308
  var BUILTIN_BOT_ID_PREFIX = "builtin:";
@@ -49929,7 +50320,7 @@ var hasManifest = (dir) => {
49929
50320
  var INSTALL_STATE_FILE = join14(BOTS_DIR, ".builtin-installs.json");
49930
50321
  var readInstallState = () => {
49931
50322
  try {
49932
- const raw = JSON.parse(readFileSync6(INSTALL_STATE_FILE, "utf-8"));
50323
+ const raw = JSON.parse(readFileSync7(INSTALL_STATE_FILE, "utf-8"));
49933
50324
  return raw && typeof raw === "object" && !Array.isArray(raw) ? raw : {};
49934
50325
  } catch {
49935
50326
  return {};
@@ -49939,14 +50330,14 @@ var writeInstallState = (state) => {
49939
50330
  try {
49940
50331
  mkdirSync6(BOTS_DIR, { recursive: true });
49941
50332
  const tmp = `${INSTALL_STATE_FILE}.${process.pid}.tmp`;
49942
- writeFileSync6(tmp, `${JSON.stringify(state, null, 2)}
50333
+ writeFileSync7(tmp, `${JSON.stringify(state, null, 2)}
49943
50334
  `);
49944
- renameSync4(tmp, INSTALL_STATE_FILE);
50335
+ renameSync5(tmp, INSTALL_STATE_FILE);
49945
50336
  } catch (err) {
49946
50337
  console.error(`[bots] cannot record builtin Bot installs in ${INSTALL_STATE_FILE}:`, err);
49947
50338
  }
49948
50339
  };
49949
- var hashFile = (file2) => createHash2("sha256").update(readFileSync6(file2)).digest("hex");
50340
+ var hashFile = (file2) => createHash2("sha256").update(readFileSync7(file2)).digest("hex");
49950
50341
  function fileHashes(dir) {
49951
50342
  const out = /* @__PURE__ */ new Map();
49952
50343
  const walk = (rel) => {
@@ -49969,15 +50360,15 @@ function swapIn(staging, dest) {
49969
50360
  let moved = false;
49970
50361
  try {
49971
50362
  try {
49972
- renameSync4(dest, retired);
50363
+ renameSync5(dest, retired);
49973
50364
  moved = true;
49974
50365
  } catch (err) {
49975
50366
  if (err?.code !== "ENOENT") throw err;
49976
50367
  }
49977
- renameSync4(staging, dest);
50368
+ renameSync5(staging, dest);
49978
50369
  if (moved) rmSync(retired, { recursive: true, force: true });
49979
50370
  } catch (err) {
49980
- if (moved && !existsSync8(dest)) renameSync4(retired, dest);
50371
+ if (moved && !existsSync8(dest)) renameSync5(retired, dest);
49981
50372
  throw err;
49982
50373
  } finally {
49983
50374
  rmSync(staging, { recursive: true, force: true });
@@ -50071,7 +50462,7 @@ function syncBuiltinBot(name, state) {
50071
50462
  var messageOf2 = (cause3) => cause3 instanceof Error ? cause3.message : String(cause3);
50072
50463
  function parseManifestIn(dir) {
50073
50464
  try {
50074
- const content = readFileSync6(join14(dir, BOT_MANIFEST_FILE), "utf-8");
50465
+ const content = readFileSync7(join14(dir, BOT_MANIFEST_FILE), "utf-8");
50075
50466
  return { ok: true, ...parseBotDocument(path2, content, dir) };
50076
50467
  } catch (err) {
50077
50468
  return { ok: false, error: messageOf2(err) };
@@ -50148,7 +50539,7 @@ function findBuiltinBotByPath(dir) {
50148
50539
  // packages/feature/agent/src/effect/botRegistryLive.ts
50149
50540
  var EMPTY_REGISTRY = { bots: [] };
50150
50541
  var readRegistry = () => readJsonFileForUpdate(BOTS_FILE, EMPTY_REGISTRY);
50151
- var readManifest = (manifestPath) => readFileSync7(manifestPath, "utf8");
50542
+ var readManifest = (manifestPath) => readFileSync8(manifestPath, "utf8");
50152
50543
  var resolveRegisteredBots = (registry3) => registry3.bots.map((record2) => resolveBot(path3, record2, readManifest));
50153
50544
  var invalidPath = (reason) => new ValidationError({ field: "path", reason });
50154
50545
  var fsReason = (what, target, cause3) => {
@@ -50369,11 +50760,11 @@ function snapshotOnRunEvent(cwd, sessionKey, provider, event) {
50369
50760
  }
50370
50761
 
50371
50762
  // packages/feature/agent/src/server/lib/slashCommands.ts
50372
- import { mkdirSync as mkdirSync7, writeFileSync as writeFileSync7, readFileSync as readFileSync9 } from "fs";
50763
+ import { mkdirSync as mkdirSync7, writeFileSync as writeFileSync8, readFileSync as readFileSync10 } from "fs";
50373
50764
  import path4, { join as join16 } from "path";
50374
50765
 
50375
50766
  // packages/feature/agent/src/server/lib/builtinSkills.ts
50376
- import { readFileSync as readFileSync8, readdirSync as readdirSync5, statSync as statSync6 } from "fs";
50767
+ import { readFileSync as readFileSync9, readdirSync as readdirSync5, statSync as statSync6 } from "fs";
50377
50768
  import { join as join15 } from "path";
50378
50769
  function listBuiltinSkillNames() {
50379
50770
  let entries2;
@@ -50406,14 +50797,14 @@ function listBuiltinSkillExtras(name) {
50406
50797
  }
50407
50798
  function readBuiltinSkillExtra(name, file2) {
50408
50799
  try {
50409
- return readFileSync8(join15(BUILTIN_SKILLS_SRC_DIR, name, file2), "utf-8");
50800
+ return readFileSync9(join15(BUILTIN_SKILLS_SRC_DIR, name, file2), "utf-8");
50410
50801
  } catch {
50411
50802
  return null;
50412
50803
  }
50413
50804
  }
50414
50805
  function readBuiltinSkill(name) {
50415
50806
  try {
50416
- return readFileSync8(builtinSkillPath(name), "utf-8");
50807
+ return readFileSync9(builtinSkillPath(name), "utf-8");
50417
50808
  } catch {
50418
50809
  return null;
50419
50810
  }
@@ -50432,7 +50823,7 @@ function deriveBaseUrl() {
50432
50823
  return `http://localhost:${port3}`;
50433
50824
  }
50434
50825
  var COMMAND_LINE_RE = /^\s*(\/@|\/|@)(\S+?)(?:\s+|$)/;
50435
- function resolveCommandPrompt(prompt, language = "en", _req) {
50826
+ function resolveCommandPrompt(prompt, language = "en", _req, cwd) {
50436
50827
  const lang = language.startsWith("zh") ? "zh" : "en";
50437
50828
  const userSkills = listUserSkills();
50438
50829
  const builtins = new Set(listBuiltinSkillNames());
@@ -50446,7 +50837,8 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
50446
50837
  if (!m) return;
50447
50838
  const marker = m[1];
50448
50839
  if (isKnown(marker, m[2])) {
50449
- cmds.push({ i, marker, cmd: m[2], rest: line.slice(m[0].length).trim() });
50840
+ const local = marker === "@" && isLocalBotDir(cwd, bots.get(m[2]));
50841
+ cmds.push({ i, marker, cmd: m[2], rest: line.slice(m[0].length).trim(), local });
50450
50842
  return;
50451
50843
  }
50452
50844
  if (marker !== "@") return;
@@ -50464,6 +50856,7 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
50464
50856
  const consumed = /* @__PURE__ */ new Set();
50465
50857
  const listed = [];
50466
50858
  const seen = /* @__PURE__ */ new Set();
50859
+ const key = (kind, name) => `${kind}:${name}`;
50467
50860
  cmds.forEach((c, k) => {
50468
50861
  const nextCmd = k + 1 < cmds.length ? cmds[k + 1].i : lines.length;
50469
50862
  const bodyLines = [];
@@ -50474,26 +50867,41 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
50474
50867
  consumed.add(j);
50475
50868
  }
50476
50869
  const ref = c.marker === "@" ? { name: `@${c.cmd}`, path: bots.get(c.cmd), content: null } : resolveSkillRef(c.cmd, baseUrl, userSkills);
50477
- rendered.set(c.i, renderCommandLine(c.marker, ref, bodyLines.join("\n"), lang, showLocus));
50478
- if (ref.path && !seen.has(ref.name)) {
50479
- seen.add(ref.name);
50480
- listed.push({ name: ref.name, path: ref.path, kind: c.marker === "@" ? "handoff" : "read" });
50870
+ const mainSession = c.marker === "/" || c.local;
50871
+ rendered.set(c.i, renderCommandLine(mainSession, ref, bodyLines.join("\n"), lang, showLocus));
50872
+ const kind = c.marker === "@" && !c.local ? "handoff" : "read";
50873
+ if (ref.path && !seen.has(key(kind, ref.name))) {
50874
+ seen.add(key(kind, ref.name));
50875
+ listed.push({ name: ref.name, path: ref.path, kind });
50481
50876
  }
50482
50877
  });
50483
50878
  let botRunInline = null;
50484
- if (cmds.some((c) => c.marker === "@")) {
50485
- const run6 = resolveSkillRef("bot-run", baseUrl, userSkills);
50486
- if (run6.path && !seen.has(run6.name)) {
50487
- seen.add(run6.name);
50488
- listed.push({ name: run6.name, path: run6.path, kind: "read" });
50489
- } else if (!run6.path) {
50490
- botRunInline = run6.content;
50491
- }
50879
+ let botTurnInline = null;
50880
+ const delegates = cmds.some((c) => c.marker === "@" && !c.local);
50881
+ const runsHere = cmds.some((c) => c.marker === "@" && c.local);
50882
+ if (delegates || runsHere) {
50492
50883
  const turn = resolveSkillRef("bot-turn", baseUrl, userSkills);
50493
- if (turn.path && !seen.has(turn.name)) {
50494
- seen.add(turn.name);
50884
+ if (delegates && turn.path && !seen.has(key("handoff", turn.name))) {
50885
+ seen.add(key("handoff", turn.name));
50495
50886
  listed.unshift({ name: turn.name, path: turn.path, kind: "handoff" });
50496
50887
  }
50888
+ if (runsHere) {
50889
+ if (turn.path && !seen.has(key("read", turn.name))) {
50890
+ seen.add(key("read", turn.name));
50891
+ listed.unshift({ name: turn.name, path: turn.path, kind: "read" });
50892
+ } else if (!turn.path) {
50893
+ botTurnInline = turn.content;
50894
+ }
50895
+ }
50896
+ if (delegates) {
50897
+ const run6 = resolveSkillRef("bot-run", baseUrl, userSkills);
50898
+ if (run6.path && !seen.has(key("read", run6.name))) {
50899
+ seen.add(key("read", run6.name));
50900
+ listed.unshift({ name: run6.name, path: run6.path, kind: "read" });
50901
+ } else if (!run6.path) {
50902
+ botRunInline = run6.content;
50903
+ }
50904
+ }
50497
50905
  }
50498
50906
  const out = [];
50499
50907
  for (let i = 0; i < lines.length; i++) {
@@ -50508,10 +50916,12 @@ function resolveCommandPrompt(prompt, language = "en", _req) {
50508
50916
  return `${header}
50509
50917
  ${items.map((s) => `- ${s.name}${sep2}${s.path}`).join("\n")}`;
50510
50918
  };
50919
+ const handoffHeader = runsHere ? lang === "zh" ? "\u4EE5\u4E0B\u8DEF\u5F84\u539F\u6837\u8F6C\u4EA4\u7ED9\u4F60\u6D3E\u53D1\u7684\u5B50\u4F1A\u8BDD\uFF1B\u9664\u4E0A\u9762\u8BFB\u53D6\u5217\u8868\u5DF2\u5217\u51FA\u7684\u4EE5\u5916\uFF0C\u4E0D\u8981\u81EA\u5DF1\u6253\u5F00\uFF1A" : "Pass these paths verbatim to the session you delegate to; do not open any that the read list above does not already list:" : lang === "zh" ? "\u4EE5\u4E0B\u6587\u4EF6\u4EA4\u7ED9\u4F60\u6D3E\u53D1\u7684\u5B50\u4F1A\u8BDD\u53BB\u8BFB\uFF0C\u4F60\u53EA\u8F6C\u4EA4\u8DEF\u5F84\uFF0C\u4E0D\u8981\u81EA\u5DF1\u6253\u5F00\uFF1A" : "These files are for the session you delegate to. Pass the paths along; do not open them yourself:";
50511
50920
  const blocks = [
50512
50921
  block("read", lang === "zh" ? "\u8BF7\u5148\u8BFB\u53D6\u4EE5\u4E0B skill \u6587\u4EF6\uFF0C\u518D\u636E\u6B64\u6267\u884C\uFF1A" : "Read these skill files first, then act accordingly:"),
50513
- block("handoff", lang === "zh" ? "\u4EE5\u4E0B\u6587\u4EF6\u4EA4\u7ED9\u4F60\u6D3E\u53D1\u7684\u5B50\u4F1A\u8BDD\u53BB\u8BFB\uFF0C\u4F60\u53EA\u8F6C\u4EA4\u8DEF\u5F84\uFF0C\u4E0D\u8981\u81EA\u5DF1\u6253\u5F00\uFF1A" : "These files are for the session you delegate to. Pass the paths along; do not open them yourself:"),
50514
- botRunInline
50922
+ block("handoff", handoffHeader),
50923
+ botRunInline,
50924
+ botTurnInline
50515
50925
  ].filter((b) => b !== null);
50516
50926
  if (blocks.length > 0) result = `${result}
50517
50927
 
@@ -50526,18 +50936,22 @@ function appendUnresolvedNote(result, unresolved, lang) {
50526
50936
  ${header}
50527
50937
  ${unresolved.map((u) => `- ${u}`).join("\n")}`;
50528
50938
  }
50529
- function renderCommandLine(marker, ref, body, lang, showLocus) {
50939
+ function renderCommandLine(mainSession, ref, body, lang, showLocus) {
50530
50940
  if (ref.path) {
50531
- const tag = showLocus ? `[${locusWord(marker, lang)}\xB7${ref.name}]` : `[${ref.name}]`;
50941
+ const tag = showLocus ? `[${locusWord(mainSession)}\xB7${ref.name}]` : `[${ref.name}]`;
50532
50942
  return body ? `${tag} ${body}` : tag;
50533
50943
  }
50534
- const locus = showLocus ? `[${locusWord(marker, lang)}] ` : "";
50944
+ const locus = showLocus ? `[${locusWord(mainSession)}] ` : "";
50535
50945
  const then = body ? lang === "zh" ? `\uFF0C\u7136\u540E\uFF1A${body}` : `, then: ${body}` : "";
50536
50946
  return `${locus}${ref.content ?? ""}${then}`;
50537
50947
  }
50538
- function locusWord(marker, lang) {
50539
- if (marker !== "/") return "subagent";
50540
- return lang === "zh" ? "\u4E3B\u4F1A\u8BDD" : "main session";
50948
+ function locusWord(mainSession) {
50949
+ return mainSession ? "main" : "subagent";
50950
+ }
50951
+ function isLocalBotDir(cwd, manifestPath) {
50952
+ if (!cwd || !path4.isAbsolute(cwd)) return false;
50953
+ const norm = (p) => realpathOr(p.replace(/[\\/]+$/, ""));
50954
+ return norm(cwd) === norm(path4.dirname(manifestPath));
50541
50955
  }
50542
50956
  function resolveSkillRef(cmd, baseUrl, userSkills) {
50543
50957
  const skill = userSkills.find((s) => s.name === cmd);
@@ -50553,7 +50967,7 @@ function resolveSkillRef(cmd, baseUrl, userSkills) {
50553
50967
  }
50554
50968
  function listUserSkills() {
50555
50969
  try {
50556
- const data = JSON.parse(readFileSync9(SKILLS_FILE, "utf-8"));
50970
+ const data = JSON.parse(readFileSync10(SKILLS_FILE, "utf-8"));
50557
50971
  const out = [];
50558
50972
  for (const s of data.skills ?? []) {
50559
50973
  const name = readSkillName(s.path);
@@ -50569,13 +50983,13 @@ function listRegisteredBots() {
50569
50983
  const withBuiltins = (registered) => mentionableBots(path4, [...builtins, ...registered]);
50570
50984
  let raw;
50571
50985
  try {
50572
- raw = readFileSync9(BOTS_FILE, "utf-8");
50986
+ raw = readFileSync10(BOTS_FILE, "utf-8");
50573
50987
  } catch {
50574
50988
  return { bots: withBuiltins([]), corrupt: false };
50575
50989
  }
50576
50990
  try {
50577
50991
  const data = JSON.parse(raw);
50578
- const read = (manifest) => readFileSync9(manifest, "utf-8");
50992
+ const read = (manifest) => readFileSync10(manifest, "utf-8");
50579
50993
  return { bots: withBuiltins((data.bots ?? []).map((r) => resolveBot(path4, r, read))), corrupt: false };
50580
50994
  } catch (err) {
50581
50995
  console.error(`[skills] ${BOTS_FILE} does not parse \u2014 every registered @bot line is left as plain text:`, err);
@@ -50584,7 +50998,7 @@ function listRegisteredBots() {
50584
50998
  }
50585
50999
  function readSkillName(path5) {
50586
51000
  try {
50587
- return readFrontmatterField(readFileSync9(path5, "utf-8"), "name");
51001
+ return readFrontmatterField(readFileSync10(path5, "utf-8"), "name");
50588
51002
  } catch {
50589
51003
  return null;
50590
51004
  }
@@ -50594,13 +51008,13 @@ function writeBuiltinSkill(cmd, content, baseUrl) {
50594
51008
  const dir = join16(BUILTIN_SKILLS_OUT_DIR, cmd);
50595
51009
  mkdirSync7(dir, { recursive: true });
50596
51010
  const filePath = join16(dir, "SKILL.md");
50597
- writeFileSync7(filePath, content.endsWith("\n") ? content : `${content}
51011
+ writeFileSync8(filePath, content.endsWith("\n") ? content : `${content}
50598
51012
  `, "utf-8");
50599
51013
  for (const file2 of listBuiltinSkillExtras(cmd)) {
50600
51014
  const extra = readBuiltinSkillExtra(cmd, file2);
50601
51015
  if (extra === null) continue;
50602
51016
  try {
50603
- writeFileSync7(join16(dir, file2), substitute(extra, baseUrl), "utf-8");
51017
+ writeFileSync8(join16(dir, file2), substitute(extra, baseUrl), "utf-8");
50604
51018
  } catch (err) {
50605
51019
  console.error(`[skills] builtin "${cmd}": cannot write reference file ${file2}:`, err);
50606
51020
  }
@@ -50616,13 +51030,52 @@ function substitute(text, baseUrl) {
50616
51030
 
50617
51031
  // packages/feature/agent/src/server/engines/orchestrator.ts
50618
51032
  import { randomUUID as randomUUID6 } from "crypto";
51033
+
51034
+ // packages/feature/agent/src/server/lib/outputStyles.ts
51035
+ var MAX_OUTPUT_STYLE_LENGTH = 8e3;
51036
+ var MAX_OUTPUT_STYLE_NAME_LENGTH = 60;
51037
+ var newId = () => Math.random().toString(36).slice(2, 10);
51038
+ function normalizeOutputStyles(raw) {
51039
+ if (!Array.isArray(raw)) return [];
51040
+ const usedIds = /* @__PURE__ */ new Set();
51041
+ const seenNames = /* @__PURE__ */ new Set();
51042
+ const out = [];
51043
+ for (const entry of raw) {
51044
+ if (!entry || typeof entry !== "object") continue;
51045
+ const e = entry;
51046
+ const name = typeof e.name === "string" ? e.name.trim().slice(0, MAX_OUTPUT_STYLE_NAME_LENGTH) : "";
51047
+ const content = typeof e.content === "string" ? e.content.trim().slice(0, MAX_OUTPUT_STYLE_LENGTH) : "";
51048
+ if (!name || !content || seenNames.has(name)) continue;
51049
+ seenNames.add(name);
51050
+ let id3 = typeof e.id === "string" ? e.id : "";
51051
+ while (!id3 || usedIds.has(id3)) id3 = newId();
51052
+ usedIds.add(id3);
51053
+ out.push({ id: id3, name, content });
51054
+ }
51055
+ return out;
51056
+ }
51057
+ async function readOutputStyles() {
51058
+ const data = await readJsonFile(getGlobalOutputStylesConfigPath(), {});
51059
+ return normalizeOutputStyles(data.styles);
51060
+ }
51061
+ async function resolveOutputStyleText(id3) {
51062
+ if (typeof id3 !== "string" || !id3) return void 0;
51063
+ try {
51064
+ return (await readOutputStyles()).find((s) => s.id === id3)?.content;
51065
+ } catch (err) {
51066
+ console.warn(`[output-styles] failed to read styles, running without one: ${String(err)}`);
51067
+ return void 0;
51068
+ }
51069
+ }
51070
+
51071
+ // packages/feature/agent/src/server/engines/orchestrator.ts
50619
51072
  async function dispatchChat2(spec, body, request2) {
50620
51073
  const { sessionId, images, cwd, language } = body;
50621
51074
  if (sessionId && isRunActive(sessionId)) {
50622
51075
  return { ok: false, status: 409, error: "session is already running" };
50623
51076
  }
50624
51077
  const rawPrompt = body.prompt;
50625
- const prompt = typeof rawPrompt === "string" ? resolveCommandPrompt(rawPrompt, language, request2) : rawPrompt;
51078
+ const prompt = typeof rawPrompt === "string" ? resolveCommandPrompt(rawPrompt, language, request2, cwd) : rawPrompt;
50626
51079
  const hasContent = prompt && typeof prompt === "string" || images && images.length > 0;
50627
51080
  if (!hasContent) {
50628
51081
  return { ok: false, status: 400, error: "Missing prompt or images" };
@@ -50632,12 +51085,13 @@ async function dispatchChat2(spec, body, request2) {
50632
51085
  if (!pre.ok) return pre;
50633
51086
  }
50634
51087
  const promptText = typeof prompt === "string" ? prompt : void 0;
51088
+ const outputStyle = await resolveOutputStyleText(body.outputStyleId);
50635
51089
  const abort = new AbortController();
50636
51090
  const runId = typeof body.runId === "string" && body.runId || randomUUID6();
50637
51091
  let currentKey = sessionId || runId;
50638
51092
  let actualSessionId = sessionId;
50639
51093
  let isClosed = false;
50640
- if (!startRun(currentKey, cwd || "", promptText, runId)) {
51094
+ if (!startRun(currentKey, cwd || "", promptText, runId, spec.name)) {
50641
51095
  return { ok: false, status: 409, error: "run already active" };
50642
51096
  }
50643
51097
  setRunAbort(currentKey, () => {
@@ -50655,6 +51109,7 @@ async function dispatchChat2(spec, body, request2) {
50655
51109
  cwd: cwd || "",
50656
51110
  sessionId,
50657
51111
  params: body,
51112
+ outputStyle,
50658
51113
  signal: abort.signal,
50659
51114
  emit(event) {
50660
51115
  if (isClosed) return;