Skip to content

Refactor command initialization and SDK templates#229

Open
luke-hagar-sp wants to merge 6 commits into
mainfrom
command-refactor
Open

Refactor command initialization and SDK templates#229
luke-hagar-sp wants to merge 6 commits into
mainfrom
command-refactor

Conversation

@luke-hagar-sp

@luke-hagar-sp luke-hagar-sp commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Refactors command initialization around injected terminal/client boundaries, including VA terminal handling and upstream SDK compatibility fixes from main.
  • Moves SDK project initialization to GitHub-backed template fetching through internal/initialize and removes the old embedded template payloads.
  • Cleans the refactor branch by removing 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 --check
  • GOWORK=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/va
    • Local result: cmd/api live 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.

@luke-hagar-sp luke-hagar-sp changed the title ## Summary Refactor command initialization and SDK templates Jun 1, 2026
LukasParke and others added 5 commits June 5, 2026 13:37
- 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>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants