@primusclaw/personal-agent-runtime 0.15.2 → 0.15.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.
package/dist/index.js
CHANGED
|
@@ -1636,15 +1636,15 @@ var HELP = {
|
|
|
1636
1636
|
var HELP_CURRENT_ONLY = {
|
|
1637
1637
|
personal_agent_probe_total: [
|
|
1638
1638
|
"counter",
|
|
1639
|
-
"Delivery probes the worker answered, by outcome: answered (the relay's ack came back) or unanswered."
|
|
1639
|
+
"Delivery probes the worker answered, by outcome: answered (the relay's ack came back; with direct outbound the worker had the probe) or unanswered."
|
|
1640
1640
|
],
|
|
1641
1641
|
personal_agent_probe_feedback_ms: [
|
|
1642
1642
|
"gauge",
|
|
1643
|
-
"Milliseconds from the last probe's sending (by the ingress) to the worker's answer queued for the relay."
|
|
1643
|
+
"Milliseconds from the last probe's sending (by the ingress) to the worker's answer queued for the relay (with direct outbound: to the worker having the probe)."
|
|
1644
1644
|
],
|
|
1645
1645
|
personal_agent_probe_reply_ms: [
|
|
1646
1646
|
"gauge",
|
|
1647
|
-
"Milliseconds from the last answered probe's sending to the relay's ack of the answer reaching the worker."
|
|
1647
|
+
"Milliseconds from the last answered probe's sending to the relay's ack of the answer reaching the worker (with direct outbound: to the worker having the probe)."
|
|
1648
1648
|
],
|
|
1649
1649
|
personal_agent_probe_last_answered_seconds: [
|
|
1650
1650
|
"gauge",
|
|
@@ -1653,6 +1653,10 @@ var HELP_CURRENT_ONLY = {
|
|
|
1653
1653
|
personal_agent_inbound_rearmed_total: [
|
|
1654
1654
|
"counter",
|
|
1655
1655
|
"Times the inbound receivers' connection was re-opened because a call on the broker hung (once per connection)."
|
|
1656
|
+
],
|
|
1657
|
+
personal_agent_outbound_undelivered_total: [
|
|
1658
|
+
"counter",
|
|
1659
|
+
"Messages (sends, replies, updates) posted directly to the chat service that were not confirmed as delivered (the retries or the deadline used up, a refusal by the service, a token that could not be had, or an address the policy refuses, which fails before any request is made); each was thrown to its sender."
|
|
1656
1660
|
]
|
|
1657
1661
|
};
|
|
1658
1662
|
function compareTuples(a, b) {
|
|
@@ -1686,6 +1690,7 @@ var PrometheusMetrics = class {
|
|
|
1686
1690
|
/** Event type -> (receipt to sent, occurred to sent), each written from the start. */
|
|
1687
1691
|
probes = { answered: 0, unanswered: 0, feedbackMs: 0, replyMs: 0, answeredAt: 0 };
|
|
1688
1692
|
rearmed = 0;
|
|
1693
|
+
undelivered = 0;
|
|
1689
1694
|
eventTimes = new Map(
|
|
1690
1695
|
DELIVERED_EVENT_TYPES.map((t) => [t, [new Histogram(EVENT_BUCKETS), new Histogram(EVENT_BUCKETS)]])
|
|
1691
1696
|
);
|
|
@@ -1747,6 +1752,9 @@ var PrometheusMetrics = class {
|
|
|
1747
1752
|
inboundRearmed() {
|
|
1748
1753
|
this.rearmed += 1;
|
|
1749
1754
|
}
|
|
1755
|
+
outboundUndelivered() {
|
|
1756
|
+
this.undelivered += 1;
|
|
1757
|
+
}
|
|
1750
1758
|
/** The longest wait of the messages handled in the window, in milliseconds (0: none). */
|
|
1751
1759
|
lagMaxMs() {
|
|
1752
1760
|
this.expire(this.clock.monotonicMs());
|
|
@@ -1776,7 +1784,8 @@ var PrometheusMetrics = class {
|
|
|
1776
1784
|
["personal_agent_probe_feedback_ms", this.probes.feedbackMs],
|
|
1777
1785
|
["personal_agent_probe_reply_ms", this.probes.replyMs],
|
|
1778
1786
|
["personal_agent_probe_last_answered_seconds", this.probes.answeredAt],
|
|
1779
|
-
["personal_agent_inbound_rearmed_total", this.rearmed]
|
|
1787
|
+
["personal_agent_inbound_rearmed_total", this.rearmed],
|
|
1788
|
+
["personal_agent_outbound_undelivered_total", this.undelivered]
|
|
1780
1789
|
];
|
|
1781
1790
|
for (const [name, value] of gauges) {
|
|
1782
1791
|
head2(name);
|
|
@@ -42,6 +42,7 @@ export declare class PrometheusMetrics implements MetricsPort {
|
|
|
42
42
|
/** Event type -> (receipt to sent, occurred to sent), each written from the start. */
|
|
43
43
|
private probes;
|
|
44
44
|
private rearmed;
|
|
45
|
+
private undelivered;
|
|
45
46
|
private readonly eventTimes;
|
|
46
47
|
constructor(clock: Clock, lagWindowMs?: number);
|
|
47
48
|
/** Inbound messages handled so far. */
|
|
@@ -53,6 +54,7 @@ export declare class PrometheusMetrics implements MetricsPort {
|
|
|
53
54
|
filesDropped(path: string, count?: number): void;
|
|
54
55
|
probed(feedbackMs: number, replyMs: number | null): void;
|
|
55
56
|
inboundRearmed(): void;
|
|
57
|
+
outboundUndelivered(): void;
|
|
56
58
|
/** The longest wait of the messages handled in the window, in milliseconds (0: none). */
|
|
57
59
|
lagMaxMs(): number;
|
|
58
60
|
private expire;
|
package/dist/worker.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primusclaw/personal-agent-runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "Node adapters for the personal agent's ports (clock, randomness, logging, storage, Claw, metrics, HTTP), and, at @primusclaw/personal-agent-runtime/worker, the worker process on any chat surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@primusclaw/personal-agent": "0.15.
|
|
36
|
+
"@primusclaw/personal-agent": "0.15.3",
|
|
37
37
|
"fastify": "^5.12.8",
|
|
38
38
|
"zod": "^4.6.7"
|
|
39
39
|
}
|