Minor Changes
-
#2071
9620b58Thanks @ben-reitz! - Make durable chat recovery unconditional forAIChatAgentandThink.Every chat turn now runs in a recovery fiber, including WebSocket, programmatic, retry, and continuation paths.
chatRecoveryacceptstrueor a configuration object;falseis no longer supported. Previously compiled JavaScript that still suppliesfalsesafely receives the default recovery configuration.To keep durable bookkeeping while preventing automatic inference after an interruption, return
{ continue: false }fromonChatRecovery(). Use durable cancellation, side-effect, or spend state in that hook and tunechatRecoverybudgets when retries must be bounded.
Patch Changes
-
#2059
d5973c0Thanks @ben-reitz! - Preserve orphaned durable execution outcomes as framework-authored notes, then project them to user context for inference so provider transcript validation cannot reject their arbitrary position. Existing outcome notes receive the same projection without rewriting stored history. -
#1897
29b0107Thanks @mattzcarey! - AddScheduler, a reusable Lifecycle capability for persistent delayed, dated, cron, and interval callbacks, underagents/schedules. Scheduled callbacks are registered on the Scheduler itself (new Scheduler({ callbacks: { ... } })), andset()/every()type both the callback name and the payload against that registration, so the typed scheduling surface and the runtime dispatch target are the same object.LifecycleCapabilitysupplies every capability with storage, readiness, startup state, alarm coordination, a host invocation boundary, best-effort events, and generic capability routing — Scheduler consumes only that standard surface plus its callbacks and policy options, so any host that installs it configures nothing else. Lifecycle owns the physical Durable Object alarm and routes matching capability messages between Agent facets through one internal transport aperture, preserving existing root-owned facet schedule rows without Scheduler-specific Agent RPC methods or an Agent adapter.Agentuses the same Scheduler behind its existing APIs — name-basedthis.schedule(60, "methodName")keeps dispatching to Agent methods through a composition-root resolver — and preserves callback context, observability, retries, OOM handling, and alarm behavior. MCP now receives storage from Lifecycle when installed. Explicit destruction disposes live capability resources once, then clears shared Durable Object storage withdeleteAll(). Think workflow notifications now contribute their wake time through Lifecycle instead of writing the physical alarm directly. The previousagents/scheduleparser entry point remains as a deprecated compatibility alias. Agent exposes the composition root as experimentalthis.lifecycleandthis.schedulerproperties. Theagents/lifecycleentry point and the capability surfaces built on it (Scheduler, installingMCPClientManagerdirectly as a capability) are experimental and may change between releases; Agent's established APIs are unaffected.Compatibility notes:
MCPClientManagerOptions.storageis removed — the manager receives storage from the Lifecycle it is installed on, so standalone construction with an explicitDurableObjectStorageis no longer supported. Scheduled callbacks now receive the documented parsedScheduleobject as their second argument (previously the raw storage row, whosepayloadwas an unparsed JSON string). The internal_cf_*ForFacetschedule RPC methods are replaced by the generic_cf_routeLifecyclecapability aperture; facets always run the same deployed script, so no coordination is required.