@surething/cockpit 1.0.205 → 1.0.206
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 +25 -25
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +3 -3
- package/.next-prod/required-server-files.js +12 -0
- package/.next-prod/required-server-files.json +12 -0
- 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 +4 -3
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +4 -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 +4 -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 +3 -2
- 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 +3 -3
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +6 -6
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +3 -3
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +7 -7
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +3 -3
- package/.next-prod/server/app/api/chat/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 +4 -4
- 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/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/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/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 +4 -4
- 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/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/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/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/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 +1 -1
- 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/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.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +2 -99
- 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 -30
- 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 +25 -25
- package/.next-prod/server/chunks/240.js +1 -0
- package/.next-prod/server/chunks/{4098.js → 5466.js} +1 -1
- package/.next-prod/server/chunks/554.js +101 -0
- package/.next-prod/server/chunks/{4272.js → 6007.js} +2 -2
- package/.next-prod/server/chunks/7264.js +5 -0
- package/.next-prod/server/chunks/8750.js +1 -0
- package/.next-prod/server/chunks/{4490.js → 8764.js} +1 -1
- package/.next-prod/server/chunks/900.js +1 -0
- package/.next-prod/server/chunks/9255.js +1 -0
- package/.next-prod/server/chunks/9658.js +59 -0
- package/.next-prod/server/chunks/987.js +139 -0
- package/.next-prod/server/functions-config-manifest.json +1 -26
- 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/chunks/{700.8d53bb1a328c3f97.js → 1959.b9473117faf354bf.js} +1 -1
- package/.next-prod/static/chunks/5204-c8293184aa55cdd5.js +23 -0
- package/.next-prod/static/chunks/5660-9ffe0abe675caac1.js +29 -0
- package/.next-prod/static/chunks/6028-1d6ced1439a3f01f.js +1 -0
- package/.next-prod/static/chunks/6345-6b34b0528ff833a1.js +14 -0
- package/.next-prod/static/chunks/app/layout-421143dba2c69478.js +1 -0
- package/.next-prod/static/chunks/app/page-db32ebfdf1ac9174.js +1 -0
- package/.next-prod/static/chunks/app/project/page-db32ebfdf1ac9174.js +1 -0
- package/.next-prod/static/chunks/app/review/[id]/page-05cd4cb51babd64c.js +1 -0
- package/.next-prod/static/chunks/webpack-bb0c02e3a9602d78.js +1 -0
- package/.next-prod/static/css/a7974d62fe853925.css +1 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-5NL2LMKP.mjs → chunk-HIRLDMCH.mjs} +24 -140
- package/dist/chunk-RSHKDWJM.mjs +136 -0
- package/dist/chunk-VCZEGP64.mjs +984 -0
- package/dist/scheduledTasks.mjs +6 -4
- package/dist/server-K6XWP7DX.mjs +69 -0
- package/dist/wsServer.mjs +60 -482
- package/next.config.mjs +15 -0
- package/package.json +15 -17
- package/server.mjs +1 -1
- package/.next-prod/server/chunks/2338.js +0 -1
- package/.next-prod/server/chunks/3353.js +0 -1
- package/.next-prod/server/chunks/3863.js +0 -1
- package/.next-prod/server/chunks/4732.js +0 -1
- package/.next-prod/server/chunks/4793.js +0 -1
- package/.next-prod/server/chunks/5147.js +0 -1
- package/.next-prod/server/chunks/5394.js +0 -1
- package/.next-prod/server/chunks/6043.js +0 -4
- package/.next-prod/server/chunks/7051.js +0 -1
- package/.next-prod/server/chunks/7514.js +0 -31
- package/.next-prod/server/chunks/8491.js +0 -5
- package/.next-prod/server/chunks/9298.js +0 -139
- package/.next-prod/static/chunks/1705-906aa28943dbc391.js +0 -4
- package/.next-prod/static/chunks/3530-42727255f967251e.js +0 -14
- package/.next-prod/static/chunks/3579-51f0ad7204c67e22.js +0 -1
- package/.next-prod/static/chunks/3643-fe2ac2f1accd0649.js +0 -1
- package/.next-prod/static/chunks/3743-1f5d8cfd9d92ad97.js +0 -4
- package/.next-prod/static/chunks/4186-2bbbcdf03b3c15f5.js +0 -17
- package/.next-prod/static/chunks/9062-8d92cbc176f388a0.js +0 -1
- package/.next-prod/static/chunks/9114-0d2717c9c2752d0f.js +0 -1
- package/.next-prod/static/chunks/app/layout-e091cf70aaec617b.js +0 -1
- package/.next-prod/static/chunks/app/page-c9a30c88afc0a0c5.js +0 -1
- package/.next-prod/static/chunks/app/project/page-bd8c46d229676a01.js +0 -29
- package/.next-prod/static/chunks/app/review/[id]/page-f8bb4748e9a94a0f.js +0 -1
- package/.next-prod/static/chunks/webpack-c6cffb10a569677a.js +0 -1
- package/.next-prod/static/css/23784ace5d9f83d5.css +0 -1
- package/dist/JupyterKernelManager-VBKKSRVJ.mjs +0 -269
- /package/.next-prod/static/{T6-Nq3sO9DxU5E0rsM6aX → VAwjvIwxO_lfKwd6A4ptI}/_buildManifest.js +0 -0
- /package/.next-prod/static/{T6-Nq3sO9DxU5E0rsM6aX → VAwjvIwxO_lfKwd6A4ptI}/_ssgManifest.js +0 -0
package/dist/wsServer.mjs
CHANGED
|
@@ -1,16 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getLastUserMessage
|
|
3
|
+
} from "./chunk-HIRLDMCH.mjs";
|
|
4
|
+
import {
|
|
5
|
+
addExitListener,
|
|
6
|
+
addOutputListener,
|
|
7
|
+
createPendingRequest,
|
|
8
|
+
finalizeCommand,
|
|
9
|
+
findSafeStart,
|
|
10
|
+
getAllProjectCwds,
|
|
11
|
+
getBrowserByShortId,
|
|
12
|
+
getRegistrySize,
|
|
13
|
+
getRunningCommand,
|
|
14
|
+
getRunningCommands,
|
|
15
|
+
getTerminalByShortId,
|
|
16
|
+
listBrowsers,
|
|
17
|
+
listTerminals,
|
|
18
|
+
registerBrowser,
|
|
19
|
+
registerCommand,
|
|
20
|
+
registerTerminal,
|
|
21
|
+
resolvePendingRequest,
|
|
22
|
+
sendCommandToBrowser,
|
|
23
|
+
unregisterBrowser,
|
|
24
|
+
unregisterTerminal
|
|
25
|
+
} from "./chunk-VCZEGP64.mjs";
|
|
1
26
|
import {
|
|
2
27
|
GLOBAL_STATE_FILE,
|
|
3
28
|
REVIEW_DIR,
|
|
4
29
|
REVIEW_SIGNAL_FILE,
|
|
5
|
-
ensureParentDir,
|
|
6
|
-
getLastUserMessage,
|
|
7
30
|
getTerminalHistoryPath,
|
|
8
|
-
getTerminalOutputPath,
|
|
9
31
|
readJsonFile
|
|
10
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RSHKDWJM.mjs";
|
|
11
33
|
|
|
12
34
|
// src/lib/wsServer.ts
|
|
13
|
-
import { WebSocketServer, WebSocket
|
|
35
|
+
import { WebSocketServer, WebSocket } from "ws";
|
|
14
36
|
import { parse } from "url";
|
|
15
37
|
import { watch as watch2, existsSync as existsSync2, mkdirSync as mkdirSync2 } from "fs";
|
|
16
38
|
import { dirname } from "path";
|
|
@@ -20,6 +42,21 @@ import * as nodePty from "node-pty";
|
|
|
20
42
|
// src/lib/fileWatcher.ts
|
|
21
43
|
import { watch, readFileSync, statSync, existsSync, mkdirSync, writeFileSync } from "fs";
|
|
22
44
|
import { join, resolve } from "path";
|
|
45
|
+
|
|
46
|
+
// packages/shared/utils/src/platform.ts
|
|
47
|
+
var isMac = process.platform === "darwin";
|
|
48
|
+
var isWindows = process.platform === "win32";
|
|
49
|
+
var isLinux = process.platform === "linux";
|
|
50
|
+
function getDefaultShell() {
|
|
51
|
+
if (isWindows) return process.env.COMSPEC || "powershell.exe";
|
|
52
|
+
return process.env.SHELL || "/bin/sh";
|
|
53
|
+
}
|
|
54
|
+
function getDefaultPath() {
|
|
55
|
+
if (isWindows) return process.env.PATH || "";
|
|
56
|
+
return process.env.PATH || "/usr/local/bin:/usr/bin:/bin";
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// src/lib/fileWatcher.ts
|
|
23
60
|
var GIT_WATCH_FILES = [
|
|
24
61
|
".git/HEAD",
|
|
25
62
|
// Do not watch .git/index: git status refreshes its stat cache, causing a feedback loop.
|
|
@@ -266,473 +303,14 @@ var reviewWatcher = g_watch.__cockpitReviewWatcher ?? (g_watch.__cockpitReviewWa
|
|
|
266
303
|
|
|
267
304
|
// src/lib/wsServer.ts
|
|
268
305
|
import { readFile } from "fs/promises";
|
|
269
|
-
|
|
270
|
-
// src/lib/terminal/RunningCommandRegistry.ts
|
|
271
|
-
import fs from "fs/promises";
|
|
272
|
-
|
|
273
|
-
// src/lib/shortId.ts
|
|
274
|
-
function crc32(str) {
|
|
275
|
-
let crc = 4294967295;
|
|
276
|
-
for (let i = 0; i < str.length; i++) {
|
|
277
|
-
crc ^= str.charCodeAt(i);
|
|
278
|
-
for (let j = 0; j < 8; j++) {
|
|
279
|
-
crc = crc >>> 1 ^ (crc & 1 ? 3988292384 : 0);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
return (crc ^ 4294967295) >>> 0;
|
|
283
|
-
}
|
|
284
|
-
function toShortId(fullId) {
|
|
285
|
-
const hash = crc32(fullId);
|
|
286
|
-
let id = "";
|
|
287
|
-
let val = hash;
|
|
288
|
-
for (let i = 0; i < 4; i++) {
|
|
289
|
-
id += String.fromCharCode(97 + val % 26);
|
|
290
|
-
val = Math.floor(val / 26);
|
|
291
|
-
}
|
|
292
|
-
return id;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
// src/lib/terminal/TerminalBridge.ts
|
|
296
|
-
var REGISTRY_KEY = /* @__PURE__ */ Symbol.for("terminal_bridge_registry");
|
|
297
|
-
var REVERSE_KEY = /* @__PURE__ */ Symbol.for("terminal_bridge_reverse");
|
|
298
|
-
var OUTPUT_LISTENERS_KEY = /* @__PURE__ */ Symbol.for("terminal_bridge_output_listeners");
|
|
299
|
-
var EXIT_LISTENERS_KEY = /* @__PURE__ */ Symbol.for("terminal_bridge_exit_listeners");
|
|
300
|
-
function getRegistry() {
|
|
301
|
-
const g = globalThis;
|
|
302
|
-
if (!g[REGISTRY_KEY]) g[REGISTRY_KEY] = /* @__PURE__ */ new Map();
|
|
303
|
-
return g[REGISTRY_KEY];
|
|
304
|
-
}
|
|
305
|
-
function getReverseIndex() {
|
|
306
|
-
const g = globalThis;
|
|
307
|
-
if (!g[REVERSE_KEY]) g[REVERSE_KEY] = /* @__PURE__ */ new Map();
|
|
308
|
-
return g[REVERSE_KEY];
|
|
309
|
-
}
|
|
310
|
-
function getOutputListeners() {
|
|
311
|
-
const g = globalThis;
|
|
312
|
-
if (!g[OUTPUT_LISTENERS_KEY]) g[OUTPUT_LISTENERS_KEY] = /* @__PURE__ */ new Map();
|
|
313
|
-
return g[OUTPUT_LISTENERS_KEY];
|
|
314
|
-
}
|
|
315
|
-
function getExitListeners() {
|
|
316
|
-
const g = globalThis;
|
|
317
|
-
if (!g[EXIT_LISTENERS_KEY]) g[EXIT_LISTENERS_KEY] = /* @__PURE__ */ new Map();
|
|
318
|
-
return g[EXIT_LISTENERS_KEY];
|
|
319
|
-
}
|
|
320
|
-
function registerTerminal(tabId, commandId, command, projectCwd) {
|
|
321
|
-
const fullId = tabId + commandId;
|
|
322
|
-
const shortId = toShortId(fullId);
|
|
323
|
-
getRegistry().set(shortId, { shortId, commandId, tabId, command, projectCwd, registeredAt: Date.now() });
|
|
324
|
-
getReverseIndex().set(commandId, shortId);
|
|
325
|
-
return shortId;
|
|
326
|
-
}
|
|
327
|
-
function finalizeTerminal(commandId, exitCode) {
|
|
328
|
-
const shortId = getReverseIndex().get(commandId);
|
|
329
|
-
if (shortId) {
|
|
330
|
-
const entry = getRegistry().get(shortId);
|
|
331
|
-
if (entry) {
|
|
332
|
-
entry.exitCode = exitCode;
|
|
333
|
-
}
|
|
334
|
-
getOutputListeners().delete(commandId);
|
|
335
|
-
getExitListeners().delete(commandId);
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
function unregisterTerminal(commandId) {
|
|
339
|
-
const shortId = getReverseIndex().get(commandId);
|
|
340
|
-
if (shortId) {
|
|
341
|
-
getRegistry().delete(shortId);
|
|
342
|
-
getReverseIndex().delete(commandId);
|
|
343
|
-
getOutputListeners().delete(commandId);
|
|
344
|
-
getExitListeners().delete(commandId);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
function getTerminalByShortId(shortId) {
|
|
348
|
-
return getRegistry().get(shortId);
|
|
349
|
-
}
|
|
350
|
-
function listTerminals(getRunning) {
|
|
351
|
-
const result = [];
|
|
352
|
-
for (const [, entry] of getRegistry()) {
|
|
353
|
-
const cmd = getRunning?.(entry.commandId);
|
|
354
|
-
result.push({
|
|
355
|
-
shortId: entry.shortId,
|
|
356
|
-
commandId: entry.commandId,
|
|
357
|
-
tabId: entry.tabId,
|
|
358
|
-
command: entry.command,
|
|
359
|
-
pid: cmd?.pid ?? 0,
|
|
360
|
-
running: !!cmd
|
|
361
|
-
});
|
|
362
|
-
}
|
|
363
|
-
return result;
|
|
364
|
-
}
|
|
365
|
-
function addOutputListener(commandId, cb) {
|
|
366
|
-
const listeners = getOutputListeners();
|
|
367
|
-
if (!listeners.has(commandId)) listeners.set(commandId, /* @__PURE__ */ new Set());
|
|
368
|
-
listeners.get(commandId).add(cb);
|
|
369
|
-
return () => {
|
|
370
|
-
listeners.get(commandId)?.delete(cb);
|
|
371
|
-
if (listeners.get(commandId)?.size === 0) listeners.delete(commandId);
|
|
372
|
-
};
|
|
373
|
-
}
|
|
374
|
-
function notifyOutputListeners(commandId, data) {
|
|
375
|
-
const cbs = getOutputListeners().get(commandId);
|
|
376
|
-
if (cbs) {
|
|
377
|
-
for (const cb of cbs) cb(data);
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
function addExitListener(commandId, cb) {
|
|
381
|
-
const listeners = getExitListeners();
|
|
382
|
-
if (!listeners.has(commandId)) listeners.set(commandId, /* @__PURE__ */ new Set());
|
|
383
|
-
listeners.get(commandId).add(cb);
|
|
384
|
-
return () => {
|
|
385
|
-
listeners.get(commandId)?.delete(cb);
|
|
386
|
-
if (listeners.get(commandId)?.size === 0) listeners.delete(commandId);
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
function notifyExitListeners(commandId, exitCode) {
|
|
390
|
-
const cbs = getExitListeners().get(commandId);
|
|
391
|
-
if (cbs) {
|
|
392
|
-
for (const cb of cbs) cb(exitCode);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
// src/lib/terminal/RunningCommandRegistry.ts
|
|
397
|
-
var MAX_OUTPUT_LINES = 5e3;
|
|
398
|
-
var OUTPUT_FILE_THRESHOLD = 4096;
|
|
399
|
-
var PTY_RING_BUFFER_MAX = 2 * 1024 * 1024;
|
|
400
|
-
var PtyRingBuffer = class {
|
|
401
|
-
constructor(max = PTY_RING_BUFFER_MAX) {
|
|
402
|
-
this.chunks = [];
|
|
403
|
-
this.totalLen = 0;
|
|
404
|
-
this.max = max;
|
|
405
|
-
}
|
|
406
|
-
append(data) {
|
|
407
|
-
if (!data) return;
|
|
408
|
-
this.chunks.push(data);
|
|
409
|
-
this.totalLen += data.length;
|
|
410
|
-
while (this.totalLen > this.max && this.chunks.length > 0) {
|
|
411
|
-
const overflow = this.totalLen - this.max;
|
|
412
|
-
const oldest = this.chunks[0];
|
|
413
|
-
if (oldest.length <= overflow) {
|
|
414
|
-
this.chunks.shift();
|
|
415
|
-
this.totalLen -= oldest.length;
|
|
416
|
-
} else {
|
|
417
|
-
this.chunks[0] = oldest.slice(overflow);
|
|
418
|
-
this.totalLen -= overflow;
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
snapshot() {
|
|
423
|
-
return this.chunks.length === 1 ? this.chunks[0] : this.chunks.join("");
|
|
424
|
-
}
|
|
425
|
-
get length() {
|
|
426
|
-
return this.totalLen;
|
|
427
|
-
}
|
|
428
|
-
};
|
|
429
|
-
function findSafeStart(s) {
|
|
430
|
-
const lf = s.indexOf("\n");
|
|
431
|
-
if (lf !== -1) return lf + 1;
|
|
432
|
-
const esc = s.indexOf("\x1B");
|
|
433
|
-
if (esc !== -1) return esc;
|
|
434
|
-
return 0;
|
|
435
|
-
}
|
|
436
|
-
var GLOBAL_KEY = /* @__PURE__ */ Symbol.for("terminal_running_commands");
|
|
437
|
-
var SERVER_ID_KEY = /* @__PURE__ */ Symbol.for("terminal_server_id");
|
|
438
|
-
function getServerId() {
|
|
439
|
-
const g = globalThis;
|
|
440
|
-
if (!g[SERVER_ID_KEY]) {
|
|
441
|
-
g[SERVER_ID_KEY] = `srv_${Date.now()}_${process.pid}`;
|
|
442
|
-
console.log(`[registry] server started, id=${g[SERVER_ID_KEY]}, pid=${process.pid}`);
|
|
443
|
-
}
|
|
444
|
-
return g[SERVER_ID_KEY];
|
|
445
|
-
}
|
|
446
|
-
getServerId();
|
|
447
|
-
function getRegistry2() {
|
|
448
|
-
const g = globalThis;
|
|
449
|
-
if (!g[GLOBAL_KEY]) {
|
|
450
|
-
g[GLOBAL_KEY] = /* @__PURE__ */ new Map();
|
|
451
|
-
}
|
|
452
|
-
return g[GLOBAL_KEY];
|
|
453
|
-
}
|
|
454
|
-
function registerCommand(cmd) {
|
|
455
|
-
console.log(`[registry] register: id=${cmd.commandId}, cmd="${cmd.command}", pid=${cmd.pid}, pty=${!!cmd.ptyProcess}, server=${getServerId()}`);
|
|
456
|
-
const entry = {
|
|
457
|
-
...cmd,
|
|
458
|
-
outputLines: [],
|
|
459
|
-
outputPartial: "",
|
|
460
|
-
// Only PTY commands get a ring buffer — pipe mode replay still uses outputLines.
|
|
461
|
-
...cmd.ptyProcess ? { ptyRingBuffer: new PtyRingBuffer() } : {}
|
|
462
|
-
};
|
|
463
|
-
getRegistry2().set(cmd.commandId, entry);
|
|
464
|
-
registerTerminal(cmd.tabId, cmd.commandId, cmd.command, cmd.projectCwd);
|
|
465
|
-
writeHistoryPlaceholder(cmd.commandId, cmd.command, cmd.timestamp, cmd.cwd, cmd.projectCwd, cmd.tabId, !!cmd.usePty).catch(() => {
|
|
466
|
-
});
|
|
467
|
-
if (cmd.ptyProcess) {
|
|
468
|
-
const pty = cmd.ptyProcess;
|
|
469
|
-
pty.onData((data) => {
|
|
470
|
-
entry.ptyRingBuffer?.append(data);
|
|
471
|
-
notifyOutputListeners(cmd.commandId, data);
|
|
472
|
-
});
|
|
473
|
-
const ptyPid = cmd.pid;
|
|
474
|
-
pty.onExit(async ({ exitCode }) => {
|
|
475
|
-
try {
|
|
476
|
-
await finalizeCommand(cmd.commandId, exitCode, ptyPid);
|
|
477
|
-
} catch (e) {
|
|
478
|
-
console.error("[registry] finalize error:", e);
|
|
479
|
-
}
|
|
480
|
-
});
|
|
481
|
-
} else {
|
|
482
|
-
const child = cmd.process;
|
|
483
|
-
child.stdout?.on("data", (data) => {
|
|
484
|
-
appendCommandOutput(cmd.commandId, data.toString());
|
|
485
|
-
});
|
|
486
|
-
child.stderr?.on("data", (data) => {
|
|
487
|
-
appendCommandOutput(cmd.commandId, data.toString());
|
|
488
|
-
});
|
|
489
|
-
const childPid = cmd.pid;
|
|
490
|
-
child.on("close", async (code) => {
|
|
491
|
-
try {
|
|
492
|
-
await finalizeCommand(cmd.commandId, code ?? 0, childPid);
|
|
493
|
-
} catch (e) {
|
|
494
|
-
console.error("[registry] finalize error:", e);
|
|
495
|
-
}
|
|
496
|
-
});
|
|
497
|
-
child.on("error", async () => {
|
|
498
|
-
try {
|
|
499
|
-
await finalizeCommand(cmd.commandId, 1, childPid);
|
|
500
|
-
} catch (e) {
|
|
501
|
-
console.error("[registry] finalize error:", e);
|
|
502
|
-
}
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
function appendCommandOutput(commandId, data) {
|
|
507
|
-
const cmd = getRegistry2().get(commandId);
|
|
508
|
-
if (!cmd) return;
|
|
509
|
-
const text = cmd.outputPartial + data;
|
|
510
|
-
const parts = text.split("\n");
|
|
511
|
-
cmd.outputPartial = parts.pop() || "";
|
|
512
|
-
if (parts.length > 0) {
|
|
513
|
-
cmd.outputLines.push(...parts);
|
|
514
|
-
if (cmd.outputLines.length > MAX_OUTPUT_LINES) {
|
|
515
|
-
cmd.outputLines.splice(0, cmd.outputLines.length - MAX_OUTPUT_LINES);
|
|
516
|
-
if (cmd.outputLines.length > 0) {
|
|
517
|
-
cmd.outputLines[0] = "\x1B[0m" + cmd.outputLines[0];
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
notifyOutputListeners(commandId, data);
|
|
522
|
-
}
|
|
523
|
-
function getBufferedOutput(cmd) {
|
|
524
|
-
const lines = cmd.outputLines.join("\n");
|
|
525
|
-
if (cmd.outputPartial) {
|
|
526
|
-
return lines ? lines + "\n" + cmd.outputPartial : cmd.outputPartial;
|
|
527
|
-
}
|
|
528
|
-
return lines;
|
|
529
|
-
}
|
|
530
|
-
function getRunningCommands(projectCwd) {
|
|
531
|
-
const results = [];
|
|
532
|
-
for (const cmd of getRegistry2().values()) {
|
|
533
|
-
if (cmd.projectCwd === projectCwd) {
|
|
534
|
-
results.push({
|
|
535
|
-
commandId: cmd.commandId,
|
|
536
|
-
command: cmd.command,
|
|
537
|
-
cwd: cmd.cwd,
|
|
538
|
-
tabId: cmd.tabId,
|
|
539
|
-
pid: cmd.pid,
|
|
540
|
-
timestamp: cmd.timestamp,
|
|
541
|
-
...cmd.usePty ? { usePty: true } : {}
|
|
542
|
-
});
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
return results;
|
|
546
|
-
}
|
|
547
|
-
function getRunningCommand(commandId) {
|
|
548
|
-
return getRegistry2().get(commandId);
|
|
549
|
-
}
|
|
550
|
-
function getRegistrySize() {
|
|
551
|
-
return getRegistry2().size;
|
|
552
|
-
}
|
|
553
|
-
function getAllProjectCwds() {
|
|
554
|
-
const cwds = /* @__PURE__ */ new Set();
|
|
555
|
-
for (const cmd of getRegistry2().values()) {
|
|
556
|
-
cwds.add(cmd.projectCwd);
|
|
557
|
-
}
|
|
558
|
-
return [...cwds];
|
|
559
|
-
}
|
|
560
|
-
async function writeHistoryPlaceholder(commandId, command, timestamp, cwd, projectCwd, tabId, usePty) {
|
|
561
|
-
const historyPath = getTerminalHistoryPath(projectCwd, tabId);
|
|
562
|
-
await ensureParentDir(historyPath);
|
|
563
|
-
const entry = {
|
|
564
|
-
id: commandId,
|
|
565
|
-
command,
|
|
566
|
-
output: "",
|
|
567
|
-
timestamp,
|
|
568
|
-
cwd,
|
|
569
|
-
...usePty ? { usePty: true } : {},
|
|
570
|
-
running: true
|
|
571
|
-
};
|
|
572
|
-
let existingLines = [];
|
|
573
|
-
try {
|
|
574
|
-
const content = await fs.readFile(historyPath, "utf-8");
|
|
575
|
-
existingLines = content.trim().split("\n").filter(Boolean);
|
|
576
|
-
} catch {
|
|
577
|
-
}
|
|
578
|
-
if (existingLines.length >= 100) {
|
|
579
|
-
const removedLines = existingLines.slice(0, existingLines.length - 99);
|
|
580
|
-
for (const line of removedLines) {
|
|
581
|
-
try {
|
|
582
|
-
const old = JSON.parse(line);
|
|
583
|
-
if (old.outputFile) await fs.unlink(old.outputFile).catch(() => {
|
|
584
|
-
});
|
|
585
|
-
} catch {
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
existingLines = existingLines.slice(-99);
|
|
589
|
-
}
|
|
590
|
-
existingLines.push(JSON.stringify(entry));
|
|
591
|
-
await fs.writeFile(historyPath, existingLines.join("\n") + "\n", "utf-8");
|
|
592
|
-
}
|
|
593
|
-
async function finalizeCommand(commandId, exitCode, pid) {
|
|
594
|
-
const registry2 = getRegistry2();
|
|
595
|
-
const cmd = registry2.get(commandId);
|
|
596
|
-
if (!cmd) return;
|
|
597
|
-
if (pid !== void 0 && cmd.pid !== pid) return;
|
|
598
|
-
console.log(`[registry] finalize: id=${commandId}, exitCode=${exitCode}, cmd="${cmd.command}", server=${getServerId()}`);
|
|
599
|
-
notifyExitListeners(commandId, exitCode);
|
|
600
|
-
finalizeTerminal(commandId, exitCode);
|
|
601
|
-
const output = getBufferedOutput(cmd);
|
|
602
|
-
cmd.ptyRingBuffer = void 0;
|
|
603
|
-
registry2.delete(commandId);
|
|
604
|
-
const entry = {
|
|
605
|
-
id: cmd.commandId,
|
|
606
|
-
command: cmd.command,
|
|
607
|
-
output: "",
|
|
608
|
-
exitCode,
|
|
609
|
-
timestamp: cmd.timestamp,
|
|
610
|
-
cwd: cmd.cwd,
|
|
611
|
-
...cmd.usePty ? { usePty: true } : {}
|
|
612
|
-
};
|
|
613
|
-
const historyPath = getTerminalHistoryPath(cmd.projectCwd, cmd.tabId);
|
|
614
|
-
await ensureParentDir(historyPath);
|
|
615
|
-
if (output.length > OUTPUT_FILE_THRESHOLD) {
|
|
616
|
-
const outputPath = getTerminalOutputPath(cmd.projectCwd, cmd.commandId);
|
|
617
|
-
await fs.writeFile(outputPath, output, "utf-8");
|
|
618
|
-
entry.outputFile = outputPath;
|
|
619
|
-
} else {
|
|
620
|
-
entry.output = output;
|
|
621
|
-
}
|
|
622
|
-
let existingLines = [];
|
|
623
|
-
try {
|
|
624
|
-
const content = await fs.readFile(historyPath, "utf-8");
|
|
625
|
-
existingLines = content.trim().split("\n").filter(Boolean);
|
|
626
|
-
} catch {
|
|
627
|
-
}
|
|
628
|
-
let replaced = false;
|
|
629
|
-
for (let i = 0; i < existingLines.length; i++) {
|
|
630
|
-
try {
|
|
631
|
-
if (JSON.parse(existingLines[i]).id === commandId) {
|
|
632
|
-
existingLines[i] = JSON.stringify(entry);
|
|
633
|
-
replaced = true;
|
|
634
|
-
break;
|
|
635
|
-
}
|
|
636
|
-
} catch {
|
|
637
|
-
}
|
|
638
|
-
}
|
|
639
|
-
if (!replaced) {
|
|
640
|
-
existingLines.push(JSON.stringify(entry));
|
|
641
|
-
}
|
|
642
|
-
await fs.writeFile(historyPath, existingLines.join("\n") + "\n", "utf-8");
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
// src/lib/bubbles/browser/BrowserBridge.ts
|
|
646
|
-
import { WebSocket } from "ws";
|
|
647
|
-
var g_browser = globalThis;
|
|
648
|
-
var registry = g_browser.__cockpitBrowserRegistry ?? (g_browser.__cockpitBrowserRegistry = /* @__PURE__ */ new Map());
|
|
649
|
-
var fullIdToShort = g_browser.__cockpitBrowserFullIdToShort ?? (g_browser.__cockpitBrowserFullIdToShort = /* @__PURE__ */ new Map());
|
|
650
|
-
function registerBrowser(fullId, ws) {
|
|
651
|
-
const shortId = toShortId(fullId);
|
|
652
|
-
registry.set(shortId, { fullId, ws, lastSeen: Date.now() });
|
|
653
|
-
fullIdToShort.set(fullId, shortId);
|
|
654
|
-
return shortId;
|
|
655
|
-
}
|
|
656
|
-
function unregisterBrowser(fullId) {
|
|
657
|
-
const shortId = fullIdToShort.get(fullId);
|
|
658
|
-
if (shortId) {
|
|
659
|
-
registry.delete(shortId);
|
|
660
|
-
fullIdToShort.delete(fullId);
|
|
661
|
-
}
|
|
662
|
-
}
|
|
663
|
-
function getBrowserByShortId(shortId) {
|
|
664
|
-
return registry.get(shortId);
|
|
665
|
-
}
|
|
666
|
-
function listBrowsers() {
|
|
667
|
-
const result = [];
|
|
668
|
-
for (const [shortId, entry] of registry) {
|
|
669
|
-
result.push({
|
|
670
|
-
shortId,
|
|
671
|
-
fullId: entry.fullId,
|
|
672
|
-
connected: entry.ws !== null && entry.ws.readyState === WebSocket.OPEN
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
return result;
|
|
676
|
-
}
|
|
677
|
-
var pendingRequests = g_browser.__cockpitBrowserPending ?? (g_browser.__cockpitBrowserPending = /* @__PURE__ */ new Map());
|
|
678
|
-
function createPendingRequest(reqId, timeout) {
|
|
679
|
-
return new Promise((resolve2, reject) => {
|
|
680
|
-
const timer = setTimeout(() => {
|
|
681
|
-
pendingRequests.delete(reqId);
|
|
682
|
-
reject(new Error(`Timeout after ${timeout}ms`));
|
|
683
|
-
}, timeout);
|
|
684
|
-
pendingRequests.set(reqId, { resolve: resolve2, reject, timer });
|
|
685
|
-
});
|
|
686
|
-
}
|
|
687
|
-
function resolvePendingRequest(reqId, ok, data, error) {
|
|
688
|
-
const pending = pendingRequests.get(reqId);
|
|
689
|
-
if (!pending) return;
|
|
690
|
-
clearTimeout(pending.timer);
|
|
691
|
-
pendingRequests.delete(reqId);
|
|
692
|
-
if (ok) {
|
|
693
|
-
pending.resolve(data);
|
|
694
|
-
} else {
|
|
695
|
-
pending.reject(new Error(error || "Browser command failed"));
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
function sendCommandToBrowser(shortId, reqId, action, params) {
|
|
699
|
-
const entry = registry.get(shortId);
|
|
700
|
-
if (!entry || !entry.ws || entry.ws.readyState !== WebSocket.OPEN) {
|
|
701
|
-
return false;
|
|
702
|
-
}
|
|
703
|
-
entry.ws.send(JSON.stringify({
|
|
704
|
-
type: "browser:cmd",
|
|
705
|
-
reqId,
|
|
706
|
-
action,
|
|
707
|
-
params
|
|
708
|
-
}));
|
|
709
|
-
return true;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
// src/lib/wsServer.ts
|
|
713
306
|
import { randomUUID } from "crypto";
|
|
714
|
-
|
|
715
|
-
// src/lib/platform.ts
|
|
716
|
-
var isMac = process.platform === "darwin";
|
|
717
|
-
var isWindows = process.platform === "win32";
|
|
718
|
-
var isLinux = process.platform === "linux";
|
|
719
|
-
function getDefaultShell() {
|
|
720
|
-
if (isWindows) return process.env.COMSPEC || "powershell.exe";
|
|
721
|
-
return process.env.SHELL || "/bin/sh";
|
|
722
|
-
}
|
|
723
|
-
function getDefaultPath() {
|
|
724
|
-
if (isWindows) return process.env.PATH || "";
|
|
725
|
-
return process.env.PATH || "/usr/local/bin:/usr/bin:/bin";
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
// src/lib/wsServer.ts
|
|
729
307
|
var HEARTBEAT_INTERVAL = 3e4;
|
|
730
308
|
var g_ws = globalThis;
|
|
731
309
|
var globalStateClients = g_ws.__cockpitGlobalStateClients ?? (g_ws.__cockpitGlobalStateClients = /* @__PURE__ */ new Set());
|
|
732
310
|
function broadcastToGlobalState(msg) {
|
|
733
311
|
const data = JSON.stringify(msg);
|
|
734
312
|
for (const ws of globalStateClients) {
|
|
735
|
-
if (ws.readyState ===
|
|
313
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
736
314
|
ws.send(data);
|
|
737
315
|
}
|
|
738
316
|
}
|
|
@@ -774,18 +352,18 @@ function handleFileWatch(ws, cwd) {
|
|
|
774
352
|
return;
|
|
775
353
|
}
|
|
776
354
|
const send = (events) => {
|
|
777
|
-
if (ws.readyState ===
|
|
355
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
778
356
|
ws.send(JSON.stringify({ type: "watch", data: events }));
|
|
779
357
|
}
|
|
780
358
|
};
|
|
781
359
|
const unsubscribe = fileWatcher.subscribe(cwd, send);
|
|
782
360
|
const unsubReview = reviewWatcher.subscribe(() => {
|
|
783
|
-
if (ws.readyState ===
|
|
361
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
784
362
|
ws.send(JSON.stringify({ type: "watch", data: [{ type: "review" }] }));
|
|
785
363
|
}
|
|
786
364
|
});
|
|
787
365
|
const heartbeat = setInterval(() => {
|
|
788
|
-
if (ws.readyState ===
|
|
366
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
789
367
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
790
368
|
}
|
|
791
369
|
}, HEARTBEAT_INTERVAL);
|
|
@@ -799,7 +377,7 @@ function handleGlobalState(ws) {
|
|
|
799
377
|
globalStateClients.add(ws);
|
|
800
378
|
let closed = false;
|
|
801
379
|
const sendState = async () => {
|
|
802
|
-
if (closed || ws.readyState !==
|
|
380
|
+
if (closed || ws.readyState !== WebSocket.OPEN) return;
|
|
803
381
|
try {
|
|
804
382
|
const state = await readJsonFile(GLOBAL_STATE_FILE, { sessions: [] });
|
|
805
383
|
for (const s of state.sessions) {
|
|
@@ -819,7 +397,7 @@ function handleGlobalState(ws) {
|
|
|
819
397
|
return { ...session, lastUserMessage };
|
|
820
398
|
})
|
|
821
399
|
);
|
|
822
|
-
if (closed || ws.readyState !==
|
|
400
|
+
if (closed || ws.readyState !== WebSocket.OPEN) return;
|
|
823
401
|
ws.send(JSON.stringify({ type: "global-state", data: { sessions: sessionsWithLastMessage } }));
|
|
824
402
|
} catch (err) {
|
|
825
403
|
if (!closed) console.error("Global state watch error:", err);
|
|
@@ -866,7 +444,7 @@ function handleGlobalState(ws) {
|
|
|
866
444
|
}
|
|
867
445
|
}
|
|
868
446
|
const heartbeat = setInterval(() => {
|
|
869
|
-
if (ws.readyState ===
|
|
447
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
870
448
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
871
449
|
}
|
|
872
450
|
}, HEARTBEAT_INTERVAL);
|
|
@@ -911,12 +489,12 @@ function handleTerminal(ws, projectCwd) {
|
|
|
911
489
|
let closed = false;
|
|
912
490
|
const cleanupMap = /* @__PURE__ */ new Map();
|
|
913
491
|
const send = (msg) => {
|
|
914
|
-
if (!closed && ws.readyState ===
|
|
492
|
+
if (!closed && ws.readyState === WebSocket.OPEN) {
|
|
915
493
|
ws.send(JSON.stringify(msg));
|
|
916
494
|
}
|
|
917
495
|
};
|
|
918
496
|
const heartbeat = setInterval(() => {
|
|
919
|
-
if (ws.readyState ===
|
|
497
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
920
498
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
921
499
|
}
|
|
922
500
|
}, HEARTBEAT_INTERVAL);
|
|
@@ -1312,18 +890,18 @@ function handleTerminalFollow(ws, shortId) {
|
|
|
1312
890
|
}
|
|
1313
891
|
}
|
|
1314
892
|
const unsubOutput = addOutputListener(entry.commandId, (data) => {
|
|
1315
|
-
if (ws.readyState ===
|
|
893
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
1316
894
|
ws.send(JSON.stringify({ type: "output", data }));
|
|
1317
895
|
}
|
|
1318
896
|
});
|
|
1319
897
|
const unsubExit = addExitListener(entry.commandId, (code) => {
|
|
1320
|
-
if (ws.readyState ===
|
|
898
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
1321
899
|
ws.send(JSON.stringify({ type: "exit", code }));
|
|
1322
900
|
ws.close();
|
|
1323
901
|
}
|
|
1324
902
|
});
|
|
1325
903
|
const heartbeat = setInterval(() => {
|
|
1326
|
-
if (ws.readyState ===
|
|
904
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
1327
905
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
1328
906
|
}
|
|
1329
907
|
}, HEARTBEAT_INTERVAL);
|
|
@@ -1362,7 +940,7 @@ async function handleBrowserApi(req, res) {
|
|
|
1362
940
|
}
|
|
1363
941
|
const browser2 = getBrowserByShortId(id);
|
|
1364
942
|
if (browser2) {
|
|
1365
|
-
if (browser2.ws && browser2.ws.readyState ===
|
|
943
|
+
if (browser2.ws && browser2.ws.readyState === WebSocket.OPEN) {
|
|
1366
944
|
browser2.ws.close();
|
|
1367
945
|
}
|
|
1368
946
|
unregisterBrowser(browser2.fullId);
|
|
@@ -1379,7 +957,7 @@ async function handleBrowserApi(req, res) {
|
|
|
1379
957
|
sendJson(404, { ok: false, error: `Browser "${id}" not found` });
|
|
1380
958
|
return true;
|
|
1381
959
|
}
|
|
1382
|
-
if (!browser.ws || browser.ws.readyState !==
|
|
960
|
+
if (!browser.ws || browser.ws.readyState !== WebSocket.OPEN) {
|
|
1383
961
|
sendJson(503, { ok: false, error: `Browser "${id}" is disconnected` });
|
|
1384
962
|
return true;
|
|
1385
963
|
}
|
|
@@ -1405,7 +983,7 @@ function handleBrowser(ws, fullId) {
|
|
|
1405
983
|
const shortId = registerBrowser(fullId, ws);
|
|
1406
984
|
ws.send(JSON.stringify({ type: "registered", shortId }));
|
|
1407
985
|
const heartbeat = setInterval(() => {
|
|
1408
|
-
if (ws.readyState ===
|
|
986
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
1409
987
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
1410
988
|
}
|
|
1411
989
|
}, HEARTBEAT_INTERVAL);
|
|
@@ -1433,16 +1011,16 @@ async function handleJupyter(ws, bubbleId, cwd) {
|
|
|
1433
1011
|
}
|
|
1434
1012
|
let closed = false;
|
|
1435
1013
|
const send = (msg) => {
|
|
1436
|
-
if (!closed && ws.readyState ===
|
|
1014
|
+
if (!closed && ws.readyState === WebSocket.OPEN) {
|
|
1437
1015
|
ws.send(JSON.stringify(msg));
|
|
1438
1016
|
}
|
|
1439
1017
|
};
|
|
1440
1018
|
const heartbeat = setInterval(() => {
|
|
1441
|
-
if (ws.readyState ===
|
|
1019
|
+
if (ws.readyState === WebSocket.OPEN) {
|
|
1442
1020
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
1443
1021
|
}
|
|
1444
1022
|
}, HEARTBEAT_INTERVAL);
|
|
1445
|
-
const { kernelManager } = await import("./
|
|
1023
|
+
const { kernelManager } = await import("./server-K6XWP7DX.mjs");
|
|
1446
1024
|
try {
|
|
1447
1025
|
const instance = await kernelManager.getOrCreate(bubbleId, cwd);
|
|
1448
1026
|
if (instance.errorMessage) {
|
package/next.config.mjs
CHANGED
|
@@ -11,6 +11,21 @@ const EMPTY_STUB = './src/lib/empty-stub.js';
|
|
|
11
11
|
const nextConfig = {
|
|
12
12
|
// dev 和 prod 使用不同输出目录,避免 Turbopack 热更新影响 prod
|
|
13
13
|
distDir: dev ? '.next' : '.next-prod',
|
|
14
|
+
// Workspace packages ship raw .ts/.tsx (their package.json `main` points
|
|
15
|
+
// straight at source). Next.js needs to compile them like local source.
|
|
16
|
+
// See MODULES.md for the modularization layout.
|
|
17
|
+
transpilePackages: [
|
|
18
|
+
'@cockpit/shared-ui',
|
|
19
|
+
'@cockpit/shared-utils',
|
|
20
|
+
'@cockpit/shared-i18n',
|
|
21
|
+
'@cockpit/feature-agent',
|
|
22
|
+
'@cockpit/feature-comments',
|
|
23
|
+
'@cockpit/feature-console',
|
|
24
|
+
'@cockpit/feature-explorer',
|
|
25
|
+
'@cockpit/feature-review',
|
|
26
|
+
'@cockpit/feature-skills',
|
|
27
|
+
'@cockpit/feature-workspace',
|
|
28
|
+
],
|
|
14
29
|
turbopack: {
|
|
15
30
|
// Stub Node built-ins for the BROWSER bundle only. `web-tree-sitter` ships
|
|
16
31
|
// a Node-detection branch full of `await import("fs/promises" | "module" | ...)`
|