pub struct ExtensionRuntimeManager { /* private fields */ }Expand description
Session-scoped exact extension runtime lease manager. See module docs.
Implementations§
Source§impl ExtensionRuntimeManager
impl ExtensionRuntimeManager
Sourcepub fn resolve_context_provider(
&self,
requested: Option<&ContextProviderId>,
) -> Result<RegisteredContextProviderDescriptor, ContextProviderLookupError>
pub fn resolve_context_provider( &self, requested: Option<&ContextProviderId>, ) -> Result<RegisteredContextProviderDescriptor, ContextProviderLookupError>
Task A6: resolve one memory-context provider request against the
published catalog of loaded extensions’ declared context providers.
PURE CATALOG READ — never spawns a process, never touches lease
state (consistent with “discovery/status spawn zero processes”).
Exact-scope, fail-closed matching per
resolve_context_provider: Ok only when exactly one loaded
declaration matches; zero matches fail NotRegistered and
overlapping declarations fail Ambiguous. Returns an owned clone
of the dormant descriptor (bounded metadata only).
Sourcepub fn bind_host_scope(&self, session: SessionId)
pub fn bind_host_scope(&self, session: SessionId)
Bind the host-scope session identity used by handler-based acquisition (first binder wins; the engine binds the Runtime’s durable tool session at boot so Mixed extensions share one child).
Sourcepub fn host_scope(&self) -> SessionId
pub fn host_scope(&self) -> SessionId
The host-scope session identity (bound, or the private fallback).
Sourcepub fn lease_count(&self) -> usize
pub fn lease_count(&self) -> usize
Number of live (Ready or Starting) leases.
Sourcepub fn revoke_plugin_lease(&self, session: &SessionId, plugin: &str)
pub fn revoke_plugin_lease(&self, session: &SessionId, plugin: &str)
Terminate one session’s runtime lease for one PLUGIN (the lease unit: one child shared by that session’s exact tools of the plugin).
Sourcepub fn revoke_exact_tool(
&self,
session: &SessionId,
plugin: &str,
tool_name: &str,
)
pub fn revoke_exact_tool( &self, session: &SessionId, plugin: &str, tool_name: &str, )
Revoke one EXACT tool grant’s runtime backing. Grant revocation itself is gate-level; at the runtime layer the lease unit is the plugin child, so this conservatively terminates the shared lease.
Sourcepub fn revoke_plugin_all_sessions(&self, plugin: &str) -> usize
pub fn revoke_plugin_all_sessions(&self, plugin: &str) -> usize
Terminate every session’s lease for one plugin (manager unload/ reload path). Returns how many were terminated.
Sourcepub fn terminate_session(&self, session: &SessionId) -> usize
pub fn terminate_session(&self, session: &SessionId) -> usize
Terminate every lease held by one session. Returns how many.
Sourcepub fn terminate_all(&self)
pub fn terminate_all(&self)
Terminate every lease (runtime shutdown).
Sourcepub fn reap_idle(&self)
pub fn reap_idle(&self)
Reap Ready leases idle past the configured bound. Work per pass is
bounded by REAP_SCAN_MAX examined keys.
Sourcepub async fn call_exact(
&self,
session: &SessionId,
plugin: &str,
tool_name: &str,
expected_digest: &SchemaDigest,
params: Value,
) -> Result<Value, ExtensionLeaseError>
pub async fn call_exact( &self, session: &SessionId, plugin: &str, tool_name: &str, expected_digest: &SchemaDigest, params: Value, ) -> Result<Value, ExtensionLeaseError>
Execute one EXACT already-gate-authorized extension tool call. See module docs for the lease/single-flight/validation contract.
Trait Implementations§
Source§impl Debug for ExtensionRuntimeManager
impl Debug for ExtensionRuntimeManager
Source§impl Drop for ExtensionRuntimeManager
impl Drop for ExtensionRuntimeManager
Auto Trait Implementations§
impl !Freeze for ExtensionRuntimeManager
impl RefUnwindSafe for ExtensionRuntimeManager
impl Send for ExtensionRuntimeManager
impl Sync for ExtensionRuntimeManager
impl Unpin for ExtensionRuntimeManager
impl UnsafeUnpin for ExtensionRuntimeManager
impl UnwindSafe for ExtensionRuntimeManager
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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 more