@surething/cockpit 1.0.223 → 1.0.225
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.
- package/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +3 -4
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +0 -6
- package/.next-prod/server/app/_global-error/page.js +2 -2
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +2 -2
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
- package/.next-prod/server/app/api/chat/ollama/route.js +3 -3
- package/.next-prod/server/app/api/chat/pty-input/route.js +1 -1
- package/.next-prod/server/app/api/chat/route.js +2 -2
- package/.next-prod/server/app/api/chat/stop/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +2 -2
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js +2 -2
- package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/push/public-key/route.js +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/m/page.js +2 -2
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
- package/.next-prod/server/app/page.js +2 -2
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +2 -2
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +3 -4
- package/.next-prod/server/chunks/2637.js +1 -1
- package/.next-prod/server/chunks/2939.js +1 -1
- package/.next-prod/server/chunks/6955.js +1 -1
- package/.next-prod/server/chunks/7003.js +1 -1
- package/.next-prod/server/chunks/8916.js +1 -1
- package/.next-prod/server/chunks/9658.js +8 -8
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/WSUa0F_X_5GfMavORSxeX/_buildManifest.js +1 -0
- package/.next-prod/static/chunks/2576-7459f532e98e12d6.js +25 -0
- package/.next-prod/static/chunks/5156-04537ce3c95435b2.js +3 -0
- package/.next-prod/static/chunks/9469-424d7be830f93183.js +14 -0
- package/.next-prod/static/chunks/app/_global-error/page-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/agent/test/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/stop/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/current-branch/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/push/public-key/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/push/subscribe/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-cc849cd7b6f01cad.js +1 -0
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/routes.d.ts +1 -2
- package/.next-prod/types/validator.ts +0 -9
- package/dist/{chunk-BM3ZNL5S.mjs → chunk-7T2FX6X4.mjs} +1 -1
- package/dist/{chunk-5BOGGUGT.mjs → chunk-EYFKVFTP.mjs} +9 -0
- package/dist/{chunk-5CRGWEWX.mjs → chunk-WULEYRUC.mjs} +33 -5
- package/dist/httpApi.mjs +2 -2
- package/dist/scheduledTasks.mjs +85 -52
- package/dist/{server-DRMO2DUJ.mjs → server-TRLQURYS.mjs} +2 -2
- package/dist/wsServer.mjs +4 -4
- package/package.json +1 -1
- package/.next-prod/server/app/api/push/test/route.js +0 -1
- package/.next-prod/server/app/api/push/test/route.js.nft.json +0 -1
- package/.next-prod/server/app/api/push/test/route_client-reference-manifest.js +0 -1
- package/.next-prod/static/IQwBHyZ3W2LMUZtDfCp-B/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/2576-02a6e185664e2e1a.js +0 -25
- package/.next-prod/static/chunks/5156-2953531342c13696.js +0 -3
- package/.next-prod/static/chunks/9469-fb5c6f08ba6bab74.js +0 -14
- package/.next-prod/static/chunks/app/_global-error/page-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/agent/test/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/bash/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/codex/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/stop/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/current-branch/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/push/public-key/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/push/subscribe/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/push/test/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-422b501ed5769a87.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-422b501ed5769a87.js +0 -1
- package/.next-prod/types/app/api/push/test/route.ts +0 -351
- /package/.next-prod/static/{IQwBHyZ3W2LMUZtDfCp-B → WSUa0F_X_5GfMavORSxeX}/_ssgManifest.js +0 -0
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
|
|
17
17
|
`),q){let a=await (0,g.Pn)(q,b);await (0,g.CS)(q,b,"unread",a)}(0,h.HS)(b,"idle")}catch(a){(0,h.HS)(b,z.signal.aborted?"idle":"error"),z.signal.aborted||F(`data: ${JSON.stringify({type:"error",error:String(a)})}
|
|
18
18
|
|
|
19
|
-
`)}G();return}try{let a,b=p&&p.length>0,c={...d&&{resume:d},...q&&{cwd:q},settingSources:["user","project","local"],permissionMode:"plan"===u?"plan":"bypassPermissions",..."plan"!==u&&{allowDangerouslySkipPermissions:!0},includePartialMessages:!0,abortController:z,..."claude2"===s&&{env:{...process.env,CLAUDE_CONFIG_DIR:j.h9}}};if(b){let b=async function*(){yield{type:"user",message:{role:"user",content:y},parent_tool_use_id:null,session_id:d||`session-${Date.now()}`}}();a=(0,e.query)({prompt:b,options:c})}else a=(0,e.query)({prompt:x,options:c});let f=a;for(let a=0;a<=1;a++){let b=!1;try{for await(let a of f){if(D)break;if("system"===a.type&&"init"===a.subtype&&a.session_id){let b=a.session_id;B!==b&&((0,h.GS)(B,b),B=b),C=b,q&&(0,g.CS)(q,C,"loading",void 0,E).catch(()=>{})}"result"===a.type&&(b=!0),F(`data: ${JSON.stringify(a)}
|
|
19
|
+
`)}G();return}try{let a,b=p&&p.length>0,c={...d&&{resume:d},...q&&{cwd:q},settingSources:["user","project","local"],permissionMode:"plan"===u?"plan":"bypassPermissions",..."plan"!==u&&{allowDangerouslySkipPermissions:!0},..."plan"===u&&{canUseTool:async(a,b)=>"ExitPlanMode"===a?{behavior:"deny",message:"Plan presented to the user. There is no approval dialog to click in this environment — the user approves by turning off Plan mode (via the plan card button) and resending, which then executes. Do not ask the user to confirm in a popup; stop here.",interrupt:!0}:{behavior:"allow",updatedInput:b}},includePartialMessages:!0,abortController:z,..."claude2"===s&&{env:{...process.env,CLAUDE_CONFIG_DIR:j.h9}}};if(b){let b=async function*(){yield{type:"user",message:{role:"user",content:y},parent_tool_use_id:null,session_id:d||`session-${Date.now()}`}}();a=(0,e.query)({prompt:b,options:c})}else a=(0,e.query)({prompt:x,options:c});let f=a;for(let a=0;a<=1;a++){let b=!1;try{for await(let a of f){if(D)break;if("system"===a.type&&"init"===a.subtype&&a.session_id){let b=a.session_id;B!==b&&((0,h.GS)(B,b),B=b),C=b,q&&(0,g.CS)(q,C,"loading",void 0,E).catch(()=>{})}"result"===a.type&&(b=!0),F(`data: ${JSON.stringify(a)}
|
|
20
20
|
|
|
21
21
|
`)}}catch(a){if(D||z.signal.aborted)break;throw a}if(b||D||z.signal.aborted)break;let i=new AbortController;z.signal.addEventListener("abort",()=>i.abort(),{once:!0}),console.log(`[Chat] Stream ended without result message, resuming (attempt ${a+1}/1)`),f=(0,e.query)({prompt:"continue",options:{...c,abortController:i,resume:C||d}})}if(q&&C){let a=await (0,g.Pn)(q,C);await (0,g.CS)(q,C,"unread",a)}(0,h.HS)(B,"idle"),G()}catch(a){if(q&&C){let a=await (0,g.Pn)(q,C);await (0,g.CS)(q,C,"unread",a)}if(z.signal.aborted){(0,h.HS)(B,"idle"),G();return}(0,h.HS)(B,"error"),console.error("Stream error:",a),F(`data: ${JSON.stringify({type:"error",error:String(a)})}
|
|
22
22
|
|
|
23
|
-
`),G()}})(),Response.json({runKey:B,sessionId:C??null})}));d()}catch(a){d(a)}})},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")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},
|
|
23
|
+
`),G()}})(),Response.json({runKey:B,sessionId:C??null})}));d()}catch(a){d(a)}})},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")},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},41310:(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(9716),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/chat/route",pathname:"/api/chat",filename:"route",bundlePath:"app/api/chat/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/chat/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/chat/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)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},51181:a=>{a.exports=require("web-push")},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")},74075:a=>{a.exports=require("zlib")},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")},99147:(a,b,c)=>{function d(a){return{type:"system",subtype:"init",session_id:a}}function e(a,b){return{type:"result",subtype:"success",session_id:a,usage:b?.usage}}function f(a,b){let c=[],d=a.message?.content;if("assistant"===a.type&&Array.isArray(d)){let a=d.filter(a=>"text"===a.type&&a.text).map(a=>a.text).join("");a&&c.push({type:"stream_event",session_id:b,event:{type:"content_block_delta",delta:{type:"text_delta",text:a}}});let e=d.filter(a=>"tool_use"===a.type);return e.length>0&&c.push({type:"assistant",session_id:b,message:{role:"assistant",content:e}}),c}if("user"===a.type&&Array.isArray(d)){let a=d.filter(a=>"tool_result"===a.type&&a.tool_use_id);a.length>0&&c.push({type:"user",session_id:b,message:{role:"user",content:a}})}return c}c.d(b,{R1:()=>f,wL:()=>e,zp:()=>d})}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,7184,304,7003,2637,3863],()=>b(b.s=41310));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=1527,a.ids=[1527],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")},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")},23731:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.LO,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(32908),f=a([e]);e=(f.then?(await f)():f)[0],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")},32908:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LO:()=>k,OR:()=>j,fA:()=>i});var e=c(89705),f=c(82940),g=c(72891),h=a([g]);g=(h.then?(await h)():h)[0];let i="nodejs",j="force-dynamic",k=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a),c=!!b.sessionId&&(0,f.Y6)(b.sessionId)||!!b.runId&&(0,f.Y6)(b.runId);return Response.json({ok:c})}));d()}catch(a){d(a)}})},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")},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")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},82940:(a,b,c)=>{c.d(b,{AD:()=>j,GS:()=>l,HS:()=>m,Si:()=>n,Y6:()=>q,ah:()=>k,e5:()=>p,yQ:()=>o});let d=globalThis,e=d.__cockpitRunRegistry??(d.__cockpitRunRegistry=new Map),f=d.__cockpitRunListeners??(d.__cockpitRunListeners=new Map),g=d.__cockpitRunSeqByKey??(d.__cockpitRunSeqByKey=new Map);function h(a){for(let b of(a.seq+=1,a.keys))g.set(b,a.seq);return a.seq}function i(a,b){for(let c of a.keys){let a=f.get(c);if(a)for(let c of a)try{c(b)}catch{}}}function j(a,b,c){let d=e.get(a),f=d?.seq??g.get(a)??0;if(d)for(let a of(d.evictTimer&&clearTimeout(d.evictTimer),d.keys))e.delete(a);e.set(a,{keys:new Set([a]),cwd:b,status:"running",seq:f,events:[],updatedAt:Date.now()}),c&&k(a,{type:"user",_human:!0,message:{role:"user",content:c}})}function k(a,b){let c=e.get(a);c&&"running"===c.status&&(h(c),c.events.push(b),c.updatedAt=Date.now(),i(c,{seq:c.seq,message:b}))}function l(a,b){if(a===b)return;let c=e.get(a);c&&(c.keys.add(b),e.set(b,c))}function m(a,b="idle"){let c=e.get(a);if(c){if("running"!==c.status){"idle"===c.status&&"error"===b&&(c.status="error");return}c.status=b,c.updatedAt=Date.now(),h(c),i(c,{seq:c.seq,message:{type:"run-ended",status:b}}),c.evictTimer&&clearTimeout(c.evictTimer),c.evictTimer=setTimeout(()=>{for(let a of c.keys)e.delete(a)},6e4)}}function n(a){let b=e.get(a);return b?{status:b.status,seq:b.seq,events:b.events.slice()}:null}function o(a){return e.get(a)?.status==="running"}function p(a,b){let c=e.get(a);c&&(c.abort=b)}function q(a){let b=e.get(a);if(!b)return!1;try{b.abort?.()}catch{}return k(a,{type:"result",subtype:"stopped"}),m(a,"idle"),!0}},83701:(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(23731),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/chat/stop/route",pathname:"/api/chat/stop",filename:"route",bundlePath:"app/api/chat/stop/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/chat/stop/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/chat/stop/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)}})},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=83701));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=1527,a.ids=[1527],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")},5406:(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(23731),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/chat/stop/route",pathname:"/api/chat/stop",filename:"route",bundlePath:"app/api/chat/stop/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/chat/stop/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/chat/stop/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)}})},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")},23731:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.LO,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(32908),f=a([e]);e=(f.then?(await f)():f)[0],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")},32908:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LO:()=>k,OR:()=>j,fA:()=>i});var e=c(89705),f=c(82940),g=c(72891),h=a([g]);g=(h.then?(await h)():h)[0];let i="nodejs",j="force-dynamic",k=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a),c=!!b.sessionId&&(0,f.Y6)(b.sessionId)||!!b.runId&&(0,f.Y6)(b.runId);return Response.json({ok:c})}));d()}catch(a){d(a)}})},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")},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")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},82940:(a,b,c)=>{c.d(b,{AD:()=>j,GS:()=>l,HS:()=>m,Si:()=>n,Y6:()=>r,ah:()=>k,e5:()=>q,j$:()=>p,yQ:()=>o});let d=globalThis,e=d.__cockpitRunRegistry??(d.__cockpitRunRegistry=new Map),f=d.__cockpitRunListeners??(d.__cockpitRunListeners=new Map),g=d.__cockpitRunSeqByKey??(d.__cockpitRunSeqByKey=new Map);function h(a){for(let b of(a.seq+=1,a.keys))g.set(b,a.seq);return a.seq}function i(a,b){for(let c of a.keys){let a=f.get(c);if(a)for(let c of a)try{c(b)}catch{}}}function j(a,b,c){let d=e.get(a),f=d?.seq??g.get(a)??0;if(d)for(let a of(d.evictTimer&&clearTimeout(d.evictTimer),d.keys))e.delete(a);e.set(a,{keys:new Set([a]),cwd:b,status:"running",seq:f,events:[],updatedAt:Date.now()}),c&&k(a,{type:"user",_human:!0,message:{role:"user",content:c}})}function k(a,b){let c=e.get(a);c&&"running"===c.status&&(h(c),c.events.push(b),c.updatedAt=Date.now(),i(c,{seq:c.seq,message:b}))}function l(a,b){if(a===b)return;let c=e.get(a);c&&(c.keys.add(b),c.sessionId=b,e.set(b,c))}function m(a,b="idle"){let c=e.get(a);if(c){if("running"!==c.status){"idle"===c.status&&"error"===b&&(c.status="error");return}c.status=b,c.updatedAt=Date.now(),h(c),i(c,{seq:c.seq,message:{type:"run-ended",status:b}}),c.evictTimer&&clearTimeout(c.evictTimer),c.evictTimer=setTimeout(()=>{for(let a of c.keys)e.delete(a)},6e4)}}function n(a){let b=e.get(a);return b?{status:b.status,seq:b.seq,events:b.events.slice()}:null}function o(a){return e.get(a)?.status==="running"}function p(a){return e.get(a)?.sessionId??null}function q(a,b){let c=e.get(a);c&&(c.abort=b)}function r(a){let b=e.get(a);if(!b)return!1;try{b.abort?.()}catch{}return k(a,{type:"result",subtype:"stopped"}),m(a,"idle"),!0}},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=5406));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8250,a.ids=[8250],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")},4984:a=>{a.exports=require("readline")},6005:(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(57590),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/claude-stats/route",pathname:"/api/claude-stats",filename:"route",bundlePath:"app/api/claude-stats/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/claude-stats/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/claude-stats/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)}})},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,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=(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}},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")},19547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>s,fA:()=>r,fG:()=>t});var e=c(79748),f=c(33873),g=c(29021),h=c(4984),i=c(89705),j=c(7939),k=c(72891),l=c(770),m=a([k]);k=(m.then?(await m)():m)[0];let r="nodejs",s="force-dynamic";async function n(a){let b,c={},d=new Map,g=new Map,h={},i=0,j=0,k="",l=new Set,m=new Map;try{b=await (0,e.readdir)(a)}catch{return null}for(let j of b){let b,n=(0,f.join)(a,j);try{b=await (0,e.readdir)(n)}catch{continue}for(let a of b){if(!a.endsWith(".jsonl"))continue;let b=(0,f.join)(n,a);try{await o(b,{modelUsage:c,dailyMap:d,dailyTokenMap:g,hourCounts:h,sessionIds:l,sessionTimes:m,onMessage:()=>{i++},onFirstDate:a=>{(!k||a<k)&&(k=a)}})}catch{}}}j=l.size;let n=0,p="";for(let[a,b]of m){let c=b.end-b.start;c>n&&(n=c,p=a)}let q=Array.from(d.entries()).map(([a,b])=>({date:a,messageCount:b.messages,sessionCount:b.sessions.size,toolCallCount:b.toolCalls})).sort((a,b)=>a.date.localeCompare(b.date)),r=Array.from(g.entries()).map(([a,b])=>({date:a,tokensByModel:b})).sort((a,b)=>a.date.localeCompare(b.date));return{modelUsage:c,dailyActivity:q,dailyModelTokens:r,hourCounts:h,totalSessions:j,totalMessages:i,longestSession:n>0?{sessionId:p,duration:n}:void 0,firstSessionDate:k||void 0}}async function o(a,b){for await(let c of(0,h.createInterface)({input:(0,g.createReadStream)(a,{encoding:"utf-8"}),crlfDelay:1/0})){let a;if(!c)continue;try{a=JSON.parse(c)}catch{continue}let d=a.type,e=a.sessionId,f=a.timestamp;if(e&&b.sessionIds.add(e),e&&f){let a=new Date(f).getTime();if(!isNaN(a)){let c=b.sessionTimes.get(e);c?(a<c.start&&(c.start=a),a>c.end&&(c.end=a)):b.sessionTimes.set(e,{start:a,end:a})}}let g=f?.slice(0,10);if(g&&b.onFirstDate(g),f&&"user"===d){let a=new Date(f).getHours();isNaN(a)||(b.hourCounts[String(a)]=(b.hourCounts[String(a)]||0)+1)}if("user"===d&&(b.onMessage(),g&&e)){b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0});let a=b.dailyMap.get(g);a.messages++,a.sessions.add(e)}if("assistant"===d){b.onMessage();let c=a.message;if(!c)continue;let d=c.model,e=c.usage;if(d&&e){b.modelUsage[d]||(b.modelUsage[d]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0});let a=b.modelUsage[d];a.inputTokens+=e.input_tokens||0,a.outputTokens+=e.output_tokens||0,a.cacheReadInputTokens+=e.cache_read_input_tokens||0,a.cacheCreationInputTokens+=e.cache_creation_input_tokens||0;let c=(e.input_tokens||0)+(e.output_tokens||0)+(e.cache_read_input_tokens||0)+(e.cache_creation_input_tokens||0);if(g){b.dailyTokenMap.has(g)||b.dailyTokenMap.set(g,{});let a=b.dailyTokenMap.get(g);a[d]=(a[d]||0)+c}}let f=c.content;if(Array.isArray(f)&&g){let a=f.filter(a=>"tool_use"===a.type).length;a>0&&(b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0}),b.dailyMap.get(g).toolCalls+=a)}}}}async function p(a){try{let b=await (0,e.stat)(a);if(Date.now()-b.mtimeMs<3e5){let b=await (0,e.readFile)(a,"utf-8");return JSON.parse(b)}}catch{}return null}async function q(a,b){try{await (0,j.A0)(j.Kv),await (0,e.writeFile)(a,JSON.stringify(b),"utf-8")}catch{}}let t=(0,k.RL)(a=>i.JkU(function*(){let b=new URL(a.url).searchParams.get("engine")||"claude",c="claude2"===b?(0,f.join)(j.h9,"projects"):(0,f.join)(j.th,"projects"),d="claude2"===b?(0,f.join)(j.Kv,"stats-cache-claude2.json"):(0,f.join)(j.Kv,"stats-cache.json"),e=yield*i.$mh({try:()=>p(d),catch:()=>null}).pipe(i.DM4(()=>null));if(e)return(0,k.ok)(e);let g=yield*i.$mh({try:()=>n(c),catch:a=>new l.uV({message:"Failed to scan sessions",cause:a})});return g?(yield*i.$mh({try:()=>q(d,g),catch:()=>null}).pipe(i.DM4(()=>null)),(0,k.ok)(g)):yield*i.fJG(new l.m_({resource:"projectsDir",id:c}))}));d()}catch(a){d(a)}})},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")},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")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57590:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.fG,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(19547),f=a([e]);e=(f.then?(await f)():f)[0],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")},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=6005));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8250,a.ids=[8250],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")},4984:a=>{a.exports=require("readline")},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=(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")},19547:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>s,fA:()=>r,fG:()=>t});var e=c(79748),f=c(33873),g=c(29021),h=c(4984),i=c(89705),j=c(7939),k=c(72891),l=c(770),m=a([k]);k=(m.then?(await m)():m)[0];let r="nodejs",s="force-dynamic";async function n(a){let b,c={},d=new Map,g=new Map,h={},i=0,j=0,k="",l=new Set,m=new Map;try{b=await (0,e.readdir)(a)}catch{return null}for(let j of b){let b,n=(0,f.join)(a,j);try{b=await (0,e.readdir)(n)}catch{continue}for(let a of b){if(!a.endsWith(".jsonl"))continue;let b=(0,f.join)(n,a);try{await o(b,{modelUsage:c,dailyMap:d,dailyTokenMap:g,hourCounts:h,sessionIds:l,sessionTimes:m,onMessage:()=>{i++},onFirstDate:a=>{(!k||a<k)&&(k=a)}})}catch{}}}j=l.size;let n=0,p="";for(let[a,b]of m){let c=b.end-b.start;c>n&&(n=c,p=a)}let q=Array.from(d.entries()).map(([a,b])=>({date:a,messageCount:b.messages,sessionCount:b.sessions.size,toolCallCount:b.toolCalls})).sort((a,b)=>a.date.localeCompare(b.date)),r=Array.from(g.entries()).map(([a,b])=>({date:a,tokensByModel:b})).sort((a,b)=>a.date.localeCompare(b.date));return{modelUsage:c,dailyActivity:q,dailyModelTokens:r,hourCounts:h,totalSessions:j,totalMessages:i,longestSession:n>0?{sessionId:p,duration:n}:void 0,firstSessionDate:k||void 0}}async function o(a,b){for await(let c of(0,h.createInterface)({input:(0,g.createReadStream)(a,{encoding:"utf-8"}),crlfDelay:1/0})){let a;if(!c)continue;try{a=JSON.parse(c)}catch{continue}let d=a.type,e=a.sessionId,f=a.timestamp;if(e&&b.sessionIds.add(e),e&&f){let a=new Date(f).getTime();if(!isNaN(a)){let c=b.sessionTimes.get(e);c?(a<c.start&&(c.start=a),a>c.end&&(c.end=a)):b.sessionTimes.set(e,{start:a,end:a})}}let g=f?.slice(0,10);if(g&&b.onFirstDate(g),f&&"user"===d){let a=new Date(f).getHours();isNaN(a)||(b.hourCounts[String(a)]=(b.hourCounts[String(a)]||0)+1)}if("user"===d&&(b.onMessage(),g&&e)){b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0});let a=b.dailyMap.get(g);a.messages++,a.sessions.add(e)}if("assistant"===d){b.onMessage();let c=a.message;if(!c)continue;let d=c.model,e=c.usage;if(d&&e){b.modelUsage[d]||(b.modelUsage[d]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0});let a=b.modelUsage[d];a.inputTokens+=e.input_tokens||0,a.outputTokens+=e.output_tokens||0,a.cacheReadInputTokens+=e.cache_read_input_tokens||0,a.cacheCreationInputTokens+=e.cache_creation_input_tokens||0;let c=(e.input_tokens||0)+(e.output_tokens||0)+(e.cache_read_input_tokens||0)+(e.cache_creation_input_tokens||0);if(g){b.dailyTokenMap.has(g)||b.dailyTokenMap.set(g,{});let a=b.dailyTokenMap.get(g);a[d]=(a[d]||0)+c}}let f=c.content;if(Array.isArray(f)&&g){let a=f.filter(a=>"tool_use"===a.type).length;a>0&&(b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0}),b.dailyMap.get(g).toolCalls+=a)}}}}async function p(a){try{let b=await (0,e.stat)(a);if(Date.now()-b.mtimeMs<3e5){let b=await (0,e.readFile)(a,"utf-8");return JSON.parse(b)}}catch{}return null}async function q(a,b){try{await (0,j.A0)(j.Kv),await (0,e.writeFile)(a,JSON.stringify(b),"utf-8")}catch{}}let t=(0,k.RL)(a=>i.JkU(function*(){let b=new URL(a.url).searchParams.get("engine")||"claude",c="claude2"===b?(0,f.join)(j.h9,"projects"):(0,f.join)(j.th,"projects"),d="claude2"===b?(0,f.join)(j.Kv,"stats-cache-claude2.json"):(0,f.join)(j.Kv,"stats-cache.json"),e=yield*i.$mh({try:()=>p(d),catch:()=>null}).pipe(i.DM4(()=>null));if(e)return(0,k.ok)(e);let g=yield*i.$mh({try:()=>n(c),catch:a=>new l.uV({message:"Failed to scan sessions",cause:a})});return g?(yield*i.$mh({try:()=>q(d,g),catch:()=>null}).pipe(i.DM4(()=>null)),(0,k.ok)(g)):yield*i.fJG(new l.m_({resource:"projectsDir",id:c}))}));d()}catch(a){d(a)}})},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")},32190:(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(57590),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/claude-stats/route",pathname:"/api/claude-stats",filename:"route",bundlePath:"app/api/claude-stats/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/claude-stats/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/claude-stats/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)}})},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")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57590:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.fG,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(19547),f=a([e]);e=(f.then?(await f)():f)[0],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")},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=32190));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=2316,a.ids=[2316],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},2569:(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(34028),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/commands/route",pathname:"/api/commands",filename:"route",bundlePath:"app/api/commands/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/commands/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/commands/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)}})},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")},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")},33873:a=>{a.exports=require("path")},34028:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.fG,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(90837),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},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")},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")},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")},90837:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>i,fA:()=>h,fG:()=>k});var e=c(89705),f=c(72891),g=a([f]);f=(g.then?(await g)():g)[0];let h="nodejs",i="force-dynamic",j=[{name:"/qa",description:"Enter requirements clarification mode",source:"builtin"},{name:"/fx",description:"Enter bug evidence-chain analysis mode",source:"builtin"},{name:"/ex",description:"Enter structured analysis & discussion mode",source:"builtin"},{name:"/go",description:"Enter landing mode: MVP staged implementation with self-verify",source:"builtin"},{name:"/cg",description:"Enter project graph (codegraph) exploration mode",source:"builtin"},{name:"/cc",description:"Enter Cockpit CLI (cock subcommands) operation mode",source:"builtin"},{name:"/cr",description:"Full code review: static triangulation + dynamic modelling",source:"builtin"},{name:"/new-branch",description:"Create a clean new branch off the latest origin/main",source:"builtin"}],k=(0,f.RL)(()=>e.PyW(new Response(JSON.stringify(j),{status:200,headers:{"Content-Type":"application/json"}})));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=2569));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=2316,a.ids=[2316],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")},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")},33873:a=>{a.exports=require("path")},34028:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.fG,dynamic:()=>e.OR,runtime:()=>e.fA});var e=c(90837),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},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")},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")},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")},90837:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{OR:()=>i,fA:()=>h,fG:()=>k});var e=c(89705),f=c(72891),g=a([f]);f=(g.then?(await g)():g)[0];let h="nodejs",i="force-dynamic",j=[{name:"/qa",description:"Enter requirements clarification mode",source:"builtin"},{name:"/fx",description:"Enter bug evidence-chain analysis mode",source:"builtin"},{name:"/ex",description:"Enter structured analysis & discussion mode",source:"builtin"},{name:"/go",description:"Enter landing mode: MVP staged implementation with self-verify",source:"builtin"},{name:"/cg",description:"Enter project graph (codegraph) exploration mode",source:"builtin"},{name:"/cc",description:"Enter Cockpit CLI (cock subcommands) operation mode",source:"builtin"},{name:"/cr",description:"Full code review: static triangulation + dynamic modelling",source:"builtin"},{name:"/new-branch",description:"Create a clean new branch off the latest origin/main",source:"builtin"}],k=(0,f.RL)(()=>e.PyW(new Response(JSON.stringify(j),{status:200,headers:{"Content-Type":"application/json"}})));d()}catch(a){d(a)}})},91645:a=>{a.exports=require("net")},93538:(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(34028),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/commands/route",pathname:"/api/commands",filename:"route",bundlePath:"app/api/commands/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/commands/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/commands/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)}})},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=93538));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=7128,a.ids=[7128],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{a.exports=require("url")},2737:(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(70792),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/comments/route",pathname:"/api/comments",filename:"route",bundlePath:"app/api/comments/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/comments/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/comments/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)}})},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,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=(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}},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")},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")},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")},70792:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>e.SJ,GET:()=>e.fG,POST:()=>e.LO,PUT:()=>e.Uc});var e=c(88218),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")},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")},88218:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LO:()=>m,SJ:()=>o,Uc:()=>n,fG:()=>l});var e=c(89705),f=c(7939),g=c(72891),h=c(770),i=a([g]);g=(i.then?(await i)():i)[0];let j=a=>e.$mh({try:()=>(0,f.JE)((0,f.i4)(a),{comments:[]}),catch:b=>new h.uU({path:(0,f.i4)(a),op:"read",cause:b})}),k=(a,b)=>e.$mh({try:()=>(0,f.An)((0,f.i4)(a),b),catch:b=>new h.uU({path:(0,f.i4)(a),op:"write",cause:b})}),l=(0,g.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("filePath");if(!c)return yield*e.fJG(new h.yI({field:"cwd",reason:"missing"}));let f=yield*j(c);return d?(0,g.ok)({comments:f.comments.filter(a=>a.filePath===d)}):(0,g.ok)(f)})),m=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a);if(!b.cwd||!b.filePath||void 0===b.startLine||void 0===b.endLine||void 0===b.content)return yield*e.fJG(new h.yI({field:"cwd|filePath|startLine|endLine|content",reason:"missing"}));let{cwd:c,filePath:d,startLine:f,endLine:i,content:l,selectedText:m}=b,n=yield*j(c),o={id:`comment-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,filePath:d,startLine:f,endLine:i,content:l,...m?{selectedText:m}:{},createdAt:Date.now()};return n.comments.push(o),yield*k(c,n),(0,g.ok)({comment:o})})),n=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a);if(!b.cwd||!b.id||void 0===b.content)return yield*e.fJG(new h.yI({field:"cwd|id|content",reason:"missing"}));let{cwd:c,id:d,content:f}=b,i=yield*j(c),l=i.comments.findIndex(a=>a.id===d);return -1===l?yield*e.fJG(new h.m_({resource:"comment",id:d})):(i.comments[l]={...i.comments[l],content:f,updatedAt:Date.now()},yield*k(c,i),(0,g.ok)({comment:i.comments[l]}))})),o=(0,g.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("id"),f=b.get("all");if(!c)return yield*e.fJG(new h.yI({field:"cwd",reason:"missing"}));if("true"===f)return yield*k(c,{comments:[]}),(0,g.ok)({success:!0});if(!d)return yield*e.fJG(new h.yI({field:"id",reason:"missing"}));let i=yield*j(c),l=i.comments.findIndex(a=>a.id===d);return -1===l?yield*e.fJG(new h.m_({resource:"comment",id:d})):(i.comments.splice(l,1),yield*k(c,i),(0,g.ok)({success:!0}))}));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=2737));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=7128,a.ids=[7128],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=(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")},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")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57754:(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(70792),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/comments/route",pathname:"/api/comments",filename:"route",bundlePath:"app/api/comments/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/comments/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/comments/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")},70792:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{DELETE:()=>e.SJ,GET:()=>e.fG,POST:()=>e.LO,PUT:()=>e.Uc});var e=c(88218),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")},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")},88218:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LO:()=>k,SJ:()=>m,Uc:()=>l,fG:()=>j});var e=c(89705),f=c(7939),g=c(72891),h=c(770),i=a([g]);g=(i.then?(await i)():i)[0];let j=(0,g.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("filePath");if(!c)return yield*e.fJG(new h.yI({field:"cwd",reason:"missing"}));let i=yield*e.$mh({try:()=>(0,f.JE)((0,f.i4)(c),{comments:[]}),catch:a=>new h.uU({path:(0,f.i4)(c),op:"read",cause:a})});return d?(0,g.ok)({comments:i.comments.filter(a=>a.filePath===d)}):(0,g.ok)(i)})),k=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a);if(!b.cwd||!b.filePath||void 0===b.startLine||void 0===b.endLine||void 0===b.content)return yield*e.fJG(new h.yI({field:"cwd|filePath|startLine|endLine|content",reason:"missing"}));let{cwd:c,filePath:d,startLine:i,endLine:j,content:k,selectedText:l}=b,m=(0,f.i4)(c),n={id:`comment-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,filePath:d,startLine:i,endLine:j,content:k,...l?{selectedText:l}:{},createdAt:Date.now()};return yield*e.$mh({try:()=>(0,f.Ux)(m,async()=>{let a=await (0,f.JE)(m,{comments:[]});a.comments.push(n),await (0,f.An)(m,a)}),catch:a=>new h.uU({path:m,op:"write",cause:a})}),(0,g.ok)({comment:n})})),l=(0,g.RL)(a=>e.JkU(function*(){let b=yield*(0,g.k9)(a);if(!b.cwd||!b.id||void 0===b.content)return yield*e.fJG(new h.yI({field:"cwd|id|content",reason:"missing"}));let{cwd:c,id:d,content:i}=b,j=(0,f.i4)(c),k=yield*e.$mh({try:()=>(0,f.Ux)(j,async()=>{let a=await (0,f.JE)(j,{comments:[]}),b=a.comments.findIndex(a=>a.id===d);return -1===b?null:(a.comments[b]={...a.comments[b],content:i,updatedAt:Date.now()},await (0,f.An)(j,a),a.comments[b])}),catch:a=>new h.uU({path:j,op:"write",cause:a})});return k?(0,g.ok)({comment:k}):yield*e.fJG(new h.m_({resource:"comment",id:d}))})),m=(0,g.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("cwd"),d=b.get("id"),i=b.get("all");if(!c)return yield*e.fJG(new h.yI({field:"cwd",reason:"missing"}));let j=(0,f.i4)(c);return"true"===i?(yield*e.$mh({try:()=>(0,f.Ux)(j,()=>(0,f.An)(j,{comments:[]})),catch:a=>new h.uU({path:j,op:"write",cause:a})}),(0,g.ok)({success:!0})):d?(yield*e.$mh({try:()=>(0,f.Ux)(j,async()=>{let a=await (0,f.JE)(j,{comments:[]}),b=a.comments.findIndex(a=>a.id===d);return -1!==b&&(a.comments.splice(b,1),await (0,f.An)(j,a),!0)}),catch:a=>new h.uU({path:j,op:"write",cause:a})}))?(0,g.ok)({success:!0}):yield*e.fJG(new h.m_({resource:"comment",id:d})):yield*e.fJG(new h.yI({field:"id",reason:"missing"}))}));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=57754));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=8232,a.ids=[8232],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")},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")},27177:(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(49818),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("id"),d=b.get("connectionString"),i=b.get("schema")||"public",j=b.get("table");if(!c||!d||!j)return yield*e.fJG(new g.yI({field:c?d?"table":"connectionString":"id",reason:"missing"}));let k=yield*h.HG,[l,m,n,o]=yield*e.Q7R([k.query(c,d,`SELECT column_name, data_type, udt_name, is_nullable, column_default, character_maximum_length
|
|
1
|
+
"use strict";(()=>{var a={};a.id=8232,a.ids=[8232],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")},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")},23262:(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(82936),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/columns/route",pathname:"/api/db/columns",filename:"route",bundlePath:"app/api/db/columns/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/columns/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/db/columns/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)}})},27177:(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(49818),i=a([f]);f=(i.then?(await i)():i)[0];let j=(0,f.RL)(a=>e.JkU(function*(){let b=new URL(a.url).searchParams,c=b.get("id"),d=b.get("connectionString"),i=b.get("schema")||"public",j=b.get("table");if(!c||!d||!j)return yield*e.fJG(new g.yI({field:c?d?"table":"connectionString":"id",reason:"missing"}));let k=yield*h.HG,[l,m,n,o]=yield*e.Q7R([k.query(c,d,`SELECT column_name, data_type, udt_name, is_nullable, column_default, character_maximum_length
|
|
2
2
|
FROM information_schema.columns
|
|
3
3
|
WHERE table_schema = $1 AND table_name = $2
|
|
4
4
|
ORDER BY ordinal_position`,[i,j]),k.query(c,d,`SELECT kcu.column_name
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
ON tc.constraint_name = kcu.constraint_name AND tc.table_schema = kcu.table_schema
|
|
13
13
|
JOIN information_schema.constraint_column_usage ccu
|
|
14
14
|
ON tc.constraint_name = ccu.constraint_name AND tc.table_schema = ccu.table_schema
|
|
15
|
-
WHERE tc.table_schema = $1 AND tc.table_name = $2 AND tc.constraint_type = 'FOREIGN KEY'`,[i,j]),k.query(c,d,"SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = $1 AND tablename = $2 ORDER BY indexname",[i,j])],{concurrency:"unbounded"}),p=new Set(m.map(a=>a.column_name));return(0,f.ok)({columns:l.map(a=>({name:a.column_name,type:"USER-DEFINED"===a.data_type?a.udt_name:a.data_type,nullable:"YES"===a.is_nullable,default:a.column_default,maxLength:a.character_maximum_length,isPrimaryKey:p.has(a.column_name)})),primaryKeys:Array.from(p),foreignKeys:n.map(a=>({column:a.column_name,refSchema:a.ref_schema,refTable:a.ref_table,refColumn:a.ref_column})),indexes:o.map(a=>({name:a.indexname,definition:a.indexdef}))})}).pipe(e.fRP("api.db.columns")));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")},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")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},
|
|
15
|
+
WHERE tc.table_schema = $1 AND tc.table_name = $2 AND tc.constraint_type = 'FOREIGN KEY'`,[i,j]),k.query(c,d,"SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = $1 AND tablename = $2 ORDER BY indexname",[i,j])],{concurrency:"unbounded"}),p=new Set(m.map(a=>a.column_name));return(0,f.ok)({columns:l.map(a=>({name:a.column_name,type:"USER-DEFINED"===a.data_type?a.udt_name:a.data_type,nullable:"YES"===a.is_nullable,default:a.column_default,maxLength:a.character_maximum_length,isPrimaryKey:p.has(a.column_name)})),primaryKeys:Array.from(p),foreignKeys:n.map(a=>({column:a.column_name,refSchema:a.ref_schema,refTable:a.ref_table,refColumn:a.ref_column})),indexes:o.map(a=>({name:a.indexname,definition:a.indexdef}))})}).pipe(e.fRP("api.db.columns")));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")},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")},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")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},82936:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>e.f});var e=c(27177),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},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=23262));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";(()=>{var a={};a.id=3335,a.ids=[3335],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")},14844:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{L:()=>j});var e=c(89705),f=c(72891),g=c(49818),h=c(770),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)return yield*e.fJG(new h.yI({field:b.id?"connectionString":"id",reason:"missing"}));let c=yield*g.HG,[d,i]=yield*e.Q7R([c.query(b.id,b.connectionString,"SELECT current_database() AS db, version() AS version"),c.query(b.id,b.connectionString,`SELECT schema_name FROM information_schema.schemata
|
|
2
2
|
WHERE schema_name NOT IN ('pg_toast','pg_catalog','information_schema')
|
|
3
|
-
ORDER BY schema_name`)],{concurrency:"unbounded"}),j=d[0];return j?(0,f.ok)({database:j.db,version:j.version,schemas:i.map(a=>a.schema_name)}):yield*e.fJG(new h.n_({db:"pg",op:"connect",cause:Error("empty version response")}))}).pipe(e.fRP("api.db.connect")));d()}catch(a){d(a)}})},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")},
|
|
3
|
+
ORDER BY schema_name`)],{concurrency:"unbounded"}),j=d[0];return j?(0,f.ok)({database:j.db,version:j.version,schemas:i.map(a=>a.schema_name)}):yield*e.fJG(new h.n_({db:"pg",op:"connect",cause:Error("empty version response")}))}).pipe(e.fRP("api.db.connect")));d()}catch(a){d(a)}})},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")},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")},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")},79428:a=>{a.exports=require("buffer")},79748:a=>{a.exports=require("fs/promises")},83236:(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(95889),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/connect/route",pathname:"/api/db/connect",filename:"route",bundlePath:"app/api/db/connect/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/connect/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/db/connect/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)}})},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")},95889:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(14844),f=a([e]);e=(f.then?(await f)():f)[0],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=83236));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=4801,a.ids=[4801],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")},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")},30610:(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)return yield*e.fJG(new g.yI({field:"id",reason:"missing"}));let c=yield*h.HG;return yield*c.disconnect(b.id),(0,f.ok)({success:!0})}).pipe(e.fRP("api.db.disconnect")));d()}catch(a){d(a)}})},33873:a=>{a.exports=require("path")},34631:a=>{a.exports=require("tls")},41204:a=>{a.exports=require("string_decoder")},42689:(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(78293),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/disconnect/route",pathname:"/api/db/disconnect",filename:"route",bundlePath:"app/api/db/disconnect/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/disconnect/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/db/disconnect/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)}})},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},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")},78293:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(30610),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},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=42689));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=4801,a.ids=[4801],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")},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")},30610:(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)return yield*e.fJG(new g.yI({field:"id",reason:"missing"}));let c=yield*h.HG;return yield*c.disconnect(b.id),(0,f.ok)({success:!0})}).pipe(e.fRP("api.db.disconnect")));d()}catch(a){d(a)}})},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")},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")},77770:(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(78293),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/disconnect/route",pathname:"/api/db/disconnect",filename:"route",bundlePath:"app/api/db/disconnect/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/disconnect/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/db/disconnect/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)}})},78293:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>e.L});var e=c(30610),f=a([e]);e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},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=77770));module.exports=c})();
|