Skip to content

Effect

4.0.0-beta.31

Patch Changes

  • #1696 5a84853 Thanks @krzkaczor! - Add DurationObject to Duration.Input to support Temporal-style object input.

    Durations can now be created from objects with named unit properties like { hours: 1, minutes: 30 }, similar to Temporal.Duration.from(). Supported fields: weeks, days, hours, minutes, seconds, millis, micros, nanos.

  • #1705 6f23f0e Thanks @tim-smart! - Preserve message item ordering in the default logger when logging a Cause with message values.

  • #1711 654aaec Thanks @tim-smart! - Fix RpcGroup.toLayer and RpcGroup.toLayerHandler service requirement inference so handler dependencies are preserved for non-stream RPC handlers.

  • #1712 2958a42 Thanks @tim-smart! - Expose CLI completions as a public unstable module at effect/unstable/cli/Completions.

  • #1713 95d27a2 Thanks @tim-smart! - Make Layer.mock a dual API so it supports both Layer.mock(Service)(impl) and Layer.mock(Service, impl).

  • #1704 0fbaea8 Thanks @tim-smart! - Support toolkit unions in LanguageModel options.

  • #1701 21d5d5e Thanks @tim-smart! - wrap httpapi request context with HttpRouter.Request

  • #1696 5a84853 Thanks @krzkaczor! - allow assigning Temporal types to DateTime & Duration input

  • #1698 6e49959 Thanks @tim-smart! - Include toolkit tool handler requirements in AI generation API environment inference.

  • #1703 8f5805d Thanks @tim-smart! - Relax Ndjson byte-stream channel signatures to accept plain Uint8Array.

  • #1710 990df2c Thanks @gcanti! - Schema: toCodecJson now returns Codec<T, Json, RD, RE> instead of Codec<T, unknown, RD, RE>.

    Http: the json property on HttpIncomingMessage, HttpClientResponse, HttpServerRequest, and HttpServerResponse now returns Effect<Schema.Json, E> instead of Effect<unknown, E>.

4.0.0-beta.30

Patch Changes

  • #1675 c88e5b7 Thanks @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 947d0e4 Thanks @gcanti! - Fix Cause.hasInterruptsOnly to return false for empty causes.

  • #1620 7517908 Thanks @kitlangton! - Fix TaggedUnion.match to use Unify for return types, allowing branches to return distinct Effect types that are properly merged.

  • #1680 a49ecd5 Thanks @KhraksMamtsov! - make HttpClientResponse pipeable

  • #1681 6993e33 Thanks @mikearnaldi! - Add an optional message field to Effect.ignore and Effect.ignoreCause for custom log output.

  • #1695 514f2a2 Thanks @gcanti! - Remove unused APIs from the Utils module.

  • #1644 3214b47 Thanks @patroza! - fix: update Service interface to use ‘this: void’ in ‘of’ method signatures

  • #1693 95ec5ed Thanks @tim-smart! - fix cli subcommand context

4.0.0-beta.29

Patch Changes

  • #1672 9d93adb Thanks @gcanti! - Add Newtype module.

  • #1677 b52721c Thanks @gcanti! - Fix Schema.isUUID so the version parameter is optional in its public signature.

  • #1667 a891c7b Thanks @tim-smart! - Preserve Atom.withReactivity(...) refresh behavior when registry initial values seed the wrapped atom.

  • #1678 ef26cdf Thanks @tim-smart! - Abort HTTP client requests when response streams are consumed only partially.

  • #1665 82fd3ed Thanks @tim-smart! - Remove placeholder fallback behavior from CLI prompt inputs now that default values are prefilled.

4.0.0-beta.28

Minor Changes

  • #1637 42bc7ce Thanks @tim-smart! - Add a new effect/unstable/http/HttpStaticServer module for static file serving with MIME resolution, directory index fallback, SPA fallback, and safe path resolution.

Patch Changes

  • #1659 ff533f2 Thanks @tim-smart! - Persist MCP HTTP session and protocol headers after initialize so follow-up JSON-RPC requests include MCP-Protocol-Version.

  • #1663 dc803ee Thanks @tim-smart! - Add HttpServerResponse.fromClientResponse for directly converting client responses into server responses.

  • #1657 d660b1c Thanks @tim-smart! - Add Ctrl-U line clearing support to editable CLI prompts.

  • #1645 93a05e3 Thanks @gijsbartman! - ensure transformed Atom’s don’t extend idle ttl

  • #1655 2a65cf6 Thanks @tim-smart! - Make AtomRpc.query and AtomHttpApi.query return 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 a561a40 Thanks @tim-smart! - Add HttpServerRequest.toClientRequest for direct server-to-client request conversion.

  • #1648 29cd24d Thanks @gcanti! - Fix Types.VoidIfEmpty to correctly detect empty object types. Remove deprecated Types.MatchRecord in favor of the simplified implementation, closes #1647.

  • #1664 662a8e6 Thanks @tim-smart! - Add HttpServerRequest.fromClientRequest for direct client-request-backed server request conversion.

  • #1656 d2b52ba Thanks @tim-smart! - Persist MCP client capability context across HTTP requests by resolving initialized payloads through the standard Mcp-Session-Id HTTP header in McpServer.

    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 read McpServer.clientCapabilities.

  • #1639 407c3b4 Thanks @tim-smart! - Add Scheduler.PreventSchedulerYield and expose it via References so fibers can skip scheduler shouldYield checks when needed.

  • #1649 e741322 Thanks @tim-smart! - Set Schema.TaggedErrorClass instance name to the tag value, matching Data.TaggedError behavior.

  • #1646 5c75fa8 Thanks @tim-smart! - Simplify internal and documented request usage by passing request resolvers directly to Effect.request instead of wrapping them with Effect.succeed.

  • #1641 747177b Thanks @tim-smart! - Don’t transform Tool result schemas, as they aren’t sent to the providers as json schemas

  • #1636 326cd48 Thanks @tim-smart! - Add Cookies.expireCookie / expireCookieUnsafe and HttpServerResponse.expireCookie / expireCookieUnsafe for emitting expired cookies.

  • #1653 627e922 Thanks @tim-smart! - expose mcp client capabilities

  • #1660 662287e Thanks @tim-smart! - Add HttpServerResponse.toClientResponse for converting server responses into HttpClientResponse values.

4.0.0-beta.27

Patch Changes

  • #1621 903a839 Thanks @kitlangton! - unstable/http Headers: add removeMany combinator for removing multiple headers at once

  • #1622 91a0168 Thanks @tim-smart! - Add Model.BooleanSqlite, a model field schema that uses 0 | 1 encoding for database variants and plain boolean encoding for JSON variants.

  • #1631 c890f9a Thanks @gcanti! - unstable/httpapi HttpApiBuilder: fix void responses producing a non-empty body instead of Response.empty, closes #1628.

  • #1618 1e985f2 Thanks @tim-smart! - Default Effect.context() to Effect.context<never>() when no type parameter is provided.

4.0.0-beta.26

Patch Changes

  • #1603 fb21462 Thanks @tim-smart! - Add responseText to AiError.StructuredOutputError and populate it from LanguageModel.generateObject so failed structured output decodes include the full LLM text.

  • #1613 2ed26b1 Thanks @lucas-barake! - Add disableFatalDefects to RpcServer.layerHttp, RpcServer.toHttpEffect, and RpcServer.toHttpEffectWebsocket option types to match existing runtime support.

  • #1599 e832a57 Thanks @tim-smart! - add trait for customizing exit codes

  • #1611 7f01be7 Thanks @WebWalks! - Fixed the Error Type on AtomHttpApiClient (Server errors were being incorrectly reported, and we could not determine _tag to handle)

  • #1612 e965143 Thanks @tim-smart! - Expose the optional orElse fallback parameter in Effect.catchTags.

  • #1606 b9b80f1 Thanks @gcanti! - Schema: toJsonSchemaDocument now emits JSON Schema false for unannotated Never index signatures (including additionalProperties) instead of { not: {} }. Annotated Never still emits a schema object so metadata like description is preserved.

  • #1607 98252aa Thanks @gcanti! - Schema: improve Schema.Unknown / Schema.ObjectKeyword handling in toCodecJson and toCodecStringTree

  • #1616 56fbd94 Thanks @lucas-barake! - Add Atom.swr to effect/unstable/reactivity for staleTime-gated stale-while-revalidate reads, optional mount and window-focus revalidation, and forceful manual refresh.

  • #1600 3faa109 Thanks @tim-smart! - add args to Stdio service

  • #1610 692ecfe Thanks @kitlangton! - Refine unstable CLI parent/subcommand flag composition.

    • Add Command.withSharedFlags conflict validation against existing subcommands, including the withSubcommands(...).withSharedFlags(...) composition order.
    • Reorder Command type parameters to Command<Name, Input, ContextInput, E, R> for clearer parent-context modeling.
    • Make Command.withSubcommands input typing sound for downstream input-based combinators by reflecting that subcommand paths only carry parent context input.
  • #1604 1e70b72 Thanks @lucas-barake! - Fix unstable/sql/SqlSchema request input typing so findAll and findNonEmpty accept Request["Type"] instead of Request["Encoded"].

  • #1602 ecf0782 Thanks @tim-smart! - Replace the default HttpApi schema-validation error with HttpApiError.BadRequestNoContent.

4.0.0-beta.25

Patch Changes

  • #1597 fa17bb5 Thanks @tim-smart! - Fix Effect.forkScoped data-first typings to include Scope in requirements.

  • #1598 f46e5b5 Thanks @tim-smart! - compare transaction connections by reference

  • #1596 ce4767c Thanks @tim-smart! - improve HttpClient.withRateLimiter initial state tracking

  • #1594 c830a8b Thanks @tim-smart! - HttpClient.withRateLimiter adds delay from retry-after headers

4.0.0-beta.24

Patch Changes

  • #1586 a909e1c Thanks @gcanti! - Schema: add Chunk schema, closes #1585.

  • #1588 8814a4e Thanks @gcanti! - Fix Schema.toTaggedUnion discriminant detection for class-based schemas, including unique symbol tags, closes #1584.

  • #1591 3f942c5 Thanks @tim-smart! - Add HttpClient.withRateLimiter for integrating the RateLimiter service with HTTP clients, including optional response-header driven limit updates and automatic 429 retry behavior.

  • #1583 774ed59 Thanks @patroza! - feat: Support Reference classes

  • #1592 f54b8d3 Thanks @tim-smart! - Fix HttpApi.prefix so it updates endpoint path types the same way HttpApiGroup.prefix does.

4.0.0-beta.23

Patch Changes

  • #1561 5c73c41 Thanks @gcanti! - SchemaRepresentation: only create references for recursive/mutually recursive schemas and schemas with an identifier annotation, closes #1560.

4.0.0-beta.22

Patch Changes

  • #1578 0874332 Thanks @tim-smart! - Proxy function arity from Effect.fn APIs so wrapped functions preserve the original length value.

  • #1580 c592dcd Thanks @tim-smart! - simplify Filter by removing Args type parameter

  • #1575 1dbe28d Thanks @tim-smart! - fix Chat constructor types

  • #1581 564d730 Thanks @tim-smart! - fix Duration.toMillis regression

  • #1579 3cfadc4 Thanks @tim-smart! - Remove fiber-level keep-alive intervals and keep the process alive from Runtime.makeRunMain instead.

  • #1571 6634fd0 Thanks @tim-smart! - Add HttpApiClient.urlBuilder for type-safe endpoint URL construction from group + method/path keys.

  • #1573 d10dabe Thanks @tim-smart! - Expose a chunkSize option on Stream.fromIterable to control emitted chunk boundaries when constructing streams from iterables.

  • #1574 f82f549 Thanks @tim-smart! - Fix AI tool handler error typing so LanguageModel.generateText with a toolkit exposes wrapped AiError values rather than leaking raw AiErrorReason in the error channel.

  • #1577 78a3382 Thanks @tim-smart! - fix VariantSchema.Union