@alfe.ai/openclaw-chat 0.9.18 → 0.9.20

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
@@ -4,4 +4,4 @@ Object.defineProperties(exports, {
4
4
  });
5
5
  const require_plugin = require("./plugin2.cjs");
6
6
  exports.createAlfeChannelPlugin = require_plugin.createAlfeChannelPlugin;
7
- exports.default = require_plugin.plugin;
7
+ exports.default = require_plugin.plugin_default;
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as AlfeResolvedAccount, D as createAlfeChannelPlugin, M as SessionData, N as SessionSummary, O as AlfeChannelConfig, b as plugin, j as ChatMessage, k as AlfePluginConfig } from "./plugin.cjs";
2
- export { type AlfeChannelConfig, type AlfePluginConfig, type AlfeResolvedAccount, type ChatMessage, type SessionData, type SessionSummary, createAlfeChannelPlugin, plugin as default };
1
+ import { A as AlfeResolvedAccount, D as createAlfeChannelPlugin, M as SessionData, N as SessionSummary, O as AlfeChannelConfig, d as _default, j as ChatMessage, k as AlfePluginConfig } from "./plugin.cjs";
2
+ export { type AlfeChannelConfig, type AlfePluginConfig, type AlfeResolvedAccount, type ChatMessage, type SessionData, type SessionSummary, createAlfeChannelPlugin, _default as default };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as AlfeResolvedAccount, D as createAlfeChannelPlugin, M as SessionData, N as SessionSummary, O as AlfeChannelConfig, b as plugin, j as ChatMessage, k as AlfePluginConfig } from "./plugin.js";
2
- export { type AlfeChannelConfig, type AlfePluginConfig, type AlfeResolvedAccount, type ChatMessage, type SessionData, type SessionSummary, createAlfeChannelPlugin, plugin as default };
1
+ import { A as AlfeResolvedAccount, D as createAlfeChannelPlugin, M as SessionData, N as SessionSummary, O as AlfeChannelConfig, d as _default, j as ChatMessage, k as AlfePluginConfig } from "./plugin.js";
2
+ export { type AlfeChannelConfig, type AlfePluginConfig, type AlfeResolvedAccount, type ChatMessage, type SessionData, type SessionSummary, createAlfeChannelPlugin, _default as default };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as plugin, w as createAlfeChannelPlugin } from "./plugin2.js";
2
- export { createAlfeChannelPlugin, plugin as default };
1
+ import { _ as plugin_default, w as createAlfeChannelPlugin } from "./plugin2.js";
2
+ export { createAlfeChannelPlugin, plugin_default as default };
package/dist/plugin.cjs CHANGED
@@ -18,7 +18,7 @@ exports.buildToolActivity = require_plugin.buildToolActivity;
18
18
  exports.buildTurnEnvelopeContext = require_plugin.buildTurnEnvelopeContext;
19
19
  exports.computeOpenClawSdkAnchors = require_plugin.computeOpenClawSdkAnchors;
20
20
  exports.decideChatServiceStart = require_plugin.decideChatServiceStart;
21
- exports.default = require_plugin.plugin;
21
+ exports.default = require_plugin.plugin_default;
22
22
  exports.joinAssistantText = require_plugin.joinAssistantText;
23
23
  exports.readAttachmentBodyBounded = require_plugin.readAttachmentBodyBounded;
24
24
  exports.resolveAbortTargetKeys = require_plugin.resolveAbortTargetKeys;
package/dist/plugin.d.cts CHANGED
@@ -702,11 +702,11 @@ declare function __setActiveRunForTest(ref: ActiveRunRef | null): void;
702
702
  * Ordered session keys to try when aborting for `abortSessionKey`. Pure, so it
703
703
  * unit-tests without the OpenClaw SDK. The resolved route key (what the run
704
704
  * registered under) is preferred; the raw request key is a best-effort
705
- * fallback. An abort with NO sessionKey targets the single active run. A
706
- * sessionKey that does NOT match the running turn yields no candidates we
707
- * never abort another session's run on a shared daemon.
705
+ * fallback. A supplied run ID requires both the active run ID and request
706
+ * session key to match. Legacy aborts without a run ID may target the single
707
+ * active run when no session key is supplied, or try the supplied raw key.
708
708
  */
709
- declare function resolveAbortTargetKeys(active: ActiveRunRef | null, abortSessionKey: string | undefined, abortRunId?: string): string[];
709
+ declare function resolveAbortTargetKeys(active: ActiveRunRef | null, abortSessionKey: string | undefined, abortRunId?: unknown): string[];
710
710
  /**
711
711
  * Speech-style reply guidance injected into the agent's SYSTEM PROMPT for a
712
712
  * live voice-call turn (`origin:'voice'`). The user is speaking on a call and
@@ -760,7 +760,8 @@ declare const A2A_REPLY_SYSTEM_PROMPT: string;
760
760
  declare function buildOriginEnvelopeContext(origin: string | undefined): Record<string, unknown>;
761
761
  /** Build the single live per-turn prompt block without competing object keys. */
762
762
  declare function buildTurnEnvelopeContext(origin: string | undefined, isA2A: boolean): Record<string, unknown>;
763
- declare const plugin: {
763
+ declare const _default: {
764
+ register: (api: PluginApi) => void;
764
765
  id: string;
765
766
  name: string;
766
767
  description: string;
@@ -769,4 +770,4 @@ declare const plugin: {
769
770
  deactivate(api: PluginApi): Promise<void>;
770
771
  };
771
772
  //#endregion
772
- export { AlfeResolvedAccount as A, resolveRequestedRunId as C, createAlfeChannelPlugin as D, withReplyRunId as E, SessionData as M, SessionSummary as N, AlfeChannelConfig as O, resolveAbortTargetKeys as S, stripLeakedToolSummary as T, computeOpenClawSdkAnchors as _, MAX_INBOUND_ATTACHMENT_SIZE as a, plugin as b, __agentTurnQueueForTest as c, admitAgentEvent as d, buildA2ACompletePayload as f, buildTurnEnvelopeContext as g, buildToolActivity as h, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as i, ChatMessage as j, AlfePluginConfig as k, __resetAgentTurnQueueForTest as l, buildOriginEnvelopeContext as m, ActiveRunRef as n, RunEventGate as o, buildAttachmentLocalFilename as p, AnchorEnv as r, VOICE_REPLY_SYSTEM_PROMPT as s, A2A_REPLY_SYSTEM_PROMPT as t, __setActiveRunForTest as u, decideChatServiceStart as v, rewriteAssistantText as w, readAttachmentBodyBounded as x, joinAssistantText as y };
773
+ export { AlfeResolvedAccount as A, resolveRequestedRunId as C, createAlfeChannelPlugin as D, withReplyRunId as E, SessionData as M, SessionSummary as N, AlfeChannelConfig as O, resolveAbortTargetKeys as S, stripLeakedToolSummary as T, buildTurnEnvelopeContext as _, MAX_INBOUND_ATTACHMENT_SIZE as a, joinAssistantText as b, __agentTurnQueueForTest as c, _default as d, admitAgentEvent as f, buildToolActivity as g, buildOriginEnvelopeContext as h, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as i, ChatMessage as j, AlfePluginConfig as k, __resetAgentTurnQueueForTest as l, buildAttachmentLocalFilename as m, ActiveRunRef as n, RunEventGate as o, buildA2ACompletePayload as p, AnchorEnv as r, VOICE_REPLY_SYSTEM_PROMPT as s, A2A_REPLY_SYSTEM_PROMPT as t, __setActiveRunForTest as u, computeOpenClawSdkAnchors as v, rewriteAssistantText as w, readAttachmentBodyBounded as x, decideChatServiceStart as y };
package/dist/plugin.d.ts CHANGED
@@ -702,11 +702,11 @@ declare function __setActiveRunForTest(ref: ActiveRunRef | null): void;
702
702
  * Ordered session keys to try when aborting for `abortSessionKey`. Pure, so it
703
703
  * unit-tests without the OpenClaw SDK. The resolved route key (what the run
704
704
  * registered under) is preferred; the raw request key is a best-effort
705
- * fallback. An abort with NO sessionKey targets the single active run. A
706
- * sessionKey that does NOT match the running turn yields no candidates we
707
- * never abort another session's run on a shared daemon.
705
+ * fallback. A supplied run ID requires both the active run ID and request
706
+ * session key to match. Legacy aborts without a run ID may target the single
707
+ * active run when no session key is supplied, or try the supplied raw key.
708
708
  */
709
- declare function resolveAbortTargetKeys(active: ActiveRunRef | null, abortSessionKey: string | undefined, abortRunId?: string): string[];
709
+ declare function resolveAbortTargetKeys(active: ActiveRunRef | null, abortSessionKey: string | undefined, abortRunId?: unknown): string[];
710
710
  /**
711
711
  * Speech-style reply guidance injected into the agent's SYSTEM PROMPT for a
712
712
  * live voice-call turn (`origin:'voice'`). The user is speaking on a call and
@@ -760,7 +760,8 @@ declare const A2A_REPLY_SYSTEM_PROMPT: string;
760
760
  declare function buildOriginEnvelopeContext(origin: string | undefined): Record<string, unknown>;
761
761
  /** Build the single live per-turn prompt block without competing object keys. */
762
762
  declare function buildTurnEnvelopeContext(origin: string | undefined, isA2A: boolean): Record<string, unknown>;
763
- declare const plugin: {
763
+ declare const _default: {
764
+ register: (api: PluginApi) => void;
764
765
  id: string;
765
766
  name: string;
766
767
  description: string;
@@ -769,4 +770,4 @@ declare const plugin: {
769
770
  deactivate(api: PluginApi): Promise<void>;
770
771
  };
771
772
  //#endregion
772
- export { AlfeResolvedAccount as A, resolveRequestedRunId as C, createAlfeChannelPlugin as D, withReplyRunId as E, SessionData as M, SessionSummary as N, AlfeChannelConfig as O, resolveAbortTargetKeys as S, stripLeakedToolSummary as T, computeOpenClawSdkAnchors as _, MAX_INBOUND_ATTACHMENT_SIZE as a, plugin as b, __agentTurnQueueForTest as c, admitAgentEvent as d, buildA2ACompletePayload as f, buildTurnEnvelopeContext as g, buildToolActivity as h, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as i, ChatMessage as j, AlfePluginConfig as k, __resetAgentTurnQueueForTest as l, buildOriginEnvelopeContext as m, ActiveRunRef as n, RunEventGate as o, buildAttachmentLocalFilename as p, AnchorEnv as r, VOICE_REPLY_SYSTEM_PROMPT as s, A2A_REPLY_SYSTEM_PROMPT as t, __setActiveRunForTest as u, decideChatServiceStart as v, rewriteAssistantText as w, readAttachmentBodyBounded as x, joinAssistantText as y };
773
+ export { AlfeResolvedAccount as A, resolveRequestedRunId as C, createAlfeChannelPlugin as D, withReplyRunId as E, SessionData as M, SessionSummary as N, AlfeChannelConfig as O, resolveAbortTargetKeys as S, stripLeakedToolSummary as T, buildTurnEnvelopeContext as _, MAX_INBOUND_ATTACHMENT_SIZE as a, joinAssistantText as b, __agentTurnQueueForTest as c, _default as d, admitAgentEvent as f, buildToolActivity as g, buildOriginEnvelopeContext as h, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as i, ChatMessage as j, AlfePluginConfig as k, __resetAgentTurnQueueForTest as l, buildAttachmentLocalFilename as m, ActiveRunRef as n, RunEventGate as o, buildA2ACompletePayload as p, AnchorEnv as r, VOICE_REPLY_SYSTEM_PROMPT as s, A2A_REPLY_SYSTEM_PROMPT as t, __setActiveRunForTest as u, computeOpenClawSdkAnchors as v, rewriteAssistantText as w, readAttachmentBodyBounded as x, decideChatServiceStart as y };
package/dist/plugin.js CHANGED
@@ -1,2 +1,2 @@
1
- import { C as withReplyRunId, S as stripLeakedToolSummary, _ as plugin, a as __agentTurnQueueForTest, b as resolveRequestedRunId, c as admitAgentEvent, d as buildOriginEnvelopeContext, f as buildToolActivity, g as joinAssistantText, h as decideChatServiceStart, i as VOICE_REPLY_SYSTEM_PROMPT, l as buildA2ACompletePayload, m as computeOpenClawSdkAnchors, n as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, o as __resetAgentTurnQueueForTest, p as buildTurnEnvelopeContext, r as MAX_INBOUND_ATTACHMENT_SIZE, s as __setActiveRunForTest, t as A2A_REPLY_SYSTEM_PROMPT, u as buildAttachmentLocalFilename, v as readAttachmentBodyBounded, x as rewriteAssistantText, y as resolveAbortTargetKeys } from "./plugin2.js";
2
- export { A2A_REPLY_SYSTEM_PROMPT, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, plugin as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
1
+ import { C as withReplyRunId, S as stripLeakedToolSummary, _ as plugin_default, a as __agentTurnQueueForTest, b as resolveRequestedRunId, c as admitAgentEvent, d as buildOriginEnvelopeContext, f as buildToolActivity, g as joinAssistantText, h as decideChatServiceStart, i as VOICE_REPLY_SYSTEM_PROMPT, l as buildA2ACompletePayload, m as computeOpenClawSdkAnchors, n as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, o as __resetAgentTurnQueueForTest, p as buildTurnEnvelopeContext, r as MAX_INBOUND_ATTACHMENT_SIZE, s as __setActiveRunForTest, t as A2A_REPLY_SYSTEM_PROMPT, u as buildAttachmentLocalFilename, v as readAttachmentBodyBounded, x as rewriteAssistantText, y as resolveAbortTargetKeys } from "./plugin2.js";
2
+ export { A2A_REPLY_SYSTEM_PROMPT, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, plugin_default as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
package/dist/plugin2.cjs CHANGED
@@ -2951,12 +2951,12 @@ function __setActiveRunForTest(ref) {
2951
2951
  * Ordered session keys to try when aborting for `abortSessionKey`. Pure, so it
2952
2952
  * unit-tests without the OpenClaw SDK. The resolved route key (what the run
2953
2953
  * registered under) is preferred; the raw request key is a best-effort
2954
- * fallback. An abort with NO sessionKey targets the single active run. A
2955
- * sessionKey that does NOT match the running turn yields no candidates we
2956
- * never abort another session's run on a shared daemon.
2954
+ * fallback. A supplied run ID requires both the active run ID and request
2955
+ * session key to match. Legacy aborts without a run ID may target the single
2956
+ * active run when no session key is supplied, or try the supplied raw key.
2957
2957
  */
2958
2958
  function resolveAbortTargetKeys(active, abortSessionKey, abortRunId) {
2959
- if (abortRunId && (!active?.runId || active.runId !== abortRunId || abortSessionKey !== void 0 && active.requestSessionKey !== abortSessionKey)) return [];
2959
+ if (abortRunId !== void 0 && (resolveRequestedRunId(abortRunId) === null || !active?.runId || active.runId !== abortRunId || active.requestSessionKey !== abortSessionKey)) return [];
2960
2960
  const keys = [];
2961
2961
  if (active && (!abortSessionKey || active.requestSessionKey === abortSessionKey)) {
2962
2962
  if (active.routeSessionKey) keys.push(active.routeSessionKey);
@@ -3708,6 +3708,10 @@ const plugin = {
3708
3708
  log.info("Chat plugin deactivated");
3709
3709
  }
3710
3710
  };
3711
+ var plugin_default = {
3712
+ ...plugin,
3713
+ register: plugin.activate.bind(plugin)
3714
+ };
3711
3715
  //#endregion
3712
3716
  Object.defineProperty(exports, "A2A_REPLY_SYSTEM_PROMPT", {
3713
3717
  enumerable: true,
@@ -3811,10 +3815,10 @@ Object.defineProperty(exports, "joinAssistantText", {
3811
3815
  return joinAssistantText;
3812
3816
  }
3813
3817
  });
3814
- Object.defineProperty(exports, "plugin", {
3818
+ Object.defineProperty(exports, "plugin_default", {
3815
3819
  enumerable: true,
3816
3820
  get: function() {
3817
- return plugin;
3821
+ return plugin_default;
3818
3822
  }
3819
3823
  });
3820
3824
  Object.defineProperty(exports, "readAttachmentBodyBounded", {
@@ -1,2 +1,2 @@
1
- import { C as resolveRequestedRunId, E as withReplyRunId, S as resolveAbortTargetKeys, T as stripLeakedToolSummary, _ as computeOpenClawSdkAnchors, a as MAX_INBOUND_ATTACHMENT_SIZE, b as plugin, c as __agentTurnQueueForTest, d as admitAgentEvent, f as buildA2ACompletePayload, g as buildTurnEnvelopeContext, h as buildToolActivity, i as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, l as __resetAgentTurnQueueForTest, m as buildOriginEnvelopeContext, n as ActiveRunRef, o as RunEventGate, p as buildAttachmentLocalFilename, r as AnchorEnv, s as VOICE_REPLY_SYSTEM_PROMPT, t as A2A_REPLY_SYSTEM_PROMPT, u as __setActiveRunForTest, v as decideChatServiceStart, w as rewriteAssistantText, x as readAttachmentBodyBounded, y as joinAssistantText } from "./plugin.cjs";
2
- export { A2A_REPLY_SYSTEM_PROMPT, ActiveRunRef, AnchorEnv, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, RunEventGate, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, plugin as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
1
+ import { C as resolveRequestedRunId, E as withReplyRunId, S as resolveAbortTargetKeys, T as stripLeakedToolSummary, _ as buildTurnEnvelopeContext, a as MAX_INBOUND_ATTACHMENT_SIZE, b as joinAssistantText, c as __agentTurnQueueForTest, d as _default, f as admitAgentEvent, g as buildToolActivity, h as buildOriginEnvelopeContext, i as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, l as __resetAgentTurnQueueForTest, m as buildAttachmentLocalFilename, n as ActiveRunRef, o as RunEventGate, p as buildA2ACompletePayload, r as AnchorEnv, s as VOICE_REPLY_SYSTEM_PROMPT, t as A2A_REPLY_SYSTEM_PROMPT, u as __setActiveRunForTest, v as computeOpenClawSdkAnchors, w as rewriteAssistantText, x as readAttachmentBodyBounded, y as decideChatServiceStart } from "./plugin.cjs";
2
+ export { A2A_REPLY_SYSTEM_PROMPT, ActiveRunRef, AnchorEnv, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, RunEventGate, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, _default as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
package/dist/plugin2.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { C as resolveRequestedRunId, E as withReplyRunId, S as resolveAbortTargetKeys, T as stripLeakedToolSummary, _ as computeOpenClawSdkAnchors, a as MAX_INBOUND_ATTACHMENT_SIZE, b as plugin, c as __agentTurnQueueForTest, d as admitAgentEvent, f as buildA2ACompletePayload, g as buildTurnEnvelopeContext, h as buildToolActivity, i as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, l as __resetAgentTurnQueueForTest, m as buildOriginEnvelopeContext, n as ActiveRunRef, o as RunEventGate, p as buildAttachmentLocalFilename, r as AnchorEnv, s as VOICE_REPLY_SYSTEM_PROMPT, t as A2A_REPLY_SYSTEM_PROMPT, u as __setActiveRunForTest, v as decideChatServiceStart, w as rewriteAssistantText, x as readAttachmentBodyBounded, y as joinAssistantText } from "./plugin.js";
2
- export { A2A_REPLY_SYSTEM_PROMPT, ActiveRunRef, AnchorEnv, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, RunEventGate, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, plugin as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
1
+ import { C as resolveRequestedRunId, E as withReplyRunId, S as resolveAbortTargetKeys, T as stripLeakedToolSummary, _ as buildTurnEnvelopeContext, a as MAX_INBOUND_ATTACHMENT_SIZE, b as joinAssistantText, c as __agentTurnQueueForTest, d as _default, f as admitAgentEvent, g as buildToolActivity, h as buildOriginEnvelopeContext, i as CROSS_AGENT_TOOLS_SYSTEM_PROMPT, l as __resetAgentTurnQueueForTest, m as buildAttachmentLocalFilename, n as ActiveRunRef, o as RunEventGate, p as buildA2ACompletePayload, r as AnchorEnv, s as VOICE_REPLY_SYSTEM_PROMPT, t as A2A_REPLY_SYSTEM_PROMPT, u as __setActiveRunForTest, v as computeOpenClawSdkAnchors, w as rewriteAssistantText, x as readAttachmentBodyBounded, y as decideChatServiceStart } from "./plugin.js";
2
+ export { A2A_REPLY_SYSTEM_PROMPT, ActiveRunRef, AnchorEnv, CROSS_AGENT_TOOLS_SYSTEM_PROMPT, MAX_INBOUND_ATTACHMENT_SIZE, RunEventGate, VOICE_REPLY_SYSTEM_PROMPT, __agentTurnQueueForTest, __resetAgentTurnQueueForTest, __setActiveRunForTest, admitAgentEvent, buildA2ACompletePayload, buildAttachmentLocalFilename, buildOriginEnvelopeContext, buildToolActivity, buildTurnEnvelopeContext, computeOpenClawSdkAnchors, decideChatServiceStart, _default as default, joinAssistantText, readAttachmentBodyBounded, resolveAbortTargetKeys, resolveRequestedRunId, rewriteAssistantText, stripLeakedToolSummary, withReplyRunId };
package/dist/plugin2.js CHANGED
@@ -2951,12 +2951,12 @@ function __setActiveRunForTest(ref) {
2951
2951
  * Ordered session keys to try when aborting for `abortSessionKey`. Pure, so it
2952
2952
  * unit-tests without the OpenClaw SDK. The resolved route key (what the run
2953
2953
  * registered under) is preferred; the raw request key is a best-effort
2954
- * fallback. An abort with NO sessionKey targets the single active run. A
2955
- * sessionKey that does NOT match the running turn yields no candidates we
2956
- * never abort another session's run on a shared daemon.
2954
+ * fallback. A supplied run ID requires both the active run ID and request
2955
+ * session key to match. Legacy aborts without a run ID may target the single
2956
+ * active run when no session key is supplied, or try the supplied raw key.
2957
2957
  */
2958
2958
  function resolveAbortTargetKeys(active, abortSessionKey, abortRunId) {
2959
- if (abortRunId && (!active?.runId || active.runId !== abortRunId || abortSessionKey !== void 0 && active.requestSessionKey !== abortSessionKey)) return [];
2959
+ if (abortRunId !== void 0 && (resolveRequestedRunId(abortRunId) === null || !active?.runId || active.runId !== abortRunId || active.requestSessionKey !== abortSessionKey)) return [];
2960
2960
  const keys = [];
2961
2961
  if (active && (!abortSessionKey || active.requestSessionKey === abortSessionKey)) {
2962
2962
  if (active.routeSessionKey) keys.push(active.routeSessionKey);
@@ -3708,5 +3708,9 @@ const plugin = {
3708
3708
  log.info("Chat plugin deactivated");
3709
3709
  }
3710
3710
  };
3711
+ var plugin_default = {
3712
+ ...plugin,
3713
+ register: plugin.activate.bind(plugin)
3714
+ };
3711
3715
  //#endregion
3712
- export { withReplyRunId as C, stripLeakedToolSummary as S, plugin as _, __agentTurnQueueForTest as a, resolveRequestedRunId as b, admitAgentEvent as c, buildOriginEnvelopeContext as d, buildToolActivity as f, joinAssistantText as g, decideChatServiceStart as h, VOICE_REPLY_SYSTEM_PROMPT as i, buildA2ACompletePayload as l, computeOpenClawSdkAnchors as m, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as n, __resetAgentTurnQueueForTest as o, buildTurnEnvelopeContext as p, MAX_INBOUND_ATTACHMENT_SIZE as r, __setActiveRunForTest as s, A2A_REPLY_SYSTEM_PROMPT as t, buildAttachmentLocalFilename as u, readAttachmentBodyBounded as v, createAlfeChannelPlugin as w, rewriteAssistantText as x, resolveAbortTargetKeys as y };
3716
+ export { withReplyRunId as C, stripLeakedToolSummary as S, plugin_default as _, __agentTurnQueueForTest as a, resolveRequestedRunId as b, admitAgentEvent as c, buildOriginEnvelopeContext as d, buildToolActivity as f, joinAssistantText as g, decideChatServiceStart as h, VOICE_REPLY_SYSTEM_PROMPT as i, buildA2ACompletePayload as l, computeOpenClawSdkAnchors as m, CROSS_AGENT_TOOLS_SYSTEM_PROMPT as n, __resetAgentTurnQueueForTest as o, buildTurnEnvelopeContext as p, MAX_INBOUND_ATTACHMENT_SIZE as r, __setActiveRunForTest as s, A2A_REPLY_SYSTEM_PROMPT as t, buildAttachmentLocalFilename as u, readAttachmentBodyBounded as v, createAlfeChannelPlugin as w, rewriteAssistantText as x, resolveAbortTargetKeys as y };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfe.ai/openclaw-chat",
3
- "version": "0.9.18",
3
+ "version": "0.9.20",
4
4
  "description": "OpenClaw chat plugin for Alfe — web widget and mobile app channels",
5
5
  "type": "module",
6
6
  "main": "./dist/plugin.js",
@@ -27,7 +27,7 @@
27
27
  "openclaw.plugin.json"
28
28
  ],
29
29
  "dependencies": {
30
- "@alfe.ai/agent-api-client": "^0.19.0",
30
+ "@alfe.ai/agent-api-client": "^0.19.1",
31
31
  "@alfe.ai/chat": "^0.0.19",
32
32
  "@alfe.ai/config": "^0.4.1",
33
33
  "@alfe.ai/openclaw-plugin-kit": "0.2.0"