@surething/cockpit 1.0.253 → 1.0.254
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 +7 -4
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +18 -0
- package/.next-prod/server/app/_global-error/page.js +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- 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 +3 -3
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +3 -3
- 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 +2 -2
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/pty-input/route.js +1 -1
- package/.next-prod/server/app/api/chat/pty-input/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +1 -1
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/stop/route.js +1 -1
- package/.next-prod/server/app/api/chat/stop/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route.js +2 -2
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/deepseek/balance/route.js +1 -0
- package/.next-prod/server/app/api/deepseek/balance/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/deepseek/balance/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/deepseek/credentials/route.js +1 -1
- package/.next-prod/server/app/api/deepseek/credentials/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/deepseek/models/route.js +1 -0
- package/.next-prod/server/app/api/deepseek/models/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/deepseek/models/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js +1 -1
- package/.next-prod/server/app/api/git/current-branch/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/health/route.js +1 -1
- package/.next-prod/server/app/api/health/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/html-apps/[id]/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/html-apps/route.js +1 -1
- package/.next-prod/server/app/api/html-apps/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/config/route.js +1 -1
- package/.next-prod/server/app/api/ollama/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/prompts/config/route.js +1 -0
- package/.next-prod/server/app/api/prompts/config/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/prompts/config/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/push/public-key/route.js +1 -1
- package/.next-prod/server/app/api/push/public-key/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/subscribe/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js +1 -1
- package/.next-prod/server/app/api/push/unsubscribe/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +3 -3
- package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/diff/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/snapshots/route.js +1 -1
- package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/apps/[...path]/route.js +1 -1
- package/.next-prod/server/app/apps/[...path]/route.js.nft.json +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/m/page.js +2 -2
- package/.next-prod/server/app/m/page.js.nft.json +1 -1
- 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/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +2 -2
- package/.next-prod/server/app/page.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +7 -4
- package/.next-prod/server/chunks/304.js +1 -1
- package/.next-prod/server/chunks/3863.js +2 -2
- package/.next-prod/server/chunks/{4848.js → 4338.js} +2 -2
- package/.next-prod/server/chunks/6038.js +1 -1
- package/.next-prod/server/chunks/{293.js → 7139.js} +4 -4
- package/.next-prod/server/chunks/9419.js +89 -0
- package/.next-prod/server/chunks/9658.js +12 -12
- package/.next-prod/server/chunks/9830.js +1 -1
- package/.next-prod/server/functions-config-manifest.json +1 -0
- 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/chunks/{4304-408f5bddd7583676.js → 2308-c6b5ed3c19252dce.js} +3 -3
- package/.next-prod/static/chunks/6260-f566ccfbd8e8809c.js +25 -0
- package/.next-prod/static/chunks/6784-d35737ae5f04a2d2.js +0 -0
- package/.next-prod/static/chunks/9530-870e97119b45f025.js +15 -0
- package/.next-prod/static/chunks/app/_global-error/{page-51252a3b116b8135.js → page-0ad1f48c09ff2c02.js} +1 -1
- package/.next-prod/static/chunks/app/api/agent/test/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
- package/.next-prod/static/chunks/app/api/bash/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/codex/{route-51252a3b116b8135.js → route-0ad1f48c09ff2c02.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/stop/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/balance/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/credentials/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/deepseek/models/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/current-branch/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/health/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/html-apps/[id]/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/html-apps/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/config/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/prompts/config/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/push/public-key/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/push/subscribe/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/diff/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/apps/[...path]/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/{layout-145570f39a827c0f.js → layout-d43dd702b3ee9d15.js} +1 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/app/{page-487095ac01a4c1ef.js → page-8e7a3d723260097a.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-487095ac01a4c1ef.js → page-8e7a3d723260097a.js} +1 -1
- package/.next-prod/static/chunks/app/review/[id]/page-c0136423507b7547.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-0ad1f48c09ff2c02.js +1 -0
- package/.next-prod/static/css/05889d4d244bd7d5.css +1 -0
- package/.next-prod/static/xXMzxSYQCcHCrntVXcycC/_buildManifest.js +1 -0
- package/.next-prod/trace +14 -14
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/deepseek/balance/route.ts +351 -0
- package/.next-prod/types/app/api/deepseek/models/route.ts +351 -0
- package/.next-prod/types/app/api/prompts/config/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +4 -1
- package/.next-prod/types/validator.ts +27 -0
- package/dist/{chunk-BRW4ZEIC.mjs → chunk-7G4OXJJ4.mjs} +52 -7
- package/dist/{chunk-RUNUGDPP.mjs → chunk-H3JSYJCZ.mjs} +25 -29
- package/dist/{chunk-7WPYQYA6.mjs → chunk-HIW2SGCF.mjs} +4 -4
- package/dist/httpApi.mjs +2 -2
- package/dist/scheduledTasks.mjs +326 -275
- package/dist/{server-MCN5AIEU.mjs → server-O434I7QD.mjs} +2 -2
- package/dist/wsServer.mjs +7 -6
- package/package.json +1 -1
- package/.next-prod/server/chunks/7338.js +0 -89
- package/.next-prod/static/8aWX4sRFsO4Rx4DD9L9w-/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/2876-4336c42044f38302.js +0 -25
- package/.next-prod/static/chunks/6784-c9969c13c13b25af.js +0 -0
- package/.next-prod/static/chunks/9530-27352e6f8bafeb3c.js +0 -15
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/stop/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/deepseek/credentials/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/current-branch/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/health/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/html-apps/[id]/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/html-apps/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/config/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/push/public-key/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/push/subscribe/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/diff/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/snapshots/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/apps/[...path]/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/app/review/[id]/page-c9716ea0049cc328.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-51252a3b116b8135.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-51252a3b116b8135.js +0 -1
- package/.next-prod/static/css/5aa1c710591e36bb.css +0 -1
- /package/.next-prod/static/{8aWX4sRFsO4Rx4DD9L9w- → xXMzxSYQCcHCrntVXcycC}/_ssgManifest.js +0 -0
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"/api/db/export/route": "app/api/db/export/route.js",
|
|
19
19
|
"/api/db/query/route": "app/api/db/query/route.js",
|
|
20
20
|
"/api/db/schemas/route": "app/api/db/schemas/route.js",
|
|
21
|
+
"/api/deepseek/balance/route": "app/api/deepseek/balance/route.js",
|
|
21
22
|
"/api/deepseek/credentials/route": "app/api/deepseek/credentials/route.js",
|
|
23
|
+
"/api/deepseek/models/route": "app/api/deepseek/models/route.js",
|
|
22
24
|
"/api/file/route": "app/api/file/route.js",
|
|
23
25
|
"/api/files/blame/route": "app/api/files/blame/route.js",
|
|
24
26
|
"/api/files/clipboard/route": "app/api/files/clipboard/route.js",
|
|
@@ -122,16 +124,17 @@
|
|
|
122
124
|
"/api/extension/version/route": "app/api/extension/version/route.js",
|
|
123
125
|
"/api/dev/spans/route": "app/api/dev/spans/route.js",
|
|
124
126
|
"/api/health/route": "app/api/health/route.js",
|
|
125
|
-
"/api/note/route": "app/api/note/route.js",
|
|
126
127
|
"/api/open-cursor/route": "app/api/open-cursor/route.js",
|
|
127
128
|
"/api/open-vscode/route": "app/api/open-vscode/route.js",
|
|
128
|
-
"/api/pinned-sessions/route": "app/api/pinned-sessions/route.js",
|
|
129
129
|
"/api/pick-folder/route": "app/api/pick-folder/route.js",
|
|
130
|
+
"/api/note/route": "app/api/note/route.js",
|
|
130
131
|
"/api/project-settings/route": "app/api/project-settings/route.js",
|
|
131
|
-
"/api/
|
|
132
|
+
"/api/pinned-sessions/route": "app/api/pinned-sessions/route.js",
|
|
132
133
|
"/api/project-state/route": "app/api/project-state/route.js",
|
|
133
|
-
"/api/
|
|
134
|
+
"/api/prompts/config/route": "app/api/prompts/config/route.js",
|
|
135
|
+
"/api/projects/route": "app/api/projects/route.js",
|
|
134
136
|
"/api/services/scripts/route": "app/api/services/scripts/route.js",
|
|
137
|
+
"/api/services/config/route": "app/api/services/config/route.js",
|
|
135
138
|
"/api/settings/route": "app/api/settings/route.js",
|
|
136
139
|
"/api/terminal/bubble-order/route": "app/api/terminal/bubble-order/route.js",
|
|
137
140
|
"/api/version/route": "app/api/version/route.js",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=304,exports.ids=[304],exports.modules={770:(a,b,c)=>{"use strict";c.d(b,{Sh:()=>l,Yv:()=>h,i_:()=>k,m_:()=>j,n_:()=>f,uU:()=>g,uV:()=>e,yI:()=>i});var d=c(59412);class e extends d.rN("AppError"){}class f extends d.rN("DBError"){}d.rN("WSError");class g extends d.rN("FSError"){}class h extends d.rN("AgentError"){}class i extends d.rN("ValidationError"){}class j extends d.rN("NotFoundError"){}class k extends d.rN("PermissionError"){}let l=a=>{switch(a._tag){case"ValidationError":return 400;case"PermissionError":return 403;case"NotFoundError":return 404;case"DBError":case"FSError":case"AgentError":case"WSError":return 503;default:return 500}}},1085:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{T:()=>k,z:()=>j});var e=c(89705),f=c(7517),g=c(19879),h=c(770),i=a([g]);g=(i.then?(await i)():i)[0];let j=(a,b)=>e.JkU(function*(){let c,d=yield*f.sZ3(k(a,b)),e="";for(let a of d)"text"===a._tag?e+=a.delta:"done"===a._tag&&(c=a.usage);return{message:{role:"assistant",content:e},usage:c}}).pipe(e.fRP("agent.chat",{attributes:{provider:a.provider,model:a.model}})),k=(a,b)=>f.bIC(c=>{let d,f,i=a.provider,j=(d=((a,b)=>{switch(a){case"claude":return b?{apiKey:b}:{};case"codex":return{baseUrl:"https://api.openai.com/v1",apiKey:b};case"kimi":return{baseUrl:"https://api.moonshot.cn/anthropic",apiKey:b};case"deepseek":return{baseUrl:"https://api.deepseek.com/anthropic",apiKey:b};case"ollama":return{}}})(a.provider,b),{model:a.model,env:{...process.env,...d.baseUrl?{ANTHROPIC_BASE_URL:d.baseUrl}:{},...d.apiKey?{ANTHROPIC_API_KEY:d.apiKey}:{}}}),k=(f=[...a.messages].reverse().find(a=>"user"===a.role),f?.content??""),l=!1;return(async()=>{try{for await(let a of(0,g.query)({prompt:k,options:j})){if(l)break;if("assistant"===a.type&&a.message?.content)for(let b of a.message.content)"text"===b.type&&b.text&&c.single({_tag:"text",delta:b.text});"result"===a.type&&c.single({_tag:"done",usage:a.usage?{inputTokens:a.usage.input_tokens??0,outputTokens:a.usage.output_tokens??0}:void 0})}c.end()}catch(a){c.fail(new h.Yv({provider:i,kind:"protocol",cause:a}))}})(),e.OH5(()=>{l=!0})});d()}catch(a){d(a)}})},2827:(a,b,c)=>{"use strict";c.d(b,{j:()=>j,t:()=>i});var d=c(89705),e=c(7517),f=c(78497),g=c(770),h=c(67814);let i=a=>d.JkU(function*(){let b,c=yield*e.sZ3(j(a)),d="";for(let a of c)"text"===a._tag?d+=a.delta:"done"===a._tag&&(b=a.usage);return{message:{role:"assistant",content:d},usage:b}}).pipe(d.fRP("agent.chat",{attributes:{provider:"ollama",model:a.model}})),j=a=>e.bIC(b=>{let c=new AbortController;return(async()=>{try{let d=await (0,h.q)(a.model);for await(let e of(0,f.gM)({model:d,messages:a.messages.map(a=>({role:a.role,content:a.content})),temperature:a.temperature??0,abortSignal:c.signal}).fullStream)if("text-delta"===e.type){let a=e.text;a&&b.single({_tag:"text",delta:a})}else if("finish"===e.type){let a=e.totalUsage;b.single({_tag:"done",usage:a?{inputTokens:a.inputTokens??0,outputTokens:a.outputTokens??0}:void 0})}b.end()}catch(a){b.fail(new g.Yv({provider:"ollama",kind:"protocol",cause:a}))}})(),d.OH5(()=>c.abort())})},7939:(a,b,c)=>{"use strict";c.d(b,{$A:()=>Q,A0:()=>_,An:()=>ac,B0:()=>C,BF:()=>M,Ct:()=>U,Eu:()=>L,Ex:()=>v,GB:()=>r,JE:()=>ab,JY:()=>P,Ki:()=>G,Kk:()=>V,Kv:()=>j,LN:()=>k,Lr:()=>E,Mx:()=>H,N9:()=>ag,O0:()=>F,Sr:()=>N,Tb:()=>t,Ux:()=>af,Wd:()=>aa,aO:()=>m,at:()=>z,ec:()=>o,eg:()=>Z,h9:()=>y,i4:()=>K,iK:()=>p,im:()=>X,iy:()=>T,jp:()=>u,lT:()=>A,lq:()=>J,ls:()=>O,mT:()=>x,n6:()=>n,oK:()=>S,oZ:()=>W,of:()=>I,po:()=>R,sH:()=>s,tP:()=>q,th:()=>w,v4:()=>l,vI:()=>$,yw:()=>Y});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"html.json"),t=(0,e.join)(j,"review"),u=(0,e.join)(t,"_signal");function v(){try{(0,g.existsSync)(t)||(0,g.mkdirSync)(t,{recursive:!0}),(0,g.writeFileSync)(u,Date.now().toString())}catch{}}let w=(0,e.join)(i,".claude"),x=(0,e.join)(w,"projects"),y=(0,e.join)(i,".claude2"),z=(0,e.join)(y,"projects"),A=(0,e.join)(j,"deepseek"),B=(0,e.join)(A,"projects"),C=(0,e.join)(A,"credentials.json"),D=(0,e.join)(j,"ollama"),E=(0,e.join)(D,"config.json");function F(a){return a.replace(/[/.]/g,"-")}function G(a){return(0,e.join)(k,F(a))}function H(a){return(0,e.join)(G(a),"session.json")}function I(a){return(0,e.join)(G(a),"recent-files.json")}function J(a){return(0,e.join)(G(a),"expanded-paths.json")}function K(a){return(0,e.join)(G(a),"comments.json")}function L(a){return(0,e.join)(G(a),"services.json")}function M(a){return(0,e.join)(G(a),"note.md")}function N(a,b){return(0,e.join)(G(a),`terminal-history-${b}.jsonl`)}function O(a,b){return(0,e.join)(G(a),`terminal-output-${b}.txt`)}function P(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(G(a),c)}function Q(){return(0,e.join)(j,"terminal-aliases.json")}function R(){return(0,e.join)(j,"services.json")}function S(a){return(0,e.join)(G(a),"project-settings.json")}function T(a,b){return(0,e.join)(G(a),`terminal-bubble-order-${b}.json`)}function U(a){return(0,e.join)(t,`${a}.json`)}function V(a,b){return(0,e.join)((0,e.join)(x,F(a)),`${b}.jsonl`)}function W(a,b){return(0,e.join)((0,e.join)(z,F(a)),`${b}.jsonl`)}function X(a,b){return(0,e.join)((0,e.join)(B,F(a)),`${b}.jsonl`)}function Y(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",F(a)),`${b}.jsonl`)}function Z(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 $(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 _(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function aa(a){let b=(0,e.join)(a,"..");await _(b)}async function ab(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function ac(a,b){await aa(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let ad=globalThis,ae=ad.__cockpitFileLocks??(ad.__cockpitFileLocks=new Map);function af(a,b){let c=(ae.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return ae.set(a,d),d.then(()=>{ae.get(a)===d&&ae.delete(a)}),c}function ag(a,b,c){return af(a,async()=>{let d=await ab(a,b),e=await c(d);return await ac(a,e),e})}},8155:(a,b,c)=>{"use strict";c.d(b,{D:()=>r,c:()=>q});var d=c(44853),e=c(89705),f=c(1971);let g=d.eu("dev","prod")("COCKPIT_ENV").pipe(d.IQ("prod")),h=d.Yj("COCKPIT_HOST").pipe(d.IQ("127.0.0.1")),i=d.nd("COCKPIT_PORT").pipe(d.NW(()=>d.nd("PORT")),d.IQ(3457)),j=d.uK(d.Yj("COCKPIT_OPEN_PROJECT")).pipe(d.Tj(a=>"Some"===a._tag?a.value:void 0)),k=d.zM("COCKPIT_NO_OPEN").pipe(d.IQ(!1)),l=d.Yj("COCKPIT_LOG_LEVEL").pipe(d.IQ("info")),m=d.nd("COCKPIT_SNAPSHOT_KEEP_DAYS").pipe(d.IQ(7)),n=d.nd("COCKPIT_SNAPSHOT_REPO_TTL_DAYS").pipe(d.IQ(30)),o=d.nd("COCKPIT_SNAPSHOT_MAX_FILE_KB").pipe(d.IQ(2048)),p=d.nd("COCKPIT_SESSION_KEEP_DAYS").pipe(d.IQ(30)),q=e.JkU(function*(){let a=yield*g,b=yield*h,c=yield*i,d=yield*j,f=yield*k,q=yield*l,r=yield*m,s=yield*n,t=yield*o,u=yield*p,v=yield*e.OH5(()=>{let a="u">typeof process?process.env:void 0,b=a?.HOME||a?.USERPROFILE||".",c=a?.COCKPIT_HOME;return c?c.replace(/^~(?=$|\/)/,b):b+"/.cockpit"});return{env:a,host:b,port:3457===c&&"dev"===a?3456:c,cockpitDir:v,openProject:d,openBrowser:!f,logLevel:q,logFile:v+"/logs/cockpit.log",snapshotKeepDays:r,snapshotRepoTtlDays:s,snapshotMaxFileKb:t,sessionKeepDays:u}}).pipe(e.QgK),r=f.Ie},12490:(a,b,c)=>{"use strict";c.d(b,{n:()=>o});var d=c(51455),e=c(76760),f=c(89705),g=c(60177),h=c(1971),i=c(15825),j=c(770),k=c(8155);let l=(a,b)=>f.$mh({try:b,catch:b=>new j.uV({message:`session cleanup fs ${a} failed`,cause:b})}),m=a=>l("stat",()=>(0,d.stat)(a).then(a=>a.isDirectory())).pipe(f.DM4(()=>!1)),n=g.Io("@cockpit/SessionCleanupService"),o=h.P1(n,f.JkU(function*(){let a=yield*k.c,b=(0,e.join)(a.cockpitDir,"ollama-sessions"),c=(0,e.join)(a.cockpitDir,"pinned-sessions.json"),g=Math.max(1,a.sessionKeepDays),h=f.JkU(function*(){let a=yield*f.$mh({try:async()=>{let a;try{a=await (0,d.readFile)(c,"utf8")}catch(a){if(a?.code==="ENOENT")return{ok:!0,ids:new Set};throw a}let b=JSON.parse(a),e=new Set;for(let a of Array.isArray(b)?b:[])a&&"string"==typeof a.sessionId&&e.add(a.sessionId);return{ok:!0,ids:e}},catch:()=>null}).pipe(f.DM4(()=>({ok:!1})));if(!a.ok)return void(yield*f.FFw("session cleanup: pinned-sessions.json is unreadable/corrupt -- skipping this pass (refusing to risk deleting protected sessions)"));let h=Date.now()-864e5*g;for(let c of yield*l("readdir root",()=>(0,d.readdir)(b)).pipe(f.DM4(()=>[]))){let i=(0,e.join)(b,c);if(!(yield*m(i)))continue;let j=yield*l("readdir cwd",()=>(0,d.readdir)(i)).pipe(f.DM4(()=>[])),k=new Map;for(let a of j){let b=(0,e.join)(i,a);if(a.endsWith(".jsonl")){let c=a.slice(0,-6),d=k.get(c)??{};d.jsonl=b,k.set(c,d)}else if(yield*m(b)){let c=k.get(a)??{};c.subdir=b,k.set(a,c)}}for(let[b,e]of k){if(a.ids.has(b))continue;let i=e.jsonl??e.subdir;i&&((yield*l("stat basis",()=>(0,d.stat)(i).then(a=>a.mtimeMs)).pipe(f.DM4(()=>1/0)))>=h||(e.jsonl&&(yield*l("rm jsonl",()=>(0,d.rm)(e.jsonl,{force:!0})).pipe(f.DM4(()=>void 0))),e.subdir&&(yield*l("rm subdir",()=>(0,d.rm)(e.subdir,{recursive:!0,force:!0})).pipe(f.DM4(()=>void 0))),yield*f.fH4(`session cleanup: removed ollama session ${b} under ${c} (older than ${g}d)`)))}0===(yield*l("readdir cwd (recount)",()=>(0,d.readdir)(i)).pipe(f.DM4(()=>["keep"]))).length&&(yield*l("rmdir cwd",()=>(0,d.rmdir)(i)).pipe(f.DM4(()=>void 0)))}}).pipe(f.fRP("session.cleanup"));return yield*f.x6Z(h.pipe(f.h9N(a=>f.FFw(`session cleanup failed: ${a.message}`)),f.uxO(i.ji("24 hours")))),n.of({cleanup:h})}))},17329:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{x:()=>m});var e=c(89705),f=c(1971),g=c(90828),h=c(46303),i=c(1085),j=c(2827),k=a([i]);i=(k.then?(await k)():k)[0];let l=new Set(["rate-limit","timeout","unknown"]),m=f.Py(h.N,h.N.of({chat:a=>(a=>{switch(a.provider){case"ollama":return(0,j.t)(a);case"claude":case"codex":case"kimi":case"deepseek":return(0,i.z)(a)}})(a).pipe(e.L5P({schedule:g.ic,while:a=>l.has(a.kind)})),stream:a=>(a=>{switch(a.provider){case"ollama":return(0,j.j)(a);case"claude":case"codex":case"kimi":case"deepseek":return(0,i.T)(a)}})(a)}));d()}catch(a){d(a)}})},18702:(a,b,c)=>{"use strict";c.d(b,{u:()=>o});var d=c(89705),e=c(55235),f=c(1971),g=c(770),h=c(49818),i=c(15147),j=c.n(i);async function k(a){let b=new URL(a),c=b.protocol.replace(":",""),d=b.hostname,e=b.port||"7687",f=decodeURIComponent(b.username||"neo4j"),g=decodeURIComponent(b.password||""),h=`${c}://${d}:${e}`,i=j().driver(h,j().auth.basic(f,g));return await i.verifyConnectivity(),i}async function l(a,b,c){let d=a.session();try{let a=Date.now(),e=await d.run(b,c||{}),f=Date.now()-a;return{records:e.records.map(a=>{let b={};for(let c of a.keys)b[c]=function a(b){return null==b?null:j().isInt(b)?b.toNumber():b&&"object"==typeof b&&"labels"in b&&"properties"in b?{_type:"node",_id:a(b.identity),_labels:b.labels,...Object.fromEntries(Object.entries(b.properties).map(([b,c])=>[b,a(c)]))}:b&&"object"==typeof b&&"type"in b&&"start"in b&&"end"in b&&"properties"in b?{_type:"relationship",_id:a(b.identity),_relType:b.type,_start:a(b.start),_end:a(b.end),...Object.fromEntries(Object.entries(b.properties).map(([b,c])=>[b,a(c)]))}:b&&"object"==typeof b&&"segments"in b?{_type:"path",segments:b.segments.map(b=>({start:a(b.start),relationship:a(b.relationship),end:a(b.end)}))}:Array.isArray(b)?b.map(b=>a(b)):b&&"object"==typeof b&&b.constructor===Object?Object.fromEntries(Object.entries(b).map(([b,c])=>[b,a(c)])):b}(a.get(c));return b}),keys:e.records.length>0?e.records[0].keys:[],duration:f,counters:e.summary.counters.updates()}}finally{await d.close()}}let m=(a,b)=>d.$mh({try:b,catch:b=>new g.n_({db:"neo4j",op:a,cause:b})}),n=(a,b,c)=>d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c)return f.driver;f&&(yield*m("close",()=>f.driver.close()).pipe(d.NWQ(()=>d.rIH)));let g=yield*m("createDriver",()=>k(c));return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{driver:g,connectionString:c,createdAt:Date.now()}),d}),g}),o=f.P1(h.ge,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{driver:a}of b.values())yield*d.$mh({try:()=>a.close(),catch:a=>new g.n_({db:"neo4j",op:"shutdown close",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[Neo4jServiceLive] disposed ${b.size} driver(s)`)})),h.ge.of({run:(b,c,e,f)=>d.JkU(function*(){let d=yield*n(a,b,c);return(yield*m("run",()=>l(d,e,f))).records}).pipe(d.fRP("neo4j.run",{attributes:{id:b}})),runWithMeta:(b,c,e,f)=>d.JkU(function*(){let d=yield*n(a,b,c),g=yield*m("runWithMeta",()=>l(d,e,f));return{records:g.records,keys:g.keys,duration:g.duration,counters:g.counters}}).pipe(d.fRP("neo4j.runWithMeta",{attributes:{id:b}})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*m("disconnect",()=>c.driver.close()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},25470:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(89705),e=c(55235),f=c(1971),g=c(38491),h=c(770),i=c(49818);let j=(a,b)=>d.$mh({try:b,catch:b=>new h.n_({db:"mysql",op:a,cause:b})}),k=(a,b,c)=>d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c)return f.pool;f&&(yield*j("end",()=>f.pool.end()).pipe(d.NWQ(()=>d.rIH)));let h=g.createPool({uri:c,connectionLimit:5,idleTimeout:6e4,connectTimeout:1e4});return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{pool:h,connectionString:c,createdAt:Date.now()}),d}),h}),l=f.P1(i.M9,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{pool:a}of b.values())yield*d.$mh({try:()=>a.end(),catch:a=>new h.n_({db:"mysql",op:"shutdown end",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[MySQLServiceLive] disposed ${b.size} pool(s)`)})),i.M9.of({query:(b,c,e,f)=>d.JkU(function*(){let d=yield*k(a,b,c),[g]=yield*j("query",()=>d.query(e,f));return g}).pipe(d.fRP("mysql.query",{attributes:{id:b}})),queryWithMeta:(b,c,e,f)=>d.JkU(function*(){let d=yield*k(a,b,c),g=performance.now(),[h,i]=yield*j("queryWithMeta",()=>d.query(e,f)),l=Math.round((performance.now()-g)*100)/100;return Array.isArray(h)&&Array.isArray(i)?{rows:h,fields:i.map(a=>({name:a.name,dataTypeID:a.columnType??0})),rowCount:h.length,command:null,duration:l}:{rows:[],fields:null,rowCount:h.affectedRows??0,command:e.trim().split(/\s+/)[0]?.toUpperCase()||"QUERY",duration:l}}).pipe(d.fRP("mysql.queryWithMeta",{attributes:{id:b}})),withTx:(b,c,e)=>d.JkU(function*(){let f=yield*k(a,b,c),g=yield*j("getConnection",()=>f.getConnection());return yield*j("BEGIN",()=>g.beginTransaction()),yield*e({query:(a,b)=>j("tx.query",()=>g.query(a,b).then(([a])=>a))}).pipe(d.Bio({onSuccess:()=>j("COMMIT",()=>g.commit()),onFailure:()=>j("ROLLBACK",()=>g.rollback()).pipe(d.NWQ(()=>d.rIH))}),d.yeE(d.OH5(()=>g.release())))}).pipe(d.fRP("mysql.withTx",{attributes:{id:b}})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*j("disconnect",()=>c.pool.end()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},28303:a=>{function b(a){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}b.keys=()=>[],b.resolve=b,b.id=28303,a.exports=b},34104:(a,b,c)=>{"use strict";c.d(b,{I:()=>i});var d=c(89705),e=c(1971),f=c(770),g=c(49818);let h=a=>d.fJG(new f.n_({db:"mongo",op:a,cause:Error("MongoServiceLive not implemented (mongodb driver not installed)")})),i=e.Py(g.g8,g.g8.of({find:()=>h("find"),command:()=>h("command"),disconnect:()=>d.rIH}))},34168:(a,b,c)=>{"use strict";c.d(b,{M:()=>d});let d=c(60177).Io("@cockpit/SnapshotService")},35765:(a,b,c)=>{"use strict";c.d(b,{fI:()=>h,yh:()=>j});var d=c(64396),e=c(1971),f=c(78820);let g=a=>{switch((a??"").toLowerCase()){case"all":return d.u8;case"trace":return d.Cn;case"debug":return d.y;case"info":default:return d.R2;case"warning":case"warn":return d.N5;case"error":return d.$D;case"fatal":return d.Lj;case"none":return d.NV}},h=e.Um(f.j9,f.dl(g(process.env.COCKPIT_LOG_LEVEL))),i=async(a,b)=>{let{appendFile:d,mkdir:e}=await Promise.resolve().then(c.t.bind(c,79748,23)),{dirname:f}=await Promise.resolve().then(c.t.bind(c,33873,23));try{await e(f(b),{recursive:!0}),await d(b,a+"\n","utf-8")}catch{}},j=a=>e.Um(f.j9,f.WQ(f.L8(({logLevel:b,message:c,date:d,fiberId:e,spans:f,annotations:g})=>{i(JSON.stringify({time:d.toISOString(),level:b.label,fiber:"object"==typeof e&&null!==e&&"id"in e?e.id:String(e),msg:Array.isArray(c)&&1===c.length?c[0]:c,spans:Array.from(f).map(a=>({label:a.label,startTime:a.startTime})),annotations:Object.fromEntries(g)}),a)})),f.dl(g(process.env.COCKPIT_LOG_LEVEL)))},37871:(a,b,c)=>{"use strict";c.d(b,{P:()=>n});var d=c(89705),e=c(55235),f=c(7517),g=c(20473),h=c(1971),i=c(79298),j=c.n(i),k=c(770),l=c(49818);let m=(a,b)=>d.$mh({try:b,catch:b=>new k.n_({db:"redis",op:a,cause:b})}),n=h.P1(l.HE,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{client:a}of b.values())yield*d.$mh({try:()=>a.quit(),catch:a=>new k.n_({db:"redis",op:"shutdown quit",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[RedisServiceLive] disposed ${b.size} client(s)`)})),l.HE.of({command:(b,c,f,g)=>d.JkU(function*(){let h=yield*d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c){if("ready"===f.client.status)return f.client;yield*m("quit",()=>f.client.quit()).pipe(d.NWQ(()=>d.rIH))}else f&&(yield*m("quit",()=>f.client.quit()).pipe(d.NWQ(()=>d.rIH)));let g=yield*m("connect",async()=>{let a=new(j())(c,{lazyConnect:!0,connectTimeout:1e4,maxRetriesPerRequest:1});return await a.connect(),a});return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{client:g,connectionString:c,createdAt:Date.now()}),d}),g});return yield*m("call",()=>h.call(f,...g??[]))}).pipe(d.fRP("redis.command",{attributes:{id:b,cmd:f}})),subscribe:(a,b,c)=>f.A2M(d.JkU(function*(){let a=yield*g.dT(),e=yield*d.Q56(m("subscribeConnect",async()=>{let a=new(j())(b,{lazyConnect:!0,connectTimeout:1e4,maxRetriesPerRequest:1});return await a.connect(),a}),a=>d.$mh({try:()=>a.quit(),catch:()=>new k.n_({db:"redis",op:"subscribeQuit",cause:null})}).pipe(d.NWQ(()=>d.rIH))),h=c.includes("*")||c.includes("?");return yield*m("psubscribe",()=>h?e.psubscribe(c):e.subscribe(c)),e.on(h?"pmessage":"message",(...b)=>{let c=h?b[1]:b[0],e=h?b[2]:b[1];d.MY7(g.x(a,{channel:c,message:e}))}),f.gJc(a)})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*m("disconnect",()=>c.client.quit()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},38003:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{H:()=>p});var e=c(89705),f=c(55235),g=c(1971),h=c(7517),i=c(64939),j=c(770),k=c(49818),l=a([i]);let{Pool:m}=(i=(l.then?(await l)():l)[0]).default,n=(a,b)=>e.$mh({try:b,catch:b=>new j.n_({db:"pg",op:a,cause:b})}),o=(a,b,c)=>e.JkU(function*(){let d=(yield*f.Jt(a)).get(b);if(d&&d.connectionString===c)return d.pool;d&&(yield*n("end",()=>d.pool.end()).pipe(e.NWQ(()=>e.rIH)));let g=new m({connectionString:c,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return yield*f.yo(a,a=>{let d=new Map(a);return d.set(b,{pool:g,connectionString:c,createdAt:Date.now()}),d}),g}),p=g.P1(k.HG,e.JkU(function*(){let a=yield*f.L8(new Map);return yield*e.U9h(()=>e.JkU(function*(){let b=yield*f.Jt(a);for(let{pool:a}of b.values())yield*e.$mh({try:()=>a.end(),catch:a=>new j.n_({db:"pg",op:"shutdown end",cause:a})}).pipe(e.NWQ(()=>e.rIH));yield*f.hZ(a,new Map),yield*e.fH4(`[PgServiceLive] disposed ${b.size} pool(s)`)})),k.HG.of({query:(b,c,d,f)=>e.JkU(function*(){let e=yield*o(a,b,c);return(yield*n("query",()=>e.query(d,f))).rows}).pipe(e.fRP("pg.query",{attributes:{id:b}})),queryWithMeta:(b,c,d,f)=>e.JkU(function*(){let e=yield*o(a,b,c),g=performance.now(),h=yield*n("queryWithMeta",()=>e.query(d,f)),i=Math.round((performance.now()-g)*100)/100;return{rows:h.rows??[],fields:h.fields?h.fields.map(a=>({name:a.name,dataTypeID:a.dataTypeID})):null,rowCount:h.rowCount??null,command:h.command??null,duration:i}}).pipe(e.fRP("pg.queryWithMeta",{attributes:{id:b}})),stream:(b,c,d,f)=>h.oAg(e.JkU(function*(){let e=yield*o(a,b,c),g=yield*n("query",()=>e.query(d,f));return h.Tsr(g.rows)})),withTx:(b,c,d)=>e.JkU(function*(){let f=yield*o(a,b,c),g=yield*n("connect",()=>f.connect());return yield*n("BEGIN",()=>g.query("BEGIN")),yield*d({query:(a,b)=>n("tx.query",()=>g.query(a,b).then(a=>a.rows))}).pipe(e.Bio({onSuccess:()=>n("COMMIT",()=>g.query("COMMIT")),onFailure:()=>n("ROLLBACK",()=>g.query("ROLLBACK")).pipe(e.NWQ(()=>e.rIH))}),e.yeE(e.OH5(()=>g.release())))}).pipe(e.fRP("pg.withTx",{attributes:{id:b}})),disconnect:b=>e.JkU(function*(){let c=(yield*f.Jt(a)).get(b);c&&(yield*n("disconnect",()=>c.pool.end()).pipe(e.NWQ(()=>e.rIH)),yield*f.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}));d()}catch(a){d(a)}})},46303:(a,b,c)=>{"use strict";c.d(b,{N:()=>d});let d=c(60177).Io("@cockpit/AgentService")},49818:(a,b,c)=>{"use strict";c.d(b,{HE:()=>g,HG:()=>e,M9:()=>f,g8:()=>i,ge:()=>h});var d=c(60177);let e=d.Io("@cockpit/PgService"),f=d.Io("@cockpit/MySQLService"),g=d.Io("@cockpit/RedisService"),h=d.Io("@cockpit/Neo4jService"),i=d.Io("@cockpit/MongoService")},64419:(a,b,c)=>{"use strict";c.d(b,{BV:()=>m,Eb:()=>k,Ju:()=>o,S8:()=>n,YN:()=>j,dK:()=>i,kW:()=>p,m6:()=>l,wZ:()=>h});var d=c(89705),e=c(52693);let f=globalThis,g=f.__cockpitSpanRing??={buffer:[],index:new Map};function h(a){if(g.buffer.push(a),g.index.set(a.spanId,g.buffer.length-1),g.buffer.length>500){g.buffer.shift(),g.index.clear();for(let a=0;a<g.buffer.length;a++)g.index.set(g.buffer[a].spanId,a)}}function i(a,b,c){let d=g.index.get(a);if(void 0===d)return;let e=g.buffer[d];if(!e)return;let f=Number(b-BigInt(e.startTimeNs))/1e6;g.buffer[d]={...e,endTimeNs:b.toString(),durationMs:Math.round(100*f)/100,status:"Success"===c._tag?"ok":"error",errorMessage:"Failure"===c._tag?function(a){if(a instanceof Error)return a.message;if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}(c.cause):void 0}}function j(a,b,c){let d=g.index.get(a);if(void 0===d)return;let e=g.buffer[d];e&&(g.buffer[d]={...e,attributes:{...e.attributes,[b]:c}})}function k(a,b,c,d){let e=g.index.get(a);if(void 0===e)return;let f=g.buffer[e];f&&(g.buffer[e]={...f,events:[...f.events,{name:b,timeNs:c.toString(),attributes:d}]})}let l=(a={})=>d.OH5(()=>(function(a={}){let b=g.buffer;if(a.errorsOnly&&(b=b.filter(a=>"error"===a.status)),a.traceId&&(b=b.filter(b=>b.traceId===a.traceId)),a.namePrefix){let c=a.namePrefix;b=b.filter(a=>a.name.startsWith(c))}if("number"==typeof a.minDurationMs){let c=a.minDurationMs;b=b.filter(a=>(a.durationMs??0)>=c)}return"number"==typeof a.limit&&a.limit>0&&(b=b.slice(-a.limit)),b})(a)),m=()=>d.OH5(()=>{g.buffer.length=0,g.index.clear()}),n=()=>d.OH5(()=>({capacity:500,size:g.buffer.length,oldestStartNs:g.buffer[0]?.startTimeNs??null}));function o(a,b,c,d,e,f){return{traceId:b,spanId:a,parentSpanId:c,name:d,kind:e,startTimeNs:f.toString(),endTimeNs:null,durationMs:null,attributes:{},events:[],status:"started"}}function p(a){return e.Ru(a)?a.value.spanId:null}},67814:(a,b,c)=>{"use strict";c.d(b,{q:()=>g});var d=c(91078),e=c(69310);let f=async(a,b)=>{if(b&&"string"==typeof b.body)try{let a=JSON.parse(b.body);if(Array.isArray(a.messages)){let c=!1;for(let b of a.messages)b&&"assistant"===b.role&&null==b.content&&(b.content="",c=!0);c&&(b={...b,body:JSON.stringify(a)})}}catch{}return fetch(a,b)};async function g(a){let{baseUrl:b,apiKey:c}=await (0,e.jh)();return(0,d.ry)({apiKey:c,baseURL:`${b}/v1/`,fetch:f}).chat(a)}},69310:(a,b,c)=>{"use strict";c.d(b,{Pg:()=>h,QD:()=>k,jV:()=>i,jh:()=>j});var d=c(7939);let e="http://127.0.0.1:11434";function f(a){return a.replace(/\/v1\/?$/,"").replace(/\/+$/,"")}async function g(){return(0,d.JE)(d.Lr,{})}async function h(a){return(0,d.N9)(d.Lr,{},b=>{let c={...b};if(void 0!==a.baseUrl){let b=a.baseUrl.trim();b?c.baseUrl=b:delete c.baseUrl}if(void 0!==a.apiKey){let b=a.apiKey.trim();b?c.apiKey=b:delete c.apiKey}return c})}async function i(){let a=await g();return f(a.baseUrl?.trim()||process.env.OLLAMA_BASE_URL||e)}async function j(){let a=await g();return{baseUrl:f(a.baseUrl?.trim()||process.env.OLLAMA_BASE_URL||e),apiKey:a.apiKey?.trim()||process.env.OLLAMA_API_KEY||"ollama"}}async function k(){var a;let b,c,d,h,i=await g();return i.baseUrl?.trim()?(b=f(i.baseUrl.trim()),c="file"):process.env.OLLAMA_BASE_URL?(b=f(process.env.OLLAMA_BASE_URL),c="env"):(b=e,c="default"),i.apiKey?.trim()?(d=i.apiKey.trim(),h="file"):process.env.OLLAMA_API_KEY?(d=process.env.OLLAMA_API_KEY,h="env"):(d="",h="default"),{baseUrl:b,baseUrlSource:c,hasKey:!!d,maskedKey:(a=d)?a.length<=8?a.replace(/./g,"•"):`${a.slice(0,3)}${"•".repeat(Math.max(4,a.length-7))}${a.slice(-4)}`:"",keySource:h}}},78335:()=>{},82843:(a,b,c)=>{"use strict";c.d(b,{i:()=>i});var d=c(1971),e=c(89705),f=c(55235),g=c(27968);let h=c(60177).Io("@cockpit/Scheduler"),i=d.P1(h,e.JkU(function*(){let a=yield*f.L8(new Map);return yield*e.U9h(()=>e.JkU(function*(){for(let b of(yield*f.Jt(a)).values())yield*g.G(b);yield*f.hZ(a,new Map)})),h.of({schedule:(b,c,d)=>e.JkU(function*(){let h=yield*f.Jt(a).pipe(e.TjK(a=>a.get(b)));h&&(yield*g.G(h));let i=yield*e.x6Z(c.pipe(e.uxO(d),e.sFT(a=>e.vVN(`[scheduler] task '${b}' failed`).pipe(e.swY("error",String(a))))));return yield*f.yo(a,a=>new Map(a).set(b,i)),yield*e.fH4(`[scheduler] task '${b}' started`),{id:b,fiber:i}}),list:e.JkU(function*(){return Array.from((yield*f.Jt(a)).keys())}),cancel:b=>e.JkU(function*(){let c=(yield*f.Jt(a)).get(b);c&&(yield*g.G(c),yield*f.yo(a,a=>{let c=new Map(a);return c.delete(b),c}),yield*e.fH4(`[scheduler] task '${b}' cancelled`))})})}))},86232:(a,b,c)=>{"use strict";c.d(b,{an:()=>k,wy:()=>l});var d=c(52693),e=c(69061),f=c(1971),g=c(64419);let h=a=>{let b="abcdef0123456789",c="";for(let d=0;d<a;d++)c+=b.charAt(Math.floor(Math.random()*b.length));return c};class i{constructor(a,b,c,e,f,i){this.name=a,this.parent=b,this.context=c,this.startTime=f,this.kind=i,this._tag="Span",this.sampled=!0,this.attributes=new Map,this.events=[],this.traceId=d.Ru(b)?b.value.traceId:h(32),this.spanId=h(16),this.status={_tag:"Started",startTime:f},this.links=Array.from(e),(0,g.wZ)((0,g.Ju)(this.spanId,this.traceId,(0,g.kW)(b),a,i,f))}end(a,b){this.status={_tag:"Ended",endTime:a,exit:b,startTime:this.status.startTime},(0,g.dK)(this.spanId,a,"Success"===b._tag?{_tag:"Success"}:{_tag:"Failure",cause:b.cause})}attribute(a,b){this.attributes.set(a,b),(0,g.YN)(this.spanId,a,b)}event(a,b,c){this.events.push([a,b,c??{}]),(0,g.Eb)(this.spanId,a,b,c)}addLinks(a){this.links.push(...a)}}let j=e.L8({span:(a,b,c,d,e,f)=>new i(a,b,c,d,e,f),context:a=>a()}),k=f.Py(e.sh,j),l=f.Ie},90828:(a,b,c)=>{"use strict";c.d(b,{ic:()=>f});var d=c(15825),e=c(31840);d.EV(e.YA(1),1.5).pipe(d.gP(d.ji(e.YA(10))),d.y$(d.t5(10))),d.EV(e.ne(200),2).pipe(d.gP(d.ji(e.YA(5))),d.y$(d.t5(5)));let f=d.EV(e.YA(1),2).pipe(d.et,d.gP(d.ji(e.YA(30))),d.y$(d.t5(8)));d.ji(e.YA(30)),d.ji(e.YA(1)),d.ji(e.YA(30)),e.ne(50),d.BW},94506:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{s9:()=>x});var e=c(1971),f=c(89705),g=c(16171),h=c(8155),i=c(35765),j=c(86232),k=c(38003),l=c(25470),m=c(37871),n=c(18702),o=c(34104),p=c(82843),q=c(17329),r=c(95606),s=c(12490),t=a([k,q]);[k,q]=t.then?(await t)():t;let u="dev"===process.env.COCKPIT_ENV,v=e.vM(f.JkU(function*(){let a=yield*h.c,b=u?i.fI:(0,i.yh)(a.logFile),c=u?j.an:j.wy;return e.Um(b,c,h.D)})),w=e.Um(v,k.H,l.A,m.P,n.u,o.I,p.i,q.x,r.en,s.n),x=g.L8(w);d()}catch(a){d(a)}})},95606:(a,b,c)=>{"use strict";c.d(b,{NQ:()=>D,UT:()=>E,en:()=>J});var d=c(31421),e=c(77598),f=c(51455),g=c(76760),h=c(89705),i=c(1971),j=c(15825),k=c(770),l=c(8155),m=c(34168);let n=[".git/","node_modules/",".next/","dist/","build/","out/","coverage/",".turbo/",".cache/","__pycache__/",".venv/","venv/","target/","*.log",".DS_Store",".env",".env.*","*.pem","*.p12","id_rsa*","id_ed25519*"],o=(a,b=!1)=>{let c=(0,e.createHash)("sha256").update(a,"utf8").digest("hex");return`${(0,g.basename)(a).replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,32)||"project"}-${b?c:c.slice(0,12)}`},p=a=>{let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`},q=a=>{let[b,c,d,...e]=a.split("\x1f");if(!b)return null;let f=e.join("\x1f"),g=(a=>{let b={};for(let c of a.split("\n")){let a=/^Cockpit-([A-Za-z-]+):\s*(.*)$/.exec(c);a&&(b[a[1]]=a[2])}return b})(f),h=[];if(g["Tool-Files"])try{let a=JSON.parse(g["Tool-Files"]);Array.isArray(a)&&(h=a.filter(a=>"string"==typeof a))}catch{h=[]}return{hash:b,parent:c?c.split(" ")[0]:null,timestamp:Number(d)||0,subject:f.split("\n")[0]??"",sessionKey:g.Session??null,toolId:g["Tool-Id"]??null,toolName:g.Tool??null,toolFiles:h,provider:g.Provider??null,baseline:"baseline"===g.Kind}},r=(a,b,c,e)=>h.$mh({try:()=>new Promise(f=>{let h=(0,d.execFile)("git",c,{env:{...process.env,GIT_DIR:a,...b?{GIT_WORK_TREE:b}:{},GIT_TERMINAL_PROMPT:"0",LC_ALL:"C",GIT_INDEX_FILE:(0,g.join)(a,"index")},cwd:b??a,maxBuffer:0x4000000},(a,b,c)=>{let d=a?.code;f({code:a?"number"==typeof d?d:1:0,stdout:String(b),stderr:String(c)})});void 0!==e&&h.stdin?.end(e)}),catch:a=>new k.uV({message:`git ${c[0]} spawn failed`,cause:a})}),s=(a,b,c,d)=>r(a,b,c,d).pipe(h.W$I(a=>0===a.code,a=>new k.uV({message:`git ${c.join(" ")} exited ${a.code}: ${a.stderr.slice(0,400)}`}))),t=/beyond a symbolic link/,u=globalThis,v=u.__cockpitSnapshotSemaphores??(u.__cockpitSnapshotSemaphores=new Map),w=(a,b)=>{let c=v.get(a);return c||(c=h.RIP(1),v.set(a,c)),c.withPermits(1)(b)},x=(a,b)=>h.$mh({try:b,catch:b=>new k.uV({message:`snapshot fs ${a} failed`,cause:b})}),y=a=>h.$mh({try:async()=>{let b;try{b=await (0,f.readFile)((0,g.join)(a,"meta.json"),"utf8")}catch{return{state:"missing",meta:null}}try{return{state:"ok",meta:JSON.parse(b)}}catch{return{state:"corrupt",meta:null}}},catch:()=>new k.uV({message:"unreachable"})}).pipe(h.DM4(()=>({state:"missing",meta:null}))),z=a=>y(a).pipe(h.TjK(a=>a.meta)),A=(a,b)=>x("write meta",async()=>{let c=(0,g.join)(a,"meta.json.tmp");await (0,f.writeFile)(c,JSON.stringify(b,null,2),"utf8"),await (0,f.rename)(c,(0,g.join)(a,"meta.json"))}),B=globalThis,C=B.__cockpitSnapshotPendingRecords??(B.__cockpitSnapshotPendingRecords=new Map),D=a=>{C.set(a,(C.get(a)??0)+1)},E=a=>{let b=(C.get(a)??1)-1;b<=0?C.delete(a):C.set(a,b)},F=a=>C.get(a)??0,G=(a,b)=>h.JkU(function*(){let c=(0,g.join)(a,o(b)),d=yield*z(c);return d&&d.cwd!==b?(yield*h.FFw(`snapshot repo hash collision: ${c} belongs to ${d.cwd}; using full-hash dir for ${b}`),(0,g.join)(a,o(b,!0))):c}),H=(a,b,c,d)=>h.JkU(function*(){let e=c.cwd,i=yield*G(a,e),j={committed:!1};if("baseline"===d&&F(e)>0)return j;let l=a=>h.JkU(function*(){yield*h.FFw(`snapshot suspended for 6h: ${a} — check .gitignore of ${e}`);let b=yield*z(i);return yield*A(i,{cwd:e,createdAt:b?.createdAt??Date.now(),lastSnapshotAt:b?.lastSnapshotAt??Date.now(),guardTrippedAt:Date.now()}),j}),m=h.JkU(function*(){0===(yield*r(i,e,["rev-parse","--quiet","--verify","HEAD"])).code&&(yield*s(i,e,["read-tree","HEAD"]));let a=(yield*s(i,e,["status","--porcelain","-z","-uall","--no-renames"])).stdout.split("\0").filter(Boolean);if(0===a.length)return{staged:!1};if(a.length>5e4)return yield*l(`${a.length} changed files exceeds 50000`),{staged:!1};let c=[],d=[];for(let b of a){let a=b.slice(3);a&&("D"===b[0]||"D"===b[1]?d.push(a):c.push(a))}let j=yield*h.Q7R(c.map(a=>x("stat",()=>(0,f.stat)((0,g.join)(e,a)).then(a=>a.isFile()?a.size:0)).pipe(h.DM4(()=>-1))),{concurrency:16}),m=[],n=0;for(let a=0;a<c.length;a++)!(j[a]<0)&&(j[a]>b||(m.push(c[a]),n+=j[a]));return n>0x40000000?(yield*l(`${Math.round(n/1048576)}MB of changes exceeds ${Math.round(1024)}MB`),{staged:!1}):0===m.length&&0===d.length?{staged:!1}:(d.length>0&&(yield*s(i,e,["rm","--cached","--quiet","--ignore-unmatch","--pathspec-from-file=-","--pathspec-file-nul"],d.map(a=>`:(literal)${a}`).join("\0"))),m.length>0&&(yield*h.JkU(function*(){let a=["add","-A","--force","--pathspec-from-file=-","--pathspec-file-nul"],b=yield*r(i,e,a,m.map(a=>`:(literal)${a}`).join("\0"));if(0!==b.code){if(!t.test(b.stderr))return yield*h.fJG(new k.uV({message:`git add exited ${b.code}: ${b.stderr.slice(0,400)}`}));for(let b of m){let c=yield*r(i,e,a,`:(literal)${b}`);if(0!==c.code){if(!t.test(c.stderr))return yield*h.fJG(new k.uV({message:`git add ${b} exited ${c.code}: ${c.stderr.slice(0,400)}`}));yield*s(i,e,["rm","--cached","--quiet","--ignore-unmatch","--",`:(literal)${b}`])}}}})),{staged:!0})});return yield*w(i,h.JkU(function*(){var a,b,l;let o,q,t,u;if("baseline"===d&&F(e)>0)return j;yield*h.JkU(function*(){if(yield*x("stat HEAD",()=>(0,f.stat)((0,g.join)(i,"HEAD")).then(()=>!0)).pipe(h.DM4(()=>!1)))return;for(let[a,b]of(yield*x("mkdir",()=>(0,f.mkdir)(i,{recursive:!0})),yield*s(i,null,["init","--quiet","--bare",i]),[["core.bare","false"],["core.logAllRefUpdates","false"],["gc.auto","0"],["user.name","cockpit-snapshot"],["user.email","snapshot@cockpit.local"],["commit.gpgsign","false"]]))yield*s(i,null,["config",a,b]);yield*x("write exclude",()=>(0,f.writeFile)((0,g.join)(i,"info","exclude"),n.join("\n")+"\n","utf8"));let a=Date.now();yield*A(i,{cwd:e,createdAt:a,lastSnapshotAt:a})});let v=yield*z(i);if(v?.guardTrippedAt&&Date.now()-v.guardTrippedAt<216e5||(yield*(o=p(new Date),h.JkU(function*(){let a=`refs/heads/snap/${o}`;if(0!==(yield*r(i,e,["rev-parse","--quiet","--verify",a])).code){let a=(yield*s(i,e,["for-each-ref","--sort=refname","--format=%(refname:short)","refs/heads/snap/"])).stdout.trim().split("\n").filter(Boolean).pop();if(a){let b=yield*s(i,e,["commit-tree",`${a}^{tree}`,"-m",`baseline (rollover from ${a})
|
|
1
|
+
exports.id=304,exports.ids=[304],exports.modules={770:(a,b,c)=>{"use strict";c.d(b,{Sh:()=>l,Yv:()=>h,i_:()=>k,m_:()=>j,n_:()=>f,uU:()=>g,uV:()=>e,yI:()=>i});var d=c(59412);class e extends d.rN("AppError"){}class f extends d.rN("DBError"){}d.rN("WSError");class g extends d.rN("FSError"){}class h extends d.rN("AgentError"){}class i extends d.rN("ValidationError"){}class j extends d.rN("NotFoundError"){}class k extends d.rN("PermissionError"){}let l=a=>{switch(a._tag){case"ValidationError":return 400;case"PermissionError":return 403;case"NotFoundError":return 404;case"DBError":case"FSError":case"AgentError":case"WSError":return 503;default:return 500}}},1085:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{T:()=>k,z:()=>j});var e=c(89705),f=c(7517),g=c(19879),h=c(770),i=a([g]);g=(i.then?(await i)():i)[0];let j=(a,b)=>e.JkU(function*(){let c,d=yield*f.sZ3(k(a,b)),e="";for(let a of d)"text"===a._tag?e+=a.delta:"done"===a._tag&&(c=a.usage);return{message:{role:"assistant",content:e},usage:c}}).pipe(e.fRP("agent.chat",{attributes:{provider:a.provider,model:a.model}})),k=(a,b)=>f.bIC(c=>{let d,f,i=a.provider,j=(d=((a,b)=>{switch(a){case"claude":return b?{apiKey:b}:{};case"codex":return{baseUrl:"https://api.openai.com/v1",apiKey:b};case"kimi":return{baseUrl:"https://api.moonshot.cn/anthropic",apiKey:b};case"deepseek":return{baseUrl:"https://api.deepseek.com/anthropic",apiKey:b};case"ollama":return{}}})(a.provider,b),{model:a.model,env:{...process.env,...d.baseUrl?{ANTHROPIC_BASE_URL:d.baseUrl}:{},...d.apiKey?{ANTHROPIC_API_KEY:d.apiKey}:{}}}),k=(f=[...a.messages].reverse().find(a=>"user"===a.role),f?.content??""),l=!1;return(async()=>{try{for await(let a of(0,g.query)({prompt:k,options:j})){if(l)break;if("assistant"===a.type&&a.message?.content)for(let b of a.message.content)"text"===b.type&&b.text&&c.single({_tag:"text",delta:b.text});"result"===a.type&&c.single({_tag:"done",usage:a.usage?{inputTokens:a.usage.input_tokens??0,outputTokens:a.usage.output_tokens??0}:void 0})}c.end()}catch(a){c.fail(new h.Yv({provider:i,kind:"protocol",cause:a}))}})(),e.OH5(()=>{l=!0})});d()}catch(a){d(a)}})},2827:(a,b,c)=>{"use strict";c.d(b,{j:()=>j,t:()=>i});var d=c(89705),e=c(7517),f=c(78497),g=c(770),h=c(39876);let i=a=>d.JkU(function*(){let b,c=yield*e.sZ3(j(a)),d="";for(let a of c)"text"===a._tag?d+=a.delta:"done"===a._tag&&(b=a.usage);return{message:{role:"assistant",content:d},usage:b}}).pipe(d.fRP("agent.chat",{attributes:{provider:"ollama",model:a.model}})),j=a=>e.bIC(b=>{let c=new AbortController;return(async()=>{try{let d=await (0,h.q)(a.model);for await(let e of(0,f.gM)({model:d,messages:a.messages.map(a=>({role:a.role,content:a.content})),temperature:a.temperature??0,abortSignal:c.signal}).fullStream)if("text-delta"===e.type){let a=e.text;a&&b.single({_tag:"text",delta:a})}else if("finish"===e.type){let a=e.totalUsage;b.single({_tag:"done",usage:a?{inputTokens:a.inputTokens??0,outputTokens:a.outputTokens??0}:void 0})}b.end()}catch(a){b.fail(new g.Yv({provider:"ollama",kind:"protocol",cause:a}))}})(),d.OH5(()=>c.abort())})},7939:(a,b,c)=>{"use strict";c.d(b,{$A:()=>R,A0:()=>ag,An:()=>aj,B0:()=>C,B3:()=>aa,BF:()=>N,Ct:()=>W,Eu:()=>L,Ex:()=>v,GB:()=>r,JE:()=>ai,JY:()=>Q,Ki:()=>G,Kk:()=>X,Kv:()=>j,LN:()=>k,Lr:()=>E,Mx:()=>H,N9:()=>an,O0:()=>F,SZ:()=>B,Sr:()=>O,Tb:()=>t,Ux:()=>am,Wd:()=>ah,Xi:()=>ad,aO:()=>m,at:()=>z,ec:()=>o,eg:()=>ae,h9:()=>y,i4:()=>K,iK:()=>p,im:()=>Z,iy:()=>V,jW:()=>M,jp:()=>u,lT:()=>A,lq:()=>J,ls:()=>P,mT:()=>x,n6:()=>n,oK:()=>U,oZ:()=>Y,of:()=>I,po:()=>S,qC:()=>_,sH:()=>s,tP:()=>q,th:()=>w,v4:()=>l,vI:()=>af,wG:()=>T,yw:()=>ac});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=process.env.COCKPIT_HOME?(0,e.resolve)(process.env.COCKPIT_HOME.replace(/^~(?=$|\/)/,i)):(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"push-subscriptions.json"),o=(0,e.join)(j,"note.md"),p=(0,e.join)(j,"scheduled-tasks.json"),q=(0,e.join)(j,"settings.json"),r=(0,e.join)(j,"skills.json"),s=(0,e.join)(j,"html.json"),t=(0,e.join)(j,"review"),u=(0,e.join)(t,"_signal");function v(){try{(0,g.existsSync)(t)||(0,g.mkdirSync)(t,{recursive:!0}),(0,g.writeFileSync)(u,Date.now().toString())}catch{}}let w=(0,e.join)(i,".claude"),x=(0,e.join)(w,"projects"),y=(0,e.join)(i,".claude2"),z=(0,e.join)(y,"projects"),A=(0,e.join)(j,"deepseek"),B=(0,e.join)(A,"projects"),C=(0,e.join)(A,"credentials.json"),D=(0,e.join)(j,"ollama"),E=(0,e.join)(D,"config.json");function F(a){return a.replace(/[/.]/g,"-")}function G(a){return(0,e.join)(k,F(a))}function H(a){return(0,e.join)(G(a),"session.json")}function I(a){return(0,e.join)(G(a),"recent-files.json")}function J(a){return(0,e.join)(G(a),"expanded-paths.json")}function K(a){return(0,e.join)(G(a),"comments.json")}function L(a){return(0,e.join)(G(a),"services.json")}function M(a){return(0,e.join)(G(a),"prompts.json")}function N(a){return(0,e.join)(G(a),"note.md")}function O(a,b){return(0,e.join)(G(a),`terminal-history-${b}.jsonl`)}function P(a,b){return(0,e.join)(G(a),`terminal-output-${b}.txt`)}function Q(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(G(a),c)}function R(){return(0,e.join)(j,"terminal-aliases.json")}function S(){return(0,e.join)(j,"services.json")}function T(){return(0,e.join)(j,"prompts.json")}function U(a){return(0,e.join)(G(a),"project-settings.json")}function V(a,b){return(0,e.join)(G(a),`terminal-bubble-order-${b}.json`)}function W(a){return(0,e.join)(t,`${a}.json`)}function X(a,b){return(0,e.join)((0,e.join)(x,F(a)),`${b}.jsonl`)}function Y(a,b){return(0,e.join)((0,e.join)(z,F(a)),`${b}.jsonl`)}function Z(a,b){return(0,e.join)((0,e.join)(B,F(a)),`${b}.jsonl`)}let $={ollama:"ollama-sessions",deepseek:"deepseek-sessions"},_=Object.values($);function aa(a){let b=$[a];if(!b)throw Error(`No built-in agent session store for engine "${a}"`);return(0,e.join)(j,b)}function ab(a,b,c){return(0,e.join)((0,e.join)(aa(a),F(b)),`${c}.jsonl`)}function ac(a,b){return ab("ollama",a,b)}function ad(a,b){return ab("deepseek",a,b)}function ae(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 af(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 ag(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function ah(a){let b=(0,e.join)(a,"..");await ag(b)}async function ai(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function aj(a,b){await ah(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let ak=globalThis,al=ak.__cockpitFileLocks??(ak.__cockpitFileLocks=new Map);function am(a,b){let c=(al.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return al.set(a,d),d.then(()=>{al.get(a)===d&&al.delete(a)}),c}function an(a,b,c){return am(a,async()=>{let d=await ai(a,b),e=await c(d);return await aj(a,e),e})}},8155:(a,b,c)=>{"use strict";c.d(b,{D:()=>r,c:()=>q});var d=c(44853),e=c(89705),f=c(1971);let g=d.eu("dev","prod")("COCKPIT_ENV").pipe(d.IQ("prod")),h=d.Yj("COCKPIT_HOST").pipe(d.IQ("127.0.0.1")),i=d.nd("COCKPIT_PORT").pipe(d.NW(()=>d.nd("PORT")),d.IQ(3457)),j=d.uK(d.Yj("COCKPIT_OPEN_PROJECT")).pipe(d.Tj(a=>"Some"===a._tag?a.value:void 0)),k=d.zM("COCKPIT_NO_OPEN").pipe(d.IQ(!1)),l=d.Yj("COCKPIT_LOG_LEVEL").pipe(d.IQ("info")),m=d.nd("COCKPIT_SNAPSHOT_KEEP_DAYS").pipe(d.IQ(7)),n=d.nd("COCKPIT_SNAPSHOT_REPO_TTL_DAYS").pipe(d.IQ(30)),o=d.nd("COCKPIT_SNAPSHOT_MAX_FILE_KB").pipe(d.IQ(2048)),p=d.nd("COCKPIT_SESSION_KEEP_DAYS").pipe(d.IQ(30)),q=e.JkU(function*(){let a=yield*g,b=yield*h,c=yield*i,d=yield*j,f=yield*k,q=yield*l,r=yield*m,s=yield*n,t=yield*o,u=yield*p,v=yield*e.OH5(()=>{let a="u">typeof process?process.env:void 0,b=a?.HOME||a?.USERPROFILE||".",c=a?.COCKPIT_HOME;return c?c.replace(/^~(?=$|\/)/,b):b+"/.cockpit"});return{env:a,host:b,port:3457===c&&"dev"===a?3456:c,cockpitDir:v,openProject:d,openBrowser:!f,logLevel:q,logFile:v+"/logs/cockpit.log",snapshotKeepDays:r,snapshotRepoTtlDays:s,snapshotMaxFileKb:t,sessionKeepDays:u}}).pipe(e.QgK),r=f.Ie},12490:(a,b,c)=>{"use strict";c.d(b,{n:()=>p});var d=c(51455),e=c(76760),f=c(89705),g=c(60177),h=c(1971),i=c(15825),j=c(770),k=c(8155),l=c(7939);let m=(a,b)=>f.$mh({try:b,catch:b=>new j.uV({message:`session cleanup fs ${a} failed`,cause:b})}),n=a=>m("stat",()=>(0,d.stat)(a).then(a=>a.isDirectory())).pipe(f.DM4(()=>!1)),o=g.Io("@cockpit/SessionCleanupService"),p=h.P1(o,f.JkU(function*(){let a=yield*k.c,b=l.qC.map(b=>(0,e.join)(a.cockpitDir,b)),c=(0,e.join)(a.cockpitDir,"pinned-sessions.json"),g=Math.max(1,a.sessionKeepDays),h=f.jJl(b,a=>f.JkU(function*(){let b=yield*f.$mh({try:async()=>{let a;try{a=await (0,d.readFile)(c,"utf8")}catch(a){if(a?.code==="ENOENT")return{ok:!0,ids:new Set};throw a}let b=JSON.parse(a),e=new Set;for(let a of Array.isArray(b)?b:[])a&&"string"==typeof a.sessionId&&e.add(a.sessionId);return{ok:!0,ids:e}},catch:()=>null}).pipe(f.DM4(()=>({ok:!1})));if(!b.ok)return void(yield*f.FFw("session cleanup: pinned-sessions.json is unreadable/corrupt -- skipping this pass (refusing to risk deleting protected sessions)"));let h=Date.now()-864e5*g;for(let c of yield*m("readdir root",()=>(0,d.readdir)(a)).pipe(f.DM4(()=>[]))){let i=(0,e.join)(a,c);if(!(yield*n(i)))continue;let j=yield*m("readdir cwd",()=>(0,d.readdir)(i)).pipe(f.DM4(()=>[])),k=new Map;for(let a of j){let b=(0,e.join)(i,a);if(a.endsWith(".jsonl")){let c=a.slice(0,-6),d=k.get(c)??{};d.jsonl=b,k.set(c,d)}else if(yield*n(b)){let c=k.get(a)??{};c.subdir=b,k.set(a,c)}}for(let[a,e]of k){if(b.ids.has(a))continue;let i=e.jsonl??e.subdir;i&&((yield*m("stat basis",()=>(0,d.stat)(i).then(a=>a.mtimeMs)).pipe(f.DM4(()=>1/0)))>=h||(e.jsonl&&(yield*m("rm jsonl",()=>(0,d.rm)(e.jsonl,{force:!0})).pipe(f.DM4(()=>void 0))),e.subdir&&(yield*m("rm subdir",()=>(0,d.rm)(e.subdir,{recursive:!0,force:!0})).pipe(f.DM4(()=>void 0))),yield*f.fH4(`session cleanup: removed ollama session ${a} under ${c} (older than ${g}d)`)))}0===(yield*m("readdir cwd (recount)",()=>(0,d.readdir)(i)).pipe(f.DM4(()=>["keep"]))).length&&(yield*m("rmdir cwd",()=>(0,d.rmdir)(i)).pipe(f.DM4(()=>void 0)))}}).pipe(f.fRP("session.cleanup")),{discard:!0});return yield*f.x6Z(h.pipe(f.h9N(a=>f.FFw(`session cleanup failed: ${a.message}`)),f.uxO(i.ji("24 hours")))),o.of({cleanup:h})}))},17329:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{x:()=>m});var e=c(89705),f=c(1971),g=c(90828),h=c(46303),i=c(1085),j=c(2827),k=a([i]);i=(k.then?(await k)():k)[0];let l=new Set(["rate-limit","timeout","unknown"]),m=f.Py(h.N,h.N.of({chat:a=>(a=>{switch(a.provider){case"ollama":return(0,j.t)(a);case"claude":case"codex":case"kimi":case"deepseek":return(0,i.z)(a)}})(a).pipe(e.L5P({schedule:g.ic,while:a=>l.has(a.kind)})),stream:a=>(a=>{switch(a.provider){case"ollama":return(0,j.j)(a);case"claude":case"codex":case"kimi":case"deepseek":return(0,i.T)(a)}})(a)}));d()}catch(a){d(a)}})},18702:(a,b,c)=>{"use strict";c.d(b,{u:()=>o});var d=c(89705),e=c(55235),f=c(1971),g=c(770),h=c(49818),i=c(15147),j=c.n(i);async function k(a){let b=new URL(a),c=b.protocol.replace(":",""),d=b.hostname,e=b.port||"7687",f=decodeURIComponent(b.username||"neo4j"),g=decodeURIComponent(b.password||""),h=`${c}://${d}:${e}`,i=j().driver(h,j().auth.basic(f,g));return await i.verifyConnectivity(),i}async function l(a,b,c){let d=a.session();try{let a=Date.now(),e=await d.run(b,c||{}),f=Date.now()-a;return{records:e.records.map(a=>{let b={};for(let c of a.keys)b[c]=function a(b){return null==b?null:j().isInt(b)?b.toNumber():b&&"object"==typeof b&&"labels"in b&&"properties"in b?{_type:"node",_id:a(b.identity),_labels:b.labels,...Object.fromEntries(Object.entries(b.properties).map(([b,c])=>[b,a(c)]))}:b&&"object"==typeof b&&"type"in b&&"start"in b&&"end"in b&&"properties"in b?{_type:"relationship",_id:a(b.identity),_relType:b.type,_start:a(b.start),_end:a(b.end),...Object.fromEntries(Object.entries(b.properties).map(([b,c])=>[b,a(c)]))}:b&&"object"==typeof b&&"segments"in b?{_type:"path",segments:b.segments.map(b=>({start:a(b.start),relationship:a(b.relationship),end:a(b.end)}))}:Array.isArray(b)?b.map(b=>a(b)):b&&"object"==typeof b&&b.constructor===Object?Object.fromEntries(Object.entries(b).map(([b,c])=>[b,a(c)])):b}(a.get(c));return b}),keys:e.records.length>0?e.records[0].keys:[],duration:f,counters:e.summary.counters.updates()}}finally{await d.close()}}let m=(a,b)=>d.$mh({try:b,catch:b=>new g.n_({db:"neo4j",op:a,cause:b})}),n=(a,b,c)=>d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c)return f.driver;f&&(yield*m("close",()=>f.driver.close()).pipe(d.NWQ(()=>d.rIH)));let g=yield*m("createDriver",()=>k(c));return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{driver:g,connectionString:c,createdAt:Date.now()}),d}),g}),o=f.P1(h.ge,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{driver:a}of b.values())yield*d.$mh({try:()=>a.close(),catch:a=>new g.n_({db:"neo4j",op:"shutdown close",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[Neo4jServiceLive] disposed ${b.size} driver(s)`)})),h.ge.of({run:(b,c,e,f)=>d.JkU(function*(){let d=yield*n(a,b,c);return(yield*m("run",()=>l(d,e,f))).records}).pipe(d.fRP("neo4j.run",{attributes:{id:b}})),runWithMeta:(b,c,e,f)=>d.JkU(function*(){let d=yield*n(a,b,c),g=yield*m("runWithMeta",()=>l(d,e,f));return{records:g.records,keys:g.keys,duration:g.duration,counters:g.counters}}).pipe(d.fRP("neo4j.runWithMeta",{attributes:{id:b}})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*m("disconnect",()=>c.driver.close()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},25470:(a,b,c)=>{"use strict";c.d(b,{A:()=>l});var d=c(89705),e=c(55235),f=c(1971),g=c(38491),h=c(770),i=c(49818);let j=(a,b)=>d.$mh({try:b,catch:b=>new h.n_({db:"mysql",op:a,cause:b})}),k=(a,b,c)=>d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c)return f.pool;f&&(yield*j("end",()=>f.pool.end()).pipe(d.NWQ(()=>d.rIH)));let h=g.createPool({uri:c,connectionLimit:5,idleTimeout:6e4,connectTimeout:1e4});return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{pool:h,connectionString:c,createdAt:Date.now()}),d}),h}),l=f.P1(i.M9,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{pool:a}of b.values())yield*d.$mh({try:()=>a.end(),catch:a=>new h.n_({db:"mysql",op:"shutdown end",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[MySQLServiceLive] disposed ${b.size} pool(s)`)})),i.M9.of({query:(b,c,e,f)=>d.JkU(function*(){let d=yield*k(a,b,c),[g]=yield*j("query",()=>d.query(e,f));return g}).pipe(d.fRP("mysql.query",{attributes:{id:b}})),queryWithMeta:(b,c,e,f)=>d.JkU(function*(){let d=yield*k(a,b,c),g=performance.now(),[h,i]=yield*j("queryWithMeta",()=>d.query(e,f)),l=Math.round((performance.now()-g)*100)/100;return Array.isArray(h)&&Array.isArray(i)?{rows:h,fields:i.map(a=>({name:a.name,dataTypeID:a.columnType??0})),rowCount:h.length,command:null,duration:l}:{rows:[],fields:null,rowCount:h.affectedRows??0,command:e.trim().split(/\s+/)[0]?.toUpperCase()||"QUERY",duration:l}}).pipe(d.fRP("mysql.queryWithMeta",{attributes:{id:b}})),withTx:(b,c,e)=>d.JkU(function*(){let f=yield*k(a,b,c),g=yield*j("getConnection",()=>f.getConnection());return yield*j("BEGIN",()=>g.beginTransaction()),yield*e({query:(a,b)=>j("tx.query",()=>g.query(a,b).then(([a])=>a))}).pipe(d.Bio({onSuccess:()=>j("COMMIT",()=>g.commit()),onFailure:()=>j("ROLLBACK",()=>g.rollback()).pipe(d.NWQ(()=>d.rIH))}),d.yeE(d.OH5(()=>g.release())))}).pipe(d.fRP("mysql.withTx",{attributes:{id:b}})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*j("disconnect",()=>c.pool.end()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},28303:a=>{function b(a){var b=Error("Cannot find module '"+a+"'");throw b.code="MODULE_NOT_FOUND",b}b.keys=()=>[],b.resolve=b,b.id=28303,a.exports=b},34104:(a,b,c)=>{"use strict";c.d(b,{I:()=>i});var d=c(89705),e=c(1971),f=c(770),g=c(49818);let h=a=>d.fJG(new f.n_({db:"mongo",op:a,cause:Error("MongoServiceLive not implemented (mongodb driver not installed)")})),i=e.Py(g.g8,g.g8.of({find:()=>h("find"),command:()=>h("command"),disconnect:()=>d.rIH}))},34168:(a,b,c)=>{"use strict";c.d(b,{M:()=>d});let d=c(60177).Io("@cockpit/SnapshotService")},35765:(a,b,c)=>{"use strict";c.d(b,{fI:()=>h,yh:()=>j});var d=c(64396),e=c(1971),f=c(78820);let g=a=>{switch((a??"").toLowerCase()){case"all":return d.u8;case"trace":return d.Cn;case"debug":return d.y;case"info":default:return d.R2;case"warning":case"warn":return d.N5;case"error":return d.$D;case"fatal":return d.Lj;case"none":return d.NV}},h=e.Um(f.j9,f.dl(g(process.env.COCKPIT_LOG_LEVEL))),i=async(a,b)=>{let{appendFile:d,mkdir:e}=await Promise.resolve().then(c.t.bind(c,79748,23)),{dirname:f}=await Promise.resolve().then(c.t.bind(c,33873,23));try{await e(f(b),{recursive:!0}),await d(b,a+"\n","utf-8")}catch{}},j=a=>e.Um(f.j9,f.WQ(f.L8(({logLevel:b,message:c,date:d,fiberId:e,spans:f,annotations:g})=>{i(JSON.stringify({time:d.toISOString(),level:b.label,fiber:"object"==typeof e&&null!==e&&"id"in e?e.id:String(e),msg:Array.isArray(c)&&1===c.length?c[0]:c,spans:Array.from(f).map(a=>({label:a.label,startTime:a.startTime})),annotations:Object.fromEntries(g)}),a)})),f.dl(g(process.env.COCKPIT_LOG_LEVEL)))},37871:(a,b,c)=>{"use strict";c.d(b,{P:()=>n});var d=c(89705),e=c(55235),f=c(7517),g=c(20473),h=c(1971),i=c(79298),j=c.n(i),k=c(770),l=c(49818);let m=(a,b)=>d.$mh({try:b,catch:b=>new k.n_({db:"redis",op:a,cause:b})}),n=h.P1(l.HE,d.JkU(function*(){let a=yield*e.L8(new Map);return yield*d.U9h(()=>d.JkU(function*(){let b=yield*e.Jt(a);for(let{client:a}of b.values())yield*d.$mh({try:()=>a.quit(),catch:a=>new k.n_({db:"redis",op:"shutdown quit",cause:a})}).pipe(d.NWQ(()=>d.rIH));yield*e.hZ(a,new Map),yield*d.fH4(`[RedisServiceLive] disposed ${b.size} client(s)`)})),l.HE.of({command:(b,c,f,g)=>d.JkU(function*(){let h=yield*d.JkU(function*(){let f=(yield*e.Jt(a)).get(b);if(f&&f.connectionString===c){if("ready"===f.client.status)return f.client;yield*m("quit",()=>f.client.quit()).pipe(d.NWQ(()=>d.rIH))}else f&&(yield*m("quit",()=>f.client.quit()).pipe(d.NWQ(()=>d.rIH)));let g=yield*m("connect",async()=>{let a=new(j())(c,{lazyConnect:!0,connectTimeout:1e4,maxRetriesPerRequest:1});return await a.connect(),a});return yield*e.yo(a,a=>{let d=new Map(a);return d.set(b,{client:g,connectionString:c,createdAt:Date.now()}),d}),g});return yield*m("call",()=>h.call(f,...g??[]))}).pipe(d.fRP("redis.command",{attributes:{id:b,cmd:f}})),subscribe:(a,b,c)=>f.A2M(d.JkU(function*(){let a=yield*g.dT(),e=yield*d.Q56(m("subscribeConnect",async()=>{let a=new(j())(b,{lazyConnect:!0,connectTimeout:1e4,maxRetriesPerRequest:1});return await a.connect(),a}),a=>d.$mh({try:()=>a.quit(),catch:()=>new k.n_({db:"redis",op:"subscribeQuit",cause:null})}).pipe(d.NWQ(()=>d.rIH))),h=c.includes("*")||c.includes("?");return yield*m("psubscribe",()=>h?e.psubscribe(c):e.subscribe(c)),e.on(h?"pmessage":"message",(...b)=>{let c=h?b[1]:b[0],e=h?b[2]:b[1];d.MY7(g.x(a,{channel:c,message:e}))}),f.gJc(a)})),disconnect:b=>d.JkU(function*(){let c=(yield*e.Jt(a)).get(b);c&&(yield*m("disconnect",()=>c.client.quit()).pipe(d.NWQ(()=>d.rIH)),yield*e.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}))},38003:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{H:()=>p});var e=c(89705),f=c(55235),g=c(1971),h=c(7517),i=c(64939),j=c(770),k=c(49818),l=a([i]);let{Pool:m}=(i=(l.then?(await l)():l)[0]).default,n=(a,b)=>e.$mh({try:b,catch:b=>new j.n_({db:"pg",op:a,cause:b})}),o=(a,b,c)=>e.JkU(function*(){let d=(yield*f.Jt(a)).get(b);if(d&&d.connectionString===c)return d.pool;d&&(yield*n("end",()=>d.pool.end()).pipe(e.NWQ(()=>e.rIH)));let g=new m({connectionString:c,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return yield*f.yo(a,a=>{let d=new Map(a);return d.set(b,{pool:g,connectionString:c,createdAt:Date.now()}),d}),g}),p=g.P1(k.HG,e.JkU(function*(){let a=yield*f.L8(new Map);return yield*e.U9h(()=>e.JkU(function*(){let b=yield*f.Jt(a);for(let{pool:a}of b.values())yield*e.$mh({try:()=>a.end(),catch:a=>new j.n_({db:"pg",op:"shutdown end",cause:a})}).pipe(e.NWQ(()=>e.rIH));yield*f.hZ(a,new Map),yield*e.fH4(`[PgServiceLive] disposed ${b.size} pool(s)`)})),k.HG.of({query:(b,c,d,f)=>e.JkU(function*(){let e=yield*o(a,b,c);return(yield*n("query",()=>e.query(d,f))).rows}).pipe(e.fRP("pg.query",{attributes:{id:b}})),queryWithMeta:(b,c,d,f)=>e.JkU(function*(){let e=yield*o(a,b,c),g=performance.now(),h=yield*n("queryWithMeta",()=>e.query(d,f)),i=Math.round((performance.now()-g)*100)/100;return{rows:h.rows??[],fields:h.fields?h.fields.map(a=>({name:a.name,dataTypeID:a.dataTypeID})):null,rowCount:h.rowCount??null,command:h.command??null,duration:i}}).pipe(e.fRP("pg.queryWithMeta",{attributes:{id:b}})),stream:(b,c,d,f)=>h.oAg(e.JkU(function*(){let e=yield*o(a,b,c),g=yield*n("query",()=>e.query(d,f));return h.Tsr(g.rows)})),withTx:(b,c,d)=>e.JkU(function*(){let f=yield*o(a,b,c),g=yield*n("connect",()=>f.connect());return yield*n("BEGIN",()=>g.query("BEGIN")),yield*d({query:(a,b)=>n("tx.query",()=>g.query(a,b).then(a=>a.rows))}).pipe(e.Bio({onSuccess:()=>n("COMMIT",()=>g.query("COMMIT")),onFailure:()=>n("ROLLBACK",()=>g.query("ROLLBACK")).pipe(e.NWQ(()=>e.rIH))}),e.yeE(e.OH5(()=>g.release())))}).pipe(e.fRP("pg.withTx",{attributes:{id:b}})),disconnect:b=>e.JkU(function*(){let c=(yield*f.Jt(a)).get(b);c&&(yield*n("disconnect",()=>c.pool.end()).pipe(e.NWQ(()=>e.rIH)),yield*f.yo(a,a=>{let c=new Map(a);return c.delete(b),c}))})})}));d()}catch(a){d(a)}})},39876:(a,b,c)=>{"use strict";c.d(b,{a:()=>h,q:()=>g});var d=c(91078),e=c(69310);let f=async(a,b)=>{if(b&&"string"==typeof b.body)try{let a=JSON.parse(b.body);if(Array.isArray(a.messages)){let c=!1;for(let b of a.messages)b&&"assistant"===b.role&&null==b.content&&(b.content="",c=!0);c&&(b={...b,body:JSON.stringify(a)})}}catch{}return fetch(a,b)};async function g(a){let{baseUrl:b,apiKey:c}=await (0,e.jh)();return(0,d.ry)({apiKey:c,baseURL:`${b}/v1/`,fetch:f}).chat(a)}function h(a){return(0,d.ry)({apiKey:a.apiKey,baseURL:a.baseURL}).chat(a.modelName)}},46303:(a,b,c)=>{"use strict";c.d(b,{N:()=>d});let d=c(60177).Io("@cockpit/AgentService")},49818:(a,b,c)=>{"use strict";c.d(b,{HE:()=>g,HG:()=>e,M9:()=>f,g8:()=>i,ge:()=>h});var d=c(60177);let e=d.Io("@cockpit/PgService"),f=d.Io("@cockpit/MySQLService"),g=d.Io("@cockpit/RedisService"),h=d.Io("@cockpit/Neo4jService"),i=d.Io("@cockpit/MongoService")},64419:(a,b,c)=>{"use strict";c.d(b,{BV:()=>m,Eb:()=>k,Ju:()=>o,S8:()=>n,YN:()=>j,dK:()=>i,kW:()=>p,m6:()=>l,wZ:()=>h});var d=c(89705),e=c(52693);let f=globalThis,g=f.__cockpitSpanRing??={buffer:[],index:new Map};function h(a){if(g.buffer.push(a),g.index.set(a.spanId,g.buffer.length-1),g.buffer.length>500){g.buffer.shift(),g.index.clear();for(let a=0;a<g.buffer.length;a++)g.index.set(g.buffer[a].spanId,a)}}function i(a,b,c){let d=g.index.get(a);if(void 0===d)return;let e=g.buffer[d];if(!e)return;let f=Number(b-BigInt(e.startTimeNs))/1e6;g.buffer[d]={...e,endTimeNs:b.toString(),durationMs:Math.round(100*f)/100,status:"Success"===c._tag?"ok":"error",errorMessage:"Failure"===c._tag?function(a){if(a instanceof Error)return a.message;if("string"==typeof a)return a;try{return JSON.stringify(a)}catch{return String(a)}}(c.cause):void 0}}function j(a,b,c){let d=g.index.get(a);if(void 0===d)return;let e=g.buffer[d];e&&(g.buffer[d]={...e,attributes:{...e.attributes,[b]:c}})}function k(a,b,c,d){let e=g.index.get(a);if(void 0===e)return;let f=g.buffer[e];f&&(g.buffer[e]={...f,events:[...f.events,{name:b,timeNs:c.toString(),attributes:d}]})}let l=(a={})=>d.OH5(()=>(function(a={}){let b=g.buffer;if(a.errorsOnly&&(b=b.filter(a=>"error"===a.status)),a.traceId&&(b=b.filter(b=>b.traceId===a.traceId)),a.namePrefix){let c=a.namePrefix;b=b.filter(a=>a.name.startsWith(c))}if("number"==typeof a.minDurationMs){let c=a.minDurationMs;b=b.filter(a=>(a.durationMs??0)>=c)}return"number"==typeof a.limit&&a.limit>0&&(b=b.slice(-a.limit)),b})(a)),m=()=>d.OH5(()=>{g.buffer.length=0,g.index.clear()}),n=()=>d.OH5(()=>({capacity:500,size:g.buffer.length,oldestStartNs:g.buffer[0]?.startTimeNs??null}));function o(a,b,c,d,e,f){return{traceId:b,spanId:a,parentSpanId:c,name:d,kind:e,startTimeNs:f.toString(),endTimeNs:null,durationMs:null,attributes:{},events:[],status:"started"}}function p(a){return e.Ru(a)?a.value.spanId:null}},69310:(a,b,c)=>{"use strict";c.d(b,{Pg:()=>h,QD:()=>k,jV:()=>i,jh:()=>j});var d=c(7939);let e="http://127.0.0.1:11434";function f(a){return a.replace(/\/v1\/?$/,"").replace(/\/+$/,"")}async function g(){return(0,d.JE)(d.Lr,{})}async function h(a){return(0,d.N9)(d.Lr,{},b=>{let c={...b};if(void 0!==a.baseUrl){let b=a.baseUrl.trim();b?c.baseUrl=b:delete c.baseUrl}if(void 0!==a.apiKey){let b=a.apiKey.trim();b?c.apiKey=b:delete c.apiKey}return c})}async function i(){let a=await g();return f(a.baseUrl?.trim()||process.env.OLLAMA_BASE_URL||e)}async function j(){let a=await g();return{baseUrl:f(a.baseUrl?.trim()||process.env.OLLAMA_BASE_URL||e),apiKey:a.apiKey?.trim()||process.env.OLLAMA_API_KEY||"ollama"}}async function k(){var a;let b,c,d,h,i=await g();return i.baseUrl?.trim()?(b=f(i.baseUrl.trim()),c="file"):process.env.OLLAMA_BASE_URL?(b=f(process.env.OLLAMA_BASE_URL),c="env"):(b=e,c="default"),i.apiKey?.trim()?(d=i.apiKey.trim(),h="file"):process.env.OLLAMA_API_KEY?(d=process.env.OLLAMA_API_KEY,h="env"):(d="",h="default"),{baseUrl:b,baseUrlSource:c,hasKey:!!d,maskedKey:(a=d)?a.length<=8?a.replace(/./g,"•"):`${a.slice(0,3)}${"•".repeat(Math.max(4,a.length-7))}${a.slice(-4)}`:"",keySource:h}}},78335:()=>{},82843:(a,b,c)=>{"use strict";c.d(b,{i:()=>i});var d=c(1971),e=c(89705),f=c(55235),g=c(27968);let h=c(60177).Io("@cockpit/Scheduler"),i=d.P1(h,e.JkU(function*(){let a=yield*f.L8(new Map);return yield*e.U9h(()=>e.JkU(function*(){for(let b of(yield*f.Jt(a)).values())yield*g.G(b);yield*f.hZ(a,new Map)})),h.of({schedule:(b,c,d)=>e.JkU(function*(){let h=yield*f.Jt(a).pipe(e.TjK(a=>a.get(b)));h&&(yield*g.G(h));let i=yield*e.x6Z(c.pipe(e.uxO(d),e.sFT(a=>e.vVN(`[scheduler] task '${b}' failed`).pipe(e.swY("error",String(a))))));return yield*f.yo(a,a=>new Map(a).set(b,i)),yield*e.fH4(`[scheduler] task '${b}' started`),{id:b,fiber:i}}),list:e.JkU(function*(){return Array.from((yield*f.Jt(a)).keys())}),cancel:b=>e.JkU(function*(){let c=(yield*f.Jt(a)).get(b);c&&(yield*g.G(c),yield*f.yo(a,a=>{let c=new Map(a);return c.delete(b),c}),yield*e.fH4(`[scheduler] task '${b}' cancelled`))})})}))},86232:(a,b,c)=>{"use strict";c.d(b,{an:()=>k,wy:()=>l});var d=c(52693),e=c(69061),f=c(1971),g=c(64419);let h=a=>{let b="abcdef0123456789",c="";for(let d=0;d<a;d++)c+=b.charAt(Math.floor(Math.random()*b.length));return c};class i{constructor(a,b,c,e,f,i){this.name=a,this.parent=b,this.context=c,this.startTime=f,this.kind=i,this._tag="Span",this.sampled=!0,this.attributes=new Map,this.events=[],this.traceId=d.Ru(b)?b.value.traceId:h(32),this.spanId=h(16),this.status={_tag:"Started",startTime:f},this.links=Array.from(e),(0,g.wZ)((0,g.Ju)(this.spanId,this.traceId,(0,g.kW)(b),a,i,f))}end(a,b){this.status={_tag:"Ended",endTime:a,exit:b,startTime:this.status.startTime},(0,g.dK)(this.spanId,a,"Success"===b._tag?{_tag:"Success"}:{_tag:"Failure",cause:b.cause})}attribute(a,b){this.attributes.set(a,b),(0,g.YN)(this.spanId,a,b)}event(a,b,c){this.events.push([a,b,c??{}]),(0,g.Eb)(this.spanId,a,b,c)}addLinks(a){this.links.push(...a)}}let j=e.L8({span:(a,b,c,d,e,f)=>new i(a,b,c,d,e,f),context:a=>a()}),k=f.Py(e.sh,j),l=f.Ie},90828:(a,b,c)=>{"use strict";c.d(b,{ic:()=>f});var d=c(15825),e=c(31840);d.EV(e.YA(1),1.5).pipe(d.gP(d.ji(e.YA(10))),d.y$(d.t5(10))),d.EV(e.ne(200),2).pipe(d.gP(d.ji(e.YA(5))),d.y$(d.t5(5)));let f=d.EV(e.YA(1),2).pipe(d.et,d.gP(d.ji(e.YA(30))),d.y$(d.t5(8)));d.ji(e.YA(30)),d.ji(e.YA(1)),d.ji(e.YA(30)),e.ne(50),d.BW},94506:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{s9:()=>x});var e=c(1971),f=c(89705),g=c(16171),h=c(8155),i=c(35765),j=c(86232),k=c(38003),l=c(25470),m=c(37871),n=c(18702),o=c(34104),p=c(82843),q=c(17329),r=c(95606),s=c(12490),t=a([k,q]);[k,q]=t.then?(await t)():t;let u="dev"===process.env.COCKPIT_ENV,v=e.vM(f.JkU(function*(){let a=yield*h.c,b=u?i.fI:(0,i.yh)(a.logFile),c=u?j.an:j.wy;return e.Um(b,c,h.D)})),w=e.Um(v,k.H,l.A,m.P,n.u,o.I,p.i,q.x,r.en,s.n),x=g.L8(w);d()}catch(a){d(a)}})},95606:(a,b,c)=>{"use strict";c.d(b,{NQ:()=>D,UT:()=>E,en:()=>J});var d=c(31421),e=c(77598),f=c(51455),g=c(76760),h=c(89705),i=c(1971),j=c(15825),k=c(770),l=c(8155),m=c(34168);let n=[".git/","node_modules/",".next/","dist/","build/","out/","coverage/",".turbo/",".cache/","__pycache__/",".venv/","venv/","target/","*.log",".DS_Store",".env",".env.*","*.pem","*.p12","id_rsa*","id_ed25519*"],o=(a,b=!1)=>{let c=(0,e.createHash)("sha256").update(a,"utf8").digest("hex");return`${(0,g.basename)(a).replace(/[^a-zA-Z0-9_-]/g,"_").slice(0,32)||"project"}-${b?c:c.slice(0,12)}`},p=a=>{let b=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${b}-${c}-${d}`},q=a=>{let[b,c,d,...e]=a.split("\x1f");if(!b)return null;let f=e.join("\x1f"),g=(a=>{let b={};for(let c of a.split("\n")){let a=/^Cockpit-([A-Za-z-]+):\s*(.*)$/.exec(c);a&&(b[a[1]]=a[2])}return b})(f),h=[];if(g["Tool-Files"])try{let a=JSON.parse(g["Tool-Files"]);Array.isArray(a)&&(h=a.filter(a=>"string"==typeof a))}catch{h=[]}return{hash:b,parent:c?c.split(" ")[0]:null,timestamp:Number(d)||0,subject:f.split("\n")[0]??"",sessionKey:g.Session??null,toolId:g["Tool-Id"]??null,toolName:g.Tool??null,toolFiles:h,provider:g.Provider??null,baseline:"baseline"===g.Kind}},r=(a,b,c,e)=>h.$mh({try:()=>new Promise(f=>{let h=(0,d.execFile)("git",c,{env:{...process.env,GIT_DIR:a,...b?{GIT_WORK_TREE:b}:{},GIT_TERMINAL_PROMPT:"0",LC_ALL:"C",GIT_INDEX_FILE:(0,g.join)(a,"index")},cwd:b??a,maxBuffer:0x4000000},(a,b,c)=>{let d=a?.code;f({code:a?"number"==typeof d?d:1:0,stdout:String(b),stderr:String(c)})});void 0!==e&&h.stdin?.end(e)}),catch:a=>new k.uV({message:`git ${c[0]} spawn failed`,cause:a})}),s=(a,b,c,d)=>r(a,b,c,d).pipe(h.W$I(a=>0===a.code,a=>new k.uV({message:`git ${c.join(" ")} exited ${a.code}: ${a.stderr.slice(0,400)}`}))),t=/beyond a symbolic link/,u=globalThis,v=u.__cockpitSnapshotSemaphores??(u.__cockpitSnapshotSemaphores=new Map),w=(a,b)=>{let c=v.get(a);return c||(c=h.RIP(1),v.set(a,c)),c.withPermits(1)(b)},x=(a,b)=>h.$mh({try:b,catch:b=>new k.uV({message:`snapshot fs ${a} failed`,cause:b})}),y=a=>h.$mh({try:async()=>{let b;try{b=await (0,f.readFile)((0,g.join)(a,"meta.json"),"utf8")}catch{return{state:"missing",meta:null}}try{return{state:"ok",meta:JSON.parse(b)}}catch{return{state:"corrupt",meta:null}}},catch:()=>new k.uV({message:"unreachable"})}).pipe(h.DM4(()=>({state:"missing",meta:null}))),z=a=>y(a).pipe(h.TjK(a=>a.meta)),A=(a,b)=>x("write meta",async()=>{let c=(0,g.join)(a,"meta.json.tmp");await (0,f.writeFile)(c,JSON.stringify(b,null,2),"utf8"),await (0,f.rename)(c,(0,g.join)(a,"meta.json"))}),B=globalThis,C=B.__cockpitSnapshotPendingRecords??(B.__cockpitSnapshotPendingRecords=new Map),D=a=>{C.set(a,(C.get(a)??0)+1)},E=a=>{let b=(C.get(a)??1)-1;b<=0?C.delete(a):C.set(a,b)},F=a=>C.get(a)??0,G=(a,b)=>h.JkU(function*(){let c=(0,g.join)(a,o(b)),d=yield*z(c);return d&&d.cwd!==b?(yield*h.FFw(`snapshot repo hash collision: ${c} belongs to ${d.cwd}; using full-hash dir for ${b}`),(0,g.join)(a,o(b,!0))):c}),H=(a,b,c,d)=>h.JkU(function*(){let e=c.cwd,i=yield*G(a,e),j={committed:!1};if("baseline"===d&&F(e)>0)return j;let l=a=>h.JkU(function*(){yield*h.FFw(`snapshot suspended for 6h: ${a} — check .gitignore of ${e}`);let b=yield*z(i);return yield*A(i,{cwd:e,createdAt:b?.createdAt??Date.now(),lastSnapshotAt:b?.lastSnapshotAt??Date.now(),guardTrippedAt:Date.now()}),j}),m=h.JkU(function*(){0===(yield*r(i,e,["rev-parse","--quiet","--verify","HEAD"])).code&&(yield*s(i,e,["read-tree","HEAD"]));let a=(yield*s(i,e,["status","--porcelain","-z","-uall","--no-renames"])).stdout.split("\0").filter(Boolean);if(0===a.length)return{staged:!1};if(a.length>5e4)return yield*l(`${a.length} changed files exceeds 50000`),{staged:!1};let c=[],d=[];for(let b of a){let a=b.slice(3);a&&("D"===b[0]||"D"===b[1]?d.push(a):c.push(a))}let j=yield*h.Q7R(c.map(a=>x("stat",()=>(0,f.stat)((0,g.join)(e,a)).then(a=>a.isFile()?a.size:0)).pipe(h.DM4(()=>-1))),{concurrency:16}),m=[],n=0;for(let a=0;a<c.length;a++)!(j[a]<0)&&(j[a]>b||(m.push(c[a]),n+=j[a]));return n>0x40000000?(yield*l(`${Math.round(n/1048576)}MB of changes exceeds ${Math.round(1024)}MB`),{staged:!1}):0===m.length&&0===d.length?{staged:!1}:(d.length>0&&(yield*s(i,e,["rm","--cached","--quiet","--ignore-unmatch","--pathspec-from-file=-","--pathspec-file-nul"],d.map(a=>`:(literal)${a}`).join("\0"))),m.length>0&&(yield*h.JkU(function*(){let a=["add","-A","--force","--pathspec-from-file=-","--pathspec-file-nul"],b=yield*r(i,e,a,m.map(a=>`:(literal)${a}`).join("\0"));if(0!==b.code){if(!t.test(b.stderr))return yield*h.fJG(new k.uV({message:`git add exited ${b.code}: ${b.stderr.slice(0,400)}`}));for(let b of m){let c=yield*r(i,e,a,`:(literal)${b}`);if(0!==c.code){if(!t.test(c.stderr))return yield*h.fJG(new k.uV({message:`git add ${b} exited ${c.code}: ${c.stderr.slice(0,400)}`}));yield*s(i,e,["rm","--cached","--quiet","--ignore-unmatch","--",`:(literal)${b}`])}}}})),{staged:!0})});return yield*w(i,h.JkU(function*(){var a,b,l;let o,q,t,u;if("baseline"===d&&F(e)>0)return j;yield*h.JkU(function*(){if(yield*x("stat HEAD",()=>(0,f.stat)((0,g.join)(i,"HEAD")).then(()=>!0)).pipe(h.DM4(()=>!1)))return;for(let[a,b]of(yield*x("mkdir",()=>(0,f.mkdir)(i,{recursive:!0})),yield*s(i,null,["init","--quiet","--bare",i]),[["core.bare","false"],["core.logAllRefUpdates","false"],["gc.auto","0"],["user.name","cockpit-snapshot"],["user.email","snapshot@cockpit.local"],["commit.gpgsign","false"]]))yield*s(i,null,["config",a,b]);yield*x("write exclude",()=>(0,f.writeFile)((0,g.join)(i,"info","exclude"),n.join("\n")+"\n","utf8"));let a=Date.now();yield*A(i,{cwd:e,createdAt:a,lastSnapshotAt:a})});let v=yield*z(i);if(v?.guardTrippedAt&&Date.now()-v.guardTrippedAt<216e5||(yield*(o=p(new Date),h.JkU(function*(){let a=`refs/heads/snap/${o}`;if(0!==(yield*r(i,e,["rev-parse","--quiet","--verify",a])).code){let a=(yield*s(i,e,["for-each-ref","--sort=refname","--format=%(refname:short)","refs/heads/snap/"])).stdout.trim().split("\n").filter(Boolean).pop();if(a){let b=yield*s(i,e,["commit-tree",`${a}^{tree}`,"-m",`baseline (rollover from ${a})
|
|
2
2
|
|
|
3
3
|
Cockpit-Kind: baseline`]);yield*s(i,e,["branch",`snap/${o}`,b.stdout.trim()])}}yield*s(i,e,["symbolic-ref","HEAD",a])})),!(yield*m.pipe(h.L5P({times:1}))).staged))return j;let w=(c.toolFiles??[]).map(a=>((a,b)=>{if(!(0,g.isAbsolute)(b))return b;let c=(0,g.relative)(a,b);return c&&!c.startsWith("..")?c:b})(e,a)),y=(a=c,b=w,l=d,q=b.length>0?1===b.length?b[0]:`${b[0]} +${b.length-1}`:a.toolDetail??"",t="baseline"===l?"baseline":`[${a.toolName??"tool"}] ${q}`.replace(/[\u0000-\u001f\u007f]+/g," ").replace(/\s+/g," ").trim().slice(0,80),u=[`Cockpit-Kind: ${l}`,`Cockpit-Session: ${a.sessionKey}`,`Cockpit-Provider: ${a.provider}`,...a.toolId?[`Cockpit-Tool-Id: ${a.toolId}`]:[],...a.toolName?[`Cockpit-Tool: ${a.toolName}`]:[],...b.length?[`Cockpit-Tool-Files: ${JSON.stringify(b)}`]:[]],`${t}
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=3863,exports.ids=[3863],exports.modules={3863:(a,b,c)=>{c.d(b,{FP:()=>
|
|
1
|
+
"use strict";exports.id=3863,exports.ids=[3863],exports.modules={3863:(a,b,c)=>{c.d(b,{FP:()=>o,Yp:()=>n});var d=c(29021),e=c(21820),f=c(33873),g=c(55511),h=c(14566),i=c(79646),j=c(95169);let k=a=>`'${a.replace(/'/g,"'\\''")}'`;function l(a){try{return(0,i.execSync)(`command -v ${a}`,{stdio:"ignore"}),!0}catch{return!1}}let m=new Map;function n(a,b){let c=m.get(a);if(!c)return!1;try{return c(b),!0}catch{return!1}}function o(a){let{cwd:b,prompt:c,onJsonlLine:n,onPtyData:o,onSubmit:p,onComplete:q,onQuestionEsc:r,onTurnBoundary:s,signal:t,debug:u=!1,idleMs:v=3e3,timeoutMs:w,cols:x=80,rows:y=24,stuckMs:z=1e4,graceMs:A=3e4,onStuck:B}=a,C=a.sessionId||g.randomUUID(),D=!0===a.resume,E=f.join(function(a){let b=a;try{b=d.realpathSync(a)}catch{}let c=b.replace(/\//g,"-");return f.join(e.homedir(),".claude","projects",c)}(b),`${C}.jsonl`),F=function(){let a=f.join(e.tmpdir(),"cockpit-claude-hooks-v2.json"),b=JSON.stringify({hooks:{Stop:[{hooks:[{type:"command",command:"true"}]}],PreToolUse:[{matcher:"AskUserQuestion",hooks:[{type:"command",command:`echo ${k("Interactive questions cannot be displayed in this session. Do NOT retry this tool. Instead, present your questions as plain text in your reply - each question with its options and your recommended choice - then end your turn and wait for the user to answer in the next message.")} >&2; exit 2`}]}]}});try{if(d.readFileSync(a,"utf8")===b)return a}catch{}let c=`${a}.${process.pid}.tmp`;return d.writeFileSync(c,b),d.renameSync(c,a),a}(),G=(...a)=>{u&&console.error("[driver]",...a)},H={"image/png":"png","image/jpeg":"jpg","image/webp":"webp","image/gif":"gif"},I=[];for(let b of a.images||[])try{let a=f.join(e.tmpdir(),`cockpit-pty-img-${g.randomUUID()}.${H[b.media_type]||"png"}`);d.writeFileSync(a,Buffer.from(b.data,"base64")),I.push({path:a,isPng:"image/png"===b.media_type})}catch{}let J=I.length>0&&("darwin"===process.platform||"linux"===process.platform&&(l("wl-copy")||l("xclip"))),K=!J&&I.length?`${c}
|
|
2
2
|
|
|
3
3
|
[Attached image(s)]:
|
|
4
|
-
${
|
|
4
|
+
${I.map(a=>a.path).join("\n")}`:c,L=()=>{for(let a of I){try{d.unlinkSync(a.path)}catch{}try{d.unlinkSync(`${a.path}.png`)}catch{}}};return new Promise(a=>{let c,e=0;try{e=d.readFileSync(E,"utf8").split("\n").filter(Boolean).length}catch{}let f=D?["-r",C,"--dangerously-skip-permissions"]:["--session-id",C,"--dangerously-skip-permissions"];f.push("--settings",F);let g=`claude ${f.join(" ")}`;G("spawn:",g,"| jsonl:",E,"| baseline:",e);let u=process.env.SHELL||("darwin"===process.platform?"/bin/zsh":"/bin/bash");try{c=h.spawn(u,["--login","-c",g],{name:"xterm-256color",cols:x,rows:y,cwd:b,env:(0,j.u)()})}catch(b){L(),a({sessionId:C,jsonlPath:E,completed:!1,completedVia:null,exitCode:null,crashed:!0,crashError:`spawn failed: ${String(b)}`,newLines:[]});return}m.set(C,a=>{try{c.write(a)}catch{}});let H="",M=Date.now(),N=!1,O=!1,P=0,Q=!1,R=!1,S=null,T=!1,U=!1,V=e,W=0,X=!1,Y=!1,Z="",$=!1,_=[],aa=new Set,ab=!1;c.onData(a=>{if((H+=a).length>2e5&&(H=H.slice(-15e4)),M=Date.now(),o?.(a),!Y&&/claude-code\/cli\.js:\d+:\d+/.test(H)){Y=!0;let a=H.match(/Cannot read properties of [^\n\x1b]+/);G("CRASH detected:",Z=(a?a[0]:"claude-code internal crash").trim()),setTimeout(()=>{if(!U)try{c.kill()}catch{}},100),setTimeout(()=>{if(!U)try{c.kill("SIGKILL")}catch{}},1e3);return}!N&&/Bypass Permissions mode|Yes, I accept/i.test(H)&&(N=!0,G("accept menu → Down + Enter"),setTimeout(()=>c.write("\x1b[B"),400),setTimeout(()=>c.write("\r"),700)),!O&&Q&&!R&&/Enter to select.*Esc to cancel/i.test(H)&&(O=!0,G("AskUserQuestion UI detected → ESC + end turn"),r?.(),setTimeout(()=>{try{c.write("\x1b")}catch{}},300),setTimeout(()=>am("question_esc"),600))});let ac=0,ad=setInterval(()=>{if(Q||U)return;let a=/bypass permissions on|shift\+tab/i.test(H);if(a&&!ac&&(ac=Date.now()),!a)return;let b=Date.now()-M>2200,c=Date.now()-ac>4e3;(b||c)&&aj()},300),ae=null,af=setTimeout(()=>{Q||U||(G(`not ready after ${z}ms → prompt for manual handling, grace ${A}ms`),B?.(),ae=setTimeout(()=>{if(!Q&&!U){$=!0,G("grace window elapsed and still not ready → kill");try{c.kill()}catch{}setTimeout(()=>{if(!U)try{c.kill("SIGKILL")}catch{}},1500)}},A))},z),ag=()=>{clearTimeout(af),ae&&clearTimeout(ae)},ah=null,ai=a=>new Promise(b=>{let c=Date.now(),d=setInterval(()=>{((H.match(/\[Image/g)||[]).length>=a||Date.now()-c>2500||U)&&(clearInterval(d),b())},100)});async function aj(){if(!Q){if(Q=!0,ag(),J){ah=function(){try{if("darwin"===process.platform)return(0,i.execSync)("pbpaste",{encoding:"utf8"});if(l("wl-paste"))return(0,i.execSync)("wl-paste -n",{encoding:"utf8"});if(l("xclip"))return(0,i.execSync)("xclip -o -selection clipboard",{encoding:"utf8"})}catch{}return null}();for(let a=0;a<I.length&&!U;a++){if(!function(a,b){try{if("darwin"===process.platform){let c=a;return b||(c=`${a}.png`,(0,i.execSync)(`sips -s format png ${k(a)} --out ${k(c)}`,{stdio:"ignore"})),(0,i.execSync)(`osascript -e 'set the clipboard to (read (POSIX file ${JSON.stringify(c)}) as \xabclass PNGf\xbb)'`,{stdio:"ignore"}),!0}if("linux"===process.platform){if(l("wl-copy"))return(0,i.execSync)(`wl-copy --type image/png < ${k(a)}`,{shell:"/bin/bash",stdio:"ignore"}),!0;if(l("xclip"))return(0,i.execSync)(`xclip -selection clipboard -t image/png -i ${k(a)}`,{stdio:"ignore"}),!0}}catch{}return!1}(I[a].path,I[a].isPng)){G("clipboard set failed, skipping this image");continue}c.write("\x16"),await ai(a+1)}}G("paste prompt + Enter"+(I.length?` (${J?"clipboard":"path"} x${I.length} img)`:"")),c.write("\x1b[200~"+K+"\x1b[201~"),setTimeout(()=>c.write("\r"),250),null!=ah&&setTimeout(()=>{null!=ah&&function(a){try{if("darwin"===process.platform)return void(0,i.execSync)("pbcopy",{input:a});if(l("wl-copy"))return void(0,i.execSync)("wl-copy",{input:a});l("xclip")&&(0,i.execSync)("xclip -selection clipboard",{input:a})}catch{}}(ah)},800),p?.()}}let ak=setInterval(()=>{let a;try{a=d.readFileSync(E,"utf8")}catch{return}let b=a.split("\n").filter(Boolean);for(let a=V;a<b.length;a++){let c;try{c=JSON.parse(b[a])}catch{continue}_.push(c),W=Date.now(),function(a,b){let c=a.message?.content;if("user"===a.type&&Array.isArray(c)){for(let a of c)if("tool_result"===a.type&&"string"==typeof a.content){let c=a.content.match(/Command running in background with ID:\s*([A-Za-z0-9_-]+)/);c&&b.add(c[1])}}let d=a.origin;if("user"===a.type&&d?.kind==="task-notification"){let a="string"==typeof c?c:Array.isArray(c)?c.filter(a=>"text"===a.type).map(a=>a.text||"").join(""):"",d=a.match(/<task-id>([\s\S]*?)<\/task-id>/)?.[1]?.trim();d&&b.delete(d)}}(c,aa),ab&&"assistant"===c.type&&(ab=!1,s?.("init")),n?.(c);let d=Array.isArray(c.message?.content)?c.message.content.map(a=>a.type).join(","):"";"assistant"===c.type&&d.includes("text")&&(X=!0),"assistant"===c.type&&Array.isArray(c.message?.content)&&(P+=c.message.content.filter(a=>"tool_use"===a.type&&"AskUserQuestion"===a.name).length)>=3&&!R&&(G(`AskUserQuestion x${P} → break retry loop, end turn`),r?.(),am("question_loop")),"system"!==c.type||"stop_hook_summary"!==c.subtype||R||(0===aa.size?am("stop_hook_summary"):(G("stop_hook with background task(s) pending → staying resident",[...aa]),s?.("result"),ab=!0))}V=b.length},150),al=setInterval(()=>{!R&&Q&&X&&0===aa.size&&Date.now()-W>v&&Date.now()-M>v&&am("idle")},300);function am(a){R||(R=!0,S=a,G("complete via",a),q?.(a),setTimeout(an,200))}function an(){if(!T){T=!0,G("exit: Ctrl+C x2 → SIGHUP → SIGKILL");try{c.write("\x03")}catch{}setTimeout(()=>{try{c.write("\x03")}catch{}},150),setTimeout(()=>{if(!U)try{c.kill()}catch{}},900),setTimeout(()=>{if(!U)try{c.kill("SIGKILL")}catch{}},2e3)}}let ao=()=>{G("aborted → interrupt + guaranteed kill");try{c.write("\x1b"),c.write("\x03")}catch{}setTimeout(()=>{if(!U)try{c.kill()}catch{}},500),setTimeout(()=>{if(!U)try{c.kill("SIGKILL")}catch{}},1500)},ap=!1;t&&(t.aborted?ao():(t.addEventListener("abort",ao,{once:!0}),ap=!0));let aq=w?setTimeout(()=>{if(!U){G("TIMEOUT, killing");try{c.kill()}catch{}setTimeout(()=>{if(!U)try{c.kill("SIGKILL")}catch{}},1500)}},w):null;c.onExit(({exitCode:b})=>{U=!0,clearInterval(ak),clearInterval(ad),clearInterval(al),ag(),aq&&clearTimeout(aq),m.delete(C),L(),ap&&t?.removeEventListener("abort",ao),G("exit code",b,"completed",R,"via",S),a({sessionId:C,jsonlPath:E,completed:R,completedVia:S,exitCode:b,crashed:Y,crashError:Z,timedOut:$,newLines:_})})})}}};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=
|
|
1
|
+
"use strict";exports.id=4338,exports.ids=[4338],exports.modules={26925:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{J:()=>l,v:()=>m});var e=c(89705),f=c(94506),g=c(34168),h=c(38561),i=c(95606),j=a([f]);f=(j.then?(await j)():j)[0];let n=globalThis,o=n.__cockpitSnapshotToolIndex??(n.__cockpitSnapshotToolIndex=new Map);function k(a){let b=a.message;return Array.isArray(b?.content)?b.content:[]}let p=a=>{f.s9.runFork(a.pipe(e.h9N(a=>e.FFw(`snapshot failed: ${a.message}`))))};function l(a,b,c){a&&p(e.qIB(g.M,d=>d.baseline(a,b,c)))}function m(a,b,c,d){if(a){if("assistant"===d.type){for(let a of k(d))a.id&&a.name&&o.set(a.id,{name:a.name,files:function(a){if(!a)return[];let b=[];return"string"==typeof a.file_path&&a.file_path&&b.push(a.file_path),"string"==typeof a.notebook_path&&a.notebook_path&&b.push(a.notebook_path),b}(a.input),provider:c,detail:function(a){if(a){if("string"==typeof a.description&&a.description)return a.description;if("string"==typeof a.command&&a.command)return a.command}}(a.input)});!function(){if(o.size<=4e3)return;let a=Math.floor(o.size/2);for(let b of o.keys()){if(a--<=0)break;o.delete(b)}}();return}if("user"===d.type)for(let f of k(d)){if(!f.tool_use_id)continue;let d=o.get(f.tool_use_id);if(d&&o.delete(f.tool_use_id),d&&h.W.has(d.name))continue;let j=f.tool_use_id;(0,i.NQ)(a),p(e.qIB(g.M,e=>e.record({cwd:a,sessionKey:b,provider:c,toolId:j,toolName:d?.name??"tool",toolFiles:d?.files??[],toolDetail:d?.detail})).pipe(e.yeE(e.OH5(()=>(0,i.UT)(a)))))}}}d()}catch(a){d(a)}})},33286:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{T:()=>k});var e=c(79830),f=c(82940),g=c(26925),h=c(37655),i=c(55511),j=a([g]);async function k(a,b,c){let{sessionId:d,images:j,cwd:k,language:l}=b;if(d&&(0,f.yQ)(d))return{ok:!1,status:409,error:"session is already running"};let m=b.prompt,n="string"==typeof m?(0,h.M)(m,l,c):m;if(!(n&&"string"==typeof n||j&&j.length>0))return{ok:!1,status:400,error:"Missing prompt or images"};if(a.preflight){let c=await a.preflight(b);if(!c.ok)return c}let o="string"==typeof n?n:void 0,p=new AbortController,q="string"==typeof b.runId&&b.runId||(0,i.randomUUID)(),r=d||q,s=d,t=!1;if(!(0,f.AD)(r,k||"",o,q))return{ok:!1,status:409,error:"run already active"};(0,f.e5)(r,()=>{t=!0,p.abort()}),k&&d&&(0,e.CS)(k,d,"loading",void 0,o).catch(()=>{}),(0,g.J)(k||"",r,a.name);let u={prompt:o,images:j,cwd:k||"",sessionId:d,params:b,signal:p.signal,emit(b){t||((0,f.ah)(r,b),(0,g.v)(k||"",r,a.name,b))},rekey(a){a&&((0,f.GS)(r,a),r=a,s=a,k&&(0,e.CS)(k,a,"loading",void 0,o).catch(()=>{}))},currentKey:()=>r};return(async()=>{try{await a.runner.run(u)}catch(b){if(p.signal.aborted){t=!0,(0,f.HS)(r,"idle");return}if(console.error(`[engine:${a.name}] run error:`,b),u.emit({type:"error",error:b instanceof Error?b.message:String(b)}),(0,f.HS)(r,"error"),t=!0,k&&s){let a=await (0,e.Pn)(k,s).catch(()=>void 0);await (0,e.CS)(k,s,"unread",a).catch(()=>{})}return}if(k&&s){let b=await (a.runner.resolveTitle?a.runner.resolveTitle(k,s).catch(()=>void 0):Promise.resolve(void 0));await (0,e.CS)(k,s,"unread",b).catch(()=>{})}t=!0,(0,f.HS)(r,"idle")})(),{ok:!0,runKey:r,sessionId:s??null}}g=(j.then?(await j)():j)[0],d()}catch(a){d(a)}})},37655:(a,b,c)=>{c.d(b,{M:()=>j});var d=c(29021),e=c(33873),f=c(7939);let g={qa:{zh:`---
|
|
2
2
|
name: qa
|
|
3
3
|
description: "进入需求澄清讨论模式:复述对需求的理解,把待确认点做成带推荐答案的选择题表格,只输出理解不改代码,遵循 KISS。"
|
|
4
4
|
---
|
|
@@ -1761,4 +1761,4 @@ When done, briefly report: skill slug, source path (\`<skills-dir>/<slug>/SKILL.
|
|
|
1761
1761
|
`,"utf-8"),f}catch{return null}}(a,j);return k?{name:a,path:k,content:null}:{name:a,path:null,content:j}}(a.cmd,m,r,n);s.set(a.i,function(a,b,c,d,e){if(b.path){let f=e?`[${k(a,d)}\xb7${b.name}]`:`[${b.name}]`;return c?`${f} ${c}`:f}let f=e?`[${k(a,d)}] `:"",g=c?"zh"===d?`,然后:${c}`:`, then: ${c}`:"";return`${f}${b.content??""}${g}`}(a.marker,i,f.join("\n"),m,q)),i.path&&!v.has(i.name)&&(v.add(i.name),u.push({name:i.name,path:i.path}))});let w=[];for(let a=0;a<o.length;a++)t.has(a)||w.push(s.get(a)??o[a]);let x=w.join("\n");if(u.length>0){let a="zh"===m?"请先读取以下 skill 文件,再据此执行:":"Read these skill files first, then act accordingly:",b="zh"===m?":":": ",c=u.map(a=>`- ${a.name}${b}${a.path}`).join("\n");x=`${x}
|
|
1762
1762
|
|
|
1763
1763
|
${a}
|
|
1764
|
-
${c}`}return x}function k(a,b){return"@"===a?"subagent":"zh"===b?"主会话":"main session"}},38561:(a,b,c)=>{c.d(b,{W:()=>d});let d=new Set(["Read","Grep","Glob","LS","WebSearch","WebFetch","NotebookRead","TodoRead","AskUserQuestion","ExitPlanMode","TodoWrite","Skill"])},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)}})},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,d){let f=e.get(a);if(f?.status==="running")return!1;let h=f?.seq??g.get(a)??0;if(f)for(let a of(f.evictTimer&&clearTimeout(f.evictTimer),f.keys))e.delete(a);let i=Date.now();return e.set(a,{keys:new Set([a]),cwd:b,status:"running",seq:h,events:[],startedAt:i,updatedAt:i}),c&&k(a,{type:"user",_human:!0,...d?{_turnId:d}:{},_ts:i,message:{role:"user",content:c}}),!0}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){let c=e.get(a);c&&(c.sessionId=b,a!==b&&(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(),startedAt:b.startedAt}: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}}};
|
|
1764
|
+
${c}`}return x}function k(a,b){return"@"===a?"subagent":"zh"===b?"主会话":"main session"}},38561:(a,b,c)=>{c.d(b,{W:()=>d});let d=new Set(["Read","Grep","Glob","LS","WebSearch","WebFetch","NotebookRead","TodoRead","AskUserQuestion","ExitPlanMode","TodoWrite","Skill"])},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)}})},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,d){let f=e.get(a);if(f?.status==="running")return!1;let h=f?.seq??g.get(a)??0;if(f)for(let a of(f.evictTimer&&clearTimeout(f.evictTimer),f.keys))e.delete(a);let i=Date.now();return e.set(a,{keys:new Set([a]),cwd:b,status:"running",seq:h,events:[],startedAt:i,updatedAt:i}),c&&k(a,{type:"user",_human:!0,...d?{_turnId:d}:{},_ts:i,message:{role:"user",content:c}}),!0}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){let c=e.get(a);c&&(c.sessionId=b,a!==b&&(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(),startedAt:b.startedAt}: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}},95169:(a,b,c)=>{c.d(b,{u:()=>e});let d=["NODE_ENV","NEXT_DEPLOYMENT_ID","TURBOPACK"];function e(a={},b=process.env){let c={};for(let[a,d]of Object.entries(b))void 0!==d&&(c[a]=d);for(let a of d)delete c[a];for(let[b,d]of Object.entries(a))void 0===d?delete c[b]:c[b]=d;return c}}};
|