@agentvault/agentvault 0.14.10 → 0.14.12

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.js CHANGED
@@ -46325,6 +46325,9 @@ var init_channel = __esm({
46325
46325
  _syncMessageIds = null;
46326
46326
  /** Queued A2A messages for responder channels not yet activated (no first initiator message received). */
46327
46327
  _a2aPendingQueue = {};
46328
+ /** Dedup buffer for A2A message IDs (prevents double-delivery via direct + Redis) */
46329
+ _a2aSeenMessageIds = /* @__PURE__ */ new Set();
46330
+ static A2A_SEEN_MAX = 500;
46328
46331
  _scanEngine = null;
46329
46332
  _scanRuleSetVersion = 0;
46330
46333
  _telemetryReporter = null;
@@ -47280,7 +47283,8 @@ var init_channel = __esm({
47280
47283
  }
47281
47284
  const payload = {
47282
47285
  conversation_id: channelEntry.conversationId,
47283
- plaintext: text,
47286
+ channel_id: channelEntry.channelId,
47287
+ text,
47284
47288
  message_type: "a2a",
47285
47289
  parent_span_id: opts?.parentSpanId
47286
47290
  };
@@ -47867,6 +47871,17 @@ var init_channel = __esm({
47867
47871
  }
47868
47872
  if (data.event === "a2a_message") {
47869
47873
  const msgData = data.data || data;
47874
+ const a2aMsgId = msgData.message_id;
47875
+ if (a2aMsgId && this._a2aSeenMessageIds.has(a2aMsgId)) {
47876
+ return;
47877
+ }
47878
+ if (a2aMsgId) {
47879
+ this._a2aSeenMessageIds.add(a2aMsgId);
47880
+ if (this._a2aSeenMessageIds.size > _SecureChannel.A2A_SEEN_MAX) {
47881
+ const first = this._a2aSeenMessageIds.values().next().value;
47882
+ if (first) this._a2aSeenMessageIds.delete(first);
47883
+ }
47884
+ }
47870
47885
  if (msgData.ciphertext && msgData.header_blob) {
47871
47886
  const channelId = msgData.channel_id || "";
47872
47887
  const channelEntry = this._persisted?.a2aChannels?.[channelId];