Opens a Hermes `state.db` strictly read-only so the sweep can never write to (or create) another agent's live store.
(path: &Path)
| 305 | /// Opens a Hermes `state.db` strictly read-only so the sweep can never write |
| 306 | /// to (or create) another agent's live store. |
| 307 | async 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 | |
| 316 | fn map_row(rowid: i64, row: &libsql::Row) -> Option<HermesRow> { |
| 317 | Some(HermesRow { |