Public extension lifecycle facade.
Per-extension ordering and policy live exclusively in Extension.Instance.
This module retains bulk Git/Hex prerequisites, declaration reconciliation,
iteration/error aggregation, pending-restart queries, and list projection.
Summary
Functions
Removes command, keymap, and callback contributions owned by an extension.
Returns whether a module exports the required extension callbacks.
Returns compatible {name, version, status} list projection.
Reports path/Git sources changed since current-generation admission.
Registers and validates an extension module's declared options.
Registers one lazy declaration and its activation stubs through its stable authority.
Starts all declared extensions after bulk source prerequisites.
Starts a captured deferred declaration through the same Instance.
Starts one extension through its stable authority and returns the runtime PID.
Starts an isolated root supervisor for tests and embedded callers.
Stops all declared extension authorities, aggregating failures.
Stops one extension authority. Stop is idempotent.
Validates that an extension module exports every required callback.
Types
@type start_opts() :: [ command_registry: GenServer.server(), keymap: GenServer.server(), callbacks: %{required(atom()) => function()}, code_lease: GenServer.server(), callback_registry: atom(), artifact_admission: GenServer.server(), runtime_application: atom(), runtime_owned_modules: [module()], instance_registry: atom(), slow_lifecycle_threshold_ms: non_neg_integer(), transition_timeout_ms: pos_integer(), callback_timeout_ms: pos_integer(), runtime_query_timeout_ms: pos_integer(), drain_timeout_ms: pos_integer() ]
Injected lifecycle collaborators.
Functions
@spec cleanup_extension_contributions( atom(), GenServer.server(), GenServer.server(), start_opts() ) :: :ok | {:error, [map()]}
Removes command, keymap, and callback contributions owned by an extension.
Returns whether a module exports the required extension callbacks.
@spec list_extensions(GenServer.server()) :: [ {atom(), String.t(), Minga.Extension.extension_status()} ]
Returns compatible {name, version, status} list projection.
@spec pending_artifact_restarts(GenServer.server(), start_opts()) :: [atom()]
Reports path/Git sources changed since current-generation admission.
Registers and validates an extension module's declared options.
@spec register_lazy_extension( GenServer.server(), GenServer.server(), atom(), Minga.Extension.Registry.entry(), start_opts() ) :: :ok | {:error, term()}
Registers one lazy declaration and its activation stubs through its stable authority.
@spec start_all() :: :ok | {:error, [start_failure()]}
Starts all declared extensions after bulk source prerequisites.
@spec start_all(GenServer.server(), GenServer.server()) :: :ok | {:error, [start_failure()]}
@spec start_all(GenServer.server(), GenServer.server(), start_opts()) :: :ok | {:error, [start_failure()]}
@spec start_deferred_extension( GenServer.server(), GenServer.server(), atom(), Minga.Extension.Registry.entry(), start_opts() ) :: :ok
Starts a captured deferred declaration through the same Instance.
@spec start_extension( GenServer.server(), GenServer.server(), atom(), Minga.Extension.Registry.entry(), start_opts() ) :: {:ok, pid()} | {:error, term()}
Starts one extension through its stable authority and returns the runtime PID.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts an isolated root supervisor for tests and embedded callers.
@spec stop_all() :: :ok | {:error, [stop_failure()]}
Stops all declared extension authorities, aggregating failures.
@spec stop_all(GenServer.server(), GenServer.server()) :: :ok | {:error, [stop_failure()]}
@spec stop_all(GenServer.server(), GenServer.server(), start_opts()) :: :ok | {:error, [stop_failure()]}
@spec stop_extension( GenServer.server(), GenServer.server(), atom(), Minga.Extension.Registry.entry(), start_opts() ) :: :ok | {:error, term()}
Stops one extension authority. Stop is idempotent.
Validates that an extension module exports every required callback.