Backplane. AgentRuntime. ToolEffects behaviour
(backplane_agent_runtime v1.10.17)
Copy Markdown
Tool effects and cancellation boundary for Backplane agent runtime.
Summary
Functions
Rejects an invocation before dispatching any tool or external effect.
Classifies an observed backend result using its admitted descriptor safety.
Types
@type adapter() :: module()
@type result() :: {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()} | {:rejected, Backplane.AgentRuntime.ToolEffects.Rejection.t()}
Callbacks
@callback cancel(map()) :: :ok | {:error, Backplane.AgentRuntime.Error.t()}
Functions
@spec cancel(adapter(), map()) :: :ok | {:error, Backplane.AgentRuntime.Error.t()}
@spec execute(adapter(), map(), map()) :: {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()}
@spec reject(map(), Backplane.AgentRuntime.Error.t()) :: {:rejected, Backplane.AgentRuntime.ToolEffects.Rejection.t()} | {:error, Backplane.AgentRuntime.Error.t()}
Rejects an invocation before dispatching any tool or external effect.
Only the registered, trusted backend may make this assertion, after its host approval/catalog checks and before dispatch. It is not a reconciliation receipt for work that was started. Generic errors and error details do not prove non-execution. An unknown outcome cannot be turned into a rejection.
The rejection binds the runtime operation identity and exact arguments; the execution boundary validates it before publishing a structured tool error.
Classifies an observed backend result using its admitted descriptor safety.
@spec validate_output(map(), keyword()) :: {:ok, map()} | {:error, Backplane.AgentRuntime.Error.t()}