monk-pi 0.11.0 → 0.12.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.
package/README.md CHANGED
@@ -37,8 +37,10 @@ npm install -g monk-pi
37
37
  bun add -g monk-pi
38
38
  ```
39
39
 
40
- 安装完成后,在任意项目目录下直接输入:
40
+ 安装完成后,在任意项目目录下直接输入(已支持超短别名 `mp`):
41
41
  ```bash
42
+ mp
43
+ # 或者
42
44
  monk-pi
43
45
  ```
44
46
 
@@ -54,17 +56,19 @@ monk-pi
54
56
  ### 1. 日常交互式编程
55
57
 
56
58
  ```bash
57
- # 直接进入交互式编码 Agent (默认使用 monk-coding)
59
+ # 直接进入交互式编码 Agent (推荐使用超短别名 mp)
60
+ mp
61
+ # 或者标准命令
58
62
  monk-pi
59
63
 
60
64
  # 带着初始任务进入
61
- monk-pi "重构当前目录下的鉴权模块,补充单元测试"
65
+ mp "重构当前目录下的鉴权模块,补充单元测试"
62
66
 
63
67
  # 恢复上一轮历史会话
64
- monk-pi --continue (或 monk-pi continue)
68
+ mp continue (或 mp -c)
65
69
 
66
70
  # 可视化浏览并挑选以往历史任务恢复
67
- monk-pi -r (或 monk-pi resume)
71
+ mp -r (或 mp resume)
68
72
  ```
69
73
 
70
74
  ### 2. 命令行单次执行 (Print Mode)
@@ -94,8 +98,9 @@ monk-pi --model monk "帮我设计一套分布式系统的架构方案"
94
98
  ### 终端 CLI 指令
95
99
  | 命令 | 说明 |
96
100
  | :--- | :--- |
97
- | `monk-pi run <命令>` | **监控运行命令**,报错时自动捕获日志并提示一键呼叫 AI 代码自愈 (Auto-Fix) |
98
- | `monk-pi resume` (或 `-r`) | 可视化交互式浏览历史会话列表,带相对时间和摘要快速恢复 (断点续写) |
101
+ | `mp update` (或 `upgrade`) | **一键检查并升级**:自动识别 Homebrew / npm / bun / pnpm 并自动升级至最新版本 |
102
+ | `monk-pi run <命令>` (或 `mp run`) | **监控运行命令**,报错时自动捕获日志并提示一键呼叫 AI 代码自愈 (Auto-Fix) |
103
+ | `monk-pi resume` (或 `mp -r`) | 可视化交互式浏览历史会话列表,带相对时间和摘要快速恢复 (断点续写) |
99
104
  | `monk-pi login` (或 `auth`) | 交互式配置或更新 Monk API Key,并自动同步至 Pi |
100
105
  | `monk-pi status` (或 `check`) | 检测 API 网络延迟、认证有效性及推演通道 |
101
106
  | `monk-pi model [name]` | 查看或切换默认主力模型 (`monk-coding` / `monk-fast` / `monk`) |
@@ -4,7 +4,7 @@ import path from "path";
4
4
  var MONK_BASE_URL = "https://monk.party/v1";
5
5
  var MONK_WEBSITE = "https://monk.party";
6
6
  var MONK_ACCOUNT_URL = "https://monk.party/account/";
7
- var MONK_PI_VERSION = "0.11.0";
7
+ var MONK_PI_VERSION = "0.12.0";
8
8
  var MONK_MODELS = [
9
9
  {
10
10
  id: "monk-coding",
package/dist/cli.js CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  launchPi,
9
9
  logError,
10
10
  logInfo,
11
+ logSuccess,
11
12
  logWarn,
12
13
  loginCommand,
13
14
  modelCommand,
@@ -17,11 +18,11 @@ import {
17
18
  statusCommand,
18
19
  syncPiExtension,
19
20
  syncPiModelsJson
20
- } from "./chunk-5XGED4S4.js";
21
+ } from "./chunk-XZVWYP4P.js";
21
22
 
22
23
  // src/cli.ts
23
24
  import { Command } from "commander";
24
- import pc3 from "picocolors";
25
+ import pc4 from "picocolors";
25
26
 
26
27
  // src/commands/auto-fix.ts
27
28
  import spawn from "cross-spawn";
@@ -285,6 +286,129 @@ async function resumeCommand(extraArgs = []) {
285
286
  });
286
287
  }
287
288
 
289
+ // src/commands/update.ts
290
+ import fs from "fs";
291
+ import path from "path";
292
+ import spawn2 from "cross-spawn";
293
+ import pc3 from "picocolors";
294
+ function compareSemver(v1, v2) {
295
+ const p1 = v1.replace(/^v/, "").split(".").map((n) => parseInt(n, 10) || 0);
296
+ const p2 = v2.replace(/^v/, "").split(".").map((n) => parseInt(n, 10) || 0);
297
+ for (let i = 0; i < 3; i++) {
298
+ const a = p1[i] ?? 0;
299
+ const b = p2[i] ?? 0;
300
+ if (a > b) return 1;
301
+ if (a < b) return -1;
302
+ }
303
+ return 0;
304
+ }
305
+ async function fetchLatestVersion() {
306
+ try {
307
+ const controller = new AbortController();
308
+ const timeout = setTimeout(() => controller.abort(), 4e3);
309
+ const res = await fetch("https://registry.npmjs.org/monk-pi/latest", {
310
+ headers: { Accept: "application/json" },
311
+ signal: controller.signal
312
+ });
313
+ clearTimeout(timeout);
314
+ if (!res.ok) return null;
315
+ const data = await res.json();
316
+ return data.version || null;
317
+ } catch {
318
+ return null;
319
+ }
320
+ }
321
+ function detectInstallMethod() {
322
+ try {
323
+ const whichCmd = process.platform === "win32" ? "where" : "which";
324
+ const check = spawn2.sync(whichCmd, ["monk-pi"], { encoding: "utf-8" });
325
+ const binPath = check.stdout?.trim().split("\n")[0] || "";
326
+ if (binPath) {
327
+ let resolvedPath = binPath;
328
+ try {
329
+ if (fs.lstatSync(binPath).isSymbolicLink()) {
330
+ resolvedPath = fs.realpathSync(binPath);
331
+ }
332
+ } catch {
333
+ }
334
+ if (resolvedPath.includes("Cellar") || resolvedPath.includes("/opt/homebrew/") || binPath.includes("/opt/homebrew/bin/")) {
335
+ return "homebrew";
336
+ }
337
+ if (binPath.includes(".bun/bin") || resolvedPath.includes(".bun")) {
338
+ return "bun";
339
+ }
340
+ if (binPath.includes("pnpm") || resolvedPath.includes("pnpm")) {
341
+ return "pnpm";
342
+ }
343
+ }
344
+ } catch {
345
+ }
346
+ try {
347
+ const bunCheck = spawn2.sync("bun", ["--version"], { stdio: "ignore" });
348
+ if (bunCheck.status === 0 && fs.existsSync(path.join(process.env.HOME || "", ".bun/bin/monk-pi"))) {
349
+ return "bun";
350
+ }
351
+ } catch {
352
+ }
353
+ return "npm";
354
+ }
355
+ async function updateCommand(force = false) {
356
+ printBanner();
357
+ console.log(` ${pc3.bold("\u3010Monk-Pi \u7248\u672C\u66F4\u65B0\u68C0\u67E5\u3011")}`);
358
+ console.log();
359
+ process.stdout.write(` ${pc3.dim("\u23F3 \u6B63\u5728\u68C0\u67E5\u4E91\u7AEF\u6700\u65B0\u7248\u672C...")} `);
360
+ const latestVersion = await fetchLatestVersion();
361
+ process.stdout.write("\r" + " ".repeat(45) + "\r");
362
+ if (!latestVersion) {
363
+ logWarn("\u65E0\u6CD5\u8FDE\u63A5 npm \u5B98\u65B9\u6E90\u68C0\u67E5\u66F4\u65B0\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u6216\u7A0D\u540E\u91CD\u8BD5\u3002");
364
+ console.log(` ${pc3.dim("\u4F60\u4E5F\u53EF\u4EE5\u76F4\u63A5\u624B\u52A8\u8FD0\u884C:")} ${pc3.cyan("npm install -g monk-pi@latest")}`);
365
+ return 1;
366
+ }
367
+ const comparison = compareSemver(latestVersion, MONK_PI_VERSION);
368
+ if (comparison <= 0 && !force) {
369
+ logSuccess(`\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248\u672C ${pc3.bold(pc3.green(`v${MONK_PI_VERSION}`))}\uFF0C\u65E0\u9700\u66F4\u65B0\u3002`);
370
+ console.log();
371
+ return 0;
372
+ }
373
+ if (comparison > 0) {
374
+ logInfo(
375
+ `\u53D1\u73B0\u65B0\u7248\u672C: ${pc3.bold(pc3.green(`v${latestVersion}`))} ${pc3.dim(`(\u5F53\u524D\u8FD0\u884C\u7248\u672C: v${MONK_PI_VERSION})`)}`
376
+ );
377
+ } else if (force) {
378
+ logInfo(`\u6B63\u5728\u5F3A\u5236\u91CD\u65B0\u5B89\u88C5\u6700\u65B0\u7248\u672C ${pc3.bold(pc3.green(`v${latestVersion}`))} ...`);
379
+ }
380
+ const method = detectInstallMethod();
381
+ console.log();
382
+ let child;
383
+ if (method === "homebrew") {
384
+ logInfo("\u68C0\u6D4B\u5230\u901A\u8FC7 Homebrew \u7BA1\u7406\uFF0C\u6B63\u5728\u6267\u884C: `brew upgrade monk-pi` ...");
385
+ child = spawn2.sync("brew", ["upgrade", "monk-pi"], { stdio: "inherit" });
386
+ } else if (method === "bun") {
387
+ logInfo("\u68C0\u6D4B\u5230\u901A\u8FC7 Bun \u5168\u5C40\u7BA1\u7406\uFF0C\u6B63\u5728\u6267\u884C: `bun add -g monk-pi@latest` ...");
388
+ child = spawn2.sync("bun", ["add", "-g", "monk-pi@latest"], { stdio: "inherit" });
389
+ } else if (method === "pnpm") {
390
+ logInfo("\u68C0\u6D4B\u5230\u901A\u8FC7 pnpm \u7BA1\u7406\uFF0C\u6B63\u5728\u6267\u884C: `pnpm add -g monk-pi@latest` ...");
391
+ child = spawn2.sync("pnpm", ["add", "-g", "monk-pi@latest"], { stdio: "inherit" });
392
+ } else {
393
+ logInfo("\u6B63\u5728\u6267\u884C\u5168\u5C40\u66F4\u65B0: `npm install -g monk-pi@latest` ...");
394
+ child = spawn2.sync("npm", ["install", "-g", "monk-pi@latest"], { stdio: "inherit" });
395
+ }
396
+ console.log();
397
+ if (child.status === 0) {
398
+ syncPiExtension(true);
399
+ logSuccess(pc3.bold(`\u606D\u559C\uFF01Monk-Pi \u5DF2\u6210\u529F\u5347\u7EA7\u81F3\u6700\u65B0\u7248\u672C v${latestVersion}\uFF01`));
400
+ console.log(` ${pc3.dim("\u968F\u65F6\u8F93\u5165")} ${pc3.yellow("mp")} ${pc3.dim("\u7EE7\u7EED\u6781\u901F\u7F16\u7801\u3002")}`);
401
+ console.log();
402
+ return 0;
403
+ } else {
404
+ logError(`\u5347\u7EA7\u8FC7\u7A0B\u5F02\u5E38\uFF0C\u547D\u4EE4\u9000\u51FA\u7801: ${child.status}`);
405
+ logWarn("\u5982\u9047\u6743\u9650\u95EE\u9898\uFF0C\u53EF\u5C1D\u8BD5\u5728\u7EC8\u7AEF\u524D\u7F6E sudo \u91CD\u65B0\u6267\u884C:");
406
+ console.log(` ${pc3.cyan("sudo npm install -g monk-pi@latest")}`);
407
+ console.log();
408
+ return child.status ?? 1;
409
+ }
410
+ }
411
+
288
412
  // src/cli.ts
289
413
  var rawArgs = process.argv.slice(2);
290
414
  var firstArg = rawArgs[0];
@@ -298,13 +422,19 @@ var SUBCOMMANDS = /* @__PURE__ */ new Set([
298
422
  "resume",
299
423
  "history",
300
424
  "run",
301
- "exec"
425
+ "exec",
426
+ "update",
427
+ "upgrade"
302
428
  ]);
303
429
  async function main() {
304
430
  if (firstArg === "run" || firstArg === "exec") {
305
431
  const exitCode2 = await autoFixCommand(rawArgs.slice(1));
306
432
  process.exit(exitCode2);
307
433
  }
434
+ if (firstArg === "update" || firstArg === "upgrade") {
435
+ const exitCode2 = await updateCommand(rawArgs.includes("--force") || rawArgs.includes("-f"));
436
+ process.exit(exitCode2);
437
+ }
308
438
  if (firstArg && SUBCOMMANDS.has(firstArg)) {
309
439
  const program = new Command();
310
440
  program.name("monk-pi").description("Monk \xD7 Pi: \u6781\u901F\u9AD8\u6027\u4EF7\u6BD4 Coding Agent Harness").version(MONK_PI_VERSION);
@@ -335,50 +465,47 @@ async function main() {
335
465
  const exitCode2 = await runCommand(["--continue", ...rawArgs.slice(1)]);
336
466
  process.exit(exitCode2);
337
467
  }
338
- if (firstArg === "run" || firstArg === "exec") {
339
- const exitCode2 = await autoFixCommand(rawArgs.slice(1));
340
- process.exit(exitCode2);
341
- }
342
468
  if (firstArg === "--help" || firstArg === "-h") {
343
469
  printBanner();
344
- console.log(` ${pc3.bold("\u7528\u6CD5:")}`);
345
- console.log(` ${pc3.yellow("monk-pi")} \u8FDB\u5165\u4EA4\u4E92\u5F0F\u7F16\u7801\u6A21\u5F0F (\u9ED8\u8BA4\u4F7F\u7528 monk-coding)`);
346
- console.log(` ${pc3.yellow("monk-pi")} [\u9009\u9879/\u63D0\u793A\u8BCD...] \u4F20\u9012\u6307\u4EE4\u6216\u6587\u4EF6\u7ED9 Pi`);
470
+ console.log(` ${pc4.bold("\u7528\u6CD5:")}`);
471
+ console.log(` ${pc4.yellow("monk-pi")} (\u6216 ${pc4.yellow("mp")}) \u8FDB\u5165\u4EA4\u4E92\u5F0F\u7F16\u7801\u6A21\u5F0F (\u9ED8\u8BA4\u4F7F\u7528 monk-coding)`);
472
+ console.log(` ${pc4.yellow("monk-pi")} [\u9009\u9879/\u63D0\u793A\u8BCD...] \u4F20\u9012\u6307\u4EE4\u6216\u6587\u4EF6\u7ED9 Pi`);
347
473
  console.log();
348
- console.log(` ${pc3.bold("\u793A\u4F8B:")}`);
349
- console.log(` ${pc3.dim("# \u542F\u52A8\u4EA4\u4E92\u5F0F Agent")}`);
350
- console.log(` ${pc3.cyan("monk-pi")}`);
474
+ console.log(` ${pc4.bold("\u793A\u4F8B:")}`);
475
+ console.log(` ${pc4.dim("# \u542F\u52A8\u4EA4\u4E92\u5F0F Agent (\u652F\u6301\u8D85\u77ED\u522B\u540D mp)")}`);
476
+ console.log(` ${pc4.cyan("mp")} (\u6216 ${pc4.cyan("monk-pi")})`);
351
477
  console.log();
352
- console.log(` ${pc3.dim("# \u5E26\u521D\u59CB\u9700\u6C42\u8FDB\u5165\u4EA4\u4E92\u5F0F\u7EC8\u7AEF")}`);
353
- console.log(` ${pc3.cyan('monk-pi "\u91CD\u6784\u8FD9\u4E2A\u76EE\u5F55\u4E0B\u7684\u4EE3\u7801"')}`);
478
+ console.log(` ${pc4.dim("# \u5E26\u521D\u59CB\u9700\u6C42\u8FDB\u5165\u4EA4\u4E92\u5F0F\u7EC8\u7AEF")}`);
479
+ console.log(` ${pc4.cyan('mp "\u91CD\u6784\u8FD9\u4E2A\u76EE\u5F55\u4E0B\u7684\u4EE3\u7801"')}`);
354
480
  console.log();
355
- console.log(` ${pc3.dim("# \u975E\u4EA4\u4E92\u5F0F\u547D\u4EE4\u884C\u6A21\u5F0F (\u6253\u5370\u7ED3\u679C\u5E76\u9000\u51FA)")}`);
356
- console.log(` ${pc3.cyan('monk-pi -p "\u89E3\u91CA\u5F53\u524D package.json \u7684\u4F9D\u8D56"')}`);
481
+ console.log(` ${pc4.dim("# \u975E\u4EA4\u4E92\u5F0F\u547D\u4EE4\u884C\u6A21\u5F0F (\u6253\u5370\u7ED3\u679C\u5E76\u9000\u51FA)")}`);
482
+ console.log(` ${pc4.cyan('mp -p "\u89E3\u91CA\u5F53\u524D package.json \u7684\u4F9D\u8D56"')}`);
357
483
  console.log();
358
- console.log(` ${pc3.dim("# \u6307\u5B9A\u4F7F\u7528\u6781\u901F\u63A8\u7406\u6A21\u578B")}`);
359
- console.log(` ${pc3.cyan('monk-pi --model monk-fast "\u5FEB\u901F\u5BA1\u67E5\u8FD9\u4E2A\u63D0\u4EA4"')}`);
484
+ console.log(` ${pc4.dim("# \u6307\u5B9A\u4F7F\u7528\u6781\u901F\u63A8\u7406\u6A21\u578B")}`);
485
+ console.log(` ${pc4.cyan('mp --model monk-fast "\u5FEB\u901F\u5BA1\u67E5\u8FD9\u4E2A\u63D0\u4EA4"')}`);
360
486
  console.log();
361
- console.log(` ${pc3.dim("# \u6062\u590D\u4E0A\u4E00\u8F6E\u5386\u53F2\u4F1A\u8BDD")}`);
362
- console.log(` ${pc3.cyan("monk-pi --continue (\u6216 monk-pi continue)")}`);
487
+ console.log(` ${pc4.dim("# \u6062\u590D\u4E0A\u4E00\u8F6E\u5386\u53F2\u4F1A\u8BDD")}`);
488
+ console.log(` ${pc4.cyan("mp continue (\u6216 mp -c)")}`);
363
489
  console.log();
364
- console.log(` ${pc3.dim("# \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u4EE5\u5F80\u5386\u53F2\u4EFB\u52A1")}`);
365
- console.log(` ${pc3.cyan("monk-pi -r (\u6216 monk-pi resume)")}`);
490
+ console.log(` ${pc4.dim("# \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u4EE5\u5F80\u5386\u53F2\u4EFB\u52A1")}`);
491
+ console.log(` ${pc4.cyan("mp -r (\u6216 mp resume)")}`);
366
492
  console.log();
367
- console.log(` ${pc3.dim("# \u76D1\u63A7\u547D\u4EE4\u8FD0\u884C\u5E76\u4EAB\u53D7\u62A5\u9519\u4E00\u952E\u81EA\u6108")}`);
368
- console.log(` ${pc3.cyan('monk-pi run "npm run build"')}`);
369
- console.log(` ${pc3.cyan('monk-pi run "npm test"')}`);
493
+ console.log(` ${pc4.dim("# \u76D1\u63A7\u547D\u4EE4\u8FD0\u884C\u5E76\u4EAB\u53D7\u62A5\u9519\u4E00\u952E\u81EA\u6108")}`);
494
+ console.log(` ${pc4.cyan('mp run "npm run build"')}`);
495
+ console.log(` ${pc4.cyan('mp run "npm test"')}`);
370
496
  console.log();
371
- console.log(` ${pc3.bold("\u4E13\u5C5E\u7BA1\u7406\u6307\u4EE4:")}`);
372
- console.log(` ${pc3.yellow("monk-pi run <\u547D\u4EE4>")} \u76D1\u63A7\u547D\u4EE4\u8FD0\u884C\u5E76\u5728\u62A5\u9519\u65F6\u4E00\u952E\u547C\u53EB AI \u81EA\u6108\u4EE3\u7801 (Auto-Fix)`);
373
- console.log(` ${pc3.yellow("monk-pi resume (\u6216 -r)")} \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u5386\u53F2\u4F1A\u8BDD (\u65AD\u70B9\u7EED\u5199)`);
374
- console.log(` ${pc3.yellow("monk-pi login")} \u914D\u7F6E / \u66F4\u65B0 Monk API Key`);
375
- console.log(` ${pc3.yellow("monk-pi status")} \u68C0\u6D4B API \u5EF6\u8FDF\u3001Key \u72B6\u6001\u4E0E\u8FDE\u901A\u6027`);
376
- console.log(` ${pc3.yellow("monk-pi model [name]")} \u67E5\u770B\u6216\u5207\u6362\u9ED8\u8BA4\u4E3B\u529B\u6A21\u578B`);
377
- console.log(` ${pc3.yellow("monk-pi doctor")} \u4E00\u952E\u8BCA\u65AD\u73AF\u5883\u4F9D\u8D56\u4E0E\u517C\u5BB9\u914D\u7F6E`);
497
+ console.log(` ${pc4.bold("\u4E13\u5C5E\u7BA1\u7406\u6307\u4EE4:")}`);
498
+ console.log(` ${pc4.yellow("mp update (\u6216 upgrade)")} \u4E00\u952E\u68C0\u67E5\u5E76\u81EA\u52A8\u5347\u7EA7\u81F3\u4E91\u7AEF\u6700\u65B0\u7248\u672C`);
499
+ console.log(` ${pc4.yellow("mp run <\u547D\u4EE4>")} \u76D1\u63A7\u547D\u4EE4\u8FD0\u884C\u5E76\u5728\u62A5\u9519\u65F6\u4E00\u952E\u547C\u53EB AI \u81EA\u6108\u4EE3\u7801 (Auto-Fix)`);
500
+ console.log(` ${pc4.yellow("mp resume (\u6216 -r)")} \u53EF\u89C6\u5316\u6D4F\u89C8\u5E76\u6062\u590D\u5386\u53F2\u4F1A\u8BDD (\u65AD\u70B9\u7EED\u5199)`);
501
+ console.log(` ${pc4.yellow("mp login")} \u914D\u7F6E / \u66F4\u65B0 Monk API Key`);
502
+ console.log(` ${pc4.yellow("mp status")} \u68C0\u6D4B API \u5EF6\u8FDF\u3001Key \u72B6\u6001\u4E0E\u8FDE\u901A\u6027`);
503
+ console.log(` ${pc4.yellow("mp model [name]")} \u67E5\u770B\u6216\u5207\u6362\u9ED8\u8BA4\u4E3B\u529B\u6A21\u578B`);
504
+ console.log(` ${pc4.yellow("mp doctor")} \u4E00\u952E\u8BCA\u65AD\u73AF\u5883\u4F9D\u8D56\u4E0E\u517C\u5BB9\u914D\u7F6E`);
378
505
  console.log();
379
- console.log(` ${pc3.bold("\u76F8\u5173\u94FE\u63A5:")}`);
380
- console.log(` Monk \u5B98\u7F51: ${pc3.underline(pc3.cyan(MONK_WEBSITE))}`);
381
- console.log(` \u7528\u91CF\u67E5\u8BE2: ${pc3.underline(pc3.cyan(MONK_ACCOUNT_URL))}`);
506
+ console.log(` ${pc4.bold("\u76F8\u5173\u94FE\u63A5:")}`);
507
+ console.log(` Monk \u5B98\u7F51: ${pc4.underline(pc4.cyan(MONK_WEBSITE))}`);
508
+ console.log(` \u7528\u91CF\u67E5\u8BE2: ${pc4.underline(pc4.cyan(MONK_ACCOUNT_URL))}`);
382
509
  console.log();
383
510
  return;
384
511
  }
@@ -390,7 +517,7 @@ async function main() {
390
517
  process.exit(exitCode);
391
518
  }
392
519
  main().catch((err) => {
393
- console.error(pc3.red(`
520
+ console.error(pc4.red(`
394
521
  [monk-pi \u5F02\u5E38]: ${err.message || err}
395
522
  `));
396
523
  process.exit(1);
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  declare const MONK_BASE_URL = "https://monk.party/v1";
2
2
  declare const MONK_WEBSITE = "https://monk.party";
3
3
  declare const MONK_ACCOUNT_URL = "https://monk.party/account/";
4
- declare const MONK_PI_VERSION = "0.11.0";
4
+ declare const MONK_PI_VERSION = "0.12.0";
5
5
  declare const MONK_MODELS: readonly [{
6
6
  readonly id: "monk-coding";
7
7
  readonly name: "Monk Coding (代码主力 - 推荐)";
package/dist/index.js CHANGED
@@ -42,7 +42,7 @@ import {
42
42
  syncPiModelsJson,
43
43
  testChatCompletion,
44
44
  validateApiKey
45
- } from "./chunk-5XGED4S4.js";
45
+ } from "./chunk-XZVWYP4P.js";
46
46
  export {
47
47
  DEFAULT_MONK_MODEL,
48
48
  MONK_ACCOUNT_URL,
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "monk-pi",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Zero-config harness for running Pi Coding Agent with Monk API (monk.party)",
5
5
  "type": "module",
6
6
  "bin": {
7
- "monk-pi": "./dist/cli.js"
7
+ "monk-pi": "./dist/cli.js",
8
+ "mp": "./dist/cli.js"
8
9
  },
9
10
  "main": "./dist/index.js",
10
11
  "types": "./dist/index.d.ts",