Planner-facing description of an action exposed by a provider.
Specs are discovery data only. Execution always resolves the provider again from the compiled Agent definition, so a planner cannot inject an arbitrary implementation module.
Summary
Functions
Computes the stable hash used to detect provider-schema drift.
Builds a normalized spec and derives a stable schema hash when omitted.
Returns whether a spec may be exposed to a model-facing planner.
Types
@type t() :: %Spectre.Action.Spec{ description: String.t() | nil, id: String.t() | nil, metadata: map(), mode: atom() | nil, name: Spectre.Action.name(), schema: term(), schema_hash: String.t(), via: Spectre.Action.provider_ref(), visibility: :deterministic | :planner | :both }
Functions
@spec hash(Spectre.Action.provider_ref(), Spectre.Action.name(), term()) :: String.t()
Computes the stable hash used to detect provider-schema drift.
@spec hash(Spectre.Action.provider_ref(), Spectre.Action.name(), term(), atom() | nil) :: String.t()
Builds a normalized spec and derives a stable schema hash when omitted.
Returns whether a spec may be exposed to a model-facing planner.