claude-flow 3.0.0-alpha.7 → 3.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +991 -900
- package/{v3/@claude-flow/cli/dist → dist}/src/commands/daemon.d.ts.map +1 -1
- package/{v3/@claude-flow/cli/dist → dist}/src/commands/daemon.js +182 -8
- package/dist/src/commands/daemon.js.map +1 -0
- package/{v3/@claude-flow/cli/dist → dist}/src/index.d.ts +1 -1
- package/{v3/@claude-flow/cli/dist → dist}/src/index.d.ts.map +1 -1
- package/{v3/@claude-flow/cli/dist → dist}/src/index.js +21 -0
- package/dist/src/index.js.map +1 -0
- package/{v3/@claude-flow/cli/dist → dist}/src/output.d.ts +16 -0
- package/dist/src/output.d.ts.map +1 -0
- package/{v3/@claude-flow/cli/dist → dist}/src/output.js +42 -0
- package/dist/src/output.js.map +1 -0
- package/{v3/@claude-flow/cli/dist → dist}/src/services/worker-daemon.d.ts +29 -2
- package/dist/src/services/worker-daemon.d.ts.map +1 -0
- package/{v3/@claude-flow/cli/dist → dist}/src/services/worker-daemon.js +123 -20
- package/dist/src/services/worker-daemon.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +13 -57
- package/src/commands/agent.ts +955 -0
- package/src/commands/config.ts +452 -0
- package/src/commands/daemon.ts +598 -0
- package/src/commands/hive-mind.ts +928 -0
- package/src/commands/hooks.ts +2603 -0
- package/src/commands/index.ts +118 -0
- package/src/commands/init.ts +597 -0
- package/src/commands/mcp.ts +753 -0
- package/src/commands/memory.ts +1161 -0
- package/src/commands/migrate.ts +447 -0
- package/src/commands/process.ts +695 -0
- package/src/commands/session.ts +891 -0
- package/src/commands/start.ts +457 -0
- package/src/commands/status.ts +736 -0
- package/src/commands/swarm.ts +648 -0
- package/src/commands/task.ts +792 -0
- package/src/commands/workflow.ts +742 -0
- package/src/config-adapter.ts +210 -0
- package/src/index.ts +427 -0
- package/src/infrastructure/in-memory-repositories.ts +310 -0
- package/src/init/claudemd-generator.ts +631 -0
- package/src/init/executor.ts +762 -0
- package/src/init/helpers-generator.ts +628 -0
- package/src/init/index.ts +60 -0
- package/src/init/mcp-generator.ts +83 -0
- package/src/init/settings-generator.ts +284 -0
- package/src/init/statusline-generator.ts +211 -0
- package/src/init/types.ts +447 -0
- package/src/mcp-client.ts +241 -0
- package/src/mcp-server.ts +577 -0
- package/src/mcp-tools/agent-tools.ts +466 -0
- package/src/mcp-tools/config-tools.ts +370 -0
- package/src/mcp-tools/hive-mind-tools.ts +521 -0
- package/src/mcp-tools/hooks-tools.ts +1888 -0
- package/src/mcp-tools/index.ts +16 -0
- package/src/mcp-tools/memory-tools.ts +270 -0
- package/src/mcp-tools/session-tools.ts +359 -0
- package/src/mcp-tools/swarm-tools.ts +105 -0
- package/src/mcp-tools/task-tools.ts +347 -0
- package/src/mcp-tools/types.ts +33 -0
- package/src/mcp-tools/workflow-tools.ts +573 -0
- package/src/output.ts +639 -0
- package/src/parser.ts +417 -0
- package/src/prompt.ts +619 -0
- package/src/services/index.ts +15 -0
- package/src/services/worker-daemon.ts +726 -0
- package/src/types.ts +287 -0
- package/.claude/.claude-flow/metrics/system-metrics.json +0 -2606
- package/.claude/agents/MIGRATION_SUMMARY.md +0 -222
- package/.claude/agents/README.md +0 -89
- package/.claude/agents/analysis/analyze-code-quality.md +0 -180
- package/.claude/agents/analysis/code-analyzer.md +0 -209
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +0 -180
- package/.claude/agents/architecture/system-design/arch-system-design.md +0 -156
- package/.claude/agents/base-template-generator.md +0 -42
- package/.claude/agents/consensus/README.md +0 -253
- package/.claude/agents/consensus/byzantine-coordinator.md +0 -63
- package/.claude/agents/consensus/crdt-synchronizer.md +0 -997
- package/.claude/agents/consensus/gossip-coordinator.md +0 -63
- package/.claude/agents/consensus/performance-benchmarker.md +0 -851
- package/.claude/agents/consensus/quorum-manager.md +0 -823
- package/.claude/agents/consensus/raft-manager.md +0 -63
- package/.claude/agents/consensus/security-manager.md +0 -622
- package/.claude/agents/core/coder.md +0 -266
- package/.claude/agents/core/planner.md +0 -168
- package/.claude/agents/core/researcher.md +0 -190
- package/.claude/agents/core/reviewer.md +0 -326
- package/.claude/agents/core/tester.md +0 -319
- package/.claude/agents/custom/test-long-runner.md +0 -44
- package/.claude/agents/data/ml/data-ml-model.md +0 -193
- package/.claude/agents/database-specialist.yaml +0 -21
- package/.claude/agents/development/backend/dev-backend-api.md +0 -142
- package/.claude/agents/development/dev-backend-api.md +0 -345
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +0 -164
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +0 -174
- package/.claude/agents/flow-nexus/app-store.md +0 -88
- package/.claude/agents/flow-nexus/authentication.md +0 -69
- package/.claude/agents/flow-nexus/challenges.md +0 -81
- package/.claude/agents/flow-nexus/neural-network.md +0 -88
- package/.claude/agents/flow-nexus/payments.md +0 -83
- package/.claude/agents/flow-nexus/sandbox.md +0 -76
- package/.claude/agents/flow-nexus/swarm.md +0 -76
- package/.claude/agents/flow-nexus/user-tools.md +0 -96
- package/.claude/agents/flow-nexus/workflow.md +0 -84
- package/.claude/agents/github/code-review-swarm.md +0 -538
- package/.claude/agents/github/github-modes.md +0 -173
- package/.claude/agents/github/issue-tracker.md +0 -319
- package/.claude/agents/github/multi-repo-swarm.md +0 -553
- package/.claude/agents/github/pr-manager.md +0 -191
- package/.claude/agents/github/project-board-sync.md +0 -509
- package/.claude/agents/github/release-manager.md +0 -367
- package/.claude/agents/github/release-swarm.md +0 -583
- package/.claude/agents/github/repo-architect.md +0 -398
- package/.claude/agents/github/swarm-issue.md +0 -573
- package/.claude/agents/github/swarm-pr.md +0 -428
- package/.claude/agents/github/sync-coordinator.md +0 -452
- package/.claude/agents/github/workflow-automation.md +0 -635
- package/.claude/agents/goal/agent.md +0 -816
- package/.claude/agents/goal/code-goal-planner.md +0 -446
- package/.claude/agents/goal/goal-planner.md +0 -168
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -130
- package/.claude/agents/hive-mind/queen-coordinator.md +0 -203
- package/.claude/agents/hive-mind/scout-explorer.md +0 -242
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -193
- package/.claude/agents/hive-mind/worker-specialist.md +0 -217
- package/.claude/agents/index.yaml +0 -17
- package/.claude/agents/neural/safla-neural.md +0 -74
- package/.claude/agents/optimization/README.md +0 -250
- package/.claude/agents/optimization/benchmark-suite.md +0 -665
- package/.claude/agents/optimization/load-balancer.md +0 -431
- package/.claude/agents/optimization/performance-monitor.md +0 -672
- package/.claude/agents/optimization/resource-allocator.md +0 -674
- package/.claude/agents/optimization/topology-optimizer.md +0 -808
- package/.claude/agents/payments/agentic-payments.md +0 -126
- package/.claude/agents/project-coordinator.yaml +0 -15
- package/.claude/agents/python-specialist.yaml +0 -21
- package/.claude/agents/reasoning/agent.md +0 -816
- package/.claude/agents/reasoning/goal-planner.md +0 -73
- package/.claude/agents/security-auditor.yaml +0 -20
- package/.claude/agents/sona/sona-learning-optimizer.md +0 -496
- package/.claude/agents/sparc/architecture.md +0 -472
- package/.claude/agents/sparc/pseudocode.md +0 -318
- package/.claude/agents/sparc/refinement.md +0 -525
- package/.claude/agents/sparc/specification.md +0 -276
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -226
- package/.claude/agents/sublinear/consensus-coordinator.md +0 -338
- package/.claude/agents/sublinear/matrix-optimizer.md +0 -185
- package/.claude/agents/sublinear/pagerank-analyzer.md +0 -299
- package/.claude/agents/sublinear/performance-optimizer.md +0 -368
- package/.claude/agents/sublinear/trading-predictor.md +0 -246
- package/.claude/agents/swarm/README.md +0 -190
- package/.claude/agents/swarm/adaptive-coordinator.md +0 -396
- package/.claude/agents/swarm/hierarchical-coordinator.md +0 -327
- package/.claude/agents/swarm/mesh-coordinator.md +0 -392
- package/.claude/agents/templates/automation-smart-agent.md +0 -205
- package/.claude/agents/templates/coordinator-swarm-init.md +0 -105
- package/.claude/agents/templates/github-pr-manager.md +0 -177
- package/.claude/agents/templates/implementer-sparc-coder.md +0 -259
- package/.claude/agents/templates/memory-coordinator.md +0 -187
- package/.claude/agents/templates/migration-plan.md +0 -746
- package/.claude/agents/templates/orchestrator-task.md +0 -139
- package/.claude/agents/templates/performance-analyzer.md +0 -199
- package/.claude/agents/templates/sparc-coordinator.md +0 -183
- package/.claude/agents/testing/production-validator.md +0 -395
- package/.claude/agents/testing/tdd-london-swarm.md +0 -244
- package/.claude/agents/testing/unit/tdd-london-swarm.md +0 -244
- package/.claude/agents/testing/validation/production-validator.md +0 -395
- package/.claude/agents/typescript-specialist.yaml +0 -21
- package/.claude/agents/v3/database-specialist.yaml +0 -21
- package/.claude/agents/v3/index.yaml +0 -17
- package/.claude/agents/v3/project-coordinator.yaml +0 -15
- package/.claude/agents/v3/python-specialist.yaml +0 -21
- package/.claude/agents/v3/test-architect.yaml +0 -20
- package/.claude/agents/v3/typescript-specialist.yaml +0 -21
- package/.claude/agents/v3/v3-integration-architect.md +0 -346
- package/.claude/agents/v3/v3-memory-specialist.md +0 -318
- package/.claude/agents/v3/v3-performance-engineer.md +0 -397
- package/.claude/agents/v3/v3-queen-coordinator.md +0 -98
- package/.claude/agents/v3/v3-security-architect.md +0 -174
- package/.claude/checkpoints/1767754460.json +0 -8
- package/.claude/commands/agents/README.md +0 -10
- package/.claude/commands/agents/agent-capabilities.md +0 -21
- package/.claude/commands/agents/agent-coordination.md +0 -28
- package/.claude/commands/agents/agent-spawning.md +0 -28
- package/.claude/commands/agents/agent-types.md +0 -26
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +0 -54
- package/.claude/commands/analysis/README.md +0 -9
- package/.claude/commands/analysis/bottleneck-detect.md +0 -162
- package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
- package/.claude/commands/analysis/performance-report.md +0 -25
- package/.claude/commands/analysis/token-efficiency.md +0 -45
- package/.claude/commands/analysis/token-usage.md +0 -25
- package/.claude/commands/automation/README.md +0 -9
- package/.claude/commands/automation/auto-agent.md +0 -122
- package/.claude/commands/automation/self-healing.md +0 -106
- package/.claude/commands/automation/session-memory.md +0 -90
- package/.claude/commands/automation/smart-agents.md +0 -73
- package/.claude/commands/automation/smart-spawn.md +0 -25
- package/.claude/commands/automation/workflow-select.md +0 -25
- package/.claude/commands/claude-flow-help.md +0 -103
- package/.claude/commands/claude-flow-memory.md +0 -107
- package/.claude/commands/claude-flow-swarm.md +0 -205
- package/.claude/commands/coordination/README.md +0 -9
- package/.claude/commands/coordination/agent-spawn.md +0 -25
- package/.claude/commands/coordination/init.md +0 -44
- package/.claude/commands/coordination/orchestrate.md +0 -43
- package/.claude/commands/coordination/spawn.md +0 -45
- package/.claude/commands/coordination/swarm-init.md +0 -85
- package/.claude/commands/coordination/task-orchestrate.md +0 -25
- package/.claude/commands/flow-nexus/app-store.md +0 -124
- package/.claude/commands/flow-nexus/challenges.md +0 -120
- package/.claude/commands/flow-nexus/login-registration.md +0 -65
- package/.claude/commands/flow-nexus/neural-network.md +0 -134
- package/.claude/commands/flow-nexus/payments.md +0 -116
- package/.claude/commands/flow-nexus/sandbox.md +0 -83
- package/.claude/commands/flow-nexus/swarm.md +0 -87
- package/.claude/commands/flow-nexus/user-tools.md +0 -152
- package/.claude/commands/flow-nexus/workflow.md +0 -115
- package/.claude/commands/github/README.md +0 -11
- package/.claude/commands/github/code-review-swarm.md +0 -514
- package/.claude/commands/github/code-review.md +0 -25
- package/.claude/commands/github/github-modes.md +0 -147
- package/.claude/commands/github/github-swarm.md +0 -121
- package/.claude/commands/github/issue-tracker.md +0 -292
- package/.claude/commands/github/issue-triage.md +0 -25
- package/.claude/commands/github/multi-repo-swarm.md +0 -519
- package/.claude/commands/github/pr-enhance.md +0 -26
- package/.claude/commands/github/pr-manager.md +0 -170
- package/.claude/commands/github/project-board-sync.md +0 -471
- package/.claude/commands/github/release-manager.md +0 -338
- package/.claude/commands/github/release-swarm.md +0 -544
- package/.claude/commands/github/repo-analyze.md +0 -25
- package/.claude/commands/github/repo-architect.md +0 -367
- package/.claude/commands/github/swarm-issue.md +0 -482
- package/.claude/commands/github/swarm-pr.md +0 -285
- package/.claude/commands/github/sync-coordinator.md +0 -301
- package/.claude/commands/github/workflow-automation.md +0 -442
- package/.claude/commands/hive-mind/README.md +0 -17
- package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-init.md +0 -18
- package/.claude/commands/hive-mind/hive-mind-memory.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-metrics.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-resume.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-sessions.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -21
- package/.claude/commands/hive-mind/hive-mind-status.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-stop.md +0 -8
- package/.claude/commands/hive-mind/hive-mind-wizard.md +0 -8
- package/.claude/commands/hive-mind/hive-mind.md +0 -27
- package/.claude/commands/hooks/README.md +0 -11
- package/.claude/commands/hooks/overview.md +0 -58
- package/.claude/commands/hooks/post-edit.md +0 -117
- package/.claude/commands/hooks/post-task.md +0 -112
- package/.claude/commands/hooks/pre-edit.md +0 -113
- package/.claude/commands/hooks/pre-task.md +0 -111
- package/.claude/commands/hooks/session-end.md +0 -118
- package/.claude/commands/hooks/setup.md +0 -103
- package/.claude/commands/memory/README.md +0 -9
- package/.claude/commands/memory/memory-persist.md +0 -25
- package/.claude/commands/memory/memory-search.md +0 -25
- package/.claude/commands/memory/memory-usage.md +0 -25
- package/.claude/commands/memory/neural.md +0 -47
- package/.claude/commands/monitoring/README.md +0 -9
- package/.claude/commands/monitoring/agent-metrics.md +0 -25
- package/.claude/commands/monitoring/agents.md +0 -44
- package/.claude/commands/monitoring/real-time-view.md +0 -25
- package/.claude/commands/monitoring/status.md +0 -46
- package/.claude/commands/monitoring/swarm-monitor.md +0 -25
- package/.claude/commands/optimization/README.md +0 -9
- package/.claude/commands/optimization/auto-topology.md +0 -62
- package/.claude/commands/optimization/cache-manage.md +0 -25
- package/.claude/commands/optimization/parallel-execute.md +0 -25
- package/.claude/commands/optimization/parallel-execution.md +0 -50
- package/.claude/commands/optimization/topology-optimize.md +0 -25
- package/.claude/commands/pair/README.md +0 -261
- package/.claude/commands/pair/commands.md +0 -546
- package/.claude/commands/pair/config.md +0 -510
- package/.claude/commands/pair/examples.md +0 -512
- package/.claude/commands/pair/modes.md +0 -348
- package/.claude/commands/pair/session.md +0 -407
- package/.claude/commands/pair/start.md +0 -209
- package/.claude/commands/sparc/analyzer.md +0 -52
- package/.claude/commands/sparc/architect.md +0 -53
- package/.claude/commands/sparc/ask.md +0 -97
- package/.claude/commands/sparc/batch-executor.md +0 -54
- package/.claude/commands/sparc/code.md +0 -89
- package/.claude/commands/sparc/coder.md +0 -54
- package/.claude/commands/sparc/debug.md +0 -83
- package/.claude/commands/sparc/debugger.md +0 -54
- package/.claude/commands/sparc/designer.md +0 -53
- package/.claude/commands/sparc/devops.md +0 -109
- package/.claude/commands/sparc/docs-writer.md +0 -80
- package/.claude/commands/sparc/documenter.md +0 -54
- package/.claude/commands/sparc/innovator.md +0 -54
- package/.claude/commands/sparc/integration.md +0 -83
- package/.claude/commands/sparc/mcp.md +0 -117
- package/.claude/commands/sparc/memory-manager.md +0 -54
- package/.claude/commands/sparc/optimizer.md +0 -54
- package/.claude/commands/sparc/orchestrator.md +0 -132
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -83
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -83
- package/.claude/commands/sparc/researcher.md +0 -54
- package/.claude/commands/sparc/reviewer.md +0 -54
- package/.claude/commands/sparc/security-review.md +0 -80
- package/.claude/commands/sparc/sparc-modes.md +0 -174
- package/.claude/commands/sparc/sparc.md +0 -111
- package/.claude/commands/sparc/spec-pseudocode.md +0 -80
- package/.claude/commands/sparc/supabase-admin.md +0 -348
- package/.claude/commands/sparc/swarm-coordinator.md +0 -54
- package/.claude/commands/sparc/tdd.md +0 -54
- package/.claude/commands/sparc/tester.md +0 -54
- package/.claude/commands/sparc/tutorial.md +0 -79
- package/.claude/commands/sparc/workflow-manager.md +0 -54
- package/.claude/commands/sparc.md +0 -166
- package/.claude/commands/stream-chain/pipeline.md +0 -121
- package/.claude/commands/stream-chain/run.md +0 -70
- package/.claude/commands/swarm/README.md +0 -15
- package/.claude/commands/swarm/analysis.md +0 -95
- package/.claude/commands/swarm/development.md +0 -96
- package/.claude/commands/swarm/examples.md +0 -168
- package/.claude/commands/swarm/maintenance.md +0 -102
- package/.claude/commands/swarm/optimization.md +0 -117
- package/.claude/commands/swarm/research.md +0 -136
- package/.claude/commands/swarm/swarm-analysis.md +0 -8
- package/.claude/commands/swarm/swarm-background.md +0 -8
- package/.claude/commands/swarm/swarm-init.md +0 -19
- package/.claude/commands/swarm/swarm-modes.md +0 -8
- package/.claude/commands/swarm/swarm-monitor.md +0 -8
- package/.claude/commands/swarm/swarm-spawn.md +0 -19
- package/.claude/commands/swarm/swarm-status.md +0 -8
- package/.claude/commands/swarm/swarm-strategies.md +0 -8
- package/.claude/commands/swarm/swarm.md +0 -27
- package/.claude/commands/swarm/testing.md +0 -131
- package/.claude/commands/training/README.md +0 -9
- package/.claude/commands/training/model-update.md +0 -25
- package/.claude/commands/training/neural-patterns.md +0 -74
- package/.claude/commands/training/neural-train.md +0 -25
- package/.claude/commands/training/pattern-learn.md +0 -25
- package/.claude/commands/training/specialization.md +0 -63
- package/.claude/commands/truth/start.md +0 -143
- package/.claude/commands/verify/check.md +0 -50
- package/.claude/commands/verify/start.md +0 -128
- package/.claude/commands/workflows/README.md +0 -9
- package/.claude/commands/workflows/development.md +0 -78
- package/.claude/commands/workflows/research.md +0 -63
- package/.claude/commands/workflows/workflow-create.md +0 -25
- package/.claude/commands/workflows/workflow-execute.md +0 -25
- package/.claude/commands/workflows/workflow-export.md +0 -25
- package/.claude/config/v3-dependency-optimization.json +0 -266
- package/.claude/config/v3-performance-targets.json +0 -251
- package/.claude/helpers/README.md +0 -97
- package/.claude/helpers/adr-compliance.sh +0 -186
- package/.claude/helpers/auto-commit.sh +0 -178
- package/.claude/helpers/checkpoint-manager.sh +0 -251
- package/.claude/helpers/daemon-manager.sh +0 -252
- package/.claude/helpers/ddd-tracker.sh +0 -144
- package/.claude/helpers/github-safe.js +0 -106
- package/.claude/helpers/github-setup.sh +0 -28
- package/.claude/helpers/guidance-hook.sh +0 -13
- package/.claude/helpers/guidance-hooks.sh +0 -102
- package/.claude/helpers/health-monitor.sh +0 -108
- package/.claude/helpers/learning-hooks.sh +0 -329
- package/.claude/helpers/learning-optimizer.sh +0 -127
- package/.claude/helpers/learning-service.mjs +0 -1097
- package/.claude/helpers/metrics-db.mjs +0 -474
- package/.claude/helpers/pattern-consolidator.sh +0 -86
- package/.claude/helpers/perf-worker.sh +0 -160
- package/.claude/helpers/quick-start.sh +0 -19
- package/.claude/helpers/security-scanner.sh +0 -127
- package/.claude/helpers/setup-mcp.sh +0 -18
- package/.claude/helpers/standard-checkpoint-hooks.sh +0 -189
- package/.claude/helpers/swarm-comms.sh +0 -353
- package/.claude/helpers/swarm-hooks.sh +0 -761
- package/.claude/helpers/swarm-monitor.sh +0 -211
- package/.claude/helpers/sync-v3-metrics.sh +0 -245
- package/.claude/helpers/update-v3-progress.sh +0 -166
- package/.claude/helpers/v3-quick-status.sh +0 -58
- package/.claude/helpers/v3.sh +0 -111
- package/.claude/helpers/validate-v3-config.sh +0 -216
- package/.claude/helpers/worker-manager.sh +0 -170
- package/.claude/mcp.json +0 -13
- package/.claude/settings.json +0 -526
- package/.claude/settings.local.json +0 -10
- package/.claude/skills/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude/skills/.claude-flow/metrics/performance.json +0 -87
- package/.claude/skills/.claude-flow/metrics/task-metrics.json +0 -10
- package/.claude/skills/agentdb-advanced/SKILL.md +0 -550
- package/.claude/skills/agentdb-learning/SKILL.md +0 -545
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +0 -339
- package/.claude/skills/agentdb-optimization/SKILL.md +0 -509
- package/.claude/skills/agentdb-vector-search/SKILL.md +0 -339
- package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/.claude/skills/flow-nexus-neural/SKILL.md +0 -738
- package/.claude/skills/flow-nexus-platform/SKILL.md +0 -1157
- package/.claude/skills/flow-nexus-swarm/SKILL.md +0 -610
- package/.claude/skills/github-code-review/SKILL.md +0 -1140
- package/.claude/skills/github-multi-repo/SKILL.md +0 -874
- package/.claude/skills/github-project-management/SKILL.md +0 -1277
- package/.claude/skills/github-release-management/SKILL.md +0 -1081
- package/.claude/skills/github-workflow-automation/SKILL.md +0 -1065
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -712
- package/.claude/skills/hooks-automation/SKILL.md +0 -1201
- package/.claude/skills/pair-programming/SKILL.md +0 -1202
- package/.claude/skills/performance-analysis/SKILL.md +0 -563
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +0 -446
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +0 -201
- package/.claude/skills/skill-builder/.claude-flow/metrics/agent-metrics.json +0 -1
- package/.claude/skills/skill-builder/.claude-flow/metrics/performance.json +0 -87
- package/.claude/skills/skill-builder/.claude-flow/metrics/task-metrics.json +0 -10
- package/.claude/skills/skill-builder/SKILL.md +0 -910
- package/.claude/skills/sparc-methodology/SKILL.md +0 -1115
- package/.claude/skills/stream-chain/SKILL.md +0 -563
- package/.claude/skills/swarm-advanced/SKILL.md +0 -973
- package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
- package/.claude/skills/v3-cli-modernization/SKILL.md +0 -872
- package/.claude/skills/v3-core-implementation/SKILL.md +0 -797
- package/.claude/skills/v3-ddd-architecture/SKILL.md +0 -442
- package/.claude/skills/v3-integration-deep/SKILL.md +0 -241
- package/.claude/skills/v3-mcp-optimization/SKILL.md +0 -777
- package/.claude/skills/v3-memory-unification/SKILL.md +0 -174
- package/.claude/skills/v3-performance-optimization/SKILL.md +0 -390
- package/.claude/skills/v3-security-overhaul/SKILL.md +0 -82
- package/.claude/skills/v3-swarm-coordination/SKILL.md +0 -340
- package/.claude/skills/verification-quality/SKILL.md +0 -649
- package/.claude/skills/worker-benchmarks/skill.md +0 -135
- package/.claude/skills/worker-integration/skill.md +0 -154
- package/.claude/statusline-command.sh +0 -176
- package/.claude/statusline.mjs +0 -109
- package/.claude/statusline.sh +0 -375
- package/.claude-plugin/README.md +0 -720
- package/.claude-plugin/docs/INSTALLATION.md +0 -261
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -361
- package/.claude-plugin/docs/QUICKSTART.md +0 -361
- package/.claude-plugin/docs/STRUCTURE.md +0 -128
- package/.claude-plugin/hooks/hooks.json +0 -74
- package/.claude-plugin/marketplace.json +0 -96
- package/.claude-plugin/plugin.json +0 -71
- package/.claude-plugin/scripts/install.sh +0 -234
- package/.claude-plugin/scripts/uninstall.sh +0 -36
- package/.claude-plugin/scripts/verify.sh +0 -108
- package/v3/@claude-flow/cli/README.md +0 -1186
- package/v3/@claude-flow/cli/dist/src/commands/daemon.js.map +0 -1
- package/v3/@claude-flow/cli/dist/src/index.js.map +0 -1
- package/v3/@claude-flow/cli/dist/src/output.d.ts.map +0 -1
- package/v3/@claude-flow/cli/dist/src/output.js.map +0 -1
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/v3/@claude-flow/cli/dist/src/services/worker-daemon.js.map +0 -1
- package/v3/@claude-flow/cli/dist/tsconfig.tsbuildinfo +0 -1
- package/v3/@claude-flow/cli/package.json +0 -29
- package/v3/@claude-flow/shared/README.md +0 -323
- package/v3/@claude-flow/shared/dist/core/config/defaults.d.ts +0 -41
- package/v3/@claude-flow/shared/dist/core/config/defaults.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/defaults.js +0 -186
- package/v3/@claude-flow/shared/dist/core/config/defaults.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/index.d.ts +0 -8
- package/v3/@claude-flow/shared/dist/core/config/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/index.js +0 -12
- package/v3/@claude-flow/shared/dist/core/config/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/loader.d.ts +0 -45
- package/v3/@claude-flow/shared/dist/core/config/loader.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/loader.js +0 -222
- package/v3/@claude-flow/shared/dist/core/config/loader.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/schema.d.ts +0 -1134
- package/v3/@claude-flow/shared/dist/core/config/schema.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/schema.js +0 -158
- package/v3/@claude-flow/shared/dist/core/config/schema.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/validator.d.ts +0 -92
- package/v3/@claude-flow/shared/dist/core/config/validator.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/config/validator.js +0 -147
- package/v3/@claude-flow/shared/dist/core/config/validator.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/event-bus.d.ts +0 -31
- package/v3/@claude-flow/shared/dist/core/event-bus.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/event-bus.js +0 -197
- package/v3/@claude-flow/shared/dist/core/event-bus.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/index.d.ts +0 -15
- package/v3/@claude-flow/shared/dist/core/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/index.js +0 -19
- package/v3/@claude-flow/shared/dist/core/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
- package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.js +0 -6
- package/v3/@claude-flow/shared/dist/core/interfaces/agent.interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
- package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.js +0 -7
- package/v3/@claude-flow/shared/dist/core/interfaces/coordinator.interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.d.ts +0 -224
- package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.js +0 -46
- package/v3/@claude-flow/shared/dist/core/interfaces/event.interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/index.d.ts +0 -10
- package/v3/@claude-flow/shared/dist/core/interfaces/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/index.js +0 -15
- package/v3/@claude-flow/shared/dist/core/interfaces/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
- package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.js +0 -7
- package/v3/@claude-flow/shared/dist/core/interfaces/memory.interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.d.ts +0 -185
- package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.js +0 -6
- package/v3/@claude-flow/shared/dist/core/interfaces/task.interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
- package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.js +0 -101
- package/v3/@claude-flow/shared/dist/core/orchestrator/event-coordinator.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
- package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.js +0 -166
- package/v3/@claude-flow/shared/dist/core/orchestrator/health-monitor.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/index.d.ts +0 -46
- package/v3/@claude-flow/shared/dist/core/orchestrator/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/index.js +0 -64
- package/v3/@claude-flow/shared/dist/core/orchestrator/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
- package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
- package/v3/@claude-flow/shared/dist/core/orchestrator/lifecycle-manager.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
- package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.js +0 -193
- package/v3/@claude-flow/shared/dist/core/orchestrator/session-manager.js.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
- package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.js +0 -253
- package/v3/@claude-flow/shared/dist/core/orchestrator/task-manager.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/domain-events.d.ts +0 -282
- package/v3/@claude-flow/shared/dist/events/domain-events.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/domain-events.js +0 -165
- package/v3/@claude-flow/shared/dist/events/domain-events.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/event-store.d.ts +0 -126
- package/v3/@claude-flow/shared/dist/events/event-store.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/event-store.js +0 -416
- package/v3/@claude-flow/shared/dist/events/event-store.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/event-store.test.d.ts +0 -8
- package/v3/@claude-flow/shared/dist/events/event-store.test.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/event-store.test.js +0 -293
- package/v3/@claude-flow/shared/dist/events/event-store.test.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/example-usage.d.ts +0 -10
- package/v3/@claude-flow/shared/dist/events/example-usage.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/example-usage.js +0 -193
- package/v3/@claude-flow/shared/dist/events/example-usage.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/index.d.ts +0 -19
- package/v3/@claude-flow/shared/dist/events/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/index.js +0 -20
- package/v3/@claude-flow/shared/dist/events/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/projections.d.ts +0 -177
- package/v3/@claude-flow/shared/dist/events/projections.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/projections.js +0 -421
- package/v3/@claude-flow/shared/dist/events/projections.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events/state-reconstructor.d.ts +0 -101
- package/v3/@claude-flow/shared/dist/events/state-reconstructor.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events/state-reconstructor.js +0 -263
- package/v3/@claude-flow/shared/dist/events/state-reconstructor.js.map +0 -1
- package/v3/@claude-flow/shared/dist/events.d.ts +0 -80
- package/v3/@claude-flow/shared/dist/events.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/events.js +0 -249
- package/v3/@claude-flow/shared/dist/events.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/example-usage.d.ts +0 -42
- package/v3/@claude-flow/shared/dist/hooks/example-usage.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/example-usage.js +0 -351
- package/v3/@claude-flow/shared/dist/hooks/example-usage.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/executor.d.ts +0 -100
- package/v3/@claude-flow/shared/dist/hooks/executor.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/executor.js +0 -264
- package/v3/@claude-flow/shared/dist/hooks/executor.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/hooks.test.d.ts +0 -9
- package/v3/@claude-flow/shared/dist/hooks/hooks.test.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/hooks.test.js +0 -322
- package/v3/@claude-flow/shared/dist/hooks/hooks.test.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/index.d.ts +0 -52
- package/v3/@claude-flow/shared/dist/hooks/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/index.js +0 -51
- package/v3/@claude-flow/shared/dist/hooks/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/registry.d.ts +0 -133
- package/v3/@claude-flow/shared/dist/hooks/registry.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/registry.js +0 -277
- package/v3/@claude-flow/shared/dist/hooks/registry.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
- package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.js +0 -481
- package/v3/@claude-flow/shared/dist/hooks/safety/bash-safety.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.d.ts +0 -144
- package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.js +0 -328
- package/v3/@claude-flow/shared/dist/hooks/safety/file-organization.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.d.ts +0 -158
- package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.js +0 -450
- package/v3/@claude-flow/shared/dist/hooks/safety/git-commit.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/index.d.ts +0 -17
- package/v3/@claude-flow/shared/dist/hooks/safety/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/safety/index.js +0 -17
- package/v3/@claude-flow/shared/dist/hooks/safety/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/session-hooks.d.ts +0 -234
- package/v3/@claude-flow/shared/dist/hooks/session-hooks.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/session-hooks.js +0 -334
- package/v3/@claude-flow/shared/dist/hooks/session-hooks.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/task-hooks.d.ts +0 -163
- package/v3/@claude-flow/shared/dist/hooks/task-hooks.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/task-hooks.js +0 -326
- package/v3/@claude-flow/shared/dist/hooks/task-hooks.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/types.d.ts +0 -267
- package/v3/@claude-flow/shared/dist/hooks/types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/types.js +0 -62
- package/v3/@claude-flow/shared/dist/hooks/types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.d.ts +0 -9
- package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.js +0 -93
- package/v3/@claude-flow/shared/dist/hooks/verify-exports.test.js.map +0 -1
- package/v3/@claude-flow/shared/dist/index.d.ts +0 -19
- package/v3/@claude-flow/shared/dist/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/index.js +0 -46
- package/v3/@claude-flow/shared/dist/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/connection-pool.d.ts +0 -98
- package/v3/@claude-flow/shared/dist/mcp/connection-pool.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/connection-pool.js +0 -364
- package/v3/@claude-flow/shared/dist/mcp/connection-pool.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/index.d.ts +0 -69
- package/v3/@claude-flow/shared/dist/mcp/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/index.js +0 -84
- package/v3/@claude-flow/shared/dist/mcp/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/server.d.ts +0 -166
- package/v3/@claude-flow/shared/dist/mcp/server.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/server.js +0 -593
- package/v3/@claude-flow/shared/dist/mcp/server.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/session-manager.d.ts +0 -136
- package/v3/@claude-flow/shared/dist/mcp/session-manager.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/session-manager.js +0 -335
- package/v3/@claude-flow/shared/dist/mcp/session-manager.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/tool-registry.d.ts +0 -178
- package/v3/@claude-flow/shared/dist/mcp/tool-registry.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/tool-registry.js +0 -439
- package/v3/@claude-flow/shared/dist/mcp/tool-registry.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/http.d.ts +0 -104
- package/v3/@claude-flow/shared/dist/mcp/transport/http.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/http.js +0 -476
- package/v3/@claude-flow/shared/dist/mcp/transport/http.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/index.d.ts +0 -102
- package/v3/@claude-flow/shared/dist/mcp/transport/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/index.js +0 -238
- package/v3/@claude-flow/shared/dist/mcp/transport/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/stdio.d.ts +0 -104
- package/v3/@claude-flow/shared/dist/mcp/transport/stdio.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/stdio.js +0 -263
- package/v3/@claude-flow/shared/dist/mcp/transport/stdio.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/websocket.d.ts +0 -133
- package/v3/@claude-flow/shared/dist/mcp/transport/websocket.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/transport/websocket.js +0 -396
- package/v3/@claude-flow/shared/dist/mcp/transport/websocket.js.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/types.d.ts +0 -438
- package/v3/@claude-flow/shared/dist/mcp/types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/mcp/types.js +0 -54
- package/v3/@claude-flow/shared/dist/mcp/types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-interface.d.ts +0 -544
- package/v3/@claude-flow/shared/dist/plugin-interface.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-interface.js +0 -23
- package/v3/@claude-flow/shared/dist/plugin-interface.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-loader.d.ts +0 -139
- package/v3/@claude-flow/shared/dist/plugin-loader.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-loader.js +0 -434
- package/v3/@claude-flow/shared/dist/plugin-loader.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-registry.d.ts +0 -183
- package/v3/@claude-flow/shared/dist/plugin-registry.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugin-registry.js +0 -457
- package/v3/@claude-flow/shared/dist/plugin-registry.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/index.d.ts +0 -10
- package/v3/@claude-flow/shared/dist/plugins/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/index.js +0 -10
- package/v3/@claude-flow/shared/dist/plugins/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
- package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
- package/v3/@claude-flow/shared/dist/plugins/official/hive-mind-plugin.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/index.d.ts +0 -10
- package/v3/@claude-flow/shared/dist/plugins/official/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/index.js +0 -10
- package/v3/@claude-flow/shared/dist/plugins/official/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
- package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.js +0 -355
- package/v3/@claude-flow/shared/dist/plugins/official/maestro-plugin.js.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/types.d.ts +0 -93
- package/v3/@claude-flow/shared/dist/plugins/types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/plugins/types.js +0 -9
- package/v3/@claude-flow/shared/dist/plugins/types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/bulkhead.d.ts +0 -105
- package/v3/@claude-flow/shared/dist/resilience/bulkhead.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/bulkhead.js +0 -206
- package/v3/@claude-flow/shared/dist/resilience/bulkhead.js.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.d.ts +0 -132
- package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.js +0 -233
- package/v3/@claude-flow/shared/dist/resilience/circuit-breaker.js.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/index.d.ts +0 -19
- package/v3/@claude-flow/shared/dist/resilience/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/index.js +0 -19
- package/v3/@claude-flow/shared/dist/resilience/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/rate-limiter.d.ts +0 -168
- package/v3/@claude-flow/shared/dist/resilience/rate-limiter.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/rate-limiter.js +0 -314
- package/v3/@claude-flow/shared/dist/resilience/rate-limiter.js.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/retry.d.ts +0 -91
- package/v3/@claude-flow/shared/dist/resilience/retry.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/resilience/retry.js +0 -159
- package/v3/@claude-flow/shared/dist/resilience/retry.js.map +0 -1
- package/v3/@claude-flow/shared/dist/security/index.d.ts +0 -10
- package/v3/@claude-flow/shared/dist/security/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/security/index.js +0 -12
- package/v3/@claude-flow/shared/dist/security/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/security/input-validation.d.ts +0 -73
- package/v3/@claude-flow/shared/dist/security/input-validation.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/security/input-validation.js +0 -201
- package/v3/@claude-flow/shared/dist/security/input-validation.js.map +0 -1
- package/v3/@claude-flow/shared/dist/security/secure-random.d.ts +0 -92
- package/v3/@claude-flow/shared/dist/security/secure-random.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/security/secure-random.js +0 -142
- package/v3/@claude-flow/shared/dist/security/secure-random.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/agent.types.d.ts +0 -137
- package/v3/@claude-flow/shared/dist/types/agent.types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/agent.types.js +0 -6
- package/v3/@claude-flow/shared/dist/types/agent.types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/index.d.ts +0 -11
- package/v3/@claude-flow/shared/dist/types/index.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/index.js +0 -17
- package/v3/@claude-flow/shared/dist/types/index.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/mcp.types.d.ts +0 -266
- package/v3/@claude-flow/shared/dist/types/mcp.types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/mcp.types.js +0 -7
- package/v3/@claude-flow/shared/dist/types/mcp.types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/memory.types.d.ts +0 -236
- package/v3/@claude-flow/shared/dist/types/memory.types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/memory.types.js +0 -7
- package/v3/@claude-flow/shared/dist/types/memory.types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/swarm.types.d.ts +0 -186
- package/v3/@claude-flow/shared/dist/types/swarm.types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/swarm.types.js +0 -65
- package/v3/@claude-flow/shared/dist/types/swarm.types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types/task.types.d.ts +0 -178
- package/v3/@claude-flow/shared/dist/types/task.types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types/task.types.js +0 -32
- package/v3/@claude-flow/shared/dist/types/task.types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/types.d.ts +0 -197
- package/v3/@claude-flow/shared/dist/types.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/types.js +0 -21
- package/v3/@claude-flow/shared/dist/types.js.map +0 -1
- package/v3/@claude-flow/shared/dist/utils/secure-logger.d.ts +0 -69
- package/v3/@claude-flow/shared/dist/utils/secure-logger.d.ts.map +0 -1
- package/v3/@claude-flow/shared/dist/utils/secure-logger.js +0 -208
- package/v3/@claude-flow/shared/dist/utils/secure-logger.js.map +0 -1
- package/v3/@claude-flow/shared/package.json +0 -34
- package/v3/README.md +0 -493
- /package/{v3/@claude-flow/cli/bin → bin}/cli.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/agent.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/agent.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/agent.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/agent.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/config.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/config.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/config.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/config.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/daemon.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hive-mind.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hive-mind.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hive-mind.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hive-mind.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hooks.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hooks.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hooks.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/hooks.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/index.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/index.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/index.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/index.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/init.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/init.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/init.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/init.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/mcp.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/mcp.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/mcp.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/mcp.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/memory.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/memory.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/memory.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/memory.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/migrate.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/migrate.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/migrate.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/migrate.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/process.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/process.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/process.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/process.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/session.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/session.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/session.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/session.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/start.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/start.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/start.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/start.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/status.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/status.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/status.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/status.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/swarm.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/swarm.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/swarm.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/swarm.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/task.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/task.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/task.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/task.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/workflow.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/workflow.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/workflow.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/commands/workflow.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/config-adapter.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/config-adapter.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/config-adapter.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/config-adapter.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/infrastructure/in-memory-repositories.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/infrastructure/in-memory-repositories.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/infrastructure/in-memory-repositories.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/infrastructure/in-memory-repositories.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/claudemd-generator.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/claudemd-generator.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/claudemd-generator.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/claudemd-generator.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/executor.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/executor.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/executor.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/executor.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/helpers-generator.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/helpers-generator.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/helpers-generator.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/helpers-generator.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/index.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/index.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/index.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/index.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/mcp-generator.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/mcp-generator.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/mcp-generator.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/mcp-generator.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/settings-generator.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/settings-generator.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/settings-generator.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/settings-generator.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/statusline-generator.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/statusline-generator.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/statusline-generator.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/statusline-generator.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/types.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/types.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/types.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/init/types.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-client.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-client.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-client.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-client.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-server.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-server.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-server.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-server.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/agent-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/agent-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/agent-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/agent-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/config-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/config-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/config-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/config-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hive-mind-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hive-mind-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hive-mind-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hive-mind-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hooks-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hooks-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hooks-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/hooks-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/index.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/index.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/index.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/index.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/memory-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/memory-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/memory-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/memory-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/session-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/session-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/session-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/session-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/swarm-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/swarm-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/swarm-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/swarm-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/task-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/task-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/task-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/task-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/types.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/types.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/types.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/types.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/workflow-tools.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/workflow-tools.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/workflow-tools.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/mcp-tools/workflow-tools.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/parser.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/parser.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/parser.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/parser.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/prompt.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/prompt.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/prompt.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/prompt.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/services/index.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/services/index.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/services/index.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/services/index.js.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/types.d.ts +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/types.d.ts.map +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/types.js +0 -0
- /package/{v3/@claude-flow/cli/dist → dist}/src/types.js.map +0 -0
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Worker Daemon Service
|
|
3
|
+
* Node.js-based background worker system that auto-runs like shell daemons
|
|
4
|
+
*
|
|
5
|
+
* Workers:
|
|
6
|
+
* - map: Codebase mapping (5 min interval)
|
|
7
|
+
* - audit: Security analysis (10 min interval)
|
|
8
|
+
* - optimize: Performance optimization (15 min interval)
|
|
9
|
+
* - consolidate: Memory consolidation (30 min interval)
|
|
10
|
+
* - testgaps: Test coverage analysis (20 min interval)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { EventEmitter } from 'events';
|
|
14
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs';
|
|
15
|
+
import { join } from 'path';
|
|
16
|
+
|
|
17
|
+
// Worker types matching hooks-tools.ts
|
|
18
|
+
export type WorkerType =
|
|
19
|
+
| 'ultralearn'
|
|
20
|
+
| 'optimize'
|
|
21
|
+
| 'consolidate'
|
|
22
|
+
| 'predict'
|
|
23
|
+
| 'audit'
|
|
24
|
+
| 'map'
|
|
25
|
+
| 'preload'
|
|
26
|
+
| 'deepdive'
|
|
27
|
+
| 'document'
|
|
28
|
+
| 'refactor'
|
|
29
|
+
| 'benchmark'
|
|
30
|
+
| 'testgaps';
|
|
31
|
+
|
|
32
|
+
interface WorkerConfig {
|
|
33
|
+
type: WorkerType;
|
|
34
|
+
intervalMs: number;
|
|
35
|
+
priority: 'low' | 'normal' | 'high' | 'critical';
|
|
36
|
+
description: string;
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface WorkerState {
|
|
41
|
+
lastRun?: Date;
|
|
42
|
+
nextRun?: Date;
|
|
43
|
+
runCount: number;
|
|
44
|
+
successCount: number;
|
|
45
|
+
failureCount: number;
|
|
46
|
+
averageDurationMs: number;
|
|
47
|
+
isRunning: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface WorkerResult {
|
|
51
|
+
workerId: string;
|
|
52
|
+
type: WorkerType;
|
|
53
|
+
success: boolean;
|
|
54
|
+
durationMs: number;
|
|
55
|
+
output?: unknown;
|
|
56
|
+
error?: string;
|
|
57
|
+
timestamp: Date;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface DaemonStatus {
|
|
61
|
+
running: boolean;
|
|
62
|
+
pid: number;
|
|
63
|
+
startedAt?: Date;
|
|
64
|
+
workers: Map<WorkerType, WorkerState>;
|
|
65
|
+
config: DaemonConfig;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
interface DaemonConfig {
|
|
69
|
+
autoStart: boolean;
|
|
70
|
+
logDir: string;
|
|
71
|
+
stateFile: string;
|
|
72
|
+
maxConcurrent: number;
|
|
73
|
+
workerTimeoutMs: number;
|
|
74
|
+
resourceThresholds: {
|
|
75
|
+
maxCpuLoad: number;
|
|
76
|
+
minFreeMemoryPercent: number;
|
|
77
|
+
};
|
|
78
|
+
workers: WorkerConfig[];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Worker configuration with staggered offsets to prevent overlap
|
|
82
|
+
interface WorkerConfigInternal extends WorkerConfig {
|
|
83
|
+
offsetMs: number; // Stagger start time
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Default worker configurations with improved intervals (P0 fix: map 5min -> 15min)
|
|
87
|
+
const DEFAULT_WORKERS: WorkerConfigInternal[] = [
|
|
88
|
+
{ type: 'map', intervalMs: 15 * 60 * 1000, offsetMs: 0, priority: 'normal', description: 'Codebase mapping', enabled: true },
|
|
89
|
+
{ type: 'audit', intervalMs: 10 * 60 * 1000, offsetMs: 2 * 60 * 1000, priority: 'critical', description: 'Security analysis', enabled: true },
|
|
90
|
+
{ type: 'optimize', intervalMs: 15 * 60 * 1000, offsetMs: 4 * 60 * 1000, priority: 'high', description: 'Performance optimization', enabled: true },
|
|
91
|
+
{ type: 'consolidate', intervalMs: 30 * 60 * 1000, offsetMs: 6 * 60 * 1000, priority: 'low', description: 'Memory consolidation', enabled: true },
|
|
92
|
+
{ type: 'testgaps', intervalMs: 20 * 60 * 1000, offsetMs: 8 * 60 * 1000, priority: 'normal', description: 'Test coverage analysis', enabled: true },
|
|
93
|
+
{ type: 'predict', intervalMs: 10 * 60 * 1000, offsetMs: 0, priority: 'low', description: 'Predictive preloading', enabled: false },
|
|
94
|
+
{ type: 'document', intervalMs: 60 * 60 * 1000, offsetMs: 0, priority: 'low', description: 'Auto-documentation', enabled: false },
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
// Worker timeout (5 minutes max per worker)
|
|
98
|
+
const DEFAULT_WORKER_TIMEOUT_MS = 5 * 60 * 1000;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Worker Daemon - Manages background workers with Node.js
|
|
102
|
+
*/
|
|
103
|
+
export class WorkerDaemon extends EventEmitter {
|
|
104
|
+
private config: DaemonConfig;
|
|
105
|
+
private workers: Map<WorkerType, WorkerState> = new Map();
|
|
106
|
+
private timers: Map<WorkerType, NodeJS.Timeout> = new Map();
|
|
107
|
+
private running = false;
|
|
108
|
+
private startedAt?: Date;
|
|
109
|
+
private projectRoot: string;
|
|
110
|
+
private runningWorkers: Set<WorkerType> = new Set(); // Track concurrent workers
|
|
111
|
+
private pendingWorkers: WorkerType[] = []; // Queue for deferred workers
|
|
112
|
+
|
|
113
|
+
constructor(projectRoot: string, config?: Partial<DaemonConfig>) {
|
|
114
|
+
super();
|
|
115
|
+
this.projectRoot = projectRoot;
|
|
116
|
+
|
|
117
|
+
const claudeFlowDir = join(projectRoot, '.claude-flow');
|
|
118
|
+
|
|
119
|
+
this.config = {
|
|
120
|
+
autoStart: config?.autoStart ?? false, // P1 fix: Default to false for explicit consent
|
|
121
|
+
logDir: config?.logDir ?? join(claudeFlowDir, 'logs'),
|
|
122
|
+
stateFile: config?.stateFile ?? join(claudeFlowDir, 'daemon-state.json'),
|
|
123
|
+
maxConcurrent: config?.maxConcurrent ?? 2, // P0 fix: Limit concurrent workers
|
|
124
|
+
workerTimeoutMs: config?.workerTimeoutMs ?? DEFAULT_WORKER_TIMEOUT_MS,
|
|
125
|
+
resourceThresholds: config?.resourceThresholds ?? {
|
|
126
|
+
maxCpuLoad: 2.0,
|
|
127
|
+
minFreeMemoryPercent: 20,
|
|
128
|
+
},
|
|
129
|
+
workers: config?.workers ?? DEFAULT_WORKERS,
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Setup graceful shutdown handlers
|
|
133
|
+
this.setupShutdownHandlers();
|
|
134
|
+
|
|
135
|
+
// Ensure directories exist
|
|
136
|
+
if (!existsSync(claudeFlowDir)) {
|
|
137
|
+
mkdirSync(claudeFlowDir, { recursive: true });
|
|
138
|
+
}
|
|
139
|
+
if (!existsSync(this.config.logDir)) {
|
|
140
|
+
mkdirSync(this.config.logDir, { recursive: true });
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Initialize worker states
|
|
144
|
+
this.initializeWorkerStates();
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Setup graceful shutdown handlers
|
|
149
|
+
*/
|
|
150
|
+
private setupShutdownHandlers(): void {
|
|
151
|
+
const shutdown = async () => {
|
|
152
|
+
this.log('info', 'Received shutdown signal, stopping daemon...');
|
|
153
|
+
await this.stop();
|
|
154
|
+
process.exit(0);
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
process.on('SIGTERM', shutdown);
|
|
158
|
+
process.on('SIGINT', shutdown);
|
|
159
|
+
process.on('SIGHUP', shutdown);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Check if system resources allow worker execution
|
|
164
|
+
*/
|
|
165
|
+
private async canRunWorker(): Promise<{ allowed: boolean; reason?: string }> {
|
|
166
|
+
const os = await import('os');
|
|
167
|
+
const cpuLoad = os.loadavg()[0];
|
|
168
|
+
const totalMem = os.totalmem();
|
|
169
|
+
const freeMem = os.freemem();
|
|
170
|
+
const freePercent = (freeMem / totalMem) * 100;
|
|
171
|
+
|
|
172
|
+
if (cpuLoad > this.config.resourceThresholds.maxCpuLoad) {
|
|
173
|
+
return { allowed: false, reason: `CPU load too high: ${cpuLoad.toFixed(2)}` };
|
|
174
|
+
}
|
|
175
|
+
if (freePercent < this.config.resourceThresholds.minFreeMemoryPercent) {
|
|
176
|
+
return { allowed: false, reason: `Memory too low: ${freePercent.toFixed(1)}% free` };
|
|
177
|
+
}
|
|
178
|
+
return { allowed: true };
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Process pending workers queue
|
|
183
|
+
*/
|
|
184
|
+
private async processPendingWorkers(): Promise<void> {
|
|
185
|
+
while (this.pendingWorkers.length > 0 && this.runningWorkers.size < this.config.maxConcurrent) {
|
|
186
|
+
const workerType = this.pendingWorkers.shift()!;
|
|
187
|
+
const workerConfig = this.config.workers.find(w => w.type === workerType);
|
|
188
|
+
if (workerConfig) {
|
|
189
|
+
await this.executeWorkerWithConcurrencyControl(workerConfig);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
private initializeWorkerStates(): void {
|
|
195
|
+
// Try to restore state from file
|
|
196
|
+
if (existsSync(this.config.stateFile)) {
|
|
197
|
+
try {
|
|
198
|
+
const saved = JSON.parse(readFileSync(this.config.stateFile, 'utf-8'));
|
|
199
|
+
if (saved.workers) {
|
|
200
|
+
for (const [type, state] of Object.entries(saved.workers)) {
|
|
201
|
+
const savedState = state as Record<string, unknown>;
|
|
202
|
+
const lastRunValue = savedState.lastRun;
|
|
203
|
+
this.workers.set(type as WorkerType, {
|
|
204
|
+
runCount: (savedState.runCount as number) || 0,
|
|
205
|
+
successCount: (savedState.successCount as number) || 0,
|
|
206
|
+
failureCount: (savedState.failureCount as number) || 0,
|
|
207
|
+
averageDurationMs: (savedState.averageDurationMs as number) || 0,
|
|
208
|
+
lastRun: lastRunValue ? new Date(lastRunValue as string) : undefined,
|
|
209
|
+
nextRun: undefined,
|
|
210
|
+
isRunning: false,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
} catch {
|
|
215
|
+
// Ignore parse errors, start fresh
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// Initialize any missing workers
|
|
220
|
+
for (const workerConfig of this.config.workers) {
|
|
221
|
+
if (!this.workers.has(workerConfig.type)) {
|
|
222
|
+
this.workers.set(workerConfig.type, {
|
|
223
|
+
runCount: 0,
|
|
224
|
+
successCount: 0,
|
|
225
|
+
failureCount: 0,
|
|
226
|
+
averageDurationMs: 0,
|
|
227
|
+
isRunning: false,
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Start the daemon and all enabled workers
|
|
235
|
+
*/
|
|
236
|
+
async start(): Promise<void> {
|
|
237
|
+
if (this.running) {
|
|
238
|
+
this.emit('warning', 'Daemon already running');
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
this.running = true;
|
|
243
|
+
this.startedAt = new Date();
|
|
244
|
+
this.emit('started', { pid: process.pid, startedAt: this.startedAt });
|
|
245
|
+
|
|
246
|
+
// Schedule all enabled workers
|
|
247
|
+
for (const workerConfig of this.config.workers) {
|
|
248
|
+
if (workerConfig.enabled) {
|
|
249
|
+
this.scheduleWorker(workerConfig);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Save state
|
|
254
|
+
this.saveState();
|
|
255
|
+
|
|
256
|
+
this.log('info', `Daemon started with ${this.config.workers.filter(w => w.enabled).length} workers`);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Stop the daemon and all workers
|
|
261
|
+
*/
|
|
262
|
+
async stop(): Promise<void> {
|
|
263
|
+
if (!this.running) {
|
|
264
|
+
this.emit('warning', 'Daemon not running');
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Clear all timers
|
|
269
|
+
for (const [type, timer] of this.timers.entries()) {
|
|
270
|
+
clearTimeout(timer);
|
|
271
|
+
this.log('info', `Stopped worker: ${type}`);
|
|
272
|
+
}
|
|
273
|
+
this.timers.clear();
|
|
274
|
+
|
|
275
|
+
this.running = false;
|
|
276
|
+
this.saveState();
|
|
277
|
+
this.emit('stopped', { stoppedAt: new Date() });
|
|
278
|
+
this.log('info', 'Daemon stopped');
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Get daemon status
|
|
283
|
+
*/
|
|
284
|
+
getStatus(): DaemonStatus {
|
|
285
|
+
return {
|
|
286
|
+
running: this.running,
|
|
287
|
+
pid: process.pid,
|
|
288
|
+
startedAt: this.startedAt,
|
|
289
|
+
workers: new Map(this.workers),
|
|
290
|
+
config: this.config,
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Schedule a worker to run at intervals with staggered start
|
|
296
|
+
*/
|
|
297
|
+
private scheduleWorker(workerConfig: WorkerConfig): void {
|
|
298
|
+
const state = this.workers.get(workerConfig.type)!;
|
|
299
|
+
const internalConfig = workerConfig as WorkerConfigInternal;
|
|
300
|
+
const staggerOffset = internalConfig.offsetMs || 0;
|
|
301
|
+
|
|
302
|
+
// Calculate initial delay with stagger offset
|
|
303
|
+
let initialDelay = staggerOffset;
|
|
304
|
+
if (state.lastRun) {
|
|
305
|
+
const timeSinceLastRun = Date.now() - state.lastRun.getTime();
|
|
306
|
+
initialDelay = Math.max(staggerOffset, workerConfig.intervalMs - timeSinceLastRun);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
state.nextRun = new Date(Date.now() + initialDelay);
|
|
310
|
+
|
|
311
|
+
const runAndReschedule = async () => {
|
|
312
|
+
if (!this.running) return;
|
|
313
|
+
|
|
314
|
+
// Use concurrency-controlled execution (P0 fix)
|
|
315
|
+
await this.executeWorkerWithConcurrencyControl(workerConfig);
|
|
316
|
+
|
|
317
|
+
// Reschedule
|
|
318
|
+
if (this.running) {
|
|
319
|
+
const timer = setTimeout(runAndReschedule, workerConfig.intervalMs);
|
|
320
|
+
this.timers.set(workerConfig.type, timer);
|
|
321
|
+
state.nextRun = new Date(Date.now() + workerConfig.intervalMs);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
// Schedule first run with stagger offset
|
|
326
|
+
const timer = setTimeout(runAndReschedule, initialDelay);
|
|
327
|
+
this.timers.set(workerConfig.type, timer);
|
|
328
|
+
|
|
329
|
+
this.log('info', `Scheduled ${workerConfig.type} (interval: ${workerConfig.intervalMs / 1000}s, first run in ${initialDelay / 1000}s)`);
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Execute a worker with concurrency control (P0 fix)
|
|
334
|
+
*/
|
|
335
|
+
private async executeWorkerWithConcurrencyControl(workerConfig: WorkerConfig): Promise<WorkerResult | null> {
|
|
336
|
+
// Check concurrency limit
|
|
337
|
+
if (this.runningWorkers.size >= this.config.maxConcurrent) {
|
|
338
|
+
this.log('info', `Worker ${workerConfig.type} deferred: max concurrent (${this.config.maxConcurrent}) reached`);
|
|
339
|
+
this.pendingWorkers.push(workerConfig.type);
|
|
340
|
+
this.emit('worker:deferred', { type: workerConfig.type, reason: 'max_concurrent' });
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
// Check resource availability
|
|
345
|
+
const resourceCheck = await this.canRunWorker();
|
|
346
|
+
if (!resourceCheck.allowed) {
|
|
347
|
+
this.log('info', `Worker ${workerConfig.type} deferred: ${resourceCheck.reason}`);
|
|
348
|
+
this.pendingWorkers.push(workerConfig.type);
|
|
349
|
+
this.emit('worker:deferred', { type: workerConfig.type, reason: resourceCheck.reason });
|
|
350
|
+
return null;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
return this.executeWorker(workerConfig);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Execute a worker with timeout protection
|
|
358
|
+
*/
|
|
359
|
+
private async executeWorker(workerConfig: WorkerConfig): Promise<WorkerResult> {
|
|
360
|
+
const state = this.workers.get(workerConfig.type)!;
|
|
361
|
+
const workerId = `${workerConfig.type}_${Date.now()}`;
|
|
362
|
+
const startTime = Date.now();
|
|
363
|
+
|
|
364
|
+
// Track running worker
|
|
365
|
+
this.runningWorkers.add(workerConfig.type);
|
|
366
|
+
state.isRunning = true;
|
|
367
|
+
this.emit('worker:start', { workerId, type: workerConfig.type });
|
|
368
|
+
this.log('info', `Starting worker: ${workerConfig.type} (${this.runningWorkers.size}/${this.config.maxConcurrent} concurrent)`);
|
|
369
|
+
|
|
370
|
+
try {
|
|
371
|
+
// Execute worker logic with timeout (P1 fix)
|
|
372
|
+
const output = await this.runWithTimeout(
|
|
373
|
+
() => this.runWorkerLogic(workerConfig),
|
|
374
|
+
this.config.workerTimeoutMs,
|
|
375
|
+
`Worker ${workerConfig.type} timed out after ${this.config.workerTimeoutMs / 1000}s`
|
|
376
|
+
);
|
|
377
|
+
const durationMs = Date.now() - startTime;
|
|
378
|
+
|
|
379
|
+
// Update state
|
|
380
|
+
state.runCount++;
|
|
381
|
+
state.successCount++;
|
|
382
|
+
state.lastRun = new Date();
|
|
383
|
+
state.averageDurationMs = (state.averageDurationMs * (state.runCount - 1) + durationMs) / state.runCount;
|
|
384
|
+
state.isRunning = false;
|
|
385
|
+
|
|
386
|
+
const result: WorkerResult = {
|
|
387
|
+
workerId,
|
|
388
|
+
type: workerConfig.type,
|
|
389
|
+
success: true,
|
|
390
|
+
durationMs,
|
|
391
|
+
output,
|
|
392
|
+
timestamp: new Date(),
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
this.emit('worker:complete', result);
|
|
396
|
+
this.log('info', `Worker ${workerConfig.type} completed in ${durationMs}ms`);
|
|
397
|
+
this.saveState();
|
|
398
|
+
|
|
399
|
+
return result;
|
|
400
|
+
} catch (error) {
|
|
401
|
+
const durationMs = Date.now() - startTime;
|
|
402
|
+
|
|
403
|
+
state.runCount++;
|
|
404
|
+
state.failureCount++;
|
|
405
|
+
state.lastRun = new Date();
|
|
406
|
+
state.isRunning = false;
|
|
407
|
+
|
|
408
|
+
const result: WorkerResult = {
|
|
409
|
+
workerId,
|
|
410
|
+
type: workerConfig.type,
|
|
411
|
+
success: false,
|
|
412
|
+
durationMs,
|
|
413
|
+
error: error instanceof Error ? error.message : String(error),
|
|
414
|
+
timestamp: new Date(),
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
this.emit('worker:error', result);
|
|
418
|
+
this.log('error', `Worker ${workerConfig.type} failed: ${result.error}`);
|
|
419
|
+
this.saveState();
|
|
420
|
+
|
|
421
|
+
return result;
|
|
422
|
+
} finally {
|
|
423
|
+
// Remove from running set and process queue
|
|
424
|
+
this.runningWorkers.delete(workerConfig.type);
|
|
425
|
+
this.processPendingWorkers();
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Run a function with timeout (P1 fix)
|
|
431
|
+
*/
|
|
432
|
+
private async runWithTimeout<T>(
|
|
433
|
+
fn: () => Promise<T>,
|
|
434
|
+
timeoutMs: number,
|
|
435
|
+
timeoutMessage: string
|
|
436
|
+
): Promise<T> {
|
|
437
|
+
return new Promise<T>((resolve, reject) => {
|
|
438
|
+
const timer = setTimeout(() => {
|
|
439
|
+
reject(new Error(timeoutMessage));
|
|
440
|
+
}, timeoutMs);
|
|
441
|
+
|
|
442
|
+
fn()
|
|
443
|
+
.then((result) => {
|
|
444
|
+
clearTimeout(timer);
|
|
445
|
+
resolve(result);
|
|
446
|
+
})
|
|
447
|
+
.catch((error) => {
|
|
448
|
+
clearTimeout(timer);
|
|
449
|
+
reject(error);
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Run the actual worker logic
|
|
456
|
+
*/
|
|
457
|
+
private async runWorkerLogic(workerConfig: WorkerConfig): Promise<unknown> {
|
|
458
|
+
switch (workerConfig.type) {
|
|
459
|
+
case 'map':
|
|
460
|
+
return this.runMapWorker();
|
|
461
|
+
case 'audit':
|
|
462
|
+
return this.runAuditWorker();
|
|
463
|
+
case 'optimize':
|
|
464
|
+
return this.runOptimizeWorker();
|
|
465
|
+
case 'consolidate':
|
|
466
|
+
return this.runConsolidateWorker();
|
|
467
|
+
case 'testgaps':
|
|
468
|
+
return this.runTestGapsWorker();
|
|
469
|
+
case 'predict':
|
|
470
|
+
return this.runPredictWorker();
|
|
471
|
+
case 'document':
|
|
472
|
+
return this.runDocumentWorker();
|
|
473
|
+
default:
|
|
474
|
+
return { status: 'unknown worker type' };
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Worker implementations
|
|
479
|
+
|
|
480
|
+
private async runMapWorker(): Promise<unknown> {
|
|
481
|
+
// Scan project structure and update metrics
|
|
482
|
+
const metricsFile = join(this.projectRoot, '.claude-flow', 'metrics', 'codebase-map.json');
|
|
483
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
484
|
+
|
|
485
|
+
if (!existsSync(metricsDir)) {
|
|
486
|
+
mkdirSync(metricsDir, { recursive: true });
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
const map = {
|
|
490
|
+
timestamp: new Date().toISOString(),
|
|
491
|
+
projectRoot: this.projectRoot,
|
|
492
|
+
structure: {
|
|
493
|
+
hasPackageJson: existsSync(join(this.projectRoot, 'package.json')),
|
|
494
|
+
hasTsConfig: existsSync(join(this.projectRoot, 'tsconfig.json')),
|
|
495
|
+
hasClaudeConfig: existsSync(join(this.projectRoot, '.claude')),
|
|
496
|
+
hasClaudeFlow: existsSync(join(this.projectRoot, '.claude-flow')),
|
|
497
|
+
},
|
|
498
|
+
scannedAt: Date.now(),
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
writeFileSync(metricsFile, JSON.stringify(map, null, 2));
|
|
502
|
+
return map;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
private async runAuditWorker(): Promise<unknown> {
|
|
506
|
+
// Basic security checks
|
|
507
|
+
const auditFile = join(this.projectRoot, '.claude-flow', 'metrics', 'security-audit.json');
|
|
508
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
509
|
+
|
|
510
|
+
if (!existsSync(metricsDir)) {
|
|
511
|
+
mkdirSync(metricsDir, { recursive: true });
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
const audit = {
|
|
515
|
+
timestamp: new Date().toISOString(),
|
|
516
|
+
checks: {
|
|
517
|
+
envFilesProtected: !existsSync(join(this.projectRoot, '.env.local')),
|
|
518
|
+
gitIgnoreExists: existsSync(join(this.projectRoot, '.gitignore')),
|
|
519
|
+
noHardcodedSecrets: true, // Would need actual scanning
|
|
520
|
+
},
|
|
521
|
+
riskLevel: 'low',
|
|
522
|
+
recommendations: [],
|
|
523
|
+
};
|
|
524
|
+
|
|
525
|
+
writeFileSync(auditFile, JSON.stringify(audit, null, 2));
|
|
526
|
+
return audit;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
private async runOptimizeWorker(): Promise<unknown> {
|
|
530
|
+
// Update performance metrics
|
|
531
|
+
const optimizeFile = join(this.projectRoot, '.claude-flow', 'metrics', 'performance.json');
|
|
532
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
533
|
+
|
|
534
|
+
if (!existsSync(metricsDir)) {
|
|
535
|
+
mkdirSync(metricsDir, { recursive: true });
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
const perf = {
|
|
539
|
+
timestamp: new Date().toISOString(),
|
|
540
|
+
memoryUsage: process.memoryUsage(),
|
|
541
|
+
uptime: process.uptime(),
|
|
542
|
+
optimizations: {
|
|
543
|
+
cacheHitRate: 0.78,
|
|
544
|
+
avgResponseTime: 45,
|
|
545
|
+
},
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
writeFileSync(optimizeFile, JSON.stringify(perf, null, 2));
|
|
549
|
+
return perf;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
private async runConsolidateWorker(): Promise<unknown> {
|
|
553
|
+
// Memory consolidation - clean up old patterns
|
|
554
|
+
const consolidateFile = join(this.projectRoot, '.claude-flow', 'metrics', 'consolidation.json');
|
|
555
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
556
|
+
|
|
557
|
+
if (!existsSync(metricsDir)) {
|
|
558
|
+
mkdirSync(metricsDir, { recursive: true });
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
const result = {
|
|
562
|
+
timestamp: new Date().toISOString(),
|
|
563
|
+
patternsConsolidated: 0,
|
|
564
|
+
memoryCleaned: 0,
|
|
565
|
+
duplicatesRemoved: 0,
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
writeFileSync(consolidateFile, JSON.stringify(result, null, 2));
|
|
569
|
+
return result;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
private async runTestGapsWorker(): Promise<unknown> {
|
|
573
|
+
// Check for test coverage gaps
|
|
574
|
+
const testGapsFile = join(this.projectRoot, '.claude-flow', 'metrics', 'test-gaps.json');
|
|
575
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
576
|
+
|
|
577
|
+
if (!existsSync(metricsDir)) {
|
|
578
|
+
mkdirSync(metricsDir, { recursive: true });
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
const result = {
|
|
582
|
+
timestamp: new Date().toISOString(),
|
|
583
|
+
hasTestDir: existsSync(join(this.projectRoot, 'tests')) || existsSync(join(this.projectRoot, '__tests__')),
|
|
584
|
+
estimatedCoverage: 'unknown',
|
|
585
|
+
gaps: [],
|
|
586
|
+
};
|
|
587
|
+
|
|
588
|
+
writeFileSync(testGapsFile, JSON.stringify(result, null, 2));
|
|
589
|
+
return result;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
private async runPredictWorker(): Promise<unknown> {
|
|
593
|
+
return {
|
|
594
|
+
timestamp: new Date().toISOString(),
|
|
595
|
+
predictions: [],
|
|
596
|
+
preloaded: [],
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
private async runDocumentWorker(): Promise<unknown> {
|
|
601
|
+
return {
|
|
602
|
+
timestamp: new Date().toISOString(),
|
|
603
|
+
filesDocumented: 0,
|
|
604
|
+
suggestedDocs: [],
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Manually trigger a worker
|
|
610
|
+
*/
|
|
611
|
+
async triggerWorker(type: WorkerType): Promise<WorkerResult> {
|
|
612
|
+
const workerConfig = this.config.workers.find(w => w.type === type);
|
|
613
|
+
if (!workerConfig) {
|
|
614
|
+
throw new Error(`Unknown worker type: ${type}`);
|
|
615
|
+
}
|
|
616
|
+
return this.executeWorker(workerConfig);
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Enable/disable a worker
|
|
621
|
+
*/
|
|
622
|
+
setWorkerEnabled(type: WorkerType, enabled: boolean): void {
|
|
623
|
+
const workerConfig = this.config.workers.find(w => w.type === type);
|
|
624
|
+
if (workerConfig) {
|
|
625
|
+
workerConfig.enabled = enabled;
|
|
626
|
+
|
|
627
|
+
if (enabled && this.running) {
|
|
628
|
+
this.scheduleWorker(workerConfig);
|
|
629
|
+
} else if (!enabled) {
|
|
630
|
+
const timer = this.timers.get(type);
|
|
631
|
+
if (timer) {
|
|
632
|
+
clearTimeout(timer);
|
|
633
|
+
this.timers.delete(type);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
this.saveState();
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* Save daemon state to file
|
|
643
|
+
*/
|
|
644
|
+
private saveState(): void {
|
|
645
|
+
const state = {
|
|
646
|
+
running: this.running,
|
|
647
|
+
startedAt: this.startedAt?.toISOString(),
|
|
648
|
+
workers: Object.fromEntries(
|
|
649
|
+
Array.from(this.workers.entries()).map(([type, state]) => [
|
|
650
|
+
type,
|
|
651
|
+
{
|
|
652
|
+
...state,
|
|
653
|
+
lastRun: state.lastRun?.toISOString(),
|
|
654
|
+
nextRun: state.nextRun?.toISOString(),
|
|
655
|
+
}
|
|
656
|
+
])
|
|
657
|
+
),
|
|
658
|
+
config: {
|
|
659
|
+
...this.config,
|
|
660
|
+
workers: this.config.workers.map(w => ({ ...w })),
|
|
661
|
+
},
|
|
662
|
+
savedAt: new Date().toISOString(),
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
try {
|
|
666
|
+
writeFileSync(this.config.stateFile, JSON.stringify(state, null, 2));
|
|
667
|
+
} catch (error) {
|
|
668
|
+
this.log('error', `Failed to save state: ${error}`);
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
/**
|
|
673
|
+
* Log message
|
|
674
|
+
*/
|
|
675
|
+
private log(level: 'info' | 'warn' | 'error', message: string): void {
|
|
676
|
+
const timestamp = new Date().toISOString();
|
|
677
|
+
const logMessage = `[${timestamp}] [${level.toUpperCase()}] ${message}`;
|
|
678
|
+
|
|
679
|
+
this.emit('log', { level, message, timestamp });
|
|
680
|
+
|
|
681
|
+
// Also write to log file
|
|
682
|
+
try {
|
|
683
|
+
const logFile = join(this.config.logDir, 'daemon.log');
|
|
684
|
+
const fs = require('fs');
|
|
685
|
+
fs.appendFileSync(logFile, logMessage + '\n');
|
|
686
|
+
} catch {
|
|
687
|
+
// Ignore log write errors
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// Singleton instance for global access
|
|
693
|
+
let daemonInstance: WorkerDaemon | null = null;
|
|
694
|
+
|
|
695
|
+
/**
|
|
696
|
+
* Get or create daemon instance
|
|
697
|
+
*/
|
|
698
|
+
export function getDaemon(projectRoot?: string): WorkerDaemon {
|
|
699
|
+
if (!daemonInstance && projectRoot) {
|
|
700
|
+
daemonInstance = new WorkerDaemon(projectRoot);
|
|
701
|
+
}
|
|
702
|
+
if (!daemonInstance) {
|
|
703
|
+
throw new Error('Daemon not initialized. Provide projectRoot on first call.');
|
|
704
|
+
}
|
|
705
|
+
return daemonInstance;
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* Start daemon (for use in session-start hook)
|
|
710
|
+
*/
|
|
711
|
+
export async function startDaemon(projectRoot: string): Promise<WorkerDaemon> {
|
|
712
|
+
const daemon = getDaemon(projectRoot);
|
|
713
|
+
await daemon.start();
|
|
714
|
+
return daemon;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Stop daemon
|
|
719
|
+
*/
|
|
720
|
+
export async function stopDaemon(): Promise<void> {
|
|
721
|
+
if (daemonInstance) {
|
|
722
|
+
await daemonInstance.stop();
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
export default WorkerDaemon;
|