@chbo297/infoflow 2026.2.23 → 2026.2.27

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
@@ -69,6 +69,10 @@ Configure your Infoflow bot webhook URL to:
69
69
 
70
70
  Restart the gateway after config changes.
71
71
 
72
+ ## Requirements
73
+
74
+ - OpenClaw **≥ 2026.2.22**
75
+
72
76
  ## License
73
77
 
74
78
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chbo297/infoflow",
3
- "version": "2026.2.23",
3
+ "version": "2026.2.27",
4
4
  "description": "OpenClaw Infoflow (如流) channel plugin for Baidu enterprise messaging",
5
5
  "type": "module",
6
6
  "main": "index.ts",
@@ -19,7 +19,7 @@
19
19
  "url": "https://github.com/chbo297/openclaw-infoflow"
20
20
  },
21
21
  "peerDependencies": {
22
- "openclaw": "*"
22
+ "openclaw": ">=2026.2.22"
23
23
  },
24
24
  "openclaw": {
25
25
  "extensions": [
@@ -38,4 +38,4 @@
38
38
  "defaultChoice": "npm"
39
39
  }
40
40
  }
41
- }
41
+ }
package/src/channel.ts CHANGED
@@ -294,14 +294,22 @@ export const infoflowPlugin: ChannelPlugin<ResolvedInfoflowAccount> = {
294
294
  abortSignal: ctx.abortSignal,
295
295
  statusSink: (patch) => ctx.setStatus({ accountId: account.accountId, ...patch }),
296
296
  });
297
- return () => {
297
+
298
+ // Keep the channel alive until explicitly stopped.
299
+ // Without this, the promise resolves immediately and the gateway
300
+ // framework treats it as "channel exited", triggering auto-restart.
301
+ try {
302
+ await new Promise<void>((resolve) => {
303
+ ctx.abortSignal.addEventListener("abort", () => resolve(), { once: true });
304
+ });
305
+ } finally {
298
306
  unregister?.();
299
307
  ctx.setStatus({
300
308
  accountId: account.accountId,
301
309
  running: false,
302
310
  lastStopAt: Date.now(),
303
311
  });
304
- };
312
+ }
305
313
  },
306
314
  },
307
315
  };