pub struct OrchestrationRuntime { /* private fields */ }Expand description
Session-scoped runtime enforcement shared by every subagent tool path.
Implementations§
Source§impl OrchestrationRuntime
impl OrchestrationRuntime
Sourcepub fn trusted_catalog(
foreground: &QualifiedModelId,
_manifest_references: impl IntoIterator<Item = QualifiedModelId>,
) -> Result<CatalogSnapshot, &'static str>
pub fn trusted_catalog( foreground: &QualifiedModelId, _manifest_references: impl IntoIterator<Item = QualifiedModelId>, ) -> Result<CatalogSnapshot, &'static str>
Build a snapshot exclusively from runtime-owned routing/catalog descriptors.
manifest_references are deliberately ignored here: manifests may narrow the
snapshot, but can never create catalog membership. The foreground is admitted
only after the credential-free runtime router resolves its exact identity.
Sourcepub fn baseline(
foreground: QualifiedModelId,
concurrent: usize,
total: usize,
) -> Result<Self, &'static str>
pub fn baseline( foreground: QualifiedModelId, concurrent: usize, total: usize, ) -> Result<Self, &'static str>
Secure manifestless baseline: the exact foreground identity is the only worker choice in a deterministic runtime-controlled catalog.
pub fn new(policy: DelegationPolicy) -> Self
pub fn with_tree_budget( self, budget: DelegationTreeBudget, ) -> Result<Self, &'static str>
Sourcepub fn reserve_delegation(
&self,
worker_id: &str,
parent: Option<&str>,
) -> Result<u16, DelegationTreeDenied>
pub fn reserve_delegation( &self, worker_id: &str, parent: Option<&str>, ) -> Result<u16, DelegationTreeDenied>
Reserve one tree edge before allocating channels/threads/provider
runtimes. parent=None is a foreground-root child. Every denial is
fail-closed and leaves the counters unchanged.
Sourcepub fn release_delegation(&self, worker_id: &str, _parent: Option<&str>)
pub fn release_delegation(&self, worker_id: &str, _parent: Option<&str>)
Release one reserved tree edge. Descendants are recursively removed
because a live child cannot outlive its parent lineage. The caller-
supplied parent is intentionally ignored: ownership is taken from the
reservation recorded under the tree lock, so a stale or hostile caller
cannot decrement another parent’s fanout.
pub fn delegation_descendants(&self) -> usize
pub fn preflight(&self, model: &str) -> Result<(), String>
Sourcepub fn grant_worker_model(&self, model: &str) -> Result<(), String>
pub fn grant_worker_model(&self, model: &str) -> Result<(), String>
Honors an explicit mid-session user trust grant for one exact worker model. Trusted models were never meant to be pinned at session start: the live policy and catalog are extended in place while worker lifecycle state and concurrency limits are preserved. The grant takes effect for the next dispatch decision.
Sourcepub fn ultracode_readiness(&self, model: &str) -> Result<(usize, usize), String>
pub fn ultracode_readiness(&self, model: &str) -> Result<(usize, usize), String>
Read-only UltraCode authorization snapshot. The exact foreground identity, policy authorization, and configured limits are checked under one lock; no worker reservation or lifecycle state is created.
Single parse/resolve/catalog/policy/limits decision point used by every public spawn path. No credential or provider object is reachable here.
Sourcepub fn mark_starting(&self, runtime_handle: &str) -> Result<(), String>
pub fn mark_starting(&self, runtime_handle: &str) -> Result<(), String>
Marks the persisted handle Starting immediately before the runtime/thread
factory is invoked. Starting remains rollback-safe until mark_running.
pub fn mark_running(&self, runtime_handle: &str) -> Result<(), String>
pub fn rollback(&self, runtime_handle: &str)
pub fn effective_choices(&self) -> Vec<String>
pub fn foreground_model(&self) -> String
pub fn poll(&self, id: &str, fingerprint: &str) -> Result<(), String>
pub fn steer(&self, id: &str) -> Result<(), String>
pub fn terminal_and_collect( &self, id: &str, terminal: WorkerTerminal, ) -> Result<(), String>
pub fn finish_one_shot( &self, id: &str, terminal: WorkerTerminal, ) -> Result<(), String>
pub fn reconcile(&self, id: &str) -> Result<(), String>
Sourcepub fn retire_reconciled(&self, removed_handles: &HashSet<String>)
pub fn retire_reconciled(&self, removed_handles: &HashSet<String>)
Reaper handoff: use exact IDs removed under the runtime registry lock, never a complement snapshot that could include newly registered workers.
Sourcepub fn unreconciled_runtime_handles(&self) -> HashSet<String>
pub fn unreconciled_runtime_handles(&self) -> HashSet<String>
Snapshot runtime handle IDs still named by the completion gate. Taking this snapshot before locking the subagent registry avoids cross-registry lock order.
Sourcepub fn is_unreconciled(&self, runtime_handle: &str) -> bool
pub fn is_unreconciled(&self, runtime_handle: &str) -> bool
Whether a runtime handle is still named by the policy completion gate.
pub fn completion_gate(&self) -> CompletionGate
pub fn check_foreground_write(&self, path: &str) -> ScopeDecision
pub fn telemetry_json(&self) -> String
pub fn enforcement_mode(&self) -> EnforcementMode
Auto Trait Implementations§
impl !Freeze for OrchestrationRuntime
impl RefUnwindSafe for OrchestrationRuntime
impl Send for OrchestrationRuntime
impl Sync for OrchestrationRuntime
impl Unpin for OrchestrationRuntime
impl UnsafeUnpin for OrchestrationRuntime
impl UnwindSafe for OrchestrationRuntime
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.