@masons/agent-network 0.5.32 → 0.5.321
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/broker/broker-daemon.d.ts +3 -0
- package/dist/broker/broker-daemon.d.ts.map +1 -1
- package/dist/broker/broker-daemon.js +48 -1
- package/dist/broker/received-message-correlation-cache.d.ts +23 -0
- package/dist/broker/received-message-correlation-cache.d.ts.map +1 -0
- package/dist/broker/received-message-correlation-cache.js +114 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -35,6 +35,8 @@ export interface BrokerDaemonOptions {
|
|
|
35
35
|
logger: BrokerLogger;
|
|
36
36
|
}) => ServicesEventClient;
|
|
37
37
|
postControlAck?: (ack: ControlAck) => Promise<void>;
|
|
38
|
+
replyCorrelationTtlMs?: number;
|
|
39
|
+
replyCorrelationCapPerEndpoint?: number;
|
|
38
40
|
}
|
|
39
41
|
export interface RunningBroker {
|
|
40
42
|
bearerToken: string;
|
|
@@ -47,6 +49,7 @@ export interface RunningBroker {
|
|
|
47
49
|
networkPresence(): NetworkPresence;
|
|
48
50
|
pendingSpawnCount(): number;
|
|
49
51
|
retryQueueSize(): number;
|
|
52
|
+
replyCorrelationCacheSize(endpoint_id: string): number;
|
|
50
53
|
}
|
|
51
54
|
export declare function startBrokerDaemon(opts: BrokerDaemonOptions): Promise<RunningBroker>;
|
|
52
55
|
export declare function readPluginPidHeader(req: IncomingMessage): number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broker-daemon.d.ts","sourceRoot":"","sources":["../../src/broker/broker-daemon.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAqB,KAAK,IAAI,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6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AAI,CAAC,CAAC;IAExC,YAAY,IAAI,MAAM,CAAC;IAGvB,KAAK,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;IAEtD,iBAAiB,EAAE,iBAAiB,CAAC;IAErC,sBAAsB,EAAE,sBAAsB,CAAC;IAE/C,eAAe,IAAI,eAAe,CAAC;IAEnC,iBAAiB,IAAI,MAAM,CAAC;IAE5B,cAAc,IAAI,MAAM,CAAC;IAGzB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;CACxD;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,aAAa,CAAC,CAoiCxB;AAGD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAMvE;AAED,YAAY,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { createGraceTimerManager } from "./grace-timer.js";
|
|
|
8
8
|
import { BrokerHttpError, pushToPlugin, startIPCServer, } from "./ipc-server.js";
|
|
9
9
|
import { transitionPresence, } from "./network-presence.js";
|
|
10
10
|
import { isPluginAlive as defaultIsPluginAlive } from "./plugin-liveness.js";
|
|
11
|
+
import { createReceivedMessageCorrelationCache, DEFAULT_TTL_MS as DEFAULT_REPLY_CORRELATION_TTL_MS, } from "./received-message-correlation-cache.js";
|
|
11
12
|
import { createReconnectingBufferManager, } from "./reconnecting-buffer.js";
|
|
12
13
|
import { RoutingTable } from "./routing-table.js";
|
|
13
14
|
import { createSpawnCorrelationManager, createSpawnRateLimiter, } from "./spawn-correlation.js";
|
|
@@ -55,6 +56,27 @@ export async function startBrokerDaemon(opts) {
|
|
|
55
56
|
});
|
|
56
57
|
},
|
|
57
58
|
});
|
|
59
|
+
const replyCorrelationCache = createReceivedMessageCorrelationCache({
|
|
60
|
+
ttlMs: opts.replyCorrelationTtlMs,
|
|
61
|
+
capPerEndpoint: opts.replyCorrelationCapPerEndpoint,
|
|
62
|
+
});
|
|
63
|
+
const replyCorrelationTtl = opts.replyCorrelationTtlMs ?? DEFAULT_REPLY_CORRELATION_TTL_MS;
|
|
64
|
+
const replyCorrelationSweepInterval = Math.max(Math.floor(replyCorrelationTtl / 4), 60_000);
|
|
65
|
+
const replyCorrelationSweepTimer = setInterval(() => {
|
|
66
|
+
const evicted = replyCorrelationCache.sweep();
|
|
67
|
+
if (evicted > 0) {
|
|
68
|
+
logger.info("reply_correlation_cache_sweep", { evicted });
|
|
69
|
+
}
|
|
70
|
+
}, replyCorrelationSweepInterval);
|
|
71
|
+
replyCorrelationSweepTimer.unref?.();
|
|
72
|
+
const recordInboundCorrelation = (endpoint_id, metadata) => {
|
|
73
|
+
const c = metadata && typeof metadata.correlation_id === "string"
|
|
74
|
+
? metadata.correlation_id
|
|
75
|
+
: undefined;
|
|
76
|
+
if (!c)
|
|
77
|
+
return;
|
|
78
|
+
replyCorrelationCache.record(endpoint_id, c);
|
|
79
|
+
};
|
|
58
80
|
let networkPresence = "offline";
|
|
59
81
|
let presenceGraceTimer;
|
|
60
82
|
const applyPresenceTransition = (event) => {
|
|
@@ -175,6 +197,7 @@ export async function startBrokerDaemon(opts) {
|
|
|
175
197
|
break;
|
|
176
198
|
case "remove_from_registry":
|
|
177
199
|
registry.unregister(endpoint_id);
|
|
200
|
+
replyCorrelationCache.forgetEndpoint(endpoint_id);
|
|
178
201
|
void apiPort.unregister(endpoint_id).catch(() => {
|
|
179
202
|
});
|
|
180
203
|
break;
|
|
@@ -216,6 +239,7 @@ export async function startBrokerDaemon(opts) {
|
|
|
216
239
|
dispatched_by: "passport",
|
|
217
240
|
},
|
|
218
241
|
};
|
|
242
|
+
recordInboundCorrelation(target.endpoint_id, stamped.metadata);
|
|
219
243
|
if (target.state === "active") {
|
|
220
244
|
pushToPlugin(target.ipc_ws, stamped);
|
|
221
245
|
}
|
|
@@ -413,7 +437,27 @@ export async function startBrokerDaemon(opts) {
|
|
|
413
437
|
incoming.source_endpoint_id !== body.endpoint_id) {
|
|
414
438
|
throw new BrokerHttpError(403, "source_endpoint_id_mismatch", "metadata.source_endpoint_id must equal body.endpoint_id");
|
|
415
439
|
}
|
|
416
|
-
const
|
|
440
|
+
const inReplyTo = typeof incoming.in_reply_to === "string"
|
|
441
|
+
? incoming.in_reply_to
|
|
442
|
+
: undefined;
|
|
443
|
+
let correlationId;
|
|
444
|
+
if (inReplyTo) {
|
|
445
|
+
const resolved = replyCorrelationCache.resolve(body.endpoint_id, inReplyTo);
|
|
446
|
+
if (resolved.ok) {
|
|
447
|
+
correlationId = inReplyTo;
|
|
448
|
+
}
|
|
449
|
+
else {
|
|
450
|
+
logger.warn("reply_aware_fallback", {
|
|
451
|
+
endpoint_id: body.endpoint_id,
|
|
452
|
+
in_reply_to: inReplyTo,
|
|
453
|
+
reason: resolved.reason,
|
|
454
|
+
});
|
|
455
|
+
correlationId = randomUUID();
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
correlationId = randomUUID();
|
|
460
|
+
}
|
|
417
461
|
entry.correlation_ring.add(correlationId);
|
|
418
462
|
const metadata = {
|
|
419
463
|
...incoming,
|
|
@@ -547,6 +591,7 @@ export async function startBrokerDaemon(opts) {
|
|
|
547
591
|
const correlation_id = typeof meta.correlation_id === "string" ? meta.correlation_id : undefined;
|
|
548
592
|
const decision = router.route({ target_endpoint_id, correlation_id });
|
|
549
593
|
if (decision.kind === "endpoint") {
|
|
594
|
+
recordInboundCorrelation(decision.entry.endpoint_id, meta);
|
|
550
595
|
if (decision.entry.state === "active") {
|
|
551
596
|
pushToPlugin(decision.entry.ipc_ws, {
|
|
552
597
|
event: "message_received",
|
|
@@ -660,6 +705,7 @@ export async function startBrokerDaemon(opts) {
|
|
|
660
705
|
clearTimeout(presenceGraceTimer);
|
|
661
706
|
presenceGraceTimer = undefined;
|
|
662
707
|
}
|
|
708
|
+
clearInterval(replyCorrelationSweepTimer);
|
|
663
709
|
if (retryQueue.size() > 0) {
|
|
664
710
|
logger.warn("retry_queue_dropped_on_shutdown", {
|
|
665
711
|
size: retryQueue.size(),
|
|
@@ -700,6 +746,7 @@ export async function startBrokerDaemon(opts) {
|
|
|
700
746
|
networkPresence: () => networkPresence,
|
|
701
747
|
pendingSpawnCount: () => spawnCorrelation.size(),
|
|
702
748
|
retryQueueSize: () => retryQueue.size(),
|
|
749
|
+
replyCorrelationCacheSize: (endpoint_id) => replyCorrelationCache.sizeForEndpoint(endpoint_id),
|
|
703
750
|
};
|
|
704
751
|
}
|
|
705
752
|
export function readPluginPidHeader(req) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const DEFAULT_TTL_MS = 86400000;
|
|
2
|
+
export declare const DEFAULT_CAP_PER_ENDPOINT = 1000;
|
|
3
|
+
export interface ReceivedMessageCorrelationCacheOptions {
|
|
4
|
+
ttlMs?: number;
|
|
5
|
+
capPerEndpoint?: number;
|
|
6
|
+
now?: () => number;
|
|
7
|
+
}
|
|
8
|
+
export type ReplyAwareResolve = {
|
|
9
|
+
ok: true;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
reason: "unknown_correlation_id" | "wrong_endpoint" | "ttl_expired";
|
|
13
|
+
};
|
|
14
|
+
export interface ReceivedMessageCorrelationCache {
|
|
15
|
+
record(endpoint_id: string, correlation_id: string): void;
|
|
16
|
+
resolve(endpoint_id: string, correlation_id: string): ReplyAwareResolve;
|
|
17
|
+
size(): number;
|
|
18
|
+
sizeForEndpoint(endpoint_id: string): number;
|
|
19
|
+
sweep(now?: number): number;
|
|
20
|
+
forgetEndpoint(endpoint_id: string): void;
|
|
21
|
+
}
|
|
22
|
+
export declare function createReceivedMessageCorrelationCache(opts?: ReceivedMessageCorrelationCacheOptions): ReceivedMessageCorrelationCache;
|
|
23
|
+
//# sourceMappingURL=received-message-correlation-cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"received-message-correlation-cache.d.ts","sourceRoot":"","sources":["../../src/broker/received-message-correlation-cache.ts"],"names":[],"mappings":"AA8DA,eAAO,MAAM,cAAc,WAAa,CAAC;AAGzC,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,MAAM,WAAW,sCAAsC;IAErD,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GACZ;IACE,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,wBAAwB,GAAG,gBAAgB,GAAG,aAAa,CAAC;CACrE,CAAC;AAMN,MAAM,WAAW,+BAA+B;IAa9C,MAAM,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAQ1D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,iBAAiB,CAAC;IAGxE,IAAI,IAAI,MAAM,CAAC;IAGf,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;IAQ7C,KAAK,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAM5B,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3C;AAED,wBAAgB,qCAAqC,CACnD,IAAI,GAAE,sCAA2C,GAChD,+BAA+B,CAgIjC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
export const DEFAULT_TTL_MS = 86_400_000;
|
|
2
|
+
export const DEFAULT_CAP_PER_ENDPOINT = 1000;
|
|
3
|
+
export function createReceivedMessageCorrelationCache(opts = {}) {
|
|
4
|
+
const ttlMs = opts.ttlMs ?? DEFAULT_TTL_MS;
|
|
5
|
+
const cap = opts.capPerEndpoint ?? DEFAULT_CAP_PER_ENDPOINT;
|
|
6
|
+
const clock = opts.now ?? Date.now;
|
|
7
|
+
if (ttlMs <= 0)
|
|
8
|
+
throw new Error(`ttlMs must be positive: ${ttlMs}`);
|
|
9
|
+
if (cap <= 0)
|
|
10
|
+
throw new Error(`capPerEndpoint must be positive: ${cap}`);
|
|
11
|
+
const perEndpoint = new Map();
|
|
12
|
+
const correlationOwner = new Map();
|
|
13
|
+
const evict = (endpoint_id, correlation_id) => {
|
|
14
|
+
const inner = perEndpoint.get(endpoint_id);
|
|
15
|
+
if (!inner)
|
|
16
|
+
return;
|
|
17
|
+
inner.delete(correlation_id);
|
|
18
|
+
if (inner.size === 0)
|
|
19
|
+
perEndpoint.delete(endpoint_id);
|
|
20
|
+
if (correlationOwner.get(correlation_id) === endpoint_id) {
|
|
21
|
+
correlationOwner.delete(correlation_id);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
record(endpoint_id, correlation_id) {
|
|
26
|
+
const priorOwner = correlationOwner.get(correlation_id);
|
|
27
|
+
if (priorOwner && priorOwner !== endpoint_id) {
|
|
28
|
+
const priorInner = perEndpoint.get(priorOwner);
|
|
29
|
+
priorInner?.delete(correlation_id);
|
|
30
|
+
if (priorInner && priorInner.size === 0) {
|
|
31
|
+
perEndpoint.delete(priorOwner);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
let inner = perEndpoint.get(endpoint_id);
|
|
35
|
+
if (!inner) {
|
|
36
|
+
inner = new Map();
|
|
37
|
+
perEndpoint.set(endpoint_id, inner);
|
|
38
|
+
}
|
|
39
|
+
inner.delete(correlation_id);
|
|
40
|
+
inner.set(correlation_id, { received_at: clock() });
|
|
41
|
+
correlationOwner.set(correlation_id, endpoint_id);
|
|
42
|
+
while (inner.size > cap) {
|
|
43
|
+
const oldestKey = inner.keys().next().value;
|
|
44
|
+
if (oldestKey === undefined)
|
|
45
|
+
break;
|
|
46
|
+
inner.delete(oldestKey);
|
|
47
|
+
if (correlationOwner.get(oldestKey) === endpoint_id) {
|
|
48
|
+
correlationOwner.delete(oldestKey);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
resolve(endpoint_id, correlation_id) {
|
|
53
|
+
const owner = correlationOwner.get(correlation_id);
|
|
54
|
+
if (!owner) {
|
|
55
|
+
return { ok: false, reason: "unknown_correlation_id" };
|
|
56
|
+
}
|
|
57
|
+
if (owner !== endpoint_id) {
|
|
58
|
+
return { ok: false, reason: "wrong_endpoint" };
|
|
59
|
+
}
|
|
60
|
+
const inner = perEndpoint.get(endpoint_id);
|
|
61
|
+
const entry = inner?.get(correlation_id);
|
|
62
|
+
if (!entry) {
|
|
63
|
+
correlationOwner.delete(correlation_id);
|
|
64
|
+
return { ok: false, reason: "unknown_correlation_id" };
|
|
65
|
+
}
|
|
66
|
+
if (clock() - entry.received_at >= ttlMs) {
|
|
67
|
+
evict(endpoint_id, correlation_id);
|
|
68
|
+
return { ok: false, reason: "ttl_expired" };
|
|
69
|
+
}
|
|
70
|
+
return { ok: true };
|
|
71
|
+
},
|
|
72
|
+
size() {
|
|
73
|
+
let total = 0;
|
|
74
|
+
for (const inner of perEndpoint.values())
|
|
75
|
+
total += inner.size;
|
|
76
|
+
return total;
|
|
77
|
+
},
|
|
78
|
+
sizeForEndpoint(endpoint_id) {
|
|
79
|
+
return perEndpoint.get(endpoint_id)?.size ?? 0;
|
|
80
|
+
},
|
|
81
|
+
sweep(now = clock()) {
|
|
82
|
+
let evicted = 0;
|
|
83
|
+
for (const [endpoint_id, inner] of perEndpoint) {
|
|
84
|
+
const expired = [];
|
|
85
|
+
for (const [correlation_id, entry] of inner) {
|
|
86
|
+
if (now - entry.received_at >= ttlMs) {
|
|
87
|
+
expired.push(correlation_id);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
for (const correlation_id of expired) {
|
|
91
|
+
inner.delete(correlation_id);
|
|
92
|
+
if (correlationOwner.get(correlation_id) === endpoint_id) {
|
|
93
|
+
correlationOwner.delete(correlation_id);
|
|
94
|
+
}
|
|
95
|
+
evicted++;
|
|
96
|
+
}
|
|
97
|
+
if (inner.size === 0)
|
|
98
|
+
perEndpoint.delete(endpoint_id);
|
|
99
|
+
}
|
|
100
|
+
return evicted;
|
|
101
|
+
},
|
|
102
|
+
forgetEndpoint(endpoint_id) {
|
|
103
|
+
const inner = perEndpoint.get(endpoint_id);
|
|
104
|
+
if (!inner)
|
|
105
|
+
return;
|
|
106
|
+
for (const correlation_id of inner.keys()) {
|
|
107
|
+
if (correlationOwner.get(correlation_id) === endpoint_id) {
|
|
108
|
+
correlationOwner.delete(correlation_id);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
perEndpoint.delete(endpoint_id);
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PLUGIN_VERSION = "0.5.
|
|
1
|
+
export declare const PLUGIN_VERSION = "0.5.321";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PLUGIN_VERSION = "0.5.
|
|
1
|
+
export const PLUGIN_VERSION = "0.5.321";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masons/agent-network",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.321",
|
|
4
4
|
"description": "MASONS Agent Network — connects agent runtimes to the Agent Network over MSTP. Ships an OpenClaw channel plugin (root export) and subpath exports consumed by the Claude Code plugin today (planned: Codex and future hosts).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MASONS.ai <hello@masons.ai> (https://masons.ai)",
|