pub struct RecallSessionTool { /* private fields */ }Expand description
ToolExecutor for the recall_session tool (#2348).
Why: gives the model an explicit way to query ITS OWN durable session
history rather than relying on whatever still fits in its visible
context window.
What: holds the (session-scoped) identifiers needed to issue a
memory_recall call against the right daemon/palace and filter to the
right session — all three are resolved once, at construction, by the
caller (task::executor::run_and_record, reusing
session::TurnMemorySink::socket/palace rather than re-deriving
them).
Test: tests::*.
Implementations§
Trait Implementations§
Source§impl ToolExecutor for RecallSessionTool
impl ToolExecutor for RecallSessionTool
Source§fn schema(&self) -> Value
fn schema(&self) -> Value
JSON schema for recall_session.
Why: the description explicitly scopes the tool to THIS session’s own
history so the model does not mistake it for a general/cross-session
or cross-project search.
Test: tests::schema_has_required_fields.
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = ToolResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a session-scoped recall query, fail-open on any daemon or parsing failure.
Why: an explicit model tool call must never derail the agent loop —
a ToolResult::err/fatal here would surface as a tool error the
model might retry-loop on; “session memory unavailable” as a
SUCCESSFUL result lets the model simply proceed without it.
Test: tests::execute_returns_only_session_tagged_results,
tests::execute_over_fetches_top_k_times_factor,
tests::execute_is_fail_open_on_unreachable_daemon,
tests::execute_rejects_malformed_args_recoverably.
Source§fn restricted_tiers(&self) -> &[ServiceTier]
fn restricted_tiers(&self) -> &[ServiceTier]
Auto Trait Implementations§
impl Freeze for RecallSessionTool
impl RefUnwindSafe for RecallSessionTool
impl Send for RecallSessionTool
impl Sync for RecallSessionTool
impl Unpin for RecallSessionTool
impl UnsafeUnpin for RecallSessionTool
impl UnwindSafe for RecallSessionTool
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