Skip to content

Conversation

@threepointone
Copy link
Contributor

@threepointone threepointone commented Nov 18, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

[email protected]

Patch Changes

  • #673 603b825 Thanks @whoiskatrin! - added resumable streaming with minimal setup

  • #665 4c0838a Thanks @threepointone! - Add default JSON schema validator to MCP client

  • #664 36d03e6 Thanks @threepointone! - Refactor MCP server table management in Agent class

    Moved creation and deletion of the cf_agents_mcp_servers table from AgentMCPClientStorage to the Agent class. Removed redundant create and destroy methods from AgentMCPClientStorage and updated MCPClientManager to reflect these changes. Added comments to clarify usage in demo and test code.

  • #653 412321b Thanks @deathbyknowledge! - Allow this.destroy inside a schedule by including a destroyed flag and yielding ctx.abort instead of calling it directly
    Fix issue where schedules would not be able to run for more 30 seconds due to blockConccurencyWhile. alarm() isn't manually called anymore, getting rid of the bCW.
    Fix an issue where immediate schedules (e.g. this.schedule(0, "foo"))) would not get immediately scheduled.

  • #652 c07b2c0 Thanks @mattzcarey! - ### New Features

    • MCPClientManager API changes:
      • New registerServer() method to register servers (replaces part of connect())
      • New connectToServer() method to establish connection (replaces part of connect())
      • connect() method deprecated (still works for backward compatibility)
    • Connection state observability: New onServerStateChanged() event for tracking all server state changes
    • Improved reconnect logic: restoreConnectionsFromStorage() handles failed connections

    Bug Fixes

    • Fixed failed connections not being recreated on restore
    • Fixed redundant storage operations during connection restoration
    • Fixed potential OAuth storage initialization issue by excluding non-serializable authProvider from stored server options
    • Added defensive checks for storage initialization in MCPClientManager and DurableObjectOAuthClientProvider
    • Fixed initialization order: MCPClientManager is now created AFTER database tables are created to prevent possible table-not-found errors during DO restart
  • #678 cccbd0f Thanks @whoiskatrin! - convert internal AI SDK stream events to UIMessageStreamPart format

  • #672 7c9f8b0 Thanks @mattzcarey! - - MCPClientConnection.init() no longer triggers discovery automatically. Discovery should be done via discover() or through MCPClientManager.discoverIfConnected()

    Features

    • New discover() method on MCPClientConnection with full lifecycle management:
      • Handles state transitions (CONNECTED → DISCOVERING → READY on success, CONNECTED on failure)
      • Supports cancellation via AbortController (cancels previous in-flight discovery)
      • Configurable timeout (default 15s)
    • New cancelDiscovery() method to abort in-flight discoveries
    • New discoverIfConnected() on MCPClientManager for simpler capability discovery per server
    • createConnection() now returns the connection object for immediate use
    • Created MCPConnectionState enum to formalize possible states: idle, connecting, authenticating, connected, discovering, ready, failed

    Fixes

    • Fixed discovery hanging on repeated requests - New discoveries now cancel previous in-flight ones via AbortController
    • Fixed Durable Object crash-looping - restoreConnectionsFromStorage() now starts connections in background (fire-and-forget) to avoid blocking onStart and causing blockConcurrencyWhile timeouts
    • Fixed OAuth callback race condition - When auth_url exists in storage during restoration, state is set to AUTHENTICATING directly instead of calling connectToServer() which was overwriting the state
    • Set discovery timeout to 15s
    • MCP Client Discovery failures now throw errors immediately instead of continuing with empty arrays
    • Added "connected" state to represent a connected server with no tools loaded yet
  • #654 a315e86 Thanks @mattzcarey! - When handling MCP server requests use relatedRequestId in TransportOptions to send the response down a POST stream if supported (streamable-http)

  • #661 93589e5 Thanks @naji247! - fix: add session ID and header support to SSE transport

    The SSE transport now properly forwards session IDs and request headers to MCP message handlers, achieving closer header parity with StreamableHTTP transport. This allows MCP servers using SSE to access request headers for session management.

  • #659 48849be Thanks @threepointone! - update dependencies

[email protected]

Patch Changes

@claude
Copy link

claude bot commented Nov 18, 2025

Claude Code Review

This is an automated Changesets release PR. The changes look good:

  • Removes consumed changeset file
  • Updates package version from 0.2.23 → 0.2.24
  • Updates CHANGELOG.md with PR Schedule fixes #653 changes
  • Updates package-lock.json with dependency version changes

No issues found. Ready to merge when you want to publish the release.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@657

commit: 62ec6af

@github-actions github-actions bot force-pushed the changeset-release/main branch 17 times, most recently from a18641c to c8f8bca Compare November 25, 2025 17:26
@github-actions github-actions bot force-pushed the changeset-release/main branch 2 times, most recently from 955db50 to 54562bb Compare November 26, 2025 10:37
@github-actions github-actions bot force-pushed the changeset-release/main branch from 54562bb to de8b049 Compare November 26, 2025 15:16
@whoiskatrin whoiskatrin merged commit da2bb57 into main Nov 26, 2025
@whoiskatrin whoiskatrin deleted the changeset-release/main branch November 26, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants