Skip to content

effect@4.0.1

Choose a tag to compare

@effect-bot effect-bot released this 04 Oct 21:51
· 3 commits to main since this release
460272d

Patch Changes

  • #8603 ed2cc2f Thanks @danieljvdm! - Preserve all Anthropic system instructions and support configurable mid-conversation system messages. Add optional LanguageModel.supportsSystemMessagesInHistory to query support with scoped overrides.

  • #8680 58a2ee8 Thanks @danieljvdm! - Cache per-tool response schemas and parameter-mode copies to reduce schema construction in LanguageModel.generateText and LanguageModel.streamText. The schema cache also applies to direct calls to Response.Part, Response.StreamPart and Response.AllParts.

  • #8719 bc44526 Thanks @tim-smart! - Treat interruption as abandonment in Effect.cached, Effect.cachedWithTTL, Effect.cachedInvalidateWithTTL, Cache, ScopedCache, RcRef, RcMap and the cluster ResourceMap. Concurrent callers share one computation that is interrupted only after every caller has been interrupted, interrupted results are never cached, and a call made while an abandoned computation is still finalizing starts a fresh one.

  • #8734 073bb47 Thanks @pawelblaszczyk5! - Adjust Effect.cachedInvalidateWithTTL types to accept callbacks that select a TTL from the computation's Exit, including piped calls.

  • #8659 2ec021e Thanks @samueleguino97! - Prevent entity registration when shard ownership is lost during construction. Pending requests retry on the new owner.

  • #8662 cad1118 Thanks @tim-smart! - Avoid replaying suspended cluster workflows for unawaited deferred checkpoints while preserving interrupt wakes.

  • #8637 1672d9c Thanks @tim-smart! - Fix cluster defect recovery to replay unfinished requests without duplicating requests awaiting their first dispatch. Stop replay and interrupt waiting requests on shutdown, and prevent superseded rebuilds from publishing stale handlers or SQL lock connections.

  • #8741 a81e4e6 Thanks @tim-smart! - Prevent PostgreSQL deadlocks between cluster message claims and shard or address resets by locking reset rows in message order.

  • #8707 f5c2a91 Thanks @tim-smart! - Fix zoned DateTime conversion on runtimes that omit Intl fractional seconds, preserving milliseconds for pre-epoch timestamps.

  • #8629 498e72b Thanks @tim-smart! - Preserve a fiber's AsyncLocalStorage context when another fiber wakes or interrupts it. Run Effect.tryPromise error handlers in the resumed fiber's context.

  • #8675 cabf123 Thanks @IMax153! - Fix HashRing.getShards returning different shard assignments for the same nodes and weights after different add/remove histories. Sum weights in node-key order and break hash ties by node key. Assignments may change for fractional weights or hash ties.

  • #8706 a5b1d4e Thanks @tim-smart! - Prevent HttpApiSchemaError from being reported as a server failure for invalid requests.

  • #8737 878cb33 Thanks @tim-smart! - Log client-abort-only HTTP request causes as "Sent HTTP response" rather than an interrupt error, while preserving response status annotations and logging other causes.

  • #8685 5e6f756 Thanks @tim-smart! - Fix HttpTraceContext decoding of B3 debug and legacy sampling values, and reject all-zero W3C trace and parent IDs.

  • #8652 18dfb98 Thanks @mikearnaldi! - Preserve pending interruptions when an uninterruptible effect fails. Drop typed failures when interruption skips recovery handlers, but keep defects.

  • #8657 04706ef Thanks @schickling-assistant! - Fix JSON Schema pattern importing for valid expressions whose RegExp source is canonicalized, including slashes, empty patterns, and literal line terminators.

  • #8723 f157482 Thanks @serhii-indyrct! - Fix encoding optional MCP fields whose schemas decode to classes, such as Implementation.icons.

  • #8644 b5a2d4c Thanks @sbking! - Prevent shard lock refreshes from releasing shards acquired while the refresh is in flight.

  • #8660 1c18c68 Thanks @tim-smart! - Prevent singleton shard reassignment from durably cancelling outstanding RPC requests.

  • #8705 43416c4 Thanks @tim-smart! - Honor If-Range in HttpStaticServer, returning the full file when the entity-tag is stale or weak instead of serving a partial response. Reject date validators because filesystem metadata cannot establish their strength.

  • #8704 d6ac8f9 Thanks @tim-smart! - Fix Stream.scan to emit its initial state for empty streams.

  • #8698 1d9fb8c Thanks @bishil06! - Fix accumulated rate drift in Stream.throttle with the "shape" strategy by retaining token debt after early wake-ups. Use monotonic time so wall clock changes do not affect throttling.

  • #8664 20dcd50 Thanks @lloydrichards! - Preserve server and client extension capabilities in stateful MCP protocols.

  • #8653 42e5750 Thanks @lloydrichards! - Keep idle MCP HTTP subscriptions open on Cloudflare Workers with SSE keepalives.

  • #8679 888e326 Thanks @tim-smart! - Fix Pool usage TTL to expire only idle, unreserved excess items, oldest idle first. Measure idle time from the last release to avoid retiring recently used items.

  • #8648 0b52bb4 Thanks @dv-waynehaffenden! - Fix RpcClient stream interruption leaving chunk delivery blocked on a full buffer and stalling the shared protocol receive loop.

  • #8627 e823e69 Thanks @tim-smart! - Keep streaming RPC chunk decode failures local to the affected request and interrupt it on the server, without disconnecting unrelated requests.

  • #8658 962647b Thanks @tim-smart! - Fix RpcClient protocol errors incorrectly failing requests started synchronously by error handlers. Only requests pending when the error broadcast begins now receive that error; new requests remain pending for their own responses.

  • #8714 43fdcdc Thanks @jaideeppyne! - Fix RPC stdio shutdown to drain responses after stdin EOF.

  • #8618 1f89b8e Thanks @serhii-indyrct! - Set ScopedCache entry expiry before waking lookup waiters, so a zero-TTL result cannot be reused.

  • #8718 e1a521a Thanks @juliusmarminge! - Pause schedules while Stream.aggregateWithin, Stream.groupedWithin and Stream.aggregate are idle. When a schedule ends, emit the current aggregation and drain sink leftovers without further upstream pulls.