waygate-mmcode 0.2.1 → 0.2.3

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
@@ -44,11 +44,12 @@ mmcode
44
44
  ```
45
45
 
46
46
  ```
47
- 途关 · MiniMax Code 反代 v0.2.0
47
+ 途关 · MiniMax Code 反代 v0.2.2
48
48
 
49
49
  凭证 ✓ access 有效约 187 分钟(下次请求自动刷新)
50
50
  上游 https://agent.minimax.cn (Anthropic 兼容)
51
- 代理 http://127.0.0.1:8788
51
+ 代理 http://127.0.0.1:8788/v1 (OpenAI 系客户端:Cursor / Cherry Studio / OpenAI SDK)
52
+ http://127.0.0.1:8788 (Anthropic 系客户端:Claude Code,它自己会补 /v1)
52
53
  密钥 sk-mmcode-1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
53
54
 
54
55
  模型 ID(填进你的客户端):
package/dist/index.js CHANGED
@@ -7,8 +7,10 @@
7
7
  * ⚠️ 凭证互斥:MiniMax 同一账号只能有一个有效会话 —— 本工具与官方客户端同账号会互相踢下线。
8
8
  * 建议给本工具配专用账号。详见 README。
9
9
  */
10
+ import { createRequire } from 'node:module';
10
11
  import { runCli } from 'waygate-core';
11
12
  import { createMmcodeAdapter } from './adapter.js';
12
- const VERSION = '0.2.0';
13
+ /* 版本从 package.json 读 —— 硬编码会与 npm 发布版本漂移(已踩过:package 升 0.1.2 而 CLI 仍显示 0.1.0)。 */
14
+ const VERSION = createRequire(import.meta.url)('../package.json').version;
13
15
  const code = await runCli(createMmcodeAdapter(), { version: VERSION });
14
16
  process.exit(code);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waygate-mmcode",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "MiniMax Code 本地反代:读取本机客户端登录态,提供 Anthropic/OpenAI 兼容的本地聊天端点",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -43,6 +43,6 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "waygate-core": "^0.2.1"
46
+ "waygate-core": "^0.2.3"
47
47
  }
48
48
  }