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: ConversationModeWhether 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: u32Maximum 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: u64How 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: u64The 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
impl LifecycleConfig
Sourcepub fn can_receive_background_tasks(&self) -> bool
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.
Sourcepub fn queue_has_room(&self) -> bool
pub fn queue_has_room(&self) -> bool
Whether this lifecycle’s queue has room for a waiting task: false exactly for
task_acceptance: queue at queue_depth: 0, which the A2A door would turn into a door
refusing every task, with nowhere for background completions to wait.
The manifest refuses such a lifecycle at load
(RuntimeManifestError::QueueWithoutRoom) and staging refuses one a
--lifecycle-task-acceptance queue override produces; both ask this. queue_depth means
nothing under single or none, so any value passes there.
Sourcepub fn tasks_held_at_once(&self) -> usize
pub fn tasks_held_at_once(&self) -> usize
How many tasks a capsule under this lifecycle holds at once: one running task plus
queue_depth waiting ones under queue, a single task under single, none under none.
A queue lifecycle at queue_depth: 0 is refused at load and at staging
(Self::queue_has_room), so no running capsule has one. The A2A door is the authority
this mirrors: the task registry in capsule-runtime (TaskRegistry::can_accept) decides
what is rejected, and a test there fails if the two drift apart.
Trait Implementations§
Source§impl Clone for LifecycleConfig
impl Clone for LifecycleConfig
Source§fn clone(&self) -> LifecycleConfig
fn clone(&self) -> LifecycleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleConfig
impl Debug for LifecycleConfig
Source§impl Default for LifecycleConfig
impl Default for LifecycleConfig
Source§fn default() -> LifecycleConfig
fn default() -> LifecycleConfig
impl Eq for LifecycleConfig
Source§impl PartialEq for LifecycleConfig
impl PartialEq for LifecycleConfig
impl StructuralPartialEq for LifecycleConfig
Auto Trait Implementations§
impl Freeze for LifecycleConfig
impl RefUnwindSafe for LifecycleConfig
impl Send for LifecycleConfig
impl Sync for LifecycleConfig
impl Unpin for LifecycleConfig
impl UnsafeUnpin for LifecycleConfig
impl UnwindSafe for LifecycleConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
Source§type NoneType = T
type NoneType = T
NoneValue::null_value produces.