pub struct Executor {Show 15 fields
pub adapters: Arc<AdapterRegistry>,
pub sanitizer: Arc<PiiSanitizer>,
pub events: Arc<dyn EventSink>,
pub cloud_providers: Arc<CloudAiRegistry>,
pub credentials: Arc<dyn CredentialResolver>,
pub allow_cloud_ai: bool,
pub allow_local_ai: bool,
pub local_ai_base_url: Option<String>,
pub stream_sink: Arc<dyn LlmStreamSink>,
pub working_memory: WorkingMemory,
pub control: SharedRunControl,
pub confirm_destructive: bool,
pub review_gate_available: bool,
pub edit_staging: Option<StagedEdits>,
pub workspace_root: PathBuf,
}Fields§
§adapters: Arc<AdapterRegistry>§sanitizer: Arc<PiiSanitizer>§events: Arc<dyn EventSink>§cloud_providers: Arc<CloudAiRegistry>§credentials: Arc<dyn CredentialResolver>§allow_cloud_ai: bool§allow_local_ai: boolGate for the local provider (on-device OpenAI-compatible server).
Separate from allow_cloud_ai because a localhost call is not
network egress.
local_ai_base_url: Option<String>Endpoint for the local provider, sourced from settings. Passed
through as CloudAiRequest.base_url for local-provider nodes.
stream_sink: Arc<dyn LlmStreamSink>Fan-out target for streaming LLM tokens. Wired by FlowApp so
every AI (local/cloud) and agentic node invocation feeds the
header chip ticker via Tauri’s flow:llm_token event. Headless
tests use the default NullStreamSink.
working_memory: WorkingMemorySession-scoped key→JSON working memory, carried across runs by FlowApp
so re-plan iterations see prior results. Succeeded set-variable utility
nodes write it; any field (and when conditions) read it via
{{memory.<key>}}. Headless tests pass a fresh empty store.
control: SharedRunControlOut-of-band pause/resume/cancel signal, polled at node boundaries.
Shared with FlowApp so the Tauri pause/resume/stop commands can steer
an in-progress run. Headless tests use the default (always Running).
confirm_destructive: boolPer-step destructive-action confirmation gate (roadmap E1). When true,
the executor pauses before running a node that performs a destructive
operation (file delete, rm, git push, …), emits
ExecutionEvent::AwaitingConfirmation, and blocks until the user
confirms (resume) or cancels (stop). Headless runners leave it false
so a destructive node never blocks on a confirmation that can’t arrive.
review_gate_available: boolWhether a host capable of resolving an AI review gate is attached.
Headless runners (CLI / TUI) set this false: a contract-bound output
in the human review band then fails onto its fallback path instead of
holding the run on a gate no one can resolve - RAO’s deterministic
fallback, never a silent auto-approve.
edit_staging: Option<StagedEdits>When Some, AI-node tool calls that mutate the filesystem (fs
write/edit/delete) are staged into this buffer - computed but not
written - so a coding-agent turn can be reviewed before its edits land.
Read-only tools and every shell tool still run for real, and a staged
file is visible to later read-file calls in the same turn.
[FlowApp::run_agent_turn] installs it; every other run leaves it None.
workspace_root: PathBufResolved workspace root for this run, forwarded to every adapter via
[AdapterCtx::workspace_root]. FlowApp resolves it (per-run override,
stored per-flow path, or edition default) before the run starts.
Implementations§
Source§impl Executor
impl Executor
pub async fn run( &self, graph: &FlowGraph, ) -> Result<ExecutionSummary, ExecutorError>
Sourcepub async fn run_with_id(
&self,
execution_id: String,
graph: &FlowGraph,
) -> Result<ExecutionSummary, ExecutorError>
pub async fn run_with_id( &self, execution_id: String, graph: &FlowGraph, ) -> Result<ExecutionSummary, ExecutorError>
Like Executor::run but uses a caller-supplied execution id. The host
provides the id so it can associate the run with a specific tab/flow and
steer it (pause / resume / cancel) immediately - before the Started
event arrives - which is what makes concurrent multi-tab runs routable.