mcp: add 2026-07-28 to the supported protocol versions (#1020)
This PR adds the protocol version `2026-07-28` to the list of supported protocol versions and fixes legacy tests hardcoding the legacy protocol version for those use cases.
This commit is contained in:
parent
b9e6fc5a66
commit
7f4aa4a0ce
1 changed files with 355 additions and 218 deletions
|
|
@ -403,7 +403,7 @@ func (c *Client) discover(ctx context.Context, cs *ClientSession) (*InitializeRe
|
|||
Meta: Meta{
|
||||
MetaKeyProtocolVersion: protocolVersion,
|
||||
MetaKeyClientInfo: c.impl,
|
||||
MetaKeyClientCapabilities: caps,
|
||||
MetaKeyClientCapabilities: caps.toV2(),
|
||||
},
|
||||
}
|
||||
req := &DiscoverRequest{Session: cs, Params: params}
|
||||
|
|
@ -518,7 +518,7 @@ func injectRequestMeta[T any, P interface {
|
|||
m[MetaKeyClientInfo] = cs.client.impl
|
||||
}
|
||||
if _, ok := m[MetaKeyClientCapabilities]; !ok {
|
||||
m[MetaKeyClientCapabilities] = cs.client.capabilities(res.ProtocolVersion)
|
||||
m[MetaKeyClientCapabilities] = cs.client.capabilities(res.ProtocolVersion).toV2()
|
||||
}
|
||||
params.SetMeta(m)
|
||||
return params
|
||||
|
|
|
|||
Loading…
Reference in a new issue