@53ai/53ai-openclaw 1.0.6 → 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 +6 -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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
6
|
|
|
7
|
+
## [1.0.7] - 2026-03-19
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
- 规范配置项命名:将 `websocketUrl` 统一更名为 `WSUrl`。
|
|
11
|
+
- 文档更新:优化了 README.md 中的参数说明。
|
|
12
|
+
|
|
7
13
|
## [1.0.6] - 2026-03-19
|
|
8
14
|
|
|
9
15
|
### Changed
|
package/README.md
CHANGED
|
@@ -83,9 +83,9 @@ openclaw gateway restart
|
|
|
83
83
|
sudo systemctl restart openclaw-gateway
|
|
84
84
|
|
|
85
85
|
# 配置必要参数
|
|
86
|
-
openclaw config set channels.53aihub.botId "
|
|
87
|
-
openclaw config set channels.53aihub.secret "
|
|
88
|
-
openclaw config set channels.53aihub.
|
|
86
|
+
openclaw config set channels.53aihub.botId "智能体的botId"
|
|
87
|
+
openclaw config set channels.53aihub.secret "智能体对应的secret"
|
|
88
|
+
openclaw config set channels.53aihub.WSUrl "ws:/你的域名/api/v1/openclaw/ws/connect"
|
|
89
89
|
|
|
90
90
|
# 启用通道
|
|
91
91
|
openclaw config set channels.53aihub.enabled true
|
|
@@ -95,9 +95,9 @@ openclaw config set channels.53aihub.enabled true
|
|
|
95
95
|
|
|
96
96
|
| 参数 | 必填 | 默认值 | 说明 |
|
|
97
97
|
|------|------|--------|------|
|
|
98
|
-
| `botId` | 是 | - |
|
|
99
|
-
| `secret` | 是 | - |
|
|
100
|
-
| `
|
|
98
|
+
| `botId` | 是 | - | 智能体的ID |
|
|
99
|
+
| `secret` | 是 | - | 智能体的Secret |
|
|
100
|
+
| `WSUrl` | 是 | - | 53AIHub平台的WS地址 |
|
|
101
101
|
| `token` | 否 | - | secret 的别名,与 secret 二选一 |
|
|
102
102
|
| `enabled` | 否 | false | 是否启用通道 |
|
|
103
103
|
| `accessPolicy` | 否 | `open` | 访问策略: `open`=开放所有用户, `allowlist`=仅白名单用户, `pairing`=首次使用需审批, `disabled`=禁用 |
|
|
@@ -407,7 +407,7 @@ npm test
|
|
|
407
407
|
|
|
408
408
|
### WebSocket 连接失败
|
|
409
409
|
|
|
410
|
-
1. 检查 `
|
|
410
|
+
1. 检查 `WSUrl` 格式是否正确
|
|
411
411
|
2. 确认网络可达性
|
|
412
412
|
3. 检查 `botId` 和 `secret` 是否正确
|
|
413
413
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1108,7 +1108,7 @@ async function monitorProvider(options) {
|
|
|
1108
1108
|
if (isAborted)
|
|
1109
1109
|
return;
|
|
1110
1110
|
// 安全: 不在 URL 中传递敏感信息,仅通过 headers 传递认证
|
|
1111
|
-
const wsUrl = account.
|
|
1111
|
+
const wsUrl = account.WSUrl;
|
|
1112
1112
|
const botId = account.botId || account.config.botId;
|
|
1113
1113
|
const secret = account.secret || account.token || account.config.secret || account.config.token;
|
|
1114
1114
|
// 日志输出时隐藏敏感信息
|
|
@@ -1207,7 +1207,7 @@ function resolveAccount(cfg, accountId = pluginSdk.DEFAULT_ACCOUNT_ID) {
|
|
|
1207
1207
|
accountId,
|
|
1208
1208
|
name: config.name ?? "53AIHub",
|
|
1209
1209
|
enabled: config.enabled !== false,
|
|
1210
|
-
|
|
1210
|
+
WSUrl: config.WSUrl || DEFAULT_WS_URL,
|
|
1211
1211
|
botId: config.botId ?? config.userId ?? "",
|
|
1212
1212
|
secret: config.secret ?? config.token ?? "",
|
|
1213
1213
|
token: config.token ?? config.secret ?? "",
|
|
@@ -1228,8 +1228,8 @@ function setAccount(cfg, account) {
|
|
|
1228
1228
|
allowFrom: account.allowFrom ?? existing.allowFrom,
|
|
1229
1229
|
accessPolicy: account.accessPolicy ?? existing.accessPolicy,
|
|
1230
1230
|
sendThinkingMessage: account.sendThinkingMessage ?? existing.sendThinkingMessage,
|
|
1231
|
-
...(account.
|
|
1232
|
-
? {
|
|
1231
|
+
...(account.WSUrl || existing.WSUrl
|
|
1232
|
+
? { WSUrl: account.WSUrl ?? existing.WSUrl }
|
|
1233
1233
|
: {}),
|
|
1234
1234
|
...(account.name || existing.name
|
|
1235
1235
|
? { name: account.name ?? existing.name }
|
|
@@ -1267,10 +1267,10 @@ async function promptSecret(prompter, account) {
|
|
|
1267
1267
|
validate: (value) => (value?.trim() ? undefined : "必填"),
|
|
1268
1268
|
})).trim();
|
|
1269
1269
|
}
|
|
1270
|
-
async function
|
|
1270
|
+
async function promptWSUrl(prompter, account) {
|
|
1271
1271
|
return String(await prompter.text({
|
|
1272
1272
|
message: "WebSocket URL (例如: ws://localhost:8080/ws)",
|
|
1273
|
-
initialValue: account?.
|
|
1273
|
+
initialValue: account?.WSUrl ?? "",
|
|
1274
1274
|
validate: (value) => {
|
|
1275
1275
|
const trimmed = value?.trim();
|
|
1276
1276
|
if (!trimmed)
|
|
@@ -1340,11 +1340,11 @@ const aiHubOnboardingAdapter = {
|
|
|
1340
1340
|
}
|
|
1341
1341
|
const botId = await promptBotId(prompter, account);
|
|
1342
1342
|
const secret = await promptSecret(prompter, account);
|
|
1343
|
-
const
|
|
1343
|
+
const WSUrl = await promptWSUrl(prompter, account);
|
|
1344
1344
|
const cfgWithAccount = setAccount(cfg, {
|
|
1345
1345
|
botId,
|
|
1346
1346
|
secret,
|
|
1347
|
-
|
|
1347
|
+
WSUrl: WSUrl || undefined,
|
|
1348
1348
|
enabled: true,
|
|
1349
1349
|
accessPolicy: account.config.accessPolicy ?? "open",
|
|
1350
1350
|
allowFrom: account.config.allowFrom ?? [],
|
|
@@ -1423,7 +1423,7 @@ const aiHubPlugin = {
|
|
|
1423
1423
|
enabled: account.enabled,
|
|
1424
1424
|
configured: Boolean(account.botId?.trim() || account.token?.trim()),
|
|
1425
1425
|
botId: account.botId,
|
|
1426
|
-
|
|
1426
|
+
WSUrl: account.WSUrl,
|
|
1427
1427
|
accessPolicy: account.config.accessPolicy ?? "open",
|
|
1428
1428
|
}),
|
|
1429
1429
|
resolveAllowFrom: ({ cfg }) => {
|