@agentvault/agentvault 0.19.27 → 0.19.29

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/cli.js CHANGED
@@ -48759,7 +48759,9 @@ var init_channel = __esm({
48759
48759
  console.log(`[SecureChannel] A2A sync complete: ${a2aCount} channels`);
48760
48760
  this.emit("a2a_channels_synced", { count: a2aCount });
48761
48761
  if (this._persisted?.a2aChannels) {
48762
- const channelsNeedingKx = Object.entries(this._persisted.a2aChannels).filter(
48762
+ const allEntries = Object.entries(this._persisted.a2aChannels);
48763
+ console.log(`[SecureChannel] A2A key exchange check: ${allEntries.length} channels, details=${JSON.stringify(allEntries.map(([id, e]) => ({ id: id.slice(0, 8), session: !!e.session, pending: !!e.pendingEphemeralPrivateKey, convId: !!e.conversationId })))}`);
48764
+ const channelsNeedingKx = allEntries.filter(
48763
48765
  ([_2, entry]) => !entry.session && !entry.pendingEphemeralPrivateKey && entry.conversationId
48764
48766
  );
48765
48767
  if (channelsNeedingKx.length > 0) {
@@ -49291,6 +49293,7 @@ var init_channel = __esm({
49291
49293
  this.emit("error", new Error(`Server: ${detail}`));
49292
49294
  }
49293
49295
  if (data.event === "a2a_message") {
49296
+ console.log(`[SecureChannel] WS received a2a_message: syncComplete=${this._a2aSyncComplete} msgId=${(data.data || data).message_id?.slice(0, 8)}`);
49294
49297
  if (!this._a2aSyncComplete) {
49295
49298
  const msgId = (data.data || data).message_id;
49296
49299
  console.log(`[SecureChannel] Buffering A2A message (sync not complete): ${msgId?.slice(0, 8)}`);
@@ -50383,7 +50386,9 @@ ${messageText}`;
50383
50386
  async _handleA2AMessage(data) {
50384
50387
  const msgData = data.data || data;
50385
50388
  const a2aMsgId = msgData.message_id;
50389
+ console.log(`[SecureChannel] _handleA2AMessage: msgId=${a2aMsgId?.slice(0, 8)} channelId=${(msgData.channel_id || "").slice(0, 8)} hasCipher=${!!msgData.ciphertext} hasHeader=${!!msgData.header_blob}`);
50386
50390
  if (a2aMsgId && this._a2aSeenMessageIds.has(a2aMsgId)) {
50391
+ console.log(`[SecureChannel] A2A dedup: skipping ${a2aMsgId.slice(0, 8)}`);
50387
50392
  return;
50388
50393
  }
50389
50394
  if (a2aMsgId) {
@@ -50396,6 +50401,7 @@ ${messageText}`;
50396
50401
  if (msgData.ciphertext && msgData.header_blob) {
50397
50402
  const channelId = msgData.channel_id || "";
50398
50403
  const channelEntry = this._persisted?.a2aChannels?.[channelId];
50404
+ console.log(`[SecureChannel] A2A encrypted: channel=${channelId.slice(0, 8)} found=${!!channelEntry} hasSession=${!!channelEntry?.session} hasRatchet=${!!channelEntry?.session?.ratchetState} role=${channelEntry?.role}`);
50399
50405
  if (channelEntry?.session?.ratchetState) {
50400
50406
  try {
50401
50407
  const headerJson = Buffer.from(msgData.header_blob, "hex").toString("utf-8");