feat(auth): expose OAuth scope contract#485
Closed
lkretvix wants to merge 1 commit into
Closed
Conversation
lkretvix
commented
May 9, 2026
Comment on lines
+3
to
+8
| ## Next release | ||
|
|
||
| - Add `pup auth scopes --output=json` to expose the default `pup auth login` | ||
| OAuth scope set without requiring authentication. The first compatible | ||
| version for Bits feature-probing will be the next release after `0.58.5`. | ||
|
|
Author
There was a problem hiding this comment.
remove the mention of bits here
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.
What does this PR do?
Adds a machine-readable Pup auth scope contract for downstream consumers:
pup auth scopes --output=json.schema_version, the defaultpup auth loginOAuth scopes, andsource: "pup auth login"without requiring authentication or config loading.auth loginand the new contract so they cannot drift silently.Motivation
Bits needs to decide whether Pup is installed and, when available, request the same OAuth scope set Pup expects. A stable JSON command lets Bits feature-probe Pup directly instead of hard-coding or scraping CLI behavior.
Additional Notes
Validation performed:
cargo test auth_scopes_jsoncargo test default_login_scopes_match_auth_scopes_contractcargo test auth::types::tests::cargo run -- auth scopes --output=jsoncargo fmt --checkcargo clippy -- -D warningscargo test -- --test-threads=1A parallel
cargo testrun exposed existing mock-base-url interference in five unrelated tests that attempted to callhttp://unused.local; each failed test passed when rerun individually, and the full suite passed with--test-threads=1.Checklist
Related Issues
Part of the Pup Agent Integration plan.