@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 CHANGED
@@ -4,6 +4,23 @@ 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
+
13
+ ## [1.0.6] - 2026-03-19
14
+
15
+ ### Changed
16
+ - 文档更新:修正了 `botId` 和 `secret` 的说明。
17
+
18
+ ## [1.0.5] - 2026-03-19
19
+
20
+ ### Changed
21
+ - 重构了接口名称,将 `Hub53AIMessageData` 简化为 `MessageData`。
22
+ - 代码格式优化。
23
+
7
24
  ## [1.0.4] - 2026-03-19
8
25
 
9
26
  ### Fixed
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 "智能体详情的botId"
87
- openclaw config set channels.53aihub.secret "智能体详情的botId对应的secret"
88
- openclaw config set channels.53aihub.websocketUrl "ws://域名/api/v1/openclaw/ws/connect"
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` | 是 | - | 53AIHub 智能体 ID (HashID) |
99
- | `secret` | 是 | - | 53AIHub App Secret / Token |
100
- | `websocketUrl` | 是 | - | 53AIHub WebSocket 连接地址 |
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. 检查 `websocketUrl` 格式是否正确
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.websocketUrl;
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
- websocketUrl: config.websocketUrl || DEFAULT_WS_URL,
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.websocketUrl || existing.websocketUrl
1232
- ? { websocketUrl: account.websocketUrl ?? existing.websocketUrl }
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 promptWebsocketUrl(prompter, account) {
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?.websocketUrl ?? "",
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 websocketUrl = await promptWebsocketUrl(prompter, account);
1343
+ const WSUrl = await promptWSUrl(prompter, account);
1344
1344
  const cfgWithAccount = setAccount(cfg, {
1345
1345
  botId,
1346
1346
  secret,
1347
- websocketUrl: websocketUrl || undefined,
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
- websocketUrl: account.websocketUrl,
1426
+ WSUrl: account.WSUrl,
1427
1427
  accessPolicy: account.config.accessPolicy ?? "open",
1428
1428
  }),
1429
1429
  resolveAllowFrom: ({ cfg }) => {