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
|
@@ -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
|
|
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
|
}
|