@rotorsoft/act 1.32.13 → 1.32.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/@types/act.d.ts +98 -152
  3. package/dist/@types/act.d.ts.map +1 -1
  4. package/dist/@types/adapters/in-memory-store.d.ts +3 -3
  5. package/dist/@types/adapters/in-memory-store.d.ts.map +1 -1
  6. package/dist/@types/builders/act-builder.d.ts +3 -3
  7. package/dist/@types/builders/act-builder.d.ts.map +1 -1
  8. package/dist/@types/builders/build-classify.d.ts +1 -1
  9. package/dist/@types/builders/builder-base.d.ts +3 -3
  10. package/dist/@types/builders/builder-utils.d.ts +1 -1
  11. package/dist/@types/builders/event-builder.d.ts +2 -12
  12. package/dist/@types/builders/event-builder.d.ts.map +1 -1
  13. package/dist/@types/builders/merge.d.ts +1 -1
  14. package/dist/@types/builders/reaction-builder.d.ts +1 -1
  15. package/dist/@types/builders/slice-builder.d.ts +2 -2
  16. package/dist/@types/builders/state-builder.d.ts +3 -4
  17. package/dist/@types/builders/state-builder.d.ts.map +1 -1
  18. package/dist/@types/csv.d.ts +1 -1
  19. package/dist/@types/disposers.d.ts.map +1 -1
  20. package/dist/@types/internal/audit.d.ts +12 -42
  21. package/dist/@types/internal/audit.d.ts.map +1 -1
  22. package/dist/@types/internal/autoclose-policy.d.ts +3 -3
  23. package/dist/@types/internal/autoclose-reaction.d.ts +2 -2
  24. package/dist/@types/internal/autoclose-window.d.ts +1 -1
  25. package/dist/@types/internal/close-cycle.d.ts +10 -39
  26. package/dist/@types/internal/close-cycle.d.ts.map +1 -1
  27. package/dist/@types/internal/close-signal.d.ts +3 -3
  28. package/dist/@types/internal/config.d.ts +3 -3
  29. package/dist/@types/internal/config.d.ts.map +1 -1
  30. package/dist/@types/internal/correlate-cycle.d.ts +39 -86
  31. package/dist/@types/internal/correlate-cycle.d.ts.map +1 -1
  32. package/dist/@types/internal/correlator.d.ts +1 -1
  33. package/dist/@types/internal/date-reviver.d.ts +1 -1
  34. package/dist/@types/internal/defer-config.d.ts +2 -2
  35. package/dist/@types/internal/defer-signal.d.ts +2 -2
  36. package/dist/@types/internal/defer-timer.d.ts +3 -3
  37. package/dist/@types/internal/drain-cycle.d.ts +35 -82
  38. package/dist/@types/internal/drain-cycle.d.ts.map +1 -1
  39. package/dist/@types/internal/event-sourcing.d.ts +8 -19
  40. package/dist/@types/internal/event-sourcing.d.ts.map +1 -1
  41. package/dist/@types/internal/event-versions.d.ts +1 -1
  42. package/dist/@types/internal/index.d.ts +5 -6
  43. package/dist/@types/internal/index.d.ts.map +1 -1
  44. package/dist/@types/internal/projection-fold.d.ts +2 -2
  45. package/dist/@types/internal/report-once.d.ts +3 -3
  46. package/dist/@types/internal/sensitive.d.ts +2 -28
  47. package/dist/@types/internal/sensitive.d.ts.map +1 -1
  48. package/dist/@types/internal/settle.d.ts +6 -19
  49. package/dist/@types/internal/settle.d.ts.map +1 -1
  50. package/dist/@types/internal/walk-streams.d.ts +0 -2
  51. package/dist/@types/internal/walk-streams.d.ts.map +1 -1
  52. package/dist/@types/ports.d.ts +3 -3
  53. package/dist/@types/scoped.d.ts +6 -16
  54. package/dist/@types/scoped.d.ts.map +1 -1
  55. package/dist/@types/types/action.d.ts +19 -19
  56. package/dist/@types/types/audit.d.ts +1 -1
  57. package/dist/@types/types/ports.d.ts +22 -26
  58. package/dist/@types/types/ports.d.ts.map +1 -1
  59. package/dist/@types/types/reaction.d.ts +8 -8
  60. package/dist/@types/types/registry.d.ts +1 -1
  61. package/dist/@types/types/schemas.d.ts +2 -2
  62. package/dist/@types/utils.d.ts +1 -1
  63. package/dist/{chunk-BI3UNNVA.js → chunk-JRTZGWVS.js} +1 -1
  64. package/dist/chunk-JRTZGWVS.js.map +1 -0
  65. package/dist/{chunk-FLAGQMWE.js → chunk-PZP5ZEZ4.js} +9 -9
  66. package/dist/chunk-PZP5ZEZ4.js.map +1 -0
  67. package/dist/index.cjs +137 -359
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.js +132 -354
  70. package/dist/index.js.map +1 -1
  71. package/dist/test/index.cjs +7 -7
  72. package/dist/test/index.cjs.map +1 -1
  73. package/dist/test/index.js +2 -2
  74. package/dist/types/index.cjs.map +1 -1
  75. package/dist/types/index.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/chunk-BI3UNNVA.js.map +0 -1
  78. package/dist/chunk-FLAGQMWE.js.map +0 -1
@@ -56,8 +56,7 @@ export type SubscribeResult = {
56
56
  subscribed: number;
57
57
  watermark: number;
58
58
  /**
59
- * Whether the caller holds the correlation lease and should scan
60
- * (#1532).
59
+ * Whether the caller holds the correlation lease and should scan.
61
60
  *
62
61
  * `undefined` when no `correlator` was supplied — no lease was requested,
63
62
  * so there is no answer and the caller scans as it always has.
@@ -72,7 +71,7 @@ export type SubscribeResult = {
72
71
  */
73
72
  correlating?: boolean;
74
73
  /**
75
- * The correlate checkpoint (#1484): how far `correlate` has **read** the
74
+ * The correlate checkpoint: how far `correlate` has **read** the
76
75
  * event log, or `-1` when it has never advanced.
77
76
  *
78
77
  * Distinct from a subscription's `at` (how far a *target* has been
@@ -86,7 +85,7 @@ export type SubscribeResult = {
86
85
  * stream-scoped surface (`prioritize`, `reset`, `unblock`,
87
86
  * `query_streams`, `blocked_streams`) ever counts it.
88
87
  *
89
- * **Keyed per correlator** when a `correlator` is supplied (#1532), and
88
+ * **Keyed per correlator** when a `correlator` is supplied, and
90
89
  * shared otherwise. Correlators that look for different things read the
91
90
  * log for different reasons, so one inheriting another's position at cold
92
91
  * start could skip events it needed — previously survivable only because
@@ -158,12 +157,12 @@ export type NotifyDisposer = () => void | Promise<void>;
158
157
  * @property leased_until - Lease expiration timestamp (when leased)
159
158
  * @property priority - Scheduling priority (default 0). Biases the
160
159
  * lagging-frontier `claim()` ordering — see {@link Store.prioritize}.
161
- * @property lane - Drain lane bound to the stream (ACT-1103)
160
+ * @property lane - Drain lane bound to the stream
162
161
  * @property deferred_at - Persisted next-visit time (ms since epoch) when
163
162
  * the stream is held out of {@link claim} by a `defer` outcome; omitted
164
163
  * when the stream carries no active defer schedule. Read at cold start to
165
164
  * re-seed the in-process defer timer so an idle deferred stream re-arms
166
- * its drain across a restart (#1221) — the schedule outlives the process
165
+ * its drain across a restart — the schedule outlives the process
167
166
  * memory it was derived from.
168
167
  */
169
168
  export type StreamPosition = {
@@ -243,7 +242,7 @@ export type StreamPosition = {
243
242
  * flag, only the row count fetched.
244
243
  * @property blocked - Restrict to blocked (`true`) or unblocked (`false`)
245
244
  * streams. Omit for all.
246
- * @property lane - Restrict to streams in this drain lane (ACT-1103). Exact match.
245
+ * @property lane - Restrict to streams in this drain lane. Exact match.
247
246
  * @property after - Keyset pagination cursor: returns only streams with
248
247
  * `stream > after` (lexicographic). Pass the last seen `stream` to fetch
249
248
  * the next page.
@@ -343,7 +342,7 @@ export type EventName<E extends Schemas = Schemas> = (keyof E & string) | Framew
343
342
  *
344
343
  * `head`/`tail` never carry `pii`. `query_stats` is an operator-introspection
345
344
  * surface with no actor context and no disclosure gate, so — like any
346
- * un-gated read — it omits the pii sidecar on every adapter (#1294). Route
345
+ * un-gated read — it omits the pii sidecar on every adapter. Route
347
346
  * pii through `load` (gated) instead.
348
347
  *
349
348
  * @template E - Event schemas; defaults to {@link Schemas} when the caller
@@ -432,7 +431,7 @@ export type SubscribeInput = {
432
431
  */
433
432
  readonly priority?: number;
434
433
  /**
435
- * Drain lane (ACT-1103). Default `"default"`.
434
+ * Drain lane. Default `"default"`.
436
435
  *
437
436
  * Written on the same rule as {@link priority}: the lane rides the max,
438
437
  * so a subscribe whose priority is **at or above** the stored priority
@@ -440,8 +439,7 @@ export type SubscribeInput = {
440
439
  * priority registered for a stream therefore owns its lane, durably —
441
440
  * the same outcome the correlate scan applies within one pass, made a
442
441
  * property of the row so a caller that has forgotten what a stream
443
- * carries cannot re-lane it by resolving to it at a lower priority
444
- * (#1599).
442
+ * carries cannot re-lane it by resolving to it at a lower priority.
445
443
  *
446
444
  * Re-laning stays restart-driven: a restart re-subscribes at the same
447
445
  * declared priority, and equal priority writes the lane. A stream whose
@@ -451,7 +449,7 @@ export type SubscribeInput = {
451
449
  readonly lane?: string;
452
450
  /**
453
451
  * Highest event id observed to resolve to this target — the stream's
454
- * **work mark** (#1485). Applied as `correlated_at = GREATEST(correlated_at, N)`
452
+ * **work mark**. Applied as `correlated_at = GREATEST(correlated_at, N)`
455
453
  * for every value including zero and negatives; omitted leaves the stored
456
454
  * value untouched.
457
455
  *
@@ -638,7 +636,7 @@ export interface Store extends Disposable, EventSource {
638
636
  * {@link ack} still lands. A store that skipped recording the holder
639
637
  * would hand out a lease whose every ack is dropped, parking the
640
638
  * watermark and redelivering every event on every drain.
641
- * @param lane - Optional lane filter (ACT-1103)
639
+ * @param lane - Optional lane filter
642
640
  * @returns Array of successfully leased streams with metadata
643
641
  *
644
642
  * @example
@@ -674,7 +672,7 @@ export interface Store extends Disposable, EventSource {
674
672
  * an adapter that merges the batch in one statement cannot do even
675
673
  * that (`UPDATE ... FROM` may touch a target row only once, so
676
674
  * Postgres picks an arbitrary source row). Callers de-duplicate
677
- * before calling; adapters may assume uniqueness (#1672).
675
+ * before calling; adapters may assume uniqueness.
678
676
  * @returns `subscribed` count of newly registered streams, `watermark` max `at` across all streams
679
677
  *
680
678
  * @example
@@ -691,7 +689,7 @@ export interface Store extends Disposable, EventSource {
691
689
  subscribe: (streams: SubscribeInput[],
692
690
  /**
693
691
  * Advance the correlate checkpoint to this event id — correlate's own
694
- * watermark, in the same id space as a subscription's `at` (#1484).
692
+ * watermark, in the same id space as a subscription's `at`.
695
693
  *
696
694
  * `correlate` is the only component that knows how far it has read, and
697
695
  * it already calls `subscribe` with the targets a scan discovered, so the
@@ -706,8 +704,7 @@ export interface Store extends Disposable, EventSource {
706
704
  */
707
705
  correlated_at?: number,
708
706
  /**
709
- * Identifies the calling correlator, and asks for the correlation lease
710
- * (#1532).
707
+ * Identifies the calling correlator, and asks for the correlation lease.
711
708
  *
712
709
  * Correlation is duplicated work without it: every worker keeps its own
713
710
  * in-memory scan position, so N workers wake on the same commit and each
@@ -732,8 +729,8 @@ export interface Store extends Disposable, EventSource {
732
729
  * - `millis` is how long the lease is held from now.
733
730
  *
734
731
  * Omitted entirely, no lease is taken and the caller reads and advances
735
- * the shared legacy checkpoint — which is what every pre-#1532 caller
736
- * does, and why this is additive.
732
+ * the shared legacy checkpoint — which is what callers that predate
733
+ * the lease do, and why this is additive.
737
734
  */
738
735
  correlator?: {
739
736
  key: string;
@@ -767,8 +764,7 @@ export interface Store extends Disposable, EventSource {
767
764
  * stream, and an adapter that applies the batch in one statement cannot
768
765
  * apply two entries to the same row (`UPDATE … FROM` may touch a target
769
766
  * row once, so Postgres keeps an arbitrary one). Callers de-duplicate
770
- * before calling, as the drain does; adapters may assume uniqueness
771
- * (#1672, #1785).
767
+ * before calling, as the drain does; adapters may assume uniqueness.
772
768
  * @returns The acknowledged leases (deferred entries are not returned)
773
769
  *
774
770
  * @example
@@ -799,7 +795,7 @@ export interface Store extends Disposable, EventSource {
799
795
  *
800
796
  * @param leases - Leases to block with error messages. **At most one entry
801
797
  * per stream**, for the same reason as {@link ack}; adapters may assume
802
- * uniqueness (#1785).
798
+ * uniqueness.
803
799
  * @returns Blocked leases
804
800
  *
805
801
  * @example
@@ -998,7 +994,7 @@ export interface Store extends Disposable, EventSource {
998
994
  * **Subscriptions are not touched.** This is purely event-log work, and
999
995
  * that is what lets a store keep its event log and its subscriptions on
1000
996
  * different systems: every method belongs cleanly to one half, so a hybrid
1001
- * routes rather than reimplements (#1527). Removing the subscription row
997
+ * routes rather than reimplements. Removing the subscription row
1002
998
  * here was the one step that spanned both, and it forced such a store into
1003
999
  * a distributed transaction it could not have.
1004
1000
  *
@@ -1030,7 +1026,7 @@ export interface Store extends Disposable, EventSource {
1030
1026
  * pairs its own delete with its own seed. Both only matter for inputs the
1031
1027
  * framework never produces — `close-cycle` dedups by stream before calling
1032
1028
  * — but `Store` is a public port, so the order is contract rather than
1033
- * accident (#1677): a stream listed as both windowed and full ends with its
1029
+ * accident: a stream listed as both windowed and full ends with its
1034
1030
  * FULL entry in the result, and a stream listed twice as full leaves
1035
1031
  * exactly one seed carrying the last target's snapshot, reporting only that
1036
1032
  * pass's own delete count. Deleting once for a deduped set and seeding once
@@ -1100,7 +1096,7 @@ export interface Store extends Disposable, EventSource {
1100
1096
  * one and each keyed correlator's) is an event id, so restore sets them
1101
1097
  * back to -1 in the same transaction; left at their old values they would
1102
1098
  * sit above every renumbered event and correlate would never resolve the
1103
- * restored events' reactions (#1772). Correlator leases are kept. The
1099
+ * restored events' reactions. Correlator leases are kept. The
1104
1100
  * `Act` that ran the restore restarts its own correlation; any other
1105
1101
  * process running against the same store must be restarted, as for any
1106
1102
  * offline restore.
@@ -1325,7 +1321,7 @@ export interface Store extends Disposable, EventSource {
1325
1321
  notify?: (handler: (notification: StoreNotification) => void) => NotifyDisposer | Promise<NotifyDisposer>;
1326
1322
  /**
1327
1323
  * Wipe the sensitive-data payload for every event on the stream — the
1328
- * physical-erasure side of the sensitive-data epic (#566). Sets the
1324
+ * physical-erasure side of the sensitive-data epic. Sets the
1329
1325
  * adapter's PII column (or equivalent) to `NULL` for the stream's
1330
1326
  * events; `events.data` and the rest of the row are never touched.
1331
1327
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ports.d.ts","sourceRoot":"","sources":["../../../src/types/ports.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,OAAO,EACP,KAAK,EACL,MAAM,EACN,OAAO,EACR,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IA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AAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,KAAM,SAAQ,UAAU;IACvC,GAAG,CAAC,MAAM,SAAS,MAAM,EACvB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC;IAC3C,GAAG,CAAC,MAAM,SAAS,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,GACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB"}
@@ -113,7 +113,7 @@ export type ReactionResolver<TEvents extends Schemas, TKey extends keyof TEvents
113
113
  * than the worker can claim per cycle); idle systems are unaffected.
114
114
  * See `libs/act-pg/PERFORMANCE.md` for the benchmark that motivated this
115
115
  * knob.
116
- * @property lane - Optional drain lane (ACT-1103). Defaults to `"default"`.
116
+ * @property lane - Optional drain lane. Defaults to `"default"`.
117
117
  */
118
118
  export type Resolved<TLane extends string = string> = {
119
119
  readonly target: string;
@@ -122,7 +122,7 @@ export type Resolved<TLane extends string = string> = {
122
122
  readonly lane?: TLane;
123
123
  };
124
124
  /**
125
- * Build-time configuration for a drain lane (ACT-1103).
125
+ * Build-time configuration for a drain lane.
126
126
  *
127
127
  * @property name - Lane name (`"default"` is reserved for the implicit lane)
128
128
  * @property leaseMillis - Lease window for `claim()` calls in this lane
@@ -271,7 +271,7 @@ export type Fetch<TEvents extends Schemas> = Array<{
271
271
  * Reads are per-stream but ran under one `Promise.all`, so a single
272
272
  * stream's failure rejected the whole cycle and every healthy stream
273
273
  * leased alongside it got nothing — a corrupt `pii` payload on one
274
- * aggregate stalled unrelated reactions (#1675). Isolating the failure
274
+ * aggregate stalled unrelated reactions. Isolating the failure
275
275
  * here keeps the blast radius on the stream that caused it: the cycle
276
276
  * records the error, submits no ack (so the watermark holds), and the
277
277
  * stream accrues `retry` until `blockOnError` quarantines it the usual
@@ -298,7 +298,7 @@ export type Fetch<TEvents extends Schemas> = Array<{
298
298
  * @property by - Unique identifier of the lease holder (UUID)
299
299
  * @property retry - Number of retry attempts (0 = first attempt)
300
300
  * @property lagging - Whether this stream is behind (lagging frontier)
301
- * @property lane - Drain lane the stream is bound to (ACT-1103)
301
+ * @property lane - Drain lane the stream is bound to
302
302
  *
303
303
  * @example
304
304
  * ```typescript
@@ -333,8 +333,8 @@ export type Lease = {
333
333
  * stream's `deferred_at`, setting `retry` to the entry's own value —
334
334
  * atomically with the other entries' acks. Advance and defer are
335
335
  * independent legs, so a partial-progress defer keeps the handled prefix
336
- * (it never re-runs on redelivery) while the remainder waits for `due`
337
- * (#1278). Deferred entries are not part of ack's return value. Never set
336
+ * (it never re-runs on redelivery) while the remainder waits for `due`.
337
+ * Deferred entries are not part of ack's return value. Never set
338
338
  * on leases returned by `claim` or carried by lifecycle events.
339
339
  */
340
340
  readonly due?: number;
@@ -399,14 +399,14 @@ export type SettleOptions = DrainOptions & {
399
399
  * abandoning it means the replacement worker cannot claim that stream
400
400
  * until the lease expires — up to `leaseMillis` of dead time per in-flight
401
401
  * stream on every rolling deploy, with the completing handler's round of
402
- * work discarded and redelivered (#1442).
402
+ * work discarded and redelivered.
403
403
  *
404
404
  * Defaults to the largest `leaseMillis` configured across the Act's lanes
405
405
  * (capped at 30s), because a lane's lease is already the operator's
406
406
  * statement of how long a handler may legitimately hold a stream. Lanes
407
407
  * that pinned no lease contribute the same 10s default `drain()` uses.
408
408
  *
409
- * `0` restores the pre-#1442 behavior: stop scheduling and return without
409
+ * `0` means: stop scheduling and return without
410
410
  * waiting. Whatever the budget, it is a ceiling and not a delay — teardown
411
411
  * proceeds the moment the last in-flight cycle finishes.
412
412
  */
@@ -55,7 +55,7 @@ export type SchemaRegister<TSchemaReg> = {
55
55
  * @property query_gate - Prebuilt per-event reader for the actor-less read
56
56
  * surfaces (`query` / `query_array`). Types the payload from its declared
57
57
  * schema (a `z.date()` comes back a `Date` from the string JSON forced it
58
- * into, #1556) and applies the disclosure gate, in one call. Every event resolves to a gate: a
58
+ * into) and applies the disclosure gate, in one call. Every event resolves to a gate: a
59
59
  * non-sensitive event returns the shared identity gate (the event is handed
60
60
  * back untouched, zero allocation); a sensitive event returns a redactor
61
61
  * built once at build time that closes over the field list and applies
@@ -10,7 +10,7 @@ import { type ZodObject, type ZodRawShape, z } from "zod";
10
10
  */
11
11
  export declare const ZodEmpty: z.ZodRecord<z.ZodString, z.ZodNever>;
12
12
  /**
13
- * Sensitive-data foundation re-exports (#855 / epic #566).
13
+ * Sensitive-data foundation re-exports.
14
14
  *
15
15
  * - `REDACTED` / `SHREDDED` — sentinels placed in `event.data[field]`
16
16
  * when the caller isn't authorized to see a sensitive field
@@ -37,7 +37,7 @@ export { pii_fields, REDACTED, SHREDDED } from "../internal/sensitive.js";
37
37
  *
38
38
  * The marker is what the orchestrator inspects to split event payloads into
39
39
  * `data` + `pii` on commit, gate reads via `.discloses`, and strip handler
40
- * payloads. Part of the sensitive-data foundation (#855 / epic #566).
40
+ * payloads. Part of the sensitive-data foundation.
41
41
  *
42
42
  * @example
43
43
  * ```ts
@@ -77,7 +77,7 @@ export declare function is_literal_source(source: string): boolean;
77
77
  * **The framework no longer uses this.** Dates are resolved from the declared
78
78
  * `z.date()` paths at build time and converted on read, so a field declared
79
79
  * `z.string()` keeps its string even when the value looks like a timestamp
80
- * ([#1556](https://github.com/Rotorsoft/act-root/issues/1556)). Adapters
80
+ *. Adapters
81
81
  * return what they stored; typing is the orchestrator's job.
82
82
  *
83
83
  * Kept exported for host applications that parse Act JSON themselves and want
@@ -280,4 +280,4 @@ export {
280
280
  Environments,
281
281
  LogLevels
282
282
  };
283
- //# sourceMappingURL=chunk-BI3UNNVA.js.map
283
+ //# sourceMappingURL=chunk-JRTZGWVS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/errors.ts","../src/types/schemas.ts","../src/internal/sensitive.ts","../src/types/index.ts"],"sourcesContent":["import type {\n Actor,\n Message,\n Schema,\n Schemas,\n Snapshot,\n Target,\n} from \"./action.js\";\n\n/**\n * @packageDocumentation\n * @module act/types\n * @category Types\n * Application error type constants and error classes for the Act Framework.\n *\n * - `ERR_VALIDATION`: Schema validation error\n * - `ERR_INVARIANT`: Invariant validation error\n * - `ERR_CONCURRENCY`: Optimistic concurrency validation error on commits\n */\nexport const Errors = {\n ValidationError: \"ERR_VALIDATION\",\n InvariantError: \"ERR_INVARIANT\",\n ConcurrencyError: \"ERR_CONCURRENCY\",\n StreamClosedError: \"ERR_STREAM_CLOSED\",\n NonRetryableError: \"ERR_NON_RETRYABLE\",\n StoreError: \"ERR_STORE\",\n} as const;\n\n/**\n * Thrown when an action or event payload fails Zod schema validation.\n *\n * This error indicates that data doesn't match the expected schema defined\n * for an action or event. The `details` property contains the Zod validation\n * error with specific information about what failed.\n *\n * @example Catching validation errors\n * ```typescript\n * import { ValidationError } from \"@rotorsoft/act\";\n *\n * try {\n * await app.do(\"createUser\", target, {\n * email: \"invalid-email\", // Missing @ symbol\n * age: -5 // Negative age\n * });\n * } catch (error) {\n * if (error instanceof ValidationError) {\n * console.error(\"Validation failed for:\", error.target);\n * console.error(\"Invalid payload:\", error.payload);\n * console.error(\"Validation details:\", error.details);\n * // details contains Zod error with field-level info\n * }\n * }\n * ```\n *\n * @example Logging validation details\n * ```typescript\n * try {\n * await app.do(\"updateProfile\", target, payload);\n * } catch (error) {\n * if (error instanceof ValidationError) {\n * error.details.errors.forEach((err) => {\n * console.error(`Field ${err.path.join(\".\")}: ${err.message}`);\n * });\n * }\n * }\n * ```\n *\n * @see {@link https://zod.dev | Zod documentation} for validation details\n */\nexport class ValidationError extends Error {\n /** The type of target being validated (e.g., \"action\", \"event\") */\n public readonly target: string;\n /** The invalid payload that failed validation */\n public readonly payload: any;\n /** Zod validation error details */\n public readonly details: any;\n\n constructor(target: string, payload: any, details: any) {\n super(`Invalid ${target} payload`);\n this.name = Errors.ValidationError;\n this.target = target;\n this.payload = payload;\n this.details = details;\n }\n}\n\n/**\n * Thrown when a business rule (invariant) is violated during action execution.\n *\n * Invariants are conditions that must hold true for an action to succeed.\n * They're checked after loading the current state but before emitting events.\n * This error provides complete context about what action was attempted and\n * why it was rejected.\n *\n * @template TState - State schema type\n * @template TEvents - Event schemas type\n * @template TActions - Action schemas type\n * @template TKey - Action name\n * @template TActor - Actor type extending base Actor\n *\n * @example Catching invariant violations\n * ```typescript\n * import { InvariantError } from \"@rotorsoft/act\";\n *\n * try {\n * await app.do(\"withdraw\",\n * { stream: \"account-123\", actor: { id: \"user1\", name: \"Alice\" } },\n * { amount: 1000 }\n * );\n * } catch (error) {\n * if (error instanceof InvariantError) {\n * console.error(\"Action:\", error.action);\n * console.error(\"Reason:\", error.description);\n * console.error(\"Current state:\", error.snapshot.state);\n * console.error(\"Attempted payload:\", error.payload);\n * }\n * }\n * ```\n *\n * @example User-friendly error messages\n * ```typescript\n * try {\n * await app.do(\"closeTicket\", target, payload);\n * } catch (error) {\n * if (error instanceof InvariantError) {\n * // Present friendly message to user\n * if (error.description === \"Ticket must be open\") {\n * return { error: \"This ticket is already closed\" };\n * } else if (error.description === \"Not authorized\") {\n * return { error: \"You don't have permission to close this ticket\" };\n * }\n * }\n * }\n * ```\n *\n * @example Logging with context\n * ```typescript\n * try {\n * await app.do(\"transfer\", target, { to: \"account2\", amount: 500 });\n * } catch (error) {\n * if (error instanceof InvariantError) {\n * logger.error({\n * action: error.action,\n * stream: error.target.stream,\n * actor: error.target.actor,\n * reason: error.description,\n * balance: error.snapshot.state.balance,\n * attempted: error.payload.amount\n * }, \"Invariant violation\");\n * }\n * }\n * ```\n *\n * @see {@link Invariant} for defining business rules\n */\nexport class InvariantError<\n TState extends Schema,\n TEvents extends Schemas,\n TActions extends Schemas,\n TKey extends keyof TActions,\n TActor extends Actor = Actor,\n> extends Error {\n /** The action that was attempted */\n readonly action: TKey;\n /** The action payload that was provided */\n readonly payload: Readonly<TActions[TKey]>;\n /** The target stream and actor context */\n readonly target: Target<TActor>;\n /** The current state snapshot when invariant was checked */\n readonly snapshot: Snapshot<TState, TEvents>;\n /** Human-readable description of why the invariant failed */\n readonly description: string;\n\n constructor(\n action: TKey,\n payload: Readonly<TActions[TKey]>,\n target: Target<TActor>,\n snapshot: Snapshot<TState, TEvents>,\n description: string\n ) {\n super(`${action as string} failed invariant: ${description}`);\n this.name = Errors.InvariantError;\n this.action = action;\n this.payload = payload;\n this.target = target;\n this.snapshot = snapshot;\n this.description = description;\n }\n}\n\n/**\n * Thrown when optimistic concurrency control detects a conflict.\n *\n * This error occurs when trying to commit events to a stream that has been\n * modified by another process since it was last loaded. The version number\n * doesn't match expectations, indicating a concurrent modification.\n *\n * This is a normal occurrence in distributed systems and should be handled\n * by reloading the current state and retrying the action.\n *\n * @example Handling concurrency conflicts with retry\n * ```typescript\n * import { ConcurrencyError } from \"@rotorsoft/act\";\n *\n * async function transferWithRetry(from, to, amount, maxRetries = 3) {\n * for (let attempt = 0; attempt < maxRetries; attempt++) {\n * try {\n * await app.do(\"transfer\",\n * { stream: from, actor: currentUser },\n * { to, amount }\n * );\n * return { success: true };\n * } catch (error) {\n * if (error instanceof ConcurrencyError) {\n * if (attempt < maxRetries - 1) {\n * console.log(`Concurrent modification detected, retrying... (${attempt + 1}/${maxRetries})`);\n * await sleep(100 * Math.pow(2, attempt)); // Exponential backoff\n * continue;\n * }\n * }\n * throw error;\n * }\n * }\n * return { success: false, reason: \"Too many concurrent modifications\" };\n * }\n * ```\n *\n * @example Logging concurrency conflicts\n * ```typescript\n * try {\n * await app.do(\"updateInventory\", target, payload);\n * } catch (error) {\n * if (error instanceof ConcurrencyError) {\n * logger.warn({\n * stream: error.stream,\n * expectedVersion: error.expectedVersion,\n * actualVersion: error.lastVersion,\n * events: error.events.map(e => e.name)\n * }, \"Concurrent modification detected\");\n * }\n * }\n * ```\n *\n * @example User feedback for conflicts\n * ```typescript\n * try {\n * await app.do(\"editDocument\", target, { content: newContent });\n * } catch (error) {\n * if (error instanceof ConcurrencyError) {\n * return {\n * error: \"This document was modified by another user. Please refresh and try again.\",\n * code: \"CONCURRENT_MODIFICATION\"\n * };\n * }\n * }\n * ```\n *\n * @see {@link Store.commit} for version checking details\n */\nexport class ConcurrencyError extends Error {\n /** The stream that had the concurrent modification */\n public readonly stream: string;\n /** The actual current version in the store */\n public readonly lastVersion: number;\n /** The events that were being committed */\n public readonly events: Message<Schemas, keyof Schemas>[];\n /** The version number that was expected */\n public readonly expectedVersion: number;\n\n constructor(\n stream: string,\n lastVersion: number,\n events: Message<Schemas, keyof Schemas>[],\n expectedVersion: number\n ) {\n // Message lists stream + event names only. Payloads remain accessible\n // via `error.events` for callers who need them — keeping them out of\n // the message avoids MB-scale strings on contended writes and keeps\n // potentially-sensitive data out of log streams.\n super(\n `Concurrency error committing \"${events\n .map((e) => `${stream}.${e.name}`)\n .join(\n \", \"\n )}\". Expected version ${expectedVersion} but found version ${lastVersion}.`\n );\n this.name = Errors.ConcurrencyError;\n this.stream = stream;\n this.lastVersion = lastVersion;\n this.events = events;\n this.expectedVersion = expectedVersion;\n }\n}\n\n/**\n * Thrown when attempting to write to a stream that has been closed\n * with a tombstone event.\n *\n * A tombstoned stream is permanently closed — no further actions can\n * be executed against it. The only way to reopen a tombstoned stream\n * is through `Act.close()` with a `restart` callback.\n *\n * @example\n * ```typescript\n * import { StreamClosedError } from \"@rotorsoft/act\";\n *\n * try {\n * await app.do(\"updateTicket\", target, payload);\n * } catch (error) {\n * if (error instanceof StreamClosedError) {\n * console.error(`Stream ${error.stream} is closed`);\n * }\n * }\n * ```\n *\n * @see {@link Act.close} for closing streams\n */\nexport class StreamClosedError extends Error {\n /** The stream that is closed */\n public readonly stream: string;\n\n constructor(stream: string) {\n super(`Stream \"${stream}\" is closed (tombstoned)`);\n this.name = Errors.StreamClosedError;\n this.stream = stream;\n }\n}\n\n/**\n * Thrown by a {@link Store} adapter when an infrastructure operation fails\n * for a reason that is *not* a domain condition — a dropped connection, a\n * transaction rollback, a query timeout. It is the typed boundary between\n * \"the store is unavailable/degraded\" and the domain errors above\n * ({@link ConcurrencyError}, {@link StreamClosedError}), which describe\n * legitimate outcomes the caller should branch on.\n *\n * Adapters wrap their driver errors in `StoreError` (preserving the\n * original via `cause`) so the orchestrator can distinguish a degraded\n * backend from \"no work\" and react accordingly — see the drain circuit\n * breaker, which trips on repeated `StoreError`s and surfaces an\n * `error` lifecycle event instead of silently spinning on a down\n * database.\n *\n * @example\n * ```typescript\n * app.on(\"error\", ({ error, circuit }) => {\n * if (error instanceof StoreError)\n * alert(`store ${error.operation} failing; circuit=${circuit}`);\n * });\n * ```\n */\nexport class StoreError extends Error {\n /** The store operation that failed (e.g. `\"claim\"`, `\"ack\"`, `\"commit\"`). */\n public readonly operation: string;\n\n constructor(operation: string, options?: { cause?: unknown }) {\n super(`Store operation \"${operation}\" failed`, options);\n this.name = Errors.StoreError;\n this.operation = operation;\n }\n}\n\n/**\n * Thrown by a reaction handler to signal that the failure is permanent\n * and the drain pipeline should block the stream immediately, without\n * consuming the rest of the `maxRetries` budget.\n *\n * The drain finalizer detects `instanceof NonRetryableError` and forces\n * `block = options.blockOnError` regardless of `lease.retry`. When\n * `blockOnError` is `false`, behavior is unchanged (drain keeps retrying\n * forever) — the class never overrides the operator's explicit \"never\n * block\" choice.\n *\n * Use this for failures the handler *knows* won't get better on retry:\n * a 4xx from a webhook, a `ZodError` on malformed input, a \"user\n * deleted\" 404 from a downstream API. Use regular `Error` (or a\n * subclass) for transient failures so the existing retry-with-backoff\n * loop applies.\n *\n * @example Wrapping a permanent downstream error\n * ```typescript\n * import { NonRetryableError } from \"@rotorsoft/act\";\n *\n * .on(\"OrderConfirmed\")\n * .do(async (event) => {\n * const res = await fetch(url, ...);\n * if (res.status >= 400 && res.status < 500) {\n * throw new NonRetryableError(\n * `webhook ${url} responded ${res.status}`,\n * { cause: await res.text() }\n * );\n * }\n * if (!res.ok) throw new Error(`webhook ${url} responded ${res.status}`);\n * })\n * ```\n *\n * @example Marking validation failures as non-retryable\n * ```typescript\n * .on(\"PaymentReceived\")\n * .do(async (event) => {\n * const parsed = Schema.safeParse(event.data);\n * if (!parsed.success) {\n * throw new NonRetryableError(\"payment payload failed validation\", {\n * cause: parsed.error,\n * });\n * }\n * // ... handle parsed payload\n * })\n * ```\n */\nexport class NonRetryableError extends Error {\n /** The original failure, if any. Mirrors the standard `Error.cause` shape. */\n public override readonly cause?: unknown;\n\n constructor(message: string, options?: { cause?: unknown }) {\n super(message);\n this.name = Errors.NonRetryableError;\n this.cause = options?.cause;\n }\n}\n","import { type ZodObject, type ZodRawShape, z } from \"zod\";\n// Deep-path import (vs `../internal/index.js`) is deliberate — `_registry` is\n// a side-effect-free leaf, and going through the internal barrel would pull\n// tracing.ts → config.ts in at type-schema load time and crash on TDZ when a\n// test imports a public schema before config is initialized.\nimport { _mark_sensitive, _registry } from \"../internal/sensitive.js\";\n\n/**\n * @packageDocumentation\n * @module act/types\n * @category Types\n * Zod schemas and helpers for the Act Framework.\n */\n\n/**\n * An empty Zod schema (no properties).\n */\nexport const ZodEmpty = z.record(z.string(), z.never());\n\n/**\n * Sensitive-data foundation re-exports.\n *\n * - `REDACTED` / `SHREDDED` — sentinels placed in `event.data[field]`\n * when the caller isn't authorized to see a sensitive field\n * (`.discloses(predicate)` returned `false` or none was declared —\n * recoverable) or the underlying PII was wiped (`Store.forget_pii` —\n * irrecoverable).\n * top-level field names marked via {@link sensitive}. A pure,\n * read-only helper that inspects the out-of-band sensitive registry (a\n * process-global `WeakMap`) `sensitive()` populates, otherwise\n * unreachable from outside the package. Surfaced for adapters and\n * tooling that must reflect input sensitivity on their own wire\n * surface — e.g. the `@rotorsoft/act-http/openapi` emitter marks these\n * fields `writeOnly` + `format: password` so generated clients and\n * Swagger UI don't echo PII freely. Returns `[]` for non-object\n * schemas or objects with no sensitive fields; top-level shape only.\n */\nexport { pii_fields, REDACTED, SHREDDED } from \"../internal/sensitive.js\";\n\n/**\n * Mark a Zod schema as sensitive. Returns the same schema instance — the\n * marker is registered out-of-band so the static type is preserved and the\n * call site reads as a pure annotation.\n *\n * Idempotent: re-wrapping an already-sensitive schema is a no-op.\n *\n * The marker is what the orchestrator inspects to split event payloads into\n * `data` + `pii` on commit, gate reads via `.discloses`, and strip handler\n * payloads. Part of the sensitive-data foundation.\n *\n * @example\n * ```ts\n * import { z } from \"zod\";\n * import { state, sensitive } from \"@rotorsoft/act\";\n *\n * const UserRegistered = z.object({\n * email: sensitive(z.string()),\n * name: sensitive(z.string()),\n * plan: z.enum([\"free\", \"pro\"]), // not sensitive — stays in events.data\n * });\n * ```\n *\n * @param schema - The Zod schema to mark sensitive.\n * @returns The same schema instance, unmodified at the type level.\n */\nexport function sensitive<T extends z.ZodType>(schema: T): T {\n _registry.add(schema, { sensitive: true });\n // Also stamp the def, so the marker survives the clone Zod produces for\n // any refinement chained AFTER this call — `sensitive(z.string()).min(1)`\n // used to lose it silently and write plaintext into `events.data`.\n _mark_sensitive(schema);\n return schema;\n}\n\n/**\n * Zod schema for an actor (user, system, etc.).\n */\nexport const ActorSchema = z\n .object({\n id: z.string(),\n name: z.string(),\n })\n .loose()\n .readonly();\n\n/**\n * Zod schema for a target (stream and actor info).\n */\nexport const TargetSchema = z\n .object({\n stream: z.string(),\n actor: ActorSchema,\n expectedVersion: z.number().optional(),\n })\n .loose()\n .readonly();\n\n/**\n * Zod schema for causation event metadata.\n */\nexport const CausationEventSchema = z.object({\n id: z.number(),\n name: z.string(),\n stream: z.string(),\n});\n\n/**\n * Zod schema for event metadata (correlation and causation).\n */\nexport const EventMetaSchema = z\n .object({\n correlation: z.string(),\n causation: z.object({\n action: TargetSchema.and(z.object({ name: z.string() })).optional(),\n event: CausationEventSchema.optional(),\n }),\n })\n .readonly();\n\n/**\n * Zod schema for committed event metadata (id, stream, version, created, meta).\n */\nexport const CommittedMetaSchema = z\n .object({\n id: z.number(),\n stream: z.string(),\n version: z.number(),\n created: z.date(),\n meta: EventMetaSchema,\n })\n .readonly();\n\n/**\n * Type representing the full state schema for a domain.\n * @property events - Map of event names to Zod schemas.\n * @property actions - Map of action names to Zod schemas.\n * @property state - Zod schema for the state object.\n */\nexport type StateSchema = Readonly<{\n events: Record<string, ZodObject<ZodRawShape> | typeof ZodEmpty>;\n actions: Record<string, ZodObject<ZodRawShape> | typeof ZodEmpty>;\n state: ZodObject<ZodRawShape>;\n}>;\n\n/**\n * Query options for event store queries.\n */\nexport const QuerySchema = z\n .object({\n stream: z.string().optional(),\n names: z.string().array().optional(),\n before: z.number().optional(),\n after: z.number().optional(),\n limit: z.number().optional(),\n created_before: z.date().optional(),\n created_after: z.date().optional(),\n backward: z.boolean().optional(),\n correlation: z.string().optional(),\n with_snaps: z.boolean().optional(),\n with_pii: z.boolean().optional(),\n stream_exact: z.boolean().optional(),\n })\n .readonly();\n","/**\n * @module sensitive\n * @category Internal\n *\n * Internal mechanics for the sensitive-data foundation.\n * The public surface (`sensitive(zodType)`) lives at `libs/act/src/sensitive.ts`\n * and re-exports `REDACTED` / `SHREDDED` from here; this module holds the\n * registry plus the helpers the orchestrator calls during commit, load, and\n * handler dispatch.\n *\n * - `_registry` — process-global `z.registry<{ sensitive: true }>()`. Public\n * `sensitive()` adds to it; the helpers in this module read it.\n * - `pii_fields(schema)` — walk a Zod schema's top-level shape, return the\n * keys marked via `sensitive(...)`.\n * - `pii_gate(event, fields, predicate, actor)` — produce the external\n * view: plaintext when authorized, `[REDACTED]` when not, `[SHREDDED]`\n * when the underlying pii column is null.\n * - `pii_strip(event, fields)` — remove sensitive keys entirely\n * before invoking projection / reaction handlers.\n *\n * @internal\n */\n\nimport { z } from \"zod\";\nimport type { Actor, Committed, Schemas } from \"../types/index.js\";\n\n/**\n * Sentinel placed in `event.data[field]` when the caller isn't authorized to\n * see the sensitive field — either `.discloses(predicate)` returned `false`,\n * or no predicate was declared (framework default-deny). Recoverable: a\n * properly-authorized read returns the plaintext.\n *\n * Re-exported from `libs/act/src/sensitive.ts` as part of the public surface.\n */\nexport const REDACTED = \"[REDACTED]\" as const;\n\n/**\n * Sentinel placed in `event.data[field]` when the underlying PII payload has\n * been wiped via `Store.forget_pii(stream)` — the row's pii column is `NULL`\n * and the original plaintext is gone forever. Irrecoverable.\n *\n * Re-exported from `libs/act/src/sensitive.ts` as part of the public surface.\n */\nexport const SHREDDED = \"[SHREDDED]\" as const;\n\n/**\n * Process-global registry holding every Zod schema marked sensitive. Backed\n * by a `WeakMap`, so wrapper-created instances (`.optional()`, `.nullable()`,\n * `.default()`) that chain off a marked schema produce *new* schema instances\n * the registry doesn't track; the field walker handles those via unwrap.\n *\n * Exported so the public `sensitive(zodType)` wrapper can call `_registry.add`.\n * Underscore prefix marks \"framework-private, don't touch from user code.\"\n *\n * @internal\n */\nexport const _registry = z.registry<{ sensitive: true }>();\n\n/**\n * Marker key stamped onto a schema's own `def`. Zod clones a schema on every\n * refinement (`.min()`, `.email()`, `.trim()`, `.describe()`, `.refine()`,\n * `.transform()`, …) via `{...def}`, which copies own symbol keys — so a\n * marker on the def survives the whole chain, while the `_registry` WeakMap\n * (keyed on the *instance*) does not.\n *\n * The registry is still populated and still consulted: it covers schemas\n * marked before this key existed, and it is the mechanism the public\n * `sensitive()` doc-comment describes.\n *\n * @internal\n */\nconst _SENSITIVE = Symbol.for(\"act.sensitive\");\n\n/**\n * Stamp the def-level marker. Called by the public `sensitive()` alongside\n * `_registry.add`.\n *\n * @internal\n */\nexport function _mark_sensitive(schema: z.ZodType): void {\n const def = (\n schema as unknown as {\n _zod?: { def?: Record<PropertyKey, unknown> };\n }\n )._zod?.def;\n if (def) def[_SENSITIVE] = true;\n}\n\n/**\n * True when the given schema was marked via `sensitive(...)`.\n *\n * Walks through Zod wrapper layers (`.optional()`, `.nullable()`,\n * `.default()`, `.readonly()`) by following `_def.innerType` until it reaches\n * a non-wrapper schema, then checks the registry. Wrappers create new schema\n * instances; the marker lives on the *inner* schema the user wrapped, so we\n * test that one.\n *\n * @internal\n */\nfunction is_pii(schema: z.ZodType): boolean {\n let cur: z.ZodType = schema;\n while (true) {\n if (_registry.has(cur)) return true;\n // Def-level marker: survives the clone a refinement produces, which the\n // instance-keyed registry above cannot.\n const def = (\n cur as unknown as {\n _zod?: { def?: Record<PropertyKey, unknown> };\n }\n )._zod?.def;\n if (def?.[_SENSITIVE] === true) return true;\n const inner = (cur as { _def?: { innerType?: z.ZodType } })._def?.innerType;\n if (!inner || inner === cur) return false;\n cur = inner;\n }\n}\n\n/**\n * Derive an event's sensitive fields, as the declared schema of each.\n *\n * Walks the top-level shape of a `z.object({...})` and keeps the keys whose\n * schema (after unwrapping optional/nullable/default wrappers) was marked via\n * `sensitive(...)`. Returns an empty object for non-object schemas or events\n * with no sensitive fields — the common-case zero-cost path.\n *\n * Only the top-level shape is walked. Sensitive fields nested inside a\n * `z.object` declared inside the event payload would require recursive\n * descent; that's deferred until a real callsite needs it.\n *\n * A union event has no top-level shape, so the options are walked and merged:\n * a key sensitive in any variant must be split, because the stored payload\n * could be that variant.\n * The first variant to declare a key wins, which only matters to a caller that\n * wants the schema rather than the name.\n *\n * Returning the schemas rather than just the names is what lets a caller do\n * something per field — the event builder asks each one whether it holds a\n * date, so the `pii` sidecar's dates can be revived like any other.\n *\n * @internal\n */\nexport function pii_schemas(schema: z.ZodType): Record<string, z.ZodType> {\n const shape = (schema as { shape?: Record<string, z.ZodType> }).shape;\n if (shape && typeof shape === \"object\") {\n const fields: Record<string, z.ZodType> = {};\n for (const key of Object.keys(shape))\n if (is_pii(shape[key])) fields[key] = shape[key];\n return fields;\n }\n const options = (schema as { options?: unknown }).options;\n if (Array.isArray(options)) {\n const fields: Record<string, z.ZodType> = {};\n for (const option of options)\n for (const [key, field] of Object.entries(\n pii_schemas(option as z.ZodType)\n ))\n fields[key] ??= field;\n return fields;\n }\n return {};\n}\n\n/**\n * The names of an event's sensitive fields — {@link pii_schemas} keyed.\n *\n * @internal — consumed by the registry's `sensitive_fields(event_name)` lookup,\n * and public through `types/schemas.ts`, where act-http's OpenAPI emitter uses\n * it to mark request-body properties `writeOnly`.\n */\nexport function pii_fields(schema: z.ZodType): readonly string[] {\n return Object.keys(pii_schemas(schema));\n}\n\n/**\n * Split an emitted event's `data` into `data` (non-sensitive) + `pii`\n * (sensitive) using the field list precomputed at build time. Used by the\n * State's `_pii_split` decorator just before `Store.commit`.\n *\n * Single forward pass over `Object.keys(validated)` — same shape as the\n * spread-and-delete-free implementation in slice 3, just hoisted out of the\n * orchestrator hot path so it's only invoked when the State actually has a\n * sensitive event.\n *\n * @internal\n */\nexport function pii_split<TName, TData extends Record<string, unknown>>(\n emitted: { name: TName; data: TData },\n fields: readonly string[]\n): { name: TName; data: TData; pii: Record<string, unknown> } {\n const data = { ...emitted.data };\n const pii: Record<string, unknown> = {};\n for (const f of fields) {\n if (f in data) {\n pii[f] = data[f];\n delete data[f];\n }\n }\n return { name: emitted.name, data, pii };\n}\n\n/**\n * Build the **external view** of a committed event — the form returned by\n * `load()`, `query()`, `query_array()`, and the snapshot in `do()`'s reply.\n *\n * Only ever reached for events that declare sensitive fields — the sole caller\n * is {@link make_gate}, which the builder invokes exclusively for sensitive\n * events; non-sensitive events short-circuit to {@link IDENTITY_GATE} before\n * they get here. `fields` is therefore guaranteed non-empty (same contract as\n * {@link pii_strip}).\n *\n * - Event whose `pii` payload is null/undefined → substitute {@link SHREDDED}\n * for each declared field. Irrecoverable, so no predicate check.\n * - Event with a `pii` payload, predicate returns `true` → merge `pii` into\n * `data` (plaintext).\n * - Event with a `pii` payload, predicate returns `false` OR no predicate\n * declared (framework default-deny) → substitute {@link REDACTED} for each\n * declared field.\n *\n * @internal\n */\nexport function pii_gate<TEvents extends Schemas, TKey extends keyof TEvents>(\n event: Committed<TEvents, TKey>,\n fields: readonly string[],\n predicate: ((event: any, actor: Actor) => boolean) | null,\n actor: Actor | undefined\n): Committed<TEvents, TKey> {\n const data = event.data as Record<string, unknown>;\n // The external view NEVER carries the isolated `pii` sidecar — dropping it\n // is the whole point of the gate. Keeping it (an earlier `...event` spread)\n // leaked plaintext PII on every gated read surface (`load`, `query`,\n // `query_array`) even while `data` was correctly redacted. Strip it\n // once here; the plaintext lives in `data` only on the authorized path.\n const { pii, ...rest } = event as Committed<TEvents, TKey> & {\n pii?: Record<string, unknown> | null;\n };\n if (pii == null) {\n const shredded: Record<string, unknown> = { ...data };\n for (const f of fields) shredded[f] = SHREDDED;\n return { ...rest, data: shredded as Committed<TEvents, TKey>[\"data\"] };\n }\n // Plaintext path requires both an actor AND a predicate that allows. Missing\n // either → default-deny → REDACTED.\n const allowed = !!actor && !!predicate && predicate(event, actor);\n if (allowed) {\n return {\n ...rest,\n data: { ...data, ...pii } as Committed<TEvents, TKey>[\"data\"],\n };\n }\n const redacted: Record<string, unknown> = { ...data };\n for (const f of fields) redacted[f] = REDACTED;\n return { ...rest, data: redacted as Committed<TEvents, TKey>[\"data\"] };\n}\n\n/**\n * A prebuilt per-event read gate: given a committed event and the reading\n * actor, return the caller-visible form. This is the single gating primitive\n * the builder prebuilds for **every** read surface — both the actor-less\n * `query` / `query_array` (which pass no actor → default-deny) and the\n * actor-aware `load` / `do`-return view (which pass the reader). Non-sensitive\n * events use the shared {@link IDENTITY_GATE}; sensitive events use a redactor\n * built by {@link make_gate} that closes over the field list and the state's\n * disclosure predicate, so the read path never recomputes the sensitive-field\n * lookup nor allocates per event.\n *\n * The `actor` is optional so the actor-less surfaces can call `gate(event)`.\n *\n * @internal\n */\nexport type EventGate = <TEvents extends Schemas, TKey extends keyof TEvents>(\n event: Committed<TEvents, TKey>,\n actor?: Actor\n) => Committed<TEvents, TKey>;\n\n/**\n * Shared zero-cost gate for every event with no `sensitive(...)` fields — a\n * single frozen reference the builder hands back for non-sensitive events, so\n * the common path is one `Map` miss and an identity call, no allocation. This\n * is the \"by default, return the event\" half of the prebuilt per-event gate.\n *\n * @internal\n */\nexport const IDENTITY_GATE: EventGate = (event) => event;\n\n/**\n * Prebuild a read gate for a sensitive event, capturing its field list and the\n * disclosure predicate once at build time. The returned closure defers to\n * {@link pii_gate} with the reading actor supplied per call:\n *\n * - `predicate = null` (the actor-less `query` surfaces, or a state that never\n * declared `.discloses`) → default-deny: declared fields come back\n * {@link REDACTED} (or {@link SHREDDED} once the pii column is forgotten).\n * - `predicate` set + an authorized actor → plaintext merged into `data`.\n *\n * Either way the isolated `pii` sidecar is dropped. The builder stores one gate\n * per sensitive event (per state for the load path; predicate-less for the\n * query path); non-sensitive events fall back to {@link IDENTITY_GATE}.\n *\n * @internal\n */\nexport function make_gate(\n fields: readonly string[],\n predicate: ((event: any, actor: Actor) => boolean) | null\n): EventGate {\n return (event, actor) => pii_gate(event, fields, predicate, actor);\n}\n\n/**\n * Build the **handler view** — sensitive keys removed entirely from `data`\n * and the `pii` field dropped from the event. Used before invoking projection\n * handlers and reaction handlers, which never see PII by framework rule.\n *\n * Different from {@link pii_gate} (which substitutes {@link REDACTED} or\n * {@link SHREDDED}) — projection tables and reaction sinks shouldn't even\n * structurally observe the keys, so a handler that mistakenly writes\n * `event.data.email` into a column would get `undefined`, not a sentinel\n * string that looks like real data. The strictness is deliberate.\n *\n * Reactions that genuinely need PII (e.g. a welcome-email reaction reading\n * `email`) opt back in by explicitly calling `app.load(stream, { actor:\n * system_actor })` inside the handler — pulling PII through the gate at the\n * call site makes the security-relevant path visible in code review.\n *\n * @internal\n */\nexport function pii_strip<\n TEvents extends Schemas,\n TKey extends keyof TEvents & string,\n>(\n event: Committed<TEvents, TKey>,\n fields: readonly string[]\n): Committed<TEvents, TKey> {\n // Contract: `fields` is non-empty. `build_handle` / `build_handle_batch`\n // filter on `fields.length > 0` before invocation.\n const data = event.data as Record<string, unknown>;\n const stripped: Record<string, unknown> = {};\n for (const k of Object.keys(data)) {\n if (!fields.includes(k)) stripped[k] = data[k];\n }\n const { pii: _drop_pii, ...rest } = event as Committed<TEvents, TKey> & {\n pii?: unknown;\n };\n return {\n ...rest,\n data: stripped as Committed<TEvents, TKey>[\"data\"],\n } as Committed<TEvents, TKey>;\n}\n","/**\n * @packageDocumentation\n * @module act/types\n * Barrel file for Act Framework core types.\n *\n * Re-exports all major type definitions for actions, errors, ports, reactions, registries, and schemas.\n * Also defines common environment and log level types/constants for configuration and logging.\n *\n * @remarks\n * Import from this module to access all core framework types in one place.\n */\nexport type * from \"./action.js\";\nexport type * from \"./audit.js\";\nexport * from \"./errors.js\";\nexport type * from \"./ports.js\";\nexport type * from \"./reaction.js\";\nexport type * from \"./registry.js\";\nexport * from \"./schemas.js\";\n\n/**\n * Supported runtime environments for the framework.\n * - `development`: Local development\n * - `test`: Automated testing\n * - `staging`: Pre-production\n * - `production`: Live/production\n */\nexport const Environments = [\n \"development\",\n \"test\",\n \"staging\",\n \"production\",\n] as const;\n\n/**\n * Type representing a valid environment string.\n */\nexport type Environment = (typeof Environments)[number];\n\n/**\n * Supported log levels for framework logging.\n * - `fatal`, `error`, `warn`, `info`, `debug`, `trace`\n */\nexport const LogLevels = [\n \"fatal\",\n \"error\",\n \"warn\",\n \"info\",\n \"debug\",\n \"trace\",\n] as const;\n\n/**\n * Type representing a valid log level string.\n */\nexport type LogLevel = (typeof LogLevels)[number];\n"],"mappings":";AAmBO,IAAM,SAAS;AAAA,EACpB,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,YAAY;AACd;AA2CO,IAAM,kBAAN,cAA8B,MAAM;AAAA;AAAA,EAEzB;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,QAAgB,SAAc,SAAc;AACtD,UAAM,WAAW,MAAM,UAAU;AACjC,SAAK,OAAO,OAAO;AACnB,SAAK,SAAS;AACd,SAAK,UAAU;AACf,SAAK,UAAU;AAAA,EACjB;AACF;AAuEO,IAAM,iBAAN,cAMG,MAAM;AAAA;AAAA,EAEL;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,E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AAO,EAAE,SAAS;AAAA,EAC3B,gBAAgBA,GAAE,KAAK,EAAE,SAAS;AAAA,EAClC,eAAeA,GAAE,KAAK,EAAE,SAAS;AAAA,EACjC,UAAUA,GAAE,QAAQ,EAAE,SAAS;AAAA,EAC/B,aAAaA,GAAE,OAAO,EAAE,SAAS;AAAA,EACjC,YAAYA,GAAE,QAAQ,EAAE,SAAS;AAAA,EACjC,UAAUA,GAAE,QAAQ,EAAE,SAAS;AAAA,EAC/B,cAAcA,GAAE,QAAQ,EAAE,SAAS;AACrC,CAAC,EACA,SAAS;;;AExIL,IAAM,eAAe;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAWO,IAAM,YAAY;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":["z","z"]}
@@ -3,7 +3,7 @@ import {
3
3
  Environments,
4
4
  LogLevels,
5
5
  ValidationError
6
- } from "./chunk-BI3UNNVA.js";
6
+ } from "./chunk-JRTZGWVS.js";
7
7
 
8
8
  // src/adapters/console-logger.ts
9
9
  var LEVEL_VALUES = {
@@ -242,12 +242,12 @@ var InMemoryStream = class {
242
242
  _leased_until = void 0;
243
243
  _priority = 0;
244
244
  _lane = DEFAULT_LANE;
245
- // Persisted next-visit time (#1090). When set and still in the future, the
245
+ // Persisted next-visit time. When set and still in the future, the
246
246
  // stream is held out of `claim` entirely — so a deferred reaction is not
247
247
  // re-claimed (and `retry` is never bumped) until its due-time passes. Unlike
248
248
  // in-process backoff, this is durable store state shared across workers.
249
249
  _deferred_at = void 0;
250
- // Work mark (#1485): highest event id observed to resolve to this target.
250
+ // Work mark: highest event id observed to resolve to this target.
251
251
  // `undefined` means UNKNOWN — the row predates the mark, so `claim` falls
252
252
  // back to the legacy has-work probe rather than treating it as "no work".
253
253
  _correlated_at = void 0;
@@ -293,7 +293,7 @@ var InMemoryStream = class {
293
293
  this._priority = priority;
294
294
  }
295
295
  get is_available() {
296
- return !this._blocked && (!this._leased_until || this._leased_until <= /* @__PURE__ */ new Date()) && // A stream deferred to a future time is not claimable until due (#1090).
296
+ return !this._blocked && (!this._leased_until || this._leased_until <= /* @__PURE__ */ new Date()) && // A stream deferred to a future time is not claimable until due.
297
297
  (!this._deferred_at || this._deferred_at <= Date.now());
298
298
  }
299
299
  /**
@@ -323,7 +323,7 @@ var InMemoryStream = class {
323
323
  get leased_until() {
324
324
  return this._leased_until;
325
325
  }
326
- /** Persisted next-visit time (#1090/#1221), or undefined when no active defer. */
326
+ /** Persisted next-visit time, or undefined when no active defer. */
327
327
  get deferred_at() {
328
328
  return this._deferred_at;
329
329
  }
@@ -438,16 +438,16 @@ var InMemoryStore = class {
438
438
  _next_id = 0;
439
439
  // stored stream positions and other metadata
440
440
  _streams = /* @__PURE__ */ new Map();
441
- /** Correlate checkpoint (#1484): how far the log has been READ. */
441
+ /** Correlate checkpoint: how far the log has been READ. */
442
442
  _correlated_at = -1;
443
443
  /**
444
- * Per-correlator checkpoint and lease (#1532), keyed by correlator.
444
+ * Per-correlator checkpoint and lease, keyed by correlator.
445
445
  *
446
446
  * Keyed rather than singular because correlators that look for different
447
447
  * things read the log for different reasons: sharing one position lets a
448
448
  * partial-behaviour worker inherit another's, and sharing one lease lets
449
449
  * one starve the other. Callers that supply no correlator use
450
- * `_correlated_at` instead, which is the pre-#1532 behaviour.
450
+ * `_correlated_at` instead, the shared checkpoint.
451
451
  */
452
452
  _correlators = /* @__PURE__ */ new Map();
453
453
  // last committed version per stream — O(1) replacement for filter-on-commit
@@ -1380,4 +1380,4 @@ export {
1380
1380
  TOMBSTONE_EVENT,
1381
1381
  DEFAULT_LANE
1382
1382
  };
1383
- //# sourceMappingURL=chunk-FLAGQMWE.js.map
1383
+ //# sourceMappingURL=chunk-PZP5ZEZ4.js.map