@agentvault/agentvault 0.19.4 → 0.19.5

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
@@ -48412,9 +48412,10 @@ var init_channel = __esm({
48412
48412
  if (!this._persisted?.a2aChannels) {
48413
48413
  throw new Error("No A2A channels established");
48414
48414
  }
48415
- const channelEntry = Object.values(this._persisted.a2aChannels).find(
48415
+ const allMatches = Object.values(this._persisted.a2aChannels).filter(
48416
48416
  (ch) => ch.hubAddress === hubAddress
48417
48417
  );
48418
+ const channelEntry = allMatches.find((ch) => ch.conversationId) ?? allMatches[0];
48418
48419
  if (!channelEntry) {
48419
48420
  throw new Error(`No A2A channel found for hub address: ${hubAddress}`);
48420
48421
  }