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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/effect-v4-stable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@humanlayer/effect-machine": minor
---

Upgrade to Effect 4.0.0 stable. The `effect` peer range is now `^4.0.0`, and cluster/rpc imports move from `effect/unstable/cluster` and `effect/unstable/rpc` to `effect/cluster` and `effect/rpc`.
1 change: 0 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ Opt-in via `EntityMachineOptions.persistence`:
- Entity tests use `Entity.makeTestClient` + `ShardingConfig.layer` + `Effect.scoped`
- `EntityMachine.layer` accepts the `MachineEntity` returned by `toEntity`; the entity owns its machine and protocol
- Entity RPCs use `.tag` field (not `._tag`) to distinguish request types
- WatchState test skipped due to effect beta Queue bug

## Documentation

Expand Down
60 changes: 3 additions & 57 deletions bun.lock

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@
"devDependencies": {
"@changesets/changelog-github": "^0.6.0",
"@changesets/cli": "^2.30.0",
"@effect/cluster": "0.58.2",
"@effect/rpc": "0.75.1",
"@effect/tsgo": "0.5.2",
"@oxlint/plugins": "1.78.0",
"@types/bun": "1.3.12",
"@typescript/native-preview": "7.0.0-dev.20260507.1",
"concurrently": "^9.2.1",
"effect": "4.0.0-beta.107",
"effect": "4.0.0",
"effect-bun-test": "0.3.0",
"lefthook": "^2.1.5",
"oxfmt": "^0.44.0",
Expand All @@ -60,7 +58,7 @@
"typescript": "^6.0.2"
},
"peerDependencies": {
"effect": "^4.0.0-beta.107"
"effect": "^4.0.0"
},
"peerDependenciesMeta": {
"effect": {
Expand Down
2 changes: 1 addition & 1 deletion src/cluster/entity-actor-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @module
*/
import type { RpcClient } from "effect/unstable/rpc";
import type { RpcClient } from "effect/rpc";
import { Effect, Option, Schema, Stream } from "effect";

import type { ExtractReply, ReplyTypeBrand } from "../internal/brands.js";
Expand Down
6 changes: 3 additions & 3 deletions src/cluster/entity-machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
*
* @module
*/
import { Entity } from "effect/unstable/cluster";
import type { Envelope, Sharding } from "effect/unstable/cluster";
import type { Rpc } from "effect/unstable/rpc";
import { Entity } from "effect/cluster";
import type { Envelope, Sharding } from "effect/cluster";
import type { Rpc } from "effect/rpc";
import {
Clock,
type Duration,
Expand Down
4 changes: 2 additions & 2 deletions src/cluster/to-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* @module
*/
import { Entity } from "effect/unstable/cluster";
import { Rpc } from "effect/unstable/rpc";
import { Entity } from "effect/cluster";
import { Rpc } from "effect/rpc";
import { Schema } from "effect";

import type { Machine } from "../machine.js";
Expand Down
4 changes: 2 additions & 2 deletions test/cluster-type-constraints.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Sharding } from "effect/unstable/cluster";
import type { RpcClient } from "effect/unstable/rpc";
import type { Sharding } from "effect/cluster";
import type { RpcClient } from "effect/rpc";
import { Context, Effect, type Layer, Schema } from "effect";

import { Event, Machine, State } from "../src/index.js";
Expand Down
2 changes: 1 addition & 1 deletion test/integration/cluster-persistence.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Tests snapshot and journal persistence for entity-machine state
* across deactivation/reactivation cycles.
*/
import { Entity, ShardingConfig } from "effect/unstable/cluster";
import { Entity, ShardingConfig } from "effect/cluster";
import { Clock, Effect, Layer, Option, Ref, Schema } from "effect";
import { describe, expect, test } from "bun:test";

Expand Down
4 changes: 2 additions & 2 deletions test/integration/cluster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
* - toEntity for generating Entity definitions
* - EntityMachine.layer for wiring machine to cluster
*/
import { Entity, ShardingConfig } from "effect/unstable/cluster";
import { Rpc } from "effect/unstable/rpc";
import { Entity, ShardingConfig } from "effect/cluster";
import { Rpc } from "effect/rpc";
import { Duration, Effect, Fiber, Layer, Ref, Schema, Stream } from "effect";
import { describe, expect, test } from "bun:test";

Expand Down
Loading