@systemfsoftware/effect-daemon-spec 5.0.0 → 5.1.0

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/dist/index.d.ts CHANGED
@@ -1,52 +1,7 @@
1
- import { Cause, Context, Deferred, Effect, HashMap, Layer, Option, PubSub, Queue, Ref, Schema, Scope } from "effect";
2
1
  import { Handle, Workflow } from "@systemfsoftware/effect-cell-types";
2
+ import { Cause, Context, Deferred, Effect, Exit, HashMap, Layer, Option, PubSub, Queue, Ref, Schema, Scope } from "effect";
3
3
  import * as Stream from "effect/Stream";
4
4
  import { Pipeable } from "effect/Pipeable";
5
- //#region src/kernel/SupervisorPolicy.schema.d.ts
6
- declare const RestartStrategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
7
- type RestartStrategy = typeof RestartStrategy.Type;
8
- declare const AutoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
9
- type AutoShutdown = typeof AutoShutdown.Type;
10
- declare const BrutalShutdown: Schema.TaggedStruct<"Brutal", {}>;
11
- type BrutalShutdown = typeof BrutalShutdown.Type;
12
- declare const GracefulShutdown: Schema.TaggedStruct<"Graceful", {
13
- readonly millis: Schema.Int;
14
- }>;
15
- type GracefulShutdown = typeof GracefulShutdown.Type;
16
- declare const InfinityShutdown: Schema.TaggedStruct<"Infinity", {}>;
17
- type InfinityShutdown = typeof InfinityShutdown.Type;
18
- declare const ShutdownMode: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
19
- readonly millis: Schema.Int;
20
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
21
- type ShutdownMode = typeof ShutdownMode.Type;
22
- declare const BackoffSchedule: Schema.Struct<{
23
- readonly baseMillis: Schema.Int;
24
- readonly multiplier: Schema.Int;
25
- readonly capMillis: Schema.Int;
26
- }>;
27
- type BackoffSchedule = typeof BackoffSchedule.Type;
28
- declare const ChildDeclaration: Schema.Struct<{
29
- readonly childId: Schema.String;
30
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
31
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
32
- readonly millis: Schema.Int;
33
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
34
- readonly significant: Schema.Boolean;
35
- readonly startTimeoutMillis: Schema.Int;
36
- readonly probeFailureThreshold: Schema.Int;
37
- }>;
38
- type ChildDeclaration = typeof ChildDeclaration.Type;
39
- declare const DynamicKind: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
40
- readonly ceiling: Schema.Int;
41
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
42
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
43
- readonly millis: Schema.Int;
44
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
45
- readonly startTimeoutMillis: Schema.Int;
46
- readonly probeFailureThreshold: Schema.Int;
47
- }>]>;
48
- type DynamicKind = typeof DynamicKind.Type;
49
- //#endregion
50
5
  //#region src/kernel/TerminationReport.schema.d.ts
51
6
  /**
52
7
  * What a medium can say about why a child died (R16): a fiber supplies a cause, a process
@@ -113,6 +68,108 @@ declare const TerminationReason: Schema.Union<readonly [Schema.TaggedStruct<"Nor
113
68
  }>]>;
114
69
  type TerminationReason = typeof TerminationReason.Type;
115
70
  //#endregion
71
+ //#region src/Supervisor/SupervisorTerminated.schema.d.ts
72
+ declare const SupervisorTerminated_base: Schema.Class<SupervisorTerminated, Schema.TaggedStruct<"SupervisorTerminated", {
73
+ readonly name: Schema.String;
74
+ readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
75
+ readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
76
+ readonly cause: Schema.String;
77
+ }>, Schema.TaggedStruct<"ExitReport", {
78
+ readonly code: Schema.Int;
79
+ readonly signal: Schema.String;
80
+ }>, Schema.TaggedStruct<"InferredReport", {
81
+ readonly failedProbes: Schema.Int;
82
+ }>, Schema.TaggedStruct<"DeadlineMissed", {
83
+ readonly waitedMillis: Schema.Int;
84
+ }>]>;
85
+ }>]>;
86
+ readonly cause: Schema.Cause<Schema.Unknown, Schema.Unknown>;
87
+ }>, Cause.YieldableError>;
88
+ declare class SupervisorTerminated extends SupervisorTerminated_base {
89
+ get message(): string;
90
+ }
91
+ //#endregion
92
+ //#region src/Supervisor/ChildExitDecision.schema.d.ts
93
+ declare const ChildExitTypeId: unique symbol;
94
+ type ChildExitTypeId = typeof ChildExitTypeId;
95
+ declare const NormalExit_base: Schema.Class<NormalExit, Schema.TaggedStruct<"Normal", {}>, {}>;
96
+ /** The child ended on its own success. */
97
+ declare class NormalExit extends NormalExit_base {
98
+ readonly [ChildExitTypeId]: symbol;
99
+ }
100
+ declare const ShutdownExit_base: Schema.Class<ShutdownExit, Schema.TaggedStruct<"Shutdown", {}>, {}>;
101
+ /** The child was interrupted — an owned shutdown, or one it raised itself. */
102
+ declare class ShutdownExit extends ShutdownExit_base {
103
+ readonly [ChildExitTypeId]: symbol;
104
+ }
105
+ declare const AbnormalExit_base: Schema.Class<AbnormalExit, Schema.TaggedStruct<"Abnormal", {}>, {}>;
106
+ /** The child failed with something other than an interruption. */
107
+ declare class AbnormalExit extends AbnormalExit_base {
108
+ readonly [ChildExitTypeId]: symbol;
109
+ }
110
+ //#endregion
111
+ //#region src/Supervisor/classify-child-exit.workflow.d.ts
112
+ declare const ClassifyChildExit_base: Schema.Class<ClassifyChildExit, Schema.TaggedStruct<"ClassifyChildExit", {
113
+ readonly stopping: Schema.Boolean;
114
+ readonly exit: Schema.Exit<Schema.Void, Schema.Unknown, Schema.Unknown>;
115
+ }>, {}>;
116
+ declare class ClassifyChildExit extends ClassifyChildExit_base {
117
+ static readonly [Workflow.InstrumentationBrand]: {};
118
+ }
119
+ declare const classifyChildExit: Workflow.MadeWorkflow<typeof ClassifyChildExit, Schema.Union<readonly [typeof NormalExit, typeof ShutdownExit, typeof AbnormalExit]>, Schema.Never>;
120
+ //#endregion
121
+ //#region src/kernel/SupervisionLimits.schema.d.ts
122
+ /** How many times a child incarnation has been replaced: any non-negative safe integer. Generation stays small so generation+1 stays in range. */
123
+ declare const Generation: Schema.Int;
124
+ type Generation = typeof Generation.Type;
125
+ declare const ChildId: Schema.String;
126
+ type ChildId = typeof ChildId.Type;
127
+ //#endregion
128
+ //#region src/kernel/SupervisorPolicy.schema.d.ts
129
+ declare const RestartStrategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
130
+ type RestartStrategy = typeof RestartStrategy.Type;
131
+ declare const AutoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
132
+ type AutoShutdown = typeof AutoShutdown.Type;
133
+ declare const BrutalShutdown: Schema.TaggedStruct<"Brutal", {}>;
134
+ type BrutalShutdown = typeof BrutalShutdown.Type;
135
+ declare const GracefulShutdown: Schema.TaggedStruct<"Graceful", {
136
+ readonly millis: Schema.Int;
137
+ }>;
138
+ type GracefulShutdown = typeof GracefulShutdown.Type;
139
+ declare const InfinityShutdown: Schema.TaggedStruct<"Infinity", {}>;
140
+ type InfinityShutdown = typeof InfinityShutdown.Type;
141
+ declare const ShutdownMode: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
142
+ readonly millis: Schema.Int;
143
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
144
+ type ShutdownMode = typeof ShutdownMode.Type;
145
+ declare const BackoffSchedule: Schema.Struct<{
146
+ readonly baseMillis: Schema.Int;
147
+ readonly multiplier: Schema.Int;
148
+ readonly capMillis: Schema.Int;
149
+ }>;
150
+ type BackoffSchedule = typeof BackoffSchedule.Type;
151
+ declare const ChildDeclaration: Schema.Struct<{
152
+ readonly childId: Schema.String;
153
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
154
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
155
+ readonly millis: Schema.Int;
156
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
157
+ readonly significant: Schema.Boolean;
158
+ readonly startTimeoutMillis: Schema.Int;
159
+ readonly probeFailureThreshold: Schema.Int;
160
+ }>;
161
+ type ChildDeclaration = typeof ChildDeclaration.Type;
162
+ declare const DynamicKind: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
163
+ readonly ceiling: Schema.Int;
164
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
165
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
166
+ readonly millis: Schema.Int;
167
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
168
+ readonly startTimeoutMillis: Schema.Int;
169
+ readonly probeFailureThreshold: Schema.Int;
170
+ }>]>;
171
+ type DynamicKind = typeof DynamicKind.Type;
172
+ //#endregion
116
173
  //#region src/Supervisor/MediumDeclaration.schema.d.ts
117
174
  /**
118
175
  * What a medium can say about why a child died (R16, KTD8): the in-process fiber
@@ -206,27 +263,6 @@ interface MediumPortShape<Program, StartError = never, R = never> {
206
263
  }
207
264
  /** Declare a medium port keyed to the program type it interprets (KTD9). */
208
265
  declare const MediumPort: <Program, StartError = never, R = never>(key: string) => Context.Service<MediumPortShape<Program, StartError, R>, MediumPortShape<Program, StartError, R>>;
209
- //#endregion
210
- //#region src/Supervisor/SupervisorTerminated.schema.d.ts
211
- declare const SupervisorTerminated_base: Schema.Class<SupervisorTerminated, Schema.TaggedStruct<"SupervisorTerminated", {
212
- readonly name: Schema.String;
213
- readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
214
- readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
215
- readonly cause: Schema.String;
216
- }>, Schema.TaggedStruct<"ExitReport", {
217
- readonly code: Schema.Int;
218
- readonly signal: Schema.String;
219
- }>, Schema.TaggedStruct<"InferredReport", {
220
- readonly failedProbes: Schema.Int;
221
- }>, Schema.TaggedStruct<"DeadlineMissed", {
222
- readonly waitedMillis: Schema.Int;
223
- }>]>;
224
- }>]>;
225
- readonly cause: Schema.Cause<Schema.Unknown, Schema.Unknown>;
226
- }>, Cause.YieldableError>;
227
- declare class SupervisorTerminated extends SupervisorTerminated_base {
228
- get message(): string;
229
- }
230
266
  declare namespace FiberMedium_d_exports {
231
267
  export { BareFiberProgram, FiberProgram, failureCauseOf, fiberPort, medium, mediumFor, readyOnStart };
232
268
  }
@@ -238,18 +274,9 @@ declare const failureCauseOf: (evidence: Started) => Option.Option<Effect.Effect
238
274
  declare const mediumFor: <R = never>() => Medium<(ready: Effect.Effect<void>) => Effect.Effect<void, SupervisorTerminated, Scope.Scope | R>, never, Scope.Scope | R>;
239
275
  declare const medium: Medium<FiberProgram, never, Scope.Scope>;
240
276
  //#endregion
241
- //#region src/kernel/SupervisionTypeIds.d.ts
242
- declare const DecisionTypeId: unique symbol;
243
- type DecisionTypeId = typeof DecisionTypeId;
277
+ //#region src/kernel/SupervisorState.schema.d.ts
244
278
  declare const StateTypeId: unique symbol;
245
- type StateTypeId = typeof StateTypeId;
246
- //#endregion
247
- //#region src/kernel/interpret-supervision-event.workflow.d.ts
248
- declare const Stale_base: Schema.Class<Stale, Schema.TaggedStruct<"Stale", {}>, {}>;
249
- declare class Stale extends Stale_base {
250
- readonly [DecisionTypeId]: symbol;
251
- }
252
- declare const Continue_base: Schema.Class<Continue, Schema.TaggedStruct<"Continue", {
279
+ declare const Running_base: Schema.Class<Running, Schema.TaggedStruct<"Running", {
253
280
  readonly core: Schema.Struct<{
254
281
  readonly policy: Schema.Struct<{
255
282
  strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
@@ -295,60 +322,11 @@ declare const Continue_base: Schema.Class<Continue, Schema.TaggedStruct<"Continu
295
322
  readonly restartStamps: Schema.$Array<Schema.Int>;
296
323
  readonly nextOrdinal: Schema.Int;
297
324
  }>;
298
- readonly commands: Schema.Struct<{
299
- readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
300
- readonly childId: Schema.String;
301
- readonly generation: Schema.Int;
302
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
303
- readonly millis: Schema.Int;
304
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
305
- }>>;
306
- readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
307
- readonly childId: Schema.String;
308
- readonly generation: Schema.Int;
309
- }>>;
310
- readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
311
- readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
312
- readonly childId: Schema.String;
313
- readonly generation: Schema.Int;
314
- readonly deadline: Schema.Int;
315
- }>, Schema.TaggedStruct<"ArmSupervisorTimer", {
316
- readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
317
- readonly deadline: Schema.Int;
318
- }>]>>;
319
- readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
320
- readonly requestId: Schema.String;
321
- readonly childId: Schema.String;
322
- readonly generation: Schema.Int;
323
- }>, Schema.TaggedStruct<"ReplyStartRefused", {
324
- readonly requestId: Schema.String;
325
- }>, Schema.TaggedStruct<"ReplyStopped", {
326
- readonly requestId: Schema.String;
327
- }>]>>;
328
- readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
329
- readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
330
- readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
331
- readonly cause: Schema.String;
332
- }>, Schema.TaggedStruct<"ExitReport", {
333
- readonly code: Schema.Int;
334
- readonly signal: Schema.String;
335
- }>, Schema.TaggedStruct<"InferredReport", {
336
- readonly failedProbes: Schema.Int;
337
- }>, Schema.TaggedStruct<"DeadlineMissed", {
338
- readonly waitedMillis: Schema.Int;
339
- }>]>;
340
- }>]>;
341
- readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
342
- readonly childId: Schema.String;
343
- readonly generation: Schema.Int;
344
- }>]>;
345
- }>>;
346
- }>;
347
325
  }>, {}>;
348
- declare class Continue extends Continue_base {
349
- readonly [DecisionTypeId]: symbol;
326
+ declare class Running extends Running_base {
327
+ readonly [StateTypeId]: symbol;
350
328
  }
351
- declare const RestartChildren_base: Schema.Class<RestartChildren, Schema.TaggedStruct<"RestartChildren", {
329
+ declare const Restarting_base: Schema.Class<Restarting, Schema.TaggedStruct<"Restarting", {
352
330
  readonly core: Schema.Struct<{
353
331
  readonly policy: Schema.Struct<{
354
332
  strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
@@ -398,13 +376,206 @@ declare const RestartChildren_base: Schema.Class<RestartChildren, Schema.TaggedS
398
376
  readonly childId: Schema.String;
399
377
  readonly generation: Schema.Int;
400
378
  }>>;
401
- readonly commands: Schema.Struct<{
402
- readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
379
+ }>, {}>;
380
+ declare class Restarting extends Restarting_base {
381
+ readonly [StateTypeId]: symbol;
382
+ }
383
+ declare const CoolingDown_base: Schema.Class<CoolingDown, Schema.TaggedStruct<"CoolingDown", {
384
+ readonly core: Schema.Struct<{
385
+ readonly policy: Schema.Struct<{
386
+ strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
387
+ intensity: Schema.Int;
388
+ periodMillis: Schema.Int;
389
+ autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
390
+ coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
391
+ readonly millis: Schema.Int;
392
+ }>]>;
393
+ backoff: Schema.Struct<{
394
+ readonly baseMillis: Schema.Int;
395
+ readonly multiplier: Schema.Int;
396
+ readonly capMillis: Schema.Int;
397
+ }>;
398
+ dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
399
+ readonly ceiling: Schema.Int;
400
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
401
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
402
+ readonly millis: Schema.Int;
403
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
404
+ readonly startTimeoutMillis: Schema.Int;
405
+ readonly probeFailureThreshold: Schema.Int;
406
+ }>]>;
407
+ livenessTickMillis: Schema.Int;
408
+ childDeclarations: Schema.$Array<Schema.Struct<{
409
+ readonly childId: Schema.String;
410
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
411
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
412
+ readonly millis: Schema.Int;
413
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
414
+ readonly significant: Schema.Boolean;
415
+ readonly startTimeoutMillis: Schema.Int;
416
+ readonly probeFailureThreshold: Schema.Int;
417
+ }>>;
418
+ }>;
419
+ readonly children: Schema.$Array<Schema.Struct<{
403
420
  readonly childId: Schema.String;
404
421
  readonly generation: Schema.Int;
405
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
406
- readonly millis: Schema.Int;
407
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
422
+ readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
423
+ readonly consecutiveRestarts: Schema.Int;
424
+ readonly probeFailures: Schema.Int;
425
+ }>>;
426
+ readonly restartStamps: Schema.$Array<Schema.Int>;
427
+ readonly nextOrdinal: Schema.Int;
428
+ }>;
429
+ readonly millis: Schema.Int;
430
+ }>, {}>;
431
+ declare class CoolingDown extends CoolingDown_base {
432
+ readonly [StateTypeId]: symbol;
433
+ }
434
+ declare const ShuttingDown_base: Schema.Class<ShuttingDown, Schema.TaggedStruct<"ShuttingDown", {
435
+ readonly core: Schema.Struct<{
436
+ readonly policy: Schema.Struct<{
437
+ strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
438
+ intensity: Schema.Int;
439
+ periodMillis: Schema.Int;
440
+ autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
441
+ coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
442
+ readonly millis: Schema.Int;
443
+ }>]>;
444
+ backoff: Schema.Struct<{
445
+ readonly baseMillis: Schema.Int;
446
+ readonly multiplier: Schema.Int;
447
+ readonly capMillis: Schema.Int;
448
+ }>;
449
+ dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
450
+ readonly ceiling: Schema.Int;
451
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
452
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
453
+ readonly millis: Schema.Int;
454
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
455
+ readonly startTimeoutMillis: Schema.Int;
456
+ readonly probeFailureThreshold: Schema.Int;
457
+ }>]>;
458
+ livenessTickMillis: Schema.Int;
459
+ childDeclarations: Schema.$Array<Schema.Struct<{
460
+ readonly childId: Schema.String;
461
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
462
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
463
+ readonly millis: Schema.Int;
464
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
465
+ readonly significant: Schema.Boolean;
466
+ readonly startTimeoutMillis: Schema.Int;
467
+ readonly probeFailureThreshold: Schema.Int;
468
+ }>>;
469
+ }>;
470
+ readonly children: Schema.$Array<Schema.Struct<{
471
+ readonly childId: Schema.String;
472
+ readonly generation: Schema.Int;
473
+ readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
474
+ readonly consecutiveRestarts: Schema.Int;
475
+ readonly probeFailures: Schema.Int;
476
+ }>>;
477
+ readonly restartStamps: Schema.$Array<Schema.Int>;
478
+ readonly nextOrdinal: Schema.Int;
479
+ }>;
480
+ readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
481
+ readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
482
+ readonly cause: Schema.String;
483
+ }>, Schema.TaggedStruct<"ExitReport", {
484
+ readonly code: Schema.Int;
485
+ readonly signal: Schema.String;
486
+ }>, Schema.TaggedStruct<"InferredReport", {
487
+ readonly failedProbes: Schema.Int;
488
+ }>, Schema.TaggedStruct<"DeadlineMissed", {
489
+ readonly waitedMillis: Schema.Int;
490
+ }>]>;
491
+ }>]>;
492
+ readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
493
+ readonly childId: Schema.String;
494
+ readonly generation: Schema.Int;
495
+ }>]>;
496
+ }>, {}>;
497
+ declare class ShuttingDown extends ShuttingDown_base {
498
+ readonly [StateTypeId]: symbol;
499
+ }
500
+ declare const Terminated_base: Schema.Class<Terminated, Schema.TaggedStruct<"Terminated", {
501
+ readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
502
+ readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
503
+ readonly cause: Schema.String;
504
+ }>, Schema.TaggedStruct<"ExitReport", {
505
+ readonly code: Schema.Int;
506
+ readonly signal: Schema.String;
507
+ }>, Schema.TaggedStruct<"InferredReport", {
508
+ readonly failedProbes: Schema.Int;
509
+ }>, Schema.TaggedStruct<"DeadlineMissed", {
510
+ readonly waitedMillis: Schema.Int;
511
+ }>]>;
512
+ }>]>;
513
+ }>, {}>;
514
+ declare class Terminated extends Terminated_base {
515
+ readonly [StateTypeId]: symbol;
516
+ }
517
+ declare const SupervisorState: Schema.Union<readonly [typeof Running, typeof Restarting, typeof CoolingDown, typeof ShuttingDown, typeof Terminated]>;
518
+ type SupervisorState = typeof SupervisorState.Type;
519
+ //#endregion
520
+ //#region src/kernel/interpret-supervision-event.workflow.d.ts
521
+ declare const DecisionTypeId: unique symbol;
522
+ declare const Stale_base: Schema.Class<Stale, Schema.TaggedStruct<"Stale", {}>, {}>;
523
+ declare class Stale extends Stale_base {
524
+ readonly [DecisionTypeId]: symbol;
525
+ }
526
+ declare const Continue_base: Schema.Class<Continue, Schema.TaggedStruct<"Continue", {
527
+ readonly core: Schema.Struct<{
528
+ readonly policy: Schema.Struct<{
529
+ strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
530
+ intensity: Schema.Int;
531
+ periodMillis: Schema.Int;
532
+ autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
533
+ coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
534
+ readonly millis: Schema.Int;
535
+ }>]>;
536
+ backoff: Schema.Struct<{
537
+ readonly baseMillis: Schema.Int;
538
+ readonly multiplier: Schema.Int;
539
+ readonly capMillis: Schema.Int;
540
+ }>;
541
+ dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
542
+ readonly ceiling: Schema.Int;
543
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
544
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
545
+ readonly millis: Schema.Int;
546
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
547
+ readonly startTimeoutMillis: Schema.Int;
548
+ readonly probeFailureThreshold: Schema.Int;
549
+ }>]>;
550
+ livenessTickMillis: Schema.Int;
551
+ childDeclarations: Schema.$Array<Schema.Struct<{
552
+ readonly childId: Schema.String;
553
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
554
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
555
+ readonly millis: Schema.Int;
556
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
557
+ readonly significant: Schema.Boolean;
558
+ readonly startTimeoutMillis: Schema.Int;
559
+ readonly probeFailureThreshold: Schema.Int;
560
+ }>>;
561
+ }>;
562
+ readonly children: Schema.$Array<Schema.Struct<{
563
+ readonly childId: Schema.String;
564
+ readonly generation: Schema.Int;
565
+ readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
566
+ readonly consecutiveRestarts: Schema.Int;
567
+ readonly probeFailures: Schema.Int;
568
+ }>>;
569
+ readonly restartStamps: Schema.$Array<Schema.Int>;
570
+ readonly nextOrdinal: Schema.Int;
571
+ }>;
572
+ readonly commands: Schema.Struct<{
573
+ readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
574
+ readonly childId: Schema.String;
575
+ readonly generation: Schema.Int;
576
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
577
+ readonly millis: Schema.Int;
578
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
408
579
  }>>;
409
580
  readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
410
581
  readonly childId: Schema.String;
@@ -448,10 +619,10 @@ declare const RestartChildren_base: Schema.Class<RestartChildren, Schema.TaggedS
448
619
  }>>;
449
620
  }>;
450
621
  }>, {}>;
451
- declare class RestartChildren extends RestartChildren_base {
622
+ declare class Continue extends Continue_base {
452
623
  readonly [DecisionTypeId]: symbol;
453
624
  }
454
- declare const StartChildren_base: Schema.Class<StartChildren, Schema.TaggedStruct<"StartChildren", {
625
+ declare const RestartChildren_base: Schema.Class<RestartChildren, Schema.TaggedStruct<"RestartChildren", {
455
626
  readonly core: Schema.Struct<{
456
627
  readonly policy: Schema.Struct<{
457
628
  strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
@@ -497,6 +668,10 @@ declare const StartChildren_base: Schema.Class<StartChildren, Schema.TaggedStruc
497
668
  readonly restartStamps: Schema.$Array<Schema.Int>;
498
669
  readonly nextOrdinal: Schema.Int;
499
670
  }>;
671
+ readonly pending: Schema.$Array<Schema.Struct<{
672
+ readonly childId: Schema.String;
673
+ readonly generation: Schema.Int;
674
+ }>>;
500
675
  readonly commands: Schema.Struct<{
501
676
  readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
502
677
  readonly childId: Schema.String;
@@ -547,10 +722,10 @@ declare const StartChildren_base: Schema.Class<StartChildren, Schema.TaggedStruc
547
722
  }>>;
548
723
  }>;
549
724
  }>, {}>;
550
- declare class StartChildren extends StartChildren_base {
725
+ declare class RestartChildren extends RestartChildren_base {
551
726
  readonly [DecisionTypeId]: symbol;
552
727
  }
553
- declare const CoolDown_base: Schema.Class<CoolDown, Schema.TaggedStruct<"CoolDown", {
728
+ declare const StartChildren_base: Schema.Class<StartChildren, Schema.TaggedStruct<"StartChildren", {
554
729
  readonly core: Schema.Struct<{
555
730
  readonly policy: Schema.Struct<{
556
731
  strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
@@ -596,7 +771,6 @@ declare const CoolDown_base: Schema.Class<CoolDown, Schema.TaggedStruct<"CoolDow
596
771
  readonly restartStamps: Schema.$Array<Schema.Int>;
597
772
  readonly nextOrdinal: Schema.Int;
598
773
  }>;
599
- readonly millis: Schema.Int;
600
774
  readonly commands: Schema.Struct<{
601
775
  readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
602
776
  readonly childId: Schema.String;
@@ -647,10 +821,10 @@ declare const CoolDown_base: Schema.Class<CoolDown, Schema.TaggedStruct<"CoolDow
647
821
  }>>;
648
822
  }>;
649
823
  }>, {}>;
650
- declare class CoolDown extends CoolDown_base {
824
+ declare class StartChildren extends StartChildren_base {
651
825
  readonly [DecisionTypeId]: symbol;
652
826
  }
653
- declare const StopChildren_base: Schema.Class<StopChildren, Schema.TaggedStruct<"StopChildren", {
827
+ declare const CoolDown_base: Schema.Class<CoolDown, Schema.TaggedStruct<"CoolDown", {
654
828
  readonly core: Schema.Struct<{
655
829
  readonly policy: Schema.Struct<{
656
830
  strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
@@ -696,22 +870,7 @@ declare const StopChildren_base: Schema.Class<StopChildren, Schema.TaggedStruct<
696
870
  readonly restartStamps: Schema.$Array<Schema.Int>;
697
871
  readonly nextOrdinal: Schema.Int;
698
872
  }>;
699
- readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
700
- readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
701
- readonly cause: Schema.String;
702
- }>, Schema.TaggedStruct<"ExitReport", {
703
- readonly code: Schema.Int;
704
- readonly signal: Schema.String;
705
- }>, Schema.TaggedStruct<"InferredReport", {
706
- readonly failedProbes: Schema.Int;
707
- }>, Schema.TaggedStruct<"DeadlineMissed", {
708
- readonly waitedMillis: Schema.Int;
709
- }>]>;
710
- }>]>;
711
- readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
712
- readonly childId: Schema.String;
713
- readonly generation: Schema.Int;
714
- }>]>;
873
+ readonly millis: Schema.Int;
715
874
  readonly commands: Schema.Struct<{
716
875
  readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
717
876
  readonly childId: Schema.String;
@@ -762,10 +921,55 @@ declare const StopChildren_base: Schema.Class<StopChildren, Schema.TaggedStruct<
762
921
  }>>;
763
922
  }>;
764
923
  }>, {}>;
765
- declare class StopChildren extends StopChildren_base {
924
+ declare class CoolDown extends CoolDown_base {
766
925
  readonly [DecisionTypeId]: symbol;
767
926
  }
768
- declare const Terminate_base: Schema.Class<Terminate, Schema.TaggedStruct<"Terminate", {
927
+ declare const StopChildren_base: Schema.Class<StopChildren, Schema.TaggedStruct<"StopChildren", {
928
+ readonly core: Schema.Struct<{
929
+ readonly policy: Schema.Struct<{
930
+ strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
931
+ intensity: Schema.Int;
932
+ periodMillis: Schema.Int;
933
+ autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
934
+ coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
935
+ readonly millis: Schema.Int;
936
+ }>]>;
937
+ backoff: Schema.Struct<{
938
+ readonly baseMillis: Schema.Int;
939
+ readonly multiplier: Schema.Int;
940
+ readonly capMillis: Schema.Int;
941
+ }>;
942
+ dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
943
+ readonly ceiling: Schema.Int;
944
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
945
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
946
+ readonly millis: Schema.Int;
947
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
948
+ readonly startTimeoutMillis: Schema.Int;
949
+ readonly probeFailureThreshold: Schema.Int;
950
+ }>]>;
951
+ livenessTickMillis: Schema.Int;
952
+ childDeclarations: Schema.$Array<Schema.Struct<{
953
+ readonly childId: Schema.String;
954
+ readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
955
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
956
+ readonly millis: Schema.Int;
957
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
958
+ readonly significant: Schema.Boolean;
959
+ readonly startTimeoutMillis: Schema.Int;
960
+ readonly probeFailureThreshold: Schema.Int;
961
+ }>>;
962
+ }>;
963
+ readonly children: Schema.$Array<Schema.Struct<{
964
+ readonly childId: Schema.String;
965
+ readonly generation: Schema.Int;
966
+ readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
967
+ readonly consecutiveRestarts: Schema.Int;
968
+ readonly probeFailures: Schema.Int;
969
+ }>>;
970
+ readonly restartStamps: Schema.$Array<Schema.Int>;
971
+ readonly nextOrdinal: Schema.Int;
972
+ }>;
769
973
  readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
770
974
  readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
771
975
  readonly cause: Schema.String;
@@ -778,6 +982,10 @@ declare const Terminate_base: Schema.Class<Terminate, Schema.TaggedStruct<"Termi
778
982
  readonly waitedMillis: Schema.Int;
779
983
  }>]>;
780
984
  }>]>;
985
+ readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
986
+ readonly childId: Schema.String;
987
+ readonly generation: Schema.Int;
988
+ }>]>;
781
989
  readonly commands: Schema.Struct<{
782
990
  readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
783
991
  readonly childId: Schema.String;
@@ -828,19 +1036,31 @@ declare const Terminate_base: Schema.Class<Terminate, Schema.TaggedStruct<"Termi
828
1036
  }>>;
829
1037
  }>;
830
1038
  }>, {}>;
831
- declare class Terminate extends Terminate_base {
1039
+ declare class StopChildren extends StopChildren_base {
832
1040
  readonly [DecisionTypeId]: symbol;
833
1041
  }
834
- declare const RefuseDynamicStart_base: Schema.Class<RefuseDynamicStart, Schema.TaggedStruct<"RefuseDynamicStart", {
835
- readonly commands: Schema.Struct<{
836
- readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
837
- readonly childId: Schema.String;
838
- readonly generation: Schema.Int;
839
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
840
- readonly millis: Schema.Int;
841
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
842
- }>>;
843
- readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
1042
+ declare const Terminate_base: Schema.Class<Terminate, Schema.TaggedStruct<"Terminate", {
1043
+ readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
1044
+ readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
1045
+ readonly cause: Schema.String;
1046
+ }>, Schema.TaggedStruct<"ExitReport", {
1047
+ readonly code: Schema.Int;
1048
+ readonly signal: Schema.String;
1049
+ }>, Schema.TaggedStruct<"InferredReport", {
1050
+ readonly failedProbes: Schema.Int;
1051
+ }>, Schema.TaggedStruct<"DeadlineMissed", {
1052
+ readonly waitedMillis: Schema.Int;
1053
+ }>]>;
1054
+ }>]>;
1055
+ readonly commands: Schema.Struct<{
1056
+ readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
1057
+ readonly childId: Schema.String;
1058
+ readonly generation: Schema.Int;
1059
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
1060
+ readonly millis: Schema.Int;
1061
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
1062
+ }>>;
1063
+ readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
844
1064
  readonly childId: Schema.String;
845
1065
  readonly generation: Schema.Int;
846
1066
  }>>;
@@ -882,251 +1102,65 @@ declare const RefuseDynamicStart_base: Schema.Class<RefuseDynamicStart, Schema.T
882
1102
  }>>;
883
1103
  }>;
884
1104
  }>, {}>;
885
- declare class RefuseDynamicStart extends RefuseDynamicStart_base {
1105
+ declare class Terminate extends Terminate_base {
886
1106
  readonly [DecisionTypeId]: symbol;
887
1107
  }
888
- declare const SupervisionDecision: Schema.Union<readonly [typeof Stale, typeof Continue, typeof RestartChildren, typeof StartChildren, typeof CoolDown, typeof StopChildren, typeof Terminate, typeof RefuseDynamicStart]>;
889
- type SupervisionDecision = typeof SupervisionDecision.Type;
890
- declare const Running_base: Schema.Class<Running, Schema.TaggedStruct<"Running", {
891
- readonly core: Schema.Struct<{
892
- readonly policy: Schema.Struct<{
893
- strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
894
- intensity: Schema.Int;
895
- periodMillis: Schema.Int;
896
- autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
897
- coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
898
- readonly millis: Schema.Int;
899
- }>]>;
900
- backoff: Schema.Struct<{
901
- readonly baseMillis: Schema.Int;
902
- readonly multiplier: Schema.Int;
903
- readonly capMillis: Schema.Int;
904
- }>;
905
- dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
906
- readonly ceiling: Schema.Int;
907
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
908
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
909
- readonly millis: Schema.Int;
910
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
911
- readonly startTimeoutMillis: Schema.Int;
912
- readonly probeFailureThreshold: Schema.Int;
913
- }>]>;
914
- livenessTickMillis: Schema.Int;
915
- childDeclarations: Schema.$Array<Schema.Struct<{
916
- readonly childId: Schema.String;
917
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
918
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
919
- readonly millis: Schema.Int;
920
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
921
- readonly significant: Schema.Boolean;
922
- readonly startTimeoutMillis: Schema.Int;
923
- readonly probeFailureThreshold: Schema.Int;
924
- }>>;
925
- }>;
926
- readonly children: Schema.$Array<Schema.Struct<{
1108
+ declare const RefuseDynamicStart_base: Schema.Class<RefuseDynamicStart, Schema.TaggedStruct<"RefuseDynamicStart", {
1109
+ readonly commands: Schema.Struct<{
1110
+ readonly stops: Schema.$Array<Schema.TaggedStruct<"StopChild", {
927
1111
  readonly childId: Schema.String;
928
1112
  readonly generation: Schema.Int;
929
- readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
930
- readonly consecutiveRestarts: Schema.Int;
931
- readonly probeFailures: Schema.Int;
932
- }>>;
933
- readonly restartStamps: Schema.$Array<Schema.Int>;
934
- readonly nextOrdinal: Schema.Int;
935
- }>;
936
- }>, {}>;
937
- declare class Running extends Running_base {
938
- readonly [StateTypeId]: symbol;
939
- }
940
- declare const Restarting_base: Schema.Class<Restarting, Schema.TaggedStruct<"Restarting", {
941
- readonly core: Schema.Struct<{
942
- readonly policy: Schema.Struct<{
943
- strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
944
- intensity: Schema.Int;
945
- periodMillis: Schema.Int;
946
- autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
947
- coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
1113
+ readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
948
1114
  readonly millis: Schema.Int;
949
- }>]>;
950
- backoff: Schema.Struct<{
951
- readonly baseMillis: Schema.Int;
952
- readonly multiplier: Schema.Int;
953
- readonly capMillis: Schema.Int;
954
- }>;
955
- dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
956
- readonly ceiling: Schema.Int;
957
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
958
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
959
- readonly millis: Schema.Int;
960
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
961
- readonly startTimeoutMillis: Schema.Int;
962
- readonly probeFailureThreshold: Schema.Int;
963
- }>]>;
964
- livenessTickMillis: Schema.Int;
965
- childDeclarations: Schema.$Array<Schema.Struct<{
966
- readonly childId: Schema.String;
967
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
968
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
969
- readonly millis: Schema.Int;
970
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
971
- readonly significant: Schema.Boolean;
972
- readonly startTimeoutMillis: Schema.Int;
973
- readonly probeFailureThreshold: Schema.Int;
974
- }>>;
975
- }>;
976
- readonly children: Schema.$Array<Schema.Struct<{
1115
+ }>, Schema.TaggedStruct<"Infinity", {}>]>;
1116
+ }>>;
1117
+ readonly starts: Schema.$Array<Schema.TaggedStruct<"StartChild", {
977
1118
  readonly childId: Schema.String;
978
1119
  readonly generation: Schema.Int;
979
- readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
980
- readonly consecutiveRestarts: Schema.Int;
981
- readonly probeFailures: Schema.Int;
982
1120
  }>>;
983
- readonly restartStamps: Schema.$Array<Schema.Int>;
984
- readonly nextOrdinal: Schema.Int;
985
- }>;
986
- readonly pending: Schema.$Array<Schema.Struct<{
987
- readonly childId: Schema.String;
988
- readonly generation: Schema.Int;
989
- }>>;
990
- }>, {}>;
991
- declare class Restarting extends Restarting_base {
992
- readonly [StateTypeId]: symbol;
993
- }
994
- declare const CoolingDown_base: Schema.Class<CoolingDown, Schema.TaggedStruct<"CoolingDown", {
995
- readonly core: Schema.Struct<{
996
- readonly policy: Schema.Struct<{
997
- strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
998
- intensity: Schema.Int;
999
- periodMillis: Schema.Int;
1000
- autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
1001
- coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
1002
- readonly millis: Schema.Int;
1003
- }>]>;
1004
- backoff: Schema.Struct<{
1005
- readonly baseMillis: Schema.Int;
1006
- readonly multiplier: Schema.Int;
1007
- readonly capMillis: Schema.Int;
1008
- }>;
1009
- dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
1010
- readonly ceiling: Schema.Int;
1011
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
1012
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
1013
- readonly millis: Schema.Int;
1014
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
1015
- readonly startTimeoutMillis: Schema.Int;
1016
- readonly probeFailureThreshold: Schema.Int;
1017
- }>]>;
1018
- livenessTickMillis: Schema.Int;
1019
- childDeclarations: Schema.$Array<Schema.Struct<{
1020
- readonly childId: Schema.String;
1021
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
1022
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
1023
- readonly millis: Schema.Int;
1024
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
1025
- readonly significant: Schema.Boolean;
1026
- readonly startTimeoutMillis: Schema.Int;
1027
- readonly probeFailureThreshold: Schema.Int;
1028
- }>>;
1029
- }>;
1030
- readonly children: Schema.$Array<Schema.Struct<{
1121
+ readonly arms: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ArmChildTimer", {
1122
+ readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
1031
1123
  readonly childId: Schema.String;
1032
1124
  readonly generation: Schema.Int;
1033
- readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
1034
- readonly consecutiveRestarts: Schema.Int;
1035
- readonly probeFailures: Schema.Int;
1036
- }>>;
1037
- readonly restartStamps: Schema.$Array<Schema.Int>;
1038
- readonly nextOrdinal: Schema.Int;
1039
- }>;
1040
- readonly millis: Schema.Int;
1041
- }>, {}>;
1042
- declare class CoolingDown extends CoolingDown_base {
1043
- readonly [StateTypeId]: symbol;
1044
- }
1045
- declare const ShuttingDown_base: Schema.Class<ShuttingDown, Schema.TaggedStruct<"ShuttingDown", {
1046
- readonly core: Schema.Struct<{
1047
- readonly policy: Schema.Struct<{
1048
- strategy: Schema.Literals<readonly ["one_for_one", "one_for_all", "rest_for_one"]>;
1049
- intensity: Schema.Int;
1050
- periodMillis: Schema.Int;
1051
- autoShutdown: Schema.Literals<readonly ["never", "any_significant", "all_significant"]>;
1052
- coolDown: Schema.Union<readonly [Schema.TaggedStruct<"NoCoolDown", {}>, Schema.TaggedStruct<"CoolDownAfter", {
1053
- readonly millis: Schema.Int;
1054
- }>]>;
1055
- backoff: Schema.Struct<{
1056
- readonly baseMillis: Schema.Int;
1057
- readonly multiplier: Schema.Int;
1058
- readonly capMillis: Schema.Int;
1059
- }>;
1060
- dynamic: Schema.Union<readonly [Schema.TaggedStruct<"NoDynamicChildren", {}>, Schema.TaggedStruct<"DynamicChildren", {
1061
- readonly ceiling: Schema.Int;
1062
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
1063
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
1064
- readonly millis: Schema.Int;
1065
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
1066
- readonly startTimeoutMillis: Schema.Int;
1067
- readonly probeFailureThreshold: Schema.Int;
1068
- }>]>;
1069
- livenessTickMillis: Schema.Int;
1070
- childDeclarations: Schema.$Array<Schema.Struct<{
1071
- readonly childId: Schema.String;
1072
- readonly restartType: Schema.Literals<readonly ["permanent", "transient", "temporary"]>;
1073
- readonly shutdown: Schema.Union<readonly [Schema.TaggedStruct<"Brutal", {}>, Schema.TaggedStruct<"Graceful", {
1074
- readonly millis: Schema.Int;
1075
- }>, Schema.TaggedStruct<"Infinity", {}>]>;
1076
- readonly significant: Schema.Boolean;
1077
- readonly startTimeoutMillis: Schema.Int;
1078
- readonly probeFailureThreshold: Schema.Int;
1079
- }>>;
1080
- }>;
1081
- readonly children: Schema.$Array<Schema.Struct<{
1125
+ readonly deadline: Schema.Int;
1126
+ }>, Schema.TaggedStruct<"ArmSupervisorTimer", {
1127
+ readonly kind: Schema.Literals<readonly ["start_deadline", "backoff", "liveness_tick", "cool_down"]>;
1128
+ readonly deadline: Schema.Int;
1129
+ }>]>>;
1130
+ readonly replies: Schema.$Array<Schema.Union<readonly [Schema.TaggedStruct<"ReplyStartAccepted", {
1131
+ readonly requestId: Schema.String;
1082
1132
  readonly childId: Schema.String;
1083
1133
  readonly generation: Schema.Int;
1084
- readonly status: Schema.Literals<readonly ["starting", "ready", "stopping"]>;
1085
- readonly consecutiveRestarts: Schema.Int;
1086
- readonly probeFailures: Schema.Int;
1134
+ }>, Schema.TaggedStruct<"ReplyStartRefused", {
1135
+ readonly requestId: Schema.String;
1136
+ }>, Schema.TaggedStruct<"ReplyStopped", {
1137
+ readonly requestId: Schema.String;
1138
+ }>]>>;
1139
+ readonly terminates: Schema.$Array<Schema.TaggedStruct<"TerminateSupervisor", {
1140
+ readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
1141
+ readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
1142
+ readonly cause: Schema.String;
1143
+ }>, Schema.TaggedStruct<"ExitReport", {
1144
+ readonly code: Schema.Int;
1145
+ readonly signal: Schema.String;
1146
+ }>, Schema.TaggedStruct<"InferredReport", {
1147
+ readonly failedProbes: Schema.Int;
1148
+ }>, Schema.TaggedStruct<"DeadlineMissed", {
1149
+ readonly waitedMillis: Schema.Int;
1150
+ }>]>;
1151
+ }>]>;
1152
+ readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
1153
+ readonly childId: Schema.String;
1154
+ readonly generation: Schema.Int;
1155
+ }>]>;
1087
1156
  }>>;
1088
- readonly restartStamps: Schema.$Array<Schema.Int>;
1089
- readonly nextOrdinal: Schema.Int;
1090
1157
  }>;
1091
- readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
1092
- readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
1093
- readonly cause: Schema.String;
1094
- }>, Schema.TaggedStruct<"ExitReport", {
1095
- readonly code: Schema.Int;
1096
- readonly signal: Schema.String;
1097
- }>, Schema.TaggedStruct<"InferredReport", {
1098
- readonly failedProbes: Schema.Int;
1099
- }>, Schema.TaggedStruct<"DeadlineMissed", {
1100
- readonly waitedMillis: Schema.Int;
1101
- }>]>;
1102
- }>]>;
1103
- readonly exit: Schema.Union<readonly [Schema.TaggedStruct<"RequestedExit", {}>, Schema.TaggedStruct<"IntensityExceededExit", {
1104
- readonly childId: Schema.String;
1105
- readonly generation: Schema.Int;
1106
- }>]>;
1107
1158
  }>, {}>;
1108
- declare class ShuttingDown extends ShuttingDown_base {
1109
- readonly [StateTypeId]: symbol;
1110
- }
1111
- declare const Terminated_base: Schema.Class<Terminated, Schema.TaggedStruct<"Terminated", {
1112
- readonly reason: Schema.Union<readonly [Schema.TaggedStruct<"Normal", {}>, Schema.TaggedStruct<"Shutdown", {}>, Schema.TaggedStruct<"Abnormal", {
1113
- readonly report: Schema.Union<readonly [Schema.TaggedStruct<"CauseReport", {
1114
- readonly cause: Schema.String;
1115
- }>, Schema.TaggedStruct<"ExitReport", {
1116
- readonly code: Schema.Int;
1117
- readonly signal: Schema.String;
1118
- }>, Schema.TaggedStruct<"InferredReport", {
1119
- readonly failedProbes: Schema.Int;
1120
- }>, Schema.TaggedStruct<"DeadlineMissed", {
1121
- readonly waitedMillis: Schema.Int;
1122
- }>]>;
1123
- }>]>;
1124
- }>, {}>;
1125
- declare class Terminated extends Terminated_base {
1126
- readonly [StateTypeId]: symbol;
1159
+ declare class RefuseDynamicStart extends RefuseDynamicStart_base {
1160
+ readonly [DecisionTypeId]: symbol;
1127
1161
  }
1128
- declare const SupervisorState: Schema.Union<readonly [typeof Running, typeof Restarting, typeof CoolingDown, typeof ShuttingDown, typeof Terminated]>;
1129
- type SupervisorState = typeof SupervisorState.Type;
1162
+ declare const SupervisionDecision: Schema.Union<readonly [typeof Stale, typeof Continue, typeof RestartChildren, typeof StartChildren, typeof CoolDown, typeof StopChildren, typeof Terminate, typeof RefuseDynamicStart]>;
1163
+ type SupervisionDecision = typeof SupervisionDecision.Type;
1130
1164
  //#endregion
1131
1165
  //#region src/kernel/SupervisionEvent.schema.d.ts
1132
1166
  declare const SupervisionEvent: Schema.Union<readonly [Schema.TaggedStruct<"SupervisorStarted", {
@@ -1196,13 +1230,6 @@ declare const SupervisionEvent: Schema.Union<readonly [Schema.TaggedStruct<"Supe
1196
1230
  }>]>;
1197
1231
  type SupervisionEvent = typeof SupervisionEvent.Type;
1198
1232
  //#endregion
1199
- //#region src/kernel/SupervisionLimits.schema.d.ts
1200
- /** How many times a child incarnation has been replaced: any non-negative safe integer. Generation stays small so generation+1 stays in range. */
1201
- declare const Generation: Schema.Int;
1202
- type Generation = typeof Generation.Type;
1203
- declare const ChildId: Schema.String;
1204
- type ChildId = typeof ChildId.Type;
1205
- //#endregion
1206
1233
  //#region src/Supervisor/bound-child.d.ts
1207
1234
  /**
1208
1235
  * A child bound to the medium that interprets its program, and to the services
@@ -1222,6 +1249,52 @@ interface BoundChild {
1222
1249
  readonly stop: (evidence: Started, mode: ShutdownMode) => Effect.Effect<Stopped, never, never>;
1223
1250
  }
1224
1251
  //#endregion
1252
+ //#region src/Supervisor/DynamicOutcome.schema.d.ts
1253
+ declare const DynamicStartAccepted: Schema.Struct<{
1254
+ readonly outcome: Schema.Literal<"accepted">;
1255
+ readonly childId: Schema.String;
1256
+ readonly generation: Schema.Int;
1257
+ }>;
1258
+ type DynamicStartAccepted = typeof DynamicStartAccepted.Type;
1259
+ declare const DynamicStartRefused: Schema.Struct<{
1260
+ readonly outcome: Schema.Literal<"refused">;
1261
+ }>;
1262
+ type DynamicStartRefused = typeof DynamicStartRefused.Type;
1263
+ declare const DynamicStartOutcome: Schema.Union<readonly [Schema.Struct<{
1264
+ readonly outcome: Schema.Literal<"accepted">;
1265
+ readonly childId: Schema.String;
1266
+ readonly generation: Schema.Int;
1267
+ }>, Schema.Struct<{
1268
+ readonly outcome: Schema.Literal<"refused">;
1269
+ }>]>;
1270
+ type DynamicStartOutcome = typeof DynamicStartOutcome.Type;
1271
+ declare const DynamicStopDone: Schema.Struct<{
1272
+ readonly outcome: Schema.Literal<"stopped">;
1273
+ }>;
1274
+ type DynamicStopDone = typeof DynamicStopDone.Type;
1275
+ declare const DynamicStopMissed: Schema.Struct<{
1276
+ readonly outcome: Schema.Literal<"missed">;
1277
+ }>;
1278
+ type DynamicStopMissed = typeof DynamicStopMissed.Type;
1279
+ declare const DynamicStopOutcome: Schema.Union<readonly [Schema.Struct<{
1280
+ readonly outcome: Schema.Literal<"stopped">;
1281
+ }>, Schema.Struct<{
1282
+ readonly outcome: Schema.Literal<"missed">;
1283
+ }>]>;
1284
+ type DynamicStopOutcome = typeof DynamicStopOutcome.Type;
1285
+ declare const DynamicOutcome: Schema.Union<readonly [Schema.Union<readonly [Schema.Struct<{
1286
+ readonly outcome: Schema.Literal<"accepted">;
1287
+ readonly childId: Schema.String;
1288
+ readonly generation: Schema.Int;
1289
+ }>, Schema.Struct<{
1290
+ readonly outcome: Schema.Literal<"refused">;
1291
+ }>]>, Schema.Union<readonly [Schema.Struct<{
1292
+ readonly outcome: Schema.Literal<"stopped">;
1293
+ }>, Schema.Struct<{
1294
+ readonly outcome: Schema.Literal<"missed">;
1295
+ }>]>]>;
1296
+ type DynamicOutcome = typeof DynamicOutcome.Type;
1297
+ //#endregion
1225
1298
  //#region src/Supervisor/running-supervisor.handle.d.ts
1226
1299
  /** Brands a running supervisor handle. */
1227
1300
  declare const TypeId: unique symbol;
@@ -1232,30 +1305,6 @@ interface TraceEntry {
1232
1305
  readonly event: SupervisionEvent;
1233
1306
  readonly decision: typeof SupervisionDecision.Encoded;
1234
1307
  }
1235
- /** A dynamic start the supervisor accepted, naming the child it allocated. */
1236
- interface DynamicStartAccepted {
1237
- readonly outcome: 'accepted';
1238
- readonly childId: ChildId;
1239
- readonly generation: Generation;
1240
- }
1241
- /** A dynamic start the supervisor refused (ceiling reached, or not running). */
1242
- interface DynamicStartRefused {
1243
- readonly outcome: 'refused';
1244
- }
1245
- /** The answer to a dynamic start. */
1246
- type DynamicStartOutcome = DynamicStartAccepted | DynamicStartRefused;
1247
- /** A dynamic stop that removed the child. */
1248
- interface DynamicStopDone {
1249
- readonly outcome: 'stopped';
1250
- }
1251
- /** A dynamic stop that named no current incarnation. */
1252
- interface DynamicStopMissed {
1253
- readonly outcome: 'missed';
1254
- }
1255
- /** The answer to a dynamic stop. */
1256
- type DynamicStopOutcome = DynamicStopDone | DynamicStopMissed;
1257
- /** Any dynamic answer, as the reply table stores it. */
1258
- type DynamicOutcome = DynamicStartOutcome | DynamicStopOutcome;
1259
1308
  interface SupervisorSlot {
1260
1309
  readonly state: Ref.Ref<SupervisorState>;
1261
1310
  readonly mailbox: Queue.Queue<SupervisionEvent>;
@@ -1416,7 +1465,7 @@ declare const child: {
1416
1465
  <R2, R>(self: SupervisorSpec<R2>, childId: ChildId, program: FiberChild<R>, options?: ChildOptions): SupervisorSpec<R | R2>;
1417
1466
  };
1418
1467
  declare namespace mod_d_exports {
1419
- export { BareFiberProgram, ChildOptions, ChildProgram, ChildSpec, ChildSpecs, DynamicOptions, DynamicOutcome, DynamicStartAccepted, DynamicStartOutcome, DynamicStartRefused, DynamicStopDone, DynamicStopMissed, DynamicStopOutcome, FiberChild, FiberMedium_d_exports as FiberMedium, FiberProgram, Medium_d_exports as Medium, RunningSupervisor, SpecTypeId, SupervisorSpec, SupervisorTerminated, TraceEntry, TypeId, autoShutdown, awaitTerminated, backoff, child, children, coolDown, dynamic, intensity, isRunningSupervisor, isSupervisorSpec, livenessTick, make, readyOnStart, shutdown, startChild, statusOf, stopChild, strategy, traceOf };
1468
+ export { BareFiberProgram, ChildOptions, ChildProgram, ChildSpec, ChildSpecs, ClassifyChildExit, DynamicOptions, DynamicOutcome, DynamicStartAccepted, DynamicStartOutcome, DynamicStartRefused, DynamicStopDone, DynamicStopMissed, DynamicStopOutcome, FiberChild, FiberMedium_d_exports as FiberMedium, FiberProgram, Medium_d_exports as Medium, RunningSupervisor, SpecTypeId, SupervisorSpec, SupervisorTerminated, TraceEntry, TypeId, autoShutdown, awaitTerminated, backoff, child, children, classifyChildExit, coolDown, dynamic, intensity, isRunningSupervisor, isSupervisorSpec, livenessTick, make, readyOnStart, shutdown, startChild, statusOf, stopChild, strategy, traceOf };
1420
1469
  }
1421
1470
  //#endregion
1422
1471
  export { mod_d_exports as Supervisor };