@claude-flow/cli 3.32.29 → 3.32.30
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/.claude/helpers/helpers.manifest.json +2 -2
- package/catalog-manifest.json +2 -2
- package/dist/src/init/claudemd-generator.js +53 -2
- package/dist/src/mcp-tools/capability-brain.js +22 -22
- package/dist/src/mcp-tools/guidance-tools.js +1 -1
- package/node_modules/@claude-flow/codex/.agents/skills/memory-management/SKILL.md +45 -0
- package/node_modules/@claude-flow/codex/.agents/skills/security-audit/SKILL.md +46 -0
- package/node_modules/@claude-flow/codex/.agents/skills/sparc-methodology/SKILL.md +46 -0
- package/node_modules/@claude-flow/codex/.agents/skills/swarm-orchestration/SKILL.md +53 -0
- package/node_modules/@claude-flow/codex/README.md +1044 -0
- package/node_modules/@claude-flow/codex/dist/cli.d.ts +9 -0
- package/node_modules/@claude-flow/codex/dist/cli.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/cli.js +686 -0
- package/node_modules/@claude-flow/codex/dist/cli.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts +17 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js +278 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/cli.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts +8 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/index.js +7 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts +143 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js +621 -0
- package/node_modules/@claude-flow/codex/dist/dual-mode/orchestrator.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts +12 -0
- package/node_modules/@claude-flow/codex/dist/generators/agents-md.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/agents-md.js +730 -0
- package/node_modules/@claude-flow/codex/dist/generators/agents-md.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts +74 -0
- package/node_modules/@claude-flow/codex/dist/generators/config-toml.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/config-toml.js +922 -0
- package/node_modules/@claude-flow/codex/dist/generators/config-toml.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/index.d.ts +9 -0
- package/node_modules/@claude-flow/codex/dist/generators/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/index.js +9 -0
- package/node_modules/@claude-flow/codex/dist/generators/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts +20 -0
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.js +951 -0
- package/node_modules/@claude-flow/codex/dist/generators/skill-md.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts +46 -0
- package/node_modules/@claude-flow/codex/dist/harness/build-evidence.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js +126 -0
- package/node_modules/@claude-flow/codex/dist/harness/build-evidence.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts +153 -0
- package/node_modules/@claude-flow/codex/dist/harness/contract.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/contract.js +44 -0
- package/node_modules/@claude-flow/codex/dist/harness/contract.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts +33 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js +175 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-fenced-lease-reference.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts +42 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js +140 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-inbox-reference.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts +19 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js +79 -0
- package/node_modules/@claude-flow/codex/dist/harness/in-memory-run-receipt-reference.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/index.d.ts +9 -0
- package/node_modules/@claude-flow/codex/dist/harness/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/index.js +9 -0
- package/node_modules/@claude-flow/codex/dist/harness/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts +8 -0
- package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js +10 -0
- package/node_modules/@claude-flow/codex/dist/harness/portable-case-fold.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts +68 -0
- package/node_modules/@claude-flow/codex/dist/harness/repository-state.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/repository-state.js +403 -0
- package/node_modules/@claude-flow/codex/dist/harness/repository-state.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts +3 -0
- package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js +14 -0
- package/node_modules/@claude-flow/codex/dist/harness/unsigned-integer.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/index.d.ts +53 -0
- package/node_modules/@claude-flow/codex/dist/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/index.js +54 -0
- package/node_modules/@claude-flow/codex/dist/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/initializer.d.ts +98 -0
- package/node_modules/@claude-flow/codex/dist/initializer.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/initializer.js +795 -0
- package/node_modules/@claude-flow/codex/dist/initializer.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts +3 -0
- package/node_modules/@claude-flow/codex/dist/loop/cli.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/loop/cli.js +123 -0
- package/node_modules/@claude-flow/codex/dist/loop/cli.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/loop/index.d.ts +58 -0
- package/node_modules/@claude-flow/codex/dist/loop/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/loop/index.js +230 -0
- package/node_modules/@claude-flow/codex/dist/loop/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts +28 -0
- package/node_modules/@claude-flow/codex/dist/mcp-config.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/mcp-config.js +121 -0
- package/node_modules/@claude-flow/codex/dist/mcp-config.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts +114 -0
- package/node_modules/@claude-flow/codex/dist/migrations/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/migrations/index.js +880 -0
- package/node_modules/@claude-flow/codex/dist/migrations/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/templates/index.d.ts +92 -0
- package/node_modules/@claude-flow/codex/dist/templates/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/templates/index.js +284 -0
- package/node_modules/@claude-flow/codex/dist/templates/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/types.d.ts +240 -0
- package/node_modules/@claude-flow/codex/dist/types.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/types.js +8 -0
- package/node_modules/@claude-flow/codex/dist/types.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/validators/index.d.ts +42 -0
- package/node_modules/@claude-flow/codex/dist/validators/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/validators/index.js +929 -0
- package/node_modules/@claude-flow/codex/dist/validators/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts +37 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js +137 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/coordinator.js.map +1 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts +2 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/index.js +2 -0
- package/node_modules/@claude-flow/codex/dist/worktrees/index.js.map +1 -0
- package/node_modules/@claude-flow/codex/package.json +122 -0
- package/node_modules/@claude-flow/plugin-agent-federation/README.md +49 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts +130 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js +239 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/agent-card.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts +34 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js +69 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/consume.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts +46 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js +84 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/a2a/well-known.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts +27 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js +46 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/claim-checker.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts +192 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js +253 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-breaker-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts +211 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js +501 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/federation-coordinator.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts +114 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js +356 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/inbound-dispatcher.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts +41 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js +184 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/policy-engine.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts +150 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js +128 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/spend-reporter.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts +74 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js +179 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/application/trust-evaluator.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts +13 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js +189 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/bin.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts +7 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js +317 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/cli-commands.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts +45 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js +71 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-envelope.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts +104 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js +152 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-node.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts +55 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js +105 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/federation-session.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts +17 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js +35 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/entities/trust-level.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts +69 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js +149 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/audit-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts +68 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js +161 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/discovery-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts +58 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js +122 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/handshake-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts +65 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js +208 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/pii-pipeline-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts +51 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js +147 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/routing-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts +71 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js +194 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-firewall-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts +156 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js +292 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-mesh-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts +98 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js +122 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/services/wg-witness-service.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts +89 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js +165 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-budget.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts +92 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js +100 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/federation-node-state.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts +70 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js +104 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts +23 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js +24 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/index.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts +10 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js +439 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/mcp-tools.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts +19 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js +515 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/plugin.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts +72 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js +269 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/transport/midstream-aware-loader.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts +3 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/version.d.ts.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js +3 -0
- package/node_modules/@claude-flow/plugin-agent-federation/dist/version.js.map +1 -0
- package/node_modules/@claude-flow/plugin-agent-federation/package.json +64 -0
- package/node_modules/@claude-flow/security/README.md +292 -0
- package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts +97 -0
- package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js +537 -0
- package/node_modules/@claude-flow/security/dist/CVE-REMEDIATION.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/application/index.d.ts +7 -0
- package/node_modules/@claude-flow/security/dist/application/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/application/index.js +7 -0
- package/node_modules/@claude-flow/security/dist/application/index.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts +71 -0
- package/node_modules/@claude-flow/security/dist/application/services/security-application-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js +153 -0
- package/node_modules/@claude-flow/security/dist/application/services/security-application-service.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts +148 -0
- package/node_modules/@claude-flow/security/dist/authorization/propagator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/authorization/propagator.js +182 -0
- package/node_modules/@claude-flow/security/dist/authorization/propagator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/credential-generator.d.ts +176 -0
- package/node_modules/@claude-flow/security/dist/credential-generator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/credential-generator.js +272 -0
- package/node_modules/@claude-flow/security/dist/credential-generator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts +68 -0
- package/node_modules/@claude-flow/security/dist/domain/entities/security-context.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js +132 -0
- package/node_modules/@claude-flow/security/dist/domain/entities/security-context.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/index.d.ts +8 -0
- package/node_modules/@claude-flow/security/dist/domain/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/index.js +8 -0
- package/node_modules/@claude-flow/security/dist/domain/index.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts +71 -0
- package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js +237 -0
- package/node_modules/@claude-flow/security/dist/domain/services/security-domain-service.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/index.d.ts +129 -0
- package/node_modules/@claude-flow/security/dist/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/index.js +176 -0
- package/node_modules/@claude-flow/security/dist/index.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts +306 -0
- package/node_modules/@claude-flow/security/dist/input-validator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/input-validator.js +393 -0
- package/node_modules/@claude-flow/security/dist/input-validator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts +48 -0
- package/node_modules/@claude-flow/security/dist/keychain-adapter.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/keychain-adapter.js +0 -0
- package/node_modules/@claude-flow/security/dist/keychain-adapter.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts +133 -0
- package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js +254 -0
- package/node_modules/@claude-flow/security/dist/mcp-composition-inspector.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts +31 -0
- package/node_modules/@claude-flow/security/dist/oauth/browser.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/browser.js +55 -0
- package/node_modules/@claude-flow/security/dist/oauth/browser.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts +37 -0
- package/node_modules/@claude-flow/security/dist/oauth/callback-server.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/callback-server.js +86 -0
- package/node_modules/@claude-flow/security/dist/oauth/callback-server.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/client.d.ts +57 -0
- package/node_modules/@claude-flow/security/dist/oauth/client.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/client.js +120 -0
- package/node_modules/@claude-flow/security/dist/oauth/client.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts +25 -0
- package/node_modules/@claude-flow/security/dist/oauth/pkce.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/oauth/pkce.js +36 -0
- package/node_modules/@claude-flow/security/dist/oauth/pkce.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/password-hasher.d.ts +128 -0
- package/node_modules/@claude-flow/security/dist/password-hasher.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/password-hasher.js +190 -0
- package/node_modules/@claude-flow/security/dist/password-hasher.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/path-validator.d.ts +148 -0
- package/node_modules/@claude-flow/security/dist/path-validator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/path-validator.js +421 -0
- package/node_modules/@claude-flow/security/dist/path-validator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts +125 -0
- package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js +186 -0
- package/node_modules/@claude-flow/security/dist/plugins/integrity-verifier.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts +5 -0
- package/node_modules/@claude-flow/security/dist/policy/canonical.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/canonical.js +30 -0
- package/node_modules/@claude-flow/security/dist/policy/canonical.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/engine.d.ts +34 -0
- package/node_modules/@claude-flow/security/dist/policy/engine.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/engine.js +285 -0
- package/node_modules/@claude-flow/security/dist/policy/engine.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts +9 -0
- package/node_modules/@claude-flow/security/dist/policy/envelope.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/envelope.js +90 -0
- package/node_modules/@claude-flow/security/dist/policy/envelope.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts +4 -0
- package/node_modules/@claude-flow/security/dist/policy/evaluator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/evaluator.js +119 -0
- package/node_modules/@claude-flow/security/dist/policy/evaluator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/index.d.ts +7 -0
- package/node_modules/@claude-flow/security/dist/policy/index.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/index.js +7 -0
- package/node_modules/@claude-flow/security/dist/policy/index.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts +238 -0
- package/node_modules/@claude-flow/security/dist/policy/product-plane.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/product-plane.js +1022 -0
- package/node_modules/@claude-flow/security/dist/policy/product-plane.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/types.d.ts +169 -0
- package/node_modules/@claude-flow/security/dist/policy/types.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/policy/types.js +2 -0
- package/node_modules/@claude-flow/security/dist/policy/types.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/safe-executor.d.ts +180 -0
- package/node_modules/@claude-flow/security/dist/safe-executor.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/safe-executor.js +390 -0
- package/node_modules/@claude-flow/security/dist/safe-executor.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/token-generator.d.ts +224 -0
- package/node_modules/@claude-flow/security/dist/token-generator.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/token-generator.js +351 -0
- package/node_modules/@claude-flow/security/dist/token-generator.js.map +1 -0
- package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts +126 -0
- package/node_modules/@claude-flow/security/dist/tool-output-guardrail.d.ts.map +1 -0
- package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js +257 -0
- package/node_modules/@claude-flow/security/dist/tool-output-guardrail.js.map +1 -0
- package/node_modules/@claude-flow/security/package.json +44 -0
- package/package.json +24 -8
|
@@ -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,8C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/value-objects/wg-config.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-111 Phase 1 — WireGuard configuration value objects.
|
|
3
|
+
*
|
|
4
|
+
* Pure types + deterministic helpers. No I/O, no shell calls. Used by
|
|
5
|
+
* WgMeshService (Phase 2) and surfaced in FederationManifest (Phase 1) so
|
|
6
|
+
* peers can publish their WG identity inside the same Ed25519-signed
|
|
7
|
+
* manifest that already carries their federation identity.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The WG section of a FederationManifest. Optional — present only when
|
|
11
|
+
* the local node has opted in via `config.wgMesh: true`.
|
|
12
|
+
*
|
|
13
|
+
* - publicKey is the X25519 public key in base64 (32-byte raw → 44 chars
|
|
14
|
+
* including '=' padding), exactly the format `wg-quick`/`wg setconf`
|
|
15
|
+
* accept. Never include the private key in the manifest.
|
|
16
|
+
* - endpoint is `host:port` reachable on UDP. May be a hostname (resolved
|
|
17
|
+
* by the consumer) or an IPv4/v6 literal. The port is WireGuard's, not
|
|
18
|
+
* federation's WS port — usually 51820.
|
|
19
|
+
* - meshIP is the assigned /32 inside the federation mesh subnet
|
|
20
|
+
* (10.50.0.0/16 by default). Stored as `a.b.c.d/32`.
|
|
21
|
+
*/
|
|
22
|
+
export interface WgManifestSection {
|
|
23
|
+
readonly publicKey: string;
|
|
24
|
+
readonly endpoint: string;
|
|
25
|
+
readonly meshIP: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A locally-generated WG keypair. Kept entirely off the wire — `publicKey`
|
|
29
|
+
* is what gets published in the manifest; `privateKey` stays on disk
|
|
30
|
+
* (mode 0600) and in this in-memory object.
|
|
31
|
+
*/
|
|
32
|
+
export interface WgLocalKey {
|
|
33
|
+
readonly publicKey: string;
|
|
34
|
+
readonly privateKey: string;
|
|
35
|
+
readonly createdAt: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Default federation mesh subnet. RFC1918 private space outside the
|
|
39
|
+
* common LAN/k8s ranges and Tailscale's 100.64.0.0/10. Documented in
|
|
40
|
+
* the ADR. Birthday-collision probability stays under 1% up to ~36
|
|
41
|
+
* peers and under 50% at ~302 peers — within the v1 ≤50-peer target.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DEFAULT_MESH_SUBNET = "10.50.0.0/16";
|
|
44
|
+
/**
|
|
45
|
+
* Generate an X25519 keypair in the format WireGuard accepts.
|
|
46
|
+
*
|
|
47
|
+
* WireGuard keys are 32 raw bytes encoded base64 (44 chars with '='
|
|
48
|
+
* padding). Node's `generateKeyPairSync('x25519')` returns PKCS8/SPKI
|
|
49
|
+
* DER envelopes — we extract the trailing 32 bytes which are the raw
|
|
50
|
+
* key material (the DER prefix is constant for X25519).
|
|
51
|
+
*
|
|
52
|
+
* No new dependencies: Node 18+ has X25519 support in core crypto.
|
|
53
|
+
*/
|
|
54
|
+
export declare function generateWgKeyPair(): WgLocalKey;
|
|
55
|
+
/**
|
|
56
|
+
* Derive a deterministic mesh IP for `nodeId` inside `subnet`.
|
|
57
|
+
*
|
|
58
|
+
* Strategy: sha256(nodeId) → top bytes interpreted as host portion of the
|
|
59
|
+
* subnet, clamped to avoid the network address (.0) and broadcast (.255)
|
|
60
|
+
* of any /24 inside the subnet. This is collision-resistant in the
|
|
61
|
+
* birthday-paradox sense — see ADR for thresholds.
|
|
62
|
+
*
|
|
63
|
+
* `usedIPs` (when provided) gives previously-assigned IPs in the mesh.
|
|
64
|
+
* If the derived IP is already taken, the function probes `nodeId + '\x00'`,
|
|
65
|
+
* `nodeId + '\x01'`, … until a free slot is found. Bounded to 1024 probes;
|
|
66
|
+
* exceeding that means the subnet is functionally exhausted and the caller
|
|
67
|
+
* should jump to a larger range (see ADR `10.50.0.0/12` recommendation).
|
|
68
|
+
*/
|
|
69
|
+
export declare function deriveMeshIP(nodeId: string, subnet?: string, usedIPs?: ReadonlySet<string>): string;
|
|
70
|
+
//# sourceMappingURL=wg-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wg-config.d.ts","sourceRoot":"","sources":["../../../src/domain/value-objects/wg-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,iBAAiB,CAAC;AAElD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAgB9C;AAuBD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAA4B,EACpC,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,GACvC,MAAM,CAsBR"}
|
package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-111 Phase 1 — WireGuard configuration value objects.
|
|
3
|
+
*
|
|
4
|
+
* Pure types + deterministic helpers. No I/O, no shell calls. Used by
|
|
5
|
+
* WgMeshService (Phase 2) and surfaced in FederationManifest (Phase 1) so
|
|
6
|
+
* peers can publish their WG identity inside the same Ed25519-signed
|
|
7
|
+
* manifest that already carries their federation identity.
|
|
8
|
+
*/
|
|
9
|
+
import { createHash, generateKeyPairSync } from 'node:crypto';
|
|
10
|
+
/**
|
|
11
|
+
* Default federation mesh subnet. RFC1918 private space outside the
|
|
12
|
+
* common LAN/k8s ranges and Tailscale's 100.64.0.0/10. Documented in
|
|
13
|
+
* the ADR. Birthday-collision probability stays under 1% up to ~36
|
|
14
|
+
* peers and under 50% at ~302 peers — within the v1 ≤50-peer target.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_MESH_SUBNET = '10.50.0.0/16';
|
|
17
|
+
/**
|
|
18
|
+
* Generate an X25519 keypair in the format WireGuard accepts.
|
|
19
|
+
*
|
|
20
|
+
* WireGuard keys are 32 raw bytes encoded base64 (44 chars with '='
|
|
21
|
+
* padding). Node's `generateKeyPairSync('x25519')` returns PKCS8/SPKI
|
|
22
|
+
* DER envelopes — we extract the trailing 32 bytes which are the raw
|
|
23
|
+
* key material (the DER prefix is constant for X25519).
|
|
24
|
+
*
|
|
25
|
+
* No new dependencies: Node 18+ has X25519 support in core crypto.
|
|
26
|
+
*/
|
|
27
|
+
export function generateWgKeyPair() {
|
|
28
|
+
const { publicKey, privateKey } = generateKeyPairSync('x25519');
|
|
29
|
+
const privDer = privateKey.export({ format: 'der', type: 'pkcs8' });
|
|
30
|
+
const pubDer = publicKey.export({ format: 'der', type: 'spki' });
|
|
31
|
+
// The PKCS8 prefix for X25519 is 16 bytes, leaving 32 raw bytes.
|
|
32
|
+
// The SPKI prefix for X25519 is 12 bytes, leaving 32 raw bytes.
|
|
33
|
+
const privRaw = privDer.subarray(privDer.length - 32);
|
|
34
|
+
const pubRaw = pubDer.subarray(pubDer.length - 32);
|
|
35
|
+
if (privRaw.length !== 32 || pubRaw.length !== 32) {
|
|
36
|
+
throw new Error(`generateWgKeyPair: unexpected DER layout (priv=${privRaw.length}B pub=${pubRaw.length}B)`);
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
publicKey: pubRaw.toString('base64'),
|
|
40
|
+
privateKey: privRaw.toString('base64'),
|
|
41
|
+
createdAt: new Date().toISOString(),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse a `a.b.c.d/M` CIDR into a numeric base + mask-prefix-length.
|
|
46
|
+
* Limited to IPv4 — v1 of ADR-111 is IPv4-only inside the mesh.
|
|
47
|
+
*/
|
|
48
|
+
function parseCidr(cidr) {
|
|
49
|
+
const m = cidr.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\/(\d{1,2})$/);
|
|
50
|
+
if (!m)
|
|
51
|
+
throw new Error(`invalid CIDR: ${cidr}`);
|
|
52
|
+
const [, a, b, c, d, p] = m;
|
|
53
|
+
const octets = [a, b, c, d].map(Number);
|
|
54
|
+
const prefix = Number(p);
|
|
55
|
+
if (octets.some(o => o < 0 || o > 255) || prefix < 0 || prefix > 32) {
|
|
56
|
+
throw new Error(`out-of-range CIDR: ${cidr}`);
|
|
57
|
+
}
|
|
58
|
+
const base = ((octets[0] << 24) | (octets[1] << 16) | (octets[2] << 8) | octets[3]) >>> 0;
|
|
59
|
+
return { base, prefix };
|
|
60
|
+
}
|
|
61
|
+
function ipToString(n) {
|
|
62
|
+
return `${(n >>> 24) & 0xff}.${(n >>> 16) & 0xff}.${(n >>> 8) & 0xff}.${n & 0xff}`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Derive a deterministic mesh IP for `nodeId` inside `subnet`.
|
|
66
|
+
*
|
|
67
|
+
* Strategy: sha256(nodeId) → top bytes interpreted as host portion of the
|
|
68
|
+
* subnet, clamped to avoid the network address (.0) and broadcast (.255)
|
|
69
|
+
* of any /24 inside the subnet. This is collision-resistant in the
|
|
70
|
+
* birthday-paradox sense — see ADR for thresholds.
|
|
71
|
+
*
|
|
72
|
+
* `usedIPs` (when provided) gives previously-assigned IPs in the mesh.
|
|
73
|
+
* If the derived IP is already taken, the function probes `nodeId + '\x00'`,
|
|
74
|
+
* `nodeId + '\x01'`, … until a free slot is found. Bounded to 1024 probes;
|
|
75
|
+
* exceeding that means the subnet is functionally exhausted and the caller
|
|
76
|
+
* should jump to a larger range (see ADR `10.50.0.0/12` recommendation).
|
|
77
|
+
*/
|
|
78
|
+
export function deriveMeshIP(nodeId, subnet = DEFAULT_MESH_SUBNET, usedIPs = new Set()) {
|
|
79
|
+
const { base, prefix } = parseCidr(subnet);
|
|
80
|
+
if (prefix > 30)
|
|
81
|
+
throw new Error(`subnet ${subnet} too small for mesh IPs`);
|
|
82
|
+
const hostBits = 32 - prefix;
|
|
83
|
+
const hostMask = hostBits >= 32 ? 0xffffffff : ((1 << hostBits) - 1) >>> 0;
|
|
84
|
+
const networkBase = (base & ~hostMask) >>> 0;
|
|
85
|
+
for (let probe = 0; probe < 1024; probe++) {
|
|
86
|
+
const input = probe === 0 ? nodeId : `${nodeId}\x00${probe}`;
|
|
87
|
+
const hash = createHash('sha256').update(input).digest();
|
|
88
|
+
// Use the first 4 bytes as the host portion.
|
|
89
|
+
const hashHost = ((hash[0] << 24) | (hash[1] << 16) | (hash[2] << 8) | hash[3]) >>> 0;
|
|
90
|
+
let candidate = (networkBase | (hashHost & hostMask)) >>> 0;
|
|
91
|
+
const lastOctet = candidate & 0xff;
|
|
92
|
+
// Avoid .0 (network) and .255 (broadcast) of each /24 slice. Cheap
|
|
93
|
+
// clamp: bump to .1 if landing on .0, or .254 if landing on .255.
|
|
94
|
+
if (lastOctet === 0)
|
|
95
|
+
candidate = (candidate | 1) >>> 0;
|
|
96
|
+
else if (lastOctet === 255)
|
|
97
|
+
candidate = (candidate & ~1) >>> 0;
|
|
98
|
+
const ip = `${ipToString(candidate)}/32`;
|
|
99
|
+
if (!usedIPs.has(ip))
|
|
100
|
+
return ip;
|
|
101
|
+
}
|
|
102
|
+
throw new Error(`deriveMeshIP: subnet ${subnet} exhausted after 1024 probes for ${nodeId}; jump to a wider range`);
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=wg-config.js.map
|
package/node_modules/@claude-flow/plugin-agent-federation/dist/domain/value-objects/wg-config.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wg-config.js","sourceRoot":"","sources":["../../../src/domain/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,CAAC;QACnC,mEAAmE;QACnE,kEAAkE;QAClE,IAAI,SAAS,KAAK,CAAC;YAAE,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;aAClD,IAAI,SAAS,KAAK,GAAG;YAAE,SAAS,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAC/D,MAAM,EAAE,GAAG,GAAG,UAAU,CAAC,SAAS,CAAC,KAAK,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;IAClC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,oCAAoC,MAAM,yBAAyB,CAAC,CAAC;AACrH,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { AgentFederationPlugin } from './plugin.js';
|
|
2
|
+
export { FederationNode, type FederationNodeProps, type FederationNodeCapabilities, type FederationNodeMetadata, type FederationNodeStateRecord } from './domain/entities/federation-node.js';
|
|
3
|
+
export { FederationNodeState, type SuspensionReason, type TransitionReason, canTransition, isCooldownElapsed, shouldAutoEvict, DEFAULT_SUSPENSION_COOLDOWN_MS, DEFAULT_AUTO_EVICTION_AGE_MS, } from './domain/value-objects/federation-node-state.js';
|
|
4
|
+
export { FederationBreakerService, evaluatePolicy, DEFAULT_BREAKER_POLICY, DEFAULT_MAX_SAMPLES_PER_PEER, type BreakerPolicy, type BreakerDecision, type SendOutcome, } from './application/federation-breaker-service.js';
|
|
5
|
+
export { InMemorySpendReporter, MemorySpendReporter, DEFAULT_FEDERATION_SPEND_NAMESPACE, DEFAULT_FEDERATION_SPEND_TTL_SECONDS, type SpendReporter, type MemoryStore, type MemorySpendReporterConfig, type FederationSpendEvent, } from './application/spend-reporter.js';
|
|
6
|
+
export { FederationSession, type FederationSessionProps, type SessionMetrics } from './domain/entities/federation-session.js';
|
|
7
|
+
export { FederationEnvelope, type FederationEnvelopeProps, type FederationMessageType, type PIIScanResult, type PIIScanDetection, type PIIScanAction, CONSENSUS_REQUIRED_TYPES, } from './domain/entities/federation-envelope.js';
|
|
8
|
+
export { TrustLevel, TRUST_TRANSITION_THRESHOLDS, CAPABILITY_GATES, isOperationAllowed, getTrustLevelLabel, type TrustTransitionThreshold, } from './domain/entities/trust-level.js';
|
|
9
|
+
export { PIIPipelineService, type PIIType, type PIIAction, type PIIDetection, type PIIPolicyConfig, type PIICalibration, type PIITransformResult, type PIIConfidenceThresholds, type PIIPipelineServiceDeps, } from './domain/services/pii-pipeline-service.js';
|
|
10
|
+
export { DiscoveryService, type DiscoveryMechanism, type FederationManifest, type DiscoveryServiceDeps, type DiscoveryConfig, } from './domain/services/discovery-service.js';
|
|
11
|
+
export { HandshakeService, type HandshakeChallenge, type HandshakeChallengeResponse, type HandshakeResult, type HandshakeServiceDeps, type HandshakeConfig, } from './domain/services/handshake-service.js';
|
|
12
|
+
export { RoutingService, type RoutingMode, type RoutingResult, type ConsensusProposal, type RoutingServiceDeps, } from './domain/services/routing-service.js';
|
|
13
|
+
export { AuditService, type FederationAuditEvent, type FederationAuditEventType, type AuditSeverity, type AuditCategory, type ComplianceMode, type AuditQuery, type AuditExportFormat, type AuditServiceDeps, type AuditServiceConfig, } from './domain/services/audit-service.js';
|
|
14
|
+
export { TrustEvaluator, type TrustScoreComponents, type TrustTransitionResult, type ImmediateDowngradeReason, type TrustEvaluatorDeps, } from './application/trust-evaluator.js';
|
|
15
|
+
export { FederationCoordinator, type FederationCoordinatorConfig, type FederationStatus, } from './application/federation-coordinator.js';
|
|
16
|
+
export { PolicyEngine, type FederationClaimType, type SecurityPolicy, type PolicyEvaluationResult, type PolicyEngineDeps, } from './application/policy-engine.js';
|
|
17
|
+
export { createFederationClaimChecker, type FederationAuthorizationMode, type FederationClaimChecker, type FederationClaimCheckerConfig, } from './application/claim-checker.js';
|
|
18
|
+
export { DEFAULT_ENVELOPE_SIGNATURE_MODE, JCS_SIGNATURE_PROTOCOL, canonicalizeEnvelopeForVerify, isLegacyEnvelopeTypeAllowed, selectEnvelopeSignatureVersion, type EnvelopeSignatureMode, type EnvelopeSignatureVersion, } from './application/inbound-dispatcher.js';
|
|
19
|
+
export { FEDERATION_PLUGIN_VERSION } from './version.js';
|
|
20
|
+
export { A2A_PROTOCOL_VERSION, A2A_WELL_KNOWN_PATH, RUFLO_FEDERATION_BINDING, RUFLO_FEDERATION_EXTENSION_URI, toAgentCard, fromAgentCard, validateAgentCard, type A2AAgentCard, type A2AAgentInterface, type A2AAgentSkill, type A2AAgentCapabilities, type A2AAgentExtension, type A2AAgentProvider, type ToAgentCardOptions, type AgentCardValidation, } from './a2a/agent-card.js';
|
|
21
|
+
export { startAgentCardServer, isLoopbackHost, type AgentCardServerOptions, type AgentCardServerHandle, } from './a2a/well-known.js';
|
|
22
|
+
export { fetchAgentCard, consumeAgentCard, resolveAgentCardUrl, type FetchAgentCardOptions, type FetchAgentCardResult, } from './a2a/consume.js';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,KAAK,sBAAsB,EAAE,KAAK,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC9L,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,4BAA4B,EAC5B,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,6CAA6C,CAAC;AACrD,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AqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export { AgentFederationPlugin } from './plugin.js';
|
|
2
|
+
export { FederationNode } from './domain/entities/federation-node.js';
|
|
3
|
+
export { FederationNodeState, canTransition, isCooldownElapsed, shouldAutoEvict, DEFAULT_SUSPENSION_COOLDOWN_MS, DEFAULT_AUTO_EVICTION_AGE_MS, } from './domain/value-objects/federation-node-state.js';
|
|
4
|
+
export { FederationBreakerService, evaluatePolicy, DEFAULT_BREAKER_POLICY, DEFAULT_MAX_SAMPLES_PER_PEER, } from './application/federation-breaker-service.js';
|
|
5
|
+
export { InMemorySpendReporter, MemorySpendReporter, DEFAULT_FEDERATION_SPEND_NAMESPACE, DEFAULT_FEDERATION_SPEND_TTL_SECONDS, } from './application/spend-reporter.js';
|
|
6
|
+
export { FederationSession } from './domain/entities/federation-session.js';
|
|
7
|
+
export { FederationEnvelope, CONSENSUS_REQUIRED_TYPES, } from './domain/entities/federation-envelope.js';
|
|
8
|
+
export { TrustLevel, TRUST_TRANSITION_THRESHOLDS, CAPABILITY_GATES, isOperationAllowed, getTrustLevelLabel, } from './domain/entities/trust-level.js';
|
|
9
|
+
export { PIIPipelineService, } from './domain/services/pii-pipeline-service.js';
|
|
10
|
+
export { DiscoveryService, } from './domain/services/discovery-service.js';
|
|
11
|
+
export { HandshakeService, } from './domain/services/handshake-service.js';
|
|
12
|
+
export { RoutingService, } from './domain/services/routing-service.js';
|
|
13
|
+
export { AuditService, } from './domain/services/audit-service.js';
|
|
14
|
+
export { TrustEvaluator, } from './application/trust-evaluator.js';
|
|
15
|
+
export { FederationCoordinator, } from './application/federation-coordinator.js';
|
|
16
|
+
export { PolicyEngine, } from './application/policy-engine.js';
|
|
17
|
+
export { createFederationClaimChecker, } from './application/claim-checker.js';
|
|
18
|
+
export { DEFAULT_ENVELOPE_SIGNATURE_MODE, JCS_SIGNATURE_PROTOCOL, canonicalizeEnvelopeForVerify, isLegacyEnvelopeTypeAllowed, selectEnvelopeSignatureVersion, } from './application/inbound-dispatcher.js';
|
|
19
|
+
export { FEDERATION_PLUGIN_VERSION } from './version.js';
|
|
20
|
+
// A2A (Agent2Agent, Linux Foundation) Agent Card adapter — cards only.
|
|
21
|
+
export { A2A_PROTOCOL_VERSION, A2A_WELL_KNOWN_PATH, RUFLO_FEDERATION_BINDING, RUFLO_FEDERATION_EXTENSION_URI, toAgentCard, fromAgentCard, validateAgentCard, } from './a2a/agent-card.js';
|
|
22
|
+
export { startAgentCardServer, isLoopbackHost, } from './a2a/well-known.js';
|
|
23
|
+
export { fetchAgentCard, consumeAgentCard, resolveAgentCardUrl, } from './a2a/consume.js';
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EAAE,cAAc,EAA0H,MAAM,sCAAsC,CAAC;AAC9L,OAAO,EACL,mBAAmB,EAGnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,4BAA4B,GAI7B,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,kCAAkC,EAClC,oCAAoC,GAKrC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAoD,MAAM,yCAAyC,CAAC;AAC9H,OAAO,EACL,kBAAkB,EAMlB,wBAAwB,GACzB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,UAAU,EACV,2BAA2B,EAC3B,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EACL,kBAAkB,GASnB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EACL,gBAAgB,GAKjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,gBAAgB,GAMjB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,cAAc,GAKf,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,YAAY,GAUb,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EACL,cAAc,GAKf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,qBAAqB,GAGtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,YAAY,GAKb,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,4BAA4B,GAI7B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,GAG/B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEzD,uEAAuE;AACvE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,wBAAwB,EACxB,8BAA8B,EAC9B,WAAW,EACX,aAAa,EACb,iBAAiB,GASlB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,cAAc,GAGf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
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,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAK1E,KAAK,iBAAiB,GAAG,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC5D,KAAK,aAAa,GAAG,MAAM,aAAa,GAAG,IAAI,CAAC;AAChD,KAAK,YAAY,GAAG,MAAM,aAAa,GAAG,IAAI,CAAC;AAM/C,wBAAgB,cAAc,CAC5B,cAAc,EAAE,iBAAiB,EACjC,UAAU,EAAE,aAAa,EACzB,SAAS,GAAE,YAAyB,GACnC,iBAAiB,EAAE,CAscrB"}
|