Patch Changes
-
#7738
49e3901Thanks @kitlangton! - Retain completed tool approval results in non-streaming responses so Chat records them and does not replay approved tools on later turns. -
#7483
b945dedThanks @tim-smart! - Align runtime type IDs with their module paths. Effect markers now omit legacy grouping prefixes and theunstablepath segment, while OpenTelemetry spans use theOtelTracermodule path. Custom implementations that copy these marker strings must adopt the corrected IDs. -
#8014
d6422f4Thanks @kitlangton! - FixEffect.allto retain errors and required services from every branch of a union of record inputs. -
#8095
5a80204Thanks @gcanti! - FixArbitrary.schemato respect applicable index signatures when generating and shrinking object properties, including fixed fields inSchema.StructWithRestand overlapping records.Combine compatible string, number, and bigint constraints during generation so cases such as a
Stringfield constrained by aNonEmptyStringrecord remain productive at size zero. Other intersections are validated and may exhaust the discard budget. -
#7796
53511efThanks @kitlangton! - FixSchema.ArrayEnsureto preserve array-valued element branches and outer-array encoding cardinality. -
#8067
79ae49fThanks @purwasadr! - FixAtomRpc.queryreturningneverfor RPCs whose middleware declares servicerequires. The return-type conditional now infers all sixRpctype parameters, matchingmutationand every utility inRpc. -
#7463
0d083baThanks @tim-smart! - Remove themimeruntime dependency. The neweffect/unstable/http/Mimemodule provides top-level lookup functions
backed by a vendored standard MIME registry. -
#7477
be0f822Thanks @candrewlee14! - Allow sockets to use browser, Bun, and Node WebSocket implementations without consumer casts. Platform constructors
now support typed opening-handshake headers where available. -
#7587
debe8fdThanks @kitlangton! - FixCache.invalidateWhenandScopedCache.invalidateWhendeleting a replacement entry while waiting for an earlier lookup. -
#7585
a8588f9Thanks @kitlangton! - Fix interruption ofCache.refreshfor a missing key removing a newer value written byCache.set. -
#7596
f17eb0aThanks @kitlangton! - FixCache.refreshandScopedCache.refreshexceeding capacity when an existing key is evicted while its refresh is in progress. Publishing the refreshed entry now evicts older entries as needed, releasing their resources inScopedCache. -
#7595
f30cbfeThanks @kitlangton! - FixCache.refreshfor an initially missing key deleting a newer cached value when the refresh completes with zero time to live. -
#7614
78cc9c0Thanks @kitlangton! - PreventCachefrom retaining synchronously interrupted lookups. -
#7563
ccbdbd5Thanks @alvarosevilla95! - Respect custom HTTP header redaction when recording server span attributes. -
#7254
a63dcbfThanks @gcanti! - Add the experimental Schema-firsteffect/unstable/arbitrary/Arbitrarymodule for native generation without
fast-check.Arbitrary.schemaderives an opaque arbitrary from the decoded SchemaType,Arbitrary.sampleEffect
provides interruptible sampling with typed exhaustion, andArbitrary.checkEffectreturns structured property results.
The initial implementation supports bounded discards, shrinking, replay, and recursive and mutually recursive Schemas.
SampleErrorandExhaustedinclude the effective seed so discarded runs remain reproducible even when the caller did
not provide one.Arbitrary.isArbitraryidentifies values through the module's nominal protocol. Numeric constraints
retainNaNwhen it is accepted by their supportedOrder.Numberbounds. Union derivation validatesoneOf
exclusivity and isolates lazy cross-member shrinking from unrelated random generation. Object derivation keeps
optional-property selection constructive when candidate fields have different recursive costs.
Struct, Record, JSON-object, and record-shapedArbitrary.alloutputs periodically use a null prototype as an edge
case, preserving that prototype throughout shrinking and replay without perturbing structural PRNG choices. The change
adds 0.01–0.03 KB gzip to representative Arbitrary fixtures and leaves production-only bundle sentinels unchanged.Add
Arbitrary.map,Arbitrary.flatMap,Arbitrary.filter,Arbitrary.filterMap, andArbitrary.allfor composing
derived Arbitraries without exposing a second catalog of primitive constructors. Filtering remains bounded and
promotes valid shrink descendants through rejected nodes.maxShrinksbounds every inspected shrink candidate,
including candidates rejected before property evaluation, while retaining the best shrunk input found when the
budget is exhausted.flatMapprovides deterministic dependent generation, source-first shrinking, post-source PRNG
checkpoints, and one shared residual recursion budget.allcombines tuples, iterables, and records with a shared
budget, randomized internal generation order, stable output shape, and independent member shrinking. Arbitrary values
implementPipeablefor composition with data-last combinators.Add the experimental Schema
arbitraryConstraintandtoCodecArbitraryannotations and their
Schema.Annotations.ToArbitrarytypes. Declarations can provide a Schema Link optimized for generation, while filters
can contribute native semantic constraints. The callback receives decoded type parameters and normalized constraints.
The compiler owns efficient representations for common built-ins, including JSON, RegExp, URL, Date, byte arrays,
ReadonlyMap, and ReadonlySet. Effect-specific HashMap, HashSet, Chunk, Graph, BigDecimal, and date-time declarations keep
local generation Links, while declarations with productive canonical codecs require no arbitrary-specific annotation.
Schema.isUniqueKeyprovides key-based Map uniqueness for explicit array representations.The same ownership policy applies to formatter and equivalence derivation: implementations for common declarations
live in their compiler, while domain-specific and dynamically constructed declarations retain local annotations.
Declarations whose intrinsicEqualimplementation already matches their Schema equivalence need no annotation or
compiler special case. This keeps unused common callbacks out of production Schema bundles.Against the previous layout,
schema-toArbitrarydecreases from 36.68 KB to 33.24 KB gzip and
arbitrary-combinatorsdecreases from 37.16 KB to 33.70 KB.schema-toFormatterincreases from 18.92 KB to 19.49 KB
andschema-toEquivalenceincreases from 19.05 KB to 19.39 KB because callers that explicitly derive these capabilities
now retain the common declaration handlers. Generic production fixtures remain unchanged; an equivalence-specific
production fixture using common declarations decreases from 20.75 KB to 20.48 KB, while declarations whose intrinsic
equality is sufficient decrease from 23.42 KB to 23.34 KB. An Arbitrary-specific production fixture using common
declarations decreases from 20.35 KB to 19.61 KB, while one using the locally annotated BigDecimal and date-time
declarations increases from 18.34 KB to 23.01 KB.
The complete 31-scenario native Arbitrary comparison reports no statistically classified runtime regression; the five
moved BigDecimal and date-time scenarios remain within measurement noise.Add
SchemaGetter.forbiddenEncoding, a reusable getter for the encode side of decode-only Schema transformations.Remove the fast-check bridge from the
effectpackage, includingSchema.toArbitraryand
effect/testing/FastCheck. Replace the legacySchema.Annotations.ToArbitrarycallback contract with the native
Schema-first types. Theeffectpackage no longer depends on fast-check.Migrate
TestSchema.Asserts.verifyLosslessTransformationandTestSchema.Asserts.arbitrary().verifyGenerationto the
native runner. Both methods now accept native check options directly, bound unsuccessful generation, and include the
shrunk input and replay token in property failures.Use the Arbitrary runner for all
@effect/vitestproperty tests. Property inputs may combine Schemas and Arbitraries,
and are composed directly withArbitrary.all; check options are available througharbitrary. Raw fast-check
arbitraries and thefastCheckoptions object are no longer supported. As with the previous fast-check adapter, thrown
exceptions, defects, and typed failures from a property are shrinkable falsifications; Effect interruption remains an
interruption.Optimize constructive regular-expression generation by caching feasible lengths on the compiled pattern, computing
sequence-suffix feasibility once, and precomputing character-class metadata. Seeded generation, shrinking, and replay
remain unchanged.Optimize
BigDecimal.OrderandBigDecimal.Equivalencewith a shared hybrid comparator. Ordinary scale differences
use cached, bounded coefficient alignment, while large differences are compared without materializing their decimal
zeroes.BigDecimal.makenow rejects scales that are not safe integers.Before its removal, the materialized fast-check bridge fixture
schema-toArbitrary-materialized-fast-check.tsmeasured 79.00 KB minified and gzipped.Representative runtime measurements against corresponding hand-written fast-check 4.9.0 arbitraries are shown below.
Values are median latency on Node 24.12.0 and Apple M3; lower is better. Both implementations validate the
same output domains, although their generation distributions are not identical. Native speedup is fast-check latency
divided by Native latency, so higher is better.Scenario fast-check Native Native speedup 32 recursive samples 150 µs 103 µs 1.45x 128 optional Struct samples 244 µs 86.0 µs 2.84x 128 constrained strings 742 µs 49.7 µs 14.86x RegExp derivation and first sample 13.4 ms 30.8 µs 429.02x 64 RegExp strings 595 µs 919 µs 0.64x RegExp failure and shrinking 168 µs 88.2 µs 1.91x 128 bounded numbers 68.9 µs 21.8 µs 3.18x 128 Uint8Arraysamples98.3 µs 74.4 µs 1.32x 128 BigDecimalsamples66.6 µs 56.3 µs 1.18x 128 DateTime.Utcsamples71.2 µs 50.5 µs 1.42x 128 named time zones 52.2 µs 27.9 µs 1.85x 128 time zones 63.7 µs 33.8 µs 1.89x 128 zoned date-times 130 µs 112 µs 1.16x 32 samples through Schema filter 65.9 µs 49.4 µs 1.33x 32 unique arrays 156 µs 132 µs 1.18x 128 literal samples 40.0 µs 3.70 µs 10.78x 128 mapped samples 59.0 µs 14.1 µs 4.21x 128 samples through passing filter 58.9 µs 13.9 µs 4.23x 32 samples through selective filter 66.1 µs 42.9 µs 1.54x 128 filterMapsamples75.7 µs 31.5 µs 2.40x Filtered failure and shrinking 12.7 µs 7.71 µs 1.66x 128 alltuple samples43.5 µs 18.5 µs 2.35x 128 allrecord samples81.0 µs 30.4 µs 2.66x 128 dependent flatMapsamples125 µs 67.2 µs 1.86x flatMapfailure and shrinking20.1 µs 6.71 µs 2.99x Replay flatMapshrink path14.3 µs 6.57 µs 2.17x Passing property, 100 runs 42.3 µs 27.1 µs 1.56x TestSchema, 100 generations44.5 µs 35.9 µs 1.24x First failure plus one shrink 8.77 µs 1.30 µs 6.75x Replay recorded failure 6.35 µs 1.19 µs 5.36x Cold recursive derivation is not included because the native fixture constructs and compiles a Schema, while the
fast-check fixture constructs a hand-written arbitrary; it is not a like-for-like warm-generator comparison.Add a guide for the native module and a migration guide from the fast-check bridge published in
effect@4.0.0-rc.109. -
#7822
b845b18Thanks @tim-smart! - AddStream.catchDefectandChannel.catchDefectfor recovering from defects without catching typed failures or interruptions. -
#7657
381b794Thanks @kitlangton! - RemoveChannel.runDone; useChannel.runDrainto consume all output and return the completion value. -
#7989
4ffcaf4Thanks @kitlangton! - Preserve astral Unicode escapes and following arguments inChildProcess.makeandChildProcess.prefixtemplate literals. -
#8018
ba2fd82Thanks @tim-smart! - Wait for Node child process groups to exit during scoped release andkill.After signalling a process group, both operations now wait for its leader and descendants. Without
forceKillAfter, the wait is limited to one second and never escalates. WithforceKillAfter, the group receivesSIGKILLat the deadline, followed by a final wait of up to one second. Native timers keep escalation working under aTestClock, and cleanup no longer depends on stdio closing.exitCodeandisRunningremain tied to the leader's exit, and a leader that already exited successfully still leaves its group untouched. Process group checks count zombies, so cleanup may wait for the full bound under a non-reaping PID 1. -
#7617
02be94cThanks @kitlangton! - FixChunkconcatenation to preserve sliced elements. -
#7453
115d8c2Thanks @gcanti! - Rename the built-inConfigconstructors to PascalCase and renameConfig.mapOrFailtoConfig.mapEffect.Config.ArrayandConfig.Recordnow construct configs directly, with overloads for pathless options or a path followed by options, while their specialized schemas and the other built-in schemas are kept internal.This is a breaking naming cleanup for the Effect 4 release candidate. It makes casing consistently identify typed config constructors, aligns effectful mapping with the rest of the library, and prevents implementation schemas from expanding the public
Configinterface. -
#8020
1452635Thanks @kitlangton! - EnsureEffect.acquireUseReleasereleases an acquired resource andEffect.useSpanends its span when the use callback throws before returning an effect. The thrown exception remains a defect, but no longer skips cleanup. -
#8087
77f85feThanks @tim-smart! - usenewinstantiation for streams -
#7802
a3f2b31Thanks @kitlangton! - Preserve flags and nested commands when completing a CLI subcommand through its alias. -
#7804
310f8d3Thanks @kitlangton! - Include inherited shared flags in descendant CLI completions. -
#8086
291d616Thanks @MaxFreedomPollard! - Allow=in values parsed byPrimitive.keyValuePair,Flag.keyValuePair, andParam.keyValuePairineffect/unstable/cli. -
#7687
48dbbb2Thanks @kitlangton! - Allow optional alternative CLI flags. -
#8121
b43bfd6Thanks @tim-smart! - Rename CLI constructors to PascalCase, aligning scalar names withSchemaandConfig. This is a breaking change; parsing behavior is unchanged.In
Primitive,Param,Flag, andArgument, capitalize existing constructor names, with these exceptions:Previous New Modules integerIntAll four floatFiniteAll four noneNeverAll four choiceLiteralsParam, Flag, Argument Primitive.choicebecomesPrimitive.Choice;choiceWithValuebecomesChoiceWithValuewhere available.In
Prompt, capitalize control constructors excepttext→String,integer→Int, andfloat→Number. Rename public typesIntegerOptions→IntOptionsandFloatOptions→NumberOptions. SharedTextOptionsis unchanged.Prompt.Numberretains its existing parser, without a finite-number restriction.In
GlobalFlag, renameaction→Actionandsetting→Setting. Factories and combinators, includingCommand.makeandPrompt.succeed, keep their names.Update public
_tagmatches and completion descriptors:Primitive:"Integer"→"Int","Float"→"Finite","None"→"Never".Completions.FlagTypeandCompletions.ArgumentType:"Integer"→"Int","Float"→"Finite".
Sentinels still always fail; their internal parameter name is now
"__never__". Help labels and completion scripts are unchanged. -
#7685
1c89c78Thanks @kitlangton! - Fix defaulted variadic arguments when omitted. -
#8059
9bbe1a5Thanks @kitlangton! - Fix CLI wizard handling of negative numbers and other flag values beginning with-. -
#7489
dd99ab0Thanks @tim-smart! - Cluster no longer retains fiber ids for every local teardown.Transient persisted interrupts are now classified from live teardown state
(entity, shard, singleton, entity type, and node shutdown) instead of a
process-lifetime set of fiber ids. The registry is bounded by in-flight
teardowns and returns to baseline after entity reap storms. -
#7939
8f397edThanks @kitlangton! - FixReply.Replycodecs to require client services when decoding and server services when encoding. -
#7485
d7ae6b6Thanks @tim-smart! - Transient routing states for persisted cluster messages no longer surface as errors.If an entity moves runners or is shut down before replying, the caller keeps
waiting for the reply via message storage while the entity moves. If the local
runner is shutting down while a caller is waiting, the call is interrupted
instead of failing withEntityNotAssignedToRunner: the request is already
durable and will be served under the next owner.Durable workflows treat such an interrupt as an abandoned run attempt: the run
stops with nothing persisted, without running compensations or resuming the
parent, ready to replay on the replacement runner. -
#7933
8cf1203Thanks @kitlangton! - Fix saved curriedContext.getcalls incorrectly inferring their required service asunknown. -
#8064
87654c5Thanks @Avaq! - Fix theCookiesErrortag ineffect/unstable/httpfromCookieErrortoCookiesErrorto match the class name. -
#7621
f05ae0bThanks @kitlangton! - Apply DateTime calendar parts without intermediate overflow. -
#7884
436f5ebThanks @kitlangton! - FixConfigProvider.fromDotEnvContentsvariable expansion to preserve replacement tokens such as$&in referenced values. -
#7840
d8ff960Thanks @kitlangton! - FixDurableClock.sleepto preserve explicit0and0nin-memory thresholds. -
#7941
8766475Thanks @kitlangton! - Require schema encoding services whenDurableDeferred.intorecords an exit. -
#7750
b64f406Thanks @kitlangton! - Update dynamic tools to advertise replacement parameter schemas aftersetParameters. -
#7572
4697aaaThanks @tim-smart! - Align CLI help tables by terminal display width for wide, emoji, combining, and zero-width graphemes. -
#7588
cec6c2dThanks @tim-smart! - Route tool call parameter validation failures through the tool'sfailureModeand dropToolParameterValidationError.toolParams. -
#7643
9956f0eThanks @tim-smart! - Reduce memory usage in Effect primitives and fibers.Breaking: context-derived
Fiberfields now live underfiber.cache. The
currentScheduler,currentSpan,currentLogLevel,currentStackFrame, and
currentPreventYieldfields are nowscheduler,span,logLevel,
stackFrame, andpreventYield. AccessminimumLogLeveland
maxOpsBeforeYieldthroughcacheas well. -
#7650
5c7eed0Thanks @tim-smart! - Reduce HTTP server allocation churn when tracing is not configured and for requests that complete synchronously. -
#7649
183c2eaThanks @tim-smart! - Reduce per-request RPC server allocations. -
#7772
1e92dbdThanks @tim-smart! - Improve HTTP server throughput by reducing routing, request handling, response
construction, and body encoding overhead. AddEffect.withFiberSucceedfor
synchronously computing successful values from the current fiber. Copy pooled
byte views by their exact range when exposingArrayBuffervalues. -
#7956
4eb0fa7Thanks @tim-smart! - Reduce HTTP server overhead: complete freshly created header maps in place in
HttpServerResponse.setHeaderandsetHeaders, compare static route prefixes
with a preparedstartsWith, mapHttpApischema errors eagerly for completed
decoder results, and implementEffect.cachedas a dedicated one-time memo
without time-to-live machinery. -
#7426
534b8b9Thanks @tim-smart! - Replace@effect/sql-pg'spgruntime with a native PostgreSQL client.PgConnectionandPgPoolnow handle connection setup, binary queries, prepared statements, pipelining, streaming, notifications, cancellation, and custom codecs.PgConnection.listenandPgClient.listenreturn scoped notification dequeues after PostgreSQL confirms the subscription.PgClientuses the native stack, and the legacyfromPool,fromClient, andmakeWithconstructors are removed.Breaking changes
fromPool,fromClient, andmakeWithare removed. Usemakefor a pool ormakeClientfor one connection.PgClient.listenreturns a scopedEffect<Dequeue<string>, SqlError, Scope>instead of aStream. Acquisition completes after PostgreSQL confirmsLISTEN, so notifications sent after it returns cannot be missed.PgClientConfig.typesnow accepts aPgTypes.Registryinstead ofpg.CustomTypesConfig. Plain object parameters are no longer inferred as JSON; wrap them withsql.json.- Query strings must contain one statement. PostgreSQL's extended protocol rejects multi-statement strings.
- Results use the native binary codecs. In particular,
int8decodes tobigint,dateto a string, timestamps to Unix epoch milliseconds, andbyteaor unknown OIDs toUint8Array.executeRawreturns the nativePgConnection.Resultshape rather thanpg.Result. - Named prepared statements are enabled by default. Set
prepare: falsewhen using a pooler that cannot preserve prepared statements between queries.Statement.unpreparedandStatement.valuesUnprepareduse unnamed extended queries without adding entries to the prepared-statement cache.
Inferred parameters stay permissive: strings bind untyped so the backend derives the type from the statement, and safe integers beyond the
int4range bind asint8.Add
Pool.reservefor exclusive access to a concurrent pool item, and fix waiter wakeups and capacity replacement after invalidation. -
#7514
b76a1cfThanks @tim-smart! - Add Socket.upgrade, for upgrading tcp sockets using STARTTLS -
#7568
acc1e53Thanks @tim-smart! - Normalize core service and runtime identities under their owning module namespaces. -
#8001
4950a91Thanks @kitlangton! - FixEffect.fnUntracedEagerto pass the original function arguments to each transform after the current effect, matchingEffect.fnandEffect.fnUntraced. -
#8005
c020987Thanks @kitlangton! - FixEffect.updateServiceScopedcleanup when an inner service provider has already completed. Closing the scope now preserves the service's absence instead of failing with a missing-service defect. -
#8007
abe95d1Thanks @kitlangton! - Preserve the original cause inEffect.catchReasonandEffect.catchReasonswhen no nested reason matches and no fallback is provided. -
#7915
027ceb9Thanks @kitlangton! - FixEffectable.Classevaluation by delegating to its abstractasEffect()method. The method is called on the instance for each execution, preserving current receiver state and provided services. -
#7907
3d203b7Thanks @KhraksMamtsov! - AddEffectable.Mixinto insert the Effect prototype into an existing class inheritance chain. The returned abstract class requires anasEffectmethod and derives its Effect type from that method through polymorphicthis. -
#8009
a29b8f4Thanks @kitlangton! - Fix theonErrorandonSyncErrorargument tuple types inEffect.effectifyto include only caller inputs, excluding the synthesized callback. Mapper annotations that expected a callback slot must use the caller-input tuple instead. Runtime behavior is unchanged. -
#7902
ce4aa65Thanks @kitlangton! - FixEntityProxyServerhandler layers to include client-side codec service requirements. -
#7889
a8ea807Thanks @kitlangton! - Honor the entity layer'sdisableFatalDefectsoption inEntity.makeTestClient. When enabled, a handler defect no longer fails other pending calls to the same entity ID. The failing call still reports its defect; omitted or false options retain fatal-defect behavior. -
#7862
a3ebb7fThanks @kitlangton! - RetryEventLogRemotewrites and change streams when authentication returnsForbidden. -
#7842
473bd81Thanks @kitlangton! - Return one empty chunk whenChunkedMessage.splitreceives an emptyUint8Array. -
#7525
53843f6Thanks @fubhy! - AddByteSizemodule and use it across the ecosystem -
#8115
c5eca65Thanks @tim-smart! - CalculateHttpBody.file,HttpBody.fileFromInfo, andHttpClientRequest.bodyFilecontent lengths with exact bigint arithmetic and EOF clamping. -
#7784
d6f9ebaThanks @kitlangton! - EnsureExecutionPlan.captureRequirementsprovides captured services to effectfulwhilepredicates. -
#7460
8d1e97aThanks @tim-smart! - Fix contextual typing forMatchtag and discriminator handler maps when handlers useEffect.fnorEffect.fnUntraced. -
#8070
b28ab48Thanks @tim-smart! - Fix parallel child workflows inside activities to dispatch before suspending, release activity resources during durable waits, and resume reliably when children complete during cleanup. -
#7677
9960708Thanks @kitlangton! - Setduplexfor raw Web stream request bodies inFetchHttpClient. -
#7615
8ac53b6Thanks @kitlangton! - FixFiberMaplosing track of fibers started under the same key by a replaced fiber's synchronous finalizer, ensuring they are interrupted when the map's scope closes. -
#7967
84ad49aThanks @kitlangton! - Preserve an already registered fiber whenFiberHandleorFiberMapregisters it again withonlyIfMissing: true, instead of interrupting it and clearing the entry. -
#8083
72cfa24Thanks @nikelborm! - Exposed the platform specific pretty loggers separately. -
#7788
95c2581Thanks @kitlangton! - FixFileSystem.sinkto retain its default write flag whenflagis undefined. -
#8074
d5c7cd2Thanks @nikelborm! - Removed unused stderr option from Logger.consolePretty signature -
#7965
fe4fed1Thanks @kitlangton! - MatchAtomHttpApiquery and mutation success types to the generated HTTP client,
including SSE, binary streams, and header-wrapped responses. Stream transport,
decoding, and SSE errors now appear in the stream's error channel instead of
never, so code that assumed a failure-free stream may need to handle them.
Runtime and serialization behavior are unchanged. -
#7959
d150a64Thanks @kitlangton! - FixAtomHttpApiquery and mutation dispatch for top-level API groups. -
#7961
05b1e80Thanks @kitlangton! - Honor explicittimeToLive: 0andtimeToLive: 0ninAtomRpcandAtomHttpApiqueries. Zero now opts out of the registry's default idle retention, matching other zero-duration inputs, so an unmounted query can be disposed and fetched again on remount. OmittingtimeToLivestill uses the registry default. -
#7963
414dc90Thanks @kitlangton! - FixAtomRpcmutation and query atoms to include client middleware errors in their result error types. -
#7740
3f51acdThanks @kitlangton! - ForwardAtom.withFallbackwrites to the primary atom. -
#7693
d68ff05Thanks @kitlangton! - FixHttpMiddleware.corsto preserveOriginand other requiredVarydimensions. -
#8140
f3cf1e6Thanks @gcanti! - FixTypes.DeepMutableto preserve built-in objects, Effect data types, and other objects with methods or symbol-keyed properties while recursively making arrays, tuples, maps, sets, and plain records mutable. -
#7695
6525771Thanks @kitlangton! - Use body status and encoding defaults inHttpApiSchema.encodeToWithHeaders. -
#8110
4ab4e83Thanks @tim-smart! - Prevent precision loss in Node/Bun filesystem operations andHttpPlatformfile responses. -
#8111
f7f1d78Thanks @tim-smart! - Clamp HttpPlatform file response ranges to the file size so Content-Length matches the bytes available. Oversized reads stop at EOF, and offsets at or past EOF return an empty body with Content-Length 0. Apply the same clamping to the default Web file response implementation. -
#7699
47b358aThanks @kitlangton! - FixHttpApiClientdecoding form-urlencoded responses. -
#7705
45ffa72Thanks @kitlangton! - Run registered pre-response handlers beforeHttpApiTestreturns responses. -
#7701
6232650Thanks @kitlangton! - FixHttpApiClient.urlBuilderdropping base URL pathnames. -
#7661
4b73e1bThanks @kitlangton! - AddJsonPointer.parseUriFragmentandJsonPointer.formatUriFragmentfor converting RFC 6901 URI fragments, and use them to preserve percent-encoded definition names in exported JSON Schema references. JSON Schema compilation now rejects malformed local definition references returned bytoJsonSchemahooks. Such hooks must percent-encode characters that URI fragments do not permit, for example%as%25and#as%23. -
#7675
284050cThanks @kitlangton! - Normalize MIME type parameters and whitespace inMime.getAllExtensions. -
#8108
c85fc0bThanks @tim-smart! - On Node and Deno,FileSystem.File.seeknow rejects negative resulting positions with aBadArgumentplatform error, leaving the cursor unchanged. Its return type is nowEffect<bigint, PlatformError>. -
#8148
7999b07Thanks @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. -
#7703
7d455f5Thanks @kitlangton! - Apply endpoint OpenAPI overrides and transforms after schema generation. -
#8057
d681c2eThanks @kitlangton! - FixPrompt.datecarrying typed digits into the next field when pressing Tab, including when navigation wraps. -
#7742
84d2a47Thanks @kitlangton! - PreventReactivity.querycleanup from failing when keys are repeated. -
#7659
ed74b18Thanks @kitlangton! - Preserve pending leftovers when aSink.flatMapcontinuation completes without consuming input. -
#7671
2245997Thanks @kitlangton! - Preserve SSE events with mixed line endings. -
#7691
d386979Thanks @kitlangton! - Ignore Range headers on non-GET requests in HttpStaticServer. -
#8109
fc9fedfThanks @tim-smart! - Parse HttpStaticServer byte range integers exactly, including values above Number.MAX_SAFE_INTEGER. Oversized starts now return 416 with Content-Range instead of falling back to 200. Oversized ends clamp to the last byte, and oversized suffixes return the whole file as 206. -
#7697
7750dbeThanks @kitlangton! - FixHttpApiBuilderignoring the status annotation on aHttpApiSchema.WithHeaderswrapper around a streaming success, which defected when the wrapper and inner statuses differed. -
#7667
fc91af6Thanks @kitlangton! - FixToml.parserejecting child tables in separate array-of-tables entries. -
#8106
39b9738Thanks @tim-smart! - Fix tool result serialization to select the codec usingisFailureand preserveencodedResultthroughResponse.AllPartsround trips.Add
Tool.failureResultSchema(tool)andTool.ExecutionFailureto handle user failures,AiError, and denied or interrupted calls consistently. Also exportHttpRequestDetailsandHttpResponseDetailsfromAiError; theResponseexports remain available.Breaking changes
- Stored results must match the selected schema. With success
Schema.Numberand failureSchema.NumberFromString, migrate failed results from404to"404". Response.ToolResultPartreturnsSchema.Codecinstead ofSchema.decodeTo. Update annotations that depend on the old type.Tool.FailureResultandTool.Result, including their encoded variants, now includeTool.ExecutionFailurein both failure modes. Handle it when narrowing failed results.
- Stored results must match the selected schema. With success
-
#8132
88093b5Thanks @LeonardoTrapani! - Fix activity count leaks when workflow activity acquisition is interrupted, which could block later workflow suspension. -
#7669
d14c463Thanks @kitlangton! - Fix folded YAML scalars to preserve paragraph and indentation breaks. -
#7872
d473bd3Thanks @kitlangton! - Preserve defined falsy Error causes (0,false,"",null,0n, andNaN) inFormatter.formatoutput. Missing and explicitlyundefinedcauses remain omitted. -
#7451
84864bcThanks @gcanti! - Fix equivalence derivation for schema class APIs by adopting the equivalence of
their declared fields. Class declarations previously fell back to
Equal.equals, which also compared runtime properties outside the schema and
could make field-equivalent class instances compare as unequal. -
#7920
e2ae724Thanks @kitlangton! - FixGraph.bellmanFordreporting a negative cycle as affecting a target across an impassable, positive-infinite-weight edge. Targets separated from the cycle by such edges now retain their finite shortest path or remain unreachable, while targets reachable from the cycle through finite-weight edges still report an error. -
#7625
f921ed3Thanks @kitlangton! - PreventHashMapiterators from exposing mutable internal collision entries. -
#7886
1df933dThanks @kitlangton! - FixHashRing.getShardsskipping an eligible node at the first ring position when other nodes have reached their allocation quota. -
#7629
829aff9Thanks @kitlangton! - Compare header names case-insensitively inHeaders.isRedactedName. -
#7627
aa0aba3Thanks @kitlangton! - FixHeaders.redactandHeaders.isRedactedNameskipping matches when a redaction pattern is a global or sticky regular expression. -
#7945
a71140fThanks @kitlangton! - Constrain the data-firstHttpClient.catch(client, recover)overload to recover with
HttpClientResponsevalues, matching the data-last overload. Callbacks returning other
success types are now rejected; useEffect.catchon the result ofclient.execute(request)
to recover to arbitrary values. -
#7922
0276a27Thanks @kitlangton! - FixHttpClient.followRedirectsbypassing response-level recovery when request preprocessing fails. -
#8131
10d2c98Thanks @gcanti! - FixHttpClientResponse.schemaJsonandHttpClientResponse.schemaNoBodyto apply parse options when decoding response
schemas. -
#7679
c86c999Thanks @kitlangton! - Close request scopes for streaming HEAD responses. -
#7681
975f758Thanks @kitlangton! - PreserveContent-Lengthheaders inHttpServerResponse.fromWeb. -
#7689
2a3a478Thanks @kitlangton! - Normalize router prefixes before removing them from handler request URLs. -
#7898
1e6e206Thanks @kitlangton! - FixHttpRunnerHTTP and WebSocket client URLs adding an extra leading slash to slash-prefixed paths. Insert the address/path separator only when it is missing, preserving intentional leading and interior slashes.This path correction is normally masked by router normalization, but prevents route misses for non-root paths when duplicate-slash normalization is disabled. Applications that compensate for the extra slash may need to remove that compensation. Router defaults and shared trailing-slash handling are unchanged.
-
#7927
fa6027bThanks @tim-smart! - Reduce cold start cost ofHttpRouterandHttpEffectweb handlers.HttpServerRespondableno longer importsSchemato detect schema errors, which removes the Schema modules from bundles that do not otherwise use them (about 23% of a minimalHttpRouterbundle).HttpRouter.toWebHandler,HttpEffect.toWebHandlerLayerandHttpEffect.toWebHandlerLayerWithnow build the layer immediately instead of on the first request. A failed build never surfaces as an unhandled rejection; every request rejects with the build error instead.
-
#7561
7616f73Thanks @jensdev! - FixHttpApiMiddleware-declared errors being duplicated and mis-encoded. -
#7954
fc668b6Thanks @fitchmultz! - Allow generatedHttpApiClientmethods andAtomHttpApiqueries and mutations to accept native SSE decode options per call through the request'ssseOptionsfield. -
#7994
d425c8cThanks @tim-smart! - Prevent unencodable atom values from aborting dehydration of the rest of an atom registry. -
#7935
ce120f4Thanks @kitlangton! - FixLayer.tapErrorandLayer.tapCauseto require observers that accept the source layer's complete error type. -
#7983
248201fThanks @kitlangton! - HonorcaptureStackTracein both forms ofLayer.withSpan. Layer construction diagnostics previously reported a location insideLayer.tsinstead of thewithSpancall site, and ignoredcaptureStackTrace: falseor a supplied lazy stack. -
#7937
e80d397Thanks @kitlangton! - Preserve resource acquisition errors onLayerMap.Servicewhenpreload: trueis set. The yielded service instance and itsget,contextEffect, andcontextEffectOptionaccessors now retain the resource error type because a resource can fail when reacquired, even if preloading succeeded.Consumers that assumed these accessors had a
nevererror must handle the resource error. Runtime behavior is unchanged. -
#7874
f1a941dThanks @kitlangton! - FixLogger.toFiledropping the remainder of a log batch when a successful file write writes only part of the buffer. File logging now uses the complete-write contract; write errors continue to be ignored. -
#7814
73bc3a1Thanks @kitlangton! - FixMcpServerHTTP resource templates failing to resolve. -
#7816
b628bb1Thanks @kitlangton! - FixMcpServer.registerPromptcallback types to use decoded prompt parameters. -
#7495
6e3ae7bThanks @IMax153! - McpServer no longer sendsnullor array tool results asstructuredContent, which MCP requires to be a JSON object. -
#7835
e891247Thanks @kitlangton! - Remove queued control envelopes when clearing an address from in-memory message storage. -
#7993
53e6c73Thanks @kitlangton! - Ensure metrics with equal attributes share a series regardless of attribute insertion order. -
#7991
1579d6fThanks @kitlangton! - Fix metrics reused across differentMetricRegistryservices to read and update the active registry while preserving each registry's values when revisited. -
#7665
d3c6b73Thanks @kitlangton! - FixModel.FieldOptionto preserve omitted variants. -
#7987
4a59c6aThanks @kitlangton! - AddMultipart.isStreamPartto recognize only a textFieldor streamedFile, while preservingMultipart.isPartfor all branded multipart parts, includingPersistedFilevalues. -
#7519
145d8e1Thanks @gcanti! - FixSchema.mutableto preserve array and tuple metadata and reject node-level encodings. -
#7776
f74282cThanks @kitlangton! - Preserve values added to an emptyMutableListbyprependAllwhen appending more values. -
#7571
0a38623Thanks @tim-smart! - Export theRandom.Randomservice interface andMetric.MetricRegistrytype so custom service implementations can be annotated without accessingContext.Referencephantom types. -
#7524
0a08ae0Thanks @fubhy! - AddNetAddressundereffect/unstable/netfor MAC, IP, internet socket, and Unix socket addresses, with checked parsing, schemas, equality, canonical string serialization, and URL formatting. Companion modulesIpInterfaceandIpNetworkrepresent IP interfaces and CIDR networks.HTTP and socket servers now expose
NetAddress.SocketAddress. Replace TCPhostnameaccess withNetAddress.formatIp(address.address)and useUnixPathAddress.pathfor Unix sockets. URL helpers bracket IPv6 addresses and reject scoped IPv6. Bun and Deno HTTP server layers can now fail withServeErrorwhen listener address conversion fails.PostgreSQL
inetvalues now useIpInterface;cidrvalues useIpNetworkand reject addresses with host bits set. -
#7443
fa6a56bThanks @youngspe! - Terminate theStream.fromEventListenerstream after one item ifonce: true. -
#7510
d60c5d4Thanks @gcanti! - Normalize numeric collection and batch counts acrossStream,Channel,Sink,MutableList,RequestResolver,Queue,TxQueue,PubSub, andHashRing, preventing fractional,NaN, and non-positive counts from producing incorrect output, exceptions, waits for the wrong batch size, or non-terminating pulls. -
#7910
07ffd25Thanks @kitlangton! - FixNumber.remainderto preserve negative-zero dividends with ordinary finite divisors. -
#7547
9b517adThanks @tim-smart! - ImprovePersistedQueuereliability across SQL, Redis, and memory stores. Retry policy now lives onmake(), attempts count on claim, retries follow aSchedule, and exhausted or undecodable elements are dead-lettered. Add retention cleanup, durable acknowledgement retries, storage schema fixes, local poll wakeups, and fixes for the memory take race and Redis dedup growth. -
#7778
604b1c1Thanks @kitlangton! - EnsureOptic.pickandOptic.omitdelete focused optional fields omitted from a replacement. -
#7780
ccc2e02Thanks @kitlangton! - FixOptic.optionalKeyto splice tuple elements selected by string indices. -
#7782
14d810aThanks @kitlangton! - FixOrder.combineAllconsuming one-shot iterables after the first comparison. -
#7931
a9d1ee3Thanks @tim-smart! - Fix disabled OTLP batching to skip empty exports and avoid resending buffered items. -
#7929
a31adbeThanks @tim-smart! - Speed upOtlpTracerspan creation and export. Spans now allocate identifiers, attributes, and events lazily, andEncoding.randomHexproduces flat strings for 16 and 32 character identifiers so serialization no longer flattens ropes. -
#7584
7245f87Thanks @kitlangton! - FixPartitionedSemaphoreleaving a new waiter suspended when a previously resumed waiter for the same partition is interrupted before its acquisition completes. -
#7766
3a0828bThanks @kitlangton! - Persist synchronous defects thrown byPersistedCachelookups. -
#7604
cd83544Thanks @kitlangton! - KeepPool.reserveitems out of shared circulation when other borrowers return or overlapping reservations close. Restore available slots only after the last reservation closes. -
#8078
6550a07Thanks @tim-smart! - PortHttpApiBuilder.handlerfrom v3 to define reusable endpoint callbacks with inferred request, response, error, and service types. -
#7663
6f090d4Thanks @kitlangton! - Preserve schema classes when extracting their defaultVariantSchemavariant. -
#7760
b505c0dThanks @kitlangton! - Preserve negative counter deltas in OTLP and OpenTelemetry metric exports. -
#7478
186dd49Thanks @gcanti! - Normalize numeric collection counts consistently acrossArray,Chunk,Iterable, andString, and makeTupleOffall back toArrayfor positive fractional lengths. -
#8097
9f37e58Thanks @tim-smart! - Keep the previous prompt frame visible until the next frame or submission is ready to display. -
#7637
4446451Thanks @kitlangton! - Preserve text parts and provider options when serializing prompts. -
#7639
58be972Thanks @kitlangton! - Preserve generated files when converting AI responses to prompts. -
#7603
1320075Thanks @kitlangton! - Fix capacity-one PubSub subscriber cursors after sliding past messages, including duplicate delivery and invalid state when unsubscribing from a slid message. -
#7487
ba53b64Thanks @tim-smart! - RedesignSocketaround a scoped, pull-based reader with transport backpressure.Socketnow exposesreaderandwriter. 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 athighWaterMark(64 KiB by default) and resume after draining. Browser WebSockets cannot pause, so they can fail withSocketReadErrorat a configuredhighWaterMark. Writes await native drain signals and batch withcork/uncorkwhere available.Breaking changes
Socket.run,Socket.runString, andSocket.runRaware removed. Acquiresocket.reader(orSocket.readerBytes/Socket.readerString) in a scope and pull in a loop. Code before the first pull replacesonOpen.Socket.makenow takes{ reader, writer }. The writer acquisition is infallible and yields aWriterwithwriteandwriteAll; both operations can still fail withSocketError.- Every close fails the pull with
SocketErrorwrappingSocketCloseError. The close-code predicates are removed; useEffect.retryaround the scoped read loop to reconnect. Socket.toChannelandSocket.toChannelStringnow read from the pull and fail on close.Socket.toStreamis added for read-only consumption.fromWebSocketdrops theonInitialRunoption;SendQueueCapacityis removed.- Accepted server sockets pause immediately. Their reader attaches to the existing connection and cannot reconnect after close.
-
#7806
f7490d4Thanks @tim-smart! - AddQueue.flushandQueue.flushUnsafefor manually releasing pending takers, including after synchronous offers. -
#7576
c8ea602Thanks @kitlangton! - FixQueuemessage duplication, capacity overruns, and consumer defects when a resumed producer synchronously uses the same queue. Zero-capacity queues now reserve each handed-off message for its consumer before resuming the producer. -
#7498
62d82f4Thanks @gjermundgaraba! - AllowSqlEventJournalto decode entry identifiers and payloads from SQL drivers that return BLOB values asArrayBuffer. -
#7644
a2c9e7cThanks @gcanti! - Remove the redundantGraph.Protointerface. UseGraph.Graph<N, E, Graph.Kind>when accepting any immutable graph. -
#7497
97dd022Thanks @javascript-unsafe! - TreatNaNas a non-positive count inStream.take. -
#7864
f984ee8Thanks @kitlangton! - FixRandom.nextBetweenandCrypto.randomBetweenreturning their exclusive upper bound when floating-point arithmetic rounds up. -
#7985
f1b2910Thanks @kitlangton! - Report the exact remaining store lifetime inRateLimiterfixed-windowresetAftermetadata whenonExceededis"delay", instead of rounding up to a whole window. Admission, returned delays, and remaining-token counts are unchanged. -
#7516
a29e05aThanks @kitlangton! - FixRcMapandLayerMapcleanup after invalidating an actively borrowed entry and reacquiring the same key.
The invalidated resource is released when its last borrower closes, even with infinite idle TTL, without removing
the replacement entry. Old idle timers also leave replacement entries untouched. -
#7605
1aa1d8bThanks @kitlangton! - FixRcMapentries getting stuck when the lookup function throws synchronously. Later borrowers now receive the defect, and unused entries are released according to their idle TTL instead of permanently consuming capacity. -
#7598
bb99734Thanks @kitlangton! - KeepRcRefclosed when an in-flight acquisition finishes after its owning scope has closed. Release the late-acquired resource and interrupt waiting borrowers instead of making the resource available again. -
#7586
222e7caThanks @kitlangton! - PreventRcRefborrower cleanup from discarding replacement resources after invalidation or reopening a reference after its owner scope has closed. -
#7565
797c9e3Thanks @typedrat! - TypeCause.Reason#annotateas accepting aContextonly. -
#7461
b4d5398Thanks @tim-smart! - Remove the MessagePack encoding and RPC serialization APIs together with themsgpackrdependency. Event-log persistence and remote messages now use SchemaBinary, and cluster transports use SchemaBinary unless NDJSON is selected explicitly. -
#8143
c8349edThanks @gcanti! - RenameSchemaGetter.transformOrFailtoSchemaGetter.transformEffectandSchemaTransformation.transformOrFailtoSchemaTransformation.transformEffect. Replace calls to the old names with theirtransformEffectequivalents. -
#8022
8426e5fThanks @kitlangton! - Correct theEffect.repeatOrElsefallback type to expose the previous step'sSchedule.Metadata, matching the existing runtime value. -
#7520
26e0085Thanks @ebramanti! - Report recovered MCP toolkit failures and defects to configuredErrorReporters, including declared tool failures returned withisError: true. -
#7583
1a86166Thanks @kitlangton! - FixRequestResolver.withCacheretaining abandoned entries when a pending request is cancelled -
#7613
0856631Thanks @kitlangton! - Preserve completed results and propagate resolver failures fromRequestResolver.persisted. -
#7594
0af0985Thanks @kitlangton! - Keep completed results inRequestResolver.withCachewhen a losingRequestResolver.raceresolver is interrupted after the winner completes, avoiding repeated backend requests on subsequent equal lookups. -
#7979
bc582c9Thanks @kitlangton! - Preserve typed errors, defects, and interrupts fromRequestResolver.fromEffectTaggedhandlers. -
#7981
2c63f1eThanks @kitlangton! - FixRequestResolver.fromEffectTaggedto consume handler results as an iterable, allowing arrays, iterators, and generators to resolve requests in order. -
#8024
0d98213Thanks @kitlangton! - FixTypes.RequiredKeysdropping named required keys on types with index signatures. Derived type annotations may need to include these keys. -
#7496
ca6f0dcThanks @nikhilsnayak! - AddHttpClientResponse.url, including query parameters and excluding the hash. When redirects are followed, it reports
the final URL. -
#7683
d8cc9edThanks @kitlangton! - Preserve zero and empty-string request IDs in JSON-RPC control messages. -
#7930
42fd969Thanks @tim-smart! - The default scheduler falls back to a microtask when setting a timer throws. Cloudflare Workers disallow timers in global scope, so an effect that yielded while running at module load failed with "Disallowed operation called within global scope". -
#7558
5641ad3Thanks @gcanti! - Move the built-in schema revivers fromSchematoSchemaRepresentation.
Rename the reviver constructors tomakeReviverDeclaration,
makeReviverFilter, andmakeReviverFilterGroup.Change
Schema.toEncoderXmlto fail withSchemaIssue.Issuedirectly instead
of wrapping failures inSchemaError. Consumers that readerror.issueshould
now use the error value itself. -
#7641
629870dThanks @kitlangton! - Preserve array-valued leaves whenSchemaGetter.makeTreeRecordaggregates duplicate paths. -
#7673
d592c14Thanks @kitlangton! - Preserve leading U+FEFF characters in SchemaBinary string values when decoding. -
#8131
10d2c98Thanks @gcanti! - Align Schema construction and parsing semantics, simplify parse options, accept inherited declared fields, and move Union settings into a node-local options object.Breaking changes
-
Class.make,Class.makeOption, andClass.makeEffectnow return an existing instance unchanged. This avoids duplicate initialization and makes the construction APIs consistent. Usenew MyClass(input)when a distinct instance is required. -
Literal(0)andLiteral(-0)continue to accept either signed zero, but decoding and encoding now preserve the input sign. Add an explicit transformation when a canonical sign is required. -
parseOptionsannotations no longer affect parsing. Options passed when creating or calling a decoder, encoder, or constructor adapter now apply to the complete operation. Move operation-wide settings from annotations to the relevant parser API. -
propertyOrderhas been removed fromParseOptionsbecause preserving input order required a separate, rarely used object reconstruction path. Schema parsing no longer guarantees that decoded object keys follow their input order. Remove the option and apply any required presentation or serialization order after parsing. -
concurrencynow applies only to product children: tuple elements, array elements, struct fields, record entries, and structs with rest. It followsEffect.forEachsemantics, defaults to sequential execution, and applies independently at every nested product. Union candidates remain sequential because speculative candidate evaluation can run transformations that are not selected. Existing product parsing can keep the option. Replace code that relied on concurrent Union candidates with explicitly coordinated parser calls. With concurrent Record key transformations, completion order determines the retained value when transformed keys collide. -
onExcessProperty: "preserve"has been removed because it allowed unvalidated values absent from the schema type to cross the parsing boundary. Model additional properties withRecordorStructWithRest;"ignore"and"error"remain available. -
Declared
Structfields may now be inherited and are copied to own properties in the output. DynamicRecordindex signatures remain own-only, while finite literal record keys are declared and may be inherited. The__proto__field remains own-only. Check ownership before parsing when every declared field must be own. -
SchemaAST.Union.modemoved toSchemaAST.Union.options?.modeso node-local constructor settings live in one options object instead of special top-level fields. An absent value defaults to"anyOf".SchemaRepresentation.Unionnow serializes{ options: { mode: "oneOf" } }; update direct AST access and regenerate or migrate persisted representation documents. The publicSchema.Union(members, { mode })call is unchanged.
-
-
#8147
53909a9Thanks @gcanti! - JSON Schema generation now follows the canonical JSON codec more closely and leaves unmodeled object properties open by default, matching Effect decoding.Breaking changes
Schema.ToJsonSchemaOptions.additionalPropertieshas been replaced byonExcessProperty:- Replace
{ additionalProperties: true }with{ onExcessProperty: "ignore" }. - Replace
{ additionalProperties: false }with{ onExcessProperty: "error" }. - Replace a schema-valued
additionalPropertiesoption withSchema.RecordorSchema.StructWithRest.
Schema.Enumnow rejects non-finite numeric members.Schema.isMultipleOfnow rejects zero and non-finite divisors, and normalizes negative divisors.Generation is more accurate for index signatures, empty structs, template literal alternatives, capitalized strings, and unique symbols. Conjunctive index keys remain open by default;
onExcessProperty: "error"constrains them withpropertyNames. - Replace
-
#7606
78a4269Thanks @kitlangton! - FixScopedCache.invalidateAlldiscarding entries created by reentrant resource finalizers without releasing them. Entries are now removed before their finalizers run, so replacement resources remain cached and are released when the cache closes. -
#7612
06c6307Thanks @kitlangton! - Capture synchronous defects thrown byScopedCache.refreshlookup callbacks. -
#8026
0847c41Thanks @kitlangton! - FixEffect.annotateLogsScopedto restore or remove unchangedNaNannotations when the scope closes. -
#8155
5a77084Thanks @tim-smart! - Use branded interfaces forReactivity,LanguageModel,EmbeddingModel, andChat. Refer to each service's same-name type instead of.Serviceor["Service"]; custom implementations must include[TypeId]: TypeId. -
#7913
96f99b3Thanks @Hoishin! - Fix HttpRouter nested prefixed application order -
#7906
7bb8781Thanks @kitlangton! - Honor services explicitly supplied when registering cluster entities while retaining construction-context services as fallbacks. -
#8114
4907e9bThanks @tim-smart! - Skip optional stack capture whenError.stackTraceLimitis zero. -
#8090
2a30248Thanks @tim-smart! - Reduce the basic Effect bundle size by keeping cause deduplication local, making encoding lookup tables tree-shakeable, removing redundant cause field declarations, and simplifying primitive hash dispatch without changing hash values. -
#7825
8364dddThanks @kitlangton! - Resume paused WebSockets after their readers take ownership. -
#7827
ad67d8cThanks @kitlangton! - Count buffered WebSocket text frames by their UTF-8 byte length when enforcinghighWaterMark. -
#7798
ec0c087Thanks @kitlangton! - Emit CR-terminated lines fromStream.splitLineswithout pulling upstream again. -
#7443
fa6a56bThanks @youngspe! - Loosen Stream.addEventListener type parameter -
#7844
a2c1ce6Thanks @kitlangton! - Preserve callback error identity inSqlEventJournal.writeandSqlEventJournal.withRemoteUncommited. -
#7837
91e9af0Thanks @kitlangton! - Preserve reply IDs in SQL-backedMessageStorage.unprocessedMessagesByIdreads. -
#7635
7bd3f34Thanks @kitlangton! - Fix placeholder numbering for cached fragments used in returning helpers. -
#7493
ef16581Thanks @utopyin! - AddStatement.SpanPropagationEnabledto scope driver span parenting undersql.executefor any SQL client. Disabled by default.import { Effect } from "effect" import { Statement } from "effect/unstable/sql" query.pipe(Effect.provideService(Statement.SpanPropagationEnabled, true))
-
#7633
1693a87Thanks @kitlangton! - Fix SQL returning helpers to compile identifiers with dialect-specific escaping. -
#7860
df3fc47Thanks @kitlangton! - Ensure PostgreSQL shard acquisition and refresh return only the requested shards. -
#7904
e11be41Thanks @kitlangton! - Include the model's decoding services in the public requirements ofSqlModel.makeResolvers().insert, alongside its existing input-encoding services.This intentionally tightens compile-time checking: previously accepted callers must now provide the services already needed to decode inserted rows at runtime. Provide those services when executing the insert with
SqlResolver.request.insertVoidstill requires only input-encoding services, and service-free models need no changes. Runtime behavior is unchanged. -
#7655
2e39e8bThanks @kitlangton! - FixStream.rechunkfailing on large source chunks. -
#7538
11c5ee7Thanks @gwagjiug! - ParseContent-Lengthmetadata strictly across HTTP modules, ignoring malformed or unsafe values instead of coercing them. -
#7522
1742d2fThanks @gwagjiug! - IgnoreSet-Cookieheaders whose cookie names do not satisfy the RFC 6265 token syntax. -
#7619
8efc70eThanks @kitlangton! - Honor numeric property selectors in Struct selection and mapping utilities. -
#7560
9642776Thanks @gcanti! - ExposeSchemaASTnodes,SchemaIssuenodes,SchemaGetter.Getter, and theSchemaTransformationmodels through structural instance interfaces instead of concrete class declarations. The constructors remain usable withnewandinstanceof, but theirprototypeis no longer part of the public TypeScript API. Replace type-level access through a constructor'sprototypewith the corresponding named instance interface, such asSchemaGetter.Getter<T, E, R>.SchemaAST.Baseis no longer exported. UseSchemaAST.ASTwhen accepting any AST node, and use theSchemaAST.is*guards to narrow individual variants. -
#7790
6680828Thanks @kitlangton! - Fix the curriedSynchronizedRef.modifySomeEffectoverload to accept only the callback, matching its runtime behavior. -
#7569
c34edcbThanks @tim-smart! - Stop declaringSynchronizedRefas a subtype ofRef, preventingRefcombinators from accepting values that do not implement the required runtime representation. -
#8012
7b2c5bdThanks @kitlangton! - Preserve the source error type when a savedEffect.tapDefectoperator is applied. The source error is now inferred from each application instead of when the operator is created. Runtime behavior is unchanged. -
#7427
1a2cceeThanks @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.
-
#8094
db995dfThanks @gcanti! - Separate template literal validation from transformed tuple parsing.TemplateLiteralParsernow propagates its parts' decoding and encoding service requirements.Breaking changes
Schema.TemplateLiteralandSchemaAST.TemplateLiteralnow throw during construction when a part contains an encoding, including inside unions and nested templates. This also rejects transformations whose decoded and encoded types are equal. Brands and supported checks without encodings remain valid.Use
Schema.Literals([0, 1])to describe bit spellings orSchema.Finiteto describe finite numeric spellings. UseSchema.TemplateLiteralParserwhen you need to decode transformed parts into a tuple. ExplicitSchema.toTypeorSchema.toEncodedprojections can remove an encoding, but do not necessarily preserve the strings accepted by the old template. For example, aFinitepart rejects the empty segment accepted byFiniteFromString.Schema.toEncoded(Schema.TemplateLiteralParser(...))now validates the structure of the template instead of accepting any string. UseSchema.Stringwhen unrestricted strings are intended.When parser parts require services, provide those services to the corresponding decoding or encoding effect. These requirements were previously omitted from the parser's types.
-
#7870
af0ccddThanks @kitlangton! - FixTestSchema.Asserts.ast.fields.equalsto compare ASTs for all own struct fields, including symbol and non-enumerable keys. Equivalent field schemas now compare equally regardless of schema instance identity, while differing ASTs and distinct symbol keys remain unequal. -
#8127
addeaeaThanks @tim-smart! - dispatch websocket events directly -
#7448
7704034Thanks @candrewlee14! - Fix response tool part assignability after narrowing generic intersected tool records. -
#7486
e72b12fThanks @tim-smart! - Make automatic tool resolution interruption-safe for incomplete language model responses. -
#7481
310dd9cThanks @jpenilla! - Restore theEffect.timeouterror message soTimeoutErrorincludes the elapsed duration. -
#8032
1c2afc1Thanks @kitlangton! - FixEffect.timeoutOrElseto finish interrupting the source before evaluating the fallback, preventing the source from winning after the timeout.Fallbacks now run in the caller fiber and inherit its interruptibility and supervision.
-
#8103
44f44caThanks @tim-smart! - Fix token-bucketretryAfter,delayandresetAfterin the memory and Redis stores. Timing now follows whole-token refill boundaries and accounts for elapsed time, including fractional token costs. Redis preserves signed fractional counts and keeps keys until capacity actually refills.RateLimiterStore.tokenBucketnow returns[remaining, elapsedMillis]instead ofremaining. Custom stores must return both values from the same atomic operation; see thetokenBucketdocs for the contract. Returning[remaining, 0]keeps the old timing bug. -
#7912
f43b9d6Thanks @kitlangton! - FixTokenizer.truncateto account for token costs between messages. -
#7748
56e72b3Thanks @kitlangton! - Encode tool results with the schema for their known success or failure branch. -
#8030
50ef80eThanks @kitlangton! - FixEffect.track(metric, mapper)to reject source errors the mapper cannot handle. -
#7774
fc3b718Thanks @kitlangton! - Preserve valued prefix nodes when removing a longer key from aTrie. -
#8016
ee336d8Thanks @kitlangton! - Correct the error types ofEffect.tryandEffect.tryPromise. Direct function forms retainCause.UnknownError, while{ try, catch }options use the error type returned bycatch.Explicit two-generic direct calls, union-valued arguments, and generic aliases that combine the two forms no longer compile. Use
{ try, catch }with a real error mapper, or narrow a union before calling the constructor.Runtime behavior, callback arguments, and error mapping are unchanged.
-
#7924
d12f922Thanks @kitlangton! - CorrectTuple.evolveresult types when a transform may beundefined. The result now includes both the transformed and unchanged element types, matching the existing runtime behavior. Accepted inputs and runtime behavior are unchanged.Code relying on the previous, incorrect result type must handle both outcomes. For example, a number-to-string transform that may be absent now produces
number | string, so callers assuming a number-only result must adjust. -
#7553
46d8310Thanks @tim-smart! - Move the Cookie, Cookies, Headers, and UrlParams schemas fromeffect/unstable/httptoeffect/Schema, including their record and JSON-field helper schemas. -
#7623
59812fdThanks @kitlangton! - FixUrlParams.fromInputto stringifynullvalues. -
#7631
f9d0decThanks @kitlangton! - PreventUrlParams.setAllfrom mutating reusable overrides. -
#7855
4372c79Thanks @gcanti! - Treat only unpadded decimal integers from0through4294967294as array indices in environment-backed configuration and bracket-path decoding. This preserves numeric-looking object keys and prevents out-of-range environment keys from producing impossible array lengths. Bracket paths that intend to address arrays must use[1]instead of[01]. -
#7551
81485efThanks @tim-smart! - Cluster shard-lock recovery no longer stalls behind a wedged reserved SQL connection.While lock storage is unhealthy, the empty liveness probe (
refresh(address, [])) now runs on the shared pool instead of the reserved lock connection, so a hung reserved connection cannot block recovery. Failed probes are also logged as warnings instead of being silently swallowed. -
#8028
bd393d6Thanks @kitlangton! - FixEffect.withErrorReportingto return anEffectinstead of preserving input
subtypes such asExit, whose subtype-specific fields are not present on the wrapper. -
#7570
0c95c04Thanks @tim-smart! - FixWorker.runhanging uninterruptibly when a worker dies before the ready handshake.