Repository navigation
Feat/rho usage support - #1455
matthewyjiang wants to merge 2 commits into
Conversation
Add daily, weekly, monthly, and session reporting for Rho's versioned SQLite usage ledger. Preserve provider costs, cache categories, unclassified total tokens, and session metadata while opening the ledger read-only for compatibility with a running Rho process. Include Rho in unified reports, CLI help, configuration schema, adapter references, and user documentation. Document the producer-side ledger contract needed for Rho to emit compatible accounting events.
Add a checksummed PKGBUILD for x86_64 and aarch64 that builds the native Rust CLI and installs its license. Fetch the pinned LiteLLM pricing snapshot as a package source so Cargo can build offline with frozen inputs. Disable makepkg's C/C++ LTO because it breaks the bundled AWS-LC archive; the Rust workspace release profile continues to apply fat LTO.
|
This PR was auto-closed. Only contributors approved with Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply. If a maintainer replies See CONTRIBUTING.md. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (28)
📝 WalkthroughWalkthroughAdds experimental Rho support across SQLite ingestion, cost handling, daily/weekly/monthly/session reports, unified loading, CLI commands, configuration schemas, documentation, and Arch packaging. It also adds a separate Rho usage-ledger design document. ChangesRho integration
Arch packaging
Rho ledger design
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant RhoAdapter
participant SQLite
participant Report
User->>CLI: Run ccusage rho daily
CLI->>RhoAdapter: Dispatch Rho command
RhoAdapter->>SQLite: Read usage_events
SQLite-->>RhoAdapter: Return usage events
RhoAdapter->>Report: Aggregate entries
Report-->>User: Render JSON or usage table
Possibly related PRs
Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
sorry, made this by accident. meant to do it to my fork |
|
Historical audit: this pull request was auto-closed by the legacy contributor gate. That closure did not assess technical importance. Audit result: excluded from the current maintenance scope. This change depends on an unsupported external source, unavailable schema or fixture, platform or release infrastructure the project cannot reliably maintain, an operational service, or an unsafe or underspecified design. It is not a candidate for automatic revival or implementation. |
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by cubic
Adds Rho usage support by reading its SQLite usage ledger (schema v1) for daily, weekly, monthly, and session reports, and includes Rho in unified reports. Also adds an Arch Linux
PKGBUILDto build and package the native CLI.New Features
rhoadapter reads~/.rho/usage.sqlite3(override withRHO_HOME), opens read-only.ccusage rho daily,ccusage rho weekly,ccusage rho monthly,ccusage rho session.auto(uses provider USD micros when present),calculate,display.rho.defaultsandrho.commandsoptions.PKGBUILDwith pinned LiteLLM pricing snapshot for reproducible Arch builds.Migration
docs/guide/rho/andrho-usage-ledger-instructions.md.RHO_HOMEif your database is not in~/.rho.ccusage rho dailyorccusage daily.Written for commit fa76109. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation