pub struct ThinkingLogStore { /* private fields */ }Expand description
Manages thinking logs per agent, backed by JSONL files on disk.
Implementations§
Source§impl ThinkingLogStore
impl ThinkingLogStore
pub fn new() -> Self
Sourcepub async fn append(&self, entry: ThinkingLogEntry) -> Result<(), String>
pub async fn append(&self, entry: ThinkingLogEntry) -> Result<(), String>
Append a thinking log entry. Writes to disk (JSONL) and updates the in-memory cache.
Sourcepub async fn get_logs(
&self,
agent_id: &str,
limit: usize,
offset: usize,
) -> ThinkingLogPage
pub async fn get_logs( &self, agent_id: &str, limit: usize, offset: usize, ) -> ThinkingLogPage
Get paginated thinking logs for an agent (newest first).
Sourcepub async fn get_detail(
&self,
agent_id: &str,
index: usize,
) -> Option<ThinkingLogEntry>
pub async fn get_detail( &self, agent_id: &str, index: usize, ) -> Option<ThinkingLogEntry>
Get a single log entry by agent_id and index (0 = newest).
Sourcepub async fn search(
&self,
agent_id: &str,
query: &str,
limit: usize,
status_filter: Option<&ThinkingLogStatus>,
) -> Vec<ThinkingLogEntry>
pub async fn search( &self, agent_id: &str, query: &str, limit: usize, status_filter: Option<&ThinkingLogStatus>, ) -> Vec<ThinkingLogEntry>
Search thinking logs for an agent by a text query. Searches in market_summary, claude_reasoning, and decision.action.
Sourcepub async fn get_all_entries(&self, agent_id: &str) -> Vec<ThinkingLogEntry>
pub async fn get_all_entries(&self, agent_id: &str) -> Vec<ThinkingLogEntry>
Get all entries for an agent (loading from disk if needed). Returns entries in chronological order (oldest first).
Sourcepub async fn get_cached_agent_ids(&self) -> Vec<String>
pub async fn get_cached_agent_ids(&self) -> Vec<String>
Get all known agent IDs from the cache. Note: only returns IDs for agents that have been loaded into cache.
Sourcepub async fn filter_by_status(
&self,
agent_id: &str,
status: &ThinkingLogStatus,
limit: usize,
offset: usize,
) -> ThinkingLogPage
pub async fn filter_by_status( &self, agent_id: &str, status: &ThinkingLogStatus, limit: usize, offset: usize, ) -> ThinkingLogPage
Filter logs by status.
Auto Trait Implementations§
impl !Freeze for ThinkingLogStore
impl !RefUnwindSafe for ThinkingLogStore
impl Send for ThinkingLogStore
impl Sync for ThinkingLogStore
impl Unpin for ThinkingLogStore
impl UnsafeUnpin for ThinkingLogStore
impl !UnwindSafe for ThinkingLogStore
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
Mutably borrows from an owned value. Read more