Install-time and load-time dependency resolution for plugins.
Uses Kahn's algorithm for topological sort with cycle detection, conflict checking, and capability matching.
Summary
Functions
Checks for conflicts between manifests.
Resolves load order for a set of manifests using topological sort.
Resolves load order for new manifests given already-loaded plugin ids.
Checks that all requires capabilities are satisfied by some plugin's provides.
Types
Functions
@spec check_conflicts([Raxol.Core.Runtime.Plugins.Manifest.t()]) :: :ok | {:error, {:conflict, atom(), atom()}}
Checks for conflicts between manifests.
@spec resolve([Raxol.Core.Runtime.Plugins.Manifest.t()]) :: resolution()
Resolves load order for a set of manifests using topological sort.
Returns {:ok, [plugin_id]} in dependency order (dependencies first),
or {:error, reason} on failure.
@spec resolve_incremental( [Raxol.Core.Runtime.Plugins.Manifest.t()], already_loaded :: [atom()] ) :: resolution()
Resolves load order for new manifests given already-loaded plugin ids.
Treats already_loaded as satisfied dependencies that don't need ordering.
@spec satisfy_capabilities([Raxol.Core.Runtime.Plugins.Manifest.t()]) :: :ok | {:error, {:unmet_capability, atom(), atom()}}
Checks that all requires capabilities are satisfied by some plugin's provides.