pub struct BackgroundSubagentRecord {Show 26 fields
pub schema_version: u32,
pub attempt_id: SubagentAttemptId,
pub agent_id: String,
pub linked_task_id: Option<TaskId>,
pub subagent_name: String,
pub namespace_id: String,
pub parent_session_id: SessionId,
pub parent_run_id: RunId,
pub child_run_id: Option<RunId>,
pub continuation_run_id: Option<RunId>,
pub profile: String,
pub owner_lease: DurableBackgroundSubagentOwnerLease,
pub execution_status: DurableBackgroundSubagentExecutionStatus,
pub result_ref: Option<DurableBackgroundSubagentResultRef>,
pub failure_category: Option<String>,
pub cancellation_reason: Option<String>,
pub delivery_status: DurableBackgroundSubagentDeliveryStatus,
pub delivery_claim: Option<DurableBackgroundSubagentDeliveryClaim>,
pub delivered_claim_id: Option<String>,
pub automatic_continuation_suppressed_by_run_id: Option<RunId>,
pub retention_status: DurableBackgroundSubagentRetentionStatus,
pub retention_expires_at: Option<DateTime<Utc>>,
pub trace_context: Option<TraceContext>,
pub accepted_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub terminal_at: Option<DateTime<Utc>>,
}Expand description
Durable service-host projection of one background attempt.
Fields§
§schema_version: u32Version of this serialized record contract.
attempt_id: SubagentAttemptIdPer-execution attempt identity.
agent_id: StringStable child conversation identity within the owning supervisor scope.
linked_task_id: Option<TaskId>Optional independently owned task-bundle identity.
subagent_name: StringConfigured subagent name.
namespace_id: StringDurable host namespace.
parent_session_id: SessionIdOwning parent session.
parent_run_id: RunIdParent run that accepted delegation.
child_run_id: Option<RunId>Child runtime run once known.
continuation_run_id: Option<RunId>Parent continuation that consumed the result, when any.
profile: StringResolved parent profile used for an automatic continuation.
owner_lease: DurableBackgroundSubagentOwnerLeaseFenced process owner for all non-terminal execution writes.
execution_status: DurableBackgroundSubagentExecutionStatusCurrent monotonic execution state.
result_ref: Option<DurableBackgroundSubagentResultRef>Terminal result reference, separate from minimal lifecycle evidence.
failure_category: Option<String>Safe failure/interruption category.
cancellation_reason: Option<String>Bounded cancellation reason.
delivery_status: DurableBackgroundSubagentDeliveryStatusLogical result-delivery state.
delivery_claim: Option<DurableBackgroundSubagentDeliveryClaim>Current bounded claim, when delivery is claimed.
delivered_claim_id: Option<String>Claim that completed logical delivery.
automatic_continuation_suppressed_by_run_id: Option<RunId>Failed or cancelled consumer that suppresses automatic continuation redelivery.
Explicit later parent runs may still claim and consume the pending result.
retention_status: DurableBackgroundSubagentRetentionStatusIndependent content-retention state.
retention_expires_at: Option<DateTime<Utc>>Policy deadline for retained inline or artifact content.
trace_context: Option<TraceContext>Parent trace correlation copied at acceptance.
accepted_at: DateTime<Utc>Acceptance time.
updated_at: DateTime<Utc>Last durable transition time.
terminal_at: Option<DateTime<Utc>>Immutable terminal transition time.
Implementations§
Source§impl BackgroundSubagentRecord
impl BackgroundSubagentRecord
Sourcepub fn is_valid_acceptance(&self) -> bool
pub fn is_valid_acceptance(&self) -> bool
Return whether this record is a canonical acceptance projection.
Sourcepub fn is_valid_terminal(&self) -> bool
pub fn is_valid_terminal(&self) -> bool
Return whether this record is a canonical immutable terminal projection.
Sourcepub fn delivery_claimable_at(&self, now: DateTime<Utc>) -> bool
pub fn delivery_claimable_at(&self, now: DateTime<Utc>) -> bool
Return whether a claim may be acquired at now.
Sourcepub fn continuation_outcome(&self, artifact_content: Option<&str>) -> String
pub fn continuation_outcome(&self, artifact_content: Option<&str>) -> String
Resolve the canonical model-visible outcome for a continuation.
Sourcepub fn continuation_text(&self, artifact_content: Option<&str>) -> String
pub fn continuation_text(&self, artifact_content: Option<&str>) -> String
Build the canonical model-visible continuation text.
Sourcepub fn continuation_input(
&self,
artifact_content: Option<&str>,
) -> Vec<InputPart>
pub fn continuation_input( &self, artifact_content: Option<&str>, ) -> Vec<InputPart>
Build the exact durable input accepted for a result-triggered continuation.
Sourcepub fn validates_continuation_run(&self, run: &RunRecord) -> bool
pub fn validates_continuation_run(&self, run: &RunRecord) -> bool
Validate immutable causal fields on a proposed result-triggered continuation.
Sourcepub fn validates_continuation_cause_envelope(
&self,
cause: &BackgroundSubagentContinuationCause,
run: &RunRecord,
) -> bool
pub fn validates_continuation_cause_envelope( &self, cause: &BackgroundSubagentContinuationCause, run: &RunRecord, ) -> bool
Validate the typed causal envelope and its submitted input digest.
Sourcepub fn validates_continuation_cause(
&self,
cause: &BackgroundSubagentContinuationCause,
run: &RunRecord,
artifact_content: Option<&str>,
) -> bool
pub fn validates_continuation_cause( &self, cause: &BackgroundSubagentContinuationCause, run: &RunRecord, artifact_content: Option<&str>, ) -> bool
Validate a typed cause and exact canonical input against this durable result.
Trait Implementations§
Source§impl Clone for BackgroundSubagentRecord
impl Clone for BackgroundSubagentRecord
Source§fn clone(&self) -> BackgroundSubagentRecord
fn clone(&self) -> BackgroundSubagentRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more