@alexjbarnes/cockpit 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (760) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +11 -3
  3. package/.next/build-manifest.json +4 -4
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +21 -45
  6. package/.next/react-loadable-manifest.json +279 -267
  7. package/.next/routes-manifest.json +68 -12
  8. package/.next/server/app/(app)/agents/[name]/page.js +3 -3
  9. package/.next/server/app/(app)/agents/[name]/page.js.nft.json +1 -1
  10. package/.next/server/app/(app)/agents/[name]/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/(app)/agents/page.js +2 -2
  12. package/.next/server/app/(app)/agents/page.js.nft.json +1 -1
  13. package/.next/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/(app)/claude-md/edit/page.js +2 -2
  15. package/.next/server/app/(app)/claude-md/edit/page.js.nft.json +1 -1
  16. package/.next/server/app/(app)/claude-md/edit/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/(app)/claude-md/page.js +2 -2
  18. package/.next/server/app/(app)/claude-md/page.js.nft.json +1 -1
  19. package/.next/server/app/(app)/claude-md/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/(app)/commands/[name]/page.js +3 -3
  21. package/.next/server/app/(app)/commands/[name]/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/commands/[name]/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/commands/page.js +2 -2
  24. package/.next/server/app/(app)/commands/page.js.nft.json +1 -1
  25. package/.next/server/app/(app)/commands/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/(app)/hooks/[event]/page.js +3 -3
  27. package/.next/server/app/(app)/hooks/[event]/page.js.nft.json +1 -1
  28. package/.next/server/app/(app)/hooks/[event]/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/(app)/hooks/page.js +2 -2
  30. package/.next/server/app/(app)/hooks/page.js.nft.json +1 -1
  31. package/.next/server/app/(app)/hooks/page_client-reference-manifest.js +1 -1
  32. package/.next/server/app/(app)/inbox/[id]/page.js +2 -2
  33. package/.next/server/app/(app)/inbox/[id]/page.js.nft.json +1 -1
  34. package/.next/server/app/(app)/inbox/[id]/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/(app)/inbox/page.js +2 -2
  36. package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
  37. package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/(app)/jobs/[id]/edit/page.js +2 -2
  39. package/.next/server/app/(app)/jobs/[id]/edit/page.js.nft.json +1 -1
  40. package/.next/server/app/(app)/jobs/[id]/edit/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/(app)/jobs/[id]/page.js +2 -2
  42. package/.next/server/app/(app)/jobs/[id]/page.js.nft.json +1 -1
  43. package/.next/server/app/(app)/jobs/[id]/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js +2 -2
  45. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js.nft.json +1 -1
  46. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/(app)/jobs/page.js +2 -2
  48. package/.next/server/app/(app)/jobs/page.js.nft.json +1 -1
  49. package/.next/server/app/(app)/jobs/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/(app)/mcp-servers/[name]/page.js +2 -2
  51. package/.next/server/app/(app)/mcp-servers/[name]/page.js.nft.json +1 -1
  52. package/.next/server/app/(app)/mcp-servers/[name]/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/(app)/mcp-servers/page.js +2 -2
  54. package/.next/server/app/(app)/mcp-servers/page.js.nft.json +1 -1
  55. package/.next/server/app/(app)/mcp-servers/page_client-reference-manifest.js +1 -1
  56. package/.next/server/app/(app)/page.js +2 -2
  57. package/.next/server/app/(app)/page.js.nft.json +1 -1
  58. package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/(app)/plugins/page.js +2 -0
  60. package/.next/server/app/(app)/{files → plugins}/page.js.nft.json +1 -1
  61. package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -0
  62. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js +4 -4
  63. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js.nft.json +1 -1
  64. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page_client-reference-manifest.js +1 -1
  65. package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js +2 -2
  66. package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js.nft.json +1 -1
  67. package/.next/server/app/(app)/reviews/[owner]/[repo]/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/(app)/reviews/page.js +2 -2
  69. package/.next/server/app/(app)/reviews/page.js.nft.json +1 -1
  70. package/.next/server/app/(app)/reviews/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/(app)/sessions/[id]/page.js +2 -2
  72. package/.next/server/app/(app)/sessions/[id]/page.js.nft.json +1 -1
  73. package/.next/server/app/(app)/sessions/[id]/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/(app)/settings/appearance/page.js +2 -2
  75. package/.next/server/app/(app)/settings/appearance/page.js.nft.json +1 -1
  76. package/.next/server/app/(app)/settings/appearance/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/(app)/settings/notifications/page.js +2 -2
  78. package/.next/server/app/(app)/settings/notifications/page.js.nft.json +1 -1
  79. package/.next/server/app/(app)/settings/notifications/page_client-reference-manifest.js +1 -1
  80. package/.next/server/app/(app)/settings/page.js +2 -2
  81. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  82. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/(app)/settings/providers/[id]/page.js +2 -2
  84. package/.next/server/app/(app)/settings/providers/[id]/page.js.nft.json +1 -1
  85. package/.next/server/app/(app)/settings/providers/[id]/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/(app)/settings/providers/new/page.js +2 -2
  87. package/.next/server/app/(app)/settings/providers/new/page.js.nft.json +1 -1
  88. package/.next/server/app/(app)/settings/providers/new/page_client-reference-manifest.js +1 -1
  89. package/.next/server/app/(app)/settings/providers/page.js +2 -2
  90. package/.next/server/app/(app)/settings/providers/page.js.nft.json +1 -1
  91. package/.next/server/app/(app)/settings/providers/page_client-reference-manifest.js +1 -1
  92. package/.next/server/app/(app)/settings/session/page.js +2 -2
  93. package/.next/server/app/(app)/settings/session/page.js.nft.json +1 -1
  94. package/.next/server/app/(app)/settings/session/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app/(app)/skills/[name]/page.js +3 -3
  96. package/.next/server/app/(app)/skills/[name]/page.js.nft.json +1 -1
  97. package/.next/server/app/(app)/skills/[name]/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/(app)/skills/page.js +2 -2
  99. package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
  100. package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
  101. package/.next/server/app/_global-error/page.js +3 -3
  102. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  103. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app/_global-error.html +1 -1
  105. package/.next/server/app/_global-error.rsc +1 -1
  106. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  107. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  108. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  109. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  110. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  111. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  112. package/.next/server/app/_not-found/page.js +2 -2
  113. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  114. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  115. package/.next/server/app/_not-found.html +1 -1
  116. package/.next/server/app/_not-found.rsc +2 -2
  117. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  118. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  119. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  120. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  121. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  122. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  123. package/.next/server/app/agents.html +1 -1
  124. package/.next/server/app/agents.rsc +4 -4
  125. package/.next/server/app/agents.segments/!KGFwcCk/agents/__PAGE__.segment.rsc +2 -2
  126. package/.next/server/app/agents.segments/!KGFwcCk/agents.segment.rsc +1 -1
  127. package/.next/server/app/agents.segments/!KGFwcCk.segment.rsc +2 -2
  128. package/.next/server/app/agents.segments/_full.segment.rsc +4 -4
  129. package/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  130. package/.next/server/app/agents.segments/_index.segment.rsc +2 -2
  131. package/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  132. package/.next/server/app/api/agents/[name]/route.js +1 -1
  133. package/.next/server/app/api/agents/route.js +1 -1
  134. package/.next/server/app/api/assistant-session/route.js +1 -0
  135. package/.next/server/app/api/assistant-session/route.js.nft.json +1 -0
  136. package/.next/server/app/api/assistant-session/route_client-reference-manifest.js +1 -0
  137. package/.next/server/app/api/auth/check/route.js +1 -1
  138. package/.next/server/app/api/auth/login/route.js +1 -1
  139. package/.next/server/app/api/auth/setup/route.js +1 -1
  140. package/.next/server/app/api/auth/ws-token/route.js +1 -1
  141. package/.next/server/app/api/btw/route.js +2 -2
  142. package/.next/server/app/api/claude-md/route.js +1 -1
  143. package/.next/server/app/api/commands/[name]/route.js +1 -1
  144. package/.next/server/app/api/commands/route.js +1 -1
  145. package/.next/server/app/api/config/cwd/route.js +1 -0
  146. package/.next/server/app/api/config/cwd/route.js.nft.json +1 -0
  147. package/.next/server/app/api/config/cwd/route_client-reference-manifest.js +1 -0
  148. package/.next/server/app/api/defaults/route.js +1 -1
  149. package/.next/server/app/api/filesystem/browse/route.js +1 -1
  150. package/.next/server/app/api/filesystem/files/route.js +1 -1
  151. package/.next/server/app/api/filesystem/mkdir/route.js +1 -1
  152. package/.next/server/app/api/filesystem/read/route.js +1 -1
  153. package/.next/server/app/api/git/clone/route.js +1 -1
  154. package/.next/server/app/api/git/commit/route.js +1 -1
  155. package/.next/server/app/api/git/diff/route.js +1 -1
  156. package/.next/server/app/api/git/discard/route.js +1 -1
  157. package/.next/server/app/api/git/generate-message/route.js +2 -2
  158. package/.next/server/app/api/git/push/route.js +1 -1
  159. package/.next/server/app/api/git/status/route.js +1 -1
  160. package/.next/server/app/api/github/file-content/route.js +1 -1
  161. package/.next/server/app/api/github/orgs/route.js +1 -1
  162. package/.next/server/app/api/github/prs/checks/route.js +1 -1
  163. package/.next/server/app/api/github/prs/diff/route.js +1 -1
  164. package/.next/server/app/api/github/prs/review/route.js +1 -1
  165. package/.next/server/app/api/github/prs/route.js +1 -1
  166. package/.next/server/app/api/github/prs/view/route.js +1 -1
  167. package/.next/server/app/api/github/repos/route.js +1 -1
  168. package/.next/server/app/api/github/review-session/route.js +1 -1
  169. package/.next/server/app/api/github/review-session/route.js.nft.json +1 -1
  170. package/.next/server/app/api/health/route.js +1 -1
  171. package/.next/server/app/api/hooks/route.js +1 -1
  172. package/.next/server/app/api/inbox/[id]/route.js +1 -5
  173. package/.next/server/app/api/inbox/[id]/route.js.nft.json +1 -1
  174. package/.next/server/app/api/inbox/route.js +1 -5
  175. package/.next/server/app/api/inbox/route.js.nft.json +1 -1
  176. package/.next/server/app/api/jobs/[id]/route.js +1 -1
  177. package/.next/server/app/api/jobs/[id]/route.js.nft.json +1 -1
  178. package/.next/server/app/api/jobs/[id]/runs/[runId]/route.js +1 -1
  179. package/.next/server/app/api/jobs/[id]/runs/[runId]/transcript/route.js +1 -1
  180. package/.next/server/app/api/jobs/[id]/runs/[runId]/transcript/route.js.nft.json +1 -1
  181. package/.next/server/app/api/jobs/[id]/runs/route.js +1 -1
  182. package/.next/server/app/api/jobs/[id]/stop/route.js +1 -0
  183. package/.next/server/app/api/jobs/[id]/stop/route.js.nft.json +1 -0
  184. package/.next/server/app/api/jobs/[id]/stop/route_client-reference-manifest.js +1 -0
  185. package/.next/server/app/api/jobs/[id]/trigger/route.js +1 -1
  186. package/.next/server/app/api/jobs/[id]/trigger/route.js.nft.json +1 -1
  187. package/.next/server/app/api/jobs/mcp-discover/route.js +1 -1
  188. package/.next/server/app/api/jobs/mcp-discover/route.js.nft.json +1 -1
  189. package/.next/server/app/api/jobs/route.js +1 -1
  190. package/.next/server/app/api/jobs/route.js.nft.json +1 -1
  191. package/.next/server/app/api/jobs/status/route.js +1 -1
  192. package/.next/server/app/api/mcp-servers/[name]/route.js +1 -1
  193. package/.next/server/app/api/mcp-servers/[name]/test/route.js +1 -1
  194. package/.next/server/app/api/mcp-servers/[name]/tools/route.js +1 -0
  195. package/.next/server/app/api/mcp-servers/[name]/tools/route.js.nft.json +1 -0
  196. package/.next/server/app/api/mcp-servers/[name]/tools/route_client-reference-manifest.js +1 -0
  197. package/.next/server/app/api/mcp-servers/route.js +1 -1
  198. package/.next/server/app/api/notifications/route.js +1 -1
  199. package/.next/server/app/api/notifications/test/route.js +3 -3
  200. package/.next/server/app/api/plugins/[id]/route.js +1 -0
  201. package/.next/server/app/api/plugins/[id]/route.js.nft.json +1 -0
  202. package/.next/server/app/api/plugins/[id]/route_client-reference-manifest.js +1 -0
  203. package/.next/server/app/api/plugins/install/route.js +1 -0
  204. package/.next/server/app/api/plugins/install/route.js.nft.json +1 -0
  205. package/.next/server/app/api/plugins/install/route_client-reference-manifest.js +1 -0
  206. package/.next/server/app/api/plugins/marketplaces/[name]/route.js +1 -0
  207. package/.next/server/app/api/plugins/marketplaces/[name]/route.js.nft.json +1 -0
  208. package/.next/server/app/api/plugins/marketplaces/[name]/route_client-reference-manifest.js +1 -0
  209. package/.next/server/app/api/plugins/marketplaces/route.js +1 -0
  210. package/.next/server/app/api/plugins/marketplaces/route.js.nft.json +1 -0
  211. package/.next/server/app/api/plugins/marketplaces/route_client-reference-manifest.js +1 -0
  212. package/.next/server/app/api/plugins/route.js +1 -0
  213. package/.next/server/app/api/plugins/route.js.nft.json +1 -0
  214. package/.next/server/app/api/plugins/route_client-reference-manifest.js +1 -0
  215. package/.next/server/app/api/providers/[id]/route.js +1 -1
  216. package/.next/server/app/api/providers/route.js +1 -1
  217. package/.next/server/app/api/reviews/pinned/route.js +1 -1
  218. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  219. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
  220. package/.next/server/app/api/sessions/[id]/mcp/route.js +1 -1
  221. package/.next/server/app/api/sessions/[id]/mcp/route.js.nft.json +1 -1
  222. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  223. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  224. package/.next/server/app/api/sessions/[id]/search/route.js +1 -1
  225. package/.next/server/app/api/sessions/[id]/search/route.js.nft.json +1 -1
  226. package/.next/server/app/api/sessions/[id]/tabs/route.js +1 -1
  227. package/.next/server/app/api/sessions/bulk-delete/route.js +1 -1
  228. package/.next/server/app/api/sessions/bulk-delete/route.js.nft.json +1 -1
  229. package/.next/server/app/api/sessions/by-ids/route.js +1 -1
  230. package/.next/server/app/api/sessions/by-ids/route.js.nft.json +1 -1
  231. package/.next/server/app/api/sessions/group/route.js +1 -1
  232. package/.next/server/app/api/sessions/group/route.js.nft.json +1 -1
  233. package/.next/server/app/api/sessions/pinned/route.js +1 -1
  234. package/.next/server/app/api/sessions/route.js +1 -1
  235. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  236. package/.next/server/app/api/sessions/search/route.js +1 -1
  237. package/.next/server/app/api/sessions/search/route.js.nft.json +1 -1
  238. package/.next/server/app/api/sessions/thinking/route.js +1 -1
  239. package/.next/server/app/api/sessions/thinking/route.js.nft.json +1 -1
  240. package/.next/server/app/api/skills/[name]/route.js +1 -1
  241. package/.next/server/app/api/skills/route.js +1 -1
  242. package/.next/server/app/api/terminal/[id]/route.js +1 -1
  243. package/.next/server/app/api/terminal/[id]/route.js.nft.json +1 -1
  244. package/.next/server/app/api/terminal/route.js +1 -1
  245. package/.next/server/app/api/terminal/route.js.nft.json +1 -1
  246. package/.next/server/app/api/usage/route.js +1 -1
  247. package/.next/server/app/api/version/changelog/route.js +1 -1
  248. package/.next/server/app/api/version/cockpit/changelog/route.js +1 -1
  249. package/.next/server/app/api/version/cockpit/route.js +1 -1
  250. package/.next/server/app/api/version/route.js +2 -2
  251. package/.next/server/app/claude-md/edit.html +1 -1
  252. package/.next/server/app/claude-md/edit.rsc +4 -4
  253. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit/__PAGE__.segment.rsc +2 -2
  254. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit.segment.rsc +1 -1
  255. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
  256. package/.next/server/app/claude-md/edit.segments/!KGFwcCk.segment.rsc +2 -2
  257. package/.next/server/app/claude-md/edit.segments/_full.segment.rsc +4 -4
  258. package/.next/server/app/claude-md/edit.segments/_head.segment.rsc +1 -1
  259. package/.next/server/app/claude-md/edit.segments/_index.segment.rsc +2 -2
  260. package/.next/server/app/claude-md/edit.segments/_tree.segment.rsc +2 -2
  261. package/.next/server/app/claude-md.html +1 -1
  262. package/.next/server/app/claude-md.rsc +4 -4
  263. package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md/__PAGE__.segment.rsc +2 -2
  264. package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
  265. package/.next/server/app/claude-md.segments/!KGFwcCk.segment.rsc +2 -2
  266. package/.next/server/app/claude-md.segments/_full.segment.rsc +4 -4
  267. package/.next/server/app/claude-md.segments/_head.segment.rsc +1 -1
  268. package/.next/server/app/claude-md.segments/_index.segment.rsc +2 -2
  269. package/.next/server/app/claude-md.segments/_tree.segment.rsc +2 -2
  270. package/.next/server/app/commands.html +1 -1
  271. package/.next/server/app/commands.rsc +4 -4
  272. package/.next/server/app/commands.segments/!KGFwcCk/commands/__PAGE__.segment.rsc +2 -2
  273. package/.next/server/app/commands.segments/!KGFwcCk/commands.segment.rsc +1 -1
  274. package/.next/server/app/commands.segments/!KGFwcCk.segment.rsc +2 -2
  275. package/.next/server/app/commands.segments/_full.segment.rsc +4 -4
  276. package/.next/server/app/commands.segments/_head.segment.rsc +1 -1
  277. package/.next/server/app/commands.segments/_index.segment.rsc +2 -2
  278. package/.next/server/app/commands.segments/_tree.segment.rsc +2 -2
  279. package/.next/server/app/hooks.html +1 -1
  280. package/.next/server/app/hooks.rsc +4 -4
  281. package/.next/server/app/hooks.segments/!KGFwcCk/hooks/__PAGE__.segment.rsc +2 -2
  282. package/.next/server/app/hooks.segments/!KGFwcCk/hooks.segment.rsc +1 -1
  283. package/.next/server/app/hooks.segments/!KGFwcCk.segment.rsc +2 -2
  284. package/.next/server/app/hooks.segments/_full.segment.rsc +4 -4
  285. package/.next/server/app/hooks.segments/_head.segment.rsc +1 -1
  286. package/.next/server/app/hooks.segments/_index.segment.rsc +2 -2
  287. package/.next/server/app/hooks.segments/_tree.segment.rsc +2 -2
  288. package/.next/server/app/inbox.html +1 -1
  289. package/.next/server/app/inbox.rsc +4 -4
  290. package/.next/server/app/inbox.segments/!KGFwcCk/inbox/__PAGE__.segment.rsc +2 -2
  291. package/.next/server/app/inbox.segments/!KGFwcCk/inbox.segment.rsc +1 -1
  292. package/.next/server/app/inbox.segments/!KGFwcCk.segment.rsc +2 -2
  293. package/.next/server/app/inbox.segments/_full.segment.rsc +4 -4
  294. package/.next/server/app/inbox.segments/_head.segment.rsc +1 -1
  295. package/.next/server/app/inbox.segments/_index.segment.rsc +2 -2
  296. package/.next/server/app/inbox.segments/_tree.segment.rsc +2 -2
  297. package/.next/server/app/index.html +1 -1
  298. package/.next/server/app/index.rsc +4 -4
  299. package/.next/server/app/index.segments/!KGFwcCk/__PAGE__.segment.rsc +2 -2
  300. package/.next/server/app/index.segments/!KGFwcCk.segment.rsc +2 -2
  301. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  302. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  303. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  304. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  305. package/.next/server/app/jobs.html +1 -1
  306. package/.next/server/app/jobs.rsc +4 -4
  307. package/.next/server/app/jobs.segments/!KGFwcCk/jobs/__PAGE__.segment.rsc +2 -2
  308. package/.next/server/app/jobs.segments/!KGFwcCk/jobs.segment.rsc +1 -1
  309. package/.next/server/app/jobs.segments/!KGFwcCk.segment.rsc +2 -2
  310. package/.next/server/app/jobs.segments/_full.segment.rsc +4 -4
  311. package/.next/server/app/jobs.segments/_head.segment.rsc +1 -1
  312. package/.next/server/app/jobs.segments/_index.segment.rsc +2 -2
  313. package/.next/server/app/jobs.segments/_tree.segment.rsc +2 -2
  314. package/.next/server/app/login/page.js +2 -2
  315. package/.next/server/app/login/page.js.nft.json +1 -1
  316. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  317. package/.next/server/app/login.html +1 -1
  318. package/.next/server/app/login.rsc +3 -3
  319. package/.next/server/app/login.segments/_full.segment.rsc +3 -3
  320. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  321. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  322. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  323. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  324. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  325. package/.next/server/app/mcp-servers.html +1 -1
  326. package/.next/server/app/mcp-servers.rsc +4 -4
  327. package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers/__PAGE__.segment.rsc +2 -2
  328. package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers.segment.rsc +1 -1
  329. package/.next/server/app/mcp-servers.segments/!KGFwcCk.segment.rsc +2 -2
  330. package/.next/server/app/mcp-servers.segments/_full.segment.rsc +4 -4
  331. package/.next/server/app/mcp-servers.segments/_head.segment.rsc +1 -1
  332. package/.next/server/app/mcp-servers.segments/_index.segment.rsc +2 -2
  333. package/.next/server/app/mcp-servers.segments/_tree.segment.rsc +2 -2
  334. package/.next/server/app/plugins.html +1 -0
  335. package/.next/server/app/{changes.meta → plugins.meta} +3 -3
  336. package/.next/server/app/{changes.rsc → plugins.rsc} +4 -4
  337. package/.next/server/app/{files.segments/!KGFwcCk/files → plugins.segments/!KGFwcCk/plugins}/__PAGE__.segment.rsc +2 -2
  338. package/.next/server/app/{changes.segments/!KGFwcCk/changes.segment.rsc → plugins.segments/!KGFwcCk/plugins.segment.rsc} +1 -1
  339. package/.next/server/app/{changes.segments → plugins.segments}/!KGFwcCk.segment.rsc +2 -2
  340. package/.next/server/app/{changes.segments → plugins.segments}/_full.segment.rsc +4 -4
  341. package/.next/server/app/{changes.segments → plugins.segments}/_head.segment.rsc +1 -1
  342. package/.next/server/app/{files.segments → plugins.segments}/_index.segment.rsc +2 -2
  343. package/.next/server/app/{changes.segments → plugins.segments}/_tree.segment.rsc +2 -2
  344. package/.next/server/app/reviews.html +1 -1
  345. package/.next/server/app/reviews.rsc +4 -4
  346. package/.next/server/app/reviews.segments/!KGFwcCk/reviews/__PAGE__.segment.rsc +2 -2
  347. package/.next/server/app/reviews.segments/!KGFwcCk/reviews.segment.rsc +1 -1
  348. package/.next/server/app/reviews.segments/!KGFwcCk.segment.rsc +2 -2
  349. package/.next/server/app/reviews.segments/_full.segment.rsc +4 -4
  350. package/.next/server/app/reviews.segments/_head.segment.rsc +1 -1
  351. package/.next/server/app/reviews.segments/_index.segment.rsc +2 -2
  352. package/.next/server/app/reviews.segments/_tree.segment.rsc +2 -2
  353. package/.next/server/app/settings/appearance.html +1 -1
  354. package/.next/server/app/settings/appearance.rsc +4 -4
  355. package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings/appearance/__PAGE__.segment.rsc +2 -2
  356. package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings/appearance.segment.rsc +1 -1
  357. package/.next/server/app/settings/appearance.segments/!KGFwcCk/settings.segment.rsc +1 -1
  358. package/.next/server/app/settings/appearance.segments/!KGFwcCk.segment.rsc +2 -2
  359. package/.next/server/app/settings/appearance.segments/_full.segment.rsc +4 -4
  360. package/.next/server/app/settings/appearance.segments/_head.segment.rsc +1 -1
  361. package/.next/server/app/settings/appearance.segments/_index.segment.rsc +2 -2
  362. package/.next/server/app/settings/appearance.segments/_tree.segment.rsc +2 -2
  363. package/.next/server/app/settings/notifications.html +1 -1
  364. package/.next/server/app/settings/notifications.rsc +4 -4
  365. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications/__PAGE__.segment.rsc +2 -2
  366. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications.segment.rsc +1 -1
  367. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings.segment.rsc +1 -1
  368. package/.next/server/app/settings/notifications.segments/!KGFwcCk.segment.rsc +2 -2
  369. package/.next/server/app/settings/notifications.segments/_full.segment.rsc +4 -4
  370. package/.next/server/app/settings/notifications.segments/_head.segment.rsc +1 -1
  371. package/.next/server/app/settings/notifications.segments/_index.segment.rsc +2 -2
  372. package/.next/server/app/settings/notifications.segments/_tree.segment.rsc +2 -2
  373. package/.next/server/app/settings/providers/new.html +1 -1
  374. package/.next/server/app/settings/providers/new.rsc +4 -4
  375. package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers/new/__PAGE__.segment.rsc +2 -2
  376. package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers/new.segment.rsc +1 -1
  377. package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings/providers.segment.rsc +1 -1
  378. package/.next/server/app/settings/providers/new.segments/!KGFwcCk/settings.segment.rsc +1 -1
  379. package/.next/server/app/settings/providers/new.segments/!KGFwcCk.segment.rsc +2 -2
  380. package/.next/server/app/settings/providers/new.segments/_full.segment.rsc +4 -4
  381. package/.next/server/app/settings/providers/new.segments/_head.segment.rsc +1 -1
  382. package/.next/server/app/settings/providers/new.segments/_index.segment.rsc +2 -2
  383. package/.next/server/app/settings/providers/new.segments/_tree.segment.rsc +2 -2
  384. package/.next/server/app/settings/providers.html +1 -1
  385. package/.next/server/app/settings/providers.rsc +4 -4
  386. package/.next/server/app/settings/providers.segments/!KGFwcCk/settings/providers/__PAGE__.segment.rsc +2 -2
  387. package/.next/server/app/settings/providers.segments/!KGFwcCk/settings/providers.segment.rsc +1 -1
  388. package/.next/server/app/settings/providers.segments/!KGFwcCk/settings.segment.rsc +1 -1
  389. package/.next/server/app/settings/providers.segments/!KGFwcCk.segment.rsc +2 -2
  390. package/.next/server/app/settings/providers.segments/_full.segment.rsc +4 -4
  391. package/.next/server/app/settings/providers.segments/_head.segment.rsc +1 -1
  392. package/.next/server/app/settings/providers.segments/_index.segment.rsc +2 -2
  393. package/.next/server/app/settings/providers.segments/_tree.segment.rsc +2 -2
  394. package/.next/server/app/settings/session.html +1 -1
  395. package/.next/server/app/settings/session.rsc +4 -4
  396. package/.next/server/app/settings/session.segments/!KGFwcCk/settings/session/__PAGE__.segment.rsc +2 -2
  397. package/.next/server/app/settings/session.segments/!KGFwcCk/settings/session.segment.rsc +1 -1
  398. package/.next/server/app/settings/session.segments/!KGFwcCk/settings.segment.rsc +1 -1
  399. package/.next/server/app/settings/session.segments/!KGFwcCk.segment.rsc +2 -2
  400. package/.next/server/app/settings/session.segments/_full.segment.rsc +4 -4
  401. package/.next/server/app/settings/session.segments/_head.segment.rsc +1 -1
  402. package/.next/server/app/settings/session.segments/_index.segment.rsc +2 -2
  403. package/.next/server/app/settings/session.segments/_tree.segment.rsc +2 -2
  404. package/.next/server/app/settings.html +1 -1
  405. package/.next/server/app/settings.rsc +4 -4
  406. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +2 -2
  407. package/.next/server/app/settings.segments/!KGFwcCk/settings.segment.rsc +1 -1
  408. package/.next/server/app/settings.segments/!KGFwcCk.segment.rsc +2 -2
  409. package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
  410. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  411. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  412. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  413. package/.next/server/app/skills.html +1 -1
  414. package/.next/server/app/skills.rsc +4 -4
  415. package/.next/server/app/skills.segments/!KGFwcCk/skills/__PAGE__.segment.rsc +2 -2
  416. package/.next/server/app/skills.segments/!KGFwcCk/skills.segment.rsc +1 -1
  417. package/.next/server/app/skills.segments/!KGFwcCk.segment.rsc +2 -2
  418. package/.next/server/app/skills.segments/_full.segment.rsc +4 -4
  419. package/.next/server/app/skills.segments/_head.segment.rsc +1 -1
  420. package/.next/server/app/skills.segments/_index.segment.rsc +2 -2
  421. package/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  422. package/.next/server/app-paths-manifest.json +11 -3
  423. package/.next/server/chunks/1011.js +1 -1
  424. package/.next/server/chunks/1327.js +1 -1
  425. package/.next/server/chunks/1979.js +7 -2
  426. package/.next/server/chunks/2666.js +1 -0
  427. package/.next/server/chunks/3136.js +11 -0
  428. package/.next/server/chunks/319.js +45 -0
  429. package/.next/server/chunks/3445.js +2 -2
  430. package/.next/server/chunks/3764.js +1 -1
  431. package/.next/server/chunks/4053.js +4971 -0
  432. package/.next/server/chunks/5292.js +201 -0
  433. package/.next/server/chunks/5318.js +1 -1
  434. package/.next/server/chunks/5472.js +1 -1
  435. package/.next/server/chunks/6304.js +1 -1
  436. package/.next/server/chunks/6705.js +1 -1
  437. package/.next/server/chunks/7539.js +5 -0
  438. package/.next/server/chunks/7891.js +1 -0
  439. package/.next/server/chunks/8578.js +1 -1
  440. package/.next/server/chunks/8728.js +1 -0
  441. package/.next/server/middleware-build-manifest.js +1 -1
  442. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  443. package/.next/server/pages/404.html +1 -1
  444. package/.next/server/pages/500.html +1 -1
  445. package/.next/server/server-reference-manifest.json +1 -1
  446. package/.next/static/chunks/12644.84908edd1bec8b5a.js +1 -0
  447. package/.next/static/chunks/1550-9a32fa02f6722fc7.js +25 -0
  448. package/.next/static/chunks/18977.393a8bc1bef44fc4.js +1 -0
  449. package/.next/static/chunks/{2503.bb9d3528c3c7ccae.js → 2503.68e12779c4b14adb.js} +1 -1
  450. package/.next/static/chunks/25781-c77dc5d11fb85d82.js +201 -0
  451. package/.next/static/chunks/{27455.1bce740b63d7c3cc.js → 27455.8f2189c777c63368.js} +1 -1
  452. package/.next/static/chunks/33072.3d32bb7b2a85ca9b.js +1 -0
  453. package/.next/static/chunks/39267.0c93a6bed8e46ac0.js +1 -0
  454. package/.next/static/chunks/52333.ff3bf0753b68875e.js +1 -0
  455. package/.next/static/chunks/69940.42e1ca99efc62caf.js +1 -0
  456. package/.next/static/chunks/70400.ffe0412efe741888.js +1 -0
  457. package/.next/static/chunks/7113.336a2a8deabe2aa5.js +1 -0
  458. package/.next/static/chunks/{71642.852436e8f0287b89.js → 71642.e11bcaa30efbf1f2.js} +1 -1
  459. package/.next/static/chunks/{72839.a5325a99f8c12fed.js → 72839.225c36dd5e767a20.js} +1 -1
  460. package/.next/static/chunks/{69427.a0b463c808aa54c8.js → 81272.b0027c9bc80050aa.js} +1 -1
  461. package/.next/static/chunks/85853.421f0c913b3d332b.js +1 -0
  462. package/.next/static/chunks/86155.3c5c1468fa2f446e.js +1 -0
  463. package/.next/static/chunks/86339.ba009abde9765665.js +1 -0
  464. package/.next/static/chunks/86939-51ae17d3d12c0310.js +1 -0
  465. package/.next/static/chunks/93794-b87eef7d177fe7b3.js +32 -0
  466. package/.next/static/chunks/989-6074551b2b54a168.js +3 -0
  467. package/.next/static/chunks/app/(app)/agents/[name]/page-6954a12623e4bdcf.js +8 -0
  468. package/.next/static/chunks/app/(app)/agents/{page-6fcfd7ab6781814e.js → page-b984c01f39aed22e.js} +1 -1
  469. package/.next/static/chunks/app/(app)/claude-md/edit/page-575c5ccdc585516c.js +1 -0
  470. package/.next/static/chunks/app/(app)/claude-md/{page-cd9e2176a12ba241.js → page-aab6df0c14c657f3.js} +1 -1
  471. package/.next/static/chunks/app/(app)/commands/[name]/page-ea86a4400fd29210.js +6 -0
  472. package/.next/static/chunks/app/(app)/commands/{page-f126b608b04747ac.js → page-3867a45c1378c6fe.js} +1 -1
  473. package/.next/static/chunks/app/(app)/hooks/[event]/{page-28038323fd29adfa.js → page-2c41e810c15a1149.js} +2 -2
  474. package/.next/static/chunks/app/(app)/hooks/{page-f1f39284e53c0344.js → page-49f9dbb78a3f97df.js} +1 -1
  475. package/.next/static/chunks/app/(app)/inbox/[id]/page-885a258b67e47b00.js +1 -0
  476. package/.next/static/chunks/app/(app)/inbox/page-592249fc155b9fe4.js +1 -0
  477. package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-121bf977a839488c.js +1 -0
  478. package/.next/static/chunks/app/(app)/jobs/[id]/page-ba516fa01db89ea0.js +1 -0
  479. package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-0650e6f678fae5b8.js +1 -0
  480. package/.next/static/chunks/app/(app)/jobs/page-da3fe23a43277e67.js +1 -0
  481. package/.next/static/chunks/app/(app)/{layout-ce9e1be301c60fe5.js → layout-3cd80708648e0723.js} +1 -1
  482. package/.next/static/chunks/app/(app)/mcp-servers/[name]/{page-d6d805a27ec0b0c0.js → page-9290a7940a32d9ac.js} +1 -1
  483. package/.next/static/chunks/app/(app)/mcp-servers/page-1e828264f81ee08c.js +1 -0
  484. package/.next/static/chunks/app/(app)/{page-027a5382da30ddb9.js → page-2d171ffc3e1945e1.js} +1 -1
  485. package/.next/static/chunks/app/(app)/plugins/page-7e70e0b3ead44a99.js +1 -0
  486. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-4396e9d6df189336.js +13 -0
  487. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/{page-c5fd013309ab3eba.js → page-76a072cbfe3d9f0e.js} +1 -1
  488. package/.next/static/chunks/app/(app)/reviews/{page-47530d93bb9d4a76.js → page-deaa44f0ce253da8.js} +1 -1
  489. package/.next/static/chunks/app/(app)/sessions/[id]/page-95bcce2e0b9f827a.js +1 -0
  490. package/.next/static/chunks/app/(app)/settings/appearance/{page-95902da748ac5f1e.js → page-433fcfb9b95fb22e.js} +1 -1
  491. package/.next/static/chunks/app/(app)/settings/notifications/page-e5309337f125a059.js +1 -0
  492. package/.next/static/chunks/app/(app)/settings/{page-8ed16a66fdde10cd.js → page-353ef8c508418af1.js} +1 -1
  493. package/.next/static/chunks/app/(app)/settings/providers/[id]/page-2cacea2e60ba435c.js +1 -0
  494. package/.next/static/chunks/app/(app)/settings/providers/new/page-d40acef3abfc7c19.js +1 -0
  495. package/.next/static/chunks/app/(app)/settings/providers/page-098d8f399c663944.js +1 -0
  496. package/.next/static/chunks/app/(app)/settings/session/page-706118ba33c2b99f.js +1 -0
  497. package/.next/static/chunks/app/(app)/skills/[name]/page-7dd7c0f316742c01.js +6 -0
  498. package/.next/static/chunks/app/(app)/skills/{page-c52773eacb27c04e.js → page-48d0bbe201180fc8.js} +1 -1
  499. package/.next/static/chunks/app/_global-error/page-bf8153dffcb47d46.js +1 -0
  500. package/.next/static/chunks/app/api/agents/[name]/route-bf8153dffcb47d46.js +1 -0
  501. package/.next/static/chunks/app/api/agents/route-bf8153dffcb47d46.js +1 -0
  502. package/.next/static/chunks/app/api/assistant-session/route-bf8153dffcb47d46.js +1 -0
  503. package/.next/static/chunks/app/api/auth/check/route-bf8153dffcb47d46.js +1 -0
  504. package/.next/static/chunks/app/api/auth/login/route-bf8153dffcb47d46.js +1 -0
  505. package/.next/static/chunks/app/api/auth/setup/route-bf8153dffcb47d46.js +1 -0
  506. package/.next/static/chunks/app/api/auth/ws-token/route-bf8153dffcb47d46.js +1 -0
  507. package/.next/static/chunks/app/api/btw/route-bf8153dffcb47d46.js +1 -0
  508. package/.next/static/chunks/app/api/claude-md/route-bf8153dffcb47d46.js +1 -0
  509. package/.next/static/chunks/app/api/commands/[name]/route-bf8153dffcb47d46.js +1 -0
  510. package/.next/static/chunks/app/api/commands/route-bf8153dffcb47d46.js +1 -0
  511. package/.next/static/chunks/app/api/config/cwd/route-bf8153dffcb47d46.js +1 -0
  512. package/.next/static/chunks/app/api/defaults/route-bf8153dffcb47d46.js +1 -0
  513. package/.next/static/chunks/app/api/filesystem/browse/route-bf8153dffcb47d46.js +1 -0
  514. package/.next/static/chunks/app/api/filesystem/files/route-bf8153dffcb47d46.js +1 -0
  515. package/.next/static/chunks/app/api/filesystem/mkdir/route-bf8153dffcb47d46.js +1 -0
  516. package/.next/static/chunks/app/api/filesystem/read/route-bf8153dffcb47d46.js +1 -0
  517. package/.next/static/chunks/app/api/git/clone/route-bf8153dffcb47d46.js +1 -0
  518. package/.next/static/chunks/app/api/git/commit/route-bf8153dffcb47d46.js +1 -0
  519. package/.next/static/chunks/app/api/git/diff/route-bf8153dffcb47d46.js +1 -0
  520. package/.next/static/chunks/app/api/git/discard/route-bf8153dffcb47d46.js +1 -0
  521. package/.next/static/chunks/app/api/git/generate-message/route-bf8153dffcb47d46.js +1 -0
  522. package/.next/static/chunks/app/api/git/push/route-bf8153dffcb47d46.js +1 -0
  523. package/.next/static/chunks/app/api/git/status/route-bf8153dffcb47d46.js +1 -0
  524. package/.next/static/chunks/app/api/github/file-content/route-bf8153dffcb47d46.js +1 -0
  525. package/.next/static/chunks/app/api/github/orgs/route-bf8153dffcb47d46.js +1 -0
  526. package/.next/static/chunks/app/api/github/prs/checks/route-bf8153dffcb47d46.js +1 -0
  527. package/.next/static/chunks/app/api/github/prs/diff/route-bf8153dffcb47d46.js +1 -0
  528. package/.next/static/chunks/app/api/github/prs/review/route-bf8153dffcb47d46.js +1 -0
  529. package/.next/static/chunks/app/api/github/prs/route-bf8153dffcb47d46.js +1 -0
  530. package/.next/static/chunks/app/api/github/prs/view/route-bf8153dffcb47d46.js +1 -0
  531. package/.next/static/chunks/app/api/github/repos/route-bf8153dffcb47d46.js +1 -0
  532. package/.next/static/chunks/app/api/github/review-session/route-bf8153dffcb47d46.js +1 -0
  533. package/.next/static/chunks/app/api/health/route-bf8153dffcb47d46.js +1 -0
  534. package/.next/static/chunks/app/api/hooks/route-bf8153dffcb47d46.js +1 -0
  535. package/.next/static/chunks/app/api/inbox/[id]/route-bf8153dffcb47d46.js +1 -0
  536. package/.next/static/chunks/app/api/inbox/route-bf8153dffcb47d46.js +1 -0
  537. package/.next/static/chunks/app/api/jobs/[id]/route-bf8153dffcb47d46.js +1 -0
  538. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-bf8153dffcb47d46.js +1 -0
  539. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-bf8153dffcb47d46.js +1 -0
  540. package/.next/static/chunks/app/api/jobs/[id]/runs/route-bf8153dffcb47d46.js +1 -0
  541. package/.next/static/chunks/app/api/jobs/[id]/stop/route-bf8153dffcb47d46.js +1 -0
  542. package/.next/static/chunks/app/api/jobs/[id]/trigger/route-bf8153dffcb47d46.js +1 -0
  543. package/.next/static/chunks/app/api/jobs/mcp-discover/route-bf8153dffcb47d46.js +1 -0
  544. package/.next/static/chunks/app/api/jobs/route-bf8153dffcb47d46.js +1 -0
  545. package/.next/static/chunks/app/api/jobs/status/route-bf8153dffcb47d46.js +1 -0
  546. package/.next/static/chunks/app/api/mcp-servers/[name]/route-bf8153dffcb47d46.js +1 -0
  547. package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-bf8153dffcb47d46.js +1 -0
  548. package/.next/static/chunks/app/api/mcp-servers/[name]/tools/route-bf8153dffcb47d46.js +1 -0
  549. package/.next/static/chunks/app/api/mcp-servers/route-bf8153dffcb47d46.js +1 -0
  550. package/.next/static/chunks/app/api/notifications/route-bf8153dffcb47d46.js +1 -0
  551. package/.next/static/chunks/app/api/notifications/test/route-bf8153dffcb47d46.js +1 -0
  552. package/.next/static/chunks/app/api/plugins/[id]/route-bf8153dffcb47d46.js +1 -0
  553. package/.next/static/chunks/app/api/plugins/install/route-bf8153dffcb47d46.js +1 -0
  554. package/.next/static/chunks/app/api/plugins/marketplaces/[name]/route-bf8153dffcb47d46.js +1 -0
  555. package/.next/static/chunks/app/api/plugins/marketplaces/route-bf8153dffcb47d46.js +1 -0
  556. package/.next/static/chunks/app/api/plugins/route-bf8153dffcb47d46.js +1 -0
  557. package/.next/static/chunks/app/api/providers/[id]/route-bf8153dffcb47d46.js +1 -0
  558. package/.next/static/chunks/app/api/providers/route-bf8153dffcb47d46.js +1 -0
  559. package/.next/static/chunks/app/api/reviews/pinned/route-bf8153dffcb47d46.js +1 -0
  560. package/.next/static/chunks/app/api/sessions/[id]/context/route-bf8153dffcb47d46.js +1 -0
  561. package/.next/static/chunks/app/api/sessions/[id]/mcp/route-bf8153dffcb47d46.js +1 -0
  562. package/.next/static/chunks/app/api/sessions/[id]/route-bf8153dffcb47d46.js +1 -0
  563. package/.next/static/chunks/app/api/sessions/[id]/search/route-bf8153dffcb47d46.js +1 -0
  564. package/.next/static/chunks/app/api/sessions/[id]/tabs/route-bf8153dffcb47d46.js +1 -0
  565. package/.next/static/chunks/app/api/sessions/bulk-delete/route-bf8153dffcb47d46.js +1 -0
  566. package/.next/static/chunks/app/api/sessions/by-ids/route-bf8153dffcb47d46.js +1 -0
  567. package/.next/static/chunks/app/api/sessions/group/route-bf8153dffcb47d46.js +1 -0
  568. package/.next/static/chunks/app/api/sessions/pinned/route-bf8153dffcb47d46.js +1 -0
  569. package/.next/static/chunks/app/api/sessions/route-bf8153dffcb47d46.js +1 -0
  570. package/.next/static/chunks/app/api/sessions/search/route-bf8153dffcb47d46.js +1 -0
  571. package/.next/static/chunks/app/api/sessions/thinking/route-bf8153dffcb47d46.js +1 -0
  572. package/.next/static/chunks/app/api/skills/[name]/route-bf8153dffcb47d46.js +1 -0
  573. package/.next/static/chunks/app/api/skills/route-bf8153dffcb47d46.js +1 -0
  574. package/.next/static/chunks/app/api/terminal/[id]/route-bf8153dffcb47d46.js +1 -0
  575. package/.next/static/chunks/app/api/terminal/route-bf8153dffcb47d46.js +1 -0
  576. package/.next/static/chunks/app/api/usage/route-bf8153dffcb47d46.js +1 -0
  577. package/.next/static/chunks/app/api/version/changelog/route-bf8153dffcb47d46.js +1 -0
  578. package/.next/static/chunks/app/api/version/cockpit/changelog/route-bf8153dffcb47d46.js +1 -0
  579. package/.next/static/chunks/app/api/version/cockpit/route-bf8153dffcb47d46.js +1 -0
  580. package/.next/static/chunks/app/api/version/route-bf8153dffcb47d46.js +1 -0
  581. package/.next/static/chunks/{framework-6fd9f138158c42e0.js → framework-45a1aae1a0f575fd.js} +1 -1
  582. package/.next/static/chunks/{main-5dac9bfffcc23702.js → main-eb9ff0b73c75808a.js} +3 -3
  583. package/.next/static/chunks/next/dist/client/components/builtin/app-error-bf8153dffcb47d46.js +1 -0
  584. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-bf8153dffcb47d46.js +1 -0
  585. package/.next/static/chunks/next/dist/client/components/builtin/not-found-bf8153dffcb47d46.js +1 -0
  586. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-bf8153dffcb47d46.js +1 -0
  587. package/.next/static/chunks/webpack-76a545b642140725.js +1 -0
  588. package/.next/static/css/483101dd9c42fb97.css +1 -0
  589. package/.next/static/mmHo0MmzQHWjZATtI-VbH/_buildManifest.js +1 -0
  590. package/README.md +13 -4
  591. package/bin/cockpit-hook-bridge.mjs +93 -24
  592. package/dist/server.js +10 -0
  593. package/dist/src/lib/cli-commands.js +147 -0
  594. package/dist/src/lib/models.js +8 -0
  595. package/dist/src/lib/paste-detect.js +161 -0
  596. package/dist/src/server/assistant-settings.js +35 -0
  597. package/dist/src/server/claude-bin.js +21 -0
  598. package/dist/src/server/cli-init-fetch.js +6 -1
  599. package/dist/src/server/inbox.js +2 -2
  600. package/dist/src/server/job-scheduler.js +146 -4
  601. package/dist/src/server/job-storage.js +33 -0
  602. package/dist/src/server/mcp/cockpit-agent-prompt.js +5 -0
  603. package/dist/src/server/mcp/cockpit-config-server.js +632 -0
  604. package/dist/src/server/mcp/run-context.js +23 -0
  605. package/dist/src/server/notifications.js +51 -10
  606. package/dist/src/server/plugins.js +103 -0
  607. package/dist/src/server/providers.js +25 -2
  608. package/dist/src/server/pty-runtime.js +112 -3
  609. package/dist/src/server/pty-session.js +7 -4
  610. package/dist/src/server/session-manager.js +338 -100
  611. package/dist/src/server/singleton.js +9 -0
  612. package/dist/src/server/terminal-buffer.js +17 -0
  613. package/dist/src/server/terminal-manager.js +9 -13
  614. package/dist/src/server/transcript.js +39 -22
  615. package/dist/src/server/ws-handler.js +18 -6
  616. package/next.config.ts +1 -0
  617. package/package.json +3 -2
  618. package/.next/server/app/(app)/changes/page.js +0 -2
  619. package/.next/server/app/(app)/changes/page.js.nft.json +0 -1
  620. package/.next/server/app/(app)/changes/page_client-reference-manifest.js +0 -1
  621. package/.next/server/app/(app)/files/page.js +0 -2
  622. package/.next/server/app/(app)/files/page_client-reference-manifest.js +0 -1
  623. package/.next/server/app/changes.html +0 -1
  624. package/.next/server/app/changes.segments/!KGFwcCk/changes/__PAGE__.segment.rsc +0 -9
  625. package/.next/server/app/changes.segments/_index.segment.rsc +0 -5
  626. package/.next/server/app/files.html +0 -1
  627. package/.next/server/app/files.meta +0 -16
  628. package/.next/server/app/files.rsc +0 -23
  629. package/.next/server/app/files.segments/!KGFwcCk/files.segment.rsc +0 -5
  630. package/.next/server/app/files.segments/!KGFwcCk.segment.rsc +0 -7
  631. package/.next/server/app/files.segments/_full.segment.rsc +0 -23
  632. package/.next/server/app/files.segments/_head.segment.rsc +0 -6
  633. package/.next/server/app/files.segments/_tree.segment.rsc +0 -2
  634. package/.next/server/chunks/3006.js +0 -199
  635. package/.next/server/chunks/4342.js +0 -1
  636. package/.next/server/chunks/4352.js +0 -1
  637. package/.next/server/chunks/4445.js +0 -1
  638. package/.next/server/chunks/63.js +0 -45
  639. package/.next/server/chunks/7782.js +0 -6
  640. package/.next/server/chunks/8148.js +0 -1
  641. package/.next/server/chunks/9599.js +0 -11
  642. package/.next/static/chunks/18977.a98edaf19c6df2d4.js +0 -1
  643. package/.next/static/chunks/26126-97874904b42befb8.js +0 -1
  644. package/.next/static/chunks/31010-6e87f77b97544424.js +0 -1
  645. package/.next/static/chunks/33072.9c3cd19e8d515dea.js +0 -1
  646. package/.next/static/chunks/3765-d323c6675307a63e.js +0 -20
  647. package/.next/static/chunks/39267.ef60669ade47cf4c.js +0 -1
  648. package/.next/static/chunks/41487-d802643f4a8fad3c.js +0 -199
  649. package/.next/static/chunks/48273-bbd15bac6733dfc4.js +0 -6
  650. package/.next/static/chunks/52333.f98d1cca9a127b34.js +0 -1
  651. package/.next/static/chunks/6935-f436a624267529fb.js +0 -1
  652. package/.next/static/chunks/70400.1816c247ad90f9bc.js +0 -1
  653. package/.next/static/chunks/7113.39704408fef3d26e.js +0 -1
  654. package/.next/static/chunks/85853.39872899093b140a.js +0 -1
  655. package/.next/static/chunks/86155.40f687f9aaa13854.js +0 -1
  656. package/.next/static/chunks/86339.4dbd51a9b9871f65.js +0 -1
  657. package/.next/static/chunks/86939-dfc6f8eb395caa89.js +0 -1
  658. package/.next/static/chunks/93794-5f89a674d8cefcff.js +0 -32
  659. package/.next/static/chunks/989-94bf2b9d242776c3.js +0 -3
  660. package/.next/static/chunks/app/(app)/agents/[name]/page-8bdd0359043537d4.js +0 -8
  661. package/.next/static/chunks/app/(app)/changes/page-4549a5bd72d77e3e.js +0 -1
  662. package/.next/static/chunks/app/(app)/claude-md/edit/page-08e6e120e71979f4.js +0 -1
  663. package/.next/static/chunks/app/(app)/commands/[name]/page-7cdfdef29ded0aa0.js +0 -6
  664. package/.next/static/chunks/app/(app)/files/page-f526eb95821e000e.js +0 -1
  665. package/.next/static/chunks/app/(app)/inbox/[id]/page-bc1ff3a0db0114a4.js +0 -1
  666. package/.next/static/chunks/app/(app)/inbox/page-82e03870103ce9bd.js +0 -1
  667. package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-7fb788f772ff2129.js +0 -1
  668. package/.next/static/chunks/app/(app)/jobs/[id]/page-a5856b9ae967ff59.js +0 -1
  669. package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-b7c513402db11db6.js +0 -1
  670. package/.next/static/chunks/app/(app)/jobs/page-e9bbd6c116b9699f.js +0 -1
  671. package/.next/static/chunks/app/(app)/mcp-servers/page-4b7276d43451cd43.js +0 -1
  672. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-9ab2955c455bb5fa.js +0 -13
  673. package/.next/static/chunks/app/(app)/sessions/[id]/page-94f891e1b54fd05f.js +0 -1
  674. package/.next/static/chunks/app/(app)/settings/notifications/page-229f1db6beb1d19c.js +0 -1
  675. package/.next/static/chunks/app/(app)/settings/providers/[id]/page-13654263246617b3.js +0 -1
  676. package/.next/static/chunks/app/(app)/settings/providers/new/page-e1798e321ccbc6df.js +0 -1
  677. package/.next/static/chunks/app/(app)/settings/providers/page-0bb4c1db2ee35b3d.js +0 -1
  678. package/.next/static/chunks/app/(app)/settings/session/page-ab216a8fa37a0f76.js +0 -1
  679. package/.next/static/chunks/app/(app)/skills/[name]/page-8ab85d5090967ee4.js +0 -6
  680. package/.next/static/chunks/app/_global-error/page-fc747760bd4c8a4b.js +0 -1
  681. package/.next/static/chunks/app/api/agents/[name]/route-fc747760bd4c8a4b.js +0 -1
  682. package/.next/static/chunks/app/api/agents/route-fc747760bd4c8a4b.js +0 -1
  683. package/.next/static/chunks/app/api/auth/check/route-fc747760bd4c8a4b.js +0 -1
  684. package/.next/static/chunks/app/api/auth/login/route-fc747760bd4c8a4b.js +0 -1
  685. package/.next/static/chunks/app/api/auth/setup/route-fc747760bd4c8a4b.js +0 -1
  686. package/.next/static/chunks/app/api/auth/ws-token/route-fc747760bd4c8a4b.js +0 -1
  687. package/.next/static/chunks/app/api/btw/route-fc747760bd4c8a4b.js +0 -1
  688. package/.next/static/chunks/app/api/claude-md/route-fc747760bd4c8a4b.js +0 -1
  689. package/.next/static/chunks/app/api/commands/[name]/route-fc747760bd4c8a4b.js +0 -1
  690. package/.next/static/chunks/app/api/commands/route-fc747760bd4c8a4b.js +0 -1
  691. package/.next/static/chunks/app/api/defaults/route-fc747760bd4c8a4b.js +0 -1
  692. package/.next/static/chunks/app/api/filesystem/browse/route-fc747760bd4c8a4b.js +0 -1
  693. package/.next/static/chunks/app/api/filesystem/files/route-fc747760bd4c8a4b.js +0 -1
  694. package/.next/static/chunks/app/api/filesystem/mkdir/route-fc747760bd4c8a4b.js +0 -1
  695. package/.next/static/chunks/app/api/filesystem/read/route-fc747760bd4c8a4b.js +0 -1
  696. package/.next/static/chunks/app/api/git/clone/route-fc747760bd4c8a4b.js +0 -1
  697. package/.next/static/chunks/app/api/git/commit/route-fc747760bd4c8a4b.js +0 -1
  698. package/.next/static/chunks/app/api/git/diff/route-fc747760bd4c8a4b.js +0 -1
  699. package/.next/static/chunks/app/api/git/discard/route-fc747760bd4c8a4b.js +0 -1
  700. package/.next/static/chunks/app/api/git/generate-message/route-fc747760bd4c8a4b.js +0 -1
  701. package/.next/static/chunks/app/api/git/push/route-fc747760bd4c8a4b.js +0 -1
  702. package/.next/static/chunks/app/api/git/status/route-fc747760bd4c8a4b.js +0 -1
  703. package/.next/static/chunks/app/api/github/file-content/route-fc747760bd4c8a4b.js +0 -1
  704. package/.next/static/chunks/app/api/github/orgs/route-fc747760bd4c8a4b.js +0 -1
  705. package/.next/static/chunks/app/api/github/prs/checks/route-fc747760bd4c8a4b.js +0 -1
  706. package/.next/static/chunks/app/api/github/prs/diff/route-fc747760bd4c8a4b.js +0 -1
  707. package/.next/static/chunks/app/api/github/prs/review/route-fc747760bd4c8a4b.js +0 -1
  708. package/.next/static/chunks/app/api/github/prs/route-fc747760bd4c8a4b.js +0 -1
  709. package/.next/static/chunks/app/api/github/prs/view/route-fc747760bd4c8a4b.js +0 -1
  710. package/.next/static/chunks/app/api/github/repos/route-fc747760bd4c8a4b.js +0 -1
  711. package/.next/static/chunks/app/api/github/review-session/route-fc747760bd4c8a4b.js +0 -1
  712. package/.next/static/chunks/app/api/health/route-fc747760bd4c8a4b.js +0 -1
  713. package/.next/static/chunks/app/api/hooks/route-fc747760bd4c8a4b.js +0 -1
  714. package/.next/static/chunks/app/api/inbox/[id]/route-fc747760bd4c8a4b.js +0 -1
  715. package/.next/static/chunks/app/api/inbox/route-fc747760bd4c8a4b.js +0 -1
  716. package/.next/static/chunks/app/api/jobs/[id]/route-fc747760bd4c8a4b.js +0 -1
  717. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-fc747760bd4c8a4b.js +0 -1
  718. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-fc747760bd4c8a4b.js +0 -1
  719. package/.next/static/chunks/app/api/jobs/[id]/runs/route-fc747760bd4c8a4b.js +0 -1
  720. package/.next/static/chunks/app/api/jobs/[id]/trigger/route-fc747760bd4c8a4b.js +0 -1
  721. package/.next/static/chunks/app/api/jobs/mcp-discover/route-fc747760bd4c8a4b.js +0 -1
  722. package/.next/static/chunks/app/api/jobs/route-fc747760bd4c8a4b.js +0 -1
  723. package/.next/static/chunks/app/api/jobs/status/route-fc747760bd4c8a4b.js +0 -1
  724. package/.next/static/chunks/app/api/mcp-servers/[name]/route-fc747760bd4c8a4b.js +0 -1
  725. package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-fc747760bd4c8a4b.js +0 -1
  726. package/.next/static/chunks/app/api/mcp-servers/route-fc747760bd4c8a4b.js +0 -1
  727. package/.next/static/chunks/app/api/notifications/route-fc747760bd4c8a4b.js +0 -1
  728. package/.next/static/chunks/app/api/notifications/test/route-fc747760bd4c8a4b.js +0 -1
  729. package/.next/static/chunks/app/api/providers/[id]/route-fc747760bd4c8a4b.js +0 -1
  730. package/.next/static/chunks/app/api/providers/route-fc747760bd4c8a4b.js +0 -1
  731. package/.next/static/chunks/app/api/reviews/pinned/route-fc747760bd4c8a4b.js +0 -1
  732. package/.next/static/chunks/app/api/sessions/[id]/context/route-fc747760bd4c8a4b.js +0 -1
  733. package/.next/static/chunks/app/api/sessions/[id]/mcp/route-fc747760bd4c8a4b.js +0 -1
  734. package/.next/static/chunks/app/api/sessions/[id]/route-fc747760bd4c8a4b.js +0 -1
  735. package/.next/static/chunks/app/api/sessions/[id]/search/route-fc747760bd4c8a4b.js +0 -1
  736. package/.next/static/chunks/app/api/sessions/[id]/tabs/route-fc747760bd4c8a4b.js +0 -1
  737. package/.next/static/chunks/app/api/sessions/bulk-delete/route-fc747760bd4c8a4b.js +0 -1
  738. package/.next/static/chunks/app/api/sessions/by-ids/route-fc747760bd4c8a4b.js +0 -1
  739. package/.next/static/chunks/app/api/sessions/group/route-fc747760bd4c8a4b.js +0 -1
  740. package/.next/static/chunks/app/api/sessions/pinned/route-fc747760bd4c8a4b.js +0 -1
  741. package/.next/static/chunks/app/api/sessions/route-fc747760bd4c8a4b.js +0 -1
  742. package/.next/static/chunks/app/api/sessions/search/route-fc747760bd4c8a4b.js +0 -1
  743. package/.next/static/chunks/app/api/sessions/thinking/route-fc747760bd4c8a4b.js +0 -1
  744. package/.next/static/chunks/app/api/skills/[name]/route-fc747760bd4c8a4b.js +0 -1
  745. package/.next/static/chunks/app/api/skills/route-fc747760bd4c8a4b.js +0 -1
  746. package/.next/static/chunks/app/api/terminal/[id]/route-fc747760bd4c8a4b.js +0 -1
  747. package/.next/static/chunks/app/api/terminal/route-fc747760bd4c8a4b.js +0 -1
  748. package/.next/static/chunks/app/api/usage/route-fc747760bd4c8a4b.js +0 -1
  749. package/.next/static/chunks/app/api/version/changelog/route-fc747760bd4c8a4b.js +0 -1
  750. package/.next/static/chunks/app/api/version/cockpit/changelog/route-fc747760bd4c8a4b.js +0 -1
  751. package/.next/static/chunks/app/api/version/cockpit/route-fc747760bd4c8a4b.js +0 -1
  752. package/.next/static/chunks/app/api/version/route-fc747760bd4c8a4b.js +0 -1
  753. package/.next/static/chunks/next/dist/client/components/builtin/app-error-fc747760bd4c8a4b.js +0 -1
  754. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-fc747760bd4c8a4b.js +0 -1
  755. package/.next/static/chunks/next/dist/client/components/builtin/not-found-fc747760bd4c8a4b.js +0 -1
  756. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-fc747760bd4c8a4b.js +0 -1
  757. package/.next/static/chunks/webpack-e31bb45fa59caed8.js +0 -1
  758. package/.next/static/css/3f8af4ae6f812d5c.css +0 -1
  759. package/.next/static/zr8XZzqb74eHitdlkpo-C/_buildManifest.js +0 -1
  760. /package/.next/static/{zr8XZzqb74eHitdlkpo-C → mmHo0MmzQHWjZATtI-VbH}/_ssgManifest.js +0 -0
@@ -4,17 +4,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SessionManager = void 0;
7
+ exports.buildMcpConfigArg = buildMcpConfigArg;
7
8
  const node_child_process_1 = require("node:child_process");
9
+ const node_crypto_1 = require("node:crypto");
8
10
  const node_events_1 = require("node:events");
9
11
  const node_fs_1 = require("node:fs");
12
+ const node_os_1 = require("node:os");
10
13
  const node_path_1 = __importDefault(require("node:path"));
11
14
  const uuid_1 = require("uuid");
15
+ const cli_commands_1 = require("../lib/cli-commands");
12
16
  const models_1 = require("../lib/models");
17
+ const assistant_settings_1 = require("../server/assistant-settings");
18
+ const claude_bin_1 = require("../server/claude-bin");
13
19
  const paths_1 = require("../server/paths");
14
20
  const providers_1 = require("../server/providers");
15
21
  const debug_logger_1 = require("./debug-logger");
16
22
  const defaults_1 = require("./defaults");
17
23
  const event_parser_1 = require("./event-parser");
24
+ const job_storage_1 = require("./job-storage");
25
+ const cockpit_agent_prompt_1 = require("./mcp/cockpit-agent-prompt");
26
+ const run_context_1 = require("./mcp/run-context");
18
27
  const plans_1 = require("./plans");
19
28
  const pty_runtime_1 = require("./pty-runtime");
20
29
  const session_prefs_1 = require("./session-prefs");
@@ -26,19 +35,6 @@ const transcript_watcher_1 = require("./transcript-watcher");
26
35
  function defaultRuntime() {
27
36
  return "stream";
28
37
  }
29
- let resolvedClaudeBin = null;
30
- function getClaudeBin() {
31
- if (resolvedClaudeBin)
32
- return resolvedClaudeBin;
33
- const cmd = process.platform === "win32" ? "where" : "which";
34
- try {
35
- resolvedClaudeBin = (0, node_child_process_1.execFileSync)(cmd, ["claude"], { encoding: "utf-8" }).trim().split("\n")[0];
36
- }
37
- catch {
38
- resolvedClaudeBin = "claude";
39
- }
40
- return resolvedClaudeBin;
41
- }
42
38
  const smLog = (sessionId, msg) => {
43
39
  if (!(0, debug_logger_1.isDebugEnabled)())
44
40
  return;
@@ -46,8 +42,25 @@ const smLog = (sessionId, msg) => {
46
42
  const short = sessionId.slice(0, 8);
47
43
  console.log(`[session:${short}] ${ts} ${msg}`);
48
44
  };
45
+ function buildMcpConfigArg(url, token) {
46
+ const dir = node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config");
47
+ (0, node_fs_1.mkdirSync)(dir, { recursive: true });
48
+ const filePath = node_path_1.default.join(dir, `${token.slice(0, 16)}.json`);
49
+ const config = {
50
+ mcpServers: {
51
+ "cockpit-config": {
52
+ type: "http",
53
+ url: `${url}/mcp`,
54
+ headers: { Authorization: `Bearer ${token}` },
55
+ },
56
+ },
57
+ };
58
+ (0, node_fs_1.writeFileSync)(filePath, JSON.stringify(config, null, 2), { mode: 0o600 });
59
+ return { path: filePath };
60
+ }
49
61
  class SessionManager {
50
62
  sessions = new Map();
63
+ _cockpitAgentSessionPromise = null;
51
64
  constructor() {
52
65
  // Periodically check for sessions stuck in "running" with a dead process
53
66
  setInterval(() => {
@@ -55,7 +68,11 @@ class SessionManager {
55
68
  if (session.info.status === "running" && !session.process && !session.ptyRuntime?.isAlive) {
56
69
  const short = id.slice(0, 8);
57
70
  (0, debug_logger_1.debugLog)(`[session:${short}] stale check: status=running but no live process, correcting to idle`);
58
- (0, debug_logger_1.logDiag)(id, "idle:stale-check");
71
+ (0, debug_logger_1.logDiag)(id, "idle:stale-check", {
72
+ runtime: session.runtime,
73
+ spawning: session.spawning ?? false,
74
+ hasPtyRuntime: !!session.ptyRuntime,
75
+ });
59
76
  session.info.status = "idle";
60
77
  session.emitter.emit("status", id, "idle");
61
78
  }
@@ -67,10 +84,12 @@ class SessionManager {
67
84
  const now = Date.now();
68
85
  const defaults = (0, defaults_1.getDefaults)();
69
86
  const modelSlots = { main: defaults.modelSlots.main ?? "sonnet" };
87
+ const isCockpitAgent = options?.cockpitAgent === true;
70
88
  const rt = options?.runtime ?? defaultRuntime();
89
+ const sessionName = isCockpitAgent ? "Cockpit Assistant" : name || node_path_1.default.basename(cwd) || cwd;
71
90
  const info = {
72
91
  id,
73
- name: name || node_path_1.default.basename(cwd) || cwd,
92
+ name: sessionName,
74
93
  cwd,
75
94
  createdAt: now,
76
95
  lastActiveAt: now,
@@ -85,10 +104,9 @@ class SessionManager {
85
104
  process: null,
86
105
  stdin: null,
87
106
  emitter: new node_events_1.EventEmitter(),
88
- hasSpawnedBefore: false,
89
107
  cliSessionId: id,
90
108
  previousCliSessionIds: [],
91
- bypassAllPermissions: options?.bypassPermissions ?? defaults.bypassAllPermissions,
109
+ bypassAllPermissions: isCockpitAgent ? false : (options?.bypassPermissions ?? defaults.bypassAllPermissions),
92
110
  planMode: false,
93
111
  needsRespawnForPermissions: false,
94
112
  compacting: false,
@@ -114,10 +132,38 @@ class SessionManager {
114
132
  todoWatcher: null,
115
133
  attachmentPaths: [],
116
134
  totalTokens: { input: 0, output: 0, cacheCreate: 0, cacheRead: 0 },
135
+ cockpitAgent: isCockpitAgent,
136
+ cockpitAgentCleanups: [],
117
137
  });
118
- (0, session_prefs_1.setSessionPrefs)(id, { runtime: rt });
138
+ (0, session_prefs_1.setSessionPrefs)(id, { runtime: rt, ...(isCockpitAgent ? { cockpitAgent: true } : {}) });
139
+ if (isCockpitAgent) {
140
+ this.registerCockpitAgentOnInit(id);
141
+ }
119
142
  return info;
120
143
  }
144
+ registerCockpitAgentOnInit(id) {
145
+ const session = this.sessions.get(id);
146
+ if (!session)
147
+ return; // TypeScript narrows to Session below; push is safe
148
+ const cleanup = this.onInit(id, async (data) => {
149
+ for (const server of data.mcpServers) {
150
+ if (server.name !== "cockpit-config" && server.status !== "disabled") {
151
+ try {
152
+ await this.mcpToggle(id, server.name, false);
153
+ }
154
+ catch {
155
+ // best effort — server may not be started yet
156
+ }
157
+ }
158
+ }
159
+ });
160
+ if (cleanup) {
161
+ session.cockpitAgentCleanups.push(cleanup); // destroySession iterates this to unsubscribe
162
+ }
163
+ else {
164
+ console.warn(`[cockpit-agent] onInit returned null for session ${id.slice(0, 8)}`);
165
+ }
166
+ }
121
167
  ensureSession(id, cwd) {
122
168
  let session = this.sessions.get(id);
123
169
  if (!session) {
@@ -147,10 +193,9 @@ class SessionManager {
147
193
  process: null,
148
194
  stdin: null,
149
195
  emitter: new node_events_1.EventEmitter(),
150
- hasSpawnedBefore: true,
151
196
  cliSessionId: cliId,
152
197
  previousCliSessionIds: prevIds,
153
- bypassAllPermissions: prefs?.bypassAllPermissions ?? defaults.bypassAllPermissions,
198
+ bypassAllPermissions: (prefs?.cockpitAgent ? false : prefs?.bypassAllPermissions) ?? defaults.bypassAllPermissions,
154
199
  planMode: prefs?.planMode ?? false,
155
200
  pendingPlanReminder: prefs?.planMode ?? false,
156
201
  needsRespawnForPermissions: false,
@@ -180,11 +225,68 @@ class SessionManager {
180
225
  todoWatcher: null,
181
226
  attachmentPaths: [],
182
227
  totalTokens: { input: 0, output: 0, cacheCreate: 0, cacheRead: 0 },
228
+ cockpitAgent: prefs?.cockpitAgent ?? false,
229
+ cockpitAgentCleanups: [],
183
230
  };
184
231
  this.sessions.set(id, session);
232
+ if (prefs?.cockpitAgent) {
233
+ this.registerCockpitAgentOnInit(id);
234
+ }
185
235
  }
186
236
  return session;
187
237
  }
238
+ async getOrCreateCockpitAgentSession() {
239
+ // Fast path: the session is already live in memory (the common case once the
240
+ // modal has been opened this server lifetime). Returns synchronously.
241
+ const stored = (0, assistant_settings_1.getAssistantSettings)().sessionId;
242
+ if (stored && this.sessions.has(stored))
243
+ return stored;
244
+ // Slow path: restore-from-disk or create-new. There is no `await` between the
245
+ // null-check and the assignment below, so the first caller sets the promise
246
+ // before any other caller can run; every concurrent first-open then awaits
247
+ // that same single execution. The finally clears it for the next miss.
248
+ if (!this._cockpitAgentSessionPromise) {
249
+ this._cockpitAgentSessionPromise = this._resolveOrCreateCockpitAgentSession().finally(() => {
250
+ this._cockpitAgentSessionPromise = null;
251
+ });
252
+ }
253
+ return this._cockpitAgentSessionPromise;
254
+ }
255
+ async _resolveOrCreateCockpitAgentSession() {
256
+ const settings = (0, assistant_settings_1.getAssistantSettings)();
257
+ const stored = settings.sessionId;
258
+ if (stored) {
259
+ if (this.sessions.has(stored))
260
+ return stored; // restored by an earlier caller
261
+ const prefs = (0, session_prefs_1.getSessionPrefs)(stored);
262
+ // Only restore a stored id that is genuinely a cockpit agent session. A
263
+ // pointer to a regular session (e.g. a hand-edited assistant.json) must not
264
+ // be rehydrated here — it would lack the MCP-disable/permission restrictions.
265
+ if (prefs?.cockpitAgent) {
266
+ const cwd = (await (0, transcript_1.findSessionCwd)(prefs.cliSessionId || stored)) ?? (await (0, transcript_1.findSessionCwd)(stored));
267
+ if (cwd) {
268
+ // ensureSession rebuilds in-memory state and (Step 5) registers the MCP-disable
269
+ // onInit listener. Model/thinking are restored from session-prefs — which the
270
+ // in-modal selector and the settings-page write-through both keep current —
271
+ // so no re-apply is needed here.
272
+ this.ensureSession(stored, cwd);
273
+ return stored;
274
+ }
275
+ }
276
+ }
277
+ // No stored id, or its transcript is gone — create a fresh session seeded from
278
+ // assistant.json. createSession is synchronous (this.sessions.set before return).
279
+ const info = this.createSession((0, paths_1.getCockpitDir)(), undefined, {
280
+ cockpitAgent: true,
281
+ runtime: settings.runtime,
282
+ });
283
+ if (settings.model)
284
+ this.setModel(info.id, settings.model, settings.contextSize);
285
+ if (settings.thinkingLevel)
286
+ this.setThinkingLevel(info.id, settings.thinkingLevel);
287
+ (0, assistant_settings_1.updateAssistantSettings)({ sessionId: info.id });
288
+ return info.id;
289
+ }
188
290
  async getSession(id) {
189
291
  let session = this.sessions.get(id);
190
292
  if (!session) {
@@ -507,9 +609,6 @@ class SessionManager {
507
609
  return false;
508
610
  }
509
611
  this.killProcess(session);
510
- if (!(0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
511
- session.hasSpawnedBefore = false;
512
- }
513
612
  session.pendingRequests.clear();
514
613
  this.notifyPendingChanged(session, sessionId);
515
614
  session.streamingSnapshot = null;
@@ -540,6 +639,24 @@ class SessionManager {
540
639
  session.todoWatcher = null;
541
640
  }
542
641
  this.cleanupAttachments(session);
642
+ for (const cleanup of session.cockpitAgentCleanups) {
643
+ try {
644
+ cleanup();
645
+ }
646
+ catch {
647
+ /* best effort */
648
+ }
649
+ }
650
+ if (session.mcpToken) {
651
+ (0, run_context_1.clearToken)(session.mcpToken);
652
+ const configPath = node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`);
653
+ try {
654
+ (0, node_fs_1.unlinkSync)(configPath);
655
+ }
656
+ catch {
657
+ /* best effort */
658
+ }
659
+ }
543
660
  session.emitter.removeAllListeners();
544
661
  this.sessions.delete(id);
545
662
  return true;
@@ -734,7 +851,7 @@ class SessionManager {
734
851
  }
735
852
  setBypassAllPermissions(sessionId) {
736
853
  const session = this.sessions.get(sessionId);
737
- if (!session || session.bypassAllPermissions)
854
+ if (!session || session.bypassAllPermissions || session.cockpitAgent)
738
855
  return;
739
856
  session.bypassAllPermissions = true;
740
857
  (0, session_prefs_1.setSessionPrefs)(sessionId, { bypassAllPermissions: true });
@@ -766,7 +883,6 @@ class SessionManager {
766
883
  return;
767
884
  if (session.info.status === "idle") {
768
885
  this.killProcess(session);
769
- session.hasSpawnedBefore = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
770
886
  }
771
887
  else {
772
888
  session.needsRespawnForPermissions = true;
@@ -894,9 +1010,6 @@ class SessionManager {
894
1010
  else {
895
1011
  this.log(sessionId, `setModel: killing process (hasStdin=${!!session.stdin}, contextChanged=${contextChanged})`);
896
1012
  this.killProcess(session);
897
- if (!(0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
898
- session.hasSpawnedBefore = false;
899
- }
900
1013
  session.queuedMessages.length = 0;
901
1014
  session.queuePaused = false;
902
1015
  session.info.status = "idle";
@@ -1176,9 +1289,13 @@ class SessionManager {
1176
1289
  return;
1177
1290
  const u = raw.message.usage;
1178
1291
  const used = (u.input_tokens || 0) + (u.cache_creation_input_tokens || 0) + (u.cache_read_input_tokens || 0);
1179
- const usage = { used, total: session.contextWindowSize };
1180
- session.contextUsage = usage;
1181
- session.emitter.emit("usage", sessionId, usage);
1292
+ // Only move the gauge on a real reading. An interrupted/cancelled turn
1293
+ // emits an all-zero usage block; setting it would wipe the gauge to 0.
1294
+ if (used > 0) {
1295
+ const usage = { used, total: session.contextWindowSize };
1296
+ session.contextUsage = usage;
1297
+ session.emitter.emit("usage", sessionId, usage);
1298
+ }
1182
1299
  session.totalTokens.input += u.input_tokens || 0;
1183
1300
  session.totalTokens.output += u.output_tokens || 0;
1184
1301
  session.totalTokens.cacheCreate += u.cache_creation_input_tokens || 0;
@@ -1237,6 +1354,10 @@ class SessionManager {
1237
1354
  session.ptyRuntime = null;
1238
1355
  runtime.kill().catch(() => { });
1239
1356
  }
1357
+ // A kill ends any in-flight spawn, so clear the ensureProcess guard now. A
1358
+ // deliberate kill-then-respawn (settings change, /clear, restart) must not
1359
+ // be blocked until the dying runtime's start() promise happens to settle.
1360
+ session.spawning = false;
1240
1361
  session.compacting = false;
1241
1362
  }
1242
1363
  emitSystem(session, sessionId, text) {
@@ -1329,6 +1450,47 @@ class SessionManager {
1329
1450
  else if (pa.type === "auto_deny") {
1330
1451
  this.respondToPermission(sessionId, pa.requestId, false, undefined, undefined, pa.denyReason);
1331
1452
  }
1453
+ else if (session.cockpitAgent && pa.toolName !== "AskUserQuestion") {
1454
+ const tool = pa.toolName;
1455
+ const isReadOnlyBuiltin = ["Read", "Grep", "Glob"].includes(tool);
1456
+ const cockpitPrefix = "mcp__cockpit-config__";
1457
+ const isCockpitTool = tool.startsWith(cockpitPrefix);
1458
+ const cockpitAction = isCockpitTool ? tool.slice(cockpitPrefix.length).split("_")[0] : "";
1459
+ const isCockpitRead = isCockpitTool && (cockpitAction === "list" || cockpitAction === "get");
1460
+ const isCockpitWrite = isCockpitTool && !isCockpitRead;
1461
+ (0, debug_logger_1.logDiag)(sessionId, "cockpit-agent:permission", {
1462
+ toolName: tool,
1463
+ decision: isReadOnlyBuiltin || isCockpitRead ? "auto_approve" : isCockpitWrite ? "proposal" : "auto_deny",
1464
+ });
1465
+ if (isReadOnlyBuiltin || isCockpitRead) {
1466
+ this.respondToPermission(sessionId, pa.requestId, true, pa.rawToolInput);
1467
+ }
1468
+ else if (isCockpitWrite) {
1469
+ const suffix = tool.replace("mcp__cockpit-config__", "");
1470
+ const parts = suffix.split("_");
1471
+ const action = parts[0];
1472
+ const domain = parts.slice(1).join("_");
1473
+ let displayName;
1474
+ if (domain === "job" && (action === "update" || action === "delete")) {
1475
+ const jobId = pa.rawToolInput?.id;
1476
+ if (typeof jobId === "string") {
1477
+ displayName = (0, job_storage_1.getJob)(jobId)?.name;
1478
+ }
1479
+ }
1480
+ session.pendingRequests.set(pa.requestId, {
1481
+ type: "permission",
1482
+ requestId: pa.requestId,
1483
+ toolName: pa.toolName,
1484
+ toolInput: pa.toolInput || "",
1485
+ rawToolInput: pa.rawToolInput,
1486
+ configProposal: { toolName: tool, domain, action, ...(displayName ? { displayName } : {}) },
1487
+ });
1488
+ this.notifyPendingChanged(session, sessionId);
1489
+ }
1490
+ else {
1491
+ this.respondToPermission(sessionId, pa.requestId, false, undefined, undefined, "This tool is not available in the cockpit assistant");
1492
+ }
1493
+ }
1332
1494
  else if (session.bypassAllPermissions && !session.planMode && pa.toolName !== "AskUserQuestion") {
1333
1495
  this.respondToPermission(sessionId, pa.requestId, true, pa.rawToolInput);
1334
1496
  bypassedRequestIds.add(pa.requestId);
@@ -1437,7 +1599,6 @@ class SessionManager {
1437
1599
  // generate a new CLI session ID to get a fresh context.
1438
1600
  session.previousCliSessionIds.push(session.cliSessionId);
1439
1601
  session.cliSessionId = (0, uuid_1.v4)();
1440
- session.hasSpawnedBefore = false;
1441
1602
  session.queuedMessages.length = 0;
1442
1603
  session.queuePaused = false;
1443
1604
  session.todoItems = [];
@@ -1505,6 +1666,24 @@ class SessionManager {
1505
1666
  return true;
1506
1667
  }
1507
1668
  case "/context": {
1669
+ // Forward to the CLI's own /context: it shows the live per-category
1670
+ // breakdown and the ACTUAL window, which cockpit's readout (picked size
1671
+ // only) can't. /context is a local command (no model turn → no Stop hook),
1672
+ // so never enter the running state — that would hang the session on
1673
+ // "processing". If no CLI is live (e.g. a context-size switch just killed
1674
+ // it), spawn one rather than showing cockpit's one-liner; the spawn applies
1675
+ // the freshly-picked window so /context reflects the switch immediately.
1676
+ // Output arrives as a local_command transcript entry (ANSI-stripped). When a
1677
+ // turn is already running we don't interfere — fall back to the local readout.
1678
+ if (session.runtime === "pty" && session.info.status !== "running") {
1679
+ if (session.ptyRuntime?.isAlive) {
1680
+ session.ptyRuntime.sendText("/context").catch(() => { });
1681
+ }
1682
+ else {
1683
+ this.spawnPtyProcess(session, sessionId, "/context");
1684
+ }
1685
+ return true;
1686
+ }
1508
1687
  if (!session.contextUsage) {
1509
1688
  this.emitSystem(session, sessionId, "Context usage data not available yet.");
1510
1689
  return true;
@@ -1521,66 +1700,32 @@ class SessionManager {
1521
1700
  return true;
1522
1701
  }
1523
1702
  }
1524
- // In PTY mode, intercept commands that render CLI dialogs to prevent hangs
1703
+ // In PTY mode, only model-invoking commands are safe to forward to the REPL:
1704
+ // they run a turn that fires a Stop hook, which clears the running state.
1705
+ // CLI-local commands don't: "local-jsx" opens an interactive panel cockpit
1706
+ // renders from the transcript, not the raw PTY, so it can't show or drive; and
1707
+ // "local" acts with no Stop hook, hanging the session on "processing". Block
1708
+ // both. Classification (incl. aliases) is generated from the CLI binary; see
1709
+ // src/lib/cli-commands.ts. Unknown commands (custom/project/plugin) are
1710
+ // prompt-style and pass through.
1525
1711
  if (session.ptyRuntime?.isAlive) {
1526
- const dialogCmd = cmd.replace("/", "");
1527
- if (SessionManager.DIALOG_COMMANDS.has(dialogCmd)) {
1528
- this.emitSystem(session, sessionId, `"${cmd}" opens an interactive CLI dialog that isn't available in remote mode.`);
1712
+ const kind = (0, cli_commands_1.classifyCliCommand)(cmd);
1713
+ // /compact is CLI-local but cockpit drives compaction through it (PostCompact
1714
+ // clears the running state), so it must reach the CLI -- let it pass through.
1715
+ const passThrough = SessionManager.PTY_FORWARD_LOCAL.has(cmd.replace(/^\//, ""));
1716
+ if (!passThrough && (kind === "local" || kind === "local-jsx")) {
1717
+ const detail = kind === "local-jsx" ? "opens an interactive CLI dialog" : "runs in the CLI only";
1718
+ this.emitSystem(session, sessionId, `"${cmd}" ${detail} and isn't available in remote mode.`);
1529
1719
  return true;
1530
1720
  }
1531
1721
  }
1532
1722
  // All other slash commands pass through to Claude
1533
1723
  return false;
1534
1724
  }
1535
- static DIALOG_COMMANDS = new Set([
1536
- "config",
1537
- "usage",
1538
- "session",
1539
- "stats",
1540
- "doctor",
1541
- "diff",
1542
- "mcp",
1543
- "permissions",
1544
- "hooks",
1545
- "tasks",
1546
- "agents",
1547
- "skills",
1548
- "memory",
1549
- "theme",
1550
- "fast",
1551
- "feedback",
1552
- "copy",
1553
- "branch",
1554
- "plan",
1555
- "chrome",
1556
- "desktop",
1557
- "ide",
1558
- "mobile",
1559
- "bridge",
1560
- "sandbox",
1561
- "export",
1562
- "login",
1563
- "logout",
1564
- "upgrade",
1565
- "rate-limit-options",
1566
- "privacy-settings",
1567
- "terminal-setup",
1568
- "install-github-app",
1569
- "remote-env",
1570
- "remote-setup",
1571
- "resume",
1572
- "add-dir",
1573
- "btw",
1574
- "extra-usage",
1575
- "passes",
1576
- "think-back",
1577
- "ultrareview",
1578
- "tag",
1579
- "exit",
1580
- "effort",
1581
- "color",
1582
- "files",
1583
- ]);
1725
+ // CLI-local commands cockpit intentionally forwards in PTY despite their type,
1726
+ // because their lifecycle is handled (e.g. /compact fires PostCompact, which
1727
+ // clears the running state the same way a Stop hook would).
1728
+ static PTY_FORWARD_LOCAL = new Set(["compact"]);
1584
1729
  static MEDIA_EXT = {
1585
1730
  "image/png": ".png",
1586
1731
  "image/jpeg": ".jpg",
@@ -1784,7 +1929,13 @@ Additional Cockpit rules beyond the CLI's defaults:
1784
1929
  }
1785
1930
  ensureProcess(sessionId) {
1786
1931
  const session = this.sessions.get(sessionId);
1787
- if (!session || session.process || session.ptyRuntime?.isAlive)
1932
+ // `spawning` guards the PTY startup window: the runtime is assigned before
1933
+ // its async start() resolves, and during that window ptyRuntime.isAlive is
1934
+ // false, so a second ensureProcess (a WS reconnect, or a startup race)
1935
+ // would otherwise spawn a duplicate CLI for the same session — two
1936
+ // processes racing on the same --session-id. (Stream sets session.process
1937
+ // synchronously, so it is already covered by that check.)
1938
+ if (!session || session.process || session.ptyRuntime?.isAlive || session.spawning)
1788
1939
  return;
1789
1940
  this.spawnProcess(session, sessionId);
1790
1941
  }
@@ -1805,23 +1956,24 @@ Additional Cockpit rules beyond the CLI's defaults:
1805
1956
  this.spawnPtyProcess(session, sessionId, text, images, documents);
1806
1957
  return;
1807
1958
  }
1808
- this.log(sessionId, `spawning CLI process (resume=${session.hasSpawnedBefore}, model=${session.info.model || "sonnet"})`);
1959
+ const willResume = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
1960
+ this.log(sessionId, `spawning CLI process (resume=${willResume}, model=${session.info.model || "sonnet"})`);
1809
1961
  const args = ["-p", "--verbose", "--output-format", "stream-json", "--input-format", "stream-json"];
1810
1962
  // In plan mode, omit --allow-dangerously-skip-permissions so the CLI
1811
1963
  // natively enforces tool restrictions and sends permission_requests for
1812
1964
  // write tools (which the server auto-denies).
1813
1965
  // Outside plan mode, enable bypass so it can be toggled mid-session.
1814
- if (!session.planMode) {
1966
+ if (!session.planMode && !session.cockpitAgent) {
1815
1967
  args.push("--allow-dangerously-skip-permissions");
1816
1968
  }
1817
1969
  args.push("--permission-prompt-tool", "stdio");
1818
1970
  if (session.planMode) {
1819
1971
  args.push("--permission-mode", "plan");
1820
1972
  }
1821
- else if (session.bypassAllPermissions) {
1973
+ else if (session.bypassAllPermissions && !session.cockpitAgent) {
1822
1974
  args.push("--permission-mode", "bypassPermissions");
1823
1975
  }
1824
- if (session.hasSpawnedBefore || (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
1976
+ if (willResume) {
1825
1977
  args.push("--resume", session.cliSessionId);
1826
1978
  }
1827
1979
  else {
@@ -1849,13 +2001,43 @@ Additional Cockpit rules beyond the CLI's defaults:
1849
2001
  if (models_1.CONTEXT_SIZES[sizeKey].disableEnv) {
1850
2002
  env.CLAUDE_CODE_DISABLE_1M_CONTEXT = "1";
1851
2003
  }
2004
+ else {
2005
+ // 1m: drop any inherited override so cockpit's pick stays authoritative and
2006
+ // a CLAUDE_CODE_DISABLE_1M_CONTEXT in cockpit's own env can't force 200k.
2007
+ delete env.CLAUDE_CODE_DISABLE_1M_CONTEXT;
2008
+ }
1852
2009
  if (session.modelSlots.subagent && session.modelSlots.subagent !== session.modelSlots.main) {
1853
2010
  const resolvedSub = (0, providers_1.resolveProviderModel)(session.modelSlots.subagent);
1854
2011
  env.ANTHROPIC_SMALL_FAST_MODEL = resolvedSub ? resolvedSub.model.modelId : session.modelSlots.subagent;
1855
2012
  }
2013
+ if (session.cockpitAgent) {
2014
+ args.push("--append-system-prompt", cockpit_agent_prompt_1.COCKPIT_AGENT_SYSTEM_PROMPT);
2015
+ const cockpitMcp = (0, singleton_1.getCockpitMcp)();
2016
+ if (cockpitMcp) {
2017
+ if (session.mcpToken) {
2018
+ (0, run_context_1.clearToken)(session.mcpToken);
2019
+ try {
2020
+ (0, node_fs_1.unlinkSync)(node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`));
2021
+ }
2022
+ catch {
2023
+ /* best effort */
2024
+ }
2025
+ }
2026
+ const token = (0, node_crypto_1.randomBytes)(24).toString("hex");
2027
+ if (session.runContext) {
2028
+ (0, run_context_1.registerRunContext)(token, session.runContext);
2029
+ }
2030
+ else {
2031
+ (0, run_context_1.registerAuthToken)(token);
2032
+ }
2033
+ session.mcpToken = token;
2034
+ const configFile = buildMcpConfigArg(cockpitMcp.getUrl(), token);
2035
+ args.push("--mcp-config", configFile.path);
2036
+ }
2037
+ }
1856
2038
  (0, node_fs_1.mkdirSync)(session.info.cwd, { recursive: true });
1857
2039
  const isWin = process.platform === "win32";
1858
- const proc = (0, node_child_process_1.spawn)(getClaudeBin(), args, {
2040
+ const proc = (0, node_child_process_1.spawn)((0, claude_bin_1.getClaudeBin)(), args, {
1859
2041
  cwd: session.info.cwd,
1860
2042
  env,
1861
2043
  stdio: ["pipe", "pipe", "pipe"],
@@ -1863,7 +2045,6 @@ Additional Cockpit rules beyond the CLI's defaults:
1863
2045
  });
1864
2046
  session.process = proc;
1865
2047
  session.stdin = proc.stdin;
1866
- session.hasSpawnedBefore = true;
1867
2048
  this.log(sessionId, `CLI process spawned (pid=${proc.pid})`);
1868
2049
  this.startTodoWatcher(session, sessionId);
1869
2050
  // Send initialize control request before the first user message to get
@@ -1879,7 +2060,7 @@ Additional Cockpit rules beyond the CLI's defaults:
1879
2060
  if (session.planMode) {
1880
2061
  this.sendPermissionMode(session, sessionId, "plan");
1881
2062
  }
1882
- else if (session.bypassAllPermissions) {
2063
+ else if (session.bypassAllPermissions && !session.cockpitAgent) {
1883
2064
  this.sendPermissionMode(session, sessionId, "bypassPermissions");
1884
2065
  }
1885
2066
  if (text) {
@@ -2010,13 +2191,20 @@ Additional Cockpit rules beyond the CLI's defaults:
2010
2191
  session.emitter.emit("error", sessionId, msg);
2011
2192
  return;
2012
2193
  }
2013
- this.log(sessionId, `spawning PTY claude (resume=${session.hasSpawnedBefore}, model=${session.info.model || "sonnet"})`);
2194
+ const willResume = (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd);
2195
+ this.log(sessionId, `spawning PTY claude (resume=${willResume}, model=${session.info.model || "sonnet"})`);
2196
+ const spawnBeginAt = Date.now();
2197
+ (0, debug_logger_1.logDiag)(sessionId, "pty:spawn-begin", {
2198
+ model: session.info.model,
2199
+ hasText: !!text,
2200
+ status: session.info.status,
2201
+ });
2014
2202
  (0, node_fs_1.mkdirSync)(session.info.cwd, { recursive: true });
2015
2203
  const streamState = (0, stream_processor_1.createStreamState)();
2016
2204
  session.streamState = streamState;
2017
2205
  streamState.thinkingStartedAt = Date.now();
2018
2206
  const extraArgs = [];
2019
- if (session.hasSpawnedBefore || (0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
2207
+ if ((0, transcript_1.transcriptExists)(session.cliSessionId, session.info.cwd)) {
2020
2208
  extraArgs.push("--resume", session.cliSessionId);
2021
2209
  }
2022
2210
  else {
@@ -2032,7 +2220,7 @@ Additional Cockpit rules beyond the CLI's defaults:
2032
2220
  if (session.planMode) {
2033
2221
  extraArgs.push("--permission-mode", "plan");
2034
2222
  }
2035
- else if (session.bypassAllPermissions) {
2223
+ else if (session.bypassAllPermissions && !session.cockpitAgent) {
2036
2224
  extraArgs.push("--permission-mode", "bypassPermissions");
2037
2225
  }
2038
2226
  const extraEnv = {};
@@ -2046,12 +2234,37 @@ Additional Cockpit rules beyond the CLI's defaults:
2046
2234
  const resolvedSub = (0, providers_1.resolveProviderModel)(session.modelSlots.subagent);
2047
2235
  extraEnv.ANTHROPIC_SMALL_FAST_MODEL = resolvedSub ? resolvedSub.model.modelId : session.modelSlots.subagent;
2048
2236
  }
2237
+ if (session.cockpitAgent) {
2238
+ extraArgs.push("--append-system-prompt", cockpit_agent_prompt_1.COCKPIT_AGENT_SYSTEM_PROMPT);
2239
+ const cockpitMcp = (0, singleton_1.getCockpitMcp)();
2240
+ if (cockpitMcp) {
2241
+ if (session.mcpToken) {
2242
+ (0, run_context_1.clearToken)(session.mcpToken);
2243
+ try {
2244
+ (0, node_fs_1.unlinkSync)(node_path_1.default.join((0, node_os_1.tmpdir)(), "cockpit-mcp-config", `${session.mcpToken.slice(0, 16)}.json`));
2245
+ }
2246
+ catch {
2247
+ /* best effort */
2248
+ }
2249
+ }
2250
+ const token = (0, node_crypto_1.randomBytes)(24).toString("hex");
2251
+ if (session.runContext) {
2252
+ (0, run_context_1.registerRunContext)(token, session.runContext);
2253
+ }
2254
+ else {
2255
+ (0, run_context_1.registerAuthToken)(token);
2256
+ }
2257
+ session.mcpToken = token;
2258
+ const configFile = buildMcpConfigArg(cockpitMcp.getUrl(), token);
2259
+ extraArgs.push("--mcp-config", configFile.path);
2260
+ }
2261
+ }
2049
2262
  const runtime = new pty_runtime_1.PtyRuntime({
2050
2263
  sessionId,
2051
2264
  cwd: session.info.cwd,
2052
2265
  cliSessionId: session.cliSessionId,
2053
2266
  hookRouter,
2054
- claudeBin: getClaudeBin(),
2267
+ claudeBin: (0, claude_bin_1.getClaudeBin)(),
2055
2268
  extraArgs,
2056
2269
  extraEnv,
2057
2270
  onEvents: (events) => {
@@ -2069,8 +2282,14 @@ Additional Cockpit rules beyond the CLI's defaults:
2069
2282
  if (session.ptyRuntime !== runtime)
2070
2283
  return;
2071
2284
  session.ptyRuntime = null;
2285
+ session.spawning = false;
2072
2286
  session.streamingSnapshot = null;
2073
- (0, debug_logger_1.logDiag)(sessionId, "idle:pty-exit", { exitCode, flushedOnMessageDone: streamState.flushedOnMessageDone });
2287
+ (0, debug_logger_1.logDiag)(sessionId, "idle:pty-exit", {
2288
+ exitCode,
2289
+ signal: signal ?? null,
2290
+ flushedOnMessageDone: streamState.flushedOnMessageDone,
2291
+ sinceSpawnMs: Date.now() - spawnBeginAt,
2292
+ });
2074
2293
  if (session.transcriptWatcher) {
2075
2294
  session.transcriptWatcher.stop();
2076
2295
  session.transcriptWatcher = null;
@@ -2098,7 +2317,7 @@ Additional Cockpit rules beyond the CLI's defaults:
2098
2317
  },
2099
2318
  });
2100
2319
  session.ptyRuntime = runtime;
2101
- session.hasSpawnedBefore = true;
2320
+ (0, debug_logger_1.logDiag)(sessionId, "pty:runtime-assigned", { elapsedMs: Date.now() - spawnBeginAt });
2102
2321
  this.cleanupAttachments(session);
2103
2322
  const attachments = this.writeAttachments(images, documents);
2104
2323
  session.attachmentPaths.push(...attachments);
@@ -2127,19 +2346,38 @@ Additional Cockpit rules beyond the CLI's defaults:
2127
2346
  });
2128
2347
  session.transcriptWatcher = watcher;
2129
2348
  this.startTodoWatcher(session, sessionId);
2349
+ // Set the in-flight guard immediately before start(). Everything above is
2350
+ // synchronous (no re-entrancy is possible until start() yields to the event
2351
+ // loop), so a synchronous throw in the setup above can never strand
2352
+ // spawning=true and permanently block ensureProcess for this session.
2353
+ session.spawning = true;
2130
2354
  runtime
2131
2355
  .start(ptyText)
2132
2356
  .then(() => {
2357
+ session.spawning = false;
2133
2358
  this.log(sessionId, `PTY claude ready (pid=${runtime.pid})`);
2359
+ (0, debug_logger_1.logDiag)(sessionId, "pty:start-resolved", {
2360
+ pid: runtime.pid,
2361
+ elapsedMs: Date.now() - spawnBeginAt,
2362
+ isAlive: runtime.isAlive,
2363
+ status: session.info.status,
2364
+ });
2134
2365
  watcher.start();
2135
2366
  })
2136
2367
  .catch((err) => {
2368
+ session.spawning = false;
2137
2369
  const msg = err instanceof Error ? err.message : String(err);
2138
2370
  this.log(sessionId, `pty runtime start failed: ${msg}`);
2371
+ (0, debug_logger_1.logDiag)(sessionId, "pty:start-rejected", { error: msg, elapsedMs: Date.now() - spawnBeginAt });
2372
+ const dead = session.ptyRuntime;
2139
2373
  session.ptyRuntime = null;
2374
+ // Emit error BEFORE idle: a job's onStatus("idle") maps to success, so an
2375
+ // idle-first order would mark a failed spawn as a successful empty run.
2376
+ session.emitter.emit("error", sessionId, msg);
2140
2377
  session.info.status = "idle";
2141
2378
  session.emitter.emit("status", sessionId, "idle");
2142
- session.emitter.emit("error", sessionId, msg);
2379
+ // Reap the half-started PTY so a failed delivery can't leak an idle CLI.
2380
+ dead?.kill().catch(() => { });
2143
2381
  });
2144
2382
  }
2145
2383
  async loadAgentChildren(session, sessionId, messageId, cwd) {