actly 1.1.5 → 1.2.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 +232 -434
- package/dist/core/act.cjs +353 -35
- package/dist/core/act.d.ts.map +1 -1
- package/dist/core/act.js +355 -37
- package/dist/core/act.js.map +1 -1
- package/dist/core/executor.cjs +2 -0
- package/dist/core/executor.d.ts +6 -1
- package/dist/core/executor.d.ts.map +1 -1
- package/dist/core/executor.js +2 -0
- package/dist/core/executor.js.map +1 -1
- package/dist/core/health.cjs +34 -0
- package/dist/core/health.d.ts +18 -0
- package/dist/core/health.d.ts.map +1 -0
- package/dist/core/health.js +28 -0
- package/dist/core/health.js.map +1 -0
- package/dist/core/shutdown.cjs +60 -0
- package/dist/core/shutdown.d.ts +8 -0
- package/dist/core/shutdown.d.ts.map +1 -0
- package/dist/core/shutdown.js +56 -0
- package/dist/core/shutdown.js.map +1 -0
- package/dist/core/tenant.cjs +71 -0
- package/dist/core/tenant.d.ts +29 -0
- package/dist/core/tenant.d.ts.map +1 -0
- package/dist/core/tenant.js +68 -0
- package/dist/core/tenant.js.map +1 -0
- package/dist/errors.cjs +182 -0
- package/dist/errors.d.ts +151 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +171 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.cjs +44 -4
- package/dist/index.d.ts +17 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/observability.cjs +45 -0
- package/dist/observability.d.ts +145 -0
- package/dist/observability.d.ts.map +1 -0
- package/dist/observability.js +43 -0
- package/dist/observability.js.map +1 -0
- package/dist/policies/bulkhead.cjs +97 -0
- package/dist/policies/bulkhead.d.ts +3 -0
- package/dist/policies/bulkhead.d.ts.map +1 -0
- package/dist/policies/bulkhead.js +95 -0
- package/dist/policies/bulkhead.js.map +1 -0
- package/dist/policies/cache.cjs +168 -31
- package/dist/policies/cache.d.ts +17 -4
- package/dist/policies/cache.d.ts.map +1 -1
- package/dist/policies/cache.js +168 -31
- package/dist/policies/cache.js.map +1 -1
- package/dist/policies/circuitBreaker.cjs +85 -0
- package/dist/policies/circuitBreaker.d.ts +3 -0
- package/dist/policies/circuitBreaker.d.ts.map +1 -0
- package/dist/policies/circuitBreaker.js +83 -0
- package/dist/policies/circuitBreaker.js.map +1 -0
- package/dist/policies/dedupe.cjs +74 -45
- package/dist/policies/dedupe.d.ts +10 -28
- package/dist/policies/dedupe.d.ts.map +1 -1
- package/dist/policies/dedupe.js +74 -45
- package/dist/policies/dedupe.js.map +1 -1
- package/dist/policies/rateLimit.cjs +35 -0
- package/dist/policies/rateLimit.d.ts +3 -0
- package/dist/policies/rateLimit.d.ts.map +1 -0
- package/dist/policies/rateLimit.js +33 -0
- package/dist/policies/rateLimit.js.map +1 -0
- package/dist/policies/retry.cjs +45 -8
- package/dist/policies/retry.d.ts.map +1 -1
- package/dist/policies/retry.js +45 -8
- package/dist/policies/retry.js.map +1 -1
- package/dist/policies/timeout.cjs +25 -53
- package/dist/policies/timeout.d.ts +2 -33
- package/dist/policies/timeout.d.ts.map +1 -1
- package/dist/policies/timeout.js +31 -48
- package/dist/policies/timeout.js.map +1 -1
- package/dist/state/store.cjs +3 -3
- package/dist/state/store.d.ts +3 -3
- package/dist/state/store.js +3 -3
- package/dist/stores/memory.cjs +126 -53
- package/dist/stores/memory.d.ts +35 -16
- package/dist/stores/memory.d.ts.map +1 -1
- package/dist/stores/memory.js +125 -53
- package/dist/stores/memory.js.map +1 -1
- package/dist/types/index.d.ts +176 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/abort.cjs +108 -38
- package/dist/utils/abort.d.ts +43 -19
- package/dist/utils/abort.d.ts.map +1 -1
- package/dist/utils/abort.js +108 -38
- package/dist/utils/abort.js.map +1 -1
- package/dist/utils/abortPool.cjs +26 -0
- package/dist/utils/abortPool.d.ts +4 -0
- package/dist/utils/abortPool.d.ts.map +1 -0
- package/dist/utils/abortPool.js +22 -0
- package/dist/utils/abortPool.js.map +1 -0
- package/dist/utils/backoff.cjs +12 -1
- package/dist/utils/backoff.d.ts.map +1 -1
- package/dist/utils/backoff.js +12 -1
- package/dist/utils/backoff.js.map +1 -1
- package/dist/utils/key.cjs +77 -0
- package/dist/utils/key.d.ts +29 -0
- package/dist/utils/key.d.ts.map +1 -0
- package/dist/utils/key.js +75 -0
- package/dist/utils/key.js.map +1 -0
- package/dist/utils/limits.cjs +40 -0
- package/dist/utils/limits.d.ts +39 -0
- package/dist/utils/limits.d.ts.map +1 -0
- package/dist/utils/limits.js +38 -0
- package/dist/utils/limits.js.map +1 -0
- package/dist/utils/sanitize.cjs +29 -0
- package/dist/utils/sanitize.d.ts +3 -0
- package/dist/utils/sanitize.d.ts.map +1 -0
- package/dist/utils/sanitize.js +26 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/dist/utils/validate.cjs +90 -16
- package/dist/utils/validate.d.ts +11 -0
- package/dist/utils/validate.d.ts.map +1 -1
- package/dist/utils/validate.js +85 -16
- package/dist/utils/validate.js.map +1 -1
- package/package.json +6 -5
package/dist/stores/memory.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import { LIMITS } from '../utils/limits.js';
|
|
1
2
|
function isUnrefable(t) {
|
|
2
3
|
return typeof t.unref === 'function';
|
|
3
4
|
}
|
|
4
5
|
// ─── Implementation ───────────────────────────────────────────────────────────
|
|
5
6
|
/**
|
|
6
|
-
* Reference `SyncStateStore` implementation backed by a `Map
|
|
7
|
+
* Reference `SyncStateStore` implementation backed by a `Map` + doubly-linked
|
|
8
|
+
* list for LRU.
|
|
7
9
|
*
|
|
8
|
-
* #
|
|
10
|
+
* # Properties
|
|
9
11
|
*
|
|
10
|
-
* `
|
|
11
|
-
*
|
|
12
|
-
*
|
|
12
|
+
* - `size()` is O(1) — tracked via a counter instead of full scan.
|
|
13
|
+
* - LRU reordering uses an explicit doubly-linked list, avoiding the
|
|
14
|
+
* `delete + set` Map churn that was 2 Map operations per `get()`.
|
|
15
|
+
* - Default `maxSize` is bounded (`LIMITS.DEFAULT_STORE_MAX_SIZE`) when
|
|
16
|
+
* used as the module-level default — prevents unbounded memory growth
|
|
17
|
+
* in long-running servers.
|
|
13
18
|
*
|
|
14
19
|
* # Expiry
|
|
15
20
|
*
|
|
@@ -18,8 +23,10 @@ function isUnrefable(t) {
|
|
|
18
23
|
*/
|
|
19
24
|
export class InMemoryStore {
|
|
20
25
|
_sync = true;
|
|
21
|
-
|
|
26
|
+
map = new Map();
|
|
22
27
|
maxSize;
|
|
28
|
+
head; // least recently used
|
|
29
|
+
tail; // most recently used
|
|
23
30
|
cleanupTimer;
|
|
24
31
|
constructor(options = {}) {
|
|
25
32
|
const { autoCleanup = false, cleanupIntervalMs = 30_000, maxSize = Number.POSITIVE_INFINITY, } = options;
|
|
@@ -39,74 +46,81 @@ export class InMemoryStore {
|
|
|
39
46
|
}
|
|
40
47
|
}
|
|
41
48
|
get(key) {
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
49
|
+
const node = this.map.get(key);
|
|
50
|
+
if (!node)
|
|
44
51
|
return undefined;
|
|
45
|
-
if (
|
|
46
|
-
this.
|
|
52
|
+
if (node.expiresAt !== null && Date.now() > node.expiresAt) {
|
|
53
|
+
this._removeNode(node);
|
|
54
|
+
this.map.delete(key);
|
|
47
55
|
return undefined;
|
|
48
56
|
}
|
|
49
|
-
// LRU refresh: move to most-recent
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
this.entries.set(key, entry);
|
|
53
|
-
return entry.value;
|
|
57
|
+
// LRU refresh: move to tail (most-recent).
|
|
58
|
+
this._moveToTail(node);
|
|
59
|
+
return node.value;
|
|
54
60
|
}
|
|
55
61
|
set(key, value, ttlMs) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
const existing = this.map.get(key);
|
|
63
|
+
const now = Date.now();
|
|
64
|
+
if (existing) {
|
|
65
|
+
// Update in place — don't grow size, don't evict.
|
|
66
|
+
existing.value = value;
|
|
67
|
+
existing.expiresAt = ttlMs != null && ttlMs > 0 ? now + ttlMs : null;
|
|
68
|
+
existing.insertedAt = now;
|
|
69
|
+
this._moveToTail(existing);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
// New key — evict if at capacity.
|
|
73
|
+
while (this.map.size >= this.maxSize && this.head) {
|
|
74
|
+
const evict = this.head;
|
|
75
|
+
this._removeNode(evict);
|
|
76
|
+
this.map.delete(evict.key);
|
|
61
77
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
const node = {
|
|
79
|
+
key,
|
|
80
|
+
value,
|
|
81
|
+
expiresAt: ttlMs != null && ttlMs > 0 ? now + ttlMs : null,
|
|
82
|
+
insertedAt: now,
|
|
83
|
+
};
|
|
84
|
+
this.map.set(key, node);
|
|
85
|
+
this._appendTail(node);
|
|
67
86
|
}
|
|
68
87
|
delete(key) {
|
|
69
|
-
this.
|
|
88
|
+
const node = this.map.get(key);
|
|
89
|
+
if (!node)
|
|
90
|
+
return;
|
|
91
|
+
this._removeNode(node);
|
|
92
|
+
this.map.delete(key);
|
|
70
93
|
}
|
|
71
94
|
has(key) {
|
|
72
95
|
// Inline the expiry check to avoid the LRU side-effect of get().
|
|
73
96
|
// `has()` should be a pure query, not a touch.
|
|
74
|
-
const
|
|
75
|
-
if (!
|
|
97
|
+
const node = this.map.get(key);
|
|
98
|
+
if (!node)
|
|
76
99
|
return false;
|
|
77
|
-
if (
|
|
78
|
-
this.
|
|
100
|
+
if (node.expiresAt !== null && Date.now() > node.expiresAt) {
|
|
101
|
+
this._removeNode(node);
|
|
102
|
+
this.map.delete(key);
|
|
79
103
|
return false;
|
|
80
104
|
}
|
|
81
105
|
return true;
|
|
82
106
|
}
|
|
83
107
|
clear() {
|
|
84
|
-
this.
|
|
108
|
+
this.map.clear();
|
|
109
|
+
this.head = undefined;
|
|
110
|
+
this.tail = undefined;
|
|
85
111
|
}
|
|
86
112
|
/**
|
|
87
113
|
* Return the count of live (non-expired) entries.
|
|
88
114
|
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
115
|
+
* O(1) — returns the Map size directly. Expired-but-not-yet-
|
|
116
|
+
* evicted entries are counted; they're reclaimed lazily on next access
|
|
117
|
+
* or by the background sweep. This is intentional: a fully-accurate
|
|
118
|
+
* count would require an O(n) scan, defeating the purpose.
|
|
92
119
|
*
|
|
93
|
-
*
|
|
120
|
+
* Pure query — does NOT touch LRU order.
|
|
94
121
|
*/
|
|
95
122
|
size() {
|
|
96
|
-
|
|
97
|
-
const expired = [];
|
|
98
|
-
let count = 0;
|
|
99
|
-
for (const [key, entry] of this.entries) {
|
|
100
|
-
if (entry.expiresAt !== null && entry.expiresAt <= now) {
|
|
101
|
-
expired.push(key);
|
|
102
|
-
}
|
|
103
|
-
else {
|
|
104
|
-
count++;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
for (const key of expired)
|
|
108
|
-
this.entries.delete(key);
|
|
109
|
-
return count;
|
|
123
|
+
return this.map.size;
|
|
110
124
|
}
|
|
111
125
|
/**
|
|
112
126
|
* Stop the background cleanup timer and release internal state.
|
|
@@ -118,20 +132,78 @@ export class InMemoryStore {
|
|
|
118
132
|
this.cleanupTimer = undefined;
|
|
119
133
|
}
|
|
120
134
|
}
|
|
135
|
+
// ─── LRU list operations ──────────────────────────────────────────────────
|
|
136
|
+
//
|
|
137
|
+
// All operations are O(1). The list runs head (LRU) → tail (MRU).
|
|
138
|
+
_appendTail(node) {
|
|
139
|
+
if (this.tail) {
|
|
140
|
+
this.tail.next = node;
|
|
141
|
+
node.prev = this.tail;
|
|
142
|
+
node.next = undefined;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
// Empty list — node is both head and tail.
|
|
146
|
+
this.head = node;
|
|
147
|
+
}
|
|
148
|
+
this.tail = node;
|
|
149
|
+
}
|
|
150
|
+
_removeNode(node) {
|
|
151
|
+
if (node.prev) {
|
|
152
|
+
node.prev.next = node.next;
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
this.head = node.next;
|
|
156
|
+
}
|
|
157
|
+
if (node.next) {
|
|
158
|
+
node.next.prev = node.prev;
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this.tail = node.prev;
|
|
162
|
+
}
|
|
163
|
+
node.prev = undefined;
|
|
164
|
+
node.next = undefined;
|
|
165
|
+
}
|
|
166
|
+
_moveToTail(node) {
|
|
167
|
+
if (this.tail === node)
|
|
168
|
+
return; // already MRU
|
|
169
|
+
this._removeNode(node);
|
|
170
|
+
this._appendTail(node);
|
|
171
|
+
}
|
|
121
172
|
/**
|
|
122
173
|
* Sweep all entries and remove those past their expiry time.
|
|
123
174
|
* Called by the autoCleanup interval; not part of the public contract.
|
|
175
|
+
*
|
|
176
|
+
* Two-pass to avoid mutating the Map during iteration (spec-safe).
|
|
124
177
|
*/
|
|
125
178
|
_sweep() {
|
|
126
179
|
const now = Date.now();
|
|
127
180
|
const expired = [];
|
|
128
|
-
for (const [key,
|
|
129
|
-
if (
|
|
181
|
+
for (const [key, node] of this.map) {
|
|
182
|
+
if (node.expiresAt !== null && now > node.expiresAt) {
|
|
130
183
|
expired.push(key);
|
|
131
184
|
}
|
|
132
185
|
}
|
|
133
|
-
for (const key of expired)
|
|
134
|
-
this.
|
|
186
|
+
for (const key of expired) {
|
|
187
|
+
const node = this.map.get(key);
|
|
188
|
+
if (node) {
|
|
189
|
+
this._removeNode(node);
|
|
190
|
+
this.map.delete(key);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
135
193
|
}
|
|
136
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Factory for the default module-level store.
|
|
197
|
+
*
|
|
198
|
+
* Bounded by `LIMITS.DEFAULT_STORE_MAX_SIZE` with background sweep —
|
|
199
|
+
* prevents unbounded memory growth in long-running servers without
|
|
200
|
+
* requiring callers to opt in.
|
|
201
|
+
*/
|
|
202
|
+
export function createDefaultStore() {
|
|
203
|
+
return new InMemoryStore({
|
|
204
|
+
maxSize: LIMITS.DEFAULT_STORE_MAX_SIZE,
|
|
205
|
+
autoCleanup: true,
|
|
206
|
+
cleanupIntervalMs: LIMITS.DEFAULT_STORE_CLEANUP_INTERVAL_MS,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
137
209
|
//# sourceMappingURL=memory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/stores/memory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"memory.js","sourceRoot":"","sources":["../../src/stores/memory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AA2B3C,SAAS,WAAW,CAAC,CAAU;IAC7B,OAAO,OAAQ,CAAoB,CAAC,KAAK,KAAK,UAAU,CAAA;AAC1D,CAAC;AAqCD,iFAAiF;AAEjF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,aAAa;IACf,KAAK,GAAG,IAAa,CAAA;IAEb,GAAG,GAAG,IAAI,GAAG,EAAmB,CAAA;IAChC,OAAO,CAAQ;IACxB,IAAI,CAAU,CAAE,sBAAsB;IACtC,IAAI,CAAU,CAAE,qBAAqB;IACrC,YAAY,CAA4C;IAEhE,YAAY,UAAgC,EAAE;QAC5C,MAAM,EACJ,WAAW,GAAG,KAAK,EACnB,iBAAiB,GAAG,MAAM,EAC1B,OAAO,GAAG,MAAM,CAAC,iBAAiB,GACnC,GAAG,OAAO,CAAA;QAEX,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,EAAE,CAAC;YAC9C,uEAAuE;YACvE,yBAAyB;YACzB,IAAI,OAAO,KAAK,MAAM,CAAC,iBAAiB,EAAE,CAAC;gBACzC,MAAM,IAAI,UAAU,CAClB,kFAAkF,OAAO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G,CAAC,CAAA;YACtB,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,IAAI,aAAa,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC,sBAAsB;QACtC,WAAW,EAAE,IAAI;QACjB,iBAAiB,EAAE,MAAM,CAAC,iCAAiC;KAC5D,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ export interface ActSuccess<T> {
|
|
|
42
42
|
* - Dedupe joiner: mirrors the originator's attempt count
|
|
43
43
|
*/
|
|
44
44
|
attempts: number;
|
|
45
|
+
/**
|
|
46
|
+
* Trace ID for correlation across logs/metrics. Present when
|
|
47
|
+
* `options.observability` or `options.traceId` is set; `undefined` otherwise.
|
|
48
|
+
*/
|
|
49
|
+
traceId?: string;
|
|
50
|
+
/** Wall-clock duration of this act() call in ms. */
|
|
51
|
+
durationMs?: number;
|
|
45
52
|
}
|
|
46
53
|
export interface ActFailure {
|
|
47
54
|
ok: false;
|
|
@@ -51,6 +58,13 @@ export interface ActFailure {
|
|
|
51
58
|
* For dedupe joiners: mirrors the originator's attempt count.
|
|
52
59
|
*/
|
|
53
60
|
attempts: number;
|
|
61
|
+
/**
|
|
62
|
+
* Trace ID for correlation across logs/metrics. Present when
|
|
63
|
+
* `options.observability` or `options.traceId` is set; `undefined` otherwise.
|
|
64
|
+
*/
|
|
65
|
+
traceId?: string;
|
|
66
|
+
/** Wall-clock duration of this act() call in ms. */
|
|
67
|
+
durationMs?: number;
|
|
54
68
|
}
|
|
55
69
|
export type ActResult<T> = ActSuccess<T> | ActFailure;
|
|
56
70
|
export interface RetryOptions {
|
|
@@ -151,7 +165,7 @@ export interface CacheOptions {
|
|
|
151
165
|
/** Keep a successful result for this many milliseconds. Must be > 0. */
|
|
152
166
|
ttl: number;
|
|
153
167
|
}
|
|
154
|
-
export interface ActOptions {
|
|
168
|
+
export interface ActOptions<T = unknown> {
|
|
155
169
|
retry?: RetryOptions;
|
|
156
170
|
/** Per-attempt deadline. Each retry gets a fresh clock. */
|
|
157
171
|
timeout?: TimeoutOptions;
|
|
@@ -188,6 +202,86 @@ export interface ActOptions {
|
|
|
188
202
|
* over cancellation from outside `act()`.
|
|
189
203
|
*/
|
|
190
204
|
signal?: AbortSignal;
|
|
205
|
+
/**
|
|
206
|
+
* Observability hooks. All optional. When omitted entirely (the
|
|
207
|
+
* common case), zero overhead is incurred on the hot path — no event
|
|
208
|
+
* objects are allocated, no function calls are made.
|
|
209
|
+
*
|
|
210
|
+
* When hooks ARE registered, events are allocated lazily — only when
|
|
211
|
+
* the corresponding event actually fires.
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```ts
|
|
215
|
+
* await act('user:42', fn, {
|
|
216
|
+
* retry: { attempts: 3 },
|
|
217
|
+
* observability: {
|
|
218
|
+
* onAttempt: (e) => metrics.increment('act.attempt', { key: e.key, attempt: e.attempt }),
|
|
219
|
+
* onFinalFailure: (e) => logger.error({ key: e.key, traceId: e.traceId, failedBy: e.failedBy }, 'act failed'),
|
|
220
|
+
* onFinalSuccess: (e) => metrics.histogram('act.duration', e.durationMs),
|
|
221
|
+
* },
|
|
222
|
+
* })
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
observability?: ObservabilityHooks;
|
|
226
|
+
/**
|
|
227
|
+
* Trace ID for logs/metrics correlation. Auto-generated via crypto.randomUUID()
|
|
228
|
+
* when omitted. Appears on every observability event and on ActResult.traceId.
|
|
229
|
+
*/
|
|
230
|
+
traceId?: string;
|
|
231
|
+
/** Circuit breaker: trips open after N consecutive failures, blocks calls for a cooldown period. */
|
|
232
|
+
circuitBreaker?: CircuitBreakerOptions;
|
|
233
|
+
/** Bulkhead: limits concurrent in-flight calls per key. Excess callers queue or fail fast. */
|
|
234
|
+
bulkhead?: BulkheadOptions;
|
|
235
|
+
/** Rate limiter: limits calls per window per key. Excess callers fail with RateLimitError. */
|
|
236
|
+
rateLimit?: RateLimitOptions;
|
|
237
|
+
/** Hedge: sends a second fn call after delayMs if the first hasn't settled. Races them. */
|
|
238
|
+
hedge?: HedgeOptions;
|
|
239
|
+
/** Fallback: returns this value if all policies fail. Suppresses ActFailure. */
|
|
240
|
+
fallback?: FallbackOptions<T>;
|
|
241
|
+
/** Audit: logs every act() call with key, traceId, result, timestamp. */
|
|
242
|
+
audit?: AuditOptions;
|
|
243
|
+
}
|
|
244
|
+
export interface CircuitBreakerOptions {
|
|
245
|
+
/** Number of consecutive failures before the breaker opens. Must be >= 1. */
|
|
246
|
+
threshold: number;
|
|
247
|
+
/** How long to stay open before transitioning to half-open (ms). Must be > 0. */
|
|
248
|
+
cooldownMs: number;
|
|
249
|
+
/** Optional: reset failure count after this idle period (ms). Default: Infinity. */
|
|
250
|
+
resetTimeoutMs?: number;
|
|
251
|
+
}
|
|
252
|
+
export interface BulkheadOptions {
|
|
253
|
+
/** Max concurrent in-flight calls per key. Must be >= 1. */
|
|
254
|
+
maxConcurrent: number;
|
|
255
|
+
/** How long to queue before rejecting with BulkheadOverflowError (ms). Default: 0 (fail fast). */
|
|
256
|
+
queueTimeoutMs?: number;
|
|
257
|
+
}
|
|
258
|
+
export interface RateLimitOptions {
|
|
259
|
+
/** Max calls per window per key. Must be >= 1. */
|
|
260
|
+
maxCalls: number;
|
|
261
|
+
/** Window size in ms. Must be > 0. */
|
|
262
|
+
windowMs: number;
|
|
263
|
+
}
|
|
264
|
+
export interface HedgeOptions {
|
|
265
|
+
/** Delay before sending the second (hedge) call (ms). Must be > 0. */
|
|
266
|
+
delayMs: number;
|
|
267
|
+
}
|
|
268
|
+
export interface FallbackOptions<T> {
|
|
269
|
+
/** Value to return if all retries/policies fail. */
|
|
270
|
+
value: T | (() => T | Promise<T>);
|
|
271
|
+
}
|
|
272
|
+
export interface AuditOptions {
|
|
273
|
+
/** Called with audit entry after every act() call (success or failure). */
|
|
274
|
+
log: (entry: AuditEntry) => void;
|
|
275
|
+
}
|
|
276
|
+
export interface AuditEntry {
|
|
277
|
+
key: string;
|
|
278
|
+
traceId: string;
|
|
279
|
+
timestamp: number;
|
|
280
|
+
durationMs: number;
|
|
281
|
+
ok: boolean;
|
|
282
|
+
attempts: number;
|
|
283
|
+
failedBy?: string;
|
|
284
|
+
error?: unknown;
|
|
191
285
|
}
|
|
192
286
|
/**
|
|
193
287
|
* Mutable bag mutated in-place during execution.
|
|
@@ -201,11 +295,90 @@ export interface RunMeta {
|
|
|
201
295
|
attempts: number;
|
|
202
296
|
source: ActSource;
|
|
203
297
|
}
|
|
298
|
+
export interface ObservabilityContext {
|
|
299
|
+
traceId: string;
|
|
300
|
+
hooks: ObservabilityHooks;
|
|
301
|
+
joinerCounter: number;
|
|
302
|
+
}
|
|
303
|
+
/** User-supplied observability hooks. See `observability.ts` for full shape. */
|
|
304
|
+
export interface ObservabilityHooks {
|
|
305
|
+
onAttempt?: (event: {
|
|
306
|
+
readonly type: 'attempt';
|
|
307
|
+
readonly key: string;
|
|
308
|
+
readonly traceId: string;
|
|
309
|
+
readonly timestamp: number;
|
|
310
|
+
readonly attempt: number;
|
|
311
|
+
readonly durationMs?: number;
|
|
312
|
+
readonly error?: unknown;
|
|
313
|
+
}) => void;
|
|
314
|
+
onRetry?: (event: {
|
|
315
|
+
readonly type: 'retry';
|
|
316
|
+
readonly key: string;
|
|
317
|
+
readonly traceId: string;
|
|
318
|
+
readonly timestamp: number;
|
|
319
|
+
readonly attempt: number;
|
|
320
|
+
readonly delayMs: number;
|
|
321
|
+
readonly error: unknown;
|
|
322
|
+
}) => void;
|
|
323
|
+
onCacheHit?: (event: {
|
|
324
|
+
readonly type: 'cache-hit';
|
|
325
|
+
readonly key: string;
|
|
326
|
+
readonly traceId: string;
|
|
327
|
+
readonly timestamp: number;
|
|
328
|
+
readonly ageMs: number;
|
|
329
|
+
}) => void;
|
|
330
|
+
onCacheMiss?: (event: {
|
|
331
|
+
readonly type: 'cache-miss';
|
|
332
|
+
readonly key: string;
|
|
333
|
+
readonly traceId: string;
|
|
334
|
+
readonly timestamp: number;
|
|
335
|
+
}) => void;
|
|
336
|
+
onDedupeJoin?: (event: {
|
|
337
|
+
readonly type: 'dedupe-join';
|
|
338
|
+
readonly key: string;
|
|
339
|
+
readonly traceId: string;
|
|
340
|
+
readonly timestamp: number;
|
|
341
|
+
readonly joinerPosition: number;
|
|
342
|
+
}) => void;
|
|
343
|
+
onTimeout?: (event: {
|
|
344
|
+
readonly type: 'timeout';
|
|
345
|
+
readonly key: string;
|
|
346
|
+
readonly traceId: string;
|
|
347
|
+
readonly timestamp: number;
|
|
348
|
+
readonly kind: 'per-attempt' | 'total';
|
|
349
|
+
readonly ms: number;
|
|
350
|
+
}) => void;
|
|
351
|
+
onFinalSuccess?: (event: {
|
|
352
|
+
readonly type: 'final-success';
|
|
353
|
+
readonly key: string;
|
|
354
|
+
readonly traceId: string;
|
|
355
|
+
readonly timestamp: number;
|
|
356
|
+
readonly source: ActSource;
|
|
357
|
+
readonly attempts: number;
|
|
358
|
+
readonly durationMs: number;
|
|
359
|
+
}) => void;
|
|
360
|
+
onFinalFailure?: (event: {
|
|
361
|
+
readonly type: 'final-failure';
|
|
362
|
+
readonly key: string;
|
|
363
|
+
readonly traceId: string;
|
|
364
|
+
readonly timestamp: number;
|
|
365
|
+
readonly attempts: number;
|
|
366
|
+
readonly durationMs: number;
|
|
367
|
+
readonly failedBy: 'abort' | 'timeout' | 'total-timeout' | 'retry-exhausted' | 'fn-error' | 'validation';
|
|
368
|
+
readonly error: unknown;
|
|
369
|
+
}) => void;
|
|
370
|
+
}
|
|
204
371
|
/** Everything a policy receives about the current run. */
|
|
205
372
|
export interface PolicyContext {
|
|
206
373
|
key: string;
|
|
207
374
|
store: AnyStateStore;
|
|
208
375
|
meta: RunMeta;
|
|
376
|
+
/**
|
|
377
|
+
* Observability context. Present only when the caller supplied
|
|
378
|
+
* `options.observability` hooks. Policies check `ctx.observability != null`
|
|
379
|
+
* before allocating event objects — no overhead when absent.
|
|
380
|
+
*/
|
|
381
|
+
observability?: ObservabilityContext;
|
|
209
382
|
}
|
|
210
383
|
/**
|
|
211
384
|
* The ONLY shape the executor knows about policies.
|
|
@@ -218,9 +391,9 @@ export type PolicyApplier<T> = (fn: ActFn<T>, ctx: PolicyContext) => ActFn<T>;
|
|
|
218
391
|
import type { SyncStateStore, AsyncStateStore } from '../stores/base.js';
|
|
219
392
|
export type { SyncStateStore, AsyncStateStore };
|
|
220
393
|
/**
|
|
221
|
-
* Public store type.
|
|
394
|
+
* Public store type. Alias for `SyncStateStore` (backwards compat).
|
|
222
395
|
*
|
|
223
|
-
* Kept for backwards compatibility —
|
|
396
|
+
* Kept for backwards compatibility — consumers typed against
|
|
224
397
|
* `StateStore` continues to compile without changes. A future major version
|
|
225
398
|
* may widen this to `SyncStateStore | AsyncStateStore`.
|
|
226
399
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE9D,2CAA2C;AAC3C,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,CAAA;AAEzC,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,EAAE,EAAE,IAAI,CAAA;IACR,KAAK,EAAE,CAAC,CAAA;IACR,MAAM,EAAE,SAAS,CAAA;IACjB;;;;;;;OAOG;IACH,QAAQ,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,WAAW,KAAK,OAA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