@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.
@@ -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');
@@ -859,8 +860,8 @@ var reconnectConfigSchema = zod.z.object({
859
860
  jitterRatio: zod.z.number().min(0).max(1).default(0.2)
860
861
  }).strict();
861
862
  var pingConfigSchema = zod.z.object({
862
- intervalMs: zod.z.number().int().min(5e3).max(12e4).default(3e4),
863
- timeoutMs: zod.z.number().int().min(1e3).max(3e4).default(1e4)
863
+ intervalMs: zod.z.number().int().min(5e3).max(12e4).default(45e3),
864
+ timeoutMs: zod.z.number().int().min(1e3).max(6e4).default(3e4)
864
865
  }).strict();
865
866
  var outboundConfigSchema = zod.z.object({
866
867
  maxInFlight: zod.z.number().int().min(1).max(1e4).default(256),
@@ -1854,7 +1855,7 @@ var CircuitBreaker = class {
1854
1855
  };
1855
1856
 
1856
1857
  // src/version.ts
1857
- var PACKAGE_VERSION = "0.6.14";
1858
+ var PACKAGE_VERSION = "0.6.16";
1858
1859
 
1859
1860
  // src/outbound.ts
1860
1861
  var DEFAULT_RETRY_POLICY = {
@@ -2651,17 +2652,15 @@ var agentchatGatewayAdapter = {
2651
2652
  gatewayCfg: ctx.cfg,
2652
2653
  selfHandle: account.config.agentHandle
2653
2654
  });
2654
- ctx.abortSignal.addEventListener(
2655
- "abort",
2656
- () => {
2657
- void unregisterRuntime(ctx.accountId, Date.now() + 5e3).catch((err3) => {
2658
- ctx.log?.error?.(
2659
- `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2660
- );
2661
- });
2662
- },
2663
- { once: true }
2664
- );
2655
+ await channelLifecycle.waitUntilAbort(ctx.abortSignal, async () => {
2656
+ try {
2657
+ await unregisterRuntime(ctx.accountId, Date.now() + 5e3);
2658
+ } catch (err3) {
2659
+ ctx.log?.error?.(
2660
+ `[agentchat:${ctx.accountId}] unregisterRuntime failed on abort: ${err3 instanceof Error ? err3.message : String(err3)}`
2661
+ );
2662
+ }
2663
+ });
2665
2664
  },
2666
2665
  async stopAccount(ctx) {
2667
2666
  await unregisterRuntime(ctx.accountId, Date.now() + 5e3);