@surething/cockpit 1.0.213 → 1.0.214
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +7 -3
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +24 -0
- package/.next-prod/server/app/_global-error/page.js +3 -3
- package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page.js +2 -2
- package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +1 -1
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/agent/test/route.js +1 -1
- package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/bash/route.js +1 -1
- package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js +1 -1
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/kimi/route.js +2 -2
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/ollama/route.js +3 -3
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/chat/route.js +2 -2
- 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 +2 -2
- 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 +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js +1 -1
- package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/git/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 +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +1 -1
- 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/affected/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/affected/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/affected/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/callees/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callees/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/callers/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/coedit/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/context/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/context/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/context/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js +1 -1
- package/.next-prod/server/app/api/projectGraph/impact/route.js.nft.json +1 -1
- package/.next-prod/server/app/api/projectGraph/related/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/related/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/related/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route.js +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/projectGraph/risk/route_client-reference-manifest.js +1 -0
- 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 +1 -1
- package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
- package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next-prod/server/app/page.js +2 -2
- package/.next-prod/server/app/page.js.nft.json +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +2 -2
- package/.next-prod/server/app/project/page.js.nft.json +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +7 -3
- package/.next-prod/server/chunks/2540.js +1 -0
- package/.next-prod/server/chunks/2939.js +1 -1
- package/.next-prod/server/chunks/4008.js +1 -0
- package/.next-prod/server/chunks/7828.js +79 -2
- package/.next-prod/server/chunks/9658.js +3 -3
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +1 -1
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/2171-1d5aa2a301006dfb.js +1 -0
- package/.next-prod/static/chunks/{5188-3337a5d88efc5fc1.js → 5188-38f55b21ae1eeb28.js} +1 -1
- package/.next-prod/static/chunks/6345-fc2d45a72316c5f8.js +14 -0
- package/.next-prod/static/chunks/{aaea2bcf-be8b39a8f32280f3.js → aaea2bcf-56770c8875ee56c9.js} +1 -1
- package/.next-prod/static/chunks/app/_global-error/page-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/agent/test/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/dev/spans/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/affected/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/context/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/related/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/risk/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-8ae56b9359db0996.js +1 -0
- package/.next-prod/static/ekMRRxcvpy2AIjMrVn4lK/_buildManifest.js +1 -0
- package/.next-prod/trace +13 -12
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/projectGraph/affected/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/context/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/related/route.ts +351 -0
- package/.next-prod/types/app/api/projectGraph/risk/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +5 -1
- package/.next-prod/types/validator.ts +36 -0
- package/README.md +0 -1
- package/README.zh.md +0 -1
- package/bin/cock-affected.mjs +190 -0
- package/bin/cock-terminal.mjs +471 -159
- package/bin/cock.mjs +9 -1
- package/dist/cache-GIQJA4HL.mjs +502 -0
- package/dist/chunk-7P6ASYW6.mjs +9 -0
- package/dist/{chunk-OWUW2O3D.mjs → chunk-CZWJPTRO.mjs} +4 -2
- package/dist/{chunk-FBR4KJI5.mjs → chunk-KRTISG5I.mjs} +213 -2
- package/dist/{chunk-TXBVUZVH.mjs → chunk-ZJ6CC3MH.mjs} +0 -7
- package/dist/httpApi.mjs +203 -17
- package/dist/scheduledTasks.mjs +3 -2
- package/dist/{server-E7G55DY7.mjs → server-OSOMFNXR.mjs} +27 -4
- package/dist/wsServer.mjs +8 -34
- package/package.json +3 -1
- package/.next-prod/static/-BWPF5YtAsgnego1UPtt9/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/2171-5163d946ec03ce80.js +0 -1
- package/.next-prod/static/chunks/6345-4299a3385983e28c.js +0 -14
- package/.next-prod/static/chunks/app/_global-error/page-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/agent/test/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/bash/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/codex/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/deepseek/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/dev/spans/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callees/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/callers/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/coedit/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/impact/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projectGraph/search/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-994734ef0d317687.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-994734ef0d317687.js +0 -1
- /package/.next-prod/static/{-BWPF5YtAsgnego1UPtt9 → ekMRRxcvpy2AIjMrVn4lK}/_ssgManifest.js +0 -0
package/bin/cock-terminal.mjs
CHANGED
|
@@ -1,215 +1,527 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* cockpit terminal
|
|
4
|
+
* cockpit terminal — read-only analysis CLI for running terminal bubbles.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* 4 subcommands (read-only by design; write side belongs to Bash tool / web UI):
|
|
7
|
+
*
|
|
8
|
+
* cock terminal list Discover terminals
|
|
9
|
+
* cock terminal <id> [--json] Status / meta
|
|
10
|
+
* cock terminal <id> output [flags] Read + filter + global lineno
|
|
11
|
+
* cock terminal <id> wait <mode> [flags] Wait for pattern / idle / exit
|
|
12
|
+
*
|
|
13
|
+
* The CLI is a thin HTTP wrapper. All filtering, lineno bookkeeping, and
|
|
14
|
+
* waiting happens on the server (see packages/feature/console/server/terminal).
|
|
15
|
+
*
|
|
16
|
+
* Global line numbers (`--since N`, `--around N`, `next` in JSON envelopes)
|
|
17
|
+
* are MONOTONIC across the terminal's lifetime — they do not shift when the
|
|
18
|
+
* server's ring buffer trims older lines. `firstAvailable` tells you the
|
|
19
|
+
* smallest line still reachable; `truncated:true` tells you your cursor or
|
|
20
|
+
* window fell partly outside the live buffer.
|
|
7
21
|
*/
|
|
8
22
|
|
|
9
|
-
const args = process.argv.slice(2);
|
|
10
|
-
|
|
11
|
-
// Read prod port from ~/.cockpit/server.json
|
|
12
23
|
import { readFileSync } from 'fs';
|
|
13
24
|
import { join } from 'path';
|
|
14
25
|
import { homedir } from 'os';
|
|
26
|
+
|
|
27
|
+
const args = process.argv.slice(2);
|
|
28
|
+
|
|
29
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
30
|
+
/* Bootstrap */
|
|
31
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
32
|
+
|
|
15
33
|
function readServerPort() {
|
|
16
34
|
try {
|
|
17
35
|
return JSON.parse(readFileSync(join(homedir(), '.cockpit', 'server.json'), 'utf8')).port;
|
|
18
|
-
} catch {
|
|
36
|
+
} catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
19
39
|
}
|
|
20
40
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
41
|
+
const port = process.env.COCKPIT_PORT || readServerPort() || 3457;
|
|
42
|
+
const baseUrl = `http://localhost:${port}`;
|
|
43
|
+
|
|
44
|
+
async function post(path, body, timeoutMs = 10000) {
|
|
45
|
+
try {
|
|
46
|
+
const res = await fetch(`${baseUrl}${path}`, {
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: { 'Content-Type': 'application/json' },
|
|
49
|
+
body: JSON.stringify(body || {}),
|
|
50
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
51
|
+
});
|
|
52
|
+
const data = await res.json().catch(() => null);
|
|
53
|
+
if (!res.ok || !data?.ok) {
|
|
54
|
+
const msg = data?.error || `HTTP ${res.status}`;
|
|
55
|
+
throw new Error(msg);
|
|
56
|
+
}
|
|
57
|
+
return data.data;
|
|
58
|
+
} catch (err) {
|
|
59
|
+
if (err.cause?.code === 'ECONNREFUSED') {
|
|
60
|
+
console.error(`Connection refused: Cockpit server not running at ${baseUrl}`);
|
|
61
|
+
} else {
|
|
62
|
+
console.error(`Error: ${err.message}`);
|
|
63
|
+
}
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
24
67
|
|
|
25
|
-
|
|
68
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
69
|
+
/* Flag parsing — minimal, no dependency */
|
|
70
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
26
71
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
72
|
+
/**
|
|
73
|
+
* Parse `argv` looking for flags described by `spec`. Returns
|
|
74
|
+
* `{flags, positional}`. Flags accept:
|
|
75
|
+
* - boolean (no value)
|
|
76
|
+
* - 'string' / 'number' (takes the next argv as value)
|
|
77
|
+
*
|
|
78
|
+
* Unknown flags fail loudly so typos surface.
|
|
79
|
+
*/
|
|
80
|
+
function parseFlags(argv, spec) {
|
|
81
|
+
const flags = {};
|
|
82
|
+
const positional = [];
|
|
83
|
+
for (let i = 0; i < argv.length; i++) {
|
|
84
|
+
const tok = argv[i];
|
|
85
|
+
if (!tok.startsWith('--')) {
|
|
86
|
+
positional.push(tok);
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
89
|
+
const name = tok.slice(2);
|
|
90
|
+
if (!(name in spec)) {
|
|
91
|
+
console.error(`Unknown flag: --${name}`);
|
|
92
|
+
process.exit(2);
|
|
93
|
+
}
|
|
94
|
+
const type = spec[name];
|
|
95
|
+
if (type === 'boolean') {
|
|
96
|
+
flags[name] = true;
|
|
32
97
|
} else {
|
|
33
|
-
|
|
98
|
+
const val = argv[++i];
|
|
99
|
+
if (val === undefined) {
|
|
100
|
+
console.error(`Missing value for --${name}`);
|
|
101
|
+
process.exit(2);
|
|
102
|
+
}
|
|
103
|
+
flags[name] = type === 'number' ? Number(val) : val;
|
|
104
|
+
if (type === 'number' && Number.isNaN(flags[name])) {
|
|
105
|
+
console.error(`--${name} requires a number, got "${val}"`);
|
|
106
|
+
process.exit(2);
|
|
107
|
+
}
|
|
34
108
|
}
|
|
35
109
|
}
|
|
110
|
+
return { flags, positional };
|
|
111
|
+
}
|
|
36
112
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
follow Stream real-time output (Ctrl+C to stop)
|
|
41
|
-
stdin <data> Send input to process
|
|
113
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
114
|
+
/* Top-level help */
|
|
115
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
42
116
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Use \`stdin\` to send commands or input to the process.
|
|
117
|
+
function printTopHelp() {
|
|
118
|
+
console.log(`Analyse output of long-running terminal bubbles inside Cockpit.
|
|
46
119
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
cockpit terminal ${prefix} output # 3. read new output
|
|
51
|
-
cockpit terminal ${prefix} follow # stream output in real-time`);
|
|
52
|
-
}
|
|
120
|
+
This CLI is READ-ONLY by design — the write side (stdin, signals, kill) is
|
|
121
|
+
covered by the Bash tool (spawn your own process) or the Cockpit web UI
|
|
122
|
+
(human types into the bubble). cock terminal only reads, filters, and waits.
|
|
53
123
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
124
|
+
Usage: cockpit terminal <id> <action> [flags]
|
|
125
|
+
cockpit terminal list
|
|
126
|
+
|
|
127
|
+
Subcommands:
|
|
128
|
+
list List all terminals (use --json for structured)
|
|
129
|
+
<id> Show terminal status + FULL action cheat sheet
|
|
130
|
+
← start here when you don't know what flags exist
|
|
131
|
+
<id> output [flags] Read buffered output (filter / context / cursor)
|
|
132
|
+
<id> wait <mode> [flags] Block until pattern / idle / exit / timeout
|
|
133
|
+
|
|
134
|
+
For specific flag docs:
|
|
135
|
+
cockpit terminal <id> show all flags for this terminal
|
|
136
|
+
cockpit terminal <id> output --help output flags
|
|
137
|
+
cockpit terminal <id> wait --help wait flags
|
|
138
|
+
|
|
139
|
+
Quick orientation if you don't have an id yet:
|
|
140
|
+
cockpit terminal list → pick a shortId from the list
|
|
141
|
+
cockpit terminal <shortId> → see status + full cheat sheet`);
|
|
57
142
|
}
|
|
58
143
|
|
|
59
|
-
|
|
144
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
145
|
+
/* list */
|
|
146
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
60
147
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if (!action || action === '--help' || action === '-h') {
|
|
68
|
-
action = '_status';
|
|
148
|
+
async function cmdList(rest) {
|
|
149
|
+
const { flags } = parseFlags(rest, { json: 'boolean' });
|
|
150
|
+
const list = await post('/api/terminal/list', {});
|
|
151
|
+
if (flags.json) {
|
|
152
|
+
process.stdout.write(JSON.stringify({ terminals: list }) + '\n');
|
|
153
|
+
return;
|
|
69
154
|
}
|
|
155
|
+
if (list.length === 0) {
|
|
156
|
+
console.log('No running terminals');
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
for (const t of list) {
|
|
160
|
+
const dot = t.running ? '●' : '○';
|
|
161
|
+
const ptyTag = t.usePty ? ' [pty]' : '';
|
|
162
|
+
console.log(`${dot} ${t.shortId} ${t.running ? 'running' : 'stopped'}${ptyTag} ${t.command}`);
|
|
163
|
+
}
|
|
164
|
+
// Hint AI to the next step. The cheat sheet on the meta page is the real
|
|
165
|
+
// entry point — list alone doesn't tell you how to act on any of these ids.
|
|
166
|
+
console.log('');
|
|
167
|
+
console.log(`Next: cock terminal <shortId> (status + full action cheat sheet)`);
|
|
70
168
|
}
|
|
71
169
|
|
|
72
|
-
|
|
170
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
171
|
+
/* <id> meta */
|
|
172
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
73
173
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
const
|
|
174
|
+
function formatRelative(iso) {
|
|
175
|
+
if (!iso) return 'never';
|
|
176
|
+
const ms = Date.now() - new Date(iso).getTime();
|
|
177
|
+
if (ms < 1000) return 'just now';
|
|
178
|
+
if (ms < 60000) return `${Math.floor(ms / 1000)}s ago`;
|
|
179
|
+
if (ms < 3600000) return `${Math.floor(ms / 60000)}m ago`;
|
|
180
|
+
return `${Math.floor(ms / 3600000)}h ago`;
|
|
181
|
+
}
|
|
77
182
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
183
|
+
/**
|
|
184
|
+
* Cheat sheet rendered into the `<id>` meta output. AI agents have no memory
|
|
185
|
+
* between tool calls — this is their entry point and must self-describe the
|
|
186
|
+
* full surface area. Includes a copy-pasteable workflow section keyed off
|
|
187
|
+
* the actual id so the agent can use it without templating.
|
|
188
|
+
*/
|
|
189
|
+
function actionsCheatSheet(id) {
|
|
190
|
+
return `Available actions:
|
|
191
|
+
|
|
192
|
+
cock terminal ${id} output [flags] Read buffered output (filter + global lineno)
|
|
193
|
+
cock terminal ${id} wait <mode> [flags] Block until pattern / idle / exit / timeout
|
|
194
|
+
|
|
195
|
+
Output — read mode (pick one, default = entire buffer):
|
|
196
|
+
--since <N> Continue from global line number N (cursor from previous call).
|
|
197
|
+
Line numbers are MONOTONIC and stable across ring buffer trims.
|
|
198
|
+
--tail <N> Last N complete lines
|
|
199
|
+
--head <N> First N complete lines still in the ring
|
|
200
|
+
--around <N> Window around global line N (use with --context)
|
|
201
|
+
--context <K> Context size for --around (default 5)
|
|
202
|
+
|
|
203
|
+
Output — filtering / display:
|
|
204
|
+
--grep <regex> Server-side regex over each line (post-strip)
|
|
205
|
+
--ignore-case, -i Case-insensitive grep
|
|
206
|
+
--no-ansi/--keep-ansi Strip ANSI control sequences (default: on)
|
|
207
|
+
--collapse-cr/--keep-cr Fold \\r overwrites within line (default: on)
|
|
208
|
+
--with-lineno/--no-prefix Lineno prefix (grep/around default: on)
|
|
209
|
+
--max-bytes <N> Cap response body (default 65536; trims oldest first)
|
|
210
|
+
--json JSON envelope on stdout
|
|
211
|
+
|
|
212
|
+
Output raw format:
|
|
213
|
+
stdout = lines (each prefixed with "<lineno>: " in grep/around modes)
|
|
214
|
+
stderr last line = {"next":N,"firstAvailable":M,"totalLines":T,"truncated":bool,"running":bool,"matched":K}
|
|
215
|
+
Use the "next" value as --since for the next call to read only new output.
|
|
216
|
+
|
|
217
|
+
Wait — pick exactly one mode:
|
|
218
|
+
--pattern <regex> Wait until an output line matches (does NOT scan history,
|
|
219
|
+
only new output after this call)
|
|
220
|
+
--idle <s> Wait until s seconds elapse with no new output
|
|
221
|
+
--exit Wait until command exits
|
|
222
|
+
--timeout <s> Total deadline in seconds (default 30)
|
|
223
|
+
--print Echo received output to stdout
|
|
224
|
+
--json JSON envelope
|
|
225
|
+
|
|
226
|
+
Wait exit codes: 0=condition met, 124=timeout (GNU convention), 2=bad usage, 1=other.
|
|
227
|
+
|
|
228
|
+
Common workflows:
|
|
229
|
+
# Find error candidates with global line numbers
|
|
230
|
+
cock terminal ${id} output --grep error -i
|
|
231
|
+
|
|
232
|
+
# Inspect 15 lines around line 4920
|
|
233
|
+
cock terminal ${id} output --around 4920 --context 15
|
|
234
|
+
|
|
235
|
+
# Incremental read — pass 'next' from previous call's stderr
|
|
236
|
+
cock terminal ${id} output --since 5100
|
|
237
|
+
|
|
238
|
+
# Wait until build settles (3s idle)
|
|
239
|
+
cock terminal ${id} wait --idle 3 --timeout 60
|
|
240
|
+
|
|
241
|
+
# Wait until dev server announces ready
|
|
242
|
+
cock terminal ${id} wait --pattern 'Ready in' --timeout 90 --print
|
|
243
|
+
|
|
244
|
+
# Programmatic — both stdout/stderr fields available in one JSON
|
|
245
|
+
cock terminal ${id} output --tail 50 --json | jq .`;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
async function cmdMeta(id, rest) {
|
|
249
|
+
const { flags } = parseFlags(rest, { json: 'boolean' });
|
|
250
|
+
const meta = await post('/api/terminal/meta', { id });
|
|
251
|
+
if (flags.json) {
|
|
252
|
+
process.stdout.write(JSON.stringify(meta) + '\n');
|
|
98
253
|
return;
|
|
99
254
|
}
|
|
255
|
+
const mode = meta.usePty ? 'pty' : 'pipe';
|
|
256
|
+
if (meta.running) {
|
|
257
|
+
console.log(`Terminal ${meta.shortId} (running, ${mode})`);
|
|
258
|
+
console.log(` command: ${meta.command}`);
|
|
259
|
+
console.log(` pid: ${meta.pid}`);
|
|
260
|
+
if (meta.cwd) console.log(` cwd: ${meta.cwd}`);
|
|
261
|
+
console.log(` started: ${formatRelative(meta.startedAt)}`);
|
|
262
|
+
console.log(` last output: ${formatRelative(meta.lastOutputAt)}`);
|
|
263
|
+
const truncTag =
|
|
264
|
+
meta.firstAvailable > 0
|
|
265
|
+
? ` (truncated, first available line ${meta.firstAvailable})`
|
|
266
|
+
: '';
|
|
267
|
+
console.log(` output: ${meta.totalLines} lines${truncTag}`);
|
|
268
|
+
console.log('');
|
|
269
|
+
console.log(actionsCheatSheet(meta.shortId));
|
|
270
|
+
} else {
|
|
271
|
+
console.log(`Terminal ${meta.shortId} (stopped)`);
|
|
272
|
+
console.log(` command: ${meta.command}`);
|
|
273
|
+
console.log('');
|
|
274
|
+
console.log('Output of stopped terminals is read from JSONL history; live cursor/grep/wait do not apply.');
|
|
275
|
+
}
|
|
276
|
+
}
|
|
100
277
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
278
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
279
|
+
/* <id> output */
|
|
280
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
281
|
+
|
|
282
|
+
const OUTPUT_FLAG_SPEC = {
|
|
283
|
+
// read mode (mutually exclusive)
|
|
284
|
+
since: 'number',
|
|
285
|
+
tail: 'number',
|
|
286
|
+
head: 'number',
|
|
287
|
+
around: 'number',
|
|
288
|
+
context: 'number',
|
|
289
|
+
// filtering
|
|
290
|
+
grep: 'string',
|
|
291
|
+
['ignore-case']: 'boolean',
|
|
292
|
+
i: 'boolean', // alias for ignore-case
|
|
293
|
+
// display
|
|
294
|
+
['no-ansi']: 'boolean',
|
|
295
|
+
['keep-ansi']: 'boolean',
|
|
296
|
+
['collapse-cr']: 'boolean',
|
|
297
|
+
['keep-cr']: 'boolean',
|
|
298
|
+
['with-lineno']: 'boolean',
|
|
299
|
+
['no-prefix']: 'boolean',
|
|
300
|
+
['max-bytes']: 'number',
|
|
301
|
+
json: 'boolean',
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
function printOutputHelp() {
|
|
305
|
+
console.log(`Usage: cock terminal <id> output [flags]
|
|
306
|
+
|
|
307
|
+
Read modes (pick one, default = entire buffer):
|
|
308
|
+
--since <N> Continue from global line number N (cursor)
|
|
309
|
+
--tail <N> Last N complete lines
|
|
310
|
+
--head <N> First N complete lines still in the ring
|
|
311
|
+
--around <N> Lines around global line N (use with --context)
|
|
312
|
+
--context <K> Context size for --around (default 5)
|
|
313
|
+
|
|
314
|
+
Filtering:
|
|
315
|
+
--grep <regex> Server-side regex over each line (post-strip)
|
|
316
|
+
--ignore-case, -i Case-insensitive grep
|
|
317
|
+
--since <N> May be combined with --grep to bound scan
|
|
318
|
+
|
|
319
|
+
Display:
|
|
320
|
+
--no-ansi Strip ANSI control sequences (default: on; --keep-ansi to disable)
|
|
321
|
+
--keep-ansi Force-keep ANSI
|
|
322
|
+
--collapse-cr Fold \\r-overwrites within each line (default: on; --keep-cr to disable)
|
|
323
|
+
--keep-cr Force-keep \\r
|
|
324
|
+
--with-lineno Prefix each line with "<lineno>: "
|
|
325
|
+
--no-prefix Force no lineno prefix
|
|
326
|
+
--max-bytes <N> Cap response body (default 65536; trims oldest first)
|
|
327
|
+
--json Return JSON envelope on stdout
|
|
328
|
+
|
|
329
|
+
Default prefix behaviour:
|
|
330
|
+
--grep / --around prefix on
|
|
331
|
+
--since/--tail/--head prefix off
|
|
332
|
+
`);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
async function cmdOutput(id, rest) {
|
|
336
|
+
if (rest.includes('--help') || rest.includes('-h')) {
|
|
337
|
+
printOutputHelp();
|
|
125
338
|
return;
|
|
126
339
|
}
|
|
340
|
+
const { flags } = parseFlags(rest, OUTPUT_FLAG_SPEC);
|
|
127
341
|
|
|
128
|
-
//
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
342
|
+
// Reconcile keep- / no- conflicts (later flag wins).
|
|
343
|
+
const ansiFlag =
|
|
344
|
+
flags['keep-ansi'] ? false : flags['no-ansi'] ? true : undefined;
|
|
345
|
+
const crFlag =
|
|
346
|
+
flags['keep-cr'] ? false : flags['collapse-cr'] ? true : undefined;
|
|
347
|
+
|
|
348
|
+
const body = {
|
|
349
|
+
id,
|
|
350
|
+
...(typeof flags.since === 'number' ? { since: flags.since } : {}),
|
|
351
|
+
...(typeof flags.tail === 'number' ? { tail: flags.tail } : {}),
|
|
352
|
+
...(typeof flags.head === 'number' ? { head: flags.head } : {}),
|
|
353
|
+
...(typeof flags.around === 'number' ? { around: flags.around } : {}),
|
|
354
|
+
...(typeof flags.context === 'number' ? { context: flags.context } : {}),
|
|
355
|
+
...(flags.grep ? { grep: flags.grep } : {}),
|
|
356
|
+
...(flags['ignore-case'] || flags.i ? { ignoreCase: true } : {}),
|
|
357
|
+
...(ansiFlag !== undefined ? { noAnsi: ansiFlag } : {}),
|
|
358
|
+
...(crFlag !== undefined ? { collapseCr: crFlag } : {}),
|
|
359
|
+
...(typeof flags['max-bytes'] === 'number'
|
|
360
|
+
? { maxBytes: flags['max-bytes'] }
|
|
361
|
+
: {}),
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
const data = await post('/api/terminal/output', body, 30000);
|
|
365
|
+
|
|
366
|
+
if (flags.json) {
|
|
367
|
+
process.stdout.write(JSON.stringify(data) + '\n');
|
|
146
368
|
return;
|
|
147
369
|
}
|
|
148
370
|
|
|
149
|
-
//
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
signal: AbortSignal.timeout(5000),
|
|
162
|
-
});
|
|
163
|
-
const data = await res.json();
|
|
164
|
-
if (!data.ok) { console.error(data.error); process.exit(1); }
|
|
165
|
-
} catch (err) {
|
|
166
|
-
console.error(`Error: ${err.message}`);
|
|
167
|
-
process.exit(1);
|
|
371
|
+
// Default prefix: on for grep/around, off otherwise. Explicit
|
|
372
|
+
// --with-lineno / --no-prefix override.
|
|
373
|
+
const grepOrAround = !!flags.grep || typeof flags.around === 'number';
|
|
374
|
+
let withLineno = grepOrAround;
|
|
375
|
+
if (flags['with-lineno']) withLineno = true;
|
|
376
|
+
if (flags['no-prefix']) withLineno = false;
|
|
377
|
+
|
|
378
|
+
for (const m of data.matches) {
|
|
379
|
+
if (withLineno) {
|
|
380
|
+
process.stdout.write(`${m.lineno}: ${m.text}\n`);
|
|
381
|
+
} else {
|
|
382
|
+
process.stdout.write(`${m.text}\n`);
|
|
168
383
|
}
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
// Idle interactive prompt heuristic: when a PTY terminal hasn't run any
|
|
387
|
+
// command, its buffer is dominated by zsh prompt redraws (`\r\x1b[K…`).
|
|
388
|
+
// After strip-ansi + collapse-cr these collapse to empty strings, so the
|
|
389
|
+
// user sees blank lines and may think the call is broken. Tell them.
|
|
390
|
+
if (
|
|
391
|
+
data.matches.length > 0 &&
|
|
392
|
+
data.matches.every((m) => m.text === '')
|
|
393
|
+
) {
|
|
394
|
+
process.stderr.write(
|
|
395
|
+
`(${data.matches.length} lines returned, all empty after strip-ansi + ` +
|
|
396
|
+
`collapse-cr — likely an idle interactive shell. ` +
|
|
397
|
+
`Use --keep-ansi --keep-cr to see raw bytes, ` +
|
|
398
|
+
`or wait for actual command output.)\n`,
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
// Cursor + truncation info on stderr so AI can pipe stdout cleanly.
|
|
403
|
+
const meta = {
|
|
404
|
+
next: data.next,
|
|
405
|
+
firstAvailable: data.firstAvailable,
|
|
406
|
+
totalLines: data.totalLines,
|
|
407
|
+
truncated: data.truncated,
|
|
408
|
+
running: data.running,
|
|
409
|
+
matched: data.matches.length,
|
|
410
|
+
};
|
|
411
|
+
process.stderr.write(JSON.stringify(meta) + '\n');
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
415
|
+
/* <id> wait */
|
|
416
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
417
|
+
|
|
418
|
+
const WAIT_FLAG_SPEC = {
|
|
419
|
+
pattern: 'string',
|
|
420
|
+
idle: 'number',
|
|
421
|
+
exit: 'boolean',
|
|
422
|
+
timeout: 'number',
|
|
423
|
+
print: 'boolean',
|
|
424
|
+
json: 'boolean',
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
function printWaitHelp() {
|
|
428
|
+
console.log(`Usage: cock terminal <id> wait [flags]
|
|
429
|
+
|
|
430
|
+
Modes (exactly one):
|
|
431
|
+
--pattern <regex> Wait until output line matches regex
|
|
432
|
+
--idle <s> Wait until s seconds elapse without new output
|
|
433
|
+
--exit Wait until the command exits
|
|
434
|
+
|
|
435
|
+
Common:
|
|
436
|
+
--timeout <s> Total deadline (default 30s)
|
|
437
|
+
--print Echo received output to stdout (only meaningful for --pattern / --idle)
|
|
438
|
+
--json JSON envelope instead of text
|
|
439
|
+
|
|
440
|
+
Exit codes:
|
|
441
|
+
0 condition satisfied
|
|
442
|
+
124 timeout (GNU \`timeout\` convention)
|
|
443
|
+
2 bad usage
|
|
444
|
+
1 other error
|
|
445
|
+
`);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
async function cmdWait(id, rest) {
|
|
449
|
+
if (rest.includes('--help') || rest.includes('-h')) {
|
|
450
|
+
printWaitHelp();
|
|
169
451
|
return;
|
|
170
452
|
}
|
|
453
|
+
const { flags } = parseFlags(rest, WAIT_FLAG_SPEC);
|
|
454
|
+
const modeCount =
|
|
455
|
+
(flags.pattern ? 1 : 0) +
|
|
456
|
+
(typeof flags.idle === 'number' ? 1 : 0) +
|
|
457
|
+
(flags.exit ? 1 : 0);
|
|
458
|
+
if (modeCount !== 1) {
|
|
459
|
+
console.error('wait requires exactly one of --pattern / --idle / --exit');
|
|
460
|
+
process.exit(2);
|
|
461
|
+
}
|
|
171
462
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
463
|
+
const timeoutSec = typeof flags.timeout === 'number' ? flags.timeout : 30;
|
|
464
|
+
const body = {
|
|
465
|
+
id,
|
|
466
|
+
timeout: timeoutSec,
|
|
467
|
+
...(flags.pattern ? { pattern: flags.pattern } : {}),
|
|
468
|
+
...(typeof flags.idle === 'number' ? { idle: flags.idle } : {}),
|
|
469
|
+
...(flags.exit ? { waitExit: true } : {}),
|
|
470
|
+
...(flags.print ? { printOutput: true } : {}),
|
|
471
|
+
};
|
|
472
|
+
// Allow the HTTP socket a bit longer than the server-side deadline so we
|
|
473
|
+
// don't race the server's `outcome:"timeout"` response.
|
|
474
|
+
const data = await post('/api/terminal/wait', body, (timeoutSec + 5) * 1000);
|
|
176
475
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
476
|
+
if (flags.json) {
|
|
477
|
+
process.stdout.write(JSON.stringify(data) + '\n');
|
|
478
|
+
} else {
|
|
479
|
+
if (data.output) process.stdout.write(data.output);
|
|
480
|
+
process.stderr.write(JSON.stringify(data) + '\n');
|
|
481
|
+
}
|
|
482
|
+
process.exit(data.outcome === 'timeout' ? 124 : 0);
|
|
483
|
+
}
|
|
180
484
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
485
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
486
|
+
/* Top-level dispatch */
|
|
487
|
+
/* ───────────────────────────────────────────────────────────────────────── */
|
|
184
488
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
// ignore ping
|
|
192
|
-
});
|
|
489
|
+
async function run() {
|
|
490
|
+
if (args.length === 0 || args[0] === '--help' || args[0] === '-h') {
|
|
491
|
+
printTopHelp();
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
193
494
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
495
|
+
// list is the only id-less subcommand.
|
|
496
|
+
if (args[0] === 'list') {
|
|
497
|
+
await cmdList(args.slice(1));
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
199
500
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
501
|
+
const id = args[0];
|
|
502
|
+
const action = args[1];
|
|
503
|
+
const rest = args.slice(2);
|
|
504
|
+
|
|
505
|
+
if (!action || action === '--help' || action === '-h' || action === '--json') {
|
|
506
|
+
// `cock terminal <id>` or `cock terminal <id> --json` → meta
|
|
507
|
+
const extras = action ? [action, ...rest] : rest;
|
|
508
|
+
await cmdMeta(id, extras);
|
|
509
|
+
return;
|
|
510
|
+
}
|
|
205
511
|
|
|
206
|
-
|
|
207
|
-
|
|
512
|
+
if (action === 'output') {
|
|
513
|
+
await cmdOutput(id, rest);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
if (action === 'wait') {
|
|
518
|
+
await cmdWait(id, rest);
|
|
519
|
+
return;
|
|
208
520
|
}
|
|
209
521
|
|
|
210
522
|
console.error(`Unknown action: ${action}`);
|
|
211
|
-
|
|
212
|
-
process.exit(
|
|
523
|
+
printTopHelp();
|
|
524
|
+
process.exit(2);
|
|
213
525
|
}
|
|
214
526
|
|
|
215
527
|
export const done = run();
|