centaurus-cli 3.0.0 → 3.1.0
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/dist/ai/types.js +0 -1
- package/dist/ai/types.js.map +1 -1
- package/dist/cli-adapter.js +5047 -5037
- package/dist/cli-adapter.js.map +1 -1
- package/dist/commands/CommandParser.js +372 -315
- package/dist/commands/CommandParser.js.map +1 -1
- package/dist/config/build-config.js +11 -42
- package/dist/config/build-config.js.map +1 -1
- package/dist/config/defaultConfig.js +94 -82
- package/dist/config/defaultConfig.js.map +1 -1
- package/dist/config/manager.js +144 -160
- package/dist/config/manager.js.map +1 -1
- package/dist/config/mcp-config-manager.js +411 -364
- package/dist/config/mcp-config-manager.js.map +1 -1
- package/dist/config/models.js +118 -185
- package/dist/config/models.js.map +1 -1
- package/dist/config/slash-commands.js +186 -184
- package/dist/config/slash-commands.js.map +1 -1
- package/dist/config/types.js +33 -26
- package/dist/config/types.js.map +1 -1
- package/dist/context/command-detector.js +63 -67
- package/dist/context/command-detector.js.map +1 -1
- package/dist/context/context-manager.js +533 -518
- package/dist/context/context-manager.js.map +1 -1
- package/dist/context/handlers/docker-handler.js +518 -576
- package/dist/context/handlers/docker-handler.js.map +1 -1
- package/dist/context/handlers/ssh-handler.js +1050 -1109
- package/dist/context/handlers/ssh-handler.js.map +1 -1
- package/dist/context/handlers/wsl-handler.js +558 -630
- package/dist/context/handlers/wsl-handler.js.map +1 -1
- package/dist/context/index.js +42 -6
- package/dist/context/index.js.map +1 -1
- package/dist/context/subshell-handler.js +0 -4
- package/dist/context/subshell-handler.js.map +1 -1
- package/dist/context/types.js +20 -31
- package/dist/context/types.js.map +1 -1
- package/dist/hooks/useConnectivity.js +13 -10
- package/dist/hooks/useConnectivity.js.map +1 -1
- package/dist/hooks/useTerminalDimensions.js +67 -79
- package/dist/hooks/useTerminalDimensions.js.map +1 -1
- package/dist/index.js +228 -251
- package/dist/index.js.map +1 -1
- package/dist/mcp/mcp-command-handler.js +297 -260
- package/dist/mcp/mcp-command-handler.js.map +1 -1
- package/dist/mcp/mcp-server-manager.js +139 -155
- package/dist/mcp/mcp-server-manager.js.map +1 -1
- package/dist/mcp/mcp-tool-wrapper.js +74 -94
- package/dist/mcp/mcp-tool-wrapper.js.map +1 -1
- package/dist/services/ai-autocomplete-agent.js +169 -181
- package/dist/services/ai-autocomplete-agent.js.map +1 -1
- package/dist/services/ai-context-injector.js +180 -93
- package/dist/services/ai-context-injector.js.map +1 -1
- package/dist/services/ai-service-client.js +513 -456
- package/dist/services/ai-service-client.js.map +1 -1
- package/dist/services/api-client.js +443 -441
- package/dist/services/api-client.js.map +1 -1
- package/dist/services/auth-handler.js +162 -198
- package/dist/services/auth-handler.js.map +1 -1
- package/dist/services/background-task-manager.js +258 -282
- package/dist/services/background-task-manager.js.map +1 -1
- package/dist/services/checkpoint-manager.js +1513 -973
- package/dist/services/checkpoint-manager.js.map +1 -1
- package/dist/services/clipboard-service.js +151 -200
- package/dist/services/clipboard-service.js.map +1 -1
- package/dist/services/connectivity-manager.js +63 -65
- package/dist/services/connectivity-manager.js.map +1 -1
- package/dist/services/conversation-manager.js +118 -121
- package/dist/services/conversation-manager.js.map +1 -1
- package/dist/services/environment-context-injector.js +160 -187
- package/dist/services/environment-context-injector.js.map +1 -1
- package/dist/services/fast-context-agent.js +203 -243
- package/dist/services/fast-context-agent.js.map +1 -1
- package/dist/services/input-detection-agent.js +190 -202
- package/dist/services/input-detection-agent.js.map +1 -1
- package/dist/services/input-requirement-detector.js +155 -189
- package/dist/services/input-requirement-detector.js.map +1 -1
- package/dist/services/local-chat-storage.js +342 -365
- package/dist/services/local-chat-storage.js.map +1 -1
- package/dist/services/monitored-shell-manager.js +225 -233
- package/dist/services/monitored-shell-manager.js.map +1 -1
- package/dist/services/ollama-service.js +293 -310
- package/dist/services/ollama-service.js.map +1 -1
- package/dist/services/rules-storage.js +142 -0
- package/dist/services/rules-storage.js.map +1 -0
- package/dist/services/session-quota-manager.js +219 -235
- package/dist/services/session-quota-manager.js.map +1 -1
- package/dist/services/shell-input-agent.js +299 -334
- package/dist/services/shell-input-agent.js.map +1 -1
- package/dist/services/sub-agent-manager.js +459 -501
- package/dist/services/sub-agent-manager.js.map +1 -1
- package/dist/services/warpify-detector.js +133 -183
- package/dist/services/warpify-detector.js.map +1 -1
- package/dist/services/workflow-storage.js +202 -217
- package/dist/services/workflow-storage.js.map +1 -1
- package/dist/test-ssh-handler.js +148 -193
- package/dist/test-ssh-handler.js.map +1 -1
- package/dist/tools/add-mcp.js +161 -0
- package/dist/tools/add-mcp.js.map +1 -0
- package/dist/tools/background-command.js +240 -273
- package/dist/tools/background-command.js.map +1 -1
- package/dist/tools/command.js +447 -440
- package/dist/tools/command.js.map +1 -1
- package/dist/tools/create-image.js +172 -202
- package/dist/tools/create-image.js.map +1 -1
- package/dist/tools/enter-remote-session.js +169 -215
- package/dist/tools/enter-remote-session.js.map +1 -1
- package/dist/tools/fast-context.js +60 -67
- package/dist/tools/fast-context.js.map +1 -1
- package/dist/tools/file-ops.js +605 -537
- package/dist/tools/file-ops.js.map +1 -1
- package/dist/tools/find-files.js +262 -303
- package/dist/tools/find-files.js.map +1 -1
- package/dist/tools/get-diff.js +423 -400
- package/dist/tools/get-diff.js.map +1 -1
- package/dist/tools/grep-search.js +966 -948
- package/dist/tools/grep-search.js.map +1 -1
- package/dist/tools/inspect-symbol.js +308 -323
- package/dist/tools/inspect-symbol.js.map +1 -1
- package/dist/tools/plan-mode.js +459 -503
- package/dist/tools/plan-mode.js.map +1 -1
- package/dist/tools/read-binary-file.js +160 -190
- package/dist/tools/read-binary-file.js.map +1 -1
- package/dist/tools/registry.js +100 -84
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/reproduce_issue.js +170 -151
- package/dist/tools/reproduce_issue.js.map +1 -1
- package/dist/tools/sub-agent.js +223 -228
- package/dist/tools/sub-agent.js.map +1 -1
- package/dist/tools/task-complete.js +28 -27
- package/dist/tools/task-complete.js.map +1 -1
- package/dist/tools/types.js +0 -1
- package/dist/tools/types.js.map +1 -1
- package/dist/tools/validation.js +96 -118
- package/dist/tools/validation.js.map +1 -1
- package/dist/tools/web-search.js +194 -194
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools/workflow-tool.js +77 -82
- package/dist/tools/workflow-tool.js.map +1 -1
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/rule.js +1 -0
- package/dist/types/rule.js.map +1 -0
- package/dist/types/workflow.js +0 -7
- package/dist/types/workflow.js.map +1 -1
- package/dist/ui/components/AgentTimer.js +24 -25
- package/dist/ui/components/AgentTimer.js.map +1 -1
- package/dist/ui/components/App.js +3266 -3249
- package/dist/ui/components/App.js.map +1 -1
- package/dist/ui/components/AuthScreen.js +22 -34
- package/dist/ui/components/AuthScreen.js.map +1 -1
- package/dist/ui/components/AuthWelcomeScreen.js +30 -24
- package/dist/ui/components/AuthWelcomeScreen.js.map +1 -1
- package/dist/ui/components/Breadcrumbs.js +53 -82
- package/dist/ui/components/Breadcrumbs.js.map +1 -1
- package/dist/ui/components/CircularSelectInput.js +59 -67
- package/dist/ui/components/CircularSelectInput.js.map +1 -1
- package/dist/ui/components/ClipboardFileAutocomplete.js +78 -39
- package/dist/ui/components/ClipboardFileAutocomplete.js.map +1 -1
- package/dist/ui/components/CodeBlock.js +24 -42
- package/dist/ui/components/CodeBlock.js.map +1 -1
- package/dist/ui/components/ConfigViewer.js +18 -25
- package/dist/ui/components/ConfigViewer.js.map +1 -1
- package/dist/ui/components/ConfirmPrompt.js +49 -71
- package/dist/ui/components/ConfirmPrompt.js.map +1 -1
- package/dist/ui/components/ConnectionStatusMessage.js +32 -83
- package/dist/ui/components/ConnectionStatusMessage.js.map +1 -1
- package/dist/ui/components/ContextWindowIndicator.js +34 -49
- package/dist/ui/components/ContextWindowIndicator.js.map +1 -1
- package/dist/ui/components/DetailedPlanReviewScreen.js +104 -106
- package/dist/ui/components/DetailedPlanReviewScreen.js.map +1 -1
- package/dist/ui/components/DiffViewer.js +68 -121
- package/dist/ui/components/DiffViewer.js.map +1 -1
- package/dist/ui/components/ErrorBoundary.js +40 -48
- package/dist/ui/components/ErrorBoundary.js.map +1 -1
- package/dist/ui/components/FileCreationPreview.js +29 -60
- package/dist/ui/components/FileCreationPreview.js.map +1 -1
- package/dist/ui/components/FileOperation.js +34 -29
- package/dist/ui/components/FileOperation.js.map +1 -1
- package/dist/ui/components/FileTagAutocomplete.js +55 -25
- package/dist/ui/components/FileTagAutocomplete.js.map +1 -1
- package/dist/ui/components/FontRecommendation.js.map +1 -1
- package/dist/ui/components/GitDiffBreadcrumb.js +29 -0
- package/dist/ui/components/GitDiffBreadcrumb.js.map +1 -0
- package/dist/ui/components/InputBox.js +1620 -2150
- package/dist/ui/components/InputBox.js.map +1 -1
- package/dist/ui/components/InteractiveShell.js +234 -352
- package/dist/ui/components/InteractiveShell.js.map +1 -1
- package/dist/ui/components/KeyboardHelp.js +34 -35
- package/dist/ui/components/KeyboardHelp.js.map +1 -1
- package/dist/ui/components/LoadingIndicator.js +22 -25
- package/dist/ui/components/LoadingIndicator.js.map +1 -1
- package/dist/ui/components/MCPAddScreen.js +40 -51
- package/dist/ui/components/MCPAddScreen.js.map +1 -1
- package/dist/ui/components/MCPListScreen.js +40 -48
- package/dist/ui/components/MCPListScreen.js.map +1 -1
- package/dist/ui/components/MCPServerListScreen.js +49 -56
- package/dist/ui/components/MCPServerListScreen.js.map +1 -1
- package/dist/ui/components/MarkdownRenderer.js +69 -96
- package/dist/ui/components/MarkdownRenderer.js.map +1 -1
- package/dist/ui/components/MessageBox.js +66 -48
- package/dist/ui/components/MessageBox.js.map +1 -1
- package/dist/ui/components/MessageDisplay.js +150 -142
- package/dist/ui/components/MessageDisplay.js.map +1 -1
- package/dist/ui/components/MonitorModeAIPanel.js +46 -65
- package/dist/ui/components/MonitorModeAIPanel.js.map +1 -1
- package/dist/ui/components/MultiLineInput.js +243 -277
- package/dist/ui/components/MultiLineInput.js.map +1 -1
- package/dist/ui/components/PasswordPrompt.js +37 -18
- package/dist/ui/components/PasswordPrompt.js.map +1 -1
- package/dist/ui/components/PlanAcceptedMessage.js +27 -38
- package/dist/ui/components/PlanAcceptedMessage.js.map +1 -1
- package/dist/ui/components/PlanReviewScreen.js +46 -50
- package/dist/ui/components/PlanReviewScreen.js.map +1 -1
- package/dist/ui/components/RulesEditorScreen.js +81 -0
- package/dist/ui/components/RulesEditorScreen.js.map +1 -0
- package/dist/ui/components/SelectPrompt.js +19 -8
- package/dist/ui/components/SelectPrompt.js.map +1 -1
- package/dist/ui/components/ShimmerText.js +44 -0
- package/dist/ui/components/ShimmerText.js.map +1 -0
- package/dist/ui/components/SlashCommandAutocomplete.js +49 -22
- package/dist/ui/components/SlashCommandAutocomplete.js.map +1 -1
- package/dist/ui/components/StatusBar.js +56 -87
- package/dist/ui/components/StatusBar.js.map +1 -1
- package/dist/ui/components/StreamingMessageDisplay.js +116 -99
- package/dist/ui/components/StreamingMessageDisplay.js.map +1 -1
- package/dist/ui/components/TaskCompletedMessage.js +28 -23
- package/dist/ui/components/TaskCompletedMessage.js.map +1 -1
- package/dist/ui/components/TaskProgressIndicator.js +44 -70
- package/dist/ui/components/TaskProgressIndicator.js.map +1 -1
- package/dist/ui/components/ThinkingDisplay.js +44 -41
- package/dist/ui/components/ThinkingDisplay.js.map +1 -1
- package/dist/ui/components/ToolExecutionMessage.js +772 -1326
- package/dist/ui/components/ToolExecutionMessage.js.map +1 -1
- package/dist/ui/components/ToolExecutionStatus.js +53 -84
- package/dist/ui/components/ToolExecutionStatus.js.map +1 -1
- package/dist/ui/components/ToolResult.js +22 -15
- package/dist/ui/components/ToolResult.js.map +1 -1
- package/dist/ui/components/VersionUpdatePrompt.js +88 -120
- package/dist/ui/components/VersionUpdatePrompt.js.map +1 -1
- package/dist/ui/components/WelcomeBanner.js +176 -26
- package/dist/ui/components/WelcomeBanner.js.map +1 -1
- package/dist/ui/components/WorkflowCreatorScreen.js +94 -161
- package/dist/ui/components/WorkflowCreatorScreen.js.map +1 -1
- package/dist/utils/ansi-encoder.js +30 -61
- package/dist/utils/ansi-encoder.js.map +1 -1
- package/dist/utils/chat-formatter.js +327 -305
- package/dist/utils/chat-formatter.js.map +1 -1
- package/dist/utils/command-history.js +152 -174
- package/dist/utils/command-history.js.map +1 -1
- package/dist/utils/context-sanitizer.js +49 -112
- package/dist/utils/context-sanitizer.js.map +1 -1
- package/dist/utils/conversation-logger.js +292 -324
- package/dist/utils/conversation-logger.js.map +1 -1
- package/dist/utils/custom-commands-manager.js +126 -131
- package/dist/utils/custom-commands-manager.js.map +1 -1
- package/dist/utils/editor-utils.js +732 -837
- package/dist/utils/editor-utils.js.map +1 -1
- package/dist/utils/file.js +174 -213
- package/dist/utils/file.js.map +1 -1
- package/dist/utils/git-stats.js +169 -0
- package/dist/utils/git-stats.js.map +1 -0
- package/dist/utils/input-classifier.js +960 -482
- package/dist/utils/input-classifier.js.map +1 -1
- package/dist/utils/logger.js +48 -73
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/markdown-parser.js +277 -310
- package/dist/utils/markdown-parser.js.map +1 -1
- package/dist/utils/rule-reference-resolver.js +54 -0
- package/dist/utils/rule-reference-resolver.js.map +1 -0
- package/dist/utils/shell.js +144 -156
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/state.js +23 -22
- package/dist/utils/state.js.map +1 -1
- package/dist/utils/syntax-checker.js +279 -327
- package/dist/utils/syntax-checker.js.map +1 -1
- package/dist/utils/terminal-output.js +199 -302
- package/dist/utils/terminal-output.js.map +1 -1
- package/dist/utils/text-clipboard.js +47 -70
- package/dist/utils/text-clipboard.js.map +1 -1
- package/dist/utils/unicode-sanitizer.js +134 -197
- package/dist/utils/unicode-sanitizer.js.map +1 -1
- package/dist/utils/version-checker.js +46 -56
- package/dist/utils/version-checker.js.map +1 -1
- package/package.json +6 -4
- package/dist/ai/types.d.ts +0 -20
- package/dist/ai/types.d.ts.map +0 -1
- package/dist/cli-adapter.d.ts +0 -511
- package/dist/cli-adapter.d.ts.map +0 -1
- package/dist/commands/CommandParser.d.ts +0 -27
- package/dist/commands/CommandParser.d.ts.map +0 -1
- package/dist/config/build-config.d.ts +0 -42
- package/dist/config/build-config.d.ts.map +0 -1
- package/dist/config/defaultConfig.d.ts +0 -79
- package/dist/config/defaultConfig.d.ts.map +0 -1
- package/dist/config/manager.d.ts +0 -62
- package/dist/config/manager.d.ts.map +0 -1
- package/dist/config/mcp-config-manager.d.ts +0 -79
- package/dist/config/mcp-config-manager.d.ts.map +0 -1
- package/dist/config/models.d.ts +0 -83
- package/dist/config/models.d.ts.map +0 -1
- package/dist/config/slash-commands.d.ts +0 -23
- package/dist/config/slash-commands.d.ts.map +0 -1
- package/dist/config/types.d.ts +0 -35
- package/dist/config/types.d.ts.map +0 -1
- package/dist/context/command-detector.d.ts +0 -50
- package/dist/context/command-detector.d.ts.map +0 -1
- package/dist/context/context-manager.d.ts +0 -157
- package/dist/context/context-manager.d.ts.map +0 -1
- package/dist/context/handlers/docker-handler.d.ts +0 -130
- package/dist/context/handlers/docker-handler.d.ts.map +0 -1
- package/dist/context/handlers/ssh-handler.d.ts +0 -201
- package/dist/context/handlers/ssh-handler.d.ts.map +0 -1
- package/dist/context/handlers/wsl-handler.d.ts +0 -146
- package/dist/context/handlers/wsl-handler.d.ts.map +0 -1
- package/dist/context/index.d.ts +0 -8
- package/dist/context/index.d.ts.map +0 -1
- package/dist/context/subshell-handler.d.ts +0 -165
- package/dist/context/subshell-handler.d.ts.map +0 -1
- package/dist/context/types.d.ts +0 -70
- package/dist/context/types.d.ts.map +0 -1
- package/dist/hooks/useConnectivity.d.ts +0 -2
- package/dist/hooks/useConnectivity.d.ts.map +0 -1
- package/dist/hooks/useTerminalDimensions.d.ts +0 -41
- package/dist/hooks/useTerminalDimensions.d.ts.map +0 -1
- package/dist/index.d.ts +0 -9
- package/dist/index.d.ts.map +0 -1
- package/dist/mcp/mcp-command-handler.d.ts +0 -47
- package/dist/mcp/mcp-command-handler.d.ts.map +0 -1
- package/dist/mcp/mcp-server-manager.d.ts +0 -30
- package/dist/mcp/mcp-server-manager.d.ts.map +0 -1
- package/dist/mcp/mcp-tool-wrapper.d.ts +0 -12
- package/dist/mcp/mcp-tool-wrapper.d.ts.map +0 -1
- package/dist/services/ai-autocomplete-agent.d.ts +0 -39
- package/dist/services/ai-autocomplete-agent.d.ts.map +0 -1
- package/dist/services/ai-context-injector.d.ts +0 -41
- package/dist/services/ai-context-injector.d.ts.map +0 -1
- package/dist/services/ai-service-client.d.ts +0 -128
- package/dist/services/ai-service-client.d.ts.map +0 -1
- package/dist/services/api-client.d.ts +0 -353
- package/dist/services/api-client.d.ts.map +0 -1
- package/dist/services/auth-handler.d.ts +0 -30
- package/dist/services/auth-handler.d.ts.map +0 -1
- package/dist/services/background-task-manager.d.ts +0 -114
- package/dist/services/background-task-manager.d.ts.map +0 -1
- package/dist/services/checkpoint-manager.d.ts +0 -167
- package/dist/services/checkpoint-manager.d.ts.map +0 -1
- package/dist/services/clipboard-service.d.ts +0 -37
- package/dist/services/clipboard-service.d.ts.map +0 -1
- package/dist/services/connectivity-manager.d.ts +0 -18
- package/dist/services/connectivity-manager.d.ts.map +0 -1
- package/dist/services/conversation-manager.d.ts +0 -73
- package/dist/services/conversation-manager.d.ts.map +0 -1
- package/dist/services/environment-context-injector.d.ts +0 -69
- package/dist/services/environment-context-injector.d.ts.map +0 -1
- package/dist/services/fast-context-agent.d.ts +0 -12
- package/dist/services/fast-context-agent.d.ts.map +0 -1
- package/dist/services/input-detection-agent.d.ts +0 -40
- package/dist/services/input-detection-agent.d.ts.map +0 -1
- package/dist/services/input-requirement-detector.d.ts +0 -28
- package/dist/services/input-requirement-detector.d.ts.map +0 -1
- package/dist/services/local-chat-storage.d.ts +0 -182
- package/dist/services/local-chat-storage.d.ts.map +0 -1
- package/dist/services/monitored-shell-manager.d.ts +0 -120
- package/dist/services/monitored-shell-manager.d.ts.map +0 -1
- package/dist/services/ollama-service.d.ts +0 -197
- package/dist/services/ollama-service.d.ts.map +0 -1
- package/dist/services/session-quota-manager.d.ts +0 -101
- package/dist/services/session-quota-manager.d.ts.map +0 -1
- package/dist/services/shell-input-agent.d.ts +0 -89
- package/dist/services/shell-input-agent.d.ts.map +0 -1
- package/dist/services/sub-agent-manager.d.ts +0 -140
- package/dist/services/sub-agent-manager.d.ts.map +0 -1
- package/dist/services/warpify-detector.d.ts +0 -43
- package/dist/services/warpify-detector.d.ts.map +0 -1
- package/dist/services/workflow-storage.d.ts +0 -72
- package/dist/services/workflow-storage.d.ts.map +0 -1
- package/dist/test-ssh-handler.d.ts +0 -8
- package/dist/test-ssh-handler.d.ts.map +0 -1
- package/dist/tools/background-command.d.ts +0 -11
- package/dist/tools/background-command.d.ts.map +0 -1
- package/dist/tools/command.d.ts +0 -3
- package/dist/tools/command.d.ts.map +0 -1
- package/dist/tools/create-image.d.ts +0 -10
- package/dist/tools/create-image.d.ts.map +0 -1
- package/dist/tools/enter-remote-session.d.ts +0 -48
- package/dist/tools/enter-remote-session.d.ts.map +0 -1
- package/dist/tools/fast-context.d.ts +0 -3
- package/dist/tools/fast-context.d.ts.map +0 -1
- package/dist/tools/file-ops.d.ts +0 -7
- package/dist/tools/file-ops.d.ts.map +0 -1
- package/dist/tools/find-files.d.ts +0 -49
- package/dist/tools/find-files.d.ts.map +0 -1
- package/dist/tools/get-diff.d.ts +0 -14
- package/dist/tools/get-diff.d.ts.map +0 -1
- package/dist/tools/grep-search.d.ts +0 -155
- package/dist/tools/grep-search.d.ts.map +0 -1
- package/dist/tools/inspect-symbol.d.ts +0 -32
- package/dist/tools/inspect-symbol.d.ts.map +0 -1
- package/dist/tools/plan-mode.d.ts +0 -140
- package/dist/tools/plan-mode.d.ts.map +0 -1
- package/dist/tools/read-binary-file.d.ts +0 -10
- package/dist/tools/read-binary-file.d.ts.map +0 -1
- package/dist/tools/registry.d.ts +0 -31
- package/dist/tools/registry.d.ts.map +0 -1
- package/dist/tools/reproduce_issue.d.ts +0 -2
- package/dist/tools/reproduce_issue.d.ts.map +0 -1
- package/dist/tools/sub-agent.d.ts +0 -9
- package/dist/tools/sub-agent.d.ts.map +0 -1
- package/dist/tools/task-complete.d.ts +0 -3
- package/dist/tools/task-complete.d.ts.map +0 -1
- package/dist/tools/types.d.ts +0 -40
- package/dist/tools/types.d.ts.map +0 -1
- package/dist/tools/validation.d.ts +0 -47
- package/dist/tools/validation.d.ts.map +0 -1
- package/dist/tools/web-search.d.ts +0 -24
- package/dist/tools/web-search.d.ts.map +0 -1
- package/dist/tools/workflow-tool.d.ts +0 -11
- package/dist/tools/workflow-tool.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -123
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/workflow.d.ts +0 -110
- package/dist/types/workflow.d.ts.map +0 -1
- package/dist/ui/components/AgentTimer.d.ts +0 -7
- package/dist/ui/components/AgentTimer.d.ts.map +0 -1
- package/dist/ui/components/App.d.ts +0 -197
- package/dist/ui/components/App.d.ts.map +0 -1
- package/dist/ui/components/AuthScreen.d.ts +0 -8
- package/dist/ui/components/AuthScreen.d.ts.map +0 -1
- package/dist/ui/components/AuthWelcomeScreen.d.ts +0 -8
- package/dist/ui/components/AuthWelcomeScreen.d.ts.map +0 -1
- package/dist/ui/components/Breadcrumbs.d.ts +0 -13
- package/dist/ui/components/Breadcrumbs.d.ts.map +0 -1
- package/dist/ui/components/CircularSelectInput.d.ts +0 -24
- package/dist/ui/components/CircularSelectInput.d.ts.map +0 -1
- package/dist/ui/components/ClipboardFileAutocomplete.d.ts +0 -10
- package/dist/ui/components/ClipboardFileAutocomplete.d.ts.map +0 -1
- package/dist/ui/components/CodeBlock.d.ts +0 -9
- package/dist/ui/components/CodeBlock.d.ts.map +0 -1
- package/dist/ui/components/ConfigViewer.d.ts +0 -11
- package/dist/ui/components/ConfigViewer.d.ts.map +0 -1
- package/dist/ui/components/ConfirmPrompt.d.ts +0 -13
- package/dist/ui/components/ConfirmPrompt.d.ts.map +0 -1
- package/dist/ui/components/ConnectionStatusMessage.d.ts +0 -17
- package/dist/ui/components/ConnectionStatusMessage.d.ts.map +0 -1
- package/dist/ui/components/ContextWindowIndicator.d.ts +0 -8
- package/dist/ui/components/ContextWindowIndicator.d.ts.map +0 -1
- package/dist/ui/components/DetailedPlanReviewScreen.d.ts +0 -17
- package/dist/ui/components/DetailedPlanReviewScreen.d.ts.map +0 -1
- package/dist/ui/components/DiffViewer.d.ts +0 -9
- package/dist/ui/components/DiffViewer.d.ts.map +0 -1
- package/dist/ui/components/ErrorBoundary.d.ts +0 -17
- package/dist/ui/components/ErrorBoundary.d.ts.map +0 -1
- package/dist/ui/components/FileCreationPreview.d.ts +0 -8
- package/dist/ui/components/FileCreationPreview.d.ts.map +0 -1
- package/dist/ui/components/FileOperation.d.ts +0 -10
- package/dist/ui/components/FileOperation.d.ts.map +0 -1
- package/dist/ui/components/FileTagAutocomplete.d.ts +0 -11
- package/dist/ui/components/FileTagAutocomplete.d.ts.map +0 -1
- package/dist/ui/components/FontRecommendation.d.ts +0 -1
- package/dist/ui/components/FontRecommendation.d.ts.map +0 -1
- package/dist/ui/components/InputBox.d.ts +0 -42
- package/dist/ui/components/InputBox.d.ts.map +0 -1
- package/dist/ui/components/InteractiveShell.d.ts +0 -30
- package/dist/ui/components/InteractiveShell.d.ts.map +0 -1
- package/dist/ui/components/KeyboardHelp.d.ts +0 -7
- package/dist/ui/components/KeyboardHelp.d.ts.map +0 -1
- package/dist/ui/components/LoadingIndicator.d.ts +0 -3
- package/dist/ui/components/LoadingIndicator.d.ts.map +0 -1
- package/dist/ui/components/MCPAddScreen.d.ts +0 -13
- package/dist/ui/components/MCPAddScreen.d.ts.map +0 -1
- package/dist/ui/components/MCPListScreen.d.ts +0 -17
- package/dist/ui/components/MCPListScreen.d.ts.map +0 -1
- package/dist/ui/components/MCPServerListScreen.d.ts +0 -16
- package/dist/ui/components/MCPServerListScreen.d.ts.map +0 -1
- package/dist/ui/components/MarkdownRenderer.d.ts +0 -8
- package/dist/ui/components/MarkdownRenderer.d.ts.map +0 -1
- package/dist/ui/components/MessageBox.d.ts +0 -10
- package/dist/ui/components/MessageBox.d.ts.map +0 -1
- package/dist/ui/components/MessageDisplay.d.ts +0 -14
- package/dist/ui/components/MessageDisplay.d.ts.map +0 -1
- package/dist/ui/components/MonitorModeAIPanel.d.ts +0 -23
- package/dist/ui/components/MonitorModeAIPanel.d.ts.map +0 -1
- package/dist/ui/components/MultiLineInput.d.ts +0 -13
- package/dist/ui/components/MultiLineInput.d.ts.map +0 -1
- package/dist/ui/components/PasswordPrompt.d.ts +0 -9
- package/dist/ui/components/PasswordPrompt.d.ts.map +0 -1
- package/dist/ui/components/PlanAcceptedMessage.d.ts +0 -20
- package/dist/ui/components/PlanAcceptedMessage.d.ts.map +0 -1
- package/dist/ui/components/PlanReviewScreen.d.ts +0 -14
- package/dist/ui/components/PlanReviewScreen.d.ts.map +0 -1
- package/dist/ui/components/SelectPrompt.d.ts +0 -12
- package/dist/ui/components/SelectPrompt.d.ts.map +0 -1
- package/dist/ui/components/SlashCommandAutocomplete.d.ts +0 -13
- package/dist/ui/components/SlashCommandAutocomplete.d.ts.map +0 -1
- package/dist/ui/components/StatusBar.d.ts +0 -14
- package/dist/ui/components/StatusBar.d.ts.map +0 -1
- package/dist/ui/components/StreamingMessageDisplay.d.ts +0 -15
- package/dist/ui/components/StreamingMessageDisplay.d.ts.map +0 -1
- package/dist/ui/components/TaskCompletedMessage.d.ts +0 -14
- package/dist/ui/components/TaskCompletedMessage.d.ts.map +0 -1
- package/dist/ui/components/TaskProgressIndicator.d.ts +0 -18
- package/dist/ui/components/TaskProgressIndicator.d.ts.map +0 -1
- package/dist/ui/components/ThinkingDisplay.d.ts +0 -15
- package/dist/ui/components/ThinkingDisplay.d.ts.map +0 -1
- package/dist/ui/components/ToolExecutionMessage.d.ts +0 -8
- package/dist/ui/components/ToolExecutionMessage.d.ts.map +0 -1
- package/dist/ui/components/ToolExecutionStatus.d.ts +0 -10
- package/dist/ui/components/ToolExecutionStatus.d.ts.map +0 -1
- package/dist/ui/components/ToolResult.d.ts +0 -10
- package/dist/ui/components/ToolResult.d.ts.map +0 -1
- package/dist/ui/components/VersionUpdatePrompt.d.ts +0 -9
- package/dist/ui/components/VersionUpdatePrompt.d.ts.map +0 -1
- package/dist/ui/components/WelcomeBanner.d.ts +0 -3
- package/dist/ui/components/WelcomeBanner.d.ts.map +0 -1
- package/dist/ui/components/WorkflowCreatorScreen.d.ts +0 -25
- package/dist/ui/components/WorkflowCreatorScreen.d.ts.map +0 -1
- package/dist/utils/ansi-encoder.d.ts +0 -7
- package/dist/utils/ansi-encoder.d.ts.map +0 -1
- package/dist/utils/chat-formatter.d.ts +0 -12
- package/dist/utils/chat-formatter.d.ts.map +0 -1
- package/dist/utils/command-history.d.ts +0 -24
- package/dist/utils/command-history.d.ts.map +0 -1
- package/dist/utils/context-sanitizer.d.ts +0 -50
- package/dist/utils/context-sanitizer.d.ts.map +0 -1
- package/dist/utils/conversation-logger.d.ts +0 -142
- package/dist/utils/conversation-logger.d.ts.map +0 -1
- package/dist/utils/custom-commands-manager.d.ts +0 -59
- package/dist/utils/custom-commands-manager.d.ts.map +0 -1
- package/dist/utils/editor-utils.d.ts +0 -101
- package/dist/utils/editor-utils.d.ts.map +0 -1
- package/dist/utils/file.d.ts +0 -61
- package/dist/utils/file.d.ts.map +0 -1
- package/dist/utils/input-classifier.d.ts +0 -25
- package/dist/utils/input-classifier.d.ts.map +0 -1
- package/dist/utils/logger.d.ts +0 -17
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/markdown-parser.d.ts +0 -60
- package/dist/utils/markdown-parser.d.ts.map +0 -1
- package/dist/utils/shell.d.ts +0 -47
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/state.d.ts +0 -13
- package/dist/utils/state.d.ts.map +0 -1
- package/dist/utils/syntax-checker.d.ts +0 -24
- package/dist/utils/syntax-checker.d.ts.map +0 -1
- package/dist/utils/terminal-output.d.ts +0 -25
- package/dist/utils/terminal-output.d.ts.map +0 -1
- package/dist/utils/text-clipboard.d.ts +0 -12
- package/dist/utils/text-clipboard.d.ts.map +0 -1
- package/dist/utils/unicode-sanitizer.d.ts +0 -44
- package/dist/utils/unicode-sanitizer.d.ts.map +0 -1
- package/dist/utils/version-checker.d.ts +0 -14
- package/dist/utils/version-checker.d.ts.map +0 -1
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Docker Handler for container execution
|
|
3
|
-
*/
|
|
4
|
-
import { SubshellHandler, BreadcrumbInfo, CommandResult, DirectoryEntry, SearchResult } from '../subshell-handler.js';
|
|
5
|
-
import { SubshellContext, OSType } from '../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Docker-specific configuration
|
|
8
|
-
*/
|
|
9
|
-
export interface DockerConfig {
|
|
10
|
-
/** Container ID or name */
|
|
11
|
-
containerId: string;
|
|
12
|
-
/** Container name (if available) */
|
|
13
|
-
containerName?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Docker Handler implementation
|
|
17
|
-
*/
|
|
18
|
-
export declare class DockerHandler implements SubshellHandler {
|
|
19
|
-
readonly type = "docker";
|
|
20
|
-
readonly detectionPatterns: RegExp[];
|
|
21
|
-
private config;
|
|
22
|
-
private currentWorkingDirectory;
|
|
23
|
-
private shellType;
|
|
24
|
-
private osType;
|
|
25
|
-
private sessionId;
|
|
26
|
-
private parentContext?;
|
|
27
|
-
/**
|
|
28
|
-
* Detect if a command should trigger this handler
|
|
29
|
-
*/
|
|
30
|
-
detect(command: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Connect to the Docker container
|
|
33
|
-
*/
|
|
34
|
-
connect(command: string, cwd: string): Promise<SubshellContext>;
|
|
35
|
-
/**
|
|
36
|
-
* Connect from an existing remote context (nested session)
|
|
37
|
-
*/
|
|
38
|
-
connectFromRemote(command: string, cwd: string, parentContext: SubshellContext): Promise<SubshellContext>;
|
|
39
|
-
/**
|
|
40
|
-
* Disconnect from the Docker container
|
|
41
|
-
*/
|
|
42
|
-
disconnect(): Promise<void>;
|
|
43
|
-
/**
|
|
44
|
-
* Check if this handler is currently connected to a Docker container
|
|
45
|
-
*/
|
|
46
|
-
isConnected(): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Execute a command in the Docker container
|
|
49
|
-
*/
|
|
50
|
-
executeCommand(command: string): Promise<CommandResult>;
|
|
51
|
-
/**
|
|
52
|
-
* Read a file from the Docker container filesystem
|
|
53
|
-
*/
|
|
54
|
-
readFile(path: string): Promise<string>;
|
|
55
|
-
/**
|
|
56
|
-
* Write a file to the Docker container filesystem
|
|
57
|
-
*/
|
|
58
|
-
writeFile(path: string, content: string | Buffer): Promise<void>;
|
|
59
|
-
/**
|
|
60
|
-
* List directory contents in Docker container
|
|
61
|
-
*/
|
|
62
|
-
listDirectory(path: string): Promise<DirectoryEntry[]>;
|
|
63
|
-
/**
|
|
64
|
-
* Search for files matching a pattern in Docker container
|
|
65
|
-
*/
|
|
66
|
-
searchFiles(pattern: string, directory: string): Promise<SearchResult[]>;
|
|
67
|
-
/**
|
|
68
|
-
* Get the current working directory in the Docker container
|
|
69
|
-
* For initial detection: runs pwd in the container
|
|
70
|
-
* For subsequent calls: returns the tracked CWD (since each docker exec is a new shell)
|
|
71
|
-
*/
|
|
72
|
-
getCurrentWorkingDirectory(): Promise<string>;
|
|
73
|
-
/**
|
|
74
|
-
* Get the shell type
|
|
75
|
-
*/
|
|
76
|
-
getShellType(): Promise<string>;
|
|
77
|
-
/**
|
|
78
|
-
* Get the operating system type
|
|
79
|
-
*/
|
|
80
|
-
getOSType(): Promise<OSType>;
|
|
81
|
-
/**
|
|
82
|
-
* Get breadcrumb information for the UI
|
|
83
|
-
*/
|
|
84
|
-
getBreadcrumbs(): BreadcrumbInfo[];
|
|
85
|
-
/**
|
|
86
|
-
* Parse Docker exec command to extract container ID
|
|
87
|
-
*/
|
|
88
|
-
private parseDockerCommand;
|
|
89
|
-
/**
|
|
90
|
-
* Verify that the container exists and is running
|
|
91
|
-
*/
|
|
92
|
-
private verifyContainer;
|
|
93
|
-
/**
|
|
94
|
-
* Detect the shell type in the Docker container
|
|
95
|
-
*/
|
|
96
|
-
private detectShellType;
|
|
97
|
-
/**
|
|
98
|
-
* Detect the operating system type in the Docker container
|
|
99
|
-
*/
|
|
100
|
-
private detectOSType;
|
|
101
|
-
/**
|
|
102
|
-
* Build a Docker exec command with working directory context
|
|
103
|
-
*/
|
|
104
|
-
private buildDockerCommand;
|
|
105
|
-
/**
|
|
106
|
-
* Resolve a path to an absolute path
|
|
107
|
-
*/
|
|
108
|
-
private resolveAbsolutePath;
|
|
109
|
-
/**
|
|
110
|
-
* Parse directory listing output
|
|
111
|
-
*/
|
|
112
|
-
private parseDirectoryListing;
|
|
113
|
-
/**
|
|
114
|
-
* Parse search results from grep output
|
|
115
|
-
*/
|
|
116
|
-
private parseSearchResults;
|
|
117
|
-
/**
|
|
118
|
-
* Execute a promise with a timeout
|
|
119
|
-
*/
|
|
120
|
-
private executeWithTimeout;
|
|
121
|
-
/**
|
|
122
|
-
* Execute a command on the host (local or remote)
|
|
123
|
-
*/
|
|
124
|
-
private executeHostCommand;
|
|
125
|
-
/**
|
|
126
|
-
* Create a new instance of this handler
|
|
127
|
-
*/
|
|
128
|
-
createNew(): SubshellHandler;
|
|
129
|
-
}
|
|
130
|
-
//# sourceMappingURL=docker-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"docker-handler.d.ts","sourceRoot":"","sources":["../../../src/context/handlers/docker-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,eAAe,EAAmD,MAAM,EAAE,MAAM,aAAa,CAAC;AAMvG;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,2BAA2B;IAC3B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,YAAY,EAAE,CAAC;IAkB9E;;;;OAIG;IACG,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC;IAuBnD;;OAEG;IACG,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;IAIlC;;OAEG;IACH,cAAc,IAAI,cAAc,EAAE;IAqBlC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAuC1B;;OAEG;YACW,eAAe;IA4B7B;;OAEG;YACW,eAAe;IAsB7B;;OAEG;YACW,YAAY;IAoB1B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA6B7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;OAEG;YACW,kBAAkB;IAgBhC;;OAEG;YACW,kBAAkB;IAsBhC;;OAEG;IACH,SAAS,IAAI,eAAe;CAG7B"}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SSH Handler for remote shell connections
|
|
3
|
-
*/
|
|
4
|
-
import { Client } from 'ssh2';
|
|
5
|
-
import { SubshellHandler, BreadcrumbInfo, CommandResult, DirectoryEntry, SearchResult } from '../subshell-handler.js';
|
|
6
|
-
import { SubshellContext, OSType } from '../types.js';
|
|
7
|
-
/**
|
|
8
|
-
* SSH-specific configuration
|
|
9
|
-
*/
|
|
10
|
-
export interface SSHConfig {
|
|
11
|
-
host: string;
|
|
12
|
-
port: number;
|
|
13
|
-
username: string;
|
|
14
|
-
password?: string;
|
|
15
|
-
privateKey?: Buffer | string;
|
|
16
|
-
passphrase?: string;
|
|
17
|
-
isNested?: boolean;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* SSH Handler implementation
|
|
21
|
-
*/
|
|
22
|
-
export declare class SSHHandler implements SubshellHandler {
|
|
23
|
-
readonly type = "ssh";
|
|
24
|
-
readonly detectionPatterns: RegExp[];
|
|
25
|
-
private _client;
|
|
26
|
-
private sftpClient;
|
|
27
|
-
private config;
|
|
28
|
-
private currentWorkingDirectory;
|
|
29
|
-
private shellType;
|
|
30
|
-
private osType;
|
|
31
|
-
private sessionId;
|
|
32
|
-
private onPasswordRequest?;
|
|
33
|
-
private _isConnected;
|
|
34
|
-
private onDisconnectCallback?;
|
|
35
|
-
/**
|
|
36
|
-
* Get the underlying SSH client (used for PTY commands)
|
|
37
|
-
*/
|
|
38
|
-
get client(): Client | null;
|
|
39
|
-
/**
|
|
40
|
-
* Set password request callback
|
|
41
|
-
*/
|
|
42
|
-
setPasswordRequestCallback(callback: (message: string) => Promise<string>): void;
|
|
43
|
-
/**
|
|
44
|
-
* Set callback to be called when the connection is lost
|
|
45
|
-
*/
|
|
46
|
-
setDisconnectCallback(callback: (error?: string) => void): void;
|
|
47
|
-
/**
|
|
48
|
-
* Check if the handler is currently connected
|
|
49
|
-
*/
|
|
50
|
-
isConnected(): boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Detect if a command should trigger this handler
|
|
53
|
-
*/
|
|
54
|
-
detect(command: string): boolean;
|
|
55
|
-
/**
|
|
56
|
-
* Attach to an existing SSH session detected from PTY output.
|
|
57
|
-
* This is used for "Warpify" mode where the user has already established
|
|
58
|
-
* an SSH connection in the terminal and pressed Alt+E to attach.
|
|
59
|
-
*
|
|
60
|
-
* Unlike connect(), this does NOT establish a new SSH connection.
|
|
61
|
-
* It creates a context based on the detected session info for AI awareness.
|
|
62
|
-
* Commands will continue to flow through the PTY, not via ssh2 library.
|
|
63
|
-
*
|
|
64
|
-
* @param connectionString - The detected connection string (e.g., "user@hostname")
|
|
65
|
-
*/
|
|
66
|
-
attachFromPtyOutput(connectionString: string): SubshellContext;
|
|
67
|
-
/**
|
|
68
|
-
* Connect to the SSH server
|
|
69
|
-
*/
|
|
70
|
-
connect(command: string, cwd: string): Promise<SubshellContext>;
|
|
71
|
-
/**
|
|
72
|
-
* Connect from an existing remote context (nested session)
|
|
73
|
-
*/
|
|
74
|
-
connectFromRemote(command: string, cwd: string, parentContext: SubshellContext): Promise<SubshellContext>;
|
|
75
|
-
/**
|
|
76
|
-
* Create a network stream/tunnel through this SSH connection
|
|
77
|
-
*/
|
|
78
|
-
createStream(host: string, port: number): Promise<any>;
|
|
79
|
-
/**
|
|
80
|
-
* Disconnect from the SSH server
|
|
81
|
-
*/
|
|
82
|
-
disconnect(): Promise<void>;
|
|
83
|
-
/**
|
|
84
|
-
* Execute a command in the SSH session
|
|
85
|
-
*/
|
|
86
|
-
executeCommand(command: string): Promise<CommandResult>;
|
|
87
|
-
/**
|
|
88
|
-
* Read a file from the remote filesystem
|
|
89
|
-
*/
|
|
90
|
-
readFile(path: string): Promise<string>;
|
|
91
|
-
/**
|
|
92
|
-
* Write a file to the remote filesystem
|
|
93
|
-
*/
|
|
94
|
-
writeFile(path: string, content: string | Buffer): Promise<void>;
|
|
95
|
-
/**
|
|
96
|
-
* List directory contents
|
|
97
|
-
*/
|
|
98
|
-
listDirectory(path: string): Promise<DirectoryEntry[]>;
|
|
99
|
-
/**
|
|
100
|
-
* Search for files matching a pattern
|
|
101
|
-
*/
|
|
102
|
-
searchFiles(pattern: string, directory: string): Promise<SearchResult[]>;
|
|
103
|
-
/**
|
|
104
|
-
* Get the current working directory
|
|
105
|
-
*/
|
|
106
|
-
getCurrentWorkingDirectory(): Promise<string>;
|
|
107
|
-
/**
|
|
108
|
-
* Get the shell type
|
|
109
|
-
*/
|
|
110
|
-
getShellType(): Promise<string>;
|
|
111
|
-
/**
|
|
112
|
-
* Get the operating system type
|
|
113
|
-
*/
|
|
114
|
-
getOSType(): Promise<OSType>;
|
|
115
|
-
/**
|
|
116
|
-
* Get breadcrumb information for the UI
|
|
117
|
-
*/
|
|
118
|
-
getBreadcrumbs(): BreadcrumbInfo[];
|
|
119
|
-
/**
|
|
120
|
-
* Parse SSH command to extract connection details
|
|
121
|
-
*/
|
|
122
|
-
private parseSSHCommand;
|
|
123
|
-
/**
|
|
124
|
-
* Establish SSH connection
|
|
125
|
-
*/
|
|
126
|
-
/**
|
|
127
|
-
* Establish SSH connection.
|
|
128
|
-
* Handles authentication retries (agent -> keys -> password).
|
|
129
|
-
* For nested connections, uses streamFactory to get a fresh stream for each attempt.
|
|
130
|
-
*/
|
|
131
|
-
private establishConnection;
|
|
132
|
-
/**
|
|
133
|
-
* Single SSH connection attempt.
|
|
134
|
-
* Password retry logic is handled by establishConnection().
|
|
135
|
-
* @param enableKeyboard - Whether to enable keyboard-interactive auth.
|
|
136
|
-
* Set to false for key-based attempts so the server doesn't prompt for password prematurely.
|
|
137
|
-
* Set to true only for the final password-retry attempt.
|
|
138
|
-
*/
|
|
139
|
-
private establishConnectionOnce;
|
|
140
|
-
/**
|
|
141
|
-
* Build ssh2 connection config.
|
|
142
|
-
* @param enableKeyboard - When true, enables keyboard-interactive auth.
|
|
143
|
-
* This should only be true for the final password-retry attempt;
|
|
144
|
-
* otherwise the server's keyboard-interactive challenge fires before
|
|
145
|
-
* key-based auth methods (agent, key files) have been tried.
|
|
146
|
-
*/
|
|
147
|
-
private buildConnectConfig;
|
|
148
|
-
private requestPassword;
|
|
149
|
-
private buildPasswordPromptMessage;
|
|
150
|
-
private isAuthenticationFailure;
|
|
151
|
-
private isKeyParseFailure;
|
|
152
|
-
private parsePort;
|
|
153
|
-
private applySSHOption;
|
|
154
|
-
private tokenizeSSHCommand;
|
|
155
|
-
private loadIdentityFile;
|
|
156
|
-
private resolveIdentityPath;
|
|
157
|
-
private loadDefaultIdentityFiles;
|
|
158
|
-
/**
|
|
159
|
-
* Parse ~/.ssh/config to find IdentityFile entries for the given host.
|
|
160
|
-
* Supports standard SSH config patterns including wildcards (*, ?) and quoted paths.
|
|
161
|
-
*/
|
|
162
|
-
private getIdentityFilesFromConfig;
|
|
163
|
-
/**
|
|
164
|
-
* Convert standard SSH config glob pattern to RegExp.
|
|
165
|
-
* Supports * (wildcard) and ? (single char).
|
|
166
|
-
*/
|
|
167
|
-
private convertGlobToRegex;
|
|
168
|
-
/**
|
|
169
|
-
* Initialize SFTP session
|
|
170
|
-
*/
|
|
171
|
-
private initializeSFTP;
|
|
172
|
-
/**
|
|
173
|
-
* Detect the shell type on the remote system
|
|
174
|
-
*/
|
|
175
|
-
private detectShellType;
|
|
176
|
-
/**
|
|
177
|
-
* Detect the operating system type
|
|
178
|
-
*/
|
|
179
|
-
private detectOSType;
|
|
180
|
-
/**
|
|
181
|
-
* Inject shell integration script
|
|
182
|
-
*/
|
|
183
|
-
private injectShellIntegration;
|
|
184
|
-
/**
|
|
185
|
-
* Get shell integration script based on shell type
|
|
186
|
-
*/
|
|
187
|
-
private getShellIntegrationScript;
|
|
188
|
-
/**
|
|
189
|
-
* Resolve a path to an absolute path
|
|
190
|
-
*/
|
|
191
|
-
private resolveAbsolutePath;
|
|
192
|
-
/**
|
|
193
|
-
* Parse directory listing output (ls -la)
|
|
194
|
-
*/
|
|
195
|
-
private parseDirectoryListing;
|
|
196
|
-
/**
|
|
197
|
-
* Create a new instance of this handler
|
|
198
|
-
*/
|
|
199
|
-
createNew(): SubshellHandler;
|
|
200
|
-
}
|
|
201
|
-
//# sourceMappingURL=ssh-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ssh-handler.d.ts","sourceRoot":"","sources":["../../../src/context/handlers/ssh-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,EAAgC,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,eAAe,EAAmD,MAAM,EAAE,MAAM,aAAa,CAAC;AAOvG;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ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B;IAkD1B,OAAO,CAAC,gBAAgB;IAaxB,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,wBAAwB;IA4ChC;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IA8DlC;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAQ1B;;OAEG;YACW,cAAc;IAiB5B;;OAEG;YACW,eAAe;IAe7B;;OAEG;YACW,YAAY;IAc1B;;OAEG;YACW,sBAAsB;IAUpC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAsCjC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAY3B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAyB7B;;OAEG;IACH,SAAS,IAAI,eAAe;CAU7B"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WSL Handler for Windows Subsystem for Linux
|
|
3
|
-
*/
|
|
4
|
-
import { SubshellHandler, BreadcrumbInfo, CommandResult, DirectoryEntry, SearchResult } from '../subshell-handler.js';
|
|
5
|
-
import { SubshellContext, OSType } from '../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* WSL-specific configuration
|
|
8
|
-
*/
|
|
9
|
-
export interface WSLConfig {
|
|
10
|
-
/** WSL distribution name (e.g., "Ubuntu", "Debian") */
|
|
11
|
-
distribution: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* WSL Handler implementation
|
|
15
|
-
*/
|
|
16
|
-
export declare class WSLHandler implements SubshellHandler {
|
|
17
|
-
readonly type = "wsl";
|
|
18
|
-
readonly detectionPatterns: RegExp[];
|
|
19
|
-
private config;
|
|
20
|
-
private currentWorkingDirectory;
|
|
21
|
-
private shellType;
|
|
22
|
-
private sessionId;
|
|
23
|
-
private shellProcess;
|
|
24
|
-
private commandQueue;
|
|
25
|
-
private currentOutput;
|
|
26
|
-
private currentError;
|
|
27
|
-
private onOutputCallback;
|
|
28
|
-
/**
|
|
29
|
-
* Set a callback to receive real-time output from commands
|
|
30
|
-
* This is essential for interactive commands like sudo that need user input
|
|
31
|
-
*/
|
|
32
|
-
setOutputCallback(callback: ((data: string, type: 'stdout' | 'stderr') => void) | null): void;
|
|
33
|
-
/**
|
|
34
|
-
* Write data to the shell's stdin (for user input like passwords)
|
|
35
|
-
*/
|
|
36
|
-
writeToStdin(data: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Detect if a command should trigger this handler
|
|
39
|
-
*/
|
|
40
|
-
detect(command: string): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Connect to the WSL environment
|
|
43
|
-
*/
|
|
44
|
-
connect(command: string, cwd: string): Promise<SubshellContext>;
|
|
45
|
-
/**
|
|
46
|
-
* Spawn an interactive shell process
|
|
47
|
-
*/
|
|
48
|
-
private spawnInteractiveShell;
|
|
49
|
-
/**
|
|
50
|
-
* Disconnect from the WSL environment
|
|
51
|
-
*/
|
|
52
|
-
disconnect(): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Check if this handler is currently connected to a WSL environment
|
|
55
|
-
*/
|
|
56
|
-
isConnected(): boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Execute a command in the WSL environment
|
|
59
|
-
*/
|
|
60
|
-
executeCommand(command: string): Promise<CommandResult>;
|
|
61
|
-
/**
|
|
62
|
-
* Wait for command completion by monitoring output
|
|
63
|
-
*/
|
|
64
|
-
private waitForCommandCompletion;
|
|
65
|
-
/**
|
|
66
|
-
* Read a file from the WSL filesystem
|
|
67
|
-
*/
|
|
68
|
-
readFile(path: string): Promise<string>;
|
|
69
|
-
/**
|
|
70
|
-
* Write a file to the WSL filesystem
|
|
71
|
-
*/
|
|
72
|
-
writeFile(path: string, content: string | Buffer): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* List directory contents in WSL
|
|
75
|
-
*/
|
|
76
|
-
listDirectory(path: string): Promise<DirectoryEntry[]>;
|
|
77
|
-
/**
|
|
78
|
-
* Search for files matching a pattern in WSL
|
|
79
|
-
*/
|
|
80
|
-
searchFiles(pattern: string, directory: string): Promise<SearchResult[]>;
|
|
81
|
-
/**
|
|
82
|
-
* Get the current working directory in WSL
|
|
83
|
-
*/
|
|
84
|
-
getCurrentWorkingDirectory(): Promise<string>;
|
|
85
|
-
/**
|
|
86
|
-
* Get the shell type
|
|
87
|
-
*/
|
|
88
|
-
getShellType(): Promise<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Get the operating system type (always linux for WSL)
|
|
91
|
-
*/
|
|
92
|
-
getOSType(): Promise<OSType>;
|
|
93
|
-
/**
|
|
94
|
-
* Get breadcrumb information for the UI
|
|
95
|
-
*/
|
|
96
|
-
getBreadcrumbs(): BreadcrumbInfo[];
|
|
97
|
-
/**
|
|
98
|
-
* Verify that WSL is available on the system
|
|
99
|
-
*/
|
|
100
|
-
private verifyWSLAvailable;
|
|
101
|
-
/**
|
|
102
|
-
* Parse WSL command to extract distribution name
|
|
103
|
-
*/
|
|
104
|
-
private parseWSLCommand;
|
|
105
|
-
/**
|
|
106
|
-
* Get the default WSL distribution
|
|
107
|
-
*/
|
|
108
|
-
private getDefaultDistribution;
|
|
109
|
-
/**
|
|
110
|
-
* Detect the shell type in WSL
|
|
111
|
-
*/
|
|
112
|
-
private detectShellType;
|
|
113
|
-
/**
|
|
114
|
-
* Build a WSL command with working directory context
|
|
115
|
-
*/
|
|
116
|
-
private buildWSLCommand;
|
|
117
|
-
/**
|
|
118
|
-
* Convert Windows path to WSL path
|
|
119
|
-
*/
|
|
120
|
-
static windowsToWSLPath(windowsPath: string): string;
|
|
121
|
-
/**
|
|
122
|
-
* Convert WSL path to Windows path
|
|
123
|
-
*/
|
|
124
|
-
static wslToWindowsPath(wslPath: string): string;
|
|
125
|
-
/**
|
|
126
|
-
* Resolve a path to a WSL path
|
|
127
|
-
*/
|
|
128
|
-
private resolveWSLPath;
|
|
129
|
-
/**
|
|
130
|
-
* Parse directory listing output
|
|
131
|
-
*/
|
|
132
|
-
private parseDirectoryListing;
|
|
133
|
-
/**
|
|
134
|
-
* Parse search results from grep output
|
|
135
|
-
*/
|
|
136
|
-
private parseSearchResults;
|
|
137
|
-
/**
|
|
138
|
-
* Execute a promise with a timeout
|
|
139
|
-
*/
|
|
140
|
-
private executeWithTimeout;
|
|
141
|
-
/**
|
|
142
|
-
* Create a new instance of this handler
|
|
143
|
-
*/
|
|
144
|
-
createNew(): SubshellHandler;
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=wsl-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"wsl-handler.d.ts","sourceRoot":"","sources":["../../../src/context/handlers/wsl-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtH,OAAO,EAAE,eAAe,EAAmD,MAAM,EAAE,MAAM,aAAa,CAAC;AAMvG;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,UAAW,YAAW,eAAe;IAChD,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,iBAAiB,WAIxB;IAEF,OAAO,CAAC,MAAM,CAA0B;IACxC,OAAO,CAAC,uBAAuB,CAAe;IAC9C,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,YAAY,CAIZ;IACR,OAAO,CAAC,aAAa,CAAc;IACnC,OAAO,CAAC,YAAY,CAAc;IAGlC,OAAO,CAAC,gBAAgB,CAAoE;IAE5F;;;OAGG;IACH,iBAAiB,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG,QAAQ,KAAK,IAAI,CAAC,GAAG,IAAI,GAAG,IAAI;IAI7F;;OAEG;IACH,YAAY,CAAC,IAAI,EA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,WAAW,EAAE,MAAM,GAAG,MAAM;IAapD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAahD;;OAEG;IACH,OAAO,CAAC,cAAc;IAoBtB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA6B7B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;OAEG;YACW,kBAAkB;IAgBhC;;OAEG;IACH,SAAS,IAAI,eAAe;CAO7B"}
|
package/dist/context/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Context management system exports
|
|
3
|
-
*/
|
|
4
|
-
export { SubshellContext, SubshellMetadata, SubshellType, ConnectionState, OSType, SubshellConnectionError, SubshellExecutionError, } from './types';
|
|
5
|
-
export { SubshellHandler, BreadcrumbInfo, CommandResult, DirectoryEntry, SearchResult, } from './subshell-handler';
|
|
6
|
-
export { ContextManager, ContextChangeCallback, } from './context-manager';
|
|
7
|
-
export { CommandDetector, DetectionResult, } from './command-detector';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,MAAM,EACN,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,eAAe,EACf,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,cAAc,EACd,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,eAAe,EACf,eAAe,GAChB,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface and types for subshell handlers
|
|
3
|
-
*/
|
|
4
|
-
import { SubshellContext } from './types';
|
|
5
|
-
/**
|
|
6
|
-
* Information for displaying breadcrumbs in the UI
|
|
7
|
-
*/
|
|
8
|
-
export interface BreadcrumbInfo {
|
|
9
|
-
/** Label for the breadcrumb (e.g., "ssh", "wsl", "docker") */
|
|
10
|
-
label: string;
|
|
11
|
-
/** Optional value to display (e.g., "user@host") */
|
|
12
|
-
value?: string;
|
|
13
|
-
/** Optional color for the breadcrumb */
|
|
14
|
-
color?: string;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Result of a command execution
|
|
18
|
-
*/
|
|
19
|
-
export interface CommandResult {
|
|
20
|
-
/** Standard output from the command */
|
|
21
|
-
stdout: string;
|
|
22
|
-
/** Standard error from the command */
|
|
23
|
-
stderr: string;
|
|
24
|
-
/** Exit code of the command */
|
|
25
|
-
exitCode: number;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Directory entry information
|
|
29
|
-
*/
|
|
30
|
-
export interface DirectoryEntry {
|
|
31
|
-
/** Name of the file or directory */
|
|
32
|
-
name: string;
|
|
33
|
-
/** Type of the entry */
|
|
34
|
-
type: 'file' | 'directory';
|
|
35
|
-
/** Size in bytes (optional) */
|
|
36
|
-
size?: number;
|
|
37
|
-
/** Permissions string (optional) */
|
|
38
|
-
permissions?: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Search result from file search operations
|
|
42
|
-
*/
|
|
43
|
-
export interface SearchResult {
|
|
44
|
-
/** File path where the match was found */
|
|
45
|
-
file: string;
|
|
46
|
-
/** Line number of the match */
|
|
47
|
-
line: number;
|
|
48
|
-
/** Content of the matching line */
|
|
49
|
-
content: string;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Interface that all subshell handlers must implement
|
|
53
|
-
*/
|
|
54
|
-
export interface SubshellHandler {
|
|
55
|
-
/** Type identifier for this handler */
|
|
56
|
-
readonly type: string;
|
|
57
|
-
/** Regular expressions for detecting this subshell type */
|
|
58
|
-
readonly detectionPatterns: RegExp[];
|
|
59
|
-
/**
|
|
60
|
-
* Detect if a command should trigger this handler
|
|
61
|
-
* @param command The command to check
|
|
62
|
-
* @returns True if this handler should handle the command
|
|
63
|
-
*/
|
|
64
|
-
detect(command: string): boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Connect to the subshell environment
|
|
67
|
-
* @param command The command that initiated the subshell
|
|
68
|
-
* @param cwd Current working directory
|
|
69
|
-
* @returns Promise resolving to the new subshell context
|
|
70
|
-
*/
|
|
71
|
-
connect(command: string, cwd: string): Promise<SubshellContext>;
|
|
72
|
-
/**
|
|
73
|
-
* Disconnect from the subshell environment
|
|
74
|
-
* @returns Promise that resolves when disconnected
|
|
75
|
-
*/
|
|
76
|
-
disconnect(): Promise<void>;
|
|
77
|
-
/**
|
|
78
|
-
* Execute a command in the subshell
|
|
79
|
-
* @param command The command to execute
|
|
80
|
-
* @returns Promise resolving to the command result
|
|
81
|
-
*/
|
|
82
|
-
executeCommand(command: string): Promise<CommandResult>;
|
|
83
|
-
/**
|
|
84
|
-
* Read a file from the subshell filesystem
|
|
85
|
-
* @param path Path to the file
|
|
86
|
-
* @returns Promise resolving to the file content
|
|
87
|
-
*/
|
|
88
|
-
readFile(path: string): Promise<string>;
|
|
89
|
-
/**
|
|
90
|
-
* Write a file to the subshell filesystem
|
|
91
|
-
* @param path Path to the file
|
|
92
|
-
* @param content Content to write (string or Buffer)
|
|
93
|
-
* @returns Promise that resolves when write is complete
|
|
94
|
-
*/
|
|
95
|
-
writeFile(path: string, content: string | Buffer): Promise<void>;
|
|
96
|
-
/**
|
|
97
|
-
* List directory contents in the subshell
|
|
98
|
-
* @param path Path to the directory
|
|
99
|
-
* @returns Promise resolving to directory entries
|
|
100
|
-
*/
|
|
101
|
-
listDirectory(path: string): Promise<DirectoryEntry[]>;
|
|
102
|
-
/**
|
|
103
|
-
* Search for files matching a pattern
|
|
104
|
-
* @param pattern Search pattern (regex)
|
|
105
|
-
* @param directory Directory to search in
|
|
106
|
-
* @returns Promise resolving to search results
|
|
107
|
-
*/
|
|
108
|
-
searchFiles(pattern: string, directory: string): Promise<SearchResult[]>;
|
|
109
|
-
/**
|
|
110
|
-
* Get the current working directory in the subshell
|
|
111
|
-
* @returns Promise resolving to the current working directory
|
|
112
|
-
*/
|
|
113
|
-
getCurrentWorkingDirectory(): Promise<string>;
|
|
114
|
-
/**
|
|
115
|
-
* Get the shell type (bash, zsh, fish, etc.)
|
|
116
|
-
* @returns Promise resolving to the shell type
|
|
117
|
-
*/
|
|
118
|
-
getShellType(): Promise<string>;
|
|
119
|
-
/**
|
|
120
|
-
* Get the operating system type
|
|
121
|
-
* @returns Promise resolving to the OS type
|
|
122
|
-
*/
|
|
123
|
-
getOSType(): Promise<'windows' | 'macos' | 'linux'>;
|
|
124
|
-
/**
|
|
125
|
-
* Get breadcrumb information for the UI
|
|
126
|
-
* @returns Array of breadcrumb information
|
|
127
|
-
*/
|
|
128
|
-
getBreadcrumbs(): BreadcrumbInfo[];
|
|
129
|
-
/**
|
|
130
|
-
* Set a callback to be called when the connection is lost
|
|
131
|
-
* @param callback Function to call on disconnect with optional error message
|
|
132
|
-
*/
|
|
133
|
-
setDisconnectCallback?(callback: (error?: string) => void): void;
|
|
134
|
-
/**
|
|
135
|
-
* Check if the handler is currently connected
|
|
136
|
-
* @returns True if connected
|
|
137
|
-
*/
|
|
138
|
-
isConnected?(): boolean;
|
|
139
|
-
/**
|
|
140
|
-
* Get the underlying client (for SSH, WSL, Docker handlers that expose it)
|
|
141
|
-
*/
|
|
142
|
-
readonly client?: any;
|
|
143
|
-
/**
|
|
144
|
-
* Connect from an existing remote context (nested session).
|
|
145
|
-
* Used when warpifying a session from within another remote session.
|
|
146
|
-
* @param command The command that initiated the subshell
|
|
147
|
-
* @param cwd Current working directory
|
|
148
|
-
* @param parentContext The parent context (the session we are connecting FROM)
|
|
149
|
-
*/
|
|
150
|
-
connectFromRemote?(command: string, cwd: string, parentContext: SubshellContext): Promise<SubshellContext>;
|
|
151
|
-
/**
|
|
152
|
-
* Create a network stream/tunnel to a destination host:port.
|
|
153
|
-
* Used for SSH tunneling through a jump host.
|
|
154
|
-
* @param host Destination hostname
|
|
155
|
-
* @param port Destination port
|
|
156
|
-
*/
|
|
157
|
-
createStream?(host: string, port: number): Promise<any>;
|
|
158
|
-
/**
|
|
159
|
-
* Create a new instance of this handler.
|
|
160
|
-
* Used to avoid singleton state issues with nested sessions.
|
|
161
|
-
* The new instance should inherit any configuration callbacks (like password prompt).
|
|
162
|
-
*/
|
|
163
|
-
createNew(): SubshellHandler;
|
|
164
|
-
}
|
|
165
|
-
//# sourceMappingURL=subshell-handler.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subshell-handler.d.ts","sourceRoot":"","sources":["../../src/context/subshell-handler.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IAEd,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wCAAwC;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IAEf,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IAEf,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,oCAAoC;IACpC,IAAI,EAAE,MAAM,CAAC;IAEb,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAE3B,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAA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