Skip to content

Version Packages#902

Open
github-actions[bot] wants to merge 1 commit intomainfrom
changeset-release/main
Open

Version Packages#902
github-actions[bot] wants to merge 1 commit intomainfrom
changeset-release/main

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Feb 13, 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

@cloudflare/ai-chat@0.1.0

Minor Changes

  • #899 04c6411 Thanks @threepointone! - Refactor AIChatAgent: extract ResumableStream class, add WebSocket ChatTransport, simplify SSE parsing.

    Bug fixes:

    • Fix setMessages functional updater sending empty array to server
    • Fix _sendPlaintextReply creating multiple text parts instead of one
    • Fix uncaught exception on empty/invalid request body
    • Fix CF_AGENT_MESSAGE_UPDATED not broadcast for streaming messages
    • Fix stream resumption race condition (client-initiated resume request + replay flag)
    • Fix _streamCompletionPromise not resolved on error (tool continuations could hang)
    • Fix body lost during tool continuations (now preserved alongside clientTools)
    • Fix clearAll() not clearing in-memory chunk buffer (orphaned chunks could flush after clear)
    • Fix errored streams never cleaned up by garbage collector
    • Fix reasoning-delta silently dropping data when reasoning-start was missed (stream resumption)
    • Fix row size guard using string.length instead of UTF-8 byte count for SQLite limits
    • Fix completed guard on abort listener to prevent redundant cancel after stream completion

    New features:

    • maxPersistedMessages — cap SQLite message storage with automatic oldest-message deletion
    • body option on useAgentChat — send custom data with every request (static or dynamic)
    • Incremental persistence with hash-based cache to skip redundant SQL writes
    • Row size guard — automatic two-pass compaction when messages approach SQLite 2MB limit
    • onFinish is now optional — framework handles abort controller cleanup and observability
    • Stream chunk size guard in ResumableStream (skip oversized chunks for replay)
    • Full tool streaming lifecycle in message-builder (tool-input-start/delta/error, tool-output-error)

    Docs:

    • New docs/chat-agents.md — comprehensive AIChatAgent and useAgentChat reference
    • Rewritten README, migration guides, human-in-the-loop, resumable streaming, client tools docs
    • New examples/ai-chat/ example with modern patterns and Workers AI

    Deprecations (with console.warn):

    • createToolsFromClientSchemas(), extractClientToolSchemas(), detectToolsRequiringConfirmation()
    • tools, toolsRequiringConfirmation, experimental_automaticToolResolution options
    • addToolResult() (use addToolOutput())

Patch Changes

agents@0.4.2

Patch Changes

  • #899 04c6411 Thanks @threepointone! - Fix React hooks exhaustive-deps warning in useAgent by referencing cacheInvalidatedAt inside useMemo body.

  • #904 d611b94 Thanks @ask-bonk! - Fix TypeScript "excessively deep" error with deeply nested state types

    Add a depth counter to CanSerialize and IsSerializableParam types that bails out to true after 10 levels of recursion. This prevents the "Type instantiation is excessively deep and possibly infinite" error when using deeply nested types like AI SDK CoreMessage[] as agent state.

  • #898 cd2d34f Thanks @jvg123! - Add keepalive ping to POST SSE response streams in WorkerTransport

    The GET SSE handler already sends event: ping every 30 seconds to keep the connection alive, but the POST SSE handler did not. This caused POST response streams to be silently dropped by proxies and infrastructure during long-running tool calls (e.g., MCP tools/call), resulting in clients never receiving the response.

@github-actions github-actions bot force-pushed the changeset-release/main branch 4 times, most recently from 44ae3d1 to 3fb63a6 Compare February 14, 2026 08:21
@github-actions github-actions bot force-pushed the changeset-release/main branch from 3fb63a6 to b4222e5 Compare February 14, 2026 08:26
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.

0 participants