Agent nodes gain an optional `inputs:` map of templates resolved against
the parent state and overlaid on the child graph agent's initial_state
before its executor starts. A lone {{key}} keeps the state value's JSON
type; mixed text renders to a string; initial_prompt is still owned by the
dispatcher. run_child_agent and run_active_agent_graph keep their
signatures as wrappers over the new *_with_inputs variants, and
run_agent_for_graph rejects inputs aimed at a config-only agent or
containing initial_prompt.
Design: plans/map-subgraph-branches-design.md §3.12 (C18), task T5.
43 lines
1003 B
Rust
43 lines
1003 B
Rust
pub mod agent;
|
|
pub mod dispatch;
|
|
pub mod executor;
|
|
pub mod llm;
|
|
pub mod logging;
|
|
pub mod map;
|
|
pub mod parser;
|
|
pub mod rag;
|
|
pub mod reducer;
|
|
pub mod script;
|
|
pub mod staging;
|
|
pub mod state;
|
|
pub mod state_updates;
|
|
pub mod structured;
|
|
pub mod types;
|
|
pub mod user_interaction;
|
|
pub mod validator;
|
|
|
|
pub use dispatch::{
|
|
active_agent_graph_name, run_active_agent_graph, run_active_agent_graph_with_inputs,
|
|
};
|
|
pub use executor::GraphExecutor;
|
|
pub use parser::{GraphParser, agent_has_graph};
|
|
use serde_json::Value;
|
|
pub use types::{Graph, NodeType};
|
|
|
|
pub const GRAPH_SCHEMA_VERSION: &str = "1.0";
|
|
|
|
pub const DEFAULT_MAX_LOOP_ITERATIONS: usize = 100;
|
|
|
|
pub const MAX_STATE_SIZE_BYTES: usize = 32 * 1024;
|
|
|
|
pub(in crate::graph) fn type_name(value: &Value) -> &'static str {
|
|
match value {
|
|
Value::Null => "null",
|
|
Value::Bool(_) => "bool",
|
|
Value::Number(_) => "number",
|
|
Value::String(_) => "string",
|
|
Value::Array(_) => "array",
|
|
Value::Object(_) => "object",
|
|
}
|
|
}
|