Repository navigation
refactor(api): move MCP header resolution out of v1alpha3 - #3563
Merged
Merged
Conversation
The v1alpha3 package is the public API that external clients and wrapper types import. It pulled in controller-runtime and database/sql only for a few helpers that read Secrets and ConfigMaps and for a JSON column codec on RemoteMCPServerSpec. That made importing the API types far heavier than it should be, and it put I/O on types that should only describe data. We drop the sql.Scanner and driver.Valuer methods from RemoteMCPServerSpec, since nothing stores the spec through database/sql. Header resolution moves from ResolveHeaders, ValueRef.Resolve, and ValueSource.Resolve into the MCP client in the tool service, its only caller, and go/api/utils goes away. The translator keeps its own HeadersFrom handling because it compiles secret headers into egress credentials instead of reading their values. Resolution behavior is unchanged apart from wrapped errors that now name the failing header. Callers outside this repository that used the removed methods need to read the referenced Secret or ConfigMap themselves. Signed-off-by: timflannagan <[email protected]>
EItanya
approved these changes
Nov 6, 2026
This was referenced Nov 9, 2026
jerry-jibu
pushed a commit
to jerry-jibu/kagent
that referenced
this pull request
Nov 14, 2026
Backports seven PRs from `main` to `release/v1.0.x` for the 1.0 release. Each is cherry-picked with `-x` in its original merge order, and none needed changes. Every file these commits touch now matches `main` exactly. | PR | Commit | Why | | --- | --- | --- | | kagent-dev#3558 | `2e2acf58c` | fix(ci): restore upgrade tests from RC3 | | kagent-dev#3545 | `7c9c52105` | fix(ui): show when the Substrate lists were read, not a running age | | kagent-dev#3395 | `aaf1ca882` | feat(session): revert crashed runtimes through RevertSession (needed for a customer) | | kagent-dev#3562 | `5c490d83b` | refactor: remove helpers orphaned by the KMCP removal (low risk; keeps the branch close to `main`) | | kagent-dev#3563 | `c6adf72f9` | refactor(api): move MCP header resolution out of `v1alpha3`, so the 1.0 API package describes only data | | kagent-dev#3340 | `347acbe55` | fix(controller): move a ModelConfig condition's transition time only on a status change (labeled `cherrpick-1.0`) | | kagent-dev#3560 | `ccb2dd350` | adk/mcp: defer tool discovery until invocation, so slow MCP discovery no longer fails agent resumes | Please use **Rebase and merge** so each backported PR stays its own commit on the release branch. Validation before kagent-dev#3560 was added (CI covers the full set): - `go build ./...` and `go vet ./...` - `go test -race` with envtest for `api`, `core/cli`, `core/internal/{controller,database,grpcserver,mcp,service,substrate}`, `core/pkg/migrations`, and `pkg/logging` - `make -C go lint`: 0 issues - UI `tsc --noEmit` and `substrateReadAge.test.tsx` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Eitan Yarmush <[email protected]> Signed-off-by: Nicholas Bucher <[email protected]> Signed-off-by: Ada Lundhe <[email protected]> Signed-off-by: timflannagan <[email protected]> Signed-off-by: QuentinBisson <[email protected]> Signed-off-by: Shashank Ram <[email protected]> Co-authored-by: Nicholas Bucher <[email protected]> Co-authored-by: Ada Lündhé <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: Tim Flannagan <[email protected]> Co-authored-by: Quentin Bisson <[email protected]> Co-authored-by: Shashank <[email protected]>
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.
Description
go/api/v1alpha3is the public API that external clients and wrapper types import, but it pulled in controller-runtime anddatabase/sqlfor a few helpers that do I/O. This moves those helpers out so the API package only describes data.RemoteMCPServerSpecloses itssql.Scanner/driver.Valuermethods, which nothing used.RemoteMCPServer.ResolveHeaders,ValueRef.Resolve, andValueSource.Resolvemove into the tool service's MCP client, their only caller, andgo/api/utilsis removed. The translator keeps its existingHeadersFromhandling, which compiles Secret-backed headers into egress credentials rather than reading them.Header resolution behaves the same, except errors are now wrapped and name the failing header. Go consumers that called the removed methods need to read the referenced Secret or ConfigMap themselves.