actly 1.1.0 → 1.1.5

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 (70) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +284 -52
  3. package/dist/core/act.cjs +183 -35
  4. package/dist/core/act.d.ts +81 -10
  5. package/dist/core/act.d.ts.map +1 -1
  6. package/dist/core/act.js +181 -35
  7. package/dist/core/act.js.map +1 -1
  8. package/dist/core/executor.cjs +19 -9
  9. package/dist/core/executor.d.ts +25 -5
  10. package/dist/core/executor.d.ts.map +1 -1
  11. package/dist/core/executor.js +19 -9
  12. package/dist/core/executor.js.map +1 -1
  13. package/dist/index.cjs +13 -3
  14. package/dist/index.d.ts +7 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +8 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/policies/cache.cjs +85 -21
  19. package/dist/policies/cache.d.ts +29 -7
  20. package/dist/policies/cache.d.ts.map +1 -1
  21. package/dist/policies/cache.js +85 -21
  22. package/dist/policies/cache.js.map +1 -1
  23. package/dist/policies/dedupe.cjs +68 -20
  24. package/dist/policies/dedupe.d.ts +38 -13
  25. package/dist/policies/dedupe.d.ts.map +1 -1
  26. package/dist/policies/dedupe.js +68 -20
  27. package/dist/policies/dedupe.js.map +1 -1
  28. package/dist/policies/retry.cjs +65 -25
  29. package/dist/policies/retry.d.ts +25 -2
  30. package/dist/policies/retry.d.ts.map +1 -1
  31. package/dist/policies/retry.js +65 -25
  32. package/dist/policies/retry.js.map +1 -1
  33. package/dist/policies/timeout.cjs +87 -17
  34. package/dist/policies/timeout.d.ts +28 -8
  35. package/dist/policies/timeout.d.ts.map +1 -1
  36. package/dist/policies/timeout.js +87 -17
  37. package/dist/policies/timeout.js.map +1 -1
  38. package/dist/state/store.cjs +9 -2
  39. package/dist/state/store.d.ts +9 -0
  40. package/dist/state/store.d.ts.map +1 -1
  41. package/dist/state/store.js +9 -2
  42. package/dist/state/store.js.map +1 -1
  43. package/dist/stores/base.cjs +4 -4
  44. package/dist/stores/base.d.ts +32 -56
  45. package/dist/stores/base.d.ts.map +1 -1
  46. package/dist/stores/base.js +4 -4
  47. package/dist/stores/base.js.map +1 -1
  48. package/dist/stores/memory.cjs +77 -28
  49. package/dist/stores/memory.d.ts +44 -23
  50. package/dist/stores/memory.d.ts.map +1 -1
  51. package/dist/stores/memory.js +77 -28
  52. package/dist/stores/memory.js.map +1 -1
  53. package/dist/types/index.d.ts +141 -36
  54. package/dist/types/index.d.ts.map +1 -1
  55. package/dist/utils/abort.cjs +142 -0
  56. package/dist/utils/abort.d.ts +55 -0
  57. package/dist/utils/abort.d.ts.map +1 -0
  58. package/dist/utils/abort.js +136 -0
  59. package/dist/utils/abort.js.map +1 -0
  60. package/dist/utils/backoff.cjs +43 -0
  61. package/dist/utils/backoff.d.ts +14 -0
  62. package/dist/utils/backoff.d.ts.map +1 -0
  63. package/dist/utils/backoff.js +41 -0
  64. package/dist/utils/backoff.js.map +1 -0
  65. package/dist/utils/validate.cjs +79 -0
  66. package/dist/utils/validate.d.ts +15 -0
  67. package/dist/utils/validate.d.ts.map +1 -0
  68. package/dist/utils/validate.js +72 -0
  69. package/dist/utils/validate.js.map +1 -0
  70. package/package.json +19 -37
@@ -3,8 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TotalTimeoutError = exports.TimeoutError = void 0;
4
4
  exports.timeoutPolicy = timeoutPolicy;
5
5
  exports.totalTimeoutPolicy = totalTimeoutPolicy;
6
+ const abort_js_1 = require("../utils/abort.js");
6
7
  // ─── Errors ───────────────────────────────────────────────────────────────────
8
+ /**
9
+ * Thrown when a per-attempt `timeout` deadline fires.
10
+ *
11
+ * Carries the configured `ms` so callers can log/alert precisely:
12
+ *
13
+ * ```ts
14
+ * if (!result.ok && result.error instanceof TimeoutError) {
15
+ * console.log(`attempt timed out after ${result.error.ms}ms`)
16
+ * }
17
+ * ```
18
+ */
7
19
  class TimeoutError extends Error {
20
+ ms;
8
21
  constructor(ms) {
9
22
  super(`ACT timed out after ${ms}ms`);
10
23
  this.name = 'TimeoutError';
@@ -13,11 +26,21 @@ class TimeoutError extends Error {
13
26
  }
14
27
  exports.TimeoutError = TimeoutError;
15
28
  /**
16
- * Thrown when the total budget across all attempts is exceeded.
17
- * Distinct from TimeoutError (per-attempt) so callers can instanceof-check
18
- * which deadline fired.
29
+ * Thrown when the operation-wide `totalTimeout` budget fires.
30
+ *
31
+ * Distinct from `TimeoutError` (per-attempt) so callers can `instanceof`-check
32
+ * which deadline fired:
33
+ *
34
+ * ```ts
35
+ * if (result.error instanceof TotalTimeoutError) {
36
+ * // whole operation budget exhausted
37
+ * } else if (result.error instanceof TimeoutError) {
38
+ * // last attempt's per-attempt deadline fired
39
+ * }
40
+ * ```
19
41
  */
20
42
  class TotalTimeoutError extends Error {
43
+ ms;
21
44
  constructor(ms) {
22
45
  super(`ACT total timeout exceeded after ${ms}ms`);
23
46
  this.name = 'TotalTimeoutError';
@@ -25,29 +48,76 @@ class TotalTimeoutError extends Error {
25
48
  }
26
49
  }
27
50
  exports.TotalTimeoutError = TotalTimeoutError;
28
- // ─── Helpers ──────────────────────────────────────────────────────────────────
29
- /** Shared race-against-a-timer logic. ErrorCtor lets callers pick the error type. */
51
+ // ─── Policy ───────────────────────────────────────────────────────────────────
52
+ /**
53
+ * Build a timeout policy that throws `ErrorCtor` on deadline.
54
+ *
55
+ * # Cancellation contract
56
+ *
57
+ * Each invocation:
58
+ * 1. Creates a fresh `AbortController` for this attempt.
59
+ * 2. Arms a `setTimeout` that aborts the controller with a fresh `ErrorCtor(ms)`.
60
+ * 3. Links the parent signal: if the parent aborts (e.g. `totalTimeout` or
61
+ * caller cancellation), the child aborts with the parent's reason.
62
+ * 4. Races `fn(childSignal)` against the abort event.
63
+ *
64
+ * The race is critical: it ensures `act()` returns promptly even if `fn`
65
+ * ignores the signal. The underlying `fn` may keep running in the background
66
+ * (resource leak), but the caller is unblocked. This is the best JavaScript
67
+ * can do without cooperation from `fn`.
68
+ *
69
+ * If `fn` cooperates (passes `signal` to `fetch`, `AbortController`, etc.),
70
+ * the underlying work is cancelled properly — no leak.
71
+ *
72
+ * # Error attribution
73
+ *
74
+ * If the per-attempt timer fires, we throw `ErrorCtor(ms)` regardless of
75
+ * what `fn` does. If the parent signal fires first, we throw the parent's
76
+ * reason (could be `TotalTimeoutError`, an `AbortError`, or anything else).
77
+ */
30
78
  function makeTimeoutPolicy(opts, ErrorCtor) {
31
- return (fn, _ctx) => () => new Promise((resolve, reject) => {
32
- const timer = setTimeout(() => reject(new ErrorCtor(opts.ms)), opts.ms);
33
- fn()
34
- .then((v) => { clearTimeout(timer); resolve(v); })
35
- .catch((e) => { clearTimeout(timer); reject(e); });
36
- });
79
+ return (fn, _ctx) => async (parentSignal) => {
80
+ const controller = new AbortController();
81
+ const timerError = new ErrorCtor(opts.ms);
82
+ // Arm the per-attempt timer. The error object is allocated once so the
83
+ // stack trace points here (the policy frame), not at setTimeout's
84
+ // internal callback.
85
+ const timer = setTimeout(() => controller.abort(timerError), opts.ms);
86
+ // Link parent -> child. If parent is already aborted, child aborts
87
+ // synchronously with parent's reason.
88
+ (0, abort_js_1.linkSignal)(parentSignal, controller);
89
+ try {
90
+ // Race fn against the abort event. If fn settles first, we get its
91
+ // result/error. If the signal aborts first, we reject with reason.
92
+ //
93
+ // We do NOT use AbortSignal.timeout() here because we need to throw
94
+ // our own ErrorCtor, not a DOMException named "TimeoutError".
95
+ return await new Promise((resolve, reject) => {
96
+ if (controller.signal.aborted) {
97
+ reject(controller.signal.reason);
98
+ return;
99
+ }
100
+ controller.signal.addEventListener('abort', () => reject(controller.signal.reason), { once: true });
101
+ Promise.resolve(fn(controller.signal)).then((value) => resolve(value), (error) => reject(error));
102
+ });
103
+ }
104
+ finally {
105
+ clearTimeout(timer);
106
+ }
107
+ };
37
108
  }
38
- // ─── Policies ─────────────────────────────────────────────────────────────────
39
109
  /**
40
- * Races fn against a hard deadline.
41
- * Rejects with TimeoutError if the deadline fires first.
110
+ * Per-attempt timeout. Races `fn` against a deadline that resets on retry.
42
111
  *
43
- * Place this INSIDE retryPolicy (closer to fn) so each attempt has its own clock.
112
+ * Place this INSIDE `retryPolicy` (closer to `fn`) so each attempt has its
113
+ * own clock.
44
114
  */
45
115
  function timeoutPolicy(opts) {
46
116
  return makeTimeoutPolicy(opts, TimeoutError);
47
117
  }
48
118
  /**
49
- * Races the ENTIRE operation (all retry attempts + delays) against a budget.
50
- * Rejects with TotalTimeoutError if the budget is exhausted.
119
+ * Operation-wide timeout. Races the ENTIRE chain (all retry attempts +
120
+ * delays) against a hard budget that does NOT reset.
51
121
  *
52
122
  * Place this as the OUTERMOST policy so the clock starts before any other
53
123
  * policy runs and stops regardless of what the inner chain is doing.
@@ -1,27 +1,47 @@
1
1
  import type { PolicyApplier, TimeoutOptions } from '../types/index.js';
2
+ /**
3
+ * Thrown when a per-attempt `timeout` deadline fires.
4
+ *
5
+ * Carries the configured `ms` so callers can log/alert precisely:
6
+ *
7
+ * ```ts
8
+ * if (!result.ok && result.error instanceof TimeoutError) {
9
+ * console.log(`attempt timed out after ${result.error.ms}ms`)
10
+ * }
11
+ * ```
12
+ */
2
13
  export declare class TimeoutError extends Error {
3
14
  readonly ms: number;
4
15
  constructor(ms: number);
5
16
  }
6
17
  /**
7
- * Thrown when the total budget across all attempts is exceeded.
8
- * Distinct from TimeoutError (per-attempt) so callers can instanceof-check
9
- * which deadline fired.
18
+ * Thrown when the operation-wide `totalTimeout` budget fires.
19
+ *
20
+ * Distinct from `TimeoutError` (per-attempt) so callers can `instanceof`-check
21
+ * which deadline fired:
22
+ *
23
+ * ```ts
24
+ * if (result.error instanceof TotalTimeoutError) {
25
+ * // whole operation budget exhausted
26
+ * } else if (result.error instanceof TimeoutError) {
27
+ * // last attempt's per-attempt deadline fired
28
+ * }
29
+ * ```
10
30
  */
11
31
  export declare class TotalTimeoutError extends Error {
12
32
  readonly ms: number;
13
33
  constructor(ms: number);
14
34
  }
15
35
  /**
16
- * Races fn against a hard deadline.
17
- * Rejects with TimeoutError if the deadline fires first.
36
+ * Per-attempt timeout. Races `fn` against a deadline that resets on retry.
18
37
  *
19
- * Place this INSIDE retryPolicy (closer to fn) so each attempt has its own clock.
38
+ * Place this INSIDE `retryPolicy` (closer to `fn`) so each attempt has its
39
+ * own clock.
20
40
  */
21
41
  export declare function timeoutPolicy<T>(opts: TimeoutOptions): PolicyApplier<T>;
22
42
  /**
23
- * Races the ENTIRE operation (all retry attempts + delays) against a budget.
24
- * Rejects with TotalTimeoutError if the budget is exhausted.
43
+ * Operation-wide timeout. Races the ENTIRE chain (all retry attempts +
44
+ * delays) against a hard budget that does NOT reset.
25
45
  *
26
46
  * Place this as the OUTERMOST policy so the clock starts before any other
27
47
  * policy runs and stops regardless of what the inner chain is doing.
@@ -1 +1 @@
1
- {"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../src/policies/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAI5F,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;gBAEP,EAAE,EAAE,MAAM;CAKvB;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;gBAEP,EAAE,EAAE,MAAM;CAKvB;AAyBD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CAE5E"}
1
+ {"version":3,"file":"timeout.d.ts","sourceRoot":"","sources":["../../src/policies/timeout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,aAAa,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAK5F;;;;;;;;;;GAUG;AACH,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;gBAEP,EAAE,EAAE,MAAM;CAKvB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;gBAEP,EAAE,EAAE,MAAM;CAKvB;AAgFD;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CAEvE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,CAE5E"}
@@ -1,5 +1,18 @@
1
+ import { linkSignal } from '../utils/abort.js';
1
2
  // ─── Errors ───────────────────────────────────────────────────────────────────
3
+ /**
4
+ * Thrown when a per-attempt `timeout` deadline fires.
5
+ *
6
+ * Carries the configured `ms` so callers can log/alert precisely:
7
+ *
8
+ * ```ts
9
+ * if (!result.ok && result.error instanceof TimeoutError) {
10
+ * console.log(`attempt timed out after ${result.error.ms}ms`)
11
+ * }
12
+ * ```
13
+ */
2
14
  export class TimeoutError extends Error {
15
+ ms;
3
16
  constructor(ms) {
4
17
  super(`ACT timed out after ${ms}ms`);
5
18
  this.name = 'TimeoutError';
@@ -7,40 +20,97 @@ export class TimeoutError extends Error {
7
20
  }
8
21
  }
9
22
  /**
10
- * Thrown when the total budget across all attempts is exceeded.
11
- * Distinct from TimeoutError (per-attempt) so callers can instanceof-check
12
- * which deadline fired.
23
+ * Thrown when the operation-wide `totalTimeout` budget fires.
24
+ *
25
+ * Distinct from `TimeoutError` (per-attempt) so callers can `instanceof`-check
26
+ * which deadline fired:
27
+ *
28
+ * ```ts
29
+ * if (result.error instanceof TotalTimeoutError) {
30
+ * // whole operation budget exhausted
31
+ * } else if (result.error instanceof TimeoutError) {
32
+ * // last attempt's per-attempt deadline fired
33
+ * }
34
+ * ```
13
35
  */
14
36
  export class TotalTimeoutError extends Error {
37
+ ms;
15
38
  constructor(ms) {
16
39
  super(`ACT total timeout exceeded after ${ms}ms`);
17
40
  this.name = 'TotalTimeoutError';
18
41
  this.ms = ms;
19
42
  }
20
43
  }
21
- // ─── Helpers ──────────────────────────────────────────────────────────────────
22
- /** Shared race-against-a-timer logic. ErrorCtor lets callers pick the error type. */
44
+ // ─── Policy ───────────────────────────────────────────────────────────────────
45
+ /**
46
+ * Build a timeout policy that throws `ErrorCtor` on deadline.
47
+ *
48
+ * # Cancellation contract
49
+ *
50
+ * Each invocation:
51
+ * 1. Creates a fresh `AbortController` for this attempt.
52
+ * 2. Arms a `setTimeout` that aborts the controller with a fresh `ErrorCtor(ms)`.
53
+ * 3. Links the parent signal: if the parent aborts (e.g. `totalTimeout` or
54
+ * caller cancellation), the child aborts with the parent's reason.
55
+ * 4. Races `fn(childSignal)` against the abort event.
56
+ *
57
+ * The race is critical: it ensures `act()` returns promptly even if `fn`
58
+ * ignores the signal. The underlying `fn` may keep running in the background
59
+ * (resource leak), but the caller is unblocked. This is the best JavaScript
60
+ * can do without cooperation from `fn`.
61
+ *
62
+ * If `fn` cooperates (passes `signal` to `fetch`, `AbortController`, etc.),
63
+ * the underlying work is cancelled properly — no leak.
64
+ *
65
+ * # Error attribution
66
+ *
67
+ * If the per-attempt timer fires, we throw `ErrorCtor(ms)` regardless of
68
+ * what `fn` does. If the parent signal fires first, we throw the parent's
69
+ * reason (could be `TotalTimeoutError`, an `AbortError`, or anything else).
70
+ */
23
71
  function makeTimeoutPolicy(opts, ErrorCtor) {
24
- return (fn, _ctx) => () => new Promise((resolve, reject) => {
25
- const timer = setTimeout(() => reject(new ErrorCtor(opts.ms)), opts.ms);
26
- fn()
27
- .then((v) => { clearTimeout(timer); resolve(v); })
28
- .catch((e) => { clearTimeout(timer); reject(e); });
29
- });
72
+ return (fn, _ctx) => async (parentSignal) => {
73
+ const controller = new AbortController();
74
+ const timerError = new ErrorCtor(opts.ms);
75
+ // Arm the per-attempt timer. The error object is allocated once so the
76
+ // stack trace points here (the policy frame), not at setTimeout's
77
+ // internal callback.
78
+ const timer = setTimeout(() => controller.abort(timerError), opts.ms);
79
+ // Link parent -> child. If parent is already aborted, child aborts
80
+ // synchronously with parent's reason.
81
+ linkSignal(parentSignal, controller);
82
+ try {
83
+ // Race fn against the abort event. If fn settles first, we get its
84
+ // result/error. If the signal aborts first, we reject with reason.
85
+ //
86
+ // We do NOT use AbortSignal.timeout() here because we need to throw
87
+ // our own ErrorCtor, not a DOMException named "TimeoutError".
88
+ return await new Promise((resolve, reject) => {
89
+ if (controller.signal.aborted) {
90
+ reject(controller.signal.reason);
91
+ return;
92
+ }
93
+ controller.signal.addEventListener('abort', () => reject(controller.signal.reason), { once: true });
94
+ Promise.resolve(fn(controller.signal)).then((value) => resolve(value), (error) => reject(error));
95
+ });
96
+ }
97
+ finally {
98
+ clearTimeout(timer);
99
+ }
100
+ };
30
101
  }
31
- // ─── Policies ─────────────────────────────────────────────────────────────────
32
102
  /**
33
- * Races fn against a hard deadline.
34
- * Rejects with TimeoutError if the deadline fires first.
103
+ * Per-attempt timeout. Races `fn` against a deadline that resets on retry.
35
104
  *
36
- * Place this INSIDE retryPolicy (closer to fn) so each attempt has its own clock.
105
+ * Place this INSIDE `retryPolicy` (closer to `fn`) so each attempt has its
106
+ * own clock.
37
107
  */
38
108
  export function timeoutPolicy(opts) {
39
109
  return makeTimeoutPolicy(opts, TimeoutError);
40
110
  }
41
111
  /**
42
- * Races the ENTIRE operation (all retry attempts + delays) against a budget.
43
- * Rejects with TotalTimeoutError if the budget is exhausted.
112
+ * Operation-wide timeout. Races the ENTIRE chain (all retry attempts +
113
+ * delays) against a hard budget that does NOT reset.
44
114
  *
45
115
  * Place this as the OUTERMOST policy so the clock starts before any other
46
116
  * policy runs and stops regardless of what the inner chain is do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AAI,EAAE,iBAAiB,CAAC,CAAA;AACnD,CAAC"}
@@ -1,7 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InMemoryStore = void 0;
4
- // Re-export shim — implementation moved to src/stores/memory.ts in v1.1.
5
- // Kept for one version to preserve git blame and ease internal refactors.
4
+ /**
5
+ * @deprecated since v1.1.5 import from `'actly'` directly.
6
+ *
7
+ * This re-export shim exists for backwards compatibility with code that
8
+ * imported `InMemoryStore` from `'actly/state/store'`. It will be removed
9
+ * in v2.0.0.
10
+ *
11
+ * The implementation has moved to `src/stores/memory.ts`.
12
+ */
6
13
  var memory_js_1 = require("../stores/memory.js");
7
14
  Object.defineProperty(exports, "InMemoryStore", { enumerable: true, get: function () { return memory_js_1.InMemoryStore; } });
@@ -1,2 +1,11 @@
1
+ /**
2
+ * @deprecated since v1.1.5 — import from `'actly'` directly.
3
+ *
4
+ * This re-export shim exists for backwards compatibility with code that
5
+ * imported `InMemoryStore` from `'actly/state/store'`. It will be removed
6
+ * in v2.0.0.
7
+ *
8
+ * The implementation has moved to `src/stores/memory.ts`.
9
+ */
1
10
  export { InMemoryStore } from '../stores/memory.js';
2
11
  //# sourceMappingURL=store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/state/store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/state/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,4 +1,11 @@
1
- // Re-export shim — implementation moved to src/stores/memory.ts in v1.1.
2
- // Kept for one version to preserve git blame and ease internal refactors.
1
+ /**
2
+ * @deprecated since v1.1.5 import from `'actly'` directly.
3
+ *
4
+ * This re-export shim exists for backwards compatibility with code that
5
+ * imported `InMemoryStore` from `'actly/state/store'`. It will be removed
6
+ * in v2.0.0.
7
+ *
8
+ * The implementation has moved to `src/stores/memory.ts`.
9
+ */
3
10
  export { InMemoryStore } from '../stores/memory.js';
4
11
  //# sourceMappingURL=store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/state/store.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/state/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
@@ -5,15 +5,15 @@ exports.isSyncStore = isSyncStore;
5
5
  exports.isAsyncStore = isAsyncStore;
6
6
  // ─── Type guards ──────────────────────────────────────────────────────────────
7
7
  /**
8
- * Narrows AnyStateStore to SyncStateStore via the _sync discriminant.
9
- * Used by execute() and cachePolicy to branch between sync and async paths.
8
+ * Narrows `AnyStateStore` to `SyncStateStore` via the `_sync` discriminant.
9
+ * Used by `execute()` and `cachePolicy` to branch between sync and async paths.
10
10
  */
11
11
  function isSyncStore(store) {
12
12
  return store._sync === true;
13
13
  }
14
14
  /**
15
- * Narrows AnyStateStore to AsyncStateStore via the _sync discriminant.
16
- * Provided for symmetry; prefer isSyncStore for the common guard pattern.
15
+ * Narrows `AnyStateStore` to `AsyncStateStore` via the `_sync` discriminant.
16
+ * Provided for symmetry; prefer `isSyncStore` for the common guard pattern.
17
17
  */
18
18
  function isAsyncStore(store) {
19
19
  return store._sync === false;
@@ -3,34 +3,28 @@
3
3
  *
4
4
  * # Why synchronous?
5
5
  *
6
- * dedupePolicy must read an in-flight Promise from the store and, if absent,
7
- * write a new one — all within a single synchronous frame. If get() were async,
8
- * two concurrent callers could both observe a miss before either write lands,
9
- * defeating deduplication entirely. There is no lock primitive in JavaScript
10
- * that can paper over this: the constraint is structural, not implementation-
11
- * level.
6
+ * `dedupePolicy` must read an in-flight Promise from the store and, if absent,
7
+ * write a new one — all within a single synchronous frame. If `get()` were
8
+ * async, two concurrent callers could both observe a miss before either
9
+ * write lands, defeating deduplication entirely. There is no lock primitive
10
+ * in JavaScript that can paper over this: the constraint is structural, not
11
+ * implementation-level.
12
12
  *
13
- * # The _sync discriminant
13
+ * # The `_sync` discriminant
14
14
  *
15
- * `_sync: true` is a runtime tag that lets execute() enforce the dedupe
16
- * constraint for plain-JS callers who bypass TypeScript. It is NOT part of the
17
- * semantic contract and MUST NOT be used for anything beyond that guard.
15
+ * `_sync: true` is a runtime tag that lets `execute()` enforce the dedupe
16
+ * constraint for plain-JS callers who bypass TypeScript. It is NOT part of
17
+ * the semantic contract and MUST NOT be used for anything beyond that guard.
18
18
  * Implementations must set it as a `readonly` literal (`true as const`).
19
19
  *
20
20
  * # Lifecycle
21
21
  *
22
22
  * Implementations that hold background resources (timers, connections) should
23
- * expose a `destroy()` method as a convention, though it is not part of this
24
- * interface — the async counterpart cannot enforce it symmetrically without
25
- * requiring Promise returns. See InMemoryStore for the reference pattern.
26
- *
27
- * InMemoryStore is the canonical implementation of this interface.
23
+ * expose a `destroy()` method as a convention. See `InMemoryStore` for the
24
+ * reference pattern.
28
25
  */
29
26
  export interface SyncStateStore {
30
- /**
31
- * Runtime discriminant. Read by isSyncStore() in execute() to enforce the
32
- * dedupe constraint without an instanceof check. Must be `true as const`.
33
- */
27
+ /** Runtime discriminant. Must be `true as const`. */
34
28
  readonly _sync: true;
35
29
  get<T>(key: string): T | undefined;
36
30
  set<T>(key: string, value: T, ttlMs?: number): void;
@@ -38,13 +32,14 @@ export interface SyncStateStore {
38
32
  has(key: string): boolean;
39
33
  /**
40
34
  * Remove all entries synchronously.
41
- * Must be deterministic: after clear() returns, size() must return 0.
35
+ * After `clear()` returns, `size()` returns 0.
42
36
  */
43
37
  clear(): void;
44
38
  /**
45
39
  * Return the count of live (non-expired) entries.
46
- * Expired entries must not be counted, but implementations are free to
47
- * evict lazily the count must reflect only entries observable via get().
40
+ * Side-effect free: does not mutate the store. Implementations MAY evict
41
+ * expired entries opportunistically during this call, but MUST NOT have
42
+ * observable side effects beyond internal cleanup.
48
43
  */
49
44
  size(): number;
50
45
  }
@@ -53,60 +48,41 @@ export interface SyncStateStore {
53
48
  *
54
49
  * # Policy compatibility
55
50
  *
56
- * Compatible with cachePolicy only. Passing an AsyncStateStore to a policy
57
- * chain that includes dedupePolicy is a TypeScript error and a runtime error —
58
- * execute() will throw at chain-build time. See SyncStateStore for why dedupe
59
- * requires synchronous access.
51
+ * Compatible with `cachePolicy` only. Passing an `AsyncStateStore` to a
52
+ * policy chain that includes `dedupePolicy` is a TypeScript error and a
53
+ * runtime error — `execute()` throws at chain-build time. See
54
+ * `SyncStateStore` for why dedupe requires synchronous access.
60
55
  *
61
56
  * # TTL semantics
62
57
  *
63
- * The store is responsible for honouring ttlMs. Actly passes it as a hint.
58
+ * The store is responsible for honouring `ttlMs`. Actly passes it as a hint.
64
59
  * Implementations may delegate to a native TTL mechanism (e.g. Redis EXPIRE).
65
- * There is no enforcement layer above the store boundary.
66
60
  *
67
- * # The _sync discriminant
61
+ * # The `_sync` discriminant
68
62
  *
69
- * `_sync: false` mirrors the discriminant on SyncStateStore. The executor uses
70
- * this at runtime to reject async stores in contexts that require synchronous
71
- * access. Must be set as a `readonly` literal (`false as const`).
72
- *
73
- * # Contract parity
74
- *
75
- * clear() and size() mirror the SyncStateStore contract so callers building
76
- * against AnyStateStore can rely on both operations regardless of which variant
77
- * they receive. Async implementations that do not have a native equivalent
78
- * (e.g. a bounded Redis namespace) must still satisfy the signature.
63
+ * `_sync: false` mirrors the discriminant on `SyncStateStore`. Must be set
64
+ * as a `readonly` literal (`false as const`).
79
65
  */
80
66
  export interface AsyncStateStore {
81
- /**
82
- * Runtime discriminant. Must be `false as const`.
83
- */
67
+ /** Runtime discriminant. Must be `false as const`. */
84
68
  readonly _sync: false;
85
69
  get<T>(key: string): Promise<T | undefined>;
86
70
  set<T>(key: string, value: T, ttlMs?: number): Promise<void>;
87
71
  delete(key: string): Promise<void>;
88
72
  has(key: string): Promise<boolean>;
89
- /**
90
- * Remove all entries managed by this store.
91
- * For scoped adapters (e.g. a Redis key-prefix namespace), remove only the
92
- * entries owned by this instance — not the entire backing store.
93
- */
73
+ /** Remove all entries managed by this store. */
94
74
  clear(): Promise<void>;
95
- /**
96
- * Return the count of live (non-expired) entries.
97
- * Expired entries must not be counted. For eventually-consistent backends,
98
- * the count is a best-effort snapshot at the time of the call.
99
- */
75
+ /** Return the count of live (non-expired) entries. */
100
76
  size(): Promise<number>;
101
77
  }
102
78
  /**
103
- * Narrows AnyStateStore to SyncStateStore via the _sync discriminant.
104
- * Used by execute() and cachePolicy to branch between sync and async paths.
79
+ * Narrows `AnyStateStore` to `SyncStateStore` via the `_sync` discriminant.
80
+ * Used by `execute()` and `cachePolicy` to branch between sync and async paths.
105
81
  */
106
82
  export declare function isSyncStore(store: SyncStateStore | AsyncStateStore): store is SyncStateStore;
107
83
  /**
108
- * Narrows AnyStateStore to AsyncStateStore via the _sync discriminant.
109
- * Provided for symmetry; prefer isSyncStore for the common guard pattern.
84
+ * Narrows `AnyStateStore` to `AsyncStateStore` via the `_sync` discriminant.
85
+ * Provided for symmetry; prefer `isSyncStore` for the common guard pattern.
110
86
  */
111
87
  export declare function isAsyncStore(store: SyncStateStore | AsyncStateStore): store is AsyncStateStore;
112
88
  //# sourceMappingURL=base.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/stores/base.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAA;IAEpB,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAA;IAClC,GAAG,CAAC,CAAC,E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ED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,cAAc,GAAG,eAAe,GACtC,KAAK,IAAI,eAAe,CAE1B"}
@@ -1,15 +1,15 @@
1
1
  // ─── Store interfaces ─────────────────────────────────────────────────────────
2
2
  // ─── Type guards ──────────────────────────────────────────────────────────────
3
3
  /**
4
- * Narrows AnyStateStore to SyncStateStore via the _sync discriminant.
5
- * Used by execute() and cachePolicy to branch between sync and async paths.
4
+ * Narrows `AnyStateStore` to `SyncStateStore` via the `_sync` discriminant.
5
+ * Used by `execute()` and `cachePolicy` to branch between sync and async paths.
6
6
  */
7
7
  export function isSyncStore(store) {
8
8
  return store._sync === true;
9
9
  }
10
10
  /**
11
- * Narrows AnyStateStore to AsyncStateStore via the _sync discriminant.
12
- * Provided for symmetry; prefer isSyncStore for the common guard pattern.
11
+ * Narrows `AnyStateStore` to `AsyncStateStore` via the `_sync` discriminant.
12
+ * Provided for symmetry; prefer `isSyncStore` for the common guard pattern.
13
13
  */
14
14
  export function isAsyncStore(store) {
15
15
  return store._sync === false;
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/stores/base.ts"],"names":[],"mappings":"AAAA,iFAAiF;AA+GjF,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuC;IACjE,OAAO,KAAK,CAAC,KAAK,KAAK,IAAI,CAAA;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,KAAuC;IAClE,OAAO,KAAK,CAAC,KAAK,KAAK,KAAK,CAAA;AAC9B,CAAC"}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/stores/base.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAuFjF,iFAAiF;AAEjF;;;GAGG;AACH,MAAM,UAAU,WAAW,CACzB,KAAuC;IAEvC,OAAO,KAAK,CAAC,KAAK,KAAK,IAAI,CAAA;AAC7B,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAuC;IAEvC,OAAO,KAAK,CAAC,KAAK,KAAK,KAAK,CAAA;AAC9B,CAAC"}