Skip to content

Effect

4.0.0-beta.21

Patch Changes

  • #1555 e691909 Thanks @tim-smart! - fix Stream.withSpan options

  • #1548 d5f413f Thanks @effect-bot! - Fix TxPubSub.publish and TxPubSub.publishAll overloads to require Effect.Transaction in their return environment.

  • #1557 139d152 Thanks @A386official! - Fix MCP resource template parameter names resolving as param0, param1 instead of actual names by checking isParam on the original schema before toCodecStringTree transformation.

  • #1547 947e3d4 Thanks @effect-bot! - Fix Schedule.reduce to persist state updates when the combine function returns a synchronous value.

  • #1545 84b2cce Thanks @effect-bot! - Fix TupleWithRest post-rest validation to check each tail index sequentially.

  • #1552 7f5305e Thanks @tim-smart! - Constrain HttpServerRequest.source to object and key server-side request weak caches by request.source so middleware request wrappers share the same cache entries.

  • #1556 9e6fd84 Thanks @tim-smart! - rename WorkflowEngine.layer

  • #1558 fdb8a4b Thanks @tim-smart! - Fix Workflow.executionId to use schema makeUnsafe instead of the removed .make API.

  • #1553 0f986ef Thanks @kaylynb! - Fix spans never having parent span

  • #1541 9355fc0 Thanks @tim-smart! - Add Effect.findFirst and Effect.findFirstFilter for short-circuiting effectful searches over iterables.

4.0.0-beta.20

Patch Changes

  • #1533 842a624 Thanks @tim-smart! - move ChildProcess apis into spawner service

  • #1536 4785eef Thanks @tim-smart! - add Context.Key type, used a base for Context.Service and Context.Reference

  • #1531 8fac95b Thanks @gcanti! - Revert Config.withDefault to v3 behavior, closes #1530.

    Make Config.withDefault accept an eager value instead of LazyArg, aligning with CLI module conventions.

  • #1535 12ee8e2 Thanks @tim-smart! - change default ErrorReporter severity to Info

  • #1529 e542c94 Thanks @tim-smart! - Add dedicated AiError metadata interfaces per reason so provider packages can safely augment metadata without conflicting module declarations.

  • #1531 8fac95b Thanks @gcanti! - Fix Config.withDefault type inference, closes #1530.

  • #1528 6f4ebd1 Thanks @tim-smart! - Add Model.ModelName and provide it from AI model constructors.

  • #1537 989d1cc Thanks @tim-smart! - Revert Effect.partition to 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 01e31fd Thanks @mikearnaldi! - Add transactional STM modules: TxDeferred, TxPriorityQueue, TxPubSub, TxReentrantLock, TxSubscriptionRef.

    Refactor transaction model: remove Effect.atomic/Effect.atomicWith, add Effect.withTxState. All Tx operations now return Effect<A, E, Transaction> requiring explicit Effect.transaction(...) at boundaries.

    Expose TxPubSub.acquireSubscriber/releaseSubscriber for composable transaction boundaries. Fix TxSubscriptionRef.changes race condition ensuring current value is delivered first.

    Remove TxRandom module.

Patch Changes

  • #1518 0890aab Thanks @IMax153! - Fix Command.withGlobalFlags type inference when mixing GlobalFlag.action and GlobalFlag.setting.

    Setting service identifiers are now correctly removed from command requirements in mixed global flag arrays.

  • #1520 725260b Thanks @IMax153! - Ensure that OpenAI JSON schemas for tool calls and structured outputs are properly transformed

4.0.0-beta.17

Patch Changes

  • #1516 8f59c32 Thanks @gcanti! - Fix Schema.encodeKeys to encode non-remapped struct fields during encoding.

4.0.0-beta.16

Patch Changes

  • #1513 bf9096c Thanks @gcanti! - Add SchemaParser.makeOption and Schema.makeOption for constructing schema values as Option.

  • #1508 29f81ca Thanks @gcanti! - Schema: add OptionFromUndefinedOr and OptionFromNullishOr schemas.

  • #1498 68eb28c Thanks @kaylynb! - Fix OpenApi Multipart file upload schema generation

4.0.0-beta.15

Patch Changes

  • #1500 24ae609 Thanks @qadama831! - Unwrap _Success schema to enable field access.

  • #1486 0e3c059 Thanks @tim-smart! - Fix Stream.groupedWithin to stop emitting empty arrays when schedule ticks fire while upstream is idle.

  • #1503 e843b0a Thanks @tim-smart! - allow creating standalone http handlers from HttpApiEndpoints

  • #1499 f4389a2 Thanks @tim-smart! - fix atom node timeout cleanup

  • #1494 5b73de0 - Refine ExtractServices to omit tool handler requirements when automatic tool resolution is explicitly disabled through the disableToolCallResolution option.

  • #1496 595d2d6 Thanks @IMax153! - Refactor unstable CLI global flags to command-scoped declarations.

    Breaking changes

    • Remove GlobalFlag.add, GlobalFlag.remove, and GlobalFlag.clear
    • Add Command.withGlobalFlags(...) as the declaration API for command/subcommand scope
    • Change GlobalFlag.setting constructor to curried form which carries type-level identifier:
      • before: GlobalFlag.setting({ flag, ... })
      • after: GlobalFlag.setting("id")({ flag })
    • 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 Flag combinators (optional, withDefault) rather than setting constructor defaults

4.0.0-beta.14

Patch Changes

  • #1471 c414700 Thanks @IMax153! - Make CLI global settings directly yieldable and simplify built-in names.

    GlobalFlag.setting now takes { flag, defaultValue } and returns a setting that is a Context.Reference, so handlers and Command.provide* effects can yield* global setting values directly.

    Built-in settings keep internal behavior in runWith (for example, --log-level still configures References.MinimumLogLevel) while also being readable as values.

    Also renamed built-in globals:

    • GlobalFlag.CompletionsFlag -> GlobalFlag.Completions
    • GlobalFlag.LogLevelFlag -> GlobalFlag.LogLevel
  • #1490 a30c969 Thanks @gcanti! - Fix OpenApi.fromApi preserving multiple response content types for one status code, closes #1485.

4.0.0-beta.13

Patch Changes

  • #1454 368f4c3 Thanks @lucas-barake! - Expose NoSuchElementError in the error type of stream-based Atom.make overloads.

  • #1469 db8a579 Thanks @tim-smart! - Update unstable schema variant helpers to use array-based arguments for FieldOnly, FieldExcept, and Union, aligning VariantSchema and Model with other v4 API shapes.

  • #1457 668b703 Thanks @tim-smart! - Run request resolver batch fibers with request services by using Effect.runForkWith, so resolver delay effects and runAll execution see the request service map.

  • #1461 d40e76b Thanks @mikearnaldi! - Fix Schedule.fixed double-executing the effect due to clock jitter.

    The elapsedSincePrevious > window check 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 6e18cf8 Thanks @gcanti! - Use the identifier annotation as the expected message when available, closes #1458.

  • #1475 86062e8 Thanks @tim-smart! - Add a CI check job that runs pnpm ai-docgen and fails if it produces uncommitted changes.

  • #1448 c27ce75 Thanks @IMax153! - Refactor CLI built-in options to use Effect services with GlobalFlag

    Built-in CLI flags (--help, --version, --completions, --log-level) are now implemented as Effect services using Context.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 GlobalFlag module exports:

    • Action<A> and Setting<A> types for different flag behaviors
    • Help, Version, Completions, LogLevel references for built-in flags
    • add, remove, clear functions for managing global flags

    Example:

    const app = Command.make("myapp");
    Command.run(app, { version: "1.0.0" }).pipe(
    GlobalFlag.add(CustomFlag, customFlagValue),
    );
  • #1468 e2d4fbf Thanks @lucas-barake! - Fix Rpc.ExtractProvides to use middleware service ID instead of constructor type.

  • #1465 114ab42 Thanks @lloydrichards! - tighten Schema on _meta fields in McpSchema; closes #1463

  • #1470 484caec Thanks @tim-smart! - Add Command.withAlias for unstable CLI commands, including subcommand parsing by alias and help output that renders aliases as name, alias in subcommand listings.

4.0.0-beta.12

Patch Changes

  • #1439 70a74e8 Thanks @gcanti! - Add Config.nested combinator to scope a config under a named prefix, closes #1437.

  • #1452 b5b6e10 Thanks @tim-smart! - make fiber keepAlive setInterval evaluation lazy

  • #1431 f5ce5a9 Thanks @tim-smart! - Add Random.nextBoolean for generating random boolean values.

  • #1450 a29eb70 Thanks @tim-smart! - use cause annotations for detecting client aborts

  • #1445 c7b36e5 Thanks @mattiamanzati! - Fix Graph.toMermaid to escape special characters using HTML entity codes per the Mermaid specification.

  • #1443 9381d6d Thanks @mikearnaldi! - Fix HttpClient.retryTransient autocomplete leaking Schedule internals by splitting the {...} | Schedule union into separate overloads.

  • #1444 88439f1 Thanks @gcanti! - Schema.encodeKeys: relax input constraint from Struct to schemas with fields so Schema.Class works, closes #1412.

  • #1438 e35307d Thanks @mikearnaldi! - Atom.searchParam: decode initial URL values correctly when a schema is provided

  • #1425 c7df4bc Thanks @candrewlee14! - Fix LanguageModel stripping of resolved approval artifacts across multi-round conversations.

    Previously, stripResolvedApprovals only 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.streamText persists them to history, preventing re-resolution on subsequent rounds.

  • #1453 accaf3b Thanks @tim-smart! - allow mcp errors to be encoded correctly

  • #1440 3e1c270 Thanks @lloydrichards! - extend McpSchema to work with extensions

  • #1447 6cd81f7 Thanks @tim-smart! - remove all non-regional service usage

  • #1451 f222da3 Thanks @tim-smart! - Add Effect.annotateLogsScoped to apply log annotations for the current scope and automatically restore previous annotations when the scope closes.

  • #1434 61f901d Thanks @tim-smart! - Fix JSON-RPC serialization to return an object for non-batched requests while preserving array responses for true batch requests.