feat: add Muse coding-plan provider - #128
Open
yesme wants to merge 1 commit into
Open
Conversation
Track Meta Muse coding-plan quotas (5h prompts + weekly) from the same subscription snapshot 'muse /usage' shows. Meta publishes no aggregate usage endpoint, so each poll sends one minimal streamed probe to POST /v1/responses (input ping, max 16 output tokens) and extracts the inline subscription object. Auth resolves as META_API_KEY, then the muse login file, then the macOS Keychain / Linux keyring entry written by 'muse login'. The Keychain lookup is deadline-bounded (15s) so an unanswered approval dialog can never block daemon startup. Includes: API client + types, credential auto-detect (unix/windows), SQLite store + reset-cycle tracker, polling agent, daemon wiring, 7 web endpoints, dashboard cards + menubar + settings, setup wizard, install.sh/ps1, docs/MUSE_SETUP.md, landing card.
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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.
Track Meta Muse coding-plan quotas (5h prompts + weekly) from the same subscription snapshot
muse /usageshows.Why this shape
Meta publishes no aggregate usage endpoint for the coding plan (probed
/v1/usage,/v1/billing, org usage/costs - all 404). Each poll sends one minimal streamed probe (POST /v1/responseswithstream: true, inputping,max_output_tokens: 16) and extracts the inlinesubscriptionobject. Verified against the live API:{"subscription": {"tier": "pro", "weekly": {"resets_at": "1789344000", "used_percent": "12.5"}, "window": {"resets_at": "1789078632", "used_percent": "34", "window_duration_mins": "300"}}}Auth
Resolves as
META_API_KEY->providers.meta.api_keyin themuselogin file -> macOS Keychain / Linux keyring entry written bymuse login. The Keychain lookup is deadline-bounded (15s + regression test) so an unanswered approval dialog can never block daemon startup.Includes
docs/MUSE_SETUP.md, landing cardVerified
./app.sh --smokegreen on this branch;tests/test_install.sh27/27 (incl. 2 new Muse cases)tools/perf-monitor TestMain_RestartFailureExitsWithErrorhangs in this dev environment because the test helper starts a realonwatch(found via PATH) and blocks forever on its output pipe. It fails identically with and without a repo-local binary, and involves no code touched by this PR.