claw-subagent-service 0.0.50 → 0.0.51

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claw-subagent-service",
3
- "version": "0.0.50",
3
+ "version": "0.0.51",
4
4
  "description": "虾说智能助手",
5
5
  "main": "cli.js",
6
6
  "bin": {
@@ -111,8 +111,13 @@ function getGatewayToken() {
111
111
  if (fs.existsSync(filePath)) {
112
112
  const content = fs.readFileSync(filePath, 'utf-8');
113
113
  const config = JSON.parse(content);
114
- // 可能的 token 字段名
115
- const token = config.gatewayToken || config.token || config.apiKey || config.api_key || config.password;
114
+ // 可能的 token 字段名(支持嵌套路径 gateway.auth.token)
115
+ const token = config.gatewayToken
116
+ || (config.gateway?.auth?.token)
117
+ || config.token
118
+ || config.apiKey
119
+ || config.api_key
120
+ || config.password;
116
121
  if (token) {
117
122
  return String(token);
118
123
  }