effect
4.0.0-rc.115
Patch Changes
-
#8196
657254bThanks @gcanti! - Optimize schema initialization while preserving custom constructor options. -
#8190
f9ef0e9Thanks @javascript-unsafe! - Omit response bodies for statuses 204, 205, and 304 inHttpServerResponse.toWeband the Bun/Deno HTTP adapters, preventing invalid Web responses and hung requests. Cancel omitted rawReadableStreambodies, and finalize request resources without starting omitted Effect streams. -
#8187
4f73f9eThanks @tim-smart! - Parameterize persistence lookup keys in both SQL backing stores’getManyqueries.
4.0.0-rc.114
Patch Changes
-
#8177
3ff4952Thanks @tim-smart! - AllowEffect.cachedWithTTLto compute the TTL from each completedExit, so successes and failures can use different cache durations. -
#8164
6d55555Thanks @sam-goodwin! - Keep Node and Bun file stats usable when optional numeric metadata exceeds the safe integer range by returningOption.none()for those fields. -
#8162
716e0c0Thanks @tim-smart! - Fix published declarations referencing symbols stripped as@internal, which broke consumers compiling withskipLibCheck: false.Effectable.d.tsnow uses the publicEffect.TypeId,Match.d.tsno longer aliases an internalContextualtype,Schema.d.tsships theAnnotationSchemaConstraintalias it references, and the CLI’stoFlagDochelper is marked internal so it no longer leaksParam.getParamMetadata. -
#8160
d4e4ad5Thanks @gcanti! - FixSchemaRepresentation.toCodeDocumentgenerating invalid TypeScript for optional tuple elements containing unions or nested readonly tuples. Optional element types are now parenthesized, for examplereadonly [(string | number)?]instead ofreadonly [string | number?]. Generated runtime schemas are unchanged. -
#8158
b1988f4Thanks @gcanti! - FixSchemaRepresentation.toCodeDocumentdropping Struct fields named__proto__from generated schemas. These fields now use computed keys, such asSchema.Struct({ ["__proto__"]: Schema.String }), so the generated schema validates them correctly. -
#8169
482b7d7Thanks @gcanti! - ImproveSchemaRepresentation.fromJsonSchemaDocumentandfromJsonSchemaMultiDocument:-
Import
{ not: {} }asSchema.Never(#8137). -
Import closed records with one
patternPropertiesentry,additionalProperties: false, and no declared or required properties whenpatterns: "apply"is enabled. These were previously rejected.{"type": "object","patternProperties": { "^a": { "type": "number" } },"additionalProperties": false}Schema.Record(Schema.String.check(Schema.isPattern(/^a/)),Schema.Finite) -
Reject open patterned objects with
patterns: "apply"instead of generating incompatible TypeScript index signatures.{"type": "object","patternProperties": { "^a": { "type": "number" } },"additionalProperties": true}Import now explains that the generated TypeScript index signatures would give incorrect types to unmatched keys, and reports the source path. The same applies when
additionalPropertiesis omitted or{}. Patterns can still be combined with a closed object inallOfwhen the result has a finite set of keys. Usepatterns: "ignore"only if you intend to discard the pattern and its value constraints. -
Reject references inside a subschema with its own
$idinstead of potentially resolving against the wrong definitions. Resolve or flatten these references before importing. A$idon the document root remains supported.{"$id": "https://example.com/root","$defs": { "Value": { "type": "string" } },"type": "object","properties": {"child": {"$id": "child","$defs": { "Value": { "type": "number" } },"$ref": "#/$defs/Value"}}}Here
childrefers to the nested numericValue, not the root stringValue. Import now reports that references inside a subschema with its own$idare unsupported instead of incorrectly using the root definition. -
Explain import failures using JSON Schema keyword names, the reason for rejection, and the source path. Reference errors distinguish missing definitions, unsupported reference formats, and circular aliases. Pattern errors explain how to opt in for trusted schemas or explicitly discard the constraints.
-
-
#8162
716e0c0Thanks @tim-smart! - RenameSchema.Annotations.ToArbitrary.ConstrainttoSchema.Annotations.ToArbitrary.FilterConstraint.Code that refers to the previous type name should update its type annotations to use
FilterConstraint. -
#8181
9941e6dThanks @Ishkirat-Singh! - Makemessageoptional forPrompt.SelectandPrompt.MultiSelect. When omitted, prompts display only the choices and submission shows a tick followed by the selected titles.Prompt.AutoCompletestill requires a message.
4.0.0-rc.113
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.sampleEffectprovides 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 validatesoneOfexclusivity 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 theirSchema.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 intrinsic
Equalimplementation 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 andarbitrary-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.toArbitraryandeffect/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 with
EntityNotAssignedToRunner: 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. ThecurrentScheduler,currentSpan,currentLogLevel,currentStackFrame, andcurrentPreventYieldfields are nowscheduler,span,logLevel,stackFrame, andpreventYield. AccessminimumLogLevelandmaxOpsBeforeYieldthroughcacheas 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 inHttpServerResponse.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 ofnever, 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 toEqual.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 withHttpClientResponsevalues, 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.
4.0.0-rc.112
Minor Changes
-
#7390
a5f78d3Thanks @tim-smart! - Make RPC serialization schema-aware.Add
codecForto RPC serialization and client/server protocols so RPC and cluster network payloads use the transport’s schema codec. Framing, cluster storage, and existing built-in wire formats remain unchanged.
Patch Changes
-
#7411
20cb4f2Thanks @altendky! - AddRcMap.getOptionandLayerMap.contextEffectOptionfor atomically retaining entries only when they are already cached. -
#7437
44675cbThanks @wmaurer! - Add an optionaldescriptiontoAiError.AuthenticationError, rendered after the kind-based suggestion, and pass the provider’s own error text through it on HTTP 401 and 403, so authentication failures report what actually went wrong instead of only a category. -
#7393
b6bf5e1Thanks @wmaurer! - FixPrompt.autoCompleteswallowingjandkwhile typing a filter query. -
#7401
0b9f780Thanks @gjermundgaraba! - Retry transient EventLog remote write failures so pending local entries are synchronized after recovery. -
#7384
150e92cThanks @tim-smart! - Improve synchronous Schema decode and encode performance by preserving completed parser exits and using a direct loop for common struct parsers. -
#7386
6740db2Thanks @tim-smart! - AddSchema.TaggedUnion.matchOrElsefor partial case matching with a typed fallback. -
#7389
d57bba1Thanks @tim-smart! - ImproveSchemaErrorconstruction performance by skipping stack frame capture. -
#7402
be75d5eThanks @tim-smart! - Improve Pool acquisition and release performance. Pool now tracks usage incrementally, stores available items in an intrusive FIFO, and skips work for fixed and empty pools. This changes the publicPool.StateandPool.PoolIteminterfaces. -
#7402
be75d5eThanks @tim-smart! - AddPool.use, which borrows an item while an effect runs and returns it on any exit. UnlikeEffect.scoped(Pool.get(pool)), it does not require aScope. -
#7402
be75d5eThanks @tim-smart! - Reduce scoped resource acquisition allocations by storing the first Scope finalizer inline and allocating a Map only when a second is added. This changes the publicScope.State.Openinterface. -
#7424
02a5146Thanks @tim-smart! - Skip remote event journal write callbacks when there are no uncommitted entries and return anOptionindicating whether the callback ran. -
#7312
15272a6Thanks @godu! - Fix shell completion for choice values containing quotes, spaces, word-break characters, Unicode, and shell metacharacters.Bash now quotes candidates for readline, keeps choice values intact when reconstructing words, and supports Bash 3.2 without associative arrays. Fish and Zsh escape choices across both parsing rounds, and Fish hides value-taking flags after use without suppressing their value completions.
-
#7395
436f10dThanks @wmaurer! - FixPrompt.fileswallowingjandkwhile typing a filter query. -
#7406
058fb15Thanks @gcanti! - Preserve finite string and unique symbol key unions in the return types ofArray.groupByandIterable.groupBy.Previously, grouping widened finite keys to
stringorsymbol, which lost known-key autocomplete and allowed access to keys that the selector could never produce. The newRecord.ReadonlyRecord.GroupByResultkeeps finite keys and marks their properties optional because any group may be absent at runtime, while openstringandsymbolselectors retain their existing record index signatures. -
#7415
4d89bb8Thanks @gcanti! - Reject unsupported JSON Schema references instead of resolving them by their final path segment, closes #7409. -
#7420
480fb15Thanks @gcanti! - Make JSON Schema dialect conversions preserve custom keywords, translate conditionals, contains, dependencies, identifiers, and tuples where representable, relocate local references after structural changes, and throw instead of silently changing unsupported constraints. -
#7417
f77ec19Thanks @Makisuo! - Defer built-in OpenAPI response generation until the documentation route is first requested, retrying after generation defects. -
#7388
925b82aThanks @ebramanti! - Fix MCP initialize rejected over the protocol version headerMcpServer.layerHttpvalidated theMCP-Protocol-Versionheader on every POST, including theinitializerequest. That header reports the version negotiated by an earlierinitialize, so on a fresh connection a client can only send its own default. Whenever that default was not among the server’s registered protocols theinitializereturned400and never reached version negotiation, even when the body offered a version the server supports.The header check now applies only to requests after initialization, where the specification requires it. An
initializenegotiates from the version offered in its body, through the protocol registry, and reports the selected version in the response. -
#7403
7455246Thanks @hsyntax! - Add support for explicit cache breakpoints on the OpenAI responses API for GPT-5.6-or-later. -
#7442
118124dThanks @tim-smart! - Redact password prompt values from CLI wizard command output. -
#7366
0dd7825Thanks @tim-smart! - AddSchemaBinary, a compact schema-derived codec with streaming, optional fingerprints and dictionaries, and RPC support. -
#7404
b722ecaThanks @gcanti! - Add a publicStandardSchemamodule containing the vendored Standard Schema V1 specification and remove the direct dependency on@standard-schema/spec. -
#7436
811d579Thanks @gcanti! - Fix JSON Schema imports:- Type-specific keywords no longer imply a type. For example,
minLengthvalidates strings without rejecting non-string values. - Constraints next to
const,enum, and$refare now applied instead of being ignored. - Disjoint and linear union intersections are imported without a Cartesian expansion. Other overlapping union intersections fail with an explicit error.
- References to definitions without unions no longer make otherwise linear intersections fail.
- Imported
oneOfschemas remainoneOfwhen exported again. minItemsis preserved whenprefixItemsdoes not fully enforce it.
- Type-specific keywords no longer imply a type. For example,
-
#7382
043b587Thanks @tim-smart! - Replace per-prompt prefix options with a context-based theme for CLI prompt symbols and colors. -
#7373
8583727Thanks @ChubbyDuck! - Drop unreachable concurrency guard in iteratorEagerImpl -
#7429
d9d2cfcThanks @gcanti! - Reject unsupported JSON Schema validation keywords and object or arrayconst/enumvalues during import instead of silently weakening validation. -
#7428
5c4b7a0Thanks @ebramanti! - Return workflow execution IDs from generated RPC and HTTP discard endpoints.
4.0.0-rc.111
Patch Changes
-
#7311
0ce3b00Thanks @fubhy! - Reject graph shortest-path calculations that overflow or underflow the finite number range. -
#7352
d846331Thanks @nikhilsnayak! - Preserve theContext.mapUnsafeaccessor when code is compiled with loose object spread transforms. -
#7300
f93616fThanks @fubhy! - Fix graph index exhaustion, A* path consistency, snapshot validation, Mermaid line endings, and topological initials. -
#7336
16bf1efThanks @gcanti! - Compact JSON Schema check constraints when they can be safely merged without keyword collisions. -
#7360
d568968Thanks @gcanti! - Add configurable schema representation reference policies and propagate them through JSON Schema and OpenAPI generation. By default, only schemas with resolved identifiers become references. Closes #7357. -
#7304
bc06292Thanks @fubhy! - Add graph snapshots, low-link connectivity analysis, bipartite matching, maximum flow, and minimum cut APIs. -
#7364
e03ea90Thanks @kitlangton! - FixDeferredcompletion skipping waiters when an earlier waiter dies during resume. Completing aDeferredwith an interrupt cause kills a suspended waiter synchronously inside its resume; the dying waiter’sawaitcleanup spliced the sharedresumesarray mid-iteration, so the next waiter was never resumed and hung forever. Completion now clearsresumesbefore resuming waiters. -
#7347
9b10fc8Thanks @tim-smart! - Shut down the internal effects queue when ordered concurrent channel mapping closes. -
#7335
770c6d0Thanks @tim-smart! - FixEffect.fnbinding the final transform as the generator body when using the{ self }overload. -
#7344
7425bcbThanks @tim-smart! - Ensure fiber observer cancellation during exit does not skip remaining observers. -
#7301
563815aThanks @fubhy! - Preserve depth-first traversal order with finite radii and validate A* heuristics for trivial paths. -
#7350
1e83ca1Thanks @tim-smart! - Align in-memory workflow interrupt finalization with the cluster workflow engine. -
#7316
550a41aThanks @tim-smart! - Update dependencies across the Effect workspace. -
#7306
45d79c7Thanks @fubhy! - Add bulk node and edge removal operations, and disallow graph mutations from callbacks that traverse or transform the same graph. -
#7317
aac8584Thanks @tim-smart! - FixMatch.valueterminal combinators failing to typecheck when the input contains a generic type parameter.The fifth type argument of
Matcherfor value matchers is nowValueFlavor, andValueMatcherhas a seventh flavor argument; update hand-written annotations accordingly. -
#7361
7f87022Thanks @tim-smart! - Merge effect and finalizer failures during cleanup, preserving other failures alongsideCause.Done. -
#7326
425457cThanks @tim-smart! - Emit mixed struct and record schema types as intersections, preventing optional properties in open OpenAPI objects from conflicting with their index signature. -
#7324
008c423Thanks @tim-smart! - Allow path-level common parameters in OpenAPI generator input types. -
#7359
4f6ae04Thanks @gcanti! - Add dual standalone functions for reading and updating values through optics, closes #7299. -
#7250
b6b63e1Thanks @xianjianlf2! - PreserveJSON.rawJSONvalues when cloning cached OpenAPI specs. -
#7351
92922eeThanks @tim-smart! - Preserve unsafe in-memory workflow interrupts across replay. -
#7328
859c02fThanks @fubhy! - Keep graph caches consistent during bulk removals and validate graph kinds at runtime. -
#7358
ffc8235Thanks @tim-smart! - Bound framed RPC server HTTP response streams to 16 items by default, with a configurable buffer size or an unbounded opt-out. -
#6324
a29eb70Thanks @tim-smart! - Add scoped Redis pub/sub subscriptions that expose received messages through an Effect queue. -
#7354
0be2303Thanks @tim-smart! - Add support for server-originated RPC requests and notifications. Buffered JSON-RPC HTTP drops notifications until streaming responses are available. -
#7349
b44636fThanks @gcanti! - When canonical JSON derivation adds a transformation for a schema without a direct JSON representation, keep source checks and annotations on the source side. This prevents duplicate check execution and ensures generated JSON Schema documents describe only the encoded target, closes #7192. -
#7337
b19ccc7Thanks @gcanti! - AddSchema.JsonObjectfor readonly string-keyed records containing JSON-compatible values. This provides a canonical, reusable schema instead of requiring callers to repeatedly composeSchema.Record(Schema.String, Schema.Json). -
#7330
ff98f0bThanks @gcanti! - Preserve JSON Schema object keyword scopes when importingallOfintersections, including closed empty objects and required-only keys. Emit intersecting index signatures without weakening their constraints, and reject object scope intersections that cannot be represented faithfully. -
#7363
a47cbf1Thanks @tim-smart! - AddMatch.fnfor reusable matchers that select a value from multiple arguments. -
#7362
39b55f8Thanks @tim-smart! - Preserve encoded AI tool call parameters when automatic tool call resolution is disabled, and updateToolkit.handleto accept the encoded parameter type it decodes at runtime. -
#7305
c6c49c9Thanks @fubhy! - Fix mutable graph cache consistency and guard weighted pathfinding against inconsistent snapshots and numeric overflow. -
#7342
bf23ba7Thanks @misterclayt0n! - Forward every worker-runner client disconnect to the RPC server, not just the first one.
4.0.0-rc.110
Patch Changes
-
#7234
6eebd0aThanks @lloydrichards! - MCP servers can now use the 2025-11-25 protocol, including sampling with tools and both form- and URL-based elicitation.Enable it by adding
McpProtocol.v2025_11_25to the server’sprotocolsoption. -
#7234
6eebd0aThanks @lloydrichards! - MCP servers can now provide icons for server information, resources, resource templates, prompts, and tools usingMcpSchema.Icon.Each icon can specify its source URI, MIME type, supported sizes, and light or dark theme.
-
#7291
d10ceb0Thanks @fubhy! - Include traversed edge indexes in graph shortest-path results. -
#7291
d10ceb0Thanks @fubhy! - Add deterministic, index-preservingGraph.minimumSpanningForest. -
#7291
d10ceb0Thanks @fubhy! - Add index-preserving transitive reduction for directed acyclic graphs. -
#7261
189b003Thanks @fubhy! - AddGraph.SnapshotandGraph.fromSnapshotfor constructing immutable graphs with explicit node and edge indexes, and simplifyGraph.Edgeto a type-only structural interface. -
#7261
189b003Thanks @fubhy! - AddSchema.Graphfor schema-based encoding and decoding of immutable directed and undirected graphs. -
#7267
0a127b8Thanks @tim-smart! - Allow customizing the prefix displayed by CLI prompts. -
#7272
e491debThanks @fubhy! - Preserve scoped Graph mutation callback errors when the callback manually finalizes its mutable handle. -
#7266
f99c508Thanks @tim-smart! - Fix SQL persisted queue delivery on SQLite builds withoutSQLITE_ENABLE_UPDATE_DELETE_LIMIT. -
#7199
7e3f07cThanks @rekram1-node! - Fix Zsh completions for CLI commands with both positional arguments and subcommands. -
#7274
a894fe1Thanks @fubhy! - Ignore removed allocator history when comparing and hashing immutable Graph values with the same active indexed structure. -
#7291
d10ceb0Thanks @fubhy! - AddGraph.findCyclewith exact node and edge witnesses. -
#7294
7e9923bThanks @tim-smart! - Add custom reviver support to HTTP JSON parsing APIs. -
#7200
f064121Thanks @mikearnaldi! - Support narrowing schedule input and output types with type guard predicates passed toSchedule.while. -
#7291
d10ceb0Thanks @fubhy! - Add index-preservingGraph.inducedSubgraph. -
#7244
b660bf0Thanks @AnnaSuSu! - Normalize unbounded PubSub replay capacities to positive integers. -
#7293
f4fbe9cThanks @tim-smart! - Support standalone Effect.forEach data-last usage -
#7291
d10ceb0Thanks @fubhy! - Add bounded lazy enumeration of simple paths and all tied shortest paths. -
#7259
e811353Thanks @fubhy! - Prevent graph edge reads from exposing internal edge records and reject non-finite A* heuristic values. -
#7251
9761c3cThanks @tim-smart! - AddEncoding.randomHex, a lightweight non-cryptographic generator that coerces lengths to unsigned 32-bit multiples of 8. -
#7296
baa99fcThanks @tim-smart! - Make unstable CLI boolean flags required when omitted, allowing optional, default, config, and prompt fallbacks to handle absence consistently. -
#7246
7fd79b2Thanks @tim-smart! - AddEffect.headfor retrieving the first element of an iterable produced by an effect. -
#7273
a82ffc0Thanks @fubhy! - Validate Graph traversal radii, isolate traversal start configuration, and prioritize the first supplied DFS root. -
#7291
d10ceb0Thanks @fubhy! - ThrowGraphErrorwhen a negative cycle affects a Bellman-Ford target, reservingOption.none()for unreachable paths. -
#7248
4026e2dThanks @tim-smart! - Improve tracing performance in span creation and HTTP middleware. -
#7276
397bf1eThanks @fubhy! - Deduplicate directed neighbor-node queries while preserving first edge occurrence order. -
#7291
d10ceb0Thanks @fubhy! - Add incident-edge, edges-between, and directed and undirected degree queries toGraph. -
#7291
d10ceb0Thanks @fubhy! - Add unweighted reachability, explicit weak and strong connectivity predicates, weak components, and tree detection toGraph.
4.0.0-rc.109
Patch Changes
-
#7219
a0743f2Thanks @tim-smart! - Add SQL, HttpApi testing, and CLI schema examples to the published AI documentation. -
#7241
17892e7Thanks @tim-smart! - Use Context mapUnsafe in less call sites -
#7240
4d8a230Thanks @tim-smart! - FixEffect.fromOptiondata-first inference for inlineOptionexpressions. -
#7216
f21f9c9Thanks @tim-smart! - Add aHttpStatusmodule toeffect/unstable/httpthat centralizes the mapping from HTTP status literal names to numeric codes and exportsHttpStatus.fromLiteral.HttpApiSchema.statusnow consumes the new module. -
#6829
18270ddThanks @lloydrichards! - MCP servers now support the 2024-11-05 and 2025-03-26 RPC revisions through version-specific protocol adapters. -
#7218
26db404Thanks @tim-smart! - Run SQLPersistedQueuetable creation through versioned migrations so future schema changes can be applied safely. -
#7210
2670398Thanks @tim-smart! - Preserve nanosecond precision when adjustingTestClockwith large durations. -
#7205
3702bedThanks @tim-smart! - Remove thekubernetes-typesdependency by vendoring the Kubernetes Pod declarations used by the cluster helpers and exporting them fromeffect/unstable/cluster/K8sTypes. -
#7236
ccae60eThanks @roninjin10! - Propagate a failedBEGINorSAVEPOINTfromSqlClient.withTransactionas a typedSqlError.makeWithTransactionwrapped thebeginstep together with the transaction body, so a failedBEGINtook the rollback branch. No transaction was active at that point, theROLLBACKfailed, and itsEffect.orDiewrapper replaced the original typed error with a defect (cannot rollback - no transaction is active). Callers could no longer classify the failure as retryable. The path became reachable when the sqlite client started usingBEGIN IMMEDIATE, which acquires a write lock and can fail withSQLITE_BUSY.Commit and rollback now run only after
beginorsavepointsucceeds. A failedbeginorsavepointfails with its originalSqlError, leaves the wrapped effect unexecuted, and still closes the acquired connection scope. -
#7206
6ff5396Thanks @tim-smart! - Bound cluster runner entity residency and storage reads.ShardingConfiggains two knobs:maxResidentEntities(default10_000): the maximum number of entities that can be resident on a runner at the same time. At the cap, the storage read loop stops admitting messages for new entity addresses (they stay in storage until a slot frees up) and volatile sends to new addresses fail withMailboxFull. Persisted sends still succeed."unbounded"restores the previous behaviour and can only be set programmatically.unprocessedMessageBatchSize(default1024): the maximum number of unprocessed messages read from storage in a single poll.
MessageStorage.unprocessedMessagesaccepts an optional{ limit, addresses }argument, and only claims the messages it actually returns. The memory implementation now applies the same ten-minute claim window as SQL, so bounded reads advance past in-flight requests; resetting an address or shard makes its claimed messages immediately eligible again.The encoded driver contract replaces
Encoded.resetAddresswith the batchedEncoded.resetAddressesoperation.SqlMessageStorage.makeEncodedconstructs the SQL encoded driver directly for custom storage composition.ClusterWorkflowEngineentities (workflows and the durable clock) now use a fixed ten-second idle time, so completed and suspended executions release their entity slots quickly. Their state is durable, so an evicted execution is rebuilt from storage when its next message arrives.
4.0.0-rc.108
Patch Changes
-
#6546
dfb173eThanks @xianjianlf2! - Handle BigInt values safely and consistently across JSON diagnostics and logger formats. -
#7174
005e090Thanks @tim-smart! - FixQueue.awaitfailing withCause.Donewhen registered before the queue ends. -
#7180
c82c532Thanks @gcanti! - Prioritize redacted representations in formatters and normalize text logger levels to uppercase. -
#7193
22b579fThanks @kitlangton! - FixDeferred.awaitdying with aTypeErrorwhen a waiter is interrupted after theDeferredhas been completed. -
#7179
3e19539Thanks @tim-smart! - FixDurableDeferred.raceAllso a completed deferred can wake an active workflow without changing success-biased race semantics -
#7189
08a3c74Thanks @gcanti! - FixHttpApiquery decoding for array parameters with a single value. -
#6550
eb0bae0Thanks @xianjianlf2! - Return fresh OpenAPI specs from cachedOpenApi.fromApicalls. -
#7188
97b544dThanks @gcanti! - Mark the internal~sentinelsSchema annotation as@internalso release declaration stripping removes it together withSchemaAST.Sentinel. This keeps the published declarations self-consistent for consumers that type-check dependencies withskipLibCheck: false. -
#7158
4f6d131Thanks @k3dom! - Improve Union candidate selection: a nested union member is dispatched by the sentinels common to all its members, and candidates whose sentinel the input contradicts are excluded. -
#7178
fad4b7cThanks @tim-smart! - Use Promise microtasks for synchronous Scheduler dispatch. -
#7181
accf447Thanks @gcanti! - MoveSchemaErrorinto theSchemamodule and remove the standaloneSchemaErrormodule. -
#7195
31b27e4Thanks @tim-smart! - Ensure discarded non-persisted cluster messages complete without waiting for the entity reply. -
#7191
8458951Thanks @Digifox03! - FixHttpRouter.Middleware.layerto provide request error services for errors declared inhandles, and expose global middleware errors fromHttpRouter.toHttpEffect.
4.0.0-beta.107
Patch Changes
-
#7156
596f3f9Thanks @tim-smart! - Terminate active multipart file streams when a parser limit is exceeded or the body ends unexpectedly, so file parts fail instead of hanging. -
#7153
9611ed4Thanks @rajanpanth! - FixDuration’sHash.symbolimplementation to hash a canonical nanoseconds form instead of the raw internalMillis/Nanosrepresentation. Two durations thatDuration.equals/Equal.equalsconsider equal (e.g.Duration.seconds(5)andDuration.nanos(5_000_000_000n)) previously hashed differently, violating the Hash/Equal contract and silently breakingHashSet/HashMaplookups keyed byDuration. -
#7166
8b91605Thanks @CDVolvik! - Import migrations through a file URL inMigrator.fromFileSystem, so absolute Windows paths are accepted by the ESM loader.Previously the directory and file name were passed to
importas a plain path. On Windows that produced a specifier such asD:\migrations\1_init.ts, which the ESM loader rejects withOnly URLs with a scheme in: file, data, and node are supported.fromFileSystemnow resolves the specifier through thePathservice, so its type widens fromLoader<FileSystem>toLoader<FileSystem | Path>. Callers that already provide an aggregate platform layer such asNodeServices.layerare unaffected; callers that provideFileSystemon its own now also need aPathlayer, and on Windows it must be a platform-aware one rather than the POSIXPath.layer. -
#7157
d901928Thanks @tim-smart! - AddChannel.mkUint8Arrayand reuse it fromStreamand multipart file collection. This also fixes quadratic buffering inFile.contentEffect, improving collection of a 16 MiB chunked upload by approximately 90x. -
#7149
b32bdefThanks @gcanti! - Require explicit handling for regular expression pattern constraints translated from JSON Schema documents, with modes to apply trusted patterns or ignore their constraints.
4.0.0-beta.106
Patch Changes
-
#7110
2695168Thanks @fubhy! - Ensure concurrent firstRcRefborrowers share the same resource generation. -
#7114
6310a8cThanks @fubhy! - Report buffered worker send failures asWorkerErrorvalues. -
#7117
c2071b1Thanks @fubhy! - MakeTxQueue.shutdownsafe to call after a queue has already been interrupted. -
#7119
7aff81aThanks @fubhy! - Prevent SQL resolvers from invoking non-empty batch callbacks when every request fails encoding. -
#7105
a1d4057Thanks @tim-smart! - AddConfigProvider.fromEnvRecordfor building a provider from an explicit environment record. -
#7111
abf77b0Thanks @fubhy! - Preserve input fiber error types inFiber.joinAll. -
#7134
6c60375Thanks @marbemac! - Fix cluster shutdown hangs by failing abandoned non-discard requests and stream chunk acknowledgements withEntityNotAssignedToRunner, including persisted requests sent after runner unregistration. This addsEntityNotAssignedToRunnerto the typed error channel of entity clients and request-onlyEntityProxyRPC/HTTP endpoints; discard endpoints remain unchanged. -
#7107
22f4897Thanks @fubhy! - Preserve FormData bodies when converting client requests through HttpServerRequest. -
#7120
615d1d5Thanks @fubhy! - FixSqlResolver.findByIdfailing to complete duplicate requests when id encoding fails, which surfaced as aRequestResolver did not complete requestdefect instead of the underlyingSchemaError. -
#7131
3a86757Thanks @fubhy! - Ignore MCP cancellation notifications for unknown request identifiers. -
#7104
f4a9762Thanks @gcanti! - AddFunction.memoizeIdempotentand use it to avoid reprocessing canonical Schema ASTs, including optional and mutable property modifiers. Cache Config schema cursor AST compilation. -
#7144
0bcf6edThanks @fubhy! - Stop multipart parsing after part count, part size, or field size limits are exceeded. -
#7121
ba9cb63Thanks @fubhy! - Prevent execution-plan event observer defects from changing attempt outcomes or leaving attempt events unpaired. -
#7147
42c810dThanks @tim-smart! - Release worker pool entries when an RPC worker’s receive loop fails. -
#7148
1416ccdThanks @gcanti! - Consolidate schema arbitrary derivation intoSchema.toArbitrary, which now returns aSchema.Arbitraryfactory that accepts the fast-check module. RemoveSchema.toArbitraryLazyand arbitrary derivation reports. -
#7109
08d0d39Thanks @fubhy! - FixRcRefleaking resources acquired before a failed acquisition. -
#7146
548908aThanks @gcanti! - Improve Schema representation identity, anonymous-reference eligibility, and JSON Schema alias finalization. -
#6862
4b3460dThanks @fubhy! - EnsureScopedRef.setreleases a replacement when the previous value’s finalizer defects. -
#7060
d170596Thanks @fubhy! - PreservemaxItemssemantics when importing JSON SchemaprefixItems. -
#7116
aea89d0Thanks @fubhy! - Keep span end times at zero when tracer timing is disabled. -
#7124
deed5fbThanks @fubhy! - Use a distinct AES-GCM initialization vector for each encrypted event log entry.EventLogEncryption.encryptnow returns each IV with its ciphertext, and encrypted event log clients and servers must be upgraded together because theWriteEntrieswire shape changed.
4.0.0-beta.105
Patch Changes
-
#7087
0418564Thanks @tim-smart! - Recognize tagged Config and RPC errors across duplicatedeffectpackage copies. -
#6827
d334a85Thanks @jaipaljadeja! - Add bounded 429 retries and custom response header names toHttpClient.withRateLimiter. -
#7084
f0be855Thanks @tim-smart! - Stop capturing definition-location stack frames inContext.Service. -
#7090
b206fa5Thanks @tim-smart! - ExposestdinIsTerminalandstdoutIsTerminaleffects through theStdioservice. -
#7093
b938c8aThanks @gcanti! - Add the opt-inreportInputparse option for retaining rejected inputs in enumerable fields on value-bearing schema issues and including them in default formatted messages. Value-bearing issue constructors accept the rejected input and parse options directly, andSchema.Annotations.Issuenow supportsexpectedfor default messages.Schema issues no longer format implicitly through
Issue#toString. UseSchemaIssue.makeFormatterDefault()when a human-readable message is needed. The throwing and Promise-based adapters inSchemaParsernow use the generic message"Schema validation failed"and expose the structuredSchemaIssue.Issueas the errorcause; consumers that previously read the formatted error message should inspect and explicitly format that cause instead.Schema.makeEffectnow returnsSchemaIssue.Issuefailures instead of wrapping them inSchemaError, andSchema.withConstructorDefaultaccepts anEffectthat fails withSchemaIssue.Issue. FallibleOpticoperations return structuredSchemaIssue.Issuefailures, while schema failures fromSchema.toIsoandSchema.toDifferJsonPatchuse the generic error message and preserve the issue incauseinstead of formatting it internally. -
#7097
8525f05Thanks @tim-smart! - AddCron.formatfor converting aCroninstance to a cron expression, with an option to include the seconds field.
4.0.0-beta.104
Minor Changes
Patch Changes
-
#6934
1001bccThanks @tim-smart! - httpapi: add typed response headers across handlers, generated clients (includingHttpApiTest), streaming responses, and OpenAPI withHttpApiSchema.WithHeaders. AddHttpApiSchema.encodeToWithHeadersfor folding response headers into domain types such as error classes. Explicitcontent-typeandcontent-lengthvalues applied withHttpServerResponse.setHeaderorsetHeadersnow override body-derived values. -
#7044
993ba60Thanks @fubhy! - Commit SQL event journal entries only after their write callback succeeds. -
#6957
67faacdThanks @fubhy! - Select Bash completions for the active positional argument. -
#6941
b78acdfThanks @fubhy! - Generate even and odd safe integers in Crypto random APIs. -
#6965
fbb9ce5Thanks @fubhy! - Correct the runtime tag spelling forCliError.UnknownSubcommand. -
#6963
722ea48Thanks @fubhy! - Exclude disabled choices from multi-select prompt selection and submission. -
#7001
3058fd5Thanks @fubhy! - Keep ordered SQL resolver results aligned when batched request encoding fails. -
#6937
62d0575Thanks @fubhy! - Fix the encoded output type ofTestSchema.Encoding.encodeUnknownEffect. -
#7014
99dd6b5Thanks @tim-smart! - Add lightweight INI, YAML, and TOML parsers undereffect/unstable/encodingand remove their runtime dependencies. -
#7053
7963ce1Thanks @fubhy! - Fix arbitrary generation for tuples with multiple optional elements. -
#7047
af14e75Thanks @fubhy! - FixTuple.pickreturn types to preserve the requested index order and duplicate indices. -
#7066
24e22d2Thanks @fubhy! - CloseResourceMapacquisition scopes when a lookup fails. -
#7036
647d14eThanks @fubhy! - Fix scoped reentrant lock finalizers releasing under the wrong fiber owner. -
#6983
1434eecThanks @fubhy! - Apply byte range and chunk size options to default Web file responses. -
#7071
a5278b1Thanks @fubhy! - Fix MCP sampling metadata optionality and validate it as an object. -
#6946
6af04a5Thanks @fubhy! - Defer memoized Layer state installation until Effect execution. -
#6943
cb6c837Thanks @fubhy! - Reject zero execution attempts inExecutionPlansteps. -
#7026
d44ceadThanks @tim-smart! - Add execution-plan lifecycle events via an optionalonEventhandler onEffect.withExecutionPlanandStream.withExecutionPlan.The handler receives an
ExecutionPlan.Event, a tagged union ofAttemptStart,AttemptSuccess, andAttemptFailure, allowing attempt outcomes to be observed from outside the effect for logging and metrics:import { Effect } from "effect"Effect.withExecutionPlan(program, plan, {onEvent: (event) => Effect.log("execution plan event", event)})Every
AttemptStartis followed by exactly one terminal event.AttemptFailurecarries the full failureCause, so defects and interruption are reported as well as expected errors, and terminal events run like finalizers so they are emitted even when the attempt is interrupted. Event numbering matchesExecutionPlan.CurrentMetadata:attemptis cumulative across steps, whilestepAttemptis 1-based within the current step. -
#7077
88c7632Thanks @tim-smart! - RenameSchedule.andThenandSchedule.andThenResulttoSchedule.concatandSchedule.concatResult. -
#6975
abcbb2aThanks @fubhy! - Encode SSE events with empty data as dispatchable events. -
#7037
8f63cceThanks @fubhy! - Preserve OTLP metric delta checkpoints when an export fails. -
#7057
d56dfcfThanks @fubhy! - Fix the error type exposed by the curriedSink.catchoverload. -
#6947
a98cda9Thanks @fubhy! - Check symbol-keyed properties in Match object patterns. -
#6956
6704bb8Thanks @fubhy! - Emit valid CSI sequences from the unstable CLIcursorTohelper. -
#7008
6143de2Thanks @tim-smart! - Prevent Bash completions from treating flag values as subcommands. -
#7032
936b135Thanks @marbemac! - Fix a@effect/clustershutdown deadlock on single-runner topologies (e.g. single-node deployments andTestRunner), whereSharding.sendOutgoingretriedEntityNotAssignedToRunnerforever during teardown. -
#6940
1bbae84Thanks @fubhy! - Omit services removed byContext.addOrOmitfrom the returned context type. -
#7065
d795ee7Thanks @tim-smart! - Fix DevTools span requests to preserve their state when queued for sending. -
#7016
0a82d88Thanks @brandon-julio-t! - Normalize cluster durable clock wake-up timestamps to whole milliseconds. -
#6945
9215bc5Thanks @fubhy! - Preserve integral precision when parsing decimal nano and micro duration inputs -
#7050
a1b5df2Thanks @fubhy! - Include schedule errors in the error channel ofEffect.scheduleandEffect.scheduleFrom. -
#7062
92a9ac5Thanks @fubhy! - Fix the inspectable JSON identity ofFiberSet. -
#6959
6bde7f2Thanks @fubhy! - Match Fish completions against the full nested command path. -
#6951
a712131Thanks @fubhy! - Use the supplied hash forHashMap.modifyHashinsertions, updates, and removals. -
#6989
2e6f760Thanks @fubhy! - Support standardBodyInitvalues when reading converted client request bodies throughHttpServerRequest. -
#6986
aa05804Thanks @fubhy! - Synchronize HTTP server response content headers when replacing the body. -
#6944
badd3bfThanks @fubhy! - MakeIterable.flattenstack safe across empty iterables. -
#6968
02b0265Thanks @fubhy! - Allow MCP tool calls to omit optional arguments. -
#7033
3437e21Thanks @fubhy! - Fix memory journal conflict detection skipping the first newer entry. -
#7034
41a550dThanks @fubhy! - Return the first unused remote sequence from the in-memory event journal. -
#7042
17b5d50Thanks @fubhy! - Relay entries imported into an in-memory event journal to other remotes. -
#7074
96e5e95Thanks @fubhy! - Preserve and update runner health in the in-memory cluster runner storage. -
#7038
e4d589eThanks @fubhy! - Clear in-memory message primary-key indexes when clearing an entity address. -
#7005
ae4cf7bThanks @fubhy! - Generate valid MSSQL upserts for multi-table persistence. -
#6998
6ef5f1aThanks @fubhy! - Decode split UTF-8 sequences correctly in NDJSON streams. -
#6972
2235a29Thanks @tim-smart! - Persist a serializable defect when a cluster reply cannot be encoded, preventing persisted entity callers from hanging. -
#6962
b32f4cbThanks @fubhy! - Support empty records and non-array iterables inPrompt.all. -
#7023
7f4c095Thanks @tim-smart! - RenameRateLimiter.makeSleeptoRateLimiter.sleepand support self-first partially applied and uncurried usage. -
#7041
5f3fb81Thanks @fubhy! - End runner streams after emitting their terminal replies. -
#7020
17f0b91Thanks @gcanti! - FixSchema.maketo preserve existing nestedSchema.Classinstances, including in array fields, while recursively constructing plain class inputs provided at runtime inside unions. Constructor defaults remain scoped to structural field and element occurrences, withSchemaAST.Context.constructorDefaultrepresenting the single default link for each occurrence.Optimize
Function.memoizeto use a singleWeakMaplookup for cached values. Its callback no longer acceptsundefinedas a return type becauseundefinedrepresents a cache miss.The performance of the two array paths can be reproduced by saving the following program as
scratchpad/schema-make-6890-benchmark.tsand runningnode scratchpad/schema-make-6890-benchmark.tsfrom the repository root:import { Schema } from "effect"import { performance } from "node:perf_hooks"class Row extends Schema.Class<Row>("Row")({ value: Schema.String }) {}class DirectTable extends Schema.Class<DirectTable>("DirectTable")({ rows: Schema.Array(Row) }) {}class UnionTable extends Schema.Class<UnionTable>("UnionTable")({ rows: Schema.Array(Schema.Union([Row])) }) {}const rows = Array.from({ length: 30_000 }, (_, value) => Row.make({ value: String(value) }))function benchmark(label: string, make: () => { readonly rows: ReadonlyArray<Row> }) {const samples: Array<number> = []for (let i = 0; i < 6; i++) {const start = performance.now()const result = make()samples.push(performance.now() - start)if (result.rows[0] !== rows[0] || result.rows.at(-1) !== rows.at(-1)) {throw new Error(`${label} did not preserve Row identity`)}}console.log(`${label}: ${samples.slice(1).map((n) => n.toFixed(3)).join(", ")} ms`)}benchmark("Array(Class)", () => DirectTable.make({ rows }))benchmark("Array(Union([Class]))", () => UnionTable.make({ rows }))Representative local results on Node 24.12.0 (six runs, with the first discarded):
Array(Class): 0.639, 0.498, 0.447, 0.448, 0.451 msArray(Union([Class])): 3.141, 2.195, 2.126, 2.108, 2.057 ms -
#7055
0cdadd7Thanks @fubhy! - FixStream.slidingSizeto produce the same windows regardless of upstream chunk boundaries. -
#6978
39b57d7Thanks @fubhy! - Retain the last SSE event ID across dispatched events. -
#6976
5a6a573Thanks @fubhy! - Recognize and ignore a leading UTF-8 byte order mark in server-sent event streams. -
#7048
59f5e99Thanks @fubhy! - Ignore malformed retry directives when parsing server-sent event streams. -
#7028
45379d6Thanks @fubhy! - FixTrie.insertto replace existing values without mutating the original trie or increasing its size. -
#6973
1949439Thanks @fubhy! - Separate the defaultVariantSchemacache from named variant entries. -
#7072
e443403Thanks @fubhy! - Keep MCP tool calls that return void successful. -
#7000
03af7e8Thanks @fubhy! - Close suspended workflow scopes after resumed completion. -
#7027
130b28dThanks @pawelblaszczyk5! - Prevent Effect.updateService and Effect.updateServiceScoped supertype widening -
#6948
c987a12Thanks @fubhy! - Honor numeric zero time-to-live values inCache.makeandScopedCache.make. -
#6974
4158562Thanks @fubhy! - Handle accepted undefined fields during variant extraction. -
#7013
306014aThanks @tim-smart! - Fix several edge cases in the vendored FindMyWay router. -
#6949
729a663Thanks @fubhy! - Keep TestClock nanosecond access total after infinite adjustments. -
#6997
caf84b6Thanks @fubhy! - Isolate compiled SQL fragment caches by compiler instance. -
#6960
ce067f7Thanks @fubhy! - Mark omittable CLI flags and arguments as optional in structured help. -
#7025
7a41f5aThanks @pawelblaszczyk5! - Prevent Effect.provideServiceEffect supertype widening -
#7056
781022aThanks @fubhy! - Fix Map and Set equality allowing a right-side entry to match multiple left-side entries. -
#7063
39f1297Thanks @fubhy! - Preserve literal element types inTuple.make. -
#6955
2db266bThanks @fubhy! - Include plain variant structs in the default variant union. -
#6954
2141e28Thanks @fubhy! - Preserve CRLF state across SSE input chunk boundaries. -
#6950
3c5e429Thanks @fubhy! - Preserve nanosecond precision for largeTestClockwall-clock timestamps. -
#6958
20ddc63Thanks @fubhy! - Preserve hidden command metadata when adding subcommands or shared flags. -
#6939
841b3eaThanks @fubhy! - Preserve sibling provider input evidence whenConfig.allevaluates a failing child. -
#6836
82a3fbfThanks @mkdynamic! - Route provider-executed tool results into the assistant message inPrompt.fromResponseParts -
#7003
eb9ee83Thanks @fubhy! - Persist permanent entries in KVSsetManyoperations. -
#7039
64dc7c7Thanks @fubhy! - Fix failedResourceRefrebuilds permanently blocking waiters. -
#6971
84dc8abThanks @tim-smart! - Serialize concurrent nested SQL transactions to prevent savepoint collisions. Cross-dependent sibling nested transactions now deadlock instead of interleaving and risking silent data corruption. -
#6952
b4463f4Thanks @fubhy! - Register alternate flags used byParam.orElseandParam.orElseResult. -
#6732
592dd36Thanks @tim-smart! - Rename the Schema error constructors to align with theirDatacounterparts.Schema.ErrorClassis nowSchema.Error.Schema.TaggedErrorClassis nowSchema.TaggedError.- The JavaScript
Errorinstance schema is nowSchema.ErrorInstance. Schema.ErrorReviveris nowSchema.ErrorInstanceReviver.
-
#7068
85d2b44Thanks @tim-smart! - Report retried RPC socket open failures through theonTransientErrorprotocol hook and fail in-flight requests when the retry policy is exhausted. -
#7006
32e4a69Thanks @fubhy! - Scope custom persisted queue ID deduplication to each named queue. -
#6938
13c5872Thanks @fubhy! - Honor populated variables before dotenv expansion defaults inConfigProvider. -
#7040
3454cdbThanks @fubhy! - FixSynchronizedRef.getAndUpdateSometo update its backing ref. -
#7018
e930804Thanks @tim-smart! - Hold persisted cluster messages while entity layers are still registering, while retaining a bounded failure when registration never begins. -
#6987
7f12d4bThanks @fubhy! - Map WebSocket send exceptions and transform stream write rejections to typedSocketErrorfailures. -
#6977
181c9efThanks @fubhy! - Default empty Server-Sent Event types tomessage. -
#7010
dd9f891Thanks @tim-smart! - RenameCommand.withHiddentoCommand.unlisted, along with thehiddencommand property which is nowunlisted. -
#7054
433fb81Thanks @fubhy! - Fix the return type ofChannel.runCountto expose its numeric result. -
#7012
8459cdbThanks @tim-smart! - Vendor the multipart parser aseffect/unstable/http/MultipartParser, add the Node.js adapter at@effect/platform-node/NodeMultipartParser, and remove the externalmultipastadependency. -
#6953
6124ab3Thanks @fubhy! - Reject truncated MessagePack frames at the end of a stream. -
#6961
01bd954Thanks @fubhy! - Preserve file and directory semantics in CLI completion descriptors. -
#6990
ba2c3aaThanks @fubhy! - Generate unique persisted paths for multipart files with duplicate filenames. -
#7019
0a45ef3Thanks @tim-smart! - Round Redis persistence TTLs up to whole milliseconds before passing them to integer-only expiration commands. -
#7012
8459cdbThanks @tim-smart! - Prevent malformed encoded multipart filenames from throwing during parsing. -
#7029
eaa7e71Thanks @fubhy! - Fix unencrypted event log conflict scanning to inspect the newer history suffix. -
#6988
db4c2ccThanks @fubhy! - Preserve lexical ordering in streaming template interpolation. -
#6964
22f150aThanks @fubhy! - Correct year, ordinal, and meridiem date-mask formatting. -
#6966
90ffb08Thanks @fubhy! - Preserve fractional leading zeros while editing float prompts. -
#6982
d517692Thanks @fubhy! - Reject NDJSON values without a JSON representation. -
#6942
01af079Thanks @fubhy! - Validate object-based DateTime instants before construction. -
#6985
32a59e8Thanks @fubhy! - Preserve original HTTP response bytes when reading response text first.
4.0.0-beta.103
Minor Changes
-
#6793
b2f95a9Thanks @tim-smart! - AddSemaphore.takeIfAvailablefor non-blocking manual permit acquisition. -
#6693
aeba0c8Thanks @lloydrichards! - Expose object-shaped Toolkit success schemas as MCP tool output schemas. -
#6807
d0f1a22Thanks @alecbuffi! - Separate wall-clock timestamps from monotonic elapsed time.Clock.Clocknow requiresmonotonicTimeNanosUnsafe()andmonotonicTimeNanosfor measuring elapsed time. CustomClockimplementations must provide both members. The live clock’scurrentTimeNanosnow re-anchors its high-resolution Unix wall-clock timestamp when it drifts fromDate.now(), whileEffect.timed, duration metric tracking, andSink.withDurationuse monotonic time so wall-clock corrections do not distort elapsed durations.
Patch Changes
-
#6697
e56cd8fThanks @schickling-assistant! - Add a configurable filter for HTTP client request and response header span attributes. -
#6883
f77c120Thanks @gcanti! - Add support for converting JSON Schema documents to Draft-04, preserve literal$refvalues,$refsibling constraints,not,readOnly, andwriteOnlyin Draft-07 conversions, correct the Draft-07 meta-schema URI, and prevent OpenAPI component-key collisions during conversion. -
#6564
04fd44aThanks @AVtheking! - Run shared-table SQL persistence expiration cleanup in indexed, bounded background batches. -
#6911
b74333dThanks @fubhy! - Update existingHashRingnodes when adding a value with the same primary key. -
#6909
1c40b28Thanks @AlfGoto! - AddDateTime.toEpochSecondsandDateTime.fromEpochSecondsfor converting date-time values to and from Unix epoch seconds. -
#6693
aeba0c8Thanks @lloydrichards! - MCP tool handler defects now return a stable internal error without exposing defect details. -
#6874
b3901d2Thanks @fubhy! - FixEqual.equalsandHash.hashto handle invalid dates andDataViewvalues without throwing. -
#6869
4a0984aThanks @fubhy! - Fix SQL-backed PersistencegetManyto preserve duplicate key positions. -
#6868
fffd88bThanks @fubhy! - Ensure clearing an empty Redis-backed persistence store succeeds. -
#6903
f3f6c1eThanks @fubhy! - Preserve equals signs in inline CLI option values after the first separator. -
#6876
ef07642Thanks @fubhy! - FixSink.reduceWhileArrayapplying its reducer more than once per input array. -
#6802
f1bc827Thanks @tim-smart! - Cap incomplete RPC frames buffered by the NDJSON and MessagePack streaming decoders, and close socket transports when the limit is exceeded. -
#6693
aeba0c8Thanks @lloydrichards! - RPC servers now suppress responses after a client cancels an in-flight request. -
#6723
081f4d8Thanks @tim-smart! - add platform literal to HttpPlatform -
#6788
5287b24Thanks @gcanti! - Refine theConfigProviderinterface so lookup absence usesundefinedand path transformation is provider behavior.ConfigProvider.loadand the lookup function accepted byConfigProvider.makenow returnNode | undefined. Useundefinedwhen a path does not exist and return theNodedirectly when it does.ConfigProvidernow exposesmapInputas a capability. The exportedConfigProvider.mapInputcombinator delegates to it, preserving transformation order and composition throughorElsewithout requiring provider representation state. -
#6863
13d31cfThanks @fubhy! - Decode percent-encoded OTLP environment header values. -
#6781
acee269Thanks @gcanti! - Deduplicate equivalent fallback definitions when compiling JSON Schema, and reconstruct only definitions reachable from multi-document roots.Remove
SchemaMultiDocumentandfromSchemaMultiDocument; multi-document import and revival now return the ordered root schemas directly.Stop the OpenAPI generator from emitting component schemas that are not reachable from a generated root.
-
#6717
31170c1Thanks @IMax153! - Document thatCommandOptions.extendEnvdefaults tofalseand that providingenvwithout enabling it replaces the inherited child environment. -
#6657
205ebc7Thanks @tim-smart! - Use cancellable microtasks when dispatching yielded work from synchronous Effect runs. -
#6661
ed0ebf8Thanks @tim-smart! - Fix hydrated atoms withAtom.withReactivityto refresh after reactive mutations. -
#6665
a3fd084Thanks @tim-smart! - FixHttpRouter.toWebHandlercontext inference for services provided by the application layer. -
#6681
ee29ddfThanks @tim-smart! - Add Web Stream interoperability forChannelandSink, plus byte limiting andArrayBuffercollection forStream. -
#6730
6086309Thanks @tim-smart! - Support replaying initial WebSocket messages and normalizeArrayBufferframes toUint8Array. -
#6763
4a57af2Thanks @tim-smart! - Validate cookie names, domains, and paths before constructing or serializing cookies. -
#6771
660875bThanks @tim-smart! - Strip credential headers on cross-origin HTTP redirects and align redirected request methods with fetch. -
#6777
8e7c706Thanks @tim-smart! - Bound pending SSE decoder state with a configurable maximum event size. -
#6772
5f63adbThanks @tim-smart! - Reject empty,.and..keys in file-backed key-value stores. -
#6773
053bc42Thanks @tim-smart! - Escape terminal control characters in unstable CLI error output. -
#6898
c0a1534Thanks @tim-smart! - Add HTTP response compression support. Node.js, Bun, and Deno use asynchronousnode:zlibone-shot compression for byte-array bodies, preserving an exactContent-Length; stream and raw bodies remain streaming transforms. -
#6859
f1e3a37Thanks @fubhy! - FixString.snakeToCamelandString.snakeToPascalto return an empty string for empty input. -
#6746
cedb01aThanks @fubhy! - Prefer explicit OTLP resource configuration over environment configuration. -
#6677
1747440Thanks @tim-smart! - Expose runtime schemas for AI prompt parts and message-specific part unions. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now advertise logging and honor each client’s selected log level when sending log notifications. -
#6693
aeba0c8Thanks @lloydrichards! - Preserve MCP sampling request preferences and response content. -
#6878
b4f1ee2Thanks @fubhy! - Fix Array index operations handlingNaNand fractional indexes. -
#6751
a4757f1Thanks @tim-smart! - Fix Atom dependency tracking and re-entrant invalidation during batch rebuilds. -
#6870
cd122b9Thanks @fubhy! - EnsureBigInt.gcdandBigInt.lcmreturn non-negative values and handle zero operands inBigInt.lcm. -
#6844
5de588bThanks @fubhy! - Prevent an interrupted cache lookup from removing a newer value written withCache.set. -
#6879
3895b9cThanks @fubhy! - Preserve failure annotations when mapping errors withCause.map. -
#6820
89ce5f3Thanks @fubhy! - FixChannelSchema.decodeUnknownto accept unknown input chunks while keepingChannelSchema.decodetyped to the schema’s encoded input. -
#6899
985de09Thanks @fubhy! - EnsureChunk.takeandChunk.dropproduce valid chunks for fractional counts. -
#6579
9800e3aThanks @marbemac! - Scope cluster reply serialization failures and peer-delivered defects to their own request instead of the whole runner connection -
#6800
4dc35f6Thanks @tim-smart! - Fix persisted cluster stream recovery when SQL drivers return a null reply kind. -
#6814
e8eb62bThanks @gcanti! - Preserve provider input evidence whenConfig.orElserecovers a configuration failure. -
#6873
ecd9993Thanks @fubhy! - Propagate theFiberSet.runtimeinterruption option when registering managed fibers. -
#6872
5ab9c08Thanks @fubhy! - FixFormatter.formathandling of shared references and ensureFormatter.formatJsonalways returns valid JSON. -
#6867
f5cf965Thanks @fubhy! - Remove stalecontent-lengthheaders when replacing an HTTP client request body with one of unknown length. -
#6924
a94cbedThanks @fubhy! - IgnoreuniqueItemswhen set tofalsewhile importing JSON Schema documents. -
#6871
9160ad7Thanks @fubhy! - FixLayerMappreload options so configured entries are acquired during construction. -
#6693
aeba0c8Thanks @lloydrichards! - MCP completion handlers now receive resolved argument context, and completion responses are limited to one hundred values. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now return protocol errors for invalid tool, prompt, completion, resource, and logging requests. -
#6901
52494beThanks @fubhy! - Prevent distinct metric attribute sets from sharing registry state. -
#6822
5441c8eThanks @fubhy! - FixMetric.isMetricto recognize metrics using their current runtime brand. -
#6821
c9b56abThanks @fubhy! - FixMetric.linearBoundariesto space boundaries by the configured width. -
#6847
8ef7257Thanks @fubhy! - FixMutableList.prependon empty lists and handle non-positivetoArrayNbounds. -
#6865
1519406Thanks @fubhy! - FixOtlpResourceto decode percent-encoded environment attributes and preserve bigint precision. -
#6805
9716990Thanks @tim-smart! - Prevent replay-enabled PubSubs from retaining values beyond each subscription’s replay window. -
#6711
733f75bThanks @andrskr! - Preserve serialization and retention metadata on reactiveAtomRpcandAtomHttpApiqueries. -
#6855
48155c8Thanks @fubhy! - FixSchedule.duringto recur until the configured duration has elapsed. -
#6712
951d06bThanks @gcanti! - MakeSchema.isPatterndeterministic for regular expressions with global or sticky flags. -
#6782
d767b65Thanks @gcanti! - SchemaRepresentation: generate references from encoded AST identity, suffix colliding identifiers instead of throwing, and preserve sharing across property-key context. This avoids false-positive duplicate identifier errors while keeping referentially distinct schemas addressable; generated fallback definitions now use the clearerEncodedsuffix. -
#6704
5d52d9dThanks @gcanti! - Fix Union candidate selection for recovering middleware and suspended members. -
#6848
f4151e1Thanks @fubhy! - Keep the currentScopedRefresource alive when acquiring its replacement fails. -
#6910
e02fbb6Thanks @z4p5a9! - FixSemaphore.withPermitsleaking permits when interrupted between acquiring them and installing their release. -
#6877
724ce09Thanks @tim-smart! - FixStream.aggregateWithinandStream.groupedWithinretaining fiber continuations on every schedule tick while upstream is idle. -
#6889
dbe91f6Thanks @tim-smart! - FixStream.withExecutionPlanretry limits resetting after partial stream emissions. -
#6823
4c008d2Thanks @fubhy! - Fix data-first dispatch forStream.mapAccumArrayEffect. -
#6900
b650832Thanks @fubhy! - EnsureStream.rangeemits the full range when the chunk size is zero. -
#6849
b46c92fThanks @fubhy! - FixSubscriptionRef.getAndUpdateSometo return the current value when no update is selected. -
#6808
5335797Thanks @fubhy! - FixSubscriptionRef.getAndUpdateEffectto execute the effectful update. -
#6862
4b3460dThanks @fubhy! - FixTrie.longestPrefixOfreturning a valued sibling that does not match the input key. -
#6856
6301fd7Thanks @fubhy! - FixTrieto preserve entries whose value isundefined. -
#6850
aebc5c6Thanks @fubhy! - FixTxPubSub.publishAlldropping values from one-shot iterables when a transaction retries. -
#6851
52b2d7bThanks @fubhy! - EnsureTxQueue.pollandTxQueue.clearcomplete a closing queue after draining its buffered items. -
#6853
eec5744Thanks @fubhy! - FixTxQueue.offerAllto preserve one-shot iterables across transaction retries and repeated runs. -
#6783
24e0e93Thanks @tim-smart! - Propagate trace context through persisted cluster workflow requests. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now return standard JSON-RPC errors for malformed requests, unknown methods, and invalid parameters. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now enforce revision-specific JSON-RPC batch and protocol-version header requirements. -
#6707
1a7ce81Thanks @gcanti! - MarkSchema.UnknownFromJsonStringas internal and remove its type-level interface. UseSchema.fromJsonString(Schema.Unknown)instead. Addreviver, callback or arrayreplacer, andspaceoptions toSchema.fromJsonString, and makeSchemaTransformation.fromJsonStringa configurable factory. -
#6828
48f22a7Thanks @tim-smart! - Use layered storage for Context, makingContext.addO(1) and eliminating per-request service map clones in the HTTP servers. Docgen now omits@internaloption properties from generated signatures. -
#6780
c96b7f6Thanks @tim-smart! - Include typed tool output schemas in MCPtools/listresponses. -
#6733
6d2a942Thanks @gcanti! - Avoid validatingSchema.Classfields twice when decoding. -
#6659
cc27b19Thanks @tim-smart! - Preserve prototype accessors when code is compiled with loose object spread transforms. -
#6912
8f9499fThanks @gcanti! - Removeactualfields from everySchemaIssuevariant, together withSchemaIssue.getActual,SchemaIssue.redact, andSchema.redact. Built-in formatters now use static messages that do not interpolate rejected input, while paths, AST metadata, union successes, and user-provided messages and annotations are preserved unchanged.Runtime performance was measured across the 16 Effect fixtures in the
schema-benchmarkssuite. These are the scenarios used for the cross-library comparison with Valibot and Zod. The paired HEAD-versus-mainrun classified 3 fixtures as improvements, 0 as regressions, and 13 as inconclusive. Negative changes are faster. Absolute library values are medians from the same cross-library run;—means that the corresponding adapter does not expose that scenario.Scenario Effect (ns/op) Valibot (ns/op) Zod (ns/op) HEAD vs main Classification initialization-schema108191.30 30549.81 212715.66 -0.92% inconclusive initialization-decoder109796.34 — — +1.98% inconclusive validation-valid5221.80 5070.81 — +2.06% inconclusive validation-invalid1279.77 234.92 — +0.59% inconclusive parsing-all-valid5144.58 5192.19 7176.19 -3.79% inconclusive parsing-all-invalid7594.49 15236.82 37780.35 -5.94% improvement parsing-first-valid5188.33 5135.75 — -1.49% inconclusive parsing-first-invalid1330.82 243.64 — +1.01% inconclusive standard-all-valid5722.01 5200.05 3801.26 -1.78% inconclusive standard-all-invalid12024.65 15528.50 30982.17 -7.78% improvement standard-first-valid5655.33 — — +3.84% inconclusive standard-first-invalid2001.69 — — -4.56% inconclusive codec-typed-encode342.59 — 39.29 -7.62% inconclusive codec-typed-decode418.78 — 50.14 -10.89% improvement codec-unknown-encode328.38 — — -5.55% inconclusive codec-unknown-decode347.35 — — -5.25% inconclusive -
#6692
3eeea73Thanks @schickling-assistant! - Fix unstable CLI subcommands dropping operands after the--end-of-options terminator. -
#6625
0a532e5Thanks @lloydrichards! - Add adapter-valued MCP server protocol declarations, route requests through the selected protocol before schema decoding, and add built-in support for MCP2025-06-18. -
#6864
f398149Thanks @fubhy! - Honor HTTP-dateRetry-Aftervalues when retrying OTLP exports. -
#6693
aeba0c8Thanks @lloydrichards! - MCP Streamable HTTP servers now validate content negotiation, session lifecycle, negotiated protocol versions, and browser Origins before dispatching requests. -
#6824
ace903eThanks @tim-smart! - Skip HTTP server span attribute collection when the span is not sampled. -
#6814
e8eb62bThanks @gcanti! - RefineConfigloading and absence semantics.Config.schemanow derives a provider loading policy from the encodedStringTreeschema, materializes mixed-shape union members independently, and leaves separated scalar parsing toConfig.ArrayandConfig.Record. Schemas whose canonicalStringTreeencoding remains opaque, such asSchema.Any,Schema.Unknown, orSchema.Json, are rejected when the config is constructed; use a concrete shape orSchema.fromJsonString(Schema.Json)for scalar JSON. Missing or unavailable representations are decoded asundefinedbeforeConfig.withDefaultandConfig.optiondecide absence. Partially suppliedConfig.allgroups are rejected, successful values such asundefinedand explicitly present empty structures are preserved, and the internal path prefix is removed from the publicConfig.parsesignature. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now refresh roots after capable clients report that their root list changed. -
#6828
48f22a7Thanks @tim-smart! - RemoveContext.mutateandContext.getReferenceUnsafe. Context updates now use overlays, andContext.getresolves reference defaults. -
#6649
d48506dThanks @gcanti! - Remove thekeyValueCombineroption fromSchema.Recordand the correspondingSchemaAST.KeyValueCombinerandSchemaAST.IndexSignature.mergeAPIs. For transformed key collisions, sequential parsing keeps the later selected value, while concurrent parsing keeps the value applied last in completion order. -
#6693
aeba0c8Thanks @lloydrichards! - MCP servers now support session-scoped resource subscriptions on transports that can deliver server notifications and filter resource updates by each client’s subscribed URIs. -
#6649
d48506dThanks @gcanti! - Preserve untouchedResultbranches by identity inResult.mapandResult.mapError. -
#6649
d48506dThanks @gcanti! - Improve Schema parsing, schema construction and adapter runtime performance while preserving current parsing behavior.Runtime performance
The
effect@beta, Valibot and Zod timing cases fromopen-circle/schema-benchmarkswere reproduced as a dedicatedruntimeperfsuite. The table includes every case exposed by each upstream adapter;—means that the adapter does not provide that benchmark.Effect
main(45e781088) and the branch based ond775bf4b2were compared with five paired processes per case, 150 ms measurement time and 50 ms warmup. The two initially inconclusive Effect cases were repeated with 15 paired processes, 500 ms measurement time and 150 ms warmup. Valibot and Zod values use five processes, 300 ms measurement time and 100 ms warmup. Environment: Nodev24.12.0, macOS arm64, Apple M3.Zod parsing uses
safeParsewith{ jitless: true }; its Standard Schema and codec cases use the corresponding native adapter APIs. All values are median microseconds per operation (µs/op), lower is better. Cross-library values are diagnostic because they are independent rather than paired measurements.Scenario Effect mainEffect branch Valibot Zod 4 Delta 95% CI Classification Initialize schema 137.28 118.23 40.24 318.56 -12.69% -21.02% to -5.35% improvement Initialize schema and decoder 144.81 130.50 — — -10.88% -14.22% to -3.29% improvement Validate valid product 8.478 5.415 5.63 — -35.18% -41.65% to -32.83% improvement Validate invalid product 1.516 1.348 0.2431 — -11.59% -13.81% to -6.31% improvement Parse valid product, all errors 8.360 5.366 5.22 7.16 -36.28% -54.41% to -31.67% improvement Parse invalid product, all errors 11.302 9.100 15.70 41.58 -19.42% -21.32% to -13.12% improvement Parse valid product, first error 8.201 5.294 5.37 — -35.44% -37.75% to -34.59% improvement Parse invalid product, first error 1.510 1.352 0.2572 — -10.51% -12.52% to -9.53% improvement Standard Schema valid, all errors 9.284 5.935 5.35 3.83 -35.96% -53.29% to -33.49% improvement Standard Schema invalid, all errors 16.718 15.203 16.51 32.85 -11.31% -13.97% to -7.65% improvement Standard Schema valid, first error 8.889 5.843 — — -34.17% -35.13% to -33.94% improvement Standard Schema invalid, first error 2.435 2.244 — — -8.44% -12.76% to -4.82% improvement Typed codec encode 0.4692 0.3420 — 0.0405 -27.60% -32.35% to -22.50% improvement Typed codec decode 0.5191 0.3762 — 0.0463 -27.19% -34.75% to -22.71% improvement Unknown codec encode 0.4910 0.3472 — — -28.58% -30.42% to -27.59% improvement Unknown codec decode 0.5061 0.3637 — — -29.26% -29.82% to -21.70% improvement Overall Effect classification: 16 improvements and no regressions.
-
#6896
52262beThanks @tim-smart! - Bind event-log read and write requests to the identities authenticated on their RPC connection. -
#6735
1284aa1Thanks @gcanti! - Fix three issues in the publicOpticAPI:- Composed
IsoandPrismsetters no longer try to read a source value before writing. - Calling
notUndefinedon anOptionalnow returns anOptional, because writing can still fail. - The internal
nodeproperty is no longer exposed by public optic types.
- Composed
-
#6701
9867b9fThanks @fubhy! - Removed explicit ./index entrypoints -
#6875
979ce39Thanks @fubhy! - Fix protobuf serialization of negative signed integers to use ten-byte two’s-complement varints. -
#6696
b6d3e67Thanks @tim-smart! - remove file descriptor type -
#6860
adf6c6cThanks @fubhy! - Honor custom split and strip regular expressions passed toString.noCase. -
#6866
7314d60Thanks @fubhy! - Fix partial file-backed HTTP bodies to report the selected byte range as their content length. -
#6693
aeba0c8Thanks @lloydrichards! - MCP HTTP servers now reject requests sent before initialization with the required lifecycle response. -
#6759
1acbd8bThanks @tim-smart! - Harden JSON-RPC wire message classification against inherited properties. -
#6705
7bde6ccThanks @tylergibbs1! - Restore therecursiveoption forFileSystem.watch, with non-recursive watching as the default. -
#6798
a959a8bThanks @tim-smart! - Namespace PostgreSQL advisory shard locks by theSqlRunnerStoragetable prefix.This changes the advisory-lock protocol. PostgreSQL clusters using advisory locks require a full cluster stop before upgrading; a rolling deploy is unsafe because old and new runners use different lock keys and can both acquire the same shard.
4.0.0-beta.102
Patch Changes
-
#6563
b6392e1Thanks @tim-smart! - unstable/reactivity Atom: addwithEqualitycombinator for customizing how the registry detects value changes -
#6574
7ed9450Thanks @tim-smart! - unstable/http HttpClientRequest: addupdateHeadersandremoveHeadercombinators for transforming or removing request headers, closes #6271 -
#6641
45762bdThanks @tim-smart! - Add manual flushing to the OTLP exporters through a sharedFlusherservice exposed by each signal layer. The signal layer output types now includeFlusher, andOtlpExporter.makerequires it so custom exporters register unconditionally. -
#6616
a6e8391Thanks @tim-smart! - AddTool.setNeedsApprovalfor replacing the approval policy of an existing tool. -
4ac7e8bThanks @IMax153! - AddEffect.updateServiceScopedfor updating a context service until the current scope closes, with customizable reset behavior. -
#6593
4cd40f5Thanks @tim-smart! - FixChannel.mergeAllto propagate outer failures promptly and interrupt active inner channels. -
#6610
6956bc0Thanks @ebramanti! - UpdateMcpServer.layerHttpto return405for unsupported HTTP methods, reject unsupportedMCP-Protocol-Versionheaders with400, and return an empty202for accepted notifications and responses. -
#6608
0e50ec7Thanks @gcanti! - AddSchema.Naturalfor non-negative safe integers and use canonicalSchema.Int,Schema.Finite, andSchema.Naturalschemas for numeric domain values across Effect, AI protocols, and OpenAPI patches.Update the date, date-time, file, time-zone, cluster, event-log, persistence, socket, SQL, and DevTools schemas to reject invalid non-finite or non-integer values where appropriate. Correct the decoded schema of
Schema.NumberFromString, and allowSchema.DurationFromMillisandSchema.DurationFromNanosto represent negative durations. -
#6599
9fcdadeThanks @tim-smart! - Interrupt in-flight stream pulls when closing an async iterator. -
#6638
57367d5Thanks @tim-smart! - FixPartitionedSemaphore.takeleaking partially acquired permits when interrupted. -
#6615
35c445fThanks @tim-smart! - Expose the tool call ID to AI tool handlers andToolkit.WithHandler.handlewrappers. -
#6561
c917bb9Thanks @hsubra89! - Reject unexpected positional arguments left after command parsing, including values exceedingArgument.variadicmaximum bounds. -
#6613
bc1f358Thanks @tim-smart! - Ignore duplicate chunk indexes when joining event log messages. -
#6552
0e0c9d7Thanks @xianjianlf2! - Fix a race where FiberHandle.clear could remove a newer fiber installed while the previous fiber was still interrupting. -
#6598
73d40aaThanks @tim-smart! - FixLanguageModel.streamTextto apply the configured concurrency limit to tool call resolution, including approval checks. -
#6637
4f1e318Thanks @tim-smart! - Fix Latch open/release resuming waiters that registered after a subsequent close.Latch.openandLatch.releaseschedule the waiter flush on the fiber’s dispatcher. Previously the flush drained whatever waiters existed at flush time, so a waiter that registered after the latch was closed again could be resumed by the stale flush. The waiters are now snapshotted at schedule time, so only waiters covered by anopen/releasecall are resumed. -
#6614
9d8d85cThanks @tim-smart! - Fix histogram and summary maximum values for negative-only observations. -
#6634
6079fdaThanks @fubhy! - Fix OTLP exporter shutdown to await in-flight and final buffered exports up to the configured shutdown timeout. -
#6567
5101e92Thanks @gcanti! - AddRecord.assignPropertyand safely handle dynamic record keys such as__proto__and inherited property names. -
#6592
d0b3265Thanks @tim-smart! - FixStream.haltWhento observe halt effects at pull boundaries for synchronous streams. -
#6618
7a03c89Thanks @tim-smart! - unstable/cluster: hash over-length SQL message deduplication keys to preventmessage_idoverflow, closes #6317.The composed request deduplication key (
entityType/entityId/tag/primaryKey) can legally exceed the 255-charactermessage_idcolumn — the address columns alone allow 458 characters before the RPC primary key is appended.SqlMessageStoragenow stores a SHA-256 digest (64 hex characters) of the composed key in the uniquemessage_idcolumn when the key exceeds 255 characters, so keys of any length work on PostgreSQL, MySQL, MSSQL, and SQLite. Keys that fit are stored as plaintext, byte-compatible with rows written by previous versions, so existing deployments keep deduplicating with no migration or schema change.SqlMessageStorage.layer/layerWith(and consequentlySingleRunner.layer) now requireCrypto.Crypto. The Node and Bun cluster convenience layers provide the platform Crypto implementation internally, so their requirements are unchanged. -
#6577
cea1d9cThanks @tim-smart! - ManagedRuntime: addSymbol.asyncDispose, enablingawait usingsyntaximport { Effect, Layer, ManagedRuntime } from "effect";await using runtime = ManagedRuntime.make(Layer.empty);await runtime.runPromise(Effect.log("Hello, world!"));// runtime is disposed automatically at the end of the scope -
#6644
078e1f5Thanks @gcanti! - Improve the performance ofArray.dedupe,Array.union,Array.intersection,Array.difference, and Schema unique item validation by using hash-based equality lookup. -
#6609
97bafeaThanks @tim-smart! - Allow embedding usage input tokens to be omitted during decoding, including after JSON serialization. -
#6606
fab0ab8Thanks @tim-smart! - Allow optional AI response fields to be omitted during decoding, including after JSON serialization. -
#6607
c323d8bThanks @ebramanti! - Prevent MCP tool failures from exposing Cause rendering, stack traces, and internal paths while preserving actionable validation messages. -
#6576
6966353Thanks @tim-smart! - Record: makefromIterableBydual, allowing data-last usage inpipeimport { pipe, Record } from "effect";const users = [{ id: "2", name: "name2" },{ id: "1", name: "name1" },];pipe(users,Record.fromIterableBy((user) => user.id),); -
#6622
0444004Thanks @gcanti! - Remove the experimentalSchemaUtilsmodule and itsgetNativeClassSchemahelper. The helper duplicated a composition already available through the primary Schema APIs and did not justify a separate public module. -
#6653
028bbb3Thanks @tim-smart! - RemoveEffect.withConcurrency, theReferences.CurrentConcurrencyreference backing it, and the"inherit"option fromTypes.Concurrency. Use an explicitnumberor"unbounded"concurrency value instead. -
#6620
ff5d6e2Thanks @gcanti! - MakeSchema.Datereject invalid dates and remove the redundantSchema.DateValid,Schema.isDateValid, andSchema.isDateValidReviverAPIs.Schema.DateFromStringandSchema.DateFromMillisnow fail decoding when their input would produce an invalid date.Remove
Schema.Annotations.ToArbitrary.GenerationConstraint.valid;Schema.Datearbitraries now generate only valid dates by default. -
#6575
1bfce93Thanks @gcanti! - Schema: make schemas directly extendable as classes with static method support and removeSchema.asClass.BottomandBottomLazynow include the class-compatiblenewsignature, whileBottomWithoutNewandBottomLazyWithoutNewexpose the schema protocol without it for schema types that define a specialized construct signature.Example
import { Schema } from "effect";class MyString extends Schema.String {static readonly decodeUnknownSync = Schema.decodeUnknownSync(this);}MyString.decodeUnknownSync("a"); // "a" -
#6424
7ce815cThanks @gcanti! - Refactor theSchemaRepresentationmodule to improve clarity and maintainability.The representation pipeline is now open and compiler-extensible. The same encoded-side representation is used for JSON persistence, runtime reconstruction, JSON Schema Draft 2020-12 compilation, TypeScript code generation, AI structured output, and HTTP / OpenAPI schemas.
New representation model
- Add
RepresentationAnnotationandCheckRepresentationAnnotation, which identify declarations and checks with a stableid, JSONpayload, and optional schema dependencies. - Preserve checks on every non-reference representation node instead of storing constraints in the previous closed
metaunions. - Add compiler hooks for checks and declarations through
SchemaRepresentation.ToJsonSchemaandSchemaRepresentation.Generation. - Add
SchemaMultiDocument,fromSchemaMultiDocument, andfromRepresentationsso several live schemas and named definitions can be converted and reconstructed together. Explicit definitions are preserved even when no root references them. - Preserve shared structural nodes, annotated recursion, union member order, identifiers, reference siblings, and structural checks when projecting encoded schemas.
Persistence and revivers
- Add
toJson,fromJson,toJsonMultiDocument, andfromJsonMultiDocumentas the persistence boundary for representation documents. - Live representations store literal, enum, and property-name scalars as native values. JSON persistence encodes them as
{ type, value }tagged unions so their runtime types remain distinct across persistence formats, canonically encodes structural bigint and global symbol values, keeps JSON-valued annotations, and removes runtime-only callbacks and other non-JSON annotation values. - Replace the generic reviver callback with typed
DeclarationReviver,FilterReviver, andFilterGroupRevivercontracts. AddmakeDeclarationReviver,makeFilterReviver, andmakeFilterGroupReviver, which infer their payload type frompayloadSchema. - Resolve acyclic references to concrete runtime schemas and reserve
Schema.suspendwrappers for recursive back-edges. Acyclic alias chains may be normalized while preserving the outer reference identifier. - Export individual revivers for built-in declarations and checks from
Schema. Consumers opt in to exactly the revivers accepted when reconstructing persisted documents:- declaration revivers:
OptionReviver,ResultReviver,RedactedReviver,CauseReasonReviver,CauseReviver,ErrorReviver,ExitReviver,ReadonlyMapReviver,HashMapReviver,ReadonlySetReviver,HashSetReviver,ChunkReviver,RegExpReviver,URLReviver,DateReviver,DurationReviver,BigDecimalReviver,FileReviver,FormDataReviver,URLSearchParamsReviver,Uint8ArrayReviver,DateTimeUtcReviver,TimeZoneOffsetReviver,TimeZoneNamedReviver,TimeZoneReviver,DateTimeZonedReviver,JsonReviver, andMutableJsonReviver - check revivers:
isTrimmedReviver,isPatternReviver,isStringFiniteReviver,isStringBigIntReviver,isStringSymbolReviver,isUUIDReviver,isGUIDReviver,isULIDReviver,isBase64Reviver,isBase64UrlReviver,isStartsWithReviver,isEndsWithReviver,isIncludesReviver,isUppercasedReviver,isLowercasedReviver,isCapitalizedReviver,isUncapitalizedReviver,isFiniteReviver,isGreaterThanReviver,isGreaterThanOrEqualToReviver,isLessThanReviver,isLessThanOrEqualToReviver,isBetweenReviver,isMultipleOfReviver,isIntReviver,isDateValidReviver,isGreaterThanDateReviver,isGreaterThanOrEqualToDateReviver,isLessThanDateReviver,isLessThanOrEqualToDateReviver,isBetweenDateReviver,isGreaterThanBigIntReviver,isGreaterThanOrEqualToBigIntReviver,isLessThanBigIntReviver,isLessThanOrEqualToBigIntReviver,isBetweenBigIntReviver,isMinLengthReviver,isMaxLengthReviver,isLengthBetweenReviver,isMinSizeReviver,isMaxSizeReviver,isSizeBetweenReviver,isMinPropertiesReviver,isMaxPropertiesReviver,isPropertiesLengthBetweenReviver,isPropertyNamesReviver, andisUniqueReviver
- declaration revivers:
- Validate reviver payloads with their
payloadSchema, and report missing or duplicate reviver identifiers.
JSON Schema and code generation
- Compile JSON Schema from the canonical JSON codec and the encoded-side representation. Custom checks can contribute constraints through
Annotations.Filter.toJsonSchemawithout modifying a central metadata registry. - Import JSON Schema directly as live schemas. The importer now supports shared definitions, aliases, recursion, reference siblings, and definitions that are not reachable from a root.
- Add the named
FromJsonSchemaOptionstype for the importeronEntercallback. - Generate code from live
toCodeannotations on declarations and checks. Compiler callbacks receive generated type parameters or schema dependencies and can emit multiple import declarations. - Add import artifacts to
CodeDocumentand preserve all explicit definitions during multi-document code generation. - Reject distinct schemas that declare the same identifier instead of silently merging them or generating suffixed references.
Canonical codecs and integrations
- Preserve schema identifiers, property context, key encodings, and applicable checks while deriving canonical JSON codecs.
- Treat
Schema.JsonandSchema.MutableJsonas already canonical. JSON validation now rejects sparse arrays, and non-finite numbers decode only from the canonical strings"Infinity","-Infinity", and"NaN"rather than raw non-finite numeric inputs. - Declarations without
toCodecJsonortoCodecnow use JSON validation as their fallback instead of silently encoding tonull.toCodecJsoncallbacks may returnundefinedwhen a declaration is already canonical. - Add
Annotations.Declaration.toCodecStringTree; StringTree derivation now requires a declaration to provide a structural StringTree, JSON, or general codec instead of silently encoding an opaque declaration toundefined. - Update AI structured-output, HTTP schema, HttpApi OpenAPI, and OpenAPI generator integrations to consume the same canonical encoded representation and compiler hooks. Provider-specific structured-output transforms may remove unsupported JSON Schema keywords, while the Effect codec remains the validation authority.
Breaking changes
- Rename the low-level representation constructors:
SchemaRepresentation.fromAST->SchemaRepresentation.toRepresentationSchemaRepresentation.fromASTs->SchemaRepresentation.toRepresentations
- Replace
SchemaRepresentation.toSchemawithfromRepresentation, and addfromRepresentationsfor multi-root documents. Both reconstruction functions require{ revivers: [...] }; no default reviver is installed implicitly. - Remove
SchemaRepresentation.toSchemaDefaultReviver. Pass the required built-in revivers exported bySchema, or custom revivers created with the new constructors. - Replace
DocumentFromJsonandMultiDocumentFromJsonwith thetoJson/fromJsonandtoJsonMultiDocument/fromJsonMultiDocumentfunctions. - The persisted
DocumentandMultiDocumentformat is incompatible with the previous format. Nodes now containchecks; encoded literal values, enum values, and property signature names use tagged{ type, value }objects while decoded documents expose their native scalar values; declarations no longer containencodedSchema; persisted opaque declarations and leaf filters require a{ id, payload }representation identity; and checks no longer contain closedmetapayloads. Regenerate stored documents from their source schemas with the new API, or migrate their shape before passing them tofromJson. - Replace the generic
Reviver<T>function type withDeclarationReviver<P>,FilterReviver<P>,FilterGroupReviver<P>,CheckReviver<P>,Reviver<P>, andAnyReviver. - Remove the closed metadata types
StringMeta,NumberMeta,BigIntMeta,ArraysMeta,ObjectsMeta,DateMeta,SizeMeta,DeclarationMeta, andMetafromSchemaRepresentation. - Remove the exported representation validation schemas and
PrimitiveTree:$PrimitiveTree,$Annotations,$Null,$Undefined,$Void,$Never,$Unknown,$Any,$StringMeta,$String,$NumberMeta,$Number,$Boolean,$BigInt,$Symbol,$LiteralValue,$Literal,$UniqueSymbol,$ObjectKeyword,$Enum,$TemplateLiteral,$Element,$Arrays,$PropertySignature,$IndexSignature,$ObjectsMeta,$Objects,$Union,$Reference,$DateMeta,$SizeMeta,$DeclarationMeta,$Declaration,$Suspend,$Representation,$Document, and$MultiDocument. - Replace schema annotations as follows:
- remove
Annotations.Bottom.metaandAnnotations.Filter.meta - remove
Annotations.Declaration.typeConstructor; userepresentation - remove
Annotations.Declaration.generation; use thetoCodecallback - add
Annotations.Filter.representation,toJsonSchema, andtoCode - add
Annotations.Augment.contentSchemaas a JSON-valued annotation - allow
Annotations.Declaration.toCodecJsonandtoCodecStringTreeto returnundefined
- remove
- Remove the top-level
contentMediaTypeandcontentSchemafields fromSchemaRepresentation.String. Content metadata is now carried in ordinary annotations, andcontentSchemais a JSON Schema value rather than a nested Effect representation. - Remove
Schema.Annotations.BuiltInMetaDefinitions,BuiltInMeta,MetaDefinitions, andMeta. Custom checks should carry a representation identity and compiler callbacks instead of augmenting the metadata registry. fromJsonSchemaDocumentnow returnsSchema.Topinstead of a representationDocument.fromJsonSchemaMultiDocumentnow returnsSchemaMultiDocumentinstead ofMultiDocument; callfromSchemaMultiDocumentwhen a representation multi-document is required.toCodeDocumentnow accepts only a liveMultiDocument; remove itsreviveroption. Reconstruct persisted documents first so revivers can restore runtime compiler callbacks.- Rename the
generationfield ofArtifactvalues for symbols and enums tocode. Declaration generation no longer has anEncodedoutput, andimportDeclarationis replaced byimportDeclarationson callback output. - Remove the exported
sanitizeJavaScriptIdentifier,topologicalSort, andTopologicalSorthelpers. - Negative zero no longer receives special representation handling. Do not rely on preserving its sign across JSON persistence or generated code, where it may be normalized to
0. - With
{ errors: "all" }, structural checks run only after their base array, object, or declaration parses successfully; they are no longer added to an already failing child parse.
- Add
-
#6646
7271a7fThanks @gcanti! - Precompile union formatters and equivalences, select transformed union members using their decoded type, and allow deriving an equivalence forNever. -
#6516
475fe5cThanks @tim-smart! - Prevent SQL runner lock refreshes from hanging when reserved connections become unresponsive.
4.0.0-beta.101
Patch Changes
-
#6545
731bea1Thanks @tim-smart! - Interrupt and await concurrent traversal workers when mapper or refill callbacks throw. -
#6545
731bea1Thanks @tim-smart! - Preserve current stack frame annotations on terminal root failures. -
#6545
731bea1Thanks @tim-smart! - Store interrupting fiber stack frames separately from interrupted target stack frames. -
#6545
731bea1Thanks @tim-smart! - Avoid allocating a scheduler dispatcher whenrunSyncExitcompletes without yielding. -
#6545
731bea1Thanks @tim-smart! - Make awaitAllChildren child selection linear in the number of fibers. -
#6523
b35ed29Thanks @gcanti! - Simplify the displayedType,Encoded, andIsotypes of required readonlySchema.Structfields, closes #6521. -
#6514
dd44624Thanks @tim-smart! - FixMutableList.filterleaving an invalid empty bucket when no values match. -
#6545
731bea1Thanks @tim-smart! - Deliver pending interrupts when interruptibleMask restores fiber interruptibility. -
#6526
2bae1acThanks @tim-smart! - FixHttpRouter.toWebHandlermiddleware inference to exclude request services supplied by the HTTP adapter.
4.0.0-beta.100
Patch Changes
-
#6501
c1288ddThanks @gcanti! - Add adiscriminantstuple to schemas augmented withSchema.toTaggedUnionand reject duplicate discriminant property keys. -
#6475
2b58a3dThanks @fubhy! - Normalize cron month and weekday aliases independently of the host locale. -
#6492
6dc83f2Thanks @gcanti! - Preserve nested class construction when applying constructor defaults, closes #6491. -
#6476
c1e2fe0Thanks @fubhy! - AddCronday and weekday intersection semantics in inspection representations. -
#6474
f3fbae8Thanks @fubhy! - ValidateCron.makefield constraints and treat weekday7as Sunday consistently with cron parsing. -
#6472
e000f80Thanks @fubhy! - FixCron.prevday-of-month rollover across shorter months and non-leap years. -
#6471
f4ee765Thanks @fubhy! - FixCron.prevweekday wrapping to always return a matching instant before the input. -
#6477
510b55fThanks @fubhy! - Make Cron equality and hashing include the optional timezone consistently. -
#6433
31d3fc4Thanks @coyaSONG! - Fix the published declaration forHttpEffect.appendPreResponseHandlerUnsafe. -
#6487
875e618Thanks @rvaccone! - Fix doubledExpected: Expected ...prefixes in CLIInvalidValueerror messages, closes #6312. -
#6496
688d46aThanks @tim-smart! - PortEffect.reducefrom Effect v3. -
#6480
6ff5023Thanks @fubhy! - Correct the diagnostic for cron step values above a field’s maximum. -
#6484
c0333e7Thanks @tim-smart! - Fix fiber self-interuption from inside a running operation -
#6493
06e7e8cThanks @tim-smart! - Make multipart errors respond with an HTTP status based on their reason and ignore them in the error reporter. -
#6498
eb9b102Thanks @thewilkybarkid! - Don’t create a table when it’s not needed -
#6494
8b155daThanks @tim-smart! - only interrupt cache lookup when all awaiters are gone -
#6495
3a87335Thanks @tim-smart! - clean up more references on fiber exit
4.0.0-beta.99
Patch Changes
-
#6397
8ce4795Thanks @IMax153! - Add a scopedCliConfigservice for customizing the built-in global flags used by CLI command runners.For example, provide an explicit list that omits
GlobalFlag.LogLevelto remove the built-in--log-levelflag:import { Effect } from "effect";import { CliConfig, Command, GlobalFlag } from "effect/unstable/cli";const program = Command.run(command, { version: "1.0.0" }).pipe(Effect.provide(CliConfig.layer({builtIns: [GlobalFlag.Help, GlobalFlag.Version, GlobalFlag.Completions],}),),); -
#6409
80b539fThanks @IMax153! - Reintroduce interactive CLI wizard mode through the--wizardflag andCommand.wizard. -
#6394
88a54ccThanks @lloydrichards! - add aradiusoption toGraphsearch configuration, allowingdfs,bfs, anddfsPostOrdertraversals to limit returned nodes by edge distance from the configured start nodes. Traversals can also usedirection: "undirected"to follow edges in either direction. -
#6457
e6e6dbaThanks @fubhy! - ImproveGraph.dijkstraandGraph.astarpriority queue performance. -
#6468
bfb203eThanks @gcanti! - DistributeHttpApiBuilderhandler requirements per service so request middleware layers can provide them, closes #6464. -
#6389
2e9a34aThanks @IMax153! - Report an error when a CLI flag, including--completions, is provided without its required value. -
#6359
55d4eb3Thanks @evermake! - - FixCommand.withSubcommandscollapsing the inferred requirements type toneverwhen given more than one subcommand- Export a
Command.Servicesutility type to extract the required services from aCommand
- Export a
-
#6462
bddb010Thanks @fubhy! - Fix immutable Graph equality and hashing to include future node and edge identifier allocation. -
#6425
a328835Thanks @fubhy! - FixGraph.bellmanFordto detect reachable negative cycles when the source and target are the same node. -
#6454
5560d05Thanks @fubhy! - Fix standalone data-lastGraph.getNodeandGraph.getEdgeinference. -
#6418
8f6e3adThanks @fubhy! - FixGraph.mapEdgesandGraph.filterMapEdgesto preserveGraph.Edgeinstances when transforming edge data. -
#6426
46997faThanks @fubhy! - RejectNaNand-Infinityedge weights in Graph shortest-path algorithms. -
#6461
9e6e12dThanks @fubhy! - Fix mutable Graph equality and hashing to use reference identity while preserving structural semantics for immutable graphs. -
#6456
3394b93Thanks @fubhy! - Fix topological walkers silently completing with an incomplete order when a mutable graph becomes cyclic after walker creation. -
#6460
febeabcThanks @fubhy! - RestrictGraph.topoto directed graphs at the type level while retaining runtime validation for unsafe undirected inputs. -
#6455
54161c9Thanks @fubhy! - FixGraph.Walkerto create a fresh iterable for each direct iteration. -
#6414
385f7a4Thanks @fubhy! - FixGraph.toGraphVizto quote DOT graph names and escape labels as literal text. -
#6438
7eea4d0Thanks @tim-smart! - Fix one-shot iterable handling in Array.rotate, Iterable.cartesian, and in-memory RunnerStorage acquisition -
#6371
7543afeThanks @polRk! - Tool: preserve the tool kind when cloning provider-defined and dynamic tools.Tool.addDependency,setParameters,setSuccess,setFailure,annotate, andannotateMergepreviously rebuilt the tool as a user-defined tool, which flippedTool.isProviderDefinedtofalse, corrupted the providerid(e.g.anthropic.memory_20250818), and crashedTool.getStrictMode. These operations now clone the tool while preserving its prototype,id, and kind. Provider-defined tools also now carry an empty annotations context soTool.getStrictMode/annotatework on them. Closes #2615. -
#6421
44b9cf3Thanks @fubhy! - Preserve null edge data in Graph.floydWarshall costs. -
#6438
7eea4d0Thanks @tim-smart! - ensure one-shot iterables work with Fiber apis -
#6420
0a8aa6aThanks @fubhy! - FixGraph.isAcyclicto detect cycles formed by parallel undirected edges. -
#6417
c8d9fcfThanks @fubhy! - RejectGraphmutation operations on mutable handles afterGraph.endMutationfinalizes them. -
#6423
9ca7f9aThanks @fubhy! - Fix Graph.isGraph narrowing for mutable and undirected graphs. -
#6459
e7aca89Thanks @fubhy! - Reject asynchronousGraphmutation callbacks and finalize scoped mutable handles when callbacks fail. -
#6458
55d7560Thanks @fubhy! - Fix undirectedGraphequality and hashing to ignore stored edge endpoint orientation. -
#6415
f809189Thanks @fubhy! - FixGraph.Walkeriteration for receiver-sensitive iterables. -
#6394
88a54ccThanks @lloydrichards! - added graph set operations for combining and comparing graphsGraph.make- creates a graph constructor for a dynamically selected graph kindGraph.compose- composition of two graphs, merging nodes by identityGraph.intersection- intersection of two graphs, keeping only common nodes and edgesGraph.difference- difference of two graphs, removing edges present in the second graphGraph.symmetricDifference- symmetric difference of two graphs, keeping edges present in exactly one graph
-
#6395
0ebdbe7Thanks @Chaoran-Huang! - Fix multipart parser limit violations being silently swallowed -
#6419
7517d09Thanks @fubhy! - Make the public Graph interfaces opaque by hiding internal mutable storage fields from their TypeScript surface. -
#6390
212493bThanks @alvarosevilla95! - Fix Redis script evaluation so transientSCRIPT LOADfailures are retried instead of being cached indefinitely. -
#6394
88a54ccThanks @lloydrichards! - add advanced graph set operations for deriving related graph structuresGraph.complement- complement over the existing node set, adding missing edges between distinct nodesGraph.neighborhood- induced subgraph containing nodes within a radius of a nodeGraph.sum- disjoint union of two graphs without merging equal node data
-
#6430
80ea8cbThanks @fubhy! - Fix Graph BFS, topological sort, and DFS postorder iterators to skip nodes removed from a MutableGraph without recursive self-calls. -
#6465
8df19f4Thanks @gcanti! - FixisInt32to apply custom annotations only to its filter group.
4.0.0-beta.98
Patch Changes
-
#2587
989603bThanks @gcanti! - ExposeSchemaErroras a public module and re-exportSchema.isSchemaError.This gives consumers a stable import path and guard for schema failures without depending on the internal schema implementation, while preserving the existing
Schema.SchemaErrorsurface. -
#2592
214c458Thanks @gcanti! - ApplytransformClientwhen building an individual HttpApi endpoint client, preserving the supplied client’s error and service channels. -
#2598
a037273Thanks @gcanti! - Preserve__proto__group and endpoint identifiers in HTTP APIs, generated clients, and URL builders. -
#2578
97fdaa9Thanks @tim-smart! - FixAtom.kvsasync mode to retain itsAsyncResultvalue shape after writes. -
#2612
b24d248Thanks @gptguy! - Fix replay of persistedDurableDeferred.raceAllresults. -
#2580
19c222cThanks @gcanti! - Fix HttpApi authorization decoding.Previously,
HttpApiBuilder.securityDecoderemoved the expected scheme length and one following character from theAuthorizationheader without verifying either value. A Bearer decoder could therefore pass credentials from a different scheme such asBasic, accept a malformed header without a separating space, or retain leading spaces when more than one separator was present.The decoder now validates the declared scheme before returning credentials, matches it case-insensitively as required by RFC 9110 section 11.1, and consumes one or more separating spaces. Missing, malformed, or mismatched headers produce the existing empty credential value so security middleware can reject them consistently.
Basic authentication previously split the decoded
user-passvalue at every colon, causing otherwise valid passwords containing:to be discarded. It now uses only the first colon as the separator and preserves the rest of the password, following RFC 7617 section 2. -
#2581
eec85ddThanks @gcanti! - Fix HttpApi client error decoding.Generated clients previously combined every error schema for a status into one union decoder. When schemas used different encodings, their declaration order could determine the decoded error instead of the response
Content-Type; for example, a text decoder could accept a JSON response before the JSON decoder was tried.Error responses are now grouped and selected by normalized content type, matching buffered success responses. Normalization happens before grouping, so declarations that differ only by casing or parameters such as
charsetshare one union decoder instead of making later schemas unreachable.No-content schemas are represented by a headerless alternative, allowing empty error responses without a
Content-Typeheader to decode correctly. Unsupported content types preserve the existing combination ofStatusCodeErrorand the response decoding failure. -
#2605
0082f4fThanks @gcanti! - FixNumber.remainderfor very small and large values formatted in scientific notation. -
#2611
8849052Thanks @tim-smart! - FixPersistedQueueto count schema decoding and malformed SQL payload failures as processing attempts. -
#2500
c15e16aThanks @hsubra89! - Fix Redis-backedPersistedQueuereset and failed-item handling. -
#2602
01d00a3Thanks @gcanti! - Fix a bug where decoding bracket paths from FormData or URLSearchParams could mutate inherited object prototypes. -
#2588
8bd4589Thanks @gcanti! - FixSchemaAST.isJsonto reject class instances and other non-record objects. -
#2605
0082f4fThanks @gcanti! - Fix JSON SchemaallOfimports for tuple intersections and preserve primitive refinements when combining literal constraints. -
#2604
6e08428Thanks @gcanti! - FixSchema.toFormatterandSchema.toEquivalenceindexing for tuples with multiple post-rest elements. -
#2603
388dcf9Thanks @gcanti! - Fix union candidate selection and decoding order so that unions now:- consider matches from every sentinel key instead of dropping valid members after the first match;
- reject ambiguous
oneOfinputs when members with different sentinel keys both match; - preserve declared member order when combining discriminated members with non-discriminated fallbacks;
- commit concurrent decoding results in declaration order instead of completion order.
Reserved SSE failure event names with non-
Causedata are now emitted as application events instead of producing a runtime defect. -
#2609
2b7ce2bThanks @tim-smart! - Fix SQL-backed persisted queues to refresh locks for actively acquired elements. -
#2583
87bea7eThanks @MrGovindan! - Fixed Clock.sleep handling of large durations -
#2582
ce38dc3Thanks @gcanti! - Harden HttpApi documentation HTML rendering.Scalar descriptions and CDN versions were interpolated without attribute-safe escaping. Embedded OpenAPI JSON in Scalar and Swagger also handled only the exact
</script>sequence, not other valid script end-tag forms.Attribute values and CDN versions are now encoded for their contexts, and embedded JSON escapes
<so it cannot close its script element. -
#2591
a807cd1Thanks @gcanti! - Keep HttpApi composition immutable.HttpApi.addHttpApiapplied annotations from the added API by mutating its shared groups. It now creates annotated group copies, keeping the source API and independently annotated variants unchanged while preserving annotation precedence. -
#2584
fd8a356Thanks @gcanti! - Normalize HttpApi payload media types.Payload schemas were stored under their exact declared
Content-Type, but the server lowercased the incoming header and removed its parameters before looking it up. For example, a schema declared asApplication/Vnd.Effect+JSON; profile=declaredwas stored under that value, while the server looked forapplication/vnd.effect+json. This could produce a415response even when the generated client and server used the same API.The same mismatch allowed incompatible encodings for equivalent media types to bypass validation. Generated form-urlencoded requests also ignored custom content types and always used the default one.
Payload maps now use normalized keys for matching and conflict checks, while each encoding keeps its declared content type. Generated requests and OpenAPI use the declared values, including every parameterized variant, and custom form-urlencoded content types are preserved.
-
#2476
c2a5edcThanks @gcanti! - Improve unstableHttpApitype-level performance.The implementation now uses identifier-keyed maps and lighter structural constraints in several hot type-level paths. Generated group clients consume the concrete endpoint map directly instead of rebuilding it from the endpoint union.
New Features
- Add
HttpApiBuilder.Handlers.handleAll, which registers an identifier-keyed batch of endpoint handlers for a group. Each entry can be either a handler function or{ handler, options }, and the object can be supplied in multiple partial batches. Endpoint identifiers that were already handled are rejected across batches. HttpApi.groupsnow preserves the concrete group type for each group identifier. For example,Api.groups.usersis typed as theusersgroup instead of the full group union.HttpApiGroup.endpointsnow preserves the concrete endpoint type for each endpoint identifier. For example,Group.endpoints.getUseris typed as thegetUserendpoint instead of the full endpoint union.HttpApiEndpointvalues can now be extended as classes, matching the class-like runtime shape already used byHttpApiandHttpApiGroup.
Measured Type-Level Performance
Main/current comparisons use identical generated fixtures compiled once per revision with TypeScript 7.0.2. The recorded revisions are
mainat97fdaa9c1f52and the branch source at5798fc5fafcd. The focused pre/post curves below were captured with the regularhttpapiregression suite during development. The retained suite uses representative stress points instead of rerunning every point in those historical curves. All numbers are type-instantiation deltas over the corresponding shared baseline.Endpoint declaration costs now grow with a lower slope:
endpoints main current 10 4,580 2,808 50 15,500 9,168 100 29,150 17,118 500 138,350 80,718 Class-like endpoint declarations are slightly cheaper than inline endpoint values in the same 500-endpoint fixture shape:
fixture inline class-like 500 endpoints 82,207 71,850 HttpApiBuilderfluent handler registration avoids the previous non-linear blow-up in the cross-ref comparison:fixture main current 10 endpoints 37,856 11,582 50 endpoints 568,576 63,702 100 endpoints 2,154,476 182,852 500 endpoints 51,741,676 3,296,052 500 raw handlers 51,734,176 3,294,550 In the recorded regular-suite measurements,
handleAllremains the scalable alternative to the equivalent fluent chain:fixture fluent handleAll10 endpoints 11,579 9,146 50 endpoints 63,699 25,106 100 endpoints 182,849 45,056 500 endpoints 3,296,049 204,656 500 eps, two batches 3,296,049 223,613 Generated-client type production also improves for the hot method-building paths:
fixture main current client methods, 500 endpoints 245,795 176,850 top-level client methods, 500 endpoints 243,651 179,809 client endpoint method, 500 endpoints 56,738 46,294 client groups, 100 groups x 5 endpoints 49,019 25,893 The following focused curves were captured immediately before and after each isolated type-level change.
The focused
Client.Groupcurve shows the improvement from consuming the identifier-keyed endpoint map directly:endpoints union remapping endpoint map 10 12,448 12,294 50 19,169 18,935 100 27,570 27,236 500 94,770 93,636 The focused
Client.TopLevelMethodscurve improves by reading endpoint identifiers directly from the endpoint union:endpoints pre-change post-change 10 12,531 12,476 50 19,252 19,197 100 27,653 27,598 500 94,853 94,798 The focused
HttpApiClient.endpointselection curve improves by reading endpoint identifiers directly from the selected endpoint union:endpoints pre-change post-change 10 7,666 7,588 50 8,707 8,629 100 10,008 9,930 500 20,408 20,330 The focused
HttpApiBuilder.endpointselection curve improves by reading endpoint identifiers directly from the selected endpoint union:endpoints pre-change post-change 10 12,828 12,745 50 13,869 13,786 100 15,170 15,087 500 25,570 25,487 URL builder types now avoid repeatedly expanding the full API/group shape:
fixture main current URL builder, 500 endpoints 211,356 91,610 top-level URL builder, 500 endpoints 210,724 93,118 builder endpoint, 500 endpoints 62,894 51,952 Breaking Changes
These changes affect unstable
HttpApitype-level APIs and structural API, group, and endpoint types.Renamed Constraint Types
- Broad structural constraint exports have been renamed to align with
Schema.Constraintterminology:HttpApi.AnytoHttpApi.Constraint,HttpApi.AnyWithPropstoHttpApi.Top,HttpApiGroup.AnytoHttpApiGroup.Constraint,HttpApiGroup.AnyWithPropstoHttpApiGroup.Top, andHttpApiEndpoint.AnytoHttpApiEndpoint.Constraint. HttpApiEndpoint.AnyWithPropshas been replaced byHttpApiEndpoint.Top, whose schema parameters are constrained toSchema.Top, including success and error schemas.- Type guards now expose the widened runtime-prop shapes:
HttpApi.isHttpApireturnsHttpApi.Top,HttpApiGroup.isHttpApiGroupreturnsHttpApiGroup.Top, andHttpApiEndpoint.isHttpApiEndpointreturnsHttpApiEndpoint.Top. HttpApiGroup.ApiGrouphas been renamed toHttpApiGroup.Service.
API, Group, And Endpoint Shapes
HttpApi.groupsis now typed as an identifier-keyed group map instead ofReadonlyRecord<string, Groups>, andHttpApitracks its group union invariantly. Dynamic string indexing must refine the key first or cast to a broad runtime record.HttpApiGroup.endpointsis now typed as an identifier-keyed endpoint map instead ofReadonlyRecord<string, Endpoints>, andHttpApiGrouptracks its endpoint union invariantly. Dynamic string indexing must refine the key first or cast to a broad runtime record.HttpApiEndpointnow exposes its stable key asidentifierinstead ofname, aligning endpoints with APIs and groups and leavingnameavailable for future class-based endpoint patterns.HttpApiEndpointvalues are now function objects instead of plain objects. Runtime checks such astypeof endpointnow return"function", andendpoint.nameis the native function name. Useendpoint.identifierfor the stable endpoint key.- Identifier helper types have been renamed from
Name/WithNametoIdentifier/WithIdentifier;HttpApiGroup.Servicenow exposesidentifierinstead ofname.
Builder Handler Types
HttpApiBuilder.Handlersnow tracks endpoints through an identifier-keyed endpoint map and a set of handled endpoint identifiers, instead of tracking the remaining endpoint union. Its public type parameters changed fromHandlers<R, Endpoints>toHandlers<R, EndpointsByIdentifier, HandledIdentifiers>, and its phantom fields changed from_Endpointsto~EndpointsByIdentifier/~HandledIdentifiers.- The unused
HttpApiBuilder.Handlers.Anyhelper type has been removed. - The exported
HttpApiBuilder.HandlersTypeIdsymbol has been removed;Handlersnow uses a private string type id. - Duplicate
handle/handleRawregistrations for the same endpoint are rejected at the call site, andhandleAllrejects endpoint identifiers that were already handled by an earlier batch. Missing endpoint handlers are still rejected by the finalHttpApiBuilder.groupreturn validation.
Client Types
HttpApiClient.Client.Groupnow derives a client from a concrete group type:Client.Group<Group, E, R>. The previous group-union plus group-identifier form is no longer supported.HttpApiClient.Client.TopLevelMethodsnow returns an identifier-keyed method record instead of a union of[identifier, method]tuples.HttpApiClient.makeWithremoves the defaultHttpClientError.HttpClientErrorfrom custom client error types in the returnedClient, while preserving any additional custom client errors.
Endpoint Helper Types
HttpApiEndpoint.HttpApiEndpointnow stores lightweight phantom metadata for middleware and request shapes:~Middleware,~MiddlewareServices,~Request, and~RequestRaw. Its type identifier field is nowreadonly [TypeId]: typeof TypeId.HttpApiEndpoint.Constraintis now a lightweight structural endpoint constraint and does not extendPipeable; values typed only asHttpApiEndpoint.Constraintdo not expose.pipe.HttpApiEndpoint.AddErrorhas been removed; it was not used internally by theHttpApiimplementation.HttpApiEndpoint.JsonandHttpApiEndpoint.StringTreehave been removed in favor of the canonicalSchema.toCodecJsonandSchema.toCodecStringTreetypes.- Omitted request-part metadata now remains
neverinstead of being wrapped asSchema.toCodecStringTree<never>; codec metadata is applied only when a params, query, payload, or headers schema is present. - Success metadata now applies
Schema.toCodecJsononly to buffered success schemas and preserves stream success schemas unchanged, including mixed buffered and streaming success arrays. - Handler request parts are now flattened with
Struct.Simplify, improving displayed request types while reducing handler instantiations. - Endpoint helper types now read metadata fields directly instead of re-inferring all type parameters from the full
HttpApiEndpointinterface. This affects helpers such asIdentifier,Success,Error,Params,Query,Payload,Headers,Middleware,MiddlewareServices,Errors,ErrorServicesEncode,ErrorServicesDecode,Request,RequestRaw,ServerServices, andClientServices. HttpApiClient.Client.Methodand related generated-client helpers now require endpoint types that satisfyHttpApiEndpoint.ConstraintRequest. Endpoint-like structural types must include the lightweight request metadata fields to be accepted.
- Add
-
#2585
5946da3Thanks @gcanti! - Reuse HttpApi response schemas.HttpApiBuilderlooked up cached response schemas by their source AST but stored them by the transformed AST, so the cache normally missed. It now uses the source AST consistently. -
#2590
4ae0c5fThanks @IMax153! - Cleanup internals of CLI package -
#2607
5b2a0bcThanks @tim-smart! - ensure WithTransaction wraps entire rpc handler -
#2613
72ac585Thanks @tim-smart! - AddHttpApiError.UnprocessableEntityandHttpApiError.UnprocessableEntityNoContentfor status 422 responses. -
#2594
5e8c1b8Thanks @gcanti! - Reject unknown and duplicate HttpApi handler registrations with descriptive errors. -
#2595
0f9c078Thanks @gcanti! - Reject duplicate OpenAPI operations and operation identifiers, and reject incompatible security schemes that reuse a name.
4.0.0-beta.97
4.0.0-beta.96
Patch Changes
-
#2566
57fe793Thanks @tim-smart! - change rpc ids to string | number -
#2561
0c2f78fThanks @tim-smart! - RemoveSchedule.tapInputandSchedule.tapOutput. UseSchedule.tapinstead. -
#2561
0c2f78fThanks @tim-smart! - UpdateSchedule.addDelayandSchedule.modifyDelayto receive full schedule metadata instead of separate output and delay arguments. -
#2562
97f29dfThanks @tim-smart! - use Sets to track atom relationships
4.0.0-beta.95
Patch Changes
-
#2542
a482442Thanks @IGassmann! - AddSchema.DateFromMillisandSchemaTransformation.dateFromMillisfor decoding millisecond timestamps intoDatevalues. -
#2559
fbefa85Thanks @tim-smart! - fix activity retry policy -
#2547
0b4a32fThanks @fubhy! - Allow cron fields like5/15to expand from the starting value through the field maximum. -
#2557
18a49e1Thanks @fubhy! - FixSchedule.cronwhen the test clock is adjusted to infinity. -
#2560
266cb90Thanks @gcanti! - Treat empty strings as missing values in built-inConfigProviders by default.ConfigProvider.fromEnv,ConfigProvider.fromDotEnvContents,ConfigProvider.fromDotEnv,ConfigProvider.fromUnknown, andConfigProvider.fromDirnow treat literal empty strings as absent values when loaded as values, allowingConfig.withDefaultandConfig.optionto recover. Container discovery still reflects the source structure. PasspreserveEmptyStrings: trueto restore the previous behavior.ConfigProvider.fromDotEnv({ expandVariables: true })now expands variables consistently withConfigProvider.fromDotEnvContents. -
#2554
912f095Thanks @tim-smart! - Add Schedule.upTo options for limiting schedules by duration and/or recurrence count. -
#2556
a6718f9Thanks @fubhy! - Fix cron parsing and scheduling edge cases for whitespace, Sunday7, strict numeric tokens, explicit full day ranges, and month-constrained day-of-month / weekday matching. -
#2551
bef5154Thanks @tim-smart! - Remove theSchedule.bothAPIs and addSchedule.maxfor combining schedules by their slowest delay. -
#2553
18e0564Thanks @tim-smart! - Remove some Schedule APIs:collectInputs,collectOutputs,collectWhile,delays,reduce,satisfiesErrorType,satisfiesInputType,satisfiesOutputType,satisfiesServicesType, andunfold. -
#2558
fb50f14Thanks @tim-smart! - Remove the Schedule.either APIs and add Schedule.min for fastest-duration schedule composition.
4.0.0-beta.94
Patch Changes
-
#2538
95a0e9bThanks @tim-smart! - fork memo map on nested builds -
#2545
a0a3490Thanks @marbemac! - Use registration context for cluster entities -
#2524
f11ce73Thanks @gcanti! - FixHttpApi.makeso it stores the API identifier and starts with an emptygroupsobject instead of aMap. This makes empty APIs match the shape they have after groups are added. -
#2546
ff30b6eThanks @tim-smart! - Fix ClusterWorkflowEngine partial workflow clients colliding with full workflow clients. -
#2539
c2ae4fcThanks @gcanti! - Schema: addSchema.DecoderandSchema.Encoder, and accept simpler schema types in APIs that only decode, only encode, or only need the basic schema shape, closes #2536 -
#2545
a0a3490Thanks @marbemac! - add Effect.setContext for fully replacing the fiber context
4.0.0-beta.93
Patch Changes
-
#2512
00652feThanks @gcanti! - Preserve content schema identifiers when emitting JSON Schema forSchema.fromJsonString.This keeps user-defined identifiers attached to the decoded JSON payload while giving the generated JSON string wrapper its own derived name, avoiding client codegen outputs where the payload type is renamed behind the transport wrapper.
-
#2492
6c58167Thanks @maxprilutskiy! - Map HttpApi json defects to SchemaError -
#2519
2bc5415Thanks @tim-smart! - Fix structural equality for request-style values when structural hashes collide. -
#2507
e11ccccThanks @tim-smart! - ensure handler errors don’t cause httpapi security middleware to fallback -
#2518
ba7e77eThanks @tim-smart! - MoveUrlParams.makeUrltoUrl.makeand returnUrl.UrlErrorfor URL construction failures. -
#2505
5713ee7Thanks @KhraksMamtsov! - accept UrlParams.Input in some UrlParams apis
4.0.0-beta.92
Patch Changes
- #2501
affdc13Thanks @gcanti! - Fix excess property handling in schema-backed class constructors, closes #2499.
4.0.0-beta.91
Patch Changes
-
#2498
b135b25Thanks @gcanti! - FixSchedule.andThenResultto emitselfoutputs asFailureandotheroutputs asSuccess, closes #2497. -
#2488
aaa21a3Thanks @fubhy! - FixString.camelCaseandString.pascalCasehandling of numeric word segments, and addString.configCasefor configuration key casing. -
#2485
3475ee6Thanks @tim-smart! - fix RequestResolver interruption
4.0.0-beta.90
Patch Changes
- #2483
d237fdfThanks @tim-smart! - FixConfig.schemaso missing array values are treated as missing data, allowingConfig.withDefaultto apply.
4.0.0-beta.89
Patch Changes
-
#2475
b7d46abThanks @tim-smart! - UpdateSchema.Voidto model ignoredvoidreturn values.Runtime parsing now accepts any present value and discards it as
undefined. This matches TypeScriptvoidreturn values, where callers do not observe the returned value. UseSchema.Undefinedwhen the input must be exactlyundefined. -
#2479
7777e15Thanks @tim-smart! - Add custom error callbacks to Effect.fromOption. -
#2480
5376197Thanks @tim-smart! - render causes in OtlpTracer exception events
4.0.0-beta.88
Patch Changes
-
#2472
911f1b8Thanks @tim-smart! - Add adaptive consume and feedback operations to the unstable persistent RateLimiterStore API, including in-memory and Redis-backed bounded cooldown, learning, learned pacing, and expiry behavior for 429 Retry-After feedback. -
#2457
8beeeeaThanks @P0lip! - Localize missing rpc method errors to the provided request id -
#2428
c306fcfThanks @MrGovindan! - AddisOpentoLatchto allow querying the latch’s open state
4.0.0-beta.87
Patch Changes
-
#2468
5a0c1a4Thanks @gcanti! - Expose the original input schema onSchema.toType,Schema.toEncoded,Schema.toCodecJson, andSchema.toCodecStringTreeresults via theschemaproperty. This aligns these schema wrappers with other wrappers that retain their source schema for type-level and runtime introspection. -
#2466
1eea2eaThanks @gcanti! - UseURL.canParseto validate URL string schema decoding before constructing aURL. This avoids relying on thrown exceptions for routine validation while preserving the same invalid URL issue and successful decode output.
4.0.0-beta.86
Patch Changes
-
#2462
0b5795aThanks @tim-smart! - AddStatement.valuesUnpreparedfor returning unprepared SQL statement rows as arrays. -
#2455
3e3a859Thanks @fubhy! - FixCron.nextskipping earlier matching days when the upcoming day-of-month does not exist in the current month. -
#2454
7dbec24Thanks @StarpTech! - Exclude response metadata from HTTP server span failures after response headers have been sent. -
#2449
d8c00a1Thanks @gcanti! - Fix Schema handling of encoded-side checks for container ASTs.Checks added after
flipare now preserved asencodingChecksacrossDeclaration,Arrays,Objects, andUnion, even when rebuilding the AST does not change child nodes.toTypenow projects those checks consistently, and parsing applies encoded-side checks to the local encoded value when an encoding chain is present without allowing encoded-sideparseOptionsannotations to affect the current parser side. -
#2446
85b6317Thanks @IMax153! - Allow schemas provided to CLI flags / arguments to utilize the environment required by the CLI -
#2452
6d0fda0Thanks @gcanti! - Remove thekeepDeclarationsoption fromSchema.toCodecStringTree. -
#2461
108a933Thanks @tim-smart! - Fail RpcClient HTTP requests with a defect when the response stream closes before the request receives a terminal response. -
#2442
7e1f455Thanks @gcanti! - Improve Schema type-level performance by lazily computing schema views, specializing common struct projections, and using lighter schema constraints at API boundaries that do not need the full schema protocol.This also adds the Schema type-performance benchmark suite, introduces
Schema.toCodecArrayFromSingle, preserves canonical StringTree array codecs, renames the arbitrary-generation annotation constraint for clarity, and updates affected codec, parser, channel, SQL, HTTP API, persistence, RPC, AI, OpenAPI, and workflow typings to match the refined Schema surface. -
#2464
46b3e79Thanks @tim-smart! - do not use performance.timeOrigin and calculate origins lazily
4.0.0-beta.85
Patch Changes
-
#2436
328d97cThanks @MohanedMashaly! - change default operation in redis from LPUSH TO RPUSH -
#2431
8441836Thanks @gcanti! - Derive template literal arbitraries from encoded parts, closes #2414. -
#2439
074e436Thanks @gcanti! - Allow schema class.extendto accept aStructand preserve checks from the extension schema, closes #2419. -
#2444
c1dfd60Thanks @bweis! - Avoid throwing whenError.stackTraceLimitis non-writable (frozen intrinsics / SES / deterministic sandboxes such as Temporal).Effect manipulates
Error.stackTraceLimitin several internal spots to capture short or empty stack traces cheaply. In hardened environments whereErroris frozen andstackTraceLimitis read-only, assigning to it throws, which broke Effect entirely. Stack-trace-limit manipulation is now best-effort and silently no-ops when the property cannot be modified, mirroring Node’s own internal guard. Behavior in normal (writable) environments is unchanged. -
#2425
2ba316bThanks @tim-smart! - Add Random.choice for selecting a random element from an iterable. -
#2434
7ce7344Thanks @gcanti! - Use semantic matching for TemplateLiteral parsing and index signature keysReplace regex-based TemplateLiteral parsing with backtracking segmentation over template literal parts, applying part checks during matching.
Use schema membership when selecting Record index signature keys, including checked string, number, symbol, and TemplateLiteral parameters. Tighten valid index signature parameters on both type and encoded sides, and preserve key parameter semantics in codec transformations.
4.0.0-beta.84
Patch Changes
-
#2420
87f52baThanks @tim-smart! - AddEffect.transposeOptionfor converting anOption<Effect<A, E, R>>into anEffect<Option<A>, E, R>. -
#2374
b8ee07fThanks @gcanti! - Import unconstrained JSON Schema nodes asSchema.Jsoninstead ofSchema.Unknown. -
#2407
867c0d7Thanks @gcanti! - Normalize error behavior for Schema and SchemaParser boundary APIs.SchemaErrornow extendsData.TaggedError, so it is also a nativeError. SchemaParser Promise APIs now reject anErrorwhose cause is theSchemaIssue.Issuefor schema failures.Schema and SchemaParser
EffectandExitadapters now preserve full causes while mapping schema issue failures to their public error type. Theis,asserts,Promise,Sync,Result,Option,make, andmakeOptionadapters now distinguish schema issues from non-schema causes. Schema-only failures are converted to the adapter’s normal representation (false, rejected or thrown schema error,Result.fail, orNone), while non-schema causes throw or reject with anErrorwhose cause is the underlyingCause. -
#2409
b93bc6cThanks @tim-smart! - Fix Stream.runForEachWhile so it continues across chunk boundaries while the predicate returns true and stops when the predicate returns false. -
#2424
57d387fThanks @tim-smart! - Fix cluster workflow activity defect hydration -
#2403
bacca41Thanks @lloydrichards! - align ProcessInput.Input runtime field name with type definition on Prompt.custom -
#2423
0f8ac79Thanks @tim-smart! - RpcGroup.toHandlers is definition first -
#2383
25b4482Thanks @gcanti! - Fix config path composition and directory-backed lookup behavior.ConfigProvider.orElsenow keeps each side’s ownnestedandmapInputbehavior. ApplyingnestedormapInputto a combined provider now applies the same transformation to both sides.ConfigProviderpath transformations now compose as a single path function. This makesnestedandmapInputbehave consistently with normal function composition.Config.nestednow tracks the logical config path inConfigitself instead of wrapping the provider. This keeps lookup paths and schema error paths aligned. The low-levelConfig.makeconstructor is no longer exported; use config constructors and combinators, or implement custom lookup behavior withConfigProvider.make.ConfigProvider.fromDirnow returnsundefinedwhen neither a file nor a directory exists at the requested path, soorElsecan fall back instead of failing withSourceError. -
#2415
9cf3a25Thanks @gcanti! - FixEffect.trythunk usage andEffect.tryPromisemapper and signal handling defects.Effect.trynow supports passing a thunk directly, matchingEffect.tryPromise. Thrown values from direct-thunk usage are mapped toCause.UnknownError.When a promise handled by
Effect.tryPromiserejected and the customcatchmapper threw while mapping that rejection, the effect could remain pending and produce an unhandled rejection. The mapper is now guarded consistently with the synchronous throw path, so a thrown mapper error becomes an Effect defect. The JSDoc forEffect.tryandEffect.tryPromisewas also corrected.Effect.tryPromisenow also only creates anAbortControllerwhen the wrapped thunk declares anAbortSignalparameter. -
#2417
8def767Thanks @tim-smart! - deduplicate SqlResolver.findById requests
4.0.0-beta.83
Patch Changes
- #2394
1f2e8ceThanks @IMax153! - Fix published HttpApi declaration files by exporting schema metadata types referenced by public declarations.
4.0.0-beta.82
Patch Changes
- #2391
193690bThanks @IMax153! - Fix HttpApiEndpoint endpoint error inference when success schemas include streams.
4.0.0-beta.81
Patch Changes
-
#2387
93cb4f8Thanks @gcanti! -Config.withDefaultnow only recovers from missing data for literal/union schemas. Invalid present values now propagate validation errors instead of using the default, closes #2384. -
#2388
60341d9Thanks @gcanti! -Config.withDefaultno longer recovers from schema filter failures. A filter failure means a present value reached refinement checks, so using the default could hide invalid configuration values. -
#2389
1105ab5Thanks @gcanti! - FixSchema.toTaggedUnion(...).isAnyOfnarrowing for custom discriminant keys, closes #2386.Previously, the type predicate always extracted union members by
_tag, even whentoTaggedUnionwas created with a different discriminant key. Runtime behavior already used the supplied key, so this aligns the type-level narrowing with the existing runtime behavior. -
#2270
4500fbfThanks @IMax153! - Add HTTP API streaming response support
4.0.0-beta.80
Patch Changes
-
#2205
d944330Thanks @lloydrichards! - add support for merging external events intoPrompt.customrender loops via an optionaleventsdequeue andreceivehandler.The prompt races user input against events from the dequeue, allowing background events to trigger re-renders without waiting for a keypress:
const eventQueue = yield * Queue.make<number>();const prompt = Prompt.custom({ count: 0 },Queue.asDequeue(eventQueue), // <-- provide the event queue as a dequeue to the prompt{render: (state) => Effect.succeed(`Count: ${state.count}`),process: (input, state) =>Effect.succeed(Match.value(input).pipe(// handle user inputMatch.tag("Input", () => Action.Submit({ value: state.count })),// handle external events from the queueMatch.tag("Event", (input) =>Action.NextFrame({ state: { count: state.count + input.value } }),),Match.exhaustive,),),clear: () => Effect.succeed(""),},); -
#2369
f48659fThanks @gcanti! - Round fractional durations symmetrically when normalizing to nanoseconds. -
#2373
7652aaaThanks @StarpTech! - Stream.fromReadableStream: swallow thereader.cancel()rejection in the finalizer. Cancelling the reader of an already-errored ReadableStream rejects with the stored error, which turned the typedonErrorfailure into a defect. -
#2371
98630b7Thanks @gcanti! - EmitSchema.ObjectKeywordas an object-or-array JSON Schema union. -
#2376
90ae23cThanks @fubhy! - AddGraph.successorsandGraph.predecessors, deprecateGraph.neighborsDirected, and fix graph algorithm edge cases around reversal, undirected edge queries, shortest-path weight validation, topological sort initials, and strongly connected components.
4.0.0-beta.79
Patch Changes
-
#2364
b9704dcThanks @mikearnaldi! - Fix module-level side effects that defeated bundler tree-shaking.Bare top-level statements cannot be
#__PURE__-annotated by the build, so bundlers must retain them and everything they reference, even in bundles that never use the code:Option: the standaloneObject.defineProperty(SomeProto, "valueOrUndefined", ...)statement anchored the wholeOptionproto chain into every bundle. It is now folded into theSomeProtoinitializer.Headers: same pattern withObject.defineProperties(Proto, ...), folded into the initializer.Logger: module-levelprocess.stdout.isTTYproperty reads (potential getters, never droppable) moved insideconsolePretty.Utils: wheninternalCallwas unused, its dropped binding left behind a retained initializer tail (standard/forcedprobe with computed property reads). The selection is now wrapped in a single pure-annotated call.
A minimal
Effect.succeed(123).pipe(Effect.runFork)bundle shrinks by ~1.3% gzipped; bundles that don’t useOptionorHeadersno longer pay for them. -
#2339
a207113Thanks @tim-smart! - Fix EntityManager defect restarts so in-flight requests are replayed instead of being dropped when the old entity scope is interrupted. -
#2362
5e9b9e2Thanks @fubhy! - Fix Graph traversal and shortest-path algorithms to traverse undirected edges independently of their stored source/target orientation. -
#2366
7c128aeThanks @IMax153! - Fix string seed encoding in Random.withSeed so short, trailing, and astral UTF-8 bytes affect deterministic streams. -
#2352
0ada457Thanks @alvarosevilla95! - Fix the RedisRateLimiterStoretoken-bucket failing with opaque errors under memory pressure: it now writes its keys with a TTL and guards against a missing refill timestamp. -
#2359
d7cc5a2Thanks @gcanti! - FixStructkey renaming andSchema.encodeKeysto support symbol keys, and reject duplicate encoded keys. -
#2365
aad63beThanks @gcanti! - FixSchemaencoding so container-level checks are validated against the decoded value instead of the encoded output.Disallow adding checks directly to
Schema.suspend(...); add the checks to the suspended schema instead.Fix
StructWithRestso index signatures do not re-parse or overwrite fixed properties. -
#2342
09809f6Thanks @gcanti! - Use generic ordered constraints for schema arbitrary derivation.Range checks such as
isGreaterThan,isLessThan, andisBetweennow populatectx.constraints.orderedinstead of type-specific range fields onnumber,date, orbigintconstraints. CustomtoArbitraryannotations that read range constraints should migrate toctx.constraints.ordered.This also fixes BigDecimal arbitrary generation by adapting decimal bounds to the generated scale, avoiding invalid fast-check bigint ranges for narrow decimal intervals.
-
#2368
2fddda5Thanks @IMax153! - Encode HTTP API client path parameters when building request URLs. -
#2348
5f21768Thanks @gcanti! - Update Schema arbitrary derivation to use the new filter metadata, candidate generation, optional derivation reports, recursion-aware generation, and the renamedOrderedConstraint<T>model.Migration from the previous v4 API:
- Replace filter annotations from
toArbitraryConstraint: constrainttoarbitrary: { constraint }. When a filter cannot be described as a constraint, usearbitrary: { candidate }to add a weighted source that is still checked by the filter. - Replace bucketed constraints with the flat
Schema.Annotations.ToArbitrary.Constraintshape:string.minLength,array.minLength, object property counts, collection sizes ->minLengthstring.maxLength,array.maxLength, object property counts, collection sizes ->maxLengthstring.patterns->patternsnumber.isInteger->integernumber.noNaN->noNaNnumber.noDefaultInfinity->noInfinitydate.noInvalidDate->validarray.comparatorfor uniqueness ->uniqueusing Effect equalityordered.min/minExcluded/max/maxExcluded->ordered.minimum/exclusiveMinimum/maximum/exclusiveMaximum
- In arbitrary hooks, read
context.constraintinstead ofcontext.constraints. Replacecontext.isSuspendwithcontext.recursion; when combining finite and recursive branches, passcontext.recursiontofc.oneofwith the finite branch first. - Generic declaration hooks now receive type parameters as
{ arbitrary, terminal }. Atomic declarations may still return a bareFastCheck.Arbitrary<T>, but generic declarations should return{ arbitrary, terminal }when they can preserve a finite terminal branch. Schema.toArbitrary(schema, { report: true })now returns{ value, report }; without{ report: true }, it keeps returning the arbitrary directly.Schema.toArbitraryLazyalways returns a lazy arbitrary.
- Replace filter annotations from
-
#2343
f27003eThanks @MohanedMashaly! - Add meta-var that shows log level and bash options in command line.
4.0.0-beta.78
Patch Changes
-
#2333
7836b8eThanks @tim-smart! - Fix Schema.Defect JSON encoding for Error values whose message property is not a string. -
#2329
35d49a3Thanks @alvarosevilla95! - Retry Redis scripts afterNOSCRIPTand declare the token bucket refill key
4.0.0-beta.77
Patch Changes
-
#2326
6e9a5caThanks @fubhy! - Prefer OTEL resource environment variables over explicitOtlpResource.fromConfigoptions. -
#2325
302f398Thanks @fubhy! - Add OTEL environment variable configuration for unstable OTLP observability.
4.0.0-beta.76
Patch Changes
-
#2320
016108aThanks @gcanti! - AddSchema.isGUIDand updateSchema.isUUIDto accept the RFC 9562 max UUID. -
#2319
95c03d2Thanks @fubhy! - Add support for configuring Scalar API reference pages with a custom fetch implementation. -
#2318
07299a3Thanks @gcanti! - Replace theSchema.ErrorandSchema.Defectschema constants with constructor functions,Schema.Error()andSchema.Defect().Unify
Schema.ErrorWithStackintoSchema.Error({ includeStack: true })andSchema.DefectWithStackintoSchema.Defect({ includeStack: true }).Error causes are encoded by default using the same JSON defect encoding semantics used by
Schema.Defect; pass{ excludeCause: true }to omit nested cause data.Equivalent
Schema.ErrorandSchema.Defectoptions are canonicalized, so repeated constructor calls with the same option values reuse the same schema.Schema.Defect()now models defects asunknownvalues with a JSON encoded form. Error-shaped JSON objects with a stringmessagedecode to JavaScriptErrorvalues, so non-Errorobjects such as{ message: "boom" }do not round-trip unchanged. Other non-Errorvalues are normalized through JSON serialization, with non-JSON values falling back to Effect’s formatted string representation.
4.0.0-beta.75
Patch Changes
-
#2294
81b187cThanks @mattiamanzati! - Align workflow tags with RPCs by changingWorkflow.maketo accept the tag as its first argument, exposing workflow tags as_tag, and supportingclass MyWorkflow extends Workflow.make(...) {}. -
#2312
ad4b535Thanks @gcanti! - ValidateSchema.StructWithRestfixed fields against rest index signatures at the type level so schemas cannot be constructed with incompatible decoded, encoded, or make shapes. This keepsStructWithResttypes sound and updates the generated OpenAI conversation-items request schema to keep accepting arbitrary additional fields under the stricter validation. -
#2314
a29c2e7Thanks @gcanti! - PreserveSchema.Redactedoptions when roundtripping through schema representations. This keepslabelvalidation anddisallowJsonEncodebehavior intact when schemas are revived from a representation or emitted through code generation. -
#2298
1fdd9aeThanks @gcanti! - Remove theTypes.MergeRecordalias. UseTypes.MergeLeftinstead. -
#2298
1fdd9aeThanks @gcanti! - Align Schema adapter failures:Schemaresult, promise, and sync adapters now surfaceSchemaError, whileSchemaParserresult, promise, and sync adapters exposeSchemaIssue.Issue. MarkSchemaParseroption adapters as internal because their error details are discarded. -
#2313
ffea4ecThanks @MohanedMashaly! - Add -v alias for version flag -
#2306
4255c9bThanks @sam-goodwin! - FixHttpApiSecuritybearer/http credential decoding
4.0.0-beta.74
Patch Changes
- #2295
b1fc6a4Thanks @jgoux! - Fix CLI parsing so command-local flags can override globals without breaking global flags before subcommands.
4.0.0-beta.73
Patch Changes
-
#2291
361ca30Thanks @tim-smart! - Add HttpApiSecurity.http for passing custom schemes -
#2289
b9598c6Thanks @tim-smart! - make EntityResource lazy by default
4.0.0-beta.72
Patch Changes
-
#2287
73e67d1Thanks @tim-smart! - Ensure ClusterWorkflowEngine routes durable clock wakeups and registered workflow deferred completions through the owning workflow’s shard group. -
#2286
01d71ecThanks @tim-smart! - Add default value support toPrompt.file. -
#2285
fcd707eThanks @tim-smart! - Add default value support to CLI integer prompts.
4.0.0-beta.71
Patch Changes
-
#2252
d8ac76bThanks @tim-smart! - AddedSchedule.tap, which allows observing full schedule metadata without altering schedule inputs or outputs. -
#2261
2c3c00aThanks @gcanti! - Add JSON Schema custom annotation passthrough option, closes #2260 -
#2269
3751e7cThanks @gcanti! - Schema: reintroduce.valueonSchema.ArrayandSchema.NonEmptyArrayfor consistency with other collection wrappers (Chunk,HashSet, etc.), closes #2268. -
#2272
fc5f25bThanks @gcanti! - Clarify thatData.$is(tag)only checks the_tagfield, not the full structure, closes #2271. -
#2257
7ccced4Thanks @bwbuchanan! - Fixed thecatch*combinators silently dropping unhandled error types -
#2263
a2e1fe5Thanks @patroza! - UseWeakMapforpendingBatchesinstead ofMap, to allow GC to collect resolvers -
#2266
4a4a36bThanks @gcanti! - Fix schema arbitrary constraints for exclusive BigInt, Date, and integer number bounds. -
#2249
d350292Thanks @tim-smart! - allow encoding Redacted by default, and add option to disallow encoding -
#2276
730afb6Thanks @tim-smart! - Fix AtomRef notifications when a listener re-subscribes itself during notification. -
#2250
df1b008Thanks @tim-smart! - FixArgument.variadic(argument)so it supports direct calls without options. -
#2277
6d469d5Thanks @tim-smart! - Fix string messages and annotations being double-quoted by simple and logfmt loggers.
4.0.0-beta.70
Patch Changes
-
#2228
af7782dThanks @avallete! - AddCommand.withHiddento hide subcommands from--helpoutput, shell completions, and “did you mean?” suggestions, while keeping them fully invocable by exact name.Useful for experimental or internal subcommands that should be accepted but not advertised on the public CLI surface.
import { Command } from "effect/unstable/cli";const experimental = Command.make("experimental").pipe(Command.withHidden);const root = Command.make("mycli").pipe(Command.withSubcommands([experimental]),); -
#2244
7212d70Thanks @tim-smart! - Fix TestClock adjustment when its layer is provided to programs run without an ambient Scope.
4.0.0-beta.69
Patch Changes
-
#2227
70ea04aThanks @avallete! - AddFlag.withHidden(andParam.withHidden) to hide flags from--helpoutput and shell completions while keeping them fully parseable on the command line.Useful for experimental, internal, or deprecated flags that should be accepted but not advertised, e.g.
--experimental-foo, debug toggles, or escape hatches that are not yet committed to the public CLI surface.import { Flag } from "effect/unstable/cli";const experimental = Flag.boolean("experimental-foo").pipe(Flag.withHidden); -
#2240
d0ea8b0Thanks @tim-smart! - pass workflow parent on discard -
#2237
a57674bThanks @notkadez! - FixStream.scopedandChannel.scopedso pull effects run with the scoped resource scope. -
#2239
59aa334Thanks @tim-smart! - fix RpcWorker Protocol service key -
#2242
8f4208eThanks @tim-smart! - Accept.mjsand.mtsmigration files in SQL migrator loaders.
4.0.0-beta.68
Patch Changes
-
#2210
af8267fThanks @tim-smart! - Add Stream.broadcastN for fixed-size stream broadcasts. -
#2180
0176eafThanks @IMax153! - Add a platform-agnosticCryptoservice for cryptographic random bytes, secure random generators, UUIDv4 / UUIDv7 generation, and digest operations. UUID generation should now use theCryptoservice’srandomUUIDv4orrandomUUIDv7, which format bytes from the platformCryptoservice; UUIDv7 also uses theClockservice timestamp.Random.nextUUIDv4has been removed because the baseRandomservice is not cryptographically secure. -
#2221
f136bb7Thanks @gcanti! - ChangeSchema.assertsandSchemaParser.assertsto assert a value directly withasserts(schema, input)and removeSchema.Codec.ToAsserts. -
#2209
6f38f07Thanks @tim-smart! - Fix Channel.decodeText corrupting UTF-8 characters split across chunk boundaries. -
#2207
aec9c40Thanks @tim-smart! - rename Model.Generated to Model.GeneratedByDb
4.0.0-beta.67
Patch Changes
-
#2111
35594f8Thanks @thiagofelix! - FixEntityProxyServer.layerHttpApiusingpath.entityIdinstead ofparams.entityId -
#2201
8bddd62Thanks @sjh9714! - FixMutableList.filterandMutableList.removelength updates. -
#2181
4be4c8dThanks @zeyuri! - Fix workflow proxy RPC handlers to provide the context expected by RpcServer. -
#2177
0c9d3abThanks @mikearnaldi! - Add forked memo maps so nested layer scopes can reuse parent allocations without leaking sibling-local layers. Update@effect/vitestto fork memo maps for nestedit.layersuites, isolating sibling setup while preserving parent sharing. -
#2206
b156accThanks @tim-smart! - addavailableShardGroupsto ShardingConfig, to ensure advisory locks do not conflict -
#2184
d16c034Thanks @gcanti! - Restore support for passing schema parse options when creating decode and encode helpers, closes #2174. -
#2176
b559d68Thanks @patroza! - Allow Schema decoding defaults to require Effect services.The
Effectpassed toSchema.withDecodingDefault,Schema.withDecodingDefaultKey,Schema.withDecodingDefaultType, andSchema.withDecodingDefaultTypeKeynow accepts a contextRin its third type parameter. The required services are propagated into the resulting schema’sDecodingServices.SchemaGetter.withDefaultis widened in the same way. -
#2113
a3de5d9Thanks @patroza! - Allow Schema constructor and decoding defaults to fail withSchemaError.The
Effectpassed toSchema.withConstructorDefault,Schema.withDecodingDefault,Schema.withDecodingDefaultKey,Schema.withDecodingDefaultType, andSchema.withDecodingDefaultTypeKeynow acceptsSchemaErrorin its error channel. When a default fails, the parser unwraps the underlyingSchemaIssue.Issueand propagates it as a parse failure with the surrounding path attached. This makes it easy to use another schema’smakeEffect/decode*as the default value. -
#2172
7e6c12eThanks @gcanti! - RenameSchemaParser.makeUnsafetoSchemaParser.make.
4.0.0-beta.66
Patch Changes
-
#2161
cd7d1fbThanks @wking-io! - Fix request ID tracking in the RPC server HTTP protocol finalizer. -
#2158
19a7033Thanks @ColaFanta! - ChangeType_<>implementation, from usingExclude<F, O | M>type util tokeyof F as xx, this implementation keeps IDE provenance link. This enables clicking “Go to definition (F12)” in VSCode on an object made from Schema Struct jumps to the correct Struct field definition. -
#2153
33d26b4Thanks @Gabrola! - AllowHttpApiTest.groupsto accept an optionalbaseUrloverride while preserving the existing default of"http://localhost:3000". -
#2160
856766bThanks @tim-smart! - Remove the auto-incrementing suffix from HTTP server logger log span names. -
#2164
079c7dfThanks @tim-smart! - Add the unstable workflow DurableQueue module.
4.0.0-beta.65
Patch Changes
-
#2148
6f11454Thanks @tim-smart! - AddUniqueViolationas a new SQL error reason. Supported unique constraint violations now classify asUniqueViolationinstead of the broaderConstraintErrorreason.This covers PostgreSQL, PGlite, MySQL, MSSQL, and the shared SQLite classification used by the SQLite-family clients.
UniqueViolation.constraintcontains the best available constraint, index, or key identifier and falls back to exactly"unknown"when no reliable identifier is available.
4.0.0-beta.64
Patch Changes
- #2137
7d4877aThanks @tim-smart! - Add optional soft delete column support to SqlModel repositories and resolvers.
4.0.0-beta.63
Patch Changes
4.0.0-beta.62
Patch Changes
- #2131
4ab4b90Thanks @tim-smart! - Allow Kubernetes pod conditionlastTransitionTimevalues to be null in K8sHttpClient schemas.
4.0.0-beta.61
Patch Changes
-
#2130
50790afThanks @tim-smart! - Record fiber runtime start metrics when fibers are constructed so yielded fibers are only counted once. -
#2120
71f7c3dThanks @tim-smart! - PortEffect.firstSuccessOffrom Effect v3. -
#2122
aae8797Thanks @tim-smart! - fix empty body decoding in HttpApiBuilder
4.0.0-beta.60
Patch Changes
-
#2119
7909c95Thanks @gcanti! - RemoveInspectable.stringifyCircularand fixFormatter.formatJsonso shared object references are preserved while only circular references are omitted. -
bbb4dccThanks @tim-smart! - allow using Duration.Input with accessors -
#2117
7af2207Thanks @gcanti! - AddSchema.DurationFromStringandSchemaTransformation.durationFromString, support"Infinity"and"-Infinity"inDuration.fromInput, and simplify config duration parsing around the shared schema codec, closes #2092. -
#2116
848b40aThanks @gcanti! - Add aConfig.literalsconvenience constructor forSchema.Literals, closes #2091.
4.0.0-beta.59
Patch Changes
- #2106
56837eaThanks @IMax153! - Fix entity proxy RPC handlers to provide the context expected by RpcServer.
4.0.0-beta.58
Patch Changes
-
#2097
11993d4Thanks @Leka74! - Add an exhaustive finalizer to the AsyncResult builder. -
#2098
96c8b22Thanks @tim-smart! - generate binary arrays from streams with less copying -
#2098
96c8b22Thanks @tim-smart! - improve http body consumption
4.0.0-beta.57
Patch Changes
4.0.0-beta.56
4.0.0-beta.55
Patch Changes
-
#2081
42cc744Thanks @gcanti! - Export theSchema.encodeKeysinterface, closes #2070.Previously the interface was internal, so exporting a value whose inferred type referenced it triggered TypeScript error
TS4023: Exported variable has or is using name 'encodeKeys' from external module ... but cannot be named, e.g.: -
#2067
04855ceThanks @mrazauskas! - fixisNullish()type predicate
4.0.0-beta.54
Patch Changes
-
#2075
4c72808Thanks @tim-smart! - ensure workflow failures are not squashed by suspension interrupts
4.0.0-beta.53
Patch Changes
-
#2068
0768509Thanks @tim-smart! - FixAtomHttpApiquery and mutation error inference to include endpoint middleware and client middleware errors, matchingHttpApiClientbehavior (including response-only mutation mode). -
#2062
476aedeThanks @aldotestino! - FixHttpIncomingMessage.schemaBodyJsonto forward parse options via theparseOptionsannotation key. -
#2069
4be6a7cThanks @mikearnaldi! - FixTestClock.currentTimeNanosUnsafe()to floor fractional millisecond instants before converting them toBigInt.
4.0.0-beta.52
Patch Changes
-
#2057
8e04bfcThanks @tim-smart! - add HttpApiSchemaError for determining where a schema error originates from -
#2055
cf3a311Thanks @tim-smart! - ensure tagged enum _tag is correctly set -
#2057
8e04bfcThanks @tim-smart! - make HttpApi schema errors defects unless transformed -
#2058
131fdd5Thanks @tim-smart! - mcp http request with no session header is 404 response
4.0.0-beta.51
Patch Changes
-
#2049
778d2afThanks @bohdanbirdie! - AddRpcSerialization.makeMsgPackfor creating MessagePack serialization with custom msgpackr options. On Cloudflare Workers withallow_eval_during_startup(default forcompatibility_date >= 2025-06-01), pass{ useRecords: false }to prevent msgpackr’s JIT code generation vianew Function(), which is blocked during request handling. Also fixes silent error swallowing in themsgPackdecode path — non-incomplete errors are now rethrown instead of returning[]. -
#2010
4e24dcfThanks @tim-smart! - process schema properties / elements concurrently -
#2052
4b1c015Thanks @gcanti! - Schema: expandFilterOutputand addFilterIssuefor richer filter failures.The return type of a
Schema.makeFilterpredicate now supports two additional shapes:{ path, issue }whereissueisstring | SchemaIssue.Issue(previously only{ path, message: string }was accepted). Theissuearm lets you attach a fully-formedIssueat a nested path without manually constructing aPointer.ReadonlyArray<Schema.FilterIssue>to report several failures at once. An empty array is success, a single-element array is equivalent to returning that element, and multi-entry arrays are grouped into anIssue.Composite. This removes the need to importSchemaIssueand hand-build aCompositefor multi-field validators.
The single-failure shapes (
undefined,true,false,string,SchemaIssue.Issue) are unchanged.Breaking: the object shape renamed from
{ path, message }to{ path, issue }. Call sites that used the old shape must rename the field; the migration is mechanical.// beforeSchema.makeFilter((o) => ({ path: ["a"], message: "bad" }));// afterSchema.makeFilter((o) => ({ path: ["a"], issue: "bad" }));Also renamed
{ path, message }to{ path, issue }in the accepted return type ofSchemaGetter.checkEffect. -
#2047
454f8adThanks @gcanti! - FixSchemaAST.isJsonrejecting DAGs as cycles, closes #2021.The previous implementation marked every visited object in a single
seenset and never removed it, so any value that referenced the same object through two different paths (a DAG, e.g.{ x: shared, y: shared }) was treated as a cycle and returnedfalse. Cycle detection now tracks only the current recursion path (popping on exit) and memoizes fully validated subtrees, so DAGs are accepted while true cycles are still rejected. -
#2051
6754a0cThanks @tim-smart! - disable sql traces for EventLog, RunnerStorage -
#2053
90f7fd5Thanks @tim-smart! - remove use of bigint literals -
#2046
d7e1519Thanks @gcanti! - Remove theoptionsparameter fromOpenApi.fromApi.The parameter only carried
additionalProperties, but the function caches results in aWeakMapkeyed solely on theapiinstance. Passing different options across calls for the same api was silently ignored, making the parameter order-dependent and effectively single-shot. No call sites were using it, so the signature is now simplyfromApi(api). -
#2044
72a8122Thanks @tim-smart! - ensure envelope payloads are correctly encoded for notify path
4.0.0-beta.50
Patch Changes
-
#2038
07be594Thanks @tim-smart! - add support for deferred responses in rpc -
#2040
ae02433Thanks @tim-smart! - require a option to make AtomRpc.query atoms serializatable
4.0.0-beta.49
Patch Changes
-
#2035
7d87873Thanks @tim-smart! - Add support for common HTTP status string literals inHttpApiSchema.status(for example,HttpApiSchema.status("Created")resolves to status code201). -
#2034
216f13cThanks @IMax153! - Fix issue with exported CLICompletionstypes
4.0.0-beta.48
Patch Changes
-
#2029
a5e6f77Thanks @tim-smart! - omit scope from HttpApi handlers -
#2023
f1ba5b8Thanks @tim-smart! - EventLog Identity string encodes to base 64 -
#2023
f1ba5b8Thanks @tim-smart! - disable tracer propagation for otlp exporter
4.0.0-beta.47
Patch Changes
-
#2017
c584726Thanks @gcanti! - Schema: addannotateEncodedfunction for annotating the encoded side of a schema. -
#2013
86a91a4Thanks @gcanti! - Schema: add withDecodingDefaultTypeKey / withDecodingDefaultType, closes #2012 -
#2018
131caf9Thanks @gcanti! - Schema: allowClassconstructors to acceptvoidwhen all fields are optional, closes #2015. -
#2016
c3615c8Thanks @gcanti! - Schema: rename"~rebuild.out"to"Rebuild"
4.0.0-beta.46
Patch Changes
4.0.0-beta.45
Patch Changes
4.0.0-beta.44
Patch Changes
-
#1943
e3f0621Thanks @gcanti! - AddDateFromString,BigIntFromString,BigDecimalFromString,TimeZoneNamedFromString,TimeZoneFromString, andDateTimeZonedFromStringschemas, closes #1941. -
#1996
5b476abThanks @gcanti! - Schema: addStringFromBase64,StringFromBase64Url,StringFromHex, andStringFromUriComponentschemas for decoding encoded strings into UTF-8 strings, closes #1995. -
#1952
6b40e5aThanks @tim-smart! - Effect.repeat now uses effect return value when using options -
#1961
7bb5dceThanks @IMax153! - Rename Atom’sContexttype toAtomContext -
#1975
3b09fb3Thanks @tim-smart! - catch defects when building Entity handlers -
#2000
2370410Thanks @tim-smart! - fix cache constructor inference by moving the lookup option -
#1928
dabc272Thanks @tim-smart! - Addschema.makeEffect(input, options?)toSchema.Bottomand schema-backed classes, matching the existing constructor behavior exposed bymakeUnsafe/makeOptionwhile returning anEffectfailure withSchema.SchemaError. -
#1949
08b63c3Thanks @tim-smart! - Update the unstable HTTP middleware logger to annotate only the request path inhttp.urlinstead of including the full URL (query / fragment), and add a regression test. -
#1962
dfff04cThanks @tim-smart! - AddKeyValueStore.layerSqlto back key-value storage with a SQL database viaSqlClient. -
#1963
9baed9eThanks @tim-smart! - FixUnify.unifyso Layer unions merge correctly, and add type tests covering Layer unification. -
#2004
7846792Thanks @tim-smart! - FixStream.toQueuetypes and implementation to return aQueue.Dequeuein both overloads and delegate toChannel.toQueueArray. -
#1974
1556a24Thanks @juliusmarminge! - Fix unstable CLI boolean flags soFlag.optional(Flag.boolean(...))returnsOption.none()when omitted, and support canonical--no-<flag>negation for boolean flags. -
#1929
b5ea591Thanks @gcanti! - Simplify and align the default-value APIs.Schema.withConstructorDefaultnow accepts anEffect<T>instead of(o: Option<undefined>) => Option<T> | Effect<Option<T>>.Schema.withDecodingDefault/Schema.withDecodingDefaultKeynow accept anEffect<T>instead of() => T, enabling effectful defaults.SchemaGetter.withDefaultfollows the same change, acceptingEffect<T>instead of() => T. -
#1966
0853afaThanks @gcanti! - Reuse existing references when duplicate identifiers have the same representation, closes #1927. -
#1942
ac845f3Thanks @gcanti! - FixErrorClassandTaggedErrorClasstoStringto match nativeErroroutput format (e.g.E: my messageinstead ofE({"message":"my message"})), closes #1940.Also fix prototype properties (e.g.
name) being lost after.extend(). -
#1956
b80c462Thanks @gcanti! - AddSchema.resolveAnnotationsKeyAPI to retrieve the context (key-level) annotations from a schema, closes #1947.Also rename
Schema.resolveIntotoSchema.resolveAnnotations. -
#2005
b3f535dThanks @gcanti! - FixStream.splitLinesto correctly handle standalone\ras a line terminator and flush the final unterminated line when the stream ends, closes #2002. -
#1936
6fe2e93Thanks @IMax153! - FixStream.groupedWithindropping partial batches when the upstream ends or goes idle. -
#1965
8335477Thanks @tim-smart! - return resolvers directly from SqlModel.makeResolvers -
#1960
8c836f9Thanks @IMax153! - AddChildProcessHandle.unref, returning anEffectthat restores the child process reference when run. -
#1984
718ff6fThanks @jannabiforever! - MakeEffect.retrywithtimesargument to propagate the original error. -
#1930
7eed84fThanks @mikearnaldi! - AddStream.serviceandStream.serviceOptionfor accessing services as single-element streams. -
#1935
5df46feThanks @gcanti! - Schema: addasClassAPI to turn any schema into a class with static method support.Example
import { Schema } from "effect";class MyString extends Schema.asClass(Schema.String) {static readonly decodeUnknownSync = Schema.decodeUnknownSync(this);}MyString.decodeUnknownSync("a"); // "a" -
#1958
82dd0f2Thanks @gcanti! - Schema: addMissingSelfGenericcompile-time error forClass,TaggedClass,ErrorClass, andTaggedErrorClasswhen theSelftype parameter is omitted. -
#1957
03ae41eThanks @gcanti! - Schema: remove"~annotate.in"type fromBottominterface, inlining it where needed -
#1951
4677a0aThanks @gcanti! - RenameSchema.makeUnsafeinstance method back toSchema.makeon all schemas and schema-backed classes.Also remove the
static readonly makeoverride fromShardIdto avoid conflicting with the inherited schemamakemethod. The module-levelShardId.make(group, id)function is still available. -
#1999
87e1fc8Thanks @tim-smart! - use NoInfer in Layer constructors to prevent type erasure -
#1971
c1af1b7Thanks @joepjoosten! - Allow unstable CLI fallback prompts to be created dynamically from anEffect. -
#1961
7bb5dceThanks @IMax153! - Rename theServiceMapmodule toContextacross exports, docs, and tests. -
#1973
c8a877bThanks @joepjoosten! - Underline the active label in CLI multi-select prompts and add a scratchpad example for manual verification.
4.0.0-beta.43
Patch Changes
-
#1904
2ae33d0Thanks @juliusmarminge! - Fix JSON-RPC serialization foridvalues that are falsey but valid, including0and"", while still mappingnullto Effect’s internal notification sentinel. -
#1900
979811aThanks @tim-smart! - Fix AI structured output schema generation forSchema.ClassandSchema.ErrorClassby resolving top-level$refentries before passing JSON Schema to providers and default codec transformers. -
#1908
eb7dbefThanks @tim-smart! - Fix stream requests in Entity.toLayerQueue -
#1907
cf50eb4Thanks @tim-smart! - add WorkflowEngine interruptUnsafe -
#1903
1d046feThanks @kitlangton! - AddLayer.suspendas a lazy constructor for dynamically choosing a layer while preserving normal layer sharing.
4.0.0-beta.42
Patch Changes
-
#1897
924e216Thanks @IMax153! - Append concrete choice values to CLI flag help descriptions so generated help shows valid command-line inputs. -
#1894
80e7f0cThanks @tim-smart! - FixMutableList.appendAll/appendAllUnsafeso empty arrays are treated as a no-op instead of leaving behind an empty internal bucket. -
#1895
f8328bfThanks @tim-smart! - Changed socket close handling so all close codes are treated as errors by default unlesscloseCodeIsErroris overridden. -
#1899
66d1c06Thanks @gcanti! - SchemaRepresentation: supportanyOf/oneOfwith sibling keywords infromJsonSchemaMultiDocument -
#1893
bee800bThanks @gcanti! -Number.remainder: fix incorrect results for small floats in scientific notation (e.g.1e-7). -
#1898
8930441Thanks @mikearnaldi! - RenameEffect.transactiontoEffect.txandEffect.retryTransactiontoEffect.txRetry, removeEffect.transactionWith/Effect.withTxState, make nestedEffect.txcalls compose into the active transaction, and make the publicTx*APIs establish atomic transactions without requiringTransactionin common usage.
4.0.0-beta.41
Patch Changes
-
#1881
36f5c21Thanks @gcanti! - AddedBigDecimal.sumAllandBigDecimal.multiplyAllfor feature parity withNumberandBigInt, closes #1880. -
#1869
d8ce758Thanks @gcanti! - Schema: collapse same-type literal branches in JSON Schema output into a singleenumarray, closes #1868.Before:
{"anyOf": [{ "type": "string", "enum": ["A"] },{ "type": "string", "enum": ["B"] }]}After:
{"type": "string","enum": ["A", "B"]} -
#1879
11aab4cThanks @tim-smart! - Highlight active option labels inPrompt.selectandPrompt.multiSelectusing cyan text so selection state is visible beyond the pointer / checkbox icon. -
#1884
3bc1efbThanks @tim-smart! - Fail RpcClient HTTP requests when the server response contains no RPC messages instead of leaving requests pending. -
#1875
70e724eThanks @IMax153! - Fix AI text method toolkit typing to support generic handler toolkits, preserve toolkit union inference, and keep response part narrowing by tool name. -
#1876
738dee7Thanks @tim-smart! - Track ManagedRuntime fibers in a scope -
#1886
2111963Thanks @tim-smart! - add ClusterSchema.WithTransaction annotation -
#1877
198a553Thanks @tim-smart! - allow Context.Key to be covariant
4.0.0-beta.40
Patch Changes
4.0.0-beta.39
Patch Changes
-
#1844
f91fd3dThanks @tim-smart! - RelaxHttpApiClient.urlBuilderto acceptHttpApi.Anyinstead of requiringHttpApi.AnyWithProps. This allows use in helpers generic overHttpApi.Anywhile preserving inferred URL builder types. -
#1851
edaae9dThanks @tim-smart! - Re-export additional core runtime references fromeffect/References, including logger and error reporter references. -
#1856
b47db0bThanks @gcanti! - FixStructutility return types (for examplepick) to preserve the previous simplified shape instead of exposing raw utility types likePick<T, K>, closes #1855. -
#1849
82d3c8eThanks @tim-smart! - Fix theQueue.takeNdocumentation example to end the queue before showing a partial batch. -
#1848
7c22b31Thanks @tim-smart! - RemoveSchedule.composein favor ofSchedule.both, and update schedule examples to useSchedule.both.
4.0.0-beta.38
Patch Changes
-
#1842
f4dbe5bThanks @gcanti! - Schema: renameMakeOptions.disableValidationtodisableChecks. Apply constructor defaults whendisableChecksis true, closes #1841. -
#1837
a71a607Thanks @kitlangton! - FixHttpApiBuildersecurity middleware caching so separate handler builds do not reuse the first provided middleware implementation. -
#1840
66a0494Thanks @tim-smart! - Rename HttpApiClient request optionwithResponsetoresponseModeand add support forresponseMode: "response-only"to return the rawHttpClientResponsewithout decoding. -
#1838
5ef7218Thanks @tim-smart! - UpdateHttpApiClient.urlBuilderto mirror client shape, and encode params/query via endpoint schemas before building URLs. -
#1700
472d260Thanks @tim-smart! - adduseCodecsoption to HttpClientEndpoint constructors
4.0.0-beta.37
Patch Changes
-
#1812
f7a0b71Thanks @tim-smart! - Consolidate the SqlError changes to the new reason-based shape across effect and the SQL drivers, classifying native failures into structured reasons with Unknown fallback where native codes are unavailable. -
#1816
1e223c3Thanks @tim-smart! - unstable/http HttpClientRequest: add toWeb and fromWeb conversions for web Request objects -
#1829
53740f4Thanks @tim-smart! - Fix sql migrator lock handling to only treat duplicate migration-row inserts as a concurrent migration lock. -
#1831
8c7cf89Thanks @tim-smart! - FixSchedule.fixedto run the next iteration immediately when the previous action takes longer than the configured interval. -
#1833
b6b81a9Thanks @tim-smart! - FixUnify.unifyso unions ofEffectvalues collapse to a single unifiedEffecttype again. -
#1825
8f4c1f9Thanks @skoshx! - Fix DevToolsClient not flushing final span events on teardown.The stream consumer was
forkScoped, causing it to be interrupted before it could drain remaining queue items. Replaced withforkChildandFiber.awaitin the finalizer so the stream drains naturally after the queue is failed. -
#1824
f2479f9Thanks @tim-smart! - Ignore unsupported Ctrl key combinations in interactive CLI prompts to avoid rendering control characters such as Ctrl+L form feed into prompt input. -
#1819
c919921Thanks @j! - HttpServerResponse: fixfromWebto preserve Content-Type header when response has a bodyPreviously, when converting a web
Responseto anHttpServerResponseviafromWeb, theContent-Typeheader was not passed toBody.stream(), causing it to default toapplication/octet-stream. This affected any code usingHttpApp.fromWebHandlerto wrap web handlers, as JSON responses would incorrectly have their Content-Type set toapplication/octet-streaminstead ofapplication/json. -
#1821
7af90c2Thanks @gcanti! - Schema: relaxassertsandisconstraints. -
#1822
f3be185Thanks @tim-smart! - improve runSync error when executing async effects
4.0.0-beta.36
Patch Changes
-
#1793
60fcbccThanks @tim-smart! - Ensure streamed tool results are emitted before the finish part so chat history includes tool outputs before stream termination. -
#1762
0a60837Thanks @kitlangton! - Allow unstable HttpApi middleware to declare multiple error schemas with arrays.Middleware errors now follow endpoint error behavior for response status resolution, client decoding, and generated API schemas.
-
#1805
49164d2Thanks @tim-smart! - FixEffect.cachedWithTTLandEffect.cachedInvalidateWithTTLto start TTL expiration when the cached value is produced instead of when computation starts. -
#1808
334b6e4Thanks @tim-smart! - BackportCron.prevwith reverse lookup tables and cron stepping logic, including DST-aware reverse traversal. -
#1789
5700695Thanks @mikearnaldi! - FixStream.scanEffecthanging and repeatedly emitting the initial state. -
#1810
f8f4456Thanks @tim-smart! - Support key-derivedidleTimeToLiveinLayerMapoptions (make,fromRecord, andLayerMap.Service) and addLayerMaptests for dynamic TTL behavior. -
#1802
969d24fThanks @kitlangton! - PubSub.publish and PubSub.publishAll now return false on shutdown instead of interrupting, matching Queue.offer semantics. -
#1796
851eda0Thanks @tim-smart! - ImprovePrompt.fileto support incremental filtering while typing, including backspace and ctrl-u handling. -
#1806
8059c1cThanks @tim-smart! - Fix a regression inPubSub.shutdownso shutting down a pubsub interrupts suspended subscribers (includingtakeAll) by ensuring subscriptions are scoped under the pubsub shutdown scope. -
#1797
6f83295Thanks @tim-smart! - Add `Ctrl-A` and `Ctrl-E` key handling for editable CLI text prompts to move the cursor to the beginning or end of the current input line. -
#1633
65f7f57Thanks @kitlangton! - Schema: adddecodeUnknownResult/decodeResultandencodeUnknownResult/encodeResulthelpers for synchronousResult-based parsing. -
#1798
e7fabd2Thanks @gcanti! - Schema: allow usingStructtype helpers directly, e.g.Schema.Struct.Type<F>instead ofSchema.Schema.Type<Schema.Struct<F>>. -
#1794
89c3e98Thanks @tim-smart! - Fix ai LanguageModel streaming finish parts so finish events are always emitted when a toolkit is provided. -
#1785
53794abThanks @KhraksMamtsov! - add missing Equivalence.Date
4.0.0-beta.35
Patch Changes
-
#1784
7daf387Thanks @gcanti! - AddConfig.Successtype utility, closes #1783. -
#1778
e1664a3Thanks @tim-smart! - AllowEffect.acquireReleaserelease finalizers to depend on the surrounding environment. -
#1777
fdaa6e0Thanks @tim-smart! - Remove an unreachable array branch indecodeJsonRpcRawto simplify JSON-RPC decode logic without changing behavior. -
#1774
19aa47eThanks @tim-smart! - Align CLI help flag and global flag descriptions to a single column even when some flag names are very long. -
#1780
c667dadThanks @tim-smart! - FixLanguageModelincremental prompt fallback to reliably retry with the full prompt when an incremental request fails withInvalidRequestError. -
#1781
764d150Thanks @gcanti! - FixDateTime.makeUnsafeincorrectly appending “Z” to date strings containing “GMT” -
#1772
3c27098Thanks @tim-smart! - make Layer.mock work with Stream and Channel
4.0.0-beta.34
Patch Changes
-
#1758
f2f75eeThanks @tim-smart! - Use a normal Map in ResponseIdTracker and clear it on divergence / reset instead of reallocating a WeakMap. -
#1764
342fc4bThanks @tim-smart! - Add unstable EmbeddingModel support across core and OpenAI providers.- Add the unstable EmbeddingModel module API surface in
effect, including service, request, response, and provider types. - Implement the unstable EmbeddingModel runtime constructor in
effect, withRequestResolverbatching,embed/embedManyspans, provider error propagation, deterministic ordering, and empty-inputembedManyfast-path behavior. - Add and align EmbeddingModel behavior tests in
effectfor embedding usage, batching, ordering, and error handling. - Add
OpenAiEmbeddingModelin@effect/ai-openai, including model / make / layer constructors, config overrides, and provider output index validation with deterministic reordering. - Add OpenAI-compatible EmbeddingModel provider support in
@effect/ai-openai-compat, including config overrides, layer constructors, and output index validation.
- Add the unstable EmbeddingModel module API surface in
-
#1766
5d704eeThanks @tim-smart! - Fix JSDoc wording forEffect.catchto consistently reference the current API name. -
#1771
00add69Thanks @tim-smart! - AddEmbeddingModel.ModelDimensionsand require dimensions in embedding providermodelconstructors. -
#1767
58217d3Thanks @gcanti! - AddisMutableHashMapandisMutableHashSet, and align nominal guard implementations and tests across collections and transactional data types. -
#1765
f4e2abaThanks @tim-smart! - retry incremental prompt on invalid request -
#1756
e3b44b6Thanks @tim-smart! - add HttpApiMiddleware.layerSchemaErrorTransform -
#1732
e1472b7Thanks @KhraksMamtsov! - port Url module from v3 -
#1761
7686320Thanks @gcanti! - FixTool.maketype and runtime behavior whenparametersis not provided.
4.0.0-beta.33
Patch Changes
4.0.0-beta.32
Patch Changes
-
#1717
bf8fff8Thanks @gcanti! - Schema: addOptionFromOptionalNullOrschema, closes #1707. -
#1722
1af3ef3Thanks @tim-smart! - FixRpcSerialization.jsondecode so JSON array payloads are not wrapped in an extra outer array. -
#1725
27fea0fThanks @tim-smart! - Improve unstable HttpApi runtime failures for missing server middleware and missing group implementations.- HttpApiBuilder.applyMiddleware now resolves middleware services via Context.getUnsafe, so missing middleware fails with a clear “Service not found:
” error instead of an opaque is not a function TypeError. - HttpApiBuilder.layer now reports missing groups with actionable context (group identifier, service key, suggested HttpApiBuilder.group(…) call, and available group keys).
- Added regression tests in packages/platform/node/test/HttpApi.test.ts covering:
- addHttpApi + API-level middleware applied across merged groups
- missing middleware service diagnostics
- missing addHttpApi group layer diagnostics
- HttpApiBuilder.applyMiddleware now resolves middleware services via Context.getUnsafe, so missing middleware fails with a clear “Service not found:
-
#1727
2ad6c1bThanks @tim-smart! - Make all built-inHttpApiErrorclasses implementHttpServerRespondable, so they can be returned directly from plain HTTP server handlers outside ofHttpApi. -
#1739
398ac3eThanks @tim-smart! - Use predicate-baseddualdispatch forStream.mergeso data-last calls with optionaloptionsare handled correctly. -
#1741
51fe22fThanks @tim-smart! - AddLayer.tap,Layer.tapError, andLayer.tapCauseAPIs for effectful observation of layer success and failure without changing layer outputs. -
#1740
4605db6Thanks @tim-smart! - Refactor call sites with multipleContextmutations to useContext.mutatefor batched updates. -
#1750
f4de1b0Thanks @gcanti! - Improve unstable AI structured output handling for empty tool params and addTool.EmptyParams, closes #1749. -
#1525
60214f2Thanks @tim-smart! - use Option instead of undefined | A -
#1747
c4b8b0fThanks @tim-smart! - seperate scheduler dispatch from yield decisions -
#1753
6de4efeThanks @tim-smart! - Add dtslint coverage forStream.catchIfto lock in predicate and refinement inference behavior in both data-first and data-last forms. -
#1716
4f969d1Thanks @gcanti! - Remove unusedeffect/NullOrmodule. -
#1721
6cc67c8Thanks @IMax153! - Correct the type of the schema parameter accepted by thefileSchemamethods in the CLI to beSchema.Decoder<A> -
#1709
8531a22Thanks @mikearnaldi! - Add module-level helpers forSemaphore,Latch, and extractedPartitionedSemaphoreoperations. -
#1743
47a51abThanks @tim-smart! - default ws close codes to 1001 in case they are undefined -
#1728
1521d02Thanks @tim-smart! - add graceful shutdown to http servers
4.0.0-beta.31
Patch Changes
-
#1696
5a84853Thanks @krzkaczor! - AddDurationObjecttoDuration.Inputto support Temporal-style object input.Durations can now be created from objects with named unit properties like
{ hours: 1, minutes: 30 }, similar toTemporal.Duration.from(). Supported fields:weeks,days,hours,minutes,seconds,millis,micros,nanos. -
#1705
6f23f0eThanks @tim-smart! - Preserve message item ordering in the default logger when logging aCausewith message values. -
#1711
654aaecThanks @tim-smart! - FixRpcGroup.toLayerandRpcGroup.toLayerHandlerservice requirement inference so handler dependencies are preserved for non-stream RPC handlers. -
#1712
2958a42Thanks @tim-smart! - Expose CLI completions as a public unstable module ateffect/unstable/cli/Completions. -
#1713
95d27a2Thanks @tim-smart! - MakeLayer.mocka dual API so it supports bothLayer.mock(Service)(impl)andLayer.mock(Service, impl). -
#1704
0fbaea8Thanks @tim-smart! - Support toolkit unions inLanguageModeloptions. -
#1701
21d5d5eThanks @tim-smart! - wrap httpapi request context with HttpRouter.Request -
#1696
5a84853Thanks @krzkaczor! - allow assigning Temporal types to DateTime & Duration input -
#1698
6e49959Thanks @tim-smart! - Include toolkit tool handler requirements in AI generation API environment inference. -
#1703
8f5805dThanks @tim-smart! - RelaxNdjsonbyte-stream channel signatures to accept plainUint8Array. -
#1710
990df2cThanks @gcanti! - Schema:toCodecJsonnow returnsCodec<T, Json, RD, RE>instead ofCodec<T, unknown, RD, RE>.Http: the
jsonproperty onHttpIncomingMessage,HttpClientResponse,HttpServerRequest, andHttpServerResponsenow returnsEffect<Schema.Json, E>instead ofEffect<unknown, E>.
4.0.0-beta.30
Patch Changes
-
#1675
c88e5b7Thanks @gijsbartman! - Fix consolePretty ignoring explicit colors option in non-TTY environments.When colors is explicitly set to true, prettyLoggerTty was still gating it with processStdoutIsTTY check, making it impossible to enable colors in non-TTY environments like Vite dev server.
-
#1690
947d0e4Thanks @gcanti! - FixCause.hasInterruptsOnlyto returnfalsefor empty causes. -
#1620
7517908Thanks @kitlangton! - FixTaggedUnion.matchto useUnifyfor return types, allowing branches to return distinct Effect types that are properly merged. -
#1680
a49ecd5Thanks @KhraksMamtsov! - make HttpClientResponse pipeable -
#1681
6993e33Thanks @mikearnaldi! - Add an optionalmessagefield toEffect.ignoreandEffect.ignoreCausefor custom log output. -
#1695
514f2a2Thanks @gcanti! - Remove unused APIs from theUtilsmodule. -
#1644
3214b47Thanks @patroza! - fix: update Service interface to use ‘this: void’ in ‘of’ method signatures -
#1693
95ec5edThanks @tim-smart! - fix cli subcommand context
4.0.0-beta.29
Patch Changes
-
#1677
b52721cThanks @gcanti! - FixSchema.isUUIDso theversionparameter is optional in its public signature. -
#1667
a891c7bThanks @tim-smart! - PreserveAtom.withReactivity(...)refresh behavior when registry initial values seed the wrapped atom. -
#1678
ef26cdfThanks @tim-smart! - Abort HTTP client requests when response streams are consumed only partially. -
#1665
82fd3edThanks @tim-smart! - Remove placeholder fallback behavior from CLI prompt inputs now that default values are prefilled.
4.0.0-beta.28
Minor Changes
- #1637
42bc7ceThanks @tim-smart! - Add a neweffect/unstable/http/HttpStaticServermodule for static file serving with MIME resolution, directory index fallback, SPA fallback, and safe path resolution.
Patch Changes
-
#1659
ff533f2Thanks @tim-smart! - Persist MCP HTTP session and protocol headers after initialize so follow-up JSON-RPC requests includeMCP-Protocol-Version. -
#1663
dc803eeThanks @tim-smart! - AddHttpServerResponse.fromClientResponsefor directly converting client responses into server responses. -
#1657
d660b1cThanks @tim-smart! - AddCtrl-Uline clearing support to editable CLI prompts. -
#1645
93a05e3Thanks @gijsbartman! - ensure transformed Atom’s don’t extend idle ttl -
#1655
2a65cf6Thanks @tim-smart! - MakeAtomRpc.queryandAtomHttpApi.queryreturn serializable atoms by default when query results are schema-backed.The atom serialization key now uses each API’s built-in request schemas so dehydrated state can be keyed consistently across server and client.
-
#1662
a561a40Thanks @tim-smart! - AddHttpServerRequest.toClientRequestfor direct server-to-client request conversion. -
#1648
29cd24dThanks @gcanti! - FixTypes.VoidIfEmptyto correctly detect empty object types. Remove deprecatedTypes.MatchRecordin favor of the simplified implementation, closes #1647. -
#1664
662a8e6Thanks @tim-smart! - AddHttpServerRequest.fromClientRequestfor direct client-request-backed server request conversion. -
#1656
d2b52baThanks @tim-smart! - Persist MCP client capability context across HTTP requests by resolving initialized payloads through the standardMcp-Session-IdHTTP header inMcpServer.Adds a regression test that initializes an MCP HTTP client, verifies the MCP server echoes
Mcp-Session-Id, and then checks a later tool call can still readMcpServer.clientCapabilities. -
#1639
407c3b4Thanks @tim-smart! - AddScheduler.PreventSchedulerYieldand expose it viaReferencesso fibers can skip schedulershouldYieldchecks when needed. -
#1649
e741322Thanks @tim-smart! - SetSchema.TaggedErrorClassinstancenameto the tag value, matchingData.TaggedErrorbehavior. -
#1646
5c75fa8Thanks @tim-smart! - Simplify internal and documented request usage by passing request resolvers directly toEffect.requestinstead of wrapping them withEffect.succeed. -
#1641
747177bThanks @tim-smart! - Don’t transform Tool result schemas, as they aren’t sent to the providers as json schemas -
#1636
326cd48Thanks @tim-smart! - AddCookies.expireCookie/expireCookieUnsafeandHttpServerResponse.expireCookie/expireCookieUnsafefor emitting expired cookies. -
#1653
627e922Thanks @tim-smart! - expose mcp client capabilities -
#1660
662287eThanks @tim-smart! - AddHttpServerResponse.toClientResponsefor converting server responses intoHttpClientResponsevalues.
4.0.0-beta.27
Patch Changes
-
#1621
903a839Thanks @kitlangton! - unstable/http Headers: addremoveManycombinator for removing multiple headers at once -
#1622
91a0168Thanks @tim-smart! - AddModel.BooleanSqlite, a model field schema that uses0 | 1encoding for database variants and plainbooleanencoding for JSON variants. -
#1631
c890f9aThanks @gcanti! - unstable/httpapi HttpApiBuilder: fix void responses producing a non-empty body instead ofResponse.empty, closes #1628. -
#1618
1e985f2Thanks @tim-smart! - DefaultEffect.context()toEffect.context<never>()when no type parameter is provided.
4.0.0-beta.26
Patch Changes
-
#1603
fb21462Thanks @tim-smart! - AddresponseTexttoAiError.StructuredOutputErrorand populate it fromLanguageModel.generateObjectso failed structured output decodes include the full LLM text. -
#1613
2ed26b1Thanks @lucas-barake! - AdddisableFatalDefectstoRpcServer.layerHttp,RpcServer.toHttpEffect, andRpcServer.toHttpEffectWebsocketoption types to match existing runtime support. -
#1599
e832a57Thanks @tim-smart! - add trait for customizing exit codes -
#1611
7f01be7Thanks @WebWalks! - Fixed the Error Type on AtomHttpApiClient (Server errors were being incorrectly reported, and we could not determine _tag to handle) -
#1612
e965143Thanks @tim-smart! - Expose the optionalorElsefallback parameter inEffect.catchTags. -
#1606
b9b80f1Thanks @gcanti! - Schema:toJsonSchemaDocumentnow emits JSON Schemafalsefor unannotatedNeverindex signatures (includingadditionalProperties) instead of{ not: {} }. AnnotatedNeverstill emits a schema object so metadata likedescriptionis preserved. -
#1607
98252aaThanks @gcanti! - Schema: improveSchema.Unknown/Schema.ObjectKeywordhandling intoCodecJsonandtoCodecStringTree -
#1616
56fbd94Thanks @lucas-barake! - AddAtom.swrtoeffect/unstable/reactivityfor staleTime-gated stale-while-revalidate reads, optional mount and window-focus revalidation, and forceful manual refresh. -
#1600
3faa109Thanks @tim-smart! - add args to Stdio service -
#1610
692ecfeThanks @kitlangton! - Refine unstable CLI parent/subcommand flag composition.- Add
Command.withSharedFlagsconflict validation against existing subcommands, including thewithSubcommands(...).withSharedFlags(...)composition order. - Reorder
Commandtype parameters toCommand<Name, Input, ContextInput, E, R>for clearer parent-context modeling. - Make
Command.withSubcommandsinput typing sound for downstream input-based combinators by reflecting that subcommand paths only carry parent context input.
- Add
-
#1604
1e70b72Thanks @lucas-barake! - Fixunstable/sql/SqlSchemarequest input typing sofindAllandfindNonEmptyacceptRequest["Type"]instead ofRequest["Encoded"]. -
#1602
ecf0782Thanks @tim-smart! - Replace the default HttpApi schema-validation error withHttpApiError.BadRequestNoContent.
4.0.0-beta.25
Patch Changes
-
#1597
fa17bb5Thanks @tim-smart! - FixEffect.forkScopeddata-first typings to includeScopein requirements. -
#1598
f46e5b5Thanks @tim-smart! - compare transaction connections by reference -
#1596
ce4767cThanks @tim-smart! - improve HttpClient.withRateLimiter initial state tracking -
#1594
c830a8bThanks @tim-smart! - HttpClient.withRateLimiter adds delay from retry-after headers
4.0.0-beta.24
Patch Changes
-
#1586
a909e1cThanks @gcanti! - Schema: addChunkschema, closes #1585. -
#1588
8814a4eThanks @gcanti! - FixSchema.toTaggedUniondiscriminant detection for class-based schemas, including unique symbol tags, closes #1584. -
#1591
3f942c5Thanks @tim-smart! - AddHttpClient.withRateLimiterfor integrating theRateLimiterservice with HTTP clients, including optional response-header driven limit updates and automatic 429 retry behavior. -
#1583
774ed59Thanks @patroza! - feat: Support Reference classes -
#1592
f54b8d3Thanks @tim-smart! - FixHttpApi.prefixso it updates endpoint path types the same wayHttpApiGroup.prefixdoes.
4.0.0-beta.23
Patch Changes
- #1561
5c73c41Thanks @gcanti! - SchemaRepresentation: only create references for recursive/mutually recursive schemas and schemas with anidentifierannotation, closes #1560.
4.0.0-beta.22
Patch Changes
-
#1578
0874332Thanks @tim-smart! - Proxy function arity fromEffect.fnAPIs so wrapped functions preserve the originallengthvalue. -
#1580
c592dcdThanks @tim-smart! - simplify Filter by removing Args type parameter -
#1575
1dbe28dThanks @tim-smart! - fix Chat constructor types -
#1581
564d730Thanks @tim-smart! - fix Duration.toMillis regression -
#1579
3cfadc4Thanks @tim-smart! - Remove fiber-level keep-alive intervals and keep the process alive fromRuntime.makeRunMaininstead. -
#1571
6634fd0Thanks @tim-smart! - AddHttpApiClient.urlBuilderfor type-safe endpoint URL construction from group + method/path keys. -
#1573
d10dabeThanks @tim-smart! - Expose achunkSizeoption onStream.fromIterableto control emitted chunk boundaries when constructing streams from iterables. -
#1574
f82f549Thanks @tim-smart! - Fix AI tool handler error typing soLanguageModel.generateTextwith a toolkit exposes wrappedAiErrorvalues rather than leaking rawAiErrorReasonin the error channel.
4.0.0-beta.21
Patch Changes
-
#1555
e691909Thanks @tim-smart! - fix Stream.withSpan options -
#1548
d5f413fThanks @effect-bot! - FixTxPubSub.publishandTxPubSub.publishAlloverloads to requireEffect.Transactionin their return environment. -
#1557
139d152Thanks @A386official! - Fix MCP resource template parameter names resolving asparam0,param1instead of actual names by checkingisParamon the original schema beforetoCodecStringTreetransformation. -
#1547
947e3d4Thanks @effect-bot! - FixSchedule.reduceto persist state updates when the combine function returns a synchronous value. -
#1545
84b2cceThanks @effect-bot! - Fix TupleWithRest post-rest validation to check each tail index sequentially. -
#1552
7f5305eThanks @tim-smart! - ConstrainHttpServerRequest.sourcetoobjectand key server-side request weak caches byrequest.sourceso middleware request wrappers share the same cache entries. -
#1556
9e6fd84Thanks @tim-smart! - rename WorkflowEngine.layer -
#1558
fdb8a4bThanks @tim-smart! - FixWorkflow.executionIdto use schemamakeUnsafeinstead of the removed.makeAPI. -
#1553
0f986efThanks @kaylynb! - Fix spans never having parent span -
#1541
9355fc0Thanks @tim-smart! - AddEffect.findFirstandEffect.findFirstFilterfor short-circuiting effectful searches over iterables.
4.0.0-beta.20
Patch Changes
-
#1533
842a624Thanks @tim-smart! - move ChildProcess apis into spawner service -
#1536
4785eefThanks @tim-smart! - add Context.Key type, used a base for Context.Service and Context.Reference -
#1531
8fac95bThanks @gcanti! - RevertConfig.withDefaultto v3 behavior, closes #1530.Make
Config.withDefaultaccept an eager value instead ofLazyArg, aligning with CLI module conventions. -
#1535
12ee8e2Thanks @tim-smart! - change default ErrorReporter severity to Info -
#1529
e542c94Thanks @tim-smart! - Add dedicated AiError metadata interfaces per reason so provider packages can safely augment metadata without conflicting module declarations. -
#1531
8fac95bThanks @gcanti! - FixConfig.withDefaulttype inference, closes #1530. -
#1528
6f4ebd1Thanks @tim-smart! - AddModel.ModelNameand provide it from AI model constructors. -
#1537
989d1ccThanks @tim-smart! - RevertEffect.partitionto Effect v3 behavior by accumulating failures from the effect error channel and never failing.
4.0.0-beta.19
4.0.0-beta.18
Minor Changes
-
#1515
01e31fdThanks @mikearnaldi! - Add transactional STM modules: TxDeferred, TxPriorityQueue, TxPubSub, TxReentrantLock, TxSubscriptionRef.Refactor transaction model: remove
Effect.atomic/Effect.atomicWith, addEffect.withTxState. All Tx operations now returnEffect<A, E, Transaction>requiring explicitEffect.transaction(...)at boundaries.Expose
TxPubSub.acquireSubscriber/releaseSubscriberfor composable transaction boundaries. FixTxSubscriptionRef.changesrace condition ensuring current value is delivered first.Remove
TxRandommodule.
Patch Changes
-
#1518
0890aabThanks @IMax153! - FixCommand.withGlobalFlagstype inference when mixingGlobalFlag.actionandGlobalFlag.setting.Settingservice identifiers are now correctly removed from command requirements in mixed global flag arrays. -
#1520
725260bThanks @IMax153! - Ensure that OpenAI JSON schemas for tool calls and structured outputs are properly transformed
4.0.0-beta.17
Patch Changes
- #1516
8f59c32Thanks @gcanti! - FixSchema.encodeKeysto encode non-remapped struct fields during encoding.
4.0.0-beta.16
Patch Changes
-
#1513
bf9096cThanks @gcanti! - AddSchemaParser.makeOptionandSchema.makeOptionfor constructing schema values asOption. -
#1508
29f81caThanks @gcanti! - Schema: addOptionFromUndefinedOrandOptionFromNullishOrschemas. -
#1498
68eb28cThanks @kaylynb! - Fix OpenApi Multipart file upload schema generation
4.0.0-beta.15
Patch Changes
-
#1500
24ae609Thanks @qadama831! - Unwrap_Successschema to enable field access. -
#1486
0e3c059Thanks @tim-smart! - FixStream.groupedWithinto stop emitting empty arrays when schedule ticks fire while upstream is idle. -
#1503
e843b0aThanks @tim-smart! - allow creating standalone http handlers from HttpApiEndpoints -
#1499
f4389a2Thanks @tim-smart! - fix atom node timeout cleanup -
#1494
5b73de0- RefineExtractServicesto omit tool handler requirements when automatic tool resolution is explicitly disabled through thedisableToolCallResolutionoption. -
#1496
595d2d6Thanks @IMax153! - Refactor unstable CLI global flags to command-scoped declarations.Breaking changes
- Remove
GlobalFlag.add,GlobalFlag.remove, andGlobalFlag.clear - Add
Command.withGlobalFlags(...)as the declaration API for command/subcommand scope - Change
GlobalFlag.settingconstructor to curried form which carries type-level identifier:- before:
GlobalFlag.setting({ flag, ... }) - after:
GlobalFlag.setting("id")({ flag })
- before:
- Change setting context identity to a stable type-level string:
effect/unstable/cli/GlobalFlag/${id}
Behavior changes
- Global flags are now scoped by command path (root-to-leaf declarations)
- Out-of-scope global flags are rejected for the selected subcommand path
- Help now renders only global flags active for the requested command path
- Setting defaults are sourced from
Flagcombinators (optional,withDefault) rather than setting constructor defaults
- Remove
4.0.0-beta.14
Patch Changes
-
#1471
c414700Thanks @IMax153! - Make CLI global settings directly yieldable and simplify built-in names.GlobalFlag.settingnow takes{ flag, defaultValue }and returns a setting that is aContext.Reference, so handlers andCommand.provide*effects canyield*global setting values directly.Built-in settings keep internal behavior in
runWith(for example,--log-levelstill configuresReferences.MinimumLogLevel) while also being readable as values.Also renamed built-in globals:
GlobalFlag.CompletionsFlag->GlobalFlag.CompletionsGlobalFlag.LogLevelFlag->GlobalFlag.LogLevel
-
#1490
a30c969Thanks @gcanti! - FixOpenApi.fromApipreserving multiple response content types for one status code, closes #1485.
4.0.0-beta.13
Patch Changes
-
#1454
368f4c3Thanks @lucas-barake! - ExposeNoSuchElementErrorin the error type of stream-basedAtom.makeoverloads. -
#1469
db8a579Thanks @tim-smart! - Update unstable schema variant helpers to use array-based arguments forFieldOnly,FieldExcept, andUnion, aligningVariantSchemaandModelwith other v4 API shapes. -
#1457
668b703Thanks @tim-smart! - Run request resolver batch fibers with request services by usingEffect.runForkWith, so resolver delay effects andrunAllexecution see the request service map. -
#1461
d40e76bThanks @mikearnaldi! - FixSchedule.fixeddouble-executing the effect due to clock jitter.The
elapsedSincePrevious > windowcheck included sleep time from the previous step, so any timer imprecision (e.g. 1001ms for a 1000ms sleep) triggered an immediate zero-delay re-execution. -
#1464
6e18cf8Thanks @gcanti! - Use theidentifierannotation as the expected message when available, closes #1458. -
#1475
86062e8Thanks @tim-smart! - Add a CI check job that runspnpm ai-docgenand fails if it produces uncommitted changes. -
#1448
c27ce75Thanks @IMax153! - Refactor CLI built-in options to use Effect services withGlobalFlagBuilt-in CLI flags (
--help,--version,--completions,--log-level) are now implemented as Effect services usingContext.Reference. This provides:- Visibility: Built-in flags now appear in help output’s “GLOBAL FLAGS” section
- Extensibility: Users can register custom global flags via
GlobalFlag.add - Override capability: Built-in flag behavior can be replaced or disabled
- Composability: Flags compose via Effect’s service system
New
GlobalFlagmodule exports:Action<A>andSetting<A>types for different flag behaviorsHelp,Version,Completions,LogLevelreferences for built-in flagsadd,remove,clearfunctions for managing global flags
Example:
const app = Command.make("myapp");Command.run(app, { version: "1.0.0" }).pipe(GlobalFlag.add(CustomFlag, customFlagValue),); -
#1468
e2d4fbfThanks @lucas-barake! - FixRpc.ExtractProvidesto use middleware service ID instead of constructor type. -
#1465
114ab42Thanks @lloydrichards! - tighten Schema on _meta fields in McpSchema; closes #1463 -
#1470
484caecThanks @tim-smart! - AddCommand.withAliasfor unstable CLI commands, including subcommand parsing by alias and help output that renders aliases asname, aliasin subcommand listings.
4.0.0-beta.12
Patch Changes
-
#1439
70a74e8Thanks @gcanti! - AddConfig.nestedcombinator to scope a config under a named prefix, closes #1437. -
#1452
b5b6e10Thanks @tim-smart! - make fiber keepAlive setInterval evaluation lazy -
#1431
f5ce5a9Thanks @tim-smart! - AddRandom.nextBooleanfor generating random boolean values. -
#1450
a29eb70Thanks @tim-smart! - use cause annotations for detecting client aborts -
#1445
c7b36e5Thanks @mattiamanzati! - FixGraph.toMermaidto escape special characters using HTML entity codes per the Mermaid specification. -
#1443
9381d6dThanks @mikearnaldi! - FixHttpClient.retryTransientautocomplete leakingScheduleinternals by splitting the{...} | Scheduleunion into separate overloads. -
#1444
88439f1Thanks @gcanti! - Schema.encodeKeys: relax input constraint from Struct to schemas with fields so Schema.Class works, closes #1412. -
#1438
e35307dThanks @mikearnaldi! - Atom.searchParam: decode initial URL values correctly when a schema is provided -
#1425
c7df4bcThanks @candrewlee14! - Fix LanguageModel stripping of resolved approval artifacts across multi-round conversations.Previously,
stripResolvedApprovalsonly ran when there were pending approvals in the current round. Stale artifacts from earlier rounds would leak to the provider, causing errors. The stripping now runs unconditionally.In streaming mode, pre-resolved tool results are also emitted as stream parts so
Chat.streamTextpersists them to history, preventing re-resolution on subsequent rounds. -
#1453
accaf3bThanks @tim-smart! - allow mcp errors to be encoded correctly -
#1440
3e1c270Thanks @lloydrichards! - extend McpSchema to work with extensions -
#1447
6cd81f7Thanks @tim-smart! - remove all non-regional service usage -
#1451
f222da3Thanks @tim-smart! - AddEffect.annotateLogsScopedto apply log annotations for the current scope and automatically restore previous annotations when the scope closes. -
#1434
61f901dThanks @tim-smart! - Fix JSON-RPC serialization to return an object for non-batched requests while preserving array responses for true batch requests.
4.0.0-beta.11
Patch Changes
-
#1429
88659edThanks @tim-smart! - Add grouped subcommand support toCommand.withSubcommands, including help output sections for named groups while keeping ungrouped commands underSUBCOMMANDS. -
#1426
f2915e8Thanks @tim-smart! - AddEffect.validatefor validating collections while accumulating all failures, equivalent to the v3Effect.validateAllbehavior. -
#1430
eb71aceThanks @tim-smart! - AddCommand.withExamplesto attach concrete usage examples to CLI commands, expose them throughHelpDoc.examples, and render them in the default help formatter. -
#1415
2a16999Thanks @mikearnaldi! - HashMap: compare HAMT bit positions as unsigned to preserve entry lookup when bit 31 is set -
#1417
d42dd52Thanks @mikearnaldi! - unstable/http Headers: hide inspectable prototype methods from for..in iteration to avoid invalid header names in runtime fetch polyfills -
#1418
339adafThanks @mikearnaldi! - runtime: guard keepAlive setInterval / clearInterval so Effect.runPromise works in runtimes that block timer APIs -
#1416
de19645Thanks @mikearnaldi! - Queue.collect: stop duplicating drained messages by appending each batch once -
#1413
9b1dc3bThanks @gcanti! - FixSchema.TupleWithRestincorrectly accepting inputs with missing post-rest elements, closes #1410. -
#1427
8bced95Thanks @tim-smart! - AddCommand.annotateandCommand.annotateMergeto unstable CLI commands, and include command annotations inHelpDocso custom help formatters can access command metadata. -
#1401
9431420Thanks @tim-smart! - AddWorkflowEngine.layer, an in-memory layer for the unstable workflow engine. -
#1428
948dca2Thanks @tim-smart! - AddCommand.withShortDescriptionand use short descriptions for CLI subcommand listings, with fallback to the full command description. -
#1405
d18e327Thanks @candrewlee14! - Strip resolved tool approval artifacts from prompt before sending to provider, preventing errors when providers reject pre-resolved approval requests. -
#1424
ab512f7Thanks @tim-smart! - expose more atom Node properties
4.0.0-beta.10
Patch Changes
-
#1396
371acabThanks @gcanti! - Addunstable/encodingsubpath export. -
#1392
856d774Thanks @tim-smart! - Fix a race inSemaphore.takewhere interruption could leak permits after a waiter was resumed. -
#1388
b9e9202Thanks @tim-smart! - ExportEffectdo notation APIs (Do,bindTo,bind, andlet) fromeffect/Effectand add runtime and type-level coverage. -
#1387
1d1a974Thanks @tim-smart! - short circuit when Fiber.joinAll is called with an empty iterable -
#1386
6bfe2a6Thanks @tim-smart! - simplify http logger disabling -
#1381
b12c811Thanks @tim-smart! - FixUrlParams.Inputusage to accept interface-typed records in HTTP client and server helpers while keeping coercion constraints for url parameter values. -
#1383
d17d98aThanks @tim-smart! - RenameHttpClient.retryTransientoptionmodetoretryOnand rename"both"to"errors-and-responses". -
#1399
68c3c7cThanks @tim-smart! - AddRandom.shuffleto shuffle iterables with seeded randomness support.
4.0.0-beta.9
Patch Changes
-
#1376
3386557Thanks @gcanti! - HttpApiEndpoint: relaxparams,query, andheadersconstraints to accept a full schema in addition to a record of fields. -
#1379
b6666e3Thanks @tim-smart! - FixAtomHttpApi.queryto forward v4params/queryrequest fields toHttpApiClientat runtime. Also alignAtomHttpApiendpoint type inference with v4HttpApiEndpointparams/query naming and add a regression test.
4.0.0-beta.8
Patch Changes
-
#1371
246e672Thanks @IMax153! - FixChildProcessoptions type and implementPgMigrator -
#1372
807dec0Thanks @pawelblaszczyk5! - Remove superfluous error from SqlSchema.findAll signature
4.0.0-beta.7
Patch Changes
-
#1366
a2bda6dThanks @tim-smart! - rename SqlSchema.findOne* apis -
#1360
1f95a2bThanks @tim-smart! - AddSchedule.jitteredto randomize schedule delays between 80% and 120% of the original delay. -
#1364
a8d5e79Thanks @gcanti! - Schema: avoid eager resolution for type-level helpers, closes #1332 -
#1369
a5386baThanks @tim-smart! - align HttpClientRequest constructors with http method names -
#1369
a5386baThanks @tim-smart! - remove body restriction for HttpClientRequest’s -
#1358
06d8a03Thanks @tim-smart! - AddLogLevel.isEnabledfor checking a log level againstReferences.MinimumLogLevel. -
#1363
8caac76Thanks @tim-smart! - rename DurationInput to Duration.Input -
#1363
8caac76Thanks @tim-smart! - DateTime.distance now returns a Duration -
#1363
8caac76Thanks @tim-smart! - remove rpc client nesting to improve type performance
4.0.0-beta.6
Patch Changes
-
#1338
3247da2Thanks @Leka74! - AddshowOperationIdtoHttpApiScalar.ScalarConfig. -
#1326
f205705Thanks @gcanti! - Schema: addBigDecimalschema with comparison checks (isGreaterThanBigDecimal,isGreaterThanOrEqualToBigDecimal,isLessThanBigDecimal,isLessThanOrEqualToBigDecimal,isBetweenBigDecimal). -
#1328
f35022cThanks @gcanti! - Schema: addDateTimeZoned,TimeZoneOffset,TimeZoneNamed, andTimeZoneschemas. -
#1325
8622721Thanks @KhraksMamtsov! - MakeData.Class,Data.TaggedClass, andCause.YieldableErrorpipeable. -
#1323
fc660abThanks @KhraksMamtsov! - PortPipeable.Classfrom v3.class MyClass extends Pipeable.Class() {constructor(public a: number) {super();}methodA() {return this.a;}}console.log(new MyClass(2).pipe((x) => x.methodA())); // 2class A {constructor(public a: number) {}methodA() {return this.a;}}class B extends Pipeable.Class(A) {constructor(private b: string) {super(b.length);}methodB() {return [this.b, this.methodA()];}}console.log(new B("pipe").pipe((x) => x.methodB())); // ['pipe', 4] -
#1337
f37dc33Thanks @IMax153! - Encoding: consolidateeffect/encodingsub-modules (Base64, Base64Url, Hex, EncodingError) into a top-levelEncodingmodule. Functions are now prefixed:encodeBase64,decodeBase64,encodeHex,decodeHex, etc. Theeffect/encodingsub-path export is removed. -
#1351
3662f32Thanks @tim-smart! - addSchema.HashSetfor decoding and encodingHashSetvalues. -
#1336
a7d436fThanks @mikearnaldi! - ExtractSemaphoreandLatchinto their own modules.Semaphore.make/Semaphore.makeUnsafereplaceEffect.makeSemaphore/Effect.makeSemaphoreUnsafe.Latch.make/Latch.makeUnsafereplaceEffect.makeLatch/Effect.makeLatchUnsafe.Merge
PartitionedSemaphoreintoSemaphoreasSemaphore.Partitioned,Semaphore.makePartitioned,Semaphore.makePartitionedUnsafe. -
#1345
6856a41Thanks @tim-smart! - allocate less effects when reading a file -
#1350
8c417d0Thanks @tim-smart! - Add “Previously Known As” JSDoc migration notes for theSemaphoreandLatchAPIs extracted fromEffect. -
#1355
5419570Thanks @tim-smart! - ensure non-middleware http errors are correctly handled -
#1352
449c5edThanks @tim-smart! - AddSchema.HashMapfor decoding and encodingHashMapvalues. -
#1347
4b5ec12Thanks @tim-smart! - use .toJSON for default .toString implementations -
#1329
df87937Thanks @gcanti! - Schema: extract shareddateTimeUtcFromStringtransformation forDateTimeUtcandDateTimeUtcFromString. -
#1318
5dbfca8Thanks @gcanti! - Schema: rename$suffix to$prefix for type-level identifiers that conflict with built-in names (Array$→$Array,Record$→$Record,ReadonlyMap$→$ReadonlyMap,ReadonlySet$→$ReadonlySet). -
#1356
e629497Thanks @tim-smart! - allow passing void for request constructors -
#1348
981c991Thanks @tim-smart! - FixSchedule.andThenResultto initialize the right schedule only after the left schedule completes. This removes the extra immediate transition tick and correctly completes when the right schedule is finite. -
#1320
1ca2ed6Thanks @gcanti! - Struct: addStruct.Recordconstructor for creating records with the given keys and value. -
#1342
45722bdThanks @cevr! -Schema.TaggedErrorClass,Schema.Class, andSchema.ErrorClassconstructors now allow omitting the props argument when all fields have constructor defaults (e.g.new MyError()instead ofnew MyError({})). -
#1322
eb2a85eThanks @tim-smart! - Add arequireServicesAtoption toPersistedCache.makeso lookup-service requirements can be configured likeCache.
4.0.0-beta.5
Patch Changes
-
#1317
f6e133eThanks @tim-smart! - support tag unions in Effect.catchTag/Reason -
#1314
e3893ccThanks @zeyuri! - FixAtom.serializableencode/decode for wire transfer.Use
Schema.toCodecJsoninstead ofSchema.encodeSync/Schema.decodeSyncdirectly, so that encoded values are plain JSON objects that survive serialization roundtrips (JSON, seroval, etc.). Previously,AsyncResult.Schemaencode produced instances with custom prototypes that were lost after wire transfer, causing decode to fail with “Expected AsyncResult” errors during SSR hydration. -
#1314
e3893ccThanks @zeyuri! - Port ReactHydration to effect-smol.Add
Hydrationmodule toeffect/unstable/reactivitywithdehydrate,hydrate, andtoValuesfor SSR state serialization. AddHydrationBoundaryReact component to@effect/atom-reactwith two-phase hydration (new atoms in render, existing atoms after commit).
4.0.0-beta.4
Patch Changes
-
#1308
c5a18efThanks @tim-smart! - improve Schema.TaggedUnion .match auto completion -
#1310
bc6b885Thanks @tim-smart! - AddSchedule.duration, a one-shot schedule that waits for the provided duration and then completes.
4.0.0-beta.3
Patch Changes
-
#1307
c4da328Thanks @tim-smart! - AddHttpClientRequest.bodyFormDataRecordandHttpBody.makeFormDataRecordhelpers for creating multipart form bodies from plain records.
4.0.0-beta.2
Patch Changes
-
#1302
a22ce73Thanks @tim-smart! - allow undefined for VariantSchema.Overridable input -
#1299
ebdabf7Thanks @tim-smart! - PortSqlSchema.findOnefrom effect v3 to returnOptionon empty results and addSqlSchema.singlefor the fail-on-empty behavior. -
#1298
8f663bbThanks @tim-smart! - AddEffect.catchNoSuchElement, a renamed port of v3Effect.optionFromOptionalthat convertsNoSuchElementErrorfailures intoOption.none.
4.0.0-beta.1
Patch Changes
-
#1293
0fecf70Thanks @mikearnaldi! - AddEffect.filtersupport for synchronousFilter.Filteroverloads and correctly handle non-effectResultreturn values at runtime. -
#1294
709569eThanks @tim-smart! - FixPrompt.textand related text prompts to initialize fromdefaultvalues so users can edit the default input directly.