@aiyiran/myclaw 1.1.117 → 1.1.119

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.
@@ -144,6 +144,18 @@ function run(cliArgs) {
144
144
  console.log('⊘ 未传 --default,保留现有默认模型');
145
145
  }
146
146
 
147
+ // ── --only 额外清除 per-agent 覆盖 ──
148
+ if (onlyMode) {
149
+ let overrideCount = 0;
150
+ for (const agent of (config.agents.list || [])) {
151
+ if (agent.model && agent.model !== DEFAULT_MODEL) {
152
+ delete agent.model;
153
+ overrideCount++;
154
+ }
155
+ }
156
+ if (overrideCount > 0) console.log('🧹 --only: 已清除 ' + overrideCount + ' 个 agent 的独立 model 覆盖');
157
+ }
158
+
147
159
  writeConfig(config, configPath);
148
160
  console.log('✅ openclaw.json 已更新');
149
161
 
@@ -200,10 +212,13 @@ function run(cliArgs) {
200
212
  const sessions = JSON.parse(fs.readFileSync(sessionsPath, 'utf8'));
201
213
  let changed = 0;
202
214
  for (const key of Object.keys(sessions)) {
203
- if (sessions[key]?.model && sessions[key].model !== DEFAULT_MODEL) {
204
- sessions[key].model = DEFAULT_MODEL;
205
- changed++;
206
- }
215
+ const m = sessions[key]?.model;
216
+ if (!m) continue;
217
+ // 修复无前缀的旧格式残留
218
+ if (m === 'MiniMax-M2.7-highspeed') { sessions[key].model = 'minimax/MiniMax-M3'; changed++; continue; }
219
+ if (m === 'glm-5.1') { sessions[key].model = 'zai/glm-5.1'; changed++; continue; }
220
+ // 统一迁移到新默认
221
+ if (m !== DEFAULT_MODEL) { sessions[key].model = DEFAULT_MODEL; changed++; }
207
222
  }
208
223
  if (changed > 0) {
209
224
  fs.writeFileSync(sessionsPath, JSON.stringify(sessions, null, 2) + '\n', 'utf8');
@@ -241,6 +241,18 @@ function run(cliArgs) {
241
241
  console.log('⊘ 未传 --default,保留现有默认模型');
242
242
  }
243
243
 
244
+ // ── --only 额外清除 per-agent 覆盖 ──
245
+ if (onlyMode) {
246
+ let overrideCount = 0;
247
+ for (const agent of (config.agents.list || [])) {
248
+ if (agent.model && agent.model !== DEFAULT_MODEL) {
249
+ delete agent.model;
250
+ overrideCount++;
251
+ }
252
+ }
253
+ if (overrideCount > 0) console.log('🧹 --only: 已清除 ' + overrideCount + ' 个 agent 的独立 model 覆盖');
254
+ }
255
+
244
256
  writeConfig(config, configPath);
245
257
  console.log('✅ openclaw.json 已更新');
246
258
 
@@ -297,10 +309,13 @@ function run(cliArgs) {
297
309
  const sessions = JSON.parse(fs.readFileSync(sessionsPath, 'utf8'));
298
310
  let changed = 0;
299
311
  for (const key of Object.keys(sessions)) {
300
- if (sessions[key]?.model && sessions[key].model !== DEFAULT_MODEL) {
301
- sessions[key].model = DEFAULT_MODEL;
302
- changed++;
303
- }
312
+ const m = sessions[key]?.model;
313
+ if (!m) continue;
314
+ // 修复无前缀的旧格式残留
315
+ if (m === 'glm-5.1') { sessions[key].model = 'zai/glm-5.1'; changed++; continue; }
316
+ if (m === 'MiniMax-M2.7-highspeed') { sessions[key].model = 'minimax/MiniMax-M3'; changed++; continue; }
317
+ // 统一迁移到新默认
318
+ if (m !== DEFAULT_MODEL) { sessions[key].model = DEFAULT_MODEL; changed++; }
304
319
  }
305
320
  if (changed > 0) {
306
321
  fs.writeFileSync(sessionsPath, JSON.stringify(sessions, null, 2) + '\n', 'utf8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.117",
3
+ "version": "1.1.119",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -3,11 +3,6 @@
3
3
  "_doc_order": "执行顺序: 1.UI注入(patch.js) → 2.skills → 3.agents → 4.config → 5.run",
4
4
  "_doc_skills": "Step 2: 将 myclaw/skills/ 下的技能包复制到 ~/.openclaw/workspace/skills/",
5
5
  "skills": [
6
- {
7
- "name": "minimax-inject",
8
- "strategy": "off",
9
- "description": "minimax-inject (agent 可调用的注入技能)"
10
- },
11
6
  {
12
7
  "name": "tavily-search",
13
8
  "strategy": "off",
@@ -21,17 +16,13 @@
21
16
  {
22
17
  "name": "yiran-playground-template-use",
23
18
  "strategy": "on",
24
- "ignore": [
25
- "templates"
26
- ],
19
+ "ignore": ["templates"],
27
20
  "description": "AI Playground 课程模板库(存储、搜索、deploy 一条龙)"
28
21
  },
29
22
  {
30
23
  "name": "yiran-course-template-pipeline",
31
24
  "strategy": "delete",
32
- "ignore": [
33
- "templates"
34
- ],
25
+ "ignore": ["templates"],
35
26
  "description": "课程模板制作流水线(demo -> student/teacher JSON -> HTML 打包)"
36
27
  },
37
28
  {
@@ -110,4 +101,4 @@
110
101
  "description": "注入 controlUi 配置 (allowInsecureAuth + allowedOrigins)"
111
102
  }
112
103
  ]
113
- }
104
+ }