oxide-mirror — Local, Event-Sourced Data Mirror
oxide-mirror keeps a SQLite-backed local copy of remote API data so AI
agents can run complex SQL queries (joins, aggregations, time-window
filters) across many services without paying the latency or rate-limit
cost of going over the wire every time.
The crate is organised around four cooperating pieces:
- [
event] — the durable, append-onlyDeltalog shape that every sync source emits. Each delta carries an explicitProvenance(source id + confidence) so callers can reason about who wrote what. - [
source] — theSyncSourcetrait thatoxide-gengenerated clients implement. A source knows how to pull a batch of deltas starting from a cursor and to advance the cursor when the batch has been applied. - [
store] —MirrorStoreowns the SQLite pool, the schema migrations, the event log, the materialisedMirroredRecordtable, and the per-source cursor table. Exposes [MirrorStore::query] for read-only SQL. - [
sync] —Syncerties the previous two together, pulling deltas from aSyncSource, applying them through aConflictStrategy, and persisting the new cursor.
[kernel::MirrorModule] wires everything into the oxide-k kernel so
sync runs and queries can be triggered via the kernel message bus.