@53ai/53ai-openclaw 1.0.5 → 1.0.7
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/CHANGELOG.md +17 -0
- package/README.md +7 -7
- package/dist/index.cjs.js +9 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/src/utils.d.ts +2 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1084,7 +1084,7 @@ async function monitorProvider(options) {
|
|
|
1084
1084
|
if (isAborted)
|
|
1085
1085
|
return;
|
|
1086
1086
|
// 安全: 不在 URL 中传递敏感信息,仅通过 headers 传递认证
|
|
1087
|
-
const wsUrl = account.
|
|
1087
|
+
const wsUrl = account.WSUrl;
|
|
1088
1088
|
const botId = account.botId || account.config.botId;
|
|
1089
1089
|
const secret = account.secret || account.token || account.config.secret || account.config.token;
|
|
1090
1090
|
// 日志输出时隐藏敏感信息
|
|
@@ -1183,7 +1183,7 @@ function resolveAccount(cfg, accountId = DEFAULT_ACCOUNT_ID) {
|
|
|
1183
1183
|
accountId,
|
|
1184
1184
|
name: config.name ?? "53AIHub",
|
|
1185
1185
|
enabled: config.enabled !== false,
|
|
1186
|
-
|
|
1186
|
+
WSUrl: config.WSUrl || DEFAULT_WS_URL,
|
|
1187
1187
|
botId: config.botId ?? config.userId ?? "",
|
|
1188
1188
|
secret: config.secret ?? config.token ?? "",
|
|
1189
1189
|
token: config.token ?? config.secret ?? "",
|
|
@@ -1204,8 +1204,8 @@ function setAccount(cfg, account) {
|
|
|
1204
1204
|
allowFrom: account.allowFrom ?? existing.allowFrom,
|
|
1205
1205
|
accessPolicy: account.accessPolicy ?? existing.accessPolicy,
|
|
1206
1206
|
sendThinkingMessage: account.sendThinkingMessage ?? existing.sendThinkingMessage,
|
|
1207
|
-
...(account.
|
|
1208
|
-
? {
|
|
1207
|
+
...(account.WSUrl || existing.WSUrl
|
|
1208
|
+
? { WSUrl: account.WSUrl ?? existing.WSUrl }
|
|
1209
1209
|
: {}),
|
|
1210
1210
|
...(account.name || existing.name
|
|
1211
1211
|
? { name: account.name ?? existing.name }
|
|
@@ -1243,10 +1243,10 @@ async function promptSecret(prompter, account) {
|
|
|
1243
1243
|
validate: (value) => (value?.trim() ? undefined : "必填"),
|
|
1244
1244
|
})).trim();
|
|
1245
1245
|
}
|
|
1246
|
-
async function
|
|
1246
|
+
async function promptWSUrl(prompter, account) {
|
|
1247
1247
|
return String(await prompter.text({
|
|
1248
1248
|
message: "WebSocket URL (例如: ws://localhost:8080/ws)",
|
|
1249
|
-
initialValue: account?.
|
|
1249
|
+
initialValue: account?.WSUrl ?? "",
|
|
1250
1250
|
validate: (value) => {
|
|
1251
1251
|
const trimmed = value?.trim();
|
|
1252
1252
|
if (!trimmed)
|
|
@@ -1316,11 +1316,11 @@ const aiHubOnboardingAdapter = {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
const botId = await promptBotId(prompter, account);
|
|
1318
1318
|
const secret = await promptSecret(prompter, account);
|
|
1319
|
-
const
|
|
1319
|
+
const WSUrl = await promptWSUrl(prompter, account);
|
|
1320
1320
|
const cfgWithAccount = setAccount(cfg, {
|
|
1321
1321
|
botId,
|
|
1322
1322
|
secret,
|
|
1323
|
-
|
|
1323
|
+
WSUrl: WSUrl || undefined,
|
|
1324
1324
|
enabled: true,
|
|
1325
1325
|
accessPolicy: account.config.accessPolicy ?? "open",
|
|
1326
1326
|
allowFrom: account.config.allowFrom ?? [],
|
|
@@ -1399,7 +1399,7 @@ const aiHubPlugin = {
|
|
|
1399
1399
|
enabled: account.enabled,
|
|
1400
1400
|
configured: Boolean(account.botId?.trim() || account.token?.trim()),
|
|
1401
1401
|
botId: account.botId,
|
|
1402
|
-
|
|
1402
|
+
WSUrl: account.WSUrl,
|
|
1403
1403
|
accessPolicy: account.config.accessPolicy ?? "open",
|
|
1404
1404
|
}),
|
|
1405
1405
|
resolveAllowFrom: ({ cfg }) => {
|