@systemfsoftware/effect-daemon-cluster 0.1.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # @systemfsoftware/effect-daemon-cluster
2
+
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - These packages now list `@systemfsoftware/effect-cell-types` as a runtime dependency.
8
+
9
+ ## 0.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - First release. `ClusterMedium` supervises Effect cluster singletons and entities as children of an `effect-daemon-spec` supervisor: bind it with `ClusterMedium.layer` and declare children with `Supervisor.ChildSpecs.on(ClusterMedium.port)`. A child is ready once it is registered, its death is inferred from failed liveness calls, and a group stop completes on the cluster's own schedule.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies:
18
+ - @systemfsoftware/effect-daemon-conformance@0.2.0
19
+ - @systemfsoftware/effect-daemon-spec@5.0.0
package/dist/mod.mjs CHANGED
@@ -1,7 +1,8 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import "@systemfsoftware/effect-daemon-conformance";
3
- import { Cause, Deferred, Duration, Effect, Exit, Layer, Match, Option, Queue, Scope } from "effect";
3
+ import { Deferred, Duration, Effect, Exit, Layer, Match, Option, Queue, Result, Scope } from "effect";
4
4
  import { Supervisor } from "@systemfsoftware/effect-daemon-spec";
5
+ import { absurd } from "effect/Function";
5
6
  import { Sharding } from "effect/unstable/cluster";
6
7
  //#region src/ClusterMedium/ClusterProgram.ts
7
8
  const SingletonTag = { _tag: "Singleton" };
@@ -40,10 +41,13 @@ const inferredDeath = {
40
41
  failedProbes: 1
41
42
  }
42
43
  };
43
- const terminationOf = (exit) => Exit.match(exit, {
44
- onSuccess: () => normalTermination,
45
- onFailure: (cause) => Cause.hasInterruptsOnly(cause) ? shutdownTermination : inferredDeath
46
- });
44
+ const terminationOf = (exit) => Match.value(Result.match(Supervisor.classifyChildExit(new Supervisor.ClassifyChildExit({
45
+ stopping: false,
46
+ exit
47
+ })), {
48
+ onFailure: (error) => absurd(error),
49
+ onSuccess: (decision) => decision
50
+ })).pipe(Match.tag("Normal", () => normalTermination), Match.tag("Shutdown", () => shutdownTermination), Match.tag("Abnormal", () => inferredDeath), Match.exhaustive);
47
51
  const startSingleton = (program, shardGroup) => Effect.gen(function* () {
48
52
  const evidenceScope = yield* Effect.scope;
49
53
  const registration = yield* Scope.fork(evidenceScope);
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@systemfsoftware/effect-daemon-cluster",
3
3
  "license": "Apache-2.0",
4
- "version": "0.1.0",
4
+ "version": "0.2.1",
5
5
  "author": "Ryan Lee <drdgvhbh@gmail.com>",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/systemfsoftware/systemfsoftware.git",
9
- "directory": "packages/effect-daemon-cluster"
9
+ "directory": "packages/daemon/effect-daemon-cluster"
10
10
  },
11
- "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/effect-daemon-cluster#readme",
11
+ "homepage": "https://github.com/systemfsoftware/systemfsoftware/tree/main/packages/daemon/effect-daemon-cluster#readme",
12
12
  "bugs": "https://github.com/systemfsoftware/systemfsoftware/issues",
13
13
  "description": "The effect-daemon-spec medium over effect/unstable/cluster — entities and single-owner singletons supervised with inferred death and eventual group stop.",
14
14
  "keywords": [
@@ -35,29 +35,23 @@
35
35
  "./package.json": "./package.json"
36
36
  },
37
37
  "dependencies": {
38
- "@systemfsoftware/effect-daemon-conformance": "^0.1.0",
39
- "@systemfsoftware/effect-daemon-spec": "^4.2.0"
38
+ "@systemfsoftware/effect-cell-types": "^11.0.0",
39
+ "@systemfsoftware/effect-daemon-conformance": "^0.2.1",
40
+ "@systemfsoftware/effect-daemon-spec": "^5.1.0"
40
41
  },
41
42
  "devDependencies": {
42
43
  "@effect/platform-node": "4.0.0-rc.117",
43
44
  "@effect/sql-pglite": "4.0.0-rc.117",
44
45
  "@microsoft/api-extractor": "^7.59.1",
45
46
  "@systemfsoftware/arethetypeswrong-cli": "^4.2.0",
46
- "@systemfsoftware/conformance-spec": "^0.1.0",
47
- "@systemfsoftware/effect-gherkin-spec": "^5.0.0",
48
- "@systemfsoftware/effect-schema-law": "^3.0.0",
49
- "@systemfsoftware/effect-schema-vite": "^2.2.5",
50
- "@systemfsoftware/oxlint-config-recommended": "^3.1.0",
51
- "@systemfsoftware/stryker-config": "^0.1.0",
52
- "@systemfsoftware/stryker-ignorer-effect-schema-declarations": "^0.1.1",
53
- "@systemfsoftware/stryker-ignorer-in-source-vitest-block": "^0.1.1",
54
- "@systemfsoftware/stryker-js": "^10.1.1",
55
- "@systemfsoftware/stryker-js-typescript-checker": "^7.0.5",
56
- "@systemfsoftware/stryker-js-vitest-runner": "^7.1.1",
57
- "@systemfsoftware/stryker-test-contribution": "^3.0.3",
47
+ "@systemfsoftware/conformance-spec": "^0.2.0",
48
+ "@systemfsoftware/effect-gherkin-spec": "^6.0.1",
49
+ "@systemfsoftware/effect-schema-law": "^4.0.1",
50
+ "@systemfsoftware/effect-schema-vite": "^2.3.0",
51
+ "@systemfsoftware/oxlint-config-recommended": "^3.3.0",
58
52
  "@systemfsoftware/tsconfig": "^2.0.1",
59
53
  "@systemfsoftware/tsdown-config": "^0.1.0",
60
- "@systemfsoftware/vitest": "^0.1.0",
54
+ "@systemfsoftware/vitest": "^0.3.0",
61
55
  "@systemfsoftware/vitest-config": "^0.1.0",
62
56
  "@types/node": "^26",
63
57
  "effect": "4.0.0-rc.117",
@@ -73,6 +67,7 @@
73
67
  "typescript": ">=7.0.0"
74
68
  },
75
69
  "publishConfig": {
70
+ "access": "public",
76
71
  "provenance": true
77
72
  },
78
73
  "scripts": {
@@ -81,7 +76,6 @@
81
76
  "typecheck": "tsc -b",
82
77
  "test": "vitest run --project unit --project conformance",
83
78
  "test:contract": "vitest run --project contract",
84
- "mutation": "stryker run",
85
79
  "lint": "f=${OXLINT_FORMAT:-${AGENT:+agent}}; oxlint . --format=${f:-default}",
86
80
  "attw": "attw --pack .",
87
81
  "api:check": "api-extractor-quiet run",