effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
In short
20 new2 faster69 fixed
Release note
Patch Changes
Report unsupported regex patterns and their schema paths when Arbitrary sampling or property checking exhausts its discard budget.
When constructing
Arbitrary.SampleErrororArbitrary.Exhaustedvalues, include the requireddiagnosticsarray; use `` when there are no diagnostics.Shrink
Arbitrarystring counterexamples by deleting characters anywhere, and defer shrinking work until a property fails. Existing string replay tokens may need to be recorded again.Fix
Atom.kvsshowing the value from before its last write after being refreshed or remounted past its idle TTL.Add opt-in
staleTimeto HTTP and non-stream RPC atom queries and run hydrated waiting effects even withskipInitialRun.Add
Base64.encodeUnpaddedfor standard Base64 without=padding, andBase64.decodeLenientfor input in either Base64 alphabet, with or without padding.Add
BigInt.nthRootfor integer n-th roots andRational.nthRootfor exact n-th roots, each with anthRootUnsafevariant.Speed up
BigInt.sqrtandBigInt.sqrtUnsafeon large inputs.Fix
CacheandScopedCacheentries failing to expire with a provided clock when the first caller is interrupted during a shared lookup.Keep closed code blocks together when they fit in a single ChatMarkdown message.
Fix
ChatTest.failNextscheduling a fault when itstimesoption is zero.Fix
Chunk.fromIterableandTxChunk.fromIterablesharing the caller's array, so later changes to the array no longer change the chunk.Deliver workflow activity results when a reply is redelivered after a transient shard-ownership check failure or when attempts of the same activity run concurrently.
Expose each cron job's effective schedule through
ClusterCron.CronSchedule, both insideexecuteand on the registered entity.Fix persisted
Entity.keepAlive(true)requests completing prematurely on redelivery, preserving entity recovery after runner restarts.Fix field discovery and type validation across struct comparisons, schemas, commands, and collection helpers to consistently handle own enumerable string and symbol fields.
Some field maps declared with
interfaceare no longer accepted. Replaceinterface Fields { ... }withtype Fields = { ... }, or pass a plain object copy by replacingOrder.Struct(fields)withOrder.Struct({ ...fields }).Add
effect/crypto/Passwordfor storing passwords as PHC strings. ThePasswordservice hashes with Argon2id or PBKDF2 fromKdf, verifies against the algorithm and salt recorded in the stored hash, and reports when a stored hash needs rehashing under the configured algorithm.Password.decodeandPassword.encodeconvert between PHC strings andPasswordHashvalues.Decode empty CSV header cells according to the selected union member's optional fields.
Fix
DateTime.makerejecting date strings that end inUT,UTCor a US time zone abbreviation such asPDT.Fix
DateTime.makeignoring whitespace-separated time zones followed by trailing whitespace or a single non-nested comment.Parse zoneless
DateTimestrings such as2024-1-15as UTC instead of local time.Add unstable
effect/chatAPIs and Slack, Discord, WhatsApp, Telegram and Microsoft Teams adapters for chat bots, with grapheme-safe Markdown streaming, buttons, selects, modals, slash commands, private/deferred command replies, and adapter conformance testing.Fix
SqlEventLogServerEncryptedon SQL Server stalling for seconds when two instances create the same tables at once.Fix
Atom.searchParamoverwriting the restored URL when Back or Forward is pressed before a debounced write flushes.Fix an interrupted fiber losing its exit, such as a finalizer defect, when a child fiber does not stop immediately.
Fix slow
FindMyWayandHttpRouterlookups for request paths containing many encoded percent signs.The
Dievariant ofSchema.CauseReasonIsonow declaresdefectinstead oferror, matching the existing runtime shape.Fix
ClusterWorkflowEngineactivities repeatedly restarting after durable clock wakeups when using SQL storage.Fix
LayerRef.makeandLayerRef.Serviceexposing layer build errors during creation whenpreloadis omitted.Fix
Effect.raceAllandEffect.raceAllFirstnot interrupting a loser that settles the race during its own first synchronous step.Fix cluster shards remaining unavailable indefinitely when a runner's lock operations persistently fail while its heartbeat succeeds.
Fix
Metric.summaryandMetric.summaryWithTimestampaccepting NaN quantiles.Fix intermittent
SqlRunnerStorageadvisory-lock failures after Vitess sessions have been idle.Fix
Stream.flattenIterablenot closing the active iterator when downstream stops early.Fix
HashMapandHashSetoverflowing the stack for keys whose custom hashes are not 32-bit integers.Fix
HttpClientsending invalid trace headers when tracing is disabled withEffect.withTracerEnabled(false).Add
redactedParamstoHttpRouterroutes andparamstoHttpApi.RedactedNamesto redact path params in server spans and request logs.Fix
HttpRouter.serveignoring app-provided references and rebuilding app-provided layers when handling requests.Fix
HttpRouterso an explicit route takes precedence over a wildcard at its bare prefix, regardless of registration order.Fix
HttpApiClientfailing to decode single-element arrays in form-urlencoded responses and declared errors.Avoid the startup cost of
Intl.Segmenterfor CLI commands that never measure text width.Fix
ConfigProvider.fromEnv()capturing the environment when called instead of at its first lookup, which ignored variables set after import.Variables removed before the first lookup are no longer captured; use
ConfigProvider.fromEnvRecord({ ...process.env })to snapshot at a chosen moment.Fix
McpServerto list tools withdestructiveHint: falsewhenTool.ReadonlyistrueandTool.Destructiveis unset.Use a tool's
toModelOutputparts asMcpServertool resultcontentwhile preservingstructuredContentand downgrading unsupported blocks on older protocol revisions.Fix
McpServertoolkit registration copying and scanning its registration context once per tool, which made memory use and registration time grow with the square of the tool count.Allow
McpServer.toolkitandMcpServer.registerToolkitto return native MCP content blocks for selected tools without advertising an output schema.Fix
EventJournal.makeMemorydropping pending entries imported from another remote during an upload.Fix
Prompt.IntandPrompt.Numberdropping the minus sign when a zero follows it, so typing-0.05no longer submits0.05.Generate client and HttpApi operations from local OpenAPI Path Item references.
Fix
Order.StructandStruct.makeOrderignoring symbol fields when comparing and sorting records.Warn at the default log level when a failed OTLP export disables telemetry export for 60 seconds.
Fix OTLP exporters retaining a background fiber when
exportIntervalis infinite.Fix
OtlpLoggerexporting invalid trace and span IDs for logs inside spans with tracing or propagation disabled.Use
Rpc.TracingEnabledto select automatic client and server spans per procedure andremoteParentSpanto parent custom handler or middleware spans.When invoking a handler or middleware directly, pass
remoteParentSpan: undefinedif no client span context was received.Fix
Pool.makeWithTTLusage-based expiration retaining idle excess resources beyond their configured time to live.Add
ProtobufDescriptor,ProtobufDescriptorProto, andProtobufMessagefor codecs preserving names and unknown fields across proto2, proto3, and editions 2023, 2024 and 2026.Replace
reader.enter(); read(reader); reader.leave()withread(reader.delimited()). The child reader is bounded to the payload, and the parent advances past it immediately.ProtobufWriter.tagnow throwsRangeErrorfor invalid tags; supply an integer field number from 1 through 536870911 and a wire type from 0 through 5.Add
effect/protobufwithProtobufReaderandProtobufWriter, a Schema-independent reader and writer of the protobuf wire format, and speed up OTLP protobuf serialization, which now writes log record trace and span ids given as aUint8Arrayas those bytes instead of corrupting them.Deliver the last item taken from a closing queue before notifying its waiters, so a waiter cannot interrupt the take before it returns the item.
Update
HttpApiScalar.layerto Scalar 1.81.0: bundled docs omit the undeclaredAccept: */*example header, honorcustomFetch, and support hiding Ask AI withagent.disabled; the unpacked package grows by about 3.7 MB.Fix
HttpServerResponse.setStatus,removeHeaderand the cookie combinators resetting explicitcontent-typeandcontent-lengthheaders to the body's values.Serialize
Result.Successundersuccessinstead ofvalueintoJSON,JSON.stringifyand Node inspection output, matching itssuccessproperty. Code that readsvaluefrom a serializedResultshould readsuccess.Add
useSemicolonDelimiteranddecodeStaticPathoptions toFindMyWay.RouterConfig, and aFindMyWay.strictConfigpreset that turns off path normalization and matches static route text literally.Fix a stalled
RpcClientstream consumer blocking other responses and keepalive pings on its socket or worker connection.Keep RPC and MCP stdio servers answering after a malformed NDJSON line, replying with a JSON-RPC
-32700parse error and still handling the other frames.RpcSerialization'smakeUnsafeacceptsonDecodeErrorto receive malformed NDJSON frames instead of throwing, and a throwing NDJSON decode now discards its pending UTF-8 bytes.Answer
RpcServerrequests over framed HTTP, andtools/callonMcpServer.layerHttpRequestScoped, without waiting for scheduler rounds first.Fix RPC socket request and acknowledgement write failures to fail with
RpcClientErrorinstead of defects, preserving the socket error reason.Speed up failed
SchemaBinarydecoding and encoding.Add the experimental
Codegen.Modulebuilder and fix recursive initialization, name collisions, generated types, and symbol identity in schema and OpenAPI generation.Remove
SchemaRepresentation.toCodeDocument,CodeDocument,Artifact, andmakeCode. Generate schema source withCodegen.Module.addSchemasandprint; construct{ runtime, Type }directly instead of callingmakeCode.Custom
toCodecallbacks must interpolate supplied argument strings unchanged and return supported schema/type expressions. Move unsupported code, such as functions with local declarations, into imported helpers.The
@effect/openapi-generator/OpenApiTransformermodule is removed. Use theOpenApiGeneratorservice to generate from an OpenAPI spec, selecting the output withformat.Some nullable OpenAI objects, such as
Batch.errors, now strip undeclared fields and no longer expose index signatures; use their declared fields instead.Report
SchemaIssue.InvalidValuewhenSchemaGetter.encodeBase64,encodeBase64Url,encodeHex, orencodeUriComponentencounters an unpaired UTF-16 surrogate during encoding.Encode negative zero as
"-0"instead of"0"inSchema.NumberFromString,Schema.FiniteFromString, and numeric encodings derived withSchema.toCodecStringTree.Fix
Semaphoretaking quadratic time to drain a long queue of equally sized permit requests.Wrap each SQL Migrator run in a
Migrator.runtracing span with aneffect.sql.migrator.tableattribute, including runs with no pending migrations.Fix SQL Server updates failing in repositories created by
SqlModel.makeRepository.Preserve completed SSE events when a later event exceeds the size limit in the same chunk.
Fix
Stream.filterEffectpredicate indices restarting at each chunk instead of counting across the whole stream.Prevent
Stream.groupByandStream.groupByKeyfrom expiring groups while values are being queued.Fix
LanguageModel.streamTextomitting approved and denied tool results whendisableToolCallResolutionis set, causingChat.streamTextto rerun approved tools on later turns.Preserve Unicode letters, combining marks, and numbers in
Stringword-case helpers, including non-ASCII config keys.Add
String.isWellFormedandString.toWellFormed, which check for and replace unpaired UTF-16 surrogates with the native ES2024 methods when the runtime has them.Accept
Schema.Enumparts inSchema.TemplateLiteralandSchema.TemplateLiteralParser, which threw "Invalid TemplateLiteral part Enum" although their types accepted them.Fail writes with a SocketError after an accepted socket's reader is released instead of waiting for a connection that cannot reopen.
Add
TestConsolereaders for captured warning, info, debug, and trace parameters.Add
TextDiff.hunks, which groups a line diff intodiff -ustyle hunks as data, optionally with the ranges that differ within changed lines.Traverse only matching branches when looking up keys, values, or entries by Trie prefix.
Fix
Effect.txspinning instead of waiting for a transactional value to change when its body recovers fromEffect.txRetry.Add a
websocket.highWaterMarkinbound byte limit to the Bun, Deno, and Node HTTP servers. A WebSocket that cannot pause now stops reading and closes onceSocket.fromWebSocketreports ahighWaterMarkoverflow, and empty frames count as one byte. Deno WebSocket frames that arrive before the client closes are no longer lost.Allow PostgreSQL
PersistedQueueoffers to continue past the 32-bit sequence limit.Add
SharedMemoryallocation and schemas for shared typed arrays in workers.Fix
Workflow.addFinalizerfinalizers running before the workflow ends when a durable timer or deferred completes while another step is still running.Fix
Xml.decodeto fail with aSyntaxerror instead ofUnsupportedwhen an encoding declaration contradicts the bytes, and to reject a US-ASCII declaration after a UTF-8 byte order mark instead of accepting it.Add a
namespaces: "strict"option toXml.decodeandXml.decodeStringthat reports thenamespaceandlocalNameof each element and rejects documents that are not namespace-well-formed.Add
Xml.toEventsfor writing anXml.Elementtree withXml.encodeorXml.encodeString.
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.