dexto 1.3.0 → 1.4.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/README.md +25 -15
- package/dist/agents/agent-registry.json +9 -0
- package/dist/agents/coding-agent/coding-agent.yml +5 -0
- package/dist/agents/default-agent.yml +2 -2
- package/dist/api/server-hono.d.ts.map +1 -1
- package/dist/api/server-hono.js +39 -5
- package/dist/cli/cli-subscriber.d.ts.map +1 -1
- package/dist/cli/cli-subscriber.js +7 -1
- package/dist/cli/commands/helpers/formatters.d.ts.map +1 -1
- package/dist/cli/commands/helpers/formatters.js +2 -1
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +14 -40
- package/dist/cli/commands/interactive-commands/command-parser.d.ts +17 -14
- package/dist/cli/commands/interactive-commands/command-parser.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/command-parser.js +0 -15
- package/dist/cli/commands/interactive-commands/commands.d.ts +4 -4
- package/dist/cli/commands/interactive-commands/commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/commands.js +34 -42
- package/dist/cli/commands/interactive-commands/documentation-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/documentation-commands.js +4 -7
- package/dist/cli/commands/interactive-commands/general-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/general-commands.js +159 -117
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts +9 -3
- package/dist/cli/commands/interactive-commands/mcp/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/mcp/index.js +18 -3
- package/dist/cli/commands/interactive-commands/model/index.d.ts +8 -6
- package/dist/cli/commands/interactive-commands/model/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/model/index.js +18 -6
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts +3 -2
- package/dist/cli/commands/interactive-commands/prompt-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/prompt-commands.js +69 -52
- package/dist/cli/commands/interactive-commands/session/index.d.ts +7 -12
- package/dist/cli/commands/interactive-commands/session/index.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/index.js +7 -14
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts +10 -24
- package/dist/cli/commands/interactive-commands/session/session-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/session/session-commands.js +16 -371
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts +1 -0
- package/dist/cli/commands/interactive-commands/system/system-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/system/system-commands.js +103 -74
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/tool-commands.js +5 -62
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts +13 -17
- package/dist/cli/commands/interactive-commands/utils/command-output.d.ts.map +1 -1
- package/dist/cli/commands/interactive-commands/utils/command-output.js +18 -37
- package/dist/cli/commands/list-agents.d.ts +2 -2
- package/dist/cli/commands/list-agents.d.ts.map +1 -1
- package/dist/cli/commands/list-agents.js +36 -32
- package/dist/cli/commands/uninstall.d.ts.map +1 -1
- package/dist/cli/commands/uninstall.js +4 -6
- package/dist/cli/commands/which.d.ts.map +1 -1
- package/dist/cli/commands/which.js +17 -3
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts +9 -22
- package/dist/cli/ink-cli/InkCLIRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/InkCLIRefactored.js +50 -133
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts +24 -3
- package/dist/cli/ink-cli/components/ApprovalPrompt.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ApprovalPrompt.js +160 -45
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts +22 -0
- package/dist/cli/ink-cli/components/ElicitationForm.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/ElicitationForm.js +358 -0
- package/dist/cli/ink-cli/components/Footer.d.ts +16 -0
- package/dist/cli/ink-cli/components/Footer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/Footer.js +27 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts +17 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/HistorySearchBar.js +8 -0
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/ResourceAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/ResourceAutocomplete.js +126 -82
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts +15 -2
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/SlashCommandAutocomplete.js +228 -122
- package/dist/cli/ink-cli/components/StatusBar.d.ts +15 -2
- package/dist/cli/ink-cli/components/StatusBar.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/StatusBar.js +46 -8
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts +52 -0
- package/dist/cli/ink-cli/components/TextBufferInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/TextBufferInput.js +471 -0
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts +11 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/base/BaseSelector.js +90 -49
- package/dist/cli/ink-cli/components/chat/Header.d.ts +1 -0
- package/dist/cli/ink-cli/components/chat/Header.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/Header.js +7 -2
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts +3 -0
- package/dist/cli/ink-cli/components/chat/MessageItem.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/MessageItem.js +95 -9
- package/dist/cli/ink-cli/components/chat/MessageList.js +1 -1
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts +16 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/QueuedMessagesDisplay.js +27 -0
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts +4 -2
- package/dist/cli/ink-cli/components/chat/ToolIcon.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/chat/ToolIcon.js +19 -5
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ConfigBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/HelpBox.js +15 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/LogConfigBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionHistoryBox.js +37 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SessionListBox.js +9 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/ShortcutsBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StatsBox.js +29 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts +45 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/StyledBox.js +38 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts +10 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/SyspromptBox.js +6 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts +13 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/chat/styled-boxes/index.js +12 -0
- package/dist/cli/ink-cli/components/input/InputArea.d.ts +36 -8
- package/dist/cli/ink-cli/components/input/InputArea.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/input/InputArea.js +3 -3
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts +25 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/AlternateBufferCLI.js +166 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts +27 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/StaticCLI.js +95 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts +10 -0
- package/dist/cli/ink-cli/components/modes/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/modes/index.js +9 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ApiKeyInput.js +92 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/CustomModelWizard.js +177 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/LogLevelSelector.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddChoice.js +59 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts +26 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpAddSelector.js +73 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomTypeSelector.js +51 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpCustomWizard.js +215 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpRemoveSelector.js +74 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpSelector.js +52 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts +28 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerActions.js +84 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/McpServerList.js +109 -0
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts +15 -8
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/ModelSelectorRefactored.js +247 -24
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts +22 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddChoice.js +52 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts +29 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptAddWizard.js +166 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts +27 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptDeleteSelector.js +119 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts +33 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/PromptList.js +144 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts +23 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SearchOverlay.js +189 -0
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts +7 -2
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
- package/dist/cli/ink-cli/components/overlays/SessionSelectorRefactored.js +19 -5
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts +21 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/SessionSubcommandSelector.js +42 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts +20 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/StreamSelector.js +58 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts +25 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/overlays/ToolBrowser.js +400 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/DiffRenderer.js +65 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FilePreviewRenderer.js +66 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts +19 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/FileRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/GenericRenderer.js +26 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts +20 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/SearchRenderer.js +12 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts +21 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/ShellRenderer.js +25 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts +61 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/diff-shared.js +158 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts +28 -0
- package/dist/cli/ink-cli/components/renderers/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/renderers/index.js +36 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts +38 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/MarkdownText.js +360 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts +44 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/VirtualizedList.js +300 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts +185 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.d.ts.map +1 -0
- package/dist/cli/ink-cli/components/shared/text-buffer.js +1338 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts +10 -0
- package/dist/cli/ink-cli/constants/processingPhrases.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/processingPhrases.js +64 -0
- package/dist/cli/ink-cli/constants/tips.d.ts +15 -0
- package/dist/cli/ink-cli/constants/tips.d.ts.map +1 -0
- package/dist/cli/ink-cli/constants/tips.js +53 -0
- package/dist/cli/ink-cli/containers/InputContainer.d.ts +42 -8
- package/dist/cli/ink-cli/containers/InputContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/InputContainer.js +491 -85
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts +23 -5
- package/dist/cli/ink-cli/containers/OverlayContainer.d.ts.map +1 -1
- package/dist/cli/ink-cli/containers/OverlayContainer.js +1156 -130
- package/dist/cli/ink-cli/containers/index.d.ts +1 -1
- package/dist/cli/ink-cli/containers/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts +36 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/KeypressContext.js +461 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts +27 -0
- package/dist/cli/ink-cli/contexts/MouseContext.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/MouseContext.js +102 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts +33 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/ScrollProvider.js +170 -0
- package/dist/cli/ink-cli/contexts/index.d.ts +7 -0
- package/dist/cli/ink-cli/contexts/index.d.ts.map +1 -0
- package/dist/cli/ink-cli/contexts/index.js +6 -0
- package/dist/cli/ink-cli/hooks/index.d.ts +5 -0
- package/dist/cli/ink-cli/hooks/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/index.js +6 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts +26 -9
- package/dist/cli/ink-cli/hooks/useAgentEvents.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useAgentEvents.js +86 -198
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useBatchedScroll.js +25 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts +50 -0
- package/dist/cli/ink-cli/hooks/useCLIState.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useCLIState.js +188 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts +24 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useElapsedTime.js +69 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts +61 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useHistorySearch.js +210 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts +136 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useInputOrchestrator.js +663 -0
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.d.ts.map +1 -1
- package/dist/cli/ink-cli/hooks/useKeyboardShortcuts.js +7 -26
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts +18 -0
- package/dist/cli/ink-cli/hooks/useKeypress.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useKeypress.js +26 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts +30 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/usePhraseCycler.js +68 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts +19 -0
- package/dist/cli/ink-cli/hooks/useStreaming.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useStreaming.js +26 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts +14 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTerminalSize.js +31 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts +42 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.d.ts.map +1 -0
- package/dist/cli/ink-cli/hooks/useTokenCounter.js +96 -0
- package/dist/cli/ink-cli/services/CommandService.d.ts +32 -1
- package/dist/cli/ink-cli/services/CommandService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/CommandService.js +36 -5
- package/dist/cli/ink-cli/services/InputService.d.ts +1 -5
- package/dist/cli/ink-cli/services/InputService.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/InputService.js +1 -8
- package/dist/cli/ink-cli/services/index.d.ts +2 -1
- package/dist/cli/ink-cli/services/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/services/index.js +2 -1
- package/dist/cli/ink-cli/services/processStream.d.ts +69 -0
- package/dist/cli/ink-cli/services/processStream.d.ts.map +1 -0
- package/dist/cli/ink-cli/services/processStream.js +674 -0
- package/dist/cli/ink-cli/state/actions.d.ts +30 -60
- package/dist/cli/ink-cli/state/actions.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/actions.js +3 -0
- package/dist/cli/ink-cli/state/index.d.ts +5 -3
- package/dist/cli/ink-cli/state/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/index.js +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts +4 -3
- package/dist/cli/ink-cli/state/initialState.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/initialState.js +20 -4
- package/dist/cli/ink-cli/state/reducer.d.ts +3 -0
- package/dist/cli/ink-cli/state/reducer.d.ts.map +1 -1
- package/dist/cli/ink-cli/state/reducer.js +62 -168
- package/dist/cli/ink-cli/state/streaming-state.d.ts +27 -0
- package/dist/cli/ink-cli/state/streaming-state.d.ts.map +1 -0
- package/dist/cli/ink-cli/state/streaming-state.js +39 -0
- package/dist/cli/ink-cli/state/types.d.ts +222 -6
- package/dist/cli/ink-cli/state/types.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts +22 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/bracketedPaste.js +27 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts +49 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/clipboardUtils.js +356 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts +33 -0
- package/dist/cli/ink-cli/utils/commandOverlays.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/commandOverlays.js +78 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts +38 -0
- package/dist/cli/ink-cli/utils/debugLog.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/debugLog.js +66 -0
- package/dist/cli/ink-cli/utils/index.d.ts +2 -1
- package/dist/cli/ink-cli/utils/index.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/index.js +3 -1
- package/dist/cli/ink-cli/utils/input.d.ts +25 -0
- package/dist/cli/ink-cli/utils/input.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/input.js +56 -0
- package/dist/cli/ink-cli/utils/inputParsing.d.ts +0 -9
- package/dist/cli/ink-cli/utils/inputParsing.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/inputParsing.js +0 -27
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts +54 -3
- package/dist/cli/ink-cli/utils/messageFormatting.d.ts.map +1 -1
- package/dist/cli/ink-cli/utils/messageFormatting.js +290 -20
- package/dist/cli/ink-cli/utils/mouse.d.ts +61 -0
- package/dist/cli/ink-cli/utils/mouse.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/mouse.js +209 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts +44 -0
- package/dist/cli/ink-cli/utils/streamSplitter.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/streamSplitter.js +154 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts +63 -0
- package/dist/cli/ink-cli/utils/textUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/textUtils.js +248 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts +9 -0
- package/dist/cli/ink-cli/utils/toolUtils.d.ts.map +1 -0
- package/dist/cli/ink-cli/utils/toolUtils.js +13 -0
- package/dist/cli/utils/options.d.ts.map +1 -1
- package/dist/cli/utils/options.js +0 -2
- package/dist/config/cli-overrides.d.ts +1 -1
- package/dist/config/cli-overrides.d.ts.map +1 -1
- package/dist/config/cli-overrides.js +5 -10
- package/dist/index.js +66 -48
- package/dist/utils/agent-helpers.d.ts +95 -0
- package/dist/utils/agent-helpers.d.ts.map +1 -0
- package/dist/utils/agent-helpers.js +117 -0
- package/dist/webui/assets/index-BkwPkZpd.css +1 -0
- package/dist/webui/assets/index-D9u1XfyH.js +2025 -0
- package/dist/webui/assets/{tanstack-DgxBONJY.js → tanstack-Br79RQ-n.js} +1 -1
- package/dist/webui/index.html +3 -3
- package/package.json +16 -14
- package/dist/cli/commands/interactive-commands/index.d.ts +0 -63
- package/dist/cli/commands/interactive-commands/index.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/index.js +0 -73
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts +0 -34
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-add-utils.js +0 -178
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts +0 -9
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/mcp/mcp-commands.js +0 -325
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts +0 -21
- package/dist/cli/commands/interactive-commands/model/model-commands.d.ts.map +0 -1
- package/dist/cli/commands/interactive-commands/model/model-commands.js +0 -190
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts +0 -26
- package/dist/cli/ink-cli/components/MultiLineTextInput.d.ts.map +0 -1
- package/dist/cli/ink-cli/components/MultiLineTextInput.js +0 -220
- package/dist/discord/bot.d.ts +0 -4
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -193
- package/dist/telegram/bot.d.ts +0 -5
- package/dist/telegram/bot.d.ts.map +0 -1
- package/dist/telegram/bot.js +0 -251
- package/dist/webui/assets/index-DKq5Xng1.js +0 -687
- package/dist/webui/assets/index-D_0_GBu5.css +0 -1
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
* - /log [level] - Set or view log level
|
|
9
9
|
* - /config - Show current configuration
|
|
10
10
|
* - /stats - Show system statistics
|
|
11
|
+
* - /stream - Toggle streaming mode for LLM responses
|
|
11
12
|
*/
|
|
12
13
|
import chalk from 'chalk';
|
|
13
14
|
import { logger } from '@dexto/core';
|
|
14
15
|
import { formatForInkCli } from '../utils/format-output.js';
|
|
16
|
+
import { CommandOutputHelper } from '../utils/command-output.js';
|
|
15
17
|
/**
|
|
16
18
|
* System commands for configuration and monitoring
|
|
17
19
|
*/
|
|
@@ -22,7 +24,7 @@ export const systemCommands = [
|
|
|
22
24
|
usage: '/log [level]',
|
|
23
25
|
category: 'System',
|
|
24
26
|
aliases: [],
|
|
25
|
-
handler: async (args, _agent) => {
|
|
27
|
+
handler: async (args, _agent, _ctx) => {
|
|
26
28
|
const validLevels = ['error', 'warn', 'info', 'http', 'verbose', 'debug', 'silly'];
|
|
27
29
|
const level = args[0];
|
|
28
30
|
if (!level) {
|
|
@@ -73,56 +75,66 @@ export const systemCommands = [
|
|
|
73
75
|
description: 'Show current configuration',
|
|
74
76
|
usage: '/config',
|
|
75
77
|
category: 'System',
|
|
76
|
-
handler: async (_args, agent) => {
|
|
78
|
+
handler: async (_args, agent, _ctx) => {
|
|
77
79
|
try {
|
|
78
80
|
const config = agent.getEffectiveConfig();
|
|
79
|
-
// Build output string
|
|
80
|
-
const outputLines = ['\n⚙️ Current Configuration:\n'];
|
|
81
|
-
// LLM Config
|
|
82
|
-
outputLines.push('🤖 LLM:');
|
|
83
|
-
outputLines.push(` Provider: ${config.llm.provider}`);
|
|
84
|
-
outputLines.push(` Model: ${config.llm.model}`);
|
|
85
|
-
outputLines.push(` Router: ${config.llm.router}`);
|
|
86
|
-
// Session Config
|
|
87
|
-
outputLines.push('\n💬 Sessions:');
|
|
88
|
-
outputLines.push(` Max Sessions: ${config.sessions?.maxSessions?.toString() || 'Default'}`);
|
|
89
|
-
outputLines.push(` Session TTL: ${config.sessions?.sessionTTL ? `${config.sessions.sessionTTL / 1000}s` : 'Default'}`);
|
|
90
|
-
// MCP Servers
|
|
91
|
-
outputLines.push('\n🔌 MCP Servers:');
|
|
92
81
|
const servers = Object.keys(config.mcpServers || {});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
82
|
+
// Get config file path (may not exist for programmatic agents)
|
|
83
|
+
let configFilePath = null;
|
|
84
|
+
try {
|
|
85
|
+
configFilePath = agent.getAgentFilePath();
|
|
97
86
|
}
|
|
98
|
-
|
|
99
|
-
|
|
87
|
+
catch {
|
|
88
|
+
// No config file path available
|
|
100
89
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
90
|
+
// Get enabled plugins
|
|
91
|
+
const pluginsEnabled = [];
|
|
92
|
+
if (config.plugins) {
|
|
93
|
+
// Check built-in plugins
|
|
94
|
+
if (config.plugins.contentPolicy?.enabled) {
|
|
95
|
+
pluginsEnabled.push('contentPolicy');
|
|
96
|
+
}
|
|
97
|
+
if (config.plugins.responseSanitizer?.enabled) {
|
|
98
|
+
pluginsEnabled.push('responseSanitizer');
|
|
99
|
+
}
|
|
100
|
+
// Check custom plugins
|
|
101
|
+
for (const plugin of config.plugins.custom || []) {
|
|
102
|
+
if (plugin.enabled) {
|
|
103
|
+
pluginsEnabled.push(plugin.name);
|
|
104
|
+
}
|
|
115
105
|
}
|
|
116
106
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
107
|
+
// Build styled data
|
|
108
|
+
const styledData = {
|
|
109
|
+
configFilePath,
|
|
110
|
+
provider: config.llm.provider,
|
|
111
|
+
model: config.llm.model,
|
|
112
|
+
maxTokens: config.llm.maxOutputTokens ?? null,
|
|
113
|
+
temperature: config.llm.temperature ?? null,
|
|
114
|
+
toolConfirmationMode: config.toolConfirmation?.mode || 'auto',
|
|
115
|
+
maxSessions: config.sessions?.maxSessions?.toString() || 'Default',
|
|
116
|
+
sessionTTL: config.sessions?.sessionTTL
|
|
117
|
+
? `${config.sessions.sessionTTL / 1000}s`
|
|
118
|
+
: 'Default',
|
|
119
|
+
mcpServers: servers,
|
|
120
|
+
promptsCount: config.prompts?.length || 0,
|
|
121
|
+
pluginsEnabled,
|
|
122
|
+
};
|
|
123
|
+
// Build fallback text (no console.log - interferes with Ink rendering)
|
|
124
|
+
const fallbackLines = [
|
|
125
|
+
'Configuration:',
|
|
126
|
+
configFilePath ? ` Config: ${configFilePath}` : '',
|
|
127
|
+
` LLM: ${config.llm.provider} / ${config.llm.model}`,
|
|
128
|
+
` Tool Confirmation: ${styledData.toolConfirmationMode}`,
|
|
129
|
+
` Sessions: max=${styledData.maxSessions}, ttl=${styledData.sessionTTL}`,
|
|
130
|
+
` MCP Servers: ${servers.length > 0 ? servers.join(', ') : 'none'}`,
|
|
131
|
+
` Prompts: ${styledData.promptsCount}`,
|
|
132
|
+
].filter(Boolean);
|
|
133
|
+
return CommandOutputHelper.styled('config', styledData, fallbackLines.join('\n'));
|
|
122
134
|
}
|
|
123
135
|
catch (error) {
|
|
124
136
|
const errorMsg = `Failed to get configuration: ${error instanceof Error ? error.message : String(error)}`;
|
|
125
|
-
logger.error(errorMsg);
|
|
137
|
+
agent.logger.error(errorMsg);
|
|
126
138
|
return formatForInkCli(`❌ ${errorMsg}`);
|
|
127
139
|
}
|
|
128
140
|
},
|
|
@@ -132,59 +144,76 @@ export const systemCommands = [
|
|
|
132
144
|
description: 'Show system statistics',
|
|
133
145
|
usage: '/stats',
|
|
134
146
|
category: 'System',
|
|
135
|
-
handler: async (_args, agent) => {
|
|
147
|
+
handler: async (_args, agent, ctx) => {
|
|
136
148
|
try {
|
|
137
|
-
// Build output string
|
|
138
|
-
const outputLines = ['\n📊 System Statistics:\n'];
|
|
139
149
|
// Session stats
|
|
140
150
|
const sessionStats = await agent.sessionManager.getSessionStats();
|
|
141
|
-
outputLines.push('💬 Sessions:');
|
|
142
|
-
outputLines.push(` Total Sessions: ${sessionStats.totalSessions.toString()}`);
|
|
143
|
-
outputLines.push(` In Memory: ${sessionStats.inMemorySessions.toString()}`);
|
|
144
|
-
outputLines.push(` Max Allowed: ${sessionStats.maxSessions.toString()}`);
|
|
145
151
|
// MCP stats
|
|
146
|
-
outputLines.push('\n🔌 MCP Servers:');
|
|
147
152
|
const connectedServers = agent.getMcpClients().size;
|
|
148
153
|
const failedConnections = Object.keys(agent.getMcpFailedConnections()).length;
|
|
149
|
-
outputLines.push(` Connected: ${connectedServers.toString()}`);
|
|
150
|
-
if (failedConnections > 0) {
|
|
151
|
-
outputLines.push(` Failed: ${failedConnections.toString()}`);
|
|
152
|
-
}
|
|
153
154
|
// Tools
|
|
155
|
+
let toolCount = 0;
|
|
154
156
|
try {
|
|
155
157
|
const tools = await agent.getAllMcpTools();
|
|
156
|
-
|
|
158
|
+
toolCount = Object.keys(tools).length;
|
|
157
159
|
}
|
|
158
160
|
catch {
|
|
159
|
-
|
|
161
|
+
// Ignore - toolCount stays 0
|
|
160
162
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (failedConnections > 0) {
|
|
171
|
-
console.log(` Failed: ${chalk.red(failedConnections.toString())}`);
|
|
163
|
+
// Get token usage from current session metadata
|
|
164
|
+
let tokenUsage;
|
|
165
|
+
let estimatedCost;
|
|
166
|
+
if (ctx.sessionId) {
|
|
167
|
+
const sessionMetadata = await agent.sessionManager.getSessionMetadata(ctx.sessionId);
|
|
168
|
+
if (sessionMetadata?.tokenUsage) {
|
|
169
|
+
tokenUsage = sessionMetadata.tokenUsage;
|
|
170
|
+
}
|
|
171
|
+
estimatedCost = sessionMetadata?.estimatedCost;
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
// Build styled data
|
|
174
|
+
const styledData = {
|
|
175
|
+
sessions: {
|
|
176
|
+
total: sessionStats.totalSessions,
|
|
177
|
+
inMemory: sessionStats.inMemorySessions,
|
|
178
|
+
maxAllowed: sessionStats.maxSessions,
|
|
179
|
+
},
|
|
180
|
+
mcp: {
|
|
181
|
+
connected: connectedServers,
|
|
182
|
+
failed: failedConnections,
|
|
183
|
+
toolCount,
|
|
184
|
+
},
|
|
185
|
+
...(tokenUsage && { tokenUsage }),
|
|
186
|
+
...(estimatedCost !== undefined && { estimatedCost }),
|
|
187
|
+
};
|
|
188
|
+
// Build fallback text
|
|
189
|
+
const fallbackLines = [
|
|
190
|
+
'System Statistics:',
|
|
191
|
+
` Sessions: ${sessionStats.totalSessions} total, ${sessionStats.inMemorySessions} in memory`,
|
|
192
|
+
` MCP: ${connectedServers} connected, ${toolCount} tools`,
|
|
193
|
+
];
|
|
194
|
+
if (failedConnections > 0) {
|
|
195
|
+
fallbackLines.push(` Failed connections: ${failedConnections}`);
|
|
176
196
|
}
|
|
177
|
-
|
|
178
|
-
|
|
197
|
+
if (tokenUsage) {
|
|
198
|
+
fallbackLines.push(` Tokens: ${tokenUsage.totalTokens} total (${tokenUsage.inputTokens} in, ${tokenUsage.outputTokens} out)`);
|
|
179
199
|
}
|
|
180
|
-
|
|
181
|
-
return formatForInkCli(output);
|
|
200
|
+
return CommandOutputHelper.styled('stats', styledData, fallbackLines.join('\n'));
|
|
182
201
|
}
|
|
183
202
|
catch (error) {
|
|
184
203
|
const errorMsg = `Failed to get statistics: ${error instanceof Error ? error.message : String(error)}`;
|
|
185
|
-
logger.error(errorMsg);
|
|
204
|
+
agent.logger.error(errorMsg);
|
|
186
205
|
return formatForInkCli(`❌ ${errorMsg}`);
|
|
187
206
|
}
|
|
188
207
|
},
|
|
189
208
|
},
|
|
209
|
+
{
|
|
210
|
+
name: 'stream',
|
|
211
|
+
description: 'Toggle streaming mode for LLM responses',
|
|
212
|
+
usage: '/stream',
|
|
213
|
+
category: 'System',
|
|
214
|
+
handler: async (_args, _agent, _ctx) => {
|
|
215
|
+
// Overlay is handled via commandOverlays.ts mapping
|
|
216
|
+
return true;
|
|
217
|
+
},
|
|
218
|
+
},
|
|
190
219
|
];
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* These commands provide functionality for listing and managing MCP tools.
|
|
6
6
|
*
|
|
7
7
|
* Available Tool Commands:
|
|
8
|
-
* - /tools -
|
|
8
|
+
* - /tools - Interactive tool browser
|
|
9
9
|
*/
|
|
10
10
|
import type { CommandDefinition } from './command-parser.js';
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/tool-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"tool-commands.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/interactive-commands/tool-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,qBAAqB,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,EAe3C,CAAC"}
|
|
@@ -5,77 +5,20 @@
|
|
|
5
5
|
* These commands provide functionality for listing and managing MCP tools.
|
|
6
6
|
*
|
|
7
7
|
* Available Tool Commands:
|
|
8
|
-
* - /tools -
|
|
8
|
+
* - /tools - Interactive tool browser
|
|
9
9
|
*/
|
|
10
|
-
import chalk from 'chalk';
|
|
11
|
-
import { logger } from '@dexto/core';
|
|
12
|
-
import { formatForInkCli } from './utils/format-output.js';
|
|
13
10
|
/**
|
|
14
11
|
* Tool management commands
|
|
15
12
|
*/
|
|
16
13
|
export const toolCommands = [
|
|
17
14
|
{
|
|
18
15
|
name: 'tools',
|
|
19
|
-
description: '
|
|
16
|
+
description: 'Browse available tools interactively',
|
|
20
17
|
usage: '/tools',
|
|
21
18
|
category: 'Tool Management',
|
|
22
|
-
handler: async (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const mcpTools = await agent.getAllMcpTools();
|
|
26
|
-
const toolEntries = Object.entries(allTools);
|
|
27
|
-
if (toolEntries.length === 0) {
|
|
28
|
-
const output = '📋 No tools available';
|
|
29
|
-
console.log(chalk.yellow(output));
|
|
30
|
-
return formatForInkCli(output);
|
|
31
|
-
}
|
|
32
|
-
// Build output string
|
|
33
|
-
const outputLines = [`\n🔧 Available Tools (${toolEntries.length}):\n`];
|
|
34
|
-
// Display tools with descriptions and source
|
|
35
|
-
for (const [toolName, toolInfo] of toolEntries) {
|
|
36
|
-
const description = toolInfo.description || 'No description available';
|
|
37
|
-
const isMcpTool = Object.keys(mcpTools).includes(toolName);
|
|
38
|
-
// Determine tool source: internal tools take precedence over MCP tools
|
|
39
|
-
let source;
|
|
40
|
-
if (!isMcpTool && !toolName.startsWith('mcp--')) {
|
|
41
|
-
// Non-MCP tool that doesn't have mcp prefix = internal tool
|
|
42
|
-
source = '[Internal]';
|
|
43
|
-
}
|
|
44
|
-
else if (isMcpTool || toolName.startsWith('mcp--')) {
|
|
45
|
-
source = '[MCP]';
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
source = '[Unknown]';
|
|
49
|
-
}
|
|
50
|
-
outputLines.push(` ${toolName} ${source} - ${description}`);
|
|
51
|
-
}
|
|
52
|
-
outputLines.push('\n💡 Tools are provided by connected MCP servers and internal tools');
|
|
53
|
-
const output = outputLines.join('\n');
|
|
54
|
-
// Log for regular CLI (with chalk formatting)
|
|
55
|
-
console.log(chalk.bold.green(`\n🔧 Available Tools (${toolEntries.length}):\n`));
|
|
56
|
-
for (const [toolName, toolInfo] of toolEntries) {
|
|
57
|
-
const description = toolInfo.description || 'No description available';
|
|
58
|
-
const isMcpTool = Object.keys(mcpTools).includes(toolName);
|
|
59
|
-
let source;
|
|
60
|
-
if (!isMcpTool && !toolName.startsWith('mcp--')) {
|
|
61
|
-
source = chalk.magenta('[Internal]');
|
|
62
|
-
}
|
|
63
|
-
else if (isMcpTool || toolName.startsWith('mcp--')) {
|
|
64
|
-
source = chalk.blue('[MCP]');
|
|
65
|
-
}
|
|
66
|
-
else {
|
|
67
|
-
source = chalk.gray('[Unknown]');
|
|
68
|
-
}
|
|
69
|
-
console.log(` ${chalk.yellow(toolName)} ${source} - ${chalk.dim(description)}`);
|
|
70
|
-
}
|
|
71
|
-
console.log(chalk.dim('\n💡 Tools are provided by connected MCP servers and internal tools'));
|
|
72
|
-
return formatForInkCli(output);
|
|
73
|
-
}
|
|
74
|
-
catch (error) {
|
|
75
|
-
const errorMsg = `Failed to list tools: ${error instanceof Error ? error.message : String(error)}`;
|
|
76
|
-
logger.error(errorMsg);
|
|
77
|
-
return formatForInkCli(`❌ ${errorMsg}`);
|
|
78
|
-
}
|
|
19
|
+
handler: async (_args, _agent, _ctx) => {
|
|
20
|
+
// Overlay is handled via commandOverlays.ts mapping
|
|
21
|
+
return true;
|
|
79
22
|
},
|
|
80
23
|
},
|
|
81
24
|
];
|
|
@@ -2,43 +2,39 @@
|
|
|
2
2
|
* Command Output Helper
|
|
3
3
|
* Utilities for consistent command output handling across all slash commands
|
|
4
4
|
*/
|
|
5
|
+
import type { StyledOutput } from '../../../ink-cli/services/CommandService.js';
|
|
6
|
+
import type { StyledMessageType, StyledData } from '../../../ink-cli/state/types.js';
|
|
5
7
|
/**
|
|
6
8
|
* Command output helper for consistent display and error handling
|
|
9
|
+
* Returns formatted strings for ink-cli to render (no direct console output)
|
|
7
10
|
*/
|
|
8
11
|
export declare class CommandOutputHelper {
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
13
|
+
* Format success message for ink-cli to display
|
|
12
14
|
*/
|
|
13
15
|
static success(message: string): string;
|
|
14
16
|
/**
|
|
15
|
-
*
|
|
16
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
17
|
+
* Format info message for ink-cli to display
|
|
17
18
|
*/
|
|
18
19
|
static info(message: string): string;
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
21
|
+
* Format warning message for ink-cli to display
|
|
22
22
|
*/
|
|
23
23
|
static warning(message: string): string;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
* Logs error and returns formatted error string
|
|
25
|
+
* Format error message for ink-cli to display
|
|
27
26
|
*/
|
|
28
27
|
static error(error: unknown, context?: string): string;
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Logs to console and returns formatted string for ink-cli
|
|
29
|
+
* Format multi-line output for ink-cli to display
|
|
32
30
|
*/
|
|
33
31
|
static output(lines: string[]): string;
|
|
34
32
|
/**
|
|
35
|
-
*
|
|
36
|
-
*
|
|
33
|
+
* Create styled output for rich rendering in ink-cli
|
|
34
|
+
* @param styledType - The type of styled rendering
|
|
35
|
+
* @param styledData - The structured data for rendering
|
|
36
|
+
* @param fallbackText - Plain text fallback for logging/non-ink environments
|
|
37
37
|
*/
|
|
38
|
-
static
|
|
39
|
-
/**
|
|
40
|
-
* No output (command executed successfully with no output to display)
|
|
41
|
-
*/
|
|
42
|
-
static noOutput(): string;
|
|
38
|
+
static styled(styledType: StyledMessageType, styledData: StyledData, fallbackText: string): StyledOutput;
|
|
43
39
|
}
|
|
44
40
|
//# sourceMappingURL=command-output.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-output.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/utils/command-output.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"command-output.d.ts","sourceRoot":"","sources":["../../../../../src/cli/commands/interactive-commands/utils/command-output.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAErF;;;GAGG;AACH,qBAAa,mBAAmB;IAC5B;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIvC;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIpC;;OAEG;IACH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIvC;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM;IAMtD;;OAEG;IACH,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAItC;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CACT,UAAU,EAAE,iBAAiB,EAC7B,UAAU,EAAE,UAAU,EACtB,YAAY,EAAE,MAAM,GACrB,YAAY;CAOlB"}
|
|
@@ -2,74 +2,55 @@
|
|
|
2
2
|
* Command Output Helper
|
|
3
3
|
* Utilities for consistent command output handling across all slash commands
|
|
4
4
|
*/
|
|
5
|
-
import chalk from 'chalk';
|
|
6
|
-
import { logger } from '@dexto/core';
|
|
7
5
|
import { formatForInkCli } from './format-output.js';
|
|
8
6
|
/**
|
|
9
7
|
* Command output helper for consistent display and error handling
|
|
8
|
+
* Returns formatted strings for ink-cli to render (no direct console output)
|
|
10
9
|
*/
|
|
11
10
|
export class CommandOutputHelper {
|
|
12
11
|
/**
|
|
13
|
-
*
|
|
14
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
12
|
+
* Format success message for ink-cli to display
|
|
15
13
|
*/
|
|
16
14
|
static success(message) {
|
|
17
|
-
console.log(chalk.green(message));
|
|
18
15
|
return formatForInkCli(message);
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
22
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
18
|
+
* Format info message for ink-cli to display
|
|
23
19
|
*/
|
|
24
20
|
static info(message) {
|
|
25
|
-
console.log(chalk.blue(message));
|
|
26
21
|
return formatForInkCli(message);
|
|
27
22
|
}
|
|
28
23
|
/**
|
|
29
|
-
*
|
|
30
|
-
* Logs to console with color and returns formatted string for ink-cli
|
|
24
|
+
* Format warning message for ink-cli to display
|
|
31
25
|
*/
|
|
32
26
|
static warning(message) {
|
|
33
|
-
|
|
34
|
-
return formatForInkCli(message);
|
|
27
|
+
return formatForInkCli(`⚠️ ${message}`);
|
|
35
28
|
}
|
|
36
29
|
/**
|
|
37
|
-
*
|
|
38
|
-
* Logs error and returns formatted error string
|
|
30
|
+
* Format error message for ink-cli to display
|
|
39
31
|
*/
|
|
40
32
|
static error(error, context) {
|
|
41
33
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
42
34
|
const fullMessage = context ? `❌ ${context}: ${errorMessage}` : `❌ ${errorMessage}`;
|
|
43
|
-
logger.error(fullMessage);
|
|
44
|
-
console.error(chalk.red(fullMessage));
|
|
45
35
|
return formatForInkCli(fullMessage);
|
|
46
36
|
}
|
|
47
37
|
/**
|
|
48
|
-
*
|
|
49
|
-
* Logs to console and returns formatted string for ink-cli
|
|
38
|
+
* Format multi-line output for ink-cli to display
|
|
50
39
|
*/
|
|
51
40
|
static output(lines) {
|
|
52
|
-
|
|
53
|
-
console.log(output);
|
|
54
|
-
return formatForInkCli(output);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Validate required argument and return error if missing
|
|
58
|
-
* Returns null if valid, error string if invalid
|
|
59
|
-
*/
|
|
60
|
-
static validateRequiredArg(args, index, argName, usage) {
|
|
61
|
-
if (args.length <= index || !args[index]) {
|
|
62
|
-
const errorMsg = `❌ ${argName} is required\nUsage: ${usage}`;
|
|
63
|
-
console.error(chalk.red(`❌ ${argName} is required`));
|
|
64
|
-
console.error(chalk.dim(`Usage: ${usage}`));
|
|
65
|
-
return formatForInkCli(errorMsg);
|
|
66
|
-
}
|
|
67
|
-
return null;
|
|
41
|
+
return formatForInkCli(lines.join('\n'));
|
|
68
42
|
}
|
|
69
43
|
/**
|
|
70
|
-
*
|
|
44
|
+
* Create styled output for rich rendering in ink-cli
|
|
45
|
+
* @param styledType - The type of styled rendering
|
|
46
|
+
* @param styledData - The structured data for rendering
|
|
47
|
+
* @param fallbackText - Plain text fallback for logging/non-ink environments
|
|
71
48
|
*/
|
|
72
|
-
static
|
|
73
|
-
return
|
|
49
|
+
static styled(styledType, styledData, fallbackText) {
|
|
50
|
+
return {
|
|
51
|
+
styledType,
|
|
52
|
+
styledData,
|
|
53
|
+
fallbackText: formatForInkCli(fallbackText),
|
|
54
|
+
};
|
|
74
55
|
}
|
|
75
56
|
}
|
|
@@ -5,12 +5,12 @@ declare const ListAgentsCommandSchema: z.ZodObject<{
|
|
|
5
5
|
available: z.ZodDefault<z.ZodBoolean>;
|
|
6
6
|
}, "strict", z.ZodTypeAny, {
|
|
7
7
|
installed: boolean;
|
|
8
|
-
available: boolean;
|
|
9
8
|
verbose: boolean;
|
|
9
|
+
available: boolean;
|
|
10
10
|
}, {
|
|
11
11
|
installed?: boolean | undefined;
|
|
12
|
-
available?: boolean | undefined;
|
|
13
12
|
verbose?: boolean | undefined;
|
|
13
|
+
available?: boolean | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
export type ListAgentsCommandOptions = z.output<typeof ListAgentsCommandSchema>;
|
|
16
16
|
export type ListAgentsCommandOptionsInput = z.input<typeof ListAgentsCommandSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list-agents.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,QAAA,MAAM,uBAAuB;;;;;;;;;;;;EAMhB,CAAC;AAEd,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAChF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"list-agents.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list-agents.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB,QAAA,MAAM,uBAAuB;;;;;;;;;;;;EAMhB,CAAC;AAEd,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAChF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAiIpF;;GAEG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,EAAE,6BAA6B,GACvC,OAAO,CAAC,IAAI,CAAC,CAiIf"}
|
|
@@ -4,7 +4,7 @@ import { promises as fs } from 'fs';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import chalk from 'chalk';
|
|
6
6
|
import { z } from 'zod';
|
|
7
|
-
import {
|
|
7
|
+
import { getDextoGlobalPath, globalPreferencesExist, loadGlobalPreferences, loadBundledRegistryAgents, } from '@dexto/agent-management';
|
|
8
8
|
// Zod schema for list-agents command validation
|
|
9
9
|
const ListAgentsCommandSchema = z
|
|
10
10
|
.object({
|
|
@@ -21,41 +21,46 @@ async function getInstalledAgents() {
|
|
|
21
21
|
if (!existsSync(globalAgentsDir)) {
|
|
22
22
|
return [];
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const bundledRegistry = loadBundledRegistryAgents();
|
|
25
25
|
const installedAgents = [];
|
|
26
26
|
try {
|
|
27
27
|
const entries = await fs.readdir(globalAgentsDir, { withFileTypes: true });
|
|
28
28
|
for (const entry of entries) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
// Skip registry.json and temp files
|
|
30
|
+
if (entry.name === 'registry.json' || entry.name.includes('.tmp.')) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (entry.isDirectory()) {
|
|
34
|
+
const agentName = entry.name;
|
|
33
35
|
const agentPath = path.join(globalAgentsDir, entry.name);
|
|
34
36
|
try {
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
// For directory agents, try to find main config
|
|
38
|
+
// Check bundled registry for main field, default to agent.yml
|
|
39
|
+
const bundledEntry = bundledRegistry[agentName];
|
|
40
|
+
const mainFile = bundledEntry?.main || 'agent.yml';
|
|
41
|
+
const mainConfigPath = path.join(agentPath, mainFile);
|
|
42
|
+
// If main config doesn't exist, skip
|
|
43
|
+
if (!existsSync(mainConfigPath)) {
|
|
44
|
+
console.warn(`Warning: Could not find main config for agent '${agentName}' at ${mainConfigPath}`);
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// Get install date from directory stats
|
|
40
48
|
const stats = await fs.stat(agentPath);
|
|
41
49
|
// Try to extract LLM info from config
|
|
42
50
|
let llmProvider;
|
|
43
51
|
let llmModel;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
// Ignore config parsing errors
|
|
54
|
-
}
|
|
52
|
+
try {
|
|
53
|
+
const configContent = await fs.readFile(mainConfigPath, 'utf-8');
|
|
54
|
+
const configMatch = configContent.match(/provider:\s*([^\n\r]+)/);
|
|
55
|
+
const modelMatch = configContent.match(/model:\s*([^\n\r]+)/);
|
|
56
|
+
llmProvider = configMatch?.[1]?.trim();
|
|
57
|
+
llmModel = modelMatch?.[1]?.trim();
|
|
58
|
+
}
|
|
59
|
+
catch (_error) {
|
|
60
|
+
// Ignore config parsing errors
|
|
55
61
|
}
|
|
56
|
-
// Get description from registry if available
|
|
57
|
-
const
|
|
58
|
-
const description = registryData?.description || 'Custom agent';
|
|
62
|
+
// Get description from bundled registry if available
|
|
63
|
+
const description = bundledEntry?.description || 'Custom agent';
|
|
59
64
|
const agentInfo = {
|
|
60
65
|
name: agentName,
|
|
61
66
|
description,
|
|
@@ -85,15 +90,14 @@ async function getInstalledAgents() {
|
|
|
85
90
|
* Get information about available agents from registry
|
|
86
91
|
*/
|
|
87
92
|
function getAvailableAgents() {
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
return Object.entries(availableAgents)
|
|
93
|
+
const bundledRegistry = loadBundledRegistryAgents();
|
|
94
|
+
return Object.entries(bundledRegistry)
|
|
91
95
|
.map(([name, data]) => ({
|
|
92
96
|
name,
|
|
93
|
-
description: data.description,
|
|
94
|
-
author: data.author,
|
|
95
|
-
tags: data.tags,
|
|
96
|
-
type:
|
|
97
|
+
description: data.description || 'No description',
|
|
98
|
+
author: data.author || 'Unknown',
|
|
99
|
+
tags: data.tags || [],
|
|
100
|
+
type: 'builtin',
|
|
97
101
|
}))
|
|
98
102
|
.sort((a, b) => a.name.localeCompare(b.name));
|
|
99
103
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAMf,CAAC;AAEd,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/uninstall.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,sBAAsB;;;;;;;;;;;;EAMf,CAAC;AAEd,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AA+B9E,wBAAsB,sBAAsB,CACxC,MAAM,EAAE,MAAM,EAAE,EAChB,OAAO,EAAE,OAAO,CAAC,uBAAuB,CAAC,GAC1C,OAAO,CAAC,IAAI,CAAC,CA8Gf"}
|