Skip to main content

LifecycleConfig

Struct LifecycleConfig 

Source
pub struct LifecycleConfig {
    pub task_acceptance: TaskAcceptance,
    pub after_task: AfterTask,
    pub queue_depth: usize,
    pub input_timeout_secs: Option<u64>,
    pub conversation_mode: ConversationMode,
    pub max_task_reopens: u32,
    pub shell_grace_secs: u64,
    pub delegation_deadline_secs: u64,
}

Fields§

§task_acceptance: TaskAcceptance§after_task: AfterTask§queue_depth: usize§input_timeout_secs: Option<u64>

If set, request-input calls that receive no follow-up within this many seconds transition the task to “failed” with reason “input-timeout”. Absent = wait indefinitely.

§conversation_mode: ConversationMode

Whether tasks sharing a contextId accumulate conversation history across turns. Stateless (default): each task is fully independent; Threaded: history is loaded and persisted per contextId within a session.

§max_task_reopens: u32

Maximum times an on-task-end hook may reopen a single task (re-run its agent loop with injected feedback). Defaults to 1 when absent. 0 disables reopening entirely. Unlike inference.max_turns, 0 is a valid explicit value. Reopening never grants turns past inference.max_turns — the two budgets share one cumulative turn count.

§shell_grace_secs: u64

How long a shell command runs in the foreground before it is demoted to the background. Defaults to 10 seconds. A command that exits inside this window returns its output to the turn as it always has; one that outruns it hands the turn a handle, keeps running, and reports back later as a completion-origin task. 0 demotes at the first poll after the spawn, so effectively every command detaches.

§delegation_deadline_secs: u64

The single bound on a delegation, covering both waits one can have: how long a sub-capsule started by delegate-task is watched, and how long a plan capsule step waits for its answer. Defaults to 600 seconds. Absent is a ceiling rather than an absence: a capsule that never declares this one is still bounded, because an unbounded delegation leaves a wedged sub-capsule running for as long as the capsule that started it. 0 gives up at the first poll after the task is delivered, the same reading shell_grace_secs: 0 has.

Reaching the deadline ends the sub-capsule. A delegate-task caller is told in a completion-origin task carrying status: terminated and a detail naming the bound; a plan step’s call returns timed_out. The clock starts when the sub-capsule reports itself ready, not when its process is spawned, so a slow host does not spend this window on staging. MURMUR_DELEGATION_TIMEOUT_SECS overrides this value when it names a positive number of seconds.

Implementations§

Source§

impl LifecycleConfig

Source

pub fn can_receive_background_tasks(&self) -> bool

Whether a session under this lifecycle is still there to receive work that arrives after the task which started it ended — a demoted shell command’s completion, a delegation’s outcome.

queue + sleep is the only combination that qualifies, and the delegation lane and the shell lane must agree on it: a capsule warned about one and not the other would be told its lifecycle is both adequate and inadequate for the same reason.

Trait Implementations§

Source§

impl Clone for LifecycleConfig

Source§

fn clone(&self) -> LifecycleConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LifecycleConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for LifecycleConfig

Source§

fn default() -> LifecycleConfig

Returns the “default value” for a type. Read more
Source§

impl Eq for LifecycleConfig

Source§

impl PartialEq for LifecycleConfig

Source§

fn eq(&self, other: &LifecycleConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LifecycleConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more