github Effect-TS/effect effect@4.0.3

Patch Changes

  • #8977 b4e5af8 Thanks @kitlangton! - Prevent crashes and premature interruption when Effect.cached, Effect.cachedWithTTL, and Effect.cachedInvalidateWithTTL are synchronously re-entered.

  • #8982 b8d6e7a Thanks @Yi-111-a! - Export CliOutput.displayWidth to measure terminal-cell widths using the same logic as built-in CLI help and tables.

  • #8933 89d5c88 Thanks @tim-smart! - Respect NO_COLOR in CLI prompts and the command wizard, suppressing color and style escapes while preserving cursor and redraw controls.

  • #8941 66257d2 Thanks @Tanner-Scadden! - Hand cluster shards off one at a time when Sharding shuts down, after their entities and singletons have stopped, so live runners can take them over sooner. The handoff is best effort: its wait is bounded, and if it times out, releaseAll attempts to release the remaining locks. A runner that is shutting down no longer acquires new shards, and releasing a shard no longer waits forever on an entity whose id is also active on another shard.

  • #8940 cd2ab19 Thanks @Tanner-Scadden! - Fix cluster shard handoffs. Interrupts and stream acknowledgements now reach requests still draining on the previous owner, and RpcServer accepts acknowledgements for active streams after a client's EOF. Volatile requests sent during a handoff wait, for at most shardLockExpiration, until the shard can be served instead of repeatedly failing with EntityNotAssignedToRunner.

  • #8897 ca068ce Thanks @effect-bot! - Add separate migration and storage layers to cluster SQL storage so applications can use tables migrated by an owner connection.

  • #8895 f686000 Thanks @tim-smart! - Serialize SchemaError as a compact object containing its tag and formatted message in JSON logs and Node inspection, without dumping schema AST nodes.

  • #8968 e052f1b Thanks @sledorze! - Avoid a redundant map copy when Context.add rebases an overlay chain.

  • #8487 c755b69 Thanks @fubhy! - Add TestCrypto.layer, which provides deterministic random operations derived from a seed while preserving a platform crypto service's digest implementation.

  • #8935 ebe487f Thanks @tim-smart! - Turn Crypto.randomUUIDv4 and Crypto.randomUUIDv7 into functions accepting an optional { format: "hex" | "bytes" } option. Call them with () for the default lowercase, hyphenated UUID string, or with { format: "bytes" } for a 16-byte Uint8Array.

  • #8926 63bfad8 Thanks @effect-bot! - Fix DurableDeferred.raceAll and DurableDeferred.into so a workflow branch continues after its result is recorded instead of stalling until a concurrently parked sibling is woken. The effect passed to DurableDeferred.into now counts as in-flight work, so a parked sibling no longer suspends the run while it runs.

  • #8921 8598157 Thanks @devangpratap! - Fix Duration.fromInputUnsafe throwing on infinite nanosecond totals. It now returns an infinite duration, and Duration.fromInput returns Some instead of None.

  • #8972 76a03f7 Thanks @devangpratap! - Fix Duration.times throwing when a nanosecond-backed duration is multiplied by a fractional or non-finite number. Fractional results round to the nearest nanosecond.

  • #8900 182e26d Thanks @effect-bot! - Add a noFollow option to FileSystem.open to reject symlinks at the final path component. Supported on Node and Bun on POSIX; Windows and Deno return BadArgument. Add { position } to File.read and File.readAlloc for concurrent reads that leave the cursor unchanged.

  • #8885 a46592a Thanks @effect-bot! - Preserve duplicate slashes in query values when FindMyWay normalizes request paths.

  • #8986 1d3419e Thanks @jayhemnani9910! - Fix histogram exporters to retain all finite boundaries and overflow observations in OTLP, and emit a single +Inf bucket in Prometheus.

  • #8932 e00eaae Thanks @tim-smart! - Defer terminal input acquisition until a prompt needs user input, so constant fallback prompts leave piped stdin untouched.

  • #8888 133ceb2 Thanks @RhysSullivan! - Return empty 200 text/event-stream responses for MCP HTTP request POSTs when cancellation withholds every reply. Return 500 for other request POSTs that end without a response.

  • #8924 a494a64 Thanks @effect-bot! - Add McpServer.layerHttp({ allowSubscriptions: false }) to disable v2026_07_28 subscriptions while keeping request-scoped progress and log notifications.

  • #8890 d6082a2 Thanks @tim-smart! - Send MCP cancellation notifications for interrupted server-to-client requests instead of internal RPC control messages.

  • #8925 ee3a350 Thanks @effect-bot! - Prevent MCP subscriptions from receiving deferred list-change notifications emitted before they subscribed, while preserving coalesced runtime changes.

  • #8955 7ba976c Thanks @effect-bot! - Allow interrupted activities to run again when the in-memory workflow engine replays a preempted execution.

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

  • #8953 d4f7dc3 Thanks @fubhy! - Add TLSA records to effect/net/Dns, with a Schema.DnsTlsaRecord schema whose JSON codec encodes the certificate association data as hex. The Node.js Dns service queries them with resolveTlsa (Node.js 22.15 or 23.9 and later); Bun, Deno, and older Node.js versions fail TLSA queries with Unsupported.

  • #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.

  • #8970 e7d84e4 Thanks @fubhy! - Add fromInput constructors to the effect/net data types.

  • #8899 0e2b988 Thanks @tim-smart! - Answer orphaned cluster workflow activity requests with Suspended instead of waiting indefinitely for replay registration.

  • #8987 84f48df Thanks @jayhemnani9910! - Omit min and max from subsequent delta histogram exports in OtlpMetrics: cumulative extrema do not describe the reported interval.

  • #8907 48ed32f Thanks @tim-smart! - Add a delay option to PersistedQueue.offer that postpones an element's first delivery in the memory, Redis and SQL stores.

  • #8904 59e58a6 Thanks @effect-bot! - Add PowerShell CLI completions with --completions powershell (alias pwsh).

  • #8409 b9e7821 Thanks @tim-smart! - Add DatagramSocket for UDP on Node, Bun, and Deno, and NetAddress.inetAddressFromNativeUnsafe for runtime-reported addresses.

  • #8943 aa811e4 Thanks @Tanner-Scadden! - Report RPC response encoding failures to ErrorReporter and include the RPC tag in client defects.

  • #8958 bfc5742 Thanks @tim-smart! - End the RPC server span with the encoding defect when a response fails to encode, instead of recording it as a client interruption.

  • #8976 f9f7a5a Thanks @juliusmarminge! - Add onPingTimeout to RpcClient.makeProtocolSocket and RpcClient.layerProtocolSocket to distinguish ping timeouts from other socket failures. It runs only when a ping timeout drops an open connection, before onDisconnect and in-flight call failures; defects are logged and ignored.

  • #8956 73fa287 Thanks @schickling-assistant! - Export Schema.isInt and Schema.Int as exact JSON Schema integers bounded by Number.MIN_SAFE_INTEGER and Number.MAX_SAFE_INTEGER. Composed bounds retain the tighter constraint, and exact integer branches preserve oneOf.

  • #8937 7ff5048 Thanks @effect-bot! - Skip startup stack probing when Error.stackTraceLimit is zero, avoiding unnecessary stack formatting during module loading.

  • #8927 7803e51 Thanks @effect-bot! - Hold the shared connection for the whole statement or stream on single-connection SQL clients, so another fiber's transaction can no longer roll back an acknowledged write or expose uncommitted rows to a plain read.

  • #8938 93410da Thanks @effect-bot! - Add Stdio.stderrIsTerminal with an overridable false default and runtime detection for Node.js, Bun, and Deno.

  • #8963 aef1d1f Thanks @tim-smart! - Add ClusterSchema.InterruptOnTermination to interrupt opted-in RPCs as soon as entity termination starts. Persisted requests resume under the next owner without saving an interrupt reply, and server-side Uninterruptible takes precedence.

  • #8917 d6d515b Thanks @Brendonovich! - Make HttpClient.withRateLimiter wait for the reported reset once a response's remaining budget is exhausted, including when a limit header is also present.

  • #8892 ea52c24 Thanks @effect-bot! - Propagate SQL transaction COMMIT errors as typed SqlError failures when cleanup succeeds. Preserve both COMMIT and cleanup errors as defects when cleanup fails, so typed recovery cannot hide an unsafe connection state.

  • #8913 7e44402 Thanks @grzegorz-naileditgames! - Reject B3 single-header and multi-header trace contexts with invalid trace or span identifiers.

  • #8978 0b17b9e Thanks @tim-smart! - Allow WebSocket clients on Node and Bun to send handshake headers alongside subprotocols through socket constructors, channels, and layers. Preserve browser-compatible constructor calls when headers are not supplied.

  • #8891 9753be9 Thanks @tim-smart! - Deliver terminal replies for persisted ClusterSchema.WithTransaction requests only after commit or clean rollback. On transaction failure, recover a committed reply or retry the request.

  • #8886 977096b Thanks @effect-bot! - Fix lost failure replies for persisted cluster RPCs using ClusterSchema.WithTransaction. Save typed failures and non-fatal defects after rollback so retries receive the stored reply. Successful replies still commit with the handler's writes.

  • #8882 cf58cb0 Thanks @devangpratap! - Fix generated Zsh completions for flag descriptions containing ].

Don't miss a new effect release

NewReleases is sending notifications on new releases.