@agentchatme/openclaw 0.6.14 → 0.6.16

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';
@@ -851,8 +852,8 @@ var reconnectConfigSchema = z.object({
851
852
  jitterRatio: z.number().min(0).max(1).default(0.2)
852
853
  }).strict();
853
854
  var pingConfigSchema = z.object({
854
- intervalMs: z.number().int().min(5e3).max(12e4).default(3e4),
855
- timeoutMs: z.number().int().min(1e3).max(3e4).default(1e4)
855
+ intervalMs: z.number().int().min(5e3).max(12e4).default(45e3),
856
+ timeoutMs: z.number().int().min(1e3).max(6e4).default(3e4)
856
857
  }).strict();
857
858
  var outboundConfigSchema = z.object({
858
859
  maxInFlight: z.number().int().min(1).max(1e4).default(256),
@@ -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.16";
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);