@surething/cockpit 1.0.278 → 1.0.280

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 (719) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +6 -5
  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 +12 -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 +2 -2
  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/fs/dirs/route.js +1 -0
  107. package/.next-prod/server/app/api/fs/dirs/route.js.nft.json +1 -0
  108. package/.next-prod/server/app/api/fs/dirs/route_client-reference-manifest.js +1 -0
  109. package/.next-prod/server/app/api/git/blob/route.js +1 -1
  110. package/.next-prod/server/app/api/git/blob/route.js.nft.json +1 -1
  111. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  112. package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
  113. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  114. package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
  115. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  116. package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
  117. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  118. package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
  119. package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
  120. package/.next-prod/server/app/api/git/current-branch/route.js.nft.json +1 -1
  121. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  122. package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
  123. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  124. package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
  125. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  126. package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
  127. package/.next-prod/server/app/api/git/status/route.js +1 -1
  128. package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
  129. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  130. package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
  131. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  132. package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
  133. package/.next-prod/server/app/api/glm/credentials/route.js +1 -1
  134. package/.next-prod/server/app/api/glm/credentials/route.js.nft.json +1 -1
  135. package/.next-prod/server/app/api/glm/models/route.js +1 -1
  136. package/.next-prod/server/app/api/glm/models/route.js.nft.json +1 -1
  137. package/.next-prod/server/app/api/glm/usage/route.js +1 -1
  138. package/.next-prod/server/app/api/glm/usage/route.js.nft.json +1 -1
  139. package/.next-prod/server/app/api/global-state/route.js +2 -2
  140. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  141. package/.next-prod/server/app/api/health/route.js +1 -1
  142. package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
  143. package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
  144. package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
  145. package/.next-prod/server/app/api/html-apps/route.js +1 -1
  146. package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
  147. package/.next-prod/server/app/api/instructions/config/route.js +1 -1
  148. package/.next-prod/server/app/api/instructions/config/route.js.nft.json +1 -1
  149. package/.next-prod/server/app/api/kimi/credentials/route.js +1 -1
  150. package/.next-prod/server/app/api/kimi/credentials/route.js.nft.json +1 -1
  151. package/.next-prod/server/app/api/kimi/models/route.js +1 -1
  152. package/.next-prod/server/app/api/kimi/models/route.js.nft.json +1 -1
  153. package/.next-prod/server/app/api/kimi/usage/route.js +1 -1
  154. package/.next-prod/server/app/api/kimi/usage/route.js.nft.json +1 -1
  155. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  156. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  157. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  158. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  159. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  160. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  161. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  162. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  163. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  164. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  165. package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
  166. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  167. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  168. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  169. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  170. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  171. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  172. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  173. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  174. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  175. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  176. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  177. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  178. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  179. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  180. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  181. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  182. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  183. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  184. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  185. package/.next-prod/server/app/api/note/route.js +1 -1
  186. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  187. package/.next-prod/server/app/api/ollama/config/route.js +1 -1
  188. package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
  189. package/.next-prod/server/app/api/ollama/default-model/route.js +1 -1
  190. package/.next-prod/server/app/api/ollama/default-model/route.js.nft.json +1 -1
  191. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  192. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  193. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  194. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  195. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  196. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  197. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  198. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  199. package/.next-prod/server/app/api/output-styles/config/route.js +1 -1
  200. package/.next-prod/server/app/api/output-styles/config/route.js.nft.json +1 -1
  201. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  202. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  203. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  204. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  205. package/.next-prod/server/app/api/project-state/route.js +1 -1
  206. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  207. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  208. package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
  209. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  210. package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
  211. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  212. package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
  213. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  214. package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
  215. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  216. package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
  217. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  218. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  219. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  220. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  221. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  222. package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
  223. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  224. package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
  225. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  226. package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
  227. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  228. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  229. package/.next-prod/server/app/api/projects/route.js +1 -1
  230. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  231. package/.next-prod/server/app/api/push/public-key/route.js +1 -1
  232. package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
  233. package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
  234. package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
  235. package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
  236. package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
  237. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  238. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  239. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  240. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  241. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  242. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  243. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  244. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  245. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  246. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  247. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  248. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  249. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  250. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  251. package/.next-prod/server/app/api/restart/route.js +1 -1
  252. package/.next-prod/server/app/api/restart/route.js.nft.json +1 -1
  253. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  254. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  255. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  256. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  257. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  258. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  259. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  260. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  261. package/.next-prod/server/app/api/review/order/route.js +1 -1
  262. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  263. package/.next-prod/server/app/api/review/route.js +1 -1
  264. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  265. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  266. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  267. package/.next-prod/server/app/api/review/users/route.js +1 -1
  268. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  269. package/.next-prod/server/app/api/scheduled-tasks/route.js +2 -2
  270. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  271. package/.next-prod/server/app/api/services/config/route.js +1 -1
  272. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  273. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  274. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  275. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  276. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  277. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  278. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  279. package/.next-prod/server/app/api/session/[sessionId]/turn/route.js +2 -2
  280. package/.next-prod/server/app/api/session/[sessionId]/turn/route.js.nft.json +1 -1
  281. package/.next-prod/server/app/api/session/user-messages/route.js +1 -1
  282. package/.next-prod/server/app/api/session/user-messages/route.js.nft.json +1 -1
  283. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  284. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  285. package/.next-prod/server/app/api/sessions/delegate/route.js +1 -1
  286. package/.next-prod/server/app/api/sessions/delegate/route.js.nft.json +1 -1
  287. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  288. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  289. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  290. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  291. package/.next-prod/server/app/api/sessions/search/route.js +1 -1
  292. package/.next-prod/server/app/api/sessions/search/route.js.nft.json +1 -1
  293. package/.next-prod/server/app/api/sessions/status/route.js +1 -1
  294. package/.next-prod/server/app/api/sessions/status/route.js.nft.json +1 -1
  295. package/.next-prod/server/app/api/settings/route.js +1 -1
  296. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  297. package/.next-prod/server/app/api/shutdown/route.js +1 -1
  298. package/.next-prod/server/app/api/shutdown/route.js.nft.json +1 -1
  299. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  300. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  301. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  302. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  303. package/.next-prod/server/app/api/skills/route.js +1 -1
  304. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  305. package/.next-prod/server/app/api/snapshots/blob/route.js +1 -1
  306. package/.next-prod/server/app/api/snapshots/blob/route.js.nft.json +1 -1
  307. package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
  308. package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
  309. package/.next-prod/server/app/api/snapshots/range-diff/route.js +1 -1
  310. package/.next-prod/server/app/api/snapshots/range-diff/route.js.nft.json +1 -1
  311. package/.next-prod/server/app/api/snapshots/route.js +1 -1
  312. package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
  313. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  314. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  315. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  316. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  317. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  318. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  319. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  320. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  321. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  322. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  323. package/.next-prod/server/app/api/terminal/running/route.js +1 -0
  324. package/.next-prod/server/app/api/terminal/running/route.js.nft.json +1 -0
  325. package/.next-prod/server/app/api/terminal/running/route_client-reference-manifest.js +1 -0
  326. package/.next-prod/server/app/api/update/route.js +1 -1
  327. package/.next-prod/server/app/api/update/route.js.nft.json +1 -1
  328. package/.next-prod/server/app/api/update-state/route.js +1 -1
  329. package/.next-prod/server/app/api/update-state/route.js.nft.json +1 -1
  330. package/.next-prod/server/app/api/version/route.js +1 -1
  331. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  332. package/.next-prod/server/app/apps/[...path]/route.js +1 -1
  333. package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
  334. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  335. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  336. package/.next-prod/server/app/m/page.js +1 -1
  337. package/.next-prod/server/app/m/page.js.nft.json +1 -1
  338. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  339. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  340. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  341. package/.next-prod/server/app/page.js +1 -1
  342. package/.next-prod/server/app/page.js.nft.json +1 -1
  343. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  344. package/.next-prod/server/app/project/page.js +1 -1
  345. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  346. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  347. package/.next-prod/server/app/review/[id]/page.js +1 -1
  348. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  349. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  350. package/.next-prod/server/app-paths-manifest.json +6 -5
  351. package/.next-prod/server/chunks/1863.js +1 -0
  352. package/.next-prod/server/chunks/2493.js +9 -9
  353. package/.next-prod/server/chunks/411.js +1 -0
  354. package/.next-prod/server/chunks/5591.js +2 -2
  355. package/.next-prod/server/chunks/7438.js +18 -17
  356. package/.next-prod/server/chunks/7918.js +1 -0
  357. package/.next-prod/server/chunks/8022.js +1 -1
  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/_195_hPNVuma2vZS7bpTW/_buildManifest.js +1 -0
  363. package/.next-prod/static/chunks/81016-71999ca5bd6a6b2f.js +36 -0
  364. package/.next-prod/static/chunks/{95313-eb607273c688b022.js → 95313-af5cc33125d6c0ff.js} +3 -3
  365. package/.next-prod/static/chunks/99092-d9525c22b942b051.js +716 -0
  366. package/.next-prod/static/chunks/app/_global-error/page-4e18b53a1ed48d45.js +1 -0
  367. package/.next-prod/static/chunks/app/api/agent/test/route-4e18b53a1ed48d45.js +1 -0
  368. package/.next-prod/static/chunks/app/api/bash/route-4e18b53a1ed48d45.js +1 -0
  369. package/.next-prod/static/chunks/app/api/bots/[id]/route-4e18b53a1ed48d45.js +1 -0
  370. package/.next-prod/static/chunks/app/api/bots/route-4e18b53a1ed48d45.js +1 -0
  371. package/.next-prod/static/chunks/app/api/chat/codex/route-4e18b53a1ed48d45.js +1 -0
  372. package/.next-prod/static/chunks/app/api/chat/deepseek/route-4e18b53a1ed48d45.js +1 -0
  373. package/.next-prod/static/chunks/app/api/chat/glm/route-4e18b53a1ed48d45.js +1 -0
  374. package/.next-prod/static/chunks/app/api/chat/kimi/route-4e18b53a1ed48d45.js +1 -0
  375. package/.next-prod/static/chunks/app/api/chat/ollama/route-4e18b53a1ed48d45.js +1 -0
  376. package/.next-prod/static/chunks/app/api/chat/route-4e18b53a1ed48d45.js +1 -0
  377. package/.next-prod/static/chunks/app/api/chat/stop/route-4e18b53a1ed48d45.js +1 -0
  378. package/.next-prod/static/chunks/app/api/claude-stats/route-4e18b53a1ed48d45.js +1 -0
  379. package/.next-prod/static/chunks/app/api/commands/route-4e18b53a1ed48d45.js +1 -0
  380. package/.next-prod/static/chunks/app/api/comments/route-4e18b53a1ed48d45.js +1 -0
  381. package/.next-prod/static/chunks/app/api/db/columns/route-4e18b53a1ed48d45.js +1 -0
  382. package/.next-prod/static/chunks/app/api/db/connect/route-4e18b53a1ed48d45.js +1 -0
  383. package/.next-prod/static/chunks/app/api/db/disconnect/route-4e18b53a1ed48d45.js +1 -0
  384. package/.next-prod/static/chunks/app/api/db/export/route-4e18b53a1ed48d45.js +1 -0
  385. package/.next-prod/static/chunks/app/api/db/query/route-4e18b53a1ed48d45.js +1 -0
  386. package/.next-prod/static/chunks/app/api/db/schemas/route-4e18b53a1ed48d45.js +1 -0
  387. package/.next-prod/static/chunks/app/api/deepseek/balance/route-4e18b53a1ed48d45.js +1 -0
  388. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-4e18b53a1ed48d45.js +1 -0
  389. package/.next-prod/static/chunks/app/api/deepseek/models/route-4e18b53a1ed48d45.js +1 -0
  390. package/.next-prod/static/chunks/app/api/dev/spans/route-4e18b53a1ed48d45.js +1 -0
  391. package/.next-prod/static/chunks/app/api/extension/version/route-4e18b53a1ed48d45.js +1 -0
  392. package/.next-prod/static/chunks/app/api/file/route-4e18b53a1ed48d45.js +1 -0
  393. package/.next-prod/static/chunks/app/api/files/blame/route-4e18b53a1ed48d45.js +1 -0
  394. package/.next-prod/static/chunks/app/api/files/clipboard/route-4e18b53a1ed48d45.js +1 -0
  395. package/.next-prod/static/chunks/app/api/files/copy/route-4e18b53a1ed48d45.js +1 -0
  396. package/.next-prod/static/chunks/app/api/files/delete/route-4e18b53a1ed48d45.js +1 -0
  397. package/.next-prod/static/chunks/app/api/files/expanded/route-4e18b53a1ed48d45.js +1 -0
  398. package/.next-prod/static/chunks/app/api/files/index/route-4e18b53a1ed48d45.js +1 -0
  399. package/.next-prod/static/chunks/app/api/files/init/route-4e18b53a1ed48d45.js +1 -0
  400. package/.next-prod/static/chunks/app/api/files/paste/route-4e18b53a1ed48d45.js +1 -0
  401. package/.next-prod/static/chunks/app/api/files/read/route-4e18b53a1ed48d45.js +1 -0
  402. package/.next-prod/static/chunks/app/api/files/readdir/route-4e18b53a1ed48d45.js +1 -0
  403. package/.next-prod/static/chunks/app/api/files/recent/route-4e18b53a1ed48d45.js +1 -0
  404. package/.next-prod/static/chunks/app/api/files/save/route-4e18b53a1ed48d45.js +1 -0
  405. package/.next-prod/static/chunks/app/api/files/search/route-4e18b53a1ed48d45.js +1 -0
  406. package/.next-prod/static/chunks/app/api/files/stat/route-4e18b53a1ed48d45.js +1 -0
  407. package/.next-prod/static/chunks/app/api/files/text/route-4e18b53a1ed48d45.js +1 -0
  408. package/.next-prod/static/chunks/app/api/fs/dirs/route-4e18b53a1ed48d45.js +1 -0
  409. package/.next-prod/static/chunks/app/api/git/blob/route-4e18b53a1ed48d45.js +1 -0
  410. package/.next-prod/static/chunks/app/api/git/branch-diff/route-4e18b53a1ed48d45.js +1 -0
  411. package/.next-prod/static/chunks/app/api/git/branches/route-4e18b53a1ed48d45.js +1 -0
  412. package/.next-prod/static/chunks/app/api/git/commit-diff/route-4e18b53a1ed48d45.js +1 -0
  413. package/.next-prod/static/chunks/app/api/git/commits/route-4e18b53a1ed48d45.js +1 -0
  414. package/.next-prod/static/chunks/app/api/git/current-branch/route-4e18b53a1ed48d45.js +1 -0
  415. package/.next-prod/static/chunks/app/api/git/diff/route-4e18b53a1ed48d45.js +1 -0
  416. package/.next-prod/static/chunks/app/api/git/discard/route-4e18b53a1ed48d45.js +1 -0
  417. package/.next-prod/static/chunks/app/api/git/stage/route-4e18b53a1ed48d45.js +1 -0
  418. package/.next-prod/static/chunks/app/api/git/status/route-4e18b53a1ed48d45.js +1 -0
  419. package/.next-prod/static/chunks/app/api/git/unstage/route-4e18b53a1ed48d45.js +1 -0
  420. package/.next-prod/static/chunks/app/api/git/worktree/route-4e18b53a1ed48d45.js +1 -0
  421. package/.next-prod/static/chunks/app/api/glm/credentials/route-4e18b53a1ed48d45.js +1 -0
  422. package/.next-prod/static/chunks/app/api/glm/models/route-4e18b53a1ed48d45.js +1 -0
  423. package/.next-prod/static/chunks/app/api/glm/usage/route-4e18b53a1ed48d45.js +1 -0
  424. package/.next-prod/static/chunks/app/api/global-state/route-4e18b53a1ed48d45.js +1 -0
  425. package/.next-prod/static/chunks/app/api/health/route-4e18b53a1ed48d45.js +1 -0
  426. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-4e18b53a1ed48d45.js +1 -0
  427. package/.next-prod/static/chunks/app/api/html-apps/route-4e18b53a1ed48d45.js +1 -0
  428. package/.next-prod/static/chunks/app/api/instructions/config/route-4e18b53a1ed48d45.js +1 -0
  429. package/.next-prod/static/chunks/app/api/kimi/credentials/route-4e18b53a1ed48d45.js +1 -0
  430. package/.next-prod/static/chunks/app/api/kimi/models/route-4e18b53a1ed48d45.js +1 -0
  431. package/.next-prod/static/chunks/app/api/kimi/usage/route-4e18b53a1ed48d45.js +1 -0
  432. package/.next-prod/static/chunks/app/api/lsp/definition/route-4e18b53a1ed48d45.js +1 -0
  433. package/.next-prod/static/chunks/app/api/lsp/hover/route-4e18b53a1ed48d45.js +1 -0
  434. package/.next-prod/static/chunks/app/api/lsp/references/route-4e18b53a1ed48d45.js +1 -0
  435. package/.next-prod/static/chunks/app/api/lsp/status/route-4e18b53a1ed48d45.js +1 -0
  436. package/.next-prod/static/chunks/app/api/lsp/warmup/route-4e18b53a1ed48d45.js +1 -0
  437. package/.next-prod/static/chunks/app/api/mysql/columns/route-4e18b53a1ed48d45.js +1 -0
  438. package/.next-prod/static/chunks/app/api/mysql/connect/route-4e18b53a1ed48d45.js +1 -0
  439. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-4e18b53a1ed48d45.js +1 -0
  440. package/.next-prod/static/chunks/app/api/mysql/export/route-4e18b53a1ed48d45.js +1 -0
  441. package/.next-prod/static/chunks/app/api/mysql/query/route-4e18b53a1ed48d45.js +1 -0
  442. package/.next-prod/static/chunks/app/api/mysql/schemas/route-4e18b53a1ed48d45.js +1 -0
  443. package/.next-prod/static/chunks/app/api/neo4j/connect/route-4e18b53a1ed48d45.js +1 -0
  444. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-4e18b53a1ed48d45.js +1 -0
  445. package/.next-prod/static/chunks/app/api/neo4j/query/route-4e18b53a1ed48d45.js +1 -0
  446. package/.next-prod/static/chunks/app/api/neo4j/schema/route-4e18b53a1ed48d45.js +1 -0
  447. package/.next-prod/static/chunks/app/api/note/route-4e18b53a1ed48d45.js +1 -0
  448. package/.next-prod/static/chunks/app/api/ollama/config/route-4e18b53a1ed48d45.js +1 -0
  449. package/.next-prod/static/chunks/app/api/ollama/default-model/route-4e18b53a1ed48d45.js +1 -0
  450. package/.next-prod/static/chunks/app/api/ollama/models/route-4e18b53a1ed48d45.js +1 -0
  451. package/.next-prod/static/chunks/app/api/ollama/start/route-4e18b53a1ed48d45.js +1 -0
  452. package/.next-prod/static/chunks/app/api/open-cursor/route-4e18b53a1ed48d45.js +1 -0
  453. package/.next-prod/static/chunks/app/api/open-vscode/route-4e18b53a1ed48d45.js +1 -0
  454. package/.next-prod/static/chunks/app/api/output-styles/config/route-4e18b53a1ed48d45.js +1 -0
  455. package/.next-prod/static/chunks/app/api/pinned-sessions/route-4e18b53a1ed48d45.js +1 -0
  456. package/.next-prod/static/chunks/app/api/project-settings/route-4e18b53a1ed48d45.js +1 -0
  457. package/.next-prod/static/chunks/app/api/project-state/route-4e18b53a1ed48d45.js +1 -0
  458. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-4e18b53a1ed48d45.js +1 -0
  459. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-4e18b53a1ed48d45.js +1 -0
  460. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-4e18b53a1ed48d45.js +1 -0
  461. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-4e18b53a1ed48d45.js +1 -0
  462. package/.next-prod/static/chunks/app/api/projectGraph/context/route-4e18b53a1ed48d45.js +1 -0
  463. package/.next-prod/static/chunks/app/api/projectGraph/file/route-4e18b53a1ed48d45.js +1 -0
  464. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-4e18b53a1ed48d45.js +1 -0
  465. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-4e18b53a1ed48d45.js +1 -0
  466. package/.next-prod/static/chunks/app/api/projectGraph/related/route-4e18b53a1ed48d45.js +1 -0
  467. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-4e18b53a1ed48d45.js +1 -0
  468. package/.next-prod/static/chunks/app/api/projectGraph/search/route-4e18b53a1ed48d45.js +1 -0
  469. package/.next-prod/static/chunks/app/api/projects/route-4e18b53a1ed48d45.js +1 -0
  470. package/.next-prod/static/chunks/app/api/push/public-key/route-4e18b53a1ed48d45.js +1 -0
  471. package/.next-prod/static/chunks/app/api/push/subscribe/route-4e18b53a1ed48d45.js +1 -0
  472. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-4e18b53a1ed48d45.js +1 -0
  473. package/.next-prod/static/chunks/app/api/redis/command/route-4e18b53a1ed48d45.js +1 -0
  474. package/.next-prod/static/chunks/app/api/redis/connect/route-4e18b53a1ed48d45.js +1 -0
  475. package/.next-prod/static/chunks/app/api/redis/delete/route-4e18b53a1ed48d45.js +1 -0
  476. package/.next-prod/static/chunks/app/api/redis/disconnect/route-4e18b53a1ed48d45.js +1 -0
  477. package/.next-prod/static/chunks/app/api/redis/get/route-4e18b53a1ed48d45.js +1 -0
  478. package/.next-prod/static/chunks/app/api/redis/keys/route-4e18b53a1ed48d45.js +1 -0
  479. package/.next-prod/static/chunks/app/api/redis/set/route-4e18b53a1ed48d45.js +1 -0
  480. package/.next-prod/static/chunks/app/api/restart/route-4e18b53a1ed48d45.js +1 -0
  481. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-4e18b53a1ed48d45.js +1 -0
  482. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-4e18b53a1ed48d45.js +1 -0
  483. package/.next-prod/static/chunks/app/api/review/[id]/route-4e18b53a1ed48d45.js +1 -0
  484. package/.next-prod/static/chunks/app/api/review/identify/route-4e18b53a1ed48d45.js +1 -0
  485. package/.next-prod/static/chunks/app/api/review/order/route-4e18b53a1ed48d45.js +1 -0
  486. package/.next-prod/static/chunks/app/api/review/route-4e18b53a1ed48d45.js +1 -0
  487. package/.next-prod/static/chunks/app/api/review/share-info/route-4e18b53a1ed48d45.js +1 -0
  488. package/.next-prod/static/chunks/app/api/review/users/route-4e18b53a1ed48d45.js +1 -0
  489. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-4e18b53a1ed48d45.js +1 -0
  490. package/.next-prod/static/chunks/app/api/services/config/route-4e18b53a1ed48d45.js +1 -0
  491. package/.next-prod/static/chunks/app/api/services/scripts/route-4e18b53a1ed48d45.js +1 -0
  492. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-4e18b53a1ed48d45.js +1 -0
  493. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-4e18b53a1ed48d45.js +1 -0
  494. package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-4e18b53a1ed48d45.js +1 -0
  495. package/.next-prod/static/chunks/app/api/session/user-messages/route-4e18b53a1ed48d45.js +1 -0
  496. package/.next-prod/static/chunks/app/api/session-by-path/route-4e18b53a1ed48d45.js +1 -0
  497. package/.next-prod/static/chunks/app/api/sessions/delegate/route-4e18b53a1ed48d45.js +1 -0
  498. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-4e18b53a1ed48d45.js +1 -0
  499. package/.next-prod/static/chunks/app/api/sessions/projects/route-4e18b53a1ed48d45.js +1 -0
  500. package/.next-prod/static/chunks/app/api/sessions/search/route-4e18b53a1ed48d45.js +1 -0
  501. package/.next-prod/static/chunks/app/api/sessions/status/route-4e18b53a1ed48d45.js +1 -0
  502. package/.next-prod/static/chunks/app/api/settings/route-4e18b53a1ed48d45.js +1 -0
  503. package/.next-prod/static/chunks/app/api/shutdown/route-4e18b53a1ed48d45.js +1 -0
  504. package/.next-prod/static/chunks/app/api/skills/[id]/route-4e18b53a1ed48d45.js +1 -0
  505. package/.next-prod/static/chunks/app/api/skills/content/route-4e18b53a1ed48d45.js +1 -0
  506. package/.next-prod/static/chunks/app/api/skills/route-4e18b53a1ed48d45.js +1 -0
  507. package/.next-prod/static/chunks/app/api/snapshots/blob/route-4e18b53a1ed48d45.js +1 -0
  508. package/.next-prod/static/chunks/app/api/snapshots/diff/route-4e18b53a1ed48d45.js +1 -0
  509. package/.next-prod/static/chunks/app/api/snapshots/range-diff/route-4e18b53a1ed48d45.js +1 -0
  510. package/.next-prod/static/chunks/app/api/snapshots/route-4e18b53a1ed48d45.js +1 -0
  511. package/.next-prod/static/chunks/app/api/terminal/aliases/route-4e18b53a1ed48d45.js +1 -0
  512. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-4e18b53a1ed48d45.js +1 -0
  513. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-4e18b53a1ed48d45.js +1 -0
  514. package/.next-prod/static/chunks/app/api/terminal/env/route-4e18b53a1ed48d45.js +1 -0
  515. package/.next-prod/static/chunks/app/api/terminal/history/route-4e18b53a1ed48d45.js +1 -0
  516. package/.next-prod/static/chunks/app/api/terminal/running/route-4e18b53a1ed48d45.js +1 -0
  517. package/.next-prod/static/chunks/app/api/update/route-4e18b53a1ed48d45.js +1 -0
  518. package/.next-prod/static/chunks/app/api/update-state/route-4e18b53a1ed48d45.js +1 -0
  519. package/.next-prod/static/chunks/app/api/version/route-4e18b53a1ed48d45.js +1 -0
  520. package/.next-prod/static/chunks/app/apps/[...path]/route-4e18b53a1ed48d45.js +1 -0
  521. package/.next-prod/static/chunks/app/{layout-589122feb9071556.js → layout-0c3dcac0764d9e97.js} +1 -1
  522. package/.next-prod/static/chunks/app/manifest.webmanifest/route-4e18b53a1ed48d45.js +1 -0
  523. package/.next-prod/static/chunks/app/page-b472e7f948959009.js +1 -0
  524. package/.next-prod/static/chunks/app/project/page-b472e7f948959009.js +1 -0
  525. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-4e18b53a1ed48d45.js +1 -0
  526. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-4e18b53a1ed48d45.js +1 -0
  527. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-4e18b53a1ed48d45.js +1 -0
  528. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-4e18b53a1ed48d45.js +1 -0
  529. package/.next-prod/static/css/e70d0cefe04f0619.css +1 -0
  530. package/.next-prod/trace +15 -15
  531. package/.next-prod/trace-build +1 -1
  532. package/.next-prod/types/app/api/{pick-folder → fs/dirs}/route.ts +3 -3
  533. package/.next-prod/types/app/api/terminal/running/route.ts +353 -0
  534. package/.next-prod/types/routes.d.ts +3 -2
  535. package/.next-prod/types/validator.ts +18 -9
  536. package/bin/pty-host.mjs +423 -0
  537. package/dist/{chunk-LPZXJPD6.mjs → chunk-3LSLUAN6.mjs} +143 -95
  538. package/dist/{chunk-W5MB7DIM.mjs → chunk-N6CFCP2N.mjs} +655 -9
  539. package/dist/httpApi.mjs +7 -3
  540. package/dist/scheduledTasks.mjs +67 -11
  541. package/dist/wsServer.mjs +118 -141
  542. package/package.json +3 -3
  543. package/server.mjs +12 -0
  544. package/skills/cr/SKILL.md +306 -126
  545. package/skills/ex/SKILL.md +39 -59
  546. package/skills/fx/SKILL.md +46 -4
  547. package/skills/go/SKILL.md +26 -87
  548. package/skills/qa/SKILL.md +46 -36
  549. package/.next-prod/server/app/api/pick-folder/route.js +0 -1
  550. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +0 -1
  551. package/.next-prod/server/app/api/pick-folder/route_client-reference-manifest.js +0 -1
  552. package/.next-prod/server/chunks/6548.js +0 -1
  553. package/.next-prod/static/I8gbcTQRiRdMF09goE7WI/_buildManifest.js +0 -1
  554. package/.next-prod/static/chunks/60875-acaae14dd7ddcd91.js +0 -35
  555. package/.next-prod/static/chunks/99092-f94ee242866d22b9.js +0 -716
  556. package/.next-prod/static/chunks/app/_global-error/page-b3c86dd8f06140fe.js +0 -1
  557. package/.next-prod/static/chunks/app/api/agent/test/route-b3c86dd8f06140fe.js +0 -1
  558. package/.next-prod/static/chunks/app/api/bash/route-b3c86dd8f06140fe.js +0 -1
  559. package/.next-prod/static/chunks/app/api/bots/[id]/route-b3c86dd8f06140fe.js +0 -1
  560. package/.next-prod/static/chunks/app/api/bots/route-b3c86dd8f06140fe.js +0 -1
  561. package/.next-prod/static/chunks/app/api/chat/codex/route-b3c86dd8f06140fe.js +0 -1
  562. package/.next-prod/static/chunks/app/api/chat/deepseek/route-b3c86dd8f06140fe.js +0 -1
  563. package/.next-prod/static/chunks/app/api/chat/glm/route-b3c86dd8f06140fe.js +0 -1
  564. package/.next-prod/static/chunks/app/api/chat/kimi/route-b3c86dd8f06140fe.js +0 -1
  565. package/.next-prod/static/chunks/app/api/chat/ollama/route-b3c86dd8f06140fe.js +0 -1
  566. package/.next-prod/static/chunks/app/api/chat/route-b3c86dd8f06140fe.js +0 -1
  567. package/.next-prod/static/chunks/app/api/chat/stop/route-b3c86dd8f06140fe.js +0 -1
  568. package/.next-prod/static/chunks/app/api/claude-stats/route-b3c86dd8f06140fe.js +0 -1
  569. package/.next-prod/static/chunks/app/api/commands/route-b3c86dd8f06140fe.js +0 -1
  570. package/.next-prod/static/chunks/app/api/comments/route-b3c86dd8f06140fe.js +0 -1
  571. package/.next-prod/static/chunks/app/api/db/columns/route-b3c86dd8f06140fe.js +0 -1
  572. package/.next-prod/static/chunks/app/api/db/connect/route-b3c86dd8f06140fe.js +0 -1
  573. package/.next-prod/static/chunks/app/api/db/disconnect/route-b3c86dd8f06140fe.js +0 -1
  574. package/.next-prod/static/chunks/app/api/db/export/route-b3c86dd8f06140fe.js +0 -1
  575. package/.next-prod/static/chunks/app/api/db/query/route-b3c86dd8f06140fe.js +0 -1
  576. package/.next-prod/static/chunks/app/api/db/schemas/route-b3c86dd8f06140fe.js +0 -1
  577. package/.next-prod/static/chunks/app/api/deepseek/balance/route-b3c86dd8f06140fe.js +0 -1
  578. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-b3c86dd8f06140fe.js +0 -1
  579. package/.next-prod/static/chunks/app/api/deepseek/models/route-b3c86dd8f06140fe.js +0 -1
  580. package/.next-prod/static/chunks/app/api/dev/spans/route-b3c86dd8f06140fe.js +0 -1
  581. package/.next-prod/static/chunks/app/api/extension/version/route-b3c86dd8f06140fe.js +0 -1
  582. package/.next-prod/static/chunks/app/api/file/route-b3c86dd8f06140fe.js +0 -1
  583. package/.next-prod/static/chunks/app/api/files/blame/route-b3c86dd8f06140fe.js +0 -1
  584. package/.next-prod/static/chunks/app/api/files/clipboard/route-b3c86dd8f06140fe.js +0 -1
  585. package/.next-prod/static/chunks/app/api/files/copy/route-b3c86dd8f06140fe.js +0 -1
  586. package/.next-prod/static/chunks/app/api/files/delete/route-b3c86dd8f06140fe.js +0 -1
  587. package/.next-prod/static/chunks/app/api/files/expanded/route-b3c86dd8f06140fe.js +0 -1
  588. package/.next-prod/static/chunks/app/api/files/index/route-b3c86dd8f06140fe.js +0 -1
  589. package/.next-prod/static/chunks/app/api/files/init/route-b3c86dd8f06140fe.js +0 -1
  590. package/.next-prod/static/chunks/app/api/files/paste/route-b3c86dd8f06140fe.js +0 -1
  591. package/.next-prod/static/chunks/app/api/files/read/route-b3c86dd8f06140fe.js +0 -1
  592. package/.next-prod/static/chunks/app/api/files/readdir/route-b3c86dd8f06140fe.js +0 -1
  593. package/.next-prod/static/chunks/app/api/files/recent/route-b3c86dd8f06140fe.js +0 -1
  594. package/.next-prod/static/chunks/app/api/files/save/route-b3c86dd8f06140fe.js +0 -1
  595. package/.next-prod/static/chunks/app/api/files/search/route-b3c86dd8f06140fe.js +0 -1
  596. package/.next-prod/static/chunks/app/api/files/stat/route-b3c86dd8f06140fe.js +0 -1
  597. package/.next-prod/static/chunks/app/api/files/text/route-b3c86dd8f06140fe.js +0 -1
  598. package/.next-prod/static/chunks/app/api/git/blob/route-b3c86dd8f06140fe.js +0 -1
  599. package/.next-prod/static/chunks/app/api/git/branch-diff/route-b3c86dd8f06140fe.js +0 -1
  600. package/.next-prod/static/chunks/app/api/git/branches/route-b3c86dd8f06140fe.js +0 -1
  601. package/.next-prod/static/chunks/app/api/git/commit-diff/route-b3c86dd8f06140fe.js +0 -1
  602. package/.next-prod/static/chunks/app/api/git/commits/route-b3c86dd8f06140fe.js +0 -1
  603. package/.next-prod/static/chunks/app/api/git/current-branch/route-b3c86dd8f06140fe.js +0 -1
  604. package/.next-prod/static/chunks/app/api/git/diff/route-b3c86dd8f06140fe.js +0 -1
  605. package/.next-prod/static/chunks/app/api/git/discard/route-b3c86dd8f06140fe.js +0 -1
  606. package/.next-prod/static/chunks/app/api/git/stage/route-b3c86dd8f06140fe.js +0 -1
  607. package/.next-prod/static/chunks/app/api/git/status/route-b3c86dd8f06140fe.js +0 -1
  608. package/.next-prod/static/chunks/app/api/git/unstage/route-b3c86dd8f06140fe.js +0 -1
  609. package/.next-prod/static/chunks/app/api/git/worktree/route-b3c86dd8f06140fe.js +0 -1
  610. package/.next-prod/static/chunks/app/api/glm/credentials/route-b3c86dd8f06140fe.js +0 -1
  611. package/.next-prod/static/chunks/app/api/glm/models/route-b3c86dd8f06140fe.js +0 -1
  612. package/.next-prod/static/chunks/app/api/glm/usage/route-b3c86dd8f06140fe.js +0 -1
  613. package/.next-prod/static/chunks/app/api/global-state/route-b3c86dd8f06140fe.js +0 -1
  614. package/.next-prod/static/chunks/app/api/health/route-b3c86dd8f06140fe.js +0 -1
  615. package/.next-prod/static/chunks/app/api/html-apps/[id]/route-b3c86dd8f06140fe.js +0 -1
  616. package/.next-prod/static/chunks/app/api/html-apps/route-b3c86dd8f06140fe.js +0 -1
  617. package/.next-prod/static/chunks/app/api/instructions/config/route-b3c86dd8f06140fe.js +0 -1
  618. package/.next-prod/static/chunks/app/api/kimi/credentials/route-b3c86dd8f06140fe.js +0 -1
  619. package/.next-prod/static/chunks/app/api/kimi/models/route-b3c86dd8f06140fe.js +0 -1
  620. package/.next-prod/static/chunks/app/api/kimi/usage/route-b3c86dd8f06140fe.js +0 -1
  621. package/.next-prod/static/chunks/app/api/lsp/definition/route-b3c86dd8f06140fe.js +0 -1
  622. package/.next-prod/static/chunks/app/api/lsp/hover/route-b3c86dd8f06140fe.js +0 -1
  623. package/.next-prod/static/chunks/app/api/lsp/references/route-b3c86dd8f06140fe.js +0 -1
  624. package/.next-prod/static/chunks/app/api/lsp/status/route-b3c86dd8f06140fe.js +0 -1
  625. package/.next-prod/static/chunks/app/api/lsp/warmup/route-b3c86dd8f06140fe.js +0 -1
  626. package/.next-prod/static/chunks/app/api/mysql/columns/route-b3c86dd8f06140fe.js +0 -1
  627. package/.next-prod/static/chunks/app/api/mysql/connect/route-b3c86dd8f06140fe.js +0 -1
  628. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-b3c86dd8f06140fe.js +0 -1
  629. package/.next-prod/static/chunks/app/api/mysql/export/route-b3c86dd8f06140fe.js +0 -1
  630. package/.next-prod/static/chunks/app/api/mysql/query/route-b3c86dd8f06140fe.js +0 -1
  631. package/.next-prod/static/chunks/app/api/mysql/schemas/route-b3c86dd8f06140fe.js +0 -1
  632. package/.next-prod/static/chunks/app/api/neo4j/connect/route-b3c86dd8f06140fe.js +0 -1
  633. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-b3c86dd8f06140fe.js +0 -1
  634. package/.next-prod/static/chunks/app/api/neo4j/query/route-b3c86dd8f06140fe.js +0 -1
  635. package/.next-prod/static/chunks/app/api/neo4j/schema/route-b3c86dd8f06140fe.js +0 -1
  636. package/.next-prod/static/chunks/app/api/note/route-b3c86dd8f06140fe.js +0 -1
  637. package/.next-prod/static/chunks/app/api/ollama/config/route-b3c86dd8f06140fe.js +0 -1
  638. package/.next-prod/static/chunks/app/api/ollama/default-model/route-b3c86dd8f06140fe.js +0 -1
  639. package/.next-prod/static/chunks/app/api/ollama/models/route-b3c86dd8f06140fe.js +0 -1
  640. package/.next-prod/static/chunks/app/api/ollama/start/route-b3c86dd8f06140fe.js +0 -1
  641. package/.next-prod/static/chunks/app/api/open-cursor/route-b3c86dd8f06140fe.js +0 -1
  642. package/.next-prod/static/chunks/app/api/open-vscode/route-b3c86dd8f06140fe.js +0 -1
  643. package/.next-prod/static/chunks/app/api/output-styles/config/route-b3c86dd8f06140fe.js +0 -1
  644. package/.next-prod/static/chunks/app/api/pick-folder/route-b3c86dd8f06140fe.js +0 -1
  645. package/.next-prod/static/chunks/app/api/pinned-sessions/route-b3c86dd8f06140fe.js +0 -1
  646. package/.next-prod/static/chunks/app/api/project-settings/route-b3c86dd8f06140fe.js +0 -1
  647. package/.next-prod/static/chunks/app/api/project-state/route-b3c86dd8f06140fe.js +0 -1
  648. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-b3c86dd8f06140fe.js +0 -1
  649. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-b3c86dd8f06140fe.js +0 -1
  650. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-b3c86dd8f06140fe.js +0 -1
  651. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-b3c86dd8f06140fe.js +0 -1
  652. package/.next-prod/static/chunks/app/api/projectGraph/context/route-b3c86dd8f06140fe.js +0 -1
  653. package/.next-prod/static/chunks/app/api/projectGraph/file/route-b3c86dd8f06140fe.js +0 -1
  654. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-b3c86dd8f06140fe.js +0 -1
  655. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-b3c86dd8f06140fe.js +0 -1
  656. package/.next-prod/static/chunks/app/api/projectGraph/related/route-b3c86dd8f06140fe.js +0 -1
  657. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-b3c86dd8f06140fe.js +0 -1
  658. package/.next-prod/static/chunks/app/api/projectGraph/search/route-b3c86dd8f06140fe.js +0 -1
  659. package/.next-prod/static/chunks/app/api/projects/route-b3c86dd8f06140fe.js +0 -1
  660. package/.next-prod/static/chunks/app/api/push/public-key/route-b3c86dd8f06140fe.js +0 -1
  661. package/.next-prod/static/chunks/app/api/push/subscribe/route-b3c86dd8f06140fe.js +0 -1
  662. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-b3c86dd8f06140fe.js +0 -1
  663. package/.next-prod/static/chunks/app/api/redis/command/route-b3c86dd8f06140fe.js +0 -1
  664. package/.next-prod/static/chunks/app/api/redis/connect/route-b3c86dd8f06140fe.js +0 -1
  665. package/.next-prod/static/chunks/app/api/redis/delete/route-b3c86dd8f06140fe.js +0 -1
  666. package/.next-prod/static/chunks/app/api/redis/disconnect/route-b3c86dd8f06140fe.js +0 -1
  667. package/.next-prod/static/chunks/app/api/redis/get/route-b3c86dd8f06140fe.js +0 -1
  668. package/.next-prod/static/chunks/app/api/redis/keys/route-b3c86dd8f06140fe.js +0 -1
  669. package/.next-prod/static/chunks/app/api/redis/set/route-b3c86dd8f06140fe.js +0 -1
  670. package/.next-prod/static/chunks/app/api/restart/route-b3c86dd8f06140fe.js +0 -1
  671. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-b3c86dd8f06140fe.js +0 -1
  672. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-b3c86dd8f06140fe.js +0 -1
  673. package/.next-prod/static/chunks/app/api/review/[id]/route-b3c86dd8f06140fe.js +0 -1
  674. package/.next-prod/static/chunks/app/api/review/identify/route-b3c86dd8f06140fe.js +0 -1
  675. package/.next-prod/static/chunks/app/api/review/order/route-b3c86dd8f06140fe.js +0 -1
  676. package/.next-prod/static/chunks/app/api/review/route-b3c86dd8f06140fe.js +0 -1
  677. package/.next-prod/static/chunks/app/api/review/share-info/route-b3c86dd8f06140fe.js +0 -1
  678. package/.next-prod/static/chunks/app/api/review/users/route-b3c86dd8f06140fe.js +0 -1
  679. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-b3c86dd8f06140fe.js +0 -1
  680. package/.next-prod/static/chunks/app/api/services/config/route-b3c86dd8f06140fe.js +0 -1
  681. package/.next-prod/static/chunks/app/api/services/scripts/route-b3c86dd8f06140fe.js +0 -1
  682. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-b3c86dd8f06140fe.js +0 -1
  683. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-b3c86dd8f06140fe.js +0 -1
  684. package/.next-prod/static/chunks/app/api/session/[sessionId]/turn/route-b3c86dd8f06140fe.js +0 -1
  685. package/.next-prod/static/chunks/app/api/session/user-messages/route-b3c86dd8f06140fe.js +0 -1
  686. package/.next-prod/static/chunks/app/api/session-by-path/route-b3c86dd8f06140fe.js +0 -1
  687. package/.next-prod/static/chunks/app/api/sessions/delegate/route-b3c86dd8f06140fe.js +0 -1
  688. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-b3c86dd8f06140fe.js +0 -1
  689. package/.next-prod/static/chunks/app/api/sessions/projects/route-b3c86dd8f06140fe.js +0 -1
  690. package/.next-prod/static/chunks/app/api/sessions/search/route-b3c86dd8f06140fe.js +0 -1
  691. package/.next-prod/static/chunks/app/api/sessions/status/route-b3c86dd8f06140fe.js +0 -1
  692. package/.next-prod/static/chunks/app/api/settings/route-b3c86dd8f06140fe.js +0 -1
  693. package/.next-prod/static/chunks/app/api/shutdown/route-b3c86dd8f06140fe.js +0 -1
  694. package/.next-prod/static/chunks/app/api/skills/[id]/route-b3c86dd8f06140fe.js +0 -1
  695. package/.next-prod/static/chunks/app/api/skills/content/route-b3c86dd8f06140fe.js +0 -1
  696. package/.next-prod/static/chunks/app/api/skills/route-b3c86dd8f06140fe.js +0 -1
  697. package/.next-prod/static/chunks/app/api/snapshots/blob/route-b3c86dd8f06140fe.js +0 -1
  698. package/.next-prod/static/chunks/app/api/snapshots/diff/route-b3c86dd8f06140fe.js +0 -1
  699. package/.next-prod/static/chunks/app/api/snapshots/range-diff/route-b3c86dd8f06140fe.js +0 -1
  700. package/.next-prod/static/chunks/app/api/snapshots/route-b3c86dd8f06140fe.js +0 -1
  701. package/.next-prod/static/chunks/app/api/terminal/aliases/route-b3c86dd8f06140fe.js +0 -1
  702. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-b3c86dd8f06140fe.js +0 -1
  703. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-b3c86dd8f06140fe.js +0 -1
  704. package/.next-prod/static/chunks/app/api/terminal/env/route-b3c86dd8f06140fe.js +0 -1
  705. package/.next-prod/static/chunks/app/api/terminal/history/route-b3c86dd8f06140fe.js +0 -1
  706. package/.next-prod/static/chunks/app/api/update/route-b3c86dd8f06140fe.js +0 -1
  707. package/.next-prod/static/chunks/app/api/update-state/route-b3c86dd8f06140fe.js +0 -1
  708. package/.next-prod/static/chunks/app/api/version/route-b3c86dd8f06140fe.js +0 -1
  709. package/.next-prod/static/chunks/app/apps/[...path]/route-b3c86dd8f06140fe.js +0 -1
  710. package/.next-prod/static/chunks/app/manifest.webmanifest/route-b3c86dd8f06140fe.js +0 -1
  711. package/.next-prod/static/chunks/app/page-a69072e6dbd4a059.js +0 -1
  712. package/.next-prod/static/chunks/app/project/page-a69072e6dbd4a059.js +0 -1
  713. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-b3c86dd8f06140fe.js +0 -1
  714. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-b3c86dd8f06140fe.js +0 -1
  715. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-b3c86dd8f06140fe.js +0 -1
  716. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-b3c86dd8f06140fe.js +0 -1
  717. package/.next-prod/static/css/2abfec9d3e93011f.css +0 -1
  718. package/skills/ap/SKILL.md +0 -18
  719. /package/.next-prod/static/{I8gbcTQRiRdMF09goE7WI → _195_hPNVuma2vZS7bpTW}/_ssgManifest.js +0 -0
@@ -1,5 +1,7 @@
1
1
  import {
2
2
  AppRuntime,
3
+ COCKPIT_DIR,
4
+ COCKPIT_PROJECTS_DIR,
3
5
  Cause_exports,
4
6
  Effect_exports,
5
7
  Exit_exports,
@@ -14,7 +16,7 @@ import {
14
16
  getTerminalOutputPath,
15
17
  readJsonFile,
16
18
  writeJsonFile
17
- } from "./chunk-LPZXJPD6.mjs";
19
+ } from "./chunk-3LSLUAN6.mjs";
18
20
 
19
21
  // packages/feature/console/src/server/plugins/browser/BrowserBridge.ts
20
22
  import { WebSocket } from "ws";
@@ -41,6 +43,19 @@ function toShortId(fullId) {
41
43
  return id;
42
44
  }
43
45
 
46
+ // packages/shared/utils/src/platform.ts
47
+ var isMac = process.platform === "darwin";
48
+ var isWindows = process.platform === "win32";
49
+ var isLinux = process.platform === "linux";
50
+ function getDefaultShell() {
51
+ if (isWindows) return process.env.COMSPEC || "powershell.exe";
52
+ return process.env.SHELL || "/bin/sh";
53
+ }
54
+ function getDefaultPath() {
55
+ if (isWindows) return process.env.PATH || "";
56
+ return process.env.PATH || "/usr/local/bin:/usr/bin:/bin";
57
+ }
58
+
44
59
  // packages/feature/console/src/server/plugins/browser/BrowserBridge.ts
45
60
  var g_browser = globalThis;
46
61
  var registry = g_browser.__cockpitBrowserRegistry ?? (g_browser.__cockpitBrowserRegistry = /* @__PURE__ */ new Map());
@@ -161,6 +176,14 @@ import { dirname, resolve } from "path";
161
176
 
162
177
  // packages/feature/console/src/server/terminal/historyStore.ts
163
178
  import fs from "fs/promises";
179
+ import { basename, join } from "path";
180
+ async function removeEntryOutput(cwd, entry) {
181
+ const paths = /* @__PURE__ */ new Set();
182
+ if (entry.outputFile) paths.add(entry.outputFile);
183
+ if (entry.id) paths.add(getTerminalOutputPath(cwd, entry.id));
184
+ for (const p of paths) await fs.unlink(p).catch(() => {
185
+ });
186
+ }
164
187
  var OUTPUT_FILE_THRESHOLD = 4096;
165
188
  var MAX_ENTRIES = 100;
166
189
  async function appendHistoryEntry(cwd, tabId, entry) {
@@ -196,9 +219,7 @@ async function appendHistoryEntry(cwd, tabId, entry) {
196
219
  );
197
220
  for (const line of removedLines) {
198
221
  try {
199
- const old = JSON.parse(line);
200
- if (old.outputFile) await fs.unlink(old.outputFile).catch(() => {
201
- });
222
+ await removeEntryOutput(cwd, JSON.parse(line));
202
223
  } catch {
203
224
  }
204
225
  }
@@ -253,6 +274,60 @@ async function readHistoryEntries(cwd, tabId) {
253
274
  return [];
254
275
  }
255
276
  }
277
+ var ORPHAN_MIN_AGE_MS = 10 * 60 * 1e3;
278
+ async function sweepOrphanOutputs(now = Date.now(), projectsDir = COCKPIT_PROJECTS_DIR) {
279
+ let removed = 0;
280
+ let bytes = 0;
281
+ let projects;
282
+ try {
283
+ projects = await fs.readdir(projectsDir);
284
+ } catch {
285
+ return { removed, bytes };
286
+ }
287
+ for (const project of projects) {
288
+ const dir = join(projectsDir, project);
289
+ let names;
290
+ try {
291
+ names = await fs.readdir(dir);
292
+ } catch {
293
+ continue;
294
+ }
295
+ const outputs = names.filter((n) => /^terminal-output-.+\.txt$/.test(n));
296
+ if (outputs.length === 0) continue;
297
+ const keep = /* @__PURE__ */ new Set();
298
+ for (const name of names) {
299
+ if (!/^terminal-history-.+\.jsonl$/.test(name)) continue;
300
+ let content;
301
+ try {
302
+ content = await fs.readFile(join(dir, name), "utf-8");
303
+ } catch {
304
+ continue;
305
+ }
306
+ for (const line of content.split("\n")) {
307
+ if (!line) continue;
308
+ try {
309
+ const entry = JSON.parse(line);
310
+ if (entry.outputFile) keep.add(basename(entry.outputFile));
311
+ if (entry.running && entry.id) keep.add(`terminal-output-${entry.id}.txt`);
312
+ } catch {
313
+ }
314
+ }
315
+ }
316
+ for (const name of outputs) {
317
+ if (keep.has(name)) continue;
318
+ const file = join(dir, name);
319
+ try {
320
+ const stat = await fs.stat(file);
321
+ if (now - stat.mtimeMs < ORPHAN_MIN_AGE_MS) continue;
322
+ await fs.unlink(file);
323
+ removed++;
324
+ bytes += stat.size;
325
+ } catch {
326
+ }
327
+ }
328
+ }
329
+ return { removed, bytes };
330
+ }
256
331
 
257
332
  // packages/feature/console/src/server/terminal/consoleBroadcast.ts
258
333
  var WS_OPEN = 1;
@@ -276,6 +351,19 @@ function broadcastConsoleDelta(cwd, tabId, delta, sourceId) {
276
351
  }
277
352
  }
278
353
  }
354
+ function broadcastRunningChanged() {
355
+ const set = g.__cockpitGlobalStateClients;
356
+ if (!set || set.size === 0) return;
357
+ const data = JSON.stringify({ type: "running-terminals-changed" });
358
+ for (const ws of set) {
359
+ if (ws.readyState === WS_OPEN) {
360
+ try {
361
+ ws.send(data);
362
+ } catch {
363
+ }
364
+ }
365
+ }
366
+ }
279
367
 
280
368
  // packages/feature/console/src/server/plugins/browser/browserBubbleControl.ts
281
369
  var CONSOLE_TAB_ID = "default";
@@ -432,7 +520,500 @@ function notifyExitListeners(commandId, exitCode) {
432
520
  import fs2 from "fs/promises";
433
521
  import { writeFileSync, mkdirSync } from "fs";
434
522
  import { dirname as dirname2 } from "path";
523
+
524
+ // packages/feature/console/src/server/terminal/processTree.ts
525
+ import { execSync } from "child_process";
526
+ function windowsChildPidMap() {
527
+ const out = execSync(
528
+ 'powershell -NoProfile -NonInteractive -Command "Get-CimInstance Win32_Process | Select-Object ProcessId,ParentProcessId | ConvertTo-Csv -NoTypeInformation"',
529
+ { encoding: "utf-8", timeout: 5e3 }
530
+ );
531
+ const byParent = /* @__PURE__ */ new Map();
532
+ for (const line of out.split(/\r?\n/).slice(1)) {
533
+ const m = line.match(/^"?(\d+)"?,"?(\d+)"?/);
534
+ if (!m) continue;
535
+ const child = Number(m[1]);
536
+ const parent = Number(m[2]);
537
+ const bucket = byParent.get(parent);
538
+ if (bucket) bucket.push(child);
539
+ else byParent.set(parent, [child]);
540
+ }
541
+ return byParent;
542
+ }
543
+ function getDescendantPids(pid) {
544
+ const descendants = [];
545
+ if (isWindows) {
546
+ let byParent;
547
+ try {
548
+ byParent = windowsChildPidMap();
549
+ } catch {
550
+ return descendants;
551
+ }
552
+ const seen = /* @__PURE__ */ new Set([pid]);
553
+ const walk = (parentPid) => {
554
+ for (const child of byParent.get(parentPid) ?? []) {
555
+ if (seen.has(child)) continue;
556
+ seen.add(child);
557
+ walk(child);
558
+ descendants.push(child);
559
+ }
560
+ };
561
+ walk(pid);
562
+ return descendants;
563
+ }
564
+ function collect(parentPid) {
565
+ try {
566
+ const result = execSync(`pgrep -P ${parentPid}`, {
567
+ encoding: "utf-8",
568
+ timeout: 3e3
569
+ }).trim();
570
+ const childPids = result.split("\n").filter(Boolean).map(Number);
571
+ for (const cp of childPids) {
572
+ collect(cp);
573
+ descendants.push(cp);
574
+ }
575
+ } catch {
576
+ }
577
+ }
578
+ collect(pid);
579
+ return descendants;
580
+ }
581
+ function interruptPidTree(pid) {
582
+ if (!pid) return;
583
+ const allPids = [...getDescendantPids(pid), pid];
584
+ for (const p of allPids) {
585
+ try {
586
+ process.kill(p, "SIGTERM");
587
+ } catch {
588
+ }
589
+ }
590
+ setTimeout(() => {
591
+ for (const p of allPids) {
592
+ try {
593
+ process.kill(p, 0);
594
+ process.kill(p, "SIGKILL");
595
+ } catch {
596
+ }
597
+ }
598
+ }, 1e3);
599
+ }
600
+
601
+ // packages/feature/console/src/server/terminal/ptyHostClient.ts
602
+ import { spawn } from "child_process";
603
+ import { createHash, randomUUID } from "crypto";
604
+ import { readFileSync } from "fs";
605
+ import { EventEmitter } from "events";
606
+ import { connect } from "net";
607
+ import { tmpdir } from "os";
608
+ import { join as join2 } from "path";
609
+ var PTY_HOST_PROTOCOL = 1;
610
+ var LAUNCH_TIMEOUT_MS = 8e3;
611
+ var LAUNCH_POLL_MS = 50;
612
+ var HOST_LOST_EXIT_CODE = -1;
613
+ function homeHash() {
614
+ return createHash("sha1").update(COCKPIT_DIR).digest("hex").slice(0, 12);
615
+ }
616
+ function ptyHostSocketPath() {
617
+ const name = `cockpit-pty-v${PTY_HOST_PROTOCOL}-${homeHash()}`;
618
+ if (isWindows) return `\\\\.\\pipe\\${name}`;
619
+ const preferred = join2(COCKPIT_DIR, "pty-host", `v${PTY_HOST_PROTOCOL}.sock`);
620
+ return preferred.length <= 100 ? preferred : join2(tmpdir(), `${name}.sock`);
621
+ }
622
+ var RemotePty = class {
623
+ constructor(id, conn, pid) {
624
+ this.id = id;
625
+ this.conn = conn;
626
+ this.dataCbs = /* @__PURE__ */ new Set();
627
+ this.exitCbs = /* @__PURE__ */ new Set();
628
+ /** Output that arrived before anyone listened (see onData). */
629
+ this.pending = [];
630
+ this.exitEvent = null;
631
+ this.exitDelivered = false;
632
+ this.pid = pid;
633
+ }
634
+ /**
635
+ * The spawn reply and the first output can arrive in the same socket chunk,
636
+ * i.e. before the caller's `await` resumes and attaches listeners. Buffer
637
+ * until the first listener, then flush on a microtask so every listener the
638
+ * caller attaches in that same synchronous block sees the same bytes —
639
+ * matching node-pty, whose events never fire synchronously after spawn().
640
+ */
641
+ onData(cb) {
642
+ this.dataCbs.add(cb);
643
+ if (this.pending.length > 0) {
644
+ queueMicrotask(() => {
645
+ const chunks = this.pending;
646
+ this.pending = [];
647
+ for (const c of chunks) this.emitData(c);
648
+ });
649
+ }
650
+ return { dispose: () => {
651
+ this.dataCbs.delete(cb);
652
+ } };
653
+ }
654
+ onExit(cb) {
655
+ this.exitCbs.add(cb);
656
+ if (this.exitEvent && !this.exitDelivered) queueMicrotask(() => this.deliverExit());
657
+ return { dispose: () => {
658
+ this.exitCbs.delete(cb);
659
+ } };
660
+ }
661
+ write(data) {
662
+ this.conn.send({ op: "write", id: this.id, data });
663
+ }
664
+ resize(cols, rows) {
665
+ this.conn.send({ op: "resize", id: this.id, cols, rows });
666
+ }
667
+ kill(signal) {
668
+ this.conn.send({ op: "kill", id: this.id, ...signal ? { signal } : {} });
669
+ }
670
+ /** @internal */
671
+ emitData(data) {
672
+ if (this.dataCbs.size === 0 || this.pending.length > 0) {
673
+ this.pending.push(data);
674
+ return;
675
+ }
676
+ for (const cb of [...this.dataCbs]) cb(data);
677
+ }
678
+ /** @internal */
679
+ emitExit(e) {
680
+ if (this.exitEvent) return;
681
+ this.exitEvent = { exitCode: e.exitCode ?? 0, signal: typeof e.signal === "number" ? e.signal : void 0 };
682
+ queueMicrotask(() => this.deliverExit());
683
+ }
684
+ deliverExit() {
685
+ if (this.exitDelivered || !this.exitEvent || this.exitCbs.size === 0) return;
686
+ if (this.pending.length > 0) {
687
+ const chunks = this.pending;
688
+ this.pending = [];
689
+ for (const cb of [...this.dataCbs]) for (const c of chunks) cb(c);
690
+ }
691
+ this.exitDelivered = true;
692
+ for (const cb of [...this.exitCbs]) cb(this.exitEvent);
693
+ this.conn.send({ op: "ack", id: this.id });
694
+ this.conn.sessions.delete(this.id);
695
+ }
696
+ };
697
+ var RemotePipe = class extends EventEmitter {
698
+ constructor(id, conn, pid) {
699
+ super();
700
+ this.id = id;
701
+ this.conn = conn;
702
+ this.stdout = new EventEmitter();
703
+ this.stderr = new EventEmitter();
704
+ this.pending = [];
705
+ this.exitEvent = null;
706
+ this.exitDelivered = false;
707
+ this.pid = pid;
708
+ this.stdin = {
709
+ writable: true,
710
+ write: (data) => {
711
+ conn.send({ op: "write", id, data });
712
+ return true;
713
+ },
714
+ end: () => {
715
+ this.stdin.writable = false;
716
+ conn.send({ op: "eof", id });
717
+ }
718
+ };
719
+ const onNewListener = (event) => {
720
+ if (event === "data" && this.pending.length > 0) queueMicrotask(() => this.flush());
721
+ };
722
+ this.stdout.on("newListener", onNewListener);
723
+ this.stderr.on("newListener", onNewListener);
724
+ this.on("newListener", (event) => {
725
+ if (event === "close" && this.exitEvent && !this.exitDelivered) queueMicrotask(() => this.deliverExit());
726
+ });
727
+ }
728
+ /** @internal */
729
+ emitData(data, stream = "stdout") {
730
+ const listening = this.stdout.listenerCount("data") + this.stderr.listenerCount("data") > 0;
731
+ if (!listening || this.pending.length > 0) {
732
+ this.pending.push({ stream, data });
733
+ return;
734
+ }
735
+ this[stream].emit("data", data);
736
+ }
737
+ /** @internal */
738
+ emitExit(e) {
739
+ if (this.exitEvent) return;
740
+ this.exitEvent = e;
741
+ queueMicrotask(() => this.deliverExit());
742
+ }
743
+ flush() {
744
+ const chunks = this.pending;
745
+ this.pending = [];
746
+ for (const c of chunks) this[c.stream].emit("data", c.data);
747
+ }
748
+ deliverExit() {
749
+ if (this.exitDelivered || !this.exitEvent || this.listenerCount("close") === 0) return;
750
+ this.flush();
751
+ this.exitDelivered = true;
752
+ this.stdin.writable = false;
753
+ this.emit("close", this.exitEvent.exitCode, this.exitEvent.signal ?? null);
754
+ this.conn.send({ op: "ack", id: this.id });
755
+ this.conn.sessions.delete(this.id);
756
+ }
757
+ };
758
+ var HostConnection = class {
759
+ constructor(sock, onClose) {
760
+ this.sock = sock;
761
+ this.onClose = onClose;
762
+ this.sessions = /* @__PURE__ */ new Map();
763
+ this.spawnWaiters = /* @__PURE__ */ new Map();
764
+ this.buf = "";
765
+ this.closed = false;
766
+ this.helloWaiter = null;
767
+ sock.setEncoding("utf8");
768
+ sock.on("data", (chunk) => this.onChunk(chunk));
769
+ sock.on("close", () => this.handleClose());
770
+ sock.on("error", () => this.handleClose());
771
+ }
772
+ send(msg) {
773
+ if (this.closed) return;
774
+ try {
775
+ this.sock.write(JSON.stringify(msg) + "\n");
776
+ } catch {
777
+ }
778
+ }
779
+ /** Resolves with the host's build and existing sessions. */
780
+ hello() {
781
+ return new Promise((resolve2, reject) => {
782
+ this.helloWaiter = { resolve: resolve2, reject };
783
+ this.send({ op: "hello", proto: PTY_HOST_PROTOCOL });
784
+ });
785
+ }
786
+ spawn(kind, remote, opts) {
787
+ this.sessions.set(opts.id, remote);
788
+ return new Promise((resolve2, reject) => {
789
+ this.spawnWaiters.set(opts.id, { resolve: resolve2, reject });
790
+ this.send({ op: "spawn", kind, ...opts });
791
+ }).then(
792
+ (pid) => {
793
+ remote.pid = pid;
794
+ return remote;
795
+ },
796
+ (e) => {
797
+ if (this.sessions.get(opts.id) === remote) this.sessions.delete(opts.id);
798
+ throw e;
799
+ }
800
+ );
801
+ }
802
+ shutdownHost() {
803
+ this.send({ op: "shutdown" });
804
+ }
805
+ /** Resolves once the socket is gone. */
806
+ whenClosed() {
807
+ if (this.closed) return Promise.resolve();
808
+ return new Promise((resolve2) => this.sock.once("close", () => resolve2()));
809
+ }
810
+ destroy() {
811
+ this.sock.destroy();
812
+ }
813
+ onChunk(chunk) {
814
+ this.buf += chunk;
815
+ let nl;
816
+ while ((nl = this.buf.indexOf("\n")) !== -1) {
817
+ const line = this.buf.slice(0, nl);
818
+ this.buf = this.buf.slice(nl + 1);
819
+ if (!line) continue;
820
+ let msg;
821
+ try {
822
+ msg = JSON.parse(line);
823
+ } catch {
824
+ continue;
825
+ }
826
+ this.dispatch(msg);
827
+ }
828
+ }
829
+ dispatch(msg) {
830
+ const id = msg.id;
831
+ switch (msg.ev) {
832
+ case "hello": {
833
+ const waiter = this.helloWaiter;
834
+ this.helloWaiter = null;
835
+ if (msg.proto !== PTY_HOST_PROTOCOL) {
836
+ waiter?.reject(new Error(`pty-host protocol mismatch: host ${String(msg.proto)}, server ${PTY_HOST_PROTOCOL}`));
837
+ return;
838
+ }
839
+ waiter?.resolve(msg);
840
+ return;
841
+ }
842
+ case "spawned":
843
+ this.spawnWaiters.get(id)?.resolve(msg.pid);
844
+ this.spawnWaiters.delete(id);
845
+ return;
846
+ case "spawnError":
847
+ this.spawnWaiters.get(id)?.reject(new Error(String(msg.error)));
848
+ this.spawnWaiters.delete(id);
849
+ return;
850
+ case "data":
851
+ this.sessions.get(id)?.emitData(msg.data, msg.stream);
852
+ return;
853
+ case "exit":
854
+ this.sessions.get(id)?.emitExit({ exitCode: msg.exitCode, signal: msg.signal });
855
+ return;
856
+ }
857
+ }
858
+ handleClose() {
859
+ if (this.closed) return;
860
+ this.closed = true;
861
+ this.helloWaiter?.reject(new Error("pty-host connection closed"));
862
+ this.helloWaiter = null;
863
+ for (const w of this.spawnWaiters.values()) w.reject(new Error("pty-host connection closed"));
864
+ this.spawnWaiters.clear();
865
+ if (this.sessions.size > 0) {
866
+ console.error(`[pty-host] connection lost with ${this.sessions.size} live session(s)`);
867
+ }
868
+ for (const session of this.sessions.values()) session.emitExit({ exitCode: HOST_LOST_EXIT_CODE });
869
+ this.onClose();
870
+ }
871
+ };
872
+ var STATE_KEY = /* @__PURE__ */ Symbol.for("cockpit_pty_host_client");
873
+ function state() {
874
+ const g2 = globalThis;
875
+ return g2[STATE_KEY] ??= {};
876
+ }
877
+ function setPtyHostAdoptHandler(fn) {
878
+ state().adopt = fn;
879
+ }
880
+ function hostBuildId() {
881
+ const root = process.env.COCKPIT_ROOT;
882
+ if (!root) return null;
883
+ try {
884
+ return createHash("sha1").update(readFileSync(join2(root, "bin", "pty-host.mjs"))).digest("hex").slice(0, 12);
885
+ } catch {
886
+ return null;
887
+ }
888
+ }
889
+ function tryConnect(replaceOutdated = true) {
890
+ return new Promise((resolve2) => {
891
+ const sock = connect(ptyHostSocketPath());
892
+ const onError = () => resolve2(null);
893
+ sock.once("error", onError);
894
+ sock.once("connect", async () => {
895
+ sock.off("error", onError);
896
+ const s = state();
897
+ const conn = new HostConnection(sock, () => {
898
+ if (s.conn === conn) s.conn = void 0;
899
+ });
900
+ let hello;
901
+ try {
902
+ hello = await conn.hello();
903
+ } catch (e) {
904
+ console.error(`[pty-host] handshake failed: ${e.message}`);
905
+ conn.destroy();
906
+ resolve2(null);
907
+ return;
908
+ }
909
+ const expected = hostBuildId();
910
+ if (replaceOutdated && expected && hello.build !== expected) {
911
+ console.log(`[pty-host] host runs build ${hello.build ?? "unknown"}, expected ${expected}; replacing it (${hello.sessions?.length ?? 0} session(s) end)`);
912
+ conn.shutdownHost();
913
+ await conn.whenClosed();
914
+ resolve2(null);
915
+ return;
916
+ }
917
+ s.conn = conn;
918
+ const adopted = (hello.sessions ?? []).map((w) => {
919
+ const base = { meta: w.meta, output: w.output, ...w.exited ? { exitCode: w.exitCode ?? 0 } : {} };
920
+ const remote = w.kind === "pipe" ? new RemotePipe(w.id, conn, w.pid) : new RemotePty(w.id, conn, w.pid);
921
+ conn.sessions.set(w.id, remote);
922
+ if (w.exited) remote.emitExit({ exitCode: w.exitCode ?? 0, signal: w.signal });
923
+ return remote instanceof RemotePipe ? { ...base, kind: "pipe", handle: remote } : { ...base, kind: "pty", handle: remote };
924
+ });
925
+ if (adopted.length > 0) {
926
+ console.log(`[pty-host] connected, adopting ${adopted.length} session(s)`);
927
+ }
928
+ try {
929
+ await s.adopt?.(adopted);
930
+ } catch (e) {
931
+ console.error("[pty-host] adopt failed:", e);
932
+ }
933
+ resolve2(conn);
934
+ });
935
+ });
936
+ }
937
+ function launchHost() {
938
+ const root = process.env.COCKPIT_ROOT;
939
+ if (!root) throw new Error("COCKPIT_ROOT is not set; cannot locate bin/pty-host.mjs");
940
+ const dev = process.env.COCKPIT_ENV === "dev";
941
+ const child = spawn(
942
+ process.execPath,
943
+ [
944
+ join2(root, "bin", "pty-host.mjs"),
945
+ "--launch",
946
+ "--socket",
947
+ ptyHostSocketPath(),
948
+ "--dir",
949
+ join2(COCKPIT_DIR, "pty-host", `v${PTY_HOST_PROTOCOL}`),
950
+ "--title",
951
+ dev ? "cockpit-pty-dev" : "cockpit-pty",
952
+ "--log",
953
+ join2(COCKPIT_DIR, "logs", "pty-host.log")
954
+ ],
955
+ { cwd: COCKPIT_DIR, detached: true, windowsHide: true, stdio: "ignore" }
956
+ );
957
+ child.on("error", (e) => console.error(`[pty-host] launcher failed: ${e.message}`));
958
+ child.unref();
959
+ }
960
+ async function getConnection(launch) {
961
+ const s = state();
962
+ if (s.conn) return s.conn;
963
+ if (!s.connecting) s.connecting = tryConnect().finally(() => {
964
+ s.connecting = void 0;
965
+ });
966
+ const existing = await s.connecting;
967
+ if (existing || !launch) return existing;
968
+ if (!s.launching) {
969
+ s.launching = (async () => {
970
+ console.log("[pty-host] no host running, launching one");
971
+ launchHost();
972
+ const deadline = Date.now() + LAUNCH_TIMEOUT_MS;
973
+ while (Date.now() < deadline) {
974
+ await new Promise((r) => setTimeout(r, LAUNCH_POLL_MS));
975
+ const conn = s.conn ?? await tryConnect(false);
976
+ if (conn) return conn;
977
+ }
978
+ return null;
979
+ })().finally(() => {
980
+ s.launching = void 0;
981
+ });
982
+ }
983
+ return s.launching;
984
+ }
985
+ async function requireConnection() {
986
+ const conn = await getConnection(true);
987
+ if (!conn) {
988
+ throw new Error(`PTY host did not start \u2014 see ${join2(COCKPIT_DIR, "logs", "pty-host.log")}`);
989
+ }
990
+ return conn;
991
+ }
992
+ function sessionIdFor(commandId) {
993
+ return `${commandId}~${randomUUID().slice(0, 8)}`;
994
+ }
995
+ async function spawnPtyInHost(opts) {
996
+ const conn = await requireConnection();
997
+ const sid = sessionIdFor(opts.id);
998
+ return conn.spawn("pty", new RemotePty(sid, conn, 0), { ...opts, id: sid });
999
+ }
1000
+ async function spawnPipeInHost(opts) {
1001
+ const conn = await requireConnection();
1002
+ const sid = sessionIdFor(opts.id);
1003
+ return conn.spawn("pipe", new RemotePipe(sid, conn, 0), { ...opts, id: sid });
1004
+ }
1005
+ var ADOPT_KEY = /* @__PURE__ */ Symbol.for("cockpit_pty_host_adopted");
1006
+ function ensurePtyHostConnected() {
1007
+ const g2 = globalThis;
1008
+ return g2[ADOPT_KEY] ??= getConnection(false).then(
1009
+ () => void 0,
1010
+ () => void 0
1011
+ );
1012
+ }
1013
+
1014
+ // packages/feature/console/src/server/terminal/RunningCommandRegistry.ts
435
1015
  var MAX_OUTPUT_LINES = 5e3;
1016
+ var MAX_OUTPUT_PARTIAL = 64 * 1024;
436
1017
  var OUTPUT_FILE_THRESHOLD2 = 4096;
437
1018
  var PTY_RING_BUFFER_MAX = 2 * 1024 * 1024;
438
1019
  function countNewlines(s) {
@@ -450,6 +1031,8 @@ var PtyRingBuffer = class {
450
1031
  this._totalLinesEverWritten = 0;
451
1032
  /** Global line number of the first complete line currently in the ring. */
452
1033
  this._firstAvailableLine = 0;
1034
+ /** Whether the head was ever cut, i.e. may start mid escape sequence. */
1035
+ this._trimmed = false;
453
1036
  this.max = max;
454
1037
  }
455
1038
  append(data) {
@@ -458,6 +1041,7 @@ var PtyRingBuffer = class {
458
1041
  this.totalLen += data.length;
459
1042
  this._totalLinesEverWritten += countNewlines(data);
460
1043
  while (this.totalLen > this.max && this.chunks.length > 0) {
1044
+ this._trimmed = true;
461
1045
  const overflow = this.totalLen - this.max;
462
1046
  const oldest = this.chunks[0];
463
1047
  if (oldest.length <= overflow) {
@@ -486,6 +1070,9 @@ var PtyRingBuffer = class {
486
1070
  get firstAvailableLine() {
487
1071
  return this._firstAvailableLine;
488
1072
  }
1073
+ get trimmed() {
1074
+ return this._trimmed;
1075
+ }
489
1076
  };
490
1077
  function findSafeStart(s) {
491
1078
  const lf = s.indexOf("\n");
@@ -514,6 +1101,11 @@ function getRegistry2() {
514
1101
  }
515
1102
  function registerCommand(cmd) {
516
1103
  console.log(`[registry] register: id=${cmd.commandId}, cmd="${cmd.command}", pid=${cmd.pid}, pty=${!!cmd.ptyProcess}, server=${getServerId()}`);
1104
+ trackCommand(cmd);
1105
+ writeHistoryPlaceholder(cmd.commandId, cmd.command, cmd.timestamp, cmd.cwd, cmd.projectCwd, cmd.tabId, !!cmd.usePty, cmd.sourceId).catch(() => {
1106
+ });
1107
+ }
1108
+ function trackCommand(cmd, seedOutput) {
517
1109
  const entry = {
518
1110
  ...cmd,
519
1111
  outputLines: [],
@@ -522,10 +1114,13 @@ function registerCommand(cmd) {
522
1114
  // Only PTY commands get a ring buffer — pipe mode replay still uses outputLines.
523
1115
  ...cmd.ptyProcess ? { ptyRingBuffer: new PtyRingBuffer() } : {}
524
1116
  };
1117
+ if (seedOutput && entry.ptyRingBuffer) {
1118
+ entry.ptyRingBuffer.append(seedOutput);
1119
+ entry.totalLinesEverWritten = entry.ptyRingBuffer.totalLinesEverWritten;
1120
+ }
525
1121
  getRegistry2().set(cmd.commandId, entry);
526
1122
  registerTerminal(cmd.tabId, cmd.commandId, cmd.command, cmd.projectCwd);
527
- writeHistoryPlaceholder(cmd.commandId, cmd.command, cmd.timestamp, cmd.cwd, cmd.projectCwd, cmd.tabId, !!cmd.usePty, cmd.sourceId).catch(() => {
528
- });
1123
+ broadcastRunningChanged();
529
1124
  if (cmd.ptyProcess) {
530
1125
  const pty = cmd.ptyProcess;
531
1126
  pty.onData((data) => {
@@ -570,12 +1165,49 @@ function registerCommand(cmd) {
570
1165
  });
571
1166
  }
572
1167
  }
1168
+ async function adoptHostSessions(sessions) {
1169
+ const finishing = [];
1170
+ for (const session of [...sessions].reverse()) {
1171
+ const { meta, output, exitCode } = session;
1172
+ const pid = session.handle.pid ?? 0;
1173
+ if (!meta || getRegistry2().has(meta.commandId)) {
1174
+ if (session.kind === "pty") session.handle.onExit(() => {
1175
+ });
1176
+ else session.handle.on("close", () => {
1177
+ });
1178
+ continue;
1179
+ }
1180
+ console.log(`[registry] adopt: id=${meta.commandId}, kind=${session.kind}, cmd="${meta.command}", pid=${pid}, server=${getServerId()}`);
1181
+ if (session.kind === "pty") {
1182
+ trackCommand({ ...meta, pid, ptyProcess: session.handle, usePty: true }, output);
1183
+ } else {
1184
+ trackCommand({ ...meta, pid, process: session.handle });
1185
+ if (output) appendCommandOutput(meta.commandId, output);
1186
+ }
1187
+ if (exitCode !== void 0) finishing.push(finalizeCommand(meta.commandId, exitCode, pid));
1188
+ }
1189
+ await Promise.all(finishing);
1190
+ }
1191
+ setPtyHostAdoptHandler(adoptHostSessions);
1192
+ function adoptPtyHostSessions() {
1193
+ return ensurePtyHostConnected();
1194
+ }
1195
+ async function sweepOrphanTerminalOutputs() {
1196
+ await ensurePtyHostConnected();
1197
+ const { removed, bytes } = await sweepOrphanOutputs();
1198
+ if (removed > 0) {
1199
+ console.log(`[registry] removed ${removed} orphaned terminal output file(s), ${(bytes / 1e6).toFixed(1)} MB`);
1200
+ }
1201
+ }
573
1202
  function appendCommandOutput(commandId, data) {
574
1203
  const cmd = getRegistry2().get(commandId);
575
1204
  if (!cmd) return;
576
1205
  const text = cmd.outputPartial + data;
577
1206
  const parts = text.split("\n");
578
1207
  cmd.outputPartial = parts.pop() || "";
1208
+ if (cmd.outputPartial.length > MAX_OUTPUT_PARTIAL) {
1209
+ cmd.outputPartial = cmd.outputPartial.slice(-MAX_OUTPUT_PARTIAL);
1210
+ }
579
1211
  if (parts.length > 0) {
580
1212
  cmd.outputLines.push(...parts);
581
1213
  cmd.totalLinesEverWritten += parts.length;
@@ -594,6 +1226,10 @@ function getFirstAvailableLine(cmd) {
594
1226
  return cmd.totalLinesEverWritten - cmd.outputLines.length;
595
1227
  }
596
1228
  function getBufferedOutput(cmd) {
1229
+ if (cmd.ptyRingBuffer) {
1230
+ const snap = cmd.ptyRingBuffer.snapshot();
1231
+ return cmd.ptyRingBuffer.trimmed ? snap.slice(findSafeStart(snap)) : snap;
1232
+ }
597
1233
  const lines = cmd.outputLines.join("\n");
598
1234
  if (cmd.outputPartial) {
599
1235
  return lines ? lines + "\n" + cmd.outputPartial : cmd.outputPartial;
@@ -664,9 +1300,7 @@ async function writeHistoryPlaceholder(commandId, command, timestamp, cwd, proje
664
1300
  const removedLines = existingLines.slice(0, existingLines.length - 99);
665
1301
  for (const line of removedLines) {
666
1302
  try {
667
- const old = JSON.parse(line);
668
- if (old.outputFile) await fs2.unlink(old.outputFile).catch(() => {
669
- });
1303
+ await removeEntryOutput(projectCwd, JSON.parse(line));
670
1304
  } catch {
671
1305
  }
672
1306
  }
@@ -693,11 +1327,13 @@ async function finalizeCommand(commandId, exitCode, pid) {
693
1327
  if (cmd.deleted) {
694
1328
  cmd.ptyRingBuffer = void 0;
695
1329
  registry2.delete(commandId);
1330
+ broadcastRunningChanged();
696
1331
  return;
697
1332
  }
698
1333
  const output = getBufferedOutput(cmd);
699
1334
  cmd.ptyRingBuffer = void 0;
700
1335
  registry2.delete(commandId);
1336
+ broadcastRunningChanged();
701
1337
  const entry = {
702
1338
  id: cmd.commandId,
703
1339
  command: cmd.command,
@@ -715,6 +1351,8 @@ async function finalizeCommand(commandId, exitCode, pid) {
715
1351
  entry.outputFile = outputPath;
716
1352
  } else {
717
1353
  entry.output = output;
1354
+ await fs2.unlink(getTerminalOutputPath(cmd.projectCwd, cmd.commandId)).catch(() => {
1355
+ });
718
1356
  }
719
1357
  let existingLines = [];
720
1358
  try {
@@ -1112,6 +1750,9 @@ function mergeTitles(base, patch) {
1112
1750
  }
1113
1751
 
1114
1752
  export {
1753
+ isWindows,
1754
+ getDefaultShell,
1755
+ getDefaultPath,
1115
1756
  registerBrowser,
1116
1757
  unregisterBrowser,
1117
1758
  getBrowserByShortId,
@@ -1131,8 +1772,13 @@ export {
1131
1772
  listTerminals,
1132
1773
  addOutputListener,
1133
1774
  addExitListener,
1775
+ interruptPidTree,
1776
+ spawnPtyInHost,
1777
+ spawnPipeInHost,
1134
1778
  findSafeStart,
1135
1779
  registerCommand,
1780
+ adoptPtyHostSessions,
1781
+ sweepOrphanTerminalOutputs,
1136
1782
  getFirstAvailableLine,
1137
1783
  getRunningCommands,
1138
1784
  getRunningCommand,