The best way to control Claude Code, Codex and more from any computer or phone

main
md 282 KB

@effect/platform-node

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #8829 8f23668 Thanks @fubhy! - Replace effect/Crypto with family-specific effect/crypto/* services, opaque keys, CryptoError, a configurable WebCrypto reference and key schemas in effect/Schema. Encoding secret or private keys through byte/format schemas requires { allowEncode: true }.

### Breaking changes

  • Use SecureRandom for randomness and UUIDs, and Digest with algorithm values such as Digest.sha256 for hashing. Replace effect/testing/TestCrypto with Layer.mock for the required services.
  • Provide crypto explicitly; it is no longer included in the runtime *Services bundles. NodeCrypto, BunCrypto, DenoCrypto and BrowserCrypto offer individual family layers and a combined layer, supplying SecureRandom where needed. Core modules offer layerWebCrypto.
  • Provide Digest.Digest instead of Crypto.Crypto to SqlMessageStorage and SingleRunner, and instead of EventLogEncryption to SqlEventLogServerEncrypted.makeStorage and layerStorage. Replace EventLogEncryption.sha256String with digest.digestHex(Digest.sha256, bytes).

Existing workflow ID, activity idempotency key and event log table-name encodings are unchanged.

Event log encryption, identity key derivation and session authentication now run on Aead, Digest, Signature and SecureRandom. EventLogEncryption.make and EventLogEncryption.layer take those services from context, so Node apps can use the NodeCrypto layers. EventLogEncryption.layerSubtle and the session auth functions use the Web Crypto layers on the WebCrypto reference instead of globalThis.crypto. Existing identities, derived signing keys and encrypted batches are unchanged.

UUIDv7 and ULID generation is now monotonic below the maximum 48-bit timestamp, including within a millisecond and across clock rollback. Ordering is per SecureRandom instance; the unsafe helpers and model UUIDv7 defaults share per-realm ordering.

  • #10087 472c469 Thanks @effect-bot! - Node.js 22.19.0 (required by undici 8) is now the minimum for @effect/platform-node, @effect/platform-node-shared, @effect/opentelemetry and @effect/docgen, up from 18.

NodeSocket WebSocket clients now use Node's global WebSocket instead of ws, so client-only usage no longer bundles ws.

Breaking: ws moved to a new NodeWS module.

  • NodeSocket.NodeWS and BunSocket.NodeWS are removed. Import NodeWS from @effect/platform-node or @effect/platform-node-shared (on Bun, import ws directly). Use NodeWS.WebSocket in place of NodeSocket.NodeWS.default.
  • NodeSocket.layerWebSocketConstructorWS is removed. Use NodeWS.layerWebSocketConstructor.

Behaviour changes for clients that pass handshake headers, which previously used ws. Use NodeWS.layerWebSocketConstructor to keep the old behaviour:

  • Reads cannot be paused. Incoming frames are buffered without limit, and a configured highWaterMark fails the socket with a SocketReadError.
  • Connection errors are a generic ErrorEvent, so SocketOpenError causes lack the underlying error code.
  • The Socket.WebSocket service is a global WebSocket, so ws instanceof checks and ws-only methods such as terminate() and ping() no longer apply.
  • A custom Host header is ignored.
  • Outgoing messages are not compressed. Incoming permessage-deflate messages are still decompressed.
  • Connections use undici's global dispatcher instead of http.globalAgent / https.globalAgent.

Patch Changes

4.0.7

Patch Changes

  • #9751 fb38ce6 Thanks @effect-bot! - Allow buffered payloads and typed 101 response headers on HttpApiSchema.Upgrade endpoints.

    • HttpApiSchema.Upgrade({ protocol, headers }) declares 101 headers, encoded like WithHeaders headers. Clients decode them and return { headers, socket }, and OpenAPI lists them on the 101.
    • Upgrade endpoints can declare buffered payloads. Streaming payloads are still rejected.
    • Handlers receive an upgrade function instead of socket: upgrade(), or upgrade({ headers }) when headers are declared.
    • 426 Upgrade Required is returned before the payload is decoded.
    • HttpServerRequest gains upgradeWith({ headers }), and upgrade is upgradeWith({}). Third-party HttpServerRequest implementations must add it. WebSocket upgrades fail when headers are given.
    • NodeHttpServer waits for the request body to end before writing the 101. On Node 25 and older, which do not parse upgrade request bodies, it reads Content-Length bodies from the connection and answers chunked ones with 411 Length Required.
    • NodeMultipart fails with a MultipartError when its source stream errors, instead of waiting for more input.
  • #10004 4ee3a67 Thanks @athammer! - Fix NodeHttpServer hanging or reporting a defect when an HTTP/1 client disconnects before the response is written.

  • #9978 07ca583 Thanks @jpowersdev! - Fix NodeMultipart.stream hanging when the source closes early or is already destroyed, including any file part still being read, and remove its source listeners once parsing finishes.

  • #9828 45c467a Thanks @tim-smart! - Add Redis.reserve, which leases a dedicated connection from a pool, so blocking commands like XREAD BLOCK and BLPOP no longer hold up other commands on the shared connection. NodeRedis, BunRedis and DenoRedis layers accept maxConnections, minConnections, idleTimeout and acquireTimeout to size the pool.

Redis.make now requires a connect option, and hand-written Redis services need a reserve member. - Updated dependencies [ac3485a, 3a4c691, 4f0600e, 110fd22, aa58cda, 8e257e7, e62a149, 958307b, dcd43a5, 5fbccf4, 3388cdd, 81b0e14, a046435, f6d8968, 5741c3a, 381d5c6, d47478a, 383716d, 46dc30a, 3d5c862, 93ebc4f, c7b161a, e55945d, 1a53d6a, 5e25cc9, 9503d5c, 13efb72, 8ca6abb, 4a09dd1, 346fc92, 20e5ba8, f4b237e, 1dd08ee, 940be42, 37be245, 563fde0, 938cecb, cf197c1, 7ca71bb, 1e73219, 4dd860d, 4d24a11, 6bbc5ac, 5fd25f4, a461561, 832b3c6, 837e906, cd1f2d4, fb38ce6, 446c7ac, b48b7d8, dc66d90, d5a3dc3, 482e0d5, d84f518, d34d399, 5bbd25e, 14eab6b, a3bd27a, ec19ab3, af8fcb3, 6b82a28, 3043aea, 785577e, a8dbbce, 65094ac, 113ec70, ad3126e, eedfb27, 45c467a, c983fc1, 58f164f, f6df1aa, c05355c, ae7805c, 9ffc621, c97b331, 15297e5, 41f6738, 53f9352, b72f6a2, 52e1716, 50c863a, f09dc43, c148d27, a11ecdd, 08e338e, 8450ad5, 39da87a, a2adb31, a6174d5, 96e6004, 3ebd645, 3c3c79b, 8c6d2fa, 1ff35d2, 2b100e9, e3938e5, f90101a, 306c9a1, 5b69c67, a12ffe3, f6cf0fd, 3541f65, d50aaa2, 3731ddb, 3b8090c, 137757a, a658477]: - effect@4.0.7 - @effect/platform-node-shared@4.0.7

4.0.6

Patch Changes

  • #9506 679f956 Thanks @tim-smart! - Use Effect.fnUntraced for internal functions that returned Effect.gen.

  • #9262 51930c0 Thanks @effect-bot! - Return a typed multipart parse error instead of a defect when a multipart request is missing its boundary.

  • #9402 d1201f0 Thanks @effect-bot! - Release writables created by NodeSink.fromWritable and fromWritableChannel when upstream fails or the sink is interrupted, preserving the original exit cause. Writables using endOnDone: false remain open. Preserve stream body encoding errors in the Node HTTP client instead of reporting transport errors caused by request cleanup.

  • #9575 c29ddd8 Thanks @tim-smart! - Add streaming request payloads to HttpApi. An endpoint can declare HttpApiSchema.StreamUint8Array or the new HttpApiSchema.StreamNdjson({ schema }) as its payload, and the handler receives a lazy Stream that reads the body as it pulls. Bad NDJSON lines fail the stream with HttpApiSchemaError (400). The new maxBytes and maxElementBytes limits fail it with the new HttpApiPayloadTooLarge (413), and a content-length over maxBytes is rejected before the handler runs. StreamNdjson also works as a success response.

HttpApiClient sends a Stream payload without buffering it and infers the stream's requirements. HttpApiTest passes stream payloads through unbuffered. OpenApi.fromApi marks streaming request bodies with x-effect-stream, and openapi-generator maps them, and NDJSON or JSON Lines bodies with an itemSchema, back to StreamUint8Array and StreamNdjson.

The Node server drains up to 256 KiB of a body the handler left unread, then closes the connection, instead of reading the whole upload or leaving the socket stuck.

  • 3934c0c Thanks @tim-smart! - Return 413 instead of 400 when buffered or decompressed request bodies exceed their size limit, while preserving 400 for other parse failures. Node HTTP servers drain oversized bodies so the response can reach the client without destroying the socket. Node stream readers expose MaxBytesError and an optional destroyOnOverflow setting; their default destruction behavior is unchanged.

  • #9339 9a680d6 Thanks @fubhy! - Add raw HTTP/1.1 upgrades through HttpClientRequest.upgrade, HttpClientResponse.upgrade, the Node HTTP server, and HttpApiSchema.Upgrade. Node clients expose the upgraded connection as a Socket; HttpApi clients return { headers, socket } and OpenAPI documents the 101 response.

Custom HttpClientResponse implementations must add upgrade. Fetch and XMLHttpRequest reject upgrade requests with a TransportError before anything is sent; Bun and Deno servers still support only WebSocket upgrades.

  • #9417 7f823c1 Thanks @fubhy! - Fix HTTP response framing: omit bodies for 204, 205 and 304, and remove content-length for 204 and 205. Node now aborts responses whose bodies do not match content-length. Deno and Bun preserve raw Web Response objects when merging headers, and Deno preserves their status and headers for HEAD requests.

  • #9415 6e614e6 Thanks @fubhy! - - Fix HTTPS detection in HttpServerRequest.toURL and tracing. An exact http or https in x-forwarded-proto takes precedence; otherwise, infer HTTPS from originalUrl. Paths starting with // preserve the request host.

    • Node server requests now expose an absolute originalUrl when a Host header is present, fixing HttpMiddleware.searchParamsParser. Use url instead of originalUrl to read the path. Hostless requests are unchanged.
    • For absolute-form Node requests, derive url and headers.host from the request target, ignoring a conflicting Host header.
  • #9375 5a2d19f Thanks @fubhy! - Use HTTP/2 authority for the exposed host header and request URL, even when Host is missing or conflicting. In Deno, also use the target authority for HTTP/1.1 absolute-form requests.

  • #9566 9972b4f Thanks @tim-smart! - Keep streaming request bodies uploading after NodeHttpClient.layerNodeHttp receives response headers, allowing bidirectional request and response streaming. Stop unfinished uploads when the response is consumed, the connection closes or the request is cancelled, including with keep-alive agents.

  • #9413 29bee6f Thanks @fubhy! - Fix NodeHttpClient.layerUndici hanging when sending HttpBody.formData request bodies.

  • #9564 ab0f384 Thanks @tim-smart! - Defer 100 Continue responses until the application starts reading the request body, so early rejections of Expect: 100-continue requests do not prompt clients to upload.

  • #9710 bb49b9a Thanks @effect-bot! - Support HTTP/2 servers in NodeHttpServer. make, layerServer, layer and layerConfig accept Http2.createServer() and Http2.createSecureServer(), including allowHTTP1, without a cast. HTTP/2 requests no longer expose pseudo-headers, so HttpServerRequest.toWeb works, and toURL uses the request's :scheme and :authority. Responses drop the connection-specific headers HTTP/2 forbids instead of being lost, a body that fails after the headers were sent resets the stream with INTERNAL_ERROR instead of ending cleanly, and shutdown closes idle HTTP/2 sessions, so it no longer waits for the graceful timeout on Node 22.

Breaking (types only): NodeHttpServerRequest.toIncomingMessage and toServerResponse now return Http.IncomingMessage | Http2.Http2ServerRequest and Http.ServerResponse | Http2.Http2ServerResponse. Code that uses members only the HTTP/1.1 objects have needs to narrow first, for example on httpVersionMajor.

  • #9412 0317f20 Thanks @fubhy! - NodeHttpServer now responds with a 500 when a handler returns a status outside 200-599. Previously a 1xx status left the client without a final response, and statuses above 599 were sent as is.

  • #9380 5a13d9d Thanks @fubhy! - Fix NodeHttpServer requests hanging when Node rejects the response headers. The server now sends a fallback error response, or destroys the response if that also fails.

  • #9255 e24cd76 Thanks @jayhemnani9910! - Abort the connection when a streamed response body fails after headers are sent. Previously the response ended normally, so clients treated the truncated body as complete.

  • #9458 26de861 Thanks @tim-smart! - Avoid loading Node's internal undici on cold start when importing effect/Schema or starting a Node HTTP server before any web API is used. Schema.FormData resolves the global constructor during validation, and @effect/platform-node loads node:http and node:https without evaluating their lazy web API exports.

  • #9701 e618f10 Thanks @effect-bot! - Require an explicit trusted proxy policy before applying forwarded headers.

HttpMiddleware.xForwardedHeaders now takes { trustedProxies } and only applies X-Forwarded-* headers when the connecting peer is trusted. X-Forwarded-For is read from the right, skipping trusted proxies, and X-Forwarded-Host / X-Forwarded-Proto are only used when they line up with it.

HttpServerRequest.toURL no longer reads x-forwarded-proto directly. It uses the new request.protocol, set by the trusted proxy middleware, before the transport scheme. The connecting peer stays available as request.peerAddress.

  import { HttpMiddleware } from "effect/http"
  import { IpNetwork } from "effect/net"

  // before
  HttpMiddleware.xForwardedHeaders

  // after
  HttpMiddleware.xForwardedHeaders({
    trustedProxies: [IpNetwork.fromStringUnsafe("10.0.0.0/8")]
  })

4.0.5

Patch Changes

  • #9158 5951ac0 Thanks @fubhy! - Add typed connection options to NodeHttpClient for unix sockets and mutual TLS.

  • #9136 12be65e Thanks @tim-smart! - Redact sensitive query values in HTTP spans, request inspection and error messages. Also redact URL credentials in client spans, request inspection and errors. Request URLs sent over the wire are unchanged.

Move AWSAccessKeyId, Signature, sig and X-Goog-Signature from Headers.CurrentRedactedNames to the new UrlParams.CurrentRedactedNames. A custom list replaces these defaults. Add UrlParams.isRedactedName, UrlParams.redact and UrlParams.redactUrl for explicit redaction. - Updated dependencies [f665607, dbf442b, 74d1930, a03afb6, f159284, 5d301cc, cd74ea2, 925cf64, 54c51d9, 995c104, 816575e, acc7860, 0df6e06, 52a7d3c, ec831c3, 3abc63e, a841b8b, 91efea7, e271997, 7719bda, 563397f, 65b04f8, c2859bf, c462214, d1ad2c7, 12be65e, 352618a, 2a8ec8b, 8dec89d, f05642f, 3ad9a0c, dba4e52, 7ca8224, 65d20dd, e3ff963, bc454a3, 793d89e, ec9332b, f2b3d8a, cb2cf5f, b8c201d, 118c9c4]: - effect@4.0.5 - @effect/platform-node-shared@4.0.5

4.0.4

Patch Changes

4.0.3

Patch Changes

  • #8973 9dbd07e Thanks @fubhy! - Accept address inputs in Dns.reverse and name server inputs in the platform Dns services, and add Dns.nameServerFromInput.

  • #8880 a9b5148 Thanks @fubhy! - Add experimental Host, Dns, and AddressResolver modules to effect/net for host parsing, DNS queries, and endpoint resolution, with Node, Bun, and Deno services. DNS operations accept and normalize domain-name strings; endpoint resolution also accepts host:port strings. Add scoped IPv6 literals and host and DNS record schemas, including JSON codecs for records.

Provide the services explicitly; they are not included in the platform *Services layers. Use NodeAddressResolver.layer.pipe(Layer.provideMerge(NodeDns.layer)) to provide both Node services.

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Patch Changes

  • #8598 988c467 Thanks @tim-smart! - Close server WebSockets with 1000 on success, 1001 on interruption, or 1011 on failure, while preserving explicit close codes. HTTP request scopes retain the handler's failure exit through response handling and middleware.

  • #8633 2c552f2 Thanks @IMax153! - Effect 4.0 is the first stable release of Effect v4. It replaces the 4.0.0 beta and release-candidate series, whose per-release notes remain below under the 4.0.0-beta.* and 4.0.0-rc.* headings. To upgrade from Effect 3, follow the migration guide.

Packaging and versioning

  • All Effect packages share one version number and are released together. Use the same version of effect and every @effect/* package.
  • @effect/platform, @effect/rpc, @effect/cluster, @effect/cli, @effect/ai, @effect/sql, @effect/workflow, @effect/experimental and similar packages are merged into effect. Separate packages remain only for platforms (@effect/platform-*), SQL drivers (@effect/sql-*), AI providers (@effect/ai-*), framework bindings (@effect/atom-*), OpenTelemetry, Vitest and tooling.
  • Modules such as effect/http, effect/http-api, effect/rpc, effect/cluster, effect/workflow, effect/ai, effect/cli, effect/sql and effect/schema import from effect/<area>. APIs tagged @stability unstable may have breaking changes in minor releases. APIs without a stability tag follow semver.
  • APIs that expose a third-party dependency are tagged @stability unstable, because that dependency's releases can change them. This covers NodeRedis, DenoRedis, BunRedis, @effect/platform-node/Undici and the undici dispatcher APIs, the ws options and re-exports in the platform packages, driver-specific options and clients in @effect/sql-clickhouse, @effect/sql-d1, @effect/sql-libsql, @effect/sql-mssql, @effect/sql-mysql2, @effect/sql-pglite and @effect/sql-sqlite-do, the provider clients, models and generated schemas in the @effect/ai-* packages, @effect/opentelemetry, and the vitest re-export in @effect/vitest.
  • effect has no runtime dependencies.
  • New packages in v4: @effect/platform-deno, @effect/sql-pglite, @effect/ai-openai-compat, @effect/ai-typesafe, @effect/atom-react, @effect/atom-solid, @effect/atom-vue, @effect/openapi-generator and @effect/doctest. @effect/docgen now lives in this repository.

Core

  • The fiber runtime was rewritten for lower memory use and faster execution, with smaller bundles and better tree-shaking.
  • Services are defined with Context.Service, FiberRef is replaced by Context.Reference, Cause has a flat structure, and many combinators were renamed. See the migration guide for the full list.
  • Software transactional memory is built into Effect.tx, with TxRef, TxQueue, TxHashMap, TxPubSub, TxSemaphore and related Tx* data types.
  • Clock separates wall-clock time from monotonic time.
  • New modules include Semaphore, Latch, LayerRef, ErrorReporter, ByteSize, Newtype and Crypto. Arbitrary is now a native property-based testing module and no longer depends on fast-check.

Schema

  • Schema v4 is a new implementation with faster parsing, class-based schemas, make constructors on every schema, and effectful decoding with services.
  • SchemaRepresentation powers JSON Schema (Draft-04, Draft-07, 2020-12 and OpenAPI 3.0/3.1) import and export, TypeScript code generation, and AI structured output.
  • SchemaBinary provides a compact binary codec and is the default wire format for cluster transports.
  • Optional JIT and AOT schema compilers are available as experimental modules.

Platform, HTTP and RPC

  • HttpApi supports typed response headers, streaming and SSE responses, the HTTP QUERY method, HttpApiTest for in-memory testing, and much faster type checking for large APIs.
  • The HTTP modules add static file serving, response compression, rate-limited clients and graceful server shutdown.
  • Socket has a pull-based reader with backpressure and STARTTLS support. Network addresses are modeled by effect/net.
  • RPC serialization is schema-aware and supports server-originated requests and notifications.
  • @effect/platform-deno adds full Deno support. The Node, Bun, Deno and browser packages all provide the platform Crypto service, and the browser package adds IndexedDB support.

Cluster and Workflow

  • Workflows can be declared with class syntax, and DurableQueue and an in-memory WorkflowEngine are available.
  • Runner memory can be bounded with ShardingConfig limits. Shutdown, entity movement and persisted replies are more reliable.

SQL

  • @effect/sql-pg uses a built-in PostgreSQL client with pipelining, prepared statements and binary codecs, and no longer depends on pg.
  • @effect/sql-sqlite-node uses Node's built-in node:sqlite and requires Node 22.16 or newer.
  • SqlError exposes structured reasons such as UniqueViolation.

AI

  • effect/ai adds EmbeddingModel, the DecisionModel classification and rating API, dynamic tools and tool approvals.
  • The MCP server supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions and typed tool output.
  • Provider packages cover Anthropic, OpenAI, OpenAI-compatible APIs and OpenRouter.

CLI, Atom, observability and testing

  • effect/cli adds global flags, command aliases and examples, an interactive wizard mode, and shell completions for Bash, Zsh and Fish.
  • effect/reactivity and the @effect/atom-* bindings add SSR hydration, stale-while-revalidate atoms and serializable RPC and HttpApi queries.
  • The OTLP exporters can be configured with standard OpenTelemetry environment variables, and @effect/opentelemetry aligns logs and spans with the OpenTelemetry specification.
  • @effect/vitest runs property tests with the native Arbitrary module and supports Vitest fixtures.

Requirements

4.0.0-rc.118

Patch Changes

4.0.0-rc.117

Patch Changes

4.0.0-rc.116

Patch Changes

  • #8254 77a5612 Thanks @tim-smart! - Fix file response content types: honor the contentType option and preserve explicit headers, including MIME types set by HttpStaticServer. The default HttpPlatform.layer now infers missing content types from file extensions.

Web file responses on the default, Node, and Deno platforms prefer explicit content types, then nonempty File.type, then the file extension.

Removed the unused contentLength option from HttpServerResponse.file; lengths are calculated from the file and requested range. - Updated dependencies [c19c63f, 8cb0a4f, 8f420bb, 05a6405, 1393080, ccae354, 553c403, 45b5103, 77a5612, 1076170, f110af1, 0045152, 51d4a2f, 4d4c4e8, ccfe152, d30a0c8, 84fe64a, 49e4b37, 49e4b37, a2c4154, 23a58c0, feef90c, 755e863, 49e4b37, 9ad9891, 0beded0, 2940742, 63c1566]: - effect@4.0.0-rc.116 - @effect/platform-node-shared@4.0.0-rc.116

4.0.0-rc.115

Patch Changes

4.0.0-rc.114

Patch Changes

4.0.0-rc.113

Patch Changes

  • #7463 0d083ba Thanks @tim-smart! - Remove the mime runtime dependency. The new effect/unstable/http/Mime module provides top-level lookup functions backed by a vendored standard MIME registry.

  • #7477 be0f822 Thanks @candrewlee14! - Allow sockets to use browser, Bun, and Node WebSocket implementations without consumer casts. Platform constructors now support typed opening-handshake headers where available.

  • #8096 cce221e Thanks @tim-smart! - Update dependencies to their latest compatible versions.

  • #7650 5c7eed0 Thanks @tim-smart! - Reduce HTTP server allocation churn when tracing is not configured and for requests that complete synchronously.

  • #7772 1e92dbd Thanks @tim-smart! - Improve HTTP server throughput by reducing routing, request handling, response construction, and body encoding overhead. Add Effect.withFiberSucceed for synchronously computing successful values from the current fiber. Copy pooled byte views by their exact range when exposing ArrayBuffer values.

  • #7511 a4bb2aa Thanks @tim-smart! - Add NodeSocket.makeTls, NodeSocket.makeTlsChannel, and NodeSocket.layerTls for TLS client connections.

These mirror the existing makeNet family but dial tls.connect, so they take the full tls.ConnectionOptions set: trust anchors (ca), client certificates (cert / key), ALPN protocols, and servername. The socket opens once the handshake completes; a failed handshake fails with a SocketOpenError.

  • #7512 5664c94 Thanks @tim-smart! - Add NodeSocketServer.makeTls and NodeSocketServer.layerTls for TLS socket servers.

  • #7514 b76a1cf Thanks @tim-smart! - Add Socket.upgrade, for upgrading tcp sockets using STARTTLS

  • #7525 53843f6 Thanks @fubhy! - Add ByteSize module and use it across the ecosystem

  • #8110 4ab4e83 Thanks @tim-smart! - Prevent precision loss in Node/Bun filesystem operations and HttpPlatform file responses.

  • #8148 7999b07 Thanks @tim-smart! - Preserve the response Content-Type when compressing file, raw, stream, and byte-array responses on Node, Bun, Deno, and the web platform, including headers overridden after body construction.

  • #7528 dd6ce2d Thanks @Kashkovsky! - Defer loading Undici until an Undici-backed layer is acquired, preventing Node HTTP client imports from replacing Node's global fetch dispatcher. Import Undici APIs from @effect/platform-node/Undici instead of the package root.

  • #7524 0a08ae0 Thanks @fubhy! - Add NetAddress under effect/unstable/net for MAC, IP, internet socket, and Unix socket addresses, with checked parsing, schemas, equality, canonical string serialization, and URL formatting. Companion modules IpInterface and IpNetwork represent IP interfaces and CIDR networks.

HTTP and socket servers now expose NetAddress.SocketAddress. Replace TCP hostname access with NetAddress.formatIp(address.address) and use UnixPathAddress.path for Unix sockets. URL helpers bracket IPv6 addresses and reject scoped IPv6. Bun and Deno HTTP server layers can now fail with ServeError when listener address conversion fails.

PostgreSQL inet values now use IpInterface; cidr values use IpNetwork and reject addresses with host bits set.

  • #7730 e406217 Thanks @kitlangton! - Forward custom and empty status text from NodeHttpServer responses.

  • #7716 f93d051 Thanks @kitlangton! - Preserve response bytes when selecting the text reader in Node HTTP clients.

  • #7810 9252a00 Thanks @kitlangton! - Preserve reply payloads sent through NodeWorkerRunner.sendUnsafe.

  • #7487 ba53b64 Thanks @tim-smart! - Redesign Socket around a scoped, pull-based reader with transport backpressure.

Socket now exposes reader and writer. Client reader acquisition dials and yields a pull of non-empty batches: one buffer for TCP and one entry per WebSocket frame. TCP applies backpressure while paused; pausable WebSockets pause at highWaterMark (64 KiB by default) and resume after draining. Browser WebSockets cannot pause, so they can fail with SocketReadError at a configured highWaterMark. Writes await native drain signals and batch with cork / uncork where available.

### Breaking changes

  • Socket.run, Socket.runString, and Socket.runRaw are removed. Acquire socket.reader (or Socket.readerBytes / Socket.readerString) in a scope and pull in a loop. Code before the first pull replaces onOpen.
  • Socket.make now takes { reader, writer }. The writer acquisition is infallible and yields a Writer with write and writeAll; both operations can still fail with SocketError.
  • Every close fails the pull with SocketError wrapping SocketCloseError. The close-code predicates are removed; use Effect.retry around the scoped read loop to reconnect.
  • Socket.toChannel and Socket.toChannelString now read from the pull and fail on close. Socket.toStream is added for read-only consumption.
  • fromWebSocket drops the onInitialRun option; SendQueueCapacity is removed.
  • Accepted server sockets pause immediately. Their reader attaches to the existing connection and cannot reconnect after close.

    • #7461 b4d5398 Thanks @tim-smart! - Remove the MessagePack encoding and RPC serialization APIs together with the msgpackr dependency. Event-log persistence and remote messages now use SchemaBinary, and cluster transports use SchemaBinary unless NDJSON is selected explicitly.
    • #7496 ca6f0dc Thanks @nikhilsnayak! - Add HttpClientResponse.url, including query parameters and excluding the hash. When redirects are followed, it reports the final URL.
    • #7427 1a2ccee Thanks @tim-smart! - Use SchemaBinary as the default RPC serialization for TCP cluster connections, including configurable frame limits.

Cluster payloads are encoded with the binary codec on the wire. When a persisted reply cannot be encoded for JSON storage, the defect fallback that storage records is now also the reply delivered to waiting callers, so live replies always match what was persisted.

SchemaBinary codecs are memoized by schema identity and wire mode, so per-message codec requests reuse the derived codec instead of rebuilding it.

4.0.0-rc.112

Patch Changes

4.0.0-rc.111

Patch Changes

4.0.0-rc.110

Patch Changes

4.0.0-rc.109

Patch Changes

  • #7221 d8d3fdc Thanks @WikiRik! - Migrate NodeRedis from ioredis to redis (node-redis), replacing the peer dependency with redis: >=5.0.0 <7.0.0.

layer and layerConfig now accept RedisClientOptions: socket settings move under socket, db becomes database, command methods are camelCase, and arbitrary commands use sendCommand. Protocol selection follows the installed node-redis version's default.

Layers connect while being built and can fail with RedisError. Initial connections fail fast unless a socket.reconnectStrategy is provided; after ready, the default reconnect behavior applies. Scope finalization uses close(), so in-flight or blocking commands can delay closure. - Updated dependencies [a0743f2, 17892e7, 4d8a230, 2ae5a96, f21f9c9, 18270dd, 26db404, 2670398, 3702bed, ccae60e, 6ff5396]: - effect@4.0.0-rc.109 - @effect/platform-node-shared@4.0.0-rc.109

4.0.0-rc.108

Patch Changes

4.0.0-beta.107

Patch Changes

4.0.0-beta.106

Patch Changes

4.0.0-beta.105

Patch Changes

4.0.0-beta.104

Patch Changes

4.0.0-beta.103

Patch Changes

  • #6723 081f4d8 Thanks @tim-smart! - add platform literal to HttpPlatform

  • #6802 f1bc827 Thanks @tim-smart! - Allow configuring cluster RPC serialization buffer limits.

  • #6898 c0a1534 Thanks @tim-smart! - Add HTTP response compression support. Node.js, Bun, and Deno use asynchronous node:zlib one-shot compression for byte-array bodies, preserving an exact Content-Length; stream and raw bodies remain streaming transforms.

  • #6680 23e176a Thanks @tim-smart! - Fix worker runner disconnect notifications and event listener cleanup.

  • #6691 6a5e86f Thanks @t3dotgg! - Allow configuring the WebSocket server in NodeHttpServer and BunHttpServer.

Both servers now accept a websocket option that is forwarded to the underlying implementation, with the wiring/lifecycle options the server manages excluded from the type:

  // Node: forwarded to the `ws` WebSocketServer
  NodeHttpServer.layer(() => createServer(), {
    port: 3000,
    websocket: { perMessageDeflate: true },
  });

  // Bun: merged into Bun.serve's websocket handler
  BunHttpServer.layer({
    port: 3000,
    websocket: { perMessageDeflate: true },
  });

4.0.0-beta.102

Patch Changes

  • #6618 7a03c89 Thanks @tim-smart! - unstable/cluster: hash over-length SQL message deduplication keys to prevent message_id overflow, closes #6317.

The composed request deduplication key (entityType/entityId/tag/primaryKey) can legally exceed the 255-character message_id column — the address columns alone allow 458 characters before the RPC primary key is appended. SqlMessageStorage now stores a SHA-256 digest (64 hex characters) of the composed key in the unique message_id column when the key exceeds 255 characters, so keys of any length work on PostgreSQL, MySQL, MSSQL, and SQLite. Keys that fit are stored as plaintext, byte-compatible with rows written by previous versions, so existing deployments keep deduplicating with no migration or schema change.

SqlMessageStorage.layer/layerWith (and consequently SingleRunner.layer) now require Crypto.Crypto. The Node and Bun cluster convenience layers provide the platform Crypto implementation internally, so their requirements are unchanged.

4.0.0-beta.101

Patch Changes

4.0.0-beta.100

Patch Changes

4.0.0-beta.99

Patch Changes

4.0.0-beta.98

Patch Changes

4.0.0-beta.97

Patch Changes

4.0.0-beta.96

Patch Changes

4.0.0-beta.95

Patch Changes

4.0.0-beta.94

Patch Changes

4.0.0-beta.93

Patch Changes

4.0.0-beta.92

Patch Changes

4.0.0-beta.91

Patch Changes

4.0.0-beta.90

Patch Changes

4.0.0-beta.89

Patch Changes

4.0.0-beta.88

Patch Changes

4.0.0-beta.87

Patch Changes

4.0.0-beta.86

Patch Changes

4.0.0-beta.85

Patch Changes

4.0.0-beta.84

Patch Changes

4.0.0-beta.83

Patch Changes

4.0.0-beta.82

Patch Changes

4.0.0-beta.81

Patch Changes

4.0.0-beta.80

Patch Changes

4.0.0-beta.79

Patch Changes

4.0.0-beta.78

Patch Changes

4.0.0-beta.77

Patch Changes

4.0.0-beta.76

Patch Changes

4.0.0-beta.75

Patch Changes

4.0.0-beta.74

Patch Changes

4.0.0-beta.73

Patch Changes

4.0.0-beta.72

Patch Changes

4.0.0-beta.71

Patch Changes

4.0.0-beta.70

Patch Changes

4.0.0-beta.69

Patch Changes

4.0.0-beta.68

Patch Changes

  • #2180 0176eaf Thanks @IMax153! - Add a platform-agnostic Crypto service for cryptographic random bytes, secure random generators, UUIDv4 / UUIDv7 generation, and digest operations. UUID generation should now use the Crypto service's randomUUIDv4 or randomUUIDv7, which format bytes from the platform Crypto service; UUIDv7 also uses the Clock service timestamp. Random.nextUUIDv4 has been removed because the base Random service is not cryptographically secure.

  • Updated dependencies [af8267f, 0176eaf, 0176eaf, f136bb7, 6f38f07, aec9c40]:

4.0.0-beta.67

Patch Changes

4.0.0-beta.66

Patch Changes

4.0.0-beta.65

Patch Changes

4.0.0-beta.64

Patch Changes

4.0.0-beta.63

Patch Changes

4.0.0-beta.62

Patch Changes

4.0.0-beta.61

Patch Changes

4.0.0-beta.60

Patch Changes

4.0.0-beta.59

Patch Changes

4.0.0-beta.58

Patch Changes

4.0.0-beta.57

Patch Changes

4.0.0-beta.56

Patch Changes

4.0.0-beta.55

Patch Changes

4.0.0-beta.54

Patch Changes

4.0.0-beta.53

Patch Changes

4.0.0-beta.52

Patch Changes

4.0.0-beta.51

Patch Changes

4.0.0-beta.50

Patch Changes

4.0.0-beta.49

Patch Changes

4.0.0-beta.48

Patch Changes

4.0.0-beta.47

Patch Changes

4.0.0-beta.46

Patch Changes

4.0.0-beta.45

Patch Changes

4.0.0-beta.44

Patch Changes

4.0.0-beta.43

Patch Changes

4.0.0-beta.42

Patch Changes

4.0.0-beta.41

Patch Changes

4.0.0-beta.40

Patch Changes

4.0.0-beta.39

Patch Changes

4.0.0-beta.38

Patch Changes

4.0.0-beta.37

Patch Changes

4.0.0-beta.36

Patch Changes

4.0.0-beta.35

Patch Changes

4.0.0-beta.34

Patch Changes

4.0.0-beta.33

Patch Changes

4.0.0-beta.32

Patch Changes

4.0.0-beta.31

Patch Changes

  • #1710 990df2c Thanks @gcanti! - Schema: toCodecJson now returns Codec<T, Json, RD, RE> instead of Codec<T, unknown, RD, RE>.

Http: the json property on HttpIncomingMessage, HttpClientResponse, HttpServerRequest, and HttpServerResponse now returns Effect<Schema.Json, E> instead of Effect<unknown, E>.

4.0.0-beta.30

Patch Changes

4.0.0-beta.29

Patch Changes

4.0.0-beta.28

Patch Changes

4.0.0-beta.27

Patch Changes

4.0.0-beta.26

Patch Changes

4.0.0-beta.25

Patch Changes

4.0.0-beta.24

Patch Changes

4.0.0-beta.23

Patch Changes

4.0.0-beta.22

Patch Changes

4.0.0-beta.21

Patch Changes

4.0.0-beta.20

Patch Changes

4.0.0-beta.19

Patch Changes

4.0.0-beta.18

Patch Changes

4.0.0-beta.17

Patch Changes

4.0.0-beta.16

Patch Changes

4.0.0-beta.15

Patch Changes

4.0.0-beta.14

Patch Changes

4.0.0-beta.13

Patch Changes

4.0.0-beta.12

Patch Changes

4.0.0-beta.11

Patch Changes

4.0.0-beta.10

Patch Changes

4.0.0-beta.9

Patch Changes

4.0.0-beta.8

Patch Changes

4.0.0-beta.7

Patch Changes

4.0.0-beta.6

Patch Changes

4.0.0-beta.5

Patch Changes

4.0.0-beta.4

Patch Changes

4.0.0-beta.3

Patch Changes

4.0.0-beta.2

Patch Changes

4.0.0-beta.1

Patch Changes

4.0.0-beta.0

Major Changes

Patch Changes