oxide-mirror 0.3.0

Local, event-sourced data mirror for Rust Oxide. Pulls deltas from API sources, resolves conflicts with pluggable strategies, persists everything to SQLite, and exposes a SQL query interface for agent cross-service reasoning.
Documentation

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-only Delta log shape that every sync source emits. Each delta carries an explicit Provenance (source id + confidence) so callers can reason about who wrote what.
  • [source] — the SyncSource trait that oxide-gen generated 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] — MirrorStore owns the SQLite pool, the schema migrations, the event log, the materialised MirroredRecord table, and the per-source cursor table. Exposes [MirrorStore::query] for read-only SQL.
  • [sync] — Syncer ties the previous two together, pulling deltas from a SyncSource, applying them through a ConflictStrategy, 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.