pub struct CortexSessionCloseTool {
pub pool: Arc<Mutex<Pool>>,
pub event_log: PathBuf,
pub fixtures_dir: PathBuf,
pub max_events_bytes: usize,
}Expand description
cortex_session_close tool handler.
Calls cortex_session::close_from_bytes after enforcing the hard size
cap (RT-5). Returns pending_commit — the count of memories now in
pending_mcp_commit state — rather than an activated count (ADR 0047).
rusqlite::Connection is Send but not Sync; the Mutex provides the
Sync bound required by ToolHandler while keeping the connection
single-threaded at the call site (the stdio loop is single-threaded).
Fields§
§pool: Arc<Mutex<Pool>>SQLite connection guarded by a mutex so the struct satisfies Sync.
event_log: PathBufPath to the JSONL event-log file.
fixtures_dir: PathBufPath to the LLM replay-adapter fixtures directory.
max_events_bytes: usizeMaximum accepted byte length for events_json. Defaults to
DEFAULT_MAX_EVENTS_BYTES.
Implementations§
Trait Implementations§
Source§impl Debug for CortexSessionCloseTool
impl Debug for CortexSessionCloseTool
Source§impl ToolHandler for CortexSessionCloseTool
impl ToolHandler for CortexSessionCloseTool
Auto Trait Implementations§
impl Freeze for CortexSessionCloseTool
impl RefUnwindSafe for CortexSessionCloseTool
impl Send for CortexSessionCloseTool
impl Sync for CortexSessionCloseTool
impl Unpin for CortexSessionCloseTool
impl UnsafeUnpin for CortexSessionCloseTool
impl UnwindSafe for CortexSessionCloseTool
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