-
Notifications
You must be signed in to change notification settings - Fork 10.5k
feat: enums connection state and standardise tool discovery #26690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
c0ca5d7 to
7f9565b
Compare
7f9565b to
eb32b10
Compare
eb32b10 to
12ee0ff
Compare
|
Added additional enhancements to the documentation:
The documentation now includes:
|
e9c93e1 to
b66c921
Compare
6f491e5 to
0aab361
Compare
Updates documentation for PR cloudflare/agents#672 ## Changes - Updated addMcpServer() return type to discriminated union - Added MCPConnectionState enum documentation - Documented new "connected" state in connection lifecycle - Added connection state transition diagrams - Documented new discovery behavior with timeout and cancellation - Created comprehensive changelog with migration guide ## Breaking Changes - MCPClientConnection.init() no longer auto-discovers capabilities - addMcpServer() return type changed to discriminated union - New "connected" state added to connection lifecycle 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
a241181 to
3a95eef
Compare
Updated DocumentationThis PR has been updated with comprehensive documentation for the MCP connection state improvements: Changes Made
Migration Guide HighlightsThe changelog includes detailed migration guidance for:
All documentation follows Cloudflare's style guide and uses appropriate components. 🤖 Generated with Claude Code |
Summary
Documentation sync for cloudflare/agents PR #672: feat: enums connection state and standardise tool discovery
This update documents breaking API changes and new features related to MCP connection state management and discovery improvements.
Breaking Changes
addMcpServer()Return Type Changed{ id: string; authUrl: string | undefined }{ id: string; state: MCPConnectionState.AUTHENTICATING; authUrl: string }{ id: string; state: MCPConnectionState.READY; authUrl?: undefined }Error Handling Now Required
addMcpServer()now throws errors on connection/discovery failuresClientConnection.init()Behavior ChangedMCPClientManagerNew Features
MCPConnectionStateEnumimport { MCPConnectionState } from "agents"New Connection State:
connectedNew Method:
discoverIfConnected()MCPClientManagerDocumentation Updates
Connection States Section
MCPConnectionStateenumUpdated Examples
MCPConnectionStateenumresult.statevsresult.authUrlType Signatures
addMcpServer()signature to show discriminated uniontypeof MCPConnectionState.AUTHENTICATINGgetMcpServers()Updatesconnectedstate to state field documentationTest Plan
Related PR
cloudflare/agents#672
🤖 Generated with Claude Code