pub struct DagNode {
pub id: u32,
pub name: String,
pub effect: NodeEffect,
pub capabilities: Vec<String>,
pub inputs: Vec<String>,
pub outputs: Vec<String>,
pub budget: u32,
pub is_control_unit: bool,
}Expand description
A single agent step in the DAG.
Fields§
§id: u32Unique node ID (0..MAX_DAG_NODES).
name: StringHuman-readable name.
effect: NodeEffectEffect class.
capabilities: Vec<String>Required capability IDs.
inputs: Vec<String>Input channel names (from blackboard or upstream nodes).
outputs: Vec<String>Output channel names (to blackboard or downstream nodes).
budget: u32Budget (max tokens / max steps).
is_control_unit: boolWhether this node is a Control Unit (autonomous router).
Implementations§
Source§impl DagNode
impl DagNode
Sourcepub fn new(id: u32, name: &str, effect: NodeEffect) -> Self
pub fn new(id: u32, name: &str, effect: NodeEffect) -> Self
Creates a new DagNode.
Sourcepub fn with_capability(self, cap: &str) -> Self
pub fn with_capability(self, cap: &str) -> Self
Builder — sets capability.
Sourcepub fn with_input(self, channel: &str) -> Self
pub fn with_input(self, channel: &str) -> Self
Builder — sets input.
Sourcepub fn with_output(self, channel: &str) -> Self
pub fn with_output(self, channel: &str) -> Self
Builder — sets output.
Sourcepub fn with_budget(self, budget: u32) -> Self
pub fn with_budget(self, budget: u32) -> Self
Builder — sets budget.
Sourcepub fn as_control_unit(self) -> Self
pub fn as_control_unit(self) -> Self
control-unit form.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DagNode
impl RefUnwindSafe for DagNode
impl Send for DagNode
impl Sync for DagNode
impl Unpin for DagNode
impl UnsafeUnpin for DagNode
impl UnwindSafe for DagNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more