pub struct ExtensionKnowledge { /* private fields */ }Expand description
Retrieval performed by a design-extension tool named in the agent’s binding.
Implementations§
Source§impl ExtensionKnowledge
impl ExtensionKnowledge
pub fn new( ext: Arc<ExtensionRuntime>, inner: Option<Arc<dyn Knowledge>>, ) -> ExtensionKnowledge
Trait Implementations§
Source§impl Knowledge for ExtensionKnowledge
impl Knowledge for ExtensionKnowledge
Source§fn ingest<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
chunks: Vec<KnowledgeChunk>,
) -> Pin<Box<dyn Future<Output = Result<IngestOutcome, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExtensionKnowledge: 'async_trait,
fn ingest<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
chunks: Vec<KnowledgeChunk>,
) -> Pin<Box<dyn Future<Output = Result<IngestOutcome, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExtensionKnowledge: 'async_trait,
A no-op for the extension path: the corpus belongs to the customer’s own service and this runtime has nothing to write it to.
Success rather than an error, deliberately — a pack that happens to carry a corpus (an operator who bound documents and then switched provider, say) must not fail boot ingestion over a corpus the retrieval side simply will not read.
A wrapped inner backend still receives it, so a Chronicle mount under this one keeps ingesting exactly as before.
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
query: KnowledgeQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievedChunk>, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExtensionKnowledge: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
query: KnowledgeQuery,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievedChunk>, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
ExtensionKnowledge: 'async_trait,
Retrieval with no binding in hand cannot know which extension to invoke,
so it can only be the wrapped backend’s — or nothing. The agentic loop
always goes through Self::search_bound.
Source§fn wrapped_backend(&self) -> Option<Arc<dyn Knowledge>>
fn wrapped_backend(&self) -> Option<Arc<dyn Knowledge>>
attach is unconditional, so AgentRuntime::has_knowledge() is true on
every path that mounts this adapter — whether or not a corpus backend was
mounted underneath it. That makes has_knowledge() unable to answer “did
the corpus mount run”, which is exactly the question the in-process
dw.agent regression guard exists to ask. This answers it instead.
Source§fn search_bound<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
query: KnowledgeQuery,
binding: Option<&'life2 MemoryProviderRef>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievedChunk>, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ExtensionKnowledge: 'async_trait,
fn search_bound<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantCtx,
query: KnowledgeQuery,
binding: Option<&'life2 MemoryProviderRef>,
) -> Pin<Box<dyn Future<Output = Result<Vec<RetrievedChunk>, KnowledgeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
ExtensionKnowledge: 'async_trait,
Source§fn backend_id(&self) -> &'static str
fn backend_id(&self) -> &'static str
Auto Trait Implementations§
impl !RefUnwindSafe for ExtensionKnowledge
impl !UnwindSafe for ExtensionKnowledge
impl Freeze for ExtensionKnowledge
impl Send for ExtensionKnowledge
impl Sync for ExtensionKnowledge
impl Unpin for ExtensionKnowledge
impl UnsafeUnpin for ExtensionKnowledge
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request