# `Minga.Extension.CallbackRegistry`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga/extension/callback_registry.ex#L1)

Extension-only registry for declarative runtime editor callbacks.

Registration derives the extension source from lifecycle ownership and checks
callback modules against the source's admitted artifact inventory. Core and
config callbacks are intentionally not stored here; they execute directly in
the layer that owns them.

# `callback`

```elixir
@type callback() :: {source(), module()}
```

A callback returned in deterministic dispatch order.

# `family`

```elixir
@type family() :: :buffer_saved | :editor_action | :source_unload
```

Runtime editor callback category available to extensions.

# `lifecycle_opts`

```elixir
@type lifecycle_opts() :: [
  registry: registry(),
  artifact_admission: GenServer.server()
]
```

Options reserved for lifecycle-owned extension registration.

# `registry`

```elixir
@type registry() :: atom()
```

Named registry process and ETS table.

# `source`

```elixir
@type source() :: {:extension, atom()}
```

An extension source that owns a registered callback.

# `callbacks`

```elixir
@spec callbacks(family(), registry()) :: [callback()]
```

Returns extension callbacks for a family in deterministic priority order.

# `callbacks_for_source`

```elixir
@spec callbacks_for_source(family(), source(), registry()) :: [callback()]
```

Returns one extension source's callbacks in deterministic priority order.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `default_table`

```elixir
@spec default_table() :: registry()
```

Returns the production registry table name.

# `start_link`

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

Starts a callback registry and its protected ETS table.

# `unregister_source`

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

Removes every callback owned by an extension source.

---

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