pub async fn execute_step_config_intercepted(
config: &StepConfig,
provider: &Arc<dyn AgentProvider>,
log_sender: Option<StepLogSender>,
interceptor: Option<&Arc<dyn StepInterceptor>>,
) -> Result<StepOutput, EngineError>Expand description
Execute a StepConfig, letting a StepInterceptor resolve it first.
When interceptor returns Some(result) for this config, that result is
used as-is and no executor runs. Otherwise the config is dispatched to the
executor matching its StepKind, exactly like execute_step_config.
When a StepLogSender is provided, executors that support streaming
will emit log lines in real time (e.g. shell stdout/stderr).
§Errors
Returns EngineError::Operation if the operation fails, or whichever
error the interceptor returned for an intercepted step.
§Examples
use ironflow_engine::config::{StepConfig, ShellConfig};
use ironflow_engine::executor::execute_step_config_intercepted;
use ironflow_core::provider::AgentProvider;
use ironflow_core::providers::claude::ClaudeCodeProvider;
use std::sync::Arc;
let provider: Arc<dyn AgentProvider> = Arc::new(ClaudeCodeProvider::new());
let config = StepConfig::Shell(ShellConfig::new("echo hello"));
let output = execute_step_config_intercepted(&config, &provider, None, None).await?;