@within-7/minto 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agents/AgentsCommand.js +2342 -0
- package/dist/commands/agents/AgentsCommand.js.map +7 -0
- package/dist/commands/agents/constants.js +58 -0
- package/dist/commands/agents/constants.js.map +7 -0
- package/dist/commands/agents/index.js +37 -0
- package/dist/commands/agents/index.js.map +7 -0
- package/dist/commands/agents/types.js +10 -0
- package/dist/commands/agents/types.js.map +7 -0
- package/dist/commands/agents/utils/fileOperations.js +185 -0
- package/dist/commands/agents/utils/fileOperations.js.map +7 -0
- package/dist/commands/agents/utils/index.js +21 -0
- package/dist/commands/agents/utils/index.js.map +7 -0
- package/dist/commands/bug.js +2 -2
- package/dist/commands/bug.js.map +2 -2
- package/dist/commands/compact.js +5 -5
- package/dist/commands/compact.js.map +2 -2
- package/dist/commands/ctx_viz.js +55 -22
- package/dist/commands/ctx_viz.js.map +2 -2
- package/dist/commands/mcp-interactive.js +11 -11
- package/dist/commands/mcp-interactive.js.map +2 -2
- package/dist/commands/model.js +94 -32
- package/dist/commands/model.js.map +3 -3
- package/dist/commands/plugin/AddMarketplaceForm.js +49 -21
- package/dist/commands/plugin/AddMarketplaceForm.js.map +2 -2
- package/dist/commands/plugin/ConfirmDialog.js +38 -26
- package/dist/commands/plugin/ConfirmDialog.js.map +2 -2
- package/dist/commands/plugin/InstalledPluginsByMarketplace.js +24 -8
- package/dist/commands/plugin/InstalledPluginsByMarketplace.js.map +2 -2
- package/dist/commands/plugin/InstalledPluginsManager.js +3 -1
- package/dist/commands/plugin/InstalledPluginsManager.js.map +2 -2
- package/dist/commands/plugin/MainMenu.js +16 -7
- package/dist/commands/plugin/MainMenu.js.map +2 -2
- package/dist/commands/plugin/MarketplaceManager.js +84 -39
- package/dist/commands/plugin/MarketplaceManager.js.map +2 -2
- package/dist/commands/plugin/MarketplaceSelector.js +7 -3
- package/dist/commands/plugin/MarketplaceSelector.js.map +2 -2
- package/dist/commands/plugin/PlaceholderScreen.js +16 -2
- package/dist/commands/plugin/PlaceholderScreen.js.map +2 -2
- package/dist/commands/plugin/PluginBrowser.js +4 -2
- package/dist/commands/plugin/PluginBrowser.js.map +2 -2
- package/dist/commands/plugin/PluginDetailsInstall.js +12 -6
- package/dist/commands/plugin/PluginDetailsInstall.js.map +2 -2
- package/dist/commands/plugin/PluginDetailsManage.js +14 -5
- package/dist/commands/plugin/PluginDetailsManage.js.map +2 -2
- package/dist/commands/plugin/example-usage.js.map +2 -2
- package/dist/commands/plugin/utils.js.map +2 -2
- package/dist/commands/plugin.js +226 -46
- package/dist/commands/plugin.js.map +2 -2
- package/dist/commands/refreshCommands.js +6 -3
- package/dist/commands/refreshCommands.js.map +2 -2
- package/dist/commands/resume.js +2 -1
- package/dist/commands/resume.js.map +2 -2
- package/dist/commands/setup.js +19 -5
- package/dist/commands/setup.js.map +2 -2
- package/dist/commands/terminalSetup.js +2 -2
- package/dist/commands/terminalSetup.js.map +1 -1
- package/dist/commands.js +14 -30
- package/dist/commands.js.map +2 -2
- package/dist/components/AskUserQuestionDialog/AskUserQuestionDialog.js.map +2 -2
- package/dist/components/AskUserQuestionDialog/QuestionView.js +10 -1
- package/dist/components/AskUserQuestionDialog/QuestionView.js.map +2 -2
- package/dist/components/BackgroundTasksPanel.js +5 -1
- package/dist/components/BackgroundTasksPanel.js.map +2 -2
- package/dist/components/Config.js +17 -4
- package/dist/components/Config.js.map +2 -2
- package/dist/components/ConsoleOAuthFlow.js.map +2 -2
- package/dist/components/CustomSelect/select-option.js +4 -1
- package/dist/components/CustomSelect/select-option.js.map +2 -2
- package/dist/components/Help.js +6 -8
- package/dist/components/Help.js.map +2 -2
- package/dist/components/Logo.js +1 -1
- package/dist/components/Logo.js.map +2 -2
- package/dist/components/ModelListManager.js.map +2 -2
- package/dist/components/ModelSelector/ModelSelector.js +2030 -0
- package/dist/components/ModelSelector/ModelSelector.js.map +7 -0
- package/dist/components/ModelSelector/ScreenContainer.js +27 -0
- package/dist/components/ModelSelector/ScreenContainer.js.map +7 -0
- package/dist/components/ModelSelector/constants.js +37 -0
- package/dist/components/ModelSelector/constants.js.map +7 -0
- package/dist/components/ModelSelector/hooks/index.js +5 -0
- package/dist/components/ModelSelector/hooks/index.js.map +7 -0
- package/dist/components/ModelSelector/hooks/useEscapeNavigation.js +21 -0
- package/dist/components/ModelSelector/hooks/useEscapeNavigation.js.map +7 -0
- package/dist/components/ModelSelector/index.js +17 -0
- package/dist/components/ModelSelector/index.js.map +7 -0
- package/dist/components/ModelSelector/types.js +1 -0
- package/dist/components/ModelSelector/types.js.map +7 -0
- package/dist/components/PressEnterToContinue.js +1 -1
- package/dist/components/PressEnterToContinue.js.map +2 -2
- package/dist/components/ProjectOnboarding.js +1 -1
- package/dist/components/ProjectOnboarding.js.map +2 -2
- package/dist/components/PromptInput.js +88 -37
- package/dist/components/PromptInput.js.map +2 -2
- package/dist/components/QuitSummary.js +17 -10
- package/dist/components/QuitSummary.js.map +2 -2
- package/dist/components/SentryErrorBoundary.js.map +2 -2
- package/dist/components/StreamingBashOutput.js.map +2 -2
- package/dist/components/StructuredDiff.js.map +2 -2
- package/dist/components/SubagentProgress.js.map +2 -2
- package/dist/components/TaskCard.js.map +2 -2
- package/dist/components/TextInput.js.map +1 -1
- package/dist/components/TodoItem.js.map +1 -1
- package/dist/components/binary-feedback/BinaryFeedbackOption.js +1 -3
- package/dist/components/binary-feedback/BinaryFeedbackOption.js.map +2 -2
- package/dist/components/messages/AssistantLocalCommandOutputMessage.js.map +1 -1
- package/dist/components/messages/AssistantToolUseMessage.js +3 -1
- package/dist/components/messages/AssistantToolUseMessage.js.map +2 -2
- package/dist/components/messages/TaskProgressMessage.js.map +2 -2
- package/dist/components/messages/TaskToolMessage.js.map +2 -2
- package/dist/components/messages/UserToolResultMessage/utils.js.map +2 -2
- package/dist/components/permissions/FileEditPermissionRequest/FileEditToolDiff.js.map +2 -2
- package/dist/components/permissions/FileWritePermissionRequest/FileWriteToolDiff.js.map +2 -2
- package/dist/components/permissions/hooks.js.map +2 -2
- package/dist/constants/modelCapabilities.js +1 -1
- package/dist/constants/modelCapabilities.js.map +2 -2
- package/dist/constants/prompts.js.map +1 -1
- package/dist/constants/timing.js +34 -0
- package/dist/constants/timing.js.map +7 -0
- package/dist/entrypoints/cli.js +128 -33
- package/dist/entrypoints/cli.js.map +3 -3
- package/dist/entrypoints/mcp.js +13 -18
- package/dist/entrypoints/mcp.js.map +2 -2
- package/dist/hooks/useCanUseTool.js.map +2 -2
- package/dist/hooks/useCancelRequest.js.map +1 -1
- package/dist/hooks/useHistorySearch.js.map +2 -2
- package/dist/hooks/useLogStartupTime.js.map +2 -2
- package/dist/hooks/usePermissionRequestLogging.js.map +2 -2
- package/dist/hooks/useTextInput.js.map +1 -1
- package/dist/hooks/useUnifiedCompletion.js +493 -394
- package/dist/hooks/useUnifiedCompletion.js.map +2 -2
- package/dist/index.js.map +2 -2
- package/dist/permissions.js +4 -7
- package/dist/permissions.js.map +2 -2
- package/dist/query.js +6 -1
- package/dist/query.js.map +2 -2
- package/dist/screens/REPL.js +72 -36
- package/dist/screens/REPL.js.map +2 -2
- package/dist/screens/ResumeConversation.js +2 -1
- package/dist/screens/ResumeConversation.js.map +2 -2
- package/dist/services/adapters/base.js.map +2 -2
- package/dist/services/adapters/chatCompletions.js.map +2 -2
- package/dist/services/adapters/responsesAPI.js +3 -1
- package/dist/services/adapters/responsesAPI.js.map +2 -2
- package/dist/services/claude.js +327 -328
- package/dist/services/claude.js.map +2 -2
- package/dist/services/customCommands.js +6 -1
- package/dist/services/customCommands.js.map +2 -2
- package/dist/services/fileFreshness.js.map +2 -2
- package/dist/services/gpt5ConnectionTest.js +20 -7
- package/dist/services/gpt5ConnectionTest.js.map +2 -2
- package/dist/services/hookExecutor.js +6 -12
- package/dist/services/hookExecutor.js.map +2 -2
- package/dist/services/mcpClient.js +29 -2
- package/dist/services/mcpClient.js.map +2 -2
- package/dist/services/mentionProcessor.js +23 -10
- package/dist/services/mentionProcessor.js.map +2 -2
- package/dist/services/modelAdapterFactory.js.map +2 -2
- package/dist/services/oauth.js.map +2 -2
- package/dist/services/openai.js +109 -72
- package/dist/services/openai.js.map +3 -3
- package/dist/services/responseStateManager.js.map +2 -2
- package/dist/services/systemReminder.js.map +2 -2
- package/dist/tools/ArchitectTool/ArchitectTool.js.map +1 -1
- package/dist/tools/AskExpertModelTool/AskExpertModelTool.js +14 -8
- package/dist/tools/AskExpertModelTool/AskExpertModelTool.js.map +2 -2
- package/dist/tools/BashOutputTool/BashOutputTool.js.map +2 -2
- package/dist/tools/BashTool/BashTool.js.map +2 -2
- package/dist/tools/FileReadTool/FileReadTool.js.map +1 -1
- package/dist/tools/FileWriteTool/FileWriteTool.js.map +2 -2
- package/dist/tools/GrepTool/GrepTool.js +1 -4
- package/dist/tools/GrepTool/GrepTool.js.map +2 -2
- package/dist/tools/MultiEditTool/MultiEditTool.js +4 -1
- package/dist/tools/MultiEditTool/MultiEditTool.js.map +2 -2
- package/dist/tools/NotebookReadTool/NotebookReadTool.js +3 -1
- package/dist/tools/NotebookReadTool/NotebookReadTool.js.map +2 -2
- package/dist/tools/SkillTool/SkillTool.js +12 -6
- package/dist/tools/SkillTool/SkillTool.js.map +2 -2
- package/dist/tools/TaskTool/TaskTool.js +14 -5
- package/dist/tools/TaskTool/TaskTool.js.map +2 -2
- package/dist/tools/TaskTool/prompt.js.map +2 -2
- package/dist/tools/ThinkTool/ThinkTool.js +6 -1
- package/dist/tools/ThinkTool/ThinkTool.js.map +2 -2
- package/dist/tools/TodoWriteTool/TodoWriteTool.js +23 -3
- package/dist/tools/TodoWriteTool/TodoWriteTool.js.map +2 -2
- package/dist/tools/URLFetcherTool/URLFetcherTool.js +2 -2
- package/dist/tools/URLFetcherTool/URLFetcherTool.js.map +2 -2
- package/dist/tools/URLFetcherTool/cache.js +6 -3
- package/dist/tools/URLFetcherTool/cache.js.map +2 -2
- package/dist/tools/URLFetcherTool/htmlToMarkdown.js +3 -1
- package/dist/tools/URLFetcherTool/htmlToMarkdown.js.map +2 -2
- package/dist/tools/WebSearchTool/WebSearchTool.js.map +2 -2
- package/dist/tools/WebSearchTool/prompt.js.map +2 -2
- package/dist/tools/WebSearchTool/searchProviders.js +15 -6
- package/dist/tools/WebSearchTool/searchProviders.js.map +2 -2
- package/dist/tools.js +4 -1
- package/dist/tools.js.map +2 -2
- package/dist/types/core.js +1 -0
- package/dist/types/core.js.map +7 -0
- package/dist/types/hooks.js +1 -4
- package/dist/types/hooks.js.map +2 -2
- package/dist/types/marketplace.js +8 -2
- package/dist/types/marketplace.js.map +2 -2
- package/dist/types/plugin.js +9 -6
- package/dist/types/plugin.js.map +2 -2
- package/dist/utils/BackgroundShellManager.js +76 -10
- package/dist/utils/BackgroundShellManager.js.map +2 -2
- package/dist/utils/PersistentShell.js +7 -2
- package/dist/utils/PersistentShell.js.map +2 -2
- package/dist/utils/advancedFuzzyMatcher.js +4 -1
- package/dist/utils/advancedFuzzyMatcher.js.map +2 -2
- package/dist/utils/agentLoader.js +69 -35
- package/dist/utils/agentLoader.js.map +2 -2
- package/dist/utils/agentStorage.js.map +2 -2
- package/dist/utils/async.js +163 -0
- package/dist/utils/async.js.map +7 -0
- package/dist/utils/autoUpdater.js +8 -2
- package/dist/utils/autoUpdater.js.map +2 -2
- package/dist/utils/commands.js +23 -11
- package/dist/utils/commands.js.map +2 -2
- package/dist/utils/commonUnixCommands.js +3 -1
- package/dist/utils/commonUnixCommands.js.map +2 -2
- package/dist/utils/compressionMode.js.map +2 -2
- package/dist/utils/config.js +30 -14
- package/dist/utils/config.js.map +2 -2
- package/dist/utils/debugLogger.js.map +2 -2
- package/dist/utils/env.js.map +2 -2
- package/dist/utils/envConfig.js +82 -0
- package/dist/utils/envConfig.js.map +7 -0
- package/dist/utils/errorHandling.js +89 -0
- package/dist/utils/errorHandling.js.map +7 -0
- package/dist/utils/expertChatStorage.js.map +2 -2
- package/dist/utils/fuzzyMatcher.js +13 -7
- package/dist/utils/fuzzyMatcher.js.map +2 -2
- package/dist/utils/hookManager.js +14 -4
- package/dist/utils/hookManager.js.map +2 -2
- package/dist/utils/log.js.map +2 -2
- package/dist/utils/marketplaceManager.js +44 -9
- package/dist/utils/marketplaceManager.js.map +2 -2
- package/dist/utils/messageContextManager.js.map +1 -1
- package/dist/utils/messages.js +6 -3
- package/dist/utils/messages.js.map +2 -2
- package/dist/utils/model.js +3 -1
- package/dist/utils/model.js.map +2 -2
- package/dist/utils/pluginInstaller.js +3 -15
- package/dist/utils/pluginInstaller.js.map +2 -2
- package/dist/utils/pluginLoader.js +41 -13
- package/dist/utils/pluginLoader.js.map +2 -2
- package/dist/utils/pluginRegistry.js.map +2 -2
- package/dist/utils/pluginValidator.js +71 -49
- package/dist/utils/pluginValidator.js.map +2 -2
- package/dist/utils/ptyCompat.js.map +2 -2
- package/dist/utils/roundConverter.js.map +2 -2
- package/dist/utils/secureFile.js +43 -14
- package/dist/utils/secureFile.js.map +2 -2
- package/dist/utils/sessionState.js.map +2 -2
- package/dist/utils/skillLoader.js.map +2 -2
- package/dist/utils/teamConfig.js +7 -4
- package/dist/utils/teamConfig.js.map +2 -2
- package/dist/utils/theme.js.map +2 -2
- package/dist/utils/thinking.js.map +2 -2
- package/dist/utils/unaryLogging.js.map +2 -2
- package/dist/version.js +2 -2
- package/dist/version.js.map +1 -1
- package/package.json +5 -5
package/dist/commands/plugin.js
CHANGED
|
@@ -58,7 +58,18 @@ const PluginList = ({ onDone }) => {
|
|
|
58
58
|
plugin2.hooks.length > 0 && `${plugin2.hooks.length} hook${plugin2.hooks.length !== 1 ? "s" : ""}`,
|
|
59
59
|
plugin2.mcpServers.length > 0 && `${plugin2.mcpServers.length} MCP server${plugin2.mcpServers.length !== 1 ? "s" : ""}`
|
|
60
60
|
].filter(Boolean);
|
|
61
|
-
return /* @__PURE__ */ React.createElement(
|
|
61
|
+
return /* @__PURE__ */ React.createElement(
|
|
62
|
+
Box,
|
|
63
|
+
{
|
|
64
|
+
key: plugin2.manifest.name,
|
|
65
|
+
flexDirection: "column",
|
|
66
|
+
marginBottom: 1
|
|
67
|
+
},
|
|
68
|
+
/* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: theme.primary, bold: true }, plugin2.manifest.displayName || plugin2.manifest.name), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " v", plugin2.manifest.version), !plugin2.enabled && /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, " (disabled)")),
|
|
69
|
+
plugin2.manifest.description && /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " ", plugin2.manifest.description),
|
|
70
|
+
componentCounts.length > 0 && /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " Components: ", componentCounts.join(", ")),
|
|
71
|
+
/* @__PURE__ */ React.createElement(Text, { dimColor: true }, " ", "Location:", " ", plugin2.source.type === "local" ? plugin2.source.path : plugin2.location)
|
|
72
|
+
);
|
|
62
73
|
}));
|
|
63
74
|
};
|
|
64
75
|
const PluginInfo = ({ pluginName, onDone }) => {
|
|
@@ -87,10 +98,15 @@ const PluginInfo = ({ pluginName, onDone }) => {
|
|
|
87
98
|
if (error || !plugin2) {
|
|
88
99
|
return /* @__PURE__ */ React.createElement(Text, { color: theme.error }, "Error: ", error || "Plugin not found");
|
|
89
100
|
}
|
|
90
|
-
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, { dimColor: true }, "
|
|
101
|
+
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, { dimColor: true }, " ", "\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, { dimColor: true }, " ", "\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, { dimColor: true }, " ", "\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, { dimColor: true }, " ", "\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, { dimColor: true }, " ", "\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, { dimColor: true }, " 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, { dimColor: true }, " Minto: ", plugin2.manifest.engines.minto), plugin2.manifest.engines["claude-code"] && /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " ", "Claude Code: ", plugin2.manifest.engines["claude-code"]), plugin2.manifest.engines.node && /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " Node: ", plugin2.manifest.engines.node)));
|
|
91
102
|
};
|
|
92
|
-
const PluginInstall = ({
|
|
93
|
-
|
|
103
|
+
const PluginInstall = ({
|
|
104
|
+
pluginSpec,
|
|
105
|
+
onDone
|
|
106
|
+
}) => {
|
|
107
|
+
const [status, setStatus] = useState(
|
|
108
|
+
"installing"
|
|
109
|
+
);
|
|
94
110
|
const [message, setMessage] = useState("");
|
|
95
111
|
const [installedPath, setInstalledPath] = useState("");
|
|
96
112
|
const theme = getTheme();
|
|
@@ -101,8 +117,13 @@ const PluginInstall = ({ pluginSpec, onDone }) => {
|
|
|
101
117
|
if (!pluginName) {
|
|
102
118
|
throw new Error("Plugin name is required");
|
|
103
119
|
}
|
|
104
|
-
setMessage(
|
|
105
|
-
|
|
120
|
+
setMessage(
|
|
121
|
+
`Installing plugin "${pluginName}"${marketplaceName ? ` from marketplace "${marketplaceName}"` : ""}...`
|
|
122
|
+
);
|
|
123
|
+
const path = await installPluginFromMarketplace(
|
|
124
|
+
pluginName,
|
|
125
|
+
marketplaceName
|
|
126
|
+
);
|
|
106
127
|
setInstalledPath(path);
|
|
107
128
|
setMessage(`Successfully installed "${pluginName}" to ${path}`);
|
|
108
129
|
setStatus("success");
|
|
@@ -110,7 +131,9 @@ const PluginInstall = ({ pluginSpec, onDone }) => {
|
|
|
110
131
|
if (err instanceof MarketplaceError) {
|
|
111
132
|
setMessage(`Installation failed: ${err.message}`);
|
|
112
133
|
} else {
|
|
113
|
-
setMessage(
|
|
134
|
+
setMessage(
|
|
135
|
+
`Installation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
136
|
+
);
|
|
114
137
|
}
|
|
115
138
|
setStatus("error");
|
|
116
139
|
} finally {
|
|
@@ -120,10 +143,15 @@ const PluginInstall = ({ pluginSpec, onDone }) => {
|
|
|
120
143
|
installPlugin();
|
|
121
144
|
}, [pluginSpec, onDone]);
|
|
122
145
|
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
123
|
-
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, { dimColor: true }, "Plugin is now available. Use /plugin info ", pluginSpec.split("@")[0], " to see details.")));
|
|
146
|
+
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, { dimColor: true }, "Plugin is now available. Use /plugin info ", pluginSpec.split("@")[0], " ", "to see details.")));
|
|
124
147
|
};
|
|
125
|
-
const PluginUninstall = ({
|
|
126
|
-
|
|
148
|
+
const PluginUninstall = ({
|
|
149
|
+
pluginName,
|
|
150
|
+
onDone
|
|
151
|
+
}) => {
|
|
152
|
+
const [status, setStatus] = useState(
|
|
153
|
+
"uninstalling"
|
|
154
|
+
);
|
|
127
155
|
const [message, setMessage] = useState("");
|
|
128
156
|
const theme = getTheme();
|
|
129
157
|
useEffect(() => {
|
|
@@ -138,7 +166,9 @@ const PluginUninstall = ({ pluginName, onDone }) => {
|
|
|
138
166
|
setMessage(`Successfully uninstalled "${pluginName}"`);
|
|
139
167
|
setStatus("success");
|
|
140
168
|
} catch (err) {
|
|
141
|
-
setMessage(
|
|
169
|
+
setMessage(
|
|
170
|
+
`Uninstallation failed: ${err instanceof Error ? err.message : String(err)}`
|
|
171
|
+
);
|
|
142
172
|
setStatus("error");
|
|
143
173
|
} finally {
|
|
144
174
|
onDone();
|
|
@@ -149,7 +179,10 @@ const PluginUninstall = ({ pluginName, onDone }) => {
|
|
|
149
179
|
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
150
180
|
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
151
181
|
};
|
|
152
|
-
const PluginValidate = ({
|
|
182
|
+
const PluginValidate = ({
|
|
183
|
+
pluginName,
|
|
184
|
+
onDone
|
|
185
|
+
}) => {
|
|
153
186
|
const [results, setResults] = useState([]);
|
|
154
187
|
const [loading, setLoading] = useState(true);
|
|
155
188
|
const theme = getTheme();
|
|
@@ -165,14 +198,19 @@ const PluginValidate = ({ pluginName, onDone }) => {
|
|
|
165
198
|
errors.push("Plugin not found");
|
|
166
199
|
return { plugin: name, valid: false, errors };
|
|
167
200
|
}
|
|
168
|
-
if (!plugin2.manifest.name)
|
|
169
|
-
|
|
170
|
-
if (!plugin2.manifest.
|
|
201
|
+
if (!plugin2.manifest.name)
|
|
202
|
+
errors.push("Missing required field: name");
|
|
203
|
+
if (!plugin2.manifest.version)
|
|
204
|
+
errors.push("Missing required field: version");
|
|
205
|
+
if (!plugin2.manifest.description)
|
|
206
|
+
errors.push("Missing required field: description");
|
|
171
207
|
if (plugin2.manifest.version && !/^\d+\.\d+\.\d+$/.test(plugin2.manifest.version)) {
|
|
172
208
|
errors.push("Invalid version format (must be semver: X.Y.Z)");
|
|
173
209
|
}
|
|
174
210
|
if (plugin2.manifest.name && !/^[a-z0-9-]+$/.test(plugin2.manifest.name)) {
|
|
175
|
-
errors.push(
|
|
211
|
+
errors.push(
|
|
212
|
+
"Invalid name format (must be lowercase alphanumeric with hyphens)"
|
|
213
|
+
);
|
|
176
214
|
}
|
|
177
215
|
const checkComponents = (items, type) => {
|
|
178
216
|
items.forEach((item) => {
|
|
@@ -222,12 +260,14 @@ const MarketplaceListView = ({ onDone }) => {
|
|
|
222
260
|
if (marketplaces.length === 0) {
|
|
223
261
|
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: theme.warning }, "No marketplaces registered."), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Register a marketplace with: /plugin marketplace add <source>"));
|
|
224
262
|
}
|
|
225
|
-
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, { dimColor: true }, "
|
|
263
|
+
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, { dimColor: true }, " ", marketplace.manifest.metadata.description), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, ` Plugins: ${marketplace.manifest.plugins.length}`, ` | Owner: ${marketplace.manifest.owner.name}`), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, ` 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, { dimColor: true }, ` Last updated: ${new Date(marketplace.lastUpdated).toLocaleString()}`))));
|
|
226
264
|
};
|
|
227
265
|
const MarketplaceAdd = ({ source, onDone }) => {
|
|
228
266
|
const [status, setStatus] = useState("adding");
|
|
229
267
|
const [message, setMessage] = useState("");
|
|
230
|
-
const [marketplace, setMarketplace] = useState(
|
|
268
|
+
const [marketplace, setMarketplace] = useState(
|
|
269
|
+
null
|
|
270
|
+
);
|
|
231
271
|
const theme = getTheme();
|
|
232
272
|
useEffect(() => {
|
|
233
273
|
const addMarketplaceAsync = async () => {
|
|
@@ -241,7 +281,9 @@ const MarketplaceAdd = ({ source, onDone }) => {
|
|
|
241
281
|
if (err instanceof MarketplaceError) {
|
|
242
282
|
setMessage(`Registration failed: ${err.message}`);
|
|
243
283
|
} else {
|
|
244
|
-
setMessage(
|
|
284
|
+
setMessage(
|
|
285
|
+
`Registration failed: ${err instanceof Error ? err.message : String(err)}`
|
|
286
|
+
);
|
|
245
287
|
}
|
|
246
288
|
setStatus("error");
|
|
247
289
|
} finally {
|
|
@@ -253,8 +295,13 @@ const MarketplaceAdd = ({ source, onDone }) => {
|
|
|
253
295
|
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
254
296
|
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, { dimColor: true }, "Marketplace contains ", marketplace.manifest.plugins.length, " plugin(s)"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Use /plugin marketplace list to see all marketplaces")));
|
|
255
297
|
};
|
|
256
|
-
const MarketplaceUpdate = ({
|
|
257
|
-
|
|
298
|
+
const MarketplaceUpdate = ({
|
|
299
|
+
name,
|
|
300
|
+
onDone
|
|
301
|
+
}) => {
|
|
302
|
+
const [status, setStatus] = useState(
|
|
303
|
+
"updating"
|
|
304
|
+
);
|
|
258
305
|
const [message, setMessage] = useState("");
|
|
259
306
|
const theme = getTheme();
|
|
260
307
|
useEffect(() => {
|
|
@@ -268,7 +315,9 @@ const MarketplaceUpdate = ({ name, onDone }) => {
|
|
|
268
315
|
if (err instanceof MarketplaceError) {
|
|
269
316
|
setMessage(`Update failed: ${err.message}`);
|
|
270
317
|
} else {
|
|
271
|
-
setMessage(
|
|
318
|
+
setMessage(
|
|
319
|
+
`Update failed: ${err instanceof Error ? err.message : String(err)}`
|
|
320
|
+
);
|
|
272
321
|
}
|
|
273
322
|
setStatus("error");
|
|
274
323
|
} finally {
|
|
@@ -280,8 +329,13 @@ const MarketplaceUpdate = ({ name, onDone }) => {
|
|
|
280
329
|
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
281
330
|
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
282
331
|
};
|
|
283
|
-
const MarketplaceRemove = ({
|
|
284
|
-
|
|
332
|
+
const MarketplaceRemove = ({
|
|
333
|
+
name,
|
|
334
|
+
onDone
|
|
335
|
+
}) => {
|
|
336
|
+
const [status, setStatus] = useState(
|
|
337
|
+
"removing"
|
|
338
|
+
);
|
|
285
339
|
const [message, setMessage] = useState("");
|
|
286
340
|
const theme = getTheme();
|
|
287
341
|
useEffect(() => {
|
|
@@ -295,7 +349,9 @@ const MarketplaceRemove = ({ name, onDone }) => {
|
|
|
295
349
|
if (err instanceof MarketplaceError) {
|
|
296
350
|
setMessage(`Removal failed: ${err.message}`);
|
|
297
351
|
} else {
|
|
298
|
-
setMessage(
|
|
352
|
+
setMessage(
|
|
353
|
+
`Removal failed: ${err instanceof Error ? err.message : String(err)}`
|
|
354
|
+
);
|
|
299
355
|
}
|
|
300
356
|
setStatus("error");
|
|
301
357
|
} finally {
|
|
@@ -307,7 +363,10 @@ const MarketplaceRemove = ({ name, onDone }) => {
|
|
|
307
363
|
const color = status === "success" ? theme.success : status === "error" ? theme.error : theme.primary;
|
|
308
364
|
return /* @__PURE__ */ React.createElement(Text, { color }, message);
|
|
309
365
|
};
|
|
310
|
-
const ErrorMessage = ({
|
|
366
|
+
const ErrorMessage = ({
|
|
367
|
+
message,
|
|
368
|
+
onDone
|
|
369
|
+
}) => {
|
|
311
370
|
const theme = getTheme();
|
|
312
371
|
React.useEffect(() => {
|
|
313
372
|
onDone();
|
|
@@ -382,7 +441,9 @@ const MarketplaceDetails = ({ marketplace: marketplaceName, onNavigate, onBack,
|
|
|
382
441
|
/* @__PURE__ */ React.createElement(Box, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Press ", /* @__PURE__ */ React.createElement(Text, { bold: true }, "p"), " to view plugins from this marketplace"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Press ", /* @__PURE__ */ React.createElement(Text, { bold: true }, "u"), " to update marketplace"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Press ", /* @__PURE__ */ React.createElement(Text, { bold: true }, "r"), " to remove marketplace"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Press ", /* @__PURE__ */ React.createElement(Text, { bold: true }, "Esc"), " to go back"))
|
|
383
442
|
);
|
|
384
443
|
};
|
|
385
|
-
const InteractivePluginCommand = ({
|
|
444
|
+
const InteractivePluginCommand = ({
|
|
445
|
+
onDone
|
|
446
|
+
}) => {
|
|
386
447
|
const [navigationStack, setNavigationStack] = useState([
|
|
387
448
|
{ screen: "main-menu" }
|
|
388
449
|
]);
|
|
@@ -399,30 +460,110 @@ const InteractivePluginCommand = ({ onDone }) => {
|
|
|
399
460
|
};
|
|
400
461
|
switch (currentState.screen) {
|
|
401
462
|
case "main-menu":
|
|
402
|
-
return /* @__PURE__ */ React.createElement(
|
|
463
|
+
return /* @__PURE__ */ React.createElement(
|
|
464
|
+
MainMenu,
|
|
465
|
+
{
|
|
466
|
+
onNavigate: handleNavigate,
|
|
467
|
+
onBack: handleBack,
|
|
468
|
+
onDone
|
|
469
|
+
}
|
|
470
|
+
);
|
|
403
471
|
case "marketplace-selector":
|
|
404
|
-
return /* @__PURE__ */ React.createElement(
|
|
472
|
+
return /* @__PURE__ */ React.createElement(
|
|
473
|
+
MarketplaceSelector,
|
|
474
|
+
{
|
|
475
|
+
onNavigate: handleNavigate,
|
|
476
|
+
onBack: handleBack,
|
|
477
|
+
onDone
|
|
478
|
+
}
|
|
479
|
+
);
|
|
405
480
|
case "plugin-browser":
|
|
406
|
-
return /* @__PURE__ */ React.createElement(
|
|
481
|
+
return /* @__PURE__ */ React.createElement(
|
|
482
|
+
PluginBrowser,
|
|
483
|
+
{
|
|
484
|
+
marketplace: currentState.marketplace,
|
|
485
|
+
onNavigate: handleNavigate,
|
|
486
|
+
onBack: handleBack,
|
|
487
|
+
onDone
|
|
488
|
+
}
|
|
489
|
+
);
|
|
407
490
|
case "plugin-details-install":
|
|
408
|
-
return /* @__PURE__ */ React.createElement(
|
|
491
|
+
return /* @__PURE__ */ React.createElement(
|
|
492
|
+
PluginDetailsInstall,
|
|
493
|
+
{
|
|
494
|
+
marketplace: currentState.marketplace,
|
|
495
|
+
plugin: currentState.plugin,
|
|
496
|
+
onNavigate: handleNavigate,
|
|
497
|
+
onBack: handleBack,
|
|
498
|
+
onDone
|
|
499
|
+
}
|
|
500
|
+
);
|
|
409
501
|
case "installed-plugins-manager":
|
|
410
|
-
return /* @__PURE__ */ React.createElement(
|
|
502
|
+
return /* @__PURE__ */ React.createElement(
|
|
503
|
+
InstalledPluginsManager,
|
|
504
|
+
{
|
|
505
|
+
key: navigationStack.length,
|
|
506
|
+
onNavigate: handleNavigate,
|
|
507
|
+
onBack: handleBack,
|
|
508
|
+
onDone
|
|
509
|
+
}
|
|
510
|
+
);
|
|
411
511
|
case "installed-plugins-by-marketplace":
|
|
412
|
-
return /* @__PURE__ */ React.createElement(
|
|
512
|
+
return /* @__PURE__ */ React.createElement(
|
|
513
|
+
InstalledPluginsByMarketplace,
|
|
514
|
+
{
|
|
515
|
+
marketplace: currentState.marketplace,
|
|
516
|
+
onNavigate: handleNavigate,
|
|
517
|
+
onBack: handleBack,
|
|
518
|
+
onDone
|
|
519
|
+
}
|
|
520
|
+
);
|
|
413
521
|
case "plugin-details-manage":
|
|
414
|
-
return /* @__PURE__ */ React.createElement(
|
|
522
|
+
return /* @__PURE__ */ React.createElement(
|
|
523
|
+
PluginDetailsManage,
|
|
524
|
+
{
|
|
525
|
+
plugin: currentState.plugin,
|
|
526
|
+
onNavigate: handleNavigate,
|
|
527
|
+
onBack: handleBack,
|
|
528
|
+
onDone
|
|
529
|
+
}
|
|
530
|
+
);
|
|
415
531
|
case "add-marketplace":
|
|
416
|
-
return /* @__PURE__ */ React.createElement(
|
|
532
|
+
return /* @__PURE__ */ React.createElement(
|
|
533
|
+
AddMarketplaceForm,
|
|
534
|
+
{
|
|
535
|
+
onNavigate: handleNavigate,
|
|
536
|
+
onBack: handleBack,
|
|
537
|
+
onDone
|
|
538
|
+
}
|
|
539
|
+
);
|
|
417
540
|
case "marketplace-manager":
|
|
418
|
-
return /* @__PURE__ */ React.createElement(
|
|
541
|
+
return /* @__PURE__ */ React.createElement(
|
|
542
|
+
MarketplaceManager,
|
|
543
|
+
{
|
|
544
|
+
onNavigate: handleNavigate,
|
|
545
|
+
onBack: handleBack,
|
|
546
|
+
onDone
|
|
547
|
+
}
|
|
548
|
+
);
|
|
419
549
|
case "marketplace-details":
|
|
420
|
-
return /* @__PURE__ */ React.createElement(
|
|
550
|
+
return /* @__PURE__ */ React.createElement(
|
|
551
|
+
MarketplaceDetails,
|
|
552
|
+
{
|
|
553
|
+
marketplace: currentState.marketplace,
|
|
554
|
+
onNavigate: handleNavigate,
|
|
555
|
+
onBack: handleBack,
|
|
556
|
+
onDone
|
|
557
|
+
}
|
|
558
|
+
);
|
|
421
559
|
default:
|
|
422
560
|
return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "Unknown screen state"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Press Esc to exit"));
|
|
423
561
|
}
|
|
424
562
|
};
|
|
425
|
-
const LegacyPluginCommand = ({
|
|
563
|
+
const LegacyPluginCommand = ({
|
|
564
|
+
args,
|
|
565
|
+
onDone
|
|
566
|
+
}) => {
|
|
426
567
|
const theme = getTheme();
|
|
427
568
|
const parts = args.trim().split(/\s+/).filter(Boolean);
|
|
428
569
|
const subcommand = parts[0];
|
|
@@ -433,24 +574,42 @@ const LegacyPluginCommand = ({ args, onDone }) => {
|
|
|
433
574
|
}
|
|
434
575
|
}, [subcommand, onDone]);
|
|
435
576
|
if (!subcommand || subcommand === "help" || subcommand === "--help") {
|
|
436
|
-
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, { 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, { dimColor: true }, "Examples:"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "
|
|
577
|
+
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, { 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, { dimColor: true }, "Examples:"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " /plugin list"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " /plugin info my-plugin"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " /plugin install awesome-plugin@official"), /* @__PURE__ */ React.createElement(Text, { dimColor: true }, " /plugin marketplace add owner/repo"));
|
|
437
578
|
}
|
|
438
579
|
switch (subcommand) {
|
|
439
580
|
case "list":
|
|
440
581
|
return /* @__PURE__ */ React.createElement(PluginList, { onDone });
|
|
441
582
|
case "info":
|
|
442
583
|
if (subArgs.length === 0) {
|
|
443
|
-
return /* @__PURE__ */ React.createElement(
|
|
584
|
+
return /* @__PURE__ */ React.createElement(
|
|
585
|
+
ErrorMessage,
|
|
586
|
+
{
|
|
587
|
+
message: "Plugin name required. Usage: /plugin info <name>",
|
|
588
|
+
onDone
|
|
589
|
+
}
|
|
590
|
+
);
|
|
444
591
|
}
|
|
445
592
|
return /* @__PURE__ */ React.createElement(PluginInfo, { pluginName: subArgs[0], onDone });
|
|
446
593
|
case "install":
|
|
447
594
|
if (subArgs.length === 0) {
|
|
448
|
-
return /* @__PURE__ */ React.createElement(
|
|
595
|
+
return /* @__PURE__ */ React.createElement(
|
|
596
|
+
ErrorMessage,
|
|
597
|
+
{
|
|
598
|
+
message: "Plugin spec required. Usage: /plugin install <name>[@marketplace]",
|
|
599
|
+
onDone
|
|
600
|
+
}
|
|
601
|
+
);
|
|
449
602
|
}
|
|
450
603
|
return /* @__PURE__ */ React.createElement(PluginInstall, { pluginSpec: subArgs[0], onDone });
|
|
451
604
|
case "uninstall":
|
|
452
605
|
if (subArgs.length === 0) {
|
|
453
|
-
return /* @__PURE__ */ React.createElement(
|
|
606
|
+
return /* @__PURE__ */ React.createElement(
|
|
607
|
+
ErrorMessage,
|
|
608
|
+
{
|
|
609
|
+
message: "Plugin name required. Usage: /plugin uninstall <name>",
|
|
610
|
+
onDone
|
|
611
|
+
}
|
|
612
|
+
);
|
|
454
613
|
}
|
|
455
614
|
return /* @__PURE__ */ React.createElement(PluginUninstall, { pluginName: subArgs[0], onDone });
|
|
456
615
|
case "validate":
|
|
@@ -463,17 +622,35 @@ const LegacyPluginCommand = ({ args, onDone }) => {
|
|
|
463
622
|
return /* @__PURE__ */ React.createElement(MarketplaceListView, { onDone });
|
|
464
623
|
case "add":
|
|
465
624
|
if (marketplaceArgs.length === 0) {
|
|
466
|
-
return /* @__PURE__ */ React.createElement(
|
|
625
|
+
return /* @__PURE__ */ React.createElement(
|
|
626
|
+
ErrorMessage,
|
|
627
|
+
{
|
|
628
|
+
message: "Source required. Usage: /plugin marketplace add <source>",
|
|
629
|
+
onDone
|
|
630
|
+
}
|
|
631
|
+
);
|
|
467
632
|
}
|
|
468
633
|
return /* @__PURE__ */ React.createElement(MarketplaceAdd, { source: marketplaceArgs[0], onDone });
|
|
469
634
|
case "update":
|
|
470
635
|
if (marketplaceArgs.length === 0) {
|
|
471
|
-
return /* @__PURE__ */ React.createElement(
|
|
636
|
+
return /* @__PURE__ */ React.createElement(
|
|
637
|
+
ErrorMessage,
|
|
638
|
+
{
|
|
639
|
+
message: "Marketplace name required. Usage: /plugin marketplace update <name>",
|
|
640
|
+
onDone
|
|
641
|
+
}
|
|
642
|
+
);
|
|
472
643
|
}
|
|
473
644
|
return /* @__PURE__ */ React.createElement(MarketplaceUpdate, { name: marketplaceArgs[0], onDone });
|
|
474
645
|
case "remove":
|
|
475
646
|
if (marketplaceArgs.length === 0) {
|
|
476
|
-
return /* @__PURE__ */ React.createElement(
|
|
647
|
+
return /* @__PURE__ */ React.createElement(
|
|
648
|
+
ErrorMessage,
|
|
649
|
+
{
|
|
650
|
+
message: "Marketplace name required. Usage: /plugin marketplace remove <name>",
|
|
651
|
+
onDone
|
|
652
|
+
}
|
|
653
|
+
);
|
|
477
654
|
}
|
|
478
655
|
return /* @__PURE__ */ React.createElement(MarketplaceRemove, { name: marketplaceArgs[0], onDone });
|
|
479
656
|
default:
|
|
@@ -495,7 +672,10 @@ const LegacyPluginCommand = ({ args, onDone }) => {
|
|
|
495
672
|
);
|
|
496
673
|
}
|
|
497
674
|
};
|
|
498
|
-
const PluginCommand = ({
|
|
675
|
+
const PluginCommand = ({
|
|
676
|
+
args,
|
|
677
|
+
onDone
|
|
678
|
+
}) => {
|
|
499
679
|
if (args.trim()) {
|
|
500
680
|
return /* @__PURE__ */ React.createElement(LegacyPluginCommand, { args, onDone });
|
|
501
681
|
} else {
|