Skip to content

Version Packages#1258

Merged
threepointone merged 1 commit intomainfrom
changeset-release/main
Apr 7, 2026
Merged

Version Packages#1258
threepointone merged 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 4, 2026

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

agents@0.10.0

Minor Changes

  • #1256 dfab937 Thanks @threepointone! - Add durable fiber execution to the Agent base class.

    runFiber(name, fn) registers work in SQLite, holds a keepAlive ref, and enables recovery via onFiberRecovered after DO eviction. ctx.stash() and this.stash() checkpoint progress that survives eviction.

    AIChatAgent gains unstable_chatRecovery — when enabled, each chat turn is wrapped in a fiber. onChatRecovery provides provider-specific recovery (Workers AI continuation, OpenAI response retrieval, Anthropic synthetic message). continueLastTurn() appends to the interrupted assistant message seamlessly.

    Think now extends Agent directly (no mixin). Fiber support is inherited from the base class.

    Breaking (experimental APIs only):

    • Removed withFibers mixin (agents/experimental/forever)
    • Removed withDurableChat mixin (@cloudflare/ai-chat/experimental/forever)
    • Removed ./experimental/forever export from both packages
    • Think no longer has a fibers flag — recovery is automatic via alarm housekeeping

Patch Changes

  • #1259 1933eb4 Thanks @threepointone! - Run fiber recovery eagerly in onStart() instead of deferring to the next alarm. Interrupted fibers are now detected immediately on the first request after DO wake, with the alarm path as a fallback. A re-entrancy guard prevents double recovery.

  • #1263 e3ceb82 Thanks @threepointone! - Fix routeAgentEmail() keeping the target DO non-hibernatable for ~100-120s after onEmail() returns. Replaces bare closure RPC targets with a single RpcTarget bridge (EmailBridge) that has explicit Symbol.dispose lifecycle, allowing the runtime to tear down the bidirectional RPC session promptly instead of tying it to the caller's execution context lifetime.

  • c5ca556 Thanks @threepointone! - Cap vite peer dependency at >=6.0.0 <9.0.0 to avoid silently accepting untested future major versions.

  • #1271 0cc2dae Thanks @threepointone! - Add optional MCPServerFilter parameter to getAITools(), listTools(), listPrompts(), listResources(), and listResourceTemplates() for scoping results to specific MCP servers by ID, name, or connection state.

  • #1267 d1ee61a Thanks @dmmulroy! - Fix MCP streamable HTTP client session lifecycle so closing connections explicitly terminates active sessions and persists session IDs across reconnects/restores.

  • #1270 87b4512 Thanks @threepointone! - Wire Session into Think as the storage layer, achieving full feature parity with AIChatAgent plus Session-backed advantages.

    Think (@cloudflare/think):

    • Session integration: this.messages backed by session.getHistory(), tree-structured messages, context blocks, compaction, FTS5 search
    • configureSession() override for context blocks, compaction, search, skills (sync or async)
    • assembleContext() returns { system, messages } with context block composition
    • onChatResponse() lifecycle hook fires from all turn paths
    • Non-destructive regeneration via trigger: "regenerate-message" with Session branching
    • saveMessages() for programmatic turn entry (scheduled responses, webhooks, proactive agents)
    • continueLastTurn() for extending the last assistant response
    • Custom body persistence across hibernation
    • sanitizeMessageForPersistence() hook for PII redaction
    • messageConcurrency strategies (queue/latest/merge/drop/debounce)
    • resetTurnState() extracted as protected method
    • unstable_chatRecovery with runFiber wrapping on all 4 turn paths
    • onChatRecovery() hook with ChatRecoveryContext
    • hasPendingInteraction() / waitUntilStable() for quiescence detection
    • Re-export Session from @cloudflare/think
    • Constructor wraps onStart — subclasses never need super.onStart()

    agents (agents/chat):

    • Extract AbortRegistry, applyToolUpdate + builders, parseProtocolMessage into shared agents/chat layer
    • Add applyChunkToParts export for fiber recovery

    AIChatAgent (@cloudflare/ai-chat):

    • Refactor to use shared AbortRegistry from agents/chat
    • Add continuation flag to OnChatMessageOptions
    • Export getAgentMessages() and tool part helpers
    • Add getHttpUrl() to useAgent return value

@cloudflare/ai-chat@0.4.0

Minor Changes

  • #1264 95b4d6a Thanks @threepointone! - Rename durableStreaming to unstable_chatRecovery. Fix abort controller leak when onChatMessage throws. Wrap all 4 chat turn paths (WS, auto-continuation, programmatic, continueLastTurn) in runFiber when enabled. Guard _chatRecoveryContinue against stale continuations via targetAssistantId in schedule payload.

  • #1256 dfab937 Thanks @threepointone! - Add durable fiber execution to the Agent base class.

    runFiber(name, fn) registers work in SQLite, holds a keepAlive ref, and enables recovery via onFiberRecovered after DO eviction. ctx.stash() and this.stash() checkpoint progress that survives eviction.

    AIChatAgent gains unstable_chatRecovery — when enabled, each chat turn is wrapped in a fiber. onChatRecovery provides provider-specific recovery (Workers AI continuation, OpenAI response retrieval, Anthropic synthetic message). continueLastTurn() appends to the interrupted assistant message seamlessly.

    Think now extends Agent directly (no mixin). Fiber support is inherited from the base class.

    Breaking (experimental APIs only):

    • Removed withFibers mixin (agents/experimental/forever)
    • Removed withDurableChat mixin (@cloudflare/ai-chat/experimental/forever)
    • Removed ./experimental/forever export from both packages
    • Think no longer has a fibers flag — recovery is automatic via alarm housekeeping

Patch Changes

  • #1270 87b4512 Thanks @threepointone! - Wire Session into Think as the storage layer, achieving full feature parity with AIChatAgent plus Session-backed advantages.

    Think (@cloudflare/think):

    • Session integration: this.messages backed by session.getHistory(), tree-structured messages, context blocks, compaction, FTS5 search
    • configureSession() override for context blocks, compaction, search, skills (sync or async)
    • assembleContext() returns { system, messages } with context block composition
    • onChatResponse() lifecycle hook fires from all turn paths
    • Non-destructive regeneration via trigger: "regenerate-message" with Session branching
    • saveMessages() for programmatic turn entry (scheduled responses, webhooks, proactive agents)
    • continueLastTurn() for extending the last assistant response
    • Custom body persistence across hibernation
    • sanitizeMessageForPersistence() hook for PII redaction
    • messageConcurrency strategies (queue/latest/merge/drop/debounce)
    • resetTurnState() extracted as protected method
    • unstable_chatRecovery with runFiber wrapping on all 4 turn paths
    • onChatRecovery() hook with ChatRecoveryContext
    • hasPendingInteraction() / waitUntilStable() for quiescence detection
    • Re-export Session from @cloudflare/think
    • Constructor wraps onStart — subclasses never need super.onStart()

    agents (agents/chat):

    • Extract AbortRegistry, applyToolUpdate + builders, parseProtocolMessage into shared agents/chat layer
    • Add applyChunkToParts export for fiber recovery

    AIChatAgent (@cloudflare/ai-chat):

    • Refactor to use shared AbortRegistry from agents/chat
    • Add continuation flag to OnChatMessageOptions
    • Export getAgentMessages() and tool part helpers
    • Add getHttpUrl() to useAgent return value

@cloudflare/think@0.2.0

Minor Changes

  • #1270 87b4512 Thanks @threepointone! - Wire Session into Think as the storage layer, achieving full feature parity with AIChatAgent plus Session-backed advantages.

    Think (@cloudflare/think):

    • Session integration: this.messages backed by session.getHistory(), tree-structured messages, context blocks, compaction, FTS5 search
    • configureSession() override for context blocks, compaction, search, skills (sync or async)
    • assembleContext() returns { system, messages } with context block composition
    • onChatResponse() lifecycle hook fires from all turn paths
    • Non-destructive regeneration via trigger: "regenerate-message" with Session branching
    • saveMessages() for programmatic turn entry (scheduled responses, webhooks, proactive agents)
    • continueLastTurn() for extending the last assistant response
    • Custom body persistence across hibernation
    • sanitizeMessageForPersistence() hook for PII redaction
    • messageConcurrency strategies (queue/latest/merge/drop/debounce)
    • resetTurnState() extracted as protected method
    • unstable_chatRecovery with runFiber wrapping on all 4 turn paths
    • onChatRecovery() hook with ChatRecoveryContext
    • hasPendingInteraction() / waitUntilStable() for quiescence detection
    • Re-export Session from @cloudflare/think
    • Constructor wraps onStart — subclasses never need super.onStart()

    agents (agents/chat):

    • Extract AbortRegistry, applyToolUpdate + builders, parseProtocolMessage into shared agents/chat layer
    • Add applyChunkToParts export for fiber recovery

    AIChatAgent (@cloudflare/ai-chat):

    • Refactor to use shared AbortRegistry from agents/chat
    • Add continuation flag to OnChatMessageOptions
    • Export getAgentMessages() and tool part helpers
    • Add getHttpUrl() to useAgent return value
  • #1256 dfab937 Thanks @threepointone! - Add durable fiber execution to the Agent base class.

    runFiber(name, fn) registers work in SQLite, holds a keepAlive ref, and enables recovery via onFiberRecovered after DO eviction. ctx.stash() and this.stash() checkpoint progress that survives eviction.

    AIChatAgent gains unstable_chatRecovery — when enabled, each chat turn is wrapped in a fiber. onChatRecovery provides provider-specific recovery (Workers AI continuation, OpenAI response retrieval, Anthropic synthetic message). continueLastTurn() appends to the interrupted assistant message seamlessly.

    Think now extends Agent directly (no mixin). Fiber support is inherited from the base class.

    Breaking (experimental APIs only):

    • Removed withFibers mixin (agents/experimental/forever)
    • Removed withDurableChat mixin (@cloudflare/ai-chat/experimental/forever)
    • Removed ./experimental/forever export from both packages
    • Think no longer has a fibers flag — recovery is automatic via alarm housekeeping

@cloudflare/codemode@0.3.4

Patch Changes

  • #1266 d5dbf45 Thanks @threepointone! - Add optional description to codeMcpServer, matching the existing option on createCodeTool. Supports {{types}} and {{example}} placeholders; falls back to the built-in default when omitted.

  • c5ca556 Thanks @threepointone! - Fix @tanstack/ai peer dependency range from ^0.8.0 to >=0.8.0 <1.0.0. The caret range for pre-1.0 packages only allows >=0.8.0 <0.9.0, which excluded the current 0.10.0 release.

hono-agents@3.0.8

Patch Changes

  • c5ca556 Thanks @threepointone! - Bump agents peer dependency lower bound from >=0.3.10 to >=0.9.0 to reflect actual compatibility.

@cloudflare/shell@0.3.2

Patch Changes

  • #1249 bfbed21 Thanks @threepointone! - Fix git.clone() without depth failing with ENOENT: .git/shallow. The git fs adapter's unlink now wraps errors with .code so isomorphic-git can handle missing files gracefully.

  • Updated dependencies [d5dbf45, c5ca556]:

    • @cloudflare/codemode@0.3.4

@cloudflare/voice@0.0.5

Patch Changes

  • c5ca556 Thanks @threepointone! - Replace wildcard * peer dependencies with real version ranges: agents to >=0.9.0 <1.0.0 and partysocket to ^1.0.0.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@github-actions github-actions bot force-pushed the changeset-release/main branch 8 times, most recently from 89cc28e to 048dfdf Compare April 6, 2026 20:11
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

{
"name": "@cloudflare/ai-chat",
"version": "0.3.2",
"version": "0.4.0",
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.

🟡 Stale peer dependency: @cloudflare/ai-chat 0.4.0 allows agents <0.10.0 but unstable_chatRecovery requires runFiber from 0.10.0

@cloudflare/ai-chat is released as 0.4.0, advertising the new unstable_chatRecovery feature which calls this.runFiber(...) at runtime (packages/ai-chat/src/index.ts:706). However, the peer dependency on agents at packages/ai-chat/package.json:31 was not updated from >=0.8.7 <1.0.0 — it still accepts agents 0.8.7–0.9.x, which do not have the runFiber method on the Agent base class. A user who installs @cloudflare/ai-chat@0.4.0 with agents@0.9.0 and sets unstable_chatRecovery = true will get a runtime TypeError: this.runFiber is not a function. The peer dependency minimum should be bumped to >=0.10.0 <1.0.0.

Prompt for agents
The peer dependency on agents in packages/ai-chat/package.json (line 31) needs to be updated from '>=0.8.7 <1.0.0' to '>=0.10.0 <1.0.0'. The new unstable_chatRecovery feature calls this.runFiber() which was introduced in agents 0.10.0. Without this change, npm/pnpm will happily resolve agents 0.9.x alongside ai-chat 0.4.0, and enabling the recovery feature will crash at runtime. Similarly, _handleInternalFiberRecovery is an override of a method that only exists in agents 0.10.0. The same consideration applies to packages/think/package.json (line 31), which re-exports FiberContext/FiberRecoveryContext types from agents — while those are type-only and won't crash at runtime, the changelog declares Think 0.2.0 was released as part of the unified fiber architecture, so the peer dep minimum should also be bumped for correctness.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions github-actions bot force-pushed the changeset-release/main branch 3 times, most recently from 08389e4 to c865657 Compare April 7, 2026 10:54
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

],
"type": "module",
"version": "0.1.2",
"version": "0.2.0",
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.

🔴 @cloudflare/think peer dep allows agents versions missing required exports

@cloudflare/think@0.2.0 imports FiberContext and FiberRecoveryContext types from agents (packages/think/src/think.ts:89) and Session from agents/experimental/memory/session (packages/think/src/think.ts:111), all of which were added in agents@0.10.0. It also inherits runFiber() from the Agent base class (new in 0.10.0). However, the peer dependency is still "agents": ">=0.8.7 <1.0.0" (packages/think/package.json:31). A user installing @cloudflare/think@0.2.0 with any agents version from 0.8.7 to 0.9.x will get runtime import failures because those exports don't exist. The lower bound should be >=0.10.0.

Prompt for agents
The @cloudflare/think package at version 0.2.0 now depends on features from agents 0.10.0 (FiberContext, FiberRecoveryContext types, runFiber method, Session from agents/experimental/memory/session). The peer dependency in packages/think/package.json line 31 should be updated from ">=0.8.7 <1.0.0" to ">=0.10.0 <1.0.0" to prevent users from installing incompatible combinations.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@github-actions github-actions bot force-pushed the changeset-release/main branch from c865657 to 0d98f8e Compare April 7, 2026 11:01
@github-actions github-actions bot force-pushed the changeset-release/main branch from 0d98f8e to 309f473 Compare April 7, 2026 12:17
@threepointone threepointone merged commit b035ff1 into main Apr 7, 2026
@threepointone threepointone deleted the changeset-release/main branch April 7, 2026 12:33
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.

1 participant