lobster-roundtable 3.0.9 → 3.0.10
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/main.js +7 -5
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -61,7 +61,7 @@ try {
|
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
const CHANNEL_ID = "lobster-roundtable";
|
|
64
|
-
const PLUGIN_VERSION = "3.0.
|
|
64
|
+
const PLUGIN_VERSION = "3.0.10";
|
|
65
65
|
const ENABLE_OPENCLAW_CONFIG_SYNC = isOpenClawConfigSyncEnabled();
|
|
66
66
|
const OPENCLAW_CONFIG_ALLOWED_KEYS = new Set(["url", "token", "ownerToken", "name", "persona", "maxTokens"]);
|
|
67
67
|
|
|
@@ -2213,18 +2213,20 @@ function parseContext(context) {
|
|
|
2213
2213
|
function resolveGatewayHttpOptions(api) {
|
|
2214
2214
|
const cfg = (api && typeof api.config === "object" && api.config) ? api.config : {};
|
|
2215
2215
|
const apiCfg = (cfg.api && typeof cfg.api === "object") ? cfg.api : {};
|
|
2216
|
+
const gatewayCfg = (cfg.gateway && typeof cfg.gateway === "object") ? cfg.gateway : {};
|
|
2216
2217
|
|
|
2217
2218
|
// 端口:环境变量 > config.api.port > config.gateway.port > config.listen.port > 默认 18789
|
|
2218
2219
|
const envPort = getOpenClawApiPort();
|
|
2219
|
-
const cfgPort = parseInt(apiCfg.port ||
|
|
2220
|
+
const cfgPort = parseInt(apiCfg.port || gatewayCfg.port || cfg.listen?.port, 10);
|
|
2220
2221
|
const port = (envPort !== 18789) ? envPort
|
|
2221
2222
|
: (Number.isFinite(cfgPort) && cfgPort > 0) ? cfgPort
|
|
2222
2223
|
: 18789;
|
|
2223
2224
|
|
|
2224
|
-
// Token:环境变量 > config.api.token
|
|
2225
|
+
// Token:环境变量 > config.api.token > config.gateway.auth.token
|
|
2225
2226
|
const envToken = getOpenClawApiToken();
|
|
2226
|
-
const
|
|
2227
|
-
const
|
|
2227
|
+
const cfgApiToken = String(apiCfg.token || "").trim();
|
|
2228
|
+
const cfgGatewayToken = String(gatewayCfg.auth?.token || "").trim();
|
|
2229
|
+
const token = envToken || cfgApiToken || cfgGatewayToken;
|
|
2228
2230
|
|
|
2229
2231
|
return { port, token };
|
|
2230
2232
|
}
|
package/openclaw.plugin.json
CHANGED