@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
md 263 KB

@effect/platform-node-shared

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #8829 66c796a Thanks @effect-bot! - Bound Node stream and socket pulls to at most chunkSize chunks (default 4096), preventing synchronously refilling sources from draining indefinitely in one pull. Add a chunkSize option to Node socket constructors and a separate readSize option for Node stream read(size) calls; callers previously using chunkSize for byte read sizes should use readSize instead. Set chunkSize: Infinity to opt into unbounded batching.

  • #8829 8f23668 Thanks @fubhy! - Replace effect/Crypto with family-specific effect/crypto/* services, opaque keys, CryptoError, a configurable WebCrypto reference and key schemas in effect/Schema. Encoding secret or private keys through byte/format schemas requires { allowEncode: true }.

### Breaking changes

  • Use SecureRandom for randomness and UUIDs, and Digest with algorithm values such as Digest.sha256 for hashing. Replace effect/testing/TestCrypto with Layer.mock for the required services.
  • Provide crypto explicitly; it is no longer included in the runtime *Services bundles. NodeCrypto, BunCrypto, DenoCrypto and BrowserCrypto offer individual family layers and a combined layer, supplying SecureRandom where needed. Core modules offer layerWebCrypto.
  • Provide Digest.Digest instead of Crypto.Crypto to SqlMessageStorage and SingleRunner, and instead of EventLogEncryption to SqlEventLogServerEncrypted.makeStorage and layerStorage. Replace EventLogEncryption.sha256String with digest.digestHex(Digest.sha256, bytes).

Existing workflow ID, activity idempotency key and event log table-name encodings are unchanged.

Event log encryption, identity key derivation and session authentication now run on Aead, Digest, Signature and SecureRandom. EventLogEncryption.make and EventLogEncryption.layer take those services from context, so Node apps can use the NodeCrypto layers. EventLogEncryption.layerSubtle and the session auth functions use the Web Crypto layers on the WebCrypto reference instead of globalThis.crypto. Existing identities, derived signing keys and encrypted batches are unchanged.

UUIDv7 and ULID generation is now monotonic below the maximum 48-bit timestamp, including within a millisecond and across clock rollback. Ordering is per SecureRandom instance; the unsafe helpers and model UUIDv7 defaults share per-realm ordering.

  • #10087 472c469 Thanks @effect-bot! - Node.js 22.19.0 (required by undici 8) is now the minimum for @effect/platform-node, @effect/platform-node-shared, @effect/opentelemetry and @effect/docgen, up from 18.

NodeSocket WebSocket clients now use Node's global WebSocket instead of ws, so client-only usage no longer bundles ws.

Breaking: ws moved to a new NodeWS module.

  • NodeSocket.NodeWS and BunSocket.NodeWS are removed. Import NodeWS from @effect/platform-node or @effect/platform-node-shared (on Bun, import ws directly). Use NodeWS.WebSocket in place of NodeSocket.NodeWS.default.
  • NodeSocket.layerWebSocketConstructorWS is removed. Use NodeWS.layerWebSocketConstructor.

Behaviour changes for clients that pass handshake headers, which previously used ws. Use NodeWS.layerWebSocketConstructor to keep the old behaviour:

  • Reads cannot be paused. Incoming frames are buffered without limit, and a configured highWaterMark fails the socket with a SocketReadError.
  • Connection errors are a generic ErrorEvent, so SocketOpenError causes lack the underlying error code.
  • The Socket.WebSocket service is a global WebSocket, so ws instanceof checks and ws-only methods such as terminate() and ping() no longer apply.
  • A custom Host header is ignored.
  • Outgoing messages are not compressed. Incoming permessage-deflate messages are still decompressed.
  • Connections use undici's global dispatcher instead of http.globalAgent / https.globalAgent.

    • #8829 d2b6bc7 Thanks @jpowersdev! - Add experimental Glob path matching and a shared FileSystem.glob implementation for Node, Bun, and Deno.
  • Breaking: custom FileSystem implementations, including inputs to FileSystem.make, must provide readDirectoryEntries; mapping readDirectory names to { name, type: "Unknown" } is supported. Wrappers must apply directory-listing changes to both methods.

  • FileSystem.make now derives glob instead of accepting it. Apply custom overrides afterward with FileSystem.of({ ...fs, glob: customGlob }).

  • Glob patterns use / separators and backslash escapes; Node extglobs no longer expand. Results use / separators and are relative to root unless the pattern is absolute. Deno wildcards now skip dotfiles unless explicitly named or dot: true; unreadable wildcard-reached directories are skipped, while read failures at the root or a leading literal directory propagate.

    • #8829 3d88452 Thanks @fubhy! - Add CommandLine to effect/process for quoting and joining command lines, and support Redacted arguments and env values in ChildProcess.

Migration:

  • ChildProcess.make templates keep quoted words together and throw a CommandLineError for shell syntax such as |, $HOME or *. Quote such characters or pass them with ${}.
  • With the shell option, templates cannot contain ${} values and extra arguments fail with BadArgument. Pass the whole script as the command, built with CommandLine.join.
  • StandardCommand.args and env values can be Redacted strings.
  • ChildProcess.TemplateExpression and ChildProcess.TemplateExpressionItem are removed. Use the CommandLine types of the same name.

    • #8829 89e5443 Thanks @jpowersdev! - Add Terminal.size, a scoped queue that starts with the current terminal dimensions and receives each resize. Custom terminals passed to Terminal.make must now supply size.

Patch Changes

4.0.7

Patch Changes

4.0.6

Patch Changes

4.0.5

Patch Changes

4.0.4

Patch Changes

4.0.3

Patch Changes

  • #8900 182e26d Thanks @effect-bot! - Add a noFollow option to FileSystem.open to reject symlinks at the final path component. Supported on Node and Bun on POSIX; Windows and Deno return BadArgument. Add { position } to File.read and File.readAlloc for concurrent reads that leave the cursor unchanged.

  • #8973 9dbd07e Thanks @fubhy! - Accept address inputs in Dns.reverse and name server inputs in the platform Dns services, and add Dns.nameServerFromInput.

  • #8953 d4f7dc3 Thanks @fubhy! - Add TLSA records to effect/net/Dns, with a Schema.DnsTlsaRecord schema whose JSON codec encodes the certificate association data as hex. The Node.js Dns service queries them with resolveTlsa (Node.js 22.15 or 23.9 and later); Bun, Deno, and older Node.js versions fail TLSA queries with Unsupported.

  • #8880 a9b5148 Thanks @fubhy! - Add experimental Host, Dns, and AddressResolver modules to effect/net for host parsing, DNS queries, and endpoint resolution, with Node, Bun, and Deno services. DNS operations accept and normalize domain-name strings; endpoint resolution also accepts host:port strings. Add scoped IPv6 literals and host and DNS record schemas, including JSON codecs for records.

Provide the services explicitly; they are not included in the platform *Services layers. Use NodeAddressResolver.layer.pipe(Layer.provideMerge(NodeDns.layer)) to provide both Node services.

4.0.2

Patch Changes

4.0.1

Patch Changes

4.0.0

Patch Changes

  • #8633 2c552f2 Thanks @IMax153! - Effect 4.0 is the first stable release of Effect v4. It replaces the 4.0.0 beta and release-candidate series, whose per-release notes remain below under the 4.0.0-beta.* and 4.0.0-rc.* headings. To upgrade from Effect 3, follow the migration guide.

Packaging and versioning

  • All Effect packages share one version number and are released together. Use the same version of effect and every @effect/* package.
  • @effect/platform, @effect/rpc, @effect/cluster, @effect/cli, @effect/ai, @effect/sql, @effect/workflow, @effect/experimental and similar packages are merged into effect. Separate packages remain only for platforms (@effect/platform-*), SQL drivers (@effect/sql-*), AI providers (@effect/ai-*), framework bindings (@effect/atom-*), OpenTelemetry, Vitest and tooling.
  • Modules such as effect/http, effect/http-api, effect/rpc, effect/cluster, effect/workflow, effect/ai, effect/cli, effect/sql and effect/schema import from effect/<area>. APIs tagged @stability unstable may have breaking changes in minor releases. APIs without a stability tag follow semver.
  • APIs that expose a third-party dependency are tagged @stability unstable, because that dependency's releases can change them. This covers NodeRedis, DenoRedis, BunRedis, @effect/platform-node/Undici and the undici dispatcher APIs, the ws options and re-exports in the platform packages, driver-specific options and clients in @effect/sql-clickhouse, @effect/sql-d1, @effect/sql-libsql, @effect/sql-mssql, @effect/sql-mysql2, @effect/sql-pglite and @effect/sql-sqlite-do, the provider clients, models and generated schemas in the @effect/ai-* packages, @effect/opentelemetry, and the vitest re-export in @effect/vitest.
  • effect has no runtime dependencies.
  • New packages in v4: @effect/platform-deno, @effect/sql-pglite, @effect/ai-openai-compat, @effect/ai-typesafe, @effect/atom-react, @effect/atom-solid, @effect/atom-vue, @effect/openapi-generator and @effect/doctest. @effect/docgen now lives in this repository.

Core

  • The fiber runtime was rewritten for lower memory use and faster execution, with smaller bundles and better tree-shaking.
  • Services are defined with Context.Service, FiberRef is replaced by Context.Reference, Cause has a flat structure, and many combinators were renamed. See the migration guide for the full list.
  • Software transactional memory is built into Effect.tx, with TxRef, TxQueue, TxHashMap, TxPubSub, TxSemaphore and related Tx* data types.
  • Clock separates wall-clock time from monotonic time.
  • New modules include Semaphore, Latch, LayerRef, ErrorReporter, ByteSize, Newtype and Crypto. Arbitrary is now a native property-based testing module and no longer depends on fast-check.

Schema

  • Schema v4 is a new implementation with faster parsing, class-based schemas, make constructors on every schema, and effectful decoding with services.
  • SchemaRepresentation powers JSON Schema (Draft-04, Draft-07, 2020-12 and OpenAPI 3.0/3.1) import and export, TypeScript code generation, and AI structured output.
  • SchemaBinary provides a compact binary codec and is the default wire format for cluster transports.
  • Optional JIT and AOT schema compilers are available as experimental modules.

Platform, HTTP and RPC

  • HttpApi supports typed response headers, streaming and SSE responses, the HTTP QUERY method, HttpApiTest for in-memory testing, and much faster type checking for large APIs.
  • The HTTP modules add static file serving, response compression, rate-limited clients and graceful server shutdown.
  • Socket has a pull-based reader with backpressure and STARTTLS support. Network addresses are modeled by effect/net.
  • RPC serialization is schema-aware and supports server-originated requests and notifications.
  • @effect/platform-deno adds full Deno support. The Node, Bun, Deno and browser packages all provide the platform Crypto service, and the browser package adds IndexedDB support.

Cluster and Workflow

  • Workflows can be declared with class syntax, and DurableQueue and an in-memory WorkflowEngine are available.
  • Runner memory can be bounded with ShardingConfig limits. Shutdown, entity movement and persisted replies are more reliable.

SQL

  • @effect/sql-pg uses a built-in PostgreSQL client with pipelining, prepared statements and binary codecs, and no longer depends on pg.
  • @effect/sql-sqlite-node uses Node's built-in node:sqlite and requires Node 22.16 or newer.
  • SqlError exposes structured reasons such as UniqueViolation.

AI

  • effect/ai adds EmbeddingModel, the DecisionModel classification and rating API, dynamic tools and tool approvals.
  • The MCP server supports protocol versions 2024-11-05 through 2026-07-28, including elicitation, sampling with tools, resource subscriptions and typed tool output.
  • Provider packages cover Anthropic, OpenAI, OpenAI-compatible APIs and OpenRouter.

CLI, Atom, observability and testing

  • effect/cli adds global flags, command aliases and examples, an interactive wizard mode, and shell completions for Bash, Zsh and Fish.
  • effect/reactivity and the @effect/atom-* bindings add SSR hydration, stale-while-revalidate atoms and serializable RPC and HttpApi queries.
  • The OTLP exporters can be configured with standard OpenTelemetry environment variables, and @effect/opentelemetry aligns logs and spans with the OpenTelemetry specification.
  • @effect/vitest runs property tests with the native Arbitrary module and supports Vitest fixtures.

Requirements

4.0.0-rc.118

Patch Changes

4.0.0-rc.117

Patch Changes

4.0.0-rc.116

Patch Changes

4.0.0-rc.115

Patch Changes

4.0.0-rc.114

Patch Changes

4.0.0-rc.113

Patch Changes

  • #8071 2f106a5 Thanks @javascript-unsafe! - Wake NodeStream.pipeThroughDuplex readers when the upstream fails so the original error is propagated instead of hanging.

  • #8018 ba2fd82 Thanks @tim-smart! - Wait for Node child process groups to exit during scoped release and kill.

After signalling a process group, both operations now wait for its leader and descendants. Without forceKillAfter, the wait is limited to one second and never escalates. With forceKillAfter, the group receives SIGKILL at the deadline, followed by a final wait of up to one second. Native timers keep escalation working under a TestClock, and cleanup no longer depends on stdio closing.

exitCode and isRunning remain tied to the leader's exit, and a leader that already exited successfully still leaves its group untouched. Process group checks count zombies, so cleanup may wait for the full bound under a non-reaping PID 1.

  • #7511 a4bb2aa Thanks @tim-smart! - Add NodeSocket.makeTls, NodeSocket.makeTlsChannel, and NodeSocket.layerTls for TLS client connections.

These mirror the existing makeNet family but dial tls.connect, so they take the full tls.ConnectionOptions set: trust anchors (ca), client certificates (cert / key), ALPN protocols, and servername. The socket opens once the handshake completes; a failed handshake fails with a SocketOpenError.

  • #7512 5664c94 Thanks @tim-smart! - Add NodeSocketServer.makeTls and NodeSocketServer.layerTls for TLS socket servers.

  • #7514 b76a1cf Thanks @tim-smart! - Add Socket.upgrade, for upgrading tcp sockets using STARTTLS

  • #7514 b76a1cf Thanks @tim-smart! - Use the node-shared socket server on Deno so accepted TCP connections support reader-scoped server TLS upgrades.

### Breaking changes

DenoSocketServer.make and layer now accept Node listen options. Use host instead of hostname for TCP and { path } instead of { transport: "unix", path } for Unix sockets. Deno 2.8.3 or newer is now required.

  • #7525 53843f6 Thanks @fubhy! - Add ByteSize module and use it across the ecosystem

  • #8110 4ab4e83 Thanks @tim-smart! - Prevent precision loss in Node/Bun filesystem operations and HttpPlatform file responses.

  • #8108 c85fc0b Thanks @tim-smart! - On Node and Deno, FileSystem.File.seek now rejects negative resulting positions with a BadArgument platform error, leaving the cursor unchanged. Its return type is now Effect<bigint, PlatformError>.

  • #8148 7999b07 Thanks @tim-smart! - Preserve the response Content-Type when compressing file, raw, stream, and byte-array responses on Node, Bun, Deno, and the web platform, including headers overridden after body construction.

  • #8112 a6ceb98 Thanks @tim-smart! - Fix File.readAlloc on Node and Deno to fail with PlatformError (BadArgument) for negative, fractional, non-finite, or unallocatable sizes without moving the cursor. Zero-size reads continue to return Option.none() without moving the cursor.

  • #7524 0a08ae0 Thanks @fubhy! - Add NetAddress under effect/unstable/net for MAC, IP, internet socket, and Unix socket addresses, with checked parsing, schemas, equality, canonical string serialization, and URL formatting. Companion modules IpInterface and IpNetwork represent IP interfaces and CIDR networks.

HTTP and socket servers now expose NetAddress.SocketAddress. Replace TCP hostname access with NetAddress.formatIp(address.address) and use UnixPathAddress.path for Unix sockets. URL helpers bracket IPv6 addresses and reject scoped IPv6. Bun and Deno HTTP server layers can now fail with ServeError when listener address conversion fails.

PostgreSQL inet values now use IpInterface; cidr values use IpNetwork and reject addresses with host bits set.

  • #7714 615c41e Thanks @kitlangton! - Prevent Node sinks from submitting buffered writes after interruption while waiting for writable backpressure.

  • #7712 d0a6c5e Thanks @kitlangton! - Fix NodeSink hanging when a writable reports an error during finalization.

  • #7838 500c60b Thanks @tim-smart! - Remove the ignored bufferSize option from NodeStream.

  • #7710 163cebd Thanks @kitlangton! - Fix watch event classification for targets outside the current working directory.

  • #7708 37cdd69 Thanks @kitlangton! - Allow File.writeAll to accept empty buffers.

  • #7728 0beaf69 Thanks @kitlangton! - Route pipeline handle input through the first process.

  • #7487 ba53b64 Thanks @tim-smart! - Redesign Socket around a scoped, pull-based reader with transport backpressure.

Socket now exposes reader and writer. Client reader acquisition dials and yields a pull of non-empty batches: one buffer for TCP and one entry per WebSocket frame. TCP applies backpressure while paused; pausable WebSockets pause at highWaterMark (64 KiB by default) and resume after draining. Browser WebSockets cannot pause, so they can fail with SocketReadError at a configured highWaterMark. Writes await native drain signals and batch with cork / uncork where available.

### Breaking changes

4.0.0-rc.112

Patch Changes

4.0.0-rc.111

Patch Changes

4.0.0-rc.110

Patch Changes

4.0.0-rc.109

Patch Changes

4.0.0-rc.108

Patch Changes

4.0.0-beta.107

Patch Changes

  • #7154 e74c302 Thanks @CDVolvik! - Pass Node's windowsHide flag for spawned Windows children by default (except detached processes), with an independent windowsHide option for callers that need visible GUI windows. Process-group cleanup now invokes taskkill without a cmd.exe wrapper and hides its window.
  • Updated dependencies [596f3f9, 9611ed4, 8b91605, d901928, b32bdef]:

4.0.0-beta.106

Patch Changes

4.0.0-beta.105

Patch Changes

4.0.0-beta.104

Minor Changes

  • #7076 0f721d4 Thanks @tim-smart! - Return the new file offset as a Size from File.seek.

Patch Changes

4.0.0-beta.103

Patch Changes

4.0.0-beta.102

Patch Changes

4.0.0-beta.101

Patch Changes

4.0.0-beta.100

Patch Changes

4.0.0-beta.99

Patch Changes

4.0.0-beta.98

Patch Changes

4.0.0-beta.97

Patch Changes

4.0.0-beta.96

Patch Changes

4.0.0-beta.95

Patch Changes

4.0.0-beta.94

Patch Changes

4.0.0-beta.93

Patch Changes

4.0.0-beta.92

Patch Changes

4.0.0-beta.91

Patch Changes

4.0.0-beta.90

Patch Changes

4.0.0-beta.89

Patch Changes

4.0.0-beta.88

Patch Changes

4.0.0-beta.87

Patch Changes

4.0.0-beta.86

Patch Changes

4.0.0-beta.85

Patch Changes

4.0.0-beta.84

Patch Changes

4.0.0-beta.83

Patch Changes

4.0.0-beta.82

Patch Changes

4.0.0-beta.81

Patch Changes

4.0.0-beta.80

Patch Changes

4.0.0-beta.79

Patch Changes

4.0.0-beta.78

Patch Changes

4.0.0-beta.77

Patch Changes

4.0.0-beta.76

Patch Changes

4.0.0-beta.75

Patch Changes

4.0.0-beta.74

Patch Changes

4.0.0-beta.73

Patch Changes

4.0.0-beta.72

Patch Changes

4.0.0-beta.71

Patch Changes

4.0.0-beta.70

Patch Changes

4.0.0-beta.69

Patch Changes

4.0.0-beta.68

Patch Changes

  • #2180 0176eaf Thanks @IMax153! - Add a platform-agnostic Crypto service for cryptographic random bytes, secure random generators, UUIDv4 / UUIDv7 generation, and digest operations. UUID generation should now use the Crypto service's randomUUIDv4 or randomUUIDv7, which format bytes from the platform Crypto service; UUIDv7 also uses the Clock service timestamp. Random.nextUUIDv4 has been removed because the base Random service is not cryptographically secure.

  • Updated dependencies [af8267f, 0176eaf, 0176eaf, f136bb7, 6f38f07, aec9c40]:

4.0.0-beta.67

Patch Changes

4.0.0-beta.66

Patch Changes

4.0.0-beta.65

Patch Changes

4.0.0-beta.64

Patch Changes

4.0.0-beta.63

Patch Changes

4.0.0-beta.62

Patch Changes

4.0.0-beta.61

Patch Changes

4.0.0-beta.60

Patch Changes

4.0.0-beta.59

Patch Changes

4.0.0-beta.58

Patch Changes

4.0.0-beta.57

Patch Changes

4.0.0-beta.56

Patch Changes

4.0.0-beta.55

Patch Changes

4.0.0-beta.54

Patch Changes

4.0.0-beta.53

Patch Changes

4.0.0-beta.52

Patch Changes

4.0.0-beta.51

Patch Changes

4.0.0-beta.50

Patch Changes

4.0.0-beta.49

Patch Changes

4.0.0-beta.48

Patch Changes

4.0.0-beta.47

Patch Changes

4.0.0-beta.46

Patch Changes

4.0.0-beta.45

Patch Changes

4.0.0-beta.44

Patch Changes

4.0.0-beta.43

Patch Changes

4.0.0-beta.42

Patch Changes

4.0.0-beta.41

Patch Changes

4.0.0-beta.40

Patch Changes

4.0.0-beta.39

Patch Changes

4.0.0-beta.38

Patch Changes

4.0.0-beta.37

Patch Changes

4.0.0-beta.36

Patch Changes

4.0.0-beta.35

Patch Changes

4.0.0-beta.34

Patch Changes

4.0.0-beta.33

Patch Changes

4.0.0-beta.32

Patch Changes

4.0.0-beta.31

Patch Changes

4.0.0-beta.30

Patch Changes

4.0.0-beta.29

Patch Changes

4.0.0-beta.28

Patch Changes

4.0.0-beta.27

Patch Changes

4.0.0-beta.26

Patch Changes

4.0.0-beta.25

Patch Changes

4.0.0-beta.24

Patch Changes

4.0.0-beta.23

Patch Changes

4.0.0-beta.22

Patch Changes

4.0.0-beta.21

Patch Changes

4.0.0-beta.20

Patch Changes

4.0.0-beta.19

Patch Changes

4.0.0-beta.18

Patch Changes

4.0.0-beta.17

Patch Changes

4.0.0-beta.16

Patch Changes

4.0.0-beta.15

Patch Changes

4.0.0-beta.14

Patch Changes

4.0.0-beta.13

Patch Changes

4.0.0-beta.12

Patch Changes

4.0.0-beta.11

Patch Changes

4.0.0-beta.10

Patch Changes

4.0.0-beta.9

Patch Changes

4.0.0-beta.8

Patch Changes

4.0.0-beta.7

Patch Changes

4.0.0-beta.6

Patch Changes

4.0.0-beta.5

Patch Changes

4.0.0-beta.4

Patch Changes

4.0.0-beta.3

Patch Changes

4.0.0-beta.2

Patch Changes

4.0.0-beta.1

Patch Changes

4.0.0-beta.0

Major Changes

Patch Changes