yymaxapi 1.0.31 → 1.0.32

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 +7 -1
  2. package/package.json +1 -1
package/bin/yymaxapi.js CHANGED
@@ -979,7 +979,7 @@ function detectGatewayEnv(port = 18789) {
979
979
  }
980
980
  }
981
981
  } catch { }
982
- // Fallback: Windows 没有原生 OpenClaw CLI,但 WSL 里有 判定为 WSL
982
+ // Fallback: Windows 没有原生 OpenClaw CLI 检查 WSL / Docker
983
983
  const nativeCli = resolveCliBinary();
984
984
  if (!nativeCli) {
985
985
  const wslCli = getWslCliBinary();
@@ -993,6 +993,12 @@ function detectGatewayEnv(port = 18789) {
993
993
  _gwEnvCache = 'docker';
994
994
  return 'docker';
995
995
  }
996
+ // Windows 没有原生 CLI,WSL 可用但未找到具体 CLI 路径
997
+ // 仍然判定为 WSL(Gateway 大概率在 WSL 里,CLI 可能不在 bash -l 的 PATH 中)
998
+ if (isWslAvailable()) {
999
+ _gwEnvCache = 'wsl';
1000
+ return 'wsl';
1001
+ }
996
1002
  }
997
1003
  _gwEnvCache = 'native';
998
1004
  return 'native';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yymaxapi",
3
- "version": "1.0.31",
3
+ "version": "1.0.32",
4
4
  "description": "跨平台 OpenClaw/Clawdbot 配置管理工具 - 管理中转地址、模型切换、API Keys、测速优化",
5
5
  "main": "bin/yymaxapi.js",
6
6
  "bin": {