pub struct TaskOrchestrator {
pub current_model_state: Arc<Mutex<ModelLifecycle>>,
pub current_model_id: Arc<Mutex<Option<u64>>>,
pub resident_memory_bytes: Arc<AtomicU64>,
pub scrubbing_lock: Arc<AtomicBool>,
pub mlock_enabled: Arc<AtomicBool>,
/* private fields */
}Fields§
§current_model_state: Arc<Mutex<ModelLifecycle>>§current_model_id: Arc<Mutex<Option<u64>>>§resident_memory_bytes: Arc<AtomicU64>§scrubbing_lock: Arc<AtomicBool>§mlock_enabled: Arc<AtomicBool>Implementations§
Source§impl TaskOrchestrator
impl TaskOrchestrator
Sourcepub fn new(thermal_governor: Box<dyn ThermalGovernor>) -> Self
pub fn new(thermal_governor: Box<dyn ThermalGovernor>) -> Self
Orchestrator driven by thermal_governor.
Sourcepub fn thermal_state_label(&self) -> &'static str
pub fn thermal_state_label(&self) -> &'static str
Human-readable label for the current thermal state.
Sourcepub fn resident_model_id(&self) -> Option<u64>
pub fn resident_model_id(&self) -> Option<u64>
Currently resident model id, if any.
Sourcepub fn resident_memory_bytes(&self) -> u64
pub fn resident_memory_bytes(&self) -> u64
Bytes held by the resident model.
Sourcepub fn register_resident_model(&self, model_id: u64, bytes: u64)
pub fn register_resident_model(&self, model_id: u64, bytes: u64)
Record model_id/bytes as resident (ledger only — the
caller owns actual loading).
Sourcepub fn load_model(
&self,
agent: &LocalLlmAgent,
model_id: u64,
) -> Result<(), &'static str>
pub fn load_model( &self, agent: &LocalLlmAgent, model_id: u64, ) -> Result<(), &'static str>
Load model_id through agent when not already resident;
evicts the current model first if needed.
Sourcepub fn evict_model(&self, model_id: u64)
pub fn evict_model(&self, model_id: u64)
Evict model_id from the residency ledger.
Sourcepub fn orchestrate_inference(
&self,
agent: &dyn AgentRuntime,
prompt: &str,
graph_context: &str,
intent: AgentIntent,
suspended: Option<&mut SuspendedTransactionQueue>,
) -> OrchestrationResult
pub fn orchestrate_inference( &self, agent: &dyn AgentRuntime, prompt: &str, graph_context: &str, intent: AgentIntent, suspended: Option<&mut SuspendedTransactionQueue>, ) -> OrchestrationResult
Runs a full, Webizen-gated inference cycle for a registered LLM sub-agent.
This is the citation-presence gate (no grounding resolver). For the deeper
gate that verifies the claim is supported by its cited facts, use
Self::orchestrate_inference_grounded.
Sourcepub fn orchestrate_inference_grounded(
&self,
agent: &dyn AgentRuntime,
prompt: &str,
graph_context: &str,
intent: AgentIntent,
suspended: Option<&mut SuspendedTransactionQueue>,
resolver: &dyn GroundingResolver,
thresholds: GroundingThresholds,
) -> OrchestrationResult
pub fn orchestrate_inference_grounded( &self, agent: &dyn AgentRuntime, prompt: &str, graph_context: &str, intent: AgentIntent, suspended: Option<&mut SuspendedTransactionQueue>, resolver: &dyn GroundingResolver, thresholds: GroundingThresholds, ) -> OrchestrationResult
Like Self::orchestrate_inference, but adds the KG↔LLM grounding gate to
the post-flight: the model’s structured claim is graded against its resolved
cited facts. A weakly-grounded claim is routed to human review (blocked, not
committed); an ungrounded one is blocked outright. Both happen before the
WAL commit, so an unsupported claim never reaches the graph.
Auto Trait Implementations§
impl !RefUnwindSafe for TaskOrchestrator
impl !UnwindSafe for TaskOrchestrator
impl Freeze for TaskOrchestrator
impl Send for TaskOrchestrator
impl Sync for TaskOrchestrator
impl Unpin for TaskOrchestrator
impl UnsafeUnpin for TaskOrchestrator
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more