@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.
@@ -3,6 +3,7 @@ import { setSetupChannelEnabled, WizardCancelledError } from 'openclaw/plugin-sd
3
3
  import { readApiKeyFromEnv } from './credentials/read-env.js';
4
4
  import { writeAgentsAnchor, removeAgentsAnchor } from './binding/agents-anchor.js';
5
5
  import { z } from 'zod';
6
+ import { waitUntilAbort } from 'openclaw/plugin-sdk/channel-lifecycle';
6
7
  import pino from 'pino';
7
8
  import { WebSocket } from 'ws';
8
9
  import { dispatchInboundDirectDmWithRuntime } from 'openclaw/plugin-sdk/direct-dm';
@@ -1846,7 +1847,7 @@ var CircuitBreaker = class {
1846
1847
  };
1847
1848
 
1848
1849
  // src/version.ts
1849
- var PACKAGE_VERSION = "0.6.14";
1850
+ var PACKAGE_VERSION = "0.6.15";
1850
1851
 
1851
1852
  // src/outbound.ts
1852
1853
  var DEFAULT_RETRY_POLICY = {
@@ -2643,17 +2644,15 @@ var agentchatGatewayAdapter = {
2643
2644
  gatewayCfg: ctx.cfg,
2644
2645
  selfHandle: account.config.agentHandle
2645
2646
  });
2646
- ctx.abortSignal.addEventListener(
2647
- "abort",
2648
- () => {
2649
- void unregisterRuntime(ctx.accountId, Date.now() + 5e3).catch((err3) => {
2650
- ctx.log?.error?.(
2651
- `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2652
- );
2653
- });
2654
- },
2655
- { once: true }
2656
- );
2647
+ await waitUntilAbort(ctx.abortSignal, async () => {
2648
+ try {
2649
+ await unregisterRuntime(ctx.accountId, Date.now() + 5e3);
2650
+ } catch (err3) {
2651
+ ctx.log?.error?.(
2652
+ `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2653
+ );
2654
+ }
2655
+ });
2657
2656
  },
2658
2657
  async stopAccount(ctx) {
2659
2658
  await unregisterRuntime(ctx.accountId, Date.now() + 5e3);