@surething/cockpit 1.0.185 → 1.0.186
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 +18 -18
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/next-minimal-server.js.nft.json +1 -1
- package/.next-prod/next-server.js.nft.json +1 -1
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +1 -1
- 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 +2 -2
- 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.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 +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +18 -7
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +21 -10
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +154 -6
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/chat/route.js +14 -3
- package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route_client-reference-manifest.js +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/claude-stats/route_client-reference-manifest.js +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/commands/route_client-reference-manifest.js +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/comments/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/columns/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/export/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/db/schemas/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route_client-reference-manifest.js +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/expanded/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route_client-reference-manifest.js +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/init/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route_client-reference-manifest.js +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/recent/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route_client-reference-manifest.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/branch-diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route_client-reference-manifest.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/commit-diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/discard/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/stage/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/status/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/worktree/route_client-reference-manifest.js +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/global-state/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/load/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/jupyter/save/route_client-reference-manifest.js +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/jupyter/shutdown/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/definition/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/hover/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/references/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/status/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/columns/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route_client-reference-manifest.js +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/note/route_client-reference-manifest.js +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/models/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/ollama/start/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-cursor/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/open-vscode/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/pick-folder/route_client-reference-manifest.js +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/pinned-sessions/route_client-reference-manifest.js +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-settings/route_client-reference-manifest.js +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/project-state/route_client-reference-manifest.js +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/projects/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/command/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/delete/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/get/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/keys/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/redis/set/route_client-reference-manifest.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]/comments/route_client-reference-manifest.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]/replies/route_client-reference-manifest.js +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/[id]/route_client-reference-manifest.js +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/identify/route_client-reference-manifest.js +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/order/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/review/route_client-reference-manifest.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/share-info/route_client-reference-manifest.js +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/review/users/route_client-reference-manifest.js +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/scheduled-tasks/route_client-reference-manifest.js +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/config/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/services/scripts/route_client-reference-manifest.js +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]/fork/route_client-reference-manifest.js +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/[sessionId]/history/route_client-reference-manifest.js +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/session-by-path/route_client-reference-manifest.js +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/[encodedPath]/route_client-reference-manifest.js +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/projects/route_client-reference-manifest.js +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/sessions/route_client-reference-manifest.js +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/settings/route_client-reference-manifest.js +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/aliases/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route_client-reference-manifest.js +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/bubble-order/route_client-reference-manifest.js +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/env/route_client-reference-manifest.js +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/terminal/history/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/version/route_client-reference-manifest.js +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/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- 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 +10 -10
- 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.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 +18 -18
- package/.next-prod/server/chunks/3269.js +1 -0
- package/.next-prod/server/chunks/4098.js +1 -1
- package/.next-prod/server/chunks/4490.js +1 -1
- package/.next-prod/server/chunks/4741.js +4 -4
- package/.next-prod/server/chunks/5394.js +1 -0
- package/.next-prod/server/chunks/6062.js +1 -1
- package/.next-prod/server/chunks/700.js +1 -0
- package/.next-prod/server/functions-config-manifest.json +0 -1
- 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 +2 -2
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/5493-482fc2bbb049e7a4.js +1 -0
- package/.next-prod/static/chunks/{700.65a02f6a597083dc.js → 700.0aaec5a3a570d182.js} +1 -1
- package/.next-prod/static/chunks/app/project/page-62d5a8ed458279b8.js +25 -0
- package/.next-prod/static/chunks/{webpack-67d02a2a41508d41.js → webpack-0f527ee7ab644d02.js} +1 -1
- package/.next-prod/static/css/1573b510894a4234.css +3 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/bin/postinstall.mjs +20 -0
- package/dist/{JupyterKernelManager-475VNVA5.mjs → JupyterKernelManager-VBKKSRVJ.mjs} +23 -2
- package/dist/chunk-VV5VMA4B.mjs +410 -0
- package/dist/scheduledTasks.mjs +1 -1
- package/dist/wsServer.mjs +3 -3
- package/kernels/jupyter_bridge.py +162 -0
- package/package.json +5 -2
- package/server.mjs +5 -1
- package/.next-prod/static/chunks/5493-9f80ad2c7c9cf840.js +0 -1
- package/.next-prod/static/chunks/app/project/page-b73536c67304e489.js +0 -25
- package/.next-prod/static/css/786ec7ade22e6269.css +0 -3
- package/dist/chunk-SWMKAZSL.mjs +0 -250
- /package/.next-prod/static/{ZA65Kd3f2tNa-NfgtOil4 → 0mBqfZkcLM2Y1ikI9uxKG}/_buildManifest.js +0 -0
- /package/.next-prod/static/{ZA65Kd3f2tNa-NfgtOil4 → 0mBqfZkcLM2Y1ikI9uxKG}/_ssgManifest.js +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":12533956,"timestamp":135032293,"id":17,"parentId":1,"tags":{},"startTime":1775896219529,"traceId":"1eec4646c71498d4"},{"name":"run-typescript","duration":14930423,"timestamp":147571040,"id":1489,"parentId":1,"tags":{},"startTime":1775896232068,"traceId":"1eec4646c71498d4"},{"name":"static-check","duration":828364,"timestamp":162517280,"id":1492,"parentId":1,"tags":{},"startTime":1775896247014,"traceId":"1eec4646c71498d4"},{"name":"static-generation","duration":6118609,"timestamp":163822962,"id":1710,"parentId":1,"tags":{},"startTime":1775896248320,"traceId":"1eec4646c71498d4"},{"name":"collect-build-traces","duration":19401221,"timestamp":163346437,"id":1707,"parentId":1,"tags":{},"startTime":1775896247844,"traceId":"1eec4646c71498d4"},{"name":"telemetry-flush","duration":99,"timestamp":182750988,"id":1719,"parentId":1,"tags":{},"startTime":1775896267248,"traceId":"1eec4646c71498d4"},{"name":"next-build","duration":47889154,"timestamp":134861946,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1775896219359,"traceId":"1eec4646c71498d4"}]
|
package/bin/postinstall.mjs
CHANGED
|
@@ -47,4 +47,24 @@ if (isNpmInstall) {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
} catch {}
|
|
50
|
+
|
|
51
|
+
// jupyter_bridge.py → ~/.cockpit/kernels/jupyter_bridge.py
|
|
52
|
+
try {
|
|
53
|
+
const kernelSrc = join(projectRoot, 'kernels', 'jupyter_bridge.py');
|
|
54
|
+
const cockpitDir = join(homedir(), '.cockpit');
|
|
55
|
+
const kernelDestDir = join(cockpitDir, 'kernels');
|
|
56
|
+
accessSync(kernelSrc);
|
|
57
|
+
mkdirSync(kernelDestDir, { recursive: true });
|
|
58
|
+
cpSync(kernelSrc, join(kernelDestDir, 'jupyter_bridge.py'), { force: true });
|
|
59
|
+
|
|
60
|
+
if (process.platform !== 'win32') {
|
|
61
|
+
const realUser = process.env.SUDO_USER;
|
|
62
|
+
if (realUser) {
|
|
63
|
+
try { execSync(`chown -R "${realUser}" "${cockpitDir}"`); } catch {}
|
|
64
|
+
}
|
|
65
|
+
if (process.platform === 'darwin') {
|
|
66
|
+
try { execSync(`xattr -cr "${kernelDestDir}"`); } catch {}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
} catch {}
|
|
50
70
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
// src/lib/
|
|
1
|
+
// src/lib/bubbles/jupyter/JupyterKernelManager.ts
|
|
2
2
|
import { spawn } from "child_process";
|
|
3
3
|
import { join } from "path";
|
|
4
|
+
import { homedir } from "os";
|
|
5
|
+
import { existsSync } from "fs";
|
|
4
6
|
import { createInterface } from "readline";
|
|
5
7
|
var GLOBAL_KEY = /* @__PURE__ */ Symbol.for("jupyter_kernel_manager");
|
|
6
8
|
var IDLE_TIMEOUT = 10 * 60 * 1e3;
|
|
@@ -19,6 +21,25 @@ var JupyterKernelManager = class {
|
|
|
19
21
|
findPython() {
|
|
20
22
|
return "python3";
|
|
21
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve jupyter_bridge.py path.
|
|
26
|
+
* Production: ~/.cockpit/kernels/jupyter_bridge.py (copied by postinstall)
|
|
27
|
+
* Dev: COCKPIT_ROOT/kernels/jupyter_bridge.py or legacy src path
|
|
28
|
+
*/
|
|
29
|
+
resolveBridgePath() {
|
|
30
|
+
const installedPath = join(homedir(), ".cockpit", "kernels", "jupyter_bridge.py");
|
|
31
|
+
if (existsSync(installedPath)) {
|
|
32
|
+
return installedPath;
|
|
33
|
+
}
|
|
34
|
+
const root = process.env.COCKPIT_ROOT;
|
|
35
|
+
if (root) {
|
|
36
|
+
const devPath = join(root, "kernels", "jupyter_bridge.py");
|
|
37
|
+
if (existsSync(devPath)) {
|
|
38
|
+
return devPath;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return join(__dirname, "jupyter_bridge.py");
|
|
42
|
+
}
|
|
22
43
|
/**
|
|
23
44
|
* Get or create a kernel for a bubble
|
|
24
45
|
*/
|
|
@@ -30,7 +51,7 @@ var JupyterKernelManager = class {
|
|
|
30
51
|
return existing;
|
|
31
52
|
}
|
|
32
53
|
const python = this.findPython();
|
|
33
|
-
const bridgePath =
|
|
54
|
+
const bridgePath = this.resolveBridgePath();
|
|
34
55
|
const bridge = spawn(python, ["-u", bridgePath], {
|
|
35
56
|
cwd,
|
|
36
57
|
env: {
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
// src/lib/paths.ts
|
|
2
|
+
import { homedir } from "os";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
5
|
+
import { existsSync, writeFileSync, mkdirSync, readdirSync } from "fs";
|
|
6
|
+
import { execSync } from "child_process";
|
|
7
|
+
var HOME_DIR = homedir();
|
|
8
|
+
var COCKPIT_DIR = join(HOME_DIR, ".cockpit");
|
|
9
|
+
var COCKPIT_PROJECTS_DIR = join(COCKPIT_DIR, "projects");
|
|
10
|
+
var GLOBAL_STATE_FILE = join(COCKPIT_DIR, "state.json");
|
|
11
|
+
var PINNED_SESSIONS_FILE = join(COCKPIT_DIR, "pinned-sessions.json");
|
|
12
|
+
var NOTE_FILE = join(COCKPIT_DIR, "note.md");
|
|
13
|
+
var SCHEDULED_TASKS_FILE = join(COCKPIT_DIR, "scheduled-tasks.json");
|
|
14
|
+
var SETTINGS_FILE = join(COCKPIT_DIR, "settings.json");
|
|
15
|
+
var REVIEW_DIR = join(COCKPIT_DIR, "review");
|
|
16
|
+
var REVIEW_SIGNAL_FILE = join(REVIEW_DIR, "_signal");
|
|
17
|
+
var CLAUDE_DIR = join(HOME_DIR, ".claude");
|
|
18
|
+
var CLAUDE_PROJECTS_DIR = join(CLAUDE_DIR, "projects");
|
|
19
|
+
function encodePath(path) {
|
|
20
|
+
return path.replace(/[/.]/g, "-");
|
|
21
|
+
}
|
|
22
|
+
function getCockpitProjectDir(cwd) {
|
|
23
|
+
return join(COCKPIT_PROJECTS_DIR, encodePath(cwd));
|
|
24
|
+
}
|
|
25
|
+
function getTerminalHistoryPath(cwd, tabId) {
|
|
26
|
+
return join(getCockpitProjectDir(cwd), `terminal-history-${tabId}.jsonl`);
|
|
27
|
+
}
|
|
28
|
+
function getTerminalOutputPath(cwd, commandId) {
|
|
29
|
+
return join(getCockpitProjectDir(cwd), `terminal-output-${commandId}.txt`);
|
|
30
|
+
}
|
|
31
|
+
function getClaudeProjectDir(cwd) {
|
|
32
|
+
return join(CLAUDE_PROJECTS_DIR, encodePath(cwd));
|
|
33
|
+
}
|
|
34
|
+
function getClaudeSessionPath(cwd, sessionId) {
|
|
35
|
+
return join(getClaudeProjectDir(cwd), `${sessionId}.jsonl`);
|
|
36
|
+
}
|
|
37
|
+
function getOllamaSessionsDir(cwd) {
|
|
38
|
+
return join(COCKPIT_DIR, "ollama-sessions", encodePath(cwd));
|
|
39
|
+
}
|
|
40
|
+
function getOllamaSessionPath(cwd, sessionId) {
|
|
41
|
+
return join(getOllamaSessionsDir(cwd), `${sessionId}.jsonl`);
|
|
42
|
+
}
|
|
43
|
+
function findCodexSessionPath(threadId) {
|
|
44
|
+
const codexSessionsDir = join(HOME_DIR, ".codex", "sessions");
|
|
45
|
+
if (!existsSync(codexSessionsDir)) return null;
|
|
46
|
+
const suffix = `-${threadId}.jsonl`;
|
|
47
|
+
try {
|
|
48
|
+
const result = execSync(
|
|
49
|
+
`find ${JSON.stringify(codexSessionsDir)} -name "*${threadId}.jsonl" -type f 2>/dev/null`,
|
|
50
|
+
{ encoding: "utf8", timeout: 3e3 }
|
|
51
|
+
).trim();
|
|
52
|
+
if (result) {
|
|
53
|
+
return result.split("\n")[0];
|
|
54
|
+
}
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
function findKimiSessionPath(sessionId) {
|
|
60
|
+
const sessionsDir = join(HOME_DIR, ".kimi", "sessions");
|
|
61
|
+
if (!existsSync(sessionsDir)) return null;
|
|
62
|
+
try {
|
|
63
|
+
for (const hash of readdirSync(sessionsDir)) {
|
|
64
|
+
const candidate = join(sessionsDir, hash, sessionId, "context.jsonl");
|
|
65
|
+
if (existsSync(candidate)) return candidate;
|
|
66
|
+
}
|
|
67
|
+
} catch {
|
|
68
|
+
}
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
async function ensureDir(dirPath) {
|
|
72
|
+
if (!existsSync(dirPath)) {
|
|
73
|
+
await mkdir(dirPath, { recursive: true });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
async function ensureParentDir(filePath) {
|
|
77
|
+
const dir = join(filePath, "..");
|
|
78
|
+
await ensureDir(dir);
|
|
79
|
+
}
|
|
80
|
+
async function readJsonFile(filePath, defaultValue) {
|
|
81
|
+
try {
|
|
82
|
+
const content = await readFile(filePath, "utf-8");
|
|
83
|
+
return JSON.parse(content);
|
|
84
|
+
} catch {
|
|
85
|
+
return defaultValue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function writeJsonFile(filePath, data) {
|
|
89
|
+
await ensureParentDir(filePath);
|
|
90
|
+
await writeFile(filePath, JSON.stringify(data, null, 2), "utf-8");
|
|
91
|
+
}
|
|
92
|
+
var fileLocks = /* @__PURE__ */ new Map();
|
|
93
|
+
function withFileLock(filePath, fn) {
|
|
94
|
+
const prev = fileLocks.get(filePath) ?? Promise.resolve();
|
|
95
|
+
const run = prev.then(fn);
|
|
96
|
+
const chain = run.then(() => {
|
|
97
|
+
}, () => {
|
|
98
|
+
});
|
|
99
|
+
fileLocks.set(filePath, chain);
|
|
100
|
+
chain.then(() => {
|
|
101
|
+
if (fileLocks.get(filePath) === chain) {
|
|
102
|
+
fileLocks.delete(filePath);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return run;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/lib/global-state.ts
|
|
109
|
+
import { createReadStream, existsSync as existsSync2 } from "fs";
|
|
110
|
+
import { createInterface } from "readline";
|
|
111
|
+
var MAX_SESSIONS = 15;
|
|
112
|
+
var MAX_TEXT_LEN = 50;
|
|
113
|
+
function truncate(s) {
|
|
114
|
+
if (!s) return s;
|
|
115
|
+
const chars = [...s];
|
|
116
|
+
return chars.length <= MAX_TEXT_LEN ? s : chars.slice(0, MAX_TEXT_LEN).join("") + "\u2026";
|
|
117
|
+
}
|
|
118
|
+
async function updateGlobalState(cwd, sessionId, status, title, lastUserMessage) {
|
|
119
|
+
if (!existsSync2(cwd)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
return withFileLock(GLOBAL_STATE_FILE, async () => {
|
|
123
|
+
const state = await readJsonFile(GLOBAL_STATE_FILE, { sessions: [] });
|
|
124
|
+
for (const s of state.sessions) {
|
|
125
|
+
if (!s.status) {
|
|
126
|
+
const legacy = s;
|
|
127
|
+
s.status = legacy.isLoading ? "loading" : "normal";
|
|
128
|
+
delete legacy.isLoading;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const existingIndex = state.sessions.findIndex(
|
|
132
|
+
(s) => s.cwd === cwd && s.sessionId === sessionId
|
|
133
|
+
);
|
|
134
|
+
const existed = existingIndex >= 0;
|
|
135
|
+
const existing = existed ? state.sessions[existingIndex] : void 0;
|
|
136
|
+
const newSession = {
|
|
137
|
+
cwd,
|
|
138
|
+
sessionId,
|
|
139
|
+
lastActive: Date.now(),
|
|
140
|
+
status,
|
|
141
|
+
title: truncate(title || existing?.title),
|
|
142
|
+
lastUserMessage: truncate(lastUserMessage || existing?.lastUserMessage)
|
|
143
|
+
};
|
|
144
|
+
if (existingIndex >= 0) {
|
|
145
|
+
state.sessions[existingIndex] = newSession;
|
|
146
|
+
} else {
|
|
147
|
+
state.sessions.push(newSession);
|
|
148
|
+
}
|
|
149
|
+
state.sessions.sort((a, b) => b.lastActive - a.lastActive);
|
|
150
|
+
state.sessions = state.sessions.slice(0, MAX_SESSIONS);
|
|
151
|
+
await writeJsonFile(GLOBAL_STATE_FILE, state);
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
async function getSessionTitle(cwd, sessionId) {
|
|
155
|
+
const claudePath = getClaudeSessionPath(cwd, sessionId);
|
|
156
|
+
if (existsSync2(claudePath)) {
|
|
157
|
+
return getClaudeStyleTitle(claudePath);
|
|
158
|
+
}
|
|
159
|
+
const ollamaPath = getOllamaSessionPath(cwd, sessionId);
|
|
160
|
+
if (existsSync2(ollamaPath)) {
|
|
161
|
+
return getClaudeStyleTitle(ollamaPath);
|
|
162
|
+
}
|
|
163
|
+
const codexPath = findCodexSessionPath(sessionId);
|
|
164
|
+
if (codexPath && existsSync2(codexPath)) {
|
|
165
|
+
const title = await getCodexTitle(codexPath);
|
|
166
|
+
return title || "Untitled Session";
|
|
167
|
+
}
|
|
168
|
+
const kimiPath = findKimiSessionPath(sessionId);
|
|
169
|
+
if (kimiPath && existsSync2(kimiPath)) {
|
|
170
|
+
const title = await getKimiTitle(kimiPath);
|
|
171
|
+
return title || "Untitled Session";
|
|
172
|
+
}
|
|
173
|
+
return "Untitled Session";
|
|
174
|
+
}
|
|
175
|
+
async function getLastUserMessage(cwd, sessionId) {
|
|
176
|
+
const claudePath = getClaudeSessionPath(cwd, sessionId);
|
|
177
|
+
if (existsSync2(claudePath)) {
|
|
178
|
+
return await getClaudeStyleLastUserMessage(claudePath);
|
|
179
|
+
}
|
|
180
|
+
const ollamaPath = getOllamaSessionPath(cwd, sessionId);
|
|
181
|
+
if (existsSync2(ollamaPath)) {
|
|
182
|
+
return await getClaudeStyleLastUserMessage(ollamaPath);
|
|
183
|
+
}
|
|
184
|
+
const codexPath = findCodexSessionPath(sessionId);
|
|
185
|
+
if (codexPath && existsSync2(codexPath)) {
|
|
186
|
+
return await getCodexLastUserMessage(codexPath);
|
|
187
|
+
}
|
|
188
|
+
const kimiPath = findKimiSessionPath(sessionId);
|
|
189
|
+
if (kimiPath && existsSync2(kimiPath)) {
|
|
190
|
+
return await getKimiLastUserMessage(kimiPath);
|
|
191
|
+
}
|
|
192
|
+
return void 0;
|
|
193
|
+
}
|
|
194
|
+
function filterCommandTags(text) {
|
|
195
|
+
let filtered = text.replace(/<command-[^>]*>[\s\S]*?<\/command-[^>]*>/g, "");
|
|
196
|
+
filtered = filtered.replace(/<local-command-[^>]*>[\s\S]*?<\/local-command-[^>]*>/g, "");
|
|
197
|
+
filtered = filtered.trim();
|
|
198
|
+
return filtered;
|
|
199
|
+
}
|
|
200
|
+
function isValidUserMessage(text) {
|
|
201
|
+
if (text.startsWith("This session is being continued")) return false;
|
|
202
|
+
if (text.startsWith("Caveat: The messages below")) return false;
|
|
203
|
+
if (!text.trim()) return false;
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
async function getClaudeStyleTitle(filePath) {
|
|
207
|
+
try {
|
|
208
|
+
const fileStream = createReadStream(filePath);
|
|
209
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
210
|
+
let summary = "";
|
|
211
|
+
const userMessages = [];
|
|
212
|
+
for await (const line of rl) {
|
|
213
|
+
if (!line.trim()) continue;
|
|
214
|
+
try {
|
|
215
|
+
const entry = JSON.parse(line);
|
|
216
|
+
if (entry.type === "summary" && entry.summary) {
|
|
217
|
+
summary = entry.summary;
|
|
218
|
+
}
|
|
219
|
+
if (entry.type === "user") {
|
|
220
|
+
const message = entry.message;
|
|
221
|
+
if (!message?.content) continue;
|
|
222
|
+
if (typeof message.content === "string") {
|
|
223
|
+
userMessages.push(message.content);
|
|
224
|
+
} else if (Array.isArray(message.content)) {
|
|
225
|
+
for (const block of message.content) {
|
|
226
|
+
if (block.type === "text" && block.text) userMessages.push(block.text);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
} catch {
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return generateTitle(summary, userMessages);
|
|
234
|
+
} catch {
|
|
235
|
+
return "Untitled Session";
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
async function getClaudeStyleLastUserMessage(filePath) {
|
|
239
|
+
try {
|
|
240
|
+
const fileStream = createReadStream(filePath);
|
|
241
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
242
|
+
let lastUserMessage;
|
|
243
|
+
for await (const line of rl) {
|
|
244
|
+
if (!line.trim()) continue;
|
|
245
|
+
try {
|
|
246
|
+
const entry = JSON.parse(line);
|
|
247
|
+
if (entry.type !== "user") continue;
|
|
248
|
+
const message = entry.message;
|
|
249
|
+
if (!message?.content) continue;
|
|
250
|
+
let text = "";
|
|
251
|
+
if (typeof message.content === "string") {
|
|
252
|
+
text = message.content;
|
|
253
|
+
} else if (Array.isArray(message.content)) {
|
|
254
|
+
for (const block of message.content) {
|
|
255
|
+
if (block.type === "text" && block.text) {
|
|
256
|
+
text = block.text;
|
|
257
|
+
break;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
if (!text) continue;
|
|
262
|
+
const filtered = filterCommandTags(text);
|
|
263
|
+
if (filtered && isValidUserMessage(filtered)) {
|
|
264
|
+
lastUserMessage = filtered;
|
|
265
|
+
}
|
|
266
|
+
} catch {
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return lastUserMessage;
|
|
270
|
+
} catch {
|
|
271
|
+
return void 0;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
async function getCodexLastUserMessage(filePath) {
|
|
275
|
+
try {
|
|
276
|
+
const fileStream = createReadStream(filePath);
|
|
277
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
278
|
+
let last;
|
|
279
|
+
for await (const line of rl) {
|
|
280
|
+
if (!line.trim()) continue;
|
|
281
|
+
let entry;
|
|
282
|
+
try {
|
|
283
|
+
entry = JSON.parse(line);
|
|
284
|
+
} catch {
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
if (entry.type !== "response_item") continue;
|
|
288
|
+
const payload = entry.payload;
|
|
289
|
+
if (!payload || payload.type !== "message" || payload.role !== "user") continue;
|
|
290
|
+
const text = payload.content?.filter((c) => c.type === "input_text" && c.text).map((c) => c.text).join("") || "";
|
|
291
|
+
if (!text || text.startsWith("<") || text.startsWith("#")) continue;
|
|
292
|
+
const filtered = filterCommandTags(text);
|
|
293
|
+
if (filtered && isValidUserMessage(filtered)) {
|
|
294
|
+
last = filtered;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return last;
|
|
298
|
+
} catch {
|
|
299
|
+
return void 0;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
async function getCodexTitle(filePath) {
|
|
303
|
+
try {
|
|
304
|
+
const fileStream = createReadStream(filePath);
|
|
305
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
306
|
+
for await (const line of rl) {
|
|
307
|
+
if (!line.trim()) continue;
|
|
308
|
+
let entry;
|
|
309
|
+
try {
|
|
310
|
+
entry = JSON.parse(line);
|
|
311
|
+
} catch {
|
|
312
|
+
continue;
|
|
313
|
+
}
|
|
314
|
+
if (entry.type !== "response_item") continue;
|
|
315
|
+
const payload = entry.payload;
|
|
316
|
+
if (!payload || payload.type !== "message" || payload.role !== "user") continue;
|
|
317
|
+
const text = payload.content?.filter((c) => c.type === "input_text" && c.text).map((c) => c.text).join("") || "";
|
|
318
|
+
if (!text || text.startsWith("<") || text.startsWith("#")) continue;
|
|
319
|
+
return text.slice(0, 80);
|
|
320
|
+
}
|
|
321
|
+
return void 0;
|
|
322
|
+
} catch {
|
|
323
|
+
return void 0;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
async function getKimiLastUserMessage(filePath) {
|
|
327
|
+
try {
|
|
328
|
+
const fileStream = createReadStream(filePath);
|
|
329
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
330
|
+
let last;
|
|
331
|
+
for await (const line of rl) {
|
|
332
|
+
if (!line.trim()) continue;
|
|
333
|
+
let entry;
|
|
334
|
+
try {
|
|
335
|
+
entry = JSON.parse(line);
|
|
336
|
+
} catch {
|
|
337
|
+
continue;
|
|
338
|
+
}
|
|
339
|
+
if (entry.role !== "user") continue;
|
|
340
|
+
const text = typeof entry.content === "string" ? entry.content : Array.isArray(entry.content) ? entry.content.filter((c) => (c.type === "input_text" || c.type === "text") && c.text).map((c) => c.text).join("") : "";
|
|
341
|
+
if (!text || text.startsWith("<system") || text.startsWith("<environment") || text.startsWith("# AGENTS.md") || text.startsWith("<permissions")) {
|
|
342
|
+
continue;
|
|
343
|
+
}
|
|
344
|
+
const filtered = filterCommandTags(text);
|
|
345
|
+
if (filtered && isValidUserMessage(filtered)) {
|
|
346
|
+
last = filtered;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
return last;
|
|
350
|
+
} catch {
|
|
351
|
+
return void 0;
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
async function getKimiTitle(filePath) {
|
|
355
|
+
try {
|
|
356
|
+
const fileStream = createReadStream(filePath);
|
|
357
|
+
const rl = createInterface({ input: fileStream, crlfDelay: Infinity });
|
|
358
|
+
for await (const line of rl) {
|
|
359
|
+
if (!line.trim()) continue;
|
|
360
|
+
let entry;
|
|
361
|
+
try {
|
|
362
|
+
entry = JSON.parse(line);
|
|
363
|
+
} catch {
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
if (entry.role !== "user") continue;
|
|
367
|
+
const text = typeof entry.content === "string" ? entry.content : Array.isArray(entry.content) ? entry.content.filter((c) => (c.type === "input_text" || c.type === "text") && c.text).map((c) => c.text).join("") : "";
|
|
368
|
+
if (!text || text.startsWith("<system") || text.startsWith("<environment") || text.startsWith("# AGENTS.md") || text.startsWith("<permissions")) {
|
|
369
|
+
continue;
|
|
370
|
+
}
|
|
371
|
+
return text.slice(0, 80);
|
|
372
|
+
}
|
|
373
|
+
return void 0;
|
|
374
|
+
} catch {
|
|
375
|
+
return void 0;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function generateTitle(summary, userMessages) {
|
|
379
|
+
if (summary) return summary;
|
|
380
|
+
let commandName = "";
|
|
381
|
+
for (const msg of userMessages) {
|
|
382
|
+
const filtered = filterCommandTags(msg);
|
|
383
|
+
if (!filtered) continue;
|
|
384
|
+
if (filtered.startsWith("/") && !commandName) {
|
|
385
|
+
commandName = filtered;
|
|
386
|
+
continue;
|
|
387
|
+
}
|
|
388
|
+
if (commandName) {
|
|
389
|
+
return `${commandName} ${filtered}`;
|
|
390
|
+
}
|
|
391
|
+
return filtered;
|
|
392
|
+
}
|
|
393
|
+
if (commandName) return commandName;
|
|
394
|
+
return "Untitled Session";
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
export {
|
|
398
|
+
GLOBAL_STATE_FILE,
|
|
399
|
+
SCHEDULED_TASKS_FILE,
|
|
400
|
+
REVIEW_DIR,
|
|
401
|
+
REVIEW_SIGNAL_FILE,
|
|
402
|
+
getTerminalHistoryPath,
|
|
403
|
+
getTerminalOutputPath,
|
|
404
|
+
ensureParentDir,
|
|
405
|
+
readJsonFile,
|
|
406
|
+
writeJsonFile,
|
|
407
|
+
updateGlobalState,
|
|
408
|
+
getSessionTitle,
|
|
409
|
+
getLastUserMessage
|
|
410
|
+
};
|
package/dist/scheduledTasks.mjs
CHANGED
package/dist/wsServer.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
getTerminalHistoryPath,
|
|
8
8
|
getTerminalOutputPath,
|
|
9
9
|
readJsonFile
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VV5VMA4B.mjs";
|
|
11
11
|
|
|
12
12
|
// src/lib/wsServer.ts
|
|
13
13
|
import { WebSocketServer, WebSocket as WebSocket2 } from "ws";
|
|
@@ -426,7 +426,7 @@ function registerCommand(cmd) {
|
|
|
426
426
|
if (cmd.ptyProcess) {
|
|
427
427
|
const pty = cmd.ptyProcess;
|
|
428
428
|
pty.onData((data) => {
|
|
429
|
-
|
|
429
|
+
notifyOutputListeners(cmd.commandId, data);
|
|
430
430
|
});
|
|
431
431
|
const ptyPid = cmd.pid;
|
|
432
432
|
pty.onExit(async ({ exitCode }) => {
|
|
@@ -1385,7 +1385,7 @@ async function handleJupyter(ws, bubbleId, cwd) {
|
|
|
1385
1385
|
ws.send(JSON.stringify({ type: "ping" }));
|
|
1386
1386
|
}
|
|
1387
1387
|
}, HEARTBEAT_INTERVAL);
|
|
1388
|
-
const { kernelManager } = await import("./JupyterKernelManager-
|
|
1388
|
+
const { kernelManager } = await import("./JupyterKernelManager-VBKKSRVJ.mjs");
|
|
1389
1389
|
try {
|
|
1390
1390
|
const instance = await kernelManager.getOrCreate(bubbleId, cwd);
|
|
1391
1391
|
if (instance.errorMessage) {
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Jupyter kernel bridge for Cockpit.
|
|
4
|
+
Manages a single IPython kernel, communicates via JSON-over-stdio.
|
|
5
|
+
|
|
6
|
+
stdin (commands):
|
|
7
|
+
{"cmd": "execute", "msg_id": "xxx", "code": "print('hello')"}
|
|
8
|
+
{"cmd": "interrupt"}
|
|
9
|
+
{"cmd": "complete", "msg_id": "xxx", "code": "pri", "cursor_pos": 3}
|
|
10
|
+
{"cmd": "shutdown"}
|
|
11
|
+
|
|
12
|
+
stdout (kernel messages):
|
|
13
|
+
{"type": "ready", "kernel_id": "..."}
|
|
14
|
+
{"msg_id": "xxx", "msg_type": "stream", "content": {"name": "stdout", "text": "hello\n"}}
|
|
15
|
+
{"msg_id": "xxx", "msg_type": "execute_result", "content": {"execution_count": 1, "data": {...}, "metadata": {}}}
|
|
16
|
+
{"msg_id": "xxx", "msg_type": "display_data", "content": {"data": {...}, "metadata": {}}}
|
|
17
|
+
{"msg_id": "xxx", "msg_type": "error", "content": {"ename": "...", "evalue": "...", "traceback": [...]}}
|
|
18
|
+
{"msg_id": "xxx", "msg_type": "status", "content": {"execution_state": "idle"}}
|
|
19
|
+
{"type": "error", "message": "..."}
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
import sys
|
|
23
|
+
import json
|
|
24
|
+
import threading
|
|
25
|
+
import os
|
|
26
|
+
|
|
27
|
+
def emit(obj):
|
|
28
|
+
"""Write a JSON line to stdout."""
|
|
29
|
+
sys.stdout.write(json.dumps(obj, ensure_ascii=False) + '\n')
|
|
30
|
+
sys.stdout.flush()
|
|
31
|
+
|
|
32
|
+
def main():
|
|
33
|
+
# Check dependencies
|
|
34
|
+
try:
|
|
35
|
+
import jupyter_client
|
|
36
|
+
except ImportError:
|
|
37
|
+
emit({"type": "error", "message": "jupyter_client not found. Run: pip install ipykernel"})
|
|
38
|
+
sys.exit(1)
|
|
39
|
+
|
|
40
|
+
cwd = os.environ.get('JUPYTER_CWD', os.getcwd())
|
|
41
|
+
|
|
42
|
+
# Start kernel
|
|
43
|
+
try:
|
|
44
|
+
km = jupyter_client.KernelManager(kernel_name='python3')
|
|
45
|
+
km.start_kernel(cwd=cwd)
|
|
46
|
+
except Exception as e:
|
|
47
|
+
emit({"type": "error", "message": f"Failed to start kernel: {e}"})
|
|
48
|
+
sys.exit(1)
|
|
49
|
+
|
|
50
|
+
kc = km.client()
|
|
51
|
+
kc.start_channels()
|
|
52
|
+
|
|
53
|
+
# Wait for kernel to be ready
|
|
54
|
+
try:
|
|
55
|
+
kc.wait_for_ready(timeout=30)
|
|
56
|
+
except Exception as e:
|
|
57
|
+
emit({"type": "error", "message": f"Kernel not ready: {e}"})
|
|
58
|
+
km.shutdown_kernel(now=True)
|
|
59
|
+
sys.exit(1)
|
|
60
|
+
|
|
61
|
+
emit({"type": "ready", "kernel_id": str(km.kernel_id)})
|
|
62
|
+
|
|
63
|
+
# Track which msg_ids are active (execute requests in progress)
|
|
64
|
+
active_executions = {} # parent_msg_id -> original msg_id from client
|
|
65
|
+
shutdown_flag = threading.Event()
|
|
66
|
+
|
|
67
|
+
def iopub_listener():
|
|
68
|
+
"""Background thread: read IOPub messages and emit them."""
|
|
69
|
+
while not shutdown_flag.is_set():
|
|
70
|
+
try:
|
|
71
|
+
msg = kc.get_iopub_msg(timeout=1)
|
|
72
|
+
except Exception:
|
|
73
|
+
continue
|
|
74
|
+
|
|
75
|
+
msg_type = msg.get('msg_type', '')
|
|
76
|
+
parent_id = msg.get('parent_header', {}).get('msg_id', '')
|
|
77
|
+
content = msg.get('content', {})
|
|
78
|
+
|
|
79
|
+
# Map parent_msg_id back to client's msg_id
|
|
80
|
+
client_msg_id = active_executions.get(parent_id, parent_id)
|
|
81
|
+
|
|
82
|
+
if msg_type in ('stream', 'execute_result', 'display_data', 'update_display_data', 'error'):
|
|
83
|
+
out = {
|
|
84
|
+
"msg_id": client_msg_id,
|
|
85
|
+
"msg_type": msg_type,
|
|
86
|
+
"content": content,
|
|
87
|
+
}
|
|
88
|
+
emit(out)
|
|
89
|
+
elif msg_type == 'status':
|
|
90
|
+
state = content.get('execution_state', '')
|
|
91
|
+
emit({
|
|
92
|
+
"msg_id": client_msg_id,
|
|
93
|
+
"msg_type": "status",
|
|
94
|
+
"content": {"execution_state": state},
|
|
95
|
+
})
|
|
96
|
+
if state == 'idle' and parent_id in active_executions:
|
|
97
|
+
del active_executions[parent_id]
|
|
98
|
+
|
|
99
|
+
listener = threading.Thread(target=iopub_listener, daemon=True)
|
|
100
|
+
listener.start()
|
|
101
|
+
|
|
102
|
+
# Main loop: read commands from stdin
|
|
103
|
+
try:
|
|
104
|
+
for line in sys.stdin:
|
|
105
|
+
line = line.strip()
|
|
106
|
+
if not line:
|
|
107
|
+
continue
|
|
108
|
+
|
|
109
|
+
try:
|
|
110
|
+
cmd = json.loads(line)
|
|
111
|
+
except json.JSONDecodeError:
|
|
112
|
+
continue
|
|
113
|
+
|
|
114
|
+
action = cmd.get('cmd', '')
|
|
115
|
+
|
|
116
|
+
if action == 'execute':
|
|
117
|
+
code = cmd.get('code', '')
|
|
118
|
+
client_msg_id = cmd.get('msg_id', '')
|
|
119
|
+
reply = kc.execute(code, allow_stdin=False)
|
|
120
|
+
# reply is the kernel's msg_id — map it to client's msg_id
|
|
121
|
+
active_executions[reply] = client_msg_id
|
|
122
|
+
|
|
123
|
+
elif action == 'interrupt':
|
|
124
|
+
try:
|
|
125
|
+
km.interrupt_kernel()
|
|
126
|
+
except Exception as e:
|
|
127
|
+
emit({"type": "error", "message": f"Interrupt failed: {e}"})
|
|
128
|
+
|
|
129
|
+
elif action == 'complete':
|
|
130
|
+
code = cmd.get('code', '')
|
|
131
|
+
cursor_pos = cmd.get('cursor_pos', len(code))
|
|
132
|
+
client_msg_id = cmd.get('msg_id', '')
|
|
133
|
+
reply_id = kc.complete(code, cursor_pos)
|
|
134
|
+
try:
|
|
135
|
+
reply = kc.get_shell_msg(timeout=5)
|
|
136
|
+
emit({
|
|
137
|
+
"msg_id": client_msg_id,
|
|
138
|
+
"msg_type": "complete_reply",
|
|
139
|
+
"content": reply.get('content', {}),
|
|
140
|
+
})
|
|
141
|
+
except Exception:
|
|
142
|
+
emit({
|
|
143
|
+
"msg_id": client_msg_id,
|
|
144
|
+
"msg_type": "complete_reply",
|
|
145
|
+
"content": {"matches": [], "status": "error"},
|
|
146
|
+
})
|
|
147
|
+
|
|
148
|
+
elif action == 'shutdown':
|
|
149
|
+
break
|
|
150
|
+
|
|
151
|
+
except (EOFError, KeyboardInterrupt):
|
|
152
|
+
pass
|
|
153
|
+
finally:
|
|
154
|
+
shutdown_flag.set()
|
|
155
|
+
try:
|
|
156
|
+
kc.stop_channels()
|
|
157
|
+
km.shutdown_kernel(now=True)
|
|
158
|
+
except Exception:
|
|
159
|
+
pass
|
|
160
|
+
|
|
161
|
+
if __name__ == '__main__':
|
|
162
|
+
main()
|