pub struct CortexRunTool {
pub pool: Arc<Mutex<Pool>>,
pub event_log: PathBuf,
}Expand description
cortex_run MCP tool handler.
Builds an auditable context pack from the live store, dispatches the task
through the resolved LLM adapter, and persists the AgentResponse event to
the JSONL ledger and SQLite mirror using the local-development unsigned
path (ADR 0026 §2, same policy as cortex run default).
When the composed policy rejects or quarantines the run (e.g.
RemoteUnsigned mode without operator break-glass), the ledger write is
skipped and session_indexed is false.
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 written on each successful run.