@sunnoy/wecom 2.4.0 → 2.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sunnoy/wecom",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Enterprise WeChat AI Bot channel plugin for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -625,6 +625,17 @@ export const wecomChannelPlugin = {
625
625
  setConfigProxyUrl(network.egressProxyUrl ?? "");
626
626
  setApiBaseUrl(network.apiBaseUrl ?? "");
627
627
 
628
+ // Callback-only accounts (Agent API) don't need WS monitor.
629
+ // Return a promise that stays alive until the gateway signals shutdown,
630
+ // so the account is marked as running (not exited → no auto-restart).
631
+ if (!ctx.account.botId && !ctx.account.secret) {
632
+ return new Promise((resolve) => {
633
+ if (ctx.abortSignal) {
634
+ ctx.abortSignal.addEventListener("abort", () => resolve(), { once: true });
635
+ }
636
+ });
637
+ }
638
+
628
639
  return startWsMonitor({
629
640
  account: ctx.account,
630
641
  config: ctx.cfg,