github cloudflare/agents agents@0.11.8

Patch Changes

  • #1411 2fa68be Thanks @threepointone! - Add AbortRegistry.linkExternal(id, signal) for connecting external AbortSignals to per-request abort controllers, and add "aborted" to the SaveMessagesResult.status union (#1406).

    linkExternal is the integration point for callers that drive a chat turn programmatically and want to cancel it from outside without knowing the internally-generated request id (the helper-as-sub-agent pattern, where a parent's AbortSignal from the AI SDK tool execute needs to land inside a sub-agent's saveMessages call). When the external signal aborts, the registry's controller for id is cancelled — the same path chat-request-cancel takes over the WebSocket. The returned detacher must be called in finally to avoid leaking listeners on long-lived parent signals.

    SaveMessagesResult.status now includes "aborted" alongside "completed" and "skipped". Existing callers that only switch on "completed" are unaffected; turns cancelled via the new signal API surface as "aborted" rather than "completed".

    Also exposes SaveMessagesOptions from agents/chat for use by @cloudflare/think and @cloudflare/ai-chat typed APIs. AbortRegistry.cancel(id, reason?) now accepts an optional reason that flows through to signal.reason on the cancelled controller.

    See cloudflare/agents#1406 for the motivating use case.

  • ca510d4 Thanks @threepointone! - Tighten internal peer dependency floors to reflect the current monorepo set we actually test against: @cloudflare/ai-chat (>=0.0.8>=0.5.2) and @cloudflare/codemode (>=0.0.7>=0.3.4). Upper bound (<1.0.0) is unchanged.

    No runtime change in agents itself. The visible effect for consumers: pairing the latest agents with a stale @cloudflare/ai-chat (<0.5.2) or @cloudflare/codemode (<0.3.4) now produces a peer warning where it previously did not. That's the intended signal — those older combinations are no longer tested in the monorepo.

Don't miss a new agents release

NewReleases is sending notifications on new releases.