effect
4.1.4 · 11 Nov 2026MIT66.6M / weekRepositoryHomepagenpmAtom feed
4.1.5 is the newest release of 4.x.
In short
172 breaking1 removed1 security42 new4 faster40 fixed2 internal
- Breaking
Block imports of nested internal modules in the development and published package exports. These implementation details are not public APIs; public entry points remain available.
- BreakingTo check
Preserve
Prompt.FilePartbyte and URL data when chat history is exported or persisted as JSON. Encoding now produces tagged{ _tag: "Uint8Array", base64 }and{ _tag: "URL", href }objects that decode back to their original types, andChat.Persistencereports undecodable stored history as aPersistenceErrorinstead of a defect. - Breaking
Fix the CLI lexer treating a short option cluster with an inline value, such as
-vn=3, as one unknown flag instead of-v -n=3. A single dash followed by a multi-character name, such as-num=3, is now also split into separate flags; use--num=3instead. - Breaking
Answer fresh, locally owned persisted cluster requests from a reply handler registered before the request is saved, instead of reading every local reply back from storage or polling for it. Duplicates and streams still read their replies from storage, and a dropped reply handler now falls back to storage immediately instead of waiting for the next poll.
MessageStorage.registerReplyHandlermust register its handler as soon as the effect starts. - Breaking
Journals from earlier releases migrate on first open: SQL drops the remotes table and IndexedDB upgrades to version 2. SQL needs a writable connection.
- Breaking
Encrypted event log replication now encrypts entries in batches of up to 100 entries or about 256 KB of payload, one AES-GCM call per batch, and encrypted servers store and stream those batches. Each batch authenticates its store id and plaintext entry ids. This changes the encrypted protocol, APIs and server tables without migration: upgrade encrypted clients and servers together, and start encrypted servers on fresh storage because existing per-entry rows are not read.
- Breaking
EncryptedEntryandEncryptedRemoteEntryare replaced byEncryptedBatchandEncryptedRemoteBatch, andWriteEntries.encryptedEntriesbecomesbatches. - Breaking
EventLogEncryption.encryptanddecrypttake the store id and work on batches, and thedecodeChangesoption ofEventLogRemote.makeWithreceives the store id.
Release note
Patch Changes
Allow
Response.AllParts,Response.PartandResponse.StreamPartto be called without a toolkit, decoding tool call and tool result parts for any tool name withunknownparameters and results.Fix
Array.unionWithcalling custom equivalence callbacks with values from the wrong input or in the wrong order.Speed up field copying in
Data.Class,Data.Error,Request.ClassandPersistableconstructors.Fix
AsyncResultequality treating unrelatedEqualvalues with a matching tag and hash as equal.Fix Effect atoms dropping the latest exposed success when an asynchronous run fails, so an
initialValueor a success published withget.setSelfremains available as the failure's previous success.Preserve Reactivity and global layers when replacing an atom runtime layer through registry initial values, so injected test layers retain shared invalidation and global services.
Log Atom scope finalizer failures at
References.UnhandledLogLevelwhen an atom is disposed, using the atom runtime's logger. Interruption-only cleanup is not logged.Add a
skipInitialRunoption toAtom.serializableandAtom.initialValue. A seeded effect or stream atom then keeps its hydrated or initial value instead of running on mount, until it is refreshed or a dependency changes. Factoryget(...)calls andwithReactivitykeys are still tracked; dependencies read inside the effect are tracked from its first real run.Add
Base64Url.encodePaddedand apaddingoption toSchemaGetter.encodeBase64Urlfor consumers that require padded URL-safe Base64.Encode
HttpClientRequest.basicAuthcredentials as UTF-8 before base64 encoding, so non-ASCII usernames and passwords no longer throw or get mangled.Block imports of nested internal modules in the development and published package exports. These implementation details are not public APIs; public entry points remain available.
Add the unstable
Bytesmodule withconcat,Equivalence, andOrderforUint8Arrayvalues.Stream.mkUint8Arraynow returnsUint8Array<ArrayBuffer>. Browser HTTP clients collect streamed request bodies without repeatedly copying accumulated bytes.Reduce EventLog remote replay overhead by reusing decoded conflict payloads within each batch.
Fix
Effect.cachedInvalidateWithTTLcaching a stale result when invalidated while the effect is running.Fix
Effect.callbackretaining completed suspension state, such as values received byDeferred.awaitorPubSub.take, until the next full GC.Fix
Cause.pretty,Cause.prettyErrors, loggers andrunMainoverflowing the stack when an error'scausechain is cyclic.Preserve falsy nested error causes (
0,false,"",null) inCause.prettyErrorsandCause.pretty.Fix
Channel.fromTransformStreamso an upstream failure is reported when a read is pending, instead of the error raised by aborting the transform stream.Preserve
Prompt.FilePartbyte and URL data when chat history is exported or persisted as JSON. Encoding now produces tagged{ _tag: "Uint8Array", base64 }and{ _tag: "URL", href }objects that decode back to their original types, andChat.Persistencereports undecodable stored history as aPersistenceErrorinstead of a defect.Fix child-process cleanup without
forceKillAfterto give remaining process-group members up to one second to exit after the leader exits. Clarify that waiting for the leader has no time limit and never escalates toSIGKILLwhenforceKillAfteris omitted.Fix
Chunk.getandChunk.getUnsafethrowing on in-range fractional indexes of one-element chunks, and treatNaNand infinite indexes as out of bounds.Fix the CLI lexer treating a short option cluster with an inline value, such as
-vn=3, as one unknown flag instead of-v -n=3. A single dash followed by a multi-character name, such as-num=3, is now also split into separate flags; use--num=3instead.Add
Command.validateandCliError.ValidationErrorto the unstable CLI.validatechecks the parsed input before the handler runs, for rules such as mutually exclusive flags. A failure is shown with the command help, like any parse error.Add
Flag.withNegationandFlag.withoutNegation(withParamcounterparts) to rename or remove the--no-<name>form of boolean flags in parsing and shell completions.Fix the CLI treating
--=valueas a flag with an empty name. The argument is now passed through unchanged as a plain value, so it no longer fails withUnrecognized flag: --.Allow
Command.withExamplesto take a function that receives{ commandPath }, so help examples match wherever a command is mounted.Add a
TerminalCapabilitiesreference and layer toeffect/cli; built-inCommandhelp, version, and error output now follows it, soFORCE_COLORenables color off a TTY andTERM=dumbdisables it.Fix the ClickHouse migrator creating its ledger with SQLite syntax and wrapping the run in
BEGIN TRANSACTION.Prevent
Effect.forkInandEffect.forkScopedfrom running work in an already-closed scope, even whenstartImmediatelyoruninterruptibleis enabled. They now return an interrupted fiber without executing the supplied effect.Log and retry failures when scheduling the initial ClusterCron run so transient failures no longer leave the cron stopped.
Fix
ClusterCronwithcalculateNextRunFromPrevious: truenot resuming after its pending run was lost.In this mode every run is now processed by a single
executorentity per cron job, so a restart no longer starts a second chain: runs never overlap and missed runs are caught up in order. Pending runs scheduled by earlier releases join the executor's chain. As a result,Entity.CurrentAddressinsideexecuteno longer identifies the scheduled time; use the newClusterCron.CurrentScheduledTimeservice instead, which is available in both modes.Failed runs are still retried until they succeed or are older than
skipIfOlderThan, but in this mode a failing run now blocks later runs while it is retried, instead of later runs executing alongside it.ClusterMetrics.entitiesnow reads the active entity count when metrics are snapshotted, instead of being updated by a loop once a second. The series is recorded in theMetricRegistryof the entity manager's context and removed when the entity manager shuts down.Warn when a forced cluster shard release remains pending beyond
shardLockExpiration, including the affected shards and pending entity types and singletons. Release failures now emit rate-limited warnings while preserving the requirement that teardown and lock release finish before reacquisition.Answer fresh, locally owned persisted cluster requests from a reply handler registered before the request is saved, instead of reading every local reply back from storage or polling for it. Duplicates and streams still read their replies from storage, and a dropped reply handler now falls back to storage immediately instead of waiting for the next poll.
MessageStorage.registerReplyHandlermust register its handler as soon as the effect starts.Read persisted cluster messages from storage as soon as their entity type registers, instead of waiting for the next
entityMessagePollInterval.Fix cluster shard releases waiting out
entityTerminationTimeoutwhen the shard moves while an entity is waiting to restart after a defect.Add
ClusterMetrics.shardReleaseDuration, a timer recording how long each completed shard release takes.Keep the cluster shards gauge accurate when shards are released or shard locks are lost.
Repeat the stalled forced shard release warning every
max(shardLockExpiration, 30 seconds)while the release stays pending, and add theClusterMetrics.shardsReleasinggauge (effect_cluster_shards_releasing) counting the shards a runner is still releasing.Fix a Sharding startup race that could access singleton synchronization before initialization, causing a ReferenceError and delaying shutdown.
Fix SQL Server support in cluster
SqlMessageStorage. Message claims and duplicate checks now use valid T-SQL. The SQL Server tables use filtered unique indexes instead of nullableUNIQUEconstraints, andNVARCHAR(MAX)instead ofTEXT, so keyless messages and chunked replies can be stored.Fix
ClusterWorkflowEnginelosing aWorkflow.interruptsent while a run was still saving itsSuspendedreply.Fix suspended cluster workflow scopes not being released when an execution completes. Earlier runs retain their resources through suspension and release them on completion or owner teardown, without running durable workflow finalizers on abandonment.
Remove regex lookbehind from ConfigProvider variable expansion to prevent module-loading syntax errors on Safari versions before 16.4, while preserving interpolation and escaping behavior.
Fix
Config.schemadropping record entries for numeric key schemas such asSchema.IntorSchema.Number.Fix
Cron.prevskipping an occurrence earlier in the same second as the input.Fix
DateTime.formatIsoDateandDateTime.formatIsoDateUtcdropping the day for years before 0000 or after 9999.Fix DateTime.zoneFromString rejecting "GMT" and accept compact UTC offsets without colon
Accept lowercase
zandgmtzone designators inDateTime.makeandDateTime.makeUnsafe. These strings previously had a secondZappended and were rejected.Fix
DateTimevalues in named time zones turning year zero and BCE dates into CE years.Add
DecisionModel.decideSettledto retain valid answers alongside per-decisionResultfailures (Missing,Refused,NoDistribution, orInvalid). Provider failures still fail the effect;decideremains all-or-nothing.OpenRouter now passes missing distributions to core validation. OpenAI reports refusals per decision and wrong-kind score answers as invalid rather than missing.
Update hand-built services to implement
decideSettled, handle optional providerprobabilitiesand refusal answers, and use settled outcomes instead of the removedOpenAiContentPolicyMetadataandmetadata.openai.refusedDecisions.DecisionModel.decidenow returns the responseid, themodelIdthat answered and providermetadata.OpenRouterDecisionModelreportscostand the serving provider undermetadata.openrouter.Fix
Channel.decodeTextandStream.decodeTextdropping incomplete trailing characters. Flush buffered bytes on normal completion, emitting U+FFFD by default or a defect withfatal: true.Rerun reactive queries only once per invalidation or batch flush when multiple keys match the same query, avoiding duplicate query results and atom refreshes.
Destroy the
AsyncResourcea fiber captures when it yields once the fiber resumes, so tools like vitest'sdetectAsyncLeaksno longer reporteffect/Fiberleaks.Send an initial DevTools Ping immediately so a server that only responds to client messages can complete startup without waiting for the connection timeout.
Include disposal library types in the Effect and ManagedRuntime declarations so non-Node consumers can type-check imports without explicitly enabling
ESNext.Disposable.Fix
Duration.fromInputUnsafelosing nanosecond precision for large integer tuple and object inputs.Use
Effect.fnUntracedfor internal functions that returnedEffect.gen.Document how
Effect.resultandEffect.optionhandle causes that mix typed errors with interruptions or defects, and the parameter-count rule that decides whetherEffect.promise,Effect.tryPromiseandEffect.callbackprovide anAbortSignal.Add an optional
batchKeytoEmbeddingModel.maketo group concurrentembedcalls by provider-relevant context. OpenAI and OpenAI-compatible providers now separate batches with different configuration overrides or client transforms. Undeclared context, such as per-callFetchHttpClient.RequestInit, still uses the first caller's value.Add
effect/encoding/Tarfor streaming tar decoding and encoding. Decode v7, USTAR, PAX and non-sparse GNU archives; encode USTAR with PAX headers as needed. Entry constructors use reproducible defaults.Add the experimental
Xmlmodule toeffect/encodingfor streaming XML 1.0 decoding and encoding over text or UTF-8 bytes. Decoding checks well-formedness, enforces size and depth limits, and never reads external resources or expands DOCTYPE entities.elementscollects repeated elements, such as feed items, into trees.Add experimental
effect/encoding/Zipfor streaming zip encoding and decoding. Encode and decode stored and deflated entries, with ZIP64 when needed; decoding reads entries as the archive arrives and checks each body's CRC-32 and sizes. This API may receive breaking changes in patch releases.Add the always-on
ClusterMetrics.entityMailboxSizeMaxgauge, which reports the largest mailbox size among the resident entities of each type, read when metrics are snapshotted.Add the unstable
Metric.remove,Metric.removeUnsafeandMetric.registerUnsafeAPIs for removing series and registering series whose value is read on snapshot. The OTLP and OpenTelemetry exporters now drop delta state for series that are no longer registered. Add the opt-inClusterMetrics.entityMailboxSizegauge, enabled withShardingConfig.entityMailboxMetricsor themailboxMetricsentity option, which reports the mailbox size of each resident entity and removes the series when the entity is released.Fix
Equivalence.combineAlllosing its criteria after the first comparison when given a one-shot iterable.Track the source remote of each imported entry in
SqlEventJournaland the IndexedDBEventJournal, instead of one row per entry per remote.Storage grows with entries rather than entries times remotes. An imported entry is still relayed to other remotes and never uploaded back to its source.
Journals from earlier releases migrate on first open: SQL drops the remotes table and IndexedDB upgrades to version 2. SQL needs a writable connection.
An entry acknowledged by a remote, or known to several remotes before migrating, may be uploaded to a remote once more. The server treats it as a duplicate.
Fix the memory and IndexedDB
EventJournaladvancing a remote's sequence for a batch whose callback failed, and the memory journal missing conflicts while a clock-skewed local write leaves it unordered.Encrypted event log replication now encrypts entries in batches of up to 100 entries or about 256 KB of payload, one AES-GCM call per batch, and encrypted servers store and stream those batches. Each batch authenticates its store id and plaintext entry ids. This changes the encrypted protocol, APIs and server tables without migration: upgrade encrypted clients and servers together, and start encrypted servers on fresh storage because existing per-entry rows are not read.
Breaking changes
- Breaking
EncryptedEntryandEncryptedRemoteEntryare replaced byEncryptedBatchandEncryptedRemoteBatch, andWriteEntries.encryptedEntriesbecomesbatches. - Breaking
EventLogEncryption.encryptanddecrypttake the store id and work on batches, and thedecodeChangesoption ofEventLogRemote.makeWithreceives the store id. - Breaking
EventLogServerEncrypted.Storage.writeandchangesuse batches,PersistedEntryis removed, andSqlEventLogServerEncryptedno longer acceptsinsertBatchSize.
Event journals now keep the first copy of an entry that is repeated within one remote delivery, and SqlEventJournal advances an entry's remote sequence when it arrives again later, so nextRemoteSequence passes it.
- Breaking
EventJournal.writeFromRemotenow hands itseffectthe whole batch with conflicts read up front, andEventLog.HandlerTransactionruns a replayed batch's handlers in one transaction. - Breaking
Flush EventLog reactivity invalidations once per replayed remote batch instead of once per entry.
- Breaking
Speed up UUID formatting and memoize
EventJournal.Entry.idString. - Breaking
Add
EventLog.groupBatchCompactionfor compaction across primary keys, with explicit forwarding or dropping of undecodable entries. Both compaction APIs now provideforward(entry)to preserve entries unchanged at their original batch positions. Align server compaction output ordering with client replay. - Breaking
Generate EventLog entry ids from a hybrid logical clock, so a local write always sorts after every entry committed to its journal, even when the local clock is behind.
The memory, IndexedDB and SQL journals generate each local id after the latest id in their store, without adopting it into the process's id sequence. The IndexedDB and SQL journals read it from the store, because other tabs or processes sharing the store keep their own sequence. This adds one read per
writeMany. Inside an enclosing SQL transaction, local ids also sort after its uncommitted rows, and a rollback leaves nothing behind.Clocks that run ahead are not clamped. A warning is logged when an imported id is more than 24 hours ahead of the local clock, read from the
Clockservice.If a store holds an id at the end of the UUID v7 timestamp range, local writes to that store fail with an
EventJournalErrorinstead of committing ids that sort before it.makeEntryIdUnsafethrows aRangeErroronce its own sequence passes the range. Ids created with an explicitmsecsstill clamp.
- Breaking
Order EventLog conflicts by entry id in every journal and the unencrypted server, so replicas converge. A conflict is now a stored entry for the same event and primary key with a strictly greater id, remote batches replay in id order after compaction, and compaction replacements are ordered and conflict-checked by the source entry they are anchored to.
- Breaking
Fix event log server compaction failing with an argument-limit error on large groups, and stop scanning the whole in-memory journal on replay.
- Breaking
Decode
EventJournalentry timestamps without allocating, and merge remote imports into the in-memory journal instead of re-sorting it on every batch. - Breaking
Send chunked event-log remote writes with up to four parts in flight instead of one at a time.
- Breaking
Reduce per-entry overhead in
EventLogremote replay by caching payload decoders per handler and merging handler contexts once per batch. - Breaking
Add the unstable
effect/eventlog/EventRowmodule for convergent row updates withset,patchandremoveevents. It supports single-field, composite and derived keys, per-field conflict resolution through typed storage callbacks, and compaction that drops superseded entries. The constructors return{ event, payload }, which spreads intoEventLog.writeand works as awriteManyitem or client argument.Breaking: the function returned by
EventLog.makeClientnow takes one{ event, payload }object instead of positionaleventandpayloadarguments. - Breaking
Allow event-log authentication to retry failed session-auth binding lookups after storage recovers, while continuing to cache successful lookups.
- Breaking
Skip decrypting remote changes the local event journal already stores, and pass entry bytes to WebCrypto without copying them.
EventJournalgains a requiredentriesByIdmethod, which custom journal implementations must add. - Breaking
Fail and retry an EventLog remote replay batch when an entry fails to decode or its handler fails, instead of committing the entry without applying it.
- Breaking
Speed up decoding of eventlog entries and unencrypted write frames by building instances from already validated fields. The wire format is unchanged.
- Breaking
Acknowledge event log writes instead of echoing them to the writing connection. Breaking protocol change: upgrade clients and servers together; mixed versions are unsupported.
Custom implementations must add
EventJournal.writeRemoteAcks, add encryptedStorage.entrySequences(the sequence each entry was first stored at, used to acknowledge skipped batches), and returnRemoteEntryvalues from unencryptedStorage.entriesAfter. SetfirstSequencewhen sequences start above 0. Custom remotes can still returnvoidfromwriteto confirm uploads through the change stream.SqlEventLogServerEncryptedadds a sequence column to its entry id tables, so encrypted servers still need fresh storage. - Breaking
Add
EventLog.writeManyandEventJournal.writeMany, which write a batch of local events under one lock, one handler transaction and one journal commit. Clock-based entry ids are now strictly ascending within a process. - Breaking
Document that
HttpClient.followRedirectsneedsFetchHttpClient.RequestInitwith{ redirect: "manual" }when used withFetchHttpClient. - Breaking
Wait for replaced
FiberMapandFiberHandlefibers to finish their interruption cleanup before the owning scope finishes closing. - Breaking
Fix
Fiber.runInandEffect.forkInhanging when the attached fiber closes its own scope. - Breaking
Give defects precedence when the runtime combines a typed failure with a defect, so typed-error recovery can no longer swallow a crashing finalizer or a dying concurrent sibling.
- Breaking
Fix
AtomHttpApiquery response mode inference so literal and union response modes are accepted and produce the corresponding success types. - Breaking
Fix
Atom.Serializableencode and decode types to useSchema.Json, matching the JSON codec used at runtime. - Breaking
Fix
SchemaGetter.BigIntto returnSchemaIssue.InvalidValuefor inputs that cannot be converted to a bigint. This also makesSchemaTransformation.bigintFromStringandSnowflake.SnowflakeFromStringreject invalid strings with typed schema errors instead of defects. - Breaking
Start
Stream.callbackandChannel.callbackregistration before the first pull, so synchronous listener setup no longer misses early events. Browser HTTP response stream listeners now stay installed until the stream is finalized. - Breaking
Fix Cause runtime JSON and inspection output to use
reasonsinstead offailures, including within failed Exits. Schema validation error paths now also usereasons; Cause and Exit schema encodings are unchanged. - Breaking
Preserve input order in concurrent
Effect.filterresults and recordEffect.allkeys, includingmode: "result". - Breaking
Reconnect the DevTools client after startup connection failures or dropped connections, and log connection failures at Debug level. Stop failed or pending connections on shutdown while preserving queued telemetry flushing for healthy connections.
- Breaking
Preserve nanosecond precision when parsing large decimal Duration strings in units from milliseconds through weeks, and avoid intermediate overflow when converting large finite durations to numeric units.
- Breaking
Fix
Effect.effectifydiscarding synchronous throws after a synchronous callback. These throws now become defects by default, or typed failures whenonSyncErroris provided. - Breaking
Fix encrypted SQL event-log storage to return and publish only newly inserted entries, avoiding duplicate broadcasts when clients re-upload a batch.
- Breaking
Preserve undecodable event payloads unchanged during group compaction so they do not stall replication or prevent valid events from being compacted.
- Breaking
Preserve remote replay order for unaffected events when compaction is enabled, and replay replacements in compactor write order at their source position.
- Breaking
Fix IndexedDB event journal uploads resending entries the remote has not echoed back. Upload progress is now checkpointed by insertion order, so entries imported later with older ids are still forwarded. Existing databases upgrade automatically; entries the remote has not confirmed may be uploaded once more after the upgrade.
- Breaking
Prevent
WorkflowEngine.layerMemoryfrom running duplicate compensations after workflow replays. Each replay now starts with a fresh workflow scope, as with the cluster engine, so only the final run's compensations run.Finalizers registered in runs that suspended still run once the execution finishes, in the same order, but they now observe
Exit.voidinstead of the execution's final exit. - Breaking
Align safe interruption in
WorkflowEngine.layerMemorywith the cluster engine: workflows that finish without suspending now complete normally instead of being interrupted and running compensation. Preserve unsafe interruption across suspended replays. - Breaking
Allow absolute HTTP URLs in opaque-origin documents, such as sandboxed srcdoc iframes, by ignoring an invalid inferred base URL. Preserve relative URL resolution when the document provides a valid base.
- Breaking
Fix rate limiter delay mode to charge oversized token requests against the shared store, preserving queue ordering and delay/reset timing for fixed-window and token-bucket limits.
- Breaking
Fix
RequestResolver.persistedto persist only refresh results when usingstaleWhileRevalidate. Whole-batch refresh failures now replace stale values, while refreshes that complete no entries leave the original expiry unchanged. - Breaking
Fix dependency tracking for hydrated plain serializable atoms. They now build on first read or mount like wrapped atoms, so hydrated effect and stream atoms run on mount after SSR instead of skipping that initial run.
- Breaking
Preserve fractional token counts in the Redis fixed-window rate limiter so remaining capacity, excess-request rejection, and delay reservations are calculated correctly.
- Breaking
Run each
RequestResolver.fromEffectentry with its own caller context, without inheriting another caller's services. - Breaking
Fix
Resource.autoto wait for the first scheduled run before refreshing, avoiding an extra acquisition immediately after construction. - Breaking
Fix TestSchema round-trip assertions to use schema equivalence, avoiding false failures for object prototypes and signed zeros.
- Breaking
Fix hooks and parse options being ignored or reused across calls to
Schema.toStandardSchemaV1. BothSchema.toStandardSchemaV1andSchema.toStandardJSONSchemaV1now return fresh shallow copies and compose in either order. Access statics that usethis.#fieldthrough the original class. - Breaking
Fix unordered
Stream.mapEffect,Stream.flattenEffect, andStream.bindEffectdropping in-flight results when concurrency isInfinityor an oversized positive number. These concurrency values now use the same safe bound as"unbounded", so successful completion waits for pending effects. - Breaking
Invalidate atom Stream mutation reactivity keys only after successful completion, rather than on failure, defects, interruption, or replacement by a newer write.
- Breaking
Fix unencrypted event-log replication to acknowledge already committed entries without re-running their handlers, even when storage order differs from timestamp order or entries share a timestamp. Exclude older entries from handler conflicts regardless of storage order.
- Breaking
Prevent unhandled errors from Node ws WebSockets when a pending handshake is closed after an open timeout or fiber interruption.
- Breaking
Flatten redundant nested
anyOfalternatives inSchema.toJsonSchemaDocumentoutput while preserving annotations, references, andoneOfboundaries. - Breaking
Prevent atom hydration from replacing newer AsyncResult values with older dehydrated state.
- Breaking
Fix
EventLogremote reconnects resuming from the sequence captured at startup instead of the journal's current sequence, which replayed already-written entries and re-triggered reactivity invalidations. - Breaking
Pre-response handlers and
HttpMiddleware.withLoggerDisablednow apply to exactly one server request.HttpApiTestno longer accumulates handlers across retry attempts that reuse the same client request.HttpEffect.appendPreResponseHandlerUnsafenow takes the fiber context instead of the request. - Breaking
Restart the random sequence from the seed on each evaluation of an effect wrapped with
Random.withSeed. This also ensures repeated evaluations ofTestCrypto.makeand independent builds ofTestCrypto.layerstart fresh deterministic sequences. - Breaking
Fix SQL persistence reads to check expiry on every execution, so reused
getandgetManyeffects stop returning expired entries in both SQL layouts. - Breaking
Apply GraphQL resolver batch limits independently per protocol URL and
batchKey, so interleaved lookups for different tenants or servers do not fragment each other's batches.GraphQLResolver.requestresolves each lookup's URL in the calling fiber, so lookups that rely on aContext.Referencedefault are no longer routed with another lookup's value. - Breaking
Fix
HashMap.setdiscarding equal-but-distinct replacement values. - Breaking
Load the bundled Scalar and Swagger UI assets when
HttpApiScalar.layerorHttpApiSwagger.layeris built instead of wheneffect/http-apiis imported. Importing the module no longer evaluates about 5 MB of embedded JavaScript and CSS. - Breaking
Add streaming request payloads to
HttpApi. An endpoint can declareHttpApiSchema.StreamUint8Arrayor the newHttpApiSchema.StreamNdjson({ schema })as itspayload, and the handler receives a lazyStreamthat reads the body as it pulls. Bad NDJSON lines fail the stream withHttpApiSchemaError(400). The newmaxBytesandmaxElementByteslimits fail it with the newHttpApiPayloadTooLarge(413), and acontent-lengthovermaxBytesis rejected before the handler runs.StreamNdjsonalso works as a success response.HttpApiClientsends aStreampayload without buffering it and infers the stream's requirements.HttpApiTestpasses stream payloads through unbuffered.OpenApi.fromApimarks streaming request bodies withx-effect-stream, andopenapi-generatormaps them, and NDJSON or JSON Lines bodies with anitemSchema, back toStreamUint8ArrayandStreamNdjson.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.
- Breaking
Allow undeclared
HttpServerRespondableerrors inHttpApiBuilderto render their own responses when error schema encoding fails. Oversized multipart streaming uploads now return 413 instead of 500, while declared error schemas retain precedence. - Breaking
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
MaxBytesErrorand an optionaldestroyOnOverflowsetting; their default destruction behavior is unchanged. - Breaking
Fix
HttpClient.followRedirectsdying on an invalidLocationheader; it now returns the redirect response unchanged. - Breaking
Add
HttpClientResponse.toWeb, which returns the original WebResponseof a fetch-backed response asSome, andNonefor other backends. The original body keeps runtime capabilities such as workerd's known length, so it can be written to Cloudflare R2 without copying. - Breaking
Add raw HTTP/1.1 upgrades through
HttpClientRequest.upgrade,HttpClientResponse.upgrade, the Node HTTP server, andHttpApiSchema.Upgrade. Node clients expose the upgraded connection as aSocket; HttpApi clients return{ headers, socket }and OpenAPI documents the 101 response.Custom
HttpClientResponseimplementations must addupgrade. Fetch and XMLHttpRequest reject upgrade requests with aTransportErrorbefore anything is sent; Bun and Deno servers still support only WebSocket upgrades. - Breaking
Add typed HTTP date and
Retry-Afterheader values toHeaders, and parse them consistently across the HTTP client, OTLP exporter, GraphQL client, AI clients and static server.Headers.parseHttpDate/Headers.formatHttpDateread all three RFC 9110 date formats as UTC, whatever the process time zone, and emit IMF-fixdate.Headers.parseRetryAfter,Headers.formatRetryAfterandHeaders.retryAfterDelayaccept whole non-negative seconds of any size, read exactly, or an HTTP date, and the delay is never negative. HTTP dates accept the23:59:60leap second, read as the following second.Headers.RetryAfterholds either aDuration(RetryAfterDuration) or aDateTime.Utc(RetryAfterDateTime).Headers.retryAfterDurationbuilds the first from anyDuration.Input: infinite durations throw, finite negative ones become zero, and fractional seconds are rounded up when formatted.Parse failures are reported as
Headers.HeaderParseError.Schema.DateTimeUtcFromHttpDateandSchema.RetryAfterFromStringexpose the same parsing as string codecs for HTTP API headers.Invalid
Retry-Aftervalues such as-5,1.5,1e3orInfinityare now ignored everywhere.HttpClient.retryTransientandHttpClient.withRateLimiterno longer honour fractional seconds, and the AI clients no longer produce negative or infiniteretryAfterdurations.HttpStaticServerreadsIf-Modified-SinceandLast-Modifiedas UTC; asctime dates were previously shifted by the process time zone.
- Breaking
Keep HTTP message bodies unread during inspection.
- Breaking
Document how to define
HttpMiddleware.makemiddleware that preserves app error and service types, including withEffect.fn. - Breaking
Describe
HttpRouterroute misses caused by a path parameter longer thanmaxParamLength. - Breaking
Fix HTTP response framing: omit bodies for 204, 205 and 304, and remove
content-lengthfor 204 and 205. Node now aborts responses whose bodies do not matchcontent-length. Deno and Bun preserve raw WebResponseobjects when merging headers, and Deno preserves their status and headers for HEAD requests. - Breaking
Fix HTTPS detection in
HttpServerRequest.toURLand tracing. An exacthttporhttpsinx-forwarded-prototakes precedence; otherwise, infer HTTPS fromoriginalUrl. Paths starting with//preserve the request host.Node server requests now expose an absolute
originalUrlwhen a Host header is present, fixingHttpMiddleware.searchParamsParser. Useurlinstead oforiginalUrlto read the path. Hostless requests are unchanged.For absolute-form Node requests, derive
urlandheaders.hostfrom the request target, ignoring a conflicting Host header.
- Breaking
Remove path parameter regex constraints from
HttpApiClientURLs andOpenApipaths. - Breaking
Fix
HttpApiSchema.statusforking named schemas, so a schema reused across response statuses emits a single OpenAPI component. - Breaking
Fix
Hydration.hydrateto notify existing atom subscribers immediately instead of on the next read. - Breaking
Index duplicate and conflict detection in the unencrypted event-log server once per incoming batch instead of rescanning stored history for every entry.
EventLogServerUnencrypted.Storage.entriesAfternow receives the batch as an optional third argument. The built-in storages use it to read only matching entries, and SQL storage creates a<prefix>_event_key_idxindex on startup for SQLite, Postgres and MySQL. Custom storages that ignore the argument keep working. - Breaking
Speed up conflict detection in the IndexedDB event journal. Remote writes now read only the stored entries that share an event and primary key with the batch, through a new
[event, primaryKey, id]index, and no longer re-validate stored rows. Existing databases upgrade to version 3, which only adds the index. - Breaking
Fix
Ini.parsedropping a trailing backslash from unquoted keys, values and section names. - Breaking
Isolate
AtomHttpApiandAtomRpcmutations by service ID so services sharing endpoint names or RPC tags invoke their own clients with their own arguments. - Breaking
Fix
Iterable.dedupeAdjacentandIterable.dedupeAdjacentWithoverflowing the stack on long runs of equal elements. - Breaking
Add
JsonArraytoeffect/encoding. Its decoders stream the elements of one JSON array, at the root or selected by a JSON Pointer, without buffering the whole document; its encoders write a stream of values as one JSON array. - Breaking
Add
includeAnnotationKeytoSchemaRepresentation.fromJsonSchemaDocumentandfromJsonSchemaMultiDocumentto preserve selected custom JSON metadata as schema annotations. Selected annotations survive normalization of retained values and can be re-exported with the exporter's matching option. Discarded annotated references no longer force resolution, while surviving annotated circular aliases are consistently rejected, including annotations introduced throughallOf. - Breaking
Made catchIf not put Refinement function arg as generic Err param
- Breaking
Fix
Effect.fromOptionto evaluate a customonNoneerror factory on each execution rather than during construction. Exceptions thrown by the factory now become runtime defects. - Breaking
Fix
ManagedRuntimeinterrupting requests that dispose it before their first async step. - Breaking
Add the experimental
McpClientandMcpClientErrormodules, a scoped MCP client for the2025-11-25and2026-07-28protocols over stdio or Streamable HTTP. It discovers tools, prompts and resources, calls tools with optional schema decoding, and exposes discovered tools to a language model throughMcpClient.toolkit.MCP schemas now check
_meta,structuredContent, capability records and other JSON-valued fields only one level deep when decoding, and type them asunknownorReadonly<Record<string, unknown>>.McpServerstill rejects non-JSON tool results when it serializes 2026-07-28 responses. - Breaking
Stop publishing a non-recursive MCP tool schema root in
$defsas well as inline, sotools/listno longer sends it twice. A customtoJsonSchema$refinto the root's own definition, such as#/$defs/Note/properties/titlewhenNoteis the tool schema, no longer resolves. - Breaking
Memoize composed layers by identity, as in v3.
Layer.provide,Layer.provideMergeandLayer.mergeAll(and the operators built on them) now check theMemoMap, so a composed layer referenced from several parents is built once per memo map instead of once per path. Deeply shared.Default-style layers no longer rebuild their whole chain on every path, which could leave millions of scopes open at startup.A composed layer that is shared now shares everything inside it, including dependencies wrapped in
Layer.fresh. Wrap the composed layer itself inLayer.freshto get a separate copy. As with leaf layers, a shared build runs on the first requester's fiber, so if that fiber is interrupted, every requester waiting on the shared build sees the interruption. - Breaking
Fix
WorkflowEngine.layerMemorysointerruptUnsafecompletes running and suspended workflows with an interrupted exit without requiring an external wake. - Breaking
Fail SQL migrations with a typed
MigrationErrorinstead of a defect, soEffect.catchTag("MigrationError")and retries can handle them. - Breaking
Fix
Model.ClassandVariantSchemaclass.extendto accept variant fields and regenerate every variant schema from the merged fields. - Breaking
Fix SQL Server deadlocks in the SQL
PersistedQueuestore. Offers no longer use a serializableMERGE, and claims skip rows locked by other claims or settlements. - Breaking
Fix
MultipartParserhandling ofContent-Disposition: decode RFC 8187filename*values with an optional language tag in UTF-8 or ISO-8859-1, and report malformed disposition headers asInvalidDispositioninstead of silently producing a nameless field. - Breaking
Ndjsonbyte decoders split lines on raw bytes and decode each line as strict UTF-8. They accept\n,\r\nand a bare\r, skip a leading BOM, and take amaxLineBytesoption.NdjsonErrornow has areason("InvalidJson","InvalidUtf8"or"LineTooLarge") and anunterminatedflag. Byte and string decoders emit the lines before the first bad line, then fail. - Breaking
Add non-retryable
AiError.InvalidResponseErrorfor provider response schema and SSE decoding failures, with optional HTTP context; model-generated output validation remains retryable. Update exhaustive matches onAiErrorReasonto handle the new tag, and update serialized-error consumers to accept it. - Breaking
Fix
Number.nextPow2returning the wrong power of two for some large inputs, such as2 ** 29and2 ** 52 + 1. - Breaking
Render bare numbers with a standard leading integer check as
Schema.Int, preserving custom annotations and other checks. Only emit thedecodeErrorhelper in generated HTTP clients when an operation has error responses. - Breaking
Add an
includeAnnotationKeyoption toOpenApi.fromApithat selects custom schema annotation keys, such asx-*vendor extensions, to include in the generated OpenAPI schemas. It mirrors theSchema.toJsonSchemaDocumentoption of the same name, whichfromApipreviously did not forward. - Breaking
Support the nullable single-member
allOftooling convention inJsonSchema.fromSchemaOpenApi3_0when no stringtypeoranyOfis present. Sibling constraints are preserved and may still reject null. - Breaking
Fix OTLP integer attributes outside the signed 64-bit range causing collectors to reject the export. They are now sent as
doubleValuefor numbers andstringValuefor bigints, and large in-range numbers keep their exact value in JSON. - Breaking
Fix
OtlpSerialization.layerJsonwritingNaNandInfinityasnull, which made OTLP collectors reject the whole export. - Breaking
Make overlapping
ManagedRuntime.disposeandManagedRuntime.disposeEffectcalls wait for the disposal in progress, and make thedisposefunction returned byHttpEffect.toWebHandlerLayerWith(andHttpRouter.toWebHandler) return the same promise on every call. Fibers started by the runtime, their child fibers and its finalizers still return immediately when they dispose it. - Breaking
Fix
Path.fromFileUrlthrowing aURIErrorinstead of failing withBadArgumentwhen the URL contains a malformed percent-encoding. - Breaking
With
SpanPropagationEnabled, statement spans recorddb.client.connection.wait_time_ms, and in@effect/sql-pga statement that waited for a new session gets adb.connectchild span covering the part of the connect it waited for. - Breaking
Fix
SqlRunnerStoragehanging on PGlite.SqlClientnow has adriverfield identifying the driver that created it, such as"pg","pglite"or"sqlite-node". Every Effect SQL driver sets it. On PGlite, runner storage no longer reserves the only connection and uses lock table rows instead of advisory locks, so runner and application queries are no longer blocked.Third-party drivers must pass a
drivername toSqlClient.make, and hand-writtenSqlClientimplementations must provide adriverfield:const make = Effect.gen(function*() { return yield* SqlClient.make({ driver: "my-driver", acquirer, compiler, spanAttributes: [] }) }) - Breaking
Fix unnecessary value retention in
PubSubreplay buffers andSubscriptionRef. - Breaking
Fix
PubSub.takeBetweenthrowingRangeErroron large backlogs. - Breaking
Fix reused
PubSub.takeUpToeffects returning fewer messages after consuming replayed messages. - Breaking
Avoid loading Node's internal undici on cold start when importing
effect/Schemaor starting a Node HTTP server before any web API is used.Schema.FormDataresolves the global constructor during validation, and@effect/platform-nodeloadsnode:httpandnode:httpswithout evaluating their lazy web API exports. - Breaking
Stop failed
Reactivity.queryandSqlClient.reactiveMailboxqueries from rerunning on later invalidations, and discard pending reruns when a query fails. - Breaking
Propagate all entry release defects when an
RcMapowner scope closes, after attempting every release and clearing the map. This also applies to resources managed throughLayerMap. - Breaking
Fix
Channel.fromReadableStream,Channel.fromTransformStreamandStream.fromReadableStreamdiscarding rejected cancel hooks and leaving the reader locked after finalization. A rejected cancel hook is now a defect, and an already errored stream is not reported twice. - Breaking
Fix
Stream.toReadableStreamto wait for Web Stream demand before pulling the next upstream chunk, avoiding premature upstream side effects. - Breaking
Fix the Redis PersistedQueue store dropping entries when a payload or custom id contains a lone UTF-16 surrogate.
- Breaking
Fix
Effect.repeat,repeatOrElse,scheduleandscheduleFromtreating aCause.Donefailure from the repeated effect as schedule completion. - Breaking
Fix
RequestResolver.withCacheto call the wrapped resolver'spreCheckon cache misses, preserving hook completion and nested cache reuse. - Breaking
Fix
RequestResolver.withSpandropping every span option exceptattributesandlinkswhen the options are returned by a function. - Breaking
Fix
Effect.requestfailing when a resolver's batch delay completes synchronously, such asRequestResolver.setDelay(0)underTestClock, by registering the request before the delay starts. - Breaking
Keep
Resource.autorefreshing according to its schedule after a failed refresh, while preserving the previously cached value. - Breaking
Fix
RpcClientretaining request state when a request fails without a reply. - Breaking
Fix RPC connection defects failing new requests started synchronously by pending callers. Only requests pending when defect delivery begins are failed; new requests await their own responses. Ensure all pending calls are released even if defect delivery is interrupted.
- Breaking
Add an opt-in
batchoption toRpcClient.layerProtocolHttpandRpcClient.makeProtocolHttpthat sends concurrent RPC requests from the same client in one HTTP request. - Breaking
Fix HTTP RPC cancellation before the first response chunk and during buffered response collection so client aborts interrupt server-side requests and release their resources.
- Breaking
Change RPC NDJSON's content type from
application/ndjsontoapplication/x-ndjson; update any exact media-type checks in custom integrations. Reject malformed non-empty lines withRpcSerialization.NdjsonDecodeError(preserving the parse error ascause) instead of silently dropping messages, while explicitly skipping empty LF and CRLF lines. Existing RPC HTTP clients and servers remain compatible across the header change. - Breaking
Add the
Rpc.ParseOptionsannotation, so RPC payloads and responses can be decoded and encoded with schema parse options such asconcurrency. - Breaking
Fix
runMainskipping finalizers whenSIGINTorSIGTERMarrives during synchronous startup. - Breaking
Prevent uncaught errors when unread HTTP responses are garbage-collected in runtimes such as Cloudflare Workers that restrict aborting request I/O outside its request context.
- Breaking
Fix
Schema.isBase64andSchema.isBase64UrlthrowingRangeError: Maximum call stack size exceededon large inputs. - Breaking
Add the unstable
Schema.toCodecGoJsoncodec for Go JSON responses. It normalizes optional-keynullvalues to missing keys and required array or recordnullvalues to empty collections, while preserving schemas that already acceptnull. Encoding is unchanged fromSchema.toCodecJson. - Breaking
Preserve literal member inference in Schema.Enum for inline object literals without requiring
as const. - Breaking
Preserve filter-reported error paths when message annotations override schema check messages in Standard Schema and default error formatting. Filter message annotations now also override directly returned messages, including when the annotation is an empty string. Avoid applying struct messages to multiple filter failures.
- Breaking
Fix
Schema.toFormatterthrowing onReadonlySet,ReadonlyMap,HashSet,HashMapandChunkvalues that contain symbols or null-prototype objects, and keepChunkelements in iteration order.Map and set entries are now sorted by their formatted output instead of by their raw values, so they can print in a different order than before, including for primitive keys and values.
- Breaking
Remove the type-level uniqueness check from
Schema.toTaggedUnionso generic member lists compile again. Duplicate discriminants still throw at runtime. - Breaking
Fix
Schema.toJsonSchemaDocumentto support numeric record keys and BigInt template literals, and approximate tuples with post-rest elements. - Breaking
Preserve synchronous throws from schema transformations, filters, middleware, and custom declaration parsers as defects when decoding or encoding, including at the root schema. Exit, Effect, and Promise parsers now report these defects through their result instead of throwing before returning.
- Breaking
Match finite number strings in linear time.
Schema.isStringFinite,Numberrecord keys,Numbertemplate literal parts andSchema.toCodecStringTreenumber fields no longer take quadratic time to reject long digit runs such as"111…x". The JSON Schemapatternfor these schemas changes to the same linear regular expression and accepts exactly the same strings. - Breaking
Fix
Schema.Tupleencoding leaving an empty slot when a trailing optional element such asSchema.OptionFromOptionalKeyis omitted. - Breaking
Propagate all release defects from
ScopedCache.invalidateAlland cache owner-scope shutdown after attempting every entry release. Successful bulk invalidation now returnsundefinedas declared. - Breaking
Add
effect/SemVerfor strict Semantic Versioning 2.0.0 parsing, formatting, comparison, and version bumps, andeffect/SemVerRangefor npm-style range matching and version selection. Add schemas and string codecs for both types. - Breaking
Fix
Sink.collectandSink.takethrowing aRangeErroron large input chunks. - Breaking
Fall back to client computation when atom hydration data fails schema decoding or a streamed initial result cannot be encoded, instead of throwing or leaving the atom waiting indefinitely.
- Breaking
Fix
Socket.readerStringandSocket.toChannelStringcorrupting characters split across binary frames. Incomplete characters are emitted as U+FFFD before string frames or on close code 1000. - Breaking
SqlEventLogServerUnencryptedpublication andReactivityinvalidations inside a SQL transaction now wait for the outermost commit and are dropped on rollback. - Breaking
Add
SqlClient.afterCommit, which runs an effect once the outermost transaction commits, or immediately outside a transaction. - Breaking
Add
SqlClient.BeginTransaction, a reference that replaces the statement starting a top-level transaction, such asBEGIN ISOLATION LEVEL SERIALIZABLE, saving the round trip of a separateSET TRANSACTION. Nested transactions keep their savepoints.SqlClient.makeWithTransactionpasses the statement tobeginas a second argument. - Breaking
Improve
SqlEventJournaluploads and query performance.Checkpoint successful uploads per remote without waiting for an echo, while forwarding older entries imported later.
Index conflict, entry-ordering and remote-sequence queries.
Migrate existing databases on first open using a writable connection. The first upload after migration may resend unconfirmed entries.
Run
writeandwriteManycallbacks in the journal transaction, rolling back their SQL on the same client if the write fails or is interrupted.
- Breaking
Fix SQL event journals reporting incoming remote entries as conflicts. Remote writes now report only previously stored newer entries and atomically persist entries and remote sequences after all callbacks succeed, allowing failed writes to be retried.
- Breaking
Fence SQL
PersistedQueuesettlements and lock refreshes by acquisition, so a handler whose lock lapsed can no longer complete, fail, retry or release a row after the same store re-claims it. - Breaking
Allow queued SQL transactions to be interrupted while waiting for a connection, respecting the caller's interruptibility. Interrupted or failed acquisition releases the connection scope and its permits, and a libSQL transaction interrupted during
BEGINis rolled back.SqlClient.makeWithTransaction(unstable) now owns the connection scope:acquireConnectionreceives the mask'srestorefunction and returns a scoped connection effect instead of a[scope, connection]tuple. - Breaking
Preserve typed SQL errors without cleanup defects after SQLite automatically rolls back a transaction in sqlite-node, sqlite-bun and in-memory sqlite-wasm. OPFS and React Native clients are unchanged.
- Breaking
Fix
SqlMessageStorageID precision loss on SQLite drivers that return numbers, including Cloudflare Durable Objects. - Breaking
Treat persisted cache entries that no longer decode as cache misses, recomputing and replacing them after success or error schema changes.
- Breaking
Redirect static directory index URLs without a trailing slash to their canonical form with a 301 response, preserving router prefixes and query strings so relative links resolve correctly. Clients that do not follow redirects must request the trailing-slash URL directly.
- Breaking
Keep recursive
Stream.concatchains throughStream.suspendlinear in their length. - Breaking
Fix
Stream.mapAccumthrowing aRangeErrorwhen its callback returns a large array. - Breaking
Keep
Stream.retryandChannel.retrywork constant per attempt instead of growing with every retry. - Breaking
Fix
Stream.zipand related zip operators taking quadratic time when the two streams emit chunks of different sizes. - Breaking
Fix
Stream.zipWithArraydiscarding right-side leftovers when the callback returns leftovers for both streams. - Breaking
Fix
String.capitalizeandString.uncapitalizefor strings that start with an astral letter such as"𐐨". - Breaking
Fix suspended
Schema.Structparsers overwriting earlier results when the same parsing Effect is rerun. - Breaking
Fix
Stream.switchMapandChannel.switchMapnot finalizing inner streams that were replaced before they started. - Breaking
Fix
Tar.decodedropping a leading byte order mark from entry names, link targets and PAX keys, so a name such as"\uFEFF/etc/passwd"no longer decodes as/etc/passwd. - Breaking
Keep TestClock diagnostics visible when TestConsole captures test output, including warnings about time not advancing and busy fibers. Ordinary test console output remains captured.
- Breaking
Add the experimental
TextDiffmodule for array, line and Unicode code point edit scripts, replay, inversion and unified diff formatting. UsemaxEditsto bound search work on large inputs, trading minimality for a valid script when the cap is exceeded. - Breaking
Add
FileSystem.lstat, which returns theFile.Infoof a path without following symbolic links. CustomFileSystemimplementations, including those passed toFileSystem.make, must now providelstat. - Breaking
Allow empty quoted keys such as
"" = 1inToml.parse, as permitted by TOML 1.0. - Breaking
Fix
Toolkit.handledropping additional failures and their annotations when a tool handler fails in"error"failure mode. - Breaking
Interrupt Toolkit handlers when their result stream closes, including early termination. Add
Toolkit.PreliminaryBufferso callers can opt in to bounding buffered preliminary results. - Breaking
Fix Trie iterators restarting from the first entry when iterated again. They now continue from their current position.
- Breaking
Require an explicit trusted proxy policy before applying forwarded headers.
HttpMiddleware.xForwardedHeadersnow takes{ trustedProxies }and only appliesX-Forwarded-*headers when the connecting peer is trusted.X-Forwarded-Foris read from the right, skipping trusted proxies, andX-Forwarded-Host/X-Forwarded-Protoare only used when they line up with it.HttpServerRequest.toURLno longer readsx-forwarded-protodirectly. It uses the newrequest.protocol, set by the trusted proxy middleware, before the transport scheme. The connecting peer stays available asrequest.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")] }) - Breaking
Add opt-in typed reactivity keys. Augment
Reactivity.Keysto map key names to ID types, and the public reactivity APIs (Reactivity,Atom,AtomHttpApi,AtomRpc,SqlClient.reactiveandEventLog.groupReactivity) reject undeclared key names and mismatched IDs. With no keys declared, the accepted types are unchanged. - Breaking
Preserve defects in mixed failure causes across Effect, Stream and Channel.
Typed recovery skips causes containing a defect and converts every typed error to a defect:
Fail(e) + Die(d)becomesDie(e) + Die(d), preserving reason order and interrupts. UsecatchCauseorcatchDefectto recover from these causes.An interrupt alongside a typed error does not block recovery, including Effect retry and repeat error paths. Retrying or re-raising only the typed error can discard that interrupt.
The same rule applies to failing
repeat/repeatOrElsepolicies. Retry-policy failures still propagate unchanged.Error mapping in Effect (including eager variants), Exit, Stream and Channel now maps every typed error in place, preserving defects, interrupts and reason order instead of keeping only the first mapped failure. Mapping does not convert typed errors to defects.
- Breaking
Add
UserDirectoriestoeffect/persistence, a service that resolves the home, config, data, cache and state directories for an application following XDG and platform conventions. - Breaking
Report an initial UTF-16 BOM in
Xml.decodeasUnsupportedinstead ofSyntax. - Breaking
Fix
Yaml.parseblock scalars including less indented comments in their value. - Breaking
Fix
Yaml.parserejecting tabs in block scalar content and discarding the whitespace of whitespace-only block scalar lines. Leading empty lines more indented than the block scalar content are now rejected. - Breaking
Fix
Yaml.parserejecting anchors defined inside flow collections, such as{a: &ref 1, b: *ref}. - Breaking
Fix
Yaml.parserejecting flow collections that span multiple lines, such as a JSON-style mapping with its entries and closing bracket on separate lines.
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.