pub struct TaskNode {Show 15 fields
pub id: TaskId,
pub title: String,
pub description: String,
pub agent_hint: Option<String>,
pub status: TaskStatus,
pub depends_on: Vec<TaskId>,
pub result: Option<TaskResult>,
pub assigned_agent: Option<String>,
pub retry_count: u32,
pub predicate_rerun_count: u32,
pub failure_strategy: Option<FailureStrategy>,
pub max_retries: Option<u32>,
pub execution_mode: ExecutionMode,
pub verify_predicate: Option<VerifyPredicate>,
pub predicate_outcome: Option<PredicateOutcome>,
}Expand description
A single node in the task DAG.
Constructed by Planner and stored inside a TaskGraph. The
scheduler drives each node through its TaskStatus lifecycle.
§Examples
use zeph_orchestration::{TaskNode, TaskStatus, ExecutionMode};
let node = TaskNode::new(0, "fetch data", "Download the dataset from source.");
assert_eq!(node.status, TaskStatus::Pending);
assert!(node.depends_on.is_empty());
assert_eq!(node.execution_mode, ExecutionMode::Parallel);Fields§
§id: TaskIdDense zero-based index. Invariant: tasks[i].id == TaskId(i).
title: StringShort, human-readable task title.
description: StringFull task description passed verbatim to the assigned sub-agent as its prompt.
agent_hint: Option<String>Preferred agent name suggested by the planner; None lets the router decide.
status: TaskStatusCurrent lifecycle status.
depends_on: Vec<TaskId>Indices of tasks this node depends on.
result: Option<TaskResult>Result populated by the scheduler after the sub-agent finishes.
assigned_agent: Option<String>Agent name actually assigned by the router at dispatch time.
retry_count: u32Number of times this task has been retried so far (execution retries only).
predicate_rerun_count: u32Number of predicate-driven re-runs for this task (independent of retry_count).
failure_strategy: Option<FailureStrategy>Per-task failure strategy override; None means use TaskGraph::default_failure_strategy.
max_retries: Option<u32>Maximum retry attempts for this task; None means use TaskGraph::default_max_retries.
execution_mode: ExecutionModeLLM planner annotation. Old SQLite-stored JSON without this field
deserialises to the default (Parallel).
verify_predicate: Option<VerifyPredicate>Per-subtask verification predicate (predicate gate).
When Some, the task’s output must satisfy this criterion before downstream
tasks may consume it. The scheduler emits SchedulerAction::VerifyPredicate
after task completion and blocks downstream dispatch until
predicate_outcome.is_some().
predicate_outcome: Option<PredicateOutcome>Outcome of the most recent predicate evaluation.
None means the gate has not been evaluated yet (in-memory only; restart
re-evaluates any pending predicates). The scheduler re-emits VerifyPredicate
on every tick while this is None and verify_predicate.is_some().
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskNode
impl<'de> Deserialize<'de> for TaskNode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TaskNode
impl RefUnwindSafe for TaskNode
impl Send for TaskNode
impl Sync for TaskNode
impl Unpin for TaskNode
impl UnsafeUnpin for TaskNode
impl UnwindSafe for TaskNode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request