@core-workspace/infoflow-openclaw-plugin 2026.3.33 → 2026.3.35

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/README.md CHANGED
@@ -71,8 +71,8 @@ npm install
71
71
  "channels": {
72
72
  "infoflow": {
73
73
  "connectionMode": "websocket",
74
- "wsGateway": "infoflow-open-gateway.weiyun.baidu.com",
75
- "apiHost": "https://apiin.im.baidu.com",
74
+ "wsGateway": "infoflow-open-gateway.baidu.com",
75
+ "apiHost": "https://api.im.baidu.com",
76
76
  "appKey": "填你的 appKey",
77
77
  "appSecret": "填你的 appSecret",
78
78
  "checkToken": "填你的 checkToken",
@@ -133,7 +133,7 @@ openclaw directory groups infoflow
133
133
  {
134
134
  channels: {
135
135
  infoflow: {
136
- apiHost: "https://apiin.im.baidu.com",
136
+ apiHost: "https://api.im.baidu.com",
137
137
  checkToken: "your-check-token",
138
138
  encodingAESKey: "your-encoding-aes-key",
139
139
  appKey: "your-app-key",
@@ -151,9 +151,9 @@ openclaw directory groups infoflow
151
151
  infoflow: {
152
152
  // ── 基础连接 ──────────────────────────────────────────
153
153
  enabled: true,
154
- apiHost: "https://apiin.im.baidu.com", // 如流 API 地址(必填)
154
+ apiHost: "https://api.im.baidu.com", // 如流 API 地址(必填)
155
155
  connectionMode: "websocket", // "webhook"(默认)或 "websocket"
156
- wsGateway: "infoflow-open-gateway.weiyun.baidu.com", // WebSocket 网关(websocket 模式专用)
156
+ wsGateway: "infoflow-open-gateway.baidu.com", // WebSocket 网关(websocket 模式专用)
157
157
  checkToken: "your-check-token", // 消息验签 Token(必填)
158
158
  encodingAESKey: "your-encoding-aes-key", // 消息 AES 加密密钥(必填)
159
159
  appKey: "your-app-key", // 应用 Key(必填)
@@ -226,7 +226,7 @@ https://your-domain/webhook/infoflow
226
226
  channels: {
227
227
  infoflow: {
228
228
  connectionMode: "websocket",
229
- // wsGateway: "infoflow-open-gateway.weiyun.baidu.com", // 可选,默认值
229
+ // wsGateway: "infoflow-open-gateway.baidu.com", // 可选,默认值
230
230
  },
231
231
  },
232
232
  }
@@ -240,7 +240,7 @@ https://your-domain/webhook/infoflow
240
240
 
241
241
  | 字段 | 类型 | 必填 | 默认值 | 说明 |
242
242
  |------|------|:----:|--------|------|
243
- | `apiHost` | `string` | ✅ | — | 如流 API 地址,例如 `https://apiin.im.baidu.com` |
243
+ | `apiHost` | `string` | ✅ | — | 如流 API 地址,例如 `https://api.im.baidu.com` |
244
244
  | `checkToken` | `string` | — | — | 消息验签 Token,从如流企业后台获取(**webhook 模式必填**)|
245
245
  | `encodingAESKey` | `string` | — | — | 消息 AES 加密密钥,从如流企业后台获取(**webhook 模式必填**)|
246
246
  | `appKey` | `string` | ✅ | — | 应用 Key,从如流企业后台获取 |
@@ -248,7 +248,7 @@ https://your-domain/webhook/infoflow
248
248
  | `appAgentId` | `number` | — | — | 企业后台"应用ID"(数字),私聊消息撤回需要此字段 |
249
249
  | `robotName` | `string` | — | — | 机器人在群里的显示名称,用于检测消息中的 @ 提及。**未配置时无法识别 @机器人,`mention-only` / `mention-and-watch` 模式将退化为对所有群消息触发** |
250
250
  | `connectionMode` | `string` | — | `"webhook"` | 消息接收方式:`"webhook"` 如流主动推送;`"websocket"` 插件主动长连接 |
251
- | `wsGateway` | `string` | — | `"infoflow-open-gateway.weiyun.baidu.com"` | WebSocket 网关域名,仅 `websocket` 模式使用 |
251
+ | `wsGateway` | `string` | — | `"infoflow-open-gateway.baidu.com"` | WebSocket 网关域名,仅 `websocket` 模式使用 |
252
252
  | `enabled` | `boolean` | — | `true` | 是否启用该插件 |
253
253
 
254
254
  #### 访问控制
@@ -713,8 +713,8 @@ Open `~/.openclaw/openclaw.json` and add the infoflow channel config:
713
713
  "channels": {
714
714
  "infoflow": {
715
715
  "connectionMode": "websocket",
716
- "wsGateway": "infoflow-open-gateway.weiyun.baidu.com",
717
- "apiHost": "https://apiin.im.baidu.com",
716
+ "wsGateway": "infoflow-open-gateway.baidu.com",
717
+ "apiHost": "https://api.im.baidu.com",
718
718
  "appKey": "your-app-key",
719
719
  "appSecret": "your-app-secret",
720
720
  "checkToken": "your-check-token",
@@ -750,7 +750,7 @@ For more options (access control, group policies, message format, etc.) see [Con
750
750
  {
751
751
  channels: {
752
752
  infoflow: {
753
- apiHost: "https://apiin.im.baidu.com",
753
+ apiHost: "https://api.im.baidu.com",
754
754
  checkToken: "your-check-token",
755
755
  encodingAESKey: "your-encoding-aes-key",
756
756
  appKey: "your-app-key",
@@ -768,9 +768,9 @@ For more options (access control, group policies, message format, etc.) see [Con
768
768
  infoflow: {
769
769
  // ── Connection ────────────────────────────────────────
770
770
  enabled: true,
771
- apiHost: "https://apiin.im.baidu.com", // required
771
+ apiHost: "https://api.im.baidu.com", // required
772
772
  connectionMode: "websocket", // "webhook" (default) or "websocket"
773
- wsGateway: "infoflow-open-gateway.weiyun.baidu.com", // websocket mode only
773
+ wsGateway: "infoflow-open-gateway.baidu.com", // websocket mode only
774
774
  checkToken: "your-check-token", // required
775
775
  encodingAESKey: "your-encoding-aes-key", // required
776
776
  appKey: "your-app-key", // required
@@ -834,7 +834,7 @@ https://your-domain/webhook/infoflow
834
834
  channels: {
835
835
  infoflow: {
836
836
  connectionMode: "websocket",
837
- // wsGateway: "infoflow-open-gateway.weiyun.baidu.com", // optional
837
+ // wsGateway: "infoflow-open-gateway.baidu.com", // optional
838
838
  },
839
839
  },
840
840
  }
@@ -846,7 +846,7 @@ https://your-domain/webhook/infoflow
846
846
 
847
847
  | Field | Type | Required | Default | Description |
848
848
  |-------|------|:--------:|---------|-------------|
849
- | `apiHost` | `string` | ✅ | — | Infoflow API host, e.g. `https://apiin.im.baidu.com` |
849
+ | `apiHost` | `string` | ✅ | — | Infoflow API host, e.g. `https://api.im.baidu.com` |
850
850
  | `checkToken` | `string` | — | — | Message verification token from Infoflow enterprise console (**required for webhook mode**) |
851
851
  | `encodingAESKey` | `string` | — | — | AES encryption key from Infoflow enterprise console (**required for webhook mode**) |
852
852
  | `appKey` | `string` | ✅ | — | App Key from Infoflow enterprise console |
@@ -854,7 +854,7 @@ https://your-domain/webhook/infoflow
854
854
  | `appAgentId` | `number` | — | — | App Agent ID (numeric); required for private message recall |
855
855
  | `robotName` | `string` | — | — | Bot display name in groups, used for @mention detection. **Without this, `mention-only` / `mention-and-watch` modes fall back to triggering on every message** |
856
856
  | `connectionMode` | `string` | — | `"webhook"` | `"webhook"` (Infoflow pushes to your server) or `"websocket"` (plugin connects to Infoflow) |
857
- | `wsGateway` | `string` | — | `"infoflow-open-gateway.weiyun.baidu.com"` | WebSocket gateway hostname, only used in `websocket` mode |
857
+ | `wsGateway` | `string` | — | `"infoflow-open-gateway.baidu.com"` | WebSocket gateway hostname, only used in `websocket` mode |
858
858
  | `enabled` | `boolean` | — | `true` | Whether to enable the plugin |
859
859
 
860
860
  #### Access Control
@@ -54,7 +54,7 @@
54
54
  | 参数 | 必填 | 说明 |
55
55
  |------|------|------|
56
56
  | `connectionMode` | 是 | 设置为 `"websocket"` |
57
- | `wsGateway` | 否 | WS Gateway 域名,默认 `infoflow-open-gateway.weiyun.baidu.com` |
57
+ | `wsGateway` | 否 | WS Gateway 域名,默认 `infoflow-open-gateway.baidu.com` |
58
58
 
59
59
  **行为:**
60
60
  - 建立 WebSocket 长连接,自动重连
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@core-workspace/infoflow-openclaw-plugin",
3
- "version": "2026.3.33",
3
+ "version": "2026.3.35",
4
4
  "description": "OpenClaw Infoflow (如流) channel plugin for Baidu enterprise messaging",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -60,7 +60,7 @@ export class InfoflowWSReceiver {
60
60
  this.options = options;
61
61
  const { appKey, appSecret } = options.account.config;
62
62
  const wsGateway =
63
- options.account.config.wsGateway ?? "infoflow-open-gateway.weiyun.baidu.com";
63
+ options.account.config.wsGateway ?? "infoflow-open-gateway.baidu.com";
64
64
 
65
65
  this.wsClient = new WSClient({
66
66
  appId: appKey,
@@ -123,7 +123,7 @@ export class InfoflowWSReceiver {
123
123
  this.wsClient.on("private.*", handlePrivateEvent);
124
124
 
125
125
  // Connect (two-phase: endpoint allocation → WS handshake)
126
- const wsGateway = this.options.account.config.wsGateway ?? "infoflow-open-gateway.weiyun.baidu.com";
126
+ const wsGateway = this.options.account.config.wsGateway ?? "infoflow-open-gateway.baidu.com";
127
127
  getInfoflowWebhookLog().info(`[ws:connect] connecting to ${wsGateway}`);
128
128
  await this.wsClient.connect();
129
129
  getInfoflowWebhookLog().info(`[ws:connect] connected to ${wsGateway}`);
@@ -82,7 +82,7 @@ function checkAccountConfig(cfg: OpenClawConfig): CheckResult[] {
82
82
  results.push({
83
83
  name: `${prefix}wsGateway`,
84
84
  ok: true,
85
- detail: c.wsGateway ?? "未配置(将使用默认值 infoflow-open-gateway.weiyun.baidu.com)",
85
+ detail: c.wsGateway ?? "未配置(将使用默认值 infoflow-open-gateway.baidu.com)",
86
86
  });
87
87
  } else {
88
88
  results.push({
@@ -300,7 +300,7 @@ function friendlyDetail(name: string, detail: string): string {
300
300
  return detail;
301
301
  }
302
302
  // wsGateway 默认值
303
- if (detail.includes("infoflow-open-gateway.weiyun.baidu.com")) {
303
+ if (detail.includes("infoflow-open-gateway.baidu.com")) {
304
304
  return detail.includes("未配置") ? "使用默认网关" : detail;
305
305
  }
306
306
  // apiHost 默认值
@@ -61,7 +61,7 @@ export class InfoflowSDKAdapter {
61
61
 
62
62
  constructor(params: SDKAdapterParams) {
63
63
  // SDK ConfigManager expects pure domain (e.g. "apiin.im.baidu.com"),
64
- // but plugin's apiHost is a full URL (e.g. "https://apiin.im.baidu.com").
64
+ // but plugin's apiHost is a full URL (e.g. "https://api.im.baidu.com").
65
65
  // Extract the host portion.
66
66
  const apiUrl = ensureHttps(params.apiHost);
67
67
  const domain = new URL(apiUrl).host;