@claude-flow/plugin-agent-federation 1.0.0-alpha.8 → 1.0.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/README.md +4 -0
- package/dist/a2a/agent-card.d.ts +130 -0
- package/dist/a2a/agent-card.d.ts.map +1 -0
- package/dist/a2a/agent-card.js +239 -0
- package/dist/a2a/agent-card.js.map +1 -0
- package/dist/a2a/consume.d.ts +34 -0
- package/dist/a2a/consume.d.ts.map +1 -0
- package/dist/a2a/consume.js +69 -0
- package/dist/a2a/consume.js.map +1 -0
- package/dist/a2a/planner-descriptor.d.ts +40 -0
- package/dist/a2a/planner-descriptor.d.ts.map +1 -0
- package/dist/a2a/planner-descriptor.js +100 -0
- package/dist/a2a/planner-descriptor.js.map +1 -0
- package/dist/a2a/well-known.d.ts +46 -0
- package/dist/a2a/well-known.d.ts.map +1 -0
- package/dist/a2a/well-known.js +84 -0
- package/dist/a2a/well-known.js.map +1 -0
- package/dist/application/claim-checker.d.ts +27 -0
- package/dist/application/claim-checker.d.ts.map +1 -0
- package/dist/application/claim-checker.js +46 -0
- package/dist/application/claim-checker.js.map +1 -0
- package/dist/application/federation-breaker-service.d.ts +11 -1
- package/dist/application/federation-breaker-service.d.ts.map +1 -1
- package/dist/application/federation-breaker-service.js +12 -10
- package/dist/application/federation-breaker-service.js.map +1 -1
- package/dist/application/federation-coordinator.d.ts +48 -3
- package/dist/application/federation-coordinator.d.ts.map +1 -1
- package/dist/application/federation-coordinator.js +111 -22
- package/dist/application/federation-coordinator.js.map +1 -1
- package/dist/application/inbound-dispatcher.d.ts +114 -0
- package/dist/application/inbound-dispatcher.d.ts.map +1 -0
- package/dist/application/inbound-dispatcher.js +356 -0
- package/dist/application/inbound-dispatcher.js.map +1 -0
- package/dist/application/spend-reporter.d.ts +77 -0
- package/dist/application/spend-reporter.d.ts.map +1 -1
- package/dist/application/spend-reporter.js +76 -0
- package/dist/application/spend-reporter.js.map +1 -1
- package/dist/application/trust-evaluator.d.ts +32 -0
- package/dist/application/trust-evaluator.d.ts.map +1 -1
- package/dist/application/trust-evaluator.js +47 -0
- package/dist/application/trust-evaluator.js.map +1 -1
- package/dist/bin.d.ts +1 -1
- package/dist/bin.js +2 -2
- package/dist/bin.js.map +1 -1
- package/dist/cli-commands.d.ts.map +1 -1
- package/dist/cli-commands.js +125 -6
- package/dist/cli-commands.js.map +1 -1
- package/dist/domain/services/discovery-service.d.ts +18 -1
- package/dist/domain/services/discovery-service.d.ts.map +1 -1
- package/dist/domain/services/discovery-service.js +21 -0
- package/dist/domain/services/discovery-service.js.map +1 -1
- package/dist/domain/services/handshake-service.d.ts +10 -0
- package/dist/domain/services/handshake-service.d.ts.map +1 -1
- package/dist/domain/services/handshake-service.js +28 -0
- package/dist/domain/services/handshake-service.js.map +1 -1
- package/dist/domain/services/wg-firewall-service.d.ts +71 -0
- package/dist/domain/services/wg-firewall-service.d.ts.map +1 -0
- package/dist/domain/services/wg-firewall-service.js +194 -0
- package/dist/domain/services/wg-firewall-service.js.map +1 -0
- package/dist/domain/services/wg-mesh-service.d.ts +156 -0
- package/dist/domain/services/wg-mesh-service.d.ts.map +1 -0
- package/dist/domain/services/wg-mesh-service.js +292 -0
- package/dist/domain/services/wg-mesh-service.js.map +1 -0
- package/dist/domain/services/wg-witness-service.d.ts +98 -0
- package/dist/domain/services/wg-witness-service.d.ts.map +1 -0
- package/dist/domain/services/wg-witness-service.js +122 -0
- package/dist/domain/services/wg-witness-service.js.map +1 -0
- package/dist/domain/value-objects/wg-config.d.ts +70 -0
- package/dist/domain/value-objects/wg-config.d.ts.map +1 -0
- package/dist/domain/value-objects/wg-config.js +104 -0
- package/dist/domain/value-objects/wg-config.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-tools.d.ts +3 -1
- package/dist/mcp-tools.d.ts.map +1 -1
- package/dist/mcp-tools.js +114 -18
- package/dist/mcp-tools.js.map +1 -1
- package/dist/plugin.d.ts +3 -1
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +260 -4
- package/dist/plugin.js.map +1 -1
- package/dist/transport/midstream-aware-loader.d.ts +72 -0
- package/dist/transport/midstream-aware-loader.d.ts.map +1 -0
- package/dist/transport/midstream-aware-loader.js +269 -0
- package/dist/transport/midstream-aware-loader.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/package.json +22 -5
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Midstream-aware federation transport loader (ADR-120, Step 2).
|
|
3
|
+
*
|
|
4
|
+
* Extends the agentic-flow `loadQuicTransport` loader pattern with a
|
|
5
|
+
* preferred branch that probes `midstreamer` first. When `midstreamer`
|
|
6
|
+
* ships real QUIC (currently the WASM build is a counter-tracking
|
|
7
|
+
* stub per ADR-119), this loader picks it up automatically without
|
|
8
|
+
* any change to consumer plugins.
|
|
9
|
+
*
|
|
10
|
+
* Resolution order:
|
|
11
|
+
*
|
|
12
|
+
* 1. If `MIDSTREAMER_QUIC_NATIVE=1` AND the `midstreamer` module
|
|
13
|
+
* exposes a real `QuicMultistream`-derived `AgentTransport`,
|
|
14
|
+
* use it. (Today: probes fail closed and we fall through.)
|
|
15
|
+
*
|
|
16
|
+
* 2. Otherwise: defer to agentic-flow's existing loader, which
|
|
17
|
+
* itself respects `AGENTIC_FLOW_QUIC_NATIVE=1` (ADR-108) and
|
|
18
|
+
* falls back to WebSocket (ADR-104) otherwise.
|
|
19
|
+
*
|
|
20
|
+
* The loader is opt-in: callers must explicitly invoke
|
|
21
|
+
* `loadFederationTransport()` instead of `loadQuicTransport()`.
|
|
22
|
+
* Behavior is identical to `loadQuicTransport()` until upstream
|
|
23
|
+
* `midstreamer` ships its real QUIC build AND the operator sets the
|
|
24
|
+
* env flag — so this change is safe to land before any of that
|
|
25
|
+
* happens.
|
|
26
|
+
*
|
|
27
|
+
* Re-exports the `AgentTransport` / `AgentMessage` / `QuicTransportConfig`
|
|
28
|
+
* surface from agentic-flow so consumers only import from one place.
|
|
29
|
+
*/
|
|
30
|
+
function isCompatibleTransport(value, requireListen = false) {
|
|
31
|
+
if (!value || typeof value !== 'object')
|
|
32
|
+
return false;
|
|
33
|
+
const transport = value;
|
|
34
|
+
return (typeof transport.send === 'function' &&
|
|
35
|
+
typeof transport.onMessage === 'function' &&
|
|
36
|
+
(!requireListen || typeof transport.listen === 'function'));
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Lazy loader for agentic-flow's `loadQuicTransport`. Returns `null`
|
|
40
|
+
* when `agentic-flow` is not installed — callers must then fall back
|
|
41
|
+
* to the midstream-first path or surface a clear error.
|
|
42
|
+
*
|
|
43
|
+
* Per ADR-120 + issue #1949, `agentic-flow` is now an **optional**
|
|
44
|
+
* peer dependency. Operators who only want the midstream-native
|
|
45
|
+
* transport (via `MIDSTREAMER_QUIC_NATIVE=1`) can omit it to avoid
|
|
46
|
+
* the deep `koa-router` → `cookies@0.9.1` transitive chain that
|
|
47
|
+
* hardened npm registries reject.
|
|
48
|
+
*/
|
|
49
|
+
async function loadAgenticFlowQuicTransport(config) {
|
|
50
|
+
// Direct dynamic `import()` (not the `new Function` trick) so
|
|
51
|
+
// test frameworks like vitest can intercept via `vi.mock`. The
|
|
52
|
+
// try/catch makes the module-not-found case a clean `null` so the
|
|
53
|
+
// caller falls back gracefully — agentic-flow is now an optional
|
|
54
|
+
// peer dependency.
|
|
55
|
+
let mod;
|
|
56
|
+
try {
|
|
57
|
+
// Cast through `unknown` because upstream's exported AgentTransport /
|
|
58
|
+
// AgentMessage carry a richer surface (InboundMessageHandler with an
|
|
59
|
+
// options bag, extra fields) that intentionally differs from our
|
|
60
|
+
// locally-declared minimal shim. The shim exists so the plugin can
|
|
61
|
+
// compile without importing agentic-flow's exports map at all
|
|
62
|
+
// (#2578). Downstream code (`plugin.ts`) uses our shim types.
|
|
63
|
+
mod = (await import('agentic-flow/transport/loader'));
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const fn = typeof mod.loadQuicTransport === 'function'
|
|
69
|
+
? mod.loadQuicTransport
|
|
70
|
+
: mod.default?.loadQuicTransport;
|
|
71
|
+
if (typeof fn !== 'function') {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
const transport = await fn(config);
|
|
76
|
+
return isCompatibleTransport(transport, typeof config?.port === 'number')
|
|
77
|
+
? transport
|
|
78
|
+
: null;
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Plugin-owned ADR-104 WebSocket fallback. This closes issue #2618's
|
|
86
|
+
* failure mode: current `agentic-flow` releases do not export
|
|
87
|
+
* `agentic-flow/transport/loader`, so the federation plugin must not
|
|
88
|
+
* depend on that subpath for its baseline wire transport.
|
|
89
|
+
*/
|
|
90
|
+
class WebSocketFallbackTransport {
|
|
91
|
+
config;
|
|
92
|
+
handlers = [];
|
|
93
|
+
server = null;
|
|
94
|
+
sockets = new Set();
|
|
95
|
+
constructor(config = {}) {
|
|
96
|
+
this.config = config;
|
|
97
|
+
}
|
|
98
|
+
async send(address, message) {
|
|
99
|
+
const { default: WebSocket } = await import('ws');
|
|
100
|
+
const url = address.includes('://') ? address : `ws://${address}`;
|
|
101
|
+
const socket = new WebSocket(url);
|
|
102
|
+
await new Promise((resolve, reject) => {
|
|
103
|
+
socket.on('open', () => {
|
|
104
|
+
socket.send(JSON.stringify(message), (err) => {
|
|
105
|
+
socket.close();
|
|
106
|
+
if (err)
|
|
107
|
+
reject(err);
|
|
108
|
+
else
|
|
109
|
+
resolve();
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
socket.on('error', (err) => reject(err instanceof Error ? err : new Error(String(err))));
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
onMessage(handler) {
|
|
116
|
+
this.handlers.push(handler);
|
|
117
|
+
}
|
|
118
|
+
async listen(port = Number(this.config.port ?? 0), host = String(this.config.host ?? '0.0.0.0')) {
|
|
119
|
+
const { WebSocketServer } = await import('ws');
|
|
120
|
+
const server = new WebSocketServer({ port, host });
|
|
121
|
+
this.server = server;
|
|
122
|
+
await new Promise((resolve, reject) => {
|
|
123
|
+
server.on('listening', () => resolve());
|
|
124
|
+
server.on('error', (err) => reject(err instanceof Error ? err : new Error(String(err))));
|
|
125
|
+
server.on('connection', (socket, request) => {
|
|
126
|
+
const ws = socket;
|
|
127
|
+
this.sockets.add(ws);
|
|
128
|
+
const remoteAddress = (request?.socket);
|
|
129
|
+
const address = remoteAddress?.remoteAddress
|
|
130
|
+
? `${remoteAddress.remoteAddress}${remoteAddress.remotePort ? `:${remoteAddress.remotePort}` : ''}`
|
|
131
|
+
: 'unknown';
|
|
132
|
+
ws.on('message', (data) => {
|
|
133
|
+
try {
|
|
134
|
+
const raw = typeof data === 'string'
|
|
135
|
+
? data
|
|
136
|
+
: Buffer.isBuffer(data)
|
|
137
|
+
? data.toString('utf8')
|
|
138
|
+
: String(data);
|
|
139
|
+
const message = JSON.parse(raw);
|
|
140
|
+
for (const handler of this.handlers)
|
|
141
|
+
handler(address, message);
|
|
142
|
+
}
|
|
143
|
+
catch {
|
|
144
|
+
// Drop malformed frames. Signature/envelope validation happens
|
|
145
|
+
// above this layer in inbound-dispatcher.
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
ws.on('close', () => this.sockets.delete(ws));
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
async close() {
|
|
153
|
+
for (const socket of this.sockets)
|
|
154
|
+
socket.close();
|
|
155
|
+
this.sockets.clear();
|
|
156
|
+
if (this.server) {
|
|
157
|
+
await new Promise((resolve) => this.server?.close(resolve));
|
|
158
|
+
this.server = null;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Probe the `midstreamer` npm package for a real QUIC transport.
|
|
164
|
+
* Returns `null` when the env flag is off, when the package isn't
|
|
165
|
+
* installed, when the import surface doesn't match expectations, or
|
|
166
|
+
* when the loaded module is detectably the WASM stub (per ADR-119
|
|
167
|
+
* the current shipped build is a counter-tracking stub — `isNative()`
|
|
168
|
+
* or `isStub()` probes are checked when available).
|
|
169
|
+
*
|
|
170
|
+
* The function never throws — any failure becomes `null` so the
|
|
171
|
+
* outer `loadFederationTransport` can transparently fall back.
|
|
172
|
+
*/
|
|
173
|
+
async function probeMidstreamerTransport(config) {
|
|
174
|
+
if (process.env.MIDSTREAMER_QUIC_NATIVE !== '1') {
|
|
175
|
+
return null;
|
|
176
|
+
}
|
|
177
|
+
let mod;
|
|
178
|
+
try {
|
|
179
|
+
// Lazy + indirect so bundlers don't try to resolve at compile time.
|
|
180
|
+
// Prefer the `midstreamer/quic` sub-path (added in midstreamer@0.3.1
|
|
181
|
+
// per upstream ruvnet/midstream#81) which exposes
|
|
182
|
+
// `loadQuicTransport` directly without WASM init. Fall back to the
|
|
183
|
+
// root `midstreamer` package for older versions that put the QUIC
|
|
184
|
+
// surface on the default export.
|
|
185
|
+
const dynamicImport = new Function('s', 'return import(s)');
|
|
186
|
+
try {
|
|
187
|
+
mod = await dynamicImport('midstreamer/quic');
|
|
188
|
+
}
|
|
189
|
+
catch {
|
|
190
|
+
mod = await dynamicImport('midstreamer');
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
const candidate = mod;
|
|
197
|
+
// CommonJS sub-path exposes its API via `module.exports = {...};
|
|
198
|
+
// module.exports.default = module.exports;` — so we also accept the
|
|
199
|
+
// `.default` form. ESM imports flatten the named exports directly.
|
|
200
|
+
const surface = (typeof candidate.loadQuicTransport === 'function'
|
|
201
|
+
? candidate
|
|
202
|
+
: candidate.default);
|
|
203
|
+
if (!surface) {
|
|
204
|
+
return null;
|
|
205
|
+
}
|
|
206
|
+
// Refuse to use the WASM stub. ADR-119 documented the previous
|
|
207
|
+
// QuicMultistream as a counter-tracking stub with no real UDP, TLS,
|
|
208
|
+
// or protocol — using it would silently downgrade the federation
|
|
209
|
+
// path. midstreamer@0.3.1+ ships a real QUIC transport via
|
|
210
|
+
// `midstreamer/quic` (ADR-120, Step 1 — upstream PR ruvnet/midstream#81)
|
|
211
|
+
// and reports `isNative() === true`. Older versions either expose
|
|
212
|
+
// `isStub()` returning true or omit both probes.
|
|
213
|
+
if (typeof surface.isStub === 'function' && surface.isStub()) {
|
|
214
|
+
return { transport: null, reason: 'midstreamer module reports isStub() === true; refusing to bind a stub QUIC backend (ADR-119)' };
|
|
215
|
+
}
|
|
216
|
+
if (typeof surface.loadQuicTransport !== 'function') {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
if (typeof surface.isNative === 'function' && !surface.isNative()) {
|
|
220
|
+
return null;
|
|
221
|
+
}
|
|
222
|
+
try {
|
|
223
|
+
const transport = await surface.loadQuicTransport(config);
|
|
224
|
+
return isCompatibleTransport(transport, typeof config?.port === 'number')
|
|
225
|
+
? { transport }
|
|
226
|
+
: {
|
|
227
|
+
transport: null,
|
|
228
|
+
reason: 'midstreamer transport does not implement the federation send/onMessage/listen contract',
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
catch (err) {
|
|
232
|
+
return {
|
|
233
|
+
transport: null,
|
|
234
|
+
reason: `midstreamer.loadQuicTransport failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Top-level loader for federation transport. Identical signature to
|
|
240
|
+
* agentic-flow's `loadQuicTransport`, but with the midstreamer-first
|
|
241
|
+
* preference. Use this from `plugins/ruflo-federation` in place of
|
|
242
|
+
* the bare `loadQuicTransport`.
|
|
243
|
+
*
|
|
244
|
+
* Failure mode: if midstreamer is requested but rejects (stub, init
|
|
245
|
+
* error, missing package), this function falls through to the
|
|
246
|
+
* agentic-flow loader. If current agentic-flow does not export its
|
|
247
|
+
* historical loader subpath, the plugin-owned WebSocket fallback is
|
|
248
|
+
* used directly (ADR-104, #2618).
|
|
249
|
+
*/
|
|
250
|
+
export async function loadFederationTransport(config) {
|
|
251
|
+
const probe = await probeMidstreamerTransport(config);
|
|
252
|
+
if (probe && probe.transport) {
|
|
253
|
+
return { transport: probe.transport, source: 'midstreamer-native' };
|
|
254
|
+
}
|
|
255
|
+
const transport = await loadAgenticFlowQuicTransport(config);
|
|
256
|
+
if (transport) {
|
|
257
|
+
return {
|
|
258
|
+
transport,
|
|
259
|
+
source: 'agentic-flow-loader',
|
|
260
|
+
fallbackReason: probe?.reason,
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
transport: new WebSocketFallbackTransport(config),
|
|
265
|
+
source: 'websocket-fallback',
|
|
266
|
+
fallbackReason: probe?.reason ?? 'agentic-flow transport loader unavailable; using plugin-owned WebSocket fallback',
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=midstream-aware-loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"midstream-aware-loader.js","sourceRoot":"","sources":["../../src/transport/midstream-aware-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA+BH,SAAS,qBAAqB,CAC5B,KAAc,EACd,aAAa,GAAG,KAAK;IAErB,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IACtD,MAAM,SAAS,GAAG,KAAgC,CAAC;IACnD,OAAO,CACL,OAAO,SAAS,CAAC,IAAI,KAAK,UAAU;QACpC,OAAO,SAAS,CAAC,SAAS,KAAK,UAAU;QACzC,CAAC,CAAC,aAAa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
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,MAAM,CAAC,MAAM,yBAAyB,GAAG,gBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/plugin-agent-federation",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Cross-installation agent federation with zero-trust security, PII-gated data flow, and compliance-grade audit trails.",
|
|
5
5
|
"homepage": "https://github.com/ruvnet/ruflo",
|
|
6
6
|
"type": "module",
|
|
@@ -16,18 +16,35 @@
|
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "tsc",
|
|
19
|
+
"benchmark:canonicalization": "npm run build && node scripts/benchmark-envelope-canonicalization.mjs",
|
|
20
|
+
"benchmark:planner-descriptor": "npm run build && node scripts/benchmark-planner-descriptor.mjs",
|
|
19
21
|
"test": "vitest run",
|
|
20
22
|
"test:watch": "vitest",
|
|
21
23
|
"clean": "rm -rf dist"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
24
|
-
"@noble/ed25519": "^2.0.0"
|
|
26
|
+
"@noble/ed25519": "^2.0.0",
|
|
27
|
+
"ws": "^8.20.0"
|
|
28
|
+
},
|
|
29
|
+
"peerDependencies": {
|
|
30
|
+
"agentic-flow": ">=2.0.12-fix.8 <4.0.0",
|
|
31
|
+
"midstreamer": ">=0.3.1"
|
|
32
|
+
},
|
|
33
|
+
"peerDependenciesMeta": {
|
|
34
|
+
"agentic-flow": {
|
|
35
|
+
"optional": true
|
|
36
|
+
},
|
|
37
|
+
"midstreamer": {
|
|
38
|
+
"optional": true
|
|
39
|
+
}
|
|
25
40
|
},
|
|
26
41
|
"devDependencies": {
|
|
27
|
-
"@claude-flow/shared": "
|
|
28
|
-
"@claude-flow/security": "
|
|
42
|
+
"@claude-flow/shared": "^3.0.0",
|
|
43
|
+
"@claude-flow/security": "^3.0.0",
|
|
44
|
+
"@types/ws": "^8.18.1",
|
|
45
|
+
"agentic-flow": "2.0.12-fix.8",
|
|
29
46
|
"typescript": "^5.4.0",
|
|
30
|
-
"vitest": "^4.0
|
|
47
|
+
"vitest": "^4.1.0"
|
|
31
48
|
},
|
|
32
49
|
"keywords": [
|
|
33
50
|
"federation",
|