feat: Add Crush provider support and message-count model insights#6
Open
aaditagrawal wants to merge 10 commits into
Open
feat: Add Crush provider support and message-count model insights#6aaditagrawal wants to merge 10 commits into
aaditagrawal wants to merge 10 commits into
Conversation
Resolves merge conflicts to include both Pi Coding Agent and Crush provider support. Removes accidentally committed .crush database files and adds .crush/ to .gitignore. Fixes type errors in crush.ts for Node.js Dirent compatibility.
Author
|
Unrelated, but the Kilo CLI adapter can be supported the same way OpenCode is, since it's just a fork of OpenCode. |
Merge 15 upstream commits (Amp, Gemini CLI, output suffixes, config fixes, concurrency bump) and add Google Antigravity provider support.
- cli.ts: build no-data message dynamically from providerIds - graph.ts: shorten combined header title to "All Providers" - codex.ts: use trimmed CODEX_HOME when resolving path - amp.ts: log warning instead of silently swallowing read errors - antigravity.ts: treat non-lock state DB errors as warnings - cursor.ts: wrap availability probe in try/catch for fail-soft - crush.ts: use full getCrushDatabasePaths() for availability check - gemini.ts: deduplicate on normalized model name and token totals - READMEs: document --amp, --antigravity flags and data locations - output-path.test.ts: add antigravity suffix test - cli.test.ts: isolate per-test HOME with mkdtempSync and XDG vars
- cli.ts: update --help default output path to reflect suffix behavior - cli.ts: remove dead-end retry advice from no-data error message - README.md: document SLOPMETER_MAX_JSONL_RECORD_BYTES applies to Gemini - README.md: add Amp data location entry
Merge upstream + add Antigravity provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Charm’s Crush to
slopmeter.This wires Crush through the CLI, provider registry, heatmap rendering, JSON export, docs, and tests. Usage is read from local
crush.dbfiles, daily totals are aggregated from top-level sessions, and model insights are derived from assistant message counts when token-by-model data is not available.What changed
crushprovider across CLI/provider/export surfaces--crushand included Crush in default auto-detection and--all.crush/crush.dbfiles underHOMEmostUsedModelrecentMostUsedModelmsgsNotes
Crush does not persist reliable token usage by model in the local DB, so per-model token totals are not fabricated. Daily input/output totals still come from persisted session token totals, while model insights come from assistant message counts in
messages.Since there's no global db for Crush, results have to be parsed from subdirectories, which can be slow, so I would recommend having this as an optional flag; I only developed this since I had usage in Crush once upon a time and wanted to have that visualised.
Additional fix
Also hardens Cursor loading by switching the auth DB read path to lazy
node:sqliteusage so default/all-provider scans are less brittle whenbetter-sqlite3is unavailable or ABI-mismatched.Verification
bun run --cwd packages/cli testbun run --cwd packages/registry registry:buildmanual sample run:
node packages/cli/dist/cli.js --crush --format json --output /tmp/slopmeter-crush-sample.jsonThanks for building this project out, it's super useful :)
Summary by cubic
Adds Crush and Google Antigravity providers to
slopmeter, with message-count model insights and more resilient data loading. Also improves help/output behavior and fixes model/token dedup across providers.New Features
crushandantigravityproviders across CLI (auto-detect,--crush,--antigravity,--all), registry, renderers, and JSON export.HOMEfor project.crush/crush.db(supports$CRUSH_GLOBAL_DATA).--helpand READMEs updated.Bug Fixes
node:sqliteauth loading with fail-soft availability probe to avoidbetter-sqlite3/ABI issues.$CODEX_HOMEand fix token usage deduplication..crush/to.gitignore.Written for commit 68e8a30. Summary will update on new commits.