Contract and safe invocation facade for action providers.
Providers own discovery and execution. Spectre owns provider registration, policy, persistence, idempotency, and the effect lifecycle.
Summary
Functions
Returns normalized discovery specs for a mounted provider.
Executes one action through its already-resolved provider mount.
Types
Callbacks
@callback actions(keyword()) :: [Spectre.Action.Spec.t() | map()] | {:ok, [Spectre.Action.Spec.t() | map()]} | {:error, term()}
@callback execute(Spectre.Action.t(), Spectre.Context.t(), keyword()) :: term()
@callback schema_hash( Spectre.Action.t(), keyword() ) :: String.t() | nil | {:ok, String.t() | nil}
Functions
@spec actions(Spectre.Action.Provider.Mount.t(), :planner | :all) :: {:ok, [Spectre.Action.Spec.t()]} | {:error, term()}
Returns normalized discovery specs for a mounted provider.
@spec execute( Spectre.Action.Provider.Mount.t(), Spectre.Action.t(), Spectre.Context.t() ) :: provider_result()
Executes one action through its already-resolved provider mount.
If a planner attached a schema hash, the provider must support schema verification and report the same hash before execution.