# `MingaEditor.Agent.SlashCommand.Registry`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/agent/slash_command/registry.ex#L1)

Source-owned registry for extension-contributed agent slash commands.

Built-in slash commands remain static in `MingaEditor.Agent.SlashCommand`. Extension declarations are stored here so cleanup and reload no longer depend on scanning running manifests.

# `entry`

```elixir
@type entry() :: %{
  source: source(),
  id: String.t(),
  command: MingaEditor.Agent.SlashCommand.Command.t()
}
```

Registry entry for one slash command.

# `source`

```elixir
@type source() :: Minga.Extension.ContributionCleanup.contribution_source()
```

Source that contributed slash commands.

# `state`

```elixir
@type state() :: [entry()]
```

# `commands`

```elixir
@spec commands() :: [MingaEditor.Agent.SlashCommand.Command.t()]
```

Returns all registered extension slash commands in deterministic registration order.

# `entries`

```elixir
@spec entries() :: [entry()]
```

Returns registry entries in deterministic registration order.

# `register_many`

```elixir
@spec register_many(
  source(),
  [{atom() | String.t(), String.t(), keyword()}],
  keyword()
) :: :ok
```

Registers a source-owned batch of slash command declarations. Same-source batches replace prior entries.

# `start_link`

```elixir
@spec start_link(keyword()) :: GenServer.on_start()
```

Starts the slash command registry.

# `unregister_source`

```elixir
@spec unregister_source(source()) :: :ok
```

Removes all slash commands owned by a source.

---

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