pub struct Job {
pub id: JobId,
pub deps: Vec<JobId>,
pub prompt: String,
pub retry: RetryPolicy,
pub state: JobState,
pub result: Option<JobResult>,
pub attempts: u32,
pub visits: u32,
pub last_error: Option<String>,
pub prior_attempt: Option<String>,
pub feedback: Option<String>,
}Expand description
One node in the Run DAG.
Fields§
§id: JobId§deps: Vec<JobId>Ids of Jobs that must Succeed before this one can run.
prompt: StringThe task description handed to the runner (e.g. a sub-agent prompt).
retry: RetryPolicy§state: JobState§result: Option<JobResult>§attempts: u32How many times this Job has been run so far.
visits: u32How many times this Job has been entered — one per run, plus one for
every time a Next::Goto sent the graph back through it.
Distinct from attempts, which counts retries of a single entry: a job
that fails twice and is revisited once has 2 attempts and 2 visits, and
only the second bounds the loop.
last_error: Option<String>Error from the most recent failed attempt, if any.
prior_attempt: Option<String>What this job produced on the previous lap, and why it was sent back.
Set only by a Next::Goto; the runner puts both in front
of the job so it can improve on its own answer instead of reproducing it.
feedback: Option<String>Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Job
impl<'de> Deserialize<'de> for Job
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for Job
impl Freeze for Job
impl RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl UnsafeUnpin for Job
impl UnwindSafe for Job
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