@alexjbarnes/cockpit 0.1.1 → 0.2.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 (560) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +12 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +51 -3
  5. package/.next/react-loadable-manifest.json +2 -2
  6. package/.next/routes-manifest.json +76 -0
  7. package/.next/server/app/(app)/agents/[name]/page.js +3 -3
  8. package/.next/server/app/(app)/agents/[name]/page.js.nft.json +1 -1
  9. package/.next/server/app/(app)/agents/[name]/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/(app)/agents/page.js +2 -2
  11. package/.next/server/app/(app)/agents/page.js.nft.json +1 -1
  12. package/.next/server/app/(app)/agents/page_client-reference-manifest.js +1 -1
  13. package/.next/server/app/(app)/changes/page.js +2 -2
  14. package/.next/server/app/(app)/changes/page.js.nft.json +1 -1
  15. package/.next/server/app/(app)/changes/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/(app)/claude-md/edit/page.js +2 -2
  17. package/.next/server/app/(app)/claude-md/edit/page.js.nft.json +1 -1
  18. package/.next/server/app/(app)/claude-md/edit/page_client-reference-manifest.js +1 -1
  19. package/.next/server/app/(app)/claude-md/page.js +2 -2
  20. package/.next/server/app/(app)/claude-md/page.js.nft.json +1 -1
  21. package/.next/server/app/(app)/claude-md/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/(app)/commands/[name]/page.js +3 -3
  23. package/.next/server/app/(app)/commands/[name]/page.js.nft.json +1 -1
  24. package/.next/server/app/(app)/commands/[name]/page_client-reference-manifest.js +1 -1
  25. package/.next/server/app/(app)/commands/page.js +2 -2
  26. package/.next/server/app/(app)/commands/page.js.nft.json +1 -1
  27. package/.next/server/app/(app)/commands/page_client-reference-manifest.js +1 -1
  28. package/.next/server/app/(app)/files/page.js +2 -2
  29. package/.next/server/app/(app)/files/page.js.nft.json +1 -1
  30. package/.next/server/app/(app)/files/page_client-reference-manifest.js +1 -1
  31. package/.next/server/app/(app)/hooks/[event]/page.js +3 -3
  32. package/.next/server/app/(app)/hooks/[event]/page.js.nft.json +1 -1
  33. package/.next/server/app/(app)/hooks/[event]/page_client-reference-manifest.js +1 -1
  34. package/.next/server/app/(app)/hooks/page.js +2 -2
  35. package/.next/server/app/(app)/hooks/page.js.nft.json +1 -1
  36. package/.next/server/app/(app)/hooks/page_client-reference-manifest.js +1 -1
  37. package/.next/server/app/(app)/inbox/[id]/page.js +2 -0
  38. package/.next/server/app/(app)/inbox/[id]/page.js.nft.json +1 -0
  39. package/.next/server/app/(app)/inbox/[id]/page_client-reference-manifest.js +1 -0
  40. package/.next/server/app/(app)/inbox/page.js +2 -0
  41. package/.next/server/app/(app)/inbox/page.js.nft.json +1 -0
  42. package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -0
  43. package/.next/server/app/(app)/jobs/[id]/edit/page.js +2 -2
  44. package/.next/server/app/(app)/jobs/[id]/edit/page.js.nft.json +1 -1
  45. package/.next/server/app/(app)/jobs/[id]/edit/page_client-reference-manifest.js +1 -1
  46. package/.next/server/app/(app)/jobs/[id]/page.js +2 -2
  47. package/.next/server/app/(app)/jobs/[id]/page.js.nft.json +1 -1
  48. package/.next/server/app/(app)/jobs/[id]/page_client-reference-manifest.js +1 -1
  49. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js +2 -2
  50. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page.js.nft.json +1 -1
  51. package/.next/server/app/(app)/jobs/[id]/runs/[runId]/page_client-reference-manifest.js +1 -1
  52. package/.next/server/app/(app)/jobs/page.js +2 -2
  53. package/.next/server/app/(app)/jobs/page.js.nft.json +1 -1
  54. package/.next/server/app/(app)/jobs/page_client-reference-manifest.js +1 -1
  55. package/.next/server/app/(app)/mcp-servers/[name]/page.js +2 -2
  56. package/.next/server/app/(app)/mcp-servers/[name]/page.js.nft.json +1 -1
  57. package/.next/server/app/(app)/mcp-servers/[name]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/(app)/mcp-servers/page.js +2 -2
  59. package/.next/server/app/(app)/mcp-servers/page.js.nft.json +1 -1
  60. package/.next/server/app/(app)/mcp-servers/page_client-reference-manifest.js +1 -1
  61. package/.next/server/app/(app)/page.js +2 -2
  62. package/.next/server/app/(app)/page.js.nft.json +1 -1
  63. package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js +9 -9
  65. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page.js.nft.json +1 -1
  66. package/.next/server/app/(app)/reviews/[owner]/[repo]/[number]/page_client-reference-manifest.js +1 -1
  67. package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js +2 -2
  68. package/.next/server/app/(app)/reviews/[owner]/[repo]/page.js.nft.json +1 -1
  69. package/.next/server/app/(app)/reviews/[owner]/[repo]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/(app)/reviews/page.js +2 -2
  71. package/.next/server/app/(app)/reviews/page.js.nft.json +1 -1
  72. package/.next/server/app/(app)/reviews/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/(app)/sessions/[id]/page.js +2 -2
  74. package/.next/server/app/(app)/sessions/[id]/page.js.nft.json +1 -1
  75. package/.next/server/app/(app)/sessions/[id]/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/(app)/settings/notifications/page.js +2 -0
  77. package/.next/server/app/(app)/settings/notifications/page.js.nft.json +1 -0
  78. package/.next/server/app/(app)/settings/notifications/page_client-reference-manifest.js +1 -0
  79. package/.next/server/app/(app)/settings/page.js +2 -2
  80. package/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  81. package/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/(app)/skills/[name]/page.js +3 -3
  83. package/.next/server/app/(app)/skills/[name]/page.js.nft.json +1 -1
  84. package/.next/server/app/(app)/skills/[name]/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/(app)/skills/page.js +2 -2
  86. package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
  87. package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/_global-error/page.js +3 -3
  89. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  90. package/.next/server/app/_global-error.html +1 -1
  91. package/.next/server/app/_global-error.rsc +1 -1
  92. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  93. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  94. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  95. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  96. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  97. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  98. package/.next/server/app/_not-found/page.js +2 -2
  99. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  100. package/.next/server/app/_not-found.html +1 -1
  101. package/.next/server/app/_not-found.rsc +2 -2
  102. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  103. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  104. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  105. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  106. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  107. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  108. package/.next/server/app/agents.html +1 -1
  109. package/.next/server/app/agents.rsc +4 -4
  110. package/.next/server/app/agents.segments/!KGFwcCk/agents/__PAGE__.segment.rsc +2 -2
  111. package/.next/server/app/agents.segments/!KGFwcCk/agents.segment.rsc +1 -1
  112. package/.next/server/app/agents.segments/!KGFwcCk.segment.rsc +2 -2
  113. package/.next/server/app/agents.segments/_full.segment.rsc +4 -4
  114. package/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  115. package/.next/server/app/agents.segments/_index.segment.rsc +2 -2
  116. package/.next/server/app/agents.segments/_tree.segment.rsc +2 -2
  117. package/.next/server/app/api/agents/[name]/route.js +1 -1
  118. package/.next/server/app/api/agents/route.js +1 -1
  119. package/.next/server/app/api/auth/check/route.js +1 -1
  120. package/.next/server/app/api/auth/login/route.js +1 -1
  121. package/.next/server/app/api/auth/setup/route.js +1 -1
  122. package/.next/server/app/api/auth/ws-token/route.js +1 -1
  123. package/.next/server/app/api/btw/route.js +2 -2
  124. package/.next/server/app/api/claude-md/route.js +1 -1
  125. package/.next/server/app/api/commands/[name]/route.js +1 -1
  126. package/.next/server/app/api/commands/route.js +1 -1
  127. package/.next/server/app/api/defaults/route.js +1 -1
  128. package/.next/server/app/api/filesystem/browse/route.js +1 -1
  129. package/.next/server/app/api/filesystem/files/route.js +1 -1
  130. package/.next/server/app/api/filesystem/mkdir/route.js +1 -1
  131. package/.next/server/app/api/filesystem/read/route.js +1 -1
  132. package/.next/server/app/api/git/clone/route.js +1 -1
  133. package/.next/server/app/api/git/commit/route.js +1 -1
  134. package/.next/server/app/api/git/diff/route.js +1 -1
  135. package/.next/server/app/api/git/discard/route.js +1 -1
  136. package/.next/server/app/api/git/generate-message/route.js +2 -2
  137. package/.next/server/app/api/git/push/route.js +1 -1
  138. package/.next/server/app/api/git/status/route.js +1 -1
  139. package/.next/server/app/api/github/file-content/route.js +1 -1
  140. package/.next/server/app/api/github/orgs/route.js +1 -1
  141. package/.next/server/app/api/github/prs/checks/route.js +1 -1
  142. package/.next/server/app/api/github/prs/diff/route.js +1 -1
  143. package/.next/server/app/api/github/prs/review/route.js +1 -1
  144. package/.next/server/app/api/github/prs/route.js +1 -1
  145. package/.next/server/app/api/github/prs/view/route.js +1 -1
  146. package/.next/server/app/api/github/repos/route.js +1 -1
  147. package/.next/server/app/api/github/review-session/route.js +1 -1
  148. package/.next/server/app/api/health/route.js +1 -1
  149. package/.next/server/app/api/hooks/route.js +1 -1
  150. package/.next/server/app/api/inbox/[id]/route.js +5 -0
  151. package/.next/server/app/api/inbox/[id]/route.js.nft.json +1 -0
  152. package/.next/server/app/api/inbox/[id]/route_client-reference-manifest.js +1 -0
  153. package/.next/server/app/api/inbox/route.js +5 -0
  154. package/.next/server/app/api/inbox/route.js.nft.json +1 -0
  155. package/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -0
  156. package/.next/server/app/api/jobs/[id]/route.js +1 -1
  157. package/.next/server/app/api/jobs/[id]/runs/[runId]/route.js +1 -1
  158. package/.next/server/app/api/jobs/[id]/runs/[runId]/transcript/route.js +1 -1
  159. package/.next/server/app/api/jobs/[id]/runs/route.js +1 -1
  160. package/.next/server/app/api/jobs/[id]/trigger/route.js +1 -1
  161. package/.next/server/app/api/jobs/mcp-discover/route.js +1 -1
  162. package/.next/server/app/api/jobs/route.js +1 -1
  163. package/.next/server/app/api/jobs/status/route.js +1 -1
  164. package/.next/server/app/api/mcp-servers/[name]/route.js +1 -1
  165. package/.next/server/app/api/mcp-servers/[name]/test/route.js +1 -1
  166. package/.next/server/app/api/mcp-servers/route.js +1 -1
  167. package/.next/server/app/api/notifications/route.js +1 -0
  168. package/.next/server/app/api/notifications/route.js.nft.json +1 -0
  169. package/.next/server/app/api/notifications/route_client-reference-manifest.js +1 -0
  170. package/.next/server/app/api/notifications/test/route.js +5 -0
  171. package/.next/server/app/api/notifications/test/route.js.nft.json +1 -0
  172. package/.next/server/app/api/notifications/test/route_client-reference-manifest.js +1 -0
  173. package/.next/server/app/api/reviews/pinned/route.js +1 -0
  174. package/.next/server/app/api/reviews/pinned/route.js.nft.json +1 -0
  175. package/.next/server/app/api/reviews/pinned/route_client-reference-manifest.js +1 -0
  176. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  177. package/.next/server/app/api/sessions/[id]/mcp/route.js +1 -1
  178. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  179. package/.next/server/app/api/sessions/[id]/search/route.js +1 -1
  180. package/.next/server/app/api/sessions/bulk-delete/route.js +1 -0
  181. package/.next/server/app/api/sessions/bulk-delete/route.js.nft.json +1 -0
  182. package/.next/server/app/api/sessions/bulk-delete/route_client-reference-manifest.js +1 -0
  183. package/.next/server/app/api/sessions/by-ids/route.js +1 -0
  184. package/.next/server/app/api/sessions/by-ids/route.js.nft.json +1 -0
  185. package/.next/server/app/api/sessions/by-ids/route_client-reference-manifest.js +1 -0
  186. package/.next/server/app/api/sessions/group/route.js +1 -0
  187. package/.next/server/app/api/sessions/group/route.js.nft.json +1 -0
  188. package/.next/server/app/api/sessions/group/route_client-reference-manifest.js +1 -0
  189. package/.next/server/app/api/sessions/pinned/route.js +1 -1
  190. package/.next/server/app/api/sessions/route.js +1 -1
  191. package/.next/server/app/api/sessions/search/route.js +1 -0
  192. package/.next/server/app/api/sessions/search/route.js.nft.json +1 -0
  193. package/.next/server/app/api/sessions/search/route_client-reference-manifest.js +1 -0
  194. package/.next/server/app/api/skills/[name]/route.js +1 -1
  195. package/.next/server/app/api/skills/route.js +1 -1
  196. package/.next/server/app/api/usage/route.js +1 -1
  197. package/.next/server/app/api/version/cockpit/route.js +1 -1
  198. package/.next/server/app/api/version/route.js +2 -2
  199. package/.next/server/app/changes.html +1 -1
  200. package/.next/server/app/changes.rsc +4 -4
  201. package/.next/server/app/changes.segments/!KGFwcCk/changes/__PAGE__.segment.rsc +2 -2
  202. package/.next/server/app/changes.segments/!KGFwcCk/changes.segment.rsc +1 -1
  203. package/.next/server/app/changes.segments/!KGFwcCk.segment.rsc +2 -2
  204. package/.next/server/app/changes.segments/_full.segment.rsc +4 -4
  205. package/.next/server/app/changes.segments/_head.segment.rsc +1 -1
  206. package/.next/server/app/changes.segments/_index.segment.rsc +2 -2
  207. package/.next/server/app/changes.segments/_tree.segment.rsc +2 -2
  208. package/.next/server/app/claude-md/edit.html +1 -1
  209. package/.next/server/app/claude-md/edit.rsc +4 -4
  210. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit/__PAGE__.segment.rsc +2 -2
  211. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md/edit.segment.rsc +1 -1
  212. package/.next/server/app/claude-md/edit.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
  213. package/.next/server/app/claude-md/edit.segments/!KGFwcCk.segment.rsc +2 -2
  214. package/.next/server/app/claude-md/edit.segments/_full.segment.rsc +4 -4
  215. package/.next/server/app/claude-md/edit.segments/_head.segment.rsc +1 -1
  216. package/.next/server/app/claude-md/edit.segments/_index.segment.rsc +2 -2
  217. package/.next/server/app/claude-md/edit.segments/_tree.segment.rsc +2 -2
  218. package/.next/server/app/claude-md.html +1 -1
  219. package/.next/server/app/claude-md.rsc +4 -4
  220. package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md/__PAGE__.segment.rsc +2 -2
  221. package/.next/server/app/claude-md.segments/!KGFwcCk/claude-md.segment.rsc +1 -1
  222. package/.next/server/app/claude-md.segments/!KGFwcCk.segment.rsc +2 -2
  223. package/.next/server/app/claude-md.segments/_full.segment.rsc +4 -4
  224. package/.next/server/app/claude-md.segments/_head.segment.rsc +1 -1
  225. package/.next/server/app/claude-md.segments/_index.segment.rsc +2 -2
  226. package/.next/server/app/claude-md.segments/_tree.segment.rsc +2 -2
  227. package/.next/server/app/commands.html +1 -1
  228. package/.next/server/app/commands.rsc +4 -4
  229. package/.next/server/app/commands.segments/!KGFwcCk/commands/__PAGE__.segment.rsc +2 -2
  230. package/.next/server/app/commands.segments/!KGFwcCk/commands.segment.rsc +1 -1
  231. package/.next/server/app/commands.segments/!KGFwcCk.segment.rsc +2 -2
  232. package/.next/server/app/commands.segments/_full.segment.rsc +4 -4
  233. package/.next/server/app/commands.segments/_head.segment.rsc +1 -1
  234. package/.next/server/app/commands.segments/_index.segment.rsc +2 -2
  235. package/.next/server/app/commands.segments/_tree.segment.rsc +2 -2
  236. package/.next/server/app/files.html +1 -1
  237. package/.next/server/app/files.rsc +4 -4
  238. package/.next/server/app/files.segments/!KGFwcCk/files/__PAGE__.segment.rsc +2 -2
  239. package/.next/server/app/files.segments/!KGFwcCk/files.segment.rsc +1 -1
  240. package/.next/server/app/files.segments/!KGFwcCk.segment.rsc +2 -2
  241. package/.next/server/app/files.segments/_full.segment.rsc +4 -4
  242. package/.next/server/app/files.segments/_head.segment.rsc +1 -1
  243. package/.next/server/app/files.segments/_index.segment.rsc +2 -2
  244. package/.next/server/app/files.segments/_tree.segment.rsc +2 -2
  245. package/.next/server/app/hooks.html +1 -1
  246. package/.next/server/app/hooks.rsc +4 -4
  247. package/.next/server/app/hooks.segments/!KGFwcCk/hooks/__PAGE__.segment.rsc +2 -2
  248. package/.next/server/app/hooks.segments/!KGFwcCk/hooks.segment.rsc +1 -1
  249. package/.next/server/app/hooks.segments/!KGFwcCk.segment.rsc +2 -2
  250. package/.next/server/app/hooks.segments/_full.segment.rsc +4 -4
  251. package/.next/server/app/hooks.segments/_head.segment.rsc +1 -1
  252. package/.next/server/app/hooks.segments/_index.segment.rsc +2 -2
  253. package/.next/server/app/hooks.segments/_tree.segment.rsc +2 -2
  254. package/.next/server/app/inbox.html +1 -0
  255. package/.next/server/app/inbox.meta +16 -0
  256. package/.next/server/app/inbox.rsc +23 -0
  257. package/.next/server/app/inbox.segments/!KGFwcCk/inbox/__PAGE__.segment.rsc +9 -0
  258. package/.next/server/app/inbox.segments/!KGFwcCk/inbox.segment.rsc +5 -0
  259. package/.next/server/app/inbox.segments/!KGFwcCk.segment.rsc +7 -0
  260. package/.next/server/app/inbox.segments/_full.segment.rsc +23 -0
  261. package/.next/server/app/inbox.segments/_head.segment.rsc +6 -0
  262. package/.next/server/app/inbox.segments/_index.segment.rsc +5 -0
  263. package/.next/server/app/inbox.segments/_tree.segment.rsc +2 -0
  264. package/.next/server/app/index.html +1 -1
  265. package/.next/server/app/index.rsc +4 -4
  266. package/.next/server/app/index.segments/!KGFwcCk/__PAGE__.segment.rsc +2 -2
  267. package/.next/server/app/index.segments/!KGFwcCk.segment.rsc +2 -2
  268. package/.next/server/app/index.segments/_full.segment.rsc +4 -4
  269. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  270. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  271. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  272. package/.next/server/app/jobs.html +1 -1
  273. package/.next/server/app/jobs.rsc +4 -4
  274. package/.next/server/app/jobs.segments/!KGFwcCk/jobs/__PAGE__.segment.rsc +2 -2
  275. package/.next/server/app/jobs.segments/!KGFwcCk/jobs.segment.rsc +1 -1
  276. package/.next/server/app/jobs.segments/!KGFwcCk.segment.rsc +2 -2
  277. package/.next/server/app/jobs.segments/_full.segment.rsc +4 -4
  278. package/.next/server/app/jobs.segments/_head.segment.rsc +1 -1
  279. package/.next/server/app/jobs.segments/_index.segment.rsc +2 -2
  280. package/.next/server/app/jobs.segments/_tree.segment.rsc +2 -2
  281. package/.next/server/app/login/page.js +2 -2
  282. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  283. package/.next/server/app/login.html +1 -1
  284. package/.next/server/app/login.rsc +2 -2
  285. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  286. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  287. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  288. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  289. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  290. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  291. package/.next/server/app/mcp-servers.html +1 -1
  292. package/.next/server/app/mcp-servers.rsc +4 -4
  293. package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers/__PAGE__.segment.rsc +2 -2
  294. package/.next/server/app/mcp-servers.segments/!KGFwcCk/mcp-servers.segment.rsc +1 -1
  295. package/.next/server/app/mcp-servers.segments/!KGFwcCk.segment.rsc +2 -2
  296. package/.next/server/app/mcp-servers.segments/_full.segment.rsc +4 -4
  297. package/.next/server/app/mcp-servers.segments/_head.segment.rsc +1 -1
  298. package/.next/server/app/mcp-servers.segments/_index.segment.rsc +2 -2
  299. package/.next/server/app/mcp-servers.segments/_tree.segment.rsc +2 -2
  300. package/.next/server/app/reviews.html +1 -1
  301. package/.next/server/app/reviews.rsc +4 -4
  302. package/.next/server/app/reviews.segments/!KGFwcCk/reviews/__PAGE__.segment.rsc +2 -2
  303. package/.next/server/app/reviews.segments/!KGFwcCk/reviews.segment.rsc +1 -1
  304. package/.next/server/app/reviews.segments/!KGFwcCk.segment.rsc +2 -2
  305. package/.next/server/app/reviews.segments/_full.segment.rsc +4 -4
  306. package/.next/server/app/reviews.segments/_head.segment.rsc +1 -1
  307. package/.next/server/app/reviews.segments/_index.segment.rsc +2 -2
  308. package/.next/server/app/reviews.segments/_tree.segment.rsc +2 -2
  309. package/.next/server/app/settings/notifications.html +1 -0
  310. package/.next/server/app/settings/notifications.meta +17 -0
  311. package/.next/server/app/settings/notifications.rsc +23 -0
  312. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications/__PAGE__.segment.rsc +9 -0
  313. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings/notifications.segment.rsc +5 -0
  314. package/.next/server/app/settings/notifications.segments/!KGFwcCk/settings.segment.rsc +5 -0
  315. package/.next/server/app/settings/notifications.segments/!KGFwcCk.segment.rsc +7 -0
  316. package/.next/server/app/settings/notifications.segments/_full.segment.rsc +23 -0
  317. package/.next/server/app/settings/notifications.segments/_head.segment.rsc +6 -0
  318. package/.next/server/app/settings/notifications.segments/_index.segment.rsc +5 -0
  319. package/.next/server/app/settings/notifications.segments/_tree.segment.rsc +2 -0
  320. package/.next/server/app/settings.html +1 -1
  321. package/.next/server/app/settings.rsc +4 -4
  322. package/.next/server/app/settings.segments/!KGFwcCk/settings/__PAGE__.segment.rsc +2 -2
  323. package/.next/server/app/settings.segments/!KGFwcCk/settings.segment.rsc +1 -1
  324. package/.next/server/app/settings.segments/!KGFwcCk.segment.rsc +2 -2
  325. package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
  326. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  327. package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  328. package/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  329. package/.next/server/app/skills.html +1 -1
  330. package/.next/server/app/skills.rsc +4 -4
  331. package/.next/server/app/skills.segments/!KGFwcCk/skills/__PAGE__.segment.rsc +2 -2
  332. package/.next/server/app/skills.segments/!KGFwcCk/skills.segment.rsc +1 -1
  333. package/.next/server/app/skills.segments/!KGFwcCk.segment.rsc +2 -2
  334. package/.next/server/app/skills.segments/_full.segment.rsc +4 -4
  335. package/.next/server/app/skills.segments/_head.segment.rsc +1 -1
  336. package/.next/server/app/skills.segments/_index.segment.rsc +2 -2
  337. package/.next/server/app/skills.segments/_tree.segment.rsc +2 -2
  338. package/.next/server/app-paths-manifest.json +12 -0
  339. package/.next/server/chunks/1659.js +1 -1
  340. package/.next/server/chunks/1941.js +2 -2
  341. package/.next/server/chunks/1979.js +2 -2
  342. package/.next/server/chunks/2408.js +1 -1
  343. package/.next/server/chunks/2444.js +1 -1
  344. package/.next/server/chunks/3108.js +1 -0
  345. package/.next/server/chunks/4445.js +1 -1
  346. package/.next/server/chunks/{6142.js → 5920.js} +1 -1
  347. package/.next/server/chunks/5965.js +1 -1
  348. package/.next/server/chunks/{9012.js → 7627.js} +3 -3
  349. package/.next/server/middleware-build-manifest.js +1 -1
  350. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  351. package/.next/server/pages/404.html +1 -1
  352. package/.next/server/pages/500.html +1 -1
  353. package/.next/server/server-reference-manifest.json +1 -1
  354. package/.next/static/brzairTqHmHwvfgKpdkYX/_buildManifest.js +1 -0
  355. package/.next/static/chunks/11242-d240a18d4e59390b.js +199 -0
  356. package/.next/static/chunks/3765-a4c7a493ec83f918.js +20 -0
  357. package/.next/static/chunks/{80392.bca860d8b5972706.js → 58011.3de5770e8b0d8759.js} +1 -1
  358. package/.next/static/chunks/{69427.755a0a4013596f7a.js → 69427.0f379c6bdea95405.js} +1 -1
  359. package/.next/static/chunks/75866-76a3987dda1295ae.js +1 -0
  360. package/.next/static/chunks/93273-87110c1449e1e7fd.js +6 -0
  361. package/.next/static/chunks/app/(app)/agents/[name]/{page-44c5691c80f17d38.js → page-3ec9a3460e8e9006.js} +2 -2
  362. package/.next/static/chunks/app/(app)/agents/page-d6d504e7d7757ea2.js +1 -0
  363. package/.next/static/chunks/app/(app)/changes/page-a09bf4742aa8b5ce.js +1 -0
  364. package/.next/static/chunks/app/(app)/claude-md/edit/page-ab42921ba2618dc3.js +1 -0
  365. package/.next/static/chunks/app/(app)/claude-md/page-c4c8b20aa002a94a.js +1 -0
  366. package/.next/static/chunks/app/(app)/commands/[name]/{page-6ef571e73b105248.js → page-2124ffed9a4e95a3.js} +2 -2
  367. package/.next/static/chunks/app/(app)/commands/page-d5bf1bddd17e31dd.js +1 -0
  368. package/.next/static/chunks/app/(app)/files/page-04e4e5bf1ca89945.js +1 -0
  369. package/.next/static/chunks/app/(app)/hooks/[event]/{page-03f85595561b068a.js → page-d988623e739973b5.js} +2 -2
  370. package/.next/static/chunks/app/(app)/hooks/page-818242d7db432578.js +1 -0
  371. package/.next/static/chunks/app/(app)/inbox/[id]/page-c33dc94e309ff117.js +1 -0
  372. package/.next/static/chunks/app/(app)/inbox/page-ca3e1724b5072734.js +1 -0
  373. package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-3a1c927d76333bf0.js +1 -0
  374. package/.next/static/chunks/app/(app)/jobs/[id]/page-8e698e00b90968b0.js +1 -0
  375. package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-f942df0b7c1d280b.js +1 -0
  376. package/.next/static/chunks/app/(app)/jobs/page-7a88cc6ac34550c2.js +1 -0
  377. package/.next/static/chunks/app/(app)/layout-81c1899969de11e6.js +1 -0
  378. package/.next/static/chunks/app/(app)/mcp-servers/[name]/page-3541bf3ccdef9145.js +1 -0
  379. package/.next/static/chunks/app/(app)/mcp-servers/page-3927dfd03d921040.js +1 -0
  380. package/.next/static/chunks/app/(app)/page-594120e0ea1df527.js +1 -0
  381. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-74c23b04f5c3ff88.js +13 -0
  382. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/page-c7473a899c7c59c3.js +1 -0
  383. package/.next/static/chunks/app/(app)/reviews/page-0e6e7395a4f62b50.js +1 -0
  384. package/.next/static/chunks/app/(app)/sessions/[id]/page-435e9fb4dd34007d.js +1 -0
  385. package/.next/static/chunks/app/(app)/settings/notifications/page-a28db2ebc9fd0de8.js +1 -0
  386. package/.next/static/chunks/app/(app)/settings/page-f8ada7997c0d5b03.js +1 -0
  387. package/.next/static/chunks/app/(app)/skills/[name]/{page-e6572062a6ad90df.js → page-5dbe1e7682880145.js} +2 -2
  388. package/.next/static/chunks/app/(app)/skills/page-fd1986ad7e060f4d.js +1 -0
  389. package/.next/static/chunks/app/_global-error/page-65c661eddfc65f5b.js +1 -0
  390. package/.next/static/chunks/app/api/agents/[name]/route-65c661eddfc65f5b.js +1 -0
  391. package/.next/static/chunks/app/api/agents/route-65c661eddfc65f5b.js +1 -0
  392. package/.next/static/chunks/app/api/auth/check/route-65c661eddfc65f5b.js +1 -0
  393. package/.next/static/chunks/app/api/auth/login/route-65c661eddfc65f5b.js +1 -0
  394. package/.next/static/chunks/app/api/auth/setup/route-65c661eddfc65f5b.js +1 -0
  395. package/.next/static/chunks/app/api/auth/ws-token/route-65c661eddfc65f5b.js +1 -0
  396. package/.next/static/chunks/app/api/btw/route-65c661eddfc65f5b.js +1 -0
  397. package/.next/static/chunks/app/api/claude-md/route-65c661eddfc65f5b.js +1 -0
  398. package/.next/static/chunks/app/api/commands/[name]/route-65c661eddfc65f5b.js +1 -0
  399. package/.next/static/chunks/app/api/commands/route-65c661eddfc65f5b.js +1 -0
  400. package/.next/static/chunks/app/api/defaults/route-65c661eddfc65f5b.js +1 -0
  401. package/.next/static/chunks/app/api/filesystem/browse/route-65c661eddfc65f5b.js +1 -0
  402. package/.next/static/chunks/app/api/filesystem/files/route-65c661eddfc65f5b.js +1 -0
  403. package/.next/static/chunks/app/api/filesystem/mkdir/route-65c661eddfc65f5b.js +1 -0
  404. package/.next/static/chunks/app/api/filesystem/read/route-65c661eddfc65f5b.js +1 -0
  405. package/.next/static/chunks/app/api/git/clone/route-65c661eddfc65f5b.js +1 -0
  406. package/.next/static/chunks/app/api/git/commit/route-65c661eddfc65f5b.js +1 -0
  407. package/.next/static/chunks/app/api/git/diff/route-65c661eddfc65f5b.js +1 -0
  408. package/.next/static/chunks/app/api/git/discard/route-65c661eddfc65f5b.js +1 -0
  409. package/.next/static/chunks/app/api/git/generate-message/route-65c661eddfc65f5b.js +1 -0
  410. package/.next/static/chunks/app/api/git/push/route-65c661eddfc65f5b.js +1 -0
  411. package/.next/static/chunks/app/api/git/status/route-65c661eddfc65f5b.js +1 -0
  412. package/.next/static/chunks/app/api/github/file-content/route-65c661eddfc65f5b.js +1 -0
  413. package/.next/static/chunks/app/api/github/orgs/route-65c661eddfc65f5b.js +1 -0
  414. package/.next/static/chunks/app/api/github/prs/checks/route-65c661eddfc65f5b.js +1 -0
  415. package/.next/static/chunks/app/api/github/prs/diff/route-65c661eddfc65f5b.js +1 -0
  416. package/.next/static/chunks/app/api/github/prs/review/route-65c661eddfc65f5b.js +1 -0
  417. package/.next/static/chunks/app/api/github/prs/route-65c661eddfc65f5b.js +1 -0
  418. package/.next/static/chunks/app/api/github/prs/view/route-65c661eddfc65f5b.js +1 -0
  419. package/.next/static/chunks/app/api/github/repos/route-65c661eddfc65f5b.js +1 -0
  420. package/.next/static/chunks/app/api/github/review-session/route-65c661eddfc65f5b.js +1 -0
  421. package/.next/static/chunks/app/api/health/route-65c661eddfc65f5b.js +1 -0
  422. package/.next/static/chunks/app/api/hooks/route-65c661eddfc65f5b.js +1 -0
  423. package/.next/static/chunks/app/api/inbox/[id]/route-65c661eddfc65f5b.js +1 -0
  424. package/.next/static/chunks/app/api/inbox/route-65c661eddfc65f5b.js +1 -0
  425. package/.next/static/chunks/app/api/jobs/[id]/route-65c661eddfc65f5b.js +1 -0
  426. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-65c661eddfc65f5b.js +1 -0
  427. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-65c661eddfc65f5b.js +1 -0
  428. package/.next/static/chunks/app/api/jobs/[id]/runs/route-65c661eddfc65f5b.js +1 -0
  429. package/.next/static/chunks/app/api/jobs/[id]/trigger/route-65c661eddfc65f5b.js +1 -0
  430. package/.next/static/chunks/app/api/jobs/mcp-discover/route-65c661eddfc65f5b.js +1 -0
  431. package/.next/static/chunks/app/api/jobs/route-65c661eddfc65f5b.js +1 -0
  432. package/.next/static/chunks/app/api/jobs/status/route-65c661eddfc65f5b.js +1 -0
  433. package/.next/static/chunks/app/api/mcp-servers/[name]/route-65c661eddfc65f5b.js +1 -0
  434. package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-65c661eddfc65f5b.js +1 -0
  435. package/.next/static/chunks/app/api/mcp-servers/route-65c661eddfc65f5b.js +1 -0
  436. package/.next/static/chunks/app/api/notifications/route-65c661eddfc65f5b.js +1 -0
  437. package/.next/static/chunks/app/api/notifications/test/route-65c661eddfc65f5b.js +1 -0
  438. package/.next/static/chunks/app/api/reviews/pinned/route-65c661eddfc65f5b.js +1 -0
  439. package/.next/static/chunks/app/api/sessions/[id]/context/route-65c661eddfc65f5b.js +1 -0
  440. package/.next/static/chunks/app/api/sessions/[id]/mcp/route-65c661eddfc65f5b.js +1 -0
  441. package/.next/static/chunks/app/api/sessions/[id]/route-65c661eddfc65f5b.js +1 -0
  442. package/.next/static/chunks/app/api/sessions/[id]/search/route-65c661eddfc65f5b.js +1 -0
  443. package/.next/static/chunks/app/api/sessions/bulk-delete/route-65c661eddfc65f5b.js +1 -0
  444. package/.next/static/chunks/app/api/sessions/by-ids/route-65c661eddfc65f5b.js +1 -0
  445. package/.next/static/chunks/app/api/sessions/group/route-65c661eddfc65f5b.js +1 -0
  446. package/.next/static/chunks/app/api/sessions/pinned/route-65c661eddfc65f5b.js +1 -0
  447. package/.next/static/chunks/app/api/sessions/route-65c661eddfc65f5b.js +1 -0
  448. package/.next/static/chunks/app/api/sessions/search/route-65c661eddfc65f5b.js +1 -0
  449. package/.next/static/chunks/app/api/skills/[name]/route-65c661eddfc65f5b.js +1 -0
  450. package/.next/static/chunks/app/api/skills/route-65c661eddfc65f5b.js +1 -0
  451. package/.next/static/chunks/app/api/usage/route-65c661eddfc65f5b.js +1 -0
  452. package/.next/static/chunks/app/api/version/cockpit/route-65c661eddfc65f5b.js +1 -0
  453. package/.next/static/chunks/app/api/version/route-65c661eddfc65f5b.js +1 -0
  454. package/.next/static/chunks/next/dist/client/components/builtin/app-error-65c661eddfc65f5b.js +1 -0
  455. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-65c661eddfc65f5b.js +1 -0
  456. package/.next/static/chunks/next/dist/client/components/builtin/not-found-65c661eddfc65f5b.js +1 -0
  457. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-65c661eddfc65f5b.js +1 -0
  458. package/.next/static/chunks/{webpack-2a5835e108df6f34.js → webpack-3461a05957b13f46.js} +1 -1
  459. package/.next/static/css/f04f303b5708dd90.css +1 -0
  460. package/README.md +14 -4
  461. package/dist/server.js +38 -1
  462. package/dist/src/server/defaults.js +2 -0
  463. package/dist/src/server/inbox.js +132 -0
  464. package/dist/src/server/job-scheduler.js +152 -40
  465. package/dist/src/server/job-storage.js +4 -7
  466. package/dist/src/server/notification-settings.js +39 -0
  467. package/dist/src/server/notifications.js +125 -0
  468. package/dist/src/server/session-manager.js +118 -15
  469. package/dist/src/server/transcript.js +271 -6
  470. package/dist/src/server/ws-handler.js +16 -13
  471. package/package.json +1 -1
  472. package/.next/server/chunks/8346.js +0 -1
  473. package/.next/static/V2EfPtTUC96VYyF12K0om/_buildManifest.js +0 -1
  474. package/.next/static/chunks/22086-756d490e3320ad15.js +0 -1
  475. package/.next/static/chunks/30120-1535e9064b17ce74.js +0 -20
  476. package/.next/static/chunks/66997-652baf5596173fea.js +0 -199
  477. package/.next/static/chunks/93273-c5cb6dcedef67c81.js +0 -6
  478. package/.next/static/chunks/app/(app)/agents/page-4ce7a715bc0145dc.js +0 -1
  479. package/.next/static/chunks/app/(app)/changes/page-84cf4cd3ca347d98.js +0 -1
  480. package/.next/static/chunks/app/(app)/claude-md/edit/page-fb7117171d0f94d2.js +0 -1
  481. package/.next/static/chunks/app/(app)/claude-md/page-9503f1415e660911.js +0 -1
  482. package/.next/static/chunks/app/(app)/commands/page-e8a506da73d1c280.js +0 -1
  483. package/.next/static/chunks/app/(app)/files/page-67a95d351a685d79.js +0 -1
  484. package/.next/static/chunks/app/(app)/hooks/page-5578c83ad353e307.js +0 -1
  485. package/.next/static/chunks/app/(app)/jobs/[id]/edit/page-51d784c59737778c.js +0 -1
  486. package/.next/static/chunks/app/(app)/jobs/[id]/page-7d00e7a01c70a261.js +0 -1
  487. package/.next/static/chunks/app/(app)/jobs/[id]/runs/[runId]/page-665191da233fde19.js +0 -1
  488. package/.next/static/chunks/app/(app)/jobs/page-8b4ee1166a53d5e1.js +0 -1
  489. package/.next/static/chunks/app/(app)/layout-8dad55d6ce637a01.js +0 -1
  490. package/.next/static/chunks/app/(app)/mcp-servers/[name]/page-c30f0d78daf7719e.js +0 -1
  491. package/.next/static/chunks/app/(app)/mcp-servers/page-737b87d338afdb49.js +0 -1
  492. package/.next/static/chunks/app/(app)/page-40052655d2a9a84f.js +0 -1
  493. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/[number]/page-1d9179bf5a4de7a4.js +0 -13
  494. package/.next/static/chunks/app/(app)/reviews/[owner]/[repo]/page-d8a9ee39e7cc056a.js +0 -1
  495. package/.next/static/chunks/app/(app)/reviews/page-098e6e6fe3123e02.js +0 -1
  496. package/.next/static/chunks/app/(app)/sessions/[id]/page-a74f7fe8322678ba.js +0 -1
  497. package/.next/static/chunks/app/(app)/settings/page-1fa46b8ac8e22927.js +0 -1
  498. package/.next/static/chunks/app/(app)/skills/page-8fca8814aa818ae6.js +0 -1
  499. package/.next/static/chunks/app/_global-error/page-b277aba73f9e0212.js +0 -1
  500. package/.next/static/chunks/app/api/agents/[name]/route-b277aba73f9e0212.js +0 -1
  501. package/.next/static/chunks/app/api/agents/route-b277aba73f9e0212.js +0 -1
  502. package/.next/static/chunks/app/api/auth/check/route-b277aba73f9e0212.js +0 -1
  503. package/.next/static/chunks/app/api/auth/login/route-b277aba73f9e0212.js +0 -1
  504. package/.next/static/chunks/app/api/auth/setup/route-b277aba73f9e0212.js +0 -1
  505. package/.next/static/chunks/app/api/auth/ws-token/route-b277aba73f9e0212.js +0 -1
  506. package/.next/static/chunks/app/api/btw/route-b277aba73f9e0212.js +0 -1
  507. package/.next/static/chunks/app/api/claude-md/route-b277aba73f9e0212.js +0 -1
  508. package/.next/static/chunks/app/api/commands/[name]/route-b277aba73f9e0212.js +0 -1
  509. package/.next/static/chunks/app/api/commands/route-b277aba73f9e0212.js +0 -1
  510. package/.next/static/chunks/app/api/defaults/route-b277aba73f9e0212.js +0 -1
  511. package/.next/static/chunks/app/api/filesystem/browse/route-b277aba73f9e0212.js +0 -1
  512. package/.next/static/chunks/app/api/filesystem/files/route-b277aba73f9e0212.js +0 -1
  513. package/.next/static/chunks/app/api/filesystem/mkdir/route-b277aba73f9e0212.js +0 -1
  514. package/.next/static/chunks/app/api/filesystem/read/route-b277aba73f9e0212.js +0 -1
  515. package/.next/static/chunks/app/api/git/clone/route-b277aba73f9e0212.js +0 -1
  516. package/.next/static/chunks/app/api/git/commit/route-b277aba73f9e0212.js +0 -1
  517. package/.next/static/chunks/app/api/git/diff/route-b277aba73f9e0212.js +0 -1
  518. package/.next/static/chunks/app/api/git/discard/route-b277aba73f9e0212.js +0 -1
  519. package/.next/static/chunks/app/api/git/generate-message/route-b277aba73f9e0212.js +0 -1
  520. package/.next/static/chunks/app/api/git/push/route-b277aba73f9e0212.js +0 -1
  521. package/.next/static/chunks/app/api/git/status/route-b277aba73f9e0212.js +0 -1
  522. package/.next/static/chunks/app/api/github/file-content/route-b277aba73f9e0212.js +0 -1
  523. package/.next/static/chunks/app/api/github/orgs/route-b277aba73f9e0212.js +0 -1
  524. package/.next/static/chunks/app/api/github/prs/checks/route-b277aba73f9e0212.js +0 -1
  525. package/.next/static/chunks/app/api/github/prs/diff/route-b277aba73f9e0212.js +0 -1
  526. package/.next/static/chunks/app/api/github/prs/review/route-b277aba73f9e0212.js +0 -1
  527. package/.next/static/chunks/app/api/github/prs/route-b277aba73f9e0212.js +0 -1
  528. package/.next/static/chunks/app/api/github/prs/view/route-b277aba73f9e0212.js +0 -1
  529. package/.next/static/chunks/app/api/github/repos/route-b277aba73f9e0212.js +0 -1
  530. package/.next/static/chunks/app/api/github/review-session/route-b277aba73f9e0212.js +0 -1
  531. package/.next/static/chunks/app/api/health/route-b277aba73f9e0212.js +0 -1
  532. package/.next/static/chunks/app/api/hooks/route-b277aba73f9e0212.js +0 -1
  533. package/.next/static/chunks/app/api/jobs/[id]/route-b277aba73f9e0212.js +0 -1
  534. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/route-b277aba73f9e0212.js +0 -1
  535. package/.next/static/chunks/app/api/jobs/[id]/runs/[runId]/transcript/route-b277aba73f9e0212.js +0 -1
  536. package/.next/static/chunks/app/api/jobs/[id]/runs/route-b277aba73f9e0212.js +0 -1
  537. package/.next/static/chunks/app/api/jobs/[id]/trigger/route-b277aba73f9e0212.js +0 -1
  538. package/.next/static/chunks/app/api/jobs/mcp-discover/route-b277aba73f9e0212.js +0 -1
  539. package/.next/static/chunks/app/api/jobs/route-b277aba73f9e0212.js +0 -1
  540. package/.next/static/chunks/app/api/jobs/status/route-b277aba73f9e0212.js +0 -1
  541. package/.next/static/chunks/app/api/mcp-servers/[name]/route-b277aba73f9e0212.js +0 -1
  542. package/.next/static/chunks/app/api/mcp-servers/[name]/test/route-b277aba73f9e0212.js +0 -1
  543. package/.next/static/chunks/app/api/mcp-servers/route-b277aba73f9e0212.js +0 -1
  544. package/.next/static/chunks/app/api/sessions/[id]/context/route-b277aba73f9e0212.js +0 -1
  545. package/.next/static/chunks/app/api/sessions/[id]/mcp/route-b277aba73f9e0212.js +0 -1
  546. package/.next/static/chunks/app/api/sessions/[id]/route-b277aba73f9e0212.js +0 -1
  547. package/.next/static/chunks/app/api/sessions/[id]/search/route-b277aba73f9e0212.js +0 -1
  548. package/.next/static/chunks/app/api/sessions/pinned/route-b277aba73f9e0212.js +0 -1
  549. package/.next/static/chunks/app/api/sessions/route-b277aba73f9e0212.js +0 -1
  550. package/.next/static/chunks/app/api/skills/[name]/route-b277aba73f9e0212.js +0 -1
  551. package/.next/static/chunks/app/api/skills/route-b277aba73f9e0212.js +0 -1
  552. package/.next/static/chunks/app/api/usage/route-b277aba73f9e0212.js +0 -1
  553. package/.next/static/chunks/app/api/version/cockpit/route-b277aba73f9e0212.js +0 -1
  554. package/.next/static/chunks/app/api/version/route-b277aba73f9e0212.js +0 -1
  555. package/.next/static/chunks/next/dist/client/components/builtin/app-error-b277aba73f9e0212.js +0 -1
  556. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-b277aba73f9e0212.js +0 -1
  557. package/.next/static/chunks/next/dist/client/components/builtin/not-found-b277aba73f9e0212.js +0 -1
  558. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-b277aba73f9e0212.js +0 -1
  559. package/.next/static/css/1e1239c76b265910.css +0 -1
  560. /package/.next/static/{V2EfPtTUC96VYyF12K0om → brzairTqHmHwvfgKpdkYX}/_ssgManifest.js +0 -0
package/dist/server.js CHANGED
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const node_http_1 = require("node:http");
7
+ const node_os_1 = require("node:os");
7
8
  const node_url_1 = require("node:url");
8
9
  const next_1 = __importDefault(require("next"));
9
10
  const auth_1 = require("./src/server/auth");
@@ -16,6 +17,42 @@ const port = parseInt(process.env.PORT || "3001", 10);
16
17
  const host = process.env.HOST || "0.0.0.0";
17
18
  const app = (0, next_1.default)({ dev, hostname: host, port });
18
19
  const handle = app.getRequestHandler();
20
+ function getLanAddresses() {
21
+ const addresses = [];
22
+ const ifaces = (0, node_os_1.networkInterfaces)();
23
+ for (const name of Object.keys(ifaces)) {
24
+ for (const iface of ifaces[name] || []) {
25
+ if (iface.family === "IPv4" && !iface.internal) {
26
+ addresses.push(iface.address);
27
+ }
28
+ }
29
+ }
30
+ return addresses;
31
+ }
32
+ function logStartupBanner() {
33
+ console.log(`Cockpit listening on ${host}:${port}`);
34
+ console.log("");
35
+ console.log("Connect via:");
36
+ const isWildcard = host === "0.0.0.0" || host === "::";
37
+ const isLoopback = host === "127.0.0.1" || host === "localhost" || host === "::1";
38
+ if (isWildcard) {
39
+ console.log(` Local: http://localhost:${port}`);
40
+ const network = getLanAddresses();
41
+ if (network.length > 0) {
42
+ console.log(` Network: http://${network[0]}:${port}`);
43
+ for (let i = 1; i < network.length; i++) {
44
+ console.log(` http://${network[i]}:${port}`);
45
+ }
46
+ }
47
+ }
48
+ else if (isLoopback) {
49
+ console.log(` Local: http://localhost:${port}`);
50
+ }
51
+ else {
52
+ console.log(` Network: http://${host}:${port}`);
53
+ }
54
+ console.log("");
55
+ }
19
56
  async function main() {
20
57
  // Handle password reset flag
21
58
  if (process.env.COCKPIT_RESET_PASSWORD === "true") {
@@ -34,7 +71,7 @@ async function main() {
34
71
  });
35
72
  (0, ws_handler_1.createWebSocketHandler)(server, sessionManager);
36
73
  server.listen(port, host, () => {
37
- console.log(`Cockpit running on http://${host}:${port}`);
74
+ logStartupBanner();
38
75
  if ((0, auth_1.needsSetup)()) {
39
76
  console.log("No password set. Visit the UI to create one.");
40
77
  }
@@ -17,6 +17,8 @@ const fallback = {
17
17
  editExpanded: false,
18
18
  toolCallsExpanded: false,
19
19
  model: "sonnet",
20
+ messageStitching: true,
21
+ reviewsEnabled: true,
20
22
  };
21
23
  function getDefaults() {
22
24
  try {
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getInboxMessages = getInboxMessages;
7
+ exports.getUnreadCount = getUnreadCount;
8
+ exports.addInboxMessage = addInboxMessage;
9
+ exports.markRead = markRead;
10
+ exports.markAllRead = markAllRead;
11
+ exports.deleteInboxMessage = deleteInboxMessage;
12
+ exports.clearInbox = clearInbox;
13
+ exports.parseInboxBlock = parseInboxBlock;
14
+ exports.parseErrorBlock = parseErrorBlock;
15
+ const node_fs_1 = require("node:fs");
16
+ const node_os_1 = require("node:os");
17
+ const node_path_1 = __importDefault(require("node:path"));
18
+ const uuid_1 = require("uuid");
19
+ const notifications_1 = require("./notifications");
20
+ const INBOX_DIR = node_path_1.default.join((0, node_os_1.homedir)(), ".cockpit");
21
+ const INBOX_FILE = node_path_1.default.join(INBOX_DIR, "inbox.jsonl");
22
+ function ensureDir() {
23
+ if (!(0, node_fs_1.existsSync)(INBOX_DIR))
24
+ (0, node_fs_1.mkdirSync)(INBOX_DIR, { recursive: true });
25
+ }
26
+ function readAll() {
27
+ if (!(0, node_fs_1.existsSync)(INBOX_FILE))
28
+ return [];
29
+ const raw = (0, node_fs_1.readFileSync)(INBOX_FILE, "utf-8");
30
+ const messages = [];
31
+ for (const line of raw.split("\n")) {
32
+ if (!line.trim())
33
+ continue;
34
+ try {
35
+ messages.push(JSON.parse(line));
36
+ }
37
+ catch { }
38
+ }
39
+ return messages;
40
+ }
41
+ function writeAll(messages) {
42
+ ensureDir();
43
+ (0, node_fs_1.writeFileSync)(INBOX_FILE, messages.map((m) => JSON.stringify(m)).join("\n") + "\n");
44
+ }
45
+ function getInboxMessages() {
46
+ return readAll().sort((a, b) => b.createdAt - a.createdAt);
47
+ }
48
+ function getUnreadCount() {
49
+ return readAll().filter((m) => !m.read).length;
50
+ }
51
+ function addInboxMessage(msg) {
52
+ const messages = readAll();
53
+ const entry = {
54
+ id: (0, uuid_1.v4)(),
55
+ title: msg.title,
56
+ body: msg.body,
57
+ priority: msg.priority || "info",
58
+ jobId: msg.jobId,
59
+ jobName: msg.jobName,
60
+ runId: msg.runId,
61
+ createdAt: Date.now(),
62
+ read: false,
63
+ };
64
+ messages.push(entry);
65
+ writeAll(messages);
66
+ (0, notifications_1.dispatchNotification)({
67
+ title: entry.title,
68
+ body: entry.body,
69
+ priority: entry.priority,
70
+ source: "inbox",
71
+ url: `/inbox/${entry.id}`,
72
+ providerIds: msg.notifyProviders,
73
+ });
74
+ return entry;
75
+ }
76
+ function markRead(id) {
77
+ const messages = readAll();
78
+ const msg = messages.find((m) => m.id === id);
79
+ if (!msg)
80
+ return false;
81
+ msg.read = true;
82
+ writeAll(messages);
83
+ return true;
84
+ }
85
+ function markAllRead() {
86
+ const messages = readAll();
87
+ for (const m of messages)
88
+ m.read = true;
89
+ writeAll(messages);
90
+ }
91
+ function deleteInboxMessage(id) {
92
+ const messages = readAll();
93
+ const idx = messages.findIndex((m) => m.id === id);
94
+ if (idx === -1)
95
+ return false;
96
+ messages.splice(idx, 1);
97
+ writeAll(messages);
98
+ return true;
99
+ }
100
+ function clearInbox() {
101
+ writeAll([]);
102
+ }
103
+ const INBOX_BLOCK_RE = /```cockpit-inbox\s*\n([\s\S]*?)\n```/;
104
+ function parseInboxBlock(text) {
105
+ const match = INBOX_BLOCK_RE.exec(text);
106
+ if (!match)
107
+ return null;
108
+ try {
109
+ const parsed = JSON.parse(match[1]);
110
+ if (typeof parsed.title !== "string" || typeof parsed.body !== "string")
111
+ return null;
112
+ return { title: parsed.title, body: parsed.body, priority: parsed.priority };
113
+ }
114
+ catch {
115
+ return null;
116
+ }
117
+ }
118
+ const ERROR_BLOCK_RE = /```cockpit-error\s*\n([\s\S]*?)\n```/;
119
+ function parseErrorBlock(text) {
120
+ const match = ERROR_BLOCK_RE.exec(text);
121
+ if (!match)
122
+ return null;
123
+ try {
124
+ const parsed = JSON.parse(match[1]);
125
+ if (typeof parsed.error !== "string")
126
+ return null;
127
+ return { error: parsed.error, details: parsed.details };
128
+ }
129
+ catch {
130
+ return null;
131
+ }
132
+ }
@@ -9,15 +9,60 @@ const node_os_1 = require("node:os");
9
9
  const node_path_1 = __importDefault(require("node:path"));
10
10
  const uuid_1 = require("uuid");
11
11
  const cron_utils_1 = require("./cron-utils");
12
+ const inbox_1 = require("./inbox");
12
13
  const job_storage_1 = require("./job-storage");
14
+ const transcript_1 = require("./transcript");
13
15
  const SCRATCHPAD_DIR = node_path_1.default.join((0, node_os_1.homedir)(), ".cockpit", "jobs");
14
- const JOB_PROMPT_PREFIX = [
16
+ const JOB_PROMPT_HEADER = [
15
17
  "You are running as an autonomous scheduled job. There is no human operator in this session.",
16
18
  "Do not ask clarifying questions. Do not wait for user input. Make reasonable assumptions and proceed.",
17
- "Complete the task fully, then stop. If you cannot complete the task, explain why in your final message.",
19
+ "Complete the task fully, then stop.",
18
20
  "",
19
- "Task:",
21
+ "Error reporting: If you cannot complete the task due to permission errors, tool failures, missing data, or any other reason,",
22
+ "your final message MUST include a cockpit-error block explaining the failure.",
23
+ "Format it as a fenced code block tagged cockpit-error containing a JSON object:",
24
+ "",
25
+ "```cockpit-error",
26
+ '{"error":"Brief description of what went wrong","details":"Longer explanation of which tools failed and why"}',
27
+ "```",
20
28
  ].join("\n");
29
+ function buildJobPrompt(job) {
30
+ const parts = [JOB_PROMPT_HEADER, ""];
31
+ if (job.bypassPermissions) {
32
+ parts.push("Permissions: All tools and MCP servers are available.");
33
+ }
34
+ else {
35
+ const tools = job.allowedTools || [];
36
+ const servers = job.mcpServers || [];
37
+ parts.push("Permissions: Only the tools and MCP servers listed below are allowed. Do not attempt to use any others.");
38
+ if (tools.length > 0)
39
+ parts.push(`Allowed tools: ${tools.join(", ")}`);
40
+ if (servers.length > 0)
41
+ parts.push(`Allowed MCP servers: ${servers.join(", ")}`);
42
+ if (tools.length === 0 && servers.length === 0)
43
+ parts.push("No tools or MCP servers are allowed.");
44
+ }
45
+ if (job.cwd) {
46
+ const storageDir = node_path_1.default.join(SCRATCHPAD_DIR, job.id);
47
+ parts.push("");
48
+ parts.push(`Storage: If you need to persist any files between runs (state, cache, data), save them in ${storageDir}`);
49
+ parts.push("Do not store persistent files in the working directory as it is a git repository.");
50
+ }
51
+ if (job.inboxOutput) {
52
+ parts.push("");
53
+ parts.push("Output: When you have results to report, include a cockpit-inbox block in your final message.");
54
+ parts.push("If there is nothing to report (e.g. no new data to process), do NOT include an inbox block.");
55
+ parts.push("Format it as a fenced code block tagged cockpit-inbox containing a JSON object:");
56
+ parts.push("");
57
+ parts.push("```cockpit-inbox");
58
+ parts.push(JSON.stringify({ title: "Short descriptive title", body: "Markdown body with your full output", priority: "info" }));
59
+ parts.push("```");
60
+ parts.push("");
61
+ parts.push('The body field supports full markdown. Set priority to "info", "warning", or "error" as appropriate.');
62
+ }
63
+ parts.push("", "Task:", job.prompt);
64
+ return parts.join("\n");
65
+ }
21
66
  const SHELL_OPERATORS = /(?:;|&&|\|\||>|<|`|\$\(|<\()/;
22
67
  const BACKGROUND_AMPERSAND = /(?:^|[^|])&(?!&)/;
23
68
  function hasShellOperators(cmd) {
@@ -53,33 +98,41 @@ function isToolAllowed(toolName, toolInput, rules) {
53
98
  }
54
99
  return false;
55
100
  }
101
+ function normalizeMcpName(name) {
102
+ return name.replace(/[^a-zA-Z0-9]/g, "_");
103
+ }
56
104
  function isMcpToolAllowed(toolName, toolInput, enabledServers, mcpToolFilters) {
57
- const match = toolName.match(/^mcp__([^_]+)__(.+)$/);
58
- if (!match)
105
+ if (!toolName.startsWith("mcp__"))
59
106
  return null;
60
- const [, server, tool] = match;
61
- if (!enabledServers.has(server))
62
- return false;
63
- if (!mcpToolFilters || !(server in mcpToolFilters))
64
- return true;
65
- const filters = mcpToolFilters[server];
66
- for (const filter of filters) {
67
- if (filter === tool)
107
+ const remainder = toolName.slice(5);
108
+ for (const serverName of enabledServers) {
109
+ const normalized = normalizeMcpName(serverName);
110
+ const prefix = `${normalized}__`;
111
+ if (!remainder.startsWith(prefix))
112
+ continue;
113
+ const tool = remainder.slice(prefix.length);
114
+ if (!mcpToolFilters || !(serverName in mcpToolFilters))
68
115
  return true;
69
- if (filter.includes(":")) {
70
- let parsed;
71
- try {
72
- parsed = JSON.parse(toolInput);
73
- }
74
- catch {
75
- continue;
76
- }
77
- const [filterServer, filterTool] = filter.split(":", 2);
78
- if (parsed.server === filterServer) {
79
- if (filterTool === "*" || parsed.tool === filterTool)
80
- return true;
116
+ const filters = mcpToolFilters[serverName];
117
+ for (const filter of filters) {
118
+ if (filter === tool)
119
+ return true;
120
+ if (filter.includes(":")) {
121
+ let parsed;
122
+ try {
123
+ parsed = JSON.parse(toolInput);
124
+ }
125
+ catch {
126
+ continue;
127
+ }
128
+ const [filterServer, filterTool] = filter.split(":", 2);
129
+ if (parsed.server === filterServer) {
130
+ if (filterTool === "*" || parsed.tool === filterTool)
131
+ return true;
132
+ }
81
133
  }
82
134
  }
135
+ return false;
83
136
  }
84
137
  return false;
85
138
  }
@@ -119,17 +172,20 @@ class JobScheduler {
119
172
  }
120
173
  recoverState() {
121
174
  (0, job_storage_1.pruneAllRuns)();
175
+ const now = Date.now();
122
176
  const jobs = (0, job_storage_1.loadJobs)();
123
177
  for (const job of jobs) {
124
178
  const latest = (0, job_storage_1.getLatestRun)(job.id);
125
179
  if (latest) {
126
180
  this.lastFiredAt.set(job.id, new Date(latest.startedAt));
127
- if (latest.status === "running") {
128
- latest.status = "failure";
129
- latest.error = "Server restarted while job was running";
130
- latest.completedAt = Date.now();
131
- latest.durationMs = latest.completedAt - latest.startedAt;
132
- (0, job_storage_1.saveRun)(latest);
181
+ }
182
+ for (const run of (0, job_storage_1.loadRuns)(job.id)) {
183
+ if (run.status === "running") {
184
+ run.status = "failure";
185
+ run.error = "Server restarted while job was running";
186
+ run.completedAt = now;
187
+ run.durationMs = now - run.startedAt;
188
+ (0, job_storage_1.saveRun)(run);
133
189
  }
134
190
  }
135
191
  }
@@ -142,6 +198,19 @@ class JobScheduler {
142
198
  this.lastPruneAt = nowMs;
143
199
  (0, job_storage_1.pruneAllRuns)();
144
200
  }
201
+ for (const [jobId, run] of this.runningJobs) {
202
+ if (!this.sessionManager.hasRunningProcess(run.sessionId)) {
203
+ console.log(`[scheduler] run ${run.id} for job ${jobId} has no running process, marking as failure`);
204
+ run.status = "failure";
205
+ run.error = "Session process exited unexpectedly";
206
+ run.completedAt = Date.now();
207
+ run.durationMs = run.completedAt - run.startedAt;
208
+ if (run.cwd)
209
+ run.messageCount = (0, transcript_1.countTranscriptMessages)(run.sessionId, run.cwd);
210
+ (0, job_storage_1.saveRun)(run);
211
+ this.runningJobs.delete(jobId);
212
+ }
213
+ }
145
214
  const jobs = (0, job_storage_1.loadJobs)();
146
215
  for (const job of jobs) {
147
216
  if (!job.enabled)
@@ -175,11 +244,11 @@ class JobScheduler {
175
244
  }
176
245
  async executeJob(job) {
177
246
  const runId = (0, uuid_1.v4)();
178
- const jobCwd = job.cwd || SCRATCHPAD_DIR;
179
- if (!job.cwd) {
180
- (0, node_fs_1.mkdirSync)(SCRATCHPAD_DIR, { recursive: true });
181
- }
182
- const sessionInfo = this.sessionManager.createSession(jobCwd, `[job] ${job.name}`);
247
+ const jobCwd = job.cwd || node_path_1.default.join(SCRATCHPAD_DIR, job.id);
248
+ (0, node_fs_1.mkdirSync)(node_path_1.default.join(SCRATCHPAD_DIR, job.id), { recursive: true });
249
+ const sessionInfo = this.sessionManager.createSession(jobCwd, `[job] ${job.name}`, {
250
+ bypassPermissions: !!job.bypassPermissions,
251
+ });
183
252
  const sessionId = sessionInfo.id;
184
253
  const run = {
185
254
  id: runId,
@@ -195,6 +264,7 @@ class JobScheduler {
195
264
  (0, job_storage_1.saveRun)(run);
196
265
  this.runningJobs.set(job.id, run);
197
266
  const toolTracker = new Map();
267
+ let lastAssistantText = "";
198
268
  const unsubEvent = this.sessionManager.subscribe(sessionId, (event) => {
199
269
  if (event.type === "tool_use_start" && event.toolId) {
200
270
  toolTracker.set(event.toolId, {
@@ -215,14 +285,29 @@ class JobScheduler {
215
285
  }
216
286
  else if (event.type === "message_done") {
217
287
  run.messageCount++;
288
+ if (event.message) {
289
+ let text = event.message.content;
290
+ if (!text && event.message.blocks) {
291
+ text = event.message.blocks
292
+ .filter((b) => b.type === "text")
293
+ .map((b) => b.text)
294
+ .join("\n");
295
+ }
296
+ if (text)
297
+ lastAssistantText = text;
298
+ }
218
299
  }
219
300
  else if (event.type === "permission_request" && event.requestId) {
220
- if (!job.bypassPermissions) {
301
+ if (job.bypassPermissions) {
302
+ this.sessionManager.respondToPermission(sessionId, event.requestId, true, event.rawToolInput);
303
+ }
304
+ else {
221
305
  const toolName = event.toolName || "unknown";
222
306
  const inputStr = event.toolInput || "";
223
307
  const mcpResult = isMcpToolAllowed(toolName, inputStr, enabledServers, job.mcpToolFilters);
224
308
  const allowed = mcpResult !== null ? mcpResult : isToolAllowed(toolName, inputStr, job.allowedTools || []);
225
- this.sessionManager.respondToPermission(sessionId, event.requestId, allowed);
309
+ console.log(`[scheduler] permission: ${toolName} mcpResult=${mcpResult} allowed=${allowed} servers=[${[...enabledServers]}]`);
310
+ this.sessionManager.respondToPermission(sessionId, event.requestId, allowed, allowed ? (event.rawToolInput ?? {}) : undefined);
226
311
  const permEntry = {
227
312
  name: toolName,
228
313
  input: inputStr,
@@ -272,18 +357,45 @@ class JobScheduler {
272
357
  unsubStatus?.();
273
358
  unsubError?.();
274
359
  initCleanup?.();
275
- run.status = finalStatus;
276
360
  run.completedAt = Date.now();
277
361
  run.durationMs = run.completedAt - run.startedAt;
278
362
  if (finalStatus === "timeout") {
279
363
  run.error = `Exceeded max duration of ${job.maxDurationMinutes || 30} minutes`;
280
364
  this.sessionManager.destroySession(sessionId);
281
365
  }
366
+ if (finalStatus === "success" && lastAssistantText) {
367
+ const errorBlock = (0, inbox_1.parseErrorBlock)(lastAssistantText);
368
+ if (errorBlock) {
369
+ finalStatus = "failure";
370
+ run.error = errorBlock.details ? `${errorBlock.error}: ${errorBlock.details}` : errorBlock.error;
371
+ }
372
+ }
373
+ run.status = finalStatus;
374
+ const transcriptCount = (0, transcript_1.countTranscriptMessages)(sessionId, jobCwd);
375
+ if (transcriptCount > run.messageCount)
376
+ run.messageCount = transcriptCount;
282
377
  (0, job_storage_1.saveRun)(run);
378
+ if (job.inboxOutput && lastAssistantText) {
379
+ const inbox = (0, inbox_1.parseInboxBlock)(lastAssistantText);
380
+ if (inbox) {
381
+ (0, inbox_1.addInboxMessage)({ ...inbox, jobId: job.id, jobName: job.name, runId: run.id, notifyProviders: job.notifyProviders });
382
+ }
383
+ }
384
+ if (finalStatus === "failure" || finalStatus === "timeout") {
385
+ (0, inbox_1.addInboxMessage)({
386
+ title: `Job failed: ${job.name}`,
387
+ body: `**Status:** ${finalStatus}\n\n${run.error || "Job failed with no error message"}`,
388
+ priority: "error",
389
+ jobId: job.id,
390
+ jobName: job.name,
391
+ runId: run.id,
392
+ notifyProviders: job.notifyProviders,
393
+ });
394
+ }
283
395
  this.runningJobs.delete(job.id);
284
396
  resolve(run);
285
397
  };
286
- this.sessionManager.sendMessage(sessionId, `${JOB_PROMPT_PREFIX}\n${job.prompt}`);
398
+ this.sessionManager.sendMessage(sessionId, buildJobPrompt(job));
287
399
  });
288
400
  }
289
401
  }
@@ -120,16 +120,13 @@ function getLatestRun(jobId) {
120
120
  return undefined;
121
121
  return runs.reduce((latest, r) => (r.startedAt > latest.startedAt ? r : latest));
122
122
  }
123
- function getRecentFailureCount(withinMs = 24 * 60 * 60 * 1000) {
123
+ function getRecentFailureCount() {
124
124
  const jobs = loadJobs();
125
- const cutoff = Date.now() - withinMs;
126
125
  let count = 0;
127
126
  for (const job of jobs) {
128
- const runs = loadRuns(job.id);
129
- for (const run of runs) {
130
- if (run.startedAt >= cutoff && (run.status === "failure" || run.status === "timeout")) {
131
- count++;
132
- }
127
+ const latest = getLatestRun(job.id);
128
+ if (latest && (latest.status === "failure" || latest.status === "timeout")) {
129
+ count++;
133
130
  }
134
131
  }
135
132
  return count;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getNotificationSettings = getNotificationSettings;
4
+ exports.setNotificationSettings = setNotificationSettings;
5
+ exports.updateNotificationSettings = updateNotificationSettings;
6
+ const node_fs_1 = require("node:fs");
7
+ const node_os_1 = require("node:os");
8
+ const node_path_1 = require("node:path");
9
+ const CONFIG_DIR = (0, node_path_1.join)((0, node_os_1.homedir)(), ".cockpit");
10
+ const CONFIG_FILE = (0, node_path_1.join)(CONFIG_DIR, "notifications.json");
11
+ const fallback = {
12
+ providers: [],
13
+ };
14
+ function getNotificationSettings() {
15
+ try {
16
+ return { ...fallback, ...JSON.parse((0, node_fs_1.readFileSync)(CONFIG_FILE, "utf-8")) };
17
+ }
18
+ catch {
19
+ return { ...fallback };
20
+ }
21
+ }
22
+ function setNotificationSettings(settings) {
23
+ try {
24
+ (0, node_fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
25
+ (0, node_fs_1.writeFileSync)(CONFIG_FILE, JSON.stringify(settings, null, 2) + "\n");
26
+ }
27
+ catch {
28
+ // best effort
29
+ }
30
+ return settings;
31
+ }
32
+ function updateNotificationSettings(partial) {
33
+ const current = getNotificationSettings();
34
+ const updated = { ...current, ...partial };
35
+ if (!(0, node_fs_1.existsSync)(CONFIG_DIR))
36
+ (0, node_fs_1.mkdirSync)(CONFIG_DIR, { recursive: true });
37
+ (0, node_fs_1.writeFileSync)(CONFIG_FILE, JSON.stringify(updated, null, 2) + "\n");
38
+ return updated;
39
+ }
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dispatchNotification = dispatchNotification;
4
+ exports.sendTestNotification = sendTestNotification;
5
+ const notification_settings_1 = require("./notification-settings");
6
+ function buildFullUrl(path, baseUrl) {
7
+ if (!path)
8
+ return undefined;
9
+ if (baseUrl)
10
+ return `${baseUrl.replace(/\/$/, "")}${path}`;
11
+ return path;
12
+ }
13
+ function formatPlainMessage(payload, baseUrl) {
14
+ const priorityTag = payload.priority === "error" ? "[ERROR]" : payload.priority === "warning" ? "[WARN]" : "";
15
+ const prefix = priorityTag ? `${priorityTag} ` : "";
16
+ const url = buildFullUrl(payload.url, baseUrl);
17
+ const link = url ? `\n\n${url}` : "";
18
+ return `${prefix}${payload.title}\n\n${payload.body}${link}`;
19
+ }
20
+ const telegramProvider = {
21
+ async send(payload, config, baseUrl) {
22
+ const text = formatPlainMessage(payload, baseUrl);
23
+ const url = `https://api.telegram.org/bot${config.botToken}/sendMessage`;
24
+ const res = await fetch(url, {
25
+ method: "POST",
26
+ headers: { "Content-Type": "application/json" },
27
+ body: JSON.stringify({
28
+ chat_id: config.chatId,
29
+ text,
30
+ disable_web_page_preview: true,
31
+ }),
32
+ });
33
+ if (!res.ok) {
34
+ const body = await res.text();
35
+ throw new Error(`Telegram API ${res.status}: ${body}`);
36
+ }
37
+ },
38
+ };
39
+ const ntfyProvider = {
40
+ async send(payload, config, baseUrl) {
41
+ const serverUrl = (config.serverUrl || "https://ntfy.sh").replace(/\/$/, "");
42
+ const url = `${serverUrl}/${config.topic}`;
43
+ const fullUrl = buildFullUrl(payload.url, baseUrl);
44
+ const headers = {
45
+ Title: payload.title,
46
+ Priority: payload.priority === "error" ? "urgent" : payload.priority === "warning" ? "high" : "default",
47
+ };
48
+ if (config.token) {
49
+ headers.Authorization = `Bearer ${config.token}`;
50
+ }
51
+ if (fullUrl) {
52
+ headers.Click = fullUrl;
53
+ }
54
+ const res = await fetch(url, {
55
+ method: "POST",
56
+ headers,
57
+ body: payload.body,
58
+ });
59
+ if (!res.ok) {
60
+ const body = await res.text();
61
+ throw new Error(`ntfy ${res.status}: ${body}`);
62
+ }
63
+ },
64
+ };
65
+ function getProvider(type) {
66
+ switch (type) {
67
+ case "telegram":
68
+ return telegramProvider;
69
+ case "ntfy":
70
+ return ntfyProvider;
71
+ default:
72
+ return null;
73
+ }
74
+ }
75
+ function matchesFilter(entry, payload) {
76
+ if (!entry.filter)
77
+ return true;
78
+ if (entry.filter.priorities?.length && !entry.filter.priorities.includes(payload.priority)) {
79
+ return false;
80
+ }
81
+ if (entry.filter.sources?.length && !entry.filter.sources.includes(payload.source)) {
82
+ return false;
83
+ }
84
+ return true;
85
+ }
86
+ function dispatchNotification(payload) {
87
+ const settings = (0, notification_settings_1.getNotificationSettings)();
88
+ for (const entry of settings.providers) {
89
+ if (!entry.enabled)
90
+ continue;
91
+ if (payload.providerIds) {
92
+ if (!payload.providerIds.includes(entry.id))
93
+ continue;
94
+ }
95
+ else {
96
+ if (!matchesFilter(entry, payload))
97
+ continue;
98
+ }
99
+ const provider = getProvider(entry.type);
100
+ if (!provider)
101
+ continue;
102
+ provider.send(payload, entry.config, settings.baseUrl).catch((err) => {
103
+ console.error(`[notifications] ${entry.type}/${entry.name} failed:`, err);
104
+ });
105
+ }
106
+ }
107
+ async function sendTestNotification(entry, baseUrl) {
108
+ const provider = getProvider(entry.type);
109
+ if (!provider)
110
+ return `Unknown provider type: ${entry.type}`;
111
+ const payload = {
112
+ title: "Cockpit Test Notification",
113
+ body: "This is a test notification from Cockpit.",
114
+ priority: "info",
115
+ source: "test",
116
+ url: "/inbox",
117
+ };
118
+ try {
119
+ await provider.send(payload, entry.config, baseUrl);
120
+ return "ok";
121
+ }
122
+ catch (err) {
123
+ return `Failed: ${err instanceof Error ? err.message : String(err)}`;
124
+ }
125
+ }