@cotal-ai/delivery 0.140.2 → 0.140.3
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-health.d.ts","sourceRoot":"","sources":["../src/transport-health.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transport-health.d.ts","sourceRoot":"","sources":["../src/transport-health.ts"],"names":[],"mappings":"AAMA;;gGAEgG;AAChG,qBAAa,uBAAuB;IAShC,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,mBAAmB;IACpC,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG;IAZtB,OAAO,CAAC,SAAS,CAAQ;IACzB,OAAO,CAAC,cAAc,CAAK;IAC3B,OAAO,CAAC,GAAG,CAAgB;IAC3B,OAAO,CAAC,KAAK,CAA6C;IAC1D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;gBAGL,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,GAAG,UAAU,GAAG,oBAAoB,KAAK,IAAI,EAC3E,mBAAmB,EAAE,MAAM,IAAI,EAC/B,QAAQ,SAAS,EACjB,UAAU,SAAe,EACzB,GAAG,GAAE,MAAM,MAAiB;IAK/C;0FACsF;IACtF,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAenC;wFACoF;IACpF,OAAO,IAAI,IAAI;IAOf;kGAC8F;IAC9F,iBAAiB,IAAI,IAAI;IAQzB,OAAO,CAAC,QAAQ;IAQhB,OAAO,CAAC,QAAQ;IAwBhB,IAAI,IAAI,IAAI;IAKZ,OAAO,CAAC,KAAK;CAId"}
|
package/dist/transport-health.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { LoopLagMeter } from "./watchdog.js";
|
|
2
|
+
/** The timer's period, which is also the nominal interval of the meter it ticks. Any difference
|
|
3
|
+
* between the two is charged to every on-time firing as scheduler lag. */
|
|
4
|
+
const TICK_MS = 250;
|
|
2
5
|
/** Delivery's broker coupling, driven by the resident NATS connection rather than a second
|
|
3
6
|
* authenticated connection. A successful credential adoption counts only after the caller has
|
|
4
7
|
* proved it against the broker; a disconnected socket cannot be made healthy by an adoption. */
|
|
@@ -10,7 +13,7 @@ export class DeliveryTransportHealth {
|
|
|
10
13
|
now;
|
|
11
14
|
connected = true;
|
|
12
15
|
disconnectedAt = 0;
|
|
13
|
-
lag
|
|
16
|
+
lag; // built by each armTimer, whose timer is its only reader
|
|
14
17
|
timer;
|
|
15
18
|
stopped = false;
|
|
16
19
|
expired = false;
|
|
@@ -50,7 +53,6 @@ export class DeliveryTransportHealth {
|
|
|
50
53
|
return;
|
|
51
54
|
this.expired = false;
|
|
52
55
|
this.disconnectedAt = 0;
|
|
53
|
-
this.lag.reset();
|
|
54
56
|
this.clear();
|
|
55
57
|
}
|
|
56
58
|
/** NATS reports authentication expiry as an explicit status error before its disconnect edge.
|
|
@@ -67,9 +69,9 @@ export class DeliveryTransportHealth {
|
|
|
67
69
|
armTimer() {
|
|
68
70
|
if (this.timer !== undefined)
|
|
69
71
|
return;
|
|
70
|
-
this.lag = new LoopLagMeter(
|
|
72
|
+
this.lag = new LoopLagMeter(TICK_MS);
|
|
71
73
|
this.lag.tick(this.now());
|
|
72
|
-
this.timer = setInterval(() => this.evaluate(),
|
|
74
|
+
this.timer = setInterval(() => this.evaluate(), TICK_MS);
|
|
73
75
|
this.timer.unref?.();
|
|
74
76
|
}
|
|
75
77
|
evaluate() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport-health.js","sourceRoot":"","sources":["../src/transport-health.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C;;gGAEgG;AAChG,MAAM,OAAO,uBAAuB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CAAC;IACzB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cotal-ai/delivery",
|
|
3
3
|
"description": "Cotal delivery daemon: the server-side Plane-3 durable backstop (fan-out writer + trusted reader + membership/ACL authority), a scoped least-privilege NATS client co-located with the broker.",
|
|
4
|
-
"version": "0.140.
|
|
4
|
+
"version": "0.140.3",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@cotal-ai/core": "0.140.
|
|
22
|
-
"@cotal-ai/workspace": "0.140.
|
|
21
|
+
"@cotal-ai/core": "0.140.3",
|
|
22
|
+
"@cotal-ai/workspace": "0.140.3",
|
|
23
23
|
"@nats-io/jetstream": "^3.4.0"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|