@systemfsoftware/effect-daemon-spec 5.1.0 → 6.0.3

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 DELETED
@@ -1,382 +0,0 @@
1
- # @systemfsoftware/effect-daemon-spec
2
-
3
- ## 5.1.0
4
-
5
- ### Minor Changes
6
-
7
- - `Supervisor.classifyChildExit` is now exported. It takes a `Supervisor.ClassifyChildExit` command (a `stopping` flag and the child's `Exit`) and returns `Normal`, `Shutdown` or `Abnormal`. A stop requested by the supervisor, or an exit caused only by interruption, classifies as `Shutdown`. The fiber, cluster and socket media all use this rule to classify their children's exits.
8
-
9
- ## 5.0.1
10
-
11
- ### Patch Changes
12
-
13
- - Updated dependencies:
14
- - @systemfsoftware/effect-cell-types@11.0.0
15
-
16
- ## 5.0.0
17
-
18
- ### Major Changes
19
-
20
- - A supervisor that exhausts its restart intensity now stops every child and then fails `Supervisor.awaitTerminated` and `Supervisor.shutdown` with `Supervisor.SupervisorTerminated`. The error's `cause` is the failure of the child that exhausted it. A supervisor running as another supervisor's child ends abnormally when it gives up, so its parent counts it against its own intensity and escalation reaches the top-level owner. A requested shutdown, and a supervisor with `coolDown` declared, still succeed.
21
-
22
- - The package now exports a single `Supervisor` namespace that builds Erlang/OTP supervision trees: `Supervisor.make(name)` with `strategy`, `intensity`, `autoShutdown`, `coolDown`, `backoff`, `dynamic` and `children`, acquired through `.scoped` or `.layer`. Children run as fibers by default, and `Supervisor.ChildSpecs.on(port)` declares a child on another medium, whose layer the tree's `.layer` then requires. Restart strategies, restart types, restart intensity and shutdown modes follow OTP's `supervisor`, and exhausting the intensity now terminates the supervisor unless `coolDown` is declared. `Daemon`, `LeaderLock`, `LockPrimitive` and the `run` entry points are removed; declare a supervisor with `Supervisor.make` and its children with `Supervisor.ChildSpecs.make` instead. A running supervisor's decisions are observable through `Supervisor.traceOf`.
23
-
24
- ### Minor Changes
25
-
26
- - Adds an `@systemfsoftware/effect-daemon-spec/testing` entry point that checks a `LockPrimitive` implementation for linearizability. It exports the lock command schema (`LockCommand`), a pure lock model (`lockModel`, `stepLock`), `leadershipOver(primitive)`, which builds the `LeaderLock` the daemon uses over your primitive, and `runLockCommand`. Pass them to `Conformance.linearizable` from `@systemfsoftware/conformance-spec`, which is an optional peer dependency. The root entry point pulls in no test code.
27
-
28
- - Add `Supervisor.livenessTick(millis)`, which declares how often the kernel's liveness tick fires for a ready child, beside the other policy knobs. Declare a longer tick when children run on a medium whose lifecycle steps take longer than the default one-second interval.
29
-
30
- ### Patch Changes
31
-
32
- - Every tagged error class now has a one-line message built from its fields, so a failure shows what went wrong instead of an empty message.
33
-
34
- - Update peer and runtime dependency on `effect` and companion packages to `4.0.0-rc.117`.
35
-
36
- - Updated dependencies:
37
- - @systemfsoftware/conformance-spec@0.2.0
38
-
39
- ## 4.2.0
40
-
41
- ### Major Changes
42
-
43
- - A supervisor that exhausts its restart intensity now stops every child and then fails `Supervisor.awaitTerminated` and `Supervisor.shutdown` with `Supervisor.SupervisorTerminated`. The error's `cause` is the failure of the child that exhausted it. A supervisor running as another supervisor's child ends abnormally when it gives up, so its parent counts it against its own intensity and escalation reaches the top-level owner. A requested shutdown, and a supervisor with `coolDown` declared, still succeed.
44
-
45
- - The package now exports a single `Supervisor` namespace that builds Erlang/OTP supervision trees: `Supervisor.make(name)` with `strategy`, `intensity`, `autoShutdown`, `coolDown`, `backoff`, `dynamic` and `children`, acquired through `.scoped` or `.layer`. Children run as fibers by default, and `Supervisor.ChildSpecs.on(port)` declares a child on another medium, whose layer the tree's `.layer` then requires. Restart strategies, restart types, restart intensity and shutdown modes follow OTP's `supervisor`, and exhausting the intensity now terminates the supervisor unless `coolDown` is declared. `Daemon`, `LeaderLock`, `LockPrimitive` and the `run` entry points are removed; declare a supervisor with `Supervisor.make` and its children with `Supervisor.ChildSpecs.make` instead. A running supervisor's decisions are observable through `Supervisor.traceOf`.
46
-
47
- ### Minor Changes
48
-
49
- - Add `Supervisor.livenessTick(millis)`, which declares how often the kernel's liveness tick fires for a ready child, beside the other policy knobs. Declare a longer tick when children run on a medium whose lifecycle steps take longer than the default one-second interval.
50
-
51
- ## 4.1.1
52
-
53
- ### Patch Changes
54
-
55
- - Update peer and runtime dependency on `effect` and companion packages to `4.0.0-rc.117`.
56
-
57
- ## 4.1.0
58
-
59
- ### Minor Changes
60
-
61
- - `cappedBackoff`, `worker`, `leader`, `task`, `withLeaderLock` and the other exported functions that took their subject first can now also be called data-last inside `pipe`. Existing calls keep working.
62
-
63
- ## 4.0.0
64
-
65
- ### Patch Changes
66
-
67
- - A supervisor whose restart decision cannot read its own restart command now logs the error and cools down, the same as when its restart budget runs out. It used to die and take its children down with it.
68
-
69
- ## 3.0.14
70
-
71
- ### Patch Changes
72
-
73
- - Unconstrained type holes are defaulted type parameters (`<A = unknown>`) instead of a type argument `unknown`. Calls that omit those arguments are unchanged.
74
-
75
- - Updated dependencies:
76
- - @systemfsoftware/effect-cell-types@9.0.0
77
-
78
- ## 3.0.13
79
-
80
- ### Patch Changes
81
-
82
- - Bump the stryker catalog to pull in the latest patch releases of the stryker-js ecosystem.
83
-
84
- ## 3.0.12
85
-
86
- ### Patch Changes
87
-
88
- - The `schema-filter-constructive-generation` rule distinguishes scalar and struct receiver chains: `arbitrary: { candidate }` no longer satisfies the rule on any receiver, struct filters are permitted without annotations because Effect v4 provides no compiler hook for constructive cross-field filter generation, and node `toCodecArbitrary` overrides only silence the rule on `Schema.declare` receivers where the compiler honors them.
89
-
90
- ## 3.0.11
91
-
92
- ### Patch Changes
93
-
94
- - Dependencies resolve to Effect 4.0.0-rc.116 and Vitest 5.
95
-
96
- ## 3.0.10
97
-
98
- ### Patch Changes
99
-
100
- - Updated dependencies:
101
- - @systemfsoftware/effect-cell-types@8.0.0
102
-
103
- ## 3.0.9
104
-
105
- ### Patch Changes
106
-
107
- - Releases the workspace so its published versions track the shared dependency graph this change moves.
108
-
109
- - The `@systemfsoftware/source` export condition is gone. It resolved to a package's TypeScript sources for editors and in-repo typechecks; each package now exports only its built entry. If your tsconfig sets `customConditions: ["@systemfsoftware/source"]`, or a bundler config names that condition, remove it — resolution falls back to the built entry, which is what every consumer already got.
110
-
111
- ## 3.0.8
112
-
113
- ### Patch Changes
114
-
115
- - Updated dependencies:
116
- - @systemfsoftware/effect-cell-types@7.0.0
117
-
118
- ## 3.0.7
119
-
120
- ### Patch Changes
121
-
122
- - Re-released against @systemfsoftware/stryker-js without the removed --llms manifest. The Run stream no longer carries a manifest terminal event, and the RunEvent / RunTerminalEvent unions no longer include the manifest arm, so any exhaustive consumer of those types must drop that case.
123
-
124
- - Rebuilds against updated workspace dependencies, including the new
125
- `@systemfsoftware/stryker-js` reporter protocol major.
126
-
127
- ## 3.0.6
128
-
129
- ### Patch Changes
130
-
131
- - Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
132
-
133
- - The arbitraries derived for several schema filters now construct their valid values directly instead of drawing many samples and discarding them. Filtered schemas such as the worker-call guard, the edit-entry guards, and the restart-cap check generate matching values on the first draws, so property suites that use them finish faster. Every value still satisfies the same filter as before.
134
-
135
- ## 3.0.5
136
-
137
- ### Patch Changes
138
-
139
- - Re-released to propagate the effect-cell-types and stryker-js workflow-channel migration into their published dependency graphs; no package-local API change
140
-
141
- - The arbitraries derived for several schema filters now construct their valid values directly instead of drawing many samples and discarding them. Filtered schemas such as the worker-call guard, the edit-entry guards, and the restart-cap check generate matching values on the first draws, so property suites that use them finish faster. Every value still satisfies the same filter as before.
142
-
143
- - Updated dependencies:
144
- - @systemfsoftware/effect-cell-types@6.0.0
145
-
146
- ## 3.0.4
147
-
148
- ### Patch Changes
149
-
150
- - Refreshed builds on the platform-services dependency graph; the packages no longer reach for host builtins directly. No CLI flags or option names change.
151
-
152
- ## 3.0.3
153
-
154
- ### Patch Changes
155
-
156
- - Re-published against the oxc-based instrumenter: workspace dependency ranges move to the new instrumenter major; no package's own behavior changes in this release.
157
-
158
- ## 3.0.2
159
-
160
- ### Patch Changes
161
-
162
- - Peer Effect requirement advances to 4.0.0-rc.112. No API changes.
163
-
164
- ## 3.0.1
165
-
166
- ### Patch Changes
167
-
168
- - Updated dependencies:
169
- - @systemfsoftware/effect-cell-types@5.0.0
170
-
171
- ## 3.0.0
172
-
173
- ### Major Changes
174
-
175
- - Published types no longer include names tagged `@internal`. If you imported one of those names from the package, switch to a public export or stop using it.
176
-
177
- ### Minor Changes
178
-
179
- - The loop kinds now ship their tags as values.
180
-
181
- `PollLoopTag`, `StreamLoopTag` and `SubscriptionLoopTag` are new exports: each is a shared `{ _tag }`
182
- value together with a type of the same name, and `PollLoop`, `StreamLoop` and
183
- `SubscriptionLoop` inherit their discriminant from it. Members, tag strings and every existing
184
- narrowing are unchanged, and constructing a loop can now spread the carrier instead of repeating
185
- the literal.
186
-
187
- ### Patch Changes
188
-
189
- - The peer requirements for `effect` and for the Effect test-runner integration now accept any compatible `4.0.0-rc` release, instead of demanding one exact release candidate.
190
-
191
- Installing alongside a newer release candidate no longer reports an unmet peer dependency or resolves a second copy of `effect` into the dependency tree.
192
-
193
- - Updated dependencies:
194
- - @systemfsoftware/effect-cell-types@4.0.0
195
-
196
- ## 2.0.0
197
-
198
- ### Major Changes
199
-
200
- - Pass capabilities as arguments instead of requiring them through a projection tag, in these two packages
201
-
202
- Wlaschin's second approach — dependency parameterization — is preferred over the
203
- Reader, and it removes the requirement from the signature entirely rather than
204
- relocating it. Each operation in `effect-daemon-spec` and `stryker-js-cli` that
205
- previously reached into the context for a projection now receives what it uses,
206
- and the composition root is the single place that acquires the port.
207
-
208
- The remaining `*ExecutorDeps` projections live in `omp/**/src/internal/`, fenced
209
- behind each package's own `exports` map, so they are unreachable from any consumer;
210
- the exported-wiring gate scans `src/` outside `src/internal/`, so internal composition
211
- stays internal and is not a migration target here.
212
-
213
- - `effect-daemon-spec` — `withLeaderLock` takes `lock: LeaderLock['Type']`, and the
214
- supervisor body takes `reporter: DaemonReporter['Type']`. Every `yield* LeaderLock`
215
- and `yield* DaemonReporter` now lands in `mod.ts`; the exported `worker` and
216
- `supervisor` shapes are unchanged, and `withLeaderLock` loses `LeaderLock` from `R`.
217
- - `stryker-js-cli` — `StrykerCliExecutorDeps` and its service interface are gone.
218
- `runStrykerCli` and the handler take `detectMode` and `createRunEventStream`, typed
219
- as indexed accesses off the two port services, and both lose the requirement from
220
- `R`. `main.ts` acquires both ports and passes the members down.
221
-
222
- For these two packages, a caller that provided the projection layer now provides
223
- nothing, because the operation no longer requires anything.
224
-
225
- - Carry the lock decision as a `LockBinding` so a required lock can never silently vanish.
226
-
227
- The three lock-taking operations — the internal `worker`, `supervisor`, and the
228
- `withLockByMode` operation behind them — now take a single discriminated
229
- argument, `LockBinding`, in place of a `(LockConfig, LeaderLock['Type'] | null)`
230
- pair. `unlocked` is the one case for a body that takes no lock; `locked` carries
231
- the keyed spec and the adapter that honours it.
232
-
233
- A spec declaring `mode: 'required'` paired with a null or missing adapter
234
- previously fell through to the body unwrapped — a silent downgrade from "must
235
- hold the leader lock" to "no lock at all". That combination is no longer
236
- representable: `unlocked` only exists for a `{ mode: 'none' }` spec, and `locked`
237
- demands both a keyed spec (via `KeyedLockConfig`) and an adapter (via
238
- `LeaderLock['Type']`). The composition root — `worker` and `supervisor` in
239
- `mod.ts` — is now the one place that builds the binding, and its public shapes
240
- are unchanged.
241
-
242
- ### Minor Changes
243
-
244
- - cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
245
-
246
- - Produce every workflow through `Workflow.make`.
247
-
248
- `decideRestart`, `interpretHookResult`, and `admitSurvivorsRun` are now built by the constructor rather
249
- than annotated with `Workflow<Command, Decision, Error>`. Each decision is behaviourally identical —
250
- `make` is the identity at runtime — but the channels are now inferred from the decider instead of
251
- asserted by hand, so a total decision resolves to `UninhabitedError` and becomes uncallable rather than
252
- compiling as a workflow that cannot fail.
253
-
254
- `effect-daemon-spec` takes a minor bump because the change is consumer-visible beyond its own source:
255
- `@systemfsoftware/effect-cell-types` moves from `devDependencies` to `dependencies`, so installing this
256
- package now installs it. That reclassification is required, not incidental — `make` is a runtime call,
257
- and `scripts/guards/check-runtime-deps.mjs` fails a runtime import declared only as a dev dependency.
258
- `omp-claude-compat` gains the same dependency; `stryker-js-cli` already declared it.
259
-
260
- `RestartDecisionWorkflow` survives as a type-only export: one in-repo consumer, its own property test,
261
- references it through `ReturnType<…>`.
262
-
263
- ### Patch Changes
264
-
265
- - Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
266
- declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
267
- apart: no exported type changes, only how it is written.
268
-
269
- - New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
270
-
271
- - Express each executor's sandwich as a `Cell` description.
272
-
273
- Every call site that previously sequenced the phases by hand now builds one description and hands it to the interpreter, so the order these executors run in is carried by the phase types instead of by the order the statements happen to appear in. Behaviour is preserved and no public surface moves: the change is confined to `src/internal/*.executor.ts`, and each package's golden API report is unchanged.
274
-
275
- One site needed a real fix rather than a translation. `supervisor-body.executor.ts` wrote before it could classify — it recorded a restart, then read the resulting rate — which is a read that depends on an earlier decision. Its read now gathers the restart record and the resulting rate as one product, which keeps that site a single layer, with the intensity tracker passed as the read's command rather than captured from the surrounding scope.
276
-
277
- - The base mutation preset selects at the make boundary.
278
-
279
- The preset carries both ignorers (`effect-schema-declarations`, `workflow-make-boundary`) and
280
- `disableBail: true`, so killer recording is structural for every inheriting config. The sandwich
281
- packages (daemon-spec, stryker-js-cli, omp-claude-compat) widen `mutate` to all non-test source
282
- at explicit 100/100/100 thresholds — the ignorer is the selector, so membership is forced by the
283
- brand rather than chosen by a path list. Library packages' mutate arrays are byte-identical.
284
-
285
- - `restart-decision.workflow.ts` has its pure decision in a new internal `restart-decision.kernel.ts` with a colocated property test. Both files are internal, so the package's public surface is unchanged and the restart behaviour is identical.
286
-
287
- - Updated dependencies:
288
- - @systemfsoftware/effect-cell-types@3.0.0
289
-
290
- ## 1.0.0
291
-
292
- ### Major Changes
293
-
294
- - Pass capabilities as arguments instead of requiring them through a projection tag, in these two packages
295
-
296
- Wlaschin's second approach — dependency parameterization — is preferred over the
297
- Reader, and it removes the requirement from the signature entirely rather than
298
- relocating it. Each operation in `effect-daemon-spec` and `stryker-js-cli` that
299
- previously reached into the context for a projection now receives what it uses,
300
- and the composition root is the single place that acquires the port.
301
-
302
- The remaining `*ExecutorDeps` projections live in `omp/**/src/internal/`, fenced
303
- behind each package's own `exports` map, so they are unreachable from any consumer;
304
- the exported-wiring gate scans `src/` outside `src/internal/`, so internal composition
305
- stays internal and is not a migration target here.
306
-
307
- - `effect-daemon-spec` — `withLeaderLock` takes `lock: LeaderLock['Type']`, and the
308
- supervisor body takes `reporter: DaemonReporter['Type']`. Every `yield* LeaderLock`
309
- and `yield* DaemonReporter` now lands in `mod.ts`; the exported `worker` and
310
- `supervisor` shapes are unchanged, and `withLeaderLock` loses `LeaderLock` from `R`.
311
- - `stryker-js-cli` — `StrykerCliExecutorDeps` and its service interface are gone.
312
- `runStrykerCli` and the handler take `detectMode` and `createRunEventStream`, typed
313
- as indexed accesses off the two port services, and both lose the requirement from
314
- `R`. `main.ts` acquires both ports and passes the members down.
315
-
316
- For these two packages, a caller that provided the projection layer now provides
317
- nothing, because the operation no longer requires anything.
318
-
319
- - Carry the lock decision as a `LockBinding` so a required lock can never silently vanish.
320
-
321
- The three lock-taking operations — the internal `worker`, `supervisor`, and the
322
- `withLockByMode` operation behind them — now take a single discriminated
323
- argument, `LockBinding`, in place of a `(LockConfig, LeaderLock['Type'] | null)`
324
- pair. `unlocked` is the one case for a body that takes no lock; `locked` carries
325
- the keyed spec and the adapter that honours it.
326
-
327
- A spec declaring `mode: 'required'` paired with a null or missing adapter
328
- previously fell through to the body unwrapped — a silent downgrade from "must
329
- hold the leader lock" to "no lock at all". That combination is no longer
330
- representable: `unlocked` only exists for a `{ mode: 'none' }` spec, and `locked`
331
- demands both a keyed spec (via `KeyedLockConfig`) and an adapter (via
332
- `LeaderLock['Type']`). The composition root — `worker` and `supervisor` in
333
- `mod.ts` — is now the one place that builds the binding, and its public shapes
334
- are unchanged.
335
-
336
- ### Minor Changes
337
-
338
- - cut over to effect v4 (4.0.0-rc.108): public surface derives from effect types; peers flip effect ^3→^4
339
-
340
- - Produce every workflow through `Workflow.make`.
341
-
342
- `decideRestart`, `interpretHookResult`, and `admitSurvivorsRun` are now built by the constructor rather
343
- than annotated with `Workflow<Command, Decision, Error>`. Each decision is behaviourally identical —
344
- `make` is the identity at runtime — but the channels are now inferred from the decider instead of
345
- asserted by hand, so a total decision resolves to `UninhabitedError` and becomes uncallable rather than
346
- compiling as a workflow that cannot fail.
347
-
348
- `effect-daemon-spec` takes a minor bump because the change is consumer-visible beyond its own source:
349
- `@systemfsoftware/effect-cell-types` moves from `devDependencies` to `dependencies`, so installing this
350
- package now installs it. That reclassification is required, not incidental — `make` is a runtime call,
351
- and `scripts/guards/check-runtime-deps.mjs` fails a runtime import declared only as a dev dependency.
352
- `omp-claude-compat` gains the same dependency; `stryker-js-cli` already declared it.
353
-
354
- `RestartDecisionWorkflow` survives as a type-only export: one in-repo consumer, its own property test,
355
- references it through `ReturnType<…>`.
356
-
357
- ### Patch Changes
358
-
359
- - Array types are spelled one way. `Array<T>` and `ReadonlyArray<T>` in emitted
360
- declarations become `T[]` and `readonly T[]`, which the type checker cannot tell
361
- apart: no exported type changes, only how it is written.
362
-
363
- - New version is published through npm trusted publishing, so it carries a provenance attestation you can verify.
364
-
365
- - Express each executor's sandwich as a `Cell` description.
366
-
367
- Every call site that previously sequenced the phases by hand now builds one description and hands it to the interpreter, so the order these executors run in is carried by the phase types instead of by the order the statements happen to appear in. Behaviour is preserved and no public surface moves: the change is confined to `src/internal/*.executor.ts`, and each package's golden API report is unchanged.
368
-
369
- One site needed a real fix rather than a translation. `supervisor-body.executor.ts` wrote before it could classify — it recorded a restart, then read the resulting rate — which is a read that depends on an earlier decision. Its read now gathers the restart record and the resulting rate as one product, which keeps that site a single layer, with the intensity tracker passed as the read's command rather than captured from the surrounding scope.
370
-
371
- - The base mutation preset selects at the make boundary.
372
-
373
- The preset carries both ignorers (`effect-schema-declarations`, `workflow-make-boundary`) and
374
- `disableBail: true`, so killer recording is structural for every inheriting config. The sandwich
375
- packages (daemon-spec, stryker-js-cli, omp-claude-compat) widen `mutate` to all non-test source
376
- at explicit 100/100/100 thresholds — the ignorer is the selector, so membership is forced by the
377
- brand rather than chosen by a path list. Library packages' mutate arrays are byte-identical.
378
-
379
- - `restart-decision.workflow.ts` has its pure decision in a new internal `restart-decision.kernel.ts` with a colocated property test. Both files are internal, so the package's public surface is unchanged and the restart behaviour is identical.
380
-
381
- - Updated dependencies:
382
- - @systemfsoftware/effect-cell-types@2.0.0
@@ -1,13 +0,0 @@
1
- //#region \0rolldown/runtime.js
2
- var __defProp = Object.defineProperty;
3
- var __exportAll = (all, no_symbols) => {
4
- let target = {};
5
- for (var name in all) __defProp(target, name, {
6
- get: all[name],
7
- enumerable: true
8
- });
9
- if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
10
- return target;
11
- };
12
- //#endregion
13
- export { __exportAll as t };