Skip to content

Effect

4.0.0-beta.41

Patch Changes

  • #1881 36f5c21 Thanks @gcanti! - Added BigDecimal.sumAll and BigDecimal.multiplyAll for feature parity with Number and BigInt, closes #1880.

  • #1869 d8ce758 Thanks @gcanti! - Schema: collapse same-type literal branches in JSON Schema output into a single enum array, closes #1868.

    Before:

    {
    "anyOf": [
    { "type": "string", "enum": ["A"] },
    { "type": "string", "enum": ["B"] }
    ]
    }

    After:

    {
    "type": "string",
    "enum": ["A", "B"]
    }
  • #1879 11aab4c Thanks @tim-smart! - Highlight active option labels in Prompt.select and Prompt.multiSelect using cyan text so selection state is visible beyond the pointer / checkbox icon.

  • #1884 3bc1efb Thanks @tim-smart! - Fail RpcClient HTTP requests when the server response contains no RPC messages instead of leaving requests pending.

  • #1875 70e724e Thanks @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 738dee7 Thanks @tim-smart! - Track ManagedRuntime fibers in a scope

  • #1886 2111963 Thanks @tim-smart! - add ClusterSchema.WithTransaction annotation

  • #1877 198a553 Thanks @tim-smart! - allow Context.Key to be covariant

4.0.0-beta.40

Patch Changes

  • #1863 f62860f Thanks @tim-smart! - fix issues with metro bundler

  • #1866 973f281 Thanks @tim-smart! - add Stream.timeoutOrElse

4.0.0-beta.39

Patch Changes

  • #1844 f91fd3d Thanks @tim-smart! - Relax HttpApiClient.urlBuilder to accept HttpApi.Any instead of requiring HttpApi.AnyWithProps. This allows use in helpers generic over HttpApi.Any while preserving inferred URL builder types.

  • #1851 edaae9d Thanks @tim-smart! - Re-export additional core runtime references from effect/References, including logger and error reporter references.

  • #1856 b47db0b Thanks @gcanti! - Fix Struct utility return types (for example pick) to preserve the previous simplified shape instead of exposing raw utility types like Pick<T, K>, closes #1855.

  • #1849 82d3c8e Thanks @tim-smart! - Fix the Queue.takeN documentation example to end the queue before showing a partial batch.

  • #1848 7c22b31 Thanks @tim-smart! - Remove Schedule.compose in favor of Schedule.both, and update schedule examples to use Schedule.both.

4.0.0-beta.38

Patch Changes

  • #1842 f4dbe5b Thanks @gcanti! - Schema: rename MakeOptions.disableValidation to disableChecks. Apply constructor defaults when disableChecks is true, closes #1841.

  • #1837 a71a607 Thanks @kitlangton! - Fix HttpApiBuilder security middleware caching so separate handler builds do not reuse the first provided middleware implementation.

  • #1840 66a0494 Thanks @tim-smart! - Rename HttpApiClient request option withResponse to responseMode and add support for responseMode: "response-only" to return the raw HttpClientResponse without decoding.

  • #1838 5ef7218 Thanks @tim-smart! - Update HttpApiClient.urlBuilder to mirror client shape, and encode params/query via endpoint schemas before building URLs.

  • #1700 472d260 Thanks @tim-smart! - add useCodecs option to HttpClientEndpoint constructors

4.0.0-beta.37

Patch Changes

  • #1812 f7a0b71 Thanks @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 1e223c3 Thanks @tim-smart! - unstable/http HttpClientRequest: add toWeb and fromWeb conversions for web Request objects

  • #1829 53740f4 Thanks @tim-smart! - Fix sql migrator lock handling to only treat duplicate migration-row inserts as a concurrent migration lock.

  • #1831 8c7cf89 Thanks @tim-smart! - Fix Schedule.fixed to run the next iteration immediately when the previous action takes longer than the configured interval.

  • #1833 b6b81a9 Thanks @tim-smart! - Fix Unify.unify so unions of Effect values collapse to a single unified Effect type again.

  • #1825 8f4c1f9 Thanks @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 with forkChild and Fiber.await in the finalizer so the stream drains naturally after the queue is failed.

  • #1824 f2479f9 Thanks @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 c919921 Thanks @j! - HttpServerResponse: fix fromWeb to preserve Content-Type header when response has a body

    Previously, when converting a web Response to an HttpServerResponse via fromWeb, the Content-Type header was not passed to Body.stream(), causing it to default to application/octet-stream. This affected any code using HttpApp.fromWebHandler to wrap web handlers, as JSON responses would incorrectly have their Content-Type set to application/octet-stream instead of application/json.

  • #1821 7af90c2 Thanks @gcanti! - Schema: relax asserts and is constraints.

  • #1822 f3be185 Thanks @tim-smart! - improve runSync error when executing async effects

4.0.0-beta.36

Patch Changes

  • #1793 60fcbcc Thanks @tim-smart! - Ensure streamed tool results are emitted before the finish part so chat history includes tool outputs before stream termination.

  • #1762 0a60837 Thanks @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 49164d2 Thanks @tim-smart! - Fix Effect.cachedWithTTL and Effect.cachedInvalidateWithTTL to start TTL expiration when the cached value is produced instead of when computation starts.

  • #1808 334b6e4 Thanks @tim-smart! - Backport Cron.prev with reverse lookup tables and cron stepping logic, including DST-aware reverse traversal.

  • #1789 5700695 Thanks @mikearnaldi! - Fix Stream.scanEffect hanging and repeatedly emitting the initial state.

  • #1810 f8f4456 Thanks @tim-smart! - Support key-derived idleTimeToLive in LayerMap options (make, fromRecord, and LayerMap.Service) and add LayerMap tests for dynamic TTL behavior.

  • #1802 969d24f Thanks @kitlangton! - PubSub.publish and PubSub.publishAll now return false on shutdown instead of interrupting, matching Queue.offer semantics.

  • #1796 851eda0 Thanks @tim-smart! - Improve Prompt.file to support incremental filtering while typing, including backspace and ctrl-u handling.

  • #1806 8059c1c Thanks @tim-smart! - Fix a regression in PubSub.shutdown so shutting down a pubsub interrupts suspended subscribers (including takeAll) by ensuring subscriptions are scoped under the pubsub shutdown scope.

  • #1797 6f83295 Thanks @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 65f7f57 Thanks @kitlangton! - Schema: add decodeUnknownResult / decodeResult and encodeUnknownResult / encodeResult helpers for synchronous Result-based parsing.

  • #1798 e7fabd2 Thanks @gcanti! - Schema: allow using Struct type helpers directly, e.g. Schema.Struct.Type<F> instead of Schema.Schema.Type<Schema.Struct<F>>.

  • #1794 89c3e98 Thanks @tim-smart! - Fix ai LanguageModel streaming finish parts so finish events are always emitted when a toolkit is provided.

  • #1785 53794ab Thanks @KhraksMamtsov! - add missing Equivalence.Date

4.0.0-beta.35

Patch Changes

  • #1782 9252b43 Thanks @gcanti! - Add Schema.ArrayEnsure.

  • #1784 7daf387 Thanks @gcanti! - Add Config.Success type utility, closes #1783.

  • #1778 e1664a3 Thanks @tim-smart! - Allow Effect.acquireRelease release finalizers to depend on the surrounding environment.

  • #1777 fdaa6e0 Thanks @tim-smart! - Remove an unreachable array branch in decodeJsonRpcRaw to simplify JSON-RPC decode logic without changing behavior.

  • #1774 19aa47e Thanks @tim-smart! - Align CLI help flag and global flag descriptions to a single column even when some flag names are very long.

  • #1780 c667dad Thanks @tim-smart! - Fix LanguageModel incremental prompt fallback to reliably retry with the full prompt when an incremental request fails with InvalidRequestError.

  • #1781 764d150 Thanks @gcanti! - Fix DateTime.makeUnsafe incorrectly appending “Z” to date strings containing “GMT”

  • #1772 3c27098 Thanks @tim-smart! - make Layer.mock work with Stream and Channel

4.0.0-beta.34

Patch Changes

  • #1758 f2f75ee Thanks @tim-smart! - Use a normal Map in ResponseIdTracker and clear it on divergence / reset instead of reallocating a WeakMap.

  • #1764 342fc4b Thanks @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, with RequestResolver batching, embed / embedMany spans, provider error propagation, deterministic ordering, and empty-input embedMany fast-path behavior.
    • Add and align EmbeddingModel behavior tests in effect for embedding usage, batching, ordering, and error handling.
    • Add OpenAiEmbeddingModel in @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.
  • #1766 5d704ee Thanks @tim-smart! - Fix JSDoc wording for Effect.catch to consistently reference the current API name.

  • #1771 00add69 Thanks @tim-smart! - Add EmbeddingModel.ModelDimensions and require dimensions in embedding provider model constructors.

  • #1767 58217d3 Thanks @gcanti! - Add isMutableHashMap and isMutableHashSet, and align nominal guard implementations and tests across collections and transactional data types.

  • #1765 f4e2aba Thanks @tim-smart! - retry incremental prompt on invalid request

  • #1756 e3b44b6 Thanks @tim-smart! - add HttpApiMiddleware.layerSchemaErrorTransform

  • #1732 e1472b7 Thanks @KhraksMamtsov! - port Url module from v3

  • #1761 7686320 Thanks @gcanti! - Fix Tool.make type and runtime behavior when parameters is not provided.

4.0.0-beta.33

Patch Changes

  • #1754 571447d Thanks @tim-smart! - narrow types for Effect.retry/repeat while option

4.0.0-beta.32

Patch Changes

  • #1717 bf8fff8 Thanks @gcanti! - Schema: add OptionFromOptionalNullOr schema, closes #1707.

  • #1722 1af3ef3 Thanks @tim-smart! - Fix RpcSerialization.json decode so JSON array payloads are not wrapped in an extra outer array.

  • #1725 27fea0f Thanks @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
  • #1727 2ad6c1b Thanks @tim-smart! - Make all built-in HttpApiError classes implement HttpServerRespondable, so they can be returned directly from plain HTTP server handlers outside of HttpApi.

  • #1739 398ac3e Thanks @tim-smart! - Use predicate-based dual dispatch for Stream.merge so data-last calls with optional options are handled correctly.

  • #1741 51fe22f Thanks @tim-smart! - Add Layer.tap, Layer.tapError, and Layer.tapCause APIs for effectful observation of layer success and failure without changing layer outputs.

  • #1740 4605db6 Thanks @tim-smart! - Refactor call sites with multiple Context mutations to use Context.mutate for batched updates.

  • #1750 f4de1b0 Thanks @gcanti! - Improve unstable AI structured output handling for empty tool params and add Tool.EmptyParams, closes #1749.

  • #1525 60214f2 Thanks @tim-smart! - use Option instead of undefined | A

  • #1747 c4b8b0f Thanks @tim-smart! - seperate scheduler dispatch from yield decisions

  • #1729 6d9393a Thanks @tim-smart! - add Context.mutate

  • #1753 6de4efe Thanks @tim-smart! - Add dtslint coverage for Stream.catchIf to lock in predicate and refinement inference behavior in both data-first and data-last forms.

  • #1716 4f969d1 Thanks @gcanti! - Remove unused effect/NullOr module.

  • #1721 6cc67c8 Thanks @IMax153! - Correct the type of the schema parameter accepted by the fileSchema methods in the CLI to be Schema.Decoder<A>

  • #1709 8531a22 Thanks @mikearnaldi! - Add module-level helpers for Semaphore, Latch, and extracted PartitionedSemaphore operations.

  • #1752 b226760 Thanks @tim-smart! - simplify SubscriptionRef

  • #1743 47a51ab Thanks @tim-smart! - default ws close codes to 1001 in case they are undefined

  • #1728 1521d02 Thanks @tim-smart! - add graceful shutdown to http servers