Skip to content

chore: add more draft specs updates#3566

Merged
Yuan325 merged 9 commits into
mainfrom
draft-updates
Jul 8, 2026
Merged

chore: add more draft specs updates#3566
Yuan325 merged 9 commits into
mainfrom
draft-updates

Conversation

@Yuan325

@Yuan325 Yuan325 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

This PR add the following updates to the draft specs:

@Yuan325
Yuan325 requested a review from a team as a code owner July 6, 2026 21:59

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces client-side caching support for MCP tools and prompts list results by adding a CacheableResult struct (with TtlMs and CacheScope fields) and embedding it into ListToolsResult and ListPromptsResult. It also updates JSON-RPC error codes and adapts the test suite to assert the new cache fields. The reviewer feedback suggests defining a custom CacheScope type and constants (e.g., CacheScopePublic) instead of using hardcoded string literals to improve type safety and prevent typos across the codebase.

Comment thread internal/server/mcp/vdraft/types.go
Comment thread internal/server/mcp/vdraft/manifests.go
Comment thread internal/server/mcp/vdraft/manifests.go
Comment thread internal/server/mcp/vdraft/manifests_test.go
Comment thread internal/server/mcp/vdraft/manifests_test.go
@Yuan325 Yuan325 added the release candidate Use label to signal PR should be included in the next release. label Jul 6, 2026
@anubhav756

anubhav756 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Conformance test runner is crashing with a _meta validation probe failed error because it couldn't parse the headerless body.

Seems like calling w.WriteHeader pushes the HTTP headers out before render.JSON can attach the Content-Type: application/json header?

@anubhav756

Copy link
Copy Markdown
Contributor

FYI, to pass the capability enforcement tests, we need to intercept the diagnostic tool test_missing_capability in vdraft/method.go. If the client calls it but capabilities.Sampling == nil, the spec requires us to return a -32021 JSON-RPC error.

Comment thread internal/server/mcp/vdraft/types.go
@Yuan325
Yuan325 requested a review from anubhav756 July 7, 2026 18:48
@Yuan325 Yuan325 assigned averikitsch and unassigned duwenxin99 Jul 7, 2026
@dishaprakash

Copy link
Copy Markdown
Contributor

@Yuan325 just to confirm, we're going with a default TTL and CacheScope for conformance for now right?

Comment thread internal/server/mcp/vdraft/manifests_test.go Outdated
@Yuan325

Yuan325 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@dishaprakash Yes, seems like those values are required. But it should still be updated when we eventually implement Groups~

@Yuan325
Yuan325 requested a review from averikitsch July 8, 2026 20:11
@Yuan325
Yuan325 enabled auto-merge (squash) July 8, 2026 20:43
@Yuan325
Yuan325 requested a review from averikitsch July 8, 2026 21:47
@Yuan325
Yuan325 merged commit 0d8d4c7 into main Jul 8, 2026
25 checks passed
@Yuan325
Yuan325 deleted the draft-updates branch July 8, 2026 21:48
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🧨 Preview deployments removed.

Cloudflare Pages environments for pr-3566 have been deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release candidate Use label to signal PR should be included in the next release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants