github Effect-TS/effect effect@4.0.4

Patch Changes

  • #9030 7547a99 Thanks @effect-bot! - Bound sparse array indices in SchemaGetter.makeTreeRecord, used by Schema.fromURLSearchParams and Schema.fromFormData. An indexed container with more than 20 holes is now returned as an object keyed by its index strings instead of a sparse array, and appending after the maximum array index no longer throws.

  • #9083 711719d Thanks @effect-bot! - Bound import-time stack detection probes to the frames they inspect, restoring the caller's stack trace limit afterward.

  • #9041 8f1ea52 Thanks @tim-smart! - Stop grouped RequestResolvers from retaining batch keys for the lifetime of the resolver. Equal keys are now matched by the pending batch map, so a key is dropped as soon as its batch stops pending, including after interruption.

  • #9010 c93485e Thanks @effect-bot! - Support an explicit client servername for TLS socket upgrades without changing hostname behavior when omitted.

  • #8990 37e088f Thanks @bastiankistner! - Use decoded response aliases in generated HTTP clients. Render bare numbers with a standard leading finite check as Schema.Finite, preserving annotations and other checks.

  • #8998 9314666 Thanks @gchen0002! - Optimize Context.pick for zero or one service.

  • #9048 a0a26b7 Thanks @jayhemnani9910! - Fix zoned DateTime.add and DateTime.subtract to apply hours, minutes, seconds and milliseconds as elapsed time across DST transitions.

  • #9008 cc843ea Thanks @effect-bot! - Add toolCallValidation: "deferred" for callers using disableToolCallResolution: true. Model-generated tool calls return with unknown parameters, including invalid parameters and undeclared tool names, even without a toolkit. Supported by the Anthropic, OpenAI, and OpenAI-compatible providers. Strict validation remains the default; provider-executed calls remain validated.

  • #8979 ab90be9 Thanks @tim-smart! - Add experimental effect/graphql with typed operations, middleware, HTTP and subscription transports, partial results, serializable errors and cursor pagination.

  • #9052 a59b971 Thanks @Tarekkharsa! - Fix HttpClient.withRateLimiter reading a Retry-After HTTP date as a number of seconds.

  • #9031 fccf660 Thanks @effect-bot! - Add McpServer.layerHttpRequestScoped for serverless hosts such as Cloudflare Workers. Each POST is served by an MCP server owned by that request, so no fiber or timer outlives the request. The new layer accepts only sessionless protocol adapters such as v2026_07_28, with no subscription or session termination options. McpServer.layerHttp retains its long-lived server behavior.

  • #9081 1bfd8fd Thanks @hsyntax! - Tighten colliding bounds in place when exporting JSON Schema, instead of moving them into allOf. This applies to numeric, length, item-count and property-count bounds, and an inclusive or exclusive bound implied by the other on the same side is dropped. For example, Schema.Natural now exports minimum: 0, and Schema.Int.check(Schema.isGreaterThan(0)) exports exclusiveMinimum: 0 without the safe-integer minimum.

  • #9013 78e4c43 Thanks @jayhemnani9910! - Fix Multipart.toPersisted failing for uploads named . or .. and for long multi-byte file names.

  • #8991 fde67a1 Thanks @fubhy! - Add NetAddress.loopbackAddresses.

  • #8992 118deef Thanks @fubhy! - Add Host.toFullyQualified, Host.toRelative, and Host.parseHostsFile.

  • #9046 cea74c9 Thanks @effect-bot! - Persist outgoing cluster messages while the locally assigned shard is waiting for its lock.

  • #9056 b7c1ac6 Thanks @tim-smart! - Prompt.fromResponseParts now keeps streamed text and reasoning in stream order, and keeps partial text from unended text blocks.

  • #8997 f837966 Thanks @effect-bot! - Release the durable waits of losing DurableDeferred.raceAll branches once the race settles, so a late completion such as a losing DurableClock.sleep no longer preempts and replays the continuing workflow

  • #9053 09738f4 Thanks @Tarekkharsa! - Honor Retry-After in HttpClient.retryTransient.

  • #9019 22e7129 Thanks @effect-bot! - Allow configuring Scalar's preferred authentication security scheme through HttpApiScalar without a TypeScript cast.

  • #9069 fdcb47e Thanks @effect-bot! - Fix cluster Sharding startup accessing storage-loop state before initialization, preventing a scheduler-dependent ReferenceError and delayed initial storage reads.

  • #9049 fc349a1 Thanks @jayhemnani9910! - Fix Sink.takeUntil and Sink.takeUntilEffect dropping the element after a match. They now stop at the match and return the remaining input as leftovers.

  • #8979 ab90be9 Thanks @tim-smart! - Add dispatchEmptyNamedEvents to Sse decode options. It also dispatches an event that sets an event: name but has no data: line, which protocols such as graphql-sse use for complete.

  • #9065 892d14d Thanks @Abdullah1738! - Fix quadratic parsing time in Sse.makeParser and Sse.decode for long lines split across many chunks.

  • #9066 077c557 Thanks @effect-bot! - Complete HTTP server spans synchronously before the request fiber exits, preventing completed spans from being lost during immediate runtime shutdown.

  • #9029 4a999a3 Thanks @effect-bot! - Clean up unused Anthropic bindings and make documentation-only imports type-only, preserving server-tool inputs and documentation links.

  • #9062 797696a Thanks @adam-r-kowalski! - Merge outer headers and cookies into a copy of a raw Response in HttpServerResponse.toWeb, leaving the original headers unchanged. This supports immutable headers and prevents cookies from accumulating across requests that reuse a response. Responses with nothing to merge are returned unchanged.

  • #9007 cf5179b Thanks @effect-bot! - Wake a suspended WorkflowEngine.execute caller as soon as its workflow has a final result, instead of waiting for the next suspendedRetrySchedule step. A replay that suspends again does not spend a step of the schedule. With ClusterWorkflowEngine, only callers on the runner that owns the execution are woken early; other callers keep relying on suspendedRetrySchedule.

  • #9037 e1c6053 Thanks @effect-bot! - HttpEffect.toWebHandler now interrupts a streamed response body when the request is aborted after its headers were sent, even if the body is no longer being read, which releases the request scope.

Don't miss a new effect release

NewReleases is sending notifications on new releases.