@surething/cockpit 1.0.241 → 1.0.243

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 (480) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +3 -2
  3. package/.next-prod/build-manifest.json +3 -3
  4. package/.next-prod/prerender-manifest.json +3 -3
  5. package/.next-prod/react-loadable-manifest.json +11 -11
  6. package/.next-prod/routes-manifest.json +6 -0
  7. package/.next-prod/server/app/_global-error/page.js +2 -2
  8. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next-prod/server/app/_global-error.html +1 -1
  10. package/.next-prod/server/app/_global-error.rsc +1 -1
  11. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next-prod/server/app/_not-found/page.js +2 -2
  18. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next-prod/server/app/_not-found.html +2 -2
  20. package/.next-prod/server/app/_not-found.rsc +2 -2
  21. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
  22. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
  24. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  27. package/.next-prod/server/app/api/agent/test/route.js +1 -1
  28. package/.next-prod/server/app/api/bash/route.js +1 -1
  29. package/.next-prod/server/app/api/chat/codex/route.js +2 -2
  30. package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
  31. package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
  32. package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
  33. package/.next-prod/server/app/api/chat/pty-input/route.js +1 -1
  34. package/.next-prod/server/app/api/chat/route.js +1 -1
  35. package/.next-prod/server/app/api/chat/stop/route.js +1 -1
  36. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  37. package/.next-prod/server/app/api/commands/route.js +1 -1
  38. package/.next-prod/server/app/api/comments/route.js +1 -1
  39. package/.next-prod/server/app/api/db/columns/route.js +1 -1
  40. package/.next-prod/server/app/api/db/connect/route.js +2 -2
  41. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  42. package/.next-prod/server/app/api/db/export/route.js +1 -1
  43. package/.next-prod/server/app/api/db/query/route.js +1 -1
  44. package/.next-prod/server/app/api/db/schemas/route.js +2 -2
  45. package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -0
  46. package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -0
  47. package/.next-prod/server/app/api/deepseek/credentials/route_client-reference-manifest.js +1 -0
  48. package/.next-prod/server/app/api/dev/spans/route.js +1 -1
  49. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  50. package/.next-prod/server/app/api/file/route.js +1 -1
  51. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  52. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  53. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  54. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  55. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  56. package/.next-prod/server/app/api/files/index/route.js +1 -1
  57. package/.next-prod/server/app/api/files/init/route.js +1 -1
  58. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  59. package/.next-prod/server/app/api/files/read/route.js +1 -1
  60. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  61. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  62. package/.next-prod/server/app/api/files/save/route.js +1 -1
  63. package/.next-prod/server/app/api/files/search/route.js +1 -1
  64. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  65. package/.next-prod/server/app/api/files/text/route.js +1 -1
  66. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  67. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  68. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  69. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  70. package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
  71. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  72. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  73. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  74. package/.next-prod/server/app/api/git/status/route.js +1 -1
  75. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  76. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  77. package/.next-prod/server/app/api/global-state/route.js +2 -2
  78. package/.next-prod/server/app/api/health/route.js +1 -1
  79. package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
  80. package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
  81. package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
  82. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  83. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  84. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  85. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  86. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  87. package/.next-prod/server/app/api/mysql/columns/route.js +1 -1
  88. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  89. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  90. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  91. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  92. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  93. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  94. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  95. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  96. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  97. package/.next-prod/server/app/api/note/route.js +1 -1
  98. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  99. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  100. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  101. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  102. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  103. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  104. package/.next-prod/server/app/api/preview/[...path]/route.js +1 -1
  105. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  106. package/.next-prod/server/app/api/project-state/route.js +2 -2
  107. package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
  108. package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
  109. package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
  110. package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
  111. package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
  112. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  113. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  114. package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
  115. package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
  116. package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
  117. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  118. package/.next-prod/server/app/api/projects/route.js +1 -1
  119. package/.next-prod/server/app/api/push/public-key/route.js +1 -1
  120. package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
  121. package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
  122. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  123. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  124. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  125. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  126. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  127. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  128. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  129. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  130. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  131. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  132. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  133. package/.next-prod/server/app/api/review/order/route.js +1 -1
  134. package/.next-prod/server/app/api/review/route.js +1 -1
  135. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  136. package/.next-prod/server/app/api/review/users/route.js +1 -1
  137. package/.next-prod/server/app/api/scheduled-tasks/route.js +3 -3
  138. package/.next-prod/server/app/api/services/config/route.js +1 -1
  139. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  140. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  141. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  142. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  143. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  144. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  145. package/.next-prod/server/app/api/sessions/route.js +1 -1
  146. package/.next-prod/server/app/api/settings/route.js +1 -1
  147. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  148. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  149. package/.next-prod/server/app/api/skills/route.js +1 -1
  150. package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
  151. package/.next-prod/server/app/api/snapshots/route.js +1 -1
  152. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  153. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  154. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  155. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  156. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  157. package/.next-prod/server/app/api/version/route.js +1 -1
  158. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  159. package/.next-prod/server/app/m/page.js +2 -2
  160. package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
  161. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  162. package/.next-prod/server/app/page.js +2 -2
  163. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  164. package/.next-prod/server/app/project/page.js +2 -2
  165. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  166. package/.next-prod/server/app/review/[id]/page.js +2 -2
  167. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  168. package/.next-prod/server/app-paths-manifest.json +3 -2
  169. package/.next-prod/server/chunks/2939.js +1 -1
  170. package/.next-prod/server/chunks/304.js +3 -3
  171. package/.next-prod/server/chunks/6955.js +1 -1
  172. package/.next-prod/server/chunks/8916.js +1 -1
  173. package/.next-prod/server/chunks/9658.js +16 -16
  174. package/.next-prod/server/chunks/9830.js +1 -1
  175. package/.next-prod/server/chunks/9989.js +1 -1
  176. package/.next-prod/server/middleware-build-manifest.js +1 -1
  177. package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
  178. package/.next-prod/server/pages/404.html +2 -2
  179. package/.next-prod/server/pages/500.html +1 -1
  180. package/.next-prod/server/server-reference-manifest.json +1 -1
  181. package/.next-prod/static/chunks/1871-560f59face6cdf95.js +25 -0
  182. package/.next-prod/static/chunks/{2501.8a795c737a86ac2f.js → 2501.4e65b56602faa956.js} +1 -1
  183. package/.next-prod/static/chunks/{3304.540e84c28c47b48b.js → 3304.16305e84f4ff6598.js} +1 -1
  184. package/.next-prod/static/chunks/{4523.a6c0a4fb0a46d0bb.js → 4523.aaab4b1bd81167d4.js} +1 -1
  185. package/.next-prod/static/chunks/{4678.9870fc2e3d7d1e5d.js → 4678.867dfae26694be02.js} +1 -1
  186. package/.next-prod/static/chunks/{6729.582a7ca4e74b0aea.js → 6729.77a5381ac8f5c9ae.js} +1 -1
  187. package/.next-prod/static/chunks/{7799.ada4812ac0884dcc.js → 7799.40b047a634f96a24.js} +1 -1
  188. package/.next-prod/static/chunks/9530-60801ba514d5c607.js +15 -0
  189. package/.next-prod/static/chunks/app/_global-error/page-382e54b2d4e69c9e.js +1 -0
  190. package/.next-prod/static/chunks/app/api/agent/test/route-382e54b2d4e69c9e.js +1 -0
  191. package/.next-prod/static/chunks/app/api/bash/route-382e54b2d4e69c9e.js +1 -0
  192. package/.next-prod/static/chunks/app/api/chat/codex/route-382e54b2d4e69c9e.js +1 -0
  193. package/.next-prod/static/chunks/app/api/chat/deepseek/route-382e54b2d4e69c9e.js +1 -0
  194. package/.next-prod/static/chunks/app/api/chat/kimi/route-382e54b2d4e69c9e.js +1 -0
  195. package/.next-prod/static/chunks/app/api/chat/ollama/route-382e54b2d4e69c9e.js +1 -0
  196. package/.next-prod/static/chunks/app/api/chat/pty-input/route-382e54b2d4e69c9e.js +1 -0
  197. package/.next-prod/static/chunks/app/api/chat/route-382e54b2d4e69c9e.js +1 -0
  198. package/.next-prod/static/chunks/app/api/chat/stop/route-382e54b2d4e69c9e.js +1 -0
  199. package/.next-prod/static/chunks/app/api/claude-stats/route-382e54b2d4e69c9e.js +1 -0
  200. package/.next-prod/static/chunks/app/api/commands/route-382e54b2d4e69c9e.js +1 -0
  201. package/.next-prod/static/chunks/app/api/comments/route-382e54b2d4e69c9e.js +1 -0
  202. package/.next-prod/static/chunks/app/api/db/columns/route-382e54b2d4e69c9e.js +1 -0
  203. package/.next-prod/static/chunks/app/api/db/connect/route-382e54b2d4e69c9e.js +1 -0
  204. package/.next-prod/static/chunks/app/api/db/disconnect/route-382e54b2d4e69c9e.js +1 -0
  205. package/.next-prod/static/chunks/app/api/db/export/route-382e54b2d4e69c9e.js +1 -0
  206. package/.next-prod/static/chunks/app/api/db/query/route-382e54b2d4e69c9e.js +1 -0
  207. package/.next-prod/static/chunks/app/api/db/schemas/route-382e54b2d4e69c9e.js +1 -0
  208. package/.next-prod/static/chunks/app/api/deepseek/credentials/route-382e54b2d4e69c9e.js +1 -0
  209. package/.next-prod/static/chunks/app/api/dev/spans/route-382e54b2d4e69c9e.js +1 -0
  210. package/.next-prod/static/chunks/app/api/extension/version/route-382e54b2d4e69c9e.js +1 -0
  211. package/.next-prod/static/chunks/app/api/file/route-382e54b2d4e69c9e.js +1 -0
  212. package/.next-prod/static/chunks/app/api/files/blame/route-382e54b2d4e69c9e.js +1 -0
  213. package/.next-prod/static/chunks/app/api/files/clipboard/route-382e54b2d4e69c9e.js +1 -0
  214. package/.next-prod/static/chunks/app/api/files/copy/route-382e54b2d4e69c9e.js +1 -0
  215. package/.next-prod/static/chunks/app/api/files/delete/route-382e54b2d4e69c9e.js +1 -0
  216. package/.next-prod/static/chunks/app/api/files/expanded/route-382e54b2d4e69c9e.js +1 -0
  217. package/.next-prod/static/chunks/app/api/files/index/route-382e54b2d4e69c9e.js +1 -0
  218. package/.next-prod/static/chunks/app/api/files/init/route-382e54b2d4e69c9e.js +1 -0
  219. package/.next-prod/static/chunks/app/api/files/paste/route-382e54b2d4e69c9e.js +1 -0
  220. package/.next-prod/static/chunks/app/api/files/read/route-382e54b2d4e69c9e.js +1 -0
  221. package/.next-prod/static/chunks/app/api/files/readdir/route-382e54b2d4e69c9e.js +1 -0
  222. package/.next-prod/static/chunks/app/api/files/recent/route-382e54b2d4e69c9e.js +1 -0
  223. package/.next-prod/static/chunks/app/api/files/save/route-382e54b2d4e69c9e.js +1 -0
  224. package/.next-prod/static/chunks/app/api/files/search/route-382e54b2d4e69c9e.js +1 -0
  225. package/.next-prod/static/chunks/app/api/files/stat/route-382e54b2d4e69c9e.js +1 -0
  226. package/.next-prod/static/chunks/app/api/files/text/route-382e54b2d4e69c9e.js +1 -0
  227. package/.next-prod/static/chunks/app/api/git/branch-diff/route-382e54b2d4e69c9e.js +1 -0
  228. package/.next-prod/static/chunks/app/api/git/branches/route-382e54b2d4e69c9e.js +1 -0
  229. package/.next-prod/static/chunks/app/api/git/commit-diff/route-382e54b2d4e69c9e.js +1 -0
  230. package/.next-prod/static/chunks/app/api/git/commits/route-382e54b2d4e69c9e.js +1 -0
  231. package/.next-prod/static/chunks/app/api/git/current-branch/route-382e54b2d4e69c9e.js +1 -0
  232. package/.next-prod/static/chunks/app/api/git/diff/route-382e54b2d4e69c9e.js +1 -0
  233. package/.next-prod/static/chunks/app/api/git/discard/route-382e54b2d4e69c9e.js +1 -0
  234. package/.next-prod/static/chunks/app/api/git/stage/route-382e54b2d4e69c9e.js +1 -0
  235. package/.next-prod/static/chunks/app/api/git/status/route-382e54b2d4e69c9e.js +1 -0
  236. package/.next-prod/static/chunks/app/api/git/unstage/route-382e54b2d4e69c9e.js +1 -0
  237. package/.next-prod/static/chunks/app/api/git/worktree/route-382e54b2d4e69c9e.js +1 -0
  238. package/.next-prod/static/chunks/app/api/global-state/route-382e54b2d4e69c9e.js +1 -0
  239. package/.next-prod/static/chunks/app/api/health/route-382e54b2d4e69c9e.js +1 -0
  240. package/.next-prod/static/chunks/app/api/jupyter/load/route-382e54b2d4e69c9e.js +1 -0
  241. package/.next-prod/static/chunks/app/api/jupyter/save/route-382e54b2d4e69c9e.js +1 -0
  242. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-382e54b2d4e69c9e.js +1 -0
  243. package/.next-prod/static/chunks/app/api/lsp/definition/route-382e54b2d4e69c9e.js +1 -0
  244. package/.next-prod/static/chunks/app/api/lsp/hover/route-382e54b2d4e69c9e.js +1 -0
  245. package/.next-prod/static/chunks/app/api/lsp/references/route-382e54b2d4e69c9e.js +1 -0
  246. package/.next-prod/static/chunks/app/api/lsp/status/route-382e54b2d4e69c9e.js +1 -0
  247. package/.next-prod/static/chunks/app/api/lsp/warmup/route-382e54b2d4e69c9e.js +1 -0
  248. package/.next-prod/static/chunks/app/api/mysql/columns/route-382e54b2d4e69c9e.js +1 -0
  249. package/.next-prod/static/chunks/app/api/mysql/connect/route-382e54b2d4e69c9e.js +1 -0
  250. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-382e54b2d4e69c9e.js +1 -0
  251. package/.next-prod/static/chunks/app/api/mysql/export/route-382e54b2d4e69c9e.js +1 -0
  252. package/.next-prod/static/chunks/app/api/mysql/query/route-382e54b2d4e69c9e.js +1 -0
  253. package/.next-prod/static/chunks/app/api/mysql/schemas/route-382e54b2d4e69c9e.js +1 -0
  254. package/.next-prod/static/chunks/app/api/neo4j/connect/route-382e54b2d4e69c9e.js +1 -0
  255. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-382e54b2d4e69c9e.js +1 -0
  256. package/.next-prod/static/chunks/app/api/neo4j/query/route-382e54b2d4e69c9e.js +1 -0
  257. package/.next-prod/static/chunks/app/api/neo4j/schema/route-382e54b2d4e69c9e.js +1 -0
  258. package/.next-prod/static/chunks/app/api/note/route-382e54b2d4e69c9e.js +1 -0
  259. package/.next-prod/static/chunks/app/api/ollama/models/route-382e54b2d4e69c9e.js +1 -0
  260. package/.next-prod/static/chunks/app/api/ollama/start/route-382e54b2d4e69c9e.js +1 -0
  261. package/.next-prod/static/chunks/app/api/open-cursor/route-382e54b2d4e69c9e.js +1 -0
  262. package/.next-prod/static/chunks/app/api/open-vscode/route-382e54b2d4e69c9e.js +1 -0
  263. package/.next-prod/static/chunks/app/api/pick-folder/route-382e54b2d4e69c9e.js +1 -0
  264. package/.next-prod/static/chunks/app/api/pinned-sessions/route-382e54b2d4e69c9e.js +1 -0
  265. package/.next-prod/static/chunks/app/api/preview/[...path]/route-382e54b2d4e69c9e.js +1 -0
  266. package/.next-prod/static/chunks/app/api/project-settings/route-382e54b2d4e69c9e.js +1 -0
  267. package/.next-prod/static/chunks/app/api/project-state/route-382e54b2d4e69c9e.js +1 -0
  268. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-382e54b2d4e69c9e.js +1 -0
  269. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-382e54b2d4e69c9e.js +1 -0
  270. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-382e54b2d4e69c9e.js +1 -0
  271. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-382e54b2d4e69c9e.js +1 -0
  272. package/.next-prod/static/chunks/app/api/projectGraph/context/route-382e54b2d4e69c9e.js +1 -0
  273. package/.next-prod/static/chunks/app/api/projectGraph/file/route-382e54b2d4e69c9e.js +1 -0
  274. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-382e54b2d4e69c9e.js +1 -0
  275. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-382e54b2d4e69c9e.js +1 -0
  276. package/.next-prod/static/chunks/app/api/projectGraph/related/route-382e54b2d4e69c9e.js +1 -0
  277. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-382e54b2d4e69c9e.js +1 -0
  278. package/.next-prod/static/chunks/app/api/projectGraph/search/route-382e54b2d4e69c9e.js +1 -0
  279. package/.next-prod/static/chunks/app/api/projects/route-382e54b2d4e69c9e.js +1 -0
  280. package/.next-prod/static/chunks/app/api/push/public-key/route-382e54b2d4e69c9e.js +1 -0
  281. package/.next-prod/static/chunks/app/api/push/subscribe/route-382e54b2d4e69c9e.js +1 -0
  282. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-382e54b2d4e69c9e.js +1 -0
  283. package/.next-prod/static/chunks/app/api/redis/command/route-382e54b2d4e69c9e.js +1 -0
  284. package/.next-prod/static/chunks/app/api/redis/connect/route-382e54b2d4e69c9e.js +1 -0
  285. package/.next-prod/static/chunks/app/api/redis/delete/route-382e54b2d4e69c9e.js +1 -0
  286. package/.next-prod/static/chunks/app/api/redis/disconnect/route-382e54b2d4e69c9e.js +1 -0
  287. package/.next-prod/static/chunks/app/api/redis/get/route-382e54b2d4e69c9e.js +1 -0
  288. package/.next-prod/static/chunks/app/api/redis/keys/route-382e54b2d4e69c9e.js +1 -0
  289. package/.next-prod/static/chunks/app/api/redis/set/route-382e54b2d4e69c9e.js +1 -0
  290. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-382e54b2d4e69c9e.js +1 -0
  291. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-382e54b2d4e69c9e.js +1 -0
  292. package/.next-prod/static/chunks/app/api/review/[id]/route-382e54b2d4e69c9e.js +1 -0
  293. package/.next-prod/static/chunks/app/api/review/identify/route-382e54b2d4e69c9e.js +1 -0
  294. package/.next-prod/static/chunks/app/api/review/order/route-382e54b2d4e69c9e.js +1 -0
  295. package/.next-prod/static/chunks/app/api/review/route-382e54b2d4e69c9e.js +1 -0
  296. package/.next-prod/static/chunks/app/api/review/share-info/route-382e54b2d4e69c9e.js +1 -0
  297. package/.next-prod/static/chunks/app/api/review/users/route-382e54b2d4e69c9e.js +1 -0
  298. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-382e54b2d4e69c9e.js +1 -0
  299. package/.next-prod/static/chunks/app/api/services/config/route-382e54b2d4e69c9e.js +1 -0
  300. package/.next-prod/static/chunks/app/api/services/scripts/route-382e54b2d4e69c9e.js +1 -0
  301. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-382e54b2d4e69c9e.js +1 -0
  302. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-382e54b2d4e69c9e.js +1 -0
  303. package/.next-prod/static/chunks/app/api/session-by-path/route-382e54b2d4e69c9e.js +1 -0
  304. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-382e54b2d4e69c9e.js +1 -0
  305. package/.next-prod/static/chunks/app/api/sessions/projects/route-382e54b2d4e69c9e.js +1 -0
  306. package/.next-prod/static/chunks/app/api/sessions/route-382e54b2d4e69c9e.js +1 -0
  307. package/.next-prod/static/chunks/app/api/settings/route-382e54b2d4e69c9e.js +1 -0
  308. package/.next-prod/static/chunks/app/api/skills/[id]/route-382e54b2d4e69c9e.js +1 -0
  309. package/.next-prod/static/chunks/app/api/skills/content/route-382e54b2d4e69c9e.js +1 -0
  310. package/.next-prod/static/chunks/app/api/skills/route-382e54b2d4e69c9e.js +1 -0
  311. package/.next-prod/static/chunks/app/api/snapshots/diff/route-382e54b2d4e69c9e.js +1 -0
  312. package/.next-prod/static/chunks/app/api/snapshots/route-382e54b2d4e69c9e.js +1 -0
  313. package/.next-prod/static/chunks/app/api/terminal/aliases/route-382e54b2d4e69c9e.js +1 -0
  314. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-382e54b2d4e69c9e.js +1 -0
  315. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-382e54b2d4e69c9e.js +1 -0
  316. package/.next-prod/static/chunks/app/api/terminal/env/route-382e54b2d4e69c9e.js +1 -0
  317. package/.next-prod/static/chunks/app/api/terminal/history/route-382e54b2d4e69c9e.js +1 -0
  318. package/.next-prod/static/chunks/app/api/version/route-382e54b2d4e69c9e.js +1 -0
  319. package/.next-prod/static/chunks/app/{layout-fdd40a9f4769a9d2.js → layout-392444ad665c7748.js} +1 -1
  320. package/.next-prod/static/chunks/app/manifest.webmanifest/route-382e54b2d4e69c9e.js +1 -0
  321. package/.next-prod/static/chunks/app/{page-7e283c0e1ba7bf80.js → page-a32d8344284e99cb.js} +1 -1
  322. package/.next-prod/static/chunks/app/project/{page-7e283c0e1ba7bf80.js → page-a32d8344284e99cb.js} +1 -1
  323. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-382e54b2d4e69c9e.js +1 -0
  324. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-382e54b2d4e69c9e.js +1 -0
  325. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-382e54b2d4e69c9e.js +1 -0
  326. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-382e54b2d4e69c9e.js +1 -0
  327. package/.next-prod/static/chunks/{webpack-798abcb0f340ce75.js → webpack-01274185cb710e57.js} +1 -1
  328. package/.next-prod/static/uVjxkHKsDvtbJB0cgsKxl/_buildManifest.js +1 -0
  329. package/.next-prod/trace +13 -13
  330. package/.next-prod/trace-build +1 -1
  331. package/.next-prod/types/app/api/deepseek/credentials/route.ts +351 -0
  332. package/.next-prod/types/routes.d.ts +2 -1
  333. package/.next-prod/types/validator.ts +9 -0
  334. package/dist/{chunk-JDX7Z54G.mjs → chunk-4S76JXBU.mjs} +73 -11
  335. package/dist/{chunk-44DBCDDK.mjs → chunk-NW4I3U26.mjs} +48 -14
  336. package/dist/{chunk-TRQ4S2LT.mjs → chunk-V2ZASC2X.mjs} +1 -1
  337. package/dist/httpApi.mjs +2 -2
  338. package/dist/scheduledTasks.mjs +11 -5
  339. package/dist/{server-UDKNFSZE.mjs → server-YK62AFE6.mjs} +2 -2
  340. package/dist/wsServer.mjs +4 -4
  341. package/package.json +1 -1
  342. package/server.mjs +24 -0
  343. package/.next-prod/static/chunks/5408-e785cb62df051a22.js +0 -25
  344. package/.next-prod/static/chunks/9530-44f82b2151a66f3c.js +0 -15
  345. package/.next-prod/static/chunks/app/_global-error/page-f265b8a7128b7a1a.js +0 -1
  346. package/.next-prod/static/chunks/app/api/agent/test/route-f265b8a7128b7a1a.js +0 -1
  347. package/.next-prod/static/chunks/app/api/bash/route-f265b8a7128b7a1a.js +0 -1
  348. package/.next-prod/static/chunks/app/api/chat/codex/route-f265b8a7128b7a1a.js +0 -1
  349. package/.next-prod/static/chunks/app/api/chat/deepseek/route-f265b8a7128b7a1a.js +0 -1
  350. package/.next-prod/static/chunks/app/api/chat/kimi/route-f265b8a7128b7a1a.js +0 -1
  351. package/.next-prod/static/chunks/app/api/chat/ollama/route-f265b8a7128b7a1a.js +0 -1
  352. package/.next-prod/static/chunks/app/api/chat/pty-input/route-f265b8a7128b7a1a.js +0 -1
  353. package/.next-prod/static/chunks/app/api/chat/route-f265b8a7128b7a1a.js +0 -1
  354. package/.next-prod/static/chunks/app/api/chat/stop/route-f265b8a7128b7a1a.js +0 -1
  355. package/.next-prod/static/chunks/app/api/claude-stats/route-f265b8a7128b7a1a.js +0 -1
  356. package/.next-prod/static/chunks/app/api/commands/route-f265b8a7128b7a1a.js +0 -1
  357. package/.next-prod/static/chunks/app/api/comments/route-f265b8a7128b7a1a.js +0 -1
  358. package/.next-prod/static/chunks/app/api/db/columns/route-f265b8a7128b7a1a.js +0 -1
  359. package/.next-prod/static/chunks/app/api/db/connect/route-f265b8a7128b7a1a.js +0 -1
  360. package/.next-prod/static/chunks/app/api/db/disconnect/route-f265b8a7128b7a1a.js +0 -1
  361. package/.next-prod/static/chunks/app/api/db/export/route-f265b8a7128b7a1a.js +0 -1
  362. package/.next-prod/static/chunks/app/api/db/query/route-f265b8a7128b7a1a.js +0 -1
  363. package/.next-prod/static/chunks/app/api/db/schemas/route-f265b8a7128b7a1a.js +0 -1
  364. package/.next-prod/static/chunks/app/api/dev/spans/route-f265b8a7128b7a1a.js +0 -1
  365. package/.next-prod/static/chunks/app/api/extension/version/route-f265b8a7128b7a1a.js +0 -1
  366. package/.next-prod/static/chunks/app/api/file/route-f265b8a7128b7a1a.js +0 -1
  367. package/.next-prod/static/chunks/app/api/files/blame/route-f265b8a7128b7a1a.js +0 -1
  368. package/.next-prod/static/chunks/app/api/files/clipboard/route-f265b8a7128b7a1a.js +0 -1
  369. package/.next-prod/static/chunks/app/api/files/copy/route-f265b8a7128b7a1a.js +0 -1
  370. package/.next-prod/static/chunks/app/api/files/delete/route-f265b8a7128b7a1a.js +0 -1
  371. package/.next-prod/static/chunks/app/api/files/expanded/route-f265b8a7128b7a1a.js +0 -1
  372. package/.next-prod/static/chunks/app/api/files/index/route-f265b8a7128b7a1a.js +0 -1
  373. package/.next-prod/static/chunks/app/api/files/init/route-f265b8a7128b7a1a.js +0 -1
  374. package/.next-prod/static/chunks/app/api/files/paste/route-f265b8a7128b7a1a.js +0 -1
  375. package/.next-prod/static/chunks/app/api/files/read/route-f265b8a7128b7a1a.js +0 -1
  376. package/.next-prod/static/chunks/app/api/files/readdir/route-f265b8a7128b7a1a.js +0 -1
  377. package/.next-prod/static/chunks/app/api/files/recent/route-f265b8a7128b7a1a.js +0 -1
  378. package/.next-prod/static/chunks/app/api/files/save/route-f265b8a7128b7a1a.js +0 -1
  379. package/.next-prod/static/chunks/app/api/files/search/route-f265b8a7128b7a1a.js +0 -1
  380. package/.next-prod/static/chunks/app/api/files/stat/route-f265b8a7128b7a1a.js +0 -1
  381. package/.next-prod/static/chunks/app/api/files/text/route-f265b8a7128b7a1a.js +0 -1
  382. package/.next-prod/static/chunks/app/api/git/branch-diff/route-f265b8a7128b7a1a.js +0 -1
  383. package/.next-prod/static/chunks/app/api/git/branches/route-f265b8a7128b7a1a.js +0 -1
  384. package/.next-prod/static/chunks/app/api/git/commit-diff/route-f265b8a7128b7a1a.js +0 -1
  385. package/.next-prod/static/chunks/app/api/git/commits/route-f265b8a7128b7a1a.js +0 -1
  386. package/.next-prod/static/chunks/app/api/git/current-branch/route-f265b8a7128b7a1a.js +0 -1
  387. package/.next-prod/static/chunks/app/api/git/diff/route-f265b8a7128b7a1a.js +0 -1
  388. package/.next-prod/static/chunks/app/api/git/discard/route-f265b8a7128b7a1a.js +0 -1
  389. package/.next-prod/static/chunks/app/api/git/stage/route-f265b8a7128b7a1a.js +0 -1
  390. package/.next-prod/static/chunks/app/api/git/status/route-f265b8a7128b7a1a.js +0 -1
  391. package/.next-prod/static/chunks/app/api/git/unstage/route-f265b8a7128b7a1a.js +0 -1
  392. package/.next-prod/static/chunks/app/api/git/worktree/route-f265b8a7128b7a1a.js +0 -1
  393. package/.next-prod/static/chunks/app/api/global-state/route-f265b8a7128b7a1a.js +0 -1
  394. package/.next-prod/static/chunks/app/api/health/route-f265b8a7128b7a1a.js +0 -1
  395. package/.next-prod/static/chunks/app/api/jupyter/load/route-f265b8a7128b7a1a.js +0 -1
  396. package/.next-prod/static/chunks/app/api/jupyter/save/route-f265b8a7128b7a1a.js +0 -1
  397. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-f265b8a7128b7a1a.js +0 -1
  398. package/.next-prod/static/chunks/app/api/lsp/definition/route-f265b8a7128b7a1a.js +0 -1
  399. package/.next-prod/static/chunks/app/api/lsp/hover/route-f265b8a7128b7a1a.js +0 -1
  400. package/.next-prod/static/chunks/app/api/lsp/references/route-f265b8a7128b7a1a.js +0 -1
  401. package/.next-prod/static/chunks/app/api/lsp/status/route-f265b8a7128b7a1a.js +0 -1
  402. package/.next-prod/static/chunks/app/api/lsp/warmup/route-f265b8a7128b7a1a.js +0 -1
  403. package/.next-prod/static/chunks/app/api/mysql/columns/route-f265b8a7128b7a1a.js +0 -1
  404. package/.next-prod/static/chunks/app/api/mysql/connect/route-f265b8a7128b7a1a.js +0 -1
  405. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-f265b8a7128b7a1a.js +0 -1
  406. package/.next-prod/static/chunks/app/api/mysql/export/route-f265b8a7128b7a1a.js +0 -1
  407. package/.next-prod/static/chunks/app/api/mysql/query/route-f265b8a7128b7a1a.js +0 -1
  408. package/.next-prod/static/chunks/app/api/mysql/schemas/route-f265b8a7128b7a1a.js +0 -1
  409. package/.next-prod/static/chunks/app/api/neo4j/connect/route-f265b8a7128b7a1a.js +0 -1
  410. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-f265b8a7128b7a1a.js +0 -1
  411. package/.next-prod/static/chunks/app/api/neo4j/query/route-f265b8a7128b7a1a.js +0 -1
  412. package/.next-prod/static/chunks/app/api/neo4j/schema/route-f265b8a7128b7a1a.js +0 -1
  413. package/.next-prod/static/chunks/app/api/note/route-f265b8a7128b7a1a.js +0 -1
  414. package/.next-prod/static/chunks/app/api/ollama/models/route-f265b8a7128b7a1a.js +0 -1
  415. package/.next-prod/static/chunks/app/api/ollama/start/route-f265b8a7128b7a1a.js +0 -1
  416. package/.next-prod/static/chunks/app/api/open-cursor/route-f265b8a7128b7a1a.js +0 -1
  417. package/.next-prod/static/chunks/app/api/open-vscode/route-f265b8a7128b7a1a.js +0 -1
  418. package/.next-prod/static/chunks/app/api/pick-folder/route-f265b8a7128b7a1a.js +0 -1
  419. package/.next-prod/static/chunks/app/api/pinned-sessions/route-f265b8a7128b7a1a.js +0 -1
  420. package/.next-prod/static/chunks/app/api/preview/[...path]/route-f265b8a7128b7a1a.js +0 -1
  421. package/.next-prod/static/chunks/app/api/project-settings/route-f265b8a7128b7a1a.js +0 -1
  422. package/.next-prod/static/chunks/app/api/project-state/route-f265b8a7128b7a1a.js +0 -1
  423. package/.next-prod/static/chunks/app/api/projectGraph/affected/route-f265b8a7128b7a1a.js +0 -1
  424. package/.next-prod/static/chunks/app/api/projectGraph/callees/route-f265b8a7128b7a1a.js +0 -1
  425. package/.next-prod/static/chunks/app/api/projectGraph/callers/route-f265b8a7128b7a1a.js +0 -1
  426. package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-f265b8a7128b7a1a.js +0 -1
  427. package/.next-prod/static/chunks/app/api/projectGraph/context/route-f265b8a7128b7a1a.js +0 -1
  428. package/.next-prod/static/chunks/app/api/projectGraph/file/route-f265b8a7128b7a1a.js +0 -1
  429. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-f265b8a7128b7a1a.js +0 -1
  430. package/.next-prod/static/chunks/app/api/projectGraph/impact/route-f265b8a7128b7a1a.js +0 -1
  431. package/.next-prod/static/chunks/app/api/projectGraph/related/route-f265b8a7128b7a1a.js +0 -1
  432. package/.next-prod/static/chunks/app/api/projectGraph/risk/route-f265b8a7128b7a1a.js +0 -1
  433. package/.next-prod/static/chunks/app/api/projectGraph/search/route-f265b8a7128b7a1a.js +0 -1
  434. package/.next-prod/static/chunks/app/api/projects/route-f265b8a7128b7a1a.js +0 -1
  435. package/.next-prod/static/chunks/app/api/push/public-key/route-f265b8a7128b7a1a.js +0 -1
  436. package/.next-prod/static/chunks/app/api/push/subscribe/route-f265b8a7128b7a1a.js +0 -1
  437. package/.next-prod/static/chunks/app/api/push/unsubscribe/route-f265b8a7128b7a1a.js +0 -1
  438. package/.next-prod/static/chunks/app/api/redis/command/route-f265b8a7128b7a1a.js +0 -1
  439. package/.next-prod/static/chunks/app/api/redis/connect/route-f265b8a7128b7a1a.js +0 -1
  440. package/.next-prod/static/chunks/app/api/redis/delete/route-f265b8a7128b7a1a.js +0 -1
  441. package/.next-prod/static/chunks/app/api/redis/disconnect/route-f265b8a7128b7a1a.js +0 -1
  442. package/.next-prod/static/chunks/app/api/redis/get/route-f265b8a7128b7a1a.js +0 -1
  443. package/.next-prod/static/chunks/app/api/redis/keys/route-f265b8a7128b7a1a.js +0 -1
  444. package/.next-prod/static/chunks/app/api/redis/set/route-f265b8a7128b7a1a.js +0 -1
  445. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-f265b8a7128b7a1a.js +0 -1
  446. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-f265b8a7128b7a1a.js +0 -1
  447. package/.next-prod/static/chunks/app/api/review/[id]/route-f265b8a7128b7a1a.js +0 -1
  448. package/.next-prod/static/chunks/app/api/review/identify/route-f265b8a7128b7a1a.js +0 -1
  449. package/.next-prod/static/chunks/app/api/review/order/route-f265b8a7128b7a1a.js +0 -1
  450. package/.next-prod/static/chunks/app/api/review/route-f265b8a7128b7a1a.js +0 -1
  451. package/.next-prod/static/chunks/app/api/review/share-info/route-f265b8a7128b7a1a.js +0 -1
  452. package/.next-prod/static/chunks/app/api/review/users/route-f265b8a7128b7a1a.js +0 -1
  453. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-f265b8a7128b7a1a.js +0 -1
  454. package/.next-prod/static/chunks/app/api/services/config/route-f265b8a7128b7a1a.js +0 -1
  455. package/.next-prod/static/chunks/app/api/services/scripts/route-f265b8a7128b7a1a.js +0 -1
  456. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-f265b8a7128b7a1a.js +0 -1
  457. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-f265b8a7128b7a1a.js +0 -1
  458. package/.next-prod/static/chunks/app/api/session-by-path/route-f265b8a7128b7a1a.js +0 -1
  459. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-f265b8a7128b7a1a.js +0 -1
  460. package/.next-prod/static/chunks/app/api/sessions/projects/route-f265b8a7128b7a1a.js +0 -1
  461. package/.next-prod/static/chunks/app/api/sessions/route-f265b8a7128b7a1a.js +0 -1
  462. package/.next-prod/static/chunks/app/api/settings/route-f265b8a7128b7a1a.js +0 -1
  463. package/.next-prod/static/chunks/app/api/skills/[id]/route-f265b8a7128b7a1a.js +0 -1
  464. package/.next-prod/static/chunks/app/api/skills/content/route-f265b8a7128b7a1a.js +0 -1
  465. package/.next-prod/static/chunks/app/api/skills/route-f265b8a7128b7a1a.js +0 -1
  466. package/.next-prod/static/chunks/app/api/snapshots/diff/route-f265b8a7128b7a1a.js +0 -1
  467. package/.next-prod/static/chunks/app/api/snapshots/route-f265b8a7128b7a1a.js +0 -1
  468. package/.next-prod/static/chunks/app/api/terminal/aliases/route-f265b8a7128b7a1a.js +0 -1
  469. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-f265b8a7128b7a1a.js +0 -1
  470. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-f265b8a7128b7a1a.js +0 -1
  471. package/.next-prod/static/chunks/app/api/terminal/env/route-f265b8a7128b7a1a.js +0 -1
  472. package/.next-prod/static/chunks/app/api/terminal/history/route-f265b8a7128b7a1a.js +0 -1
  473. package/.next-prod/static/chunks/app/api/version/route-f265b8a7128b7a1a.js +0 -1
  474. package/.next-prod/static/chunks/app/manifest.webmanifest/route-f265b8a7128b7a1a.js +0 -1
  475. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-f265b8a7128b7a1a.js +0 -1
  476. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-f265b8a7128b7a1a.js +0 -1
  477. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-f265b8a7128b7a1a.js +0 -1
  478. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-f265b8a7128b7a1a.js +0 -1
  479. package/.next-prod/static/x_Nlb9WAVX__4ygoUBUWt/_buildManifest.js +0 -1
  480. /package/.next-prod/static/{x_Nlb9WAVX__4ygoUBUWt → uVjxkHKsDvtbJB0cgsKxl}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=7447,a.ids=[7447],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},4926:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>n,fA:()=>m,fG:()=>o});var e=c(89705),f=c(33265),g=c(92540),h=c(38205),i=c(4253),j=c(72891),k=c(770),l=a([j,f,h]);[j,f,h]=l.then?(await l)():l;let m="nodejs",n="force-dynamic",o=(0,j.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("qname")??"",l=b.get("filePath")??void 0,m=Math.min(Math.max(parseInt(b.get("depth")??"2",10)||2,1),5),n=Math.min(Math.max(parseInt(b.get("topK")??"20",10)||20,1),50),o=yield*e.ivC(()=>(0,i.nw)(c));if(!o.ok)return yield*e.fJG(new k.yI({field:"cwd",reason:o.reason}));if(d.trim().length<1)return yield*e.fJG(new k.yI({field:"qname",reason:"missing"}));let p=o.abs,q=yield*e.$mh({try:async()=>{let a=await (0,f.u$)(p),b=(0,g.getOrTriggerAnalytics)(p,a);return await (0,h.T)(a,b,{qname:d,filePath:l,depth:m,topK:n})},catch:a=>new k.uV({message:"Risk analysis failed",cause:a})});return(0,j.ok)(q)}));d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},12629:a=>{a.exports=import("web-tree-sitter")},13278:(a,b,c)=>{c.d(b,{c:()=>i,j:()=>h});var d=c(31421);let e=(0,c(57975).promisify)(d.exec);async function f(a,b,c,d="commit"){let g,h="---SEP---";try{var i;g=(await e(`git log -n ${c} ${"merge"===d?"--merges --first-parent --name-only":"--follow --name-only"} --pretty=format:'${h}%H|%cI' -- ${(i=b,`'${i.replace(/'/g,"'\\''")}'`)}`,{cwd:a,maxBuffer:0x3200000})).stdout}catch{return{history:[],totalCommits:0}}let j=[];for(let a of g.split(h).slice(1)){let b=a.split("\n"),c=b[0],d=c.indexOf("|");if(d<0)continue;let e=c.slice(0,d),f=c.slice(d+1),g=b.slice(1).map(a=>a.trim()).filter(Boolean);e&&j.push({hash:e,date:f,files:g})}let k=new Map;for(let a of j)if(0!==a.files.length&&!(a.files.length>30))for(let c of a.files){if(c===b)continue;let d=k.get(c);d?(d.cooccurrence+=1,a.date>d.lastCoEdit&&(d.lastCoEdit=a.date)):k.set(c,{file:c,cooccurrence:1,lastCoEdit:a.date})}return{history:Array.from(k.values()).sort((a,b)=>b.cooccurrence-a.cooccurrence||b.lastCoEdit.localeCompare(a.lastCoEdit)||a.file.localeCompare(b.file)),totalCommits:j.length}}async function g(a,b){let c;try{c=(await e("git -c core.quotePath=false status --porcelain",{cwd:a,maxBuffer:0xa00000})).stdout}catch{return[]}let d=[];for(let a of c.split("\n")){if(a.length<4)continue;let b=a[0],c=a[1];if("?"===b&&"?"===c)continue;let e=a.slice(3).trim(),f=e.indexOf(" -> ");f>=0&&(e=e.slice(f+4).trim()),e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1)),d.push(e)}return d.includes(b)?d.filter(a=>a!==b).sort((a,b)=>a.localeCompare(b)):[]}async function h(a,b,c=100,d="commit"){let e=Math.min(Math.max(c,1),1e3),[{history:i,totalCommits:j},k]=await Promise.all([f(a,b,e,d),g(a,b)]);return{target:b,totalCommits:j,history:i,uncommitted:k}}async function i(a,b,c=100){let d=await h(a,b,c,"commit");return d.history.length>0?d:await h(a,b,c,"merge")}},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},27938:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(37107),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projectGraph/risk/route",pathname:"/api/projectGraph/risk",filename:"route",bundlePath:"app/api/projectGraph/risk/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projectGraph/risk/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projectGraph/risk/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},37107:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>f.fG,dynamic:()=>f.OR,runtime:()=>f.fA});var e=c(64949),f=c(4926),g=a([e,f]);[e,f]=g.then?(await g)():g,(0,e.g)(),d()}catch(a){d(a)}})},38205:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{T:()=>l});var e=c(76760),f=c.n(e),g=c(33265),h=c(13278),i=c(37730),j=a([g]);g=(j.then?(await j)():j)[0];let m=/^__(imports?|code_\d+_\d+|filler|file)/,n=/\.(test|spec)\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs)$/i;function k(a,b){let c=f().posix.dirname(a),d=f().posix.basename(a).replace(/\.[^.]+$/,""),e=[];for(let a of b)n.test(a)&&(f().posix.dirname(a)===c&&f().posix.basename(a).replace(/\.(test|spec)\.[^.]+$/i,"")===d&&e.push(a),f().posix.dirname(a)===f().posix.join(c,"__tests__")&&f().posix.basename(a).replace(/\.(test|spec)\.[^.]+$/i,"")===d&&e.push(a));return e}async function l(a,b,c){var d;let e=Math.min(Math.max(c.depth??2,1),5),f=Math.min(Math.max(c.topK??20,1),50),j=(0,g.J)(a,c.qname,e,c.filePath);if(!j.target)return{target:null,totalImpactedNodes:0,highRisk:[],suggestedTests:[],coedit:[],degraded:!b,degradedReason:b?void 0:"analytics-warming"};let l=j.target,o=new Map,p=!0;try{let b=await (0,h.c)(a.cwd,l.filePath,100),c=b.totalCommits;for(let a of b.history)o.set(a.file,{cooccurrence:a.cooccurrence,total:c});(0===c||0===b.history.length)&&(p=!1)}catch{p=!1}let q=0;if(b)for(let a of b.pagerank.values())a>q&&(q=a);let r=[];for(let f of j.nodes){if(0===f.depth||(d=f.symbol.qualifiedName,m.test(d)))continue;let g=f.symbol,h=1;if(1===f.depth){let b=a.files.get(g.filePath);if(b){let a=0;for(let d of b.intraCalls)d.from===g.qualifiedName&&d.to===c.qname&&(a+=d.lines.length);for(let d of b.outgoingCalls)d.from===g.qualifiedName&&d.to.qualifiedName===c.qname&&d.to.filePath===l.filePath&&(a+=d.lines.length);h=Math.max(1,a)}}let j=o.get(g.filePath),n=j&&j.total>0?j.cooccurrence/j.total:0,s=k(g.filePath,a.fileSet).length>0,t=b?b.pagerank.get((0,i.I)(g.filePath,g.qualifiedName))??0:0,u=q>0?t/q:0,v=Math.min(1,h/10),w=1/Math.max(1,f.depth),x=p?.3:.4,y=.25*!!p,z=p?.2:.35,A=w*(x*v+y*n+!s*z+.25*u),B=[];A>=.5&&B.push("high-risk"),s||B.push("untested"),n>=.4&&B.push("frequent-coedit"),u>=.5&&B.push("core"),f.depth>=e&&B.push("leaf"),r.push({filePath:g.filePath,qualifiedName:g.qualifiedName,name:g.name,kind:g.kind,startLine:g.startLine,endLine:g.endLine,depth:f.depth,risk:{score:A,callFreq:h,coeditProb:n,hasTest:s,pagerank:t},tags:B})}r.sort((a,b)=>b.risk.score-a.risk.score||a.depth-b.depth||a.filePath.localeCompare(b.filePath)||a.qualifiedName.localeCompare(b.qualifiedName)||a.startLine-b.startLine);let s=r.slice(0,f),t=new Map;for(let b of s)for(let c of k(b.filePath,a.fileSet)){let a=t.get(c);a||(a={filePath:c,reason:"direct-test",coveredNodes:[]},t.set(c,a)),a.coveredNodes.push(b.qualifiedName)}for(let[a]of o)n.test(a)&&(t.has(a)||t.set(a,{filePath:a,reason:"coedit-history",coveredNodes:[]}));let u=!b||!p,v=b?p?void 0:"coedit-unavailable":"analytics-warming",w=[];for(let[a,b]of o)0!==b.total&&w.push({filePath:a,cooccurrence:b.cooccurrence,totalCommits:b.total,probability:b.cooccurrence/b.total});return w.sort((a,b)=>b.cooccurrence-a.cooccurrence||a.filePath.localeCompare(b.filePath)),{target:l,totalImpactedNodes:j.nodes.length-1,highRisk:s,suggestedTests:Array.from(t.values()),coedit:w.slice(0,30),degraded:u,degradedReason:v}}d()}catch(a){d(a)}})},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,4008,304,2939,2540],()=>b(b.s=27938));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=7447,a.ids=[7447],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},4926:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>n,fA:()=>m,fG:()=>o});var e=c(89705),f=c(33265),g=c(92540),h=c(38205),i=c(4253),j=c(72891),k=c(770),l=a([j,f,h]);[j,f,h]=l.then?(await l)():l;let m="nodejs",n="force-dynamic",o=(0,j.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("qname")??"",l=b.get("filePath")??void 0,m=Math.min(Math.max(parseInt(b.get("depth")??"2",10)||2,1),5),n=Math.min(Math.max(parseInt(b.get("topK")??"20",10)||20,1),50),o=yield*e.ivC(()=>(0,i.nw)(c));if(!o.ok)return yield*e.fJG(new k.yI({field:"cwd",reason:o.reason}));if(d.trim().length<1)return yield*e.fJG(new k.yI({field:"qname",reason:"missing"}));let p=o.abs,q=yield*e.$mh({try:async()=>{let a=await (0,f.u$)(p),b=(0,g.getOrTriggerAnalytics)(p,a);return await (0,h.T)(a,b,{qname:d,filePath:l,depth:m,topK:n})},catch:a=>new k.uV({message:"Risk analysis failed",cause:a})});return(0,j.ok)(q)}));d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},12629:a=>{a.exports=import("web-tree-sitter")},13278:(a,b,c)=>{c.d(b,{c:()=>i,j:()=>h});var d=c(31421);let e=(0,c(57975).promisify)(d.exec);async function f(a,b,c,d="commit"){let g,h="---SEP---";try{var i;g=(await e(`git log -n ${c} ${"merge"===d?"--merges --first-parent --name-only":"--follow --name-only"} --pretty=format:'${h}%H|%cI' -- ${(i=b,`'${i.replace(/'/g,"'\\''")}'`)}`,{cwd:a,maxBuffer:0x3200000})).stdout}catch{return{history:[],totalCommits:0}}let j=[];for(let a of g.split(h).slice(1)){let b=a.split("\n"),c=b[0],d=c.indexOf("|");if(d<0)continue;let e=c.slice(0,d),f=c.slice(d+1),g=b.slice(1).map(a=>a.trim()).filter(Boolean);e&&j.push({hash:e,date:f,files:g})}let k=new Map;for(let a of j)if(0!==a.files.length&&!(a.files.length>30))for(let c of a.files){if(c===b)continue;let d=k.get(c);d?(d.cooccurrence+=1,a.date>d.lastCoEdit&&(d.lastCoEdit=a.date)):k.set(c,{file:c,cooccurrence:1,lastCoEdit:a.date})}return{history:Array.from(k.values()).sort((a,b)=>b.cooccurrence-a.cooccurrence||b.lastCoEdit.localeCompare(a.lastCoEdit)||a.file.localeCompare(b.file)),totalCommits:j.length}}async function g(a,b){let c;try{c=(await e("git -c core.quotePath=false status --porcelain",{cwd:a,maxBuffer:0xa00000})).stdout}catch{return[]}let d=[];for(let a of c.split("\n")){if(a.length<4)continue;let b=a[0],c=a[1];if("?"===b&&"?"===c)continue;let e=a.slice(3).trim(),f=e.indexOf(" -> ");f>=0&&(e=e.slice(f+4).trim()),e.startsWith('"')&&e.endsWith('"')&&(e=e.slice(1,-1)),d.push(e)}return d.includes(b)?d.filter(a=>a!==b).sort((a,b)=>a.localeCompare(b)):[]}async function h(a,b,c=100,d="commit"){let e=Math.min(Math.max(c,1),1e3),[{history:i,totalCommits:j},k]=await Promise.all([f(a,b,e,d),g(a,b)]);return{target:b,totalCommits:j,history:i,uncommitted:k}}async function i(a,b,c=100){let d=await h(a,b,c,"commit");return d.history.length>0?d:await h(a,b,c,"merge")}},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},37107:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>f.fG,dynamic:()=>f.OR,runtime:()=>f.fA});var e=c(64949),f=c(4926),g=a([e,f]);[e,f]=g.then?(await g)():g,(0,e.g)(),d()}catch(a){d(a)}})},38205:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{T:()=>l});var e=c(76760),f=c.n(e),g=c(33265),h=c(13278),i=c(37730),j=a([g]);g=(j.then?(await j)():j)[0];let m=/^__(imports?|code_\d+_\d+|filler|file)/,n=/\.(test|spec)\.(ts|tsx|js|jsx|mjs|cjs|py|go|rs)$/i;function k(a,b){let c=f().posix.dirname(a),d=f().posix.basename(a).replace(/\.[^.]+$/,""),e=[];for(let a of b)n.test(a)&&(f().posix.dirname(a)===c&&f().posix.basename(a).replace(/\.(test|spec)\.[^.]+$/i,"")===d&&e.push(a),f().posix.dirname(a)===f().posix.join(c,"__tests__")&&f().posix.basename(a).replace(/\.(test|spec)\.[^.]+$/i,"")===d&&e.push(a));return e}async function l(a,b,c){var d;let e=Math.min(Math.max(c.depth??2,1),5),f=Math.min(Math.max(c.topK??20,1),50),j=(0,g.J)(a,c.qname,e,c.filePath);if(!j.target)return{target:null,totalImpactedNodes:0,highRisk:[],suggestedTests:[],coedit:[],degraded:!b,degradedReason:b?void 0:"analytics-warming"};let l=j.target,o=new Map,p=!0;try{let b=await (0,h.c)(a.cwd,l.filePath,100),c=b.totalCommits;for(let a of b.history)o.set(a.file,{cooccurrence:a.cooccurrence,total:c});(0===c||0===b.history.length)&&(p=!1)}catch{p=!1}let q=0;if(b)for(let a of b.pagerank.values())a>q&&(q=a);let r=[];for(let f of j.nodes){if(0===f.depth||(d=f.symbol.qualifiedName,m.test(d)))continue;let g=f.symbol,h=1;if(1===f.depth){let b=a.files.get(g.filePath);if(b){let a=0;for(let d of b.intraCalls)d.from===g.qualifiedName&&d.to===c.qname&&(a+=d.lines.length);for(let d of b.outgoingCalls)d.from===g.qualifiedName&&d.to.qualifiedName===c.qname&&d.to.filePath===l.filePath&&(a+=d.lines.length);h=Math.max(1,a)}}let j=o.get(g.filePath),n=j&&j.total>0?j.cooccurrence/j.total:0,s=k(g.filePath,a.fileSet).length>0,t=b?b.pagerank.get((0,i.I)(g.filePath,g.qualifiedName))??0:0,u=q>0?t/q:0,v=Math.min(1,h/10),w=1/Math.max(1,f.depth),x=p?.3:.4,y=.25*!!p,z=p?.2:.35,A=w*(x*v+y*n+!s*z+.25*u),B=[];A>=.5&&B.push("high-risk"),s||B.push("untested"),n>=.4&&B.push("frequent-coedit"),u>=.5&&B.push("core"),f.depth>=e&&B.push("leaf"),r.push({filePath:g.filePath,qualifiedName:g.qualifiedName,name:g.name,kind:g.kind,startLine:g.startLine,endLine:g.endLine,depth:f.depth,risk:{score:A,callFreq:h,coeditProb:n,hasTest:s,pagerank:t},tags:B})}r.sort((a,b)=>b.risk.score-a.risk.score||a.depth-b.depth||a.filePath.localeCompare(b.filePath)||a.qualifiedName.localeCompare(b.qualifiedName)||a.startLine-b.startLine);let s=r.slice(0,f),t=new Map;for(let b of s)for(let c of k(b.filePath,a.fileSet)){let a=t.get(c);a||(a={filePath:c,reason:"direct-test",coveredNodes:[]},t.set(c,a)),a.coveredNodes.push(b.qualifiedName)}for(let[a]of o)n.test(a)&&(t.has(a)||t.set(a,{filePath:a,reason:"coedit-history",coveredNodes:[]}));let u=!b||!p,v=b?p?void 0:"coedit-unavailable":"analytics-warming",w=[];for(let[a,b]of o)0!==b.total&&w.push({filePath:a,cooccurrence:b.cooccurrence,totalCommits:b.total,probability:b.cooccurrence/b.total});return w.sort((a,b)=>b.cooccurrence-a.cooccurrence||a.filePath.localeCompare(b.filePath)),{target:l,totalImpactedNodes:j.nodes.length-1,highRisk:s,suggestedTests:Array.from(t.values()),coedit:w.slice(0,30),degraded:u,degradedReason:v}}d()}catch(a){d(a)}})},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},53501:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(37107),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projectGraph/risk/route",pathname:"/api/projectGraph/risk",filename:"route",bundlePath:"app/api/projectGraph/risk/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projectGraph/risk/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projectGraph/risk/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,4008,304,2939,2540],()=>b(b.s=53501));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=2578,a.ids=[2578],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12308:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(92316),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projectGraph/search/route",pathname:"/api/projectGraph/search",filename:"route",bundlePath:"app/api/projectGraph/search/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projectGraph/search/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projectGraph/search/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},12412:a=>{a.exports=require("assert")},12629:a=>{a.exports=import("web-tree-sitter")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30989:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>l,fA:()=>k,fG:()=>m});var e=c(89705),f=c(33265),g=c(4253),h=c(72891),i=c(770),j=a([h,f]);[h,f]=j.then?(await j)():j;let k="nodejs",l="force-dynamic",m=(0,h.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("q")??"",j=Math.min(Math.max(parseInt(b.get("limit")??"15",10)||15,1),100),k=function(a){if(!a)return!1;let b=a.toLowerCase();return"true"===b||"1"===b||"yes"===b}(b.get("includeLiterals")),l=yield*e.ivC(()=>(0,g.nw)(c));if(!l.ok)return yield*e.fJG(new i.yI({field:"cwd",reason:l.reason}));let m=l.abs;if(d.trim().length<1)return(0,h.ok)(k?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]});let n=yield*e.$mh({try:async()=>{let a=await (0,f.u$)(m);return(0,f.bQ)(a,d,j,{includeLiterals:k})},catch:a=>new i.uV({message:"Search failed",cause:a})});return(0,h.ok)(n)}));d()}catch(a){d(a)}})},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},92316:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>f.fG,dynamic:()=>f.OR,runtime:()=>f.fA});var e=c(64949),f=c(30989),g=a([e,f]);[e,f]=g.then?(await g)():g,(0,e.g)(),d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304,2939],()=>b(b.s=12308));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=2578,a.ids=[2578],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},12629:a=>{a.exports=import("web-tree-sitter")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30989:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>l,fA:()=>k,fG:()=>m});var e=c(89705),f=c(33265),g=c(4253),h=c(72891),i=c(770),j=a([h,f]);[h,f]=j.then?(await j)():j;let k="nodejs",l="force-dynamic",m=(0,h.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("q")??"",j=Math.min(Math.max(parseInt(b.get("limit")??"15",10)||15,1),100),k=function(a){if(!a)return!1;let b=a.toLowerCase();return"true"===b||"1"===b||"yes"===b}(b.get("includeLiterals")),l=yield*e.ivC(()=>(0,g.nw)(c));if(!l.ok)return yield*e.fJG(new i.yI({field:"cwd",reason:l.reason}));let m=l.abs;if(d.trim().length<1)return(0,h.ok)(k?{files:[],symbols:[],literals:[]}:{files:[],symbols:[]});let n=yield*e.$mh({try:async()=>{let a=await (0,f.u$)(m);return(0,f.bQ)(a,d,j,{includeLiterals:k})},catch:a=>new i.uV({message:"Search failed",cause:a})});return(0,h.ok)(n)}));d()}catch(a){d(a)}})},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},52375:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(92316),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projectGraph/search/route",pathname:"/api/projectGraph/search",filename:"route",bundlePath:"app/api/projectGraph/search/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projectGraph/search/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projectGraph/search/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},73024:a=>{a.exports=require("node:fs")},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},92316:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>f.fG,dynamic:()=>f.OR,runtime:()=>f.fA});var e=c(64949),f=c(30989),g=a([e,f]);[e,f]=g.then?(await g)():g,(0,e.g)(),d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304,2939],()=>b(b.s=52375));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=64,a.ids=[64],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>M,A0:()=>X,An:()=>$,BF:()=>I,Ct:()=>Q,Eu:()=>H,Ex:()=>u,GB:()=>r,JE:()=>Z,JY:()=>L,Ki:()=>C,Kk:()=>R,Kv:()=>j,LN:()=>k,Mx:()=>D,N9:()=>ac,O0:()=>B,Sr:()=>J,Tb:()=>s,Ux:()=>ab,Wd:()=>Y,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>V,h9:()=>x,i4:()=>G,iK:()=>p,im:()=>T,iy:()=>P,jp:()=>t,lT:()=>z,lq:()=>F,ls:()=>K,mT:()=>w,n6:()=>n,oK:()=>O,oZ:()=>S,of:()=>E,po:()=>N,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>W,yw:()=>U});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects");function B(a){return a.replace(/[/.]/g,"-")}function C(a){return(0,e.join)(k,B(a))}function D(a){return(0,e.join)(C(a),"session.json")}function E(a){return(0,e.join)(C(a),"recent-files.json")}function F(a){return(0,e.join)(C(a),"expanded-paths.json")}function G(a){return(0,e.join)(C(a),"comments.json")}function H(a){return(0,e.join)(C(a),"services.json")}function I(a){return(0,e.join)(C(a),"note.md")}function J(a,b){return(0,e.join)(C(a),`terminal-history-${b}.jsonl`)}function K(a,b){return(0,e.join)(C(a),`terminal-output-${b}.txt`)}function L(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(C(a),c)}function M(){return(0,e.join)(j,"terminal-aliases.json")}function N(){return(0,e.join)(j,"services.json")}function O(a){return(0,e.join)(C(a),"project-settings.json")}function P(a,b){return(0,e.join)(C(a),`terminal-bubble-order-${b}.json`)}function Q(a){return(0,e.join)(s,`${a}.json`)}function R(a,b){return(0,e.join)((0,e.join)(w,B(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(y,B(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(A,B(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",B(a)),`${b}.jsonl`)}function V(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function W(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function X(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Y(a){let b=(0,e.join)(a,"..");await X(b)}async function Z(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function $(a,b){await Y(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let _=globalThis,aa=_.__cockpitFileLocks??(_.__cockpitFileLocks=new Map);function ab(a,b){let c=(aa.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return aa.set(a,d),d.then(()=>{aa.get(a)===d&&aa.delete(a)}),c}function ac(a,b,c){return ab(a,async()=>{let d=await Z(a,b),e=await c(d);return await $(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},24288:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>l,dynamic:()=>j,runtime:()=>i});var e=c(89705),f=c(72891),g=c(77993),h=a([f]);f=(h.then?(await h)():h)[0];let i="nodejs",j="force-dynamic",k=(0,f.RL)(()=>e.JkU(function*(){let a=yield*g.T,b=yield*a.read;return(0,f.ok)(b)}).pipe(e.Gte(g.t))),l=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a),c=yield*g.T;return yield*c.write(b),(0,f.ok)({success:!0})}).pipe(e.Gte(g.t)));d()}catch(a){d(a)}})},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},70154:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(24288),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/route",pathname:"/api/projects",filename:"route",bundlePath:"app/api/projects/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projects/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},77993:(a,b,c)=>{c.d(b,{T:()=>l,t:()=>m});var d=c(60177),e=c(1971),f=c(89705),g=c(33873),h=c(7939),i=c(770);let j={projects:[],activeIndex:0,collapsed:!1},k=(0,g.join)(h.Kv,"projects.json"),l=d.Io("@cockpit/ProjectService"),m=e.Py(l,l.of({read:f.$mh({try:()=>(0,h.JE)(k,j),catch:a=>new i.uU({path:k,op:"read",cause:a})}),write:a=>f.$mh({try:()=>(0,h.An)(k,a),catch:a=>new i.uU({path:k,op:"write",cause:a})})}))},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=70154));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=64,a.ids=[64],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>N,A0:()=>Y,An:()=>_,B0:()=>B,BF:()=>J,Ct:()=>R,Eu:()=>I,Ex:()=>u,GB:()=>r,JE:()=>$,JY:()=>M,Ki:()=>D,Kk:()=>S,Kv:()=>j,LN:()=>k,Mx:()=>E,N9:()=>ad,O0:()=>C,Sr:()=>K,Tb:()=>s,Ux:()=>ac,Wd:()=>Z,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>W,h9:()=>x,i4:()=>H,iK:()=>p,im:()=>U,iy:()=>Q,jp:()=>t,lT:()=>z,lq:()=>G,ls:()=>L,mT:()=>w,n6:()=>n,oK:()=>P,oZ:()=>T,of:()=>F,po:()=>O,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>X,yw:()=>V});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects"),B=(0,e.join)(z,"credentials.json");function C(a){return a.replace(/[/.]/g,"-")}function D(a){return(0,e.join)(k,C(a))}function E(a){return(0,e.join)(D(a),"session.json")}function F(a){return(0,e.join)(D(a),"recent-files.json")}function G(a){return(0,e.join)(D(a),"expanded-paths.json")}function H(a){return(0,e.join)(D(a),"comments.json")}function I(a){return(0,e.join)(D(a),"services.json")}function J(a){return(0,e.join)(D(a),"note.md")}function K(a,b){return(0,e.join)(D(a),`terminal-history-${b}.jsonl`)}function L(a,b){return(0,e.join)(D(a),`terminal-output-${b}.txt`)}function M(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(D(a),c)}function N(){return(0,e.join)(j,"terminal-aliases.json")}function O(){return(0,e.join)(j,"services.json")}function P(a){return(0,e.join)(D(a),"project-settings.json")}function Q(a,b){return(0,e.join)(D(a),`terminal-bubble-order-${b}.json`)}function R(a){return(0,e.join)(s,`${a}.json`)}function S(a,b){return(0,e.join)((0,e.join)(w,C(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(y,C(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(A,C(a)),`${b}.jsonl`)}function V(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",C(a)),`${b}.jsonl`)}function W(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function X(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function Y(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Z(a){let b=(0,e.join)(a,"..");await Y(b)}async function $(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function _(a,b){await Z(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let aa=globalThis,ab=aa.__cockpitFileLocks??(aa.__cockpitFileLocks=new Map);function ac(a,b){let c=(ab.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return ab.set(a,d),d.then(()=>{ab.get(a)===d&&ab.delete(a)}),c}function ad(a,b,c){return ac(a,async()=>{let d=await $(a,b),e=await c(d);return await _(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},24288:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>k,POST:()=>l,dynamic:()=>j,runtime:()=>i});var e=c(89705),f=c(72891),g=c(77993),h=a([f]);f=(h.then?(await h)():h)[0];let i="nodejs",j="force-dynamic",k=(0,f.RL)(()=>e.JkU(function*(){let a=yield*g.T,b=yield*a.read;return(0,f.ok)(b)}).pipe(e.Gte(g.t))),l=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a),c=yield*g.T;return yield*c.write(b),(0,f.ok)({success:!0})}).pipe(e.Gte(g.t)));d()}catch(a){d(a)}})},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57333:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(24288),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/projects/route",pathname:"/api/projects",filename:"route",bundlePath:"app/api/projects/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/projects/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/projects/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},77993:(a,b,c)=>{c.d(b,{T:()=>l,t:()=>m});var d=c(60177),e=c(1971),f=c(89705),g=c(33873),h=c(7939),i=c(770);let j={projects:[],activeIndex:0,collapsed:!1},k=(0,g.join)(h.Kv,"projects.json"),l=d.Io("@cockpit/ProjectService"),m=e.Py(l,l.of({read:f.$mh({try:()=>(0,h.JE)(k,j),catch:a=>new i.uU({path:k,op:"read",cause:a})}),write:a=>f.$mh({try:()=>(0,h.An)(k,a),catch:a=>new i.uU({path:k,op:"write",cause:a})})}))},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=57333));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=5416,a.ids=[5416],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>M,A0:()=>X,An:()=>$,BF:()=>I,Ct:()=>Q,Eu:()=>H,Ex:()=>u,GB:()=>r,JE:()=>Z,JY:()=>L,Ki:()=>C,Kk:()=>R,Kv:()=>j,LN:()=>k,Mx:()=>D,N9:()=>ac,O0:()=>B,Sr:()=>J,Tb:()=>s,Ux:()=>ab,Wd:()=>Y,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>V,h9:()=>x,i4:()=>G,iK:()=>p,im:()=>T,iy:()=>P,jp:()=>t,lT:()=>z,lq:()=>F,ls:()=>K,mT:()=>w,n6:()=>n,oK:()=>O,oZ:()=>S,of:()=>E,po:()=>N,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>W,yw:()=>U});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects");function B(a){return a.replace(/[/.]/g,"-")}function C(a){return(0,e.join)(k,B(a))}function D(a){return(0,e.join)(C(a),"session.json")}function E(a){return(0,e.join)(C(a),"recent-files.json")}function F(a){return(0,e.join)(C(a),"expanded-paths.json")}function G(a){return(0,e.join)(C(a),"comments.json")}function H(a){return(0,e.join)(C(a),"services.json")}function I(a){return(0,e.join)(C(a),"note.md")}function J(a,b){return(0,e.join)(C(a),`terminal-history-${b}.jsonl`)}function K(a,b){return(0,e.join)(C(a),`terminal-output-${b}.txt`)}function L(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(C(a),c)}function M(){return(0,e.join)(j,"terminal-aliases.json")}function N(){return(0,e.join)(j,"services.json")}function O(a){return(0,e.join)(C(a),"project-settings.json")}function P(a,b){return(0,e.join)(C(a),`terminal-bubble-order-${b}.json`)}function Q(a){return(0,e.join)(s,`${a}.json`)}function R(a,b){return(0,e.join)((0,e.join)(w,B(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(y,B(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(A,B(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",B(a)),`${b}.jsonl`)}function V(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function W(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function X(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Y(a){let b=(0,e.join)(a,"..");await X(b)}async function Z(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function $(a,b){await Y(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let _=globalThis,aa=_.__cockpitFileLocks??(_.__cockpitFileLocks=new Map);function ab(a,b){let c=(aa.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return aa.set(a,d),d.then(()=>{aa.get(a)===d&&aa.delete(a)}),c}function ac(a,b,c){return ab(a,async()=>{let d=await Z(a,b),e=await c(d);return await $(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63534:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.f});var e=c(91649),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},64716:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(63534),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/public-key/route",pathname:"/api/push/public-key",filename:"route",bundlePath:"app/api/push/public-key/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/public-key/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/public-key/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},91649:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{f:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(()=>e.JkU(function*(){let a=yield*e.$mh({try:()=>(0,h.lG)(),catch:a=>new g.uU({path:"settings.json",op:"read",cause:a})});return(0,f.ok)({publicKey:a})}));d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=64716));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=5416,a.ids=[5416],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>N,A0:()=>Y,An:()=>_,B0:()=>B,BF:()=>J,Ct:()=>R,Eu:()=>I,Ex:()=>u,GB:()=>r,JE:()=>$,JY:()=>M,Ki:()=>D,Kk:()=>S,Kv:()=>j,LN:()=>k,Mx:()=>E,N9:()=>ad,O0:()=>C,Sr:()=>K,Tb:()=>s,Ux:()=>ac,Wd:()=>Z,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>W,h9:()=>x,i4:()=>H,iK:()=>p,im:()=>U,iy:()=>Q,jp:()=>t,lT:()=>z,lq:()=>G,ls:()=>L,mT:()=>w,n6:()=>n,oK:()=>P,oZ:()=>T,of:()=>F,po:()=>O,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>X,yw:()=>V});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects"),B=(0,e.join)(z,"credentials.json");function C(a){return a.replace(/[/.]/g,"-")}function D(a){return(0,e.join)(k,C(a))}function E(a){return(0,e.join)(D(a),"session.json")}function F(a){return(0,e.join)(D(a),"recent-files.json")}function G(a){return(0,e.join)(D(a),"expanded-paths.json")}function H(a){return(0,e.join)(D(a),"comments.json")}function I(a){return(0,e.join)(D(a),"services.json")}function J(a){return(0,e.join)(D(a),"note.md")}function K(a,b){return(0,e.join)(D(a),`terminal-history-${b}.jsonl`)}function L(a,b){return(0,e.join)(D(a),`terminal-output-${b}.txt`)}function M(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(D(a),c)}function N(){return(0,e.join)(j,"terminal-aliases.json")}function O(){return(0,e.join)(j,"services.json")}function P(a){return(0,e.join)(D(a),"project-settings.json")}function Q(a,b){return(0,e.join)(D(a),`terminal-bubble-order-${b}.json`)}function R(a){return(0,e.join)(s,`${a}.json`)}function S(a,b){return(0,e.join)((0,e.join)(w,C(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(y,C(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(A,C(a)),`${b}.jsonl`)}function V(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",C(a)),`${b}.jsonl`)}function W(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function X(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function Y(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Z(a){let b=(0,e.join)(a,"..");await Y(b)}async function $(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function _(a,b){await Z(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let aa=globalThis,ab=aa.__cockpitFileLocks??(aa.__cockpitFileLocks=new Map);function ac(a,b){let c=(ab.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return ab.set(a,d),d.then(()=>{ab.get(a)===d&&ab.delete(a)}),c}function ad(a,b,c){return ac(a,async()=>{let d=await $(a,b),e=await c(d);return await _(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},37407:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(63534),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/public-key/route",pathname:"/api/push/public-key",filename:"route",bundlePath:"app/api/push/public-key/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/public-key/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/public-key/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},63534:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.f});var e=c(91649),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},91649:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{f:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(()=>e.JkU(function*(){let a=yield*e.$mh({try:()=>(0,h.lG)(),catch:a=>new g.uU({path:"settings.json",op:"read",cause:a})});return(0,f.ok)({publicKey:a})}));d()}catch(a){d(a)}})},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=37407));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=243,a.ids=[243],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>M,A0:()=>X,An:()=>$,BF:()=>I,Ct:()=>Q,Eu:()=>H,Ex:()=>u,GB:()=>r,JE:()=>Z,JY:()=>L,Ki:()=>C,Kk:()=>R,Kv:()=>j,LN:()=>k,Mx:()=>D,N9:()=>ac,O0:()=>B,Sr:()=>J,Tb:()=>s,Ux:()=>ab,Wd:()=>Y,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>V,h9:()=>x,i4:()=>G,iK:()=>p,im:()=>T,iy:()=>P,jp:()=>t,lT:()=>z,lq:()=>F,ls:()=>K,mT:()=>w,n6:()=>n,oK:()=>O,oZ:()=>S,of:()=>E,po:()=>N,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>W,yw:()=>U});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects");function B(a){return a.replace(/[/.]/g,"-")}function C(a){return(0,e.join)(k,B(a))}function D(a){return(0,e.join)(C(a),"session.json")}function E(a){return(0,e.join)(C(a),"recent-files.json")}function F(a){return(0,e.join)(C(a),"expanded-paths.json")}function G(a){return(0,e.join)(C(a),"comments.json")}function H(a){return(0,e.join)(C(a),"services.json")}function I(a){return(0,e.join)(C(a),"note.md")}function J(a,b){return(0,e.join)(C(a),`terminal-history-${b}.jsonl`)}function K(a,b){return(0,e.join)(C(a),`terminal-output-${b}.txt`)}function L(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(C(a),c)}function M(){return(0,e.join)(j,"terminal-aliases.json")}function N(){return(0,e.join)(j,"services.json")}function O(a){return(0,e.join)(C(a),"project-settings.json")}function P(a,b){return(0,e.join)(C(a),`terminal-bubble-order-${b}.json`)}function Q(a){return(0,e.join)(s,`${a}.json`)}function R(a,b){return(0,e.join)((0,e.join)(w,B(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(y,B(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(A,B(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",B(a)),`${b}.jsonl`)}function V(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function W(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function X(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Y(a){let b=(0,e.join)(a,"..");await X(b)}async function Z(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function $(a,b){await Y(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let _=globalThis,aa=_.__cockpitFileLocks??(_.__cockpitFileLocks=new Map);function ab(a,b){let c=(aa.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return aa.set(a,d),d.then(()=>{aa.get(a)===d&&aa.delete(a)}),c}function ac(a,b,c){return ab(a,async()=>{let d=await Z(a,b),e=await c(d);return await $(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},42132:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=(yield*(0,f.k9)(a)).subscription;return b&&b.endpoint?(yield*e.$mh({try:()=>(0,h.hO)(b),catch:a=>new g.uU({path:"push-subscriptions.json",op:"write",cause:a})}),(0,f.ok)({ok:!0})):yield*e.fJG(new g.yI({field:"subscription",reason:"missing"}))}));d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},68969:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(42132),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")},95696:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(68969),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/subscribe/route",pathname:"/api/push/subscribe",filename:"route",bundlePath:"app/api/push/subscribe/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/subscribe/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/subscribe/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=95696));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=243,a.ids=[243],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>N,A0:()=>Y,An:()=>_,B0:()=>B,BF:()=>J,Ct:()=>R,Eu:()=>I,Ex:()=>u,GB:()=>r,JE:()=>$,JY:()=>M,Ki:()=>D,Kk:()=>S,Kv:()=>j,LN:()=>k,Mx:()=>E,N9:()=>ad,O0:()=>C,Sr:()=>K,Tb:()=>s,Ux:()=>ac,Wd:()=>Z,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>W,h9:()=>x,i4:()=>H,iK:()=>p,im:()=>U,iy:()=>Q,jp:()=>t,lT:()=>z,lq:()=>G,ls:()=>L,mT:()=>w,n6:()=>n,oK:()=>P,oZ:()=>T,of:()=>F,po:()=>O,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>X,yw:()=>V});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects"),B=(0,e.join)(z,"credentials.json");function C(a){return a.replace(/[/.]/g,"-")}function D(a){return(0,e.join)(k,C(a))}function E(a){return(0,e.join)(D(a),"session.json")}function F(a){return(0,e.join)(D(a),"recent-files.json")}function G(a){return(0,e.join)(D(a),"expanded-paths.json")}function H(a){return(0,e.join)(D(a),"comments.json")}function I(a){return(0,e.join)(D(a),"services.json")}function J(a){return(0,e.join)(D(a),"note.md")}function K(a,b){return(0,e.join)(D(a),`terminal-history-${b}.jsonl`)}function L(a,b){return(0,e.join)(D(a),`terminal-output-${b}.txt`)}function M(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(D(a),c)}function N(){return(0,e.join)(j,"terminal-aliases.json")}function O(){return(0,e.join)(j,"services.json")}function P(a){return(0,e.join)(D(a),"project-settings.json")}function Q(a,b){return(0,e.join)(D(a),`terminal-bubble-order-${b}.json`)}function R(a){return(0,e.join)(s,`${a}.json`)}function S(a,b){return(0,e.join)((0,e.join)(w,C(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(y,C(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(A,C(a)),`${b}.jsonl`)}function V(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",C(a)),`${b}.jsonl`)}function W(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function X(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function Y(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Z(a){let b=(0,e.join)(a,"..");await Y(b)}async function $(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function _(a,b){await Z(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let aa=globalThis,ab=aa.__cockpitFileLocks??(aa.__cockpitFileLocks=new Map);function ac(a,b){let c=(ab.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return ab.set(a,d),d.then(()=>{ab.get(a)===d&&ab.delete(a)}),c}function ad(a,b,c){return ac(a,async()=>{let d=await $(a,b),e=await c(d);return await _(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},42132:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=(yield*(0,f.k9)(a)).subscription;return b&&b.endpoint?(yield*e.$mh({try:()=>(0,h.hO)(b),catch:a=>new g.uU({path:"push-subscriptions.json",op:"write",cause:a})}),(0,f.ok)({ok:!0})):yield*e.fJG(new g.yI({field:"subscription",reason:"missing"}))}));d()}catch(a){d(a)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},68969:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(42132),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")},96787:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(68969),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/subscribe/route",pathname:"/api/push/subscribe",filename:"route",bundlePath:"app/api/push/subscribe/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/subscribe/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/subscribe/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=96787));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=1536,a.ids=[1536],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3085:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a);return b.endpoint?(yield*e.$mh({try:()=>(0,h.a_)(b.endpoint),catch:a=>new g.uU({path:"push-subscriptions.json",op:"write",cause:a})}),(0,f.ok)({ok:!0})):yield*e.fJG(new g.yI({field:"endpoint",reason:"missing"}))}));d()}catch(a){d(a)}})},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>M,A0:()=>X,An:()=>$,BF:()=>I,Ct:()=>Q,Eu:()=>H,Ex:()=>u,GB:()=>r,JE:()=>Z,JY:()=>L,Ki:()=>C,Kk:()=>R,Kv:()=>j,LN:()=>k,Mx:()=>D,N9:()=>ac,O0:()=>B,Sr:()=>J,Tb:()=>s,Ux:()=>ab,Wd:()=>Y,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>V,h9:()=>x,i4:()=>G,iK:()=>p,im:()=>T,iy:()=>P,jp:()=>t,lT:()=>z,lq:()=>F,ls:()=>K,mT:()=>w,n6:()=>n,oK:()=>O,oZ:()=>S,of:()=>E,po:()=>N,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>W,yw:()=>U});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects");function B(a){return a.replace(/[/.]/g,"-")}function C(a){return(0,e.join)(k,B(a))}function D(a){return(0,e.join)(C(a),"session.json")}function E(a){return(0,e.join)(C(a),"recent-files.json")}function F(a){return(0,e.join)(C(a),"expanded-paths.json")}function G(a){return(0,e.join)(C(a),"comments.json")}function H(a){return(0,e.join)(C(a),"services.json")}function I(a){return(0,e.join)(C(a),"note.md")}function J(a,b){return(0,e.join)(C(a),`terminal-history-${b}.jsonl`)}function K(a,b){return(0,e.join)(C(a),`terminal-output-${b}.txt`)}function L(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(C(a),c)}function M(){return(0,e.join)(j,"terminal-aliases.json")}function N(){return(0,e.join)(j,"services.json")}function O(a){return(0,e.join)(C(a),"project-settings.json")}function P(a,b){return(0,e.join)(C(a),`terminal-bubble-order-${b}.json`)}function Q(a){return(0,e.join)(s,`${a}.json`)}function R(a,b){return(0,e.join)((0,e.join)(w,B(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(y,B(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(A,B(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",B(a)),`${b}.jsonl`)}function V(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function W(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function X(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Y(a){let b=(0,e.join)(a,"..");await X(b)}async function Z(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function $(a,b){await Y(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let _=globalThis,aa=_.__cockpitFileLocks??(_.__cockpitFileLocks=new Map);function ab(a,b){let c=(aa.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return aa.set(a,d),d.then(()=>{aa.get(a)===d&&aa.delete(a)}),c}function ac(a,b,c){return ab(a,async()=>{let d=await Z(a,b),e=await c(d);return await $(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48730:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(64116),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/unsubscribe/route",pathname:"/api/push/unsubscribe",filename:"route",bundlePath:"app/api/push/unsubscribe/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/unsubscribe/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/unsubscribe/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64116:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(3085),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=48730));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=1536,a.ids=[1536],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},3085:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(38433),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a);return b.endpoint?(yield*e.$mh({try:()=>(0,h.a_)(b.endpoint),catch:a=>new g.uU({path:"push-subscriptions.json",op:"write",cause:a})}),(0,f.ok)({ok:!0})):yield*e.fJG(new g.yI({field:"endpoint",reason:"missing"}))}));d()}catch(a){d(a)}})},4573:a=>{a.exports=require("node:buffer")},7939:(a,b,c)=>{c.d(b,{$A:()=>N,A0:()=>Y,An:()=>_,B0:()=>B,BF:()=>J,Ct:()=>R,Eu:()=>I,Ex:()=>u,GB:()=>r,JE:()=>$,JY:()=>M,Ki:()=>D,Kk:()=>S,Kv:()=>j,LN:()=>k,Mx:()=>E,N9:()=>ad,O0:()=>C,Sr:()=>K,Tb:()=>s,Ux:()=>ac,Wd:()=>Z,aO:()=>m,at:()=>y,ec:()=>o,eg:()=>W,h9:()=>x,i4:()=>H,iK:()=>p,im:()=>U,iy:()=>Q,jp:()=>t,lT:()=>z,lq:()=>G,ls:()=>L,mT:()=>w,n6:()=>n,oK:()=>P,oZ:()=>T,of:()=>F,po:()=>O,tP:()=>q,th:()=>v,v4:()=>l,vI:()=>X,yw:()=>V});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"review"),t=(0,e.join)(s,"_signal");function u(){try{(0,g.existsSync)(s)||(0,g.mkdirSync)(s,{recursive:!0}),(0,g.writeFileSync)(t,Date.now().toString())}catch{}}let v=(0,e.join)(i,".claude"),w=(0,e.join)(v,"projects"),x=(0,e.join)(i,".claude2"),y=(0,e.join)(x,"projects"),z=(0,e.join)(j,"deepseek"),A=(0,e.join)(z,"projects"),B=(0,e.join)(z,"credentials.json");function C(a){return a.replace(/[/.]/g,"-")}function D(a){return(0,e.join)(k,C(a))}function E(a){return(0,e.join)(D(a),"session.json")}function F(a){return(0,e.join)(D(a),"recent-files.json")}function G(a){return(0,e.join)(D(a),"expanded-paths.json")}function H(a){return(0,e.join)(D(a),"comments.json")}function I(a){return(0,e.join)(D(a),"services.json")}function J(a){return(0,e.join)(D(a),"note.md")}function K(a,b){return(0,e.join)(D(a),`terminal-history-${b}.jsonl`)}function L(a,b){return(0,e.join)(D(a),`terminal-output-${b}.txt`)}function M(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(D(a),c)}function N(){return(0,e.join)(j,"terminal-aliases.json")}function O(){return(0,e.join)(j,"services.json")}function P(a){return(0,e.join)(D(a),"project-settings.json")}function Q(a,b){return(0,e.join)(D(a),`terminal-bubble-order-${b}.json`)}function R(a){return(0,e.join)(s,`${a}.json`)}function S(a,b){return(0,e.join)((0,e.join)(w,C(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(y,C(a)),`${b}.jsonl`)}function U(a,b){return(0,e.join)((0,e.join)(A,C(a)),`${b}.jsonl`)}function V(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",C(a)),`${b}.jsonl`)}function W(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function X(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function Y(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function Z(a){let b=(0,e.join)(a,"..");await Y(b)}async function $(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function _(a,b){await Z(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let aa=globalThis,ab=aa.__cockpitFileLocks??(aa.__cockpitFileLocks=new Map);function ac(a,b){let c=(ab.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return ab.set(a,d),d.then(()=>{ab.get(a)===d&&ab.delete(a)}),c}function ad(a,b,c){return ac(a,async()=>{let d=await $(a,b),e=await c(d);return await _(a,e),e})}},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11141:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(64116),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/unsubscribe/route",pathname:"/api/push/unsubscribe",filename:"route",bundlePath:"app/api/push/unsubscribe/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/push/unsubscribe/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/push/unsubscribe/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},38433:(a,b,c)=>{c.d(b,{SG:()=>m,a_:()=>l,hO:()=>k,lG:()=>j});var d=c(51181),e=c.n(d),f=c(7939);let g=null,h="https://github.com/Surething-io/cockpit";async function i(){if(g)return g;let a=await (0,f.Ux)(f.tP,async()=>{let a=await (0,f.JE)(f.tP,{});if(a.push?.publicKey&&a.push?.privateKey){let b=!function(a){if(!a||a.includes("localhost"))return!1;if(a.startsWith("https://"))return!0;let b=/^mailto:[^\s@]+@([^\s@]+)$/.exec(a);return!!b&&b[1].includes(".")}(a.push.subject)?h:a.push.subject;return b!==a.push.subject&&await (0,f.An)(f.tP,{...a,push:{...a.push,subject:b}}),{publicKey:a.push.publicKey,privateKey:a.push.privateKey,subject:b}}let b=e().generateVAPIDKeys(),c={publicKey:b.publicKey,privateKey:b.privateKey,subject:h};return await (0,f.An)(f.tP,{...a,push:c}),c});return e().setVapidDetails(a.subject,a.publicKey,a.privateKey),g=a,a}async function j(){return(await i()).publicKey}async function k(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]});b.subscriptions.some(b=>b.endpoint===a.endpoint)||(b.subscriptions.push(a),await (0,f.An)(f.n6,b))})}async function l(a){await (0,f.Ux)(f.n6,async()=>{let b=await (0,f.JE)(f.n6,{subscriptions:[]}),c=b.subscriptions.filter(b=>b.endpoint!==a);c.length!==b.subscriptions.length&&await (0,f.An)(f.n6,{subscriptions:c})})}async function m(a){try{await i()}catch{return{sent:0,pruned:0}}let b=await (0,f.JE)(f.n6,{subscriptions:[]});if(0===b.subscriptions.length)return{sent:0,pruned:0};let c=JSON.stringify(a),d=[],g=0;return await Promise.all(b.subscriptions.map(async a=>{try{await e().sendNotification(a,c),g++}catch(c){let b=c?.statusCode;if(404===b||410===b)d.push(a.endpoint);else{let d=a.endpoint;try{d=new URL(a.endpoint).host}catch{}console.error(`[push] send failed (${b??"?"}) to ${d}: ${c?.body||c?.message||"unknown"}`)}}})),d.length&&await (0,f.Ux)(f.n6,async()=>{let a=await (0,f.JE)(f.n6,{subscriptions:[]});await (0,f.An)(f.n6,{subscriptions:a.subscriptions.filter(a=>!d.includes(a.endpoint))})}),{sent:g,pruned:d.length}}},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64116:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(3085),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79646:a=>{a.exports=require("child_process")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=11141));module.exports=c})();
@@ -1 +1 @@
1
- "use strict";(()=>{var a={};a.id=5457,a.ids=[5457],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1445:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(6602),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},6602:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(49818),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a);if(!b.id||!b.connectionString||!b.command)return yield*e.fJG(new g.yI({field:b.id?b.connectionString?"command":"connectionString":"id",reason:"missing"}));let{id:c,connectionString:d,command:i,args:j=[]}=b,k=yield*h.HE,l=performance.now(),m=yield*k.command(c,d,i,j),n=Math.round((performance.now()-l)*100)/100;return(0,f.ok)({result:m,duration:n})}).pipe(e.fRP("api.redis.command")));d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72650:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(1445),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/redis/command/route",pathname:"/api/redis/command",filename:"route",bundlePath:"app/api/redis/command/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/redis/command/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/redis/command/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=72650));module.exports=c})();
1
+ "use strict";(()=>{var a={};a.id=5457,a.ids=[5457],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1445:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(6602),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},1932:a=>{a.exports=require("url")},4573:a=>{a.exports=require("node:buffer")},6602:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(770),h=c(49818),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=yield*(0,f.k9)(a);if(!b.id||!b.connectionString||!b.command)return yield*e.fJG(new g.yI({field:b.id?b.connectionString?"command":"connectionString":"id",reason:"missing"}));let{id:c,connectionString:d,command:i,args:j=[]}=b,k=yield*h.HE,l=performance.now(),m=yield*k.command(c,d,i,j),n=Math.round((performance.now()-l)*100)/100;return(0,f.ok)({result:m,duration:n})}).pipe(e.fRP("api.redis.command")));d()}catch(a){d(a)}})},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{a.exports=require("assert")},14985:a=>{a.exports=require("dns")},19771:a=>{a.exports=require("process")},19879:a=>{a.exports=import("@anthropic-ai/claude-agent-sdk")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},28354:a=>{a.exports=require("util")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},31421:a=>{a.exports=require("node:child_process")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{a.exports=import("pg")},66136:a=>{a.exports=require("timers")},72891:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OZ:()=>o,RL:()=>n,k9:()=>p,ok:()=>l});var e=c(37625),f=c(52693),g=c(18412),h=c(89705),i=c(94506),j=c(770),k=a([i]);i=(k.then?(await k)():k)[0];let l=(a,b=200)=>new Response(JSON.stringify(a),{status:b,headers:{"content-type":"application/json"}}),m=a=>{let b=e.od(a);if(f.Ru(b)){let a=b.value,c=(0,j.Sh)(a);return new Response(JSON.stringify({error:(a=>{let b=a.message;if("string"==typeof b&&b.length>0)return b;let c=a.cause;if(c instanceof Error&&c.message.length>0)return c.message;switch(a._tag){case"ValidationError":return`Invalid ${a.field}: ${a.reason}`;case"NotFoundError":return`${a.resource} not found: ${a.id}`;case"PermissionError":return`Permission denied: ${a.action} on ${a.resource}`;case"DBError":return`${a.db} ${a.op} failed`;case"FSError":return`${a.op} ${a.path} failed`;case"WSError":return`${a.proto} ${a.kind} failed`;case"AgentError":return`${a.provider} ${a.kind} failed`;default:return a._tag}})(a),tag:a._tag}),{status:c,headers:{"content-type":"application/json"}})}return console.error("[handler] uncaught defect:\n"+e.j9(a)),new Response(JSON.stringify({error:"Internal Server Error",tag:"InternalError"}),{status:500,headers:{"content-type":"application/json"}})},n=a=>async b=>{let c=await i.s9.runPromiseExit(a(b));return g.YW(c,{onFailure:a=>m(a),onSuccess:a=>a})},o=a=>async(b,c)=>{let d=await c.params,e=await i.s9.runPromiseExit(a(b,d));return g.YW(e,{onFailure:a=>m(a),onSuccess:a=>a})},p=a=>h.$mh({try:()=>a.json(),catch:()=>new j.yI({field:"body",reason:"invalid JSON"})});d()}catch(a){d(a)}})},74075:a=>{a.exports=require("zlib")},76760:a=>{a.exports=require("node:path")},77598:a=>{a.exports=require("node:crypto")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},83997:a=>{a.exports=require("tty")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},89717:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(1445),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/redis/command/route",pathname:"/api/redis/command",filename:"route",bundlePath:"app/api/redis/command/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/redis/command/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/redis/command/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,deploymentId:v,params:w,nextConfig:x,parsedUrl:y,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=e,I=(0,k.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,y,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(x.adapterPath)return await K();throw new t.NoFallbackError}}let L=null;!J||z.isDev||A||(L=F,L="/index"===L?"/":L);let M=!0===z.isDev||!J,N=J&&!M;H&&G&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,i.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,h.getRequestMeta)(a,"minimalMode"),T=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,x,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:w,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!x.experimental.authInterrupts},cacheComponents:!!x.cacheComponents,supportsDynamicResponse:M,incrementalCache:T,cacheLifeProfiles:x.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,C)},sharedContext:{buildId:g,deploymentId:v}},V=new l.NodeNextRequest(a),W=new l.NodeNextResponse(b),X=m.NextRequestAdapter.fromNodeNextRequest(V,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(X,U).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${O} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${O} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!S&&D&&E&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=U.renderOpts.fetchMetrics;let h=U.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=U.renderOpts.collectedTags;if(!J)return await (0,p.I)(V,W,d,U.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:U.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},k=await z.handleResponse({req:a,nextConfig:x,cacheKey:L,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return S&&J||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(V,W,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};R&&Q?await h(Q):(e=P.getActiveScopeSpan(),await P.withPropagatedContext(a.headers,()=>P.trace(n.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},h),void 0,!R))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;return await (0,p.I)(V,W,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},91645:a=>{a.exports=require("net")},94735:a=>{a.exports=require("events")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304],()=>b(b.s=89717));module.exports=c})();