Provider-neutral facade over an optional action planner.
Spectre does not parse an action language, load a tool registry, or know
which planning library is installed. A configured implementation of
Spectre.Action.Planner returns Spectre.Action values; this facade gives
them trusted route ownership and turns them into staged effects.
Summary
Functions
Removes planner syntax from a visible model reply.
Plans one explicit planner instruction without executing it.
Plans actions found in a model response.
Functions
Removes planner syntax from a visible model reply.
A mounted planner with a clean_reply/3 callback owns the cleanup;
otherwise Spectre.Reply.Sanitizer strips Spectre control tokens
(sanitize_reply: false opts out).
@spec clean_reply(String.t(), Spectre.Context.t() | map(), keyword()) :: String.t()
@spec plan( String.t(), keyword() ) :: {:ok, Spectre.Effect.t()} | {:error, term()}
Plans one explicit planner instruction without executing it.
@spec plan(String.t(), Spectre.Context.t() | map(), keyword()) :: {:ok, Spectre.Effect.t()} | {:error, term()}
Plans actions found in a model response.
When no planner is mounted the reply passes through unchanged.
@spec plan_response(String.t(), Spectre.Context.t() | map(), keyword()) :: {:ok, %{reply_text: String.t(), effects: [Spectre.Effect.t()]}} | {:error, term()}