Skip to content

Add embedded replica and sync mode #75

@onsails

Description

@onsails

Context

Future work from docs/superpowers/specs/2026-05-24-local-libsql-migration-design.md.

The local libsql migration and Turso cloud configuration model are prerequisites. This issue should build on the right-db driver boundary instead of introducing driver-specific APIs in domain crates.

Scope

  • Add an embedded replica mode using local reads and remote-backed sync semantics.
  • Define explicit sync triggers and startup behavior.
  • Preserve local-only mode as the default for existing agents.
  • Document consistency expectations, including read-your-writes behavior if enabled.

Acceptance Criteria

  • Existing agents keep working without cloud configuration.
  • Replica mode is configured through the approved storage config model.
  • Sync errors surface through structured errors/logs rather than being swallowed.
  • Tests cover local-only mode and replica-mode connection construction.

Out Of Scope

  • Backup/restore UX.
  • Doctor sync health thresholds.
  • Migration tooling from local-only data to cloud primary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions