@claude-flow/cli 3.32.29 → 3.32.32
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/autopilot-state.d.ts +10 -0
- package/dist/src/autopilot-state.js +16 -0
- package/dist/src/commands/autopilot.js +10 -4
- package/dist/src/init/claudemd-generator.js +53 -2
- package/dist/src/mcp-tools/autopilot-tools.js +18 -3
- package/dist/src/mcp-tools/capability-brain.js +22 -22
- package/dist/src/mcp-tools/guidance-tools.js +1 -1
- package/dist/src/services/harness-flywheel-runtime.d.ts +21 -1
- package/dist/src/services/harness-flywheel-runtime.js +46 -24
- 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,922 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @claude-flow/codex - config.toml Generator
|
|
3
|
+
*
|
|
4
|
+
* Generates Codex CLI configuration files in TOML format
|
|
5
|
+
*/
|
|
6
|
+
import { getRufloMcpServerConfig, renderMcpServerToml } from '../mcp-config.js';
|
|
7
|
+
/**
|
|
8
|
+
* Generate a config.toml file based on the provided options
|
|
9
|
+
*/
|
|
10
|
+
export async function generateConfigToml(options = {}) {
|
|
11
|
+
const { model = 'gpt-5.3-codex', approvalPolicy = 'on-request', sandboxMode = 'workspace-write', webSearch = 'cached', projectDocMaxBytes = 65536, features = {}, mcpServers = [], skills = [], profiles = {}, historyPersistence = 'save-all', security = {}, performance = {}, logging = {}, policy = {}, swarmAutomation = {}, } = options;
|
|
12
|
+
const lines = [];
|
|
13
|
+
// Header
|
|
14
|
+
lines.push('# =============================================================================');
|
|
15
|
+
lines.push('# Claude Flow V3 - Codex Configuration');
|
|
16
|
+
lines.push('# =============================================================================');
|
|
17
|
+
lines.push('# Generated by: @claude-flow/codex');
|
|
18
|
+
lines.push('# Documentation: https://github.com/ruvnet/ruflo');
|
|
19
|
+
lines.push('# ');
|
|
20
|
+
lines.push('# This file configures the Codex CLI for Claude Flow integration.');
|
|
21
|
+
lines.push('# Place in .agents/config.toml (project) or .codex/config.toml (user).');
|
|
22
|
+
lines.push('# =============================================================================');
|
|
23
|
+
lines.push('');
|
|
24
|
+
lines.push('# =============================================================================');
|
|
25
|
+
lines.push('# Core Settings');
|
|
26
|
+
lines.push('# =============================================================================');
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push('# Model selection - the AI model to use for code generation');
|
|
29
|
+
lines.push('# Options: gpt-5.3-codex, gpt-4o, claude-sonnet, claude-opus');
|
|
30
|
+
lines.push(`model = "${model}"`);
|
|
31
|
+
lines.push('');
|
|
32
|
+
lines.push('# Approval policy determines when human approval is required');
|
|
33
|
+
lines.push('# - untrusted: Always require approval');
|
|
34
|
+
lines.push('# - on-failure: Require approval only after failures');
|
|
35
|
+
lines.push('# - on-request: Require approval for significant changes');
|
|
36
|
+
lines.push('# - never: Auto-approve all actions (use with caution)');
|
|
37
|
+
lines.push(`approval_policy = "${approvalPolicy}"`);
|
|
38
|
+
lines.push('');
|
|
39
|
+
lines.push('# Sandbox mode controls file system access');
|
|
40
|
+
lines.push('# - read-only: Can only read files, no modifications');
|
|
41
|
+
lines.push('# - workspace-write: Can write within workspace directory');
|
|
42
|
+
lines.push('# - danger-full-access: Full file system access (dangerous)');
|
|
43
|
+
lines.push(`sandbox_mode = "${sandboxMode}"`);
|
|
44
|
+
lines.push('');
|
|
45
|
+
lines.push('# Web search enables internet access for research');
|
|
46
|
+
lines.push('# - disabled: No web access');
|
|
47
|
+
lines.push('# - cached: Use cached results when available');
|
|
48
|
+
lines.push('# - live: Always fetch fresh results');
|
|
49
|
+
lines.push(`web_search = "${webSearch}"`);
|
|
50
|
+
lines.push('');
|
|
51
|
+
// Project Documentation
|
|
52
|
+
lines.push('# =============================================================================');
|
|
53
|
+
lines.push('# Project Documentation');
|
|
54
|
+
lines.push('# =============================================================================');
|
|
55
|
+
lines.push('');
|
|
56
|
+
lines.push('# Maximum bytes to read from AGENTS.md files');
|
|
57
|
+
lines.push(`project_doc_max_bytes = ${projectDocMaxBytes}`);
|
|
58
|
+
lines.push('');
|
|
59
|
+
lines.push('# Fallback filenames if AGENTS.md not found');
|
|
60
|
+
lines.push('project_doc_fallback_filenames = [');
|
|
61
|
+
lines.push(' "AGENTS.md",');
|
|
62
|
+
lines.push(' "TEAM_GUIDE.md",');
|
|
63
|
+
lines.push(' ".agents.md"');
|
|
64
|
+
lines.push(']');
|
|
65
|
+
lines.push('');
|
|
66
|
+
// All Codex root keys above must appear before the first TOML table.
|
|
67
|
+
lines.push('# =============================================================================');
|
|
68
|
+
lines.push('# Ruflo Agentic Policy Engine (ADR-324)');
|
|
69
|
+
lines.push('# =============================================================================');
|
|
70
|
+
lines.push('');
|
|
71
|
+
lines.push('[policy]');
|
|
72
|
+
lines.push('# legacy preserves existing installs; observe records would-deny decisions; enforce blocks');
|
|
73
|
+
lines.push(`mode = "${policy.mode ?? 'legacy'}"`);
|
|
74
|
+
lines.push('');
|
|
75
|
+
lines.push('[swarm.automation]');
|
|
76
|
+
lines.push('# Unattended fanout is opt-in. Interactive Codex may still delegate explicitly.');
|
|
77
|
+
lines.push(`enabled = ${swarmAutomation.enabled ?? false}`);
|
|
78
|
+
lines.push(`max_concurrent = ${swarmAutomation.maxConcurrent ?? 4}`);
|
|
79
|
+
lines.push(`max_writers = ${swarmAutomation.maxWriters ?? 2}`);
|
|
80
|
+
lines.push(`worktree_isolation = ${swarmAutomation.worktreeIsolation ?? true}`);
|
|
81
|
+
lines.push(`dependency_failure = "${swarmAutomation.dependencyFailure ?? 'cancel'}"`);
|
|
82
|
+
lines.push(`agent_timeout_seconds = ${swarmAutomation.agentTimeoutSeconds ?? 1800}`);
|
|
83
|
+
lines.push(`max_output_bytes = ${swarmAutomation.maxOutputBytes ?? 1048576}`);
|
|
84
|
+
lines.push('');
|
|
85
|
+
// Features
|
|
86
|
+
lines.push('# =============================================================================');
|
|
87
|
+
lines.push('# Features');
|
|
88
|
+
lines.push('# =============================================================================');
|
|
89
|
+
lines.push('');
|
|
90
|
+
lines.push('[features]');
|
|
91
|
+
lines.push('# Enable child AGENTS.md guidance');
|
|
92
|
+
lines.push(`child_agents_md = ${features.childAgentsMd ?? true}`);
|
|
93
|
+
lines.push('');
|
|
94
|
+
lines.push('# Cache shell environment for faster repeated commands');
|
|
95
|
+
lines.push(`shell_snapshot = ${features.shellSnapshot ?? true}`);
|
|
96
|
+
lines.push('');
|
|
97
|
+
lines.push('# Smart approvals based on request context');
|
|
98
|
+
lines.push(`request_rule = ${features.requestRule ?? true}`);
|
|
99
|
+
lines.push('');
|
|
100
|
+
lines.push('# Enable remote compaction for large histories');
|
|
101
|
+
lines.push(`remote_compaction = ${features.remoteCompaction ?? true}`);
|
|
102
|
+
lines.push('');
|
|
103
|
+
// MCP Servers
|
|
104
|
+
if (mcpServers.length > 0 || true) { // Always include claude-flow by default
|
|
105
|
+
lines.push('# =============================================================================');
|
|
106
|
+
lines.push('# MCP Servers');
|
|
107
|
+
lines.push('# =============================================================================');
|
|
108
|
+
lines.push('');
|
|
109
|
+
// Default claude-flow server
|
|
110
|
+
const hasRuflo = mcpServers.some(s => s.name === 'ruflo' || s.name === 'claude-flow');
|
|
111
|
+
if (!hasRuflo) {
|
|
112
|
+
lines.push(...generateMcpServer(getRufloMcpServerConfig()));
|
|
113
|
+
lines.push('');
|
|
114
|
+
}
|
|
115
|
+
for (const server of mcpServers) {
|
|
116
|
+
lines.push(...generateMcpServer(server));
|
|
117
|
+
lines.push('');
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Skills Configuration
|
|
121
|
+
if (skills.length > 0) {
|
|
122
|
+
lines.push('# =============================================================================');
|
|
123
|
+
lines.push('# Skills Configuration');
|
|
124
|
+
lines.push('# =============================================================================');
|
|
125
|
+
lines.push('');
|
|
126
|
+
for (const skill of skills) {
|
|
127
|
+
lines.push(...generateSkillConfig(skill));
|
|
128
|
+
lines.push('');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
// Profiles
|
|
132
|
+
lines.push('# =============================================================================');
|
|
133
|
+
lines.push('# Profiles');
|
|
134
|
+
lines.push('# =============================================================================');
|
|
135
|
+
lines.push('');
|
|
136
|
+
// Default profiles
|
|
137
|
+
const defaultProfiles = {
|
|
138
|
+
dev: {
|
|
139
|
+
approvalPolicy: 'on-request',
|
|
140
|
+
sandboxMode: 'workspace-write',
|
|
141
|
+
webSearch: 'live',
|
|
142
|
+
},
|
|
143
|
+
safe: {
|
|
144
|
+
approvalPolicy: 'untrusted',
|
|
145
|
+
sandboxMode: 'read-only',
|
|
146
|
+
webSearch: 'disabled',
|
|
147
|
+
},
|
|
148
|
+
ci: {
|
|
149
|
+
approvalPolicy: 'never',
|
|
150
|
+
sandboxMode: 'workspace-write',
|
|
151
|
+
webSearch: 'cached',
|
|
152
|
+
},
|
|
153
|
+
...profiles,
|
|
154
|
+
};
|
|
155
|
+
for (const [name, profile] of Object.entries(defaultProfiles)) {
|
|
156
|
+
lines.push(...generateProfile(name, profile));
|
|
157
|
+
lines.push('');
|
|
158
|
+
}
|
|
159
|
+
// History
|
|
160
|
+
lines.push('# =============================================================================');
|
|
161
|
+
lines.push('# History');
|
|
162
|
+
lines.push('# =============================================================================');
|
|
163
|
+
lines.push('');
|
|
164
|
+
lines.push('[history]');
|
|
165
|
+
lines.push('# Save all session transcripts');
|
|
166
|
+
lines.push(`persistence = "${historyPersistence}"`);
|
|
167
|
+
lines.push('');
|
|
168
|
+
// Shell Environment Policy
|
|
169
|
+
lines.push('# =============================================================================');
|
|
170
|
+
lines.push('# Shell Environment');
|
|
171
|
+
lines.push('# =============================================================================');
|
|
172
|
+
lines.push('');
|
|
173
|
+
lines.push('[shell_environment_policy]');
|
|
174
|
+
lines.push('# Inherit environment variables');
|
|
175
|
+
lines.push('inherit = "core"');
|
|
176
|
+
lines.push('');
|
|
177
|
+
lines.push('# Exclude sensitive variables');
|
|
178
|
+
lines.push('exclude = ["*_KEY", "*_SECRET", "*_TOKEN", "*_PASSWORD"]');
|
|
179
|
+
lines.push('');
|
|
180
|
+
// Sandbox Workspace Write Settings
|
|
181
|
+
lines.push('# =============================================================================');
|
|
182
|
+
lines.push('# Sandbox Workspace Write Settings');
|
|
183
|
+
lines.push('# =============================================================================');
|
|
184
|
+
lines.push('');
|
|
185
|
+
lines.push('[sandbox_workspace_write]');
|
|
186
|
+
lines.push('# Additional writable paths beyond workspace');
|
|
187
|
+
lines.push('writable_roots = []');
|
|
188
|
+
lines.push('');
|
|
189
|
+
lines.push('# Allow network access');
|
|
190
|
+
lines.push('network_access = true');
|
|
191
|
+
lines.push('');
|
|
192
|
+
lines.push('# Exclude temp directories');
|
|
193
|
+
lines.push('exclude_slash_tmp = false');
|
|
194
|
+
lines.push('');
|
|
195
|
+
// Security Settings
|
|
196
|
+
lines.push('# =============================================================================');
|
|
197
|
+
lines.push('# Security Settings');
|
|
198
|
+
lines.push('# =============================================================================');
|
|
199
|
+
lines.push('');
|
|
200
|
+
lines.push('[security]');
|
|
201
|
+
lines.push('# Enable input validation for all user inputs');
|
|
202
|
+
lines.push(`input_validation = ${security.inputValidation ?? true}`);
|
|
203
|
+
lines.push('');
|
|
204
|
+
lines.push('# Prevent directory traversal attacks');
|
|
205
|
+
lines.push(`path_traversal_prevention = ${security.pathTraversal ?? true}`);
|
|
206
|
+
lines.push('');
|
|
207
|
+
lines.push('# Scan for hardcoded secrets');
|
|
208
|
+
lines.push(`secret_scanning = ${security.secretScanning ?? true}`);
|
|
209
|
+
lines.push('');
|
|
210
|
+
lines.push('# Scan dependencies for known CVEs');
|
|
211
|
+
lines.push(`cve_scanning = ${security.cveScanning ?? true}`);
|
|
212
|
+
lines.push('');
|
|
213
|
+
lines.push('# Maximum file size for operations (bytes)');
|
|
214
|
+
lines.push(`max_file_size = ${security.maxFileSize ?? 10485760}`);
|
|
215
|
+
lines.push('');
|
|
216
|
+
lines.push('# Allowed file extensions (empty = allow all)');
|
|
217
|
+
const allowedExts = security.allowedExtensions ?? [];
|
|
218
|
+
if (allowedExts.length > 0) {
|
|
219
|
+
lines.push(`allowed_extensions = [${allowedExts.map((e) => `"${e}"`).join(', ')}]`);
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
lines.push('allowed_extensions = []');
|
|
223
|
+
}
|
|
224
|
+
lines.push('');
|
|
225
|
+
lines.push('# Blocked file patterns (regex)');
|
|
226
|
+
const blockedPatterns = security.blockedPatterns ?? ['\\.env$', 'credentials\\.json$', '\\.pem$', '\\.key$'];
|
|
227
|
+
lines.push(`blocked_patterns = [${blockedPatterns.map((p) => `"${escapeTomlString(p)}"`).join(', ')}]`);
|
|
228
|
+
lines.push('');
|
|
229
|
+
// Performance Settings
|
|
230
|
+
lines.push('# =============================================================================');
|
|
231
|
+
lines.push('# Performance Settings');
|
|
232
|
+
lines.push('# =============================================================================');
|
|
233
|
+
lines.push('');
|
|
234
|
+
lines.push('[performance]');
|
|
235
|
+
lines.push('# Maximum concurrent agents');
|
|
236
|
+
lines.push(`max_agents = ${performance.maxAgents ?? 8}`);
|
|
237
|
+
lines.push('');
|
|
238
|
+
lines.push('# Task timeout in seconds');
|
|
239
|
+
lines.push(`task_timeout = ${performance.taskTimeout ?? 300}`);
|
|
240
|
+
lines.push('');
|
|
241
|
+
lines.push('# Memory limit per agent');
|
|
242
|
+
lines.push(`memory_limit = "${performance.memoryLimit ?? '512MB'}"`);
|
|
243
|
+
lines.push('');
|
|
244
|
+
lines.push('# Enable response caching');
|
|
245
|
+
lines.push(`cache_enabled = ${performance.cacheEnabled ?? true}`);
|
|
246
|
+
lines.push('');
|
|
247
|
+
lines.push('# Cache TTL in seconds');
|
|
248
|
+
lines.push(`cache_ttl = ${performance.cacheTtl ?? 3600}`);
|
|
249
|
+
lines.push('');
|
|
250
|
+
lines.push('# Enable parallel task execution');
|
|
251
|
+
lines.push(`parallel_execution = ${performance.parallelExecution ?? true}`);
|
|
252
|
+
lines.push('');
|
|
253
|
+
// Logging Settings
|
|
254
|
+
lines.push('# =============================================================================');
|
|
255
|
+
lines.push('# Logging Settings');
|
|
256
|
+
lines.push('# =============================================================================');
|
|
257
|
+
lines.push('');
|
|
258
|
+
lines.push('[logging]');
|
|
259
|
+
lines.push('# Log level: debug, info, warn, error');
|
|
260
|
+
lines.push(`level = "${logging.level ?? 'info'}"`);
|
|
261
|
+
lines.push('');
|
|
262
|
+
lines.push('# Log format: json, text, pretty');
|
|
263
|
+
lines.push(`format = "${logging.format ?? 'pretty'}"`);
|
|
264
|
+
lines.push('');
|
|
265
|
+
lines.push('# Log destination: stdout, file, both');
|
|
266
|
+
lines.push(`destination = "${logging.destination ?? 'stdout'}"`);
|
|
267
|
+
lines.push('');
|
|
268
|
+
if (logging.filePath || logging.destination === 'file' || logging.destination === 'both') {
|
|
269
|
+
lines.push('# Log file path');
|
|
270
|
+
lines.push(`file_path = "${logging.filePath ?? './logs/claude-flow.log'}"`);
|
|
271
|
+
lines.push('');
|
|
272
|
+
lines.push('# Maximum number of log files to retain');
|
|
273
|
+
lines.push(`max_files = ${logging.maxFiles ?? 10}`);
|
|
274
|
+
lines.push('');
|
|
275
|
+
lines.push('# Maximum size per log file');
|
|
276
|
+
lines.push(`max_size = "${logging.maxSize ?? '10MB'}"`);
|
|
277
|
+
lines.push('');
|
|
278
|
+
}
|
|
279
|
+
// Neural/Intelligence Settings
|
|
280
|
+
lines.push('# =============================================================================');
|
|
281
|
+
lines.push('# Neural Intelligence Settings');
|
|
282
|
+
lines.push('# =============================================================================');
|
|
283
|
+
lines.push('');
|
|
284
|
+
lines.push('[neural]');
|
|
285
|
+
lines.push('# Enable SONA (Self-Optimizing Neural Architecture)');
|
|
286
|
+
lines.push('sona_enabled = true');
|
|
287
|
+
lines.push('');
|
|
288
|
+
lines.push('# Enable HNSW vector search');
|
|
289
|
+
lines.push('hnsw_enabled = true');
|
|
290
|
+
lines.push('');
|
|
291
|
+
lines.push('# HNSW index parameters');
|
|
292
|
+
lines.push('hnsw_m = 16');
|
|
293
|
+
lines.push('hnsw_ef_construction = 200');
|
|
294
|
+
lines.push('hnsw_ef_search = 100');
|
|
295
|
+
lines.push('');
|
|
296
|
+
lines.push('# Enable pattern learning');
|
|
297
|
+
lines.push('pattern_learning = true');
|
|
298
|
+
lines.push('');
|
|
299
|
+
lines.push('# Learning rate for neural adaptation');
|
|
300
|
+
lines.push('learning_rate = 0.01');
|
|
301
|
+
lines.push('');
|
|
302
|
+
// Swarm Settings
|
|
303
|
+
lines.push('# =============================================================================');
|
|
304
|
+
lines.push('# Swarm Orchestration Settings');
|
|
305
|
+
lines.push('# =============================================================================');
|
|
306
|
+
lines.push('');
|
|
307
|
+
lines.push('[swarm]');
|
|
308
|
+
lines.push('# Default topology: hierarchical, mesh, ring, star');
|
|
309
|
+
lines.push('default_topology = "hierarchical"');
|
|
310
|
+
lines.push('');
|
|
311
|
+
lines.push('# Default strategy: balanced, specialized, adaptive');
|
|
312
|
+
lines.push('default_strategy = "specialized"');
|
|
313
|
+
lines.push('');
|
|
314
|
+
lines.push('# Consensus algorithm: raft, byzantine, gossip');
|
|
315
|
+
lines.push('consensus = "raft"');
|
|
316
|
+
lines.push('');
|
|
317
|
+
lines.push('# Enable anti-drift measures');
|
|
318
|
+
lines.push('anti_drift = true');
|
|
319
|
+
lines.push('');
|
|
320
|
+
lines.push('# Checkpoint interval (tasks)');
|
|
321
|
+
lines.push('checkpoint_interval = 10');
|
|
322
|
+
lines.push('');
|
|
323
|
+
// Hooks Settings
|
|
324
|
+
lines.push('# =============================================================================');
|
|
325
|
+
lines.push('# Hooks Configuration');
|
|
326
|
+
lines.push('# =============================================================================');
|
|
327
|
+
lines.push('');
|
|
328
|
+
lines.push('[hooks]');
|
|
329
|
+
lines.push('# Enable lifecycle hooks');
|
|
330
|
+
lines.push('enabled = true');
|
|
331
|
+
lines.push('');
|
|
332
|
+
lines.push('# Pre-task hook');
|
|
333
|
+
lines.push('pre_task = true');
|
|
334
|
+
lines.push('');
|
|
335
|
+
lines.push('# Post-task hook (for learning)');
|
|
336
|
+
lines.push('post_task = true');
|
|
337
|
+
lines.push('');
|
|
338
|
+
lines.push('# Enable neural training on post-edit');
|
|
339
|
+
lines.push('train_on_edit = true');
|
|
340
|
+
lines.push('');
|
|
341
|
+
// Background Workers
|
|
342
|
+
lines.push('# =============================================================================');
|
|
343
|
+
lines.push('# Background Workers');
|
|
344
|
+
lines.push('# =============================================================================');
|
|
345
|
+
lines.push('');
|
|
346
|
+
lines.push('[workers]');
|
|
347
|
+
lines.push('# Enable background workers');
|
|
348
|
+
lines.push('enabled = true');
|
|
349
|
+
lines.push('');
|
|
350
|
+
lines.push('# Worker configuration');
|
|
351
|
+
lines.push('[workers.audit]');
|
|
352
|
+
lines.push('enabled = true');
|
|
353
|
+
lines.push('priority = "critical"');
|
|
354
|
+
lines.push('interval = 300');
|
|
355
|
+
lines.push('');
|
|
356
|
+
lines.push('[workers.optimize]');
|
|
357
|
+
lines.push('enabled = true');
|
|
358
|
+
lines.push('priority = "high"');
|
|
359
|
+
lines.push('interval = 600');
|
|
360
|
+
lines.push('');
|
|
361
|
+
lines.push('[workers.consolidate]');
|
|
362
|
+
lines.push('enabled = true');
|
|
363
|
+
lines.push('priority = "low"');
|
|
364
|
+
lines.push('interval = 1800');
|
|
365
|
+
lines.push('');
|
|
366
|
+
return lines.join('\n');
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Escape special characters in TOML strings
|
|
370
|
+
*/
|
|
371
|
+
function escapeTomlString(str) {
|
|
372
|
+
return str
|
|
373
|
+
.replace(/\\/g, '\\\\')
|
|
374
|
+
.replace(/"/g, '\\"')
|
|
375
|
+
.replace(/\n/g, '\\n')
|
|
376
|
+
.replace(/\r/g, '\\r')
|
|
377
|
+
.replace(/\t/g, '\\t');
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Generate MCP server configuration lines
|
|
381
|
+
*/
|
|
382
|
+
function generateMcpServer(server) {
|
|
383
|
+
const lines = [];
|
|
384
|
+
lines.push(`[mcp_servers.${server.name}]`);
|
|
385
|
+
lines.push(`command = "${server.command}"`);
|
|
386
|
+
if (server.args && server.args.length > 0) {
|
|
387
|
+
const argsStr = server.args.map(a => `"${a}"`).join(', ');
|
|
388
|
+
lines.push(`args = [${argsStr}]`);
|
|
389
|
+
}
|
|
390
|
+
lines.push(`enabled = ${server.enabled ?? true}`);
|
|
391
|
+
if (server.toolTimeout) {
|
|
392
|
+
lines.push(`tool_timeout_sec = ${server.toolTimeout}`);
|
|
393
|
+
}
|
|
394
|
+
if (server.env && Object.keys(server.env).length > 0) {
|
|
395
|
+
lines.push('');
|
|
396
|
+
lines.push(`[mcp_servers.${server.name}.env]`);
|
|
397
|
+
for (const [key, value] of Object.entries(server.env)) {
|
|
398
|
+
lines.push(`${key} = "${value}"`);
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
return lines;
|
|
402
|
+
}
|
|
403
|
+
/**
|
|
404
|
+
* Generate skill configuration lines
|
|
405
|
+
*/
|
|
406
|
+
function generateSkillConfig(skill) {
|
|
407
|
+
const lines = [];
|
|
408
|
+
lines.push('[[skills.config]]');
|
|
409
|
+
lines.push(`path = "${skill.path}"`);
|
|
410
|
+
lines.push(`enabled = ${skill.enabled ?? true}`);
|
|
411
|
+
return lines;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Generate profile configuration lines
|
|
415
|
+
*/
|
|
416
|
+
function generateProfile(name, profile) {
|
|
417
|
+
const lines = [];
|
|
418
|
+
const comment = name === 'dev' ? 'Development profile - more permissive for local work'
|
|
419
|
+
: name === 'safe' ? 'Safe profile - maximum restrictions'
|
|
420
|
+
: name === 'ci' ? 'CI profile - for automated pipelines'
|
|
421
|
+
: `${name} profile`;
|
|
422
|
+
lines.push(`# ${comment}`);
|
|
423
|
+
lines.push(`[profiles.${name}]`);
|
|
424
|
+
if (profile.approvalPolicy) {
|
|
425
|
+
lines.push(`approval_policy = "${profile.approvalPolicy}"`);
|
|
426
|
+
}
|
|
427
|
+
if (profile.sandboxMode) {
|
|
428
|
+
lines.push(`sandbox_mode = "${profile.sandboxMode}"`);
|
|
429
|
+
}
|
|
430
|
+
if (profile.webSearch) {
|
|
431
|
+
lines.push(`web_search = "${profile.webSearch}"`);
|
|
432
|
+
}
|
|
433
|
+
return lines;
|
|
434
|
+
}
|
|
435
|
+
/**
|
|
436
|
+
* Generate minimal config.toml
|
|
437
|
+
*/
|
|
438
|
+
export async function generateMinimalConfigToml(options = {}) {
|
|
439
|
+
const { model = 'gpt-5.3-codex', approvalPolicy = 'on-request', sandboxMode = 'workspace-write', } = options;
|
|
440
|
+
return `# Claude Flow V3 - Minimal Codex Configuration
|
|
441
|
+
|
|
442
|
+
model = "${model}"
|
|
443
|
+
approval_policy = "${approvalPolicy}"
|
|
444
|
+
sandbox_mode = "${sandboxMode}"
|
|
445
|
+
|
|
446
|
+
[mcp_servers.ruflo]
|
|
447
|
+
command = "npx"
|
|
448
|
+
args = ["-y", "ruflo@latest", "mcp", "start"]
|
|
449
|
+
enabled = true
|
|
450
|
+
startup_timeout_sec = 120
|
|
451
|
+
`;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Generate CI/CD config.toml
|
|
455
|
+
*/
|
|
456
|
+
export async function generateCIConfigToml(platform = process.platform) {
|
|
457
|
+
const mcpCommand = renderMcpServerToml(getRufloMcpServerConfig(platform, 300)).join('\n');
|
|
458
|
+
return `# =============================================================================
|
|
459
|
+
# Claude Flow V3 - CI/CD Pipeline Configuration
|
|
460
|
+
# =============================================================================
|
|
461
|
+
# Optimized for automated CI/CD environments
|
|
462
|
+
# No interactive approvals, ephemeral history, minimal overhead
|
|
463
|
+
# =============================================================================
|
|
464
|
+
|
|
465
|
+
model = "gpt-5.3-codex"
|
|
466
|
+
approval_policy = "never"
|
|
467
|
+
sandbox_mode = "workspace-write"
|
|
468
|
+
web_search = "disabled"
|
|
469
|
+
|
|
470
|
+
# Project documentation
|
|
471
|
+
project_doc_max_bytes = 65536
|
|
472
|
+
|
|
473
|
+
[features]
|
|
474
|
+
# Disable interactive features for CI
|
|
475
|
+
shell_snapshot = false
|
|
476
|
+
remote_compaction = false
|
|
477
|
+
child_agents_md = true
|
|
478
|
+
request_rule = false
|
|
479
|
+
|
|
480
|
+
${mcpCommand}
|
|
481
|
+
|
|
482
|
+
[history]
|
|
483
|
+
persistence = "none"
|
|
484
|
+
|
|
485
|
+
[shell_environment_policy]
|
|
486
|
+
inherit = "core"
|
|
487
|
+
exclude = ["*_KEY", "*_SECRET", "*_TOKEN", "*_PASSWORD", "CI_*"]
|
|
488
|
+
|
|
489
|
+
[security]
|
|
490
|
+
input_validation = true
|
|
491
|
+
path_traversal_prevention = true
|
|
492
|
+
secret_scanning = true
|
|
493
|
+
cve_scanning = true
|
|
494
|
+
|
|
495
|
+
[performance]
|
|
496
|
+
max_agents = 4
|
|
497
|
+
task_timeout = 600
|
|
498
|
+
cache_enabled = false
|
|
499
|
+
parallel_execution = true
|
|
500
|
+
|
|
501
|
+
[logging]
|
|
502
|
+
level = "info"
|
|
503
|
+
format = "json"
|
|
504
|
+
destination = "stdout"
|
|
505
|
+
|
|
506
|
+
[swarm]
|
|
507
|
+
default_topology = "hierarchical"
|
|
508
|
+
default_strategy = "specialized"
|
|
509
|
+
anti_drift = true
|
|
510
|
+
|
|
511
|
+
[hooks]
|
|
512
|
+
enabled = true
|
|
513
|
+
pre_task = true
|
|
514
|
+
post_task = false
|
|
515
|
+
train_on_edit = false
|
|
516
|
+
`;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
519
|
+
* Generate enterprise config.toml with full governance
|
|
520
|
+
*/
|
|
521
|
+
export async function generateEnterpriseConfigToml() {
|
|
522
|
+
return `# =============================================================================
|
|
523
|
+
# Claude Flow V3 - Enterprise Configuration
|
|
524
|
+
# =============================================================================
|
|
525
|
+
# Full governance, audit logging, and compliance features enabled
|
|
526
|
+
# Suitable for enterprise environments with strict security requirements
|
|
527
|
+
# =============================================================================
|
|
528
|
+
|
|
529
|
+
model = "gpt-5.3-codex"
|
|
530
|
+
approval_policy = "on-request"
|
|
531
|
+
sandbox_mode = "workspace-write"
|
|
532
|
+
web_search = "cached"
|
|
533
|
+
|
|
534
|
+
# Project documentation
|
|
535
|
+
project_doc_max_bytes = 131072
|
|
536
|
+
project_doc_fallback_filenames = [
|
|
537
|
+
"AGENTS.md",
|
|
538
|
+
"TEAM_GUIDE.md",
|
|
539
|
+
".agents.md",
|
|
540
|
+
"CONTRIBUTING.md"
|
|
541
|
+
]
|
|
542
|
+
|
|
543
|
+
[features]
|
|
544
|
+
child_agents_md = true
|
|
545
|
+
shell_snapshot = true
|
|
546
|
+
request_rule = true
|
|
547
|
+
remote_compaction = true
|
|
548
|
+
|
|
549
|
+
# =============================================================================
|
|
550
|
+
# MCP Servers
|
|
551
|
+
# =============================================================================
|
|
552
|
+
|
|
553
|
+
[mcp_servers.ruflo]
|
|
554
|
+
command = "npx"
|
|
555
|
+
args = ["-y", "ruflo@latest", "mcp", "start"]
|
|
556
|
+
enabled = true
|
|
557
|
+
tool_timeout_sec = 120
|
|
558
|
+
|
|
559
|
+
[mcp_servers.ruflo.env]
|
|
560
|
+
CLAUDE_FLOW_LOG_LEVEL = "info"
|
|
561
|
+
|
|
562
|
+
# =============================================================================
|
|
563
|
+
# Profiles
|
|
564
|
+
# =============================================================================
|
|
565
|
+
|
|
566
|
+
# Development profile - more permissive for local work
|
|
567
|
+
[profiles.dev]
|
|
568
|
+
approval_policy = "never"
|
|
569
|
+
sandbox_mode = "danger-full-access"
|
|
570
|
+
web_search = "live"
|
|
571
|
+
|
|
572
|
+
# Safe profile - maximum restrictions
|
|
573
|
+
[profiles.safe]
|
|
574
|
+
approval_policy = "untrusted"
|
|
575
|
+
sandbox_mode = "read-only"
|
|
576
|
+
web_search = "disabled"
|
|
577
|
+
|
|
578
|
+
# CI profile - for automated pipelines
|
|
579
|
+
[profiles.ci]
|
|
580
|
+
approval_policy = "never"
|
|
581
|
+
sandbox_mode = "workspace-write"
|
|
582
|
+
web_search = "disabled"
|
|
583
|
+
|
|
584
|
+
# Production profile - careful changes only
|
|
585
|
+
[profiles.production]
|
|
586
|
+
approval_policy = "untrusted"
|
|
587
|
+
sandbox_mode = "workspace-write"
|
|
588
|
+
web_search = "cached"
|
|
589
|
+
|
|
590
|
+
# =============================================================================
|
|
591
|
+
# History
|
|
592
|
+
# =============================================================================
|
|
593
|
+
|
|
594
|
+
[history]
|
|
595
|
+
persistence = "save-all"
|
|
596
|
+
retention_days = 90
|
|
597
|
+
audit_log = true
|
|
598
|
+
|
|
599
|
+
# =============================================================================
|
|
600
|
+
# Shell Environment
|
|
601
|
+
# =============================================================================
|
|
602
|
+
|
|
603
|
+
[shell_environment_policy]
|
|
604
|
+
inherit = "core"
|
|
605
|
+
exclude = ["*_KEY", "*_SECRET", "*_TOKEN", "*_PASSWORD", "AWS_*", "AZURE_*"]
|
|
606
|
+
|
|
607
|
+
[sandbox_workspace_write]
|
|
608
|
+
writable_roots = []
|
|
609
|
+
network_access = true
|
|
610
|
+
exclude_slash_tmp = false
|
|
611
|
+
|
|
612
|
+
# =============================================================================
|
|
613
|
+
# Security (Enterprise)
|
|
614
|
+
# =============================================================================
|
|
615
|
+
|
|
616
|
+
[security]
|
|
617
|
+
input_validation = true
|
|
618
|
+
path_traversal_prevention = true
|
|
619
|
+
secret_scanning = true
|
|
620
|
+
cve_scanning = true
|
|
621
|
+
max_file_size = 10485760
|
|
622
|
+
blocked_patterns = ["\\\\.env$", "credentials\\\\.json$", "\\\\.pem$", "\\\\.key$", "secrets\\\\.yaml$"]
|
|
623
|
+
|
|
624
|
+
# RBAC configuration
|
|
625
|
+
[security.rbac]
|
|
626
|
+
enabled = true
|
|
627
|
+
default_role = "developer"
|
|
628
|
+
|
|
629
|
+
# Audit configuration
|
|
630
|
+
[security.audit]
|
|
631
|
+
enabled = true
|
|
632
|
+
destination = "file"
|
|
633
|
+
file_path = "./logs/audit.json"
|
|
634
|
+
retention_days = 90
|
|
635
|
+
|
|
636
|
+
# =============================================================================
|
|
637
|
+
# Performance
|
|
638
|
+
# =============================================================================
|
|
639
|
+
|
|
640
|
+
[performance]
|
|
641
|
+
max_agents = 8
|
|
642
|
+
task_timeout = 300
|
|
643
|
+
memory_limit = "1GB"
|
|
644
|
+
cache_enabled = true
|
|
645
|
+
cache_ttl = 3600
|
|
646
|
+
parallel_execution = true
|
|
647
|
+
|
|
648
|
+
# =============================================================================
|
|
649
|
+
# Logging (Enterprise)
|
|
650
|
+
# =============================================================================
|
|
651
|
+
|
|
652
|
+
[logging]
|
|
653
|
+
level = "info"
|
|
654
|
+
format = "json"
|
|
655
|
+
destination = "both"
|
|
656
|
+
file_path = "./logs/claude-flow.log"
|
|
657
|
+
max_files = 30
|
|
658
|
+
max_size = "50MB"
|
|
659
|
+
|
|
660
|
+
# =============================================================================
|
|
661
|
+
# Neural Intelligence
|
|
662
|
+
# =============================================================================
|
|
663
|
+
|
|
664
|
+
[neural]
|
|
665
|
+
sona_enabled = true
|
|
666
|
+
hnsw_enabled = true
|
|
667
|
+
hnsw_m = 16
|
|
668
|
+
hnsw_ef_construction = 200
|
|
669
|
+
hnsw_ef_search = 100
|
|
670
|
+
pattern_learning = true
|
|
671
|
+
learning_rate = 0.01
|
|
672
|
+
|
|
673
|
+
# =============================================================================
|
|
674
|
+
# Swarm Orchestration
|
|
675
|
+
# =============================================================================
|
|
676
|
+
|
|
677
|
+
[swarm]
|
|
678
|
+
default_topology = "hierarchical"
|
|
679
|
+
default_strategy = "specialized"
|
|
680
|
+
consensus = "raft"
|
|
681
|
+
anti_drift = true
|
|
682
|
+
checkpoint_interval = 10
|
|
683
|
+
|
|
684
|
+
# =============================================================================
|
|
685
|
+
# Hooks
|
|
686
|
+
# =============================================================================
|
|
687
|
+
|
|
688
|
+
[hooks]
|
|
689
|
+
enabled = true
|
|
690
|
+
pre_task = true
|
|
691
|
+
post_task = true
|
|
692
|
+
train_on_edit = true
|
|
693
|
+
|
|
694
|
+
# =============================================================================
|
|
695
|
+
# Background Workers
|
|
696
|
+
# =============================================================================
|
|
697
|
+
|
|
698
|
+
[workers]
|
|
699
|
+
enabled = true
|
|
700
|
+
|
|
701
|
+
[workers.audit]
|
|
702
|
+
enabled = true
|
|
703
|
+
priority = "critical"
|
|
704
|
+
interval = 300
|
|
705
|
+
|
|
706
|
+
[workers.optimize]
|
|
707
|
+
enabled = true
|
|
708
|
+
priority = "high"
|
|
709
|
+
interval = 600
|
|
710
|
+
|
|
711
|
+
[workers.consolidate]
|
|
712
|
+
enabled = true
|
|
713
|
+
priority = "low"
|
|
714
|
+
interval = 1800
|
|
715
|
+
|
|
716
|
+
[workers.testgaps]
|
|
717
|
+
enabled = true
|
|
718
|
+
priority = "normal"
|
|
719
|
+
interval = 3600
|
|
720
|
+
|
|
721
|
+
# =============================================================================
|
|
722
|
+
# Compliance
|
|
723
|
+
# =============================================================================
|
|
724
|
+
|
|
725
|
+
[compliance]
|
|
726
|
+
soc2 = true
|
|
727
|
+
gdpr = true
|
|
728
|
+
pci_dss = false
|
|
729
|
+
hipaa = false
|
|
730
|
+
`;
|
|
731
|
+
}
|
|
732
|
+
/**
|
|
733
|
+
* Generate development config.toml with permissive settings
|
|
734
|
+
*/
|
|
735
|
+
export async function generateDevConfigToml() {
|
|
736
|
+
return `# =============================================================================
|
|
737
|
+
# Claude Flow V3 - Development Configuration
|
|
738
|
+
# =============================================================================
|
|
739
|
+
# Permissive settings for local development
|
|
740
|
+
# Auto-approve most actions, full access, live web search
|
|
741
|
+
# =============================================================================
|
|
742
|
+
|
|
743
|
+
model = "gpt-5.3-codex"
|
|
744
|
+
approval_policy = "never"
|
|
745
|
+
sandbox_mode = "danger-full-access"
|
|
746
|
+
web_search = "live"
|
|
747
|
+
|
|
748
|
+
# Project documentation
|
|
749
|
+
project_doc_max_bytes = 65536
|
|
750
|
+
|
|
751
|
+
[features]
|
|
752
|
+
child_agents_md = true
|
|
753
|
+
shell_snapshot = true
|
|
754
|
+
request_rule = false
|
|
755
|
+
remote_compaction = true
|
|
756
|
+
|
|
757
|
+
[mcp_servers.ruflo]
|
|
758
|
+
command = "npx"
|
|
759
|
+
args = ["-y", "ruflo@latest", "mcp", "start"]
|
|
760
|
+
enabled = true
|
|
761
|
+
tool_timeout_sec = 120
|
|
762
|
+
|
|
763
|
+
[history]
|
|
764
|
+
persistence = "save-all"
|
|
765
|
+
|
|
766
|
+
[shell_environment_policy]
|
|
767
|
+
inherit = "all"
|
|
768
|
+
exclude = []
|
|
769
|
+
|
|
770
|
+
[sandbox_workspace_write]
|
|
771
|
+
writable_roots = ["/tmp", "~/.cache"]
|
|
772
|
+
network_access = true
|
|
773
|
+
exclude_slash_tmp = false
|
|
774
|
+
|
|
775
|
+
[security]
|
|
776
|
+
input_validation = true
|
|
777
|
+
path_traversal_prevention = true
|
|
778
|
+
secret_scanning = true
|
|
779
|
+
cve_scanning = false
|
|
780
|
+
|
|
781
|
+
[performance]
|
|
782
|
+
max_agents = 8
|
|
783
|
+
task_timeout = 600
|
|
784
|
+
cache_enabled = true
|
|
785
|
+
parallel_execution = true
|
|
786
|
+
|
|
787
|
+
[logging]
|
|
788
|
+
level = "debug"
|
|
789
|
+
format = "pretty"
|
|
790
|
+
destination = "stdout"
|
|
791
|
+
|
|
792
|
+
[neural]
|
|
793
|
+
sona_enabled = true
|
|
794
|
+
hnsw_enabled = true
|
|
795
|
+
pattern_learning = true
|
|
796
|
+
|
|
797
|
+
[swarm]
|
|
798
|
+
default_topology = "hierarchical"
|
|
799
|
+
default_strategy = "specialized"
|
|
800
|
+
anti_drift = true
|
|
801
|
+
|
|
802
|
+
[hooks]
|
|
803
|
+
enabled = true
|
|
804
|
+
pre_task = true
|
|
805
|
+
post_task = true
|
|
806
|
+
train_on_edit = true
|
|
807
|
+
|
|
808
|
+
[workers]
|
|
809
|
+
enabled = true
|
|
810
|
+
`;
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* Generate security-focused config.toml
|
|
814
|
+
*/
|
|
815
|
+
export async function generateSecureConfigToml() {
|
|
816
|
+
return `# =============================================================================
|
|
817
|
+
# Claude Flow V3 - Security-Focused Configuration
|
|
818
|
+
# =============================================================================
|
|
819
|
+
# Maximum security restrictions for sensitive environments
|
|
820
|
+
# All actions require approval, read-only access, no web search
|
|
821
|
+
# =============================================================================
|
|
822
|
+
|
|
823
|
+
model = "gpt-5.3-codex"
|
|
824
|
+
approval_policy = "untrusted"
|
|
825
|
+
sandbox_mode = "read-only"
|
|
826
|
+
web_search = "disabled"
|
|
827
|
+
|
|
828
|
+
# Project documentation
|
|
829
|
+
project_doc_max_bytes = 32768
|
|
830
|
+
|
|
831
|
+
[features]
|
|
832
|
+
child_agents_md = true
|
|
833
|
+
shell_snapshot = false
|
|
834
|
+
request_rule = true
|
|
835
|
+
remote_compaction = false
|
|
836
|
+
|
|
837
|
+
[mcp_servers.ruflo]
|
|
838
|
+
command = "npx"
|
|
839
|
+
args = ["-y", "ruflo@latest", "mcp", "start"]
|
|
840
|
+
enabled = true
|
|
841
|
+
tool_timeout_sec = 60
|
|
842
|
+
|
|
843
|
+
[history]
|
|
844
|
+
persistence = "save-all"
|
|
845
|
+
retention_days = 365
|
|
846
|
+
|
|
847
|
+
[shell_environment_policy]
|
|
848
|
+
inherit = "none"
|
|
849
|
+
exclude = ["*"]
|
|
850
|
+
|
|
851
|
+
[sandbox_workspace_write]
|
|
852
|
+
writable_roots = []
|
|
853
|
+
network_access = false
|
|
854
|
+
exclude_slash_tmp = true
|
|
855
|
+
|
|
856
|
+
[security]
|
|
857
|
+
input_validation = true
|
|
858
|
+
path_traversal_prevention = true
|
|
859
|
+
secret_scanning = true
|
|
860
|
+
cve_scanning = true
|
|
861
|
+
max_file_size = 1048576
|
|
862
|
+
allowed_extensions = [".ts", ".js", ".json", ".md", ".yaml", ".yml"]
|
|
863
|
+
blocked_patterns = ["\\\\.env", "secret", "credential", "password", "key", "token", "\\\\.pem", "\\\\.p12"]
|
|
864
|
+
|
|
865
|
+
[security.rbac]
|
|
866
|
+
enabled = true
|
|
867
|
+
default_role = "observer"
|
|
868
|
+
|
|
869
|
+
[security.audit]
|
|
870
|
+
enabled = true
|
|
871
|
+
destination = "both"
|
|
872
|
+
file_path = "./logs/security-audit.json"
|
|
873
|
+
retention_days = 365
|
|
874
|
+
|
|
875
|
+
[performance]
|
|
876
|
+
max_agents = 4
|
|
877
|
+
task_timeout = 120
|
|
878
|
+
cache_enabled = false
|
|
879
|
+
parallel_execution = false
|
|
880
|
+
|
|
881
|
+
[logging]
|
|
882
|
+
level = "info"
|
|
883
|
+
format = "json"
|
|
884
|
+
destination = "both"
|
|
885
|
+
file_path = "./logs/claude-flow.log"
|
|
886
|
+
max_files = 100
|
|
887
|
+
max_size = "10MB"
|
|
888
|
+
|
|
889
|
+
[neural]
|
|
890
|
+
sona_enabled = false
|
|
891
|
+
hnsw_enabled = true
|
|
892
|
+
pattern_learning = false
|
|
893
|
+
|
|
894
|
+
[swarm]
|
|
895
|
+
default_topology = "hierarchical"
|
|
896
|
+
default_strategy = "specialized"
|
|
897
|
+
consensus = "byzantine"
|
|
898
|
+
anti_drift = true
|
|
899
|
+
checkpoint_interval = 5
|
|
900
|
+
|
|
901
|
+
[hooks]
|
|
902
|
+
enabled = true
|
|
903
|
+
pre_task = true
|
|
904
|
+
post_task = true
|
|
905
|
+
train_on_edit = false
|
|
906
|
+
|
|
907
|
+
[workers]
|
|
908
|
+
enabled = true
|
|
909
|
+
|
|
910
|
+
[workers.audit]
|
|
911
|
+
enabled = true
|
|
912
|
+
priority = "critical"
|
|
913
|
+
interval = 60
|
|
914
|
+
|
|
915
|
+
[workers.optimize]
|
|
916
|
+
enabled = false
|
|
917
|
+
|
|
918
|
+
[workers.consolidate]
|
|
919
|
+
enabled = false
|
|
920
|
+
`;
|
|
921
|
+
}
|
|
922
|
+
//# sourceMappingURL=config-toml.js.map
|