Version Packages - #2251
Merged
Merged
Version Packages#2251
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
2 times, most recently
from
September 12, 2026 00:40
4921fbb to
9838f97
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
5 times, most recently
from
September 14, 2026 12:20
26ea2fc to
fbf4748
Compare
Contributor
There was a problem hiding this comment.
Devin Review found 1 new potential issue.
🐛 1 issue in files not directly in the diff
🐛 Completed fibers recover as interrupted
When cleanup deletion fails after runFiber succeeds, the retained row is later recovered as an interrupted run. _checkRunFibers cannot distinguish this row from work stopped before completion. Recovery hooks can duplicate completed side effects.
github-actions
Bot
force-pushed
the
changeset-release/main
branch
5 times, most recently
from
September 18, 2026 10:36
a1a5cf0 to
2f096b7
Compare
This was referenced Sep 18, 2026
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
September 18, 2026 11:08
2f096b7 to
181379c
Compare
Contributor
⚪ agents import sizesMeasured 343 runtime imports as minified bundles. The primary size is gzip; raw minified size is included for diagnosis. An existing import growing by more than 10% is marked red. This report is informational.
Compared No import sizes changed. All 343 current runtime imports
Reported by agent-think[bot]. |
agents
@cloudflare/ai-chat
@cloudflare/codemode
hono-agents
@cloudflare/shell
@cloudflare/think
@cloudflare/voice
@cloudflare/worker-bundler
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.24.0
Minor Changes
#2249
ebab868Thanks @mattzcarey! -WebSocketsspeaks the Agent protocol for plain hosts, and gains a Cap'n Web transport.WebSocketsnow works withuseAgentandAgentClient: the capability sends the identity frame on connect (protocol: falseleaves the connect sequence to the host) and servescallables— anRpcTargetwhose prototype methods are the host's remote interface.useAgent({ transport })andAgentClient({ transport })pick the wire."cf-websocket"(default) is the hibernating socket;call()/stubsend JSONrpcframes."capnweb"runs one Cap'n Web session that carries protocol frames and servescallablesnatively:call()/stubinvoke them directly, anRpcTargetresult is a live stub, aReadableStreamstreams, calls pipeline. The Durable Object stays in memory while a capnweb connection is open. PartySocket still owns reconnection on both.@callable()decorators remain the JSON-wire interface ofAgent; an Agent wanting native calls passescallables.?__agents_rpc=capnwebendpoint from 0.23.0 is removed.LifecycleServicesexposesnameandclassName.#2245
beff78aThanks @mattzcarey! - Add theQueueLifecycle capability (agents/queue) for durable background work. Each pushed item is a job in the Lifecycle job queue, due immediately, run from the alarm loop one at a time in push order with Lifecycle's retry, deadman, and memory-limit policy. Callbacks are registered in the constructor and typed at declaration and push;push()accepts a stableid(upsert) and per-itemretry.Agent.queue()and friends now delegate to the capability. Queued callbacks run from the alarm loop in a fresh invocation, so they no longer see the enqueuing request'sconnectionorrequestthroughgetCurrentAgent()(the agent itself is still available). Thecf_agents_queuestable and the in-isolate drain are gone; legacy rows migrate into the job queue on the next start.queue()acceptsoptions.id;dequeue,dequeueAll,dequeueAllByCallback,getQueue, andgetQueuesare now asynchronous; andQueueItem.created_atis renamedcreatedAt.LifecycleServices.starting()is replaced bystatus(), which returns"zero" | "starting" | "started".Think's workflow-notification outbox and submission drain now run as queue items; the
cf_think_workflow_notificationstable migrates and is dropped on start.Both one-shot migrations (
cf_agents_queuesin Queue,cf_think_workflow_notificationsin Think) are temporary upgrade paths and will be removed in the next minor release, by which point every started object has migrated. Deployments skipping this release should upgrade through it. Workflow-notification delivery retries with backoff capped at ten minutes (previously five) and gives up after twelve hours of continuous failure (previously never), reporting the failure throughonError.#2179
43a58a1Thanks @AntoniTok! - Move agent state into the opt-inStateLifecycle capability.State was one method doing four jobs inside
Agent— validate,persist, broadcast, notify. It moves wholesale into a
Statecapability that owns storage and change ordering, so any Lifecycle
host gets durable, validated state without inheriting
Agent:The capability owns the
cf_agents_statestate row, lazy load with anin-memory cache, initial-state seeding, and validated persistence. It
runs only the
onStarthook (versioned schema init under its owncf_agents:state_schema_versionkey) and reaches Lifecycle only forstorage— no alarm, no request path. It never touches connections.Host-owned behavior is injected, not moved:
validateStateChangestays an overridable
Agentmethod and the post-changeonChangedhook is passed into
Stateas a plain option. Synchronous andasynchronous notification hooks are both supported.
Agentkeeps itsinitialStatefield and seeds it from thestategetter (standalonehosts pass
initialStatetoStatedirectly). Broadcast and thenotification hook stay on
Agent, and theonMessagestate branchstays too; only its inner write delegates to the capability.
Stateis the only owner ofcf_agents_state: it creates the table,holds the state row, and runs the legacy
cf_state_was_changedcleanup in its own versioned migration.
Agentused to keep itsglobal schema version as a row in that table; it now lives under the
cf_agents:schema_versionKV key like every other capability'sversion. A DO created under the old layout has the row read once,
moved to the key, and deleted on its next construction.
Agent's public API and wire protocol are unchanged:state,setState(),onStateChanged, and theCF_AGENT_STATEframes behaveidentically.
#2257
46760e6Thanks @mattzcarey! - TheWebSocketscapability now owns the Agent protocol's state sync and per-connection flags, forAgentand plain hosts alike.statetakes aStatecapability. The current value is pushed to each new connection after identity, a client'scf_agent_stateframe goes through the host'svalidateStateChange(a readonly connection is refused, a rejected change gets a genericcf_agent_state_error), andbroadcastState(source)pushes a change to every protocol-enabled connection but its source — wire it to theState'sonChanged. SouseAgent().stateandsetState()work against a plain Durable Object.protocolandreadonlyare per-connection policies decided at accept time;sendIdentity(),sendState(),applyStateFrame(),isReadonly()/setReadonly(), andisProtocolEnabled()/setProtocolEnabled()are the capability's surface for hosts that drive the sequence themselves. Theidentityoption from the previous changeset is replaced byprotocol._cf_storage in connection state, and the wrapper that hides them fromconnection.statemove out ofAgentintoagents/websockets(registerInternalConnectionKeysfor a host's own keys).Agent's public methods and wire behaviour are unchanged; it passesprotocol: falseand drives its connect sequence through the capability after its facet routing decision.Patch Changes
#2248
c96418dThanks @mattzcarey! - Lifecycle capabilities declare how they claim traffic withclaims: "selective" | "catch-all"instead of hosts passing{ fallback: true }tolifecycle.use(). A catch-all always dispatches last, whenever it was installed. Catch-alls are unique per dispatch hook, so one foronRequestand one foronWebSocketUpgradecoexist while a second for the same hook is refused.WebSocketsdeclares itself a catch-all for upgrades and never declines one: withouthandlersit still accepts and tracks connections; handlers only add behavior on connect, message, close and error.LifecycleUseOptionsis removed.#2244
f6e556fThanks @mattzcarey! - Preserve a legacyrunFiberresult when deleting its bookkeeping row fails. The cleanup error is logged and the row is left for the existing recovery pass instead of replacing the fiber body's outcome.#2297
0fd3c8bThanks @ben-reitz! - ExposeResumableStream.pendingCutoverIdso callers can detect whether a finished stream still awaits its cutover, and clear the pending-cutover marker only after settlement succeeds infinalizePending, keeping a failed settlement retryable instead of silently leaving the stream row live.#2288
9efee5fThanks @ben-reitz! - Bumpvalibotto 1.4.2, picking up the fix for a moderate-severityadvisory affecting
record()schemas andflatten().@cloudflare/think@0.19.0
Minor Changes
#2245
beff78aThanks @mattzcarey! - Add theQueueLifecycle capability (agents/queue) for durable background work. Each pushed item is a job in the Lifecycle job queue, due immediately, run from the alarm loop one at a time in push order with Lifecycle's retry, deadman, and memory-limit policy. Callbacks are registered in the constructor and typed at declaration and push;push()accepts a stableid(upsert) and per-itemretry.Agent.queue()and friends now delegate to the capability. Queued callbacks run from the alarm loop in a fresh invocation, so they no longer see the enqueuing request'sconnectionorrequestthroughgetCurrentAgent()(the agent itself is still available). Thecf_agents_queuestable and the in-isolate drain are gone; legacy rows migrate into the job queue on the next start.queue()acceptsoptions.id;dequeue,dequeueAll,dequeueAllByCallback,getQueue, andgetQueuesare now asynchronous; andQueueItem.created_atis renamedcreatedAt.LifecycleServices.starting()is replaced bystatus(), which returns"zero" | "starting" | "started".Think's workflow-notification outbox and submission drain now run as queue items; the
cf_think_workflow_notificationstable migrates and is dropped on start.Both one-shot migrations (
cf_agents_queuesin Queue,cf_think_workflow_notificationsin Think) are temporary upgrade paths and will be removed in the next minor release, by which point every started object has migrated. Deployments skipping this release should upgrade through it. Workflow-notification delivery retries with backoff capped at ten minutes (previously five) and gives up after twelve hours of continuous failure (previously never), reporting the failure throughonError.Patch Changes
#2304
4f2e5a3Thanks @ben-reitz! - Requireagents >=0.24.0for Think's background work, which relies on the Queue capability's stable item IDs and alarm-driven execution.#2256
ee6a8cfThanks @mattzcarey! - Recover an interrupted Think turn that had opened its stream but persisted no content by re-running its user message instead of trying to continue it. Think opens the resumable stream row before inference, so a Durable Object reset in the window before the first chunk left a turn with a stream id, no partial, and a user message as the latest leaf; recovery classified it ascontinue, found no assistant message to continue from, and marked the incidentskipped. A parent tailing such a child through agent tools then sealed the run as an error. This mirrorsAIChatAgent's empty-partial new-turn rule (#1691).#2297
0fd3c8bThanks @ben-reitz! - Preserve running durable submissions during startup when either a retry or continuation chat-recovery callback is still pending. This applies to both current Tasks recovery attempts and legacy scheduled callbacks, allowing interrupted empty streams to retry and complete after a restart instead of being marked as errors.Keep recovery ownership until the successor chat turn is durably accepted, and bind the submission to that successor before handing off. Scope the handoff signal to the successor turn so concurrent turns cannot claim it, including facet-hosted turns after their legacy successor fiber is durably created. New recovery payloads carry stable submission identity; exact submission IDs take precedence over request-ID fallback, preventing collisions from recovering or terminalizing another submission. Record each turn's actual outcome and structured output on the submission row in the same transaction that settles its stream, so a restart between turn completion and ledger settlement records the completed, aborted, or errored outcome from recorded fact instead of inferring from stream state — without rerunning the turn or duplicating response callbacks: aborted turns stay aborted, recovered workflow completions keep their output, an overflow retry segment is never mistaken for an answer, and the recorded fact survives unrelated turns reclaiming stream rows.
@cloudflare/worker-bundler@0.2.4
Patch Changes
9efee5fThanks @ben-reitz! - Raise thesmol-tomlfloor to ^1.7.2, picking up the fix for ahigh-severity denial of service via malformed TOML (patched upstream
in 1.7.1).
@cloudflare/voice-twilio@0.1.1
Patch Changes
a7b2913Thanks @cjol! - Fix Twilio Media Streams calls failing to connect, play audio, or stop playback on barge-in. Durable Object WebSocket upgrades now keep their HTTP(S) URL, agent audio works with bothBlobandArrayBufferdelivery, and sustained caller speech clears Twilio's buffered audio while interrupting the active VoiceAgent response.@cloudflare/agent-think@0.0.9
Patch Changes
c96418d,ebab868,beff78a,f6e556f,0fd3c8b,43a58a1,4f2e5a3,ee6a8cf,0fd3c8b,9efee5f,46760e6]: