fix(mcp): add resource_link to McpToolCallResponse type union [fixes #351 compile]#387
Conversation
…provider Merging 12 new test cases covering completePrompt, streaming resilience, and edge cases.
Dependabot bump. Compatible: project requires node>=20.20.2, uuid v14 requires node>=20.
# Conflicts: # pnpm-lock.yaml
@modelcontextprotocol/sdk v1.26.0 introduced a new 'resource_link' content type in tool call responses. Without this type in the McpToolCallResponse union, TypeScript compilation fails at McpHub.ts:2208 and :2253 with TS2322. The new type includes uri, name, optional description, and optional mimeType, matching the SDK's ResourceLink definition. Fixes compile failure in PR Zoo-Code-Org#351
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
An accidental uuid 11.1.0→14.0.0 bump leaked into this branch and broke the Windows unit tests: uuid@14 drops the Math.random fallback and now requires globalThis.crypto.getRandomValues, which the Vitest forks pool on Windows (Node 20) does not provide. Reverting to ^11.1.0 matches upstream/main and restores green CI.
|
You're right — I also reverted the unintended uuid 11→14 bump that was breaking the Windows tests. Thanks for catching it. |
be89dbe to
17b753c
Compare

Summary
Fixes the TypeScript compile failure in PR #351 caused by
@modelcontextprotocol/sdkv1.26.0 introducing a newresource_linkcontent type.Root Cause
The SDK v1.26.0 adds
{ type: "resource_link", uri, name, description?, mimeType? }to the content union returned by tool calls.McpToolCallResponseinpackages/types/src/mcp.tsonly acceptedtext | image | audio | resource, causing TS2322 atMcpHub.ts:2208and:2253.Fix
Added the
resource_linkvariant to theMcpToolCallResponse.contentunion type:Testing
@roo-code/typescheck-types passeszoo-codecheck-types passesRelated
@modelcontextprotocol/sdkv1.26.0