@within-7/minto 0.4.2 → 0.4.3
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/cli.cjs +32 -154
- package/cli.js +3255 -0
- package/package.json +21 -38
- package/scripts/postinstall.cjs +19 -136
- package/vendor/ripgrep/arm64-linux/rg +0 -0
- package/vendor/ripgrep/x64-darwin/rg +0 -0
- package/vendor/ripgrep/x64-linux/rg +0 -0
- package/vendor/ripgrep/x64-win32/rg.exe +0 -0
- package/dist/Tool.js +0 -46
- package/dist/Tool.js.map +0 -7
- package/dist/commands/agents/AgentsCommand.js +0 -2170
- package/dist/commands/agents/AgentsCommand.js.map +0 -7
- package/dist/commands/agents/constants.js +0 -58
- package/dist/commands/agents/constants.js.map +0 -7
- package/dist/commands/agents/index.js +0 -37
- package/dist/commands/agents/index.js.map +0 -7
- package/dist/commands/agents/types.js +0 -11
- package/dist/commands/agents/types.js.map +0 -7
- package/dist/commands/agents/utils/fileOperations.js +0 -245
- package/dist/commands/agents/utils/fileOperations.js.map +0 -7
- package/dist/commands/agents/utils/index.js +0 -23
- package/dist/commands/agents/utils/index.js.map +0 -7
- package/dist/commands/approvedTools.js +0 -36
- package/dist/commands/approvedTools.js.map +0 -7
- package/dist/commands/bug.js +0 -88
- package/dist/commands/bug.js.map +0 -7
- package/dist/commands/clear.js +0 -41
- package/dist/commands/clear.js.map +0 -7
- package/dist/commands/compact.js +0 -119
- package/dist/commands/compact.js.map +0 -7
- package/dist/commands/config.js +0 -20
- package/dist/commands/config.js.map +0 -7
- package/dist/commands/context.js +0 -118
- package/dist/commands/context.js.map +0 -7
- package/dist/commands/cost.js +0 -19
- package/dist/commands/cost.js.map +0 -7
- package/dist/commands/ctx_viz.js +0 -193
- package/dist/commands/ctx_viz.js.map +0 -7
- package/dist/commands/doctor.js +0 -171
- package/dist/commands/doctor.js.map +0 -7
- package/dist/commands/effort.js +0 -87
- package/dist/commands/effort.js.map +0 -7
- package/dist/commands/export.js +0 -747
- package/dist/commands/export.js.map +0 -7
- package/dist/commands/help.js +0 -20
- package/dist/commands/help.js.map +0 -7
- package/dist/commands/ide.js +0 -18
- package/dist/commands/ide.js.map +0 -7
- package/dist/commands/init.js +0 -38
- package/dist/commands/init.js.map +0 -7
- package/dist/commands/language.js +0 -110
- package/dist/commands/language.js.map +0 -7
- package/dist/commands/login.js +0 -128
- package/dist/commands/login.js.map +0 -7
- package/dist/commands/mcp-interactive.js +0 -485
- package/dist/commands/mcp-interactive.js.map +0 -7
- package/dist/commands/memory.js +0 -119
- package/dist/commands/memory.js.map +0 -7
- package/dist/commands/model.js +0 -497
- package/dist/commands/model.js.map +0 -7
- package/dist/commands/new.js +0 -56
- package/dist/commands/new.js.map +0 -7
- package/dist/commands/outputStyle.js +0 -64
- package/dist/commands/outputStyle.js.map +0 -7
- package/dist/commands/permissions.js +0 -113
- package/dist/commands/permissions.js.map +0 -7
- package/dist/commands/plugin/AddMarketplaceForm.js +0 -91
- package/dist/commands/plugin/AddMarketplaceForm.js.map +0 -7
- package/dist/commands/plugin/ConfirmDialog.js +0 -84
- package/dist/commands/plugin/ConfirmDialog.js.map +0 -7
- package/dist/commands/plugin/ErrorView.js +0 -34
- package/dist/commands/plugin/ErrorView.js.map +0 -7
- package/dist/commands/plugin/InstalledPluginsByMarketplace.js +0 -152
- package/dist/commands/plugin/InstalledPluginsByMarketplace.js.map +0 -7
- package/dist/commands/plugin/InstalledPluginsManager.js +0 -102
- package/dist/commands/plugin/InstalledPluginsManager.js.map +0 -7
- package/dist/commands/plugin/LoadingView.js +0 -14
- package/dist/commands/plugin/LoadingView.js.map +0 -7
- package/dist/commands/plugin/MainMenu.js +0 -67
- package/dist/commands/plugin/MainMenu.js.map +0 -7
- package/dist/commands/plugin/MarketplaceManager.js +0 -201
- package/dist/commands/plugin/MarketplaceManager.js.map +0 -7
- package/dist/commands/plugin/MarketplaceSelector.js +0 -124
- package/dist/commands/plugin/MarketplaceSelector.js.map +0 -7
- package/dist/commands/plugin/PlaceholderScreen.js +0 -31
- package/dist/commands/plugin/PlaceholderScreen.js.map +0 -7
- package/dist/commands/plugin/PluginBrowser.js +0 -183
- package/dist/commands/plugin/PluginBrowser.js.map +0 -7
- package/dist/commands/plugin/PluginDetailsInstall.js +0 -159
- package/dist/commands/plugin/PluginDetailsInstall.js.map +0 -7
- package/dist/commands/plugin/PluginDetailsManage.js +0 -210
- package/dist/commands/plugin/PluginDetailsManage.js.map +0 -7
- package/dist/commands/plugin/components.js +0 -16
- package/dist/commands/plugin/components.js.map +0 -7
- package/dist/commands/plugin/example-usage.js +0 -63
- package/dist/commands/plugin/example-usage.js.map +0 -7
- package/dist/commands/plugin/types.js +0 -1
- package/dist/commands/plugin/types.js.map +0 -7
- package/dist/commands/plugin/utils.js +0 -109
- package/dist/commands/plugin/utils.js.map +0 -7
- package/dist/commands/plugin.js +0 -1410
- package/dist/commands/plugin.js.map +0 -7
- package/dist/commands/quit.js +0 -20
- package/dist/commands/quit.js.map +0 -7
- package/dist/commands/refreshCommands.js +0 -48
- package/dist/commands/refreshCommands.js.map +0 -7
- package/dist/commands/resume.js +0 -71
- package/dist/commands/resume.js.map +0 -7
- package/dist/commands/review.js +0 -51
- package/dist/commands/review.js.map +0 -7
- package/dist/commands/sandbox.js +0 -203
- package/dist/commands/sandbox.js.map +0 -7
- package/dist/commands/sessions.js +0 -224
- package/dist/commands/sessions.js.map +0 -7
- package/dist/commands/setup.js +0 -653
- package/dist/commands/setup.js.map +0 -7
- package/dist/commands/stats.js +0 -292
- package/dist/commands/stats.js.map +0 -7
- package/dist/commands/status.js +0 -127
- package/dist/commands/status.js.map +0 -7
- package/dist/commands/tasks.js +0 -108
- package/dist/commands/tasks.js.map +0 -7
- package/dist/commands/terminalSetup.js +0 -174
- package/dist/commands/terminalSetup.js.map +0 -7
- package/dist/commands/todos.js +0 -123
- package/dist/commands/todos.js.map +0 -7
- package/dist/commands/undo.js +0 -227
- package/dist/commands/undo.js.map +0 -7
- package/dist/commands/vim.js +0 -22
- package/dist/commands/vim.js.map +0 -7
- package/dist/commands.js +0 -130
- package/dist/commands.js.map +0 -7
- package/dist/components/AgentDetailView.js +0 -126
- package/dist/components/AgentDetailView.js.map +0 -7
- package/dist/components/AgentResponseBlock.js +0 -41
- package/dist/components/AgentResponseBlock.js.map +0 -7
- package/dist/components/AgentThinkingBlock.js +0 -32
- package/dist/components/AgentThinkingBlock.js.map +0 -7
- package/dist/components/AgentViewBanner.js +0 -22
- package/dist/components/AgentViewBanner.js.map +0 -7
- package/dist/components/AsciiLogo.js +0 -18
- package/dist/components/AsciiLogo.js.map +0 -7
- package/dist/components/AskUserQuestionDialog/AskUserQuestionDialog.js +0 -142
- package/dist/components/AskUserQuestionDialog/AskUserQuestionDialog.js.map +0 -7
- package/dist/components/AskUserQuestionDialog/QuestionView.js +0 -55
- package/dist/components/AskUserQuestionDialog/QuestionView.js.map +0 -7
- package/dist/components/AskUserQuestionDialog/index.js +0 -7
- package/dist/components/AskUserQuestionDialog/index.js.map +0 -7
- package/dist/components/BackgroundTasksPanel.js +0 -177
- package/dist/components/BackgroundTasksPanel.js.map +0 -7
- package/dist/components/BashStreamingProgress.js +0 -24
- package/dist/components/BashStreamingProgress.js.map +0 -7
- package/dist/components/CollapsibleHint.js +0 -15
- package/dist/components/CollapsibleHint.js.map +0 -7
- package/dist/components/Config.js +0 -181
- package/dist/components/Config.js.map +0 -7
- package/dist/components/ConsoleOAuthFlow.js +0 -179
- package/dist/components/ConsoleOAuthFlow.js.map +0 -7
- package/dist/components/Cost.js +0 -14
- package/dist/components/Cost.js.map +0 -7
- package/dist/components/CostThresholdDialog.js +0 -38
- package/dist/components/CostThresholdDialog.js.map +0 -7
- package/dist/components/CustomSelect/option-map.js +0 -32
- package/dist/components/CustomSelect/option-map.js.map +0 -7
- package/dist/components/CustomSelect/select-option.js +0 -37
- package/dist/components/CustomSelect/select-option.js.map +0 -7
- package/dist/components/CustomSelect/select.js +0 -64
- package/dist/components/CustomSelect/select.js.map +0 -7
- package/dist/components/CustomSelect/theme.js +0 -1
- package/dist/components/CustomSelect/theme.js.map +0 -7
- package/dist/components/CustomSelect/use-select-state.js +0 -220
- package/dist/components/CustomSelect/use-select-state.js.map +0 -7
- package/dist/components/CustomSelect/use-select.js +0 -21
- package/dist/components/CustomSelect/use-select.js.map +0 -7
- package/dist/components/FallbackToolUseRejectedMessage.js +0 -11
- package/dist/components/FallbackToolUseRejectedMessage.js.map +0 -7
- package/dist/components/FileEditToolUpdatedMessage.js +0 -32
- package/dist/components/FileEditToolUpdatedMessage.js.map +0 -7
- package/dist/components/HeaderBar.js +0 -63
- package/dist/components/HeaderBar.js.map +0 -7
- package/dist/components/Help.js +0 -185
- package/dist/components/Help.js.map +0 -7
- package/dist/components/HighlightedCode.js +0 -31
- package/dist/components/HighlightedCode.js.map +0 -7
- package/dist/components/HistorySearchOverlay.js +0 -49
- package/dist/components/HistorySearchOverlay.js.map +0 -7
- package/dist/components/HotkeyHelpPanel.js +0 -154
- package/dist/components/HotkeyHelpPanel.js.map +0 -7
- package/dist/components/IdleNotificationBar.js +0 -10
- package/dist/components/IdleNotificationBar.js.map +0 -7
- package/dist/components/InfoPanel/InfoPanel.js +0 -123
- package/dist/components/InfoPanel/InfoPanel.js.map +0 -7
- package/dist/components/InfoPanel/index.js +0 -5
- package/dist/components/InfoPanel/index.js.map +0 -7
- package/dist/components/InfoPanel/types.js +0 -1
- package/dist/components/InfoPanel/types.js.map +0 -7
- package/dist/components/InteractionRoundBlock.js +0 -56
- package/dist/components/InteractionRoundBlock.js.map +0 -7
- package/dist/components/InvalidConfigDialog.js +0 -84
- package/dist/components/InvalidConfigDialog.js.map +0 -7
- package/dist/components/Link.js +0 -18
- package/dist/components/Link.js.map +0 -7
- package/dist/components/LogSelector.js +0 -50
- package/dist/components/LogSelector.js.map +0 -7
- package/dist/components/Logo.js +0 -55
- package/dist/components/Logo.js.map +0 -7
- package/dist/components/MCPServerApprovalDialog.js +0 -81
- package/dist/components/MCPServerApprovalDialog.js.map +0 -7
- package/dist/components/MCPServerDialogCopy.js +0 -12
- package/dist/components/MCPServerDialogCopy.js.map +0 -7
- package/dist/components/MCPServerMultiselectDialog.js +0 -82
- package/dist/components/MCPServerMultiselectDialog.js.map +0 -7
- package/dist/components/Message.js +0 -162
- package/dist/components/Message.js.map +0 -7
- package/dist/components/MessageResponse.js +0 -9
- package/dist/components/MessageResponse.js.map +0 -7
- package/dist/components/MessageSelector.js +0 -127
- package/dist/components/MessageSelector.js.map +0 -7
- package/dist/components/ModeIndicator.js +0 -39
- package/dist/components/ModeIndicator.js.map +0 -7
- package/dist/components/ModelConfig.js +0 -223
- package/dist/components/ModelConfig.js.map +0 -7
- package/dist/components/ModelListManager.js +0 -142
- package/dist/components/ModelListManager.js.map +0 -7
- package/dist/components/ModelSelector/BrandTextInput.js +0 -43
- package/dist/components/ModelSelector/BrandTextInput.js.map +0 -7
- package/dist/components/ModelSelector/ModelSelector.js +0 -2103
- package/dist/components/ModelSelector/ModelSelector.js.map +0 -7
- package/dist/components/ModelSelector/ScreenContainer.js +0 -27
- package/dist/components/ModelSelector/ScreenContainer.js.map +0 -7
- package/dist/components/ModelSelector/WizardContainer.js +0 -45
- package/dist/components/ModelSelector/WizardContainer.js.map +0 -7
- package/dist/components/ModelSelector/constants.js +0 -37
- package/dist/components/ModelSelector/constants.js.map +0 -7
- package/dist/components/ModelSelector/hooks/index.js +0 -5
- package/dist/components/ModelSelector/hooks/index.js.map +0 -7
- package/dist/components/ModelSelector/hooks/useEscapeNavigation.js +0 -21
- package/dist/components/ModelSelector/hooks/useEscapeNavigation.js.map +0 -7
- package/dist/components/ModelSelector/index.js +0 -15
- package/dist/components/ModelSelector/index.js.map +0 -7
- package/dist/components/ModelSelector/types.js +0 -1
- package/dist/components/ModelSelector/types.js.map +0 -7
- package/dist/components/Onboarding.js +0 -159
- package/dist/components/Onboarding.js.map +0 -7
- package/dist/components/OperationSummary.js +0 -130
- package/dist/components/OperationSummary.js.map +0 -7
- package/dist/components/PressEnterToContinue.js +0 -10
- package/dist/components/PressEnterToContinue.js.map +0 -7
- package/dist/components/ProgressBar.js +0 -74
- package/dist/components/ProgressBar.js.map +0 -7
- package/dist/components/ProjectOnboarding.js +0 -99
- package/dist/components/ProjectOnboarding.js.map +0 -7
- package/dist/components/PromptInput.js +0 -1067
- package/dist/components/PromptInput.js.map +0 -7
- package/dist/components/PulseLabel.js +0 -44
- package/dist/components/PulseLabel.js.map +0 -7
- package/dist/components/QuitSummary.js +0 -88
- package/dist/components/QuitSummary.js.map +0 -7
- package/dist/components/RequestStatusIndicator.js +0 -194
- package/dist/components/RequestStatusIndicator.js.map +0 -7
- package/dist/components/RewindPanel.js +0 -272
- package/dist/components/RewindPanel.js.map +0 -7
- package/dist/components/SensitiveFileWarning.js +0 -35
- package/dist/components/SensitiveFileWarning.js.map +0 -7
- package/dist/components/SentryErrorBoundary.js +0 -27
- package/dist/components/SentryErrorBoundary.js.map +0 -7
- package/dist/components/SimpleSelector/SimpleSelector.js +0 -154
- package/dist/components/SimpleSelector/SimpleSelector.js.map +0 -7
- package/dist/components/SimpleSelector/index.js +0 -5
- package/dist/components/SimpleSelector/index.js.map +0 -7
- package/dist/components/SimpleSelector/types.js +0 -1
- package/dist/components/SimpleSelector/types.js.map +0 -7
- package/dist/components/Spinner.js +0 -174
- package/dist/components/Spinner.js.map +0 -7
- package/dist/components/SpinnerSymbol.js +0 -72
- package/dist/components/SpinnerSymbol.js.map +0 -7
- package/dist/components/StartupStatus.js +0 -57
- package/dist/components/StartupStatus.js.map +0 -7
- package/dist/components/StatusOverlayContent.js +0 -21
- package/dist/components/StatusOverlayContent.js.map +0 -7
- package/dist/components/StreamingBashOutput.js +0 -71
- package/dist/components/StreamingBashOutput.js.map +0 -7
- package/dist/components/StreamingTextPreview.js +0 -29
- package/dist/components/StreamingTextPreview.js.map +0 -7
- package/dist/components/StructuredDiff.js +0 -146
- package/dist/components/StructuredDiff.js.map +0 -7
- package/dist/components/SubagentBlock.js +0 -197
- package/dist/components/SubagentBlock.js.map +0 -7
- package/dist/components/SubagentManager.js +0 -65
- package/dist/components/SubagentManager.js.map +0 -7
- package/dist/components/SubagentProgress.js +0 -123
- package/dist/components/SubagentProgress.js.map +0 -7
- package/dist/components/SubagentStatusMarker.js +0 -37
- package/dist/components/SubagentStatusMarker.js.map +0 -7
- package/dist/components/TabbedListView/ScrollableList.js +0 -117
- package/dist/components/TabbedListView/ScrollableList.js.map +0 -7
- package/dist/components/TabbedListView/SearchInput.js +0 -23
- package/dist/components/TabbedListView/SearchInput.js.map +0 -7
- package/dist/components/TabbedListView/TabBar.js +0 -25
- package/dist/components/TabbedListView/TabBar.js.map +0 -7
- package/dist/components/TabbedListView/TabbedListView.js +0 -292
- package/dist/components/TabbedListView/TabbedListView.js.map +0 -7
- package/dist/components/TabbedListView/index.js +0 -11
- package/dist/components/TabbedListView/index.js.map +0 -7
- package/dist/components/TabbedListView/types.js +0 -1
- package/dist/components/TabbedListView/types.js.map +0 -7
- package/dist/components/TaskCard.js +0 -176
- package/dist/components/TaskCard.js.map +0 -7
- package/dist/components/TeamMemberPanel.js +0 -107
- package/dist/components/TeamMemberPanel.js.map +0 -7
- package/dist/components/TextInput.js +0 -108
- package/dist/components/TextInput.js.map +0 -7
- package/dist/components/ThinkingSelector.js +0 -84
- package/dist/components/ThinkingSelector.js.map +0 -7
- package/dist/components/TimelineRenderer.js +0 -31
- package/dist/components/TimelineRenderer.js.map +0 -7
- package/dist/components/TitledDivider.js +0 -26
- package/dist/components/TitledDivider.js.map +0 -7
- package/dist/components/TodoChangeBlock.js +0 -30
- package/dist/components/TodoChangeBlock.js.map +0 -7
- package/dist/components/TodoChangeLine.js +0 -22
- package/dist/components/TodoChangeLine.js.map +0 -7
- package/dist/components/TodoItem.js +0 -35
- package/dist/components/TodoItem.js.map +0 -7
- package/dist/components/TodoPanel.js +0 -167
- package/dist/components/TodoPanel.js.map +0 -7
- package/dist/components/TokenCounter.js +0 -74
- package/dist/components/TokenCounter.js.map +0 -7
- package/dist/components/TokenWarning.js +0 -41
- package/dist/components/TokenWarning.js.map +0 -7
- package/dist/components/ToolExecutionBlock.js +0 -18
- package/dist/components/ToolExecutionBlock.js.map +0 -7
- package/dist/components/ToolUseLoader.js +0 -29
- package/dist/components/ToolUseLoader.js.map +0 -7
- package/dist/components/TreeConnector.js +0 -26
- package/dist/components/TreeConnector.js.map +0 -7
- package/dist/components/TrustDialog.js +0 -71
- package/dist/components/TrustDialog.js.map +0 -7
- package/dist/components/TurnCompletionIndicator.js +0 -18
- package/dist/components/TurnCompletionIndicator.js.map +0 -7
- package/dist/components/UserQueryBlock.js +0 -12
- package/dist/components/UserQueryBlock.js.map +0 -7
- package/dist/components/binary-feedback/BinaryFeedback.js +0 -50
- package/dist/components/binary-feedback/BinaryFeedback.js.map +0 -7
- package/dist/components/binary-feedback/BinaryFeedbackOption.js +0 -92
- package/dist/components/binary-feedback/BinaryFeedbackOption.js.map +0 -7
- package/dist/components/binary-feedback/BinaryFeedbackView.js +0 -140
- package/dist/components/binary-feedback/BinaryFeedbackView.js.map +0 -7
- package/dist/components/binary-feedback/utils.js +0 -108
- package/dist/components/binary-feedback/utils.js.map +0 -7
- package/dist/components/messages/AssistantBashOutputMessage.js +0 -23
- package/dist/components/messages/AssistantBashOutputMessage.js.map +0 -7
- package/dist/components/messages/AssistantLocalCommandOutputMessage.js +0 -36
- package/dist/components/messages/AssistantLocalCommandOutputMessage.js.map +0 -7
- package/dist/components/messages/AssistantRedactedThinkingMessage.js +0 -12
- package/dist/components/messages/AssistantRedactedThinkingMessage.js.map +0 -7
- package/dist/components/messages/AssistantTextMessage.js +0 -92
- package/dist/components/messages/AssistantTextMessage.js.map +0 -7
- package/dist/components/messages/AssistantThinkingMessage.js +0 -42
- package/dist/components/messages/AssistantThinkingMessage.js.map +0 -7
- package/dist/components/messages/AssistantToolUseMessage.js +0 -108
- package/dist/components/messages/AssistantToolUseMessage.js.map +0 -7
- package/dist/components/messages/DefaultToolResultFallback.js +0 -11
- package/dist/components/messages/DefaultToolResultFallback.js.map +0 -7
- package/dist/components/messages/GroupRenderer.js +0 -54
- package/dist/components/messages/GroupRenderer.js.map +0 -7
- package/dist/components/messages/NestedTasksPreview.js +0 -24
- package/dist/components/messages/NestedTasksPreview.js.map +0 -7
- package/dist/components/messages/ParallelTasksGroupView.js +0 -101
- package/dist/components/messages/ParallelTasksGroupView.js.map +0 -7
- package/dist/components/messages/TaskInModuleView.js +0 -218
- package/dist/components/messages/TaskInModuleView.js.map +0 -7
- package/dist/components/messages/TaskOutputContent.js +0 -56
- package/dist/components/messages/TaskOutputContent.js.map +0 -7
- package/dist/components/messages/TaskProgressMessage.js +0 -11
- package/dist/components/messages/TaskProgressMessage.js.map +0 -7
- package/dist/components/messages/TaskToolMessage.js +0 -39
- package/dist/components/messages/TaskToolMessage.js.map +0 -7
- package/dist/components/messages/UserBashInputMessage.js +0 -18
- package/dist/components/messages/UserBashInputMessage.js.map +0 -7
- package/dist/components/messages/UserCommandMessage.js +0 -20
- package/dist/components/messages/UserCommandMessage.js.map +0 -7
- package/dist/components/messages/UserGuidanceMessage.js +0 -26
- package/dist/components/messages/UserGuidanceMessage.js.map +0 -7
- package/dist/components/messages/UserKodingInputMessage.js +0 -18
- package/dist/components/messages/UserKodingInputMessage.js.map +0 -7
- package/dist/components/messages/UserPromptMessage.js +0 -26
- package/dist/components/messages/UserPromptMessage.js.map +0 -7
- package/dist/components/messages/UserTeamNotificationMessage.js +0 -91
- package/dist/components/messages/UserTeamNotificationMessage.js.map +0 -7
- package/dist/components/messages/UserTextMessage.js +0 -33
- package/dist/components/messages/UserTextMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/UserToolCanceledMessage.js +0 -11
- package/dist/components/messages/UserToolResultMessage/UserToolCanceledMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/UserToolErrorMessage.js +0 -15
- package/dist/components/messages/UserToolResultMessage/UserToolErrorMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/UserToolRejectMessage.js +0 -27
- package/dist/components/messages/UserToolResultMessage/UserToolRejectMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/UserToolResultMessage.js +0 -64
- package/dist/components/messages/UserToolResultMessage/UserToolResultMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js +0 -33
- package/dist/components/messages/UserToolResultMessage/UserToolSuccessMessage.js.map +0 -7
- package/dist/components/messages/UserToolResultMessage/utils.js +0 -50
- package/dist/components/messages/UserToolResultMessage/utils.js.map +0 -7
- package/dist/components/permissions/BashPermissionRequest/BashPermissionRequest.js +0 -112
- package/dist/components/permissions/BashPermissionRequest/BashPermissionRequest.js.map +0 -7
- package/dist/components/permissions/FallbackPermissionRequest.js +0 -131
- package/dist/components/permissions/FallbackPermissionRequest.js.map +0 -7
- package/dist/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js +0 -159
- package/dist/components/permissions/FileEditPermissionRequest/FileEditPermissionRequest.js.map +0 -7
- package/dist/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js +0 -58
- package/dist/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js.map +0 -7
- package/dist/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js +0 -153
- package/dist/components/permissions/FileWritePermissionRequest/FileWritePermissionRequest.js.map +0 -7
- package/dist/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js +0 -70
- package/dist/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js.map +0 -7
- package/dist/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js +0 -212
- package/dist/components/permissions/FilesystemPermissionRequest/FilesystemPermissionRequest.js.map +0 -7
- package/dist/components/permissions/PermissionRequest.js +0 -74
- package/dist/components/permissions/PermissionRequest.js.map +0 -7
- package/dist/components/permissions/PermissionRequestTitle.js +0 -52
- package/dist/components/permissions/PermissionRequestTitle.js.map +0 -7
- package/dist/components/permissions/PlanApprovalRequest.js +0 -164
- package/dist/components/permissions/PlanApprovalRequest.js.map +0 -7
- package/dist/components/permissions/hooks.js +0 -23
- package/dist/components/permissions/hooks.js.map +0 -7
- package/dist/components/permissions/toolUseOptions.js +0 -46
- package/dist/components/permissions/toolUseOptions.js.map +0 -7
- package/dist/components/permissions/utils.js +0 -21
- package/dist/components/permissions/utils.js.map +0 -7
- package/dist/constants/agentTeams.js +0 -17
- package/dist/constants/agentTeams.js.map +0 -7
- package/dist/constants/claude-asterisk-ascii-art.js +0 -242
- package/dist/constants/claude-asterisk-ascii-art.js.map +0 -7
- package/dist/constants/colors.js +0 -192
- package/dist/constants/colors.js.map +0 -7
- package/dist/constants/compressionPrompts.js +0 -73
- package/dist/constants/compressionPrompts.js.map +0 -7
- package/dist/constants/figures.js +0 -6
- package/dist/constants/figures.js.map +0 -7
- package/dist/constants/formatRules.js +0 -102
- package/dist/constants/formatRules.js.map +0 -7
- package/dist/constants/macros.js +0 -12
- package/dist/constants/macros.js.map +0 -7
- package/dist/constants/modelCapabilities.js +0 -239
- package/dist/constants/modelCapabilities.js.map +0 -7
- package/dist/constants/models.js +0 -1034
- package/dist/constants/models.js.map +0 -7
- package/dist/constants/oauth.js +0 -18
- package/dist/constants/oauth.js.map +0 -7
- package/dist/constants/product.js +0 -28
- package/dist/constants/product.js.map +0 -7
- package/dist/constants/prompts/agentPrompt.js +0 -31
- package/dist/constants/prompts/agentPrompt.js.map +0 -7
- package/dist/constants/prompts/autoMemory.js +0 -39
- package/dist/constants/prompts/autoMemory.js.map +0 -7
- package/dist/constants/prompts/codeConventions.js +0 -15
- package/dist/constants/prompts/codeConventions.js.map +0 -7
- package/dist/constants/prompts/doingTasks.js +0 -34
- package/dist/constants/prompts/doingTasks.js.map +0 -7
- package/dist/constants/prompts/envInfo.js +0 -16
- package/dist/constants/prompts/envInfo.js.map +0 -7
- package/dist/constants/prompts/executingWithCare.js +0 -17
- package/dist/constants/prompts/executingWithCare.js.map +0 -7
- package/dist/constants/prompts/identity.js +0 -10
- package/dist/constants/prompts/identity.js.map +0 -7
- package/dist/constants/prompts/index.js +0 -100
- package/dist/constants/prompts/index.js.map +0 -7
- package/dist/constants/prompts/taskManagement.js +0 -19
- package/dist/constants/prompts/taskManagement.js.map +0 -7
- package/dist/constants/prompts/teamOverlays.js +0 -50
- package/dist/constants/prompts/teamOverlays.js.map +0 -7
- package/dist/constants/prompts/toneAndStyle.js +0 -37
- package/dist/constants/prompts/toneAndStyle.js.map +0 -7
- package/dist/constants/prompts/toolUsagePolicy.js +0 -23
- package/dist/constants/prompts/toolUsagePolicy.js.map +0 -7
- package/dist/constants/prompts.js +0 -13
- package/dist/constants/prompts.js.map +0 -7
- package/dist/constants/providerRegistry.js +0 -235
- package/dist/constants/providerRegistry.js.map +0 -7
- package/dist/constants/providers.js +0 -35
- package/dist/constants/providers.js.map +0 -7
- package/dist/constants/releaseNotes.js +0 -9
- package/dist/constants/releaseNotes.js.map +0 -7
- package/dist/constants/symbols.js +0 -108
- package/dist/constants/symbols.js.map +0 -7
- package/dist/constants/timing.js +0 -39
- package/dist/constants/timing.js.map +0 -7
- package/dist/constants/toolInputExamples.js +0 -88
- package/dist/constants/toolInputExamples.js.map +0 -7
- package/dist/context/PermissionContext.js +0 -110
- package/dist/context/PermissionContext.js.map +0 -7
- package/dist/context.js +0 -367
- package/dist/context.js.map +0 -7
- package/dist/core/backupHook.js +0 -29
- package/dist/core/backupHook.js.map +0 -7
- package/dist/core/backupManager.js +0 -321
- package/dist/core/backupManager.js.map +0 -7
- package/dist/core/config/defaults.js +0 -93
- package/dist/core/config/defaults.js.map +0 -7
- package/dist/core/config/index.js +0 -111
- package/dist/core/config/index.js.map +0 -7
- package/dist/core/config/loader.js +0 -221
- package/dist/core/config/loader.js.map +0 -7
- package/dist/core/config/migrations.js +0 -128
- package/dist/core/config/migrations.js.map +0 -7
- package/dist/core/config/schema.js +0 -196
- package/dist/core/config/schema.js.map +0 -7
- package/dist/core/costTracker.js +0 -131
- package/dist/core/costTracker.js.map +0 -7
- package/dist/core/gitAutoCommit.js +0 -287
- package/dist/core/gitAutoCommit.js.map +0 -7
- package/dist/core/index.js +0 -7
- package/dist/core/index.js.map +0 -7
- package/dist/core/operationTracker.js +0 -212
- package/dist/core/operationTracker.js.map +0 -7
- package/dist/core/permissions/auditLog.js +0 -204
- package/dist/core/permissions/auditLog.js.map +0 -7
- package/dist/core/permissions/engine/index.js +0 -3
- package/dist/core/permissions/engine/index.js.map +0 -7
- package/dist/core/permissions/engine/permissionEngine.js +0 -106
- package/dist/core/permissions/engine/permissionEngine.js.map +0 -7
- package/dist/core/permissions/engine/types.js +0 -1
- package/dist/core/permissions/engine/types.js.map +0 -7
- package/dist/core/permissions/index.js +0 -84
- package/dist/core/permissions/index.js.map +0 -7
- package/dist/core/permissions/ruleEngine.js +0 -259
- package/dist/core/permissions/ruleEngine.js.map +0 -7
- package/dist/core/permissions/rules/allowedToolsRule.js +0 -62
- package/dist/core/permissions/rules/allowedToolsRule.js.map +0 -7
- package/dist/core/permissions/rules/autoEscalationRule.js +0 -296
- package/dist/core/permissions/rules/autoEscalationRule.js.map +0 -7
- package/dist/core/permissions/rules/index.js +0 -46
- package/dist/core/permissions/rules/index.js.map +0 -7
- package/dist/core/permissions/rules/planModeRule.js +0 -55
- package/dist/core/permissions/rules/planModeRule.js.map +0 -7
- package/dist/core/permissions/rules/projectBoundaryRule.js +0 -173
- package/dist/core/permissions/rules/projectBoundaryRule.js.map +0 -7
- package/dist/core/permissions/rules/safeModeRule.js +0 -65
- package/dist/core/permissions/rules/safeModeRule.js.map +0 -7
- package/dist/core/permissions/rules/sensitivePathsRule.js +0 -345
- package/dist/core/permissions/rules/sensitivePathsRule.js.map +0 -7
- package/dist/core/permissions/types.js +0 -127
- package/dist/core/permissions/types.js.map +0 -7
- package/dist/core/tokenStats.js +0 -9
- package/dist/core/tokenStats.js.map +0 -7
- package/dist/core/tokenStatsManager.js +0 -354
- package/dist/core/tokenStatsManager.js.map +0 -7
- package/dist/core/tools/executor.js +0 -143
- package/dist/core/tools/executor.js.map +0 -7
- package/dist/core/tools/index.js +0 -15
- package/dist/core/tools/index.js.map +0 -7
- package/dist/core/tools/registry.js +0 -183
- package/dist/core/tools/registry.js.map +0 -7
- package/dist/core/tools/types.js +0 -1
- package/dist/core/tools/types.js.map +0 -7
- package/dist/cost-tracker.js +0 -68
- package/dist/cost-tracker.js.map +0 -7
- package/dist/engine/AgentEngine.js +0 -902
- package/dist/engine/AgentEngine.js.map +0 -7
- package/dist/engine/EngineRegistry.js +0 -89
- package/dist/engine/EngineRegistry.js.map +0 -7
- package/dist/engine/foregroundAdapter.js +0 -191
- package/dist/engine/foregroundAdapter.js.map +0 -7
- package/dist/engine/index.js +0 -15
- package/dist/engine/index.js.map +0 -7
- package/dist/engine/types.js +0 -1
- package/dist/engine/types.js.map +0 -7
- package/dist/entrypoints/bootstrap.js +0 -56
- package/dist/entrypoints/bootstrap.js.map +0 -7
- package/dist/entrypoints/cli.js +0 -1721
- package/dist/entrypoints/cli.js.map +0 -7
- package/dist/entrypoints/mcp.js +0 -153
- package/dist/entrypoints/mcp.js.map +0 -7
- package/dist/history.js +0 -96
- package/dist/history.js.map +0 -7
- package/dist/hooks/useAgentEngine.js +0 -129
- package/dist/hooks/useAgentEngine.js.map +0 -7
- package/dist/hooks/useAgentTokenStats.js +0 -56
- package/dist/hooks/useAgentTokenStats.js.map +0 -7
- package/dist/hooks/useAgentTranscripts.js +0 -141
- package/dist/hooks/useAgentTranscripts.js.map +0 -7
- package/dist/hooks/useAnimationSync.js +0 -53
- package/dist/hooks/useAnimationSync.js.map +0 -7
- package/dist/hooks/useApiKeyVerification.js +0 -12
- package/dist/hooks/useApiKeyVerification.js.map +0 -7
- package/dist/hooks/useArrowKeyHistory.js +0 -52
- package/dist/hooks/useArrowKeyHistory.js.map +0 -7
- package/dist/hooks/useAskUser.js +0 -24
- package/dist/hooks/useAskUser.js.map +0 -7
- package/dist/hooks/useBackgroundShells.js +0 -29
- package/dist/hooks/useBackgroundShells.js.map +0 -7
- package/dist/hooks/useCanUseTool.js +0 -134
- package/dist/hooks/useCanUseTool.js.map +0 -7
- package/dist/hooks/useDeferredLoading.js +0 -67
- package/dist/hooks/useDeferredLoading.js.map +0 -7
- package/dist/hooks/useDoublePress.js +0 -31
- package/dist/hooks/useDoublePress.js.map +0 -7
- package/dist/hooks/useExitOnCtrlCD.js +0 -30
- package/dist/hooks/useExitOnCtrlCD.js.map +0 -7
- package/dist/hooks/useHistorySearch.js +0 -62
- package/dist/hooks/useHistorySearch.js.map +0 -7
- package/dist/hooks/useHookStatus.js +0 -40
- package/dist/hooks/useHookStatus.js.map +0 -7
- package/dist/hooks/useIdleNotifications.js +0 -66
- package/dist/hooks/useIdleNotifications.js.map +0 -7
- package/dist/hooks/useInterval.js +0 -18
- package/dist/hooks/useInterval.js.map +0 -7
- package/dist/hooks/useLogMessages.js +0 -41
- package/dist/hooks/useLogMessages.js.map +0 -7
- package/dist/hooks/useLogStartupTime.js +0 -10
- package/dist/hooks/useLogStartupTime.js.map +0 -7
- package/dist/hooks/useMessageGroups.js +0 -43
- package/dist/hooks/useMessageGroups.js.map +0 -7
- package/dist/hooks/useNotifyAfterTimeout.js +0 -42
- package/dist/hooks/useNotifyAfterTimeout.js.map +0 -7
- package/dist/hooks/usePermissionRequestLogging.js +0 -23
- package/dist/hooks/usePermissionRequestLogging.js.map +0 -7
- package/dist/hooks/useSessionTracking.js +0 -57
- package/dist/hooks/useSessionTracking.js.map +0 -7
- package/dist/hooks/useTeamMembers.js +0 -51
- package/dist/hooks/useTeamMembers.js.map +0 -7
- package/dist/hooks/useTerminalSize.js +0 -115
- package/dist/hooks/useTerminalSize.js.map +0 -7
- package/dist/hooks/useTextInput.js +0 -253
- package/dist/hooks/useTextInput.js.map +0 -7
- package/dist/hooks/useUnifiedCompletion.js +0 -1098
- package/dist/hooks/useUnifiedCompletion.js.map +0 -7
- package/dist/i18n/index.js +0 -109
- package/dist/i18n/index.js.map +0 -7
- package/dist/i18n/locales/en.js +0 -993
- package/dist/i18n/locales/en.js.map +0 -7
- package/dist/i18n/locales/index.js +0 -7
- package/dist/i18n/locales/index.js.map +0 -7
- package/dist/i18n/locales/zh-CN.js +0 -993
- package/dist/i18n/locales/zh-CN.js.map +0 -7
- package/dist/i18n/types.js +0 -8
- package/dist/i18n/types.js.map +0 -7
- package/dist/index.js +0 -5
- package/dist/index.js.map +0 -7
- package/dist/messages.js +0 -68
- package/dist/messages.js.map +0 -7
- package/dist/package.json +0 -4
- package/dist/permissions.js +0 -536
- package/dist/permissions.js.map +0 -7
- package/dist/query.js +0 -851
- package/dist/query.js.map +0 -7
- package/dist/screens/LogList.js +0 -55
- package/dist/screens/LogList.js.map +0 -7
- package/dist/screens/REPL.js +0 -1240
- package/dist/screens/REPL.js.map +0 -7
- package/dist/screens/ResumeConversation.js +0 -244
- package/dist/screens/ResumeConversation.js.map +0 -7
- package/dist/services/adapters/base.js +0 -29
- package/dist/services/adapters/base.js.map +0 -7
- package/dist/services/adapters/chatCompletions.js +0 -71
- package/dist/services/adapters/chatCompletions.js.map +0 -7
- package/dist/services/adapters/messageNormalizer.js +0 -354
- package/dist/services/adapters/messageNormalizer.js.map +0 -7
- package/dist/services/adapters/responsesAPI.js +0 -137
- package/dist/services/adapters/responsesAPI.js.map +0 -7
- package/dist/services/agentTeams/backends/headless.js +0 -108
- package/dist/services/agentTeams/backends/headless.js.map +0 -7
- package/dist/services/agentTeams/backends/inProcess.js +0 -102
- package/dist/services/agentTeams/backends/inProcess.js.map +0 -7
- package/dist/services/agentTeams/backends/resolver.js +0 -18
- package/dist/services/agentTeams/backends/resolver.js.map +0 -7
- package/dist/services/agentTeams/backends/tmux.js +0 -168
- package/dist/services/agentTeams/backends/tmux.js.map +0 -7
- package/dist/services/agentTeams/backends/types.js +0 -1
- package/dist/services/agentTeams/backends/types.js.map +0 -7
- package/dist/services/agentTeams/heartbeat.js +0 -88
- package/dist/services/agentTeams/heartbeat.js.map +0 -7
- package/dist/services/agentTeams/index.js +0 -75
- package/dist/services/agentTeams/index.js.map +0 -7
- package/dist/services/agentTeams/injectionChannel.js +0 -105
- package/dist/services/agentTeams/injectionChannel.js.map +0 -7
- package/dist/services/agentTeams/mailbox.js +0 -494
- package/dist/services/agentTeams/mailbox.js.map +0 -7
- package/dist/services/agentTeams/messageFormatter.js +0 -80
- package/dist/services/agentTeams/messageFormatter.js.map +0 -7
- package/dist/services/agentTeams/permissionDelegation.js +0 -71
- package/dist/services/agentTeams/permissionDelegation.js.map +0 -7
- package/dist/services/agentTeams/teamEvents.js +0 -45
- package/dist/services/agentTeams/teamEvents.js.map +0 -7
- package/dist/services/agentTeams/teamManager.js +0 -366
- package/dist/services/agentTeams/teamManager.js.map +0 -7
- package/dist/services/agentTeams/teamTaskStore.js +0 -343
- package/dist/services/agentTeams/teamTaskStore.js.map +0 -7
- package/dist/services/agentTeams/teammateSpawner.js +0 -161
- package/dist/services/agentTeams/teammateSpawner.js.map +0 -7
- package/dist/services/checkpointManager.js +0 -399
- package/dist/services/checkpointManager.js.map +0 -7
- package/dist/services/claude.js +0 -41
- package/dist/services/claude.js.map +0 -7
- package/dist/services/compressionService.js +0 -259
- package/dist/services/compressionService.js.map +0 -7
- package/dist/services/contextMonitor.js +0 -162
- package/dist/services/contextMonitor.js.map +0 -7
- package/dist/services/customCommands.js +0 -489
- package/dist/services/customCommands.js.map +0 -7
- package/dist/services/fileFreshness.js +0 -275
- package/dist/services/fileFreshness.js.map +0 -7
- package/dist/services/gpt5ConnectionTest.js +0 -263
- package/dist/services/gpt5ConnectionTest.js.map +0 -7
- package/dist/services/hookExecutor.js +0 -771
- package/dist/services/hookExecutor.js.map +0 -7
- package/dist/services/intelligentCompactor.js +0 -281
- package/dist/services/intelligentCompactor.js.map +0 -7
- package/dist/services/llm/anthropicProvider.js +0 -804
- package/dist/services/llm/anthropicProvider.js.map +0 -7
- package/dist/services/llm/dispatch.js +0 -237
- package/dist/services/llm/dispatch.js.map +0 -7
- package/dist/services/llm/index.js +0 -44
- package/dist/services/llm/index.js.map +0 -7
- package/dist/services/llm/mintoContext.js +0 -69
- package/dist/services/llm/mintoContext.js.map +0 -7
- package/dist/services/llm/openaiProvider.js +0 -601
- package/dist/services/llm/openaiProvider.js.map +0 -7
- package/dist/services/llm/types.js +0 -231
- package/dist/services/llm/types.js.map +0 -7
- package/dist/services/lspConfig.js +0 -109
- package/dist/services/lspConfig.js.map +0 -7
- package/dist/services/mainAgentCompressor.js +0 -84
- package/dist/services/mainAgentCompressor.js.map +0 -7
- package/dist/services/mcpClient.js +0 -997
- package/dist/services/mcpClient.js.map +0 -7
- package/dist/services/mcpServerApproval.js +0 -55
- package/dist/services/mcpServerApproval.js.map +0 -7
- package/dist/services/mentionProcessor.js +0 -214
- package/dist/services/mentionProcessor.js.map +0 -7
- package/dist/services/mintoAuth.js +0 -299
- package/dist/services/mintoAuth.js.map +0 -7
- package/dist/services/modelAdapterFactory.js +0 -47
- package/dist/services/modelAdapterFactory.js.map +0 -7
- package/dist/services/modelOrchestrator.js +0 -310
- package/dist/services/modelOrchestrator.js.map +0 -7
- package/dist/services/notifier.js +0 -49
- package/dist/services/notifier.js.map +0 -7
- package/dist/services/oauth.js +0 -249
- package/dist/services/oauth.js.map +0 -7
- package/dist/services/openai.js +0 -1120
- package/dist/services/openai.js.map +0 -7
- package/dist/services/outputStyles.js +0 -219
- package/dist/services/outputStyles.js.map +0 -7
- package/dist/services/plugins/index.js +0 -5
- package/dist/services/plugins/index.js.map +0 -7
- package/dist/services/plugins/lspServers.js +0 -188
- package/dist/services/plugins/lspServers.js.map +0 -7
- package/dist/services/plugins/pluginRuntime.js +0 -236
- package/dist/services/plugins/pluginRuntime.js.map +0 -7
- package/dist/services/plugins/pluginValidation.js +0 -228
- package/dist/services/plugins/pluginValidation.js.map +0 -7
- package/dist/services/plugins/skillMarketplace.js +0 -567
- package/dist/services/plugins/skillMarketplace.js.map +0 -7
- package/dist/services/responseStateManager.js +0 -102
- package/dist/services/responseStateManager.js.map +0 -7
- package/dist/services/sandbox/filesystemBoundary.js +0 -341
- package/dist/services/sandbox/filesystemBoundary.js.map +0 -7
- package/dist/services/sandbox/index.js +0 -14
- package/dist/services/sandbox/index.js.map +0 -7
- package/dist/services/sandbox/networkProxy.js +0 -293
- package/dist/services/sandbox/networkProxy.js.map +0 -7
- package/dist/services/sandbox/sandboxController.js +0 -582
- package/dist/services/sandbox/sandboxController.js.map +0 -7
- package/dist/services/sandbox/types.js +0 -50
- package/dist/services/sandbox/types.js.map +0 -7
- package/dist/services/sentry.js +0 -9
- package/dist/services/sentry.js.map +0 -7
- package/dist/services/sessionMemory.js +0 -279
- package/dist/services/sessionMemory.js.map +0 -7
- package/dist/services/sessionMemoryInjector.js +0 -77
- package/dist/services/sessionMemoryInjector.js.map +0 -7
- package/dist/services/subagentAbortManager.js +0 -95
- package/dist/services/subagentAbortManager.js.map +0 -7
- package/dist/services/subagentCompressor.js +0 -146
- package/dist/services/subagentCompressor.js.map +0 -7
- package/dist/services/systemReminder.js +0 -815
- package/dist/services/systemReminder.js.map +0 -7
- package/dist/services/taskRouter.js +0 -324
- package/dist/services/taskRouter.js.map +0 -7
- package/dist/services/taskStore.js +0 -415
- package/dist/services/taskStore.js.map +0 -7
- package/dist/services/topicDetector.js +0 -169
- package/dist/services/topicDetector.js.map +0 -7
- package/dist/services/vcr.js +0 -133
- package/dist/services/vcr.js.map +0 -7
- package/dist/tools/ArchitectTool/ArchitectTool.js +0 -126
- package/dist/tools/ArchitectTool/ArchitectTool.js.map +0 -7
- package/dist/tools/ArchitectTool/prompt.js +0 -18
- package/dist/tools/ArchitectTool/prompt.js.map +0 -7
- package/dist/tools/AskExpertModelTool/AskExpertModelTool.js +0 -420
- package/dist/tools/AskExpertModelTool/AskExpertModelTool.js.map +0 -7
- package/dist/tools/AskUserQuestionTool/AskUserQuestionTool.js +0 -158
- package/dist/tools/AskUserQuestionTool/AskUserQuestionTool.js.map +0 -7
- package/dist/tools/AskUserQuestionTool/index.js +0 -5
- package/dist/tools/AskUserQuestionTool/index.js.map +0 -7
- package/dist/tools/AskUserQuestionTool/prompt.js +0 -167
- package/dist/tools/AskUserQuestionTool/prompt.js.map +0 -7
- package/dist/tools/BaseTool.js +0 -72
- package/dist/tools/BaseTool.js.map +0 -7
- package/dist/tools/BashOutputTool/BashOutputTool.js +0 -120
- package/dist/tools/BashOutputTool/BashOutputTool.js.map +0 -7
- package/dist/tools/BashOutputTool/BashOutputToolResultMessage.js +0 -14
- package/dist/tools/BashOutputTool/BashOutputToolResultMessage.js.map +0 -7
- package/dist/tools/BashOutputTool/prompt.js +0 -13
- package/dist/tools/BashOutputTool/prompt.js.map +0 -7
- package/dist/tools/BashTool/BashTool.js +0 -353
- package/dist/tools/BashTool/BashTool.js.map +0 -7
- package/dist/tools/BashTool/BashToolResultMessage.js +0 -24
- package/dist/tools/BashTool/BashToolResultMessage.js.map +0 -7
- package/dist/tools/BashTool/OutputLine.js +0 -84
- package/dist/tools/BashTool/OutputLine.js.map +0 -7
- package/dist/tools/BashTool/prompt.js +0 -496
- package/dist/tools/BashTool/prompt.js.map +0 -7
- package/dist/tools/BashTool/utils.js +0 -89
- package/dist/tools/BashTool/utils.js.map +0 -7
- package/dist/tools/EnterWorktreeTool/EnterWorktreeTool.js +0 -121
- package/dist/tools/EnterWorktreeTool/EnterWorktreeTool.js.map +0 -7
- package/dist/tools/EnterWorktreeTool/prompt.js +0 -22
- package/dist/tools/EnterWorktreeTool/prompt.js.map +0 -7
- package/dist/tools/FileEditTool/FileEditTool.js +0 -278
- package/dist/tools/FileEditTool/FileEditTool.js.map +0 -7
- package/dist/tools/FileEditTool/prompt.js +0 -56
- package/dist/tools/FileEditTool/prompt.js.map +0 -7
- package/dist/tools/FileEditTool/utils.js +0 -48
- package/dist/tools/FileEditTool/utils.js.map +0 -7
- package/dist/tools/FileReadTool/FileReadTool.js +0 -427
- package/dist/tools/FileReadTool/FileReadTool.js.map +0 -7
- package/dist/tools/FileReadTool/prompt.js +0 -24
- package/dist/tools/FileReadTool/prompt.js.map +0 -7
- package/dist/tools/FileWriteTool/FileWriteTool.js +0 -211
- package/dist/tools/FileWriteTool/FileWriteTool.js.map +0 -7
- package/dist/tools/FileWriteTool/prompt.js +0 -21
- package/dist/tools/FileWriteTool/prompt.js.map +0 -7
- package/dist/tools/GlobTool/GlobTool.js +0 -100
- package/dist/tools/GlobTool/GlobTool.js.map +0 -7
- package/dist/tools/GlobTool/prompt.js +0 -23
- package/dist/tools/GlobTool/prompt.js.map +0 -7
- package/dist/tools/GrepTool/GrepTool.js +0 -417
- package/dist/tools/GrepTool/GrepTool.js.map +0 -7
- package/dist/tools/GrepTool/prompt.js +0 -22
- package/dist/tools/GrepTool/prompt.js.map +0 -7
- package/dist/tools/KillShellTool/KillShellTool.js +0 -92
- package/dist/tools/KillShellTool/KillShellTool.js.map +0 -7
- package/dist/tools/KillShellTool/KillShellToolResultMessage.js +0 -14
- package/dist/tools/KillShellTool/KillShellToolResultMessage.js.map +0 -7
- package/dist/tools/KillShellTool/prompt.js +0 -12
- package/dist/tools/KillShellTool/prompt.js.map +0 -7
- package/dist/tools/ListMcpResourcesTool/ListMcpResourcesTool.js +0 -109
- package/dist/tools/ListMcpResourcesTool/ListMcpResourcesTool.js.map +0 -7
- package/dist/tools/ListMcpResourcesTool/prompt.js +0 -19
- package/dist/tools/ListMcpResourcesTool/prompt.js.map +0 -7
- package/dist/tools/LspTool/LspTool.js +0 -673
- package/dist/tools/LspTool/LspTool.js.map +0 -7
- package/dist/tools/LspTool/prompt.js +0 -27
- package/dist/tools/LspTool/prompt.js.map +0 -7
- package/dist/tools/MCPSearchTool/MCPSearchTool.js +0 -172
- package/dist/tools/MCPSearchTool/MCPSearchTool.js.map +0 -7
- package/dist/tools/MCPSearchTool/prompt.js +0 -77
- package/dist/tools/MCPSearchTool/prompt.js.map +0 -7
- package/dist/tools/MCPTool/MCPTool.js +0 -97
- package/dist/tools/MCPTool/MCPTool.js.map +0 -7
- package/dist/tools/MCPTool/prompt.js +0 -7
- package/dist/tools/MCPTool/prompt.js.map +0 -7
- package/dist/tools/MemoryReadTool/MemoryReadTool.js +0 -117
- package/dist/tools/MemoryReadTool/MemoryReadTool.js.map +0 -7
- package/dist/tools/MemoryReadTool/prompt.js +0 -7
- package/dist/tools/MemoryReadTool/prompt.js.map +0 -7
- package/dist/tools/MemoryWriteTool/MemoryWriteTool.js +0 -78
- package/dist/tools/MemoryWriteTool/MemoryWriteTool.js.map +0 -7
- package/dist/tools/MemoryWriteTool/prompt.js +0 -7
- package/dist/tools/MemoryWriteTool/prompt.js.map +0 -7
- package/dist/tools/MultiEditTool/MultiEditTool.js +0 -328
- package/dist/tools/MultiEditTool/MultiEditTool.js.map +0 -7
- package/dist/tools/MultiEditTool/prompt.js +0 -47
- package/dist/tools/MultiEditTool/prompt.js.map +0 -7
- package/dist/tools/NotebookEditTool/NotebookEditTool.js +0 -257
- package/dist/tools/NotebookEditTool/NotebookEditTool.js.map +0 -7
- package/dist/tools/NotebookEditTool/prompt.js +0 -7
- package/dist/tools/NotebookEditTool/prompt.js.map +0 -7
- package/dist/tools/NotebookReadTool/NotebookReadTool.js +0 -218
- package/dist/tools/NotebookReadTool/NotebookReadTool.js.map +0 -7
- package/dist/tools/NotebookReadTool/prompt.js +0 -7
- package/dist/tools/NotebookReadTool/prompt.js.map +0 -7
- package/dist/tools/PlanModeTool/EnterPlanModeTool.js +0 -85
- package/dist/tools/PlanModeTool/EnterPlanModeTool.js.map +0 -7
- package/dist/tools/PlanModeTool/ExitPlanModeTool.js +0 -164
- package/dist/tools/PlanModeTool/ExitPlanModeTool.js.map +0 -7
- package/dist/tools/PlanModeTool/prompt.js +0 -43
- package/dist/tools/PlanModeTool/prompt.js.map +0 -7
- package/dist/tools/ReadMcpResourceTool/ReadMcpResourceTool.js +0 -130
- package/dist/tools/ReadMcpResourceTool/ReadMcpResourceTool.js.map +0 -7
- package/dist/tools/ReadMcpResourceTool/prompt.js +0 -17
- package/dist/tools/ReadMcpResourceTool/prompt.js.map +0 -7
- package/dist/tools/SendMessageTool/SendMessageTool.js +0 -341
- package/dist/tools/SendMessageTool/SendMessageTool.js.map +0 -7
- package/dist/tools/SendMessageTool/prompt.js +0 -44
- package/dist/tools/SendMessageTool/prompt.js.map +0 -7
- package/dist/tools/SkillTool/SkillTool.js +0 -227
- package/dist/tools/SkillTool/SkillTool.js.map +0 -7
- package/dist/tools/SkillTool/prompt.js +0 -81
- package/dist/tools/SkillTool/prompt.js.map +0 -7
- package/dist/tools/SlashCommandTool/SlashCommandTool.js +0 -416
- package/dist/tools/SlashCommandTool/SlashCommandTool.js.map +0 -7
- package/dist/tools/SlashCommandTool/prompt.js +0 -35
- package/dist/tools/SlashCommandTool/prompt.js.map +0 -7
- package/dist/tools/TaskCreateTool/TaskCreateTool.js +0 -102
- package/dist/tools/TaskCreateTool/TaskCreateTool.js.map +0 -7
- package/dist/tools/TaskCreateTool/prompt.js +0 -58
- package/dist/tools/TaskCreateTool/prompt.js.map +0 -7
- package/dist/tools/TaskGetTool/TaskGetTool.js +0 -115
- package/dist/tools/TaskGetTool/TaskGetTool.js.map +0 -7
- package/dist/tools/TaskGetTool/prompt.js +0 -28
- package/dist/tools/TaskGetTool/prompt.js.map +0 -7
- package/dist/tools/TaskListTool/TaskListTool.js +0 -102
- package/dist/tools/TaskListTool/TaskListTool.js.map +0 -7
- package/dist/tools/TaskListTool/prompt.js +0 -42
- package/dist/tools/TaskListTool/prompt.js.map +0 -7
- package/dist/tools/TaskOutputTool/TaskOutputTool.js +0 -190
- package/dist/tools/TaskOutputTool/TaskOutputTool.js.map +0 -7
- package/dist/tools/TaskOutputTool/prompt.js +0 -16
- package/dist/tools/TaskOutputTool/prompt.js.map +0 -7
- package/dist/tools/TaskStopTool/TaskStopTool.js +0 -150
- package/dist/tools/TaskStopTool/TaskStopTool.js.map +0 -7
- package/dist/tools/TaskStopTool/prompt.js +0 -15
- package/dist/tools/TaskStopTool/prompt.js.map +0 -7
- package/dist/tools/TaskTool/TaskTool.js +0 -1525
- package/dist/tools/TaskTool/TaskTool.js.map +0 -7
- package/dist/tools/TaskTool/constants.js +0 -11
- package/dist/tools/TaskTool/constants.js.map +0 -7
- package/dist/tools/TaskTool/prompt.js +0 -121
- package/dist/tools/TaskTool/prompt.js.map +0 -7
- package/dist/tools/TaskUpdateTool/TaskUpdateTool.js +0 -148
- package/dist/tools/TaskUpdateTool/TaskUpdateTool.js.map +0 -7
- package/dist/tools/TaskUpdateTool/prompt.js +0 -81
- package/dist/tools/TaskUpdateTool/prompt.js.map +0 -7
- package/dist/tools/TeamCreateTool/TeamCreateTool.js +0 -129
- package/dist/tools/TeamCreateTool/TeamCreateTool.js.map +0 -7
- package/dist/tools/TeamCreateTool/prompt.js +0 -58
- package/dist/tools/TeamCreateTool/prompt.js.map +0 -7
- package/dist/tools/TeamDeleteTool/TeamDeleteTool.js +0 -151
- package/dist/tools/TeamDeleteTool/TeamDeleteTool.js.map +0 -7
- package/dist/tools/TeamDeleteTool/prompt.js +0 -16
- package/dist/tools/TeamDeleteTool/prompt.js.map +0 -7
- package/dist/tools/ThinkTool/ThinkTool.js +0 -45
- package/dist/tools/ThinkTool/ThinkTool.js.map +0 -7
- package/dist/tools/ThinkTool/prompt.js +0 -16
- package/dist/tools/ThinkTool/prompt.js.map +0 -7
- package/dist/tools/TodoWriteTool/TodoWriteTool.js +0 -232
- package/dist/tools/TodoWriteTool/TodoWriteTool.js.map +0 -7
- package/dist/tools/TodoWriteTool/prompt.js +0 -87
- package/dist/tools/TodoWriteTool/prompt.js.map +0 -7
- package/dist/tools/URLFetcherTool/URLFetcherTool.js +0 -234
- package/dist/tools/URLFetcherTool/URLFetcherTool.js.map +0 -7
- package/dist/tools/URLFetcherTool/cache.js +0 -95
- package/dist/tools/URLFetcherTool/cache.js.map +0 -7
- package/dist/tools/URLFetcherTool/htmlToMarkdown.js +0 -44
- package/dist/tools/URLFetcherTool/htmlToMarkdown.js.map +0 -7
- package/dist/tools/URLFetcherTool/prompt.js +0 -28
- package/dist/tools/URLFetcherTool/prompt.js.map +0 -7
- package/dist/tools/WebSearchTool/WebSearchTool.js +0 -92
- package/dist/tools/WebSearchTool/WebSearchTool.js.map +0 -7
- package/dist/tools/WebSearchTool/prompt.js +0 -24
- package/dist/tools/WebSearchTool/prompt.js.map +0 -7
- package/dist/tools/WebSearchTool/searchProviders.js +0 -58
- package/dist/tools/WebSearchTool/searchProviders.js.map +0 -7
- package/dist/tools/lsTool/lsTool.js +0 -201
- package/dist/tools/lsTool/lsTool.js.map +0 -7
- package/dist/tools/lsTool/prompt.js +0 -5
- package/dist/tools/lsTool/prompt.js.map +0 -7
- package/dist/tools.js +0 -207
- package/dist/tools.js.map +0 -7
- package/dist/types/PermissionMode.js +0 -160
- package/dist/types/PermissionMode.js.map +0 -7
- package/dist/types/RequestContext.js +0 -47
- package/dist/types/RequestContext.js.map +0 -7
- package/dist/types/agentTeams.js +0 -1
- package/dist/types/agentTeams.js.map +0 -7
- package/dist/types/askUserQuestion.js +0 -1
- package/dist/types/askUserQuestion.js.map +0 -7
- package/dist/types/common.d.js +0 -1
- package/dist/types/common.d.js.map +0 -7
- package/dist/types/conversation.js +0 -1
- package/dist/types/conversation.js.map +0 -7
- package/dist/types/core.js +0 -1
- package/dist/types/core.js.map +0 -7
- package/dist/types/hooks.js +0 -47
- package/dist/types/hooks.js.map +0 -7
- package/dist/types/interactionRound.js +0 -1
- package/dist/types/interactionRound.js.map +0 -7
- package/dist/types/logs.js +0 -1
- package/dist/types/logs.js.map +0 -7
- package/dist/types/marketplace.js +0 -107
- package/dist/types/marketplace.js.map +0 -7
- package/dist/types/messageGroup.js +0 -36
- package/dist/types/messageGroup.js.map +0 -7
- package/dist/types/modelCapabilities.js +0 -1
- package/dist/types/modelCapabilities.js.map +0 -7
- package/dist/types/notebook.js +0 -1
- package/dist/types/notebook.js.map +0 -7
- package/dist/types/plugin.js +0 -86
- package/dist/types/plugin.js.map +0 -7
- package/dist/types/subagent.js +0 -1
- package/dist/types/subagent.js.map +0 -7
- package/dist/types/thinking.js +0 -1
- package/dist/types/thinking.js.map +0 -7
- package/dist/utils/BackgroundShellManager.js +0 -378
- package/dist/utils/BackgroundShellManager.js.map +0 -7
- package/dist/utils/CircuitBreaker.js +0 -248
- package/dist/utils/CircuitBreaker.js.map +0 -7
- package/dist/utils/Cursor.js +0 -315
- package/dist/utils/Cursor.js.map +0 -7
- package/dist/utils/MessageBatchBuffer.js +0 -102
- package/dist/utils/MessageBatchBuffer.js.map +0 -7
- package/dist/utils/PersistentShell.js +0 -526
- package/dist/utils/PersistentShell.js.map +0 -7
- package/dist/utils/advancedFuzzyMatcher.js +0 -209
- package/dist/utils/advancedFuzzyMatcher.js.map +0 -7
- package/dist/utils/agentHookExecutor.js +0 -103
- package/dist/utils/agentHookExecutor.js.map +0 -7
- package/dist/utils/agentLoader.js +0 -655
- package/dist/utils/agentLoader.js.map +0 -7
- package/dist/utils/agentMemory.js +0 -134
- package/dist/utils/agentMemory.js.map +0 -7
- package/dist/utils/agentStorage.js +0 -59
- package/dist/utils/agentStorage.js.map +0 -7
- package/dist/utils/agentTranscripts.js +0 -641
- package/dist/utils/agentTranscripts.js.map +0 -7
- package/dist/utils/animationManager.js +0 -250
- package/dist/utils/animationManager.js.map +0 -7
- package/dist/utils/animationSync.js +0 -110
- package/dist/utils/animationSync.js.map +0 -7
- package/dist/utils/array.js +0 -7
- package/dist/utils/array.js.map +0 -7
- package/dist/utils/ask.js +0 -80
- package/dist/utils/ask.js.map +0 -7
- package/dist/utils/async.js +0 -167
- package/dist/utils/async.js.map +0 -7
- package/dist/utils/asyncFile.js +0 -215
- package/dist/utils/asyncFile.js.map +0 -7
- package/dist/utils/atomicWrite.js +0 -23
- package/dist/utils/atomicWrite.js.map +0 -7
- package/dist/utils/auth.js +0 -11
- package/dist/utils/auth.js.map +0 -7
- package/dist/utils/autoCompactCore.js +0 -203
- package/dist/utils/autoCompactCore.js.map +0 -7
- package/dist/utils/autoMemoryPaths.js +0 -89
- package/dist/utils/autoMemoryPaths.js.map +0 -7
- package/dist/utils/autoUpdater.js +0 -113
- package/dist/utils/autoUpdater.js.map +0 -7
- package/dist/utils/backgroundAgentManager.js +0 -231
- package/dist/utils/backgroundAgentManager.js.map +0 -7
- package/dist/utils/browser.js +0 -15
- package/dist/utils/browser.js.map +0 -7
- package/dist/utils/claudeCodeSync.js +0 -439
- package/dist/utils/claudeCodeSync.js.map +0 -7
- package/dist/utils/cleanup.js +0 -54
- package/dist/utils/cleanup.js.map +0 -7
- package/dist/utils/commands.js +0 -219
- package/dist/utils/commands.js.map +0 -7
- package/dist/utils/commonUnixCommands.js +0 -689
- package/dist/utils/commonUnixCommands.js.map +0 -7
- package/dist/utils/compressionMode.js +0 -47
- package/dist/utils/compressionMode.js.map +0 -7
- package/dist/utils/config.js +0 -716
- package/dist/utils/config.js.map +0 -7
- package/dist/utils/configPaths.js +0 -199
- package/dist/utils/configPaths.js.map +0 -7
- package/dist/utils/configSchema.js +0 -232
- package/dist/utils/configSchema.js.map +0 -7
- package/dist/utils/conversationRecovery.js +0 -54
- package/dist/utils/conversationRecovery.js.map +0 -7
- package/dist/utils/credentials/CredentialStore.js +0 -1
- package/dist/utils/credentials/CredentialStore.js.map +0 -7
- package/dist/utils/credentials/EncryptedFileStore.js +0 -157
- package/dist/utils/credentials/EncryptedFileStore.js.map +0 -7
- package/dist/utils/credentials/index.js +0 -51
- package/dist/utils/credentials/index.js.map +0 -7
- package/dist/utils/credentials/migration.js +0 -82
- package/dist/utils/credentials/migration.js.map +0 -7
- package/dist/utils/debugLogger.js +0 -889
- package/dist/utils/debugLogger.js.map +0 -7
- package/dist/utils/diff.js +0 -32
- package/dist/utils/diff.js.map +0 -7
- package/dist/utils/dualPath.js +0 -24
- package/dist/utils/dualPath.js.map +0 -7
- package/dist/utils/env.js +0 -45
- package/dist/utils/env.js.map +0 -7
- package/dist/utils/envConfig.js +0 -116
- package/dist/utils/envConfig.js.map +0 -7
- package/dist/utils/errorHandling.js +0 -89
- package/dist/utils/errorHandling.js.map +0 -7
- package/dist/utils/errors.js +0 -23
- package/dist/utils/errors.js.map +0 -7
- package/dist/utils/execFileNoThrow.js +0 -45
- package/dist/utils/execFileNoThrow.js.map +0 -7
- package/dist/utils/exit.js +0 -132
- package/dist/utils/exit.js.map +0 -7
- package/dist/utils/expertChatStorage.js +0 -78
- package/dist/utils/expertChatStorage.js.map +0 -7
- package/dist/utils/externalEditor.js +0 -155
- package/dist/utils/externalEditor.js.map +0 -7
- package/dist/utils/file.js +0 -282
- package/dist/utils/file.js.map +0 -7
- package/dist/utils/fileLock.js +0 -67
- package/dist/utils/fileLock.js.map +0 -7
- package/dist/utils/fileRecoveryCore.js +0 -41
- package/dist/utils/fileRecoveryCore.js.map +0 -7
- package/dist/utils/format.js +0 -119
- package/dist/utils/format.js.map +0 -7
- package/dist/utils/fuzzyMatcher.js +0 -258
- package/dist/utils/fuzzyMatcher.js.map +0 -7
- package/dist/utils/generators.js +0 -116
- package/dist/utils/generators.js.map +0 -7
- package/dist/utils/git.js +0 -83
- package/dist/utils/git.js.map +0 -7
- package/dist/utils/globalErrorHandler.js +0 -58
- package/dist/utils/globalErrorHandler.js.map +0 -7
- package/dist/utils/gpt5.js +0 -146
- package/dist/utils/gpt5.js.map +0 -7
- package/dist/utils/groupHandlers/index.js +0 -8
- package/dist/utils/groupHandlers/index.js.map +0 -7
- package/dist/utils/groupHandlers/parallelTasksHandler.js +0 -142
- package/dist/utils/groupHandlers/parallelTasksHandler.js.map +0 -7
- package/dist/utils/groupHandlers/taskHandler.js +0 -104
- package/dist/utils/groupHandlers/taskHandler.js.map +0 -7
- package/dist/utils/groupHandlers/types.js +0 -1
- package/dist/utils/groupHandlers/types.js.map +0 -7
- package/dist/utils/historyManager.js +0 -234
- package/dist/utils/historyManager.js.map +0 -7
- package/dist/utils/hookManager.js +0 -540
- package/dist/utils/hookManager.js.map +0 -7
- package/dist/utils/http.js +0 -7
- package/dist/utils/http.js.map +0 -7
- package/dist/utils/imagePaste.js +0 -29
- package/dist/utils/imagePaste.js.map +0 -7
- package/dist/utils/json.js +0 -16
- package/dist/utils/json.js.map +0 -7
- package/dist/utils/log.js +0 -333
- package/dist/utils/log.js.map +0 -7
- package/dist/utils/logRotation.js +0 -224
- package/dist/utils/logRotation.js.map +0 -7
- package/dist/utils/markdown.js +0 -464
- package/dist/utils/markdown.js.map +0 -7
- package/dist/utils/marketplaceManager.js +0 -545
- package/dist/utils/marketplaceManager.js.map +0 -7
- package/dist/utils/memSafety.js +0 -264
- package/dist/utils/memSafety.js.map +0 -7
- package/dist/utils/memoizeWithTTL.js +0 -25
- package/dist/utils/memoizeWithTTL.js.map +0 -7
- package/dist/utils/messageContextManager.js +0 -208
- package/dist/utils/messageContextManager.js.map +0 -7
- package/dist/utils/messageGroupManager.js +0 -274
- package/dist/utils/messageGroupManager.js.map +0 -7
- package/dist/utils/messages.js +0 -725
- package/dist/utils/messages.js.map +0 -7
- package/dist/utils/migration/index.js +0 -37
- package/dist/utils/migration/index.js.map +0 -7
- package/dist/utils/migration/migrateHistory.js +0 -273
- package/dist/utils/migration/migrateHistory.js.map +0 -7
- package/dist/utils/migration/migrateTodos.js +0 -323
- package/dist/utils/migration/migrateTodos.js.map +0 -7
- package/dist/utils/model.js +0 -846
- package/dist/utils/model.js.map +0 -7
- package/dist/utils/pasteCache.js +0 -313
- package/dist/utils/pasteCache.js.map +0 -7
- package/dist/utils/permissions/filesystem.js +0 -236
- package/dist/utils/permissions/filesystem.js.map +0 -7
- package/dist/utils/plan/planMode.js +0 -143
- package/dist/utils/plan/planMode.js.map +0 -7
- package/dist/utils/pluginInstaller.js +0 -518
- package/dist/utils/pluginInstaller.js.map +0 -7
- package/dist/utils/pluginLoader.js +0 -819
- package/dist/utils/pluginLoader.js.map +0 -7
- package/dist/utils/pluginRegistry.js +0 -111
- package/dist/utils/pluginRegistry.js.map +0 -7
- package/dist/utils/pluginValidator.js +0 -798
- package/dist/utils/pluginValidator.js.map +0 -7
- package/dist/utils/ptyCompat.js +0 -125
- package/dist/utils/ptyCompat.js.map +0 -7
- package/dist/utils/replStateMachine.js +0 -145
- package/dist/utils/replStateMachine.js.map +0 -7
- package/dist/utils/repoFetcher.js +0 -110
- package/dist/utils/repoFetcher.js.map +0 -7
- package/dist/utils/ripgrep.js +0 -236
- package/dist/utils/ripgrep.js.map +0 -7
- package/dist/utils/roundConverter.js +0 -262
- package/dist/utils/roundConverter.js.map +0 -7
- package/dist/utils/safeFetch.js +0 -45
- package/dist/utils/safeFetch.js.map +0 -7
- package/dist/utils/safePath.js +0 -132
- package/dist/utils/safePath.js.map +0 -7
- package/dist/utils/sanitizeInput.js +0 -32
- package/dist/utils/sanitizeInput.js.map +0 -7
- package/dist/utils/secureFile.js +0 -512
- package/dist/utils/secureFile.js.map +0 -7
- package/dist/utils/secureKeyStorage.js +0 -341
- package/dist/utils/secureKeyStorage.js.map +0 -7
- package/dist/utils/sensitiveFiles.js +0 -125
- package/dist/utils/sensitiveFiles.js.map +0 -7
- package/dist/utils/session/sessionPlugins.js +0 -67
- package/dist/utils/session/sessionPlugins.js.map +0 -7
- package/dist/utils/sessionIndex.js +0 -192
- package/dist/utils/sessionIndex.js.map +0 -7
- package/dist/utils/sessionState.js +0 -22
- package/dist/utils/sessionState.js.map +0 -7
- package/dist/utils/sessionTracker.js +0 -170
- package/dist/utils/sessionTracker.js.map +0 -7
- package/dist/utils/simpleMode.js +0 -7
- package/dist/utils/simpleMode.js.map +0 -7
- package/dist/utils/skillLoader.js +0 -230
- package/dist/utils/skillLoader.js.map +0 -7
- package/dist/utils/state.js +0 -24
- package/dist/utils/state.js.map +0 -7
- package/dist/utils/stats.js +0 -417
- package/dist/utils/stats.js.map +0 -7
- package/dist/utils/streamingState.js +0 -62
- package/dist/utils/streamingState.js.map +0 -7
- package/dist/utils/stringSubstitution.js +0 -106
- package/dist/utils/stringSubstitution.js.map +0 -7
- package/dist/utils/style.js +0 -34
- package/dist/utils/style.js.map +0 -7
- package/dist/utils/taskDisplayUtils.js +0 -258
- package/dist/utils/taskDisplayUtils.js.map +0 -7
- package/dist/utils/teamConfig.js +0 -624
- package/dist/utils/teamConfig.js.map +0 -7
- package/dist/utils/terminal.js +0 -59
- package/dist/utils/terminal.js.map +0 -7
- package/dist/utils/theme.js +0 -134
- package/dist/utils/theme.js.map +0 -7
- package/dist/utils/thinking.js +0 -63
- package/dist/utils/thinking.js.map +0 -7
- package/dist/utils/todoChangeCalculator.js +0 -64
- package/dist/utils/todoChangeCalculator.js.map +0 -7
- package/dist/utils/todoStorage.js +0 -413
- package/dist/utils/todoStorage.js.map +0 -7
- package/dist/utils/tokenProgress.js +0 -55
- package/dist/utils/tokenProgress.js.map +0 -7
- package/dist/utils/tokens.js +0 -30
- package/dist/utils/tokens.js.map +0 -7
- package/dist/utils/toolExecutionController.js +0 -109
- package/dist/utils/toolExecutionController.js.map +0 -7
- package/dist/utils/toolRiskClassification.js +0 -210
- package/dist/utils/toolRiskClassification.js.map +0 -7
- package/dist/utils/toolTimeout.js +0 -136
- package/dist/utils/toolTimeout.js.map +0 -7
- package/dist/utils/tooling/safeRender.js +0 -115
- package/dist/utils/tooling/safeRender.js.map +0 -7
- package/dist/utils/tooling/toolError.js +0 -12
- package/dist/utils/tooling/toolError.js.map +0 -7
- package/dist/utils/unaryLogging.js +0 -6
- package/dist/utils/unaryLogging.js.map +0 -7
- package/dist/utils/user.js +0 -40
- package/dist/utils/user.js.map +0 -7
- package/dist/utils/userFriendlyError.js +0 -346
- package/dist/utils/userFriendlyError.js.map +0 -7
- package/dist/utils/validate.js +0 -132
- package/dist/utils/validate.js.map +0 -7
- package/dist/version.js +0 -7
- package/dist/version.js.map +0 -7
- package/dist/yoga.wasm +0 -0
- /package/{dist/utils/vendor → vendor}/ripgrep/arm64-darwin/rg +0 -0
package/dist/commands/plugin.js
DELETED
|
@@ -1,1410 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useMemo, useCallback } from "react";
|
|
2
|
-
import { Box, Text } from "ink";
|
|
3
|
-
import { SimpleSpinner } from "../components/Spinner.js";
|
|
4
|
-
import {
|
|
5
|
-
loadAllPlugins,
|
|
6
|
-
getPlugin,
|
|
7
|
-
listPlugins,
|
|
8
|
-
togglePluginEnabled,
|
|
9
|
-
enablePlugin,
|
|
10
|
-
disablePlugin
|
|
11
|
-
} from "../utils/pluginLoader.js";
|
|
12
|
-
import {
|
|
13
|
-
addMarketplace,
|
|
14
|
-
removeMarketplace,
|
|
15
|
-
updateMarketplace,
|
|
16
|
-
listMarketplaces,
|
|
17
|
-
installPluginFromMarketplace
|
|
18
|
-
} from "../utils/marketplaceManager.js";
|
|
19
|
-
import { uninstallPlugin } from "../utils/pluginInstaller.js";
|
|
20
|
-
import {
|
|
21
|
-
syncFromClaudeCode,
|
|
22
|
-
hasClaudeCodeInstallation
|
|
23
|
-
} from "../utils/claudeCodeSync.js";
|
|
24
|
-
import { gt as semverGt, valid as semverValid } from "semver";
|
|
25
|
-
import { MarketplaceError } from "../types/marketplace.js";
|
|
26
|
-
import { rmSync } from "fs";
|
|
27
|
-
import { getTheme } from "../utils/theme.js";
|
|
28
|
-
import { SEMANTIC_COLORS } from "../constants/colors.js";
|
|
29
|
-
import { TabbedListView } from "../components/TabbedListView/TabbedListView.js";
|
|
30
|
-
import { t } from "../i18n/index.js";
|
|
31
|
-
import { formatMarketplacePath, formatTimeAgo } from "./plugin/utils.js";
|
|
32
|
-
const PluginList = ({ onDone }) => {
|
|
33
|
-
const [plugins, setPlugins] = useState([]);
|
|
34
|
-
const [loading, setLoading] = useState(true);
|
|
35
|
-
const [error, setError] = useState(null);
|
|
36
|
-
const theme = getTheme();
|
|
37
|
-
useEffect(() => {
|
|
38
|
-
try {
|
|
39
|
-
const loadedPlugins = loadAllPlugins();
|
|
40
|
-
setPlugins(loadedPlugins);
|
|
41
|
-
} catch (err) {
|
|
42
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
43
|
-
} finally {
|
|
44
|
-
setLoading(false);
|
|
45
|
-
onDone();
|
|
46
|
-
}
|
|
47
|
-
}, [onDone]);
|
|
48
|
-
if (loading) {
|
|
49
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Loading plugins...");
|
|
50
|
-
}
|
|
51
|
-
if (error) {
|
|
52
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.error }, "Error: ", error);
|
|
53
|
-
}
|
|
54
|
-
if (plugins.length === 0) {
|
|
55
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, "No plugins installed."), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Install plugins with: /plugin install <name>[@marketplace]"));
|
|
56
|
-
}
|
|
57
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { bold: true, underline: true, color: theme.success }, "Installed Plugins (", plugins.length, ")"), /* @__PURE__ */ React.createElement(Text, null, ""), plugins.map((plugin2) => {
|
|
58
|
-
const componentCounts = [
|
|
59
|
-
plugin2.agents.length > 0 && `${plugin2.agents.length} agent${plugin2.agents.length !== 1 ? "s" : ""}`,
|
|
60
|
-
plugin2.commands.length > 0 && `${plugin2.commands.length} command${plugin2.commands.length !== 1 ? "s" : ""}`,
|
|
61
|
-
plugin2.skills.length > 0 && `${plugin2.skills.length} skill${plugin2.skills.length !== 1 ? "s" : ""}`,
|
|
62
|
-
plugin2.hooks.length > 0 && `${plugin2.hooks.length} hook${plugin2.hooks.length !== 1 ? "s" : ""}`,
|
|
63
|
-
plugin2.mcpServers.length > 0 && `${plugin2.mcpServers.length} MCP server${plugin2.mcpServers.length !== 1 ? "s" : ""}`
|
|
64
|
-
].filter(Boolean);
|
|
65
|
-
return /* @__PURE__ */ React.createElement(
|
|
66
|
-
Box,
|
|
67
|
-
{
|
|
68
|
-
key: plugin2.manifest.name,
|
|
69
|
-
flexDirection: "column",
|
|
70
|
-
marginBottom: 1
|
|
71
|
-
},
|
|
72
|
-
/* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary, bold: true }, plugin2.manifest.displayName || plugin2.manifest.name), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "v", plugin2.manifest.version), plugin2.source.type === "claude-code" && /* @__PURE__ */ React.createElement(Text, { color: "#5DADE2" }, " [CC]"), !plugin2.enabled && /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, " (disabled)")),
|
|
73
|
-
plugin2.manifest.description && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", plugin2.manifest.description),
|
|
74
|
-
componentCounts.length > 0 && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "Components: ", componentCounts.join(", ")),
|
|
75
|
-
/* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "Location:", " ", plugin2.source.type === "local" ? plugin2.source.path : plugin2.location)
|
|
76
|
-
);
|
|
77
|
-
}));
|
|
78
|
-
};
|
|
79
|
-
const PluginInfo = ({ pluginName, onDone }) => {
|
|
80
|
-
const [plugin2, setPlugin] = useState(null);
|
|
81
|
-
const [loading, setLoading] = useState(true);
|
|
82
|
-
const [error, setError] = useState(null);
|
|
83
|
-
const theme = getTheme();
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
try {
|
|
86
|
-
const loadedPlugin = getPlugin(pluginName);
|
|
87
|
-
if (!loadedPlugin) {
|
|
88
|
-
setError(`Plugin "${pluginName}" not found`);
|
|
89
|
-
} else {
|
|
90
|
-
setPlugin(loadedPlugin);
|
|
91
|
-
}
|
|
92
|
-
} catch (err) {
|
|
93
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
94
|
-
} finally {
|
|
95
|
-
setLoading(false);
|
|
96
|
-
onDone();
|
|
97
|
-
}
|
|
98
|
-
}, [pluginName, onDone]);
|
|
99
|
-
if (loading) {
|
|
100
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Loading plugin info...");
|
|
101
|
-
}
|
|
102
|
-
if (error || !plugin2) {
|
|
103
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.error }, "Error: ", error || "Plugin not found");
|
|
104
|
-
}
|
|
105
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { bold: true, underline: true, color: theme.success }, plugin2.manifest.displayName || plugin2.manifest.name), /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Name:"), " ", plugin2.manifest.name), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Version:"), " ", plugin2.manifest.version), plugin2.manifest.description && /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Description:"), " ", plugin2.manifest.description), plugin2.manifest.author && /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Author:"), " ", plugin2.manifest.author), plugin2.manifest.license && /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "License:"), " ", plugin2.manifest.license), plugin2.manifest.homepage && /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Homepage:"), " ", plugin2.manifest.homepage), plugin2.manifest.repository && /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Repository:"), " ", plugin2.manifest.repository), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Location:"), " ", plugin2.location), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Source:"), " ", plugin2.source.type), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Enabled:"), " ", plugin2.enabled ? "Yes" : "No")), /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.primary }, "Components:"), plugin2.agents.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "Agents (", plugin2.agents.length, "):"), plugin2.agents.map((agent) => /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "\u2022 ", agent.name, agent.config.description ? ` - ${agent.config.description}` : ""))), plugin2.commands.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "Commands (", plugin2.commands.length, "):"), plugin2.commands.map((command) => /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "\u2022 /", command.name, command.config.description ? ` - ${command.config.description}` : ""))), plugin2.skills.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "Skills (", plugin2.skills.length, "):"), plugin2.skills.map((skill) => /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "\u2022 ", skill.name, skill.config.description ? ` - ${skill.config.description}` : ""))), plugin2.hooks.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "Hooks (", plugin2.hooks.length, "):"), plugin2.hooks.map((hook) => /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "\u2022 ", hook.name, " (", hook.config.event, ")"))), plugin2.mcpServers.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "MCP Servers (", plugin2.mcpServers.length, "):"), plugin2.mcpServers.map((server) => /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "\u2022 ", server.name, " - ", server.config.command))), plugin2.agents.length === 0 && plugin2.commands.length === 0 && plugin2.skills.length === 0 && plugin2.hooks.length === 0 && plugin2.mcpServers.length === 0 && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " No components loaded"), plugin2.manifest.engines && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.primary }, "Requirements:"), plugin2.manifest.engines.minto && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "Minto: ", plugin2.manifest.engines.minto), plugin2.manifest.engines["claude-code"] && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "Claude Code: ", plugin2.manifest.engines["claude-code"]), plugin2.manifest.engines.node && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "Node: ", plugin2.manifest.engines.node)));
|
|
106
|
-
};
|
|
107
|
-
const PluginInstall = ({
|
|
108
|
-
pluginSpec,
|
|
109
|
-
onDone
|
|
110
|
-
}) => {
|
|
111
|
-
const [status, setStatus] = useState(
|
|
112
|
-
"installing"
|
|
113
|
-
);
|
|
114
|
-
const [message, setMessage] = useState("");
|
|
115
|
-
const [installedPath, setInstalledPath] = useState("");
|
|
116
|
-
const theme = getTheme();
|
|
117
|
-
useEffect(() => {
|
|
118
|
-
const installPlugin = async () => {
|
|
119
|
-
try {
|
|
120
|
-
const [pluginName, marketplaceName] = pluginSpec.split("@");
|
|
121
|
-
if (!pluginName) {
|
|
122
|
-
throw new Error("Plugin name is required");
|
|
123
|
-
}
|
|
124
|
-
setMessage(
|
|
125
|
-
`Installing plugin "${pluginName}"${marketplaceName ? ` from marketplace "${marketplaceName}"` : ""}...`
|
|
126
|
-
);
|
|
127
|
-
const path = await installPluginFromMarketplace(
|
|
128
|
-
pluginName,
|
|
129
|
-
marketplaceName
|
|
130
|
-
);
|
|
131
|
-
setInstalledPath(path);
|
|
132
|
-
setMessage(`Successfully installed "${pluginName}" to ${path}`);
|
|
133
|
-
setStatus("success");
|
|
134
|
-
} catch (err) {
|
|
135
|
-
if (err instanceof MarketplaceError) {
|
|
136
|
-
setMessage(`Installation failed: ${err.message}`);
|
|
137
|
-
} else {
|
|
138
|
-
setMessage(
|
|
139
|
-
`Installation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
setStatus("error");
|
|
143
|
-
} finally {
|
|
144
|
-
onDone();
|
|
145
|
-
}
|
|
146
|
-
};
|
|
147
|
-
installPlugin();
|
|
148
|
-
}, [pluginSpec, onDone]);
|
|
149
|
-
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
150
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color }, message), status === "success" && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Plugin is now available. Use /plugin info ", pluginSpec.split("@")[0], " ", "to see details.")));
|
|
151
|
-
};
|
|
152
|
-
const PluginUninstall = ({
|
|
153
|
-
pluginName,
|
|
154
|
-
onDone
|
|
155
|
-
}) => {
|
|
156
|
-
const [status, setStatus] = useState(
|
|
157
|
-
"uninstalling"
|
|
158
|
-
);
|
|
159
|
-
const [message, setMessage] = useState("");
|
|
160
|
-
const theme = getTheme();
|
|
161
|
-
useEffect(() => {
|
|
162
|
-
const uninstallPlugin2 = () => {
|
|
163
|
-
try {
|
|
164
|
-
setMessage(`Uninstalling plugin "${pluginName}"...`);
|
|
165
|
-
const plugin2 = getPlugin(pluginName);
|
|
166
|
-
if (!plugin2) {
|
|
167
|
-
throw new Error(`Plugin "${pluginName}" not found`);
|
|
168
|
-
}
|
|
169
|
-
rmSync(plugin2.location, { recursive: true, force: true });
|
|
170
|
-
setMessage(`Successfully uninstalled "${pluginName}"`);
|
|
171
|
-
setStatus("success");
|
|
172
|
-
} catch (err) {
|
|
173
|
-
setMessage(
|
|
174
|
-
`Uninstallation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
175
|
-
);
|
|
176
|
-
setStatus("error");
|
|
177
|
-
} finally {
|
|
178
|
-
onDone();
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
uninstallPlugin2();
|
|
182
|
-
}, [pluginName, onDone]);
|
|
183
|
-
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
184
|
-
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
185
|
-
};
|
|
186
|
-
const PluginValidate = ({
|
|
187
|
-
pluginName,
|
|
188
|
-
onDone
|
|
189
|
-
}) => {
|
|
190
|
-
const [results, setResults] = useState([]);
|
|
191
|
-
const [loading, setLoading] = useState(true);
|
|
192
|
-
const theme = getTheme();
|
|
193
|
-
useEffect(() => {
|
|
194
|
-
const validatePlugins = () => {
|
|
195
|
-
try {
|
|
196
|
-
const pluginsToValidate = pluginName ? [{ name: pluginName, path: "", manifest: void 0 }] : listPlugins();
|
|
197
|
-
const validationResults = pluginsToValidate.map(({ name, path }) => {
|
|
198
|
-
const errors = [];
|
|
199
|
-
try {
|
|
200
|
-
const plugin2 = getPlugin(name);
|
|
201
|
-
if (!plugin2) {
|
|
202
|
-
errors.push("Plugin not found");
|
|
203
|
-
return { plugin: name, valid: false, errors };
|
|
204
|
-
}
|
|
205
|
-
if (!plugin2.manifest.name)
|
|
206
|
-
errors.push("Missing required field: name");
|
|
207
|
-
if (!plugin2.manifest.version)
|
|
208
|
-
errors.push("Missing required field: version");
|
|
209
|
-
if (!plugin2.manifest.description)
|
|
210
|
-
errors.push("Missing required field: description");
|
|
211
|
-
if (plugin2.manifest.version && !/^\d+\.\d+\.\d+$/.test(plugin2.manifest.version)) {
|
|
212
|
-
errors.push("Invalid version format (must be semver: X.Y.Z)");
|
|
213
|
-
}
|
|
214
|
-
if (plugin2.manifest.name && !/^[a-z0-9-]+$/.test(plugin2.manifest.name)) {
|
|
215
|
-
errors.push(
|
|
216
|
-
"Invalid name format (must be lowercase alphanumeric with hyphens)"
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
const checkComponents = (items, type) => {
|
|
220
|
-
items.forEach((item) => {
|
|
221
|
-
if (!item.filePath) {
|
|
222
|
-
errors.push(`${type} "${item.name}" has no file path`);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
checkComponents(plugin2.agents, "Agent");
|
|
227
|
-
checkComponents(plugin2.commands, "Command");
|
|
228
|
-
checkComponents(plugin2.skills, "Skill");
|
|
229
|
-
return { plugin: name, valid: errors.length === 0, errors };
|
|
230
|
-
} catch (err) {
|
|
231
|
-
errors.push(err instanceof Error ? err.message : String(err));
|
|
232
|
-
return { plugin: name, valid: false, errors };
|
|
233
|
-
}
|
|
234
|
-
});
|
|
235
|
-
setResults(validationResults);
|
|
236
|
-
} finally {
|
|
237
|
-
setLoading(false);
|
|
238
|
-
onDone();
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
validatePlugins();
|
|
242
|
-
}, [pluginName, onDone]);
|
|
243
|
-
if (loading) {
|
|
244
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Validating plugins...");
|
|
245
|
-
}
|
|
246
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { bold: true, underline: true, color: theme.primary }, "Plugin Validation Results"), /* @__PURE__ */ React.createElement(Text, null, ""), results.map((result) => /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: result.valid ? theme.success : theme.error }, result.valid ? "\u2713" : "\u2717"), /* @__PURE__ */ React.createElement(Text, null, " ", result.plugin), result.valid && /* @__PURE__ */ React.createElement(Text, { color: theme.success }, " - Valid")), result.errors.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginLeft: 2 }, result.errors.map((error, idx) => /* @__PURE__ */ React.createElement(Text, { color: theme.error }, "\u2022 ", error))))));
|
|
247
|
-
};
|
|
248
|
-
const PluginSync = ({
|
|
249
|
-
onDone,
|
|
250
|
-
force = false,
|
|
251
|
-
clean = false,
|
|
252
|
-
dryRun = false
|
|
253
|
-
}) => {
|
|
254
|
-
const [status, setStatus] = useState("syncing");
|
|
255
|
-
const [progress, setProgress] = useState(t("commands.plugin.syncStarting"));
|
|
256
|
-
const [result, setResult] = useState(null);
|
|
257
|
-
const [error, setError] = useState(null);
|
|
258
|
-
const theme = getTheme();
|
|
259
|
-
useEffect(() => {
|
|
260
|
-
const doSync = async () => {
|
|
261
|
-
if (!hasClaudeCodeInstallation()) {
|
|
262
|
-
setError(t("commands.plugin.syncNotFound"));
|
|
263
|
-
setStatus("error");
|
|
264
|
-
onDone();
|
|
265
|
-
return;
|
|
266
|
-
}
|
|
267
|
-
try {
|
|
268
|
-
const syncResult = await syncFromClaudeCode({
|
|
269
|
-
force,
|
|
270
|
-
clean,
|
|
271
|
-
dryRun,
|
|
272
|
-
onProgress: (msg) => setProgress(msg)
|
|
273
|
-
});
|
|
274
|
-
setResult(syncResult);
|
|
275
|
-
setStatus("done");
|
|
276
|
-
} catch (err) {
|
|
277
|
-
setError(err instanceof Error ? err.message : String(err));
|
|
278
|
-
setStatus("error");
|
|
279
|
-
} finally {
|
|
280
|
-
onDone();
|
|
281
|
-
}
|
|
282
|
-
};
|
|
283
|
-
doSync();
|
|
284
|
-
}, [force, clean, dryRun, onDone]);
|
|
285
|
-
if (status === "error") {
|
|
286
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.error }, error);
|
|
287
|
-
}
|
|
288
|
-
if (status === "syncing") {
|
|
289
|
-
return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(SimpleSpinner, null), /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, " ", progress));
|
|
290
|
-
}
|
|
291
|
-
if (!result) return null;
|
|
292
|
-
const hasChanges = result.installed.length > 0 || result.updated.length > 0 || result.cleaned.length > 0 || result.marketplaces.registered.length > 0;
|
|
293
|
-
if (!hasChanges && result.failed.length === 0) {
|
|
294
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.success }, t("commands.plugin.syncNoChanges"));
|
|
295
|
-
}
|
|
296
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, dryRun && /* @__PURE__ */ React.createElement(Text, { color: theme.warning, bold: true }, t("commands.plugin.syncDryRun")), result.installed.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "Installed (", result.installed.length, "):"), result.installed.map((name) => /* @__PURE__ */ React.createElement(Box, { key: name }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " + ", name)))), result.updated.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Updated (", result.updated.length, "):"), result.updated.map((name) => /* @__PURE__ */ React.createElement(Box, { key: name }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ~ ", name)))), result.cleaned.length > 0 && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, t("commands.plugin.syncCleaned").replace(
|
|
297
|
-
"${count}",
|
|
298
|
-
String(result.cleaned.length)
|
|
299
|
-
)), result.marketplaces.registered.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, t("commands.plugin.syncMarketplacesRegistered").replace(
|
|
300
|
-
"${count}",
|
|
301
|
-
String(result.marketplaces.registered.length)
|
|
302
|
-
)), result.marketplaces.registered.map((name) => /* @__PURE__ */ React.createElement(Box, { key: name }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " + ", name)))), result.marketplaces.failed.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.error }, t("commands.plugin.syncMarketplacesFailed").replace(
|
|
303
|
-
"${count}",
|
|
304
|
-
String(result.marketplaces.failed.length)
|
|
305
|
-
)), result.marketplaces.failed.map((f) => /* @__PURE__ */ React.createElement(Box, { key: f.name }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "! ", f.name, ": ", f.error)))), result.failed.length > 0 && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.error }, t("commands.plugin.syncFailed").replace(
|
|
306
|
-
"${count}",
|
|
307
|
-
String(result.failed.length)
|
|
308
|
-
)), result.failed.map((f) => /* @__PURE__ */ React.createElement(Box, { key: f.name }, /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "! ", f.name, ": ", f.error)))), /* @__PURE__ */ React.createElement(Text, { color: theme.success }, t("commands.plugin.syncComplete").replace("${installed}", String(result.installed.length)).replace("${updated}", String(result.updated.length)).replace("${skipped}", String(result.skipped.length))));
|
|
309
|
-
};
|
|
310
|
-
const MarketplaceListView = ({ onDone }) => {
|
|
311
|
-
const [marketplaces, setMarketplaces] = useState([]);
|
|
312
|
-
const [loading, setLoading] = useState(true);
|
|
313
|
-
const theme = getTheme();
|
|
314
|
-
useEffect(() => {
|
|
315
|
-
try {
|
|
316
|
-
const registered = listMarketplaces();
|
|
317
|
-
setMarketplaces(registered);
|
|
318
|
-
} finally {
|
|
319
|
-
setLoading(false);
|
|
320
|
-
onDone();
|
|
321
|
-
}
|
|
322
|
-
}, [onDone]);
|
|
323
|
-
if (loading) {
|
|
324
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.primary }, "Loading marketplaces...");
|
|
325
|
-
}
|
|
326
|
-
if (marketplaces.length === 0) {
|
|
327
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, "No marketplaces registered."), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Register a marketplace with: /plugin marketplace add <source>"));
|
|
328
|
-
}
|
|
329
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { bold: true, underline: true, color: theme.success }, "Registered Marketplaces (", marketplaces.length, ")"), /* @__PURE__ */ React.createElement(Text, null, ""), marketplaces.map((marketplace) => /* @__PURE__ */ React.createElement(Box, { key: marketplace.name, flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary, bold: true }, marketplace.name), !marketplace.enabled && /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, " (disabled)")), marketplace.manifest.metadata?.description && /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", marketplace.manifest.metadata.description), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, ` Plugins: ${marketplace.manifest.plugins.length}`, ` | Owner: ${marketplace.manifest.owner.name}`), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, ` Source: ${marketplace.source.type}`, marketplace.source.type === "github" && ` (${marketplace.source.repo})`, marketplace.source.type === "url" && ` (${marketplace.source.url})`, marketplace.source.type === "local" && ` (${marketplace.source.path})`), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, ` Last updated: ${new Date(marketplace.lastUpdated).toLocaleString()}`))));
|
|
330
|
-
};
|
|
331
|
-
const MarketplaceAdd = ({ source, onDone }) => {
|
|
332
|
-
const [status, setStatus] = useState("adding");
|
|
333
|
-
const [message, setMessage] = useState("");
|
|
334
|
-
const [marketplace, setMarketplace] = useState(
|
|
335
|
-
null
|
|
336
|
-
);
|
|
337
|
-
const theme = getTheme();
|
|
338
|
-
useEffect(() => {
|
|
339
|
-
const addMarketplaceAsync = async () => {
|
|
340
|
-
try {
|
|
341
|
-
setMessage(`Registering marketplace from "${source}"...`);
|
|
342
|
-
const registered = await addMarketplace(source);
|
|
343
|
-
setMarketplace(registered);
|
|
344
|
-
setMessage(`Successfully registered marketplace "${registered.name}"`);
|
|
345
|
-
setStatus("success");
|
|
346
|
-
} catch (err) {
|
|
347
|
-
if (err instanceof MarketplaceError) {
|
|
348
|
-
setMessage(`Registration failed: ${err.message}`);
|
|
349
|
-
} else {
|
|
350
|
-
setMessage(
|
|
351
|
-
`Registration failed: ${err instanceof Error ? err.message : String(err)}`
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
|
-
setStatus("error");
|
|
355
|
-
} finally {
|
|
356
|
-
onDone();
|
|
357
|
-
}
|
|
358
|
-
};
|
|
359
|
-
addMarketplaceAsync();
|
|
360
|
-
}, [source, onDone]);
|
|
361
|
-
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
362
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color }, message), status === "success" && marketplace && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Marketplace contains ", marketplace.manifest.plugins.length, " plugin(s)"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Use /plugin marketplace list to see all marketplaces")));
|
|
363
|
-
};
|
|
364
|
-
const MarketplaceUpdate = ({
|
|
365
|
-
name,
|
|
366
|
-
onDone
|
|
367
|
-
}) => {
|
|
368
|
-
const [status, setStatus] = useState(
|
|
369
|
-
"updating"
|
|
370
|
-
);
|
|
371
|
-
const [message, setMessage] = useState("");
|
|
372
|
-
const theme = getTheme();
|
|
373
|
-
useEffect(() => {
|
|
374
|
-
const updateMarketplaceAsync = async () => {
|
|
375
|
-
try {
|
|
376
|
-
setMessage(`Updating marketplace "${name}"...`);
|
|
377
|
-
await updateMarketplace(name);
|
|
378
|
-
setMessage(`Successfully updated marketplace "${name}"`);
|
|
379
|
-
setStatus("success");
|
|
380
|
-
} catch (err) {
|
|
381
|
-
if (err instanceof MarketplaceError) {
|
|
382
|
-
setMessage(`Update failed: ${err.message}`);
|
|
383
|
-
} else {
|
|
384
|
-
setMessage(
|
|
385
|
-
`Update failed: ${err instanceof Error ? err.message : String(err)}`
|
|
386
|
-
);
|
|
387
|
-
}
|
|
388
|
-
setStatus("error");
|
|
389
|
-
} finally {
|
|
390
|
-
onDone();
|
|
391
|
-
}
|
|
392
|
-
};
|
|
393
|
-
updateMarketplaceAsync();
|
|
394
|
-
}, [name, onDone]);
|
|
395
|
-
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
396
|
-
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
397
|
-
};
|
|
398
|
-
const MarketplaceRemove = ({
|
|
399
|
-
name,
|
|
400
|
-
onDone
|
|
401
|
-
}) => {
|
|
402
|
-
const [status, setStatus] = useState(
|
|
403
|
-
"removing"
|
|
404
|
-
);
|
|
405
|
-
const [message, setMessage] = useState("");
|
|
406
|
-
const theme = getTheme();
|
|
407
|
-
useEffect(() => {
|
|
408
|
-
const removeMarketplaceSync = () => {
|
|
409
|
-
try {
|
|
410
|
-
setMessage(`Removing marketplace "${name}"...`);
|
|
411
|
-
removeMarketplace(name);
|
|
412
|
-
setMessage(`Successfully removed marketplace "${name}"`);
|
|
413
|
-
setStatus("success");
|
|
414
|
-
} catch (err) {
|
|
415
|
-
if (err instanceof MarketplaceError) {
|
|
416
|
-
setMessage(`Removal failed: ${err.message}`);
|
|
417
|
-
} else {
|
|
418
|
-
setMessage(
|
|
419
|
-
`Removal failed: ${err instanceof Error ? err.message : String(err)}`
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
setStatus("error");
|
|
423
|
-
} finally {
|
|
424
|
-
onDone();
|
|
425
|
-
}
|
|
426
|
-
};
|
|
427
|
-
removeMarketplaceSync();
|
|
428
|
-
}, [name, onDone]);
|
|
429
|
-
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
430
|
-
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
431
|
-
};
|
|
432
|
-
const ErrorMessage = ({
|
|
433
|
-
message,
|
|
434
|
-
onDone
|
|
435
|
-
}) => {
|
|
436
|
-
const theme = getTheme();
|
|
437
|
-
React.useEffect(() => {
|
|
438
|
-
onDone();
|
|
439
|
-
}, [onDone]);
|
|
440
|
-
return /* @__PURE__ */ React.createElement(Text, { color: theme.error }, "Error: ", message);
|
|
441
|
-
};
|
|
442
|
-
function compareVersions(installedVersion, marketplaceVersion) {
|
|
443
|
-
if (!installedVersion || !marketplaceVersion) return null;
|
|
444
|
-
if (!semverValid(installedVersion) || !semverValid(marketplaceVersion))
|
|
445
|
-
return null;
|
|
446
|
-
try {
|
|
447
|
-
return {
|
|
448
|
-
hasUpdate: semverGt(marketplaceVersion, installedVersion),
|
|
449
|
-
installed: installedVersion,
|
|
450
|
-
available: marketplaceVersion
|
|
451
|
-
};
|
|
452
|
-
} catch {
|
|
453
|
-
return null;
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
const InteractivePluginCommand = ({
|
|
457
|
-
onDone
|
|
458
|
-
}) => {
|
|
459
|
-
const [phase, setPhase] = useState({ type: "main" });
|
|
460
|
-
const [activeTab, setActiveTab] = useState("browse");
|
|
461
|
-
const [searchQuery, setSearchQuery] = useState("");
|
|
462
|
-
const [statusOverlay, setStatusOverlay] = useState(null);
|
|
463
|
-
const [marketplaces, setMarketplaces] = useState([]);
|
|
464
|
-
const [installedPlugins, setInstalledPlugins] = useState([]);
|
|
465
|
-
const [selectedIds, setSelectedIds] = useState(/* @__PURE__ */ new Set());
|
|
466
|
-
const reload = useCallback(() => {
|
|
467
|
-
try {
|
|
468
|
-
setMarketplaces(listMarketplaces());
|
|
469
|
-
} catch {
|
|
470
|
-
setMarketplaces([]);
|
|
471
|
-
}
|
|
472
|
-
try {
|
|
473
|
-
setInstalledPlugins(loadAllPlugins());
|
|
474
|
-
} catch {
|
|
475
|
-
setInstalledPlugins([]);
|
|
476
|
-
}
|
|
477
|
-
}, []);
|
|
478
|
-
useEffect(() => {
|
|
479
|
-
if (phase.type === "main") {
|
|
480
|
-
reload();
|
|
481
|
-
setSearchQuery("");
|
|
482
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
483
|
-
}
|
|
484
|
-
}, [phase, reload]);
|
|
485
|
-
const installedNames = useMemo(
|
|
486
|
-
() => new Set(installedPlugins.map((p) => p.name)),
|
|
487
|
-
[installedPlugins]
|
|
488
|
-
);
|
|
489
|
-
const findPluginMarketplace = useCallback(
|
|
490
|
-
(pluginName) => {
|
|
491
|
-
for (const m of marketplaces) {
|
|
492
|
-
if (m.manifest.plugins.some((p) => p.name === pluginName)) {
|
|
493
|
-
return m.name;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
return void 0;
|
|
497
|
-
},
|
|
498
|
-
[marketplaces]
|
|
499
|
-
);
|
|
500
|
-
const multiSelectActionLabel = useMemo(() => {
|
|
501
|
-
if (phase.type !== "main" || selectedIds.size === 0) return void 0;
|
|
502
|
-
if (activeTab === "browse" || activeTab === "installed") {
|
|
503
|
-
return `${t("commands.plugin.batchAction")} (${selectedIds.size})`;
|
|
504
|
-
}
|
|
505
|
-
return void 0;
|
|
506
|
-
}, [phase, activeTab, selectedIds.size]);
|
|
507
|
-
const multiSelectEnabled = phase.type === "main" && (activeTab === "browse" || activeTab === "installed");
|
|
508
|
-
const { tabs, items, title, footerHint, searchEnabled, searchPlaceholder } = useMemo(() => {
|
|
509
|
-
switch (phase.type) {
|
|
510
|
-
case "main": {
|
|
511
|
-
const mainTabs = [
|
|
512
|
-
{ id: "browse", label: t("commands.plugin.tabBrowse") },
|
|
513
|
-
{ id: "installed", label: t("commands.plugin.tabInstalled") },
|
|
514
|
-
{ id: "marketplaces", label: t("commands.plugin.tabMarketplaces") }
|
|
515
|
-
];
|
|
516
|
-
let mainItems = [];
|
|
517
|
-
if (activeTab === "browse") {
|
|
518
|
-
for (const m of marketplaces) {
|
|
519
|
-
for (const p of m.manifest.plugins) {
|
|
520
|
-
const installed = installedPlugins.find(
|
|
521
|
-
(ip) => ip.name === p.name
|
|
522
|
-
);
|
|
523
|
-
let metadata;
|
|
524
|
-
if (installed) {
|
|
525
|
-
const versionInfo = compareVersions(
|
|
526
|
-
installed.manifest.version,
|
|
527
|
-
p.version
|
|
528
|
-
);
|
|
529
|
-
if (versionInfo?.hasUpdate) {
|
|
530
|
-
metadata = t("commands.plugin.updateAvailable").replace("{installed}", versionInfo.installed).replace("{available}", versionInfo.available);
|
|
531
|
-
} else {
|
|
532
|
-
metadata = "installed";
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
mainItems.push({
|
|
536
|
-
id: `${m.name}:${p.name}`,
|
|
537
|
-
label: p.name,
|
|
538
|
-
description: p.description || "",
|
|
539
|
-
category: m.name,
|
|
540
|
-
status: installedNames.has(p.name) ? "enabled" : void 0,
|
|
541
|
-
metadata,
|
|
542
|
-
data: { pluginName: p.name, marketplaceName: m.name }
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
} else if (activeTab === "installed") {
|
|
547
|
-
for (const p of installedPlugins) {
|
|
548
|
-
const mName = p.source.type === "claude-code" ? p.source.marketplace : p.source.type === "marketplace" ? p.source.marketplace : findPluginMarketplace(p.name);
|
|
549
|
-
const sourceTag = p.source.type === "claude-code" ? " [CC]" : "";
|
|
550
|
-
mainItems.push({
|
|
551
|
-
id: p.name,
|
|
552
|
-
label: `${p.manifest.displayName || p.name}${sourceTag}`,
|
|
553
|
-
description: p.manifest.description || "",
|
|
554
|
-
status: p.enabled ? "enabled" : "disabled",
|
|
555
|
-
category: mName || t("commands.plugin.local"),
|
|
556
|
-
data: { pluginName: p.name, source: p.source }
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
} else if (activeTab === "marketplaces") {
|
|
560
|
-
for (const m of marketplaces) {
|
|
561
|
-
mainItems.push({
|
|
562
|
-
id: m.name,
|
|
563
|
-
label: m.name,
|
|
564
|
-
description: `${m.manifest.plugins.length} plugins \xB7 ${formatMarketplacePath(m.source)} \xB7 ${formatTimeAgo(m.lastUpdated)}`,
|
|
565
|
-
status: m.enabled ? "enabled" : "disabled",
|
|
566
|
-
data: { marketplaceName: m.name }
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
mainItems.push({
|
|
570
|
-
id: "add-new",
|
|
571
|
-
label: `+ ${t("commands.plugin.addMarketplace")}`,
|
|
572
|
-
description: "Register a new plugin marketplace"
|
|
573
|
-
});
|
|
574
|
-
}
|
|
575
|
-
const isMultiSelectTab = activeTab === "browse" || activeTab === "installed";
|
|
576
|
-
return {
|
|
577
|
-
tabs: mainTabs,
|
|
578
|
-
items: mainItems,
|
|
579
|
-
title: "Plugins",
|
|
580
|
-
footerHint: isMultiSelectTab ? t("commands.plugin.footerHintMultiSelect") : t("commands.plugin.footerHint"),
|
|
581
|
-
searchEnabled: true,
|
|
582
|
-
searchPlaceholder: void 0
|
|
583
|
-
};
|
|
584
|
-
}
|
|
585
|
-
case "plugin-actions": {
|
|
586
|
-
const actionItems = [];
|
|
587
|
-
if (phase.from === "browse") {
|
|
588
|
-
actionItems.push({
|
|
589
|
-
id: "install",
|
|
590
|
-
label: t("commands.plugin.install"),
|
|
591
|
-
description: `Install from ${phase.marketplace || "marketplace"}`
|
|
592
|
-
});
|
|
593
|
-
} else {
|
|
594
|
-
const plugin2 = installedPlugins.find((p) => p.name === phase.plugin);
|
|
595
|
-
const isEnabled = plugin2?.enabled ?? true;
|
|
596
|
-
actionItems.push({
|
|
597
|
-
id: "toggle",
|
|
598
|
-
label: isEnabled ? t("commands.plugin.disable") : t("commands.plugin.enable"),
|
|
599
|
-
description: isEnabled ? "Disable this plugin" : "Enable this plugin"
|
|
600
|
-
});
|
|
601
|
-
if (phase.marketplace) {
|
|
602
|
-
actionItems.push({
|
|
603
|
-
id: "update",
|
|
604
|
-
label: t("commands.plugin.update"),
|
|
605
|
-
description: "Re-install from marketplace source"
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
actionItems.push({
|
|
609
|
-
id: "uninstall",
|
|
610
|
-
label: t("commands.plugin.uninstall"),
|
|
611
|
-
description: "Remove this plugin"
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
actionItems.push({
|
|
615
|
-
id: "back",
|
|
616
|
-
label: t("commands.plugin.back")
|
|
617
|
-
});
|
|
618
|
-
return {
|
|
619
|
-
tabs: [
|
|
620
|
-
{ id: "actions", label: t("commands.plugin.actions") }
|
|
621
|
-
],
|
|
622
|
-
items: actionItems,
|
|
623
|
-
title: phase.plugin,
|
|
624
|
-
footerHint: "\u2191\u2193 Navigate \xB7 Enter Select \xB7 Esc Back",
|
|
625
|
-
searchEnabled: false,
|
|
626
|
-
searchPlaceholder: void 0
|
|
627
|
-
};
|
|
628
|
-
}
|
|
629
|
-
case "marketplace-actions": {
|
|
630
|
-
const mActionItems = [
|
|
631
|
-
{
|
|
632
|
-
id: "update",
|
|
633
|
-
label: t("commands.plugin.marketplaceUpdate"),
|
|
634
|
-
description: "Re-fetch marketplace manifest"
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
id: "browse",
|
|
638
|
-
label: t("commands.plugin.browsePlugins"),
|
|
639
|
-
description: "View plugins from this marketplace"
|
|
640
|
-
},
|
|
641
|
-
{
|
|
642
|
-
id: "remove",
|
|
643
|
-
label: t("commands.plugin.marketplaceRemove"),
|
|
644
|
-
description: "Unregister this marketplace"
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
id: "back",
|
|
648
|
-
label: t("commands.plugin.back")
|
|
649
|
-
}
|
|
650
|
-
];
|
|
651
|
-
return {
|
|
652
|
-
tabs: [
|
|
653
|
-
{ id: "actions", label: t("commands.plugin.actions") }
|
|
654
|
-
],
|
|
655
|
-
items: mActionItems,
|
|
656
|
-
title: phase.marketplace,
|
|
657
|
-
footerHint: "\u2191\u2193 Navigate \xB7 Enter Select \xB7 Esc Back",
|
|
658
|
-
searchEnabled: false,
|
|
659
|
-
searchPlaceholder: void 0
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
case "batch-action-picker": {
|
|
663
|
-
const pickerItems = [];
|
|
664
|
-
const sel = phase.selectedItems;
|
|
665
|
-
if (phase.from === "installed") {
|
|
666
|
-
const updatableCount = sel.filter((item) => {
|
|
667
|
-
const pluginName = item.data?.pluginName;
|
|
668
|
-
return findPluginMarketplace(pluginName) !== void 0;
|
|
669
|
-
}).length;
|
|
670
|
-
if (updatableCount > 0) {
|
|
671
|
-
pickerItems.push({
|
|
672
|
-
id: "batch-update",
|
|
673
|
-
label: t("commands.plugin.batchUpdateAction").replace(
|
|
674
|
-
"{count}",
|
|
675
|
-
String(updatableCount)
|
|
676
|
-
)
|
|
677
|
-
});
|
|
678
|
-
}
|
|
679
|
-
pickerItems.push({
|
|
680
|
-
id: "batch-uninstall",
|
|
681
|
-
label: t("commands.plugin.batchDeleteAction").replace(
|
|
682
|
-
"{count}",
|
|
683
|
-
String(sel.length)
|
|
684
|
-
)
|
|
685
|
-
});
|
|
686
|
-
const disabledCount = sel.filter((item) => {
|
|
687
|
-
const plugin2 = installedPlugins.find(
|
|
688
|
-
(p) => p.name === item.data?.pluginName
|
|
689
|
-
);
|
|
690
|
-
return plugin2 && !plugin2.enabled;
|
|
691
|
-
}).length;
|
|
692
|
-
if (disabledCount > 0) {
|
|
693
|
-
pickerItems.push({
|
|
694
|
-
id: "batch-enable",
|
|
695
|
-
label: t("commands.plugin.batchEnableAction").replace(
|
|
696
|
-
"{count}",
|
|
697
|
-
String(disabledCount)
|
|
698
|
-
)
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
const enabledCount = sel.filter((item) => {
|
|
702
|
-
const plugin2 = installedPlugins.find(
|
|
703
|
-
(p) => p.name === item.data?.pluginName
|
|
704
|
-
);
|
|
705
|
-
return plugin2 && plugin2.enabled;
|
|
706
|
-
}).length;
|
|
707
|
-
if (enabledCount > 0) {
|
|
708
|
-
pickerItems.push({
|
|
709
|
-
id: "batch-disable",
|
|
710
|
-
label: t("commands.plugin.batchDisableAction").replace(
|
|
711
|
-
"{count}",
|
|
712
|
-
String(enabledCount)
|
|
713
|
-
)
|
|
714
|
-
});
|
|
715
|
-
}
|
|
716
|
-
} else {
|
|
717
|
-
const notInstalledCount = sel.filter(
|
|
718
|
-
(item) => !installedNames.has(item.data?.pluginName)
|
|
719
|
-
).length;
|
|
720
|
-
if (notInstalledCount > 0) {
|
|
721
|
-
pickerItems.push({
|
|
722
|
-
id: "batch-install",
|
|
723
|
-
label: t("commands.plugin.batchInstallAction").replace(
|
|
724
|
-
"{count}",
|
|
725
|
-
String(notInstalledCount)
|
|
726
|
-
)
|
|
727
|
-
});
|
|
728
|
-
}
|
|
729
|
-
const alreadyInstalledCount = sel.filter(
|
|
730
|
-
(item) => installedNames.has(item.data?.pluginName)
|
|
731
|
-
).length;
|
|
732
|
-
if (alreadyInstalledCount > 0) {
|
|
733
|
-
pickerItems.push({
|
|
734
|
-
id: "batch-update",
|
|
735
|
-
label: t("commands.plugin.batchUpdateAction").replace(
|
|
736
|
-
"{count}",
|
|
737
|
-
String(alreadyInstalledCount)
|
|
738
|
-
)
|
|
739
|
-
});
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
pickerItems.push({
|
|
743
|
-
id: "back",
|
|
744
|
-
label: t("commands.plugin.back")
|
|
745
|
-
});
|
|
746
|
-
return {
|
|
747
|
-
tabs: [
|
|
748
|
-
{
|
|
749
|
-
id: "actions",
|
|
750
|
-
label: t("commands.plugin.batchActionPickerTitle")
|
|
751
|
-
}
|
|
752
|
-
],
|
|
753
|
-
items: pickerItems,
|
|
754
|
-
title: t("commands.plugin.batchActionPickerTitle"),
|
|
755
|
-
footerHint: "\u2191\u2193 Navigate \xB7 Enter Select \xB7 Esc Back",
|
|
756
|
-
searchEnabled: false,
|
|
757
|
-
searchPlaceholder: void 0
|
|
758
|
-
};
|
|
759
|
-
}
|
|
760
|
-
case "batch-progress": {
|
|
761
|
-
return {
|
|
762
|
-
tabs: [
|
|
763
|
-
{ id: "progress", label: t("common.loading") }
|
|
764
|
-
],
|
|
765
|
-
items: [],
|
|
766
|
-
title: "Plugins",
|
|
767
|
-
footerHint: "",
|
|
768
|
-
searchEnabled: false,
|
|
769
|
-
searchPlaceholder: void 0
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
case "add-marketplace": {
|
|
773
|
-
const helpItems = [
|
|
774
|
-
{
|
|
775
|
-
id: "example-github",
|
|
776
|
-
label: "owner/repo",
|
|
777
|
-
description: "GitHub shorthand"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
id: "example-https",
|
|
781
|
-
label: "https://github.com/owner/repo.git",
|
|
782
|
-
description: "HTTPS URL"
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
id: "example-local",
|
|
786
|
-
label: "./path/to/local",
|
|
787
|
-
description: "Local path"
|
|
788
|
-
}
|
|
789
|
-
];
|
|
790
|
-
return {
|
|
791
|
-
tabs: [
|
|
792
|
-
{
|
|
793
|
-
id: "add",
|
|
794
|
-
label: t("commands.plugin.marketplaceAdd")
|
|
795
|
-
}
|
|
796
|
-
],
|
|
797
|
-
items: helpItems,
|
|
798
|
-
title: t("commands.plugin.addMarketplace"),
|
|
799
|
-
footerHint: t("commands.plugin.addFooterHint"),
|
|
800
|
-
searchEnabled: true,
|
|
801
|
-
searchPlaceholder: t("commands.plugin.addMarketplacePlaceholder")
|
|
802
|
-
};
|
|
803
|
-
}
|
|
804
|
-
default:
|
|
805
|
-
return {
|
|
806
|
-
tabs: [],
|
|
807
|
-
items: [],
|
|
808
|
-
title: "",
|
|
809
|
-
footerHint: "",
|
|
810
|
-
searchEnabled: false,
|
|
811
|
-
searchPlaceholder: void 0
|
|
812
|
-
};
|
|
813
|
-
}
|
|
814
|
-
}, [
|
|
815
|
-
phase,
|
|
816
|
-
activeTab,
|
|
817
|
-
marketplaces,
|
|
818
|
-
installedPlugins,
|
|
819
|
-
installedNames,
|
|
820
|
-
findPluginMarketplace
|
|
821
|
-
]);
|
|
822
|
-
const handleTabChange = useCallback((tabId) => {
|
|
823
|
-
setActiveTab(tabId);
|
|
824
|
-
setSearchQuery("");
|
|
825
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
826
|
-
}, []);
|
|
827
|
-
const handleSelectionChange = useCallback(
|
|
828
|
-
(itemId, selected) => {
|
|
829
|
-
setSelectedIds((prev) => {
|
|
830
|
-
const next = new Set(prev);
|
|
831
|
-
if (selected) {
|
|
832
|
-
next.add(itemId);
|
|
833
|
-
} else {
|
|
834
|
-
next.delete(itemId);
|
|
835
|
-
}
|
|
836
|
-
return next;
|
|
837
|
-
});
|
|
838
|
-
},
|
|
839
|
-
[]
|
|
840
|
-
);
|
|
841
|
-
const handleMultiSelect = useCallback(
|
|
842
|
-
(selectedItems) => {
|
|
843
|
-
if (activeTab === "browse" || activeTab === "installed") {
|
|
844
|
-
setPhase({
|
|
845
|
-
type: "batch-action-picker",
|
|
846
|
-
selectedItems,
|
|
847
|
-
from: activeTab
|
|
848
|
-
});
|
|
849
|
-
}
|
|
850
|
-
},
|
|
851
|
-
[activeTab]
|
|
852
|
-
);
|
|
853
|
-
useEffect(() => {
|
|
854
|
-
if (phase.type !== "batch-progress") return void 0;
|
|
855
|
-
let cancelled = false;
|
|
856
|
-
const { action, plugins } = phase;
|
|
857
|
-
const executeBatch = async () => {
|
|
858
|
-
let successCount = 0;
|
|
859
|
-
let failCount = 0;
|
|
860
|
-
const errors = [];
|
|
861
|
-
for (let i = 0; i < plugins.length; i++) {
|
|
862
|
-
if (cancelled) return;
|
|
863
|
-
const plugin2 = plugins[i];
|
|
864
|
-
const progressKey = action === "install" ? "commands.plugin.batchInstalling" : action === "update" ? "commands.plugin.batchUpdating" : "commands.plugin.batchUninstalling";
|
|
865
|
-
setStatusOverlay({
|
|
866
|
-
type: "loading",
|
|
867
|
-
message: t(progressKey).replace("{current}", String(i + 1)).replace("{total}", String(plugins.length)).replace("{name}", plugin2.name)
|
|
868
|
-
});
|
|
869
|
-
try {
|
|
870
|
-
if (action === "uninstall") {
|
|
871
|
-
await uninstallPlugin(plugin2.name);
|
|
872
|
-
} else {
|
|
873
|
-
await installPluginFromMarketplace(plugin2.name, plugin2.marketplace);
|
|
874
|
-
}
|
|
875
|
-
successCount++;
|
|
876
|
-
} catch (err) {
|
|
877
|
-
failCount++;
|
|
878
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
879
|
-
if (errors.length < 3) {
|
|
880
|
-
errors.push(`${plugin2.name}: ${msg}`);
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
if (cancelled) return;
|
|
885
|
-
const parts = [];
|
|
886
|
-
if (successCount > 0) {
|
|
887
|
-
const countKey = action === "install" ? "commands.plugin.batchInstalledCount" : action === "update" ? "commands.plugin.batchUpdatedCount" : "commands.plugin.batchUninstalledCount";
|
|
888
|
-
parts.push(t(countKey).replace("{count}", String(successCount)));
|
|
889
|
-
}
|
|
890
|
-
if (failCount > 0) {
|
|
891
|
-
parts.push(
|
|
892
|
-
t("commands.plugin.batchFailedCount").replace(
|
|
893
|
-
"{count}",
|
|
894
|
-
String(failCount)
|
|
895
|
-
)
|
|
896
|
-
);
|
|
897
|
-
if (errors.length > 0) {
|
|
898
|
-
parts.push(errors.join("\n"));
|
|
899
|
-
}
|
|
900
|
-
}
|
|
901
|
-
setStatusOverlay({
|
|
902
|
-
type: failCount === 0 ? "success" : "error",
|
|
903
|
-
message: parts.join("\n")
|
|
904
|
-
});
|
|
905
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
906
|
-
};
|
|
907
|
-
executeBatch();
|
|
908
|
-
return () => {
|
|
909
|
-
cancelled = true;
|
|
910
|
-
};
|
|
911
|
-
}, [phase]);
|
|
912
|
-
const handleStatusDismiss = useCallback(() => {
|
|
913
|
-
setStatusOverlay(null);
|
|
914
|
-
setPhase({ type: "main" });
|
|
915
|
-
}, []);
|
|
916
|
-
const handleBack = useCallback(() => {
|
|
917
|
-
if (statusOverlay && statusOverlay.type !== "loading") {
|
|
918
|
-
handleStatusDismiss();
|
|
919
|
-
return;
|
|
920
|
-
}
|
|
921
|
-
if (phase.type === "main") {
|
|
922
|
-
onDone();
|
|
923
|
-
} else {
|
|
924
|
-
setPhase({ type: "main" });
|
|
925
|
-
setSearchQuery("");
|
|
926
|
-
}
|
|
927
|
-
}, [phase, statusOverlay, onDone, handleStatusDismiss]);
|
|
928
|
-
const handleClose = useCallback(() => {
|
|
929
|
-
if (statusOverlay && statusOverlay.type !== "loading") {
|
|
930
|
-
handleStatusDismiss();
|
|
931
|
-
return;
|
|
932
|
-
}
|
|
933
|
-
if (phase.type === "main") {
|
|
934
|
-
onDone();
|
|
935
|
-
} else {
|
|
936
|
-
setPhase({ type: "main" });
|
|
937
|
-
setSearchQuery("");
|
|
938
|
-
}
|
|
939
|
-
}, [phase, statusOverlay, onDone, handleStatusDismiss]);
|
|
940
|
-
const handleSearchSubmit = useCallback(
|
|
941
|
-
async (query) => {
|
|
942
|
-
if (phase.type !== "add-marketplace" || !query.trim()) return;
|
|
943
|
-
setStatusOverlay({
|
|
944
|
-
type: "loading",
|
|
945
|
-
message: t("commands.plugin.marketplaceAdding")
|
|
946
|
-
});
|
|
947
|
-
try {
|
|
948
|
-
await addMarketplace(query.trim());
|
|
949
|
-
setStatusOverlay({
|
|
950
|
-
type: "success",
|
|
951
|
-
message: t("commands.plugin.marketplaceAddSuccess")
|
|
952
|
-
});
|
|
953
|
-
} catch (err) {
|
|
954
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
955
|
-
setStatusOverlay({
|
|
956
|
-
type: "error",
|
|
957
|
-
message: `${t("commands.plugin.marketplaceAddFailed")}: ${msg}`
|
|
958
|
-
});
|
|
959
|
-
}
|
|
960
|
-
},
|
|
961
|
-
[phase]
|
|
962
|
-
);
|
|
963
|
-
const handleSelect = useCallback(
|
|
964
|
-
async (item) => {
|
|
965
|
-
switch (phase.type) {
|
|
966
|
-
case "main": {
|
|
967
|
-
if (activeTab === "browse") {
|
|
968
|
-
const data = item.data;
|
|
969
|
-
setPhase({
|
|
970
|
-
type: "plugin-actions",
|
|
971
|
-
plugin: data.pluginName,
|
|
972
|
-
marketplace: data.marketplaceName,
|
|
973
|
-
from: "browse"
|
|
974
|
-
});
|
|
975
|
-
} else if (activeTab === "installed") {
|
|
976
|
-
const data = item.data;
|
|
977
|
-
const mName = findPluginMarketplace(data.pluginName);
|
|
978
|
-
setPhase({
|
|
979
|
-
type: "plugin-actions",
|
|
980
|
-
plugin: data.pluginName,
|
|
981
|
-
marketplace: mName,
|
|
982
|
-
from: "installed"
|
|
983
|
-
});
|
|
984
|
-
} else if (activeTab === "marketplaces") {
|
|
985
|
-
if (item.id === "add-new") {
|
|
986
|
-
setPhase({ type: "add-marketplace" });
|
|
987
|
-
setSearchQuery("");
|
|
988
|
-
} else {
|
|
989
|
-
const data = item.data;
|
|
990
|
-
setPhase({
|
|
991
|
-
type: "marketplace-actions",
|
|
992
|
-
marketplace: data.marketplaceName
|
|
993
|
-
});
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
break;
|
|
997
|
-
}
|
|
998
|
-
case "plugin-actions": {
|
|
999
|
-
if (item.id === "back") {
|
|
1000
|
-
setPhase({ type: "main" });
|
|
1001
|
-
return;
|
|
1002
|
-
}
|
|
1003
|
-
if (item.id === "install") {
|
|
1004
|
-
setStatusOverlay({
|
|
1005
|
-
type: "loading",
|
|
1006
|
-
message: t("commands.plugin.installing")
|
|
1007
|
-
});
|
|
1008
|
-
try {
|
|
1009
|
-
await installPluginFromMarketplace(
|
|
1010
|
-
phase.plugin,
|
|
1011
|
-
phase.marketplace
|
|
1012
|
-
);
|
|
1013
|
-
setStatusOverlay({
|
|
1014
|
-
type: "success",
|
|
1015
|
-
message: t("commands.plugin.installSuccess")
|
|
1016
|
-
});
|
|
1017
|
-
} catch (err) {
|
|
1018
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1019
|
-
setStatusOverlay({
|
|
1020
|
-
type: "error",
|
|
1021
|
-
message: `${t("commands.plugin.installFailed")}: ${msg}`
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
} else if (item.id === "toggle") {
|
|
1025
|
-
try {
|
|
1026
|
-
togglePluginEnabled(phase.plugin);
|
|
1027
|
-
setStatusOverlay({
|
|
1028
|
-
type: "success",
|
|
1029
|
-
message: t("commands.plugin.toggleSuccess")
|
|
1030
|
-
});
|
|
1031
|
-
} catch (err) {
|
|
1032
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1033
|
-
setStatusOverlay({ type: "error", message: msg });
|
|
1034
|
-
}
|
|
1035
|
-
} else if (item.id === "update") {
|
|
1036
|
-
setStatusOverlay({
|
|
1037
|
-
type: "loading",
|
|
1038
|
-
message: t("commands.plugin.updating")
|
|
1039
|
-
});
|
|
1040
|
-
try {
|
|
1041
|
-
await installPluginFromMarketplace(
|
|
1042
|
-
phase.plugin,
|
|
1043
|
-
phase.marketplace
|
|
1044
|
-
);
|
|
1045
|
-
setStatusOverlay({
|
|
1046
|
-
type: "success",
|
|
1047
|
-
message: t("commands.plugin.updateSuccess")
|
|
1048
|
-
});
|
|
1049
|
-
} catch (err) {
|
|
1050
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1051
|
-
setStatusOverlay({
|
|
1052
|
-
type: "error",
|
|
1053
|
-
message: `${t("commands.plugin.updateFailed")}: ${msg}`
|
|
1054
|
-
});
|
|
1055
|
-
}
|
|
1056
|
-
} else if (item.id === "uninstall") {
|
|
1057
|
-
setStatusOverlay({
|
|
1058
|
-
type: "loading",
|
|
1059
|
-
message: t("commands.plugin.uninstalling")
|
|
1060
|
-
});
|
|
1061
|
-
try {
|
|
1062
|
-
await uninstallPlugin(phase.plugin);
|
|
1063
|
-
setStatusOverlay({
|
|
1064
|
-
type: "success",
|
|
1065
|
-
message: t("commands.plugin.uninstallSuccess")
|
|
1066
|
-
});
|
|
1067
|
-
} catch (err) {
|
|
1068
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1069
|
-
setStatusOverlay({
|
|
1070
|
-
type: "error",
|
|
1071
|
-
message: `${t("commands.plugin.uninstallFailed")}: ${msg}`
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
}
|
|
1075
|
-
break;
|
|
1076
|
-
}
|
|
1077
|
-
case "marketplace-actions": {
|
|
1078
|
-
if (item.id === "back") {
|
|
1079
|
-
setPhase({ type: "main" });
|
|
1080
|
-
return;
|
|
1081
|
-
}
|
|
1082
|
-
if (item.id === "update") {
|
|
1083
|
-
setStatusOverlay({
|
|
1084
|
-
type: "loading",
|
|
1085
|
-
message: t("commands.plugin.marketplaceUpdating")
|
|
1086
|
-
});
|
|
1087
|
-
try {
|
|
1088
|
-
await updateMarketplace(phase.marketplace);
|
|
1089
|
-
setStatusOverlay({
|
|
1090
|
-
type: "success",
|
|
1091
|
-
message: t("commands.plugin.marketplaceUpdateSuccess")
|
|
1092
|
-
});
|
|
1093
|
-
} catch (err) {
|
|
1094
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1095
|
-
setStatusOverlay({
|
|
1096
|
-
type: "error",
|
|
1097
|
-
message: `${t("commands.plugin.marketplaceUpdateFailed")}: ${msg}`
|
|
1098
|
-
});
|
|
1099
|
-
}
|
|
1100
|
-
} else if (item.id === "browse") {
|
|
1101
|
-
setPhase({ type: "main" });
|
|
1102
|
-
setActiveTab("browse");
|
|
1103
|
-
setSearchQuery(phase.marketplace);
|
|
1104
|
-
} else if (item.id === "remove") {
|
|
1105
|
-
setStatusOverlay({
|
|
1106
|
-
type: "loading",
|
|
1107
|
-
message: t("commands.plugin.marketplaceRemoving")
|
|
1108
|
-
});
|
|
1109
|
-
try {
|
|
1110
|
-
removeMarketplace(phase.marketplace);
|
|
1111
|
-
setStatusOverlay({
|
|
1112
|
-
type: "success",
|
|
1113
|
-
message: t("commands.plugin.marketplaceRemoveSuccess")
|
|
1114
|
-
});
|
|
1115
|
-
} catch (err) {
|
|
1116
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
1117
|
-
setStatusOverlay({ type: "error", message: msg });
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
break;
|
|
1121
|
-
}
|
|
1122
|
-
case "batch-action-picker": {
|
|
1123
|
-
if (item.id === "back") {
|
|
1124
|
-
setPhase({ type: "main" });
|
|
1125
|
-
return;
|
|
1126
|
-
}
|
|
1127
|
-
const sel = phase.selectedItems;
|
|
1128
|
-
if (item.id === "batch-install") {
|
|
1129
|
-
const toInstall = sel.filter((si) => !installedNames.has(si.data?.pluginName)).map((si) => ({
|
|
1130
|
-
name: si.data.pluginName,
|
|
1131
|
-
marketplace: si.data.marketplaceName
|
|
1132
|
-
}));
|
|
1133
|
-
if (toInstall.length === 0) {
|
|
1134
|
-
setStatusOverlay({
|
|
1135
|
-
type: "error",
|
|
1136
|
-
message: t("commands.plugin.batchAllAlreadyInstalled")
|
|
1137
|
-
});
|
|
1138
|
-
return;
|
|
1139
|
-
}
|
|
1140
|
-
setPhase({
|
|
1141
|
-
type: "batch-progress",
|
|
1142
|
-
action: "install",
|
|
1143
|
-
plugins: toInstall
|
|
1144
|
-
});
|
|
1145
|
-
} else if (item.id === "batch-update") {
|
|
1146
|
-
const toUpdate = sel.filter((si) => {
|
|
1147
|
-
const pluginName = si.data?.pluginName;
|
|
1148
|
-
return findPluginMarketplace(pluginName) !== void 0;
|
|
1149
|
-
}).map((si) => {
|
|
1150
|
-
const pluginName = si.data.pluginName;
|
|
1151
|
-
return {
|
|
1152
|
-
name: pluginName,
|
|
1153
|
-
marketplace: findPluginMarketplace(pluginName)
|
|
1154
|
-
};
|
|
1155
|
-
});
|
|
1156
|
-
if (toUpdate.length === 0) {
|
|
1157
|
-
setStatusOverlay({
|
|
1158
|
-
type: "error",
|
|
1159
|
-
message: t("commands.plugin.batchNoUpdatable")
|
|
1160
|
-
});
|
|
1161
|
-
return;
|
|
1162
|
-
}
|
|
1163
|
-
setPhase({
|
|
1164
|
-
type: "batch-progress",
|
|
1165
|
-
action: "update",
|
|
1166
|
-
plugins: toUpdate
|
|
1167
|
-
});
|
|
1168
|
-
} else if (item.id === "batch-uninstall") {
|
|
1169
|
-
const toUninstall = sel.map((si) => ({
|
|
1170
|
-
name: si.data.pluginName
|
|
1171
|
-
}));
|
|
1172
|
-
setPhase({
|
|
1173
|
-
type: "batch-progress",
|
|
1174
|
-
action: "uninstall",
|
|
1175
|
-
plugins: toUninstall
|
|
1176
|
-
});
|
|
1177
|
-
} else if (item.id === "batch-enable") {
|
|
1178
|
-
let count = 0;
|
|
1179
|
-
for (const si of sel) {
|
|
1180
|
-
const pluginName = si.data?.pluginName;
|
|
1181
|
-
const plugin2 = installedPlugins.find((p) => p.name === pluginName);
|
|
1182
|
-
if (plugin2 && !plugin2.enabled) {
|
|
1183
|
-
try {
|
|
1184
|
-
enablePlugin(pluginName);
|
|
1185
|
-
count++;
|
|
1186
|
-
} catch {
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
setStatusOverlay({
|
|
1191
|
-
type: "success",
|
|
1192
|
-
message: t("commands.plugin.batchEnabledCount").replace(
|
|
1193
|
-
"{count}",
|
|
1194
|
-
String(count)
|
|
1195
|
-
)
|
|
1196
|
-
});
|
|
1197
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
1198
|
-
} else if (item.id === "batch-disable") {
|
|
1199
|
-
let count = 0;
|
|
1200
|
-
for (const si of sel) {
|
|
1201
|
-
const pluginName = si.data?.pluginName;
|
|
1202
|
-
const plugin2 = installedPlugins.find((p) => p.name === pluginName);
|
|
1203
|
-
if (plugin2 && plugin2.enabled) {
|
|
1204
|
-
try {
|
|
1205
|
-
disablePlugin(pluginName);
|
|
1206
|
-
count++;
|
|
1207
|
-
} catch {
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
}
|
|
1211
|
-
setStatusOverlay({
|
|
1212
|
-
type: "success",
|
|
1213
|
-
message: t("commands.plugin.batchDisabledCount").replace(
|
|
1214
|
-
"{count}",
|
|
1215
|
-
String(count)
|
|
1216
|
-
)
|
|
1217
|
-
});
|
|
1218
|
-
setSelectedIds(/* @__PURE__ */ new Set());
|
|
1219
|
-
}
|
|
1220
|
-
break;
|
|
1221
|
-
}
|
|
1222
|
-
case "add-marketplace": {
|
|
1223
|
-
setSearchQuery(item.label);
|
|
1224
|
-
break;
|
|
1225
|
-
}
|
|
1226
|
-
}
|
|
1227
|
-
},
|
|
1228
|
-
[phase, activeTab, findPluginMarketplace, installedPlugins, installedNames]
|
|
1229
|
-
);
|
|
1230
|
-
const currentTab = phase.type === "main" ? activeTab : phase.type === "plugin-actions" || phase.type === "marketplace-actions" || phase.type === "batch-action-picker" ? "actions" : phase.type === "batch-progress" ? "progress" : "add";
|
|
1231
|
-
return /* @__PURE__ */ React.createElement(
|
|
1232
|
-
TabbedListView,
|
|
1233
|
-
{
|
|
1234
|
-
title,
|
|
1235
|
-
tabs,
|
|
1236
|
-
activeTab: currentTab,
|
|
1237
|
-
onTabChange: handleTabChange,
|
|
1238
|
-
items,
|
|
1239
|
-
searchEnabled,
|
|
1240
|
-
searchPlaceholder,
|
|
1241
|
-
searchQuery,
|
|
1242
|
-
onSearchChange: setSearchQuery,
|
|
1243
|
-
onSearchSubmit: phase.type === "add-marketplace" ? handleSearchSubmit : void 0,
|
|
1244
|
-
onSelect: handleSelect,
|
|
1245
|
-
onClose: handleClose,
|
|
1246
|
-
onBack: handleBack,
|
|
1247
|
-
statusOverlay,
|
|
1248
|
-
footerHint,
|
|
1249
|
-
groupByCategory: activeTab === "browse" || activeTab === "installed",
|
|
1250
|
-
statusDismissHint: "Enter Continue \xB7 Esc Back",
|
|
1251
|
-
multiSelect: multiSelectEnabled,
|
|
1252
|
-
selectedIds,
|
|
1253
|
-
onSelectionChange: handleSelectionChange,
|
|
1254
|
-
onMultiSelect: handleMultiSelect,
|
|
1255
|
-
multiSelectActionLabel
|
|
1256
|
-
}
|
|
1257
|
-
);
|
|
1258
|
-
};
|
|
1259
|
-
const LegacyPluginCommand = ({
|
|
1260
|
-
args,
|
|
1261
|
-
onDone
|
|
1262
|
-
}) => {
|
|
1263
|
-
const theme = getTheme();
|
|
1264
|
-
const parts = args.trim().split(/\s+/).filter(Boolean);
|
|
1265
|
-
const subcommand = parts[0];
|
|
1266
|
-
const subArgs = parts.slice(1);
|
|
1267
|
-
React.useEffect(() => {
|
|
1268
|
-
if (!subcommand || subcommand === "help" || subcommand === "--help") {
|
|
1269
|
-
onDone();
|
|
1270
|
-
}
|
|
1271
|
-
}, [subcommand, onDone]);
|
|
1272
|
-
if (!subcommand || subcommand === "help" || subcommand === "--help") {
|
|
1273
|
-
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { bold: true, underline: true, color: theme.primary }, "Plugin Management Commands"), /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin list"), " - List all installed plugins"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin info <name>"), " - Show detailed plugin information"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin install <name>[@marketplace]"), " ", "- Install plugin from marketplace"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin uninstall <name>"), " - Remove installed plugin"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin validate [name]"), " - Validate plugin manifest and components"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin sync [--force] [--clean] [--dry-run]"), " ", "- ", t("commands.plugin.syncDesc")), /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.primary }, "Marketplace Commands:"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin marketplace add <source>"), " ", "- Register new marketplace"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin marketplace list"), " - List registered marketplaces"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin marketplace update <name>"), " ", "- Update marketplace manifest"), /* @__PURE__ */ React.createElement(Text, null, /* @__PURE__ */ React.createElement(Text, { color: theme.success }, "/plugin marketplace remove <name>"), " ", "- Unregister marketplace"), /* @__PURE__ */ React.createElement(Text, null, ""), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, "Examples:"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " /plugin list"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " /plugin info my-plugin"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "/plugin install awesome-plugin@official"), /* @__PURE__ */ React.createElement(Text, { color: SEMANTIC_COLORS.dim }, " ", "/plugin marketplace add owner/repo"));
|
|
1274
|
-
}
|
|
1275
|
-
switch (subcommand) {
|
|
1276
|
-
case "list":
|
|
1277
|
-
return /* @__PURE__ */ React.createElement(PluginList, { onDone });
|
|
1278
|
-
case "info":
|
|
1279
|
-
if (subArgs.length === 0) {
|
|
1280
|
-
return /* @__PURE__ */ React.createElement(
|
|
1281
|
-
ErrorMessage,
|
|
1282
|
-
{
|
|
1283
|
-
message: "Plugin name required. Usage: /plugin info <name>",
|
|
1284
|
-
onDone
|
|
1285
|
-
}
|
|
1286
|
-
);
|
|
1287
|
-
}
|
|
1288
|
-
return /* @__PURE__ */ React.createElement(PluginInfo, { pluginName: subArgs[0], onDone });
|
|
1289
|
-
case "install":
|
|
1290
|
-
if (subArgs.length === 0) {
|
|
1291
|
-
return /* @__PURE__ */ React.createElement(
|
|
1292
|
-
ErrorMessage,
|
|
1293
|
-
{
|
|
1294
|
-
message: "Plugin spec required. Usage: /plugin install <name>[@marketplace]",
|
|
1295
|
-
onDone
|
|
1296
|
-
}
|
|
1297
|
-
);
|
|
1298
|
-
}
|
|
1299
|
-
return /* @__PURE__ */ React.createElement(PluginInstall, { pluginSpec: subArgs[0], onDone });
|
|
1300
|
-
case "uninstall":
|
|
1301
|
-
if (subArgs.length === 0) {
|
|
1302
|
-
return /* @__PURE__ */ React.createElement(
|
|
1303
|
-
ErrorMessage,
|
|
1304
|
-
{
|
|
1305
|
-
message: "Plugin name required. Usage: /plugin uninstall <name>",
|
|
1306
|
-
onDone
|
|
1307
|
-
}
|
|
1308
|
-
);
|
|
1309
|
-
}
|
|
1310
|
-
return /* @__PURE__ */ React.createElement(PluginUninstall, { pluginName: subArgs[0], onDone });
|
|
1311
|
-
case "validate":
|
|
1312
|
-
return /* @__PURE__ */ React.createElement(PluginValidate, { pluginName: subArgs[0], onDone });
|
|
1313
|
-
case "sync":
|
|
1314
|
-
return /* @__PURE__ */ React.createElement(
|
|
1315
|
-
PluginSync,
|
|
1316
|
-
{
|
|
1317
|
-
onDone,
|
|
1318
|
-
force: subArgs.includes("--force"),
|
|
1319
|
-
clean: subArgs.includes("--clean"),
|
|
1320
|
-
dryRun: subArgs.includes("--dry-run")
|
|
1321
|
-
}
|
|
1322
|
-
);
|
|
1323
|
-
case "marketplace":
|
|
1324
|
-
const marketplaceSubcommand = subArgs[0];
|
|
1325
|
-
const marketplaceArgs = subArgs.slice(1);
|
|
1326
|
-
switch (marketplaceSubcommand) {
|
|
1327
|
-
case "list":
|
|
1328
|
-
return /* @__PURE__ */ React.createElement(MarketplaceListView, { onDone });
|
|
1329
|
-
case "add":
|
|
1330
|
-
if (marketplaceArgs.length === 0) {
|
|
1331
|
-
return /* @__PURE__ */ React.createElement(
|
|
1332
|
-
ErrorMessage,
|
|
1333
|
-
{
|
|
1334
|
-
message: "Source required. Usage: /plugin marketplace add <source>",
|
|
1335
|
-
onDone
|
|
1336
|
-
}
|
|
1337
|
-
);
|
|
1338
|
-
}
|
|
1339
|
-
return /* @__PURE__ */ React.createElement(MarketplaceAdd, { source: marketplaceArgs[0], onDone });
|
|
1340
|
-
case "update":
|
|
1341
|
-
if (marketplaceArgs.length === 0) {
|
|
1342
|
-
return /* @__PURE__ */ React.createElement(
|
|
1343
|
-
ErrorMessage,
|
|
1344
|
-
{
|
|
1345
|
-
message: "Marketplace name required. Usage: /plugin marketplace update <name>",
|
|
1346
|
-
onDone
|
|
1347
|
-
}
|
|
1348
|
-
);
|
|
1349
|
-
}
|
|
1350
|
-
return /* @__PURE__ */ React.createElement(MarketplaceUpdate, { name: marketplaceArgs[0], onDone });
|
|
1351
|
-
case "remove":
|
|
1352
|
-
if (marketplaceArgs.length === 0) {
|
|
1353
|
-
return /* @__PURE__ */ React.createElement(
|
|
1354
|
-
ErrorMessage,
|
|
1355
|
-
{
|
|
1356
|
-
message: "Marketplace name required. Usage: /plugin marketplace remove <name>",
|
|
1357
|
-
onDone
|
|
1358
|
-
}
|
|
1359
|
-
);
|
|
1360
|
-
}
|
|
1361
|
-
return /* @__PURE__ */ React.createElement(MarketplaceRemove, { name: marketplaceArgs[0], onDone });
|
|
1362
|
-
default:
|
|
1363
|
-
return /* @__PURE__ */ React.createElement(
|
|
1364
|
-
ErrorMessage,
|
|
1365
|
-
{
|
|
1366
|
-
message: `Unknown marketplace subcommand: ${marketplaceSubcommand}. Use /plugin help for usage.`,
|
|
1367
|
-
onDone
|
|
1368
|
-
}
|
|
1369
|
-
);
|
|
1370
|
-
}
|
|
1371
|
-
default:
|
|
1372
|
-
return /* @__PURE__ */ React.createElement(
|
|
1373
|
-
ErrorMessage,
|
|
1374
|
-
{
|
|
1375
|
-
message: `Unknown subcommand: ${subcommand}. Use /plugin help for usage.`,
|
|
1376
|
-
onDone
|
|
1377
|
-
}
|
|
1378
|
-
);
|
|
1379
|
-
}
|
|
1380
|
-
};
|
|
1381
|
-
const PluginCommand = ({
|
|
1382
|
-
args,
|
|
1383
|
-
onDone
|
|
1384
|
-
}) => {
|
|
1385
|
-
if (args.trim()) {
|
|
1386
|
-
return /* @__PURE__ */ React.createElement(LegacyPluginCommand, { args, onDone });
|
|
1387
|
-
} else {
|
|
1388
|
-
return /* @__PURE__ */ React.createElement(InteractivePluginCommand, { onDone });
|
|
1389
|
-
}
|
|
1390
|
-
};
|
|
1391
|
-
const plugin = {
|
|
1392
|
-
type: "local-jsx",
|
|
1393
|
-
name: "plugin",
|
|
1394
|
-
description: "Manage plugins and plugin marketplaces (interactive)",
|
|
1395
|
-
isEnabled: true,
|
|
1396
|
-
isHidden: false,
|
|
1397
|
-
hidePromptInput: true,
|
|
1398
|
-
aliases: ["plugins"],
|
|
1399
|
-
async call(onDone, _context) {
|
|
1400
|
-
return /* @__PURE__ */ React.createElement(PluginCommand, { args: "", onDone });
|
|
1401
|
-
},
|
|
1402
|
-
userFacingName() {
|
|
1403
|
-
return "plugin";
|
|
1404
|
-
}
|
|
1405
|
-
};
|
|
1406
|
-
var plugin_default = plugin;
|
|
1407
|
-
export {
|
|
1408
|
-
plugin_default as default
|
|
1409
|
-
};
|
|
1410
|
-
//# sourceMappingURL=plugin.js.map
|