@within-7/minto 0.0.12 → 0.0.13

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/.npmrc ADDED
@@ -0,0 +1,3 @@
1
+ # Minto npm configuration
2
+ package-lock=false
3
+ save-exact=true
@@ -0,0 +1,113 @@
1
+ import React from "react";
2
+ import { Text, Box } from "ink";
3
+ import { SimpleSpinner } from "../components/Spinner.js";
4
+ import {
5
+ fetchTeamConfig,
6
+ loadTeamConfigFromFile,
7
+ applyTeamConfig,
8
+ addMarketplaces,
9
+ installPlugins
10
+ } from "../utils/teamConfig.js";
11
+ function SetupComponent({ source, strategy = "merge", installPlugins: shouldInstallPlugins = true, onDone }) {
12
+ const [state, setState] = React.useState({ stage: "loading" });
13
+ React.useEffect(() => {
14
+ async function init() {
15
+ try {
16
+ setState({ stage: "loading" });
17
+ const teamConfig = source.startsWith("http://") || source.startsWith("https://") ? await fetchTeamConfig(source) : loadTeamConfigFromFile(source);
18
+ setState({ stage: "applying" });
19
+ const result = applyTeamConfig(teamConfig, strategy);
20
+ let marketplacesAdded = 0;
21
+ if (shouldInstallPlugins && teamConfig.plugins?.marketplaces) {
22
+ const marketplaceCount = teamConfig.plugins.marketplaces.length;
23
+ setState({ stage: "adding-marketplaces", total: marketplaceCount });
24
+ const marketplaceResult = await addMarketplaces(
25
+ teamConfig.plugins.marketplaces
26
+ );
27
+ marketplacesAdded = marketplaceResult.added;
28
+ }
29
+ let pluginsInstalled = 0;
30
+ if (shouldInstallPlugins && teamConfig.plugins?.install) {
31
+ const pluginCount = teamConfig.plugins.install.length;
32
+ setState({ stage: "installing-plugins", total: pluginCount });
33
+ const pluginResult = await installPlugins(
34
+ teamConfig.plugins.install
35
+ );
36
+ pluginsInstalled = pluginResult.installed;
37
+ }
38
+ setState({
39
+ stage: "success",
40
+ modelsAdded: result.modelsAdded,
41
+ mcpServersAdded: result.mcpServersAdded,
42
+ settingsUpdated: result.settingsUpdated,
43
+ marketplacesAdded: marketplacesAdded > 0 ? marketplacesAdded : void 0,
44
+ pluginsInstalled: pluginsInstalled > 0 ? pluginsInstalled : void 0,
45
+ instructions: teamConfig.postInstallInstructions
46
+ });
47
+ setTimeout(() => onDone("Configuration applied successfully"), 2e3);
48
+ } catch (error) {
49
+ const errorMessage = error instanceof Error ? error.message : String(error);
50
+ setState({
51
+ stage: "error",
52
+ message: errorMessage
53
+ });
54
+ setTimeout(() => onDone(), 2e3);
55
+ }
56
+ }
57
+ init();
58
+ }, [source, strategy, shouldInstallPlugins, onDone]);
59
+ if (state.stage === "loading") {
60
+ return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, /* @__PURE__ */ React.createElement(SimpleSpinner, null), " Loading configuration from ", source, "..."));
61
+ }
62
+ if (state.stage === "applying") {
63
+ return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, /* @__PURE__ */ React.createElement(SimpleSpinner, null), " Applying configuration..."));
64
+ }
65
+ if (state.stage === "adding-marketplaces") {
66
+ return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, /* @__PURE__ */ React.createElement(SimpleSpinner, null), " Adding ", state.total, " marketplace", state.total !== 1 ? "s" : "", "..."));
67
+ }
68
+ if (state.stage === "installing-plugins") {
69
+ return /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, /* @__PURE__ */ React.createElement(SimpleSpinner, null), " Installing ", state.total, " plugin", state.total !== 1 ? "s" : "", "..."));
70
+ }
71
+ if (state.stage === "error") {
72
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "\u2717 Initialization failed"), /* @__PURE__ */ React.createElement(Text, { color: "red" }, state.message));
73
+ }
74
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingY: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "green", bold: true }, "\u2713 Configuration applied successfully!"), /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingTop: 1 }, state.modelsAdded > 0 && /* @__PURE__ */ React.createElement(Text, null, "\u2022 Added ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, state.modelsAdded), " model profile", state.modelsAdded !== 1 ? "s" : ""), state.mcpServersAdded > 0 && /* @__PURE__ */ React.createElement(Text, null, "\u2022 Added ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, state.mcpServersAdded), " MCP server", state.mcpServersAdded !== 1 ? "s" : ""), state.settingsUpdated.length > 0 && /* @__PURE__ */ React.createElement(Text, null, "\u2022 Updated ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, state.settingsUpdated.length), " setting", state.settingsUpdated.length !== 1 ? "s" : "", ":", " ", state.settingsUpdated.join(", ")), state.marketplacesAdded !== void 0 && state.marketplacesAdded > 0 && /* @__PURE__ */ React.createElement(Text, null, "\u2022 Added ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, state.marketplacesAdded), " marketplace", state.marketplacesAdded !== 1 ? "s" : ""), state.pluginsInstalled !== void 0 && state.pluginsInstalled > 0 && /* @__PURE__ */ React.createElement(Text, null, "\u2022 Installed ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, state.pluginsInstalled), " plugin", state.pluginsInstalled !== 1 ? "s" : "")), state.instructions && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingTop: 1, borderStyle: "round", borderColor: "yellow", paddingX: 1 }, /* @__PURE__ */ React.createElement(Text, { color: "yellow", bold: true }, "\u{1F4CB} Next Steps:"), /* @__PURE__ */ React.createElement(Text, null, state.instructions)), /* @__PURE__ */ React.createElement(Box, { paddingTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Run ", /* @__PURE__ */ React.createElement(Text, { color: "cyan" }, "minto"), " to start using your configured setup.")));
75
+ }
76
+ const command = {
77
+ type: "local-jsx",
78
+ name: "setup",
79
+ description: "Initialize Minto with team configuration from a URL or file",
80
+ isEnabled: true,
81
+ isHidden: false,
82
+ userFacingName() {
83
+ return "setup";
84
+ },
85
+ async call(onDone, _context) {
86
+ const args = process.argv.slice(2);
87
+ const fromIndex = args.findIndex((arg) => arg === "--from");
88
+ const strategyIndex = args.findIndex((arg) => arg === "--strategy");
89
+ const noPluginsFlag = args.includes("--no-plugins");
90
+ if (fromIndex === -1 || !args[fromIndex + 1]) {
91
+ onDone();
92
+ return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column" }, /* @__PURE__ */ React.createElement(Text, { color: "red" }, "Error: --from parameter is required"), /* @__PURE__ */ React.createElement(Text, null, "Usage: minto setup --from <url|path> [--strategy <merge|replace|skip-existing>] [--no-plugins]"));
93
+ }
94
+ const source = args[fromIndex + 1];
95
+ const strategy = strategyIndex !== -1 && args[strategyIndex + 1] ? args[strategyIndex + 1] : "merge";
96
+ const shouldInstallPlugins = !noPluginsFlag;
97
+ return /* @__PURE__ */ React.createElement(
98
+ SetupComponent,
99
+ {
100
+ source,
101
+ strategy,
102
+ installPlugins: shouldInstallPlugins,
103
+ onDone
104
+ }
105
+ );
106
+ }
107
+ };
108
+ var setup_default = command;
109
+ export {
110
+ SetupComponent,
111
+ setup_default as default
112
+ };
113
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/commands/setup.tsx"],
4
+ "sourcesContent": ["/**\n * Setup Command\n *\n * Initialize Minto with a team configuration from a remote URL or local file\n */\n\nimport React from 'react'\nimport { Text, Box } from 'ink'\nimport { SimpleSpinner } from '@components/Spinner'\nimport type { Command } from '@commands'\nimport {\n fetchTeamConfig,\n loadTeamConfigFromFile,\n applyTeamConfig,\n addMarketplaces,\n installPlugins,\n type MergeStrategy,\n} from '@utils/teamConfig'\n\ntype SetupProps = {\n source: string // URL or file path\n strategy?: MergeStrategy\n installPlugins?: boolean\n onDone: (result?: string) => void\n}\n\ntype SetupState =\n | { stage: 'loading' }\n | { stage: 'applying' }\n | { stage: 'adding-marketplaces'; total: number }\n | { stage: 'installing-plugins'; total: number }\n | {\n stage: 'success'\n modelsAdded: number\n mcpServersAdded: number\n settingsUpdated: string[]\n marketplacesAdded?: number\n pluginsInstalled?: number\n instructions?: string\n }\n | { stage: 'error'; message: string }\n\nexport function SetupComponent({ source, strategy = 'merge', installPlugins: shouldInstallPlugins = true, onDone }: SetupProps) {\n const [state, setState] = React.useState<SetupState>({ stage: 'loading' })\n\n React.useEffect(() => {\n async function init() {\n try {\n // Step 1: Load configuration\n setState({ stage: 'loading' })\n\n const teamConfig = source.startsWith('http://') || source.startsWith('https://')\n ? await fetchTeamConfig(source)\n : loadTeamConfigFromFile(source)\n\n // Step 2: Apply configuration\n setState({ stage: 'applying' })\n\n const result = applyTeamConfig(teamConfig, strategy)\n\n // Step 3: Add marketplaces (if configured)\n let marketplacesAdded = 0\n if (shouldInstallPlugins && teamConfig.plugins?.marketplaces) {\n const marketplaceCount = teamConfig.plugins.marketplaces.length\n setState({ stage: 'adding-marketplaces', total: marketplaceCount })\n\n const marketplaceResult = await addMarketplaces(\n teamConfig.plugins.marketplaces,\n )\n\n marketplacesAdded = marketplaceResult.added\n }\n\n // Step 4: Install plugins (if configured)\n let pluginsInstalled = 0\n if (shouldInstallPlugins && teamConfig.plugins?.install) {\n const pluginCount = teamConfig.plugins.install.length\n setState({ stage: 'installing-plugins', total: pluginCount })\n\n const pluginResult = await installPlugins(\n teamConfig.plugins.install,\n )\n\n pluginsInstalled = pluginResult.installed\n }\n\n // Success\n setState({\n stage: 'success',\n modelsAdded: result.modelsAdded,\n mcpServersAdded: result.mcpServersAdded,\n settingsUpdated: result.settingsUpdated,\n marketplacesAdded: marketplacesAdded > 0 ? marketplacesAdded : undefined,\n pluginsInstalled: pluginsInstalled > 0 ? pluginsInstalled : undefined,\n instructions: teamConfig.postInstallInstructions,\n })\n\n // Notify parent component\n setTimeout(() => onDone('Configuration applied successfully'), 2000)\n } catch (error) {\n const errorMessage = error instanceof Error ? error.message : String(error)\n setState({\n stage: 'error',\n message: errorMessage,\n })\n\n // Notify parent component of error\n setTimeout(() => onDone(), 2000)\n }\n }\n\n init()\n }, [source, strategy, shouldInstallPlugins, onDone])\n\n if (state.stage === 'loading') {\n return (\n <Box>\n <Text color=\"cyan\">\n <SimpleSpinner /> Loading configuration from {source}...\n </Text>\n </Box>\n )\n }\n\n if (state.stage === 'applying') {\n return (\n <Box>\n <Text color=\"cyan\">\n <SimpleSpinner /> Applying configuration...\n </Text>\n </Box>\n )\n }\n\n if (state.stage === 'adding-marketplaces') {\n return (\n <Box>\n <Text color=\"cyan\">\n <SimpleSpinner /> Adding {state.total} marketplace\n {state.total !== 1 ? 's' : ''}...\n </Text>\n </Box>\n )\n }\n\n if (state.stage === 'installing-plugins') {\n return (\n <Box>\n <Text color=\"cyan\">\n <SimpleSpinner /> Installing {state.total} plugin\n {state.total !== 1 ? 's' : ''}...\n </Text>\n </Box>\n )\n }\n\n if (state.stage === 'error') {\n return (\n <Box flexDirection=\"column\">\n <Text color=\"red\">\u2717 Initialization failed</Text>\n <Text color=\"red\">{state.message}</Text>\n </Box>\n )\n }\n\n // Success state\n return (\n <Box flexDirection=\"column\" paddingY={1}>\n <Text color=\"green\" bold>\n \u2713 Configuration applied successfully!\n </Text>\n\n <Box flexDirection=\"column\" paddingTop={1}>\n {state.modelsAdded > 0 && (\n <Text>\n \u2022 Added <Text color=\"cyan\">{state.modelsAdded}</Text> model profile\n {state.modelsAdded !== 1 ? 's' : ''}\n </Text>\n )}\n\n {state.mcpServersAdded > 0 && (\n <Text>\n \u2022 Added <Text color=\"cyan\">{state.mcpServersAdded}</Text> MCP server\n {state.mcpServersAdded !== 1 ? 's' : ''}\n </Text>\n )}\n\n {state.settingsUpdated.length > 0 && (\n <Text>\n \u2022 Updated <Text color=\"cyan\">{state.settingsUpdated.length}</Text> setting\n {state.settingsUpdated.length !== 1 ? 's' : ''}:{' '}\n {state.settingsUpdated.join(', ')}\n </Text>\n )}\n\n {state.marketplacesAdded !== undefined && state.marketplacesAdded > 0 && (\n <Text>\n \u2022 Added <Text color=\"cyan\">{state.marketplacesAdded}</Text> marketplace\n {state.marketplacesAdded !== 1 ? 's' : ''}\n </Text>\n )}\n\n {state.pluginsInstalled !== undefined && state.pluginsInstalled > 0 && (\n <Text>\n \u2022 Installed <Text color=\"cyan\">{state.pluginsInstalled}</Text> plugin\n {state.pluginsInstalled !== 1 ? 's' : ''}\n </Text>\n )}\n </Box>\n\n {state.instructions && (\n <Box flexDirection=\"column\" paddingTop={1} borderStyle=\"round\" borderColor=\"yellow\" paddingX={1}>\n <Text color=\"yellow\" bold>\n \uD83D\uDCCB Next Steps:\n </Text>\n <Text>{state.instructions}</Text>\n </Box>\n )}\n\n <Box paddingTop={1}>\n <Text dimColor>\n Run <Text color=\"cyan\">minto</Text> to start using your configured setup.\n </Text>\n </Box>\n </Box>\n )\n}\n\n// Command definition\nconst command = {\n type: 'local-jsx',\n name: 'setup',\n description: 'Initialize Minto with team configuration from a URL or file',\n isEnabled: true,\n isHidden: false,\n userFacingName() {\n return 'setup'\n },\n async call(onDone, _context) {\n // Parse arguments\n const args = process.argv.slice(2)\n const fromIndex = args.findIndex(arg => arg === '--from')\n const strategyIndex = args.findIndex(arg => arg === '--strategy')\n const noPluginsFlag = args.includes('--no-plugins')\n\n if (fromIndex === -1 || !args[fromIndex + 1]) {\n onDone()\n return (\n <Box flexDirection=\"column\">\n <Text color=\"red\">Error: --from parameter is required</Text>\n <Text>\n Usage: minto setup --from &lt;url|path&gt; [--strategy &lt;merge|replace|skip-existing&gt;] [--no-plugins]\n </Text>\n </Box>\n )\n }\n\n const source = args[fromIndex + 1]\n const strategy: MergeStrategy =\n strategyIndex !== -1 && args[strategyIndex + 1]\n ? (args[strategyIndex + 1] as MergeStrategy)\n : 'merge'\n const shouldInstallPlugins = !noPluginsFlag\n\n return (\n <SetupComponent\n source={source}\n strategy={strategy}\n installPlugins={shouldInstallPl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MAAM,UAAU;AAAA,EACd,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,iBAAiB;AACf,WAAO;AAAA,EACT;AAAA,EACA,MAAM,KAAK,QAAQ,UAAU;AAE3B,UAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AACjC,UAAM,YAAY,KAAK,UAAU,SAAO,QAAQ,QAAQ;AACxD,UAAM,gBAAgB,KAAK,UAAU,SAAO,QAAQ,YAAY;AAChE,UAAM,gBAAgB,KAAK,SAAS,cAAc;AAElD,QAAI,cAAc,MAAM,CAAC,KAAK,YAAY,CAAC,GAAG;AAC5C,aAAO;AACP,aACE,oCAAC,OAAI,eAAc,YACjB,oCAAC,QAAK,OAAM,SAAM,qCAAmC,GACrD,oCAAC,YAAK,gGAEN,CACF;AAAA,IAEJ;AAEA,UAAM,SAAS,KAAK,YAAY,CAAC;AACjC,UAAM,WACJ,kBAAkB,MAAM,KAAK,gBAAgB,CAAC,IACzC,KAAK,gBAAgB,CAAC,IACvB;AACN,UAAM,uBAAuB,CAAC;AAE9B,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,gBAAgB;AAAA,QAChB;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
6
+ "names": []
7
+ }
package/dist/commands.js CHANGED
@@ -19,6 +19,7 @@ import pr_comments from "./commands/pr_comments.js";
19
19
  import refreshCommands from "./commands/refreshCommands.js";
20
20
  import releaseNotes from "./commands/release-notes.js";
21
21
  import review from "./commands/review.js";
22
+ import setup from "./commands/setup.js";
22
23
  import terminalSetup from "./commands/terminalSetup.js";
23
24
  import resume from "./commands/resume.js";
24
25
  import agents from "./commands/agents.js";
@@ -50,6 +51,7 @@ const COMMANDS = memoize(() => [
50
51
  releaseNotes,
51
52
  bug,
52
53
  review,
54
+ setup,
53
55
  terminalSetup,
54
56
  ...isAnthropicAuthEnabled() ? [logout, login()] : [],
55
57
  ...INTERNAL_ONLY_COMMANDS
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/commands.ts"],
4
- "sourcesContent": ["import React from 'react'\nimport bug from './commands/bug'\nimport clear from './commands/clear'\nimport compact from './commands/compact'\nimport compression from './commands/compression'\nimport config from './commands/config'\nimport cost from './commands/cost'\nimport ctx_viz from './commands/ctx_viz'\nimport doctor from './commands/doctor'\nimport help from './commands/help'\nimport init from './commands/init'\nimport listen from './commands/listen'\nimport login from './commands/login'\nimport logout from './commands/logout'\nimport mcp from './commands/mcp-interactive'\nimport * as model from './commands/model'\nimport modelstatus from './commands/modelstatus'\nimport onboarding from './commands/onboarding'\nimport pr_comments from './commands/pr_comments'\nimport refreshCommands from './commands/refreshCommands'\nimport releaseNotes from './commands/release-notes'\nimport review from './commands/review'\nimport terminalSetup from './commands/terminalSetup'\nimport { Tool, ToolUseContext } from './Tool'\nimport resume from './commands/resume'\nimport agents from './commands/agents'\nimport plugin from './commands/plugin'\nimport { quit } from './commands/quit'\nimport { getMCPCommands } from './services/mcpClient'\nimport { loadCustomCommands, loadPluginCommands } from './services/customCommands'\nimport type { MessageParam } from '@anthropic-ai/sdk/resources/index.mjs'\nimport { memoize } from 'lodash-es'\nimport type { Message } from './query'\nimport { isAnthropicAuthEnabled } from './utils/auth'\n\ntype PromptCommand = {\n type: 'prompt'\n progressMessage: string\n argNames?: string[]\n getPromptForCommand(args: string): Promise<MessageParam[]>\n}\n\ntype LocalCommand = {\n type: 'local'\n call(\n args: string,\n context: {\n options: {\n commands: Command[]\n tools: Tool[]\n slowAndCapableModel: string\n }\n abortController: AbortController\n setForkConvoWithMessagesOnTheNextRender: (\n forkConvoWithMessages: Message[],\n ) => void\n },\n ): Promise<string>\n}\n\ntype LocalJSXCommand = {\n type: 'local-jsx'\n call(\n onDone: (result?: string) => void,\n context: ToolUseContext & {\n setForkConvoWithMessagesOnTheNextRender: (\n forkConvoWithMessages: Message[],\n ) => void\n },\n ): Promise<React.ReactNode>\n}\n\nexport type Command = {\n description: string\n isEnabled: boolean\n isHidden: boolean\n name: string\n aliases?: string[]\n userFacingName(): string\n} & (PromptCommand | LocalCommand | LocalJSXCommand)\n\nconst INTERNAL_ONLY_COMMANDS = [ctx_viz, resume, listen]\n\n// Declared as a function so that we don't run this until getCommands is called,\n// since underlying functions read from config, which can't be read at module initialization time\nconst COMMANDS = memoize((): Command[] => [\n agents,\n plugin,\n clear,\n compact,\n compression,\n config,\n cost,\n doctor,\n help,\n init,\n mcp,\n model,\n modelstatus,\n onboarding,\n pr_comments,\n quit,\n refreshCommands,\n releaseNotes,\n bug,\n review,\n terminalSetup,\n ...(isAnthropicAuthEnabled() ? [logout, login()] : []),\n ...INTERNAL_ONLY_COMMANDS,\n])\n\nexport const getCommands = memoize(async (): Promise<Command[]> => {\n const [mcpCommands, customCommands, pluginCommands] = await Promise.all([\n getMCPCommands(),\n loadCustomCommands(),\n loadPluginCommands(),\n ])\n\n // Get built-in commands\n const builtInCommands = COMMANDS()\n\n // Sort built-in commands alphabetically by name\n const sortedBuiltIn = [...builtInCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort MCP commands alphabetically by name\n const sortedMCP = [...mcpCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort plugin commands alphabetically by name\n const sortedPlugin = [...pluginCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort custom commands alphabetically by name\n const sortedCustom = [...customCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Command priority (later overrides earlier):\n // 1. MCP commands (lowest priority) - sorted alphabetically\n // 2. Plugin commands - sorted alphabetically\n // 3. Custom commands (user/project) - sorted alphabetically\n // 4. Built-in commands (highest priority) - sorted alphabetically\n // Display order: Built-in first, then custom/plugin/MCP\n return [...sortedBuiltIn, ...sortedCustom, ...sortedPlugin, ...sortedMCP].filter(\n _ => _.isEnabled,\n )\n})\n\nexport function hasCommand(commandName: string, commands: Command[]): boolean {\n return commands.some(\n _ => _.userFacingName() === commandName || _.aliases?.includes(commandName),\n )\n}\n\nexport function getCommand(commandName: string, commands: Command[]): Command {\n const command = commands.find(\n _ => _.userFacingName() === commandName || _.aliases?.includes(commandName),\n ) as Command | undefined\n if (!command) {\n throw ReferenceError(\n `Command ${commandName} not found. Available commands: ${commands\n .map(_ => {\n const name = _.userFacingName()\n return _.aliases ? `${name} (aliases: ${_.aliases.join(', ')})` : name\n })\n .join(', ')}`,\n )\n }\n\n return command\n}\n"],
5
- "mappings": "AACA,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,YAAY,WAAW;AACvB,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAC5B,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO,mBAAmB;AAE1B,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,0BAA0B;AAEvD,SAAS,eAAe;AAExB,SAAS,8BAA8B;AAgDvC,MAAM,yBAAyB,CAAC,SAAS,QAAQ,MAAM;AAIvD,MAAM,WAAW,QAAQ,MAAiB;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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5E;AACA,MAAI,CAAC,SAAS;AACZ,UAAM;AAAA,MACJ,WAAW,WAAW,mCAAmC,SACtD,IAAI,OAAK;AACR,cAAM,OAAO,EAAE,eAAe;AAC9B,eAAO,EAAE,UAAU,GAAG,IAAI,cAAc,EAAE,QAAQ,KAAK,IAAI,CAAC,MAAM;AAAA,MACpE,CAAC,EACA,KAAK,IAAI,CAAC;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;",
4
+ "sourcesContent": ["import React from 'react'\nimport bug from './commands/bug'\nimport clear from './commands/clear'\nimport compact from './commands/compact'\nimport compression from './commands/compression'\nimport config from './commands/config'\nimport cost from './commands/cost'\nimport ctx_viz from './commands/ctx_viz'\nimport doctor from './commands/doctor'\nimport help from './commands/help'\nimport init from './commands/init'\nimport listen from './commands/listen'\nimport login from './commands/login'\nimport logout from './commands/logout'\nimport mcp from './commands/mcp-interactive'\nimport * as model from './commands/model'\nimport modelstatus from './commands/modelstatus'\nimport onboarding from './commands/onboarding'\nimport pr_comments from './commands/pr_comments'\nimport refreshCommands from './commands/refreshCommands'\nimport releaseNotes from './commands/release-notes'\nimport review from './commands/review'\nimport setup from './commands/setup'\nimport terminalSetup from './commands/terminalSetup'\nimport { Tool, ToolUseContext } from './Tool'\nimport resume from './commands/resume'\nimport agents from './commands/agents'\nimport plugin from './commands/plugin'\nimport { quit } from './commands/quit'\nimport { getMCPCommands } from './services/mcpClient'\nimport { loadCustomCommands, loadPluginCommands } from './services/customCommands'\nimport type { MessageParam } from '@anthropic-ai/sdk/resources/index.mjs'\nimport { memoize } from 'lodash-es'\nimport type { Message } from './query'\nimport { isAnthropicAuthEnabled } from './utils/auth'\n\ntype PromptCommand = {\n type: 'prompt'\n progressMessage: string\n argNames?: string[]\n getPromptForCommand(args: string): Promise<MessageParam[]>\n}\n\ntype LocalCommand = {\n type: 'local'\n call(\n args: string,\n context: {\n options: {\n commands: Command[]\n tools: Tool[]\n slowAndCapableModel: string\n }\n abortController: AbortController\n setForkConvoWithMessagesOnTheNextRender: (\n forkConvoWithMessages: Message[],\n ) => void\n },\n ): Promise<string>\n}\n\ntype LocalJSXCommand = {\n type: 'local-jsx'\n call(\n onDone: (result?: string) => void,\n context: ToolUseContext & {\n setForkConvoWithMessagesOnTheNextRender: (\n forkConvoWithMessages: Message[],\n ) => void\n },\n ): Promise<React.ReactNode>\n}\n\nexport type Command = {\n description: string\n isEnabled: boolean\n isHidden: boolean\n name: string\n aliases?: string[]\n userFacingName(): string\n} & (PromptCommand | LocalCommand | LocalJSXCommand)\n\nconst INTERNAL_ONLY_COMMANDS = [ctx_viz, resume, listen]\n\n// Declared as a function so that we don't run this until getCommands is called,\n// since underlying functions read from config, which can't be read at module initialization time\nconst COMMANDS = memoize((): Command[] => [\n agents,\n plugin,\n clear,\n compact,\n compression,\n config,\n cost,\n doctor,\n help,\n init,\n mcp,\n model,\n modelstatus,\n onboarding,\n pr_comments,\n quit,\n refreshCommands,\n releaseNotes,\n bug,\n review,\n setup,\n terminalSetup,\n ...(isAnthropicAuthEnabled() ? [logout, login()] : []),\n ...INTERNAL_ONLY_COMMANDS,\n])\n\nexport const getCommands = memoize(async (): Promise<Command[]> => {\n const [mcpCommands, customCommands, pluginCommands] = await Promise.all([\n getMCPCommands(),\n loadCustomCommands(),\n loadPluginCommands(),\n ])\n\n // Get built-in commands\n const builtInCommands = COMMANDS()\n\n // Sort built-in commands alphabetically by name\n const sortedBuiltIn = [...builtInCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort MCP commands alphabetically by name\n const sortedMCP = [...mcpCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort plugin commands alphabetically by name\n const sortedPlugin = [...pluginCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Sort custom commands alphabetically by name\n const sortedCustom = [...customCommands].sort((a, b) =>\n a.userFacingName().localeCompare(b.userFacingName())\n )\n\n // Command priority (later overrides earlier):\n // 1. MCP commands (lowest priority) - sorted alphabetically\n // 2. Plugin commands - sorted alphabetically\n // 3. Custom commands (user/project) - sorted alphabetically\n // 4. Built-in commands (highest priority) - sorted alphabetically\n // Display order: Built-in first, then custom/plugin/MCP\n return [...sortedBuiltIn, ...sortedCustom, ...sortedPlugin, ...sortedMCP].filter(\n _ => _.isEnabled,\n )\n})\n\nexport function hasCommand(commandName: string, commands: Command[]): boolean {\n return commands.some(\n _ => _.userFacingName() === commandName || _.aliases?.includes(commandName),\n )\n}\n\nexport function getCommand(commandName: string, commands: Command[]): Command {\n const command = commands.find(\n _ => _.userFacingName() === commandName || _.aliases?.includes(commandName),\n ) as Command | undefined\n if (!command) {\n throw ReferenceError(\n `Command ${commandName} not found. Available commands: ${commands\n .map(_ => {\n const name = _.userFacingName()\n return _.aliases ? `${name} (aliases: ${_.aliases.join(', ')})` : name\n })\n .join(', ')}`,\n )\n }\n\n return command\n}\n"],
5
+ "mappings": "AACA,OAAO,SAAS;AAChB,OAAO,WAAW;AAClB,OAAO,aAAa;AACpB,OAAO,iBAAiB;AACxB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,OAAO,UAAU;AACjB,OAAO,UAAU;AACjB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,YAAY;AACnB,OAAO,SAAS;AAChB,YAAY,WAAW;AACvB,OAAO,iBAAiB;AACxB,OAAO,gBAAgB;AACvB,OAAO,iBAAiB;AACxB,OAAO,qBAAqB;AAC5B,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO,WAAW;AAClB,OAAO,mBAAmB;AAE1B,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,OAAO,YAAY;AACnB,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,0BAA0B;AAEvD,SAAS,eAAe;AAExB,SAAS,8BAA8B;AAgDvC,MAAM,yBAAyB,CAAC,SAAS,QAAQ,MAAM;AAIvD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AAO,SAAS;AAAA,IACd,OAAK,EAAE,eAAe,MAAM,eAAe,EAAE,SAAS,SAAS,WAAW;AAAA,EAC5E;AACF;AAEO,SAAS,WAAW,aAAqB,UAA8B;AAC5E,QAAM,UAAU,SAAS;AAAA,IACvB,OAAK,EAAE,eAAe,MAAM,eAAe,EAAE,SAAS,SAAS,WAAW;AAAA,EAC5E;AACA,MAAI,CAAC,SAAS;AACZ,UAAM;AAAA,MACJ,WAAW,WAAW,mCAAmC,SACtD,IAAI,OAAK;AACR,cAAM,OAAO,EAAE,eAAe;AAC9B,eAAO,EAAE,UAAU,GAAG,IAAI,cAAc,EAAE,QAAQ,KAAK,IAAI,CAAC,MAAM;AAAA,MACpE,CAAC,EACA,KAAK,IAAI,CAAC;AAAA,IACf;AAAA,EACF;AAEA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
File without changes
@@ -0,0 +1,312 @@
1
+ import { existsSync, readFileSync } from "fs";
2
+ import {
3
+ getGlobalConfig,
4
+ saveGlobalConfig
5
+ } from "./config.js";
6
+ import { debug as debugLogger } from "./debugLogger.js";
7
+ import { safeParseJSON } from "./json.js";
8
+ function interpolateEnvVars(value) {
9
+ return value.replace(/\$\{([^}]+)\}/g, (match, varName) => {
10
+ const envValue = process.env[varName.trim()];
11
+ if (envValue === void 0) {
12
+ debugLogger.warn("ENV_VAR_NOT_FOUND", {
13
+ varName,
14
+ original: match
15
+ });
16
+ return match;
17
+ }
18
+ return envValue;
19
+ });
20
+ }
21
+ function interpolateEnvVarsInObject(obj) {
22
+ if (typeof obj === "string") {
23
+ return interpolateEnvVars(obj);
24
+ }
25
+ if (Array.isArray(obj)) {
26
+ return obj.map((item) => interpolateEnvVarsInObject(item));
27
+ }
28
+ if (obj && typeof obj === "object") {
29
+ const result = {};
30
+ for (const [key, value] of Object.entries(obj)) {
31
+ result[key] = interpolateEnvVarsInObject(value);
32
+ }
33
+ return result;
34
+ }
35
+ return obj;
36
+ }
37
+ function convertTeamModelProfile(teamProfile) {
38
+ const now = Date.now();
39
+ return {
40
+ name: teamProfile.name,
41
+ provider: teamProfile.provider,
42
+ modelName: teamProfile.modelName,
43
+ baseURL: teamProfile.baseURL,
44
+ apiKey: interpolateEnvVars(teamProfile.apiKey),
45
+ maxTokens: teamProfile.maxTokens,
46
+ contextLength: teamProfile.contextLength,
47
+ reasoningEffort: teamProfile.reasoningEffort,
48
+ isActive: teamProfile.isActive ?? true,
49
+ createdAt: now,
50
+ lastUsed: now
51
+ };
52
+ }
53
+ function convertTeamMcpConfig(teamConfig) {
54
+ if (teamConfig.type === "sse") {
55
+ return {
56
+ type: "sse",
57
+ url: interpolateEnvVars(teamConfig.url || ""),
58
+ enabled: teamConfig.enabled ?? true
59
+ };
60
+ }
61
+ return {
62
+ type: "stdio",
63
+ command: interpolateEnvVars(teamConfig.command || ""),
64
+ args: (teamConfig.args || []).map((arg) => interpolateEnvVars(arg)),
65
+ env: teamConfig.env ? interpolateEnvVarsInObject(teamConfig.env) : void 0,
66
+ enabled: teamConfig.enabled ?? true
67
+ };
68
+ }
69
+ async function fetchTeamConfig(url) {
70
+ debugLogger.state("TEAM_CONFIG_FETCH_START", { url });
71
+ try {
72
+ const response = await fetch(url);
73
+ if (!response.ok) {
74
+ throw new Error(
75
+ `Failed to fetch config: ${response.status} ${response.statusText}`
76
+ );
77
+ }
78
+ const configText = await response.text();
79
+ const config = JSON.parse(configText);
80
+ if (config.version !== "1.0") {
81
+ throw new Error(
82
+ `Unsupported config version: ${config.version}. Expected 1.0`
83
+ );
84
+ }
85
+ debugLogger.state("TEAM_CONFIG_FETCH_SUCCESS", {
86
+ url,
87
+ configName: config.name,
88
+ hasModels: !!config.models,
89
+ hasMcpServers: !!config.mcpServers
90
+ });
91
+ return config;
92
+ } catch (error) {
93
+ debugLogger.error("TEAM_CONFIG_FETCH_ERROR", {
94
+ url,
95
+ error: error instanceof Error ? error.message : String(error)
96
+ });
97
+ throw error;
98
+ }
99
+ }
100
+ function loadTeamConfigFromFile(filePath) {
101
+ debugLogger.state("TEAM_CONFIG_LOAD_FILE", { filePath });
102
+ if (!existsSync(filePath)) {
103
+ throw new Error(`Configuration file not found: ${filePath}`);
104
+ }
105
+ try {
106
+ const configText = readFileSync(filePath, "utf-8");
107
+ const config = safeParseJSON(configText);
108
+ if (!config) {
109
+ throw new Error("Invalid JSON in configuration file");
110
+ }
111
+ if (config.version !== "1.0") {
112
+ throw new Error(
113
+ `Unsupported config version: ${config.version}. Expected 1.0`
114
+ );
115
+ }
116
+ debugLogger.state("TEAM_CONFIG_LOAD_FILE_SUCCESS", {
117
+ filePath,
118
+ configName: config.name
119
+ });
120
+ return config;
121
+ } catch (error) {
122
+ debugLogger.error("TEAM_CONFIG_LOAD_FILE_ERROR", {
123
+ filePath,
124
+ error: error instanceof Error ? error.message : String(error)
125
+ });
126
+ throw error;
127
+ }
128
+ }
129
+ function applyTeamConfig(teamConfig, strategy = "merge") {
130
+ debugLogger.state("TEAM_CONFIG_APPLY_START", {
131
+ configName: teamConfig.name,
132
+ strategy
133
+ });
134
+ const globalConfig = getGlobalConfig();
135
+ let modelsAdded = 0;
136
+ let mcpServersAdded = 0;
137
+ const settingsUpdated = [];
138
+ if (teamConfig.models?.profiles) {
139
+ const existingProfiles = globalConfig.modelProfiles || [];
140
+ const existingModelNames = new Set(
141
+ existingProfiles.map((p) => p.modelName)
142
+ );
143
+ for (const teamProfile of teamConfig.models.profiles) {
144
+ const runtimeProfile = convertTeamModelProfile(teamProfile);
145
+ if (strategy === "skip-existing" && existingModelNames.has(runtimeProfile.modelName)) {
146
+ debugLogger.state("TEAM_CONFIG_SKIP_MODEL", {
147
+ modelName: runtimeProfile.modelName,
148
+ reason: "already_exists"
149
+ });
150
+ continue;
151
+ }
152
+ if (strategy === "replace") {
153
+ const index = existingProfiles.findIndex(
154
+ (p) => p.modelName === runtimeProfile.modelName
155
+ );
156
+ if (index !== -1) {
157
+ existingProfiles.splice(index, 1);
158
+ }
159
+ }
160
+ existingProfiles.push(runtimeProfile);
161
+ modelsAdded++;
162
+ debugLogger.state("TEAM_CONFIG_ADD_MODEL", {
163
+ modelName: runtimeProfile.modelName,
164
+ provider: runtimeProfile.provider
165
+ });
166
+ }
167
+ globalConfig.modelProfiles = existingProfiles;
168
+ }
169
+ if (teamConfig.models?.pointers) {
170
+ globalConfig.modelPointers = {
171
+ ...globalConfig.modelPointers || { main: "", task: "", reasoning: "", quick: "" },
172
+ ...teamConfig.models.pointers
173
+ };
174
+ settingsUpdated.push("modelPointers");
175
+ }
176
+ if (teamConfig.models?.defaultModel) {
177
+ globalConfig.defaultModelName = teamConfig.models.defaultModel;
178
+ settingsUpdated.push("defaultModelName");
179
+ }
180
+ if (teamConfig.mcpServers) {
181
+ const existingMcpServers = globalConfig.mcpServers || {};
182
+ const existingServerNames = new Set(Object.keys(existingMcpServers));
183
+ for (const [serverName, teamMcpConfig] of Object.entries(
184
+ teamConfig.mcpServers
185
+ )) {
186
+ if (strategy === "skip-existing" && existingServerNames.has(serverName)) {
187
+ debugLogger.state("TEAM_CONFIG_SKIP_MCP", {
188
+ serverName,
189
+ reason: "already_exists"
190
+ });
191
+ continue;
192
+ }
193
+ const runtimeMcpConfig = convertTeamMcpConfig(teamMcpConfig);
194
+ existingMcpServers[serverName] = runtimeMcpConfig;
195
+ mcpServersAdded++;
196
+ debugLogger.state("TEAM_CONFIG_ADD_MCP", {
197
+ serverName,
198
+ type: runtimeMcpConfig.type || "stdio"
199
+ });
200
+ }
201
+ globalConfig.mcpServers = existingMcpServers;
202
+ }
203
+ if (teamConfig.settings) {
204
+ const { settings } = teamConfig;
205
+ if (settings.theme !== void 0) {
206
+ globalConfig.theme = settings.theme;
207
+ settingsUpdated.push("theme");
208
+ }
209
+ if (settings.verbose !== void 0) {
210
+ globalConfig.verbose = settings.verbose;
211
+ settingsUpdated.push("verbose");
212
+ }
213
+ if (settings.compressionMode !== void 0) {
214
+ globalConfig.compressionMode = settings.compressionMode;
215
+ settingsUpdated.push("compressionMode");
216
+ }
217
+ if (settings.thinking !== void 0) {
218
+ globalConfig.thinking = settings.thinking;
219
+ settingsUpdated.push("thinking");
220
+ }
221
+ if (settings.proxy !== void 0) {
222
+ globalConfig.proxy = settings.proxy;
223
+ settingsUpdated.push("proxy");
224
+ }
225
+ if (settings.stream !== void 0) {
226
+ globalConfig.stream = settings.stream;
227
+ settingsUpdated.push("stream");
228
+ }
229
+ }
230
+ saveGlobalConfig(globalConfig);
231
+ debugLogger.state("TEAM_CONFIG_APPLY_SUCCESS", {
232
+ configName: teamConfig.name,
233
+ modelsAdded,
234
+ mcpServersAdded,
235
+ settingsUpdated: settingsUpdated.join(", ")
236
+ });
237
+ return {
238
+ applied: true,
239
+ modelsAdded,
240
+ mcpServersAdded,
241
+ settingsUpdated
242
+ };
243
+ }
244
+ async function addMarketplaces(marketplaceUrls) {
245
+ let added = 0;
246
+ let failed = 0;
247
+ const errors = [];
248
+ const { addMarketplace } = await import("./marketplaceManager.js");
249
+ for (const url of marketplaceUrls) {
250
+ try {
251
+ debugLogger.state("TEAM_CONFIG_ADD_MARKETPLACE", { url });
252
+ await addMarketplace(url);
253
+ added++;
254
+ debugLogger.state("TEAM_CONFIG_ADD_MARKETPLACE_SUCCESS", { url });
255
+ } catch (error) {
256
+ failed++;
257
+ const errorMsg = error instanceof Error ? error.message : String(error);
258
+ errors.push(`${url}: ${errorMsg}`);
259
+ debugLogger.error("TEAM_CONFIG_ADD_MARKETPLACE_ERROR", {
260
+ url,
261
+ error: errorMsg
262
+ });
263
+ }
264
+ }
265
+ return { added, failed, errors };
266
+ }
267
+ async function installPlugins(pluginNames, targetDir) {
268
+ let installed = 0;
269
+ let failed = 0;
270
+ const errors = [];
271
+ const { installPluginFromMarketplace } = await import("./marketplaceManager.js");
272
+ const { join } = await import("path");
273
+ const { homedir } = await import("os");
274
+ const installDir = targetDir || join(homedir(), ".minto", "plugins");
275
+ for (const pluginName of pluginNames) {
276
+ try {
277
+ debugLogger.state("TEAM_CONFIG_INSTALL_PLUGIN", {
278
+ pluginName,
279
+ targetDir: installDir
280
+ });
281
+ await installPluginFromMarketplace(
282
+ pluginName,
283
+ void 0,
284
+ // Search all marketplaces
285
+ join(installDir, pluginName)
286
+ );
287
+ installed++;
288
+ debugLogger.state("TEAM_CONFIG_INSTALL_PLUGIN_SUCCESS", { pluginName });
289
+ } catch (error) {
290
+ failed++;
291
+ const errorMsg = error instanceof Error ? error.message : String(error);
292
+ errors.push(`${pluginName}: ${errorMsg}`);
293
+ debugLogger.error("TEAM_CONFIG_INSTALL_PLUGIN_ERROR", {
294
+ pluginName,
295
+ error: errorMsg
296
+ });
297
+ }
298
+ }
299
+ return { installed, failed, errors };
300
+ }
301
+ export {
302
+ addMarketplaces,
303
+ applyTeamConfig,
304
+ convertTeamMcpConfig,
305
+ convertTeamModelProfile,
306
+ fetchTeamConfig,
307
+ installPlugins,
308
+ interpolateEnvVars,
309
+ interpolateEnvVarsInObject,
310
+ loadTeamConfigFromFile
311
+ };
312
+ //# sourceMappingURL=teamConfig.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/utils/teamConfig.ts"],
4
+ "sourcesContent": ["/**\n * Team Configuration System\n *\n * Enables teams to share a unified Minto configuration via remote URLs.\n * Supports environment variable interpolation and flexible configuration merging.\n */\n\nimport { existsSync, readFileSync } from 'fs'\nimport {\n getGlobalConfig,\n saveGlobalConfig,\n ModelProfile,\n ModelPointers,\n McpServerConfig,\n ProviderType,\n} from './config'\nimport { debug as debugLogger } from './debugLogger'\nimport { safeParseJSON } from './json'\n\n/**\n * Team configuration schema\n * Represents a shareable configuration template for teams\n */\nexport type TeamConfig = {\n version: '1.0'\n name: string // Configuration name (e.g., \"Acme Inc. Default Config\")\n description?: string // Optional description\n\n // Model Configuration\n models?: {\n profiles?: TeamModelProfile[]\n pointers?: Partial<ModelPointers> // Default model pointers\n defaultModel?: string // Default model name\n }\n\n // MCP Server Configuration\n mcpServers?: Record<string, TeamMcpServerConfig>\n\n // Plugin Marketplace Configuration\n plugins?: {\n // Plugin marketplace URLs (marketplace.json)\n marketplaces?: string[]\n // Specific plugins to install from marketplaces\n install?: string[] // Plugin names to install\n }\n\n // Global Settings\n settings?: {\n theme?: 'dark' | 'light'\n verbose?: boolean\n compressionMode?: 'business' | 'code'\n thinking?: boolean\n proxy?: string\n stream?: boolean\n }\n\n // Instructions for users\n postInstallInstructions?: string\n}\n\n/**\n * Model profile template with environment variable support\n */\nexport type TeamModelProfile = {\n name: string\n provider: ProviderType\n modelName: string\n baseURL?: string\n apiKey: string // Can be env var like \"${ANTHROPIC_API_KEY}\"\n maxTokens: number\n contextLength: number\n reasoningEffort?: 'low' | 'medium' | 'high' | 'minimal'\n isActive?: boolean\n}\n\n/**\n * MCP server config with env var support\n */\nexport type TeamMcpServerConfig = {\n type?: 'stdio' | 'sse'\n command?: string // For stdio\n args?: string[] // For stdio, supports env vars like \"${HOME}/.local/bin/mcp-server\"\n url?: string // For SSE\n env?: Record<string, string> // Env vars, supports interpolation\n enabled?: boolean\n}\n\n/**\n * Interpolate environment variables in a string\n * Supports ${VAR_NAME} syntax\n */\nexport function interpolateEnvVars(value: string): string {\n return value.replace(/\\$\\{([^}]+)\\}/g, (match, varName) => {\n const envValue = process.env[varName.trim()]\n if (envValue === undefined) {\n debugLogger.warn('ENV_VAR_NOT_FOUND', {\n varName,\n original: match,\n })\n // Keep the placeholder if env var not found\n return match\n }\n return envValue\n })\n}\n\n/**\n * Recursively interpolate env vars in an object\n */\nexport function interpolateEnvVarsInObject<T>(obj: T): T {\n if (typeof obj === 'string') {\n return interpolateEnvVars(obj) as T\n }\n\n if (Array.isArray(obj)) {\n return obj.map(item => interpolateEnvVarsInObject(item)) as T\n }\n\n if (obj && typeof obj === 'object') {\n const result: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(obj)) {\n result[key] = interpolateEnvVarsInObject(value)\n }\n return result as T\n }\n\n return obj\n}\n\n/**\n * Convert team model profile to runtime model profile\n */\nexport function convertTeamModelProfile(\n teamProfile: TeamModelProfile,\n): ModelProfile {\n const now = Date.now()\n\n return {\n name: teamProfile.name,\n provider: teamProfile.provider,\n modelName: teamProfile.modelName,\n baseURL: teamProfile.baseURL,\n apiKey: interpolateEnvVars(teamProfile.apiKey),\n maxTokens: teamProfile.maxTokens,\n contextLength: teamProfile.contextLength,\n reasoningEffort: teamProfile.reasoningEffort,\n isActive: teamProfile.isActive ?? true,\n createdAt: now,\n lastUsed: now,\n }\n}\n\n/**\n * Convert team MCP config to runtime MCP config\n */\nexport function convertTeamMcpConfig(\n teamConfig: TeamMcpServerConfig,\n): McpServerConfig {\n if (teamConfig.type === 'sse') {\n return {\n type: 'sse',\n url: interpolateEnvVars(teamConfig.url || ''),\n enabled: teamConfig.enabled ?? true,\n }\n }\n\n // Default to stdio\n return {\n type: 'stdio',\n command: interpolateEnvVars(teamConfig.command || ''),\n args: (teamConfig.args || []).map(arg => interpolateEnvVars(arg)),\n env: teamConfig.env\n ? interpolateEnvVarsInObject(teamConfig.env)\n : undefined,\n enabled: teamConfig.enabled ?? true,\n }\n}\n\n/**\n * Fetch team configuration from a URL\n */\nexport async function fetchTeamConfig(url: string): Promise<TeamConfig> {\n debugLogger.state('TEAM_CONFIG_FETCH_START', { url })\n\n try {\n const response = await fetch(url)\n\n if (!response.ok) {\n throw new Error(\n `Failed to fetch config: ${response.status} ${response.statusText}`,\n )\n }\n\n const configText = await response.text()\n const config = JSON.parse(configText) as TeamConfig\n\n // Validate version\n if (config.version !== '1.0') {\n throw new Error(\n `Unsupported config version: ${config.version}. Expected 1.0`,\n )\n }\n\n debugLogger.state('TEAM_CONFIG_FETCH_SUCCESS', {\n url,\n configName: config.name,\n hasModels: !!config.models,\n hasMcpServers: !!config.mcpServers,\n })\n\n return config\n } catch (error) {\n debugLogger.error('TEAM_CONFIG_FETCH_ERROR', {\n url,\n error: error instanceof Error ? error.message : String(error),\n })\n throw error\n }\n}\n\n/**\n * Load team configuration from a local file\n */\nexport function loadTeamConfigFromFile(filePath: string): TeamConfig {\n debugLogger.state('TEAM_CONFIG_LOAD_FILE', { filePath })\n\n if (!existsSync(filePath)) {\n throw new Error(`Configuration file not found: ${filePath}`)\n }\n\n try {\n const configText = readFileSync(filePath, 'utf-8')\n const config = safeParseJSON(configText) as TeamConfig\n\n if (!config) {\n throw new Error('Invalid JSON in configuration file')\n }\n\n if (config.version !== '1.0') {\n throw new Error(\n `Unsupported config version: ${config.version}. Expected 1.0`,\n )\n }\n\n debugLogger.state('TEAM_CONFIG_LOAD_FILE_SUCCESS', {\n filePath,\n configName: config.name,\n })\n\n return config\n } catch (error) {\n debugLogger.error('TEAM_CONFIG_LOAD_FILE_ERROR', {\n filePath,\n error: error instanceof Error ? error.message : String(error),\n })\n throw error\n }\n}\n\n/**\n * Merge strategy for configuration\n */\nexport type MergeStrategy = 'replace' | 'merge' | 'skip-existing'\n\n/**\n * Apply team configuration to global config\n */\nexport function applyTeamConfig(\n teamConfig: TeamConfig,\n strategy: MergeStrategy = 'merge',\n): {\n applied: boolean\n modelsAdded: number\n mcpServersAdded: number\n settingsUpdated: string[]\n} {\n debugLogger.state('TEAM_CONFIG_APPLY_START', {\n configName: teamConfig.name,\n strategy,\n })\n\n const globalConfig = getGlobalConfig()\n let modelsAdded = 0\n let mcpServersAdded = 0\n const settingsUpdated: string[] = []\n\n // Apply model profiles\n if (teamConfig.models?.profiles) {\n const existingProfiles = globalConfig.modelProfiles || []\n const existingModelNames = new Set(\n existingProfiles.map(p => p.modelName),\n )\n\n for (const teamProfile of teamConfig.models.profiles) {\n const runtimeProfile = convertTeamModelProfile(teamProfile)\n\n if (strategy === 'skip-existing' && existingModelNames.has(runtimeProfile.modelName)) {\n debugLogger.state('TEAM_CONFIG_SKIP_MODEL', {\n modelName: runtimeProfile.modelName,\n reason: 'already_exists',\n })\n continue\n }\n\n if (strategy === 'replace') {\n // Remove existing profile with same modelName\n const index = existingProfiles.findIndex(\n p => p.modelName === runtimeProfile.modelName,\n )\n if (index !== -1) {\n existingProfiles.splice(index, 1)\n }\n }\n\n existingProfiles.push(runtimeProfile)\n modelsAdded++\n\n debugLogger.state('TEAM_CONFIG_ADD_MODEL', {\n modelName: runtimeProfile.modelName,\n provider: runtimeProfile.provider,\n })\n }\n\n globalConfig.modelProfiles = existingProfiles\n }\n\n // Apply model pointers\n if (teamConfig.models?.pointers) {\n globalConfig.modelPointers = {\n ...(globalConfig.modelPointers || { main: '', task: '', reasoning: '', quick: '' }),\n ...teamConfig.models.pointers,\n }\n settingsUpdated.push('modelPointers')\n }\n\n // Apply default model\n if (teamConfig.models?.defaultModel) {\n globalConfig.defaultModelName = teamConfig.models.defaultModel\n settingsUpdated.push('defaultModelName')\n }\n\n // Apply MCP servers\n if (teamConfig.mcpServers) {\n const existingMcpServers = globalConfig.mcpServers || {}\n const existingServerNames = new Set(Object.keys(existingMcpServers))\n\n for (const [serverName, teamMcpConfig] of Object.entries(\n teamConfig.mcpServers,\n )) {\n if (strategy === 'skip-existing' && existingServerNames.has(serverName)) {\n debugLogger.state('TEAM_CONFIG_SKIP_MCP', {\n serverName,\n reason: 'already_exists',\n })\n continue\n }\n\n const runtimeMcpConfig = convertTeamMcpConfig(teamMcpConfig)\n existingMcpServers[serverName] = runtimeMcpConfig\n mcpServersAdded++\n\n debugLogger.state('TEAM_CONFIG_ADD_MCP', {\n serverName,\n type: runtimeMcpConfig.type || 'stdio',\n })\n }\n\n globalConfig.mcpServers = existingMcpServers\n }\n\n // Apply global settings\n if (teamConfig.settings) {\n const { settings } = teamConfig\n\n if (settings.theme !== undefined) {\n globalConfig.theme = settings.theme\n settingsUpdated.push('theme')\n }\n\n if (settings.verbose !== undefined) {\n globalConfig.verbose = settings.verbose\n settingsUpdated.push('verbose')\n }\n\n if (settings.compressionMode !== undefined) {\n globalConfig.compressionMode = settings.compressionMode\n settingsUpdated.push('compressionMode')\n }\n\n if (settings.thinking !== undefined) {\n globalConfig.thinking = settings.thinking\n settingsUpdated.push('thinking')\n }\n\n if (settings.proxy !== undefined) {\n globalConfig.proxy = settings.proxy\n settingsUpdated.push('proxy')\n }\n\n if (settings.stream !== undefined) {\n globalConfig.stream = settings.stream\n settingsUpdated.push('stream')\n }\n }\n\n // Save updated config\n saveGlobalConfig(globalConfig)\n\n debugLogger.state('TEAM_CONFIG_APPLY_SUCCESS', {\n configName: teamConfig.name,\n modelsAdded,\n mcpServersAdded,\n settingsUpdated: settingsUpdated.join(', '),\n })\n\n return {\n applied: true,\n modelsAdded,\n mcpServersAdded,\n settingsUpdated,\n }\n}\n\n/**\n * Add marketplaces from URLs\n */\nexport async function addMarketplaces(\n marketplaceUrls: string[],\n): Promise<{ added: number; failed: number; errors: string[] }> {\n let added = 0\n let failed = 0\n const errors: string[] = []\n\n // Import marketplace manager\n const { addMarketplace } = await import('./marketplaceManager')\n\n for (const url of marketplaceUrls) {\n try {\n debugLogger.state('TEAM_CONFIG_ADD_MARKETPLACE', { url })\n\n await addMarketplace(url)\n added++\n\n debugLogger.state('TEAM_CONFIG_ADD_MARKETPLACE_SUCCESS', { url })\n } catch (error) {\n failed++\n const errorMsg = error instanceof Error ? error.message : String(error)\n errors.push(`${url}: ${errorMsg}`)\n\n debugLogger.error('TEAM_CONFIG_ADD_MARKETPLACE_ERROR', {\n url,\n error: errorMsg,\n })\n }\n }\n\n return { added, failed, errors }\n}\n\n/**\n * Install plugins from marketplaces\n */\nexport async function installPlugins(\n pluginNames: string[],\n targetDir?: string,\n): Promise<{ installed: number; failed: number; errors: string[] }> {\n let installed = 0\n let failed = 0\n const errors: string[] = []\n\n // Import marketplace manager and path utilities\n const { installPluginFromMarketplace } = await import('./marketplaceManager')\n const { join } = await import('path')\n const { homedir } = await import('os')\n\n // Default target: ~/.minto/plugins\n const installDir = targetDir || join(homedir(), '.minto', 'plugins')\n\n for (const pluginName of pluginNames) {\n try {\n debugLogger.state('TEAM_CONFIG_INSTALL_PLUGIN', {\n pluginName,\n targetDir: installDir,\n })\n\n await installPluginFromMarketplace(\n pluginName,\n undefined, // Search all marketplaces\n join(installDir, pluginName),\n )\n\n installed++\n debugLogger.state('TEAM_CONFIG_INSTALL_PLUGIN_SUCCESS', { pluginName })\n } catch (error) {\n failed++\n const errorMsg = error instanceof Error ? error.message : String(error)\n errors.push(`${pluginName}: ${errorMsg}`)\n\n debugLogger.error('TEAM_CONFIG_INSTALL_PLUGIN_ERROR', {\n pluginName,\n error: errorMsg,\n })\n }\n }\n\n return { installed, failed, errors }\n}\n"],
5
+ "mappings": "AAOA,SAAS,YAAY,oBAAoB;AACzC;AAAA,EACE;AAAA,EACA;AAAA,OAKK;AACP,SAAS,SAAS,mBAAmB;AACrC,SAAS,qBAAqB;AA0EvB,SAAS,mBAAmB,OAAuB;AACxD,SAAO,MAAM,QAAQ,kBAAkB,CAAC,OAAO,YAAY;AACzD,UAAM,WAAW,QAAQ,IAAI,QAAQ,KAAK,CAAC;AAC3C,QAAI,aAAa,QAAW;AAC1B,kBAAY,KAAK,qBAAqB;AAAA,QACpC;AAAA,QACA,UAAU;AAAA,MACZ,CAAC;AAED,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,CAAC;AACH;AAKO,SAAS,2BAA8B,KAAW;AACvD,MAAI,OAAO,QAAQ,UAAU;AAC3B,WAAO,mBAAmB,GAAG;AAAA,EAC/B;AAEA,MAAI,MAAM,QAAQ,GAAG,GAAG;AACtB,WAAO,IAAI,IAAI,UAAQ,2BAA2B,IAAI,CAAC;AAAA,EACzD;AAEA,MAAI,OAAO,OAAO,QAAQ,UAAU;AAClC,UAAM,SAAkC,CAAC;AACzC,eAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,GAAG,GAAG;AAC9C,aAAO,GAAG,IAAI,2BAA2B,KAAK;AAAA,IAChD;AACA,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAKO,SAAS,wBACd,aACc;AACd,QAAM,MAAM,KAAK,IAAI;AAErB,SAAO;AAAA,IACL,MAAM,YAAY;AAAA,IAClB,UAAU,YAAY;AAAA,IACtB,WAAW,YAAY;AAAA,IACvB,SAAS,Y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O;AACrC;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@within-7/minto",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "bin": {
5
5
  "minto": "cli.js",
6
6
  "mt": "cli.js"
@@ -25,22 +25,6 @@
25
25
  "scripts/postinstall.js",
26
26
  ".npmrc"
27
27
  ],
28
- "scripts": {
29
- "dev": "bun run ./src/entrypoints/cli.tsx --verbose",
30
- "build": "node scripts/build.mjs",
31
- "clean": "rm -rf cli.js",
32
- "prepublishOnly": "node scripts/build.mjs && node scripts/prepublish-check.js",
33
- "postinstall": "node scripts/postinstall.js || true",
34
- "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
35
- "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json}\"",
36
- "lint": "eslint . --ext .ts,.tsx,.js --max-warnings 0",
37
- "lint:fix": "eslint . --ext .ts,.tsx,.js --fix",
38
- "test": "cd tests && bun test",
39
- "typecheck": "tsc --noEmit",
40
- "prepare": "",
41
- "publish:dev": "node scripts/publish-dev.js",
42
- "publish:release": "node scripts/publish-release.js"
43
- },
44
28
  "dependencies": {
45
29
  "@anthropic-ai/bedrock-sdk": "^0.12.6",
46
30
  "@anthropic-ai/sdk": "^0.39.0",
@@ -111,5 +95,19 @@
111
95
  "strip-ansi": "6.0.1",
112
96
  "formdata-node": "^6.0.3",
113
97
  "node-domexception": "npm:domexception@^4.0.0"
98
+ },
99
+ "scripts": {
100
+ "dev": "bun run ./src/entrypoints/cli.tsx --verbose",
101
+ "build": "node scripts/build.mjs",
102
+ "clean": "rm -rf cli.js",
103
+ "postinstall": "node scripts/postinstall.js || true",
104
+ "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json}\"",
105
+ "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json}\"",
106
+ "lint": "eslint . --ext .ts,.tsx,.js --max-warnings 0",
107
+ "lint:fix": "eslint . --ext .ts,.tsx,.js --fix",
108
+ "test": "cd tests && bun test",
109
+ "typecheck": "tsc --noEmit",
110
+ "publish:dev": "node scripts/publish-dev.js",
111
+ "publish:release": "node scripts/publish-release.js"
114
112
  }
115
113
  }
@@ -1,74 +0,0 @@
1
- import { Box, Text } from "ink";
2
- import React, { useState, useEffect } from "react";
3
- import { getTheme } from "../utils/theme.js";
4
- import { execFileNoThrow } from "../utils/execFileNoThrow.js";
5
- import Spinner from "ink-spinner";
6
- const BuildCommand = ({ onDone }) => {
7
- const theme = getTheme();
8
- const [status, setStatus] = useState("building");
9
- const [output, setOutput] = useState([]);
10
- const [error, setError] = useState("");
11
- useEffect(() => {
12
- const runBuildProcess = async () => {
13
- try {
14
- setStatus("building");
15
- setOutput((prev) => [...prev, "\u{1F680} Building Minto..."]);
16
- const buildResult = await execFileNoThrow("bun", ["run", "build"]);
17
- if (buildResult.code !== 0) {
18
- setError(`Build failed: ${buildResult.stderr || buildResult.stdout}`);
19
- setStatus("error");
20
- return;
21
- }
22
- setOutput((prev) => [...prev, "\u2705 Build completed"]);
23
- setStatus("linking-bun");
24
- setOutput((prev) => [...prev, "\u{1F517} Linking with bun..."]);
25
- const bunLinkResult = await execFileNoThrow("bun", ["link"]);
26
- if (bunLinkResult.code !== 0) {
27
- setError(`Bun link failed: ${bunLinkResult.stderr || bunLinkResult.stdout}`);
28
- setStatus("error");
29
- return;
30
- }
31
- setOutput((prev) => [...prev, "\u2705 Bun link completed"]);
32
- setStatus("linking-npm");
33
- setOutput((prev) => [...prev, "\u{1F517} Linking with npm..."]);
34
- const npmLinkResult = await execFileNoThrow("npm", ["link"]);
35
- if (npmLinkResult.code !== 0) {
36
- setError(`npm link failed: ${npmLinkResult.stderr || npmLinkResult.stdout}`);
37
- setStatus("error");
38
- return;
39
- }
40
- setOutput((prev) => [...prev, "\u2705 npm link completed"]);
41
- setStatus("success");
42
- } catch (err) {
43
- setError(err instanceof Error ? err.message : String(err));
44
- setStatus("error");
45
- }
46
- };
47
- runBuildProcess();
48
- }, []);
49
- useEffect(() => {
50
- if (status === "success" || status === "error") {
51
- const timer = setTimeout(() => {
52
- onDone();
53
- }, 2e3);
54
- return () => clearTimeout(timer);
55
- }
56
- }, [status, onDone]);
57
- return /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", paddingY: 1 }, /* @__PURE__ */ React.createElement(Box, { marginBottom: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.primary }, "Build & Link Process")), output.map((line, i) => /* @__PURE__ */ React.createElement(Box, { key: i }, /* @__PURE__ */ React.createElement(Text, null, line))), status !== "success" && status !== "error" && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { color: theme.info }, /* @__PURE__ */ React.createElement(Spinner, { type: "dots" }), " ", status === "building" && "Building...", status === "linking-bun" && "Linking with bun...", status === "linking-npm" && "Linking with npm...")), status === "success" && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.success }, "\u2728 All steps completed successfully!")), status === "error" && /* @__PURE__ */ React.createElement(Box, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { bold: true, color: theme.error }, "\u274C Error occurred:"), /* @__PURE__ */ React.createElement(Text, { color: theme.error }, error)), (status === "success" || status === "error") && /* @__PURE__ */ React.createElement(Box, { marginTop: 1 }, /* @__PURE__ */ React.createElement(Text, { dimColor: true }, "Closing in 2 seconds...")));
58
- };
59
- const build = {
60
- name: "build",
61
- description: "Build the project and link it for local testing (runs: bun run build && bun link && npm link)",
62
- aliases: ["b"],
63
- isEnabled: true,
64
- isHidden: false,
65
- type: "local-jsx",
66
- userFacingName: () => "build",
67
- async call(onDone) {
68
- return /* @__PURE__ */ React.createElement(BuildCommand, { onDone });
69
- }
70
- };
71
- export {
72
- build
73
- };
74
- //# sourceMappingURL=build.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/commands/build.tsx"],
4
- "sourcesContent": ["import { Box, Text } from 'ink'\nimport React, { useState, useEffect } from 'react'\nimport { getTheme } from '@utils/theme'\nimport { execFileNoThrow } from '@utils/execFileNoThrow'\nimport Spinner from 'ink-spinner'\nimport type { Command } from '@commands'\n\nconst BuildCommand: React.FC<{ onDone: () => void }> = ({ onDone }) => {\n const theme = getTheme()\n const [status, setStatus] = useState<'building' | 'linking-bun' | 'linking-npm' | 'success' | 'error'>('building')\n const [output, setOutput] = useState<string[]>([])\n const [error, setError] = useState<string>('')\n\n useEffect(() => {\n const runBuildProcess = async () => {\n try {\n // Step 1: Build\n setStatus('building')\n setOutput(prev => [...prev, '\uD83D\uDE80 Building Minto...'])\n\n const buildResult = await execFileNoThrow('bun', ['run', 'build'])\n\n if (buildResult.code !== 0) {\n setError(`Build failed: ${buildResult.stderr || buildResult.stdout}`)\n setStatus('error')\n return\n }\n\n setOutput(prev => [...prev, '\u2705 Build completed'])\n\n // Step 2: Bun link\n setStatus('linking-bun')\n setOutput(prev => [...prev, '\uD83D\uDD17 Linking with bun...'])\n\n const bunLinkResult = await execFileNoThrow('bun', ['link'])\n\n if (bunLinkResult.code !== 0) {\n setError(`Bun link failed: ${bunLinkResult.stderr || bunLinkResult.stdout}`)\n setStatus('error')\n return\n }\n\n setOutput(prev => [...prev, '\u2705 Bun link completed'])\n\n // Step 3: npm link\n setStatus('linking-npm')\n setOutput(prev => [...prev, '\uD83D\uDD17 Linking with npm...'])\n\n const npmLinkResult = await execFileNoThrow('npm', ['link'])\n\n if (npmLinkResult.code !== 0) {\n setError(`npm link failed: ${npmLinkResult.stderr || npmLinkResult.stdout}`)\n setStatus('error')\n return\n }\n\n setOutput(prev => [...prev, '\u2705 npm link completed'])\n setStatus('success')\n\n } catch (err) {\n setError(err instanceof Error ? err.message : String(err))\n setStatus('error')\n }\n }\n\n runBuildProcess()\n }, [])\n\n useEffect(() => {\n if (status === 'success' || status === 'error') {\n // Auto-close after showing result\n const timer = setTimeout(() => {\n onDone()\n }, 2000)\n\n return () => clearTimeout(timer)\n }\n }, [status, onDone])\n\n return (\n <Box flexDirection=\"column\" paddingY={1}>\n <Box marginBottom={1}>\n <Text bold color={theme.primary}>\n Build & Link Process\n </Text>\n </Box>\n\n {output.map((line, i) => (\n <Box key={i}>\n <Text>{line}</Text>\n </Box>\n ))}\n\n {status !== 'success' && status !== 'error' && (\n <Box marginTop={1}>\n <Text color={theme.info}>\n <Spinner type=\"dots\" />\n {' '}\n {status === 'building' && 'Building...'}\n {status === 'linking-bun' && 'Linking with bun...'}\n {status === 'linking-npm' && 'Linking with npm...'}\n </Text>\n </Box>\n )}\n\n {status === 'success' && (\n <Box marginTop={1}>\n <Text bold color={theme.success}>\n \u2728 All steps completed successfully!\n </Text>\n </Box>\n )}\n\n {status === 'error' && (\n <Box flexDirection=\"column\" marginTop={1}>\n <Text bold color={theme.error}>\n \u274C Error occurred:\n </Text>\n <Text color={theme.error}>{error}</Text>\n </Box>\n )}\n\n {(status === 'success' || status === 'error') && (\n <Box marginTop={1}>\n <Text dimColor>\n Closing in 2 seconds...\n </Text>\n </Box>\n )}\n </Box>\n )\n}\n\nexport const build = {\n name: 'build',\n description: 'Build the project and link it for local testing (runs: bun run build && bun link && npm link)',\n aliases: ['b'],\n isEnabled: true,\n isHidden: false,\n type: 'local-jsx',\n userFacingName: () => 'build',\n async call(onDone: (result?: string) => void) {\n return <BuildCommand onDone={onDone} />\n },\n} satisfies Command\n"],
5
- "mappings": "AAAA,SAAS,KAAK,YAAY;AAC1B,OAAO,SAAS,UAAU,iBAAiB;AAC3C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,OAAO,aAAa;AAGpB,MAAM,eAAiD,CAAC,EAAE,OAAO,MAAM;AACrE,QAAM,QAAQ,SAAS;AACvB,QAAM,CAAC,QAAQ,SAAS,IAAI,SAA2E,UAAU;AACjH,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAmB,CAAC,CAAC;AACjD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA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js";
2
- import { PRODUCT_COMMAND } from "../constants/product.js";
3
- import chalk from "chalk";
4
- import { getTheme } from "../utils/theme.js";
5
- const mcp = {
6
- type: "local",
7
- name: "mcp",
8
- description: "Show MCP server connection status",
9
- isEnabled: true,
10
- isHidden: false,
11
- async call() {
12
- const servers = listMCPServers();
13
- const clients = await getClients();
14
- const theme = getTheme();
15
- if (Object.keys(servers).length === 0) {
16
- return `\u23BF No MCP servers configured. Run \`${PRODUCT_COMMAND} mcp\` to learn about how to configure MCP servers.
17
- \u23BF To refresh connections after configuration changes, use \`/${PRODUCT_COMMAND} mcp-refresh\``;
18
- }
19
- const serverStatusLines = clients.sort((a, b) => a.name.localeCompare(b.name)).map((client) => {
20
- const isConnected = client.type === "connected";
21
- const status = isConnected ? "connected" : "disconnected";
22
- const coloredStatus = isConnected ? chalk.hex(theme.success)(status) : chalk.hex(theme.error)(status);
23
- return `\u23BF \u2022 ${client.name}: ${coloredStatus}`;
24
- });
25
- return [
26
- "\u23BF MCP Server Status",
27
- ...serverStatusLines,
28
- "",
29
- `\u23BF Tip: Use \`/mcp-refresh\` to reconnect to servers after configuration changes`
30
- ].join("\n");
31
- },
32
- userFacingName() {
33
- return "mcp";
34
- }
35
- };
36
- var mcp_default = mcp;
37
- export {
38
- mcp_default as default
39
- };
40
- //# sourceMappingURL=mcp.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/commands/mcp.ts"],
4
- "sourcesContent": ["import type { Command } from '@commands'\nimport { listMCPServers, getClients } from '@services/mcpClient'\nimport { PRODUCT_COMMAND } from '@constants/product'\nimport chalk from 'chalk'\nimport { getTheme } from '@utils/theme'\n\nconst mcp = {\n type: 'local',\n name: 'mcp',\n description: 'Show MCP server connection status',\n isEnabled: true,\n isHidden: false,\n async call() {\n const servers = listMCPServers()\n const clients = await getClients()\n const theme = getTheme()\n\n if (Object.keys(servers).length === 0) {\n return `\u23BF No MCP servers configured. Run \\`${PRODUCT_COMMAND} mcp\\` to learn about how to configure MCP servers.\\n\u23BF To refresh connections after configuration changes, use \\`/${PRODUCT_COMMAND} mcp-refresh\\``\n }\n\n // Sort servers by name and format status with colors\n const serverStatusLines = clients\n .sort((a, b) => a.name.localeCompare(b.name))\n .map(client => {\n const isConnected = client.type === 'connected'\n const status = isConnected ? 'connected' : 'disconnected'\n const coloredStatus = isConnected\n ? chalk.hex(theme.success)(status)\n : chalk.hex(theme.error)(status)\n return `\u23BF \u2022 ${client.name}: ${coloredStatus}`\n })\n\n return [\n '\u23BF MCP Server Status',\n ...serverStatusLines,\n '',\n `\u23BF Tip: Use \\`/mcp-refresh\\` to reconnect to servers after configuration changes`,\n ].join('\\n')\n },\n userFacingName() {\n return 'mcp'\n },\n} satisfies Command\n\nexport default mcp\n"],
5
- "mappings": "AACA,SAAS,gBAAgB,kBAAkB;AAC3C,SAAS,uBAAuB;AAChC,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAEzB,MAAM,MAAM;AAAA,EACV,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM,OAAO;AACX,UAAM,UAAU,eAAe;AAC/B,UAAM,UAAU,MAAM,WAAW;AACjC,UAAM,QAAQ,SAAS;AAEvB,QAAI,OAAO,KAAK,OAAO,EAAE,WAAW,GAAG;AACrC,aAAO,4CAAuC,eAAe;AAAA,qEAAsH,eAAe;AAAA,IACpM;AAGA,UAAM,oBAAoB,QACvB,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC,EAC3C,IAAI,YAAU;AACb,YAAM,cAAc,OAAO,SAAS;AACpC,YAAM,SAAS,cAAc,cAAc;AAC3C,YAAM,gBAAgB,cAClB,MAAM,IAAI,MAAM,OAAO,EAAE,MAAM,IAC/B,MAAM,IAAI,MAAM,KAAK,EAAE,MAAM;AACjC,aAAO,kBAAQ,OAAO,IAAI,KAAK,aAAa;AAAA,IAC9C,CAAC;AAEH,WAAO;AAAA,MACL;AAAA,MACA,GAAG;AAAA,MACH;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AAAA,EACA,iBAAiB;AACf,WAAO;AAAA,EACT;AACF;AAEA,IAAO,cAAQ;",
6
- "names": []
7
- }
@@ -1,40 +0,0 @@
1
- import { refreshMCPConnections, getClients } from "../services/mcpClient.js";
2
- import { PRODUCT_COMMAND } from "../constants/product.js";
3
- import chalk from "chalk";
4
- import { getTheme } from "../utils/theme.js";
5
- const mcpRefresh = {
6
- type: "local",
7
- name: "mcp-refresh",
8
- description: "Refresh MCP server connections (reconnect to all configured servers)",
9
- isEnabled: true,
10
- isHidden: false,
11
- async call() {
12
- const theme = getTheme();
13
- refreshMCPConnections();
14
- await new Promise((resolve) => setTimeout(resolve, 100));
15
- const clients = await getClients();
16
- if (clients.length === 0) {
17
- return `\u23BF No MCP servers configured. Run \`${PRODUCT_COMMAND} mcp\` to learn about how to configure MCP servers.`;
18
- }
19
- const serverStatusLines = clients.sort((a, b) => a.name.localeCompare(b.name)).map((client) => {
20
- const isConnected = client.type === "connected";
21
- const status = isConnected ? "connected" : "failed";
22
- const coloredStatus = isConnected ? chalk.hex(theme.success)(status) : chalk.hex(theme.error)(status);
23
- return `\u23BF \u2022 ${client.name}: ${coloredStatus}`;
24
- });
25
- return [
26
- "\u23BF MCP connections refreshed",
27
- ...serverStatusLines,
28
- "",
29
- "\u23BF Note: You may need to restart the conversation for new tools to be available."
30
- ].join("\n");
31
- },
32
- userFacingName() {
33
- return "mcp-refresh";
34
- }
35
- };
36
- var mcp_refresh_default = mcpRefresh;
37
- export {
38
- mcp_refresh_default as default
39
- };
40
- //# sourceMappingURL=mcp_refresh.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/commands/mcp_refresh.ts"],
4
- "sourcesContent": ["import type { Command } from '@commands'\nimport { refreshMCPConnections, getClients } from '@services/mcpClient'\nimport { PRODUCT_COMMAND } from '@constants/product'\nimport chalk from 'chalk'\nimport { getTheme } from '@utils/theme'\n\nconst mcpRefresh = {\n type: 'local',\n name: 'mcp-refresh',\n description: 'Refresh MCP server connections (reconnect to all configured servers)',\n isEnabled: true,\n isHidden: false,\n async call() {\n const theme = getTheme()\n\n // Clear cache and force reconnection\n refreshMCPConnections()\n\n // Wait a moment for cleanup\n await new Promise(resolve => setTimeout(resolve, 100))\n\n // Get fresh connections\n const clients = await getClients()\n\n if (clients.length === 0) {\n return `\u23BF No MCP servers configured. Run \\`${PRODUCT_COMMAND} mcp\\` to learn about how to configure MCP servers.`\n }\n\n // Sort servers by name and format status with colors\n const serverStatusLines = clients\n .sort((a, b) => a.name.localeCompare(b.name))\n .map(client => {\n const isConnected = client.type === 'connected'\n const status = isConnected ? 'connected' : 'failed'\n const coloredStatus = isConnected\n ? chalk.hex(theme.success)(status)\n : chalk.hex(theme.error)(status)\n return `\u23BF \u2022 ${client.name}: ${coloredStatus}`\n })\n\n return [\n '\u23BF MCP connections refreshed',\n ...serverStatusLines,\n '',\n '\u23BF Note: You may need to restart the conversation for new tools to be available.',\n ].join('\\n')\n },\n userFacingName() {\n return 'mcp-refresh'\n },\n} satisfies Command\n\nexport default mcpRefresh\n"],
5
- "mappings": "AACA,SAAS,uBAAuB,kBAAkB;AAClD,SAAS,uBAAuB;AAChC,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAEzB,MAAM,aAAa;AAAA,EACjB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,MAAM,OAAO;AACX,UAAM,QAAQ,SAAS;AAGvB,0BAAsB;AAGtB,UAAM,IAAI,QAAQ,aAAW,WAAW,SAAS,GAAG,CAAC;AAGrD,UAAM,UAAU,MAAM,WAAW;AAEjC,QAAI,QAAQ,WAAW,GAAG;AACxB,aAAO,4CAAuC,eAAe;AAAA,IAC/D;AAGA,UAAM,oBAAoB,QACvB,KAAK,CAAC,GAAG,MAAM,EAAE,KAAK,cAAc,EAAE,IAAI,CAAC,EAC3C,IAAI,YAAU;AACb,YAAM,cAAc,OAAO,SAAS;AACpC,YAAM,SAAS,cAAc,cAAc;AAC3C,YAAM,gBAAgB,cAClB,MAAM,IAAI,MAAM,OAAO,EAAE,MAAM,IAC/B,MAAM,IAAI,MAAM,KAAK,EAAE,MAAM;AACjC,aAAO,kBAAQ,OAAO,IAAI,KAAK,aAAa;AAAA,IAC9C,CAAC;AAEH,WAAO;AAAA,MACL;AAAA,MACA,GAAG;AAAA,MACH;AAAA,MACA;AAAA,IACF,EAAE,KAAK,IAAI;AAAA,EACb;AAAA,EACA,iBAAiB;AACf,WAAO;AAAA,EACT;AACF;AAEA,IAAO,sBAAQ;",
6
- "names": []
7
- }
@@ -1,61 +0,0 @@
1
- #!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
2
- import { fileURLToPath } from "node:url";
3
- import { dirname, join } from "node:path";
4
- import { existsSync } from "node:fs";
5
- try {
6
- if (!process.env.YOGA_WASM_PATH) {
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = dirname(__filename);
9
- const devCandidate = join(__dirname, "../../yoga.wasm");
10
- const distCandidate = join(__dirname, "./yoga.wasm");
11
- const resolved = existsSync(distCandidate) ? distCandidate : existsSync(devCandidate) ? devCandidate : void 0;
12
- if (resolved) {
13
- process.env.YOGA_WASM_PATH = resolved;
14
- }
15
- }
16
- } catch {
17
- }
18
- import * as dontcare from "@anthropic-ai/sdk/shims/node";
19
- Object.keys(dontcare);
20
- import { createRequire } from "module";
21
- const require2 = createRequire(import.meta.url);
22
- function hasFlag(...flags) {
23
- return process.argv.some((arg) => flags.includes(arg));
24
- }
25
- if (hasFlag("--version", "-v")) {
26
- try {
27
- const pkg = require2("../../package.json");
28
- console.log(pkg.version || "");
29
- } catch {
30
- console.log("");
31
- }
32
- process.exit(0);
33
- }
34
- if (hasFlag("--help-lite")) {
35
- console.log(`Usage: minto [options] [command] [prompt]
36
-
37
- Common options:
38
- -h, --help Show full help
39
- -v, --version Show version
40
- -p, --print Print response and exit (non-interactive)
41
- -c, --cwd <cwd> Set working directory`);
42
- process.exit(0);
43
- }
44
- ;
45
- (async () => {
46
- try {
47
- const { initSentry } = await import("../services/sentry.js");
48
- initSentry();
49
- const cliModule = await import("./cli.js");
50
- if (typeof cliModule.main === "function") {
51
- await cliModule.main();
52
- } else {
53
- console.error("\u274C main() function not found in CLI module");
54
- process.exit(1);
55
- }
56
- } catch (err) {
57
- console.error("\u274C Failed to start Minto:", err);
58
- process.exit(1);
59
- }
60
- })();
61
- //# sourceMappingURL=cli-wrapper.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/entrypoints/cli-wrapper.tsx"],
4
- "sourcesContent": ["#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps\n\n/**\n * CLI Entry Point Wrapper\n *\n * This wrapper uses dynamic imports to avoid top-level await issues when bundled with esbuild.\n * All imports are lazy-loaded inside an async IIFE to ensure the module initializes synchronously.\n */\n\nimport { fileURLToPath } from 'node:url'\nimport { dirname, join } from 'node:path'\nimport { existsSync } from 'node:fs'\n\n// Ensure YOGA_WASM_PATH is set for Ink across run modes (wrapper/dev)\ntry {\n if (!process.env.YOGA_WASM_PATH) {\n const __filename = fileURLToPath(import.meta.url)\n const __dirname = dirname(__filename)\n const devCandidate = join(__dirname, '../../yoga.wasm')\n const distCandidate = join(__dirname, './yoga.wasm')\n const resolved = existsSync(distCandidate)\n ? distCandidate\n : existsSync(devCandidate)\n ? devCandidate\n : undefined\n if (resolved) {\n process.env.YOGA_WASM_PATH = resolved\n }\n }\n} catch {}\n\n// XXX: Bun Win32 bug workaround - import for side effects\nimport * as dontcare from '@anthropic-ai/sdk/shims/node'\nObject.keys(dontcare)\n\nimport { createRequire } from 'module'\nconst require = createRequire(import.meta.url)\n\nfunction hasFlag(...flags: string[]): boolean {\n return process.argv.some(arg => flags.includes(arg))\n}\n\n// Minimal pre-parse: handle version/help-lite early without loading heavy UI modules\nif (hasFlag('--version', '-v')) {\n try {\n const pkg = require('../../package.json')\n console.log(pkg.version || '')\n } catch {\n console.log('')\n }\n process.exit(0)\n}\n\nif (hasFlag('--help-lite')) {\n console.log(`Usage: minto [options] [command] [prompt]\\n\\n` +\n `Common options:\\n` +\n ` -h, --help Show full help\\n` +\n ` -v, --version Show version\\n` +\n ` -p, --print Print response and exit (non-interactive)\\n` +\n ` -c, --cwd <cwd> Set working directory`)\n process.exit(0)\n}\n\n// Main async wrapper to avoid top-level await\n;(async () => {\n try {\n // Initialize Sentry as early as possible (dynamic import)\n const { initSentry } = await import('@services/sentry')\n initSentry()\n\n // Dynamically import and execute the main CLI module\n const cliModule = await import('./cli.js')\n\n // The cli module will have already executed main() in development mode,\n // but in bundled mode we need to call it explicitly if it exports it\n if (typeof cliModule.main === 'function') {\n await cliModule.main()\n } else {\n console.error('\u274C main() function not found in CLI module')\n process.exit(1)\n }\n } catch (err) {\n console.error('\u274C Failed to start Minto:', err)\n process.exit(1)\n }\n})()\n"],
5
- "mappings": ";AASA,SAAS,qBAAqB;AAC9B,SAAS,SAAS,YAAY;AAC9B,SAAS,kBAAkB;AAG3B,IAAI;AACF,MAAI,CAAC,QAAQ,IAAI,gBAAgB;AAC/B,UAAM,aAAa,cAAc,YAAY,GAAG;AAChD,UAAM,YAAY,QAAQ,UAAU;AACpC,UAAM,eAAe,KAAK,WAAW,iBAAiB;AACtD,UAAM,gBAAgB,KAAK,WAAW,aAAa;AACnD,UAAM,WAAW,WAAW,aAAa,IACrC,gBACA,WAAW,YAAY,IACrB,eACA;AACN,QAAI,UAAU;AACZ,cAAQ,IAAI,iBAAiB;AAAA,IAC/B;AAAA,EACF;AACF,QAAQ;AAAC;AAGT,YAAY,cAAc;AAC1B,OAAO,KAAK,QAAQ;AAEpB,SAAS,qBAAqB;AAC9B,MAAMA,WAAU,cAAc,YAAY,GAAG;AAE7C,SAAS,WAAW,OAA0B;AAC5C,SAAO,QAAQ,KAAK,KAAK,SAAO,MAAM,SAAS,GAAG,CAAC;AACrD;AAGA,IAAI,QAAQ,aAAa,IAAI,GAAG;AAC9B,MAAI;AACF,UAAM,MAAMA,SAAQ,oBAAoB;AACxC,YAAQ,IAAI,IAAI,WAAW,EAAE;AAAA,EAC/B,QAAQ;AACN,YAAQ,IAAI,EAAE;AAAA,EAChB;AACA,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAI,QAAQ,aAAa,GAAG;AAC1B,UAAQ,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6CAKoC;AAChD,UAAQ,KAAK,CAAC;AAChB;AAGA;AAAA,CAAE,YAAY;AACZ,MAAI;AAEF,UAAM,EAAE,WAAW,IAAI,MAAM,OAAO,kBAAkB;AACtD,eAAW;AAGX,UAAM,YAAY,MAAM,OAAO,UAAU;AAIzC,QAAI,OAAO,UAAU,SAAS,YAAY;AACxC,YAAM,UAAU,KAAK;AAAA,IACvB,OAAO;AACL,cAAQ,MAAM,gDAA2C;AACzD,cAAQ,KAAK,CAAC;AAAA,IAChB;AAAA,EACF,SAAS,KAAK;AACZ,YAAQ,MAAM,iCAA4B,GAAG;AAC7C,YAAQ,KAAK,CAAC;AAAA,EAChB;AACF,GAAG;",
6
- "names": ["require"]
7
- }
package/dist/version.js DELETED
@@ -1,7 +0,0 @@
1
- const VERSION = "0.0.12";
2
- const BUILD_DATE = "2025-12-09T07:45:00.000Z";
3
- export {
4
- BUILD_DATE,
5
- VERSION
6
- };
7
- //# sourceMappingURL=version.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/version.ts"],
4
- "sourcesContent": ["/**\n * Application version\n * This file is auto-generated during build process\n */\n\nexport const VERSION = '0.0.12'\nexport const BUILD_DATE = '2025-12-09T07:45:00.000Z'\n"],
5
- "mappings": "AAKO,MAAM,UAAU;AAChB,MAAM,aAAa;",
6
- "names": []
7
- }