a3s_code_core/orchestration/mod.rs
1//! Programmable, deterministic multi-agent orchestration.
2//!
3//! Today an agent fans work out only by *model-driven* delegation (the LLM
4//! decides to call the `task` / `parallel_task` tool). This module adds a
5//! *programmable* layer: a developer expresses fan-out / pipelines /
6//! verification panels as code, so the orchestration is reproducible,
7//! testable, budget-bounded, and (later) resumable — independent of what the
8//! model chooses to do.
9//!
10//! ## The framework / host boundary
11//!
12//! Everything here is written against one seam, [`AgentExecutor`]: "run this
13//! step, give me the result." The framework owns the **grammar** (which steps,
14//! how they compose, the concurrency *hint*, the data contracts
15//! [`AgentStepSpec`] / [`StepOutcome`]) and ships a default executor that runs
16//! every step locally. The **placement** of those steps across a cluster —
17//! transport, scheduling, where a step actually executes — belongs to the
18//! host (书安OS), which implements [`AgentExecutor`]. The combinators never
19//! observe where a step ran, so the same orchestration scales from one process
20//! to a cluster without change.
21//!
22//! The in-box implementation is [`crate::tools::TaskExecutor`].
23
24mod checkpoint;
25mod combinators;
26mod executor;
27
28pub use checkpoint::{WorkflowCheckpoint, WorkflowStepRecord, WORKFLOW_CHECKPOINT_SCHEMA_VERSION};
29pub use combinators::{execute_pipeline, execute_steps_parallel_resumable, PipelineStage};
30pub use executor::{execute_steps_parallel, AgentExecutor, AgentStepSpec, StepOutcome};