@flue/postgres
2.3.1 · 18 Nov 2026Apache-2.073.3k / weekRepositoryHomepagenpmAtom feed
0.11.1 is the newest release of 0.10.x.
In short
5 breaking4 new5 fixed
- Breaking
Cloudflare durable deployments require a migration. Generated Durable Object bindings and class names changed to
FLUE_<NAME>_AGENT,FLUE_<NAME>_WORKFLOW,FLUE_REGISTRY,Flue<Name>Agent,Flue<Name>Workflow, andFlueRegistry. Existing deployments must add authored Wranglerrenamed_classesmigrations for already-deployed agent and workflow classes, update direct binding access such asenv.Assistanttoenv.FLUE_ASSISTANT_AGENT, and introduce fresh SQLite-backed agent classes throughnew_sqlite_classes; existing KV-backed classes cannot be converted in place. Installagents >=0.14.1 <0.15.0for the audited Agents SDK behavior used by this release. - Breaking
Runtime surface cleanup. Removed
tool_execution_*event types, the@flue/runtime/app,@flue/runtime/client, and@flue/runtime/sandboxcompat subpaths, publicAgentConfig/DirectAgentPayloadexports, public Cloudflare agent WebSocket adapters,store()from@flue/runtime/cloudflare, and the old Cloudflare shell migration stubs. - Breaking
Persistence adapter contracts changed. Custom adapters now implement
connectRunStore()andconnectRunRegistry()onPersistenceAdapter, useSubmissionClaimRefforclaimSubmission(), and providerenewLeases(),listExpiredSubmissions(), anddeleteSession()onAgentSubmissionStore. - Breaking
Session state changed. Ordinary session names beginning with
task:are now reserved for framework-owned delegated-task history, and existing version-4 beta session state is rejected because provider affinity now uses one opaqueaff_<ULID>key instead of derived instance/harness/session identifiers. - Breaking
OpenTelemetry sanitization changed.
captureContentis replaced by an application-ownedsanitize(event)callback; metadata and generic failure messages are exported by default.
Release note
This is a large pre-1.0 release that establishes Flue's durability model across Node.js and Cloudflare. Rather than cataloging every intermediate beta change, this entry highlights the final APIs and the most important upgrade work. For guides and API reference, see the documentation.
Breaking Changes
- Breaking
Cloudflare durable deployments require a migration. Generated Durable Object bindings and class names changed to
FLUE_<NAME>_AGENT,FLUE_<NAME>_WORKFLOW,FLUE_REGISTRY,Flue<Name>Agent,Flue<Name>Workflow, andFlueRegistry. Existing deployments must add authored Wranglerrenamed_classesmigrations for already-deployed agent and workflow classes, update direct binding access such asenv.Assistanttoenv.FLUE_ASSISTANT_AGENT, and introduce fresh SQLite-backed agent classes throughnew_sqlite_classes; existing KV-backed classes cannot be converted in place. Installagents >=0.14.1 <0.15.0for the audited Agents SDK behavior used by this release. - Breaking
Runtime surface cleanup. Removed
tool_execution_*event types, the@flue/runtime/app,@flue/runtime/client, and@flue/runtime/sandboxcompat subpaths, publicAgentConfig/DirectAgentPayloadexports, public Cloudflare agent WebSocket adapters,store()from@flue/runtime/cloudflare, and the old Cloudflare shell migration stubs. - Breaking
Persistence adapter contracts changed. Custom adapters now implement
connectRunStore()andconnectRunRegistry()onPersistenceAdapter, useSubmissionClaimRefforclaimSubmission(), and providerenewLeases(),listExpiredSubmissions(), anddeleteSession()onAgentSubmissionStore. - Breaking
Session state changed. Ordinary session names beginning with
task:are now reserved for framework-owned delegated-task history, and existing version-4 beta session state is rejected because provider affinity now uses one opaqueaff_<ULID>key instead of derived instance/harness/session identifiers. - Breaking
OpenTelemetry sanitization changed.
captureContentis replaced by an application-ownedsanitize(event)callback; metadata and generic failure messages are exported by default.
New Features
Unified durable agent execution. Direct HTTP, SSE, WebSocket, local CLI, and
dispatch(...)inputs now share one SQL-backed submission lifecycle on Node and Cloudflare: admission, same-session ordering, claiming, journaled execution, conservative recovery, and retained terminal receipts.Pluggable persistence. Add source-root
db.tsadapters, built-insqlite(path?)persistence for Node, the new@flue/postgrespackage, and the@flue/runtime/adapter/@flue/runtime/test-utilssubpaths for custom backend authors.// src/db.ts import { sqlite } from '@flue/runtime/node'; export default sqlite('./data/flue.db');// src/db.ts import { postgres } from '@flue/postgres'; export default postgres(process.env.DATABASE_URL!);Signal messages and mid-turn recovery. Stream chunks are persisted during provider output so interrupted turns can resume from partial assistant text. Framework-injected context now uses signal messages for stream interruption/continuation, terminal submission advisories, dispatched input, compaction summaries, and branch summaries.
Cloudflare extension hooks. Agent and workflow modules may export
cloudflare = extend({ base, wrap })from@flue/runtime/cloudflareto add native Agents SDK lifecycle hooks beneath Flue-owned routing or wrap generated Durable Object classes with integrations such as Sentry.
Fixes & Other Changes
Node execution is concurrent and shutdown-aware. Different sessions now process in parallel through a concurrent claim loop. Claimed submissions carry renewable leases, and SIGINT/SIGTERM drains active work at turn boundaries before reclaiming unfinished submissions on next startup.
Postgres workflow history is durable.
@flue/postgresstores runs, run events, and the run registry in SQL-backed tables; built-in SQLite keeps run history in memory.Cloudflare routing and recovery are stricter. Generated agent and workflow bindings are resolved explicitly instead of inferred from the Agents SDK environment scanner, workflow event identity is append-only by
(runId, eventIndex), and Cloudflare workflow storage preserves same-ID reset behavior and explicit terminalnullresults.Observability is more accurate. OpenTelemetry now closes interrupted workflow spans correctly, exposes event indexes and compaction usage, and supports
resolveRootContext(event, ctx)for parenting Flue roots under application-owned spans.Runtime resilience improved. Prompt operations retry transient provider failures with abortable exponential backoff, generated import paths are escaped safely, and Bun compatibility diagnostics now point users at the right runtime upgrade.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.