Refactor command initialization and SDK templates#229
Open
luke-hagar-sp wants to merge 6 commits into
Open
Conversation
- Add first-class `sail env`, `sail auth`, and `sail config` commands for environment, session, and global settings management. - Move PAT/OAuth token handling into `internal/auth` and centralize secret storage through `internal/keyring`. - Keep legacy `environment`/`set` flows available as deprecated commands while updating command docs and call sites. - Add paginated API GET support with `--pages` and `--all`. - `GOWORK=off go build ./...` - Full test suite skipped because CLI OAuth is currently known to be broken.
Ensure command-level tests that bypass full config initialization still default to PAT auth and make the PRB workflows explicit about their PAT-backed credentials. Co-authored-by: Cursor <cursoragent@cursor.com>
- Introduced new functions to handle OAuth token requests with pickupSecret. - Updated AuthResponse struct to include pickupSecret. - Added tests to verify the inclusion of pickupSecret in the authentication response and its usage in token requests. - Refactored token polling logic to utilize the new request structure. This enhances the OAuth flow by ensuring the pickupSecret is correctly managed and tested.
- Added new commands for managing access profiles, including create, list, get, patch, and delete functionalities. - Introduced a dedicated package for access profile operations to streamline command structure. - Enhanced error handling in the main application to utilize a centralized error exit code. - Added live tests for CRUD operations on access profiles to ensure functionality and reliability. These changes improve the CLI's capability to manage access profiles effectively and enhance overall error management.
Co-authored-by: Cursor <cursoragent@cursor.com>
72db652 to
8aa7af4
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
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
main.internal/initializeand removes the old embedded template payloads.CLAUDE.md, preventing API CRUD tests from mutating tracked fixtures, and bringing forward the SailApps OAuth confirmation-code output from PR Surface SailApps confirmation code during OAuth login #230.Test plan
git diff --checkGOWORK=off go build ./...GOWORK=off go test -count=1 ./cmd/api ./internal/auth ./internal/config ./cmd/auth ./cmd/env ./cmd/root ./cmd/connector ./cmd/sdk ./cmd/vacmd/apilive tests fail because no auth type/PAT is configured in this environment; the remaining listed packages pass. CI should exercise the live API coverage with PAT-backed credentials.