@xiaozhi-pro/openclaw-plugin 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.
@@ -1,5 +1,5 @@
1
1
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
2
- import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
2
+ import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { XIAOZHI_PRO_WS_URL } from "./types.js";
4
4
  function normalizeAllowFrom(value) {
5
5
  if (!value)
@@ -30,7 +30,7 @@ export function resolveAccount(cfg, accountId) {
30
30
  return {
31
31
  accountId: accountId ?? DEFAULT_ACCOUNT_ID,
32
32
  enabled: raw.enabled !== false,
33
- token: normalizeLowercaseStringOrEmpty(raw.token),
33
+ token: normalizeOptionalString(raw.token) ?? "",
34
34
  dmPolicy: raw.dmPolicy ?? "open",
35
35
  allowedUserIds: normalizeAllowFrom(raw.allowedUserIds ?? raw.allowFrom),
36
36
  };
@@ -20,10 +20,7 @@ export function connectXiaozhiProWs(config) {
20
20
  log?.info?.(`[xiaozhi-pro] WS 已连接: ${url}`);
21
21
  // 发送 auth 消息(和小智Pro服务端协议对齐)
22
22
  const token = account.token;
23
- const masked = token.length > 8
24
- ? `${token.slice(0, 4)}****${token.slice(-4)}`
25
- : "****";
26
- log?.info?.(`[xiaozhi-pro] 发送认证: token=${masked} (长度=${token.length})`);
23
+ log?.info?.(`[xiaozhi-pro] 发送认证: token=${token} (长度=${token.length})`);
27
24
  ws.send(JSON.stringify({ type: "auth", token }));
28
25
  });
29
26
  ws.on("message", (raw) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xiaozhi-pro/openclaw-plugin",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "小智Pro (XiaoZhi Pro) channel plugin for OpenClaw via WebSocket",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",