Skip to content

epic: ClawMetry OSS → Cloud refactor — pluggable DataProvider + extension system #49

@vivekchand

Description

@vivekchand

Epic: ClawMetry Architecture Refactor

Goal: Decouple OSS and Cloud so they can evolve independently without breaking each other. Currently if CLOUD_MODE: conditionals are scattered through a 20k-line single file — every OSS change risks Cloud, every Cloud feature pollutes OSS.

The Plan

Core insight: Extract data retrieval into a ClawMetryDataProvider ABC. OSS implements it with local file reads. Cloud implements it with Turso/Firestore. Routes never touch files or DBs directly.

Flask Routes
    ↓
ClawMetryDataProvider (ABC)
    ↓                    ↓
LocalDataProvider    TursoDataProvider
(reads ~/.openclaw)  (reads Turso/Firestore)

Phases

Golden Rule

Every PR in every phase must leave clawmetry --host 0.0.0.0 --port 8900 working.

After completion

  • OSS changes: open PRs to this repo, merged, released to PyPI
  • Cloud changes: open PRs to private clawmetry-cloud repo, deployed to Cloud Run
  • Zero cross-contamination between the two

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions