@rotorsoft/act 1.32.30 → 1.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/act.d.ts +96 -385
- package/dist/@types/act.d.ts.map +1 -1
- package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
- package/dist/@types/builders/act-builder.d.ts +2 -115
- package/dist/@types/builders/act-builder.d.ts.map +1 -1
- package/dist/@types/builders/builder-utils.d.ts +1 -1
- package/dist/@types/builders/builder-utils.d.ts.map +1 -1
- package/dist/@types/builders/event-builder.d.ts +5 -5
- package/dist/@types/builders/event-builder.d.ts.map +1 -1
- package/dist/@types/builders/merge.d.ts +1 -1
- package/dist/@types/builders/merge.d.ts.map +1 -1
- package/dist/@types/builders/projection-builder.d.ts +2 -144
- package/dist/@types/builders/projection-builder.d.ts.map +1 -1
- package/dist/@types/builders/slice-builder.d.ts +2 -71
- package/dist/@types/builders/slice-builder.d.ts.map +1 -1
- package/dist/@types/builders/state-builder.d.ts +2 -376
- package/dist/@types/builders/state-builder.d.ts.map +1 -1
- package/dist/@types/config.d.ts +6 -43
- package/dist/@types/config.d.ts.map +1 -1
- package/dist/@types/csv.d.ts +1 -15
- package/dist/@types/csv.d.ts.map +1 -1
- package/dist/@types/index.d.ts +0 -1
- package/dist/@types/index.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-policy.d.ts +1 -59
- package/dist/@types/internal/autoclose-policy.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-reaction.d.ts +1 -2
- package/dist/@types/internal/autoclose-reaction.d.ts.map +1 -1
- package/dist/@types/internal/autoclose-window.d.ts +1 -1
- package/dist/@types/internal/autoclose-window.d.ts.map +1 -1
- package/dist/@types/internal/circuit-breaker.d.ts +1 -2
- package/dist/@types/internal/circuit-breaker.d.ts.map +1 -1
- package/dist/@types/{builders/build-classify.d.ts → internal/classify.d.ts} +2 -15
- package/dist/@types/internal/classify.d.ts.map +1 -0
- package/dist/@types/internal/close-cycle.d.ts.map +1 -1
- package/dist/@types/internal/config.d.ts +2 -42
- package/dist/@types/internal/config.d.ts.map +1 -1
- package/dist/@types/internal/correlate-cycle.d.ts +1 -1
- package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
- package/dist/@types/internal/{correlator.d.ts → correlation-id.d.ts} +1 -1
- package/dist/@types/internal/correlation-id.d.ts.map +1 -0
- package/dist/@types/internal/defer-config.d.ts.map +1 -1
- package/dist/@types/internal/drain-cycle.d.ts +1 -1
- package/dist/@types/internal/drain-cycle.d.ts.map +1 -1
- package/dist/@types/internal/{drain.d.ts → drain-ops.d.ts} +1 -1
- package/dist/@types/internal/drain-ops.d.ts.map +1 -0
- package/dist/@types/internal/event-sourcing.d.ts +1 -8
- package/dist/@types/internal/event-sourcing.d.ts.map +1 -1
- package/dist/@types/internal/{sensitive.d.ts → pii.d.ts} +4 -71
- package/dist/@types/internal/pii.d.ts.map +1 -0
- package/dist/@types/internal/projection-fold.d.ts +1 -2
- package/dist/@types/internal/projection-fold.d.ts.map +1 -1
- package/dist/@types/internal/{close-signal.d.ts → reaction-dispatch.d.ts} +47 -2
- package/dist/@types/internal/reaction-dispatch.d.ts.map +1 -0
- package/dist/@types/internal/report-once.d.ts +1 -1
- package/dist/@types/internal/settle.d.ts +21 -12
- package/dist/@types/internal/settle.d.ts.map +1 -1
- package/dist/@types/internal/tracing.d.ts +3 -3
- package/dist/@types/internal/tracing.d.ts.map +1 -1
- package/dist/@types/ports.d.ts +3 -43
- package/dist/@types/ports.d.ts.map +1 -1
- package/dist/@types/scoped.d.ts +1 -6
- package/dist/@types/scoped.d.ts.map +1 -1
- package/dist/@types/sensitive.d.ts +56 -0
- package/dist/@types/sensitive.d.ts.map +1 -0
- package/dist/@types/test/index.d.ts +1 -0
- package/dist/@types/test/index.d.ts.map +1 -1
- package/dist/@types/test/sandbox.d.ts +2 -26
- package/dist/@types/test/sandbox.d.ts.map +1 -1
- package/dist/@types/types/act.d.ts +214 -0
- package/dist/@types/types/act.d.ts.map +1 -0
- package/dist/@types/types/action.d.ts +69 -2
- package/dist/@types/types/action.d.ts.map +1 -1
- package/dist/@types/types/builders.d.ts +721 -0
- package/dist/@types/types/builders.d.ts.map +1 -0
- package/dist/@types/types/errors.d.ts +31 -1
- package/dist/@types/types/errors.d.ts.map +1 -1
- package/dist/@types/types/index.d.ts +38 -0
- package/dist/@types/types/index.d.ts.map +1 -1
- package/dist/@types/types/ports.d.ts +20 -18
- package/dist/@types/types/ports.d.ts.map +1 -1
- package/dist/@types/types/reaction.d.ts +11 -1
- package/dist/@types/types/reaction.d.ts.map +1 -1
- package/dist/@types/types/sandbox.d.ts +31 -0
- package/dist/@types/types/sandbox.d.ts.map +1 -0
- package/dist/@types/types/schemas.d.ts +12 -17
- package/dist/@types/types/schemas.d.ts.map +1 -1
- package/dist/chunk-NNWP65YM.cjs +264 -0
- package/dist/chunk-NNWP65YM.cjs.map +1 -0
- package/dist/{chunk-X3MMQIIP.js → chunk-NYH6FNTM.js} +174 -22
- package/dist/chunk-NYH6FNTM.js.map +1 -0
- package/dist/{chunk-HHKLVRR4.js → chunk-TJ4JRRUR.js} +38 -57
- package/dist/chunk-TJ4JRRUR.js.map +1 -0
- package/dist/chunk-YKL44PYX.cjs +1233 -0
- package/dist/chunk-YKL44PYX.cjs.map +1 -0
- package/dist/index.cjs +1954 -3440
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +911 -1063
- package/dist/index.js.map +1 -1
- package/dist/test/index.cjs +16 -1113
- package/dist/test/index.cjs.map +1 -1
- package/dist/test/index.js +2 -2
- package/dist/test/index.js.map +1 -1
- package/dist/types/index.cjs +58 -276
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +15 -1
- package/package.json +2 -2
- package/dist/@types/builders/build-classify.d.ts.map +0 -1
- package/dist/@types/builders/builder-base.d.ts +0 -70
- package/dist/@types/builders/builder-base.d.ts.map +0 -1
- package/dist/@types/builders/reaction-builder.d.ts +0 -55
- package/dist/@types/builders/reaction-builder.d.ts.map +0 -1
- package/dist/@types/internal/close-signal.d.ts.map +0 -1
- package/dist/@types/internal/correlator.d.ts.map +0 -1
- package/dist/@types/internal/defer-signal.d.ts +0 -32
- package/dist/@types/internal/defer-signal.d.ts.map +0 -1
- package/dist/@types/internal/drain.d.ts.map +0 -1
- package/dist/@types/internal/index.d.ts +0 -38
- package/dist/@types/internal/index.d.ts.map +0 -1
- package/dist/@types/internal/sensitive.d.ts.map +0 -1
- package/dist/chunk-HHKLVRR4.js.map +0 -1
- package/dist/chunk-X3MMQIIP.js.map +0 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @module build-classify
|
|
3
|
-
* @category Internal
|
|
4
|
-
*
|
|
5
2
|
* Build-time classification of the registry + state map. The Act constructor
|
|
6
3
|
* needs three pre-computed inputs to wire its runtime subsystems:
|
|
7
4
|
*
|
|
@@ -15,24 +12,18 @@
|
|
|
15
12
|
*
|
|
16
13
|
* Pure function — single pass over events + states, fully testable without
|
|
17
14
|
* instantiating Act.
|
|
18
|
-
*
|
|
19
|
-
* @internal
|
|
20
15
|
*/
|
|
21
|
-
import type { StaticTarget } from "../internal/index.js";
|
|
22
16
|
import type { Registry, Schema, SchemaRegister, Schemas, State } from "../types/index.js";
|
|
17
|
+
import type { StaticTarget } from "./correlate-cycle.js";
|
|
23
18
|
/**
|
|
24
19
|
* Classification result. Returned by {@link classify_registry}; consumed
|
|
25
20
|
* piecewise by Act's constructor.
|
|
26
|
-
*
|
|
27
|
-
* @internal
|
|
28
21
|
*/
|
|
29
22
|
/**
|
|
30
23
|
* Sentinel for "any reaction on this event has a dynamic resolver, so
|
|
31
24
|
* the lane is opaque until correlate runs the function — arm every
|
|
32
25
|
* controller." A Symbol rather than a string literal so it can't
|
|
33
26
|
* collide with a user-declared lane named `"all"`.
|
|
34
|
-
*
|
|
35
|
-
* @internal
|
|
36
27
|
*/
|
|
37
28
|
export declare const ALL_LANES: unique symbol;
|
|
38
29
|
/**
|
|
@@ -41,8 +32,6 @@ export declare const ALL_LANES: unique symbol;
|
|
|
41
32
|
* declared lanes — `do()` arms only those controllers on commit. For
|
|
42
33
|
* events with at least one dynamic resolver, the value is
|
|
43
34
|
* {@link ALL_LANES}; `do()` falls back to arming every controller.
|
|
44
|
-
*
|
|
45
|
-
* @internal
|
|
46
35
|
*/
|
|
47
36
|
export type EventLaneSet = ReadonlySet<string> | typeof ALL_LANES;
|
|
48
37
|
export type Classification = {
|
|
@@ -55,8 +44,6 @@ export type Classification = {
|
|
|
55
44
|
* reactive event names, the per-event lane fan-in, and the event-to-state
|
|
56
45
|
* map. Static targets are deduplicated by (target, source) — two reactions
|
|
57
46
|
* routing to the same projection produce one subscription.
|
|
58
|
-
*
|
|
59
|
-
* @internal
|
|
60
47
|
*/
|
|
61
48
|
export declare function classify_registry<TSchemaReg extends SchemaRegister<TActions>, TEvents extends Schemas, TActions extends Schemas>(registry: Registry<TSchemaReg, TEvents, TActions>, states: ReadonlyMap<string, State<Schema, any, any>>): Classification;
|
|
62
|
-
//# sourceMappingURL=
|
|
49
|
+
//# sourceMappingURL=classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../../src/internal/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,QAAQ,EACR,MAAM,EACN,cAAc,EACd,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;GAGG;AACH;;;;;GAKG;AACH,eAAO,MAAM,SAAS,EAAE,OAAO,MAAqC,CAAC;AAErE;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,MAAM,CAAC,GAAG,OAAO,SAAS,CAAC;AAElE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,cAAc,EAAE,YAAY,EAAE,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CAC5D,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,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,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,GACnD,cAAc,CA4EhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/close-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,MAAM,EAEN,KAAK,EACN,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"close-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/close-cycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,WAAW,EACX,WAAW,EACX,MAAM,EAEN,KAAK,EACN,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD;;;GAGG;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,GAA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;AA8BD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CACnC,OAAO,EAAE,WAAW,EAAE,EACtB,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,WAAW,CAAC,CA+BtB"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* rules are in CLAUDE.md § Config-validation schemas.
|
|
9
9
|
*/
|
|
10
10
|
import { z } from "zod";
|
|
11
|
-
import type { ActOptions } from "../act.js";
|
|
11
|
+
import type { ActOptions, AutocloseConfig, CircuitBreakerOptions } from "../types/act.js";
|
|
12
12
|
import type { ActionOptions, BackoffOptions, DrainOptions, FoldOptions, LaneConfig, ReactionOptions, SettleOptions, ShutdownOptions } from "../types/index.js";
|
|
13
13
|
/**
|
|
14
14
|
* Retry pacing for a reaction that declares no backoff, and for projections
|
|
@@ -65,18 +65,6 @@ export declare const DEFAULT_STREAM_LIMIT = 10;
|
|
|
65
65
|
export declare const DEFAULT_EVENT_LIMIT = 10;
|
|
66
66
|
/** How long a drain holds a stream's lease (ms). */
|
|
67
67
|
export declare const DEFAULT_LEASE_MILLIS = 10000;
|
|
68
|
-
/**
|
|
69
|
-
* Default debounce window (ms) for `settle()` when neither the per-call
|
|
70
|
-
* `SettleOptions.debounceMs` nor `ActOptions.settleDebounceMs` is set.
|
|
71
|
-
* Coalesces commits in the same tick and small bursts.
|
|
72
|
-
*/
|
|
73
|
-
export declare const DEFAULT_SETTLE_DEBOUNCE_MS = 10;
|
|
74
|
-
/**
|
|
75
|
-
* Default LRU cap for the subscribed-streams cache. Apps that mint many
|
|
76
|
-
* dynamic targets (one per aggregate) should override it with
|
|
77
|
-
* `ActOptions.maxSubscribedStreams`.
|
|
78
|
-
*/
|
|
79
|
-
export declare const DEFAULT_MAX_SUBSCRIBED_STREAMS = 1000;
|
|
80
68
|
/** Validate drain options, or pass `undefined` through. Throws `ZodError`. */
|
|
81
69
|
export declare function resolveDrainConfig(options: DrainOptions | undefined): DrainOptions | undefined;
|
|
82
70
|
/** Validate settle options, or pass `undefined` through. Throws `ZodError`. */
|
|
@@ -94,38 +82,10 @@ export declare const MAX_SHUTDOWN_GRACE_MS = 30000;
|
|
|
94
82
|
export declare function resolveShutdownConfig(options: ShutdownOptions | undefined): ShutdownOptions | undefined;
|
|
95
83
|
/** Validate the scalar `ActOptions` knobs at build. Throws `ZodError`. */
|
|
96
84
|
export declare function resolveActConfig(options: ActOptions | undefined): ActOptions | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* @deprecated The cadence knob is derived from `autocloseWindow` now;
|
|
99
|
-
* nothing consumes it. Kept for compat; removed in the next major.
|
|
100
|
-
*/
|
|
101
|
-
export declare const DEFAULT_AUTOCLOSE_CYCLE_MINUTES = 720;
|
|
102
|
-
/** @deprecated Unused since the autoclose sweep was removed. */
|
|
103
|
-
export declare const DEFAULT_CLOSE_BATCH_SIZE = 64;
|
|
104
|
-
/** @deprecated Unused since the autoclose sweep was removed. */
|
|
105
|
-
export declare const DEFAULT_CLOSE_YIELD_MS = 0;
|
|
106
|
-
declare const AutocloseOptionsSchema: z.ZodObject<{
|
|
107
|
-
autocloseCycleMinutes: z.ZodDefault<z.ZodNumber>;
|
|
108
|
-
closeBatchSize: z.ZodDefault<z.ZodNumber>;
|
|
109
|
-
closeYieldMs: z.ZodDefault<z.ZodNumber>;
|
|
110
|
-
closeOnError: z.ZodDefault<z.ZodBoolean>;
|
|
111
|
-
autocloseWindow: z.ZodOptional<z.ZodObject<{
|
|
112
|
-
start: z.ZodNumber;
|
|
113
|
-
end: z.ZodNumber;
|
|
114
|
-
timeZone: z.ZodDefault<z.ZodString>;
|
|
115
|
-
}, z.core.$strip>>;
|
|
116
|
-
}, z.core.$strip>;
|
|
117
|
-
/** Resolved autoclose configuration after validation + default expansion. */
|
|
118
|
-
export type AutocloseConfig = z.infer<typeof AutocloseOptionsSchema>;
|
|
119
85
|
/** Validate + default the autoclose knobs on `ActOptions`. Throws `ZodError`. */
|
|
120
86
|
export declare function resolveAutocloseConfig(options: ActOptions | undefined): AutocloseConfig;
|
|
121
|
-
declare const CircuitBreakerOptionsSchema: z.ZodObject<{
|
|
122
|
-
failureThreshold: z.ZodDefault<z.ZodNumber>;
|
|
123
|
-
cooldownMs: z.ZodDefault<z.ZodNumber>;
|
|
124
|
-
}, z.core.$strip>;
|
|
125
|
-
/** Public, all-optional circuit-breaker options bag for `act().build()`. */
|
|
126
|
-
export type CircuitBreakerOptions = z.input<typeof CircuitBreakerOptionsSchema>;
|
|
127
87
|
/** Resolved circuit-breaker configuration. */
|
|
128
|
-
export type CircuitBreakerConfig =
|
|
88
|
+
export type CircuitBreakerConfig = Required<CircuitBreakerOptions>;
|
|
129
89
|
/** Parse + apply defaults. Throws `ZodError` on out-of-range values. */
|
|
130
90
|
export declare const resolveCircuitBreakerConfig: (options?: CircuitBreakerOptions) => CircuitBreakerConfig;
|
|
131
91
|
declare const FoldOptionsSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/internal/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,UAAU,EACV,eAAe,EACf,aAAa,EACb,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAmB3B;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,cAG7B,CAAC;AAEF,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,cAAc,GAAG,S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AAE,eAAe,GAAG,SAAS,GACnC,eAAe,GAAG,SAAS,CAI7B;AAeD,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAC9B,OAAO,EAAE,UAAU,GAAG,SAAS,GAC9B,UAAU,GAAG,SAAS,CAIxB;AA+CD,iFAAiF;AACjF,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,GAAG,SAAS,GAC9B,eAAe,CAIjB;AAsBD,8CAA8C;AAC9C,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAEnE,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"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* which is what `claim` reads. See docs/architecture/correlation-and-drain.
|
|
5
5
|
*/
|
|
6
6
|
import type { Query, Registry, SchemaRegister, Schemas } from "../types/index.js";
|
|
7
|
-
import type { DrainOps } from "./drain.js";
|
|
7
|
+
import type { DrainOps } from "./drain-ops.js";
|
|
8
8
|
/** Static resolver target collected at build time and subscribed at init. */
|
|
9
9
|
export type StaticTarget = {
|
|
10
10
|
readonly stream: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"correlate-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/correlate-cycle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAEV,KAAK,EACL,QAAQ,EAER,cAAc,EACd,OAAO,EAGR,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"correlate-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/correl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S,CACb,KAAK,GAAE,KAAgC;IACvC;;;OAGG;IACH,KAAK,UAAQ,GACZ,OAAO,CAAC;QACT,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,OAAO,CAAC;KAClB,CAAC,CA6KD;IAED;;;;OAIG;YACW,OAAO;IAmCrB,2EAA2E;IACrE,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAezC;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"correlation-id.d.ts","sourceRoot":"","sources":["../../../src/internal/correlation-id.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defer-config.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;
|
|
1
|
+
{"version":3,"file":"defer-config.d.ts","sourceRoot":"","sources":["../../../src/internal/defer-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AA8CvE;;;;;;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"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { BatchHandler, BlockedLease, CloseTarget, Drain, DrainOptions, Lease, Logger, ReactionOptions, ReactionPayload, Registry, SchemaRegister, Schemas } from "../types/index.js";
|
|
7
7
|
import type { CircuitBreaker } from "./circuit-breaker.js";
|
|
8
|
-
import type { DrainOps } from "./drain.js";
|
|
8
|
+
import type { DrainOps } from "./drain-ops.js";
|
|
9
9
|
/** Outcome of handling one leased stream; drives its ack/block. */
|
|
10
10
|
export type HandleResult = Readonly<{
|
|
11
11
|
lease: Lease;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drain-cycle.d.ts","sourceRoot":"","sources":["../../../src/internal/drain-cycle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,KAAK,EACL,YAAY,EAEZ,KAAK,EACL,MAAM,EACN,eAAe,EACf,eAAe,EACf,QAAQ,EAER,cAAc,EACd,OAAO,EACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAQ3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"drain-c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AM,CAAA;CAAE,KACvD,OAAO,CAAC,eAAe,CAC6B,CAAC"}
|
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
* Event-sourcing primitives: `snap`, `load`, `action`, `tombstone`, `scan`.
|
|
3
3
|
* Bare implementations; tracing wraps them in `tracing.ts`.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
6
|
-
import type { Committed, DoOptions, EventSource, LoadTarget, ScanOptions, ScanResult, Schema, Schemas, Snapshot, State, Target } from "../types/index.js";
|
|
7
|
-
/**
|
|
8
|
-
* The patch step: merges a reducer's partial into state. Chosen once at
|
|
9
|
-
* construction (`build_es`), never per event. `me`/`event` only serve
|
|
10
|
-
* {@link validating_patch}, to name the failing reduction.
|
|
11
|
-
*/
|
|
12
|
-
export type PatchFn = <TState extends Schema, TEvents extends Schemas, TActions extends Schemas>(me: State<TState, TEvents, TActions>, state: TState, partial: Readonly<Patch<TState>>, event: Committed<TEvents, keyof TEvents>) => TState;
|
|
5
|
+
import type { Committed, DoOptions, EventSource, LoadTarget, PatchFn, ScanOptions, ScanResult, Schema, Schemas, Snapshot, State, Target } from "../types/index.js";
|
|
13
6
|
/** The default patch step: a bare merge, so the hot path pays nothing. */
|
|
14
7
|
export declare const bare_patch: PatchFn;
|
|
15
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-sourcing.d.ts","sourceRoot":"","sources":["../../../src/internal/event-sourcing.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"event-sourcing.d.ts","sourceRoot":"","sources":["../../../src/internal/event-sourcing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,KAAK,EAEV,SAAS,EACT,SAAS,EAGT,WAAW,EACX,UAAU,EACV,OAAO,EACP,WAAW,EACX,UAAU,EACV,MAAM,EACN,OAAO,EACP,QAAQ,EACR,KAAK,EACL,MAAM,EACP,MAAM,mBAAmB,CAAC;AAM3B,0EAA0E;AAC1E,eAAO,MAAM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KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC,CAgI1C;AAED;;;GAGG;AACH,wBAAsB,IAAI,CACxB,MAAM,SAAS,MAAM,EACrB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EAExB,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,EACpC,MAAM,EAAE,UAAU,EAClB,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,EACxD,QAAQ,GAAE,OAAoB,GAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqFpC;AAED;;;;GAIG;AACH,wBAAsB,MAAM,CAC1B,MAAM,SAAS,MAAM,EACrB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,IAAI,SAAS,MAAM,QAAQ,EAE3B,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,EACpC,MAAM,EAAE,IAAI,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EACjC,OAAO,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,EAC5B,QAAQ,GAAE,OAAoB,GAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CA2JtC"}
|
|
@@ -1,76 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* redact, shred or strip those fields.
|
|
2
|
+
* The transforms that apply the sensitive-data marker (`../sensitive.ts`):
|
|
3
|
+
* split sensitive fields out at commit, gate them on read, and strip them
|
|
4
|
+
* before projection and reaction handlers.
|
|
6
5
|
*/
|
|
7
|
-
import { z } from "zod";
|
|
8
6
|
import type { Actor, Committed, Schemas } from "../types/index.js";
|
|
9
|
-
/**
|
|
10
|
-
* Sentinel placed in `event.data[field]` when the caller isn't authorized to
|
|
11
|
-
* see the sensitive field — either `.discloses(predicate)` returned `false`,
|
|
12
|
-
* or no predicate was declared (framework default-deny). Recoverable: a
|
|
13
|
-
* properly-authorized read returns the plaintext.
|
|
14
|
-
*
|
|
15
|
-
* Re-exported from `types/schemas.ts` as part of the public surface.
|
|
16
|
-
*/
|
|
17
|
-
export declare const REDACTED: "[REDACTED]";
|
|
18
|
-
/**
|
|
19
|
-
* Sentinel placed in `event.data[field]` when the underlying PII payload has
|
|
20
|
-
* been wiped via `Store.forget_pii(stream)` — the row's pii column is `NULL`
|
|
21
|
-
* and the original plaintext is gone forever. Irrecoverable.
|
|
22
|
-
*
|
|
23
|
-
* Re-exported from `types/schemas.ts` as part of the public surface.
|
|
24
|
-
*/
|
|
25
|
-
export declare const SHREDDED: "[SHREDDED]";
|
|
26
|
-
/**
|
|
27
|
-
* Process-global registry holding every Zod schema marked sensitive. Backed
|
|
28
|
-
* by a `WeakMap`, so wrapper-created instances (`.optional()`, `.nullable()`,
|
|
29
|
-
* `.default()`) that chain off a marked schema produce *new* schema instances
|
|
30
|
-
* the registry doesn't track; the field walker handles those via unwrap.
|
|
31
|
-
*
|
|
32
|
-
* Exported so the public `sensitive(zodType)` wrapper can call `_registry.add`.
|
|
33
|
-
* Underscore prefix marks "framework-private, don't touch from user code."
|
|
34
|
-
*/
|
|
35
|
-
export declare const _registry: z.core.$ZodRegistry<{
|
|
36
|
-
sensitive: true;
|
|
37
|
-
}, z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
38
|
-
/**
|
|
39
|
-
* Stamp the def-level marker. Called by the public `sensitive()` alongside
|
|
40
|
-
* `_registry.add`.
|
|
41
|
-
*/
|
|
42
|
-
export declare function _mark_sensitive(schema: z.ZodType): void;
|
|
43
|
-
/**
|
|
44
|
-
* Derive an event's sensitive fields, as the declared schema of each.
|
|
45
|
-
*
|
|
46
|
-
* Walks the top-level shape of a `z.object({...})` and keeps the keys whose
|
|
47
|
-
* schema (after unwrapping optional/nullable/default wrappers) was marked via
|
|
48
|
-
* `sensitive(...)`. Returns an empty object for non-object schemas or events
|
|
49
|
-
* with no sensitive fields — the common-case zero-cost path.
|
|
50
|
-
*
|
|
51
|
-
* Only the top-level shape is walked. Sensitive fields nested inside a
|
|
52
|
-
* `z.object` declared inside the event payload would require recursive
|
|
53
|
-
* descent; that's deferred until a real callsite needs it.
|
|
54
|
-
*
|
|
55
|
-
* A union event has no top-level shape, so the options are walked and merged:
|
|
56
|
-
* a key sensitive in any variant must be split, because the stored payload
|
|
57
|
-
* could be that variant.
|
|
58
|
-
* The first variant to declare a key wins, which only matters to a caller that
|
|
59
|
-
* wants the schema rather than the name.
|
|
60
|
-
*
|
|
61
|
-
* Returning the schemas rather than just the names is what lets a caller do
|
|
62
|
-
* something per field — the event builder asks each one whether it holds a
|
|
63
|
-
* date, so the `pii` sidecar's dates can be revived like any other.
|
|
64
|
-
*/
|
|
65
|
-
export declare function pii_schemas(schema: z.ZodType): Record<string, z.ZodType>;
|
|
66
|
-
/**
|
|
67
|
-
* The names of an event's sensitive fields — {@link pii_schemas} keyed.
|
|
68
|
-
*
|
|
69
|
-
* @internal — consumed by the registry's `sensitive_fields(event_name)` lookup,
|
|
70
|
-
* and public through `types/schemas.ts`, where act-http's OpenAPI emitter uses
|
|
71
|
-
* it to mark request-body properties `writeOnly`.
|
|
72
|
-
*/
|
|
73
|
-
export declare function pii_fields(schema: z.ZodType): readonly string[];
|
|
74
7
|
/**
|
|
75
8
|
* Split an emitted event's `data` into `data` (non-sensitive) + `pii`
|
|
76
9
|
* (sensitive) using the field list precomputed at build time. Used by the
|
|
@@ -142,4 +75,4 @@ export declare function make_gate(fields: readonly string[], predicate: ((event:
|
|
|
142
75
|
* call site makes the security-relevant path visible in code review.
|
|
143
76
|
*/
|
|
144
77
|
export declare function pii_strip<TEvents extends Schemas, TKey extends keyof TEvents & string>(event: Committed<TEvents, TKey>, fields: readonly string[]): Committed<TEvents, TKey>;
|
|
145
|
-
//# sourceMappingURL=
|
|
78
|
+
//# sourceMappingURL=pii.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pii.d.ts","sourceRoot":"","sources":["../../../src/internal/pii.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGnE;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,OAAO,EAAE;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,KAAK,CAAA;CAAE,EACrC,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,CAU5D;AAsDD;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,SAAS,OAAO,EAAE,IAAI,SAAS,MAAM,OAAO,EAC1E,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,EAC/B,KAAK,CAAC,EAAE,KAAK,KACV,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAE9B;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,SAA4B,CAAC;AAEzD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAC,GAAG,IAAI,GACxD,SAAS,CAEX;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CACvB,OAAO,SAAS,OAAO,EACvB,IAAI,SAAS,MAAM,OAAO,GAAG,MAAM,EAEnC,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,EAC/B,MAAM,EAAE,SAAS,MAAM,EAAE,GACxB,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,CAe1B"}
|
|
@@ -22,9 +22,8 @@
|
|
|
22
22
|
* - Eviction under `maxCachedStates` pressure flushes the evictee first
|
|
23
23
|
* (flush-before-evict) — eviction never loses folded work.
|
|
24
24
|
*/
|
|
25
|
-
import type { BatchHandler, CacheEntry, Schema, Schemas, State } from "../types/index.js";
|
|
25
|
+
import type { BatchHandler, CacheEntry, PatchFn, Schema, Schemas, State } from "../types/index.js";
|
|
26
26
|
import type { FoldConfig } from "./config.js";
|
|
27
|
-
import { type PatchFn } from "./event-sourcing.js";
|
|
28
27
|
/**
|
|
29
28
|
* Internal handle a fold handler exposes so the orchestrator can drop its
|
|
30
29
|
* process-local state.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projection-fold.d.ts","sourceRoot":"","sources":["../../../src/internal/projection-fold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,MAAM,EACN,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"projection-fold.d.ts","sourceRoot":"","sources":["../../../src/internal/projection-fold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EACV,YAAY,EACZ,UAAU,EACV,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAgB9C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,eAA2B,CAAC;AAEnD,qEAAqE;AACrE,MAAM,MAAM,sBAAsB,CAAC,OAAO,SAAS,OAAO,IACxD,YAAY,CAAC,OAAO,CAAC,GAAG;IACtB,QAAQ,CAAC,CAAC,UAAU,CAAC,CAAC,EAAE,MAAM,IAAI,CAAC;CACpC,CAAC;AAEJ;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,SAAS,MAAM,EACrB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EAExB,EAAE,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAC,EACpC,KAAK,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,EACjE,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,OAAO,YAAa,EAC9B,gBAAgB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,SAAS,MAAM,EAAE,GAC1D,YAAY,CAAC,OAAO,CAAC,CAyIvB"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reaction dispatch — what runs inside the drain pipeline once `run_drain_cycle`
|
|
3
|
+
* has fetched events for a leased stream. Two shapes:
|
|
4
|
+
*
|
|
5
|
+
* - per-event `handle`: walks payloads sequentially, running each handler
|
|
6
|
+
* inside the reaction scope so `action()` threads `reactingTo`
|
|
7
|
+
* - bulk `handle_batch`: hands every event for a static-target projection to
|
|
8
|
+
* a single batch callback, enabling one-transaction replays
|
|
9
|
+
*
|
|
10
|
+
* Both finish through the drain's `finalize`, the one retry-or-block
|
|
11
|
+
* decision for every per-stream failure. A handler steers its outcome by
|
|
12
|
+
* throwing `DeferSignal` (hold until due) or {@link CloseSignal} (retire the
|
|
13
|
+
* stream); dispatch turns either into a `HandleResult`.
|
|
14
|
+
*/
|
|
15
|
+
import type { ReactionScope } from "../scoped.js";
|
|
16
|
+
import type { Actor, Logger, Schemas } from "../types/index.js";
|
|
17
|
+
import { type Handle, type HandleBatch } from "./drain-cycle.js";
|
|
1
18
|
/**
|
|
2
19
|
* The control-flow signal a reaction handler throws to *close* a stream.
|
|
3
|
-
* Like
|
|
20
|
+
* Like `DeferSignal` it rides the dispatcher's
|
|
4
21
|
* `try/catch`, but where a defer holds the stream for later, a close asks the
|
|
5
22
|
* orchestrator to retire it: `build_handle` turns the signal into a
|
|
6
23
|
* `HandleResult.close` (a {@link CloseTarget}), `run_drain_cycle` acks the
|
|
@@ -51,4 +68,32 @@ export declare class CloseSignal extends Error {
|
|
|
51
68
|
before?: Date;
|
|
52
69
|
});
|
|
53
70
|
}
|
|
54
|
-
|
|
71
|
+
/**
|
|
72
|
+
* What the dispatcher needs from the orchestrator: a logger for retry and
|
|
73
|
+
* error breadcrumbs, and the scope a handler runs inside.
|
|
74
|
+
*/
|
|
75
|
+
export type ReactionDeps<TEvents extends Schemas, TActions extends Schemas, TActor extends Actor = Actor> = {
|
|
76
|
+
readonly logger: Logger;
|
|
77
|
+
/**
|
|
78
|
+
* What a handler runs inside — its `IAct` facade and its triggering-event
|
|
79
|
+
* context — assembled by the orchestrator. How either half works is not
|
|
80
|
+
* this module's business; it receives the scope whole and calls it.
|
|
81
|
+
*/
|
|
82
|
+
readonly reaction_scope: ReactionScope<TEvents, TActions, TActor>;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Builds the per-event reaction dispatcher passed to `run_drain_cycle`.
|
|
86
|
+
*
|
|
87
|
+
* The triggering event is installed as ambient context around each handler
|
|
88
|
+
* call, so `action()` resolves it as `reactingTo`. Ambient
|
|
89
|
+
* rather than bound to the `IAct` argument, so a handler that dispatches
|
|
90
|
+
* through a captured `app` inherits the chain too.
|
|
91
|
+
*/
|
|
92
|
+
export declare function build_handle<TEvents extends Schemas, TActions extends Schemas, TActor extends Actor = Actor>(deps: ReactionDeps<TEvents, TActions, TActor>): Handle<TEvents>;
|
|
93
|
+
/**
|
|
94
|
+
* Builds the bulk reaction dispatcher passed to `run_drain_cycle`. All events
|
|
95
|
+
* for a static-target projection are handed to a single callback so the
|
|
96
|
+
* projection can do one transaction per drain (catch-up replays especially).
|
|
97
|
+
*/
|
|
98
|
+
export declare function build_handle_batch<TEvents extends Schemas>(logger: Logger): HandleBatch<TEvents>;
|
|
99
|
+
//# sourceMappingURL=reaction-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reaction-dispatch.d.ts","sourceRoot":"","sources":["../../../src/internal/reaction-dispatch.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EACV,KAAK,EAIL,MAAM,EAEN,OAAO,EACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAY,KAAK,MAAM,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;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;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,CACtB,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,IAC1B;IACF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,CAAC,cAAc,EAAE,aAAa,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;CACnE,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,EACxB,MAAM,SAAS,KAAK,GAAG,KAAK,EAC5B,IAAI,EAAE,YAAY,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC,CAsFhE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,SAAS,OAAO,EACxD,MAAM,EAAE,MAAM,GACb,WAAW,CAAC,OAAO,CAAC,CAsCtB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* One-shot reporting for a misdeclaration that a build-time guard could not
|
|
3
3
|
* catch.
|
|
4
4
|
*
|
|
5
|
-
* The guards in `build_events` and `
|
|
5
|
+
* The guards in `build_events` and `classify` can only inspect a static
|
|
6
6
|
* `.to({...})` — a `.to(fn)` target, lane and priority are a function until an
|
|
7
7
|
* event arrives. The pipelines that resolve them (correlate for lane and
|
|
8
8
|
* target, drain for the payload) are therefore where the same rules have to be
|
|
@@ -45,22 +45,28 @@ export declare class SettleLoop<TEvents extends Schemas> {
|
|
|
45
45
|
* it (`stop()` cancels scheduling only). Never rejects.
|
|
46
46
|
*/
|
|
47
47
|
private _inflight;
|
|
48
|
-
/**
|
|
49
|
-
* A wake-up that fired while a cycle was running. The running cycle's
|
|
50
|
-
* `finally` schedules one more pass with these options, so it isn't lost.
|
|
51
|
-
*/
|
|
48
|
+
/** A wake-up arrived while a cycle ran: run one more pass after it. */
|
|
52
49
|
private _pending;
|
|
50
|
+
/** The last caller's options, used by the next pass. */
|
|
51
|
+
private _next;
|
|
52
|
+
/** When the scheduled pass fires (epoch ms). */
|
|
53
|
+
private _due;
|
|
54
|
+
/** Set at shutdown: nothing schedules again. */
|
|
55
|
+
private _stopped;
|
|
53
56
|
private readonly _deps;
|
|
54
57
|
/** Debounce window applied when the caller doesn't override via `SettleOptions.debounceMs`. */
|
|
55
58
|
private readonly _default_debounce_ms;
|
|
56
59
|
constructor(deps: SettleDeps<TEvents>, default_debounce_ms: number);
|
|
57
60
|
/**
|
|
58
|
-
* Schedule a settle pass.
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
61
|
+
* Schedule a settle pass. A pass already scheduled is never put off or
|
|
62
|
+
* replaced: calls that arrive before it runs join it (a shorter
|
|
63
|
+
* `debounceMs` brings it forward), and a call during a running cycle
|
|
64
|
+
* queues one more pass after it. Callers pass options, which the next
|
|
65
|
+
* pass uses; internal wake-ups pass none, so they never discard a
|
|
66
|
+
* caller's. The cycle runs correlate→drain in a
|
|
67
|
+
* loop until no progress is made (no new subscriptions, no events read,
|
|
68
|
+
* no streams leased) or `maxPasses` is reached, then emits the
|
|
69
|
+
* `"settled"` lifecycle event via {@link SettleDeps.on_settled}.
|
|
64
70
|
*/
|
|
65
71
|
schedule(options?: SettleOptions): void;
|
|
66
72
|
/**
|
|
@@ -69,7 +75,10 @@ export declare class SettleLoop<TEvents extends Schemas> {
|
|
|
69
75
|
* settle parked in `correlate` does not resume after teardown.
|
|
70
76
|
*/
|
|
71
77
|
get inflight(): Promise<void> | undefined;
|
|
72
|
-
/**
|
|
73
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Cancel any pending settle pass. Idempotent. `final` (shutdown) also
|
|
80
|
+
* stops all later scheduling.
|
|
81
|
+
*/
|
|
82
|
+
stop(final?: boolean): void;
|
|
74
83
|
}
|
|
75
84
|
//# sourceMappingURL=settle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settle.d.ts","sourceRoot":"","sources":["../../../src/internal/settle.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,KAAK,EACL,OAAO,EACP,aAAa,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,UAAU,CAAC,OAAO,SAAS,OAAO,IAAI;IAChD,QAAQ,CAAC,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,CAClB,KAAK,EAAE,KAAK,KACT,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzE,QAAQ,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrD;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC,CAAC;AAEF;;;GAGG;AACH,qBAAa,UAAU,CAAC,OAAO,SAAS,OAAO;IAC7C,OAAO,CAAC,MAAM,CAAwD;IACtE,OAAO,CAAC,QAAQ,CAAS;IACzB;;;OAGG;IACH,OAAO,CAAC,SAAS,CAA4B;IAC7C
|
|
1
|
+
{"version":3,"file":"settle.d.ts","sourceRoot":"","sources":["../../../src/internal/settle.ts"],"names":[],"mapp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F;IAC/F,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAE9C,YAAY,IAAI,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAGjE;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CA0FtC;IAED;;;;OAIG;IACH,IAAI,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,SAAS,CAExC;IAED;;;OAGG;IACH,IAAI,CAAC,KAAK,UAAQ,GAAG,IAAI,CAUxB;CACF"}
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
* on the configured log level. Outside this module, no other source file
|
|
21
21
|
* imports tracing primitives.
|
|
22
22
|
*/
|
|
23
|
-
import type { Correlator, Logger, Schemas } from "../types/index.js";
|
|
24
|
-
import type { DrainOps } from "./drain.js";
|
|
25
|
-
import type { EsOps
|
|
23
|
+
import type { Correlator, Logger, PatchFn, Schemas } from "../types/index.js";
|
|
24
|
+
import type { DrainOps } from "./drain-ops.js";
|
|
25
|
+
import type { EsOps } from "./event-sourcing.js";
|
|
26
26
|
/**
|
|
27
27
|
* Selects bare or traced event-sourcing handlers. Called once by the
|
|
28
28
|
* orchestrator constructor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../src/internal/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../../src/internal/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,KAAK,EAEV,UAAU,EACV,MAAM,EACN,OAAO,EACP,OAAO,EACR,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,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AAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EACtE,OAAO,EAAE,aAAa,CAAC;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,GAC1E,IAAI,CAwDN"}
|
package/dist/@types/ports.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ConsoleLogger } from "./adapters/console-logger.js";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
export type { Scoped } from "./scoped.js";
|
|
2
|
+
import type { Cache, Disposable, Disposer, Logger, Scoped, Store } from "./types/index.js";
|
|
3
|
+
import { type ExitCode } from "./types/index.js";
|
|
5
4
|
/**
|
|
6
5
|
* Port/adapter infrastructure for the Act framework.
|
|
7
6
|
*
|
|
@@ -16,22 +15,6 @@ export type { Scoped } from "./scoped.js";
|
|
|
16
15
|
*
|
|
17
16
|
* @module ports
|
|
18
17
|
*/
|
|
19
|
-
/**
|
|
20
|
-
* List of exit codes for process termination. Consumed by signal handlers
|
|
21
|
-
* and {@link disposeAndExit}; not part of the user-facing surface.
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
export declare const ExitCodes: readonly ["ERROR", "EXIT"];
|
|
26
|
-
/**
|
|
27
|
-
* Type for allowed exit codes.
|
|
28
|
-
*
|
|
29
|
-
* - `"ERROR"` — abnormal termination (uncaught exception, unhandled rejection)
|
|
30
|
-
* - `"EXIT"` — clean shutdown (SIGINT, SIGTERM, or manual trigger)
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
export type ExitCode = (typeof ExitCodes)[number];
|
|
35
18
|
/**
|
|
36
19
|
* Factory function that creates or returns the injected adapter.
|
|
37
20
|
* @internal
|
|
@@ -147,28 +130,5 @@ export declare function disposeAndExit(code?: ExitCode): Promise<void>;
|
|
|
147
130
|
* @see {@link disposeAndExit} for the full shutdown sequence
|
|
148
131
|
*/
|
|
149
132
|
export declare function dispose(disposer?: Disposer): (code?: ExitCode) => Promise<void>;
|
|
150
|
-
|
|
151
|
-
* Event name used internally for snapshot events in the event store.
|
|
152
|
-
* Snapshot events store a full state checkpoint, enabling efficient cold-start
|
|
153
|
-
* recovery without replaying the entire event stream.
|
|
154
|
-
*/
|
|
155
|
-
export declare const SNAP_EVENT = "__snapshot__";
|
|
156
|
-
/**
|
|
157
|
-
* Event name used internally for tombstone events in the event store.
|
|
158
|
-
* A tombstone marks a stream as permanently closed — no further writes
|
|
159
|
-
* are permitted until the stream is explicitly restarted via `close()`.
|
|
160
|
-
*
|
|
161
|
-
* @see {@link Act.close} for the close-the-books API
|
|
162
|
-
*/
|
|
163
|
-
export declare const TOMBSTONE_EVENT = "__tombstone__";
|
|
164
|
-
/**
|
|
165
|
-
* Name of the implicit lane every reaction lands in unless its `.to({lane})`
|
|
166
|
-
* declaration says otherwise. Acts that don't call
|
|
167
|
-
* `.withLane(...)` see only this lane, and behavior is identical to
|
|
168
|
-
* pre-1103 single-controller drain.
|
|
169
|
-
*
|
|
170
|
-
* Persisted on `streams.lane` and threaded as the strict-typed default in
|
|
171
|
-
* builder generics — `lane?: TLanes` always includes `"default"`.
|
|
172
|
-
*/
|
|
173
|
-
export declare const DEFAULT_LANE = "default";
|
|
133
|
+
export {};
|
|
174
134
|
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../src/ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../src/ports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAM7D,OAAO,KAAK,EACV,KAAK,EACL,UAAU,EACV,QAAQ,EAC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