github Effect-TS/effect effect@4.1.6

Patch Changes

  • #10845 dd5f2f3 Thanks @effect-bot! - Add standalone effect/ai/Skill module and accept Skill values in McpServer.registerSkill and McpServer.skill.

  • #10893 1d65846 Thanks @Marve10s! - Fix Atom.subscriptionRef setters throwing AsyncFiberError when another update holds the ref lock.

  • #10821 694c28f Thanks @effect-bot! - Use Buffer for Base64 and Base64Url encoding and decoding when native Uint8Array Base64 methods are unavailable.

  • #10802 5aaa2cd Thanks @KhraksMamtsov! - Fix Effect.catchReasons error-channel inference for exhaustive handlers and failing orElse fallbacks.

  • #10901 55814bf Thanks @EnesKartal! - Fix data-first Effect.catchTag type inference for inline calls such as Effect.map(...).

  • #10883 92c40a1 Thanks @effect-bot! - Fix cluster Entity.keepAlive being dropped when disabled and immediately re-enabled.

  • #10812 9f415a7 Thanks @AVtheking! - Fix a memory leak in cluster MessageStorage.registerReplyHandler when interrupted reply waiters leave stale request entries behind.

  • #10908 e367afd Thanks @effect-bot! - Fix cluster shard rebalancing stalling workflow activity waits until entityTerminationTimeout once in-flight activities complete.

  • #10840 d5d2112 Thanks @SelmanBoray! - Fix HttpMiddleware.cors omitting the Access-Control-Max-Age header when maxAge is 0.

  • #10906 fa2e5af Thanks @effect-bot! - Importing Effect or Schedule no longer makes AOT compilers such as scriptc require Intl; Schedule.cron still needs it.

  • #10892 6bf6427 Thanks @Marve10s! - Preserve the input offset in DateTime.setParts when valid for the updated local time, falling back to compatible disambiguation otherwise. Edits during or moving into a repeated DST hour from the later offset now stay in the second occurrence (e.g. setting hour: 1 on 03:30 EST yields 01:30 EST).

  • #10925 10bc4a4 Thanks @effect-bot! - Avoid uncached structural hashing in Equal.equals for plain objects and arrays, speeding up one-off structural comparisons while preserving custom Hash and cached-hash rejections. Also fixes Equal.equals and Hash.hash to include inherited properties on objects with custom prototypes whose constructor is Object (such as Object.create({ ... })).

  • #10860 a9540d3 Thanks @effect-bot! - Fix FetchHttpClient to resolve globalThis.fetch on each request instead of caching the first reference it sees.

  • #10835 3a250d7 Thanks @Marve10s! - Fix stream Atoms settling as Success when completing without emitting; they now fail with NoSuchElementError and keep previousSuccess.

  • #10836 ce44141 Thanks @Marve10s! - Fix Chat history ordering so approved or denied tool results are placed before the assistant response.

  • #10819 9318e5b Thanks @effect-bot! - Fix forked fibers interrupted before starting sometimes running their effect instead of exiting interrupted.

  • #10854 c9ecebf Thanks @effect-bot! - Add the missing runtime pipe method to RpcGroup.

  • #10850 32f8fbe Thanks @yasirmalik36! - Redact schema-backed Redacted params, query, headers, and bodyless payloads in HttpApi spans and client errors without listing them in HttpApi.RedactedNames.

  • #10922 41d6af1 Thanks @yxshee! - Add JoseError.CryptoFailed in effect/jose: an unsupported signing or encryption provider now returns JoseError.CryptoFailed instead of InvalidKey, while rejected keys still return InvalidKey.

  • #10898 c33fd59 Thanks @asssslay! - Preserve leading U+FEFF characters when reading string values from KeyValueStore.layerFileSystem and KeyValueStore.layerSql.

  • #10902 1f9e9d3 Thanks @asssslay! - Fix LayerRef reusing the previous context after invalidation or refresh while an earlier borrower still holds it.

  • #10817 594fa71 Thanks @effect-bot! - Add RFC 8288 Link header support (Headers.parseLink, Headers.formatLink, Schema.LinkHeaderFromString, HttpClientResponse.links/link) and header-appending helpers (Headers.append, HttpClientRequest.appendHeader, HttpServerResponse.appendHeader).

  • #10876 b378c38 Thanks @jasonkuhrt! - Match.tags, Match.tagsExhaustive, Match.tagStartsWith, Match.discriminator, Match.discriminatorStartsWith, Match.discriminators, Match.discriminatorsExhaustive, Match.literals and Match.literalsExhaustive now accept Match.fn matchers and pass the selector's arguments to their handlers.

  • #10875 a9ec9a6 Thanks @jasonkuhrt! - Fix Match.type passing the matched input twice to case and orElse handlers.

  • #10834 310a81b Thanks @Marve10s! - Fix Migrator skipping a migration with id 0 (such as 0000_init) on a fresh database.

  • #10811 aab2135 Thanks @asssslay! - Fix Order.clamp (and module clamp wrappers) returning the bound instead of the input value when the input compares equal to a bound.

  • #10887 6744a72 Thanks @effect-bot! - Bound the OTLP pending export queue with configurable maxQueueSize and onDrop, cap each batch at maxBatchSize with configurable concurrency (default 4, supporting "unbounded", with OtlpMetrics serialized at 1), and make Flusher.flush await all in-flight work and pre-flush items without cancelling shared exports on interruption.

  • #10820 848d042 Thanks @effect-bot! - Trace batched RpcClient.layerProtocolHttp requests in a root RpcClient.batch span linked to each caller span.

  • #10916 077a93e Thanks @gcanti! - The code that generates TypeScript for built-in schemas and checks now lives in Codegen. This makes bundles smaller for apps that use Schema without generating code.

    • If you previously read annotations.toCode from a built-in, pass its representation to Codegen.Module.addSchemas and call module.print() to get the TypeScript source.
    • Custom types can still define toCode. If you change a built-in's representation ID, provide your own toCode to tell the generator what to write.
    • The generator uses the arguments recorded when you create a schema or check. If you later change a Date used as a bound, the generated code uses the original date.
  • #10920 aef50fb Thanks @effect-bot! - Memoize nested schema compilations in Schema.toEquivalence so shared sub-schemas are compiled once instead of once per path.

  • #10899 2e4de86 Thanks @asssslay! - Fix ScopedCache.get to move reloaded expired entries to the most recently used position so they are not evicted next at capacity.

  • #10872 482b104 Thanks @effect-bot! - Reduce the overhead of SqlClient transactions and savepoints by avoiding a redundant copy of the caller's services.

  • #10891 753e1ed Thanks @Marve10s! - Fix Stream.toAsyncIterable dropping values or leaving reads pending after closing when next() calls overlap.

  • #10857 0d2bb4a Thanks @effect-bot! - Start both input sides immediately in Stream.merge and Channel.merge.

  • #10829 8161e03 Thanks @Marve10s! - Fix String.linesIterator and String.linesWithSeparators iterators restarting from the first line when iterated again, instead of continuing from their current position.

  • #10818 49f5391 Thanks @effect-bot! - Fix Workflow.intoResult to capture compensation defects in terminal Complete results when Workflow.CaptureDefects is enabled.

  • #10844 3d59bdf Thanks @RhysSullivan! - Fix Workflow.execute with { discard: true } being interrupted before dispatch when a sibling suspends on a durable wait.

  • #10847 8866608 Thanks @effect-bot! - Fix effect/workflow suspending on durable waits before sibling child workflows, including discarded starts, are dispatched.

  • #10868 69fd4b1 Thanks @effect-bot! - Fail with a defect instead of hanging when a workflow awaits its own execution.

  • #10885 7d97626 Thanks @effect-bot! - Fix shared child workflow executions leaving additional waiting parents suspended in ClusterWorkflowEngine, WorkflowEngine.layerMemory, and CloudflareWorkflowEngine.

    • MessageStorage / MessageStorage.Encoded: custom implementations must add requestsForAddress({ address, tag }), returning all saved requests (Envelope.PartialRequestEncoded, processed or unprocessed, across shards) matching entityType, entityId, and tag exactly.
    • SqlMessageStorage: migration 0006_address_index adds an (entity_type, entity_id, tag) index on the messages table.
  • #10909 0e79436 Thanks @effect-bot! - Fix Activity.retry under Workflow.SuspendOnFailure so failed attempts reach the retry policy instead of suspending immediately. If the policy is exhausted and the error escapes, the workflow suspends and resume replays the stored failures.

  • #10913 2f8a4e9 Thanks @adrian-gierakowski! - Fix memory retention across suspended workflow replays in ClusterWorkflowEngine and WorkflowEngine.layerMemory. Replays now share a workflow scope while it has no finalizers, so a finalizer or compensation registered late through an earlier run's handle can observe the final run's exit instead of Exit.void.

  • #10684 800b753 Thanks @jpowersdev! - Support Clark-notation namespace matching ({uri}local, {*}local, {}local) in Xml.elements, and preserve namespace and localName on collected elements and Xml.toEvents output.

Don't miss a new effect release

NewReleases is sending notifications on new releases.