Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
7 changes: 7 additions & 0 deletions .changeset/effect-rc117-repin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'agent-bundle': patch
'@agent-bundle/runtime': patch
'create-agent-bundle': patch
---

Update the bundled Effect runtime to `effect@4.0.0-rc.117` (with `@effect/platform-node-shared` and `@effect/platform-node` on the same RC). Consumer installs of `agent-bundle` and `@agent-bundle/runtime` no longer pull in `msgpackr`, `msgpackr-extract`, or `fast-check` through `effect`. (#832)
3 changes: 2 additions & 1 deletion agent-patterns/effect-concurrency.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ lifecycle). Build those Effect-native from day one behind Promise edges.
- `Fiber.await` / `Fiber.join` / `Fiber.interrupt`: observe or cancel.
- Prefer exported Fiber functions over `interruptUnsafe` / `pollUnsafe`.
- Forked work that owns a resource must be forked *into a scope*
(`forkScoped` / `Layer.scoped`) so interruption closes the resource.
(`forkScoped`, or a `Layer.effect` constructor) so interruption closes
the resource.

Host `AbortSignal` still exists at the edges (`dispatch()` / `stream()`).
Do not thread extra internal signals once the program is an Effect; interrupt
Expand Down
2 changes: 1 addition & 1 deletion agent-patterns/effect-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class DevCoordinatorCloseError extends YieldableFrameworkError {
The bases keep the `Error` / `CodedError` constructor shapes, so migrating
an existing class is the `extends` clause plus the import. They also keep
the plain-`Error` observable shape, `JSON.stringify`, `stableJson`,
`{ ...error }`, `util.inspect`, non-enumerable `cause`, which rc.112
`{ ...error }`, `util.inspect`, non-enumerable `cause`, which rc.117
`Data.Error` alone would change (its prototype `toJSON` spreads the
constructor fields; its `[nodejs.util.inspect.custom]` prints that instead
of the stack). Never extend `Data.Error` directly.
Expand Down
7 changes: 4 additions & 3 deletions agent-patterns/effect-scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ holds the transaction open for the next caller.

## Layers

- `Layer.effect` for a service with no finalizer.
- `Layer.scoped` when constructing the service needs `Scope` (open a handle,
register a lease, start a subscriber).
- `Layer.effect` for a service, including one whose construction needs
`Scope` (open a handle, register a lease, start a subscriber): v4 has no
`Layer.scoped`; `Layer.effect` excludes `Scope` from the requirements and
closes it when the layer is released.
- `Layer.effectDiscard` for a background fiber you do not expose as a
service (pair with `Effect.forkScoped` / `Effect.forkChild` + scope).

Expand Down
2 changes: 1 addition & 1 deletion agent-patterns/effect-stream.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Effect Stream patterns

Source: `repos/effect/packages/effect/src/Stream.ts` (vendored v4, package
`4.0.0-rc.112`). Refresh when the subtree moves. Read
`4.0.0-rc.117`). Refresh when the subtree moves. Read
`repos/effect/LLMS.md` § Working with Streams first.

Stage 2 replaces the #145 pull-gated Flight `TransformStream` with Effect
Expand Down
56 changes: 34 additions & 22 deletions docs/effect-conventions.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions packages/agent-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"./package.json": "./package.json"
},
"dependencies": {
"@effect/platform-node-shared": "4.0.0-rc.112",
"@effect/platform-node-shared": "4.0.0-rc.117",
"@modelcontextprotocol/client": "2.0.0",
"@modelcontextprotocol/node": "2.0.0",
"@modelcontextprotocol/server": "2.0.0",
Expand All @@ -123,7 +123,7 @@
"ajv-formats": "3.0.1",
"chokidar": "5.0.0",
"commander": "15.0.0",
"effect": "4.0.0-rc.112",
"effect": "4.0.0-rc.117",
"es-module-lexer": "3.0.2",
"fast-glob": "3.3.3",
"ignore": "7.0.9",
Expand All @@ -136,7 +136,7 @@
"@types/npm-package-arg": "6.1.4",
"@types/react": "19.3.0",
"@types/ws": "8.18.1",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@e5f8d5f",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@cbbf87e",
"react": "19.3.0",
"typescript-5": "npm:typescript@5.9.3",
"zod": "4.6.4"
Expand Down
8 changes: 4 additions & 4 deletions packages/agent-bundle/src/effect/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ import { Data } from 'effect';
* behaves as the plain `Error` subclass it replaces:
*
* - `instanceof Error` / `instanceof X`, `.name`, `.message`, `.code`,
* `.cause`, and `.stack` are unchanged (rc.112 `Data.Error` is
* `.cause`, and `.stack` are unchanged (rc.117 `Data.Error` is
* `class extends globalThis.Error`).
* - `JSON.stringify(error)`, `stableJson(error)`, and `{ ...error }` stay
* byte-identical to the plain-`Error` output. rc.112 `Data.Error#toJSON`
* byte-identical to the plain-`Error` output. rc.117 `Data.Error#toJSON`
* would spread the constructor fields (`message`, `cause`) into the JSON
* and `stableJson` would then sort the keys; the base shadows `toJSON` so
* both serializers take their plain-object path ("own enumerable fields,
* insertion order").
* - `util.inspect` / `console.error(error)` print the stack trace. rc.112
* - `util.inspect` / `console.error(error)` print the stack trace. rc.117
* installs `[nodejs.util.inspect.custom]` on the yieldable prototype
* (returning `toJSON()`), which would replace the stack with a field dump
* in CLI output; the base shadows it so Node's default `Error` formatting
* applies again.
* - `cause` is installed exactly like `new Error(message, { cause })`: only
* when `options` carries the key, and never enumerable. rc.112 passes a
* when `options` carries the key, and never enumerable. rc.117 passes a
* falsy `cause` through `Object.assign`-style property assignment, which
* would make it an enumerable own field.
*
Expand Down
10 changes: 5 additions & 5 deletions packages/agent-bundle/src/effect/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ import { runPromise, type RunPromiseOptions } from './boundary.ts';
* `NodeServices.layer`, but built from `@effect/platform-node-shared`, the
* package that actually implements them (`@effect/platform-node`'s
* `NodeFileSystem` etc. are re-exports). `agent-bundle` is a runtime
* dependency of every consumer, and `@effect/platform-node@rc.112` would add
* `undici`, `mime`, and — through a non-optional `redis` peer that npm
* auto-installs — a Redis client (+23 MB, +17 packages) to each install for
* a filesystem layer. `create-agent-bundle`, which bundles its
* dependency of every consumer, and `@effect/platform-node@rc.117` would add
* `undici` and — through a non-optional `redis` peer that npm auto-installs —
* a Redis client (+23 MB, +17 packages measured on rc.112) to each install
* for a filesystem layer. `create-agent-bundle`, which bundles its
* dependencies, keeps `NodeServices.layer`.
*
* Provided at Promise edges only — the public API functions in `api.ts` and
Expand Down Expand Up @@ -122,7 +122,7 @@ export const ensuringRemoved = <A, E, R>(
* an interrupt cannot land between its creation and its cleanup. The
* operation is restored to the caller's interruptibility before it enters
* the bracket (the bracket's own mask is a no-op inside this one). Not
* `fs.makeTempDirectoryScoped`: in rc.112 its finalizer removes without
* `fs.makeTempDirectoryScoped`: through rc.117 its finalizer removes without
* `force` and `orDie`s, so a missing directory would reject an already
* successful call and a real cleanup error would lose its Node cause.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { access, mkdtemp, readFile, writeFile } from 'node:fs/promises';
import { tmpdir } from 'node:os';
import { join } from 'node:path';

import { Effect, FileSystem, Layer, Option } from 'effect';
import { ByteSize, Effect, FileSystem, Layer, Option } from 'effect';
import { afterEach, describe, expect, it } from '@rstest/core';

import { createDefaultRegistry } from '../src/adapters/registry.ts';
Expand Down Expand Up @@ -58,7 +58,7 @@ const fileInfo = (size: number): FileSystem.File.Info => ({
mtime: Option.none(),
nlink: Option.none(),
rdev: Option.none(),
size: FileSystem.Size(size),
size: ByteSize.bytes(size),
type: 'File',
uid: Option.none(),
});
Expand Down
4 changes: 2 additions & 2 deletions packages/agent-bundle/tests/effect-filesystem-phase2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { access, mkdir, mkdtemp, readFile, stat, symlink, writeFile } from 'node
import { tmpdir } from 'node:os';
import { join } from 'node:path';

import { Effect, FileSystem, Option, PlatformError } from 'effect';
import { ByteSize, Effect, FileSystem, Option, PlatformError } from 'effect';
import { afterEach, describe, expect, it } from '@rstest/core';

import { runPromise } from '../src/effect/boundary.ts';
Expand Down Expand Up @@ -57,7 +57,7 @@ const fileInfo = (mode: number): FileSystem.File.Info => ({
mtime: Option.none(),
nlink: Option.none(),
rdev: Option.none(),
size: FileSystem.Size(3),
size: ByteSize.bytes(3),
type: 'File',
uid: Option.none(),
});
Expand Down
6 changes: 3 additions & 3 deletions packages/create-agent-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@
},
"devDependencies": {
"@clack/prompts": "1.8.1",
"@effect/platform-node": "4.0.0-rc.112",
"@effect/platform-node": "4.0.0-rc.117",
"@rslib/core": "1.0.0",
"@rstest/core": "0.11.12",
"@types/node": "26.5.1",
"effect": "4.0.0-rc.112",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@e5f8d5f"
"effect": "4.0.0-rc.117",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@cbbf87e"
},
"peerDependencies": {
"@agent-bundle/runtime": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-agent-bundle/tests/scaffold-noop.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Effect, FileSystem, Layer, Option, Path, PlatformError } from 'effect';
import { ByteSize, Effect, FileSystem, Layer, Option, Path, PlatformError } from 'effect';
import { describe, expect, it } from 'effect-rstest';

import { assertLocalFrameworkTarball } from '../src/framework.ts';
Expand All @@ -25,7 +25,7 @@ const fileInfo = (type: FileSystem.File.Type): FileSystem.File.Info => ({
mtime: Option.none(),
nlink: Option.none(),
rdev: Option.none(),
size: FileSystem.Size(0),
size: ByteSize.bytes(0),
type,
uid: Option.none(),
});
Expand Down
4 changes: 2 additions & 2 deletions packages/rsc-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
},
"dependencies": {
"@modelcontextprotocol/server": "2.0.0",
"effect": "4.0.0-rc.112",
"effect": "4.0.0-rc.117",
"flare-redact": "1.6.1",
"react-server-dom-rspack": "0.1.0",
"rsc-markdown-stream": "workspace:^"
Expand All @@ -103,7 +103,7 @@
"@rspack/core": "2.2.3",
"@rstest/core": "0.11.12",
"@types/react": "19.3.0",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@e5f8d5f",
"effect-rstest": "https://pkg.pr.new/ScriptedAlchemy/effect-rstest@cbbf87e",
"micromark": "4.0.2",
"micromark-extension-gfm": "3.0.0",
"react": "19.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/workbench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"typecheck": "tsc --project tsconfig.json"
},
"dependencies": {
"@effect/atom-react": "4.0.0-rc.112",
"@effect/atom-react": "4.0.0-rc.117",
"@modelcontextprotocol/client": "2.0.0",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
"effect": "4.0.0-rc.112",
"effect": "4.0.0-rc.117",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-markdown": "10.1.0",
Expand Down
Loading
Loading