yymaxapi 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/bin/yymaxapi.js +13 -0
  2. package/package.json +1 -1
package/bin/yymaxapi.js CHANGED
@@ -436,6 +436,19 @@ function getConfigPath() {
436
436
  candidates.push(...openclawCandidates, ...moltbotCandidates);
437
437
  }
438
438
 
439
+ // Fallback: 当前用户非 root 时,也检查 /root 下的配置(OpenClaw 常以 root 安装)
440
+ if (process.platform !== 'win32' && homeDir !== '/root') {
441
+ const rootOpenclawDir = '/root/.openclaw';
442
+ const rootClawdbotDir = '/root/.clawdbot';
443
+ candidates.push(
444
+ path.join(rootOpenclawDir, 'openclaw.json'),
445
+ path.join(rootOpenclawDir, 'moltbot.json'),
446
+ path.join(rootClawdbotDir, 'openclaw.json'),
447
+ path.join(rootClawdbotDir, 'clawdbot.json'),
448
+ path.join(rootClawdbotDir, 'moltbot.json')
449
+ );
450
+ }
451
+
439
452
  const defaultConfig = preferMoltbot
440
453
  ? path.join(moltbotPrimaryDir, 'moltbot.json')
441
454
  : path.join(openclawStateDir, 'openclaw.json');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {