Skip to main content

response_to_result

Function response_to_result 

Source
pub fn response_to_result(
    hook_name: &str,
    response: Value,
    inbound: &Extensions,
) -> Result<ErasedResultFields, HostError>
Expand description

Convert a worker response into the erased result the executor consumes.

Preserves all four decision-bearing fields: whether processing continues, any violation, a modified payload, and modified extensions. A response missing continue_processing defaults to true, matching PluginResult’s Pydantic default — a plugin that returns nothing means “allow”, not “deny”.

inbound is the capability-filtered view this plugin was dispatched with. The returned-extensions path needs it to reuse the original Arcs for immutable slots and to read the write tokens the executor issued — see the extensions module for why both are load-bearing.