@claude-flow/plugin-agent-federation 1.0.4 → 1.0.5
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/a2a/agent-card.d.ts +130 -0
- package/dist/a2a/consume.d.ts +34 -0
- package/dist/a2a/planner-descriptor.d.ts +40 -0
- package/dist/a2a/well-known.d.ts +46 -0
- package/dist/application/claim-checker.d.ts +27 -0
- package/dist/application/federation-breaker-service.d.ts +192 -0
- package/dist/application/federation-coordinator.d.ts +211 -0
- package/dist/application/inbound-dispatcher.d.ts +113 -0
- package/dist/application/policy-engine.d.ts +42 -0
- package/dist/application/policy-engine.d.ts.map +1 -1
- package/dist/application/policy-engine.js +11 -1
- package/dist/application/policy-engine.js.map +1 -1
- package/dist/application/spend-reporter.d.ts +150 -0
- package/dist/application/trust-evaluator.d.ts +74 -0
- package/dist/bin.d.ts +13 -0
- package/dist/cli-commands.d.ts +7 -0
- package/dist/domain/entities/federation-envelope.d.ts +45 -0
- package/dist/domain/entities/federation-node.d.ts +104 -0
- package/dist/domain/entities/federation-session.d.ts +55 -0
- package/dist/domain/entities/trust-level.d.ts +17 -0
- package/dist/domain/entities/trust-level.d.ts.map +1 -1
- package/dist/domain/entities/trust-level.js +9 -2
- package/dist/domain/entities/trust-level.js.map +1 -1
- package/dist/domain/services/audit-service.d.ts +69 -0
- package/dist/domain/services/discovery-service.d.ts +76 -0
- package/dist/domain/services/handshake-service.d.ts +62 -0
- package/dist/domain/services/pii-pipeline-service.d.ts +65 -0
- package/dist/domain/services/routing-service.d.ts +54 -0
- package/dist/domain/services/wg-firewall-service.d.ts +71 -0
- package/dist/domain/services/wg-mesh-service.d.ts +156 -0
- package/dist/domain/services/wg-witness-service.d.ts +98 -0
- package/dist/domain/value-objects/federation-budget.d.ts +89 -0
- package/dist/domain/value-objects/federation-node-state.d.ts +92 -0
- package/dist/domain/value-objects/wg-config.d.ts +70 -0
- package/dist/index.d.ts +24 -0
- package/dist/mcp-tools.d.ts +10 -0
- package/dist/plugin.d.ts +19 -0
- package/dist/transport/midstream-aware-loader.d.ts +72 -0
- package/dist/version.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MCPToolDefinition } from '@claude-flow/shared/src/plugin-interface.js';
|
|
2
|
+
import type { PluginContext } from '@claude-flow/shared/src/plugin-interface.js';
|
|
3
|
+
import type { FederationCoordinator } from './application/federation-coordinator.js';
|
|
4
|
+
import type { WgMeshService } from './domain/services/wg-mesh-service.js';
|
|
5
|
+
type CoordinatorGetter = () => FederationCoordinator | null;
|
|
6
|
+
type ContextGetter = () => PluginContext | null;
|
|
7
|
+
type WgMeshGetter = () => WgMeshService | null;
|
|
8
|
+
export declare function createMcpTools(getCoordinator: CoordinatorGetter, getContext: ContextGetter, getWgMesh?: WgMeshGetter): MCPToolDefinition[];
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=mcp-tools.d.ts.map
|
package/dist/plugin.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ClaudeFlowPlugin, PluginContext, MCPToolDefinition, CLICommandDefinition, AgentTypeDefinition } from '@claude-flow/shared/src/plugin-interface.js';
|
|
2
|
+
export declare class AgentFederationPlugin implements ClaudeFlowPlugin {
|
|
3
|
+
readonly name = "@claude-flow/plugin-agent-federation";
|
|
4
|
+
readonly version: "1.0.0-alpha.18";
|
|
5
|
+
readonly description = "Cross-installation agent federation with PII protection and AI defence";
|
|
6
|
+
readonly author = "Claude Flow Team";
|
|
7
|
+
readonly dependencies: string[];
|
|
8
|
+
private coordinator;
|
|
9
|
+
private context;
|
|
10
|
+
private transport;
|
|
11
|
+
private agentCardServer;
|
|
12
|
+
initialize(context: PluginContext): Promise<void>;
|
|
13
|
+
shutdown(): Promise<void>;
|
|
14
|
+
registerMCPTools(): MCPToolDefinition[];
|
|
15
|
+
registerCLICommands(): CLICommandDefinition[];
|
|
16
|
+
registerAgentTypes(): AgentTypeDefinition[];
|
|
17
|
+
healthCheck(): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
export interface AgentMessage {
|
|
31
|
+
id: string;
|
|
32
|
+
type: 'task' | 'result' | 'status' | 'coordination' | 'heartbeat' | string;
|
|
33
|
+
payload: unknown;
|
|
34
|
+
metadata?: Record<string, unknown>;
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
}
|
|
37
|
+
export interface AgentTransport {
|
|
38
|
+
send: (address: string, message: AgentMessage) => Promise<void>;
|
|
39
|
+
onMessage: (handler: (address: string, message: AgentMessage) => void) => void;
|
|
40
|
+
listen?: (port: number, host?: string) => Promise<void>;
|
|
41
|
+
close?: () => Promise<void> | void;
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
}
|
|
44
|
+
export interface QuicTransportConfig {
|
|
45
|
+
port?: number;
|
|
46
|
+
host?: string;
|
|
47
|
+
serverName?: string;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** Result envelope describing which backend the loader picked. */
|
|
51
|
+
export interface LoadedFederationTransport {
|
|
52
|
+
/** The live transport. Send/receive against this. */
|
|
53
|
+
transport: AgentTransport;
|
|
54
|
+
/** Which loader branch resolved. Useful for logs/metrics. */
|
|
55
|
+
source: 'midstreamer-native' | 'agentic-flow-loader' | 'websocket-fallback';
|
|
56
|
+
/** Free-form note when a probe failed (helps explain a fallback). */
|
|
57
|
+
fallbackReason?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Top-level loader for federation transport. Identical signature to
|
|
61
|
+
* agentic-flow's `loadQuicTransport`, but with the midstreamer-first
|
|
62
|
+
* preference. Use this from `plugins/ruflo-federation` in place of
|
|
63
|
+
* the bare `loadQuicTransport`.
|
|
64
|
+
*
|
|
65
|
+
* Failure mode: if midstreamer is requested but rejects (stub, init
|
|
66
|
+
* error, missing package), this function falls through to the
|
|
67
|
+
* agentic-flow loader. If current agentic-flow does not export its
|
|
68
|
+
* historical loader subpath, the plugin-owned WebSocket fallback is
|
|
69
|
+
* used directly (ADR-104, #2618).
|
|
70
|
+
*/
|
|
71
|
+
export declare function loadFederationTransport(config?: QuicTransportConfig): Promise<LoadedFederationTransport>;
|
|
72
|
+
//# sourceMappingURL=midstream-aware-loader.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-flow/plugin-agent-federation",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
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",
|