@claude-flow/plugin-agent-federation 1.0.0-alpha.4 → 1.0.0-alpha.6
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/application/federation-breaker-service.d.ts +182 -0
- package/dist/application/federation-breaker-service.d.ts.map +1 -0
- package/dist/application/federation-breaker-service.js +251 -0
- package/dist/application/federation-breaker-service.js.map +1 -0
- package/dist/application/federation-coordinator.d.ts +35 -1
- package/dist/application/federation-coordinator.d.ts.map +1 -1
- package/dist/application/federation-coordinator.js +72 -2
- package/dist/application/federation-coordinator.js.map +1 -1
- package/dist/application/policy-engine.d.ts.map +1 -1
- package/dist/application/policy-engine.js +9 -0
- package/dist/application/policy-engine.js.map +1 -1
- package/dist/domain/entities/federation-envelope.d.ts +1 -1
- package/dist/domain/entities/federation-envelope.d.ts.map +1 -1
- package/dist/domain/entities/federation-envelope.js +3 -0
- package/dist/domain/entities/federation-envelope.js.map +1 -1
- package/dist/domain/entities/federation-node.d.ts +55 -0
- package/dist/domain/entities/federation-node.d.ts.map +1 -1
- package/dist/domain/entities/federation-node.js +86 -0
- package/dist/domain/entities/federation-node.js.map +1 -1
- package/dist/domain/value-objects/federation-budget.d.ts +89 -0
- package/dist/domain/value-objects/federation-budget.d.ts.map +1 -0
- package/dist/domain/value-objects/federation-budget.js +165 -0
- package/dist/domain/value-objects/federation-budget.js.map +1 -0
- package/dist/domain/value-objects/federation-node-state.d.ts +92 -0
- package/dist/domain/value-objects/federation-node-state.d.ts.map +1 -0
- package/dist/domain/value-objects/federation-node-state.js +100 -0
- package/dist/domain/value-objects/federation-node-state.js.map +1 -0
- package/dist/mcp-tools.d.ts.map +1 -1
- package/dist/mcp-tools.js +34 -2
- package/dist/mcp-tools.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Federation peer state machine (ADR-097 Phase 2).
|
|
3
|
+
*
|
|
4
|
+
* Phase 1 shipped the budget envelope + enforcer that travels with every
|
|
5
|
+
* outbound message. Phase 2 adds the per-peer breaker: when a peer crosses a
|
|
6
|
+
* cost or failure threshold, transition it to SUSPENDED so subsequent
|
|
7
|
+
* `federation_send` calls short-circuit. After a cooldown the peer can
|
|
8
|
+
* recover; if it stays bad the breaker escalates to EVICTED.
|
|
9
|
+
*
|
|
10
|
+
* This module is the *value object* layer — pure, no I/O. The breaker
|
|
11
|
+
* service (Phase 2.b, separate file) reads cost-tracker telemetry, evaluates
|
|
12
|
+
* thresholds, and calls `transition` on the FederationNode entity. Decoupling
|
|
13
|
+
* the state machine from the policy lets tests pin transitions without
|
|
14
|
+
* standing up the cost bus.
|
|
15
|
+
*
|
|
16
|
+
* Security invariants pinned by the spec:
|
|
17
|
+
*
|
|
18
|
+
* 1. EVICTED is terminal under normal flow. The only way out is an
|
|
19
|
+
* explicit `reactivate` call (operator-initiated). This prevents a
|
|
20
|
+
* misbehaving peer from auto-recovering through the cooldown.
|
|
21
|
+
* 2. canTransition is the single source of truth for legality. Any path
|
|
22
|
+
* that mutates state MUST consult it; direct field writes are not
|
|
23
|
+
* permitted (entity getter/setter shape enforces this).
|
|
24
|
+
* 3. Reasons are constant strings, no remaining-budget echo on failure
|
|
25
|
+
* (matches Phase 1's anti-oracle posture).
|
|
26
|
+
* 4. Default cooldown is conservative (30 min) so a transient spike
|
|
27
|
+
* cannot ping-pong a peer ACTIVE↔SUSPENDED at high frequency.
|
|
28
|
+
*/
|
|
29
|
+
/** Lifecycle state of a federation peer. */
|
|
30
|
+
export declare enum FederationNodeState {
|
|
31
|
+
/** Default; healthy. `federation_send` accepts deliveries. */
|
|
32
|
+
ACTIVE = "ACTIVE",
|
|
33
|
+
/** Breaker tripped. Sends short-circuit with PEER_SUSPENDED. */
|
|
34
|
+
SUSPENDED = "SUSPENDED",
|
|
35
|
+
/** Removed from active rotation. Sends short-circuit with PEER_EVICTED. */
|
|
36
|
+
EVICTED = "EVICTED"
|
|
37
|
+
}
|
|
38
|
+
/** Reason a peer was suspended/evicted. Constant strings — no echo of caps. */
|
|
39
|
+
export type SuspensionReason = 'COST_THRESHOLD_EXCEEDED' | 'FAILURE_RATIO_EXCEEDED' | 'MANUAL_SUSPEND' | 'GRACE_PERIOD_EXPIRED' | 'MANUAL_EVICT';
|
|
40
|
+
/**
|
|
41
|
+
* Default cooldown a SUSPENDED peer must wait before being eligible for
|
|
42
|
+
* SUSPENDED → ACTIVE. 30 minutes matches the ADR-097 Part 2 spec and is
|
|
43
|
+
* intentionally well past the prompt-cache window so a recovery probe is
|
|
44
|
+
* cheap to amortize.
|
|
45
|
+
*/
|
|
46
|
+
export declare const DEFAULT_SUSPENSION_COOLDOWN_MS: number;
|
|
47
|
+
/**
|
|
48
|
+
* Default age at which a continuously-SUSPENDED peer is auto-escalated to
|
|
49
|
+
* EVICTED. 24 hours per spec — long enough to ride out a cost-tracker
|
|
50
|
+
* outage without false eviction, short enough that a genuinely-broken peer
|
|
51
|
+
* doesn't linger forever.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_AUTO_EVICTION_AGE_MS: number;
|
|
54
|
+
/** A successful transition's reason payload (for the audit trail). */
|
|
55
|
+
export interface TransitionReason {
|
|
56
|
+
readonly reason: SuspensionReason;
|
|
57
|
+
/** Optional opaque correlation key — task ID, breaker run ID, etc. */
|
|
58
|
+
readonly correlationId?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Static legality table for state transitions. Returns true iff the
|
|
62
|
+
* `from -> to` edge is in the allowed set. Used by the entity to reject
|
|
63
|
+
* illegal mutations before applying them.
|
|
64
|
+
*
|
|
65
|
+
* Allowed edges:
|
|
66
|
+
* ACTIVE → SUSPENDED (breaker trips)
|
|
67
|
+
* SUSPENDED → ACTIVE (cooldown + probe success)
|
|
68
|
+
* SUSPENDED → EVICTED (grace expired, or manual evict)
|
|
69
|
+
* ACTIVE → EVICTED (manual evict only — skips suspend)
|
|
70
|
+
* EVICTED → ACTIVE (manual reactivate only)
|
|
71
|
+
*
|
|
72
|
+
* Disallowed (anything else, including self-loops, is a no-op error).
|
|
73
|
+
*/
|
|
74
|
+
export declare function canTransition(from: FederationNodeState, to: FederationNodeState): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Should a SUSPENDED peer be eligible for SUSPENDED → ACTIVE based purely
|
|
77
|
+
* on elapsed time? The breaker still has to confirm health via probe before
|
|
78
|
+
* it actually calls reactivate; this just answers "is the cooldown done?"
|
|
79
|
+
*
|
|
80
|
+
* Pure function of (suspendedAt, now, cooldownMs) so it's trivially
|
|
81
|
+
* deterministic in tests.
|
|
82
|
+
*/
|
|
83
|
+
export declare function isCooldownElapsed(suspendedAt: Date, now: Date, cooldownMs?: number): boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Should a SUSPENDED peer be auto-escalated to EVICTED based on the age of
|
|
86
|
+
* its suspension? Returns true once the peer has been continuously
|
|
87
|
+
* SUSPENDED past the configured limit (default 24h). The breaker calls
|
|
88
|
+
* this on each tick and, if true, issues the SUSPENDED → EVICTED
|
|
89
|
+
* transition with reason GRACE_PERIOD_EXPIRED.
|
|
90
|
+
*/
|
|
91
|
+
export declare function shouldAutoEvict(suspendedAt: Date, now: Date, ageLimitMs?: number): boolean;
|
|
92
|
+
//# sourceMappingURL=federation-node-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"federation-node-state.d.ts","sourceRoot":"","sources":["../../../src/domain/value-objects/federation-node-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,4CAA4C;AAC5C,oBAAY,mBAAmB;IAC7B,8DAA8D;IAC9D,MAAM,WAAW;IACjB,gEAAgE;IAChE,SAAS,cAAc;IACvB,2EAA2E;IAC3E,OAAO,YAAY;CACpB;AAED,+EAA+E;AAC/E,MAAM,MAAM,gBAAgB,GACxB,yBAAyB,GACzB,wBAAwB,GACxB,gBAAgB,GAChB,sBAAsB,GACtB,cAAc,CAAC;AAEnB;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,QAAiB,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,QAAsB,CAAC;AAEhE,sEAAsE;AACtE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,mBAAmB,EACzB,EAAE,EAAE,mBAAmB,GACtB,OAAO,CAUT;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,IAAI,EACjB,GAAG,EAAE,IAAI,EACT,UAAU,GAAE,MAAuC,GAClD,OAAO,CAET;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,IAAI,EACjB,GAAG,EAAE,IAAI,EACT,UAAU,GAAE,MAAqC,GAChD,OAAO,CAET"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Federation peer state machine (ADR-097 Phase 2).
|
|
3
|
+
*
|
|
4
|
+
* Phase 1 shipped the budget envelope + enforcer that travels with every
|
|
5
|
+
* outbound message. Phase 2 adds the per-peer breaker: when a peer crosses a
|
|
6
|
+
* cost or failure threshold, transition it to SUSPENDED so subsequent
|
|
7
|
+
* `federation_send` calls short-circuit. After a cooldown the peer can
|
|
8
|
+
* recover; if it stays bad the breaker escalates to EVICTED.
|
|
9
|
+
*
|
|
10
|
+
* This module is the *value object* layer — pure, no I/O. The breaker
|
|
11
|
+
* service (Phase 2.b, separate file) reads cost-tracker telemetry, evaluates
|
|
12
|
+
* thresholds, and calls `transition` on the FederationNode entity. Decoupling
|
|
13
|
+
* the state machine from the policy lets tests pin transitions without
|
|
14
|
+
* standing up the cost bus.
|
|
15
|
+
*
|
|
16
|
+
* Security invariants pinned by the spec:
|
|
17
|
+
*
|
|
18
|
+
* 1. EVICTED is terminal under normal flow. The only way out is an
|
|
19
|
+
* explicit `reactivate` call (operator-initiated). This prevents a
|
|
20
|
+
* misbehaving peer from auto-recovering through the cooldown.
|
|
21
|
+
* 2. canTransition is the single source of truth for legality. Any path
|
|
22
|
+
* that mutates state MUST consult it; direct field writes are not
|
|
23
|
+
* permitted (entity getter/setter shape enforces this).
|
|
24
|
+
* 3. Reasons are constant strings, no remaining-budget echo on failure
|
|
25
|
+
* (matches Phase 1's anti-oracle posture).
|
|
26
|
+
* 4. Default cooldown is conservative (30 min) so a transient spike
|
|
27
|
+
* cannot ping-pong a peer ACTIVE↔SUSPENDED at high frequency.
|
|
28
|
+
*/
|
|
29
|
+
/** Lifecycle state of a federation peer. */
|
|
30
|
+
export var FederationNodeState;
|
|
31
|
+
(function (FederationNodeState) {
|
|
32
|
+
/** Default; healthy. `federation_send` accepts deliveries. */
|
|
33
|
+
FederationNodeState["ACTIVE"] = "ACTIVE";
|
|
34
|
+
/** Breaker tripped. Sends short-circuit with PEER_SUSPENDED. */
|
|
35
|
+
FederationNodeState["SUSPENDED"] = "SUSPENDED";
|
|
36
|
+
/** Removed from active rotation. Sends short-circuit with PEER_EVICTED. */
|
|
37
|
+
FederationNodeState["EVICTED"] = "EVICTED";
|
|
38
|
+
})(FederationNodeState || (FederationNodeState = {}));
|
|
39
|
+
/**
|
|
40
|
+
* Default cooldown a SUSPENDED peer must wait before being eligible for
|
|
41
|
+
* SUSPENDED → ACTIVE. 30 minutes matches the ADR-097 Part 2 spec and is
|
|
42
|
+
* intentionally well past the prompt-cache window so a recovery probe is
|
|
43
|
+
* cheap to amortize.
|
|
44
|
+
*/
|
|
45
|
+
export const DEFAULT_SUSPENSION_COOLDOWN_MS = 30 * 60 * 1000;
|
|
46
|
+
/**
|
|
47
|
+
* Default age at which a continuously-SUSPENDED peer is auto-escalated to
|
|
48
|
+
* EVICTED. 24 hours per spec — long enough to ride out a cost-tracker
|
|
49
|
+
* outage without false eviction, short enough that a genuinely-broken peer
|
|
50
|
+
* doesn't linger forever.
|
|
51
|
+
*/
|
|
52
|
+
export const DEFAULT_AUTO_EVICTION_AGE_MS = 24 * 60 * 60 * 1000;
|
|
53
|
+
/**
|
|
54
|
+
* Static legality table for state transitions. Returns true iff the
|
|
55
|
+
* `from -> to` edge is in the allowed set. Used by the entity to reject
|
|
56
|
+
* illegal mutations before applying them.
|
|
57
|
+
*
|
|
58
|
+
* Allowed edges:
|
|
59
|
+
* ACTIVE → SUSPENDED (breaker trips)
|
|
60
|
+
* SUSPENDED → ACTIVE (cooldown + probe success)
|
|
61
|
+
* SUSPENDED → EVICTED (grace expired, or manual evict)
|
|
62
|
+
* ACTIVE → EVICTED (manual evict only — skips suspend)
|
|
63
|
+
* EVICTED → ACTIVE (manual reactivate only)
|
|
64
|
+
*
|
|
65
|
+
* Disallowed (anything else, including self-loops, is a no-op error).
|
|
66
|
+
*/
|
|
67
|
+
export function canTransition(from, to) {
|
|
68
|
+
if (from === to)
|
|
69
|
+
return false;
|
|
70
|
+
if (from === FederationNodeState.ACTIVE) {
|
|
71
|
+
return to === FederationNodeState.SUSPENDED || to === FederationNodeState.EVICTED;
|
|
72
|
+
}
|
|
73
|
+
if (from === FederationNodeState.SUSPENDED) {
|
|
74
|
+
return to === FederationNodeState.ACTIVE || to === FederationNodeState.EVICTED;
|
|
75
|
+
}
|
|
76
|
+
// EVICTED is terminal except for explicit operator reactivate.
|
|
77
|
+
return to === FederationNodeState.ACTIVE;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Should a SUSPENDED peer be eligible for SUSPENDED → ACTIVE based purely
|
|
81
|
+
* on elapsed time? The breaker still has to confirm health via probe before
|
|
82
|
+
* it actually calls reactivate; this just answers "is the cooldown done?"
|
|
83
|
+
*
|
|
84
|
+
* Pure function of (suspendedAt, now, cooldownMs) so it's trivially
|
|
85
|
+
* deterministic in tests.
|
|
86
|
+
*/
|
|
87
|
+
export function isCooldownElapsed(suspendedAt, now, cooldownMs = DEFAULT_SUSPENSION_COOLDOWN_MS) {
|
|
88
|
+
return now.getTime() - suspendedAt.getTime() >= cooldownMs;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Should a SUSPENDED peer be auto-escalated to EVICTED based on the age of
|
|
92
|
+
* its suspension? Returns true once the peer has been continuously
|
|
93
|
+
* SUSPENDED past the configured limit (default 24h). The breaker calls
|
|
94
|
+
* this on each tick and, if true, issues the SUSPENDED → EVICTED
|
|
95
|
+
* transition with reason GRACE_PERIOD_EXPIRED.
|
|
96
|
+
*/
|
|
97
|
+
export function shouldAutoEvict(suspendedAt, now, ageLimitMs = DEFAULT_AUTO_EVICTION_AGE_MS) {
|
|
98
|
+
return now.getTime() - suspendedAt.getTime() >= ageLimitMs;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=federation-node-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"federation-node-state.js","sourceRoot":"","sources":["../../../src/domain/value-objects/federation-node-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,4CAA4C;AAC5C,MAAM,CAAN,IAAY,mBAOX;AAPD,WAAY,mBAAmB;IAC7B,8DAA8D;IAC9D,wCAAiB,CAAA;IACjB,gEAAgE;IAChE,8CAAuB,CAAA;IACvB,2EAA2E;IAC3E,0CAAmB,CAAA;AACrB,CAAC,EAPW,mBAAmB,KAAnB,mBAAmB,QAO9B;AAUD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAShE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAC3B,IAAyB,EACzB,EAAuB;IAEvB,IAAI,IAAI,KAAK,EA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wBAAgB,cAAc,CAC5B,cAAc,EAAE,iBAAiB,EACjC,UAAU,EAAE,aAAa,GACxB,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp-tools.d.ts","sourceRoot":"","sources":["../src/mcp-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AACjF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAGrF,KAAK,iBAAiB,GAAG,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC5D,KAAK,aAAa,GAAG,MAAM,aAAa,GAAG,IAAI,CAAC;AAMhD,wBAAgB,cAAc,CAC5B,cAAc,EAAE,iBAAiB,EACjC,UAAU,EAAE,aAAa,GACxB,iBAAiB,EAAE,CA+PrB"}
|
package/dist/mcp-tools.js
CHANGED
|
@@ -77,7 +77,7 @@ export function createMcpTools(getCoordinator, getContext) {
|
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
name: 'federation_send',
|
|
80
|
-
description: 'Send a message to a federated peer through the PII pipeline and security gates',
|
|
80
|
+
description: 'Send a message to a federated peer through the PII pipeline and security gates. Optional budget controls (ADR-097): maxHops defaults to 8 to prevent recursive delegation; maxTokens/maxUsd cap cumulative spend across the hop chain.',
|
|
81
81
|
pluginName: '@claude-flow/plugin-agent-federation',
|
|
82
82
|
version: '1.0.0-alpha.1',
|
|
83
83
|
inputSchema: {
|
|
@@ -86,12 +86,44 @@ export function createMcpTools(getCoordinator, getContext) {
|
|
|
86
86
|
targetNodeId: { type: 'string', description: 'Target node ID' },
|
|
87
87
|
messageType: { type: 'string', description: 'Message type (task-assignment, memory-query, context-share, etc.)' },
|
|
88
88
|
payload: { type: 'object', description: 'Message payload' },
|
|
89
|
+
// ADR-097 Phase 1: optional budget envelope. Backward compatible —
|
|
90
|
+
// omitting these preserves the legacy unbounded-tokens/USD path,
|
|
91
|
+
// with maxHops still defaulting to 8 to defang recursion loops.
|
|
92
|
+
budget: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
description: 'Optional cumulative spend budget for this delegation chain',
|
|
95
|
+
properties: {
|
|
96
|
+
maxTokens: { type: 'number', description: 'Hard cap on Σ tokens across hops' },
|
|
97
|
+
maxUsd: { type: 'number', description: 'Hard cap on Σ USD spent' },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
maxHops: {
|
|
101
|
+
type: 'number',
|
|
102
|
+
description: 'Maximum hops this message may travel (default 8, 0 disallows remote delegation)',
|
|
103
|
+
},
|
|
104
|
+
hopCount: {
|
|
105
|
+
type: 'number',
|
|
106
|
+
description: 'How many hops this message has already taken (0 on the originator)',
|
|
107
|
+
},
|
|
108
|
+
spent: {
|
|
109
|
+
type: 'object',
|
|
110
|
+
description: 'Caller-reported usage from previous legs (cumulative)',
|
|
111
|
+
properties: {
|
|
112
|
+
tokens: { type: 'number' },
|
|
113
|
+
usd: { type: 'number' },
|
|
114
|
+
},
|
|
115
|
+
},
|
|
89
116
|
},
|
|
90
117
|
required: ['targetNodeId', 'messageType', 'payload'],
|
|
91
118
|
},
|
|
92
119
|
handler: async (params) => {
|
|
93
120
|
const coordinator = requireCoordinator();
|
|
94
|
-
const result = await coordinator.sendMessage(params['targetNodeId'], params['messageType'], params['payload']
|
|
121
|
+
const result = await coordinator.sendMessage(params['targetNodeId'], params['messageType'], params['payload'], {
|
|
122
|
+
budget: params['budget'],
|
|
123
|
+
maxHops: params['maxHops'],
|
|
124
|
+
hopCount: params['hopCount'],
|
|
125
|
+
spent: params['spent'],
|
|
126
|
+
});
|
|
95
127
|
return textResult(JSON.stringify(result, null, 2), !result.success);
|
|
96
128
|
},
|
|
97
129
|
},
|
package/dist/mcp-tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-tools.js","sourceRoot":"","sources":["../src/mcp-tools.ts"],"names":[],"mappings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CAAC;aACrC;YACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;gBACxB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;gBAC7B,IAAI,CAAC,OAAO;oBAAE,OAAO,UAAU,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;gBAChE,MAAM,OAAO,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgE,oBAAoB,CAAC,CAAC;gBAC1H,IAAI,CAAC,OAAO;oBAAE,OAAO,UAAU,CAAC,2BAA2B,EAAE,IAAI,CAAC,CAAC;gBAEnE,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,OAAO,CACpC,MAAM,CAAC,aAAa,CAA0B,EAC9C,MAAM,CAAC,SAAS,CAAC,EAChB,MAAM,CAAC,gBAAgB,CAAY,IAAI,CAAC,GAAG,CAAC,CAC9C,CAAC;gBACF,OAAO,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;oBAC/B,UAAU,EAAE,QAAQ,CAAC,UAAU;oBAC/B,WAAW,EAAE,QAAQ,CAAC,WAAW;oBACjC,cAAc,EAAE,QAAQ,CAAC,cAAc;oBACvC,SAAS,EAAE,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE;iBAC5C,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YACf,CAAC;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/plugin-agent-federation",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.6",
|
|
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",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@claude-flow/shared": "workspace:*",
|
|
28
28
|
"@claude-flow/security": "workspace:*",
|
|
29
29
|
"typescript": "^5.4.0",
|
|
30
|
-
"vitest": "^
|
|
30
|
+
"vitest": "^4.0.16"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"federation",
|