@aiyiran/myclaw 1.1.7 → 1.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.
@@ -146,6 +146,24 @@ function run(cliArgs) {
146
146
  fs.mkdirSync(agentDir, { recursive: true });
147
147
  }
148
148
  fs.writeFileSync(profilesPath, JSON.stringify(profiles, null, 2) + '\n', 'utf8');
149
+
150
+ // 同时更新 models.json 里的 minimax.apiKey 占位符
151
+ const modelsPath = path.join(agentDir, 'models.json');
152
+ if (fs.existsSync(modelsPath)) {
153
+ try {
154
+ const models = JSON.parse(fs.readFileSync(modelsPath, 'utf8'));
155
+ if (models.providers && models.providers.minimax) {
156
+ models.providers.minimax.apiKey = apiKey;
157
+ }
158
+ if (models.providers && models.providers['minimax-portal']) {
159
+ models.providers['minimax-portal'].apiKey = apiKey;
160
+ }
161
+ fs.writeFileSync(modelsPath, JSON.stringify(models, null, 2) + '\n', 'utf8');
162
+ } catch {
163
+ // models.json 解析失败则跳过
164
+ }
165
+ }
166
+
149
167
  console.log(' ✅ ' + agent.id);
150
168
  okCount++;
151
169
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {