@rotorsoft/act 1.32.28 → 1.32.30

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.
Files changed (69) hide show
  1. package/README.md +10 -8
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/@types/config.d.ts.map +1 -1
  4. package/dist/@types/internal/autoclose-policy.d.ts +8 -49
  5. package/dist/@types/internal/autoclose-policy.d.ts.map +1 -1
  6. package/dist/@types/internal/autoclose-reaction.d.ts +0 -7
  7. package/dist/@types/internal/autoclose-reaction.d.ts.map +1 -1
  8. package/dist/@types/internal/autoclose-window.d.ts +1 -14
  9. package/dist/@types/internal/autoclose-window.d.ts.map +1 -1
  10. package/dist/@types/internal/backoff.d.ts +1 -6
  11. package/dist/@types/internal/backoff.d.ts.map +1 -1
  12. package/dist/@types/internal/circuit-breaker.d.ts +6 -7
  13. package/dist/@types/internal/circuit-breaker.d.ts.map +1 -1
  14. package/dist/@types/internal/close-cycle.d.ts +0 -13
  15. package/dist/@types/internal/close-cycle.d.ts.map +1 -1
  16. package/dist/@types/internal/close-signal.d.ts +0 -5
  17. package/dist/@types/internal/close-signal.d.ts.map +1 -1
  18. package/dist/@types/internal/config.d.ts +7 -39
  19. package/dist/@types/internal/config.d.ts.map +1 -1
  20. package/dist/@types/internal/correlator.d.ts +0 -7
  21. package/dist/@types/internal/correlator.d.ts.map +1 -1
  22. package/dist/@types/internal/date-reviver.d.ts +0 -5
  23. package/dist/@types/internal/date-reviver.d.ts.map +1 -1
  24. package/dist/@types/internal/defer-config.d.ts +0 -13
  25. package/dist/@types/internal/defer-config.d.ts.map +1 -1
  26. package/dist/@types/internal/defer-signal.d.ts +0 -3
  27. package/dist/@types/internal/defer-signal.d.ts.map +1 -1
  28. package/dist/@types/internal/defer-timer.d.ts +1 -5
  29. package/dist/@types/internal/defer-timer.d.ts.map +1 -1
  30. package/dist/@types/internal/drain-cycle.d.ts +2 -2
  31. package/dist/@types/internal/drain-ratio.d.ts +0 -5
  32. package/dist/@types/internal/drain-ratio.d.ts.map +1 -1
  33. package/dist/@types/internal/drain.d.ts +0 -6
  34. package/dist/@types/internal/drain.d.ts.map +1 -1
  35. package/dist/@types/internal/event-versions.d.ts +0 -9
  36. package/dist/@types/internal/event-versions.d.ts.map +1 -1
  37. package/dist/@types/internal/index.d.ts +0 -5
  38. package/dist/@types/internal/index.d.ts.map +1 -1
  39. package/dist/@types/internal/lru-map.d.ts +0 -9
  40. package/dist/@types/internal/lru-map.d.ts.map +1 -1
  41. package/dist/@types/internal/projection-fold.d.ts +0 -3
  42. package/dist/@types/internal/projection-fold.d.ts.map +1 -1
  43. package/dist/@types/internal/report-once.d.ts +0 -7
  44. package/dist/@types/internal/report-once.d.ts.map +1 -1
  45. package/dist/@types/internal/sensitive.d.ts +6 -38
  46. package/dist/@types/internal/sensitive.d.ts.map +1 -1
  47. package/dist/@types/internal/settle.d.ts +0 -9
  48. package/dist/@types/internal/settle.d.ts.map +1 -1
  49. package/dist/@types/internal/tracing.d.ts +0 -11
  50. package/dist/@types/internal/tracing.d.ts.map +1 -1
  51. package/dist/@types/internal/walk-streams.d.ts +0 -2
  52. package/dist/@types/internal/walk-streams.d.ts.map +1 -1
  53. package/dist/@types/types/ports.d.ts +1 -1
  54. package/dist/{chunk-F7K7SIG6.js → chunk-HHKLVRR4.js} +1 -1
  55. package/dist/chunk-HHKLVRR4.js.map +1 -0
  56. package/dist/{chunk-5FXT63KF.js → chunk-X3MMQIIP.js} +12 -4
  57. package/dist/chunk-X3MMQIIP.js.map +1 -0
  58. package/dist/index.cjs +17 -8
  59. package/dist/index.cjs.map +1 -1
  60. package/dist/index.js +9 -8
  61. package/dist/index.js.map +1 -1
  62. package/dist/test/index.cjs +10 -2
  63. package/dist/test/index.cjs.map +1 -1
  64. package/dist/test/index.js +2 -2
  65. package/dist/types/index.cjs.map +1 -1
  66. package/dist/types/index.js +1 -1
  67. package/package.json +1 -1
  68. package/dist/chunk-5FXT63KF.js.map +0 -1
  69. package/dist/chunk-F7K7SIG6.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;iBAWxB,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AA0CpD;;;;GAIG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKd,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAsBhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,MAAM,QAAO,MAwBzB,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;iBAWxB,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAsDpD;;;;GAIG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKd,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAsBhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,MAAM,QAAO,MAwBzB,CAAC"}
@@ -1,49 +1,16 @@
1
1
  /**
2
- * @module autoclose-policy
3
- * @category Internal
4
- *
5
- * Declarative close-policy options consumed by `.autocloses({...})`
6
- * Three optional fields cover the three
7
- * operational pressure points every real close policy traces back to:
8
- *
9
- * - `after` — time / compliance ("autocloses **after** N days")
10
- * - `is` — domain lifecycle ("autocloses ... **is** Resolved")
11
- * - `reaches` — resource ("autocloses ... **reaches** 10k events")
12
- *
13
- * Top-level fields combine with **AND** semantics. This captures the
14
- * common cooldown-after-terminal pattern that runs through almost
15
- * every business app — *"close 90 days after `Resolved`"*, *"close 14
16
- * days after `Delivered`"*, *"close 30 days after a GDPR deletion
17
- * request"*. All conditions must hold for the cycle to truncate.
18
- *
19
- * A separate `or: {...}` block opens an alternative path: when
20
- * present, the policy fires if **either** the top-level AND group
21
- * matches **or** any field inside `or` matches. Use it for safety
22
- * nets — *"close (Resolved AND aged 90 days) OR if event count
23
- * reaches 10k"*. The two-axis split mirrors the two ways close
24
- * policies appear in practice: primary close logic (AND-shaped) and
25
- * defensive backstops (OR-shaped).
26
- *
27
- * The state builder's `.autocloses(...)` overload distinguishes
28
- * function (predicate) from object (policy) and routes the latter
29
- * through {@link compile_autoclose_policy}, which validates via
30
- * {@link AutoclosePolicySchema} and returns the compiled predicate.
31
- * Operators with custom needs (per-stream metadata, multi-branch
32
- * AND/OR like "(`Resolved` + 90d) OR (`Cancelled` + 30d)") keep the
33
- * function form; the declarative form covers the 90% case.
34
- *
35
- * Validation runs at the builder call (`act().build()` time), so
36
- * misconfiguration — empty bag, sub-1 `reaches`, sub-minute `after`,
37
- * empty `is`, empty `or`, nested `or` inside `or`, unknown keys —
38
- * throws at build, not on the first cycle tick.
39
- *
40
- * @internal
2
+ * Compiles the declarative `.autocloses({...})` policy into a predicate.
3
+ * Top-level `after` / `is` / `reaches` combine with AND; an `or: {...}`
4
+ * block adds an alternative path. Validated with
5
+ * {@link AutoclosePolicySchema} when the app builds, so a bad policy throws
6
+ * then, not on the first cycle. Semantics and examples:
7
+ * docs/docs/guides/close-policies.md.
41
8
  */
42
9
  import { z } from "zod";
43
10
  import type { AutoclosePredicate, Schemas } from "../types/action.js";
44
- /** The `Date` that lies `days` after `date`. @internal */
11
+ /** The `Date` that lies `days` after `date`. */
45
12
  export declare function days_after(date: Date, days: number): Date;
46
- /** The `Date` that lies `days` in the past. @internal */
13
+ /** The `Date` that lies `days` in the past. */
47
14
  export declare function days_before_now(days: number): Date;
48
15
  /**
49
16
  * Zod schema for the declarative {@link AutoclosePolicy} bag.
@@ -52,8 +19,6 @@ export declare function days_before_now(days: number): Date;
52
19
  * {@link AutoclosePolicy} type and the `.autocloses({...})` overload,
53
20
  * never this schema. `.strict()` rejects unknown keys so typos surface
54
21
  * at build instead of being silently ignored.
55
- *
56
- * @internal
57
22
  */
58
23
  declare const AutoclosePolicySchema: z.ZodObject<{
59
24
  after: z.ZodOptional<z.ZodObject<{
@@ -128,8 +93,6 @@ export type AutoclosePolicy = z.infer<typeof AutoclosePolicySchema>;
128
93
  * Throws `ZodError` at call time when the options are invalid (empty
129
94
  * bag, non-positive `reaches`, sub-minute `after`, empty `is`, empty
130
95
  * `or`, nested `or`, unknown keys).
131
- *
132
- * @internal
133
96
  */
134
97
  /**
135
98
  * The smallest `after` window (in days) anywhere in a policy — across
@@ -143,8 +106,6 @@ export type AutoclosePolicy = z.infer<typeof AutoclosePolicySchema>;
143
106
  * just waits for the next event to re-trigger rather than parking on a
144
107
  * due-time. Conservative — the min across branches never defers past
145
108
  * the soonest a branch could fire.
146
- *
147
- * @internal
148
109
  */
149
110
  export declare function policy_min_after_days(options: AutoclosePolicy): number | undefined;
150
111
  /**
@@ -154,8 +115,6 @@ export declare function policy_min_after_days(options: AutoclosePolicy): number
154
115
  * window (via a windowed close) and derives its prune due-time as
155
116
  * `tail.created` plus this many days — the earliest the oldest
156
117
  * surviving domain event can age out of the window.
157
- *
158
- * @internal
159
118
  */
160
119
  export declare function policy_keep_days(options: AutoclosePolicy): number | undefined;
161
120
  export declare function compile_autoclose_policy(options: AutoclosePolicy): AutoclosePredicate<Schemas>;
@@ -1 +1 @@
1
- {"version":3,"file":"autoclose-policy.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA2BtE,0DAA0D;AAC1D,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEzD;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AAmED;;;;;;;;;GASG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;kBAoBxB,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAwBpE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,GACvB,MAAM,GAAG,SAAS,CAMpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,GACvB,kBAAkB,CAAC,OAAO,CAAC,CAiC7B"}
1
+ {"version":3,"file":"autoclose-policy.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AA2BtE,gDAAgD;AAChD,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAEzD;AAED,+CAA+C;AAC/C,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAElD;AA+DD;;;;;;;GAOG;AACH,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;kBAoBxB,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAwBpE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,eAAe,GACvB,MAAM,GAAG,SAAS,CAMpB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,eAAe,GAAG,MAAM,GAAG,SAAS,CAG7E;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,GACvB,kBAAkB,CAAC,OAAO,CAAC,CAiC7B"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module autoclose-reaction
3
- * @category Internal
4
- *
5
2
  * Synthesis of the online close-the-books reaction. `.autocloses(policy)`
6
3
  * is not a sweep: it is a reaction on every event the declaring state owns
7
4
  * that evaluates the policy against the LIVE head (so a reopened stream
@@ -14,8 +11,6 @@
14
11
  * discovered by `classify_registry` and its target stream subscribed. The
15
12
  * registry is complete once the builder finishes; the orchestrator never
16
13
  * mutates it.
17
- *
18
- * @internal
19
14
  */
20
15
  import type { Registry, SchemaRegister, Schemas, State } from "../types/index.js";
21
16
  import { type AutocloseConfig } from "./config.js";
@@ -26,8 +21,6 @@ import { type AutocloseConfig } from "./config.js";
26
21
  * The reactions are synthesized once into the shared registry, so nothing
27
22
  * per-Act is captured here — the off-hours window is read from the running
28
23
  * Act at resolution time via the injected `read_window`.
29
- *
30
- * @internal
31
24
  */
32
25
  export declare function synthesize_autoclose_reactions<TSchemaReg extends SchemaRegister<TActions>, TEvents extends Schemas, TActions extends Schemas>(registry: Registry<TSchemaReg, TEvents, TActions>, states: ReadonlyMap<string, State<any, any, any>>,
33
26
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"autoclose-reaction.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAEV,QAAQ,EACR,cAAc,EACd,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,aAAa,CAAC;AAYxE;;;;;;;;;GASG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,EAC3C,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EAExB,QAAQ,EAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,EACjD,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjD;;;;;;GAMG;AACH,WAAW,EAAE,MAAM,eAAe,CAAC,iBAAiB,CAAC,GACpD,IAAI,CAkHN"}
1
+ {"version":3,"file":"autoclose-reaction.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAEV,QAAQ,EACR,cAAc,EACd,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAE,KAAK,eAAe,EAAuB,MAAM,aAAa,CAAC;AAYxE;;;;;;;GAOG;AACH,wBAAgB,8BAA8B,CAC5C,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,EAC3C,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EAExB,QAAQ,EAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,EACjD,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AACjD;;;;;;GAMG;AACH,WAAW,EAAE,MAAM,eAAe,CAAC,iBAAiB,CAAC,GACpD,IAAI,CAkHN"}
@@ -1,21 +1,12 @@
1
1
  /**
2
- * @module autoclose-window
3
- * @category Internal
4
- *
5
2
  * Off-hours window math for autoclose — hour-in-zone, DST-gap handling, and
6
- * "next time the window opens". The autoclose **config** (defaults, schema,
7
- * resolver) lives in `./config.js`, the single home for builder-facing config
8
- * bags; this module is the runtime window logic those knobs drive.
9
- *
10
- * @internal
3
+ * "next time the window opens".
11
4
  */
12
5
  import type { AutocloseConfig } from "./config.js";
13
6
  /**
14
7
  * The current hour `[0, 23]` in the given IANA time zone, DST-correct
15
8
  * via `Intl`. Split out so the window check can be unit-tested without
16
9
  * spinning a controller.
17
- *
18
- * @internal
19
10
  */
20
11
  export declare function hour_in_zone(now: Date, timeZone: string): number;
21
12
  /**
@@ -28,8 +19,6 @@ export declare function hour_in_zone(now: Date, timeZone: string): number;
28
19
  * would otherwise be closed for the whole day (the `start` hour never
29
20
  * occurs). The gap's replacement instant is admitted so autoclose still
30
21
  * runs — see {@link is_dst_gap_open}.
31
- *
32
- * @internal
33
22
  */
34
23
  export declare function in_autoclose_window(window: AutocloseConfig["autocloseWindow"], now: Date): boolean;
35
24
  /**
@@ -59,8 +48,6 @@ export declare function in_autoclose_window(window: AutocloseConfig["autocloseWi
59
48
  * that boundary instant — deferring ~1 h to the replacement instant
60
49
  * rather than a full day. The boundary is returned as-is (no minute
61
50
  * offset): the gap opening is a single transition instant, not a range.
62
- *
63
- * @internal
64
51
  */
65
52
  export declare function next_window_open(window: NonNullable<AutocloseConfig["autocloseWindow"]>, now: Date): Date;
66
53
  //# sourceMappingURL=autoclose-window.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autoclose-window.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOhE;AAsCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,EAC1C,GAAG,EAAE,IAAI,GACR,OAAO,CAOT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,EACvD,GAAG,EAAE,IAAI,GACR,IAAI,CAoBN"}
1
+ {"version":3,"file":"autoclose-window.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-window.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOhE;AAkCD;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,eAAe,CAAC,iBAAiB,CAAC,EAC1C,GAAG,EAAE,IAAI,GACR,OAAO,CAOT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC,EACvD,GAAG,EAAE,IAAI,GACR,IAAI,CAoBN"}
@@ -1,11 +1,6 @@
1
1
  /**
2
- * @module backoff
3
- * @category Internal
4
- *
5
2
  * Per-reaction retry backoff delay computation. Pure function — keeps
6
- * `DrainController` and `reactions._finalize` testable in isolation.
7
- *
8
- * @internal
3
+ * `DrainController` and `finalize` (in `drain-cycle.ts`) testable in isolation.
9
4
  */
10
5
  import type { BackoffOptions } from "../types/action.js";
11
6
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"backoff.d.ts","sourceRoot":"","sources":["../../../src/internal/backoff.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAMzD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,cAAc,GAAG,SAAS,GAC/B,MAAM,CAyBR"}
1
+ {"version":3,"file":"backoff.d.ts","sourceRoot":"","sources":["../../../src/internal/backoff.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,cAAc,GAAG,SAAS,GAC/B,MAAM,CAyBR"}
@@ -1,6 +1,4 @@
1
1
  /**
2
- * @module internal/circuit-breaker
3
- *
4
2
  * Orchestrator-level circuit breaker for store operations. The drain loop
5
3
  * polls `claim()` continuously; when the backing store goes down every poll
6
4
  * throws a {@link StoreError}, and without a breaker the orchestrator would
@@ -28,9 +26,9 @@ export type CircuitBreakerHooks = {
28
26
  /** Invoked on every {@link CircuitBreaker.failed} with the error and state. */
29
27
  readonly on_error?: (error: unknown, circuit: CircuitState) => void;
30
28
  /**
31
- * Invoked once, `cooldownMs` after the breaker opens (and again on each
32
- * re-open). The orchestrator wires it to re-attempt a drain — so recovery
33
- * is automatic even on the default lane, which has no periodic poller.
29
+ * Invoked once, `cooldownMs` after the latest failure, open or not. The
30
+ * orchestrator wires it to a settle, so recovery is automatic even on the
31
+ * default lane, which has no periodic poller.
34
32
  */
35
33
  readonly on_retry?: () => void;
36
34
  };
@@ -61,8 +59,9 @@ export declare class CircuitBreaker {
61
59
  * if a half-open trial just failed. Returns the resulting state.
62
60
  *
63
61
  * Callers gate on the state directly — `state(now) === "open"` means skip.
64
- * On opening, schedules the `on_retry` wake so recovery is automatic;
65
- * always surfaces the failure via `on_error`.
62
+ * Every failure (re)schedules the `on_retry` wake, so one failed pass on
63
+ * an idle app retries without waiting for the breaker to open; always
64
+ * surfaces the failure via `on_error`.
66
65
  */
67
66
  failed(now: number, error?: unknown): CircuitState;
68
67
  /** Cancel the pending retry timer. Idempotent; call on shutdown. */
@@ -1 +1 @@
1
- {"version":3,"file":"circuit-breaker.d.ts","sourceRoot":"","sources":["../../../src/internal/circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,6BAA6B;AAC7B,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;AAM3D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,+EAA+E;IAC/E,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACpE;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CAChC,CAAC;AAEF,qBAAa,cAAc;IACzB,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,UAAU,CAAqB;IACvC,OAAO,CAAC,KAAK,CAA4C;IACzD,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAE7C,YAAY,MAAM,EAAE,oBAAoB,EAAE,KAAK,GAAE,mBAAwB,EAIxE;IAED;;;;;OAKG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,uEA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IAED;;;;;OAKG;IACH,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,uEAAuE;IACvE,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,gDAAgD;IAChD,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAG/B;IAED,wEAAwE;IACxE,MAAM,IAAI,IAAI,CAIb;IAED;;;;;;;;;OASG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,YAAY,CAKjD;IAED,oEAAoE;IACpE,IAAI,IAAI,IAAI,CAEX;IAED;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAUtB,OAAO,CAAC,WAAW;IAOnB,6DAA6D;IAC7D,OAAO,CAAC,QAAQ;CAcjB"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module close-cycle
3
- * @category Internal
4
- *
5
2
  * Pure orchestration of the close-the-books flow: scan stream heads,
6
3
  * partition by reaction safety, guard with tombstones, optionally seed
7
4
  * restart state, run user archive callbacks, atomically truncate, and
@@ -10,16 +7,12 @@
10
7
  * Also home to the pieces a closer needs around the cycle: the per-stream
11
8
  * {@link CloseLock} and the bounded {@link catch_up_correlation}. The Act
12
9
  * orchestrator only wires its ports in and emits `"closed"`.
13
- *
14
- * @internal
15
10
  */
16
11
  import type { CloseResult, CloseTarget, Logger, State } from "../types/index.js";
17
12
  import type { EsOps } from "./event-sourcing.js";
18
13
  /**
19
14
  * Dependencies the close cycle needs from the Act orchestrator. Decoupled
20
15
  * from `Act` itself so the cycle can be exercised from tests in isolation.
21
- *
22
- * @internal
23
16
  */
24
17
  export type CloseCycleDeps = {
25
18
  /** Whether any event has a reaction; without one nothing can be pending. */
@@ -75,8 +68,6 @@ export type CloseCycleDeps = {
75
68
  *
76
69
  * Stops as soon as a pass makes no progress (the log has no more to give),
77
70
  * and after {@link CLOSE_CATCH_UP_PASSES} windows.
78
- *
79
- * @internal
80
71
  */
81
72
  export declare function catch_up_correlation(cursor: {
82
73
  readonly checkpoint: number;
@@ -86,8 +77,6 @@ export declare function catch_up_correlation(cursor: {
86
77
  * Per-stream serialization for close critical sections: two closers of the
87
78
  * same stream never prune or archive concurrently, while different streams
88
79
  * proceed in parallel. One instance per Act.
89
- *
90
- * @internal
91
80
  */
92
81
  export declare class CloseLock {
93
82
  private readonly _tails;
@@ -102,8 +91,6 @@ export declare class CloseLock {
102
91
  * pure prefix delete behind an existing snapshot (see
103
92
  * {@link run_windowed_closes}); the rest run the guarded
104
93
  * tombstone/restart pipeline below.
105
- *
106
- * @internal
107
94
  */
108
95
  export declare function run_close_cycle(targets: CloseTarget[], deps: CloseCycleDeps): Promise<CloseResult>;
109
96
  //# sourceMappingURL=close-cycle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"close-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/close-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,MAAM,EAEN,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;I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,CAAC,MAAM,CAAC,CAajB;AAED;;;;GAIG;AACH,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D,oEAAoE;IACpE,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAYzD;CACF;AA8BD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,WAAW,EAAE,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,WAAW,CAAC,CA+BtB"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module close-signal
3
- * @category Internal
4
- *
5
2
  * The control-flow signal a reaction handler throws to *close* a stream.
6
3
  * Like {@link "defer-signal".DeferSignal} it rides the dispatcher's
7
4
  * `try/catch`, but where a defer holds the stream for later, a close asks the
@@ -21,8 +18,6 @@
21
18
  * *target* distinct from the reaction's lease stream, so the signal carries the
22
19
  * stream to close explicitly (`stream`); when omitted (a user reaction closing
23
20
  * its own stream) it defaults to the lease stream.
24
- *
25
- * @internal
26
21
  */
27
22
  export declare class CloseSignal extends Error {
28
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"close-signal.d.ts","sourceRoot":"","sources":["../../../src/internal/close-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAEvB,YAAY,IAAI,CAAC,EAAE;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,IAAI,CAAC;KACf,EAOA;CACF"}
1
+ {"version":3,"file":"close-signal.d.ts","sourceRoot":"","sources":["../../../src/internal/close-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,WAAY,SAAQ,KAAK;IACpC;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAEvB,YAAY,IAAI,CAAC,EAAE;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,IAAI,CAAC;KACf,EAOA;CACF"}
@@ -1,43 +1,11 @@
1
1
  /**
2
- * @module internal/config
3
- * @category Internal
4
- *
5
- * **The single home for every builder-facing config bag in act-core.** Any
6
- * options object an operator hands to `act().build()`, a builder method
7
- * (`.on(...)`, `.do(...)`, `.withLane(...)`), or a runtime cycle
8
- * (`drain(...)` / `settle(...)`) is validated here with Zod — never with a
9
- * hand-written `if (x < min) throw` ladder — so misconfiguration surfaces as
10
- * a `ZodError` at the entry point, not as `NaN` arithmetic on the first cycle
11
- * tick.
12
- *
13
- * Layout: one section per bag, each with its `DEFAULT_*` constants, an
14
- * internal `<Type>OptionsSchema`, an inferred `<Type>Config`, and a
15
- * `resolve<Type>Config(options): <Type>Config`. The schema is never
16
- * re-exported — the public surface is the inferred type + resolver.
17
- *
18
- * Index of bags owned here:
19
- * - **Backoff** — retry pacing (`BackoffOptions`), nested in reaction/action.
20
- * - **Reaction** — `.do(handler, options)` (`blockOnError` / `maxRetries` / `backoff`).
21
- * - **Action** — `.on(entry, options)` (`maxRetries` / `backoff`).
22
- * - **Lane** — `.withLane({...})` (`leaseMillis` / `streamLimit` / `cycleMs`).
23
- * - **Drain / Settle** — `drain(...)` / `settle(...)` runtime knobs.
24
- * - **Autoclose** — the `.autocloses` / `ActOptions` autoclose knobs (+ window).
25
- * - **CircuitBreaker** — the store-op breaker on `ActOptions`.
26
- * - **Fold** — `projection(...).of(...)` batch-fold knobs.
27
- *
28
- * Sibling env/package config (`config()`, `NODE_ENV`, log level) lives in the
29
- * public `../config.ts` — a different concern (process environment, not
30
- * builder input). The `@rotorsoft/act-http` transport bags (`SseOptions`,
31
- * `OpenAPIOptions`) live in that package; core cannot own another package's
32
- * surface.
33
- *
34
- * Validation philosophy: reject only what is genuinely broken — `NaN`,
35
- * `±Infinity` (Zod 4's `z.number()` rejects both by default), and negatives
36
- * where nonsensical. A value that works today is never newly rejected. The
37
- * real strictness lands on `maxRetries` and `backoff`, the knobs whose bad
38
- * values silently corrupt the poison-quarantine and retry-loop-exit gates.
39
- *
40
- * @internal
2
+ * The single home for every builder-facing config bag in act-core: one
3
+ * section per bag, each with its `DEFAULT_*` constants, an internal
4
+ * `<Type>OptionsSchema`, the inferred `<Type>Config` and a
5
+ * `resolve<Type>Config`, so misconfiguration throws a `ZodError` at the
6
+ * entry point. Validation rejects only what is broken (`NaN`, `±Infinity`,
7
+ * nonsensical negatives) and never newly rejects a value that works. The
8
+ * rules are in CLAUDE.md § Config-validation schemas.
41
9
  */
42
10
  import { z } from "zod";
43
11
  import type { ActOptions } from "../act.js";
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names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AAM,wBAAwB,KAAK,CAAC;AAC3C,gEAAgE;AAChE,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAsCxC,QAAA,MAAM,sBAAsB;;;;;;;;;;iBAgB1B,CAAC;AAEH,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,iFAAiF;AACjF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,GAAG,SAAS,GAC9B,eAAe,CAQjB;AAQD,QAAA,MAAM,2BAA2B;;;iBAY/B,CAAC;AAEH,4EAA4E;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAE/E,wEAAwE;AACxE,eAAO,MAAM,2BAA2B,aAC5B,qBAAqB,KAC9B,oBAAwE,CAAC;AAO5E,QAAA,MAAM,iBAAiB;;;iBAGrB,CAAC;AAEH,mCAAmC;AACnC,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3D,4DAA4D;AAC5D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAElE"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module correlator
3
- * @category Internal
4
- *
5
2
  * Correlation-id generator and the default implementation.
6
3
  *
7
4
  * The default produces a readable, time-monotonic-within-window, lowercase
@@ -11,8 +8,6 @@
11
8
  *
12
9
  * Apps override via {@link ActOptions.correlator} to plug in any scheme
13
10
  * (tenant-prefixed, trace-id-propagated, DB-sequence-backed, etc.).
14
- *
15
- * @internal
16
11
  */
17
12
  import type { Actor, Correlator } from "../types/index.js";
18
13
  /**
@@ -37,8 +32,6 @@ export declare const default_correlator: Correlator;
37
32
  * Close runs outside any user action, so we synthesize a context with
38
33
  * sentinel state/action names — visible in the id when overrides aren't
39
34
  * configured.
40
- *
41
- * @internal
42
35
  */
43
36
  export declare function close_correlation(correlator: Correlator, actor: Actor): string;
44
37
  //# sourceMappingURL=correlator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"correlator.d.ts","sourceRoot":"","sources":["../../../src/internal/correlator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAU3D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAMhC,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,GACX,MAAM,CAOR"}
1
+ {"version":3,"file":"correlator.d.ts","sourceRoot":"","sources":["../../../src/internal/correlator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAU3D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,kBAAkB,EAAE,UAMhC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,GACX,MAAM,CAOR"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module date-reviver
3
- * @category Internal
4
- *
5
2
  * Turning stored text back into `Date`s, driven by the declared schema.
6
3
  *
7
4
  * JSON has no date type, so a `Date` is stored as its ISO form and something
@@ -19,8 +16,6 @@
19
16
  * The shape-based {@link dateReviver} in `utils.ts` is the predecessor this
20
17
  * replaced — it revived anything ISO-8601-looking, including fields declared
21
18
  * `z.string()`.
22
- *
23
- * @internal
24
19
  */
25
20
  import { z } from "zod";
26
21
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"date-reviver.d.ts","sourceRoot":"","sources":["../../../src/internal/date-reviver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6CxB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,SAAS,CAwD1E"}
1
+ {"version":3,"file":"date-reviver.d.ts","sourceRoot":"","sources":["../../../src/internal/date-reviver.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA6CxB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,CAAC,CAAC,OAAO,GAAG,SAAS,CAwD1E"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module defer-config
3
- * @category Internal
4
- *
5
2
  * The `when` options for the public `defer` surface. A
6
3
  * reaction defers itself to a future time either declaratively (the
7
4
  * `.defer(when)` builder step) or imperatively (`throw new DeferSignal(when)`
@@ -18,8 +15,6 @@
18
15
  * Validation follows the config-schema standard (CLAUDE.md): an internal
19
16
  * `*OptionsSchema` const, a public inferred type, and a resolver. Slice 2
20
17
  * ships `after` / `at`; recurrence (`every`) extends this in Slice 3.
21
- *
22
- * @internal
23
18
  */
24
19
  import type { Committed, DeferWhen, Schemas } from "../types/index.js";
25
20
  /**
@@ -28,16 +23,12 @@ import type { Committed, DeferWhen, Schemas } from "../types/index.js";
28
23
  * on a bad shape), then derives the time: `after` from `event.created`, `at`
29
24
  * from its absolute `Date`. Never reads `Date.now()`, so the result is stable
30
25
  * across re-delivery.
31
- *
32
- * @internal
33
26
  */
34
27
  export declare function resolve_defer_at<E extends Schemas>(when: DeferWhen, event: Committed<E, keyof E>): number;
35
28
  /**
36
29
  * The schedule handed to the declarative `.defer` builder step: either a
37
30
  * literal {@link DeferWhen} (fixed cooldown/deadline) or a function of the
38
31
  * triggering event (read the payload to choose the schedule).
39
- *
40
- * @internal
41
32
  */
42
33
  export type DeferSchedule<TEvent> = DeferWhen | ((event: TEvent) => DeferWhen);
43
34
  /**
@@ -45,8 +36,6 @@ export type DeferSchedule<TEvent> = DeferWhen | ((event: TEvent) => DeferWhen);
45
36
  * standard) — throws `ZodError` on a bad shape (both/neither of `after`/`at`,
46
37
  * an empty or non-positive duration). The function form of a `.defer` schedule
47
38
  * can only be checked when it runs, so builders pass just the literal here.
48
- *
49
- * @internal
50
39
  */
51
40
  export declare function assert_defer_when(when: DeferWhen): void;
52
41
  /**
@@ -57,8 +46,6 @@ export declare function assert_defer_when(when: DeferWhen): void;
57
46
  * real handler. The wrapper keeps the original handler's `name` so reaction
58
47
  * registration and de-dup are unaffected, and preserves the handler's exact
59
48
  * type so the builder step is transparent.
60
- *
61
- * @internal
62
49
  */
63
50
  export declare function make_deferred<H extends (...args: any[]) => Promise<unknown>>(handler: H, schedule: DeferSchedule<Parameters<H>[0]>): H;
64
51
  //# sourceMappingURL=defer-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defer-config.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAiDvE;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAChD,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC3B,MAAM,CAIR;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC;AAE/E;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAEvD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAC1E,OAAO,EAAE,CAAC,EACV,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxC,CAAC,CAaH"}
1
+ {"version":3,"file":"defer-config.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AA+CvE;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,OAAO,EAChD,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAC3B,MAAM,CAIR;AAED;;;;GAIG;AACH,MAAM,MAAM,aAAa,CAAC,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC;AAE/E;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAEvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAC1E,OAAO,EAAE,CAAC,EACV,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxC,CAAC,CAaH"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module defer-signal
3
- * @category Internal
4
- *
5
2
  * The control-flow signal a reaction handler throws to *defer* itself.
6
3
  * Unlike an error, a defer is not a failure: the dispatcher
7
4
  * ({@link "reaction-builder".build_handle}) catches it and produces a
@@ -1 +1 @@
1
- {"version":3,"file":"defer-signal.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,WAAY,SAAQ,KAAK;IACpC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,YAAY,IAAI,EAAE,SAAS,EAI1B;CACF"}
1
+ {"version":3,"file":"defer-signal.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAAa,WAAY,SAAQ,KAAK;IACpC;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB,YAAY,IAAI,EAAE,SAAS,EAI1B;CACF"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module defer-timer
3
- * @category Internal
4
- *
5
2
  * The shared "next visit time" primitive. A `DeferTimer` holds a
6
3
  * `stream → due-time` map and a single collapsed wake timer: it parks
7
4
  * streams that should be re-visited later and fires one `on_wake` callback
@@ -25,9 +22,8 @@
25
22
  * onto the owning lane's timer via {@link "drain-cycle".DrainController.seed_defer},
26
23
  * so an idle deferred stream re-arms at its due-time with no
27
24
  * intervening commit.
28
- *
29
- * @internal
30
25
  */
26
+ /** A linear scan finds the earliest entry: the map is bounded by claim limits. */
31
27
  export declare class DeferTimer {
32
28
  private readonly _due;
33
29
  private _timer;
@@ -1 +1 @@
1
- {"version":3,"file":"defer-timer.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-timer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;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;;OAOG;IACH,QAAQ,IAAI,IAAI,CAmBf;IAED,+EAA+E;IAC/E,IAAI,IAAI,IAAI,CAKX;CACF"}
@@ -64,8 +64,8 @@ export declare class DrainController<TEvents extends Schemas, TActions extends S
64
64
  * Local wake at the earliest parked (backoff or defer) visit, or at the
65
65
  * lease expiry after a failed pass (the {@link RETRY} key); the schedule
66
66
  * itself is persisted. On an idle app nothing else would drain it. It
67
- * drains until a pass leases nothing, and an entry stays until handled or
68
- * until a later pass claims nothing.
67
+ * drains until a pass leases nothing or the controller stops, and an entry
68
+ * stays until handled or until a later pass claims nothing.
69
69
  */
70
70
  private readonly _defer;
71
71
  private _worker;
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module drain-ratio
3
- * @category Internal
4
- *
5
2
  * Adaptive lag-to-lead ratio for the dual-frontier drain strategy.
6
3
  *
7
4
  * The orchestrator splits its per-cycle stream budget between two frontiers:
@@ -13,8 +10,6 @@
13
10
  * handled in each frontier and shifts the next cycle's split toward
14
11
  * whichever frontier had the higher per-stream throughput. The result is
15
12
  * clamped to `[0.2, 0.8]` so neither frontier can be starved.
16
- *
17
- * @internal
18
13
  */
19
14
  import type { HandleResult } from "./drain-cycle.js";
20
15
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"drain-ratio.d.ts","sourceRoot":"","sources":["../../../src/internal/drain-ratio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,EACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,CAYR"}
1
+ {"version":3,"file":"drain-ratio.d.ts","sourceRoot":"","sources":["../../../src/internal/drain-ratio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQrD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,EACpC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,MAAM,CAYR"}
@@ -1,7 +1,4 @@
1
1
  /**
2
- * @module drain
3
- * @category Internal
4
- *
5
2
  * Pipeline operations consumed by the drain/correlate loop. Each op is a
6
3
  * single async step the orchestrator invokes per drain cycle:
7
4
  *
@@ -15,11 +12,8 @@
15
12
  * mirroring the shape of {@link "event-sourcing"}. Trace decoration is
16
13
  * layered on top in {@link "tracing"} and selected by the orchestrator at
17
14
  * construction time. No tracing imports here.
18
- *
19
- * @internal
20
15
  */
21
16
  import type { BlockedLease, Fetch, Lease, Schemas, SubscribeInput, SubscribeResult } from "../types/index.js";
22
- /** @internal */
23
17
  export interface DrainOps<TEvents extends Schemas> {
24
18
  claim: typeof claim;
25
19
  fetch: typeof fetch<TEvents>;
@@ -1 +1 @@
1
- {"version":3,"file":"drain.d.ts","sourceRoot":"","sources":["../../../src/internal/drain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EACV,YAAY,EAEZ,KAAK,EACL,KAAK,EACL,OAAO,EACP,cAAc,EACd,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAG3B,gBAAgB;AAChB,MAAM,WAAW,QAAQ,CAAC,OAAO,SAAS,OAAO;IAC/C,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,KAAK,EAAE,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,GAAG,EAAE,OAAO,GAAG,CAAC;IAChB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,SAAS,EAAE,OAAO,SAAS,CAAC;CAC7B;AAED,eAAO,MAAM,KAAK,YACP,MAAM,WACN,MAAM,MACX,MAAM,UACF,MAAM,SACP,MAAM,KACZ,OAAO,CAAC,KAAK,EAAE,CAAsD,CAAC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