# `Jido.Messaging.BridgePlugin`
[🔗](https://github.com/agentjido/jido_messaging/blob/v1.0.0/lib/jido_messaging/bridge_plugin.ex#L1)

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 implementing `Jido.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: %{}
    }

# `t`

```elixir
@type t() :: %Jido.Messaging.BridgePlugin{
  adapter_module: module(),
  adapters: map(),
  capabilities: [atom()],
  id: atom(),
  label: binary()
}
```

# `from_adapter`

```elixir
@spec from_adapter(
  module(),
  keyword()
) :: t()
```

Creates a new BridgePlugin from an adapter module.

Automatically extracts capabilities from `Jido.Messaging.AdapterBridge`.

## Parameters

  * `adapter_module` - Module implementing `Jido.Chat.Adapter`
  * `opts` - 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")

# `get_adapter`

```elixir
@spec get_adapter(t(), atom()) :: module() | nil
```

Gets an adapter module for a specific adapter type.

## Examples

    BridgePlugin.get_adapter(telegram_plugin, :mentions)
    # => MyApp.TelegramMentionsAdapter

# `has_capability?`

```elixir
@spec has_capability?(t(), atom()) :: boolean()
```

Checks if the plugin supports a specific capability.

## Examples

    BridgePlugin.has_capability?(telegram_plugin, :streaming)
    # => true

# `schema`

Returns the Zoi schema for BridgePlugin

---

*Consult [api-reference.md](api-reference.md) for complete listing*
