# `BB.Jido.Plugin.Robot`
[🔗](https://github.com/beam-bots/bb_jido/blob/main/lib/bb/jido/plugin/robot.ex#L5)

Jido v2 plugin that gives an agent the ability to control a Beam Bots robot.

Provides:

- The standard robot-control actions: `BB.Jido.Action.Command`,
  `BB.Jido.Action.Reactor`, `BB.Jido.Action.WaitForState`, and
  `BB.Jido.Action.GetJointState`.
- Default signal routes for the canonical `bb.*` signal types.
- Plugin-owned state: the configured `:robot` module and a cached
  `:safety_state` (updated automatically when `bb.state.transition`
  signals arrive).
- A supervised `BB.Jido.PubSubBridge` mounted under the agent process that
  forwards BB PubSub events to the agent as Jido signals.

## Configuration

Plugin config (passed via `{BB.Jido.Plugin.Robot, %{...}}` when attaching
to an agent):

- `:robot` — robot module (required).
- `:topics` — list of `BB.PubSub` paths to bridge (default
  `[[:state_machine]]`).
- `:message_types` — payload modules to filter on at subscribe time
  (default `[]`, meaning no filter).
- `:throttle_ms` — optional per-signal-type throttle in milliseconds.

## Example

    defmodule MyRobot.Agent do
      use Jido.Agent,
        name: "my_robot",
        plugins: [{BB.Jido.Plugin.Robot, %{robot: MyRobot}}]
    end

# `__plugin_metadata__`

```elixir
@spec __plugin_metadata__() :: map()
```

Returns metadata for Jido.Discovery integration.

This function is used by `Jido.Discovery` to index plugins
for fast lookup and filtering.

# `actions`

```elixir
@spec actions() :: [module()]
```

Returns the list of action modules provided by this plugin.

# `capabilities`

```elixir
@spec capabilities() :: [atom()]
```

Returns the capabilities provided by this plugin.

# `category`

```elixir
@spec category() :: String.t() | nil
```

Returns the plugin's category.

# `config_schema`

```elixir
@spec config_schema() :: Zoi.schema() | nil
```

Returns the Zoi schema for per-agent configuration.

# `description`

```elixir
@spec description() :: String.t() | nil
```

Returns the plugin's description.

# `manifest`

```elixir
@spec manifest() :: Jido.Plugin.Manifest.t()
```

Returns the plugin manifest with all metadata.

The manifest provides compile-time metadata for discovery
and introspection, including capabilities, requirements,
signal routes, and schedules.

# `name`

```elixir
@spec name() :: String.t()
```

Returns the plugin's name.

# `otp_app`

```elixir
@spec otp_app() :: atom() | nil
```

Returns the OTP application for config resolution.

# `plugin_spec`

```elixir
@spec plugin_spec(map()) :: Jido.Plugin.Spec.t()
```

Returns the plugin specification with optional per-agent configuration.

## Examples

    spec = MyModule.plugin_spec(%{})
    spec = MyModule.plugin_spec(%{custom_option: true})

# `requires`

```elixir
@spec requires() :: [tuple()]
```

Returns the requirements for this plugin.

# `schedules`

```elixir
@spec schedules() :: [tuple()]
```

Returns the schedules for this plugin.

# `schema`

```elixir
@spec schema() :: Zoi.schema() | nil
```

Returns the Zoi schema for plugin state.

# `signal_patterns`

```elixir
@spec signal_patterns() :: [String.t()]
```

Returns the signal patterns this plugin handles.

# `signal_routes`

```elixir
@spec signal_routes() :: [tuple()]
```

Returns the signal routes for this plugin.

# `singleton?`

```elixir
@spec singleton?() :: boolean()
```

Returns whether this plugin is a singleton.

# `state_key`

```elixir
@spec state_key() :: atom()
```

Returns the key used to store plugin state in the agent.

# `subscriptions`

```elixir
@spec subscriptions() :: [tuple()]
```

Returns the sensor subscriptions for this plugin.

# `tags`

```elixir
@spec tags() :: [String.t()]
```

Returns the plugin's tags.

# `vsn`

```elixir
@spec vsn() :: String.t() | nil
```

Returns the plugin's version.

---

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