@within-7/minto 0.1.0 → 0.1.2
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 +3 -0
- package/dist/components/PromptInput.js +27 -9
- package/dist/components/PromptInput.js.map +2 -2
- package/dist/components/TodoPanel.js +1 -0
- package/dist/components/TodoPanel.js.map +2 -2
- package/dist/entrypoints/cli.js +39 -16
- package/dist/entrypoints/cli.js.map +2 -2
- package/package.json +15 -17
- package/dist/commands/build.js +0 -74
- package/dist/commands/build.js.map +0 -7
- package/dist/commands/mcp.js +0 -40
- package/dist/commands/mcp.js.map +0 -7
- package/dist/commands/mcp_refresh.js +0 -40
- package/dist/commands/mcp_refresh.js.map +0 -7
- package/dist/entrypoints/cli-wrapper.js +0 -61
- package/dist/entrypoints/cli-wrapper.js.map +0 -7
- package/dist/version.js +0 -7
- package/dist/version.js.map +0 -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
package/dist/version.js.map
DELETED
|
@@ -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
|
-
}
|