pub enum InitializeDecision {
Allow,
PopulateSamplingSteward,
RejectMissingSamplingCapability,
}Expand description
v0.9.0 P2: outcome of inspecting the tenant’s [llm] config + the
peer’s sampling capability at MCP initialize time.
Separating the decision from the actual slot write makes the
gating logic unit-testable without needing a real
rmcp::Peer<RoleServer> (whose constructors are private).
SoloMcpServer::initialize performs the match and routes to the
side-effect path; tests pin the table directly.
Variants§
Allow
Tenant’s LLM backend doesn’t require an MCP peer; the slot was
populated eagerly at registry-open time (or stays None for
LlmConfig::None). MCP initialize succeeds without writing the
slot.
PopulateSamplingSteward
Tenant’s LLM backend is mcp_sampling AND the peer advertised
the sampling capability. populate_sampling_steward writes a
peer-bound Steward into the slot.
RejectMissingSamplingCapability
Tenant’s LLM backend is mcp_sampling but the peer did NOT
advertise the sampling capability. MCP initialize must refuse
with the locked BLOCKER 2 error message.
Trait Implementations§
Source§impl Clone for InitializeDecision
impl Clone for InitializeDecision
Source§fn clone(&self) -> InitializeDecision
fn clone(&self) -> InitializeDecision
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 InitializeDecision
impl Debug for InitializeDecision
Source§impl PartialEq for InitializeDecision
impl PartialEq for InitializeDecision
Source§fn eq(&self, other: &InitializeDecision) -> bool
fn eq(&self, other: &InitializeDecision) -> bool
self and other values to be equal, and is used by ==.impl Copy for InitializeDecision
impl Eq for InitializeDecision
impl StructuralPartialEq for InitializeDecision
Auto Trait Implementations§
impl Freeze for InitializeDecision
impl RefUnwindSafe for InitializeDecision
impl Send for InitializeDecision
impl Sync for InitializeDecision
impl Unpin for InitializeDecision
impl UnsafeUnpin for InitializeDecision
impl UnwindSafe for InitializeDecision
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§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 more