@rulvar/store-sqlite 1.56.0 → 1.58.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/dist/index.d.ts CHANGED
@@ -129,6 +129,24 @@ interface SqliteQuotaLimiterOptions {
129
129
  /** Injectable clock for window tests. */
130
130
  now?: () => number;
131
131
  }
132
+ /**
133
+ * The cross-process reference implementation of the core QuotaLimiter
134
+ * SPI: engine processes pointing instances at ONE database file (this
135
+ * store's file or its own) enforce one global provider quota.
136
+ * Admission consumes the window counters inside a single
137
+ * `BEGIN IMMEDIATE` transaction, so two processes can never both take
138
+ * the last slot; reservations are rows, so `reconcile` settles a
139
+ * grant from any process; both tables are lazily pruned to the
140
+ * current and previous accounting window. The rule model, the fixed
141
+ * epoch-aligned one-minute windows, and the admission decision are
142
+ * the core's own exported functions, so this limiter and
143
+ * `memoryQuotaLimiter` agree on every verdict. The `rules` MUST be
144
+ * identical across coordinating processes (buckets key on rule
145
+ * content). Runtime contention queues briefly on the connection's
146
+ * busy_timeout (a hot limiter is EXPECTED to serialize); a call still
147
+ * busy past the bound throws, and the engine's `onLimiterError`
148
+ * policy decides what that means. Call `close()` when done.
149
+ */
132
150
  declare class SqliteQuotaLimiter implements QuotaLimiter {
133
151
  private readonly db;
134
152
  private readonly rules;
package/dist/index.js CHANGED
@@ -416,6 +416,24 @@ function ruleKey(rule) {
416
416
  tokensPerMinute: rule.tokensPerMinute ?? null
417
417
  });
418
418
  }
419
+ /**
420
+ * The cross-process reference implementation of the core QuotaLimiter
421
+ * SPI: engine processes pointing instances at ONE database file (this
422
+ * store's file or its own) enforce one global provider quota.
423
+ * Admission consumes the window counters inside a single
424
+ * `BEGIN IMMEDIATE` transaction, so two processes can never both take
425
+ * the last slot; reservations are rows, so `reconcile` settles a
426
+ * grant from any process; both tables are lazily pruned to the
427
+ * current and previous accounting window. The rule model, the fixed
428
+ * epoch-aligned one-minute windows, and the admission decision are
429
+ * the core's own exported functions, so this limiter and
430
+ * `memoryQuotaLimiter` agree on every verdict. The `rules` MUST be
431
+ * identical across coordinating processes (buckets key on rule
432
+ * content). Runtime contention queues briefly on the connection's
433
+ * busy_timeout (a hot limiter is EXPECTED to serialize); a call still
434
+ * busy past the bound throws, and the engine's `onLimiterError`
435
+ * policy decides what that means. Call `close()` when done.
436
+ */
419
437
  var SqliteQuotaLimiter = class {
420
438
  db;
421
439
  rules;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/store-sqlite",
3
- "version": "1.56.0",
3
+ "version": "1.58.0",
4
4
  "description": "Rulvar SQLite store implementing JournalStore and LeasableStore with a fencing epoch.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -22,13 +22,13 @@
22
22
  "access": "public"
23
23
  },
24
24
  "dependencies": {
25
- "@rulvar/core": "1.56.0"
25
+ "@rulvar/core": "1.58.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.20.0",
29
29
  "tsdown": "^0.22.3",
30
30
  "typescript": "~6.0.3",
31
- "@rulvar/store-conformance": "1.56.0"
31
+ "@rulvar/store-conformance": "1.58.0"
32
32
  },
33
33
  "repository": {
34
34
  "type": "git",