fix: Move the agent mode to the sdk - #329
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes the agent “mode” type/values in the SDK (via sdk/constants) and updates internal code/tests (and the CLI) to use the SDK-defined modes. It also includes a broad dependency refresh in both the main module and the test/ module.
Changes:
- Added
sdk/constants.ModeplusModeServer/ModeAgent/ModeClientconstants and updatedsdk/configto reference them. - Updated
internal/configto store/returnsdk/constants.Modeand adjusted multiple unit tests and CLI wiring to pass SDK mode values. - Updated
go.mod/go.sum(andtest/go.mod/test/go.sum) with a large set of dependency version bumps.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
sdk/constants/config.go |
Introduces SDK-owned Mode type and canonical mode constants. |
sdk/config/model.go |
Re-exports Mode from sdk/constants and continues exposing SDK config types. |
internal/config/model.go |
Switches internal config mode storage/APIs to sdk/constants.Mode and updates request structs accordingly. |
cmd/cli/main.go |
Updates CLI pre-run mode selection to use SDK mode constants/types. |
internal/daemon/provider_cookies_test.go |
Updates cookie server tests to use SDK mode constants/types. |
internal/config/*_test.go |
Updates config-related tests to use SDK mode constants. |
internal/api/elevate_test.go |
Updates elevate API tests to set mode using SDK constants. |
go.mod / go.sum |
Updates a wide range of dependencies (AWS SDK, Temporal, gRPC, etc.). |
test/go.mod / test/go.sum |
Updates integration-test module dependencies to match bumped versions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
This PR simply moves the thand mode into the SDK
Closes #
Type of Change
feat– New feature (minor version bump)fix– Bug fix (patch version bump)refactor– Code refactoring, no functional changedocs– Documentation onlytest– Adding or updating testschore– Build, CI, dependency updatesmajor/BREAKING CHANGE– Breaking change (major version bump)What Changed
Provider / Workflow / Role Changes
config/providers/)config/roles/)config/workflows/)examples/)Security Considerations
Security notes (if applicable):
Testing
go test ./...)Manual test scenario (if applicable):
Breaking Changes
Migration steps (if applicable):
Documentation
docs/updatedREADME.mdupdatedChecklist
mainfeat:,fix:,major:, etc.)