Skip to content

Effect

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.

4.0.0-beta.11

Patch Changes

  • #1429 88659ed Thanks @tim-smart! - Add grouped subcommand support to Command.withSubcommands, including help output sections for named groups while keeping ungrouped commands under SUBCOMMANDS.

  • #1426 f2915e8 Thanks @tim-smart! - Add Effect.validate for validating collections while accumulating all failures, equivalent to the v3 Effect.validateAll behavior.

  • #1430 eb71ace Thanks @tim-smart! - Add Command.withExamples to attach concrete usage examples to CLI commands, expose them through HelpDoc.examples, and render them in the default help formatter.

  • #1415 2a16999 Thanks @mikearnaldi! - HashMap: compare HAMT bit positions as unsigned to preserve entry lookup when bit 31 is set

  • #1417 d42dd52 Thanks @mikearnaldi! - unstable/http Headers: hide inspectable prototype methods from for..in iteration to avoid invalid header names in runtime fetch polyfills

  • #1418 339adaf Thanks @mikearnaldi! - runtime: guard keepAlive setInterval / clearInterval so Effect.runPromise works in runtimes that block timer APIs

  • #1416 de19645 Thanks @mikearnaldi! - Queue.collect: stop duplicating drained messages by appending each batch once

  • #1413 9b1dc3b Thanks @gcanti! - Fix Schema.TupleWithRest incorrectly accepting inputs with missing post-rest elements, closes #1410.

  • #1409 e4cb2f5 Thanks @tim-smart! - add ErrorReporter module

  • #1427 8bced95 Thanks @tim-smart! - Add Command.annotate and Command.annotateMerge to unstable CLI commands, and include command annotations in HelpDoc so custom help formatters can access command metadata.

  • #1401 9431420 Thanks @tim-smart! - Add WorkflowEngine.layer, an in-memory layer for the unstable workflow engine.

  • #1428 948dca2 Thanks @tim-smart! - Add Command.withShortDescription and use short descriptions for CLI subcommand listings, with fallback to the full command description.

  • #1405 d18e327 Thanks @candrewlee14! - Strip resolved tool approval artifacts from prompt before sending to provider, preventing errors when providers reject pre-resolved approval requests.

  • #1424 ab512f7 Thanks @tim-smart! - expose more atom Node properties

4.0.0-beta.10

Patch Changes

  • #1396 371acab Thanks @gcanti! - Add unstable/encoding subpath export.

  • #1392 856d774 Thanks @tim-smart! - Fix a race in Semaphore.take where interruption could leak permits after a waiter was resumed.

  • #1388 b9e9202 Thanks @tim-smart! - Export Effect do notation APIs (Do, bindTo, bind, and let) from effect/Effect and add runtime and type-level coverage.

  • #1387 1d1a974 Thanks @tim-smart! - short circuit when Fiber.joinAll is called with an empty iterable

  • #1386 6bfe2a6 Thanks @tim-smart! - simplify http logger disabling

  • #1381 b12c811 Thanks @tim-smart! - Fix UrlParams.Input usage to accept interface-typed records in HTTP client and server helpers while keeping coercion constraints for url parameter values.

  • #1383 d17d98a Thanks @tim-smart! - Rename HttpClient.retryTransient option mode to retryOn and rename "both" to "errors-and-responses".

  • #1399 68c3c7c Thanks @tim-smart! - Add Random.shuffle to shuffle iterables with seeded randomness support.

4.0.0-beta.9

Patch Changes

  • #1376 3386557 Thanks @gcanti! - HttpApiEndpoint: relax params, query, and headers constraints to accept a full schema in addition to a record of fields.

  • #1379 b6666e3 Thanks @tim-smart! - Fix AtomHttpApi.query to forward v4 params / query request fields to HttpApiClient at runtime. Also align AtomHttpApi endpoint type inference with v4 HttpApiEndpoint params/query naming and add a regression test.

4.0.0-beta.8

Patch Changes

  • #1371 246e672 Thanks @IMax153! - Fix ChildProcess options type and implement PgMigrator

  • #1372 807dec0 Thanks @pawelblaszczyk5! - Remove superfluous error from SqlSchema.findAll signature