@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 breaking2 new6 fixed
- Breaking
Durable Streams protocol replaces WebSocket and SSE transports. Agent instances and workflow runs are now URL-addressable durable event streams. Clients consume events via DS-compliant
GET(catch-up, long-poll, SSE) with automatic offset-based reconnection.POST /agents/:name/:idnow returns202 { streamUrl, offset }; add?wait=resultfor200 { result, streamUrl, offset }.GET /agents/:name/:idreads the event stream.GET /runs/:runIdreplaces both/runs/:runId/eventsand/runs/:runId/stream. WebSocket transport,AgentSocket,WorkflowSocket, and all socket-related types are removed from@flue/runtimeand@flue/sdk. - Breaking
Named sessions removed from agent public API. The
sessionparameter is removed from prompt submission, dispatch, SDK, and CLI. Agent instances always use the"default"session internally. An agent instance is now a single conversation with a single event stream. - Breaking
SDK rewritten with
@durable-streams/client.@flue/sdknow exportsagents.prompt(),agents.send(),agents.stream(),runs.stream(),runs.events(), andworkflows.invoke().agents.prompt()waits for the result;agents.send()returns stream coordinates immediately.FlueEventStream<T>wraps the DS client'sjsonStream()as an async iterable withcancel()andoffsetsupport. - Breaking
connectEventStreamStore()is now required onPersistenceAdapter. Custom adapters must implement this method and provide durable event-stream storage. The built-insqlite()and@flue/postgresadapters provide implementations. - Breaking
client.runs.get()now reads from the admin mount. Applications using that SDK method must mountadmin()and configure the client with the matching admin base path.
Release note
Fixes & Other Changes
Fixed workflow run-event persistence issuing one durable storage write per streamed chunk. Per-chunk streaming events (
text_delta,thinking_start,thinking_delta,thinking_end) are now buffered and flushed to the event stream store at most once every 3 seconds instead of on every chunk. Live stream readers still see deltas; history replay and interrupted-stream recovery are unaffected.
Breaking Changes
- Breaking
Durable Streams protocol replaces WebSocket and SSE transports. Agent instances and workflow runs are now URL-addressable durable event streams. Clients consume events via DS-compliant
GET(catch-up, long-poll, SSE) with automatic offset-based reconnection.POST /agents/:name/:idnow returns202 { streamUrl, offset }; add?wait=resultfor200 { result, streamUrl, offset }.GET /agents/:name/:idreads the event stream.GET /runs/:runIdreplaces both/runs/:runId/eventsand/runs/:runId/stream. WebSocket transport,AgentSocket,WorkflowSocket, and all socket-related types are removed from@flue/runtimeand@flue/sdk. - Breaking
Named sessions removed from agent public API. The
sessionparameter is removed from prompt submission, dispatch, SDK, and CLI. Agent instances always use the"default"session internally. An agent instance is now a single conversation with a single event stream. - Breaking
SDK rewritten with
@durable-streams/client.@flue/sdknow exportsagents.prompt(),agents.send(),agents.stream(),runs.stream(),runs.events(), andworkflows.invoke().agents.prompt()waits for the result;agents.send()returns stream coordinates immediately.FlueEventStream<T>wraps the DS client'sjsonStream()as an async iterable withcancel()andoffsetsupport. - Breaking
connectEventStreamStore()is now required onPersistenceAdapter. Custom adapters must implement this method and provide durable event-stream storage. The built-insqlite()and@flue/postgresadapters provide implementations. - Breaking
client.runs.get()now reads from the admin mount. Applications using that SDK method must mountadmin()and configure the client with the matching admin base path.
New Features
@flue/postgressupports durable event streams.PgEventStreamStoreprovides a Postgres-backed implementation ofEventStreamStorewith transactionalappendEvent, in-process subscriber hooks, and full DDL in the existing migration transaction. Postgres deployments now have workingGETstream endpoints for agents and workflow runs.DS protocol read endpoints.
GETsupports catch-up (JSON array), long-poll (30s timeout withStream-Cursor), and SSE (with 15s heartbeat and control events).HEADreturns stream metadata. Responses includeStream-Next-Offset,Stream-Up-To-Date,Stream-Closed,ETag, andCache-Controlheaders per the DS protocol spec. Reads useCache-Control: no-store; there is no fallback polling path when a live subscription is unavailable.
Fixes & Other Changes
RunStorereduced to metadata only.appendEvent()andgetEvents()removed; events are exclusively inEventStreamStore.RunSubscriberRegistrydeleted.Agent POST responses are now split by wait mode. Default agent POST returns
202with stream coordinates;?wait=resultreturns the terminal result. Event observation is decoupled from POST responses via the DS stream read path.SqliteEventStreamStorecreates its own tables in the constructor. No separateensureEventStreamTables()call required; removed fromensureSqlAgentExecutionTables()and@flue/runtime/internalexports.flue logsrewritten to use@flue/sdkDS streaming. Removed dead--sessionflag.Fixed stale WebSocket references in documentation, README, and generated entry code.
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.