@within-7/minto 0.0.13 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
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
@@ -0,0 +1,7 @@
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,SAA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
6
+ "names": []
7
+ }
@@ -0,0 +1,40 @@
1
+ import { listMCPServers, 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 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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,40 @@
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
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,61 @@
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
@@ -0,0 +1,7 @@
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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+ {
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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@within-7/minto",
3
- "version": "0.0.13",
3
+ "version": "0.1.0",
4
4
  "bin": {
5
5
  "minto": "cli.js",
6
6
  "mt": "cli.js"
@@ -25,6 +25,22 @@
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
+ },
28
44
  "dependencies": {
29
45
  "@anthropic-ai/bedrock-sdk": "^0.12.6",
30
46
  "@anthropic-ai/sdk": "^0.39.0",
@@ -95,19 +111,5 @@
95
111
  "strip-ansi": "6.0.1",
96
112
  "formdata-node": "^6.0.3",
97
113
  "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"
112
114
  }
113
115
  }
package/.npmrc DELETED
@@ -1,3 +0,0 @@
1
- # Minto npm configuration
2
- package-lock=false
3
- save-exact=true