@aiyiran/myclaw 1.1.130 → 1.1.131

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/index.js CHANGED
@@ -108,12 +108,14 @@ function runInstall() {
108
108
  // ============================================================================
109
109
 
110
110
  const OPENCLAW_VERSION = '2026.5.7';
111
+ const OPENCLAW_VERSION_BETA = '2026.6.9';
111
112
 
112
- function runReinstall() {
113
+ function runReinstall(version, isBeta) {
114
+ const targetVersion = version || OPENCLAW_VERSION;
113
115
  const bar = '────────────────────────────────────────';
114
116
  console.log('');
115
117
  console.log(bar);
116
- console.log(' 🔄 OpenClaw 重装工具 (锁定版本: ' + colors.green + OPENCLAW_VERSION + colors.nc + ')');
118
+ console.log(' 🔄 OpenClaw 重装工具 (锁定版本: ' + colors.green + targetVersion + colors.nc + ')');
117
119
  console.log(bar);
118
120
  console.log('');
119
121
 
@@ -157,9 +159,9 @@ function runReinstall() {
157
159
  console.log('');
158
160
 
159
161
  // 5. 重新安装特定版本
160
- console.log('[5/8] 📦 安装 openclaw@' + OPENCLAW_VERSION + '...');
162
+ console.log('[5/8] 📦 安装 openclaw@' + targetVersion + '...');
161
163
  try {
162
- execSync('npm install -g openclaw@' + OPENCLAW_VERSION, {
164
+ execSync('npm install -g openclaw@' + targetVersion, {
163
165
  stdio: 'inherit',
164
166
  env: { ...process.env, npm_config_progress: 'true' }
165
167
  });
@@ -200,6 +202,19 @@ function runReinstall() {
200
202
  }
201
203
  console.log('');
202
204
 
205
+ // 9. (--beta 专属) 注入 MiniMax 6.X 兼容配置
206
+ if (isBeta) {
207
+ console.log('[9/9] 🔧 inject-minimax --beta — 修复 6.X 兼容配置...');
208
+ try {
209
+ const minimax = require('./injects/inject-minimax');
210
+ minimax.run(['--beta']);
211
+ console.log(' ' + colors.green + '✓ MiniMax 6.X 配置已修复' + colors.nc);
212
+ } catch (err) {
213
+ console.log(' ' + colors.yellow + '⚠ inject-minimax 失败: ' + err.message + colors.nc);
214
+ }
215
+ console.log('');
216
+ }
217
+
203
218
  console.log(bar);
204
219
  console.log(colors.green + ' ✅ 重装完成!' + colors.nc);
205
220
  console.log(bar);
@@ -2520,7 +2535,8 @@ function showHelp() {
2520
2535
  console.log('命令:');
2521
2536
  console.log(' start 智能启动(图标 & 命令行通用入口)');
2522
2537
  console.log(' install,i 安装 OpenClaw 服务');
2523
- console.log(' longxia 重装 OpenClaw (清理缓存 + 锁定版本)');
2538
+ console.log(' longxia 重装 OpenClaw (锁定 5.X 稳定版 ' + OPENCLAW_VERSION + ')');
2539
+ console.log(' longxia --beta 重装 OpenClaw (锁定 6.X 测试版 ' + OPENCLAW_VERSION_BETA + ')');
2524
2540
  console.log(' uninstall 卸载 MyClaw (恢复 npm 官方源)');
2525
2541
  console.log(' status 获取控制台网址');
2526
2542
  console.log(' update 自动升级 MyClaw 到最新版本');
@@ -2596,7 +2612,8 @@ if (!command) {
2596
2612
  } else if (command === 'install' || command === 'i') {
2597
2613
  runInstall();
2598
2614
  } else if (command === 'longxia') {
2599
- runReinstall();
2615
+ const isBeta = args.includes('--beta');
2616
+ runReinstall(isBeta ? OPENCLAW_VERSION_BETA : undefined, isBeta);
2600
2617
  } else if (command === 'status') {
2601
2618
  runStatus();
2602
2619
  } else if (command === 'new') {
@@ -9,6 +9,7 @@
9
9
  * myclaw inject-minimax # 仅追加 minimax provider,不改默认,副作用最小
10
10
  * myclaw inject-minimax --default # 追加 + 设为默认 + 全部对话迁移到 MiniMax-M3
11
11
  * myclaw inject-minimax --only # 追加 + 设为默认 + 全部对话迁移 + 清掉所有其他 provider
12
+ * myclaw inject-minimax --beta # --only 的全部行为 + 去掉 authHeader (适配 openclaw 6.X)
12
13
  * myclaw inject-minimax --key sk-xxx # 使用指定 API Key
13
14
  */
14
15
 
@@ -27,6 +28,7 @@ function run(cliArgs) {
27
28
  let apiKey = null;
28
29
  let setDefault = false;
29
30
  let onlyMode = false;
31
+ let betaMode = false;
30
32
 
31
33
  for (let i = 0; i < cliArgs.length; i++) {
32
34
  if (cliArgs[i] === '--key' && cliArgs[i + 1]) {
@@ -37,6 +39,10 @@ function run(cliArgs) {
37
39
  } else if (cliArgs[i] === '--only') {
38
40
  onlyMode = true;
39
41
  setDefault = true; // --only 隐含 --default
42
+ } else if (cliArgs[i] === '--beta') {
43
+ betaMode = true;
44
+ onlyMode = true; // --beta 隐含 --only
45
+ setDefault = true;
40
46
  }
41
47
  }
42
48
 
@@ -55,7 +61,7 @@ function run(cliArgs) {
55
61
  }
56
62
 
57
63
  console.log('📍 找到配置: ' + configPath);
58
- console.log('📌 模式: ' + (onlyMode ? '--only (独占)' : setDefault ? '--default (设默认)' : '追加'));
64
+ console.log('📌 模式: ' + (betaMode ? '--beta (独占+6.X兼容)' : onlyMode ? '--only (独占)' : setDefault ? '--default (设默认)' : '追加'));
59
65
 
60
66
  // ── Step 1:--only 清掉所有其他 provider ──
61
67
  if (onlyMode) {
@@ -100,10 +106,9 @@ function run(cliArgs) {
100
106
  if (!config.models.mode) config.models.mode = "merge";
101
107
  if (!config.models.providers) config.models.providers = {};
102
108
 
103
- config.models.providers.minimax = {
109
+ const minimaxProvider = {
104
110
  baseUrl: "https://api.minimaxi.com/anthropic",
105
111
  api: "anthropic-messages",
106
- authHeader: true,
107
112
  models: [
108
113
  {
109
114
  id: "MiniMax-M3",
@@ -125,6 +130,8 @@ function run(cliArgs) {
125
130
  }
126
131
  ]
127
132
  };
133
+ if (!betaMode) minimaxProvider.authHeader = true;
134
+ config.models.providers.minimax = minimaxProvider;
128
135
 
129
136
  if (!config.agents) config.agents = {};
130
137
  if (!config.agents.defaults) config.agents.defaults = {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.130",
3
+ "version": "1.1.131",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {