@agentchatme/openclaw 0.6.14 → 0.6.15

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/dist/index.cjs CHANGED
@@ -7,6 +7,7 @@ var setup = require('openclaw/plugin-sdk/setup');
7
7
  var readEnv_js = require('./credentials/read-env.cjs');
8
8
  var agentsAnchor_js = require('./binding/agents-anchor.cjs');
9
9
  var zod = require('zod');
10
+ var channelLifecycle = require('openclaw/plugin-sdk/channel-lifecycle');
10
11
  var pino = require('pino');
11
12
  var ws = require('ws');
12
13
  var directDm = require('openclaw/plugin-sdk/direct-dm');
@@ -1862,7 +1863,7 @@ var CircuitBreaker = class {
1862
1863
  };
1863
1864
 
1864
1865
  // src/version.ts
1865
- var PACKAGE_VERSION = "0.6.14";
1866
+ var PACKAGE_VERSION = "0.6.15";
1866
1867
 
1867
1868
  // src/outbound.ts
1868
1869
  var DEFAULT_RETRY_POLICY = {
@@ -2659,17 +2660,15 @@ var agentchatGatewayAdapter = {
2659
2660
  gatewayCfg: ctx.cfg,
2660
2661
  selfHandle: account.config.agentHandle
2661
2662
  });
2662
- ctx.abortSignal.addEventListener(
2663
- "abort",
2664
- () => {
2665
- void unregisterRuntime(ctx.accountId, Date.now() + 5e3).catch((err3) => {
2666
- ctx.log?.error?.(
2667
- `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2668
- );
2669
- });
2670
- },
2671
- { once: true }
2672
- );
2663
+ await channelLifecycle.waitUntilAbort(ctx.abortSignal, async () => {
2664
+ try {
2665
+ await unregisterRuntime(ctx.accountId, Date.now() + 5e3);
2666
+ } catch (err3) {
2667
+ ctx.log?.error?.(
2668
+ `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2669
+ );
2670
+ }
2671
+ });
2673
2672
  },
2674
2673
  async stopAccount(ctx) {
2675
2674
  await unregisterRuntime(ctx.accountId, Date.now() + 5e3);