Source-owned registry for extension-contributed agent hooks.
User config hooks still live on MingaAgent.Config. Extension hooks are normalized here so session lifecycle hooks and provider tool hooks read the same source-aware view, and extension cleanup can remove a whole source deterministically.
Summary
Functions
Returns all normalized hooks in registration order.
Returns all registry entries in registration order.
Registers a source-owned batch of raw hook declarations. Same-source batches replace prior entries.
Starts the hook registry.
Removes all hooks owned by a source.
Types
@type entry() :: %{source: source(), id: String.t(), hook: MingaAgent.Hooks.Hook.t()}
Registry entry for one normalized hook.
@type source() :: Minga.Extension.ContributionCleanup.contribution_source()
Source that contributed hooks.
@type state() :: [entry()]
Functions
@spec all() :: [MingaAgent.Hooks.Hook.t()]
Returns all normalized hooks in registration order.
@spec entries() :: [entry()]
Returns all registry entries in registration order.
Registers a source-owned batch of raw hook declarations. Same-source batches replace prior entries.
@spec start_link(keyword()) :: GenServer.on_start()
Starts the hook registry.
@spec unregister_source(source()) :: :ok
Removes all hooks owned by a source.