@rotorsoft/act 1.32.30 → 1.33.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/README.md +0 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/@types/act.d.ts +41 -233
- 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 +216 -0
- package/dist/@types/types/act.d.ts.map +1 -0
- package/dist/@types/types/action.d.ts +67 -0
- package/dist/@types/types/action.d.ts.map +1 -1
- package/dist/@types/types/builders.d.ts +722 -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 +15 -9
- 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-HHKLVRR4.js → chunk-2PMUONGF.js} +38 -57
- package/dist/chunk-2PMUONGF.js.map +1 -0
- package/dist/chunk-HF433MAF.cjs +264 -0
- package/dist/chunk-HF433MAF.cjs.map +1 -0
- package/dist/{chunk-X3MMQIIP.js → chunk-JABYJGT7.js} +174 -22
- package/dist/chunk-JABYJGT7.js.map +1 -0
- package/dist/chunk-VE3MTY4A.cjs +1233 -0
- package/dist/chunk-VE3MTY4A.cjs.map +1 -0
- package/dist/index.cjs +1645 -3041
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +751 -813
- 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 +1 -1
- 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
package/dist/@types/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { type ActOptions, type AutocloseConfig, type Config } from "./types/index.js";
|
|
2
3
|
/**
|
|
3
4
|
* Zod schema for validating package.json metadata.
|
|
4
5
|
* @internal
|
|
@@ -14,48 +15,6 @@ export declare const PackageSchema: z.ZodObject<{
|
|
|
14
15
|
license: z.ZodOptional<z.ZodString>;
|
|
15
16
|
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
16
17
|
}, z.core.$strip>;
|
|
17
|
-
/**
|
|
18
|
-
* Type representing the validated package.json metadata.
|
|
19
|
-
*
|
|
20
|
-
* @internal
|
|
21
|
-
*/
|
|
22
|
-
export type Package = z.infer<typeof PackageSchema>;
|
|
23
|
-
/**
|
|
24
|
-
* Zod schema for the full Act Framework configuration object.
|
|
25
|
-
* Includes package metadata, environment, logging, and timing options.
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
declare const BaseSchema: z.ZodObject<{
|
|
29
|
-
name: z.ZodString;
|
|
30
|
-
version: z.ZodString;
|
|
31
|
-
description: z.ZodOptional<z.ZodString>;
|
|
32
|
-
author: z.ZodOptional<z.ZodUnion<[z.ZodOptional<z.ZodObject<{
|
|
33
|
-
name: z.ZodString;
|
|
34
|
-
email: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, z.core.$strip>>, z.ZodString]>>;
|
|
36
|
-
license: z.ZodOptional<z.ZodString>;
|
|
37
|
-
dependencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
38
|
-
env: z.ZodEnum<{
|
|
39
|
-
development: "development";
|
|
40
|
-
production: "production";
|
|
41
|
-
staging: "staging";
|
|
42
|
-
test: "test";
|
|
43
|
-
}>;
|
|
44
|
-
logLevel: z.ZodEnum<{
|
|
45
|
-
debug: "debug";
|
|
46
|
-
error: "error";
|
|
47
|
-
fatal: "fatal";
|
|
48
|
-
info: "info";
|
|
49
|
-
trace: "trace";
|
|
50
|
-
warn: "warn";
|
|
51
|
-
}>;
|
|
52
|
-
logSingleLine: z.ZodBoolean;
|
|
53
|
-
sleepMs: z.ZodNumber;
|
|
54
|
-
}, z.core.$strip>;
|
|
55
|
-
/**
|
|
56
|
-
* Type representing the validated Act Framework configuration object.
|
|
57
|
-
*/
|
|
58
|
-
export type Config = z.infer<typeof BaseSchema>;
|
|
59
18
|
/**
|
|
60
19
|
* Gets the current Act Framework configuration.
|
|
61
20
|
*
|
|
@@ -88,5 +47,9 @@ export type Config = z.infer<typeof BaseSchema>;
|
|
|
88
47
|
* @see {@link Config} for configuration type
|
|
89
48
|
*/
|
|
90
49
|
export declare const config: () => Config;
|
|
91
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Validates and defaults the autoclose knobs of `ActOptions`, the way
|
|
52
|
+
* `act().build()` does. Throws `ZodError` on an out-of-range value.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveAutocloseConfig(options: ActOptions | undefined): AutocloseConfig;
|
|
92
55
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,MAAM,EAMZ,MAAM,kBAAkB,CAAC;AAG1B;;;GAGG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;iBAWK,CAAC;AAsFhC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,MAAM,QAAO,MAwBzB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,UAAU,GAAG,SAAS,GAC9B,eAAe,CAEjB"}
|
package/dist/@types/csv.d.ts
CHANGED
|
@@ -15,21 +15,7 @@
|
|
|
15
15
|
* implemented — `CsvFile` is a transfer-only primitive, not a
|
|
16
16
|
* store you'd run an Act app against.
|
|
17
17
|
*/
|
|
18
|
-
import type { Committed, EventSink, EventSource, Query, Schemas } from "./types/action.js";
|
|
19
|
-
/**
|
|
20
|
-
* Construct a {@link CsvFile} from either a filesystem path (for
|
|
21
|
-
* reading and/or writing through the OS) or an in-memory blob (a
|
|
22
|
-
* pre-loaded CSV string, used by the inspector when a CSV arrives
|
|
23
|
-
* over the wire via tRPC).
|
|
24
|
-
*
|
|
25
|
-
* Both modes share the same on-disk format, so the same blob shape
|
|
26
|
-
* can be round-tripped through the transfer pipeline.
|
|
27
|
-
*/
|
|
28
|
-
export type CsvFileOptions = {
|
|
29
|
-
path: string;
|
|
30
|
-
} | {
|
|
31
|
-
blob: string;
|
|
32
|
-
};
|
|
18
|
+
import type { Committed, CsvFileOptions, EventSink, EventSource, Query, Schemas } from "./types/action.js";
|
|
33
19
|
export declare class CsvFile implements EventSource, EventSink {
|
|
34
20
|
private readonly path;
|
|
35
21
|
private readonly blob;
|
package/dist/@types/csv.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/csv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,KAAK,EACL,OAAO,EACR,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"csv.d.ts","sourceRoot":"","sources":["../../src/csv.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,OAAO,KAAK,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,WAAW,EACX,KAAK,EACL,OAAO,EACR,MAAM,mBAAmB,CAAC;AAgB3B,qBAAa,OAAQ,YAAW,WAAW,EAAE,SAAS;IACpD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IACrC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAgB;IAErC,YAAY,OAAO,EAAE,cAAc,EAQlC;IAEK,KAAK,CAAC,CAAC,SAAS,OAAO,EAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,EAChD,OAAO,CAAC,EAAE,KAAK,GACd,OAAO,CAAC,MAAM,CAAC,CAsCjB;IAEK,OAAO,CACX,MAAM,EAAE,CACN,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,KACpE,OAAO,CAAC,IAAI,CAAC,GACjB,OAAO,CAAC,IAAI,CAAC,CA6Bf;IAEK,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAK7B;CACF"}
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export * from "./adapters/index.js";
|
|
|
9
9
|
export * from "./builders/index.js";
|
|
10
10
|
export * from "./config.js";
|
|
11
11
|
export * from "./csv.js";
|
|
12
|
-
export { DeferSignal } from "./internal/index.js";
|
|
13
12
|
export * from "./ports.js";
|
|
14
13
|
export * from "./types/index.js";
|
|
15
14
|
export * from "./utils.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB;;;;GAIG;AACH,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
|
|
@@ -6,68 +6,11 @@
|
|
|
6
6
|
* then, not on the first cycle. Semantics and examples:
|
|
7
7
|
* docs/docs/guides/close-policies.md.
|
|
8
8
|
*/
|
|
9
|
-
import {
|
|
10
|
-
import type { AutoclosePredicate, Schemas } from "../types/action.js";
|
|
9
|
+
import type { AutoclosePolicy, AutoclosePredicate, Schemas } from "../types/action.js";
|
|
11
10
|
/** The `Date` that lies `days` after `date`. */
|
|
12
11
|
export declare function days_after(date: Date, days: number): Date;
|
|
13
12
|
/** The `Date` that lies `days` in the past. */
|
|
14
13
|
export declare function days_before_now(days: number): Date;
|
|
15
|
-
/**
|
|
16
|
-
* Zod schema for the declarative {@link AutoclosePolicy} bag.
|
|
17
|
-
* Internal `const` per the config-validation-schema standard (CLAUDE.md
|
|
18
|
-
* "Config-validation schemas") — the public surface is the inferred
|
|
19
|
-
* {@link AutoclosePolicy} type and the `.autocloses({...})` overload,
|
|
20
|
-
* never this schema. `.strict()` rejects unknown keys so typos surface
|
|
21
|
-
* at build instead of being silently ignored.
|
|
22
|
-
*/
|
|
23
|
-
declare const AutoclosePolicySchema: z.ZodObject<{
|
|
24
|
-
after: z.ZodOptional<z.ZodObject<{
|
|
25
|
-
days: z.ZodNumber;
|
|
26
|
-
}, z.core.$strip>>;
|
|
27
|
-
is: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>]>>;
|
|
28
|
-
reaches: z.ZodOptional<z.ZodNumber>;
|
|
29
|
-
or: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
after: z.ZodOptional<z.ZodObject<{
|
|
31
|
-
days: z.ZodNumber;
|
|
32
|
-
}, z.core.$strip>>;
|
|
33
|
-
is: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString>>]>>;
|
|
34
|
-
reaches: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
}, z.core.$strict>>;
|
|
36
|
-
keep: z.ZodOptional<z.ZodObject<{
|
|
37
|
-
days: z.ZodNumber;
|
|
38
|
-
}, z.core.$strip>>;
|
|
39
|
-
}, z.core.$strict>;
|
|
40
|
-
/**
|
|
41
|
-
* Declarative close-policy options consumed by `.autocloses({...})`.
|
|
42
|
-
* Top-level fields are AND-combined; the optional `or` block opens an
|
|
43
|
-
* alternative OR-path. Omitted fields contribute nothing — they do
|
|
44
|
-
* not mean "match everything."
|
|
45
|
-
*
|
|
46
|
-
* @property after - Close when `head.created` is at least the resolved
|
|
47
|
-
* window in the past. Days are the close surface's only unit;
|
|
48
|
-
* fractional `days` cover sub-day cooldowns (`{ days: 1/24 }` is one
|
|
49
|
-
* hour) without introducing another denomination.
|
|
50
|
-
* @property is - Close when `head.name` matches. String for the
|
|
51
|
-
* single-terminal-event case (the most common); `readonly string[]`
|
|
52
|
-
* for multi-terminal states (`Order: Shipped | Delivered |
|
|
53
|
-
* Cancelled`).
|
|
54
|
-
* @property reaches - Close when the stream's event count is `>= N`
|
|
55
|
-
* (inclusive — fires the moment the threshold is reached).
|
|
56
|
-
* @property or - Alternative OR-path. When present, the policy fires
|
|
57
|
-
* if EITHER the top-level AND group matches OR any field inside
|
|
58
|
-
* `or` matches. Used for safety-net backstops layered onto a
|
|
59
|
-
* primary cooldown policy (e.g. *"(Resolved AND 90 days) OR reaches
|
|
60
|
-
* 10k"*). Nested `or` inside `or` rejects at build time.
|
|
61
|
-
* @property keep - Rolling-window retention, **independent** of
|
|
62
|
-
* the terminate fields: while the stream stays open, prune events
|
|
63
|
-
* older than `now − keep` behind the closest safe snapshot via a
|
|
64
|
-
* windowed close. Does not participate in the AND group or the `or`
|
|
65
|
-
* block — a policy may terminate, prune, or both. Requires
|
|
66
|
-
* `.snap(...)` earlier in the builder chain (type-gated) and a
|
|
67
|
-
* window of at least one day — the close cycle is low-cadence
|
|
68
|
-
* housekeeping, never sub-day realtime.
|
|
69
|
-
*/
|
|
70
|
-
export type AutoclosePolicy = z.infer<typeof AutoclosePolicySchema>;
|
|
71
14
|
/**
|
|
72
15
|
* Compile a declarative {@link AutoclosePolicy} into an
|
|
73
16
|
* {@link AutoclosePredicate}. The state-builder's
|
|
@@ -118,5 +61,4 @@ export declare function policy_min_after_days(options: AutoclosePolicy): number
|
|
|
118
61
|
*/
|
|
119
62
|
export declare function policy_keep_days(options: AutoclosePolicy): number | undefined;
|
|
120
63
|
export declare function compile_autoclose_policy(options: AutoclosePolicy): AutoclosePredicate<Schemas>;
|
|
121
|
-
export {};
|
|
122
64
|
//# sourceMappingURL=autoclose-policy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoclose-policy.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"autoclose-policy.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EACV,eAAe,EACf,kBAAkB,EAClB,OAAO,EACR,MAAM,oBAAoB,CAAC;AA2B5B,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;AAmHD;;;;;;;;;;;;;;;;;;;;;;;;;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"}
|
|
@@ -12,8 +12,7 @@
|
|
|
12
12
|
* registry is complete once the builder finishes; the orchestrator never
|
|
13
13
|
* mutates it.
|
|
14
14
|
*/
|
|
15
|
-
import type { Registry, SchemaRegister, Schemas, State } from "../types/index.js";
|
|
16
|
-
import { type AutocloseConfig } from "./config.js";
|
|
15
|
+
import type { AutocloseConfig, Registry, SchemaRegister, Schemas, State } from "../types/index.js";
|
|
17
16
|
/**
|
|
18
17
|
* Inject one synthesized autoclose reaction per `.autocloses(...)` state
|
|
19
18
|
* into the registry's event registers. The handler resolves ports at call
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoclose-reaction.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"autoclose-reaction.d.ts","sourceRoot":"","sources":["../../../src/internal/autoclose-reaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAIH,OAAO,KAAK,EACV,eAAe,EAEf,QAAQ,EACR,cAAc,EACd,OAAO,EACP,KAAK,EACN,MAAM,mBAAmB,CAAC;AAgB3B;;;;;;;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"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Off-hours window math for autoclose — hour-in-zone, DST-gap handling, and
|
|
3
3
|
* "next time the window opens".
|
|
4
4
|
*/
|
|
5
|
-
import type { AutocloseConfig } from "
|
|
5
|
+
import type { AutocloseConfig } from "../types/index.js";
|
|
6
6
|
/**
|
|
7
7
|
* The current hour `[0, 23]` in the given IANA time zone, DST-correct
|
|
8
8
|
* via `Intl`. Split out so the window check can be unit-tested without
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,mBAAmB,CAAC;AAEzD;;;;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"}
|
|
@@ -15,9 +15,8 @@
|
|
|
15
15
|
* Time is passed in (`now`) rather than read from the clock so the state
|
|
16
16
|
* machine is deterministic under test.
|
|
17
17
|
*/
|
|
18
|
+
import type { CircuitState } from "../types/index.js";
|
|
18
19
|
import type { CircuitBreakerConfig } from "./config.js";
|
|
19
|
-
/** Circuit breaker state. */
|
|
20
|
-
export type CircuitState = "closed" | "open" | "half-open";
|
|
21
20
|
/**
|
|
22
21
|
* Side-effect hooks the orchestrator wires into the breaker so consumers
|
|
23
22
|
* (drain / settle / autoclose) don't each thread their own callbacks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"circuit-breaker.d.ts","sourceRoot":"","sources":["../../../src/internal/circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"circuit-breaker.d.ts","sourceRoot":"","sources":["../../../src/internal/circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD;;;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,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 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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E,MAAM,CAAC;IAAC,GAAG,IAAI,IAAI,CAAA;CAAE,EACpD,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAC9C,KAAK,EAAE,MAAM,GACZ,OAAO,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"}
|
|
@@ -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":[],"mapp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AACjD,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,oDAAoD;AACpD,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAQ3C,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,YAAY,GAAG,SAAS,CAI1B;AAoBD,+EAA+E;AAC/E,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,aAAa,GAAG,SAAS,GACjC,aAAa,GAAG,SAAS,CAI3B;AAID;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAU5C,iFAAiF;AACjF,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,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/correlate-cycle.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAEV,KAAK,EACL,QAAQ,EAER,cAAc,EACd,OAAO,EAGR,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAsC/C,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AA4BF,2DAA2D;AAC3D,MAAM,MAAM,kBAAkB,CAC5B,UAAU,SAAS,cAAc,CAAC,QAAQ,CAAC,EAC3C,OAAO,SAAS,OAAO,EACvB,QAAQ,SAAS,OAAO,IACtB;IACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClD,cAAc,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAC5C,EAAE,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACtB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,c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ACd,EAAE,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,EAWnD;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,wEAAwE;IACxE,GAAG,IAAI,IAAI,CAEV;IAEK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAW1B;YAEa,SAAS;IAoBvB,gFAAgF;IAChF,OAAO,IAAI,IAAI,CAOd;IAED,oFAAoF;IACpF,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI,CAEjD;IAED,+EAA+E;IAC/E,OAAO,CAAC,gBAAgB;IAcxB,kFAAkF;IAC5E,SAAS,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-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,gBAAgB,CAAC;AAK/C,mEAAmE;AACnE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAClC,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8EAA8E;IAC9E,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,C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MAAM,EAAE,KAAK,EAAE,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAwCzB;AAKD,eAAO,MAAM,GAAG,WAAY,KAAK,EAAE,KAAG,OAAO,CAAC,KAAK,EAAE,CAAwB,CAAC;AAE9E,eAAO,MAAM,KAAK,WAAY,YAAY,EAAE,KAAG,OAAO,CAAC,YAAY,EAAE,CAC9C,CAAC;AAExB,eAAO,MAAM,SAAS,YACX,cAAc,EAAE,kBACT,MAAM,eACT;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,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,UAAU,EAAE,OACc,CAAC;AAExC;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,OAO9B,CAAC;AAIF,uEAAuE;AACvE,KAAK,WAAW,GAAG,CACjB,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,KACzB,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC;AAE1C,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,OAAO,SAAS,CAAC;CAC7B;AA2BD,0FAA0F;AAC1F,wBAAsB,IAAI,CAAC,MAAM,SAAS,MAAM,EAAE,OAAO,SAAS,OAAO,EACvE,QAAQ,EAAE,QAAQ,CAAC,MAA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Q,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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