MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / open_read_only

Function open_read_only

src/sessions/hermes.rs:307–314  ·  view source on GitHub ↗

Opens a Hermes `state.db` strictly read-only so the sweep can never write to (or create) another agent's live store.

(path: &Path)

Source from the content-addressed store, hash-verified

305/// Opens a Hermes `state.db` strictly read-only so the sweep can never write
306/// to (or create) another agent's live store.
307async fn open_read_only(path: &Path) -> Option<libsql::Connection> {
308 let db = libsql::Builder::new_local(path)
309 .flags(libsql::OpenFlags::SQLITE_OPEN_READ_ONLY)
310 .build()
311 .await
312 .ok()?;
313 db.connect().ok()
314}
315
316fn map_row(rowid: i64, row: &libsql::Row) -> Option<HermesRow> {
317 Some(HermesRow {

Calls 2

buildMethod · 0.80
connectMethod · 0.45