claude-flow-novice 2.15.10 → 2.16.0
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/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
- package/.claude/commands/cfn-loop-cli.md +158 -464
- package/.claude/commands/cfn-loop-trigger.md +114 -0
- package/.claude/hooks/cfn-invoke-post-edit-ts.sh +100 -0
- package/.claude/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
- package/.claude/hooks/cfn-invoke-post-edit.sh +22 -0
- package/.claude/hooks/cfn-invoke-post-edit.sh.backup +87 -0
- package/.claude/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
- package/.claude/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
- package/.claude/hooks/cfn-invoke-pre-edit.sh +22 -0
- package/.claude/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
- package/.claude/skills/cfn-agent-spawning/SKILL.md +48 -1
- package/.claude/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
- package/.claude/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
- package/.claude/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
- package/.claude/skills/{cfn-redis-coordination/check-dependencies.sh → cfn-agent-spawning/check-dependencies.sh.backup} +3 -5
- package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
- package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
- package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
- package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
- package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
- package/.claude/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
- package/.claude/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
- package/.claude/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
- package/.claude/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
- package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
- package/.claude/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
- package/.claude/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
- package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
- package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
- package/.claude/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
- package/.claude/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
- package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
- package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
- package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
- package/.claude/skills/cfn-loop-orchestration/SKILL.md +159 -48
- package/.claude/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
- package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
- package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
- package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
- package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
- package/.claude/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
- package/.claude/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
- package/.claude/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
- package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
- package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
- package/{claude-assets/skills/cfn-loop-orchestration → .claude/skills/cfn-loop-orchestration/archive/legacy-bash}/orchestrate-wrapper.sh +11 -1
- package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
- package/.claude/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
- package/.claude/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
- package/.claude/skills/cfn-loop-orchestration/package-lock.json +3 -0
- package/.claude/skills/cfn-loop-orchestration/package.json +4 -0
- package/.claude/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
- package/.claude/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
- package/.claude/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
- package/.claude/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
- package/.claude/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
- package/.claude/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
- package/.claude/skills/cfn-loop-orchestration/src/index.ts +2 -0
- package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
- package/.claude/skills/cfn-loop-orchestration/src/types.ts +56 -0
- package/.claude/skills/cfn-loop-orchestration/test-cli.sh +92 -0
- package/.claude/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
- package/.claude/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
- package/.claude/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
- package/.claude/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
- package/.claude/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
- package/.claude/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
- package/.claude/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
- package/.claude/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
- package/.claude/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
- package/.claude/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
- package/.claude/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
- package/.claude/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
- package/.claude/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
- package/.claude/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
- package/.claude/skills/cfn-loop-validation/INDEX.md +531 -0
- package/.claude/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
- package/.claude/skills/cfn-loop-validation/SKILL.md +48 -1
- package/.claude/skills/cfn-loop-validation/SKILL.md.backup +353 -0
- package/.claude/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
- package/.claude/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
- package/.claude/skills/cfn-loop-validation/check-dependencies.sh +22 -0
- package/{claude-assets/skills/cfn-redis-coordination/check-dependencies.sh → .claude/skills/cfn-loop-validation/check-dependencies.sh.backup} +4 -5
- package/.claude/skills/cfn-loop-validation/detect-vapor.sh +59 -0
- package/.claude/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
- package/.claude/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
- package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/types.d.ts +156 -0
- package/.claude/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/types.js +66 -0
- package/.claude/skills/cfn-loop-validation/dist/types.js.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
- package/.claude/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
- package/.claude/skills/cfn-loop-validation/dist/validator.js +411 -0
- package/.claude/skills/cfn-loop-validation/dist/validator.js.map +1 -0
- package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
- package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
- package/.claude/skills/cfn-loop-validation/package.json +93 -0
- package/.claude/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
- package/.claude/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
- package/.claude/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
- package/.claude/skills/cfn-loop-validation/src/types.ts +215 -0
- package/.claude/skills/cfn-loop-validation/src/validator.ts +503 -0
- package/.claude/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
- package/.claude/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
- package/.claude/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
- package/.claude/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
- package/.claude/skills/cfn-loop-validation/validate-gate.sh +63 -0
- package/.claude/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
- package/.claude/skills/cfn-loop-validation/validate-iteration.sh +22 -0
- package/.claude/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
- package/.claude/skills/cfn-product-owner-decision/SKILL.md +479 -147
- package/.claude/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
- package/{claude-assets/skills/cfn-product-owner-decision → .claude/skills/cfn-product-owner-decision/archive/legacy-bash}/execute-decision.sh +24 -2
- package/.claude/skills/pre-edit-backup/SKILL.md +324 -0
- package/.claude/skills/pre-edit-backup/SKILL.md.backup +277 -0
- package/.claude/skills/pre-edit-backup/backup.sh +22 -0
- package/.claude/skills/pre-edit-backup/backup.sh.backup +107 -0
- package/claude-assets/agents/cfn-dev-team/CLAUDE.md +9 -81
- package/claude-assets/agents/cfn-dev-team/architecture/base-template-generator.md +4 -4
- package/claude-assets/agents/cfn-dev-team/architecture/planner.md +4 -4
- package/claude-assets/agents/cfn-dev-team/architecture/system-architect.md +5 -5
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +1 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +1 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +1 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +1 -0
- package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +14 -4
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +63 -70
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +50 -70
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +13 -4
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +27 -58
- package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +40 -58
- package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +18 -20
- package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +19 -28
- package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +15 -19
- package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +15 -10
- package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +15 -10
- package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +15 -25
- package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +17 -21
- package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +17 -21
- package/claude-assets/agents/cfn-dev-team/product-owners/accessibility-advocate-persona.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/cto-agent.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/power-user-persona.md +4 -4
- package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +19 -27
- package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +20 -51
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +22 -71
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +21 -64
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +22 -67
- package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +23 -67
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +14 -70
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +25 -73
- package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +26 -65
- package/claude-assets/agents/cfn-dev-team/testers/e2e/playwright-tester.md +5 -5
- package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +27 -67
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +16 -73
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +27 -67
- package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +27 -60
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +15 -74
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +14 -60
- package/claude-assets/agents/cfn-dev-team/testers/unit/tdd-london-unit-swarm.md +5 -5
- package/claude-assets/agents/cfn-dev-team/testers/validation/validation-production-validator.md +4 -4
- package/claude-assets/agents/cfn-dev-team/testing/test-validation-agent.md +4 -4
- package/claude-assets/agents/cfn-dev-team/utility/agent-builder.md +16 -16
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +16 -32
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +17 -17
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +10 -5
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +12 -102
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +127 -814
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +16 -25
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +157 -667
- package/claude-assets/agents/custom/cfn-docker-expert.md +102 -0
- package/claude-assets/agents/custom/cfn-loops-cli-expert.md +129 -0
- package/claude-assets/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
- package/claude-assets/commands/cfn-loop-cli.md +158 -464
- package/claude-assets/commands/cfn-loop-trigger.md +114 -0
- package/claude-assets/hooks/SKILL.md +518 -0
- package/claude-assets/hooks/SKILL.md.backup +471 -0
- package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh +100 -0
- package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
- package/claude-assets/hooks/cfn-invoke-post-edit.sh +22 -0
- package/claude-assets/hooks/cfn-invoke-post-edit.sh.backup +87 -0
- package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
- package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
- package/claude-assets/hooks/cfn-invoke-pre-edit.sh +22 -0
- package/claude-assets/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/DELIVERABLES.md +409 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/IMPLEMENTATION_SUMMARY.md +396 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_GUIDE.md +308 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/QUICK_REFERENCE.md +239 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +107 -1
- package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md.backup +302 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/TYPESCRIPT_MIGRATION.md +295 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.cjs +297 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.js +297 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.cjs +96 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.js +96 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh +45 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh.backup +23 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +22 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh.backup +173 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.test.ts +357 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.ts +350 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/src/cli.ts +74 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +22 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh.backup +71 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/tsconfig.json +18 -0
- package/claude-assets/skills/cfn-agent-spawning/SKILL.md +48 -1
- package/claude-assets/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
- package/claude-assets/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
- package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh.backup +30 -0
- package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
- package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
- package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
- package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
- package/claude-assets/skills/cfn-coordination/agent-completion.sh.backup +36 -0
- package/claude-assets/skills/cfn-coordination/coordination-signal.sh.backup +36 -0
- package/claude-assets/skills/cfn-coordination/coordination-wait.sh.backup +36 -0
- package/claude-assets/skills/cfn-dependency-ingestion/README.md +101 -0
- package/claude-assets/skills/cfn-dependency-ingestion/SKILL.md +369 -0
- package/claude-assets/skills/cfn-dependency-ingestion/build.sh +23 -0
- package/claude-assets/skills/cfn-dependency-ingestion/dist/ingest-dependencies.js +478 -0
- package/claude-assets/skills/cfn-dependency-ingestion/ingest-dependencies.sh +295 -0
- package/claude-assets/skills/cfn-dependency-ingestion/src/ingest-dependencies.ts +563 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
- package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
- package/claude-assets/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
- package/claude-assets/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
- package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
- package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
- package/claude-assets/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
- package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
- package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
- package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
- package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
- package/claude-assets/skills/cfn-loop-orchestration/SKILL.md +159 -48
- package/claude-assets/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
- package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
- package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
- package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
- package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
- package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
- package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
- package/claude-assets/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
- package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
- package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
- package/{.claude/skills/cfn-loop-orchestration → claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash}/orchestrate-wrapper.sh +11 -1
- package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
- package/claude-assets/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
- package/claude-assets/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
- package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +3 -0
- package/claude-assets/skills/cfn-loop-orchestration/package.json +4 -0
- package/claude-assets/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +2 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
- package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +56 -0
- package/claude-assets/skills/cfn-loop-orchestration/test-cli.sh +92 -0
- package/claude-assets/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
- package/claude-assets/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
- package/claude-assets/skills/cfn-loop-output-processing/.eslintrc.json +33 -0
- package/claude-assets/skills/cfn-loop-output-processing/DELIVERY_SUMMARY.txt +462 -0
- package/claude-assets/skills/cfn-loop-output-processing/DEPRECATION_NOTICE.md +183 -0
- package/claude-assets/skills/cfn-loop-output-processing/EXAMPLES.md +609 -0
- package/claude-assets/skills/cfn-loop-output-processing/IMPLEMENTATION_SUMMARY.md +418 -0
- package/claude-assets/skills/cfn-loop-output-processing/INDEX.md +531 -0
- package/claude-assets/skills/cfn-loop-output-processing/MIGRATION.md +362 -0
- package/claude-assets/skills/cfn-loop-output-processing/README.md +114 -0
- package/claude-assets/skills/cfn-loop-output-processing/SKILL.md +633 -0
- package/{.claude/skills/cfn-docker-redis-coordination → claude-assets/skills/cfn-loop-output-processing}/jest.config.js +7 -15
- package/claude-assets/skills/cfn-loop-output-processing/package.json +50 -0
- package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop2.ts +195 -0
- package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop3.ts +157 -0
- package/claude-assets/skills/cfn-loop-output-processing/src/output-processor.ts +632 -0
- package/claude-assets/skills/cfn-loop-output-processing/tests/output-processor.test.ts +617 -0
- package/claude-assets/skills/{cfn-docker-redis-coordination → cfn-loop-output-processing}/tsconfig.json +16 -7
- package/claude-assets/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
- package/claude-assets/skills/cfn-loop-validation/INDEX.md +531 -0
- package/claude-assets/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
- package/claude-assets/skills/cfn-loop-validation/SKILL.md +48 -1
- package/claude-assets/skills/cfn-loop-validation/SKILL.md.backup +353 -0
- package/claude-assets/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
- package/claude-assets/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
- package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh +22 -0
- package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh.backup +31 -0
- package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh +59 -0
- package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
- package/claude-assets/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
- package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts +156 -0
- package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/types.js +66 -0
- package/claude-assets/skills/cfn-loop-validation/dist/types.js.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
- package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/dist/validator.js +411 -0
- package/claude-assets/skills/cfn-loop-validation/dist/validator.js.map +1 -0
- package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
- package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
- package/claude-assets/skills/cfn-loop-validation/package.json +93 -0
- package/claude-assets/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
- package/claude-assets/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
- package/claude-assets/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
- package/claude-assets/skills/cfn-loop-validation/src/types.ts +215 -0
- package/claude-assets/skills/cfn-loop-validation/src/validator.ts +503 -0
- package/claude-assets/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
- package/claude-assets/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
- package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
- package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
- package/claude-assets/skills/cfn-loop-validation/validate-gate.sh +63 -0
- package/claude-assets/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
- package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh +22 -0
- package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
- package/claude-assets/skills/cfn-product-owner-decision/SKILL.md +479 -147
- package/claude-assets/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
- package/{.claude/skills/cfn-product-owner-decision → claude-assets/skills/cfn-product-owner-decision/archive/legacy-bash}/execute-decision.sh +24 -2
- package/claude-assets/skills/cfn-provider-routing/README.md +129 -0
- package/claude-assets/skills/cfn-provider-routing/SKILL.md +192 -0
- package/claude-assets/skills/cfn-provider-routing/resolve-provider-model.ts +223 -0
- package/claude-assets/skills/pre-edit-backup/SKILL.md +324 -0
- package/claude-assets/skills/pre-edit-backup/SKILL.md.backup +277 -0
- package/claude-assets/skills/pre-edit-backup/backup.sh +22 -0
- package/claude-assets/skills/pre-edit-backup/backup.sh.backup +107 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/api/auth-endpoints.js +415 -0
- package/dist/api/auth-endpoints.js.map +1 -0
- package/dist/api/task-endpoints.js +562 -0
- package/dist/api/task-endpoints.js.map +1 -0
- package/dist/backend/server.js +418 -0
- package/dist/backend/server.js.map +1 -0
- package/dist/cfn-loop/product-owner/decision-parser.js +356 -0
- package/dist/cfn-loop/product-owner/decision-parser.js.map +1 -0
- package/dist/cfn-loop/product-owner/index.js +1 -0
- package/dist/cfn-loop/product-owner/index.js.map +1 -1
- package/dist/cli/agent-command.js +1 -1
- package/dist/cli/agent-command.js.map +1 -1
- package/dist/cli/agent-completion.js +273 -0
- package/dist/cli/agent-completion.js.map +1 -0
- package/dist/cli/agent-definition-parser.js +37 -4
- package/dist/cli/agent-definition-parser.js.map +1 -1
- package/dist/cli/agent-executor.js +32 -2
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-prompt-builder.js +83 -48
- package/dist/cli/agent-prompt-builder.js.map +1 -1
- package/dist/cli/agent-spawner.js +499 -0
- package/dist/cli/agent-spawner.js.map +1 -0
- package/dist/cli/anthropic-client.js +10 -3
- package/dist/cli/anthropic-client.js.map +1 -1
- package/dist/cli/config-manager.js.map +1 -1
- package/dist/cli/index.js +11 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/parse-decision-cli.js +268 -0
- package/dist/cli/parse-decision-cli.js.map +1 -0
- package/dist/cli/post-edit-hook.js +83 -0
- package/dist/cli/post-edit-hook.js.map +1 -0
- package/dist/cli/pre-edit-hook.js +77 -0
- package/dist/cli/pre-edit-hook.js.map +1 -0
- package/dist/cli/spawn-agent-cli.js +209 -0
- package/dist/cli/spawn-agent-cli.js.map +1 -0
- package/dist/coordination/coordination-wrapper.js +383 -0
- package/dist/coordination/coordination-wrapper.js.map +1 -0
- package/dist/coordination/store-success-criteria.js +68 -0
- package/dist/coordination/store-success-criteria.js.map +1 -0
- package/dist/coordination/store-task-context.js +65 -0
- package/dist/coordination/store-task-context.js.map +1 -0
- package/dist/hooks/backup-manager.js +273 -0
- package/dist/hooks/backup-manager.js.map +1 -0
- package/dist/hooks/post-edit-validator.js +388 -0
- package/dist/hooks/post-edit-validator.js.map +1 -0
- package/dist/integration/index.js +19 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/task-mode-adapter.js +297 -0
- package/dist/integration/task-mode-adapter.js.map +1 -0
- package/dist/integration/trigger-dev-client.js +253 -0
- package/dist/integration/trigger-dev-client.js.map +1 -0
- package/dist/integration/trigger-dev-webhooks.js +362 -0
- package/dist/integration/trigger-dev-webhooks.js.map +1 -0
- package/dist/lib/path-validator.js +14 -5
- package/dist/lib/path-validator.js.map +1 -1
- package/dist/lib/redis-queue-manager.js +5 -1
- package/dist/lib/redis-queue-manager.js.map +1 -1
- package/dist/middleware/authentication.js +317 -0
- package/dist/middleware/authentication.js.map +1 -0
- package/dist/services/authentication.js +669 -0
- package/dist/services/authentication.js.map +1 -0
- package/dist/services/session-management.js +436 -0
- package/dist/services/session-management.js.map +1 -0
- package/dist/services/skill-deployment.js +8 -6
- package/dist/services/skill-deployment.js.map +1 -1
- package/dist/services/user-service.js +710 -0
- package/dist/services/user-service.js.map +1 -0
- package/dist/types/trigger-dev-events.d.js +10 -0
- package/dist/types/trigger-dev-events.d.js.map +1 -0
- package/docs/README.md +240 -0
- package/package.json +13 -4
- package/scripts/compare-workflow-performance.sh +556 -0
- package/scripts/migrate-to-optimized-workflows.sh +438 -0
- package/scripts/organize-docs.sh +338 -0
- package/scripts/trigger-dev-setup.sh +267 -0
- package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
- package/.claude/skills/cfn-docker-redis-coordination/README.md +0 -294
- package/.claude/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
- package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
- package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
- package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
- package/.claude/skills/cfn-docker-redis-coordination/package.json +0 -40
- package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
- package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
- package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
- package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
- package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +0 -30
- package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
- package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
- package/.claude/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
- package/.claude/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
- package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
- package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
- package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
- package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
- package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
- package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
- package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
- package/.claude/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
- package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
- package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
- package/.claude/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
- package/.claude/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
- package/.claude/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
- package/.claude/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
- package/.claude/skills/cfn-redis-coordination/config.json +0 -61
- package/.claude/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
- package/.claude/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
- package/.claude/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
- package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
- package/.claude/skills/cfn-redis-coordination/jest.config.js +0 -23
- package/.claude/skills/cfn-redis-coordination/package-lock.json +0 -5272
- package/.claude/skills/cfn-redis-coordination/package.json +0 -45
- package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
- package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
- package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
- package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
- package/.claude/skills/cfn-redis-coordination/src/index.ts +0 -82
- package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
- package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
- package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
- package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
- package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
- package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
- package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
- package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
- package/.claude/skills/cfn-redis-coordination/src/types.ts +0 -235
- package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
- package/.claude/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
- package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
- package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
- package/.claude/skills/cfn-redis-coordination/test-redis-check.js +0 -84
- package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
- package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
- package/.claude/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +0 -976
- package/claude-assets/agents/typescript-specialist.md +0 -280
- package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
- package/claude-assets/skills/cfn-docker-redis-coordination/README.md +0 -294
- package/claude-assets/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
- package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
- package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
- package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +0 -37
- package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
- package/claude-assets/skills/cfn-docker-redis-coordination/package.json +0 -40
- package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
- package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
- package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
- package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
- package/claude-assets/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
- package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
- package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
- package/claude-assets/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
- package/claude-assets/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
- package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
- package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
- package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
- package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
- package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
- package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
- package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
- package/claude-assets/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
- package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
- package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
- package/claude-assets/skills/cfn-redis-cleanup/cleanup-redis.sh +0 -130
- package/claude-assets/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
- package/claude-assets/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
- package/claude-assets/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
- package/claude-assets/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
- package/claude-assets/skills/cfn-redis-coordination/config.json +0 -61
- package/claude-assets/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
- package/claude-assets/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
- package/claude-assets/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
- package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
- package/claude-assets/skills/cfn-redis-coordination/jest.config.js +0 -23
- package/claude-assets/skills/cfn-redis-coordination/package-lock.json +0 -5272
- package/claude-assets/skills/cfn-redis-coordination/package.json +0 -45
- package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
- package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
- package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
- package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
- package/claude-assets/skills/cfn-redis-coordination/src/index.ts +0 -82
- package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
- package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
- package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
- package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
- package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
- package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
- package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
- package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
- package/claude-assets/skills/cfn-redis-coordination/src/types.ts +0 -235
- package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
- package/claude-assets/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
- package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
- package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
- package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +0 -84
- package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
- package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
- package/claude-assets/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
- package/claude-assets/skills/cfn-redis-data-extraction/SKILL.md +0 -442
- package/claude-assets/skills/cfn-redis-data-extraction/extract.sh +0 -306
- package/dist/coordination/index.js +0 -25
- package/dist/coordination/index.js.map +0 -1
- package/docs/BUG_19_MEMORY_LEAK_TASK_MODE.md +0 -405
- package/docs/MEMORY_CLEANUP_GUIDE.md +0 -358
- package/docs/MEMORY_LEAK_FIX_SUMMARY.md +0 -322
- package/docs/REDIS_CLEANUP_EXECUTIVE_SUMMARY.md +0 -319
- package/docs/REDIS_CLEANUP_VERIFICATION_REPORT.md +0 -574
- /package/.claude/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
- /package/.claude/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
- /package/.claude/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
- /package/claude-assets/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
- /package/claude-assets/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
|
@@ -1,788 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Comprehensive test suite for Redis coordination modules
|
|
3
|
-
*
|
|
4
|
-
* Tests cover:
|
|
5
|
-
* - Task Mode (Redis stubbed)
|
|
6
|
-
* - CLI Mode (Redis active)
|
|
7
|
-
* - Error scenarios
|
|
8
|
-
* - Input validation
|
|
9
|
-
* - Module integration
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
ContextManager,
|
|
14
|
-
CompletionReporter,
|
|
15
|
-
ResultCollector,
|
|
16
|
-
WaitingCoordinator,
|
|
17
|
-
SwarmManager,
|
|
18
|
-
AgentRecoveryManager,
|
|
19
|
-
TaskAnalyzer,
|
|
20
|
-
TaskExecutor,
|
|
21
|
-
AgentLogger,
|
|
22
|
-
RedisCoordinator,
|
|
23
|
-
CoordinationError,
|
|
24
|
-
CoordinationErrorType,
|
|
25
|
-
validateTaskId,
|
|
26
|
-
validateAgentId,
|
|
27
|
-
validateConfidence,
|
|
28
|
-
isValidTaskId,
|
|
29
|
-
isValidAgentId,
|
|
30
|
-
isValidConfidence
|
|
31
|
-
} from '../src/index';
|
|
32
|
-
import { ConsoleLogger } from '../src/mode-detector';
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Test utilities
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
// Mock Redis client
|
|
39
|
-
class MockRedisClient {
|
|
40
|
-
private data: Record<string, any> = {};
|
|
41
|
-
private lists: Record<string, any[]> = {};
|
|
42
|
-
private sets: Record<string, Set<string>> = {};
|
|
43
|
-
private sortedSets: Record<string, Array<[string, number]>> = {};
|
|
44
|
-
|
|
45
|
-
async set(key: string, value: string): Promise<string | null> {
|
|
46
|
-
this.data[key] = value;
|
|
47
|
-
return 'OK';
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
async get(key: string): Promise<string | null> {
|
|
51
|
-
return this.data[key] || null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async hset(key: string, ...args: any[]): Promise<number> {
|
|
55
|
-
if (!this.data[key]) {
|
|
56
|
-
this.data[key] = {};
|
|
57
|
-
}
|
|
58
|
-
for (let i = 0; i < args.length; i += 2) {
|
|
59
|
-
this.data[key][args[i]] = args[i + 1];
|
|
60
|
-
}
|
|
61
|
-
return args.length / 2;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
async hgetall(key: string): Promise<Record<string, string> | null> {
|
|
65
|
-
return this.data[key] || {};
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
async hget(key: string, field: string): Promise<string | null> {
|
|
69
|
-
return this.data[key]?.[field] || null;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async del(...keys: string[]): Promise<number> {
|
|
73
|
-
let count = 0;
|
|
74
|
-
for (const key of keys) {
|
|
75
|
-
if (this.data[key]) {
|
|
76
|
-
delete this.data[key];
|
|
77
|
-
count++;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return count;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
async expire(key: string, seconds: number): Promise<number> {
|
|
84
|
-
return this.data[key] ? 1 : 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
async exists(key: string): Promise<number> {
|
|
88
|
-
return this.data[key] ? 1 : 0;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
async lpush(key: string, ...values: string[]): Promise<number> {
|
|
92
|
-
if (!this.lists[key]) {
|
|
93
|
-
this.lists[key] = [];
|
|
94
|
-
}
|
|
95
|
-
this.lists[key].unshift(...values);
|
|
96
|
-
return this.lists[key].length;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
async blpop(...args: any[]): Promise<[string, string] | null> {
|
|
100
|
-
const keys = args.slice(0, -1);
|
|
101
|
-
for (const key of keys) {
|
|
102
|
-
if (this.lists[key]?.length > 0) {
|
|
103
|
-
const value = this.lists[key].shift();
|
|
104
|
-
return [key, value];
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return null;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async lrange(key: string, start: number, stop: number): Promise<string[]> {
|
|
111
|
-
if (!this.lists[key]) return [];
|
|
112
|
-
return this.lists[key].slice(start, stop + 1);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
async zadd(key: string, ...args: string[]): Promise<number> {
|
|
116
|
-
if (!this.sortedSets[key]) {
|
|
117
|
-
this.sortedSets[key] = [];
|
|
118
|
-
}
|
|
119
|
-
for (let i = 0; i < args.length; i += 2) {
|
|
120
|
-
const score = parseFloat(args[i]);
|
|
121
|
-
const member = args[i + 1];
|
|
122
|
-
this.sortedSets[key].push([member, score]);
|
|
123
|
-
}
|
|
124
|
-
return args.length / 2;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
async zrevrange(key: string, start: number, stop: number): Promise<string[]> {
|
|
128
|
-
if (!this.sortedSets[key]) return [];
|
|
129
|
-
const sorted = [...this.sortedSets[key]].sort((a, b) => b[1] - a[1]);
|
|
130
|
-
return sorted.slice(start, stop + 1).map(([member]) => member);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
async zrange(key: string, start: number, stop: number): Promise<string[]> {
|
|
134
|
-
if (!this.sortedSets[key]) return [];
|
|
135
|
-
return this.sortedSets[key].slice(start, stop + 1).map(([member]) => member);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
async zrem(key: string, member: string): Promise<number> {
|
|
139
|
-
if (!this.sortedSets[key]) return 0;
|
|
140
|
-
const before = this.sortedSets[key].length;
|
|
141
|
-
this.sortedSets[key] = this.sortedSets[key].filter(([m]) => m !== member);
|
|
142
|
-
return before - this.sortedSets[key].length;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
async publish(channel: string, message: string): Promise<number> {
|
|
146
|
-
return 1;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
async sadd(key: string, ...members: string[]): Promise<number> {
|
|
150
|
-
if (!this.sets[key]) {
|
|
151
|
-
this.sets[key] = new Set();
|
|
152
|
-
}
|
|
153
|
-
let count = 0;
|
|
154
|
-
for (const member of members) {
|
|
155
|
-
if (!this.sets[key].has(member)) {
|
|
156
|
-
this.sets[key].add(member);
|
|
157
|
-
count++;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return count;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
async smembers(key: string): Promise<string[]> {
|
|
164
|
-
return Array.from(this.sets[key] || new Set());
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
async quit(): Promise<void> {
|
|
168
|
-
// Mock quit
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Test suite
|
|
174
|
-
*/
|
|
175
|
-
|
|
176
|
-
describe('Redis Coordination - Validation', () => {
|
|
177
|
-
describe('Type validators', () => {
|
|
178
|
-
it('should validate task IDs', () => {
|
|
179
|
-
expect(isValidTaskId('task-123')).toBe(true);
|
|
180
|
-
expect(isValidTaskId('task_abc')).toBe(true);
|
|
181
|
-
expect(isValidTaskId('')).toBe(false);
|
|
182
|
-
expect(isValidTaskId('a'.repeat(300))).toBe(false);
|
|
183
|
-
expect(isValidTaskId('task@invalid')).toBe(false);
|
|
184
|
-
});
|
|
185
|
-
|
|
186
|
-
it('should validate agent IDs', () => {
|
|
187
|
-
expect(isValidAgentId('agent-1')).toBe(true);
|
|
188
|
-
expect(isValidAgentId('backend_dev')).toBe(true);
|
|
189
|
-
expect(isValidAgentId('')).toBe(false);
|
|
190
|
-
expect(isValidAgentId('a'.repeat(300))).toBe(false);
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
it('should validate confidence scores', () => {
|
|
194
|
-
expect(isValidConfidence(0.5)).toBe(true);
|
|
195
|
-
expect(isValidConfidence(0.0)).toBe(true);
|
|
196
|
-
expect(isValidConfidence(1.0)).toBe(true);
|
|
197
|
-
expect(isValidConfidence(-0.1)).toBe(false);
|
|
198
|
-
expect(isValidConfidence(1.1)).toBe(false);
|
|
199
|
-
expect(isValidConfidence('0.5' as any)).toBe(false);
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
it('should throw on invalid task ID', () => {
|
|
203
|
-
expect(() => validateTaskId('invalid@')).toThrow(CoordinationError);
|
|
204
|
-
});
|
|
205
|
-
|
|
206
|
-
it('should throw on invalid agent ID', () => {
|
|
207
|
-
expect(() => validateAgentId('invalid@')).toThrow(CoordinationError);
|
|
208
|
-
});
|
|
209
|
-
|
|
210
|
-
it('should throw on invalid confidence', () => {
|
|
211
|
-
expect(() => validateConfidence(1.5)).toThrow(CoordinationError);
|
|
212
|
-
});
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
describe('Context Manager', () => {
|
|
217
|
-
let manager: ContextManager;
|
|
218
|
-
let redis: RedisCoordinator;
|
|
219
|
-
let logger: ConsoleLogger;
|
|
220
|
-
|
|
221
|
-
beforeEach(async () => {
|
|
222
|
-
redis = new RedisCoordinator();
|
|
223
|
-
logger = new ConsoleLogger('[Test]');
|
|
224
|
-
// Mock mode as CLI for most tests
|
|
225
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
226
|
-
manager = new ContextManager(redis, logger);
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
it('should store and retrieve context', async () => {
|
|
230
|
-
const taskId = 'task-123' as any;
|
|
231
|
-
const context = {
|
|
232
|
-
taskId,
|
|
233
|
-
epic: 'Test task',
|
|
234
|
-
deliverables: ['file1.ts', 'file2.ts'],
|
|
235
|
-
mode: 'standard' as const
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
// In real tests, would use actual Redis
|
|
239
|
-
// For now, just validate the manager is initialized
|
|
240
|
-
expect(manager).toBeDefined();
|
|
241
|
-
});
|
|
242
|
-
|
|
243
|
-
it('should validate context structure', () => {
|
|
244
|
-
const context = {
|
|
245
|
-
taskId: 'task-123' as any,
|
|
246
|
-
epic: 'Test',
|
|
247
|
-
deliverables: ['a', 'b']
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
const result = manager.validateContext(context);
|
|
251
|
-
expect(result.valid).toBe(true);
|
|
252
|
-
expect(result.errors).toHaveLength(0);
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
it('should reject invalid context', () => {
|
|
256
|
-
const context = {
|
|
257
|
-
taskId: 'invalid@' as any,
|
|
258
|
-
deliverables: 'not-an-array' as any
|
|
259
|
-
};
|
|
260
|
-
|
|
261
|
-
const result = manager.validateContext(context);
|
|
262
|
-
expect(result.valid).toBe(false);
|
|
263
|
-
expect(result.errors.length).toBeGreaterThan(0);
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
it('should handle Task Mode gracefully', async () => {
|
|
267
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
268
|
-
|
|
269
|
-
const taskId = 'task-456' as any;
|
|
270
|
-
const context = {
|
|
271
|
-
taskId,
|
|
272
|
-
epic: 'Task mode test'
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
// Should not throw in Task Mode
|
|
276
|
-
await expect(manager.storeContext(taskId, context)).resolves.not.toThrow();
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
|
|
280
|
-
describe('Completion Reporter', () => {
|
|
281
|
-
let reporter: CompletionReporter;
|
|
282
|
-
let redis: RedisCoordinator;
|
|
283
|
-
let logger: ConsoleLogger;
|
|
284
|
-
|
|
285
|
-
beforeEach(async () => {
|
|
286
|
-
redis = new RedisCoordinator();
|
|
287
|
-
logger = new ConsoleLogger('[Test]');
|
|
288
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
289
|
-
reporter = new CompletionReporter(redis, logger);
|
|
290
|
-
});
|
|
291
|
-
|
|
292
|
-
it('should validate confidence range', async () => {
|
|
293
|
-
const taskId = 'task-123' as any;
|
|
294
|
-
const agentId = 'agent-1' as any;
|
|
295
|
-
|
|
296
|
-
await expect(
|
|
297
|
-
reporter.reportCompletion(taskId, agentId, 1.5)
|
|
298
|
-
).rejects.toThrow(CoordinationError);
|
|
299
|
-
});
|
|
300
|
-
|
|
301
|
-
it('should reject invalid task ID', async () => {
|
|
302
|
-
await expect(
|
|
303
|
-
reporter.reportCompletion('invalid@' as any, 'agent-1' as any, 0.8)
|
|
304
|
-
).rejects.toThrow(CoordinationError);
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
it('should reject invalid agent ID', async () => {
|
|
308
|
-
await expect(
|
|
309
|
-
reporter.reportCompletion('task-123' as any, 'invalid@' as any, 0.8)
|
|
310
|
-
).rejects.toThrow(CoordinationError);
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
it('should handle Task Mode gracefully', async () => {
|
|
314
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
315
|
-
|
|
316
|
-
const taskId = 'task-123' as any;
|
|
317
|
-
const agentId = 'agent-1' as any;
|
|
318
|
-
|
|
319
|
-
// Should not throw in Task Mode
|
|
320
|
-
await expect(
|
|
321
|
-
reporter.reportCompletion(taskId, agentId, 0.85)
|
|
322
|
-
).resolves.not.toThrow();
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
it('should report test results with valid pass rate', async () => {
|
|
326
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
327
|
-
|
|
328
|
-
const taskId = 'task-123' as any;
|
|
329
|
-
const agentId = 'agent-1' as any;
|
|
330
|
-
const results = {
|
|
331
|
-
pass: 45,
|
|
332
|
-
fail: 5,
|
|
333
|
-
total: 50,
|
|
334
|
-
passRate: 0.9,
|
|
335
|
-
timestamp: new Date().toISOString()
|
|
336
|
-
};
|
|
337
|
-
|
|
338
|
-
// Should not throw in Task Mode
|
|
339
|
-
await expect(
|
|
340
|
-
reporter.reportTestResults(taskId, agentId, results)
|
|
341
|
-
).resolves.not.toThrow();
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
it('should reject invalid pass rate', async () => {
|
|
345
|
-
const taskId = 'task-123' as any;
|
|
346
|
-
const agentId = 'agent-1' as any;
|
|
347
|
-
const results = {
|
|
348
|
-
pass: 45,
|
|
349
|
-
fail: 5,
|
|
350
|
-
total: 50,
|
|
351
|
-
passRate: 1.5, // Invalid
|
|
352
|
-
timestamp: new Date().toISOString()
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
await expect(
|
|
356
|
-
reporter.reportTestResults(taskId, agentId, results)
|
|
357
|
-
).rejects.toThrow(CoordinationError);
|
|
358
|
-
});
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
describe('Result Collector', () => {
|
|
362
|
-
let collector: ResultCollector;
|
|
363
|
-
let redis: RedisCoordinator;
|
|
364
|
-
let logger: ConsoleLogger;
|
|
365
|
-
|
|
366
|
-
beforeEach(async () => {
|
|
367
|
-
redis = new RedisCoordinator();
|
|
368
|
-
logger = new ConsoleLogger('[Test]');
|
|
369
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
370
|
-
collector = new ResultCollector(redis, logger);
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
it('should aggregate confidence scores', () => {
|
|
374
|
-
const results = [
|
|
375
|
-
{ agentId: 'agent-1' as any, confidence: 0.8 },
|
|
376
|
-
{ agentId: 'agent-2' as any, confidence: 0.9 },
|
|
377
|
-
{ agentId: 'agent-3' as any, confidence: 0.7 }
|
|
378
|
-
];
|
|
379
|
-
|
|
380
|
-
const aggregated = collector.aggregateScores(results);
|
|
381
|
-
|
|
382
|
-
expect(aggregated.agentCount).toBe(3);
|
|
383
|
-
expect(aggregated.avgConfidence).toBeCloseTo(0.8, 1);
|
|
384
|
-
expect(aggregated.minConfidence).toBe(0.7);
|
|
385
|
-
expect(aggregated.maxConfidence).toBe(0.9);
|
|
386
|
-
expect(aggregated.consensus).toBeGreaterThan(0);
|
|
387
|
-
expect(aggregated.consensus).toBeLessThanOrEqual(1);
|
|
388
|
-
});
|
|
389
|
-
|
|
390
|
-
it('should reject empty scores array', () => {
|
|
391
|
-
expect(() => collector.aggregateScores([])).toThrow(CoordinationError);
|
|
392
|
-
});
|
|
393
|
-
|
|
394
|
-
it('should return empty results in Task Mode', async () => {
|
|
395
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
396
|
-
|
|
397
|
-
const taskId = 'task-123' as any;
|
|
398
|
-
const agentIds = ['agent-1' as any, 'agent-2' as any];
|
|
399
|
-
|
|
400
|
-
const results = await collector.collectResults(taskId, agentIds);
|
|
401
|
-
expect(results).toEqual([]);
|
|
402
|
-
});
|
|
403
|
-
});
|
|
404
|
-
|
|
405
|
-
describe('Waiting Coordinator', () => {
|
|
406
|
-
let coordinator: WaitingCoordinator;
|
|
407
|
-
let redis: RedisCoordinator;
|
|
408
|
-
let logger: ConsoleLogger;
|
|
409
|
-
|
|
410
|
-
beforeEach(async () => {
|
|
411
|
-
redis = new RedisCoordinator();
|
|
412
|
-
logger = new ConsoleLogger('[Test]');
|
|
413
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
414
|
-
coordinator = new WaitingCoordinator(redis, logger);
|
|
415
|
-
});
|
|
416
|
-
|
|
417
|
-
it('should validate task ID for wait operations', async () => {
|
|
418
|
-
await expect(
|
|
419
|
-
coordinator.waitForCompletion('invalid@' as any, 'agent-1' as any, 10)
|
|
420
|
-
).rejects.toThrow(CoordinationError);
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
it('should validate agent ID for wait operations', async () => {
|
|
424
|
-
await expect(
|
|
425
|
-
coordinator.waitForCompletion('task-123' as any, 'invalid@' as any, 10)
|
|
426
|
-
).rejects.toThrow(CoordinationError);
|
|
427
|
-
});
|
|
428
|
-
|
|
429
|
-
it('should handle Task Mode gracefully', async () => {
|
|
430
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
431
|
-
|
|
432
|
-
const result = await coordinator.waitForCompletion(
|
|
433
|
-
'task-123' as any,
|
|
434
|
-
'agent-1' as any,
|
|
435
|
-
10
|
|
436
|
-
);
|
|
437
|
-
|
|
438
|
-
expect(result.met).toBe(true);
|
|
439
|
-
expect(result.timedOut).toBe(false);
|
|
440
|
-
expect(result.waitedMs).toBe(0);
|
|
441
|
-
});
|
|
442
|
-
|
|
443
|
-
it('should validate condition name', async () => {
|
|
444
|
-
await expect(
|
|
445
|
-
coordinator.waitForCondition('task-123' as any, '', 10)
|
|
446
|
-
).rejects.toThrow(CoordinationError);
|
|
447
|
-
});
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
describe('Swarm Manager', () => {
|
|
451
|
-
let manager: SwarmManager;
|
|
452
|
-
let redis: RedisCoordinator;
|
|
453
|
-
let logger: ConsoleLogger;
|
|
454
|
-
|
|
455
|
-
beforeEach(async () => {
|
|
456
|
-
redis = new RedisCoordinator();
|
|
457
|
-
logger = new ConsoleLogger('[Test]');
|
|
458
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
459
|
-
manager = new SwarmManager(redis, logger);
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
it('should reject invalid task ID', async () => {
|
|
463
|
-
await expect(
|
|
464
|
-
manager.createSwarm('invalid@' as any)
|
|
465
|
-
).rejects.toThrow(CoordinationError);
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
it('should handle Task Mode gracefully', async () => {
|
|
469
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
470
|
-
|
|
471
|
-
const taskId = 'task-123' as any;
|
|
472
|
-
|
|
473
|
-
await expect(manager.createSwarm(taskId)).resolves.not.toThrow();
|
|
474
|
-
await expect(manager.completeSwarm(taskId)).resolves.not.toThrow();
|
|
475
|
-
await expect(
|
|
476
|
-
manager.cancelSwarm(taskId, 'test')
|
|
477
|
-
).resolves.not.toThrow();
|
|
478
|
-
});
|
|
479
|
-
|
|
480
|
-
it('should return false for non-cancelled swarm in Task Mode', async () => {
|
|
481
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
482
|
-
|
|
483
|
-
const taskId = 'task-123' as any;
|
|
484
|
-
const cancelled = await manager.isSwarmCancelled(taskId);
|
|
485
|
-
|
|
486
|
-
expect(cancelled).toBe(false);
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
|
|
490
|
-
describe('Agent Recovery Manager', () => {
|
|
491
|
-
let manager: AgentRecoveryManager;
|
|
492
|
-
let redis: RedisCoordinator;
|
|
493
|
-
let logger: ConsoleLogger;
|
|
494
|
-
|
|
495
|
-
beforeEach(async () => {
|
|
496
|
-
redis = new RedisCoordinator();
|
|
497
|
-
logger = new ConsoleLogger('[Test]');
|
|
498
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
499
|
-
manager = new AgentRecoveryManager(redis, logger);
|
|
500
|
-
});
|
|
501
|
-
|
|
502
|
-
it('should validate task and agent IDs', async () => {
|
|
503
|
-
await expect(
|
|
504
|
-
manager.recordHeartbeat('invalid@' as any, 'agent-1' as any)
|
|
505
|
-
).rejects.toThrow(CoordinationError);
|
|
506
|
-
|
|
507
|
-
await expect(
|
|
508
|
-
manager.recordHeartbeat('task-123' as any, 'invalid@' as any)
|
|
509
|
-
).rejects.toThrow(CoordinationError);
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
it('should handle Task Mode heartbeat gracefully', async () => {
|
|
513
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
514
|
-
|
|
515
|
-
const taskId = 'task-123' as any;
|
|
516
|
-
const agentId = 'agent-1' as any;
|
|
517
|
-
|
|
518
|
-
// Should not throw
|
|
519
|
-
await expect(manager.recordHeartbeat(taskId, agentId)).resolves.not.toThrow();
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
it('should return healthy status for Task Mode agents', async () => {
|
|
523
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
524
|
-
|
|
525
|
-
const health = await manager.checkAgentHealth(
|
|
526
|
-
'task-123' as any,
|
|
527
|
-
'agent-1' as any
|
|
528
|
-
);
|
|
529
|
-
|
|
530
|
-
expect(health.status).toBe('healthy');
|
|
531
|
-
});
|
|
532
|
-
});
|
|
533
|
-
|
|
534
|
-
describe('Task Analyzer', () => {
|
|
535
|
-
let analyzer: TaskAnalyzer;
|
|
536
|
-
let redis: RedisCoordinator;
|
|
537
|
-
let logger: ConsoleLogger;
|
|
538
|
-
|
|
539
|
-
beforeEach(async () => {
|
|
540
|
-
redis = new RedisCoordinator();
|
|
541
|
-
logger = new ConsoleLogger('[Test]');
|
|
542
|
-
analyzer = new TaskAnalyzer(redis, logger);
|
|
543
|
-
});
|
|
544
|
-
|
|
545
|
-
it('should reject empty task description', () => {
|
|
546
|
-
expect(() => analyzer.analyzeComplexity('')).toThrow(CoordinationError);
|
|
547
|
-
expect(() => analyzer.analyzeComplexity(' ')).toThrow(CoordinationError);
|
|
548
|
-
});
|
|
549
|
-
|
|
550
|
-
it('should analyze simple task', () => {
|
|
551
|
-
const analysis = analyzer.analyzeComplexity('Fix typo');
|
|
552
|
-
|
|
553
|
-
expect(analysis.complexityScore).toBeLessThan(10);
|
|
554
|
-
expect(analysis.difficulty).toBe('simple');
|
|
555
|
-
expect(analysis.suggestedAgents.loop3Count).toBeGreaterThan(0);
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
it('should analyze complex multi-domain task', () => {
|
|
559
|
-
const analysis = analyzer.analyzeComplexity(
|
|
560
|
-
'Build React dashboard with PostgreSQL backend, Docker deployment, and JWT authentication'
|
|
561
|
-
);
|
|
562
|
-
|
|
563
|
-
expect(analysis.complexityScore).toBeGreaterThan(5);
|
|
564
|
-
expect(analysis.domains.length).toBeGreaterThan(1);
|
|
565
|
-
});
|
|
566
|
-
|
|
567
|
-
it('should calculate priority score', () => {
|
|
568
|
-
const analysis = analyzer.analyzeComplexity('Implement authentication system');
|
|
569
|
-
const priority = analyzer.calculatePriority(analysis);
|
|
570
|
-
|
|
571
|
-
expect(priority).toBeGreaterThan(0);
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
it('should suggest appropriate execution mode', () => {
|
|
575
|
-
const simple = analyzer.analyzeComplexity('Fix small bug');
|
|
576
|
-
expect(analyzer.suggestMode(simple)).toBe('mvp');
|
|
577
|
-
|
|
578
|
-
const complex = analyzer.analyzeComplexity(
|
|
579
|
-
'Enterprise multi-tenant distributed system with ML integration and compliance requirements'
|
|
580
|
-
);
|
|
581
|
-
expect(analyzer.suggestMode(complex)).toBe('enterprise');
|
|
582
|
-
});
|
|
583
|
-
});
|
|
584
|
-
|
|
585
|
-
describe('Task Executor', () => {
|
|
586
|
-
let executor: TaskExecutor;
|
|
587
|
-
let redis: RedisCoordinator;
|
|
588
|
-
let logger: ConsoleLogger;
|
|
589
|
-
|
|
590
|
-
beforeEach(async () => {
|
|
591
|
-
redis = new RedisCoordinator();
|
|
592
|
-
logger = new ConsoleLogger('[Test]');
|
|
593
|
-
executor = new TaskExecutor(redis, logger);
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
it('should validate execution config', () => {
|
|
597
|
-
const validConfig = {
|
|
598
|
-
taskId: 'task-123' as any,
|
|
599
|
-
taskDescription: 'Build feature X'
|
|
600
|
-
};
|
|
601
|
-
|
|
602
|
-
const result = executor.validateConfig(validConfig);
|
|
603
|
-
expect(result.valid).toBe(true);
|
|
604
|
-
expect(result.errors).toHaveLength(0);
|
|
605
|
-
});
|
|
606
|
-
|
|
607
|
-
it('should reject invalid task ID', () => {
|
|
608
|
-
const config = {
|
|
609
|
-
taskId: 'invalid@' as any,
|
|
610
|
-
taskDescription: 'Build feature'
|
|
611
|
-
};
|
|
612
|
-
|
|
613
|
-
const result = executor.validateConfig(config);
|
|
614
|
-
expect(result.valid).toBe(false);
|
|
615
|
-
});
|
|
616
|
-
|
|
617
|
-
it('should reject empty task description', () => {
|
|
618
|
-
const config = {
|
|
619
|
-
taskId: 'task-123' as any,
|
|
620
|
-
taskDescription: ''
|
|
621
|
-
};
|
|
622
|
-
|
|
623
|
-
const result = executor.validateConfig(config);
|
|
624
|
-
expect(result.valid).toBe(false);
|
|
625
|
-
});
|
|
626
|
-
|
|
627
|
-
it('should reject invalid iteration count', () => {
|
|
628
|
-
const config = {
|
|
629
|
-
taskId: 'task-123' as any,
|
|
630
|
-
taskDescription: 'Build feature',
|
|
631
|
-
maxIterations: 100
|
|
632
|
-
};
|
|
633
|
-
|
|
634
|
-
const result = executor.validateConfig(config);
|
|
635
|
-
expect(result.valid).toBe(false);
|
|
636
|
-
});
|
|
637
|
-
});
|
|
638
|
-
|
|
639
|
-
describe('Agent Logger', () => {
|
|
640
|
-
let logger: AgentLogger;
|
|
641
|
-
let redis: RedisCoordinator;
|
|
642
|
-
let baseLogger: ConsoleLogger;
|
|
643
|
-
|
|
644
|
-
beforeEach(async () => {
|
|
645
|
-
redis = new RedisCoordinator();
|
|
646
|
-
baseLogger = new ConsoleLogger('[Test]');
|
|
647
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
648
|
-
logger = new AgentLogger('task-123' as any, 'agent-1' as any, redis, baseLogger);
|
|
649
|
-
});
|
|
650
|
-
|
|
651
|
-
it('should accept valid task and agent IDs', () => {
|
|
652
|
-
expect(logger).toBeDefined();
|
|
653
|
-
});
|
|
654
|
-
|
|
655
|
-
it('should reject invalid task ID in constructor', () => {
|
|
656
|
-
expect(
|
|
657
|
-
() => new AgentLogger('invalid@' as any, 'agent-1' as any, redis, baseLogger)
|
|
658
|
-
).toThrow(CoordinationError);
|
|
659
|
-
});
|
|
660
|
-
|
|
661
|
-
it('should reject invalid agent ID in constructor', () => {
|
|
662
|
-
expect(
|
|
663
|
-
() => new AgentLogger('task-123' as any, 'invalid@' as any, redis, baseLogger)
|
|
664
|
-
).toThrow(CoordinationError);
|
|
665
|
-
});
|
|
666
|
-
|
|
667
|
-
it('should log messages without throwing', () => {
|
|
668
|
-
expect(() => {
|
|
669
|
-
logger.info('Test message');
|
|
670
|
-
logger.warn('Warning message');
|
|
671
|
-
logger.debug('Debug message');
|
|
672
|
-
}).not.toThrow();
|
|
673
|
-
});
|
|
674
|
-
});
|
|
675
|
-
|
|
676
|
-
describe('Integration scenarios', () => {
|
|
677
|
-
it('should coordinate full agent lifecycle', async () => {
|
|
678
|
-
const redis = new RedisCoordinator();
|
|
679
|
-
const logger = new ConsoleLogger('[Integration]');
|
|
680
|
-
|
|
681
|
-
// Task Mode: graceful no-op behavior
|
|
682
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
683
|
-
|
|
684
|
-
const context = new ContextManager(redis, logger);
|
|
685
|
-
const completion = new CompletionReporter(redis, logger);
|
|
686
|
-
const recovery = new AgentRecoveryManager(redis, logger);
|
|
687
|
-
|
|
688
|
-
const taskId = 'integration-test' as any;
|
|
689
|
-
const agentId = 'test-agent' as any;
|
|
690
|
-
|
|
691
|
-
// Agent starts work (Task Mode no-op)
|
|
692
|
-
await expect(
|
|
693
|
-
recovery.recordHeartbeat(taskId, agentId, 12345)
|
|
694
|
-
).resolves.not.toThrow();
|
|
695
|
-
|
|
696
|
-
// Agent completes (Task Mode no-op)
|
|
697
|
-
await expect(
|
|
698
|
-
completion.reportCompletion(taskId, agentId, 0.92)
|
|
699
|
-
).resolves.not.toThrow();
|
|
700
|
-
|
|
701
|
-
// Verify context was handled correctly
|
|
702
|
-
expect(context).toBeDefined();
|
|
703
|
-
});
|
|
704
|
-
|
|
705
|
-
it('should handle simultaneous multi-agent coordination', async () => {
|
|
706
|
-
const redis = new RedisCoordinator();
|
|
707
|
-
const logger = new ConsoleLogger('[MultiAgent]');
|
|
708
|
-
|
|
709
|
-
// Task Mode: graceful no-op behavior
|
|
710
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
711
|
-
|
|
712
|
-
const coordinator = new WaitingCoordinator(redis, logger);
|
|
713
|
-
const taskId = 'multi-agent-test' as any;
|
|
714
|
-
const agents = [
|
|
715
|
-
'agent-1' as any,
|
|
716
|
-
'agent-2' as any,
|
|
717
|
-
'agent-3' as any
|
|
718
|
-
];
|
|
719
|
-
|
|
720
|
-
// All agents try to complete
|
|
721
|
-
// In Task Mode, should return immediately and successfully with empty results
|
|
722
|
-
const result = await coordinator.waitForMultipleAgents(
|
|
723
|
-
taskId,
|
|
724
|
-
agents,
|
|
725
|
-
5
|
|
726
|
-
);
|
|
727
|
-
|
|
728
|
-
expect(result.completed).toBeDefined();
|
|
729
|
-
expect(Array.isArray(result.completed)).toBe(true);
|
|
730
|
-
});
|
|
731
|
-
});
|
|
732
|
-
|
|
733
|
-
describe('Edge cases and error handling', () => {
|
|
734
|
-
it('should handle malformed JSON in context', async () => {
|
|
735
|
-
const redis = new RedisCoordinator();
|
|
736
|
-
const logger = new ConsoleLogger('[Test]');
|
|
737
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(true);
|
|
738
|
-
const manager = new ContextManager(redis, logger);
|
|
739
|
-
|
|
740
|
-
// Test validation of context structure
|
|
741
|
-
const invalid = {
|
|
742
|
-
taskId: 'task-123' as any,
|
|
743
|
-
deliverables: 'not-array' as any
|
|
744
|
-
};
|
|
745
|
-
|
|
746
|
-
const result = manager.validateContext(invalid);
|
|
747
|
-
expect(result.valid).toBe(false);
|
|
748
|
-
});
|
|
749
|
-
|
|
750
|
-
it('should safely handle Redis connection failures', async () => {
|
|
751
|
-
const redis = new RedisCoordinator();
|
|
752
|
-
const logger = new ConsoleLogger('[Test]');
|
|
753
|
-
|
|
754
|
-
// Simulate Redis unavailable
|
|
755
|
-
jest.spyOn(redis, 'canUseRedis', 'get').mockReturnValue(false);
|
|
756
|
-
|
|
757
|
-
const manager = new ContextManager(redis, logger);
|
|
758
|
-
const taskId = 'task-123' as any;
|
|
759
|
-
|
|
760
|
-
// Should handle gracefully even without Redis
|
|
761
|
-
await expect(
|
|
762
|
-
manager.storeContext(taskId, { taskId })
|
|
763
|
-
).resolves.not.toThrow();
|
|
764
|
-
});
|
|
765
|
-
|
|
766
|
-
it('should validate all input parameters strictly', async () => {
|
|
767
|
-
const redis = new RedisCoordinator();
|
|
768
|
-
const logger = new ConsoleLogger('[Test]');
|
|
769
|
-
const reporter = new CompletionReporter(redis, logger);
|
|
770
|
-
|
|
771
|
-
// Test parameter validation
|
|
772
|
-
const invalidTaskId = 'task@#$%' as any;
|
|
773
|
-
const invalidAgentId = 'agent@#$%' as any;
|
|
774
|
-
const invalidConfidence = 2.5;
|
|
775
|
-
|
|
776
|
-
await expect(
|
|
777
|
-
reporter.reportCompletion(invalidTaskId, 'agent-1' as any, 0.5)
|
|
778
|
-
).rejects.toThrow();
|
|
779
|
-
|
|
780
|
-
await expect(
|
|
781
|
-
reporter.reportCompletion('task-123' as any, invalidAgentId, 0.5)
|
|
782
|
-
).rejects.toThrow();
|
|
783
|
-
|
|
784
|
-
await expect(
|
|
785
|
-
reporter.reportCompletion('task-123' as any, 'agent-1' as any, invalidConfidence)
|
|
786
|
-
).rejects.toThrow();
|
|
787
|
-
});
|
|
788
|
-
});
|