Source-owned contribution cleanup coordinator.
The extension supervisor lives in the core Minga.* layer, so it cannot depend on editor presentation modules directly. Editor-layer registries register cleanup callbacks here when they accept source-owned contributions. The supervisor calls this module with a source, and the coordinator cleans core registries plus any registered higher-layer callbacks without creating compile-time upward dependencies.
Summary
Types
Cleanup failure reported for one family.
Cleanup callback invoked with a source identifier.
Cleanup options with injectable test registries.
Source that contributed registry entries.
Functions
Registers a cleanup callback for a contribution family.
Unregisters a cleanup callback. Mostly useful for tests.
Removes all contributions owned by a source.
Types
@type cleanup_failure() :: %{ family: atom(), source: contribution_source(), reason: term() }
Cleanup failure reported for one family.
@type cleanup_fun() :: (contribution_source() -> :ok | {:error, term()})
Cleanup callback invoked with a source identifier.
@type cleanup_opts() :: [ command_registry: GenServer.server(), keymap: GenServer.server(), callbacks: %{required(atom()) => cleanup_fun()} ]
Cleanup options with injectable test registries.
Source that contributed registry entries.
Functions
@spec register(atom(), cleanup_fun()) :: :ok
Registers a cleanup callback for a contribution family.
@spec unregister(atom()) :: :ok
Unregisters a cleanup callback. Mostly useful for tests.
@spec unregister_source(contribution_source(), cleanup_opts()) :: :ok | {:error, [cleanup_failure()]}
Removes all contributions owned by a source.