pub struct RecallEchoLlmClient { /* private fields */ }Expand description
A deterministic, scripted InferenceAdapter exercising the PM calling
recall_session (DOC-39 Slice C’s e2e proof).
Why: EchoLlmClient and FanoutEchoLlmClient’s scripts never call
recall_session, so neither can drive the wire proof that a HELD-BACK
recall result’s actual TEXT (not just its score) reaches
Event::MemoryRecalled. This script has the PM call recall_session
exactly once, then stop — tests/recall_content_e2e.rs pairs it with a
mock trusty-memory backend (TRUSTY_MEMORY_SOCKET override) that returns one
huge, high-scored result and one small, lower-scored result so the tool’s
own token budget drops the second one whole (mirroring
tools::recall_session’s own budget tests) — the held-back case this
slice must prove survives onto the wire.
What: an atomic cursor over a fixed 2-response script:
- PM calls
recall_session(query="pkce oauth flow"). - PM stops with final text.
Running past the script’s end returns an InferenceError rather than panicking.
Test: task::mock_llm::tests::recall_script_drives_a_single_recall_call;
exercised end-to-end (as a real subprocess) by
tests/recall_content_e2e.rs.
Implementations§
Trait Implementations§
Source§impl Default for RecallEchoLlmClient
impl Default for RecallEchoLlmClient
Source§impl InferenceAdapter for RecallEchoLlmClient
impl InferenceAdapter for RecallEchoLlmClient
Source§fn capabilities(&self) -> &ProviderCapabilities
fn capabilities(&self) -> &ProviderCapabilities
Source§fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, InferenceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn chat<'life0, 'life1, 'async_trait>(
&'life0 self,
_req: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, InferenceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn capabilities_for(&self, model: &str) -> &ProviderCapabilities
fn capabilities_for(&self, model: &str) -> &ProviderCapabilities
model. Read moreSource§fn chat_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatStreamEvent, InferenceError>> + Send>>, InferenceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn chat_stream<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<ChatStreamEvent, InferenceError>> + Send>>, InferenceError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Source§fn map_tool_choice(&self, choice: ToolChoice) -> Value
fn map_tool_choice(&self, choice: ToolChoice) -> Value
ToolChoice into this provider’s wire JSON. Read moreSource§fn supports_native_tools(&self) -> bool
fn supports_native_tools(&self) -> bool
Source§fn supports_prompt_caching(&self) -> bool
fn supports_prompt_caching(&self) -> bool
Source§fn supports_structured_output(&self) -> bool
fn supports_structured_output(&self) -> bool
Source§fn ensure_structured_output_supported(
&self,
request: &ChatRequest,
) -> Result<(), InferenceError>
fn ensure_structured_output_supported( &self, request: &ChatRequest, ) -> Result<(), InferenceError>
Source§fn wants_detailed_usage(&self) -> bool
fn wants_detailed_usage(&self) -> bool
usage: {"include": true} directive). Read moreAuto Trait Implementations§
impl !Freeze for RecallEchoLlmClient
impl RefUnwindSafe for RecallEchoLlmClient
impl Send for RecallEchoLlmClient
impl Sync for RecallEchoLlmClient
impl Unpin for RecallEchoLlmClient
impl UnsafeUnpin for RecallEchoLlmClient
impl UnwindSafe for RecallEchoLlmClient
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> 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