claude-flow-novice 2.15.11 → 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/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 +10 -0
- package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +56 -33
- package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +46 -36
- package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +9 -0
- package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +17 -17
- 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/product-owner.md +1 -5
- 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 +7 -35
- package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +8 -37
- package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +16 -54
- package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +17 -55
- package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -37
- package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +17 -55
- package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +17 -48
- package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +8 -37
- package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -27
- package/claude-assets/agents/cfn-dev-team/utility/analyst.md +12 -28
- package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +13 -13
- package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -2
- package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +5 -10
- package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +120 -714
- package/claude-assets/agents/cfn-dev-team/utility/researcher.md +12 -21
- package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +146 -572
- 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-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 +91 -109
- 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 -980
- 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
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Management API Endpoints
|
|
3
|
+
*
|
|
4
|
+
* RESTful API endpoints for managing CFN Loop tasks, including
|
|
5
|
+
* creation, updates, status tracking, and lifecycle management.
|
|
6
|
+
*/ import { Router } from 'express';
|
|
7
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
8
|
+
import { z } from 'zod';
|
|
9
|
+
// Validation schemas
|
|
10
|
+
const createTaskSchema = z.object({
|
|
11
|
+
name: z.string().min(1, 'Task name is required').max(200, 'Task name too long'),
|
|
12
|
+
description: z.string().min(1, 'Task description is required').max(2000, 'Task description too long'),
|
|
13
|
+
priority: z.enum([
|
|
14
|
+
'low',
|
|
15
|
+
'medium',
|
|
16
|
+
'high',
|
|
17
|
+
'critical'
|
|
18
|
+
]).optional().default('medium'),
|
|
19
|
+
assignedTo: z.string().optional(),
|
|
20
|
+
metadata: z.record(z.any()).optional().default({})
|
|
21
|
+
});
|
|
22
|
+
const updateTaskSchema = z.object({
|
|
23
|
+
name: z.string().min(1).max(200).optional(),
|
|
24
|
+
description: z.string().min(1).max(2000).optional(),
|
|
25
|
+
status: z.enum([
|
|
26
|
+
'pending',
|
|
27
|
+
'running',
|
|
28
|
+
'completed',
|
|
29
|
+
'failed',
|
|
30
|
+
'cancelled'
|
|
31
|
+
]).optional(),
|
|
32
|
+
priority: z.enum([
|
|
33
|
+
'low',
|
|
34
|
+
'medium',
|
|
35
|
+
'high',
|
|
36
|
+
'critical'
|
|
37
|
+
]).optional(),
|
|
38
|
+
assignedTo: z.string().optional(),
|
|
39
|
+
metadata: z.record(z.any()).optional(),
|
|
40
|
+
progress: z.object({
|
|
41
|
+
current: z.number().min(0),
|
|
42
|
+
total: z.number().min(1)
|
|
43
|
+
}).optional()
|
|
44
|
+
});
|
|
45
|
+
const queryTaskSchema = z.object({
|
|
46
|
+
status: z.enum([
|
|
47
|
+
'pending',
|
|
48
|
+
'running',
|
|
49
|
+
'completed',
|
|
50
|
+
'failed',
|
|
51
|
+
'cancelled'
|
|
52
|
+
]).optional(),
|
|
53
|
+
priority: z.enum([
|
|
54
|
+
'low',
|
|
55
|
+
'medium',
|
|
56
|
+
'high',
|
|
57
|
+
'critical'
|
|
58
|
+
]).optional(),
|
|
59
|
+
assignedTo: z.string().optional(),
|
|
60
|
+
createdBy: z.string().optional(),
|
|
61
|
+
limit: z.string().transform(Number).refine((n)=>n > 0 && n <= 100).optional().default('20'),
|
|
62
|
+
offset: z.string().transform(Number).refine((n)=>n >= 0).optional().default('0'),
|
|
63
|
+
sortBy: z.enum([
|
|
64
|
+
'createdAt',
|
|
65
|
+
'updatedAt',
|
|
66
|
+
'priority',
|
|
67
|
+
'status'
|
|
68
|
+
]).optional().default('createdAt'),
|
|
69
|
+
sortOrder: z.enum([
|
|
70
|
+
'asc',
|
|
71
|
+
'desc'
|
|
72
|
+
]).optional().default('desc')
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* Task Endpoints Class
|
|
76
|
+
*/ export class TaskEndpoints {
|
|
77
|
+
taskManager;
|
|
78
|
+
tasks = new Map();
|
|
79
|
+
constructor(taskManager){
|
|
80
|
+
this.taskManager = taskManager;
|
|
81
|
+
// Initialize with some sample tasks for development
|
|
82
|
+
this.initializeSampleTasks();
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Initialize sample tasks for development
|
|
86
|
+
*/ initializeSampleTasks() {
|
|
87
|
+
const sampleTasks = [
|
|
88
|
+
{
|
|
89
|
+
id: uuidv4(),
|
|
90
|
+
name: 'Implement User Authentication',
|
|
91
|
+
description: 'Add JWT-based authentication system with refresh tokens',
|
|
92
|
+
status: 'running',
|
|
93
|
+
priority: 'high',
|
|
94
|
+
createdBy: 'system',
|
|
95
|
+
createdAt: new Date(Date.now() - 3600000),
|
|
96
|
+
updatedAt: new Date(),
|
|
97
|
+
startedAt: new Date(Date.now() - 1800000),
|
|
98
|
+
metadata: {
|
|
99
|
+
phase: 'auth',
|
|
100
|
+
epic: 'user-management'
|
|
101
|
+
},
|
|
102
|
+
progress: {
|
|
103
|
+
current: 7,
|
|
104
|
+
total: 10,
|
|
105
|
+
percentage: 70
|
|
106
|
+
},
|
|
107
|
+
agents: [
|
|
108
|
+
{
|
|
109
|
+
id: 'backend-dev-1',
|
|
110
|
+
type: 'backend-developer',
|
|
111
|
+
status: 'completed',
|
|
112
|
+
confidence: 0.92
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 'security-1',
|
|
116
|
+
type: 'security-specialist',
|
|
117
|
+
status: 'running',
|
|
118
|
+
confidence: 0.88
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: uuidv4(),
|
|
124
|
+
name: 'Database Migration Script',
|
|
125
|
+
description: 'Create migration script for new user roles table',
|
|
126
|
+
status: 'completed',
|
|
127
|
+
priority: 'medium',
|
|
128
|
+
createdBy: 'admin',
|
|
129
|
+
createdAt: new Date(Date.now() - 7200000),
|
|
130
|
+
updatedAt: new Date(Date.now() - 600000),
|
|
131
|
+
startedAt: new Date(Date.now() - 3600000),
|
|
132
|
+
completedAt: new Date(Date.now() - 600000),
|
|
133
|
+
metadata: {
|
|
134
|
+
phase: 'database',
|
|
135
|
+
migration: '003_add_user_roles'
|
|
136
|
+
},
|
|
137
|
+
progress: {
|
|
138
|
+
current: 5,
|
|
139
|
+
total: 5,
|
|
140
|
+
percentage: 100
|
|
141
|
+
},
|
|
142
|
+
agents: [
|
|
143
|
+
{
|
|
144
|
+
id: 'backend-dev-2',
|
|
145
|
+
type: 'backend-developer',
|
|
146
|
+
status: 'completed',
|
|
147
|
+
confidence: 0.95
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
];
|
|
152
|
+
sampleTasks.forEach((task)=>this.tasks.set(task.id, task));
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Get Express router with all task endpoints
|
|
156
|
+
*/ getRouter() {
|
|
157
|
+
const router = Router();
|
|
158
|
+
// GET /tasks - List tasks with filtering
|
|
159
|
+
router.get('/', this.handleGetTasks.bind(this));
|
|
160
|
+
// GET /tasks/:id - Get specific task
|
|
161
|
+
router.get('/:id', this.handleGetTask.bind(this));
|
|
162
|
+
// POST /tasks - Create new task
|
|
163
|
+
router.post('/', this.handleCreateTask.bind(this));
|
|
164
|
+
// PUT /tasks/:id - Update task
|
|
165
|
+
router.put('/:id', this.handleUpdateTask.bind(this));
|
|
166
|
+
// PATCH /tasks/:id/status - Update task status
|
|
167
|
+
router.patch('/:id/status', this.handleUpdateTaskStatus.bind(this));
|
|
168
|
+
// DELETE /tasks/:id - Delete task
|
|
169
|
+
router.delete('/:id', this.handleDeleteTask.bind(this));
|
|
170
|
+
// POST /tasks/:id/agents - Add agent to task
|
|
171
|
+
router.post('/:id/agents', this.handleAddAgentToTask.bind(this));
|
|
172
|
+
// GET /tasks/:id/agents - Get task agents
|
|
173
|
+
router.get('/:id/agents', this.handleGetTaskAgents.bind(this));
|
|
174
|
+
// POST /tasks/:id/cancel - Cancel task
|
|
175
|
+
router.post('/:id/cancel', this.handleCancelTask.bind(this));
|
|
176
|
+
return router;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* GET /tasks - List tasks with filtering and pagination
|
|
180
|
+
*/ async handleGetTasks(req, res, next) {
|
|
181
|
+
try {
|
|
182
|
+
const query = queryTaskSchema.parse(req.query);
|
|
183
|
+
let tasks = Array.from(this.tasks.values());
|
|
184
|
+
// Apply filters
|
|
185
|
+
if (query.status) {
|
|
186
|
+
tasks = tasks.filter((task)=>task.status === query.status);
|
|
187
|
+
}
|
|
188
|
+
if (query.priority) {
|
|
189
|
+
tasks = tasks.filter((task)=>task.priority === query.priority);
|
|
190
|
+
}
|
|
191
|
+
if (query.assignedTo) {
|
|
192
|
+
tasks = tasks.filter((task)=>task.assignedTo === query.assignedTo);
|
|
193
|
+
}
|
|
194
|
+
if (query.createdBy) {
|
|
195
|
+
tasks = tasks.filter((task)=>task.createdBy === query.createdBy);
|
|
196
|
+
}
|
|
197
|
+
// Sort tasks
|
|
198
|
+
tasks.sort((a, b)=>{
|
|
199
|
+
const aValue = a[query.sortBy];
|
|
200
|
+
const bValue = b[query.sortBy];
|
|
201
|
+
if (aValue instanceof Date && bValue instanceof Date) {
|
|
202
|
+
return query.sortOrder === 'asc' ? aValue.getTime() - bValue.getTime() : bValue.getTime() - aValue.getTime();
|
|
203
|
+
}
|
|
204
|
+
if (typeof aValue === 'string' && typeof bValue === 'string') {
|
|
205
|
+
return query.sortOrder === 'asc' ? aValue.localeCompare(bValue) : bValue.localeCompare(aValue);
|
|
206
|
+
}
|
|
207
|
+
return 0;
|
|
208
|
+
});
|
|
209
|
+
// Apply pagination
|
|
210
|
+
const total = tasks.length;
|
|
211
|
+
const paginatedTasks = tasks.slice(query.offset, query.offset + query.limit);
|
|
212
|
+
res.json({
|
|
213
|
+
tasks: paginatedTasks,
|
|
214
|
+
pagination: {
|
|
215
|
+
total,
|
|
216
|
+
limit: query.limit,
|
|
217
|
+
offset: query.offset,
|
|
218
|
+
hasMore: query.offset + query.limit < total
|
|
219
|
+
},
|
|
220
|
+
filters: {
|
|
221
|
+
status: query.status,
|
|
222
|
+
priority: query.priority,
|
|
223
|
+
assignedTo: query.assignedTo,
|
|
224
|
+
createdBy: query.createdBy
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
} catch (error) {
|
|
228
|
+
next(error);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* GET /tasks/:id - Get specific task
|
|
233
|
+
*/ async handleGetTask(req, res, next) {
|
|
234
|
+
try {
|
|
235
|
+
const { id } = req.params;
|
|
236
|
+
const task = this.tasks.get(id);
|
|
237
|
+
if (!task) {
|
|
238
|
+
res.status(404).json({
|
|
239
|
+
error: 'Not Found',
|
|
240
|
+
message: `Task with ID ${id} not found`
|
|
241
|
+
});
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
res.json({
|
|
245
|
+
task
|
|
246
|
+
});
|
|
247
|
+
} catch (error) {
|
|
248
|
+
next(error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* POST /tasks - Create new task
|
|
253
|
+
*/ async handleCreateTask(req, res, next) {
|
|
254
|
+
try {
|
|
255
|
+
const validatedData = createTaskSchema.parse(req.body);
|
|
256
|
+
const createdBy = req.user?.id || 'anonymous';
|
|
257
|
+
const task = {
|
|
258
|
+
id: uuidv4(),
|
|
259
|
+
name: validatedData.name,
|
|
260
|
+
description: validatedData.description,
|
|
261
|
+
status: 'pending',
|
|
262
|
+
priority: validatedData.priority,
|
|
263
|
+
assignedTo: validatedData.assignedTo,
|
|
264
|
+
createdBy,
|
|
265
|
+
createdAt: new Date(),
|
|
266
|
+
updatedAt: new Date(),
|
|
267
|
+
metadata: validatedData.metadata,
|
|
268
|
+
progress: {
|
|
269
|
+
current: 0,
|
|
270
|
+
total: 1,
|
|
271
|
+
percentage: 0
|
|
272
|
+
},
|
|
273
|
+
agents: []
|
|
274
|
+
};
|
|
275
|
+
this.tasks.set(task.id, task);
|
|
276
|
+
// Notify task manager if available
|
|
277
|
+
if (this.taskManager) {
|
|
278
|
+
await this.taskManager.createTask(task);
|
|
279
|
+
}
|
|
280
|
+
res.status(201).json({
|
|
281
|
+
message: 'Task created successfully',
|
|
282
|
+
task
|
|
283
|
+
});
|
|
284
|
+
} catch (error) {
|
|
285
|
+
next(error);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* PUT /tasks/:id - Update task
|
|
290
|
+
*/ async handleUpdateTask(req, res, next) {
|
|
291
|
+
try {
|
|
292
|
+
const { id } = req.params;
|
|
293
|
+
const validatedData = updateTaskSchema.parse(req.body);
|
|
294
|
+
const task = this.tasks.get(id);
|
|
295
|
+
if (!task) {
|
|
296
|
+
res.status(404).json({
|
|
297
|
+
error: 'Not Found',
|
|
298
|
+
message: `Task with ID ${id} not found`
|
|
299
|
+
});
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
// Update task fields
|
|
303
|
+
const updatedTask = {
|
|
304
|
+
...task,
|
|
305
|
+
...validatedData,
|
|
306
|
+
updatedAt: new Date()
|
|
307
|
+
};
|
|
308
|
+
// Update progress percentage if progress data provided
|
|
309
|
+
if (validatedData.progress) {
|
|
310
|
+
updatedTask.progress = {
|
|
311
|
+
...validatedData.progress,
|
|
312
|
+
percentage: Math.round(validatedData.progress.current / validatedData.progress.total * 100)
|
|
313
|
+
};
|
|
314
|
+
}
|
|
315
|
+
// Handle status transitions
|
|
316
|
+
if (validatedData.status) {
|
|
317
|
+
if (validatedData.status === 'running' && task.status !== 'running') {
|
|
318
|
+
updatedTask.startedAt = new Date();
|
|
319
|
+
} else if ([
|
|
320
|
+
'completed',
|
|
321
|
+
'failed',
|
|
322
|
+
'cancelled'
|
|
323
|
+
].includes(validatedData.status) && ![
|
|
324
|
+
'completed',
|
|
325
|
+
'failed',
|
|
326
|
+
'cancelled'
|
|
327
|
+
].includes(task.status)) {
|
|
328
|
+
updatedTask.completedAt = new Date();
|
|
329
|
+
updatedTask.progress.percentage = 100;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
this.tasks.set(id, updatedTask);
|
|
333
|
+
// Notify task manager if available
|
|
334
|
+
if (this.taskManager) {
|
|
335
|
+
await this.taskManager.updateTask(updatedTask);
|
|
336
|
+
}
|
|
337
|
+
res.json({
|
|
338
|
+
message: 'Task updated successfully',
|
|
339
|
+
task: updatedTask
|
|
340
|
+
});
|
|
341
|
+
} catch (error) {
|
|
342
|
+
next(error);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* PATCH /tasks/:id/status - Update task status
|
|
347
|
+
*/ async handleUpdateTaskStatus(req, res, next) {
|
|
348
|
+
try {
|
|
349
|
+
const { id } = req.params;
|
|
350
|
+
const { status } = req.body;
|
|
351
|
+
if (![
|
|
352
|
+
'pending',
|
|
353
|
+
'running',
|
|
354
|
+
'completed',
|
|
355
|
+
'failed',
|
|
356
|
+
'cancelled'
|
|
357
|
+
].includes(status)) {
|
|
358
|
+
res.status(400).json({
|
|
359
|
+
error: 'Bad Request',
|
|
360
|
+
message: 'Invalid status value'
|
|
361
|
+
});
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
const task = this.tasks.get(id);
|
|
365
|
+
if (!task) {
|
|
366
|
+
res.status(404).json({
|
|
367
|
+
error: 'Not Found',
|
|
368
|
+
message: `Task with ID ${id} not found`
|
|
369
|
+
});
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
const updatedTask = {
|
|
373
|
+
...task,
|
|
374
|
+
status,
|
|
375
|
+
updatedAt: new Date()
|
|
376
|
+
};
|
|
377
|
+
// Handle status transitions
|
|
378
|
+
if (status === 'running' && task.status !== 'running') {
|
|
379
|
+
updatedTask.startedAt = new Date();
|
|
380
|
+
} else if ([
|
|
381
|
+
'completed',
|
|
382
|
+
'failed',
|
|
383
|
+
'cancelled'
|
|
384
|
+
].includes(status) && ![
|
|
385
|
+
'completed',
|
|
386
|
+
'failed',
|
|
387
|
+
'cancelled'
|
|
388
|
+
].includes(task.status)) {
|
|
389
|
+
updatedTask.completedAt = new Date();
|
|
390
|
+
updatedTask.progress.percentage = 100;
|
|
391
|
+
}
|
|
392
|
+
this.tasks.set(id, updatedTask);
|
|
393
|
+
// Notify task manager if available
|
|
394
|
+
if (this.taskManager) {
|
|
395
|
+
await this.taskManager.updateTaskStatus(id, status);
|
|
396
|
+
}
|
|
397
|
+
res.json({
|
|
398
|
+
message: 'Task status updated successfully',
|
|
399
|
+
task: updatedTask
|
|
400
|
+
});
|
|
401
|
+
} catch (error) {
|
|
402
|
+
next(error);
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* DELETE /tasks/:id - Delete task
|
|
407
|
+
*/ async handleDeleteTask(req, res, next) {
|
|
408
|
+
try {
|
|
409
|
+
const { id } = req.params;
|
|
410
|
+
const task = this.tasks.get(id);
|
|
411
|
+
if (!task) {
|
|
412
|
+
res.status(404).json({
|
|
413
|
+
error: 'Not Found',
|
|
414
|
+
message: `Task with ID ${id} not found`
|
|
415
|
+
});
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
// Don't allow deletion of running tasks
|
|
419
|
+
if (task.status === 'running') {
|
|
420
|
+
res.status(409).json({
|
|
421
|
+
error: 'Conflict',
|
|
422
|
+
message: 'Cannot delete a running task. Cancel it first.'
|
|
423
|
+
});
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
this.tasks.delete(id);
|
|
427
|
+
// Notify task manager if available
|
|
428
|
+
if (this.taskManager) {
|
|
429
|
+
await this.taskManager.deleteTask(id);
|
|
430
|
+
}
|
|
431
|
+
res.json({
|
|
432
|
+
message: 'Task deleted successfully',
|
|
433
|
+
taskId: id
|
|
434
|
+
});
|
|
435
|
+
} catch (error) {
|
|
436
|
+
next(error);
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* POST /tasks/:id/agents - Add agent to task
|
|
441
|
+
*/ async handleAddAgentToTask(req, res, next) {
|
|
442
|
+
try {
|
|
443
|
+
const { id } = req.params;
|
|
444
|
+
const { agentId, agentType, status = 'assigned', confidence } = req.body;
|
|
445
|
+
if (!agentId || !agentType) {
|
|
446
|
+
res.status(400).json({
|
|
447
|
+
error: 'Bad Request',
|
|
448
|
+
message: 'agentId and agentType are required'
|
|
449
|
+
});
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const task = this.tasks.get(id);
|
|
453
|
+
if (!task) {
|
|
454
|
+
res.status(404).json({
|
|
455
|
+
error: 'Not Found',
|
|
456
|
+
message: `Task with ID ${id} not found`
|
|
457
|
+
});
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
// Check if agent already exists
|
|
461
|
+
const existingAgent = task.agents.find((agent)=>agent.id === agentId);
|
|
462
|
+
if (existingAgent) {
|
|
463
|
+
res.status(409).json({
|
|
464
|
+
error: 'Conflict',
|
|
465
|
+
message: 'Agent already assigned to this task'
|
|
466
|
+
});
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
const newAgent = {
|
|
470
|
+
id: agentId,
|
|
471
|
+
type: agentType,
|
|
472
|
+
status,
|
|
473
|
+
confidence
|
|
474
|
+
};
|
|
475
|
+
task.agents.push(newAgent);
|
|
476
|
+
task.updatedAt = new Date();
|
|
477
|
+
this.tasks.set(id, task);
|
|
478
|
+
res.status(201).json({
|
|
479
|
+
message: 'Agent added to task successfully',
|
|
480
|
+
agent: newAgent,
|
|
481
|
+
task
|
|
482
|
+
});
|
|
483
|
+
} catch (error) {
|
|
484
|
+
next(error);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
/**
|
|
488
|
+
* GET /tasks/:id/agents - Get task agents
|
|
489
|
+
*/ async handleGetTaskAgents(req, res, next) {
|
|
490
|
+
try {
|
|
491
|
+
const { id } = req.params;
|
|
492
|
+
const task = this.tasks.get(id);
|
|
493
|
+
if (!task) {
|
|
494
|
+
res.status(404).json({
|
|
495
|
+
error: 'Not Found',
|
|
496
|
+
message: `Task with ID ${id} not found`
|
|
497
|
+
});
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
res.json({
|
|
501
|
+
taskId: id,
|
|
502
|
+
agents: task.agents,
|
|
503
|
+
totalAgents: task.agents.length
|
|
504
|
+
});
|
|
505
|
+
} catch (error) {
|
|
506
|
+
next(error);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* POST /tasks/:id/cancel - Cancel task
|
|
511
|
+
*/ async handleCancelTask(req, res, next) {
|
|
512
|
+
try {
|
|
513
|
+
const { id } = req.params;
|
|
514
|
+
const task = this.tasks.get(id);
|
|
515
|
+
if (!task) {
|
|
516
|
+
res.status(404).json({
|
|
517
|
+
error: 'Not Found',
|
|
518
|
+
message: `Task with ID ${id} not found`
|
|
519
|
+
});
|
|
520
|
+
return;
|
|
521
|
+
}
|
|
522
|
+
if (task.status === 'completed') {
|
|
523
|
+
res.status(409).json({
|
|
524
|
+
error: 'Conflict',
|
|
525
|
+
message: 'Cannot cancel a completed task'
|
|
526
|
+
});
|
|
527
|
+
return;
|
|
528
|
+
}
|
|
529
|
+
if (task.status === 'cancelled') {
|
|
530
|
+
res.status(409).json({
|
|
531
|
+
error: 'Conflict',
|
|
532
|
+
message: 'Task is already cancelled'
|
|
533
|
+
});
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
const updatedTask = {
|
|
537
|
+
...task,
|
|
538
|
+
status: 'cancelled',
|
|
539
|
+
updatedAt: new Date(),
|
|
540
|
+
completedAt: new Date()
|
|
541
|
+
};
|
|
542
|
+
this.tasks.set(id, updatedTask);
|
|
543
|
+
// Notify task manager if available
|
|
544
|
+
if (this.taskManager) {
|
|
545
|
+
await this.taskManager.cancelTask(id);
|
|
546
|
+
}
|
|
547
|
+
res.json({
|
|
548
|
+
message: 'Task cancelled successfully',
|
|
549
|
+
task: updatedTask
|
|
550
|
+
});
|
|
551
|
+
} catch (error) {
|
|
552
|
+
next(error);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Factory function to create task endpoints
|
|
558
|
+
*/ export function createTaskEndpoints(taskManager) {
|
|
559
|
+
return new TaskEndpoints(taskManager);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
//# sourceMappingURL=task-endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/task-endpoints.ts"],"sourcesContent":["/**\n * Task Management API Endpoints\n *\n * RESTful API endpoints for managing CFN Loop tasks, including\n * creation, updates, status tracking, and lifecycle management.\n */\n\nimport { Router, Request, Response, NextFunction } from 'express';\nimport { v4 as uuidv4 } from 'uuid';\nimport { z } from 'zod';\n\n// Types\nexport interface Task {\n id: string;\n name: string;\n description: string;\n status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';\n priority: 'low' | 'medium' | 'high' | 'critical';\n assignedTo?: string;\n createdBy: string;\n createdAt: Date;\n updatedAt: Date;\n startedAt?: Date;\n completedAt?: Date;\n metadata: Record<string, any>;\n progress: {\n current: number;\n total: number;\n percentage: number;\n };\n agents: Array<{\n id: string;\n type: string;\n status: string;\n confidence?: number;\n }>;\n}\n\nexport interface CreateTaskRequest {\n name: string;\n description: string;\n priority?: Task['priority'];\n assignedTo?: string;\n metadata?: Record<string, any>;\n}\n\nexport interface UpdateTaskRequest {\n name?: string;\n description?: string;\n status?: Task['status'];\n priority?: Task['priority'];\n assignedTo?: string;\n metadata?: Record<string, any>;\n progress?: {\n current: number;\n total: number;\n };\n}\n\n// Validation schemas\nconst createTaskSchema = z.object({\n name: z.string().min(1, 'Task name is required').max(200, 'Task name too long'),\n description: z.string().min(1, 'Task description is required').max(2000, 'Task description too long'),\n priority: z.enum(['low', 'medium', 'high', 'critical']).optional().default('medium'),\n assignedTo: z.string().optional(),\n metadata: z.record(z.any()).optional().default({}),\n});\n\nconst updateTaskSchema = z.object({\n name: z.string().min(1).max(200).optional(),\n description: z.string().min(1).max(2000).optional(),\n status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']).optional(),\n priority: z.enum(['low', 'medium', 'high', 'critical']).optional(),\n assignedTo: z.string().optional(),\n metadata: z.record(z.any()).optional(),\n progress: z.object({\n current: z.number().min(0),\n total: z.number().min(1),\n }).optional(),\n});\n\nconst queryTaskSchema = z.object({\n status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']).optional(),\n priority: z.enum(['low', 'medium', 'high', 'critical']).optional(),\n assignedTo: z.string().optional(),\n createdBy: z.string().optional(),\n limit: z.string().transform(Number).refine(n => n > 0 && n <= 100).optional().default('20'),\n offset: z.string().transform(Number).refine(n => n >= 0).optional().default('0'),\n sortBy: z.enum(['createdAt', 'updatedAt', 'priority', 'status']).optional().default('createdAt'),\n sortOrder: z.enum(['asc', 'desc']).optional().default('desc'),\n});\n\n/**\n * Task Endpoints Class\n */\nexport class TaskEndpoints {\n private tasks: Map<string, Task> = new Map();\n\n constructor(private taskManager?: any) {\n // Initialize with some sample tasks for development\n this.initializeSampleTasks();\n }\n\n /**\n * Initialize sample tasks for development\n */\n private initializeSampleTasks(): void {\n const sampleTasks: Task[] = [\n {\n id: uuidv4(),\n name: 'Implement User Authentication',\n description: 'Add JWT-based authentication system with refresh tokens',\n status: 'running',\n priority: 'high',\n createdBy: 'system',\n createdAt: new Date(Date.now() - 3600000),\n updatedAt: new Date(),\n startedAt: new Date(Date.now() - 1800000),\n metadata: { phase: 'auth', epic: 'user-management' },\n progress: { current: 7, total: 10, percentage: 70 },\n agents: [\n { id: 'backend-dev-1', type: 'backend-developer', status: 'completed', confidence: 0.92 },\n { id: 'security-1', type: 'security-specialist', status: 'running', confidence: 0.88 },\n ],\n },\n {\n id: uuidv4(),\n name: 'Database Migration Script',\n description: 'Create migration script for new user roles table',\n status: 'completed',\n priority: 'medium',\n createdBy: 'admin',\n createdAt: new Date(Date.now() - 7200000),\n updatedAt: new Date(Date.now() - 600000),\n startedAt: new Date(Date.now() - 3600000),\n completedAt: new Date(Date.now() - 600000),\n metadata: { phase: 'database', migration: '003_add_user_roles' },\n progress: { current: 5, total: 5, percentage: 100 },\n agents: [\n { id: 'backend-dev-2', type: 'backend-developer', status: 'completed', confidence: 0.95 },\n ],\n },\n ];\n\n sampleTasks.forEach(task => this.tasks.set(task.id, task));\n }\n\n /**\n * Get Express router with all task endpoints\n */\n public getRouter(): Router {\n const router = Router();\n\n // GET /tasks - List tasks with filtering\n router.get('/', this.handleGetTasks.bind(this));\n\n // GET /tasks/:id - Get specific task\n router.get('/:id', this.handleGetTask.bind(this));\n\n // POST /tasks - Create new task\n router.post('/', this.handleCreateTask.bind(this));\n\n // PUT /tasks/:id - Update task\n router.put('/:id', this.handleUpdateTask.bind(this));\n\n // PATCH /tasks/:id/status - Update task status\n router.patch('/:id/status', this.handleUpdateTaskStatus.bind(this));\n\n // DELETE /tasks/:id - Delete task\n router.delete('/:id', this.handleDeleteTask.bind(this));\n\n // POST /tasks/:id/agents - Add agent to task\n router.post('/:id/agents', this.handleAddAgentToTask.bind(this));\n\n // GET /tasks/:id/agents - Get task agents\n router.get('/:id/agents', this.handleGetTaskAgents.bind(this));\n\n // POST /tasks/:id/cancel - Cancel task\n router.post('/:id/cancel', this.handleCancelTask.bind(this));\n\n return router;\n }\n\n /**\n * GET /tasks - List tasks with filtering and pagination\n */\n private async handleGetTasks(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const query = queryTaskSchema.parse(req.query);\n \n let tasks = Array.from(this.tasks.values());\n\n // Apply filters\n if (query.status) {\n tasks = tasks.filter(task => task.status === query.status);\n }\n if (query.priority) {\n tasks = tasks.filter(task => task.priority === query.priority);\n }\n if (query.assignedTo) {\n tasks = tasks.filter(task => task.assignedTo === query.assignedTo);\n }\n if (query.createdBy) {\n tasks = tasks.filter(task => task.createdBy === query.createdBy);\n }\n\n // Sort tasks\n tasks.sort((a, b) => {\n const aValue = a[query.sortBy as keyof Task];\n const bValue = b[query.sortBy as keyof Task];\n \n if (aValue instanceof Date && bValue instanceof Date) {\n return query.sortOrder === 'asc' \n ? aValue.getTime() - bValue.getTime()\n : bValue.getTime() - aValue.getTime();\n }\n \n if (typeof aValue === 'string' && typeof bValue === 'string') {\n return query.sortOrder === 'asc' \n ? aValue.localeCompare(bValue)\n : bValue.localeCompare(aValue);\n }\n \n return 0;\n });\n\n // Apply pagination\n const total = tasks.length;\n const paginatedTasks = tasks.slice(query.offset, query.offset + query.limit);\n\n res.json({\n tasks: paginatedTasks,\n pagination: {\n total,\n limit: query.limit,\n offset: query.offset,\n hasMore: query.offset + query.limit < total,\n },\n filters: {\n status: query.status,\n priority: query.priority,\n assignedTo: query.assignedTo,\n createdBy: query.createdBy,\n },\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * GET /tasks/:id - Get specific task\n */\n private async handleGetTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const task = this.tasks.get(id);\n\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n res.json({ task });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * POST /tasks - Create new task\n */\n private async handleCreateTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const validatedData = createTaskSchema.parse(req.body);\n const createdBy = (req as any).user?.id || 'anonymous';\n\n const task: Task = {\n id: uuidv4(),\n name: validatedData.name,\n description: validatedData.description,\n status: 'pending',\n priority: validatedData.priority,\n assignedTo: validatedData.assignedTo,\n createdBy,\n createdAt: new Date(),\n updatedAt: new Date(),\n metadata: validatedData.metadata,\n progress: { current: 0, total: 1, percentage: 0 },\n agents: [],\n };\n\n this.tasks.set(task.id, task);\n\n // Notify task manager if available\n if (this.taskManager) {\n await this.taskManager.createTask(task);\n }\n\n res.status(201).json({\n message: 'Task created successfully',\n task,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * PUT /tasks/:id - Update task\n */\n private async handleUpdateTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const validatedData = updateTaskSchema.parse(req.body);\n\n const task = this.tasks.get(id);\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n // Update task fields\n const updatedTask = {\n ...task,\n ...validatedData,\n updatedAt: new Date(),\n };\n\n // Update progress percentage if progress data provided\n if (validatedData.progress) {\n updatedTask.progress = {\n ...validatedData.progress,\n percentage: Math.round((validatedData.progress.current / validatedData.progress.total) * 100),\n };\n }\n\n // Handle status transitions\n if (validatedData.status) {\n if (validatedData.status === 'running' && task.status !== 'running') {\n updatedTask.startedAt = new Date();\n } else if (['completed', 'failed', 'cancelled'].includes(validatedData.status) && \n !['completed', 'failed', 'cancelled'].includes(task.status)) {\n updatedTask.completedAt = new Date();\n updatedTask.progress.percentage = 100;\n }\n }\n\n this.tasks.set(id, updatedTask);\n\n // Notify task manager if available\n if (this.taskManager) {\n await this.taskManager.updateTask(updatedTask);\n }\n\n res.json({\n message: 'Task updated successfully',\n task: updatedTask,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * PATCH /tasks/:id/status - Update task status\n */\n private async handleUpdateTaskStatus(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const { status } = req.body;\n\n if (!['pending', 'running', 'completed', 'failed', 'cancelled'].includes(status)) {\n res.status(400).json({\n error: 'Bad Request',\n message: 'Invalid status value',\n });\n return;\n }\n\n const task = this.tasks.get(id);\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n const updatedTask = {\n ...task,\n status,\n updatedAt: new Date(),\n };\n\n // Handle status transitions\n if (status === 'running' && task.status !== 'running') {\n updatedTask.startedAt = new Date();\n } else if (['completed', 'failed', 'cancelled'].includes(status) && \n !['completed', 'failed', 'cancelled'].includes(task.status)) {\n updatedTask.completedAt = new Date();\n updatedTask.progress.percentage = 100;\n }\n\n this.tasks.set(id, updatedTask);\n\n // Notify task manager if available\n if (this.taskManager) {\n await this.taskManager.updateTaskStatus(id, status);\n }\n\n res.json({\n message: 'Task status updated successfully',\n task: updatedTask,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * DELETE /tasks/:id - Delete task\n */\n private async handleDeleteTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const task = this.tasks.get(id);\n\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n // Don't allow deletion of running tasks\n if (task.status === 'running') {\n res.status(409).json({\n error: 'Conflict',\n message: 'Cannot delete a running task. Cancel it first.',\n });\n return;\n }\n\n this.tasks.delete(id);\n\n // Notify task manager if available\n if (this.taskManager) {\n await this.taskManager.deleteTask(id);\n }\n\n res.json({\n message: 'Task deleted successfully',\n taskId: id,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * POST /tasks/:id/agents - Add agent to task\n */\n private async handleAddAgentToTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const { agentId, agentType, status = 'assigned', confidence } = req.body;\n\n if (!agentId || !agentType) {\n res.status(400).json({\n error: 'Bad Request',\n message: 'agentId and agentType are required',\n });\n return;\n }\n\n const task = this.tasks.get(id);\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n // Check if agent already exists\n const existingAgent = task.agents.find(agent => agent.id === agentId);\n if (existingAgent) {\n res.status(409).json({\n error: 'Conflict',\n message: 'Agent already assigned to this task',\n });\n return;\n }\n\n const newAgent = {\n id: agentId,\n type: agentType,\n status,\n confidence,\n };\n\n task.agents.push(newAgent);\n task.updatedAt = new Date();\n\n this.tasks.set(id, task);\n\n res.status(201).json({\n message: 'Agent added to task successfully',\n agent: newAgent,\n task,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * GET /tasks/:id/agents - Get task agents\n */\n private async handleGetTaskAgents(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const task = this.tasks.get(id);\n\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n res.json({\n taskId: id,\n agents: task.agents,\n totalAgents: task.agents.length,\n });\n } catch (error) {\n next(error);\n }\n }\n\n /**\n * POST /tasks/:id/cancel - Cancel task\n */\n private async handleCancelTask(req: Request, res: Response, next: NextFunction): Promise<void> {\n try {\n const { id } = req.params;\n const task = this.tasks.get(id);\n\n if (!task) {\n res.status(404).json({\n error: 'Not Found',\n message: `Task with ID ${id} not found`,\n });\n return;\n }\n\n if (task.status === 'completed') {\n res.status(409).json({\n error: 'Conflict',\n message: 'Cannot cancel a completed task',\n });\n return;\n }\n\n if (task.status === 'cancelled') {\n res.status(409).json({\n error: 'Conflict',\n message: 'Task is already cancelled',\n });\n return;\n }\n\n const updatedTask = {\n ...task,\n status: 'cancelled' as const,\n updatedAt: new Date(),\n completedAt: new Date(),\n };\n\n this.tasks.set(id, updatedTask);\n\n // Notify task manager if available\n if (this.taskManager) {\n await this.taskManager.cancelTask(id);\n }\n\n res.json({\n message: 'Task cancelled successfully',\n task: updatedTask,\n });\n } catch (error) {\n next(error);\n }\n }\n}\n\n/**\n * Factory function to create task endpoints\n */\nexport function createTaskEndpoints(taskManager?: any): TaskEndpoints {\n return new TaskEndpoints(taskManager);\n}"],"names":["Router","v4","uuidv4","z","createTaskSchema","object","name","string","min","max","description","priority","enum","optional","default","assignedTo","metadata","record","any","updateTaskSchema","status","progress","current","number","total","queryTaskSchema","createdBy","limit","transform","Number","refine","n","offset","sortBy","sortOrder","TaskEndpoints","tasks","Map","taskManager","initializeSampleTasks","sampleTasks","id","createdAt","Date","now","updatedAt","startedAt","phase","epic","percentage","agents","type","confidence","completedAt","migration","forEach","task","set","getRouter","router","get","handleGetTasks","bind","handleGetTask","post","handleCreateTask","put","handleUpdateTask","patch","handleUpdateTaskStatus","delete","handleDeleteTask","handleAddAgentToTask","handleGetTaskAgents","handleCancelTask","req","res","next","query","parse","Array","from","values","filter","sort","a","b","aValue","bValue","getTime","localeCompare","length","paginatedTasks","slice","json","pagination","hasMore","filters","error","params","message","validatedData","body","user","createTask","updatedTask","Math","round","includes","updateTask","updateTaskStatus","deleteTask","taskId","agentId","agentType","existingAgent","find","agent","newAgent","push","totalAgents","cancelTask","createTaskEndpoints"],"mappings":"AAAA;;;;;CAKC,GAED,SAASA,MAAM,QAAyC,UAAU;AAClE,SAASC,MAAMC,MAAM,QAAQ,OAAO;AACpC,SAASC,CAAC,QAAQ,MAAM;AAkDxB,qBAAqB;AACrB,MAAMC,mBAAmBD,EAAEE,MAAM,CAAC;IAChCC,MAAMH,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAG,yBAAyBC,GAAG,CAAC,KAAK;IAC1DC,aAAaP,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAG,gCAAgCC,GAAG,CAAC,MAAM;IACzEE,UAAUR,EAAES,IAAI,CAAC;QAAC;QAAO;QAAU;QAAQ;KAAW,EAAEC,QAAQ,GAAGC,OAAO,CAAC;IAC3EC,YAAYZ,EAAEI,MAAM,GAAGM,QAAQ;IAC/BG,UAAUb,EAAEc,MAAM,CAACd,EAAEe,GAAG,IAAIL,QAAQ,GAAGC,OAAO,CAAC,CAAC;AAClD;AAEA,MAAMK,mBAAmBhB,EAAEE,MAAM,CAAC;IAChCC,MAAMH,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC,KAAKI,QAAQ;IACzCH,aAAaP,EAAEI,MAAM,GAAGC,GAAG,CAAC,GAAGC,GAAG,CAAC,MAAMI,QAAQ;IACjDO,QAAQjB,EAAES,IAAI,CAAC;QAAC;QAAW;QAAW;QAAa;QAAU;KAAY,EAAEC,QAAQ;IACnFF,UAAUR,EAAES,IAAI,CAAC;QAAC;QAAO;QAAU;QAAQ;KAAW,EAAEC,QAAQ;IAChEE,YAAYZ,EAAEI,MAAM,GAAGM,QAAQ;IAC/BG,UAAUb,EAAEc,MAAM,CAACd,EAAEe,GAAG,IAAIL,QAAQ;IACpCQ,UAAUlB,EAAEE,MAAM,CAAC;QACjBiB,SAASnB,EAAEoB,MAAM,GAAGf,G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