@surething/cockpit 1.0.237 → 1.0.239
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 +5 -2
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +12 -12
- package/.next-prod/routes-manifest.json +20 -0
- package/.next-prod/server/app/_global-error/page.js +2 -2
- 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 +1 -1
- 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 +2 -2
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- 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 +2 -2
- 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/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/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/preview/[...path]/route.js +1 -0
- package/.next-prod/server/app/api/preview/[...path]/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/preview/[...path]/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- 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/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 -0
- package/.next-prod/server/app/api/snapshots/diff/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/snapshots/diff/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/snapshots/route.js +1 -0
- package/.next-prod/server/app/api/snapshots/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/snapshots/route_client-reference-manifest.js +1 -0
- 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/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 +5 -2
- package/.next-prod/server/chunks/304.js +5 -1
- package/.next-prod/server/chunks/{5897.js → 4848.js} +8 -8
- package/.next-prod/server/chunks/{8523.js → 5674.js} +2 -2
- package/.next-prod/server/chunks/7184.js +1 -1
- package/.next-prod/server/chunks/8916.js +1 -1
- package/.next-prod/server/chunks/9658.js +15 -15
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/middleware-react-loadable-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/c1JrZ4eVs2JR2ujEC_UrJ/_buildManifest.js +1 -0
- package/.next-prod/static/chunks/{6787-866a3046a4a0fa50.js → 1973-5ba02ae354968836.js} +7 -7
- package/.next-prod/static/chunks/{2501.4e65b56602faa956.js → 2501.8a795c737a86ac2f.js} +1 -1
- package/.next-prod/static/chunks/{3304.16305e84f4ff6598.js → 3304.540e84c28c47b48b.js} +1 -1
- package/.next-prod/static/chunks/{4523.3f277a24fbcfde6d.js → 4523.a6c0a4fb0a46d0bb.js} +1 -1
- package/.next-prod/static/chunks/{4678.867dfae26694be02.js → 4678.9870fc2e3d7d1e5d.js} +1 -1
- package/.next-prod/static/chunks/5408-f7b9470b57c6690e.js +25 -0
- package/.next-prod/static/chunks/543-9c1455693df33cd1.js +15 -0
- package/.next-prod/static/chunks/{6729.77a5381ac8f5c9ae.js → 6729.582a7ca4e74b0aea.js} +1 -1
- package/.next-prod/static/chunks/6784-a155388d7e43ef3d.js +0 -0
- package/.next-prod/static/chunks/{7799.40b047a634f96a24.js → 7799.ada4812ac0884dcc.js} +1 -1
- package/.next-prod/static/chunks/{2502-fb8682bc7a61e04d.js → 7849-7c580c908fe21e9d.js} +2 -2
- package/.next-prod/static/chunks/{2160.e38d781fd5c4cde0.js → 9779.7a4ff1aee2a02f63.js} +1 -1
- package/.next-prod/static/chunks/app/_global-error/page-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/agent/test/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/stop/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/current-branch/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/health/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/preview/[...path]/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/push/public-key/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/push/subscribe/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/diff/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/snapshots/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/{layout-3781fa5b8e04f272.js → layout-b8d5256d3bf96b1e.js} +1 -1
- package/.next-prod/static/chunks/app/m/{page-bf48756850ebe349.js → page-149145e4714873de.js} +1 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/app/{page-e63d872a9af204ae.js → page-497c9c5c75bf40f2.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-e63d872a9af204ae.js → page-497c9c5c75bf40f2.js} +1 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-f265b8a7128b7a1a.js +1 -0
- package/.next-prod/static/chunks/webpack-798abcb0f340ce75.js +1 -0
- package/.next-prod/static/css/5b0dd8036a3ffc10.css +1 -0
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/preview/[...path]/route.ts +351 -0
- package/.next-prod/types/app/api/snapshots/diff/route.ts +351 -0
- package/.next-prod/types/app/api/snapshots/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +4 -1
- package/.next-prod/types/validator.ts +27 -0
- package/README.md +2 -0
- package/README.zh.md +2 -0
- package/dist/{chunk-GFI4IHYM.mjs → chunk-44DBCDDK.mjs} +615 -4
- package/dist/{chunk-IQXDXTI7.mjs → chunk-MNMFPTV4.mjs} +1 -1
- package/dist/{chunk-RJMSCVG5.mjs → chunk-TRQ4S2LT.mjs} +1 -1
- package/dist/httpApi.mjs +2 -2
- package/dist/scheduledTasks.mjs +111 -4
- package/dist/{server-K4DO2GUO.mjs → server-UDKNFSZE.mjs} +2 -2
- package/dist/wsServer.mjs +4 -4
- package/package.json +1 -1
- package/.next-prod/static/chunks/217-1bf54355c7c0c898.js +0 -15
- package/.next-prod/static/chunks/3283-80d4d836a00d7bb4.js +0 -25
- package/.next-prod/static/chunks/6784-11888818d8e3114e.js +0 -0
- package/.next-prod/static/chunks/app/_global-error/page-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/agent/test/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/bash/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/codex/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/pty-input/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/stop/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/current-branch/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/health/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/push/public-key/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/push/subscribe/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/push/unsubscribe/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-d7801a0008b8d59b.js +0 -1
- package/.next-prod/static/chunks/webpack-fb9d282647d95d0a.js +0 -1
- package/.next-prod/static/css/7ed891f30e531791.css +0 -1
- package/.next-prod/static/pibOtHY_hUMQlMPI6P_Mk/_buildManifest.js +0 -1
- /package/.next-prod/static/{pibOtHY_hUMQlMPI6P_Mk → c1JrZ4eVs2JR2ujEC_UrJ}/_ssgManifest.js +0 -0
|
@@ -28785,10 +28785,10 @@ var LoggerLivePretty = Layer_exports.mergeAll(
|
|
|
28785
28785
|
Logger_exports.minimumLogLevel(parseLevel(process.env.COCKPIT_LOG_LEVEL))
|
|
28786
28786
|
);
|
|
28787
28787
|
var appendLogFile = async (line, filePath) => {
|
|
28788
|
-
const { appendFile, mkdir:
|
|
28788
|
+
const { appendFile, mkdir: mkdir3 } = await import("fs/promises");
|
|
28789
28789
|
const { dirname } = await import("path");
|
|
28790
28790
|
try {
|
|
28791
|
-
await
|
|
28791
|
+
await mkdir3(dirname(filePath), { recursive: true });
|
|
28792
28792
|
await appendFile(filePath, line + "\n", "utf-8");
|
|
28793
28793
|
} catch {
|
|
28794
28794
|
}
|
|
@@ -28999,6 +28999,15 @@ var noOpenConfig = Config_exports.boolean("COCKPIT_NO_OPEN").pipe(
|
|
|
28999
28999
|
var logLevelConfig = Config_exports.string("COCKPIT_LOG_LEVEL").pipe(
|
|
29000
29000
|
Config_exports.withDefault("info")
|
|
29001
29001
|
);
|
|
29002
|
+
var snapshotKeepDaysConfig = Config_exports.integer("COCKPIT_SNAPSHOT_KEEP_DAYS").pipe(
|
|
29003
|
+
Config_exports.withDefault(7)
|
|
29004
|
+
);
|
|
29005
|
+
var snapshotRepoTtlDaysConfig = Config_exports.integer(
|
|
29006
|
+
"COCKPIT_SNAPSHOT_REPO_TTL_DAYS"
|
|
29007
|
+
).pipe(Config_exports.withDefault(30));
|
|
29008
|
+
var snapshotMaxFileKbConfig = Config_exports.integer(
|
|
29009
|
+
"COCKPIT_SNAPSHOT_MAX_FILE_KB"
|
|
29010
|
+
).pipe(Config_exports.withDefault(2048));
|
|
29002
29011
|
var CockpitConfig = Effect_exports.gen(
|
|
29003
29012
|
function* () {
|
|
29004
29013
|
const env = yield* envConfig;
|
|
@@ -29007,6 +29016,9 @@ var CockpitConfig = Effect_exports.gen(
|
|
|
29007
29016
|
const openProject = yield* openProjectConfig;
|
|
29008
29017
|
const noOpen = yield* noOpenConfig;
|
|
29009
29018
|
const logLevel3 = yield* logLevelConfig;
|
|
29019
|
+
const snapshotKeepDays = yield* snapshotKeepDaysConfig;
|
|
29020
|
+
const snapshotRepoTtlDays = yield* snapshotRepoTtlDaysConfig;
|
|
29021
|
+
const snapshotMaxFileKb = yield* snapshotMaxFileKbConfig;
|
|
29010
29022
|
const cockpitDir = yield* Effect_exports.sync(() => {
|
|
29011
29023
|
const env2 = typeof process !== "undefined" ? process.env : void 0;
|
|
29012
29024
|
const home = env2?.HOME || env2?.USERPROFILE || ".";
|
|
@@ -29024,7 +29036,10 @@ var CockpitConfig = Effect_exports.gen(
|
|
|
29024
29036
|
openProject,
|
|
29025
29037
|
openBrowser: !noOpen,
|
|
29026
29038
|
logLevel: logLevel3,
|
|
29027
|
-
logFile
|
|
29039
|
+
logFile,
|
|
29040
|
+
snapshotKeepDays,
|
|
29041
|
+
snapshotRepoTtlDays,
|
|
29042
|
+
snapshotMaxFileKb
|
|
29028
29043
|
};
|
|
29029
29044
|
}
|
|
29030
29045
|
).pipe(Effect_exports.orDie);
|
|
@@ -29078,6 +29093,11 @@ var AgentService = Context_exports.GenericTag("@cockpit/AgentService");
|
|
|
29078
29093
|
// packages/shared/effect-services/src/scheduler.ts
|
|
29079
29094
|
var Scheduler = Context_exports.GenericTag("@cockpit/Scheduler");
|
|
29080
29095
|
|
|
29096
|
+
// packages/shared/effect-services/src/snapshot.ts
|
|
29097
|
+
var SnapshotService = Context_exports.GenericTag(
|
|
29098
|
+
"@cockpit/SnapshotService"
|
|
29099
|
+
);
|
|
29100
|
+
|
|
29081
29101
|
// packages/feature/console/src/effect/pgLive.ts
|
|
29082
29102
|
var { Pool } = pg;
|
|
29083
29103
|
var handleAsync = (op, f) => Effect_exports.tryPromise({
|
|
@@ -29864,6 +29884,592 @@ var AgentServiceLive = Layer_exports.succeed(
|
|
|
29864
29884
|
})
|
|
29865
29885
|
);
|
|
29866
29886
|
|
|
29887
|
+
// packages/feature/agent/src/effect/snapshotLive.ts
|
|
29888
|
+
import { execFile } from "child_process";
|
|
29889
|
+
import { createHash } from "crypto";
|
|
29890
|
+
import { mkdir as mkdir2, readFile as readFile2, writeFile as writeFile2, readdir, rm, stat, rename } from "fs/promises";
|
|
29891
|
+
import { basename, join as join5, isAbsolute, relative } from "path";
|
|
29892
|
+
var BUILTIN_EXCLUDES = [
|
|
29893
|
+
".git/",
|
|
29894
|
+
"node_modules/",
|
|
29895
|
+
".next/",
|
|
29896
|
+
"dist/",
|
|
29897
|
+
"build/",
|
|
29898
|
+
"out/",
|
|
29899
|
+
"coverage/",
|
|
29900
|
+
".turbo/",
|
|
29901
|
+
".cache/",
|
|
29902
|
+
"__pycache__/",
|
|
29903
|
+
".venv/",
|
|
29904
|
+
"venv/",
|
|
29905
|
+
"target/",
|
|
29906
|
+
"*.log",
|
|
29907
|
+
".DS_Store",
|
|
29908
|
+
// Common secrets — must never be copied into the shadow repo, even for
|
|
29909
|
+
// projects without a .gitignore (snapshots live outside the project dir
|
|
29910
|
+
// and are retained for up to 30 days).
|
|
29911
|
+
".env",
|
|
29912
|
+
".env.*",
|
|
29913
|
+
"*.pem",
|
|
29914
|
+
"*.p12",
|
|
29915
|
+
"id_rsa*",
|
|
29916
|
+
"id_ed25519*"
|
|
29917
|
+
];
|
|
29918
|
+
var MAX_CHANGED_FILES = 5e4;
|
|
29919
|
+
var MAX_TOTAL_BYTES = 1024 * 1024 * 1024;
|
|
29920
|
+
var GUARD_BACKOFF_MS = 6 * 3600 * 1e3;
|
|
29921
|
+
var MAX_DIFF_CONTENT_BYTES = 500 * 1024;
|
|
29922
|
+
var MAX_DIFF_FILES = 200;
|
|
29923
|
+
var EMPTY_TREE = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
|
29924
|
+
var sanitizeName = (name) => name.replace(/[^a-zA-Z0-9_-]/g, "_").slice(0, 32) || "project";
|
|
29925
|
+
var snapshotRepoDirName = (cwd, full = false) => {
|
|
29926
|
+
const hex = createHash("sha256").update(cwd, "utf8").digest("hex");
|
|
29927
|
+
return `${sanitizeName(basename(cwd))}-${full ? hex : hex.slice(0, 12)}`;
|
|
29928
|
+
};
|
|
29929
|
+
var localDay = (d) => {
|
|
29930
|
+
const y = d.getFullYear();
|
|
29931
|
+
const m = String(d.getMonth() + 1).padStart(2, "0");
|
|
29932
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
29933
|
+
return `${y}-${m}-${day}`;
|
|
29934
|
+
};
|
|
29935
|
+
var toRelative = (cwd, p) => {
|
|
29936
|
+
if (!isAbsolute(p)) return p;
|
|
29937
|
+
const rel = relative(cwd, p);
|
|
29938
|
+
return rel && !rel.startsWith("..") ? rel : p;
|
|
29939
|
+
};
|
|
29940
|
+
var parseTrailers = (body) => {
|
|
29941
|
+
const out = {};
|
|
29942
|
+
for (const line of body.split("\n")) {
|
|
29943
|
+
const m = /^Cockpit-([A-Za-z-]+):\s*(.*)$/.exec(line);
|
|
29944
|
+
if (m) out[m[1]] = m[2];
|
|
29945
|
+
}
|
|
29946
|
+
return out;
|
|
29947
|
+
};
|
|
29948
|
+
var commitFromLogRecord = (record) => {
|
|
29949
|
+
const [hash2, parents, ts, ...bodyParts] = record.split("");
|
|
29950
|
+
if (!hash2) return null;
|
|
29951
|
+
const body = bodyParts.join("");
|
|
29952
|
+
const trailers = parseTrailers(body);
|
|
29953
|
+
let toolFiles = [];
|
|
29954
|
+
if (trailers["Tool-Files"]) {
|
|
29955
|
+
try {
|
|
29956
|
+
const parsed = JSON.parse(trailers["Tool-Files"]);
|
|
29957
|
+
if (Array.isArray(parsed)) toolFiles = parsed.filter((x) => typeof x === "string");
|
|
29958
|
+
} catch {
|
|
29959
|
+
toolFiles = [];
|
|
29960
|
+
}
|
|
29961
|
+
}
|
|
29962
|
+
return {
|
|
29963
|
+
hash: hash2,
|
|
29964
|
+
parent: parents ? parents.split(" ")[0] : null,
|
|
29965
|
+
timestamp: Number(ts) || 0,
|
|
29966
|
+
subject: body.split("\n")[0] ?? "",
|
|
29967
|
+
sessionKey: trailers["Session"] ?? null,
|
|
29968
|
+
toolId: trailers["Tool-Id"] ?? null,
|
|
29969
|
+
toolName: trailers["Tool"] ?? null,
|
|
29970
|
+
toolFiles,
|
|
29971
|
+
provider: trailers["Provider"] ?? null,
|
|
29972
|
+
baseline: trailers["Kind"] === "baseline"
|
|
29973
|
+
};
|
|
29974
|
+
};
|
|
29975
|
+
var runGit = (repoDir, workTree, args2, input) => Effect_exports.tryPromise({
|
|
29976
|
+
try: () => new Promise((resolve2) => {
|
|
29977
|
+
const child = execFile(
|
|
29978
|
+
"git",
|
|
29979
|
+
args2,
|
|
29980
|
+
{
|
|
29981
|
+
env: {
|
|
29982
|
+
...process.env,
|
|
29983
|
+
GIT_DIR: repoDir,
|
|
29984
|
+
...workTree ? { GIT_WORK_TREE: workTree } : {},
|
|
29985
|
+
GIT_TERMINAL_PROMPT: "0",
|
|
29986
|
+
// Error-message matching ("nothing to commit") relies on English output.
|
|
29987
|
+
LC_ALL: "C",
|
|
29988
|
+
// The shadow repo must not inherit the user's global index tweaks.
|
|
29989
|
+
GIT_INDEX_FILE: join5(repoDir, "index")
|
|
29990
|
+
},
|
|
29991
|
+
cwd: workTree ?? repoDir,
|
|
29992
|
+
maxBuffer: 64 * 1024 * 1024
|
|
29993
|
+
},
|
|
29994
|
+
(error, stdout, stderr) => {
|
|
29995
|
+
const raw = error?.code;
|
|
29996
|
+
const code = error ? typeof raw === "number" ? raw : 1 : 0;
|
|
29997
|
+
resolve2({ code, stdout: String(stdout), stderr: String(stderr) });
|
|
29998
|
+
}
|
|
29999
|
+
);
|
|
30000
|
+
if (input !== void 0) child.stdin?.end(input);
|
|
30001
|
+
}),
|
|
30002
|
+
catch: (cause3) => new AppError({ message: `git ${args2[0]} spawn failed`, cause: cause3 })
|
|
30003
|
+
});
|
|
30004
|
+
var runGitOk = (repoDir, workTree, args2, input) => runGit(repoDir, workTree, args2, input).pipe(
|
|
30005
|
+
Effect_exports.filterOrFail(
|
|
30006
|
+
(r) => r.code === 0,
|
|
30007
|
+
(r) => new AppError({
|
|
30008
|
+
message: `git ${args2.join(" ")} exited ${r.code}: ${r.stderr.slice(0, 400)}`
|
|
30009
|
+
})
|
|
30010
|
+
)
|
|
30011
|
+
);
|
|
30012
|
+
var gSem = globalThis;
|
|
30013
|
+
var semaphores = gSem.__cockpitSnapshotSemaphores ?? (gSem.__cockpitSnapshotSemaphores = /* @__PURE__ */ new Map());
|
|
30014
|
+
var withRepoLock = (repoDir, effect4) => {
|
|
30015
|
+
let sem = semaphores.get(repoDir);
|
|
30016
|
+
if (!sem) {
|
|
30017
|
+
sem = Effect_exports.unsafeMakeSemaphore(1);
|
|
30018
|
+
semaphores.set(repoDir, sem);
|
|
30019
|
+
}
|
|
30020
|
+
return sem.withPermits(1)(effect4);
|
|
30021
|
+
};
|
|
30022
|
+
var fsTry = (op, fn2) => Effect_exports.tryPromise({
|
|
30023
|
+
try: fn2,
|
|
30024
|
+
catch: (cause3) => new AppError({ message: `snapshot fs ${op} failed`, cause: cause3 })
|
|
30025
|
+
});
|
|
30026
|
+
var readMetaState = (repoDir) => Effect_exports.tryPromise({
|
|
30027
|
+
try: async () => {
|
|
30028
|
+
let raw;
|
|
30029
|
+
try {
|
|
30030
|
+
raw = await readFile2(join5(repoDir, "meta.json"), "utf8");
|
|
30031
|
+
} catch {
|
|
30032
|
+
return { state: "missing", meta: null };
|
|
30033
|
+
}
|
|
30034
|
+
try {
|
|
30035
|
+
return { state: "ok", meta: JSON.parse(raw) };
|
|
30036
|
+
} catch {
|
|
30037
|
+
return { state: "corrupt", meta: null };
|
|
30038
|
+
}
|
|
30039
|
+
},
|
|
30040
|
+
catch: () => new AppError({ message: "unreachable" })
|
|
30041
|
+
}).pipe(Effect_exports.orElseSucceed(() => ({ state: "missing", meta: null })));
|
|
30042
|
+
var readMeta = (repoDir) => readMetaState(repoDir).pipe(Effect_exports.map((s) => s.meta));
|
|
30043
|
+
var writeMeta = (repoDir, meta) => fsTry("write meta", async () => {
|
|
30044
|
+
const tmp = join5(repoDir, "meta.json.tmp");
|
|
30045
|
+
await writeFile2(tmp, JSON.stringify(meta, null, 2), "utf8");
|
|
30046
|
+
await rename(tmp, join5(repoDir, "meta.json"));
|
|
30047
|
+
});
|
|
30048
|
+
var gPending = globalThis;
|
|
30049
|
+
var pendingRecords = gPending.__cockpitSnapshotPendingRecords ?? (gPending.__cockpitSnapshotPendingRecords = /* @__PURE__ */ new Map());
|
|
30050
|
+
var notePendingRecord = (cwd) => {
|
|
30051
|
+
pendingRecords.set(cwd, (pendingRecords.get(cwd) ?? 0) + 1);
|
|
30052
|
+
};
|
|
30053
|
+
var settlePendingRecord = (cwd) => {
|
|
30054
|
+
const n = (pendingRecords.get(cwd) ?? 1) - 1;
|
|
30055
|
+
if (n <= 0) pendingRecords.delete(cwd);
|
|
30056
|
+
else pendingRecords.set(cwd, n);
|
|
30057
|
+
};
|
|
30058
|
+
var pendingRecordCount = (cwd) => pendingRecords.get(cwd) ?? 0;
|
|
30059
|
+
var resolveRepoDir = (snapshotsRoot, cwd) => Effect_exports.gen(function* () {
|
|
30060
|
+
const short = join5(snapshotsRoot, snapshotRepoDirName(cwd));
|
|
30061
|
+
const meta = yield* readMeta(short);
|
|
30062
|
+
if (meta && meta.cwd !== cwd) {
|
|
30063
|
+
yield* Effect_exports.logWarning(
|
|
30064
|
+
`snapshot repo hash collision: ${short} belongs to ${meta.cwd}; using full-hash dir for ${cwd}`
|
|
30065
|
+
);
|
|
30066
|
+
return join5(snapshotsRoot, snapshotRepoDirName(cwd, true));
|
|
30067
|
+
}
|
|
30068
|
+
return short;
|
|
30069
|
+
});
|
|
30070
|
+
var ensureRepo = (repoDir, cwd) => Effect_exports.gen(function* () {
|
|
30071
|
+
const headExists = yield* fsTry(
|
|
30072
|
+
"stat HEAD",
|
|
30073
|
+
() => stat(join5(repoDir, "HEAD")).then(() => true)
|
|
30074
|
+
).pipe(Effect_exports.orElseSucceed(() => false));
|
|
30075
|
+
if (headExists) return;
|
|
30076
|
+
yield* fsTry("mkdir", () => mkdir2(repoDir, { recursive: true }));
|
|
30077
|
+
yield* runGitOk(repoDir, null, ["init", "--quiet", "--bare", repoDir]);
|
|
30078
|
+
const configs = [
|
|
30079
|
+
["core.bare", "false"],
|
|
30080
|
+
["core.logAllRefUpdates", "false"],
|
|
30081
|
+
["gc.auto", "0"],
|
|
30082
|
+
["user.name", "cockpit-snapshot"],
|
|
30083
|
+
["user.email", "snapshot@cockpit.local"],
|
|
30084
|
+
["commit.gpgsign", "false"]
|
|
30085
|
+
];
|
|
30086
|
+
for (const [k, v] of configs) {
|
|
30087
|
+
yield* runGitOk(repoDir, null, ["config", k, v]);
|
|
30088
|
+
}
|
|
30089
|
+
yield* fsTry(
|
|
30090
|
+
"write exclude",
|
|
30091
|
+
() => writeFile2(join5(repoDir, "info", "exclude"), BUILTIN_EXCLUDES.join("\n") + "\n", "utf8")
|
|
30092
|
+
);
|
|
30093
|
+
const now = Date.now();
|
|
30094
|
+
yield* writeMeta(repoDir, { cwd, createdAt: now, lastSnapshotAt: now });
|
|
30095
|
+
});
|
|
30096
|
+
var ensureDayBranch = (repoDir, cwd, day) => Effect_exports.gen(function* () {
|
|
30097
|
+
const branch = `refs/heads/snap/${day}`;
|
|
30098
|
+
const exists5 = yield* runGit(repoDir, cwd, ["rev-parse", "--quiet", "--verify", branch]);
|
|
30099
|
+
if (exists5.code !== 0) {
|
|
30100
|
+
const branches = yield* runGitOk(repoDir, cwd, [
|
|
30101
|
+
"for-each-ref",
|
|
30102
|
+
"--sort=refname",
|
|
30103
|
+
"--format=%(refname:short)",
|
|
30104
|
+
"refs/heads/snap/"
|
|
30105
|
+
]);
|
|
30106
|
+
const latest = branches.stdout.trim().split("\n").filter(Boolean).pop();
|
|
30107
|
+
if (latest) {
|
|
30108
|
+
const root = yield* runGitOk(repoDir, cwd, [
|
|
30109
|
+
"commit-tree",
|
|
30110
|
+
`${latest}^{tree}`,
|
|
30111
|
+
"-m",
|
|
30112
|
+
`baseline (rollover from ${latest})
|
|
30113
|
+
|
|
30114
|
+
Cockpit-Kind: baseline`
|
|
30115
|
+
]);
|
|
30116
|
+
yield* runGitOk(repoDir, cwd, ["branch", `snap/${day}`, root.stdout.trim()]);
|
|
30117
|
+
}
|
|
30118
|
+
}
|
|
30119
|
+
yield* runGitOk(repoDir, cwd, ["symbolic-ref", "HEAD", branch]);
|
|
30120
|
+
});
|
|
30121
|
+
var sanitizeSubject = (s) => s.replace(/[\u0000-\u001f\u007f]+/g, " ").replace(/\s+/g, " ").trim().slice(0, 80);
|
|
30122
|
+
var buildCommitMessage = (trigger, relFiles, kind) => {
|
|
30123
|
+
const detail = relFiles.length > 0 ? relFiles.length === 1 ? relFiles[0] : `${relFiles[0]} +${relFiles.length - 1}` : trigger.toolDetail ?? "";
|
|
30124
|
+
const subject = kind === "baseline" ? "baseline" : sanitizeSubject(`[${trigger.toolName ?? "tool"}] ${detail}`);
|
|
30125
|
+
const trailers = [
|
|
30126
|
+
`Cockpit-Kind: ${kind}`,
|
|
30127
|
+
`Cockpit-Session: ${trigger.sessionKey}`,
|
|
30128
|
+
`Cockpit-Provider: ${trigger.provider}`,
|
|
30129
|
+
...trigger.toolId ? [`Cockpit-Tool-Id: ${trigger.toolId}`] : [],
|
|
30130
|
+
...trigger.toolName ? [`Cockpit-Tool: ${trigger.toolName}`] : [],
|
|
30131
|
+
...relFiles.length ? [`Cockpit-Tool-Files: ${JSON.stringify(relFiles)}`] : []
|
|
30132
|
+
];
|
|
30133
|
+
return `${subject}
|
|
30134
|
+
|
|
30135
|
+
${trailers.join("\n")}`;
|
|
30136
|
+
};
|
|
30137
|
+
var snapshotOnce = (snapshotsRoot, maxFileBytes, trigger, kind) => Effect_exports.gen(function* () {
|
|
30138
|
+
const cwd = trigger.cwd;
|
|
30139
|
+
const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
|
|
30140
|
+
const skip = { committed: false };
|
|
30141
|
+
if (kind === "baseline" && pendingRecordCount(cwd) > 0) return skip;
|
|
30142
|
+
const tripGuard = (reason) => Effect_exports.gen(function* () {
|
|
30143
|
+
yield* Effect_exports.logWarning(`snapshot suspended for ${GUARD_BACKOFF_MS / 36e5}h: ${reason} \u2014 check .gitignore of ${cwd}`);
|
|
30144
|
+
const meta = yield* readMeta(repoDir);
|
|
30145
|
+
yield* writeMeta(repoDir, {
|
|
30146
|
+
cwd,
|
|
30147
|
+
createdAt: meta?.createdAt ?? Date.now(),
|
|
30148
|
+
lastSnapshotAt: meta?.lastSnapshotAt ?? Date.now(),
|
|
30149
|
+
guardTrippedAt: Date.now()
|
|
30150
|
+
});
|
|
30151
|
+
return skip;
|
|
30152
|
+
});
|
|
30153
|
+
const stageOnce = Effect_exports.gen(function* () {
|
|
30154
|
+
const status3 = yield* runGitOk(repoDir, cwd, [
|
|
30155
|
+
"status",
|
|
30156
|
+
"--porcelain",
|
|
30157
|
+
"-z",
|
|
30158
|
+
"-uall",
|
|
30159
|
+
"--no-renames"
|
|
30160
|
+
]);
|
|
30161
|
+
const entries2 = status3.stdout.split("\0").filter(Boolean);
|
|
30162
|
+
if (entries2.length === 0) return { staged: false };
|
|
30163
|
+
if (entries2.length > MAX_CHANGED_FILES) {
|
|
30164
|
+
yield* tripGuard(`${entries2.length} changed files exceeds ${MAX_CHANGED_FILES}`);
|
|
30165
|
+
return { staged: false };
|
|
30166
|
+
}
|
|
30167
|
+
const changedPaths = entries2.map((e) => e.slice(3)).filter(Boolean);
|
|
30168
|
+
const sizes = yield* Effect_exports.all(
|
|
30169
|
+
changedPaths.map(
|
|
30170
|
+
(p) => fsTry("stat", () => stat(join5(cwd, p)).then((s) => s.isFile() ? s.size : 0)).pipe(
|
|
30171
|
+
// Deleted files fail the stat → size 0 (they must stay included).
|
|
30172
|
+
Effect_exports.orElseSucceed(() => 0)
|
|
30173
|
+
)
|
|
30174
|
+
),
|
|
30175
|
+
{ concurrency: 16 }
|
|
30176
|
+
);
|
|
30177
|
+
const included = [];
|
|
30178
|
+
let totalBytes = 0;
|
|
30179
|
+
for (let i = 0; i < changedPaths.length; i++) {
|
|
30180
|
+
if (sizes[i] > maxFileBytes) continue;
|
|
30181
|
+
included.push(changedPaths[i]);
|
|
30182
|
+
totalBytes += sizes[i];
|
|
30183
|
+
}
|
|
30184
|
+
if (totalBytes > MAX_TOTAL_BYTES) {
|
|
30185
|
+
yield* tripGuard(`${Math.round(totalBytes / 1048576)}MB of changes exceeds ${Math.round(MAX_TOTAL_BYTES / 1048576)}MB`);
|
|
30186
|
+
return { staged: false };
|
|
30187
|
+
}
|
|
30188
|
+
if (included.length === 0) return { staged: false };
|
|
30189
|
+
const pathspec = included.map((p) => `:(literal)${p}`).join("\0");
|
|
30190
|
+
yield* runGitOk(
|
|
30191
|
+
repoDir,
|
|
30192
|
+
cwd,
|
|
30193
|
+
["add", "-A", "--pathspec-from-file=-", "--pathspec-file-nul"],
|
|
30194
|
+
pathspec
|
|
30195
|
+
);
|
|
30196
|
+
return { staged: true };
|
|
30197
|
+
});
|
|
30198
|
+
return yield* withRepoLock(
|
|
30199
|
+
repoDir,
|
|
30200
|
+
Effect_exports.gen(function* () {
|
|
30201
|
+
if (kind === "baseline" && pendingRecordCount(cwd) > 0) {
|
|
30202
|
+
return skip;
|
|
30203
|
+
}
|
|
30204
|
+
yield* ensureRepo(repoDir, cwd);
|
|
30205
|
+
const metaBefore = yield* readMeta(repoDir);
|
|
30206
|
+
if (metaBefore?.guardTrippedAt && Date.now() - metaBefore.guardTrippedAt < GUARD_BACKOFF_MS) {
|
|
30207
|
+
return skip;
|
|
30208
|
+
}
|
|
30209
|
+
yield* ensureDayBranch(repoDir, cwd, localDay(/* @__PURE__ */ new Date()));
|
|
30210
|
+
const stage = yield* stageOnce.pipe(Effect_exports.retry({ times: 1 }));
|
|
30211
|
+
if (!stage.staged) return skip;
|
|
30212
|
+
const relFiles = (trigger.toolFiles ?? []).map((f) => toRelative(cwd, f));
|
|
30213
|
+
const msg = buildCommitMessage(trigger, relFiles, kind);
|
|
30214
|
+
const commit3 = yield* runGit(repoDir, cwd, ["commit", "--quiet", "--no-verify", "-m", msg]);
|
|
30215
|
+
if (commit3.code !== 0) {
|
|
30216
|
+
const benign = /nothing to commit|nothing added to commit/.test(commit3.stdout + commit3.stderr);
|
|
30217
|
+
if (!benign) {
|
|
30218
|
+
return yield* Effect_exports.fail(
|
|
30219
|
+
new AppError({ message: `git commit failed: ${(commit3.stderr || commit3.stdout).slice(0, 400)}` })
|
|
30220
|
+
);
|
|
30221
|
+
}
|
|
30222
|
+
return skip;
|
|
30223
|
+
}
|
|
30224
|
+
const head6 = yield* runGitOk(repoDir, cwd, ["rev-parse", "HEAD"]);
|
|
30225
|
+
const meta = yield* readMeta(repoDir);
|
|
30226
|
+
yield* writeMeta(repoDir, {
|
|
30227
|
+
cwd,
|
|
30228
|
+
createdAt: meta?.createdAt ?? Date.now(),
|
|
30229
|
+
lastSnapshotAt: Date.now()
|
|
30230
|
+
});
|
|
30231
|
+
return { committed: true, hash: head6.stdout.trim() };
|
|
30232
|
+
})
|
|
30233
|
+
);
|
|
30234
|
+
}).pipe(
|
|
30235
|
+
Effect_exports.withSpan("snapshot.record", {
|
|
30236
|
+
attributes: { cwd: trigger.cwd, tool: trigger.toolName ?? kind }
|
|
30237
|
+
})
|
|
30238
|
+
);
|
|
30239
|
+
var listByToolIdsImpl = (snapshotsRoot, cwd, toolIds) => Effect_exports.gen(function* () {
|
|
30240
|
+
if (toolIds.length === 0) return [];
|
|
30241
|
+
const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
|
|
30242
|
+
const headExists = yield* fsTry(
|
|
30243
|
+
"stat HEAD",
|
|
30244
|
+
() => stat(join5(repoDir, "HEAD")).then(() => true)
|
|
30245
|
+
).pipe(Effect_exports.orElseSucceed(() => false));
|
|
30246
|
+
if (!headExists) return [];
|
|
30247
|
+
const log3 = yield* runGit(repoDir, cwd, [
|
|
30248
|
+
"log",
|
|
30249
|
+
"--all",
|
|
30250
|
+
"--date-order",
|
|
30251
|
+
"--reverse",
|
|
30252
|
+
"--format=%x1e%H%x1f%P%x1f%ct%x1f%B"
|
|
30253
|
+
]);
|
|
30254
|
+
if (log3.code !== 0) return [];
|
|
30255
|
+
const wanted = new Set(toolIds);
|
|
30256
|
+
return log3.stdout.split("").filter(Boolean).map(commitFromLogRecord).filter((c) => !!c && !!c.toolId && wanted.has(c.toolId));
|
|
30257
|
+
}).pipe(Effect_exports.withSpan("snapshot.listByToolIds", { attributes: { cwd } }));
|
|
30258
|
+
var showFile = (repoDir, cwd, rev, path) => runGit(repoDir, cwd, ["show", `${rev}:${path}`]).pipe(
|
|
30259
|
+
Effect_exports.map((r) => r.code === 0 ? r.stdout : null),
|
|
30260
|
+
Effect_exports.orElseSucceed(() => null)
|
|
30261
|
+
);
|
|
30262
|
+
var diffImpl = (snapshotsRoot, cwd, commitHash) => Effect_exports.gen(function* () {
|
|
30263
|
+
if (!/^[0-9a-f]{6,40}$/i.test(commitHash)) {
|
|
30264
|
+
return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "invalid commit hash" }));
|
|
30265
|
+
}
|
|
30266
|
+
const repoDir = yield* resolveRepoDir(snapshotsRoot, cwd);
|
|
30267
|
+
const repoExists = yield* fsTry(
|
|
30268
|
+
"stat HEAD",
|
|
30269
|
+
() => stat(join5(repoDir, "HEAD")).then(() => true)
|
|
30270
|
+
).pipe(Effect_exports.orElseSucceed(() => false));
|
|
30271
|
+
if (!repoExists) {
|
|
30272
|
+
return yield* Effect_exports.fail(new NotFoundError({ resource: "snapshot-repo", id: cwd }));
|
|
30273
|
+
}
|
|
30274
|
+
const log3 = yield* runGitOk(repoDir, cwd, [
|
|
30275
|
+
"log",
|
|
30276
|
+
"-1",
|
|
30277
|
+
"--format=%x1e%H%x1f%P%x1f%ct%x1f%B",
|
|
30278
|
+
commitHash
|
|
30279
|
+
]);
|
|
30280
|
+
const commit3 = commitFromLogRecord(log3.stdout.split("").filter(Boolean)[0] ?? "");
|
|
30281
|
+
if (!commit3) {
|
|
30282
|
+
return yield* Effect_exports.fail(new ValidationError({ field: "commit", reason: "commit not found" }));
|
|
30283
|
+
}
|
|
30284
|
+
const base = commit3.parent ?? EMPTY_TREE;
|
|
30285
|
+
const nameStatus = yield* runGitOk(repoDir, cwd, [
|
|
30286
|
+
"diff-tree",
|
|
30287
|
+
"-r",
|
|
30288
|
+
"-z",
|
|
30289
|
+
"--no-renames",
|
|
30290
|
+
"--name-status",
|
|
30291
|
+
base,
|
|
30292
|
+
commit3.hash
|
|
30293
|
+
]);
|
|
30294
|
+
const numstat = yield* runGitOk(repoDir, cwd, [
|
|
30295
|
+
"diff-tree",
|
|
30296
|
+
"-r",
|
|
30297
|
+
"-z",
|
|
30298
|
+
"--no-renames",
|
|
30299
|
+
"--numstat",
|
|
30300
|
+
base,
|
|
30301
|
+
commit3.hash
|
|
30302
|
+
]);
|
|
30303
|
+
const binarySet = /* @__PURE__ */ new Set();
|
|
30304
|
+
const lineStats = /* @__PURE__ */ new Map();
|
|
30305
|
+
{
|
|
30306
|
+
const parts2 = numstat.stdout.split("\0").filter(Boolean);
|
|
30307
|
+
for (const row of parts2) {
|
|
30308
|
+
const m = /^(\S+)\t(\S+)\t([^]*)$/.exec(row);
|
|
30309
|
+
if (!m) continue;
|
|
30310
|
+
if (m[1] === "-" || m[2] === "-") binarySet.add(m[3]);
|
|
30311
|
+
else lineStats.set(m[3], { additions: Number(m[1]) || 0, deletions: Number(m[2]) || 0 });
|
|
30312
|
+
}
|
|
30313
|
+
}
|
|
30314
|
+
const tokens = nameStatus.stdout.split("\0").filter(Boolean);
|
|
30315
|
+
const files = [];
|
|
30316
|
+
for (let i = 0; i + 1 < tokens.length && files.length < MAX_DIFF_FILES; i += 2) {
|
|
30317
|
+
const st = tokens[i];
|
|
30318
|
+
const path = tokens[i + 1];
|
|
30319
|
+
const status3 = st === "A" ? "added" : st === "D" ? "deleted" : "modified";
|
|
30320
|
+
const binary = binarySet.has(path);
|
|
30321
|
+
let oldContent = null;
|
|
30322
|
+
let newContent = null;
|
|
30323
|
+
if (!binary) {
|
|
30324
|
+
if (status3 !== "added") oldContent = yield* showFile(repoDir, cwd, base, path);
|
|
30325
|
+
if (status3 !== "deleted") newContent = yield* showFile(repoDir, cwd, commit3.hash, path);
|
|
30326
|
+
if ((oldContent?.length ?? 0) > MAX_DIFF_CONTENT_BYTES || (newContent?.length ?? 0) > MAX_DIFF_CONTENT_BYTES) {
|
|
30327
|
+
oldContent = null;
|
|
30328
|
+
newContent = null;
|
|
30329
|
+
}
|
|
30330
|
+
}
|
|
30331
|
+
const stats = lineStats.get(path);
|
|
30332
|
+
files.push({
|
|
30333
|
+
path,
|
|
30334
|
+
status: status3,
|
|
30335
|
+
binary,
|
|
30336
|
+
additions: stats?.additions ?? 0,
|
|
30337
|
+
deletions: stats?.deletions ?? 0,
|
|
30338
|
+
oldContent,
|
|
30339
|
+
newContent
|
|
30340
|
+
});
|
|
30341
|
+
}
|
|
30342
|
+
const truncated = tokens.length / 2 > files.length;
|
|
30343
|
+
return { commit: commit3, files, truncated };
|
|
30344
|
+
}).pipe(Effect_exports.withSpan("snapshot.diff", { attributes: { cwd, commit: commitHash } }));
|
|
30345
|
+
var cleanupImpl = (snapshotsRoot, keepDays, repoTtlDays) => Effect_exports.gen(function* () {
|
|
30346
|
+
const dirs = yield* fsTry("readdir", () => readdir(snapshotsRoot)).pipe(
|
|
30347
|
+
Effect_exports.orElseSucceed(() => [])
|
|
30348
|
+
);
|
|
30349
|
+
const now = Date.now();
|
|
30350
|
+
const dayCutoff = localDay(new Date(now - (keepDays - 1) * 24 * 3600 * 1e3));
|
|
30351
|
+
const isStale = (repoDir) => Effect_exports.gen(function* () {
|
|
30352
|
+
const { state, meta } = yield* readMetaState(repoDir);
|
|
30353
|
+
if (state === "corrupt") return "corrupt";
|
|
30354
|
+
if (state === "missing") {
|
|
30355
|
+
const mtime = yield* fsTry("stat dir", () => stat(repoDir).then((s) => s.mtimeMs)).pipe(
|
|
30356
|
+
Effect_exports.orElseSucceed(() => now)
|
|
30357
|
+
);
|
|
30358
|
+
return mtime < now - repoTtlDays * 24 * 3600 * 1e3 ? "stale" : "keep";
|
|
30359
|
+
}
|
|
30360
|
+
const m = meta;
|
|
30361
|
+
const cwdGone = !(yield* fsTry(
|
|
30362
|
+
"stat cwd",
|
|
30363
|
+
() => stat(m.cwd).then((s) => s.isDirectory())
|
|
30364
|
+
).pipe(Effect_exports.orElseSucceed(() => false)));
|
|
30365
|
+
return m.lastSnapshotAt < now - repoTtlDays * 24 * 3600 * 1e3 || cwdGone ? "stale" : "keep";
|
|
30366
|
+
});
|
|
30367
|
+
const headExists = (repoDir) => fsTry("stat HEAD", () => stat(join5(repoDir, "HEAD")).then(() => true)).pipe(
|
|
30368
|
+
Effect_exports.orElseSucceed(() => false)
|
|
30369
|
+
);
|
|
30370
|
+
for (const name of dirs) {
|
|
30371
|
+
const repoDir = join5(snapshotsRoot, name);
|
|
30372
|
+
const isDir = yield* fsTry("stat dir", () => stat(repoDir).then((s) => s.isDirectory())).pipe(
|
|
30373
|
+
Effect_exports.orElseSucceed(() => false)
|
|
30374
|
+
);
|
|
30375
|
+
if (!isDir) continue;
|
|
30376
|
+
if (!(yield* headExists(repoDir))) {
|
|
30377
|
+
yield* withRepoLock(
|
|
30378
|
+
repoDir,
|
|
30379
|
+
Effect_exports.gen(function* () {
|
|
30380
|
+
if (yield* headExists(repoDir)) return;
|
|
30381
|
+
yield* Effect_exports.logInfo(`snapshot cleanup: removing debris dir ${name}`);
|
|
30382
|
+
yield* fsTry("rm debris", () => rm(repoDir, { recursive: true, force: true })).pipe(
|
|
30383
|
+
Effect_exports.orElseSucceed(() => void 0)
|
|
30384
|
+
);
|
|
30385
|
+
})
|
|
30386
|
+
);
|
|
30387
|
+
continue;
|
|
30388
|
+
}
|
|
30389
|
+
const verdict = yield* isStale(repoDir);
|
|
30390
|
+
if (verdict === "corrupt") {
|
|
30391
|
+
yield* Effect_exports.logWarning(
|
|
30392
|
+
`snapshot cleanup: ${name} has an unreadable meta.json \u2014 keeping repo (refusing to delete on corrupt metadata)`
|
|
30393
|
+
);
|
|
30394
|
+
continue;
|
|
30395
|
+
}
|
|
30396
|
+
if (verdict === "stale") {
|
|
30397
|
+
yield* withRepoLock(
|
|
30398
|
+
repoDir,
|
|
30399
|
+
Effect_exports.gen(function* () {
|
|
30400
|
+
if ((yield* isStale(repoDir)) !== "stale") return;
|
|
30401
|
+
yield* Effect_exports.logInfo(`snapshot cleanup: removing repo ${name} (stale or cwd gone)`);
|
|
30402
|
+
yield* fsTry("rm repo", () => rm(repoDir, { recursive: true, force: true })).pipe(
|
|
30403
|
+
Effect_exports.orElseSucceed(() => void 0)
|
|
30404
|
+
);
|
|
30405
|
+
})
|
|
30406
|
+
);
|
|
30407
|
+
continue;
|
|
30408
|
+
}
|
|
30409
|
+
const branches = yield* runGit(repoDir, null, [
|
|
30410
|
+
"for-each-ref",
|
|
30411
|
+
"--format=%(refname:short)",
|
|
30412
|
+
"refs/heads/snap/"
|
|
30413
|
+
]).pipe(Effect_exports.map((r) => r.code === 0 ? r.stdout.trim().split("\n").filter(Boolean) : []));
|
|
30414
|
+
const expired = branches.filter((b) => {
|
|
30415
|
+
const day = b.slice("snap/".length);
|
|
30416
|
+
return /^\d{4}-\d{2}-\d{2}$/.test(day) && day < dayCutoff;
|
|
30417
|
+
});
|
|
30418
|
+
if (expired.length > 0) {
|
|
30419
|
+
const dropped = yield* withRepoLock(
|
|
30420
|
+
repoDir,
|
|
30421
|
+
Effect_exports.gen(function* () {
|
|
30422
|
+
yield* runGitOk(repoDir, null, [
|
|
30423
|
+
"symbolic-ref",
|
|
30424
|
+
"HEAD",
|
|
30425
|
+
`refs/heads/snap/${localDay(/* @__PURE__ */ new Date())}`
|
|
30426
|
+
]);
|
|
30427
|
+
let ok = 0;
|
|
30428
|
+
for (const b of expired) {
|
|
30429
|
+
const r = yield* runGit(repoDir, null, ["branch", "-D", b]);
|
|
30430
|
+
if (r.code === 0) ok++;
|
|
30431
|
+
else {
|
|
30432
|
+
yield* Effect_exports.logWarning(
|
|
30433
|
+
`snapshot cleanup: failed to delete ${b} in ${name}: ${r.stderr.slice(0, 200)}`
|
|
30434
|
+
);
|
|
30435
|
+
}
|
|
30436
|
+
}
|
|
30437
|
+
if (ok > 0) {
|
|
30438
|
+
yield* runGit(repoDir, null, ["reflog", "expire", "--expire=now", "--all"]);
|
|
30439
|
+
yield* runGit(repoDir, null, ["gc", "--prune=now", "--quiet"]);
|
|
30440
|
+
}
|
|
30441
|
+
return ok;
|
|
30442
|
+
})
|
|
30443
|
+
);
|
|
30444
|
+
yield* Effect_exports.logInfo(
|
|
30445
|
+
`snapshot cleanup: ${name} dropped ${dropped}/${expired.length} day branch(es) older than ${dayCutoff}`
|
|
30446
|
+
);
|
|
30447
|
+
}
|
|
30448
|
+
}
|
|
30449
|
+
}).pipe(Effect_exports.withSpan("snapshot.cleanup"));
|
|
30450
|
+
var SnapshotServiceLive = Layer_exports.scoped(
|
|
30451
|
+
SnapshotService,
|
|
30452
|
+
Effect_exports.gen(function* () {
|
|
30453
|
+
const cfg = yield* CockpitConfig;
|
|
30454
|
+
const snapshotsRoot = join5(cfg.cockpitDir, "snapshots");
|
|
30455
|
+
const maxFileBytes = cfg.snapshotMaxFileKb * 1024;
|
|
30456
|
+
const cleanup = cleanupImpl(snapshotsRoot, cfg.snapshotKeepDays, cfg.snapshotRepoTtlDays);
|
|
30457
|
+
yield* Effect_exports.forkScoped(
|
|
30458
|
+
cleanup.pipe(
|
|
30459
|
+
Effect_exports.catchAll((e) => Effect_exports.logWarning(`snapshot cleanup failed: ${e.message}`)),
|
|
30460
|
+
Effect_exports.repeat(Schedule_exports.spaced("24 hours"))
|
|
30461
|
+
)
|
|
30462
|
+
);
|
|
30463
|
+
return SnapshotService.of({
|
|
30464
|
+
record: (trigger) => snapshotOnce(snapshotsRoot, maxFileBytes, trigger, "tool"),
|
|
30465
|
+
baseline: (cwd, sessionKey, provider) => snapshotOnce(snapshotsRoot, maxFileBytes, { cwd, sessionKey, provider }, "baseline"),
|
|
30466
|
+
listByToolIds: (cwd, toolIds) => listByToolIdsImpl(snapshotsRoot, cwd, toolIds),
|
|
30467
|
+
diff: (cwd, commitHash) => diffImpl(snapshotsRoot, cwd, commitHash),
|
|
30468
|
+
cleanup
|
|
30469
|
+
});
|
|
30470
|
+
})
|
|
30471
|
+
);
|
|
30472
|
+
|
|
29867
30473
|
// packages/shared/effect-runtime/src/server/runtime.ts
|
|
29868
30474
|
var isDev = process.env.COCKPIT_ENV === "dev";
|
|
29869
30475
|
var ServerBaseLayer = Layer_exports.unwrapEffect(
|
|
@@ -29885,7 +30491,9 @@ var AppLayer = Layer_exports.mergeAll(
|
|
|
29885
30491
|
// Scheduler
|
|
29886
30492
|
SchedulerLive,
|
|
29887
30493
|
// Agent
|
|
29888
|
-
AgentServiceLive
|
|
30494
|
+
AgentServiceLive,
|
|
30495
|
+
// Tool-call snapshots (shadow git)
|
|
30496
|
+
SnapshotServiceLive
|
|
29889
30497
|
);
|
|
29890
30498
|
var AppRuntime = ManagedRuntime_exports.make(AppLayer);
|
|
29891
30499
|
|
|
@@ -29905,6 +30513,7 @@ export {
|
|
|
29905
30513
|
ValidationError,
|
|
29906
30514
|
NotFoundError,
|
|
29907
30515
|
errorToStatus,
|
|
30516
|
+
SnapshotService,
|
|
29908
30517
|
createNeo4jDriver,
|
|
29909
30518
|
runCypherWithDriver,
|
|
29910
30519
|
serializeValue,
|
|
@@ -29934,5 +30543,7 @@ export {
|
|
|
29934
30543
|
withFileLock,
|
|
29935
30544
|
mutateJsonFile,
|
|
29936
30545
|
createOllamaModel,
|
|
30546
|
+
notePendingRecord,
|
|
30547
|
+
settlePendingRecord,
|
|
29937
30548
|
AppRuntime
|
|
29938
30549
|
};
|