Adapter bridge metadata struct.
Represents a registered adapter bridge with its metadata, capabilities, and optional adapter implementations.
Fields
:id- Unique atom identifier (e.g.,:telegram,:discord):adapter_module- The module implementingJido.Chat.Adapter:label- Human-readable display name (e.g., "Telegram Adapter"):capabilities- List of supported capabilities (e.g.,[:text, :image, :streaming]):adapters- Map of adapter type to module (e.g.,%{mentions: MyMentionsAdapter})
Example
%BridgePlugin{
id: :telegram,
adapter_module: MyApp.TelegramAdapter,
label: "Telegram Adapter",
capabilities: [:text, :typing],
adapters: %{}
}
Summary
Functions
Creates a new BridgePlugin from an adapter module.
Gets an adapter module for a specific adapter type.
Checks if the plugin supports a specific capability.
Returns the Zoi schema for BridgePlugin
Types
Functions
Creates a new BridgePlugin from an adapter module.
Automatically extracts capabilities from Jido.Messaging.AdapterBridge.
Parameters
adapter_module- Module implementingJido.Chat.Adapteropts- Optional overrides::id- Override the channel type as the ID:label- Override the default label:adapters- Map of adapter type to module
Examples
BridgePlugin.from_adapter(MyApp.TelegramAdapter)
# => %BridgePlugin{id: :telegram, label: "Telegram", ...}
BridgePlugin.from_adapter(MyAdapter, label: "My Custom Adapter")
Gets an adapter module for a specific adapter type.
Examples
BridgePlugin.get_adapter(telegram_plugin, :mentions)
# => MyApp.TelegramMentionsAdapter
Checks if the plugin supports a specific capability.
Examples
BridgePlugin.has_capability?(telegram_plugin, :streaming)
# => true
Returns the Zoi schema for BridgePlugin