@mangomagic/cli 0.1.7 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mangomagic/cli",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "MangoMagic CLI — sign in, manage episodes, and expose MangoMagic to MCP clients (Claude Desktop, Cursor).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -24,6 +24,11 @@
24
24
  "dependencies": {
25
25
  "@modelcontextprotocol/sdk": "^1.0.4"
26
26
  },
27
- "keywords": ["mangomagic", "cli", "mcp", "podcast"],
27
+ "keywords": [
28
+ "mangomagic",
29
+ "cli",
30
+ "mcp",
31
+ "podcast"
32
+ ],
28
33
  "license": "MIT"
29
34
  }
package/src/ai/kimi.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import { apiCall } from "../api.mjs";
2
2
 
3
3
  export async function planWithKimi(userText, context = {}) {
4
- const result = await apiCall("cli-ai-route", { body: { text: userText, context } });
5
- if (!result?.plan?.action) throw new Error("MangoMagic AI returned no routing decision.");
6
- return result.plan;
4
+ const result = await apiCall("cli-ai-route", { body: { input: userText, context } });
5
+ const plan = result?.plan ?? result;
6
+ if (!plan?.action) throw new Error("MangoMagic AI returned no routing decision.");
7
+ return plan;
7
8
  }
package/src/index.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { readFileSync } from "node:fs";
1
2
  import { deviceLogin } from "./auth/device-flow.mjs";
2
3
  import { chat, createTalkingCards, handleNaturalLanguage } from "./chat/natural-language.mjs";
3
4
  import { loadToken, saveToken, clearToken, credentialsPath } from "./auth/token-store.mjs";
@@ -11,6 +12,7 @@ const GOLD = "\x1b[38;2;241;171;28m";
11
12
  const DIM = "\x1b[2m";
12
13
  const BOLD = "\x1b[1m";
13
14
  const RESET = "\x1b[0m";
15
+ const PACKAGE_VERSION = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8")).version;
14
16
 
15
17
  function help() {
16
18
  process.stdout.write(`
@@ -256,6 +258,9 @@ export async function run(argv) {
256
258
  case "help":
257
259
  case "--help":
258
260
  case "-h": return help();
261
+ case "version":
262
+ case "--version":
263
+ case "-v": return process.stdout.write(`${PACKAGE_VERSION}\n`);
259
264
  default:
260
265
  return handleNaturalLanguage(argv.join(" "), actions());
261
266
  }