claude-flow-novice 2.15.5 → 2.15.6
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/.gs-api-quota.json +16 -0
- package/.claude/cfn-extras/.gs-progress-state.json +22 -0
- package/.claude/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
- package/.claude/cfn-extras/agents/google-sheets/README.md +114 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
- package/.claude/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
- package/.claude/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
- package/.claude/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
- package/.claude/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
- package/.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
- package/.claude/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
- package/.claude/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
- package/.claude/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
- package/.claude/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
- package/.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
- package/.claude/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
- package/.claude/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
- package/.claude/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
- package/.claude/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
- package/.claude/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
- package/.claude/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
- package/.claude/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
- package/.claude/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
- package/.claude/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
- package/.claude/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
- package/.claude/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
- package/.claude/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
- package/.claude/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
- package/.claude/commands/cfn-context.md +10 -0
- package/.claude/commands/cfn-loop-cli.md +36 -15
- package/.claude/commands/google-sheets/google-sheets-loop.md +289 -0
- package/.claude/skills/cfn-agent-selector/SKILL.md +143 -0
- package/.claude/skills/cfn-agent-selector/select-agents.sh +94 -0
- package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
- package/.claude/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
- package/.claude/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
- package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
- package/.claude/skills/cfn-docker-redis-coordination/README.md +294 -0
- package/.claude/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
- package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
- package/.claude/skills/cfn-docker-redis-coordination/package.json +40 -0
- package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
- package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
- package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
- package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
- package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
- package/.claude/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
- package/.claude/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
- package/.claude/skills/cfn-loop-orchestration/README.md +149 -41
- package/.claude/skills/cfn-loop-orchestration/jest.config.js +67 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
- package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
- package/.claude/skills/cfn-loop-orchestration/package-lock.json +5470 -0
- package/.claude/skills/cfn-loop-orchestration/package.json +49 -0
- package/.claude/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
- package/.claude/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
- package/.claude/skills/cfn-loop-orchestration/src/index.ts +14 -0
- package/.claude/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
- package/.claude/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
- package/.claude/skills/cfn-loop-orchestration/src/types.ts +188 -0
- package/.claude/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
- package/.claude/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
- package/.claude/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
- package/.claude/skills/cfn-loop-orchestration/tsconfig.json +54 -0
- package/.claude/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
- package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
- package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
- package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
- package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
- package/.claude/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
- package/.claude/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/index.js +114 -0
- package/.claude/skills/cfn-redis-coordination/dist/index.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
- package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
- package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
- package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
- package/.claude/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
- package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
- package/.claude/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
- package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
- package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
- package/.claude/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
- package/.claude/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/types.js +81 -0
- package/.claude/skills/cfn-redis-coordination/dist/types.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
- package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
- package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
- package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
- package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
- package/.claude/skills/cfn-redis-coordination/jest.config.js +23 -0
- package/.claude/skills/cfn-redis-coordination/package-lock.json +5272 -0
- package/.claude/skills/cfn-redis-coordination/package.json +45 -0
- package/.claude/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
- package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
- package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
- package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
- package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
- package/.claude/skills/cfn-redis-coordination/src/index.ts +82 -0
- package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
- package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
- package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
- package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
- package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
- package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
- package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
- package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
- package/.claude/skills/cfn-redis-coordination/src/types.ts +235 -0
- package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
- package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
- package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
- package/.claude/skills/cfn-redis-coordination/test-redis-check.js +84 -0
- package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
- package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +779 -0
- package/.claude/skills/cfn-redis-coordination/tsconfig.json +31 -0
- package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +172 -2
- package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +1 -1
- package/claude-assets/agents/custom/cfn-redis-operations.md +530 -0
- package/claude-assets/agents/custom/cfn-system-expert.md +77 -0
- package/claude-assets/cfn-extras/.gs-api-quota.json +16 -0
- package/claude-assets/cfn-extras/.gs-progress-state.json +22 -0
- package/claude-assets/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
- package/claude-assets/cfn-extras/agents/google-sheets/README.md +114 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
- package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
- package/claude-assets/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
- package/claude-assets/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
- package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
- package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
- package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
- package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
- package/claude-assets/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
- package/claude-assets/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
- package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
- package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
- package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
- package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
- package/claude-assets/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
- package/claude-assets/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
- package/claude-assets/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
- package/claude-assets/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
- package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
- package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
- package/claude-assets/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
- package/claude-assets/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
- package/claude-assets/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
- package/claude-assets/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
- package/claude-assets/commands/cfn-context.md +10 -0
- package/claude-assets/commands/cfn-loop-cli.md +36 -15
- package/claude-assets/commands/google-sheets/google-sheets-loop.md +289 -0
- package/claude-assets/hooks/cfn-pre-execution/SESSION_START_README.md +87 -0
- package/claude-assets/hooks/cfn-pre-execution/TEST_SESSION_START.md +128 -0
- package/claude-assets/hooks/cfn-pre-execution/session-start-context.sh +111 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_EXAMPLE.md +209 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/README.md +130 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +243 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/agent-mappings.json +142 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +173 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +71 -0
- package/claude-assets/skills/cfn-agent-selection-with-fallback/test-agent-selection.sh +282 -0
- package/claude-assets/skills/cfn-agent-selector/SKILL.md +143 -0
- package/claude-assets/skills/cfn-agent-selector/select-agents.sh +94 -0
- package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
- package/claude-assets/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
- package/claude-assets/skills/cfn-docker-coordination/.eslintrc.json +33 -0
- package/claude-assets/skills/cfn-docker-coordination/README.md +349 -0
- package/claude-assets/skills/cfn-docker-coordination/docker-helpers.sh +433 -0
- package/claude-assets/skills/cfn-docker-coordination/jest.config.js +25 -0
- package/claude-assets/skills/cfn-docker-coordination/package-lock.json +6827 -0
- package/claude-assets/skills/cfn-docker-coordination/package.json +38 -0
- package/claude-assets/skills/cfn-docker-coordination/src/agent-container.ts +471 -0
- package/claude-assets/skills/cfn-docker-coordination/src/docker-client.ts +483 -0
- package/claude-assets/skills/cfn-docker-coordination/src/health-checker.ts +418 -0
- package/claude-assets/skills/cfn-docker-coordination/src/index.ts +45 -0
- package/claude-assets/skills/cfn-docker-coordination/src/network-manager.ts +377 -0
- package/claude-assets/skills/cfn-docker-coordination/src/types.ts +412 -0
- package/claude-assets/skills/cfn-docker-coordination/src/volume-manager.ts +389 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/agent-container.test.ts +379 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/docker-client.test.ts +345 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/health-checker.test.ts +535 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/integration.test.ts +193 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/network-manager.test.ts +352 -0
- package/claude-assets/skills/cfn-docker-coordination/tests/setup.ts +36 -0
- package/claude-assets/skills/cfn-docker-coordination/tsconfig.json +29 -0
- package/claude-assets/skills/cfn-docker-logging/INTEGRATION.md +268 -0
- package/claude-assets/skills/cfn-docker-logging/SAMPLE_OUTPUTS.md +237 -0
- package/claude-assets/skills/cfn-docker-logging/SKILL.md +442 -0
- package/claude-assets/skills/cfn-docker-logging/capture-container-logs.sh +120 -0
- package/claude-assets/skills/cfn-docker-logging/enable-logging.sh +430 -0
- package/claude-assets/skills/cfn-docker-logging/init-hybrid-logging.sh +210 -0
- package/claude-assets/skills/cfn-docker-logging/queries/analytics-summary.sh +87 -0
- package/claude-assets/skills/cfn-docker-logging/queries/query-agent-timeline.sh +51 -0
- package/claude-assets/skills/cfn-docker-logging/queries/query-consensus-history.sh +56 -0
- package/claude-assets/skills/cfn-docker-logging/queries/query-coordination-timeline.sh +39 -0
- package/claude-assets/skills/cfn-docker-logging/queries/query-failed-containers.sh +40 -0
- package/claude-assets/skills/cfn-docker-logging/queries/query-gate-checks.sh +39 -0
- package/claude-assets/skills/cfn-docker-logging/schema.sql +111 -0
- package/claude-assets/skills/cfn-docker-logging/sqlite-helpers.sh +240 -0
- package/claude-assets/skills/cfn-docker-logging/test-hybrid-logging.sh +331 -0
- package/claude-assets/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
- package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/README.md +294 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/package.json +40 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
- package/claude-assets/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
- package/claude-assets/skills/cfn-error-logging/.eslintrc.json +57 -0
- package/claude-assets/skills/cfn-error-logging/.prettierrc.json +10 -0
- package/claude-assets/skills/cfn-error-logging/MIGRATION_SUMMARY.md +485 -0
- package/claude-assets/skills/cfn-error-logging/package.json +47 -0
- package/claude-assets/skills/cfn-error-logging/src/error-logger.ts +1042 -0
- package/claude-assets/skills/cfn-error-logging/src/index.ts +12 -0
- package/claude-assets/skills/cfn-error-logging/src/types.ts +456 -0
- package/claude-assets/skills/cfn-error-logging/tests/error-logger.test.ts +1302 -0
- package/claude-assets/skills/cfn-error-logging/tsconfig.json +38 -0
- package/claude-assets/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
- package/claude-assets/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
- package/claude-assets/skills/cfn-loop-orchestration/README.md +149 -41
- package/claude-assets/skills/cfn-loop-orchestration/jest.config.js +67 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
- package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
- package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +5470 -0
- package/claude-assets/skills/cfn-loop-orchestration/package.json +49 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +14 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +188 -0
- package/claude-assets/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
- package/claude-assets/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
- package/claude-assets/skills/cfn-loop-orchestration/tsconfig.json +54 -0
- package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/index.js +114 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/index.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/types.js +81 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/types.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
- package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
- package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
- package/claude-assets/skills/cfn-redis-coordination/jest.config.js +23 -0
- package/claude-assets/skills/cfn-redis-coordination/package-lock.json +5272 -0
- package/claude-assets/skills/cfn-redis-coordination/package.json +45 -0
- package/claude-assets/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
- package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
- package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
- package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
- package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
- package/claude-assets/skills/cfn-redis-coordination/src/index.ts +82 -0
- package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
- package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
- package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
- package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
- package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
- package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
- package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
- package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
- package/claude-assets/skills/cfn-redis-coordination/src/types.ts +235 -0
- package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
- package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
- package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
- package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +84 -0
- package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
- package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +779 -0
- package/claude-assets/skills/cfn-redis-coordination/tsconfig.json +31 -0
- package/claude-assets/skills/cfn-skill-propagation/README.md +233 -0
- package/claude-assets/skills/cfn-skill-propagation/package-lock.json +5174 -0
- package/claude-assets/skills/cfn-skill-propagation/package.json +52 -0
- package/claude-assets/skills/cfn-skill-propagation/propagate-skill-update.sh +32 -0
- package/claude-assets/skills/cfn-skill-propagation/src/cli.ts +75 -0
- package/claude-assets/skills/cfn-skill-propagation/src/database-adapter.ts +239 -0
- package/claude-assets/skills/cfn-skill-propagation/src/file-system-adapter.ts +113 -0
- package/claude-assets/skills/cfn-skill-propagation/src/index.ts +72 -0
- package/claude-assets/skills/cfn-skill-propagation/src/logger.ts +43 -0
- package/claude-assets/skills/cfn-skill-propagation/src/metadata-parser.ts +154 -0
- package/claude-assets/skills/cfn-skill-propagation/src/skill-propagator.ts +274 -0
- package/claude-assets/skills/cfn-skill-propagation/src/skill-validator.ts +179 -0
- package/claude-assets/skills/cfn-skill-propagation/src/types.ts +143 -0
- package/claude-assets/skills/cfn-skill-propagation/src/version-manager.ts +118 -0
- package/claude-assets/skills/cfn-skill-propagation/tests/file-system-adapter.test.ts +91 -0
- package/claude-assets/skills/cfn-skill-propagation/tests/metadata-parser.test.ts +176 -0
- package/claude-assets/skills/cfn-skill-propagation/tests/skill-propagator.test.ts +209 -0
- package/claude-assets/skills/cfn-skill-propagation/tests/skill-validator.test.ts +203 -0
- package/claude-assets/skills/cfn-skill-propagation/tests/version-manager.test.ts +115 -0
- package/claude-assets/skills/cfn-skill-propagation/tsconfig.json +34 -0
- package/claude-assets/skills/task-classifier/SKILL.md +81 -0
- package/claude-assets/skills/task-classifier/classify-task.sh +62 -0
- package/claude-assets/skills/workflow-codification/package-lock.json +5170 -0
- package/claude-assets/skills/workflow-codification/package.json +30 -0
- package/claude-assets/skills/workflow-codification/src/index.ts +24 -0
- package/claude-assets/skills/workflow-codification/src/pattern-analyzer.ts +537 -0
- package/claude-assets/skills/workflow-codification/src/types.ts +180 -0
- package/claude-assets/skills/workflow-codification/tests/pattern-analyzer.test.ts +960 -0
- package/claude-assets/skills/workflow-codification/tsconfig.json +34 -0
- package/claude-assets/skills/workflow-codification/workflow-codification.db +0 -0
- package/dist/agent-spawner/agent-spawner.js +448 -0
- package/dist/agent-spawner/agent-spawner.js.map +1 -0
- package/dist/agent-spawner/index.js +10 -0
- package/dist/agent-spawner/index.js.map +1 -0
- package/dist/agent-spawner/types.js +14 -0
- package/dist/agent-spawner/types.js.map +1 -0
- package/dist/agents/agent-loader.js +146 -165
- package/dist/agents/agent-loader.js.map +1 -1
- package/dist/cli/agent-executor.js +47 -1
- package/dist/cli/agent-executor.js.map +1 -1
- package/dist/cli/agent-spawn.js +4 -1
- package/dist/cli/agent-spawn.js.map +1 -1
- package/dist/cli/tool-executor.js +3 -1
- package/dist/cli/tool-executor.js.map +1 -1
- package/dist/gate-checker/gate-checker.js +292 -0
- package/dist/gate-checker/gate-checker.js.map +1 -0
- package/dist/gate-checker/types.js +94 -0
- package/dist/gate-checker/types.js.map +1 -0
- package/dist/lib/database-service/connection-pool-manager.js +2 -1
- package/dist/lib/database-service/connection-pool-manager.js.map +1 -1
- package/dist/orchestrator/index.js +10 -0
- package/dist/orchestrator/index.js.map +1 -0
- package/dist/orchestrator/orchestrate.js +496 -0
- package/dist/orchestrator/orchestrate.js.map +1 -0
- package/dist/orchestrator/types.js +58 -0
- package/dist/orchestrator/types.js.map +1 -0
- package/package.json +1 -1
- package/scripts/switch-api.sh +142 -4
- package/scripts/verify-no-secrets.sh +6 -13
- package/tests/README.md +175 -58
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Waiting Coordinator
|
|
4
|
+
*
|
|
5
|
+
* Handles blocking coordination using Redis BLPOP for agents to wait
|
|
6
|
+
* for specific conditions (gate passed, consensus reached, etc).
|
|
7
|
+
*
|
|
8
|
+
* Migrated from:
|
|
9
|
+
* - invoke-waiting-mode.sh (223 lines)
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.WaitingCoordinator = void 0;
|
|
13
|
+
const types_1 = require("./types");
|
|
14
|
+
class WaitingCoordinator {
|
|
15
|
+
redis;
|
|
16
|
+
logger;
|
|
17
|
+
constructor(redis, logger) {
|
|
18
|
+
this.redis = redis;
|
|
19
|
+
this.logger = logger;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Wait for a specific condition with BLPOP (blocking)
|
|
23
|
+
*
|
|
24
|
+
* Blocks until condition is signaled or timeout occurs.
|
|
25
|
+
* In Task Mode: Returns immediately with false
|
|
26
|
+
* In CLI Mode: Blocks on Redis list
|
|
27
|
+
*/
|
|
28
|
+
async waitForCompletion(taskId, agentId, timeoutSeconds = 300, namespace = 'swarm') {
|
|
29
|
+
// Validate inputs
|
|
30
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
31
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
32
|
+
}
|
|
33
|
+
if (!(0, types_1.isValidAgentId)(agentId)) {
|
|
34
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid agent ID: ${agentId}`);
|
|
35
|
+
}
|
|
36
|
+
const startTime = Date.now();
|
|
37
|
+
// Graceful no-op in Task Mode
|
|
38
|
+
if (!this.redis.canUseRedis) {
|
|
39
|
+
this.logger.info(`Task Mode: Wait for completion skipped (no Redis) - Agent: ${agentId}`);
|
|
40
|
+
return {
|
|
41
|
+
condition: 'agent-completion',
|
|
42
|
+
met: true,
|
|
43
|
+
timedOut: false,
|
|
44
|
+
waitedMs: 0
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
// CLI Mode: Block on Redis list
|
|
48
|
+
const doneKey = `${namespace}:${taskId}:${agentId}:done`;
|
|
49
|
+
try {
|
|
50
|
+
this.logger.info(`⏳ Waiting for completion: ${agentId} (timeout: ${timeoutSeconds}s)`);
|
|
51
|
+
// BLPOP with timeout (Redis timeout in seconds)
|
|
52
|
+
const result = await this.redis.blpop(doneKey, timeoutSeconds);
|
|
53
|
+
const waitedMs = Date.now() - startTime;
|
|
54
|
+
if (result) {
|
|
55
|
+
this.logger.info(`✅ Agent completed: ${agentId} (waited ${waitedMs}ms)`);
|
|
56
|
+
return {
|
|
57
|
+
condition: 'agent-completion',
|
|
58
|
+
met: true,
|
|
59
|
+
timedOut: false,
|
|
60
|
+
waitedMs,
|
|
61
|
+
metadata: { signal: result[1] }
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.logger.warn(`⏱️ Timeout waiting for agent: ${agentId} (${timeoutSeconds}s)`);
|
|
66
|
+
return {
|
|
67
|
+
condition: 'agent-completion',
|
|
68
|
+
met: false,
|
|
69
|
+
timedOut: true,
|
|
70
|
+
waitedMs
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
this.logger.error('Failed to wait for completion', error);
|
|
76
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to wait for completion: ${error.message}`);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Wait for gate to pass (test pass rate threshold)
|
|
81
|
+
*
|
|
82
|
+
* Blocks until gate-passed signal is received.
|
|
83
|
+
* In Task Mode: Returns immediately with true
|
|
84
|
+
* In CLI Mode: Blocks on Redis list
|
|
85
|
+
*/
|
|
86
|
+
async waitForGate(taskId, timeoutSeconds = 600, namespace = 'swarm') {
|
|
87
|
+
// Validate input
|
|
88
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
89
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
90
|
+
}
|
|
91
|
+
const startTime = Date.now();
|
|
92
|
+
// Graceful no-op in Task Mode
|
|
93
|
+
if (!this.redis.canUseRedis) {
|
|
94
|
+
this.logger.info('Task Mode: Wait for gate skipped (no Redis)');
|
|
95
|
+
return {
|
|
96
|
+
condition: 'gate-passed',
|
|
97
|
+
met: true,
|
|
98
|
+
timedOut: false,
|
|
99
|
+
waitedMs: 0
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
// CLI Mode: Block on Redis list
|
|
103
|
+
const gateKey = `${namespace}:${taskId}:gate-passed`;
|
|
104
|
+
try {
|
|
105
|
+
this.logger.info(`⏳ Waiting for gate to pass (timeout: ${timeoutSeconds}s)`);
|
|
106
|
+
// BLPOP with timeout
|
|
107
|
+
const result = await this.redis.blpop(gateKey, timeoutSeconds);
|
|
108
|
+
const waitedMs = Date.now() - startTime;
|
|
109
|
+
if (result) {
|
|
110
|
+
this.logger.info(`✅ Gate passed (waited ${waitedMs}ms)`);
|
|
111
|
+
return {
|
|
112
|
+
condition: 'gate-passed',
|
|
113
|
+
met: true,
|
|
114
|
+
timedOut: false,
|
|
115
|
+
waitedMs,
|
|
116
|
+
metadata: { signal: result[1] }
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
this.logger.warn(`⏱️ Timeout waiting for gate (${timeoutSeconds}s)`);
|
|
121
|
+
return {
|
|
122
|
+
condition: 'gate-passed',
|
|
123
|
+
met: false,
|
|
124
|
+
timedOut: true,
|
|
125
|
+
waitedMs
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
this.logger.error('Failed to wait for gate', error);
|
|
131
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to wait for gate: ${error.message}`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Wait for consensus to be reached from validators
|
|
136
|
+
*
|
|
137
|
+
* Blocks until consensus signal is received.
|
|
138
|
+
* In Task Mode: Returns immediately with true
|
|
139
|
+
* In CLI Mode: Blocks on Redis list
|
|
140
|
+
*/
|
|
141
|
+
async waitForConsensus(taskId, timeoutSeconds = 600, namespace = 'swarm') {
|
|
142
|
+
// Validate input
|
|
143
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
144
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
145
|
+
}
|
|
146
|
+
const startTime = Date.now();
|
|
147
|
+
// Graceful no-op in Task Mode
|
|
148
|
+
if (!this.redis.canUseRedis) {
|
|
149
|
+
this.logger.info('Task Mode: Wait for consensus skipped (no Redis)');
|
|
150
|
+
return {
|
|
151
|
+
condition: 'consensus-reached',
|
|
152
|
+
met: true,
|
|
153
|
+
timedOut: false,
|
|
154
|
+
waitedMs: 0
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
// CLI Mode: Block on Redis list
|
|
158
|
+
const consensusKey = `${namespace}:${taskId}:consensus-reached`;
|
|
159
|
+
try {
|
|
160
|
+
this.logger.info(`⏳ Waiting for consensus (timeout: ${timeoutSeconds}s)`);
|
|
161
|
+
// BLPOP with timeout
|
|
162
|
+
const result = await this.redis.blpop(consensusKey, timeoutSeconds);
|
|
163
|
+
const waitedMs = Date.now() - startTime;
|
|
164
|
+
if (result) {
|
|
165
|
+
this.logger.info(`✅ Consensus reached (waited ${waitedMs}ms)`);
|
|
166
|
+
return {
|
|
167
|
+
condition: 'consensus-reached',
|
|
168
|
+
met: true,
|
|
169
|
+
timedOut: false,
|
|
170
|
+
waitedMs,
|
|
171
|
+
metadata: { signal: result[1] }
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
this.logger.warn(`⏱️ Timeout waiting for consensus (${timeoutSeconds}s)`);
|
|
176
|
+
return {
|
|
177
|
+
condition: 'consensus-reached',
|
|
178
|
+
met: false,
|
|
179
|
+
timedOut: true,
|
|
180
|
+
waitedMs
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
catch (error) {
|
|
185
|
+
this.logger.error('Failed to wait for consensus', error);
|
|
186
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to wait for consensus: ${error.message}`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Wait for custom condition by key name
|
|
191
|
+
*
|
|
192
|
+
* Generic wait mechanism for any condition.
|
|
193
|
+
* In Task Mode: Returns immediately with true
|
|
194
|
+
* In CLI Mode: Blocks on Redis list
|
|
195
|
+
*/
|
|
196
|
+
async waitForCondition(taskId, conditionName, timeoutSeconds = 300, namespace = 'swarm') {
|
|
197
|
+
// Validate input
|
|
198
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
199
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
200
|
+
}
|
|
201
|
+
if (!conditionName || conditionName.length === 0) {
|
|
202
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, 'Condition name cannot be empty');
|
|
203
|
+
}
|
|
204
|
+
const startTime = Date.now();
|
|
205
|
+
// Graceful no-op in Task Mode
|
|
206
|
+
if (!this.redis.canUseRedis) {
|
|
207
|
+
this.logger.info(`Task Mode: Wait for condition skipped (no Redis) - ${conditionName}`);
|
|
208
|
+
return {
|
|
209
|
+
condition: conditionName,
|
|
210
|
+
met: true,
|
|
211
|
+
timedOut: false,
|
|
212
|
+
waitedMs: 0
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
// CLI Mode: Block on Redis list
|
|
216
|
+
const conditionKey = `${namespace}:${taskId}:${conditionName}`;
|
|
217
|
+
try {
|
|
218
|
+
this.logger.info(`⏳ Waiting for condition: ${conditionName} (timeout: ${timeoutSeconds}s)`);
|
|
219
|
+
// BLPOP with timeout
|
|
220
|
+
const result = await this.redis.blpop(conditionKey, timeoutSeconds);
|
|
221
|
+
const waitedMs = Date.now() - startTime;
|
|
222
|
+
if (result) {
|
|
223
|
+
this.logger.info(`✅ Condition met: ${conditionName} (waited ${waitedMs}ms)`);
|
|
224
|
+
return {
|
|
225
|
+
condition: conditionName,
|
|
226
|
+
met: true,
|
|
227
|
+
timedOut: false,
|
|
228
|
+
waitedMs,
|
|
229
|
+
metadata: { signal: result[1] }
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
else {
|
|
233
|
+
this.logger.warn(`⏱️ Timeout waiting for condition: ${conditionName} (${timeoutSeconds}s)`);
|
|
234
|
+
return {
|
|
235
|
+
condition: conditionName,
|
|
236
|
+
met: false,
|
|
237
|
+
timedOut: true,
|
|
238
|
+
waitedMs
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
catch (error) {
|
|
243
|
+
this.logger.error('Failed to wait for condition', error);
|
|
244
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to wait for condition ${conditionName}: ${error.message}`);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Signal a condition to wake waiting agents
|
|
249
|
+
*
|
|
250
|
+
* In Task Mode: Logs and returns gracefully
|
|
251
|
+
* In CLI Mode: Pushes signal to Redis list
|
|
252
|
+
*/
|
|
253
|
+
async signalCondition(taskId, conditionName, metadata, namespace = 'swarm') {
|
|
254
|
+
// Validate input
|
|
255
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
256
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
257
|
+
}
|
|
258
|
+
if (!conditionName || conditionName.length === 0) {
|
|
259
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, 'Condition name cannot be empty');
|
|
260
|
+
}
|
|
261
|
+
const timestamp = new Date().toISOString();
|
|
262
|
+
// Graceful no-op in Task Mode
|
|
263
|
+
if (!this.redis.canUseRedis) {
|
|
264
|
+
this.logger.info(`Task Mode: Condition signal skipped (no Redis) - ${conditionName}`);
|
|
265
|
+
return {
|
|
266
|
+
agentId: 'orchestrator',
|
|
267
|
+
signalType: conditionName,
|
|
268
|
+
status: 'signaled',
|
|
269
|
+
timestamp
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
// CLI Mode: Push signal to Redis
|
|
273
|
+
const conditionKey = `${namespace}:${taskId}:${conditionName}`;
|
|
274
|
+
try {
|
|
275
|
+
const payload = JSON.stringify({
|
|
276
|
+
conditionName,
|
|
277
|
+
timestamp,
|
|
278
|
+
metadata: metadata || {}
|
|
279
|
+
});
|
|
280
|
+
await this.redis.lpush(conditionKey, payload);
|
|
281
|
+
// Set TTL (1 hour - long enough for agents to see it)
|
|
282
|
+
await this.redis.expire(conditionKey, 3600);
|
|
283
|
+
this.logger.info(`✅ Signal sent: ${conditionName}`);
|
|
284
|
+
return {
|
|
285
|
+
agentId: 'orchestrator',
|
|
286
|
+
signalType: conditionName,
|
|
287
|
+
status: 'signaled',
|
|
288
|
+
timestamp
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
catch (error) {
|
|
292
|
+
this.logger.error('Failed to signal condition', error);
|
|
293
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to signal condition ${conditionName}: ${error.message}`);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Wait for multiple agents to complete with parallel blocking
|
|
298
|
+
*
|
|
299
|
+
* In Task Mode: Returns immediately
|
|
300
|
+
* In CLI Mode: Blocks on multiple agent done keys
|
|
301
|
+
*/
|
|
302
|
+
async waitForMultipleAgents(taskId, agentIds, timeoutSeconds = 600, namespace = 'swarm') {
|
|
303
|
+
// Validate input
|
|
304
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
305
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
306
|
+
}
|
|
307
|
+
if (!agentIds || agentIds.length === 0) {
|
|
308
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, 'Agent IDs list cannot be empty');
|
|
309
|
+
}
|
|
310
|
+
// Graceful no-op in Task Mode
|
|
311
|
+
if (!this.redis.canUseRedis) {
|
|
312
|
+
this.logger.info('Task Mode: Wait for multiple agents skipped (no Redis)');
|
|
313
|
+
return {
|
|
314
|
+
completed: agentIds,
|
|
315
|
+
timedOut: false,
|
|
316
|
+
waitedMs: 0
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
const startTime = Date.now();
|
|
320
|
+
const completed = [];
|
|
321
|
+
const keys = agentIds.map(id => `${namespace}:${taskId}:${id}:done`);
|
|
322
|
+
try {
|
|
323
|
+
this.logger.info(`⏳ Waiting for ${agentIds.length} agents to complete (timeout: ${timeoutSeconds}s)`);
|
|
324
|
+
while (completed.length < agentIds.length) {
|
|
325
|
+
const waitedMs = Date.now() - startTime;
|
|
326
|
+
// Check timeout
|
|
327
|
+
if (waitedMs / 1000 >= timeoutSeconds) {
|
|
328
|
+
this.logger.warn(`⏱️ Timeout waiting for agents to complete`);
|
|
329
|
+
return {
|
|
330
|
+
completed,
|
|
331
|
+
timedOut: true,
|
|
332
|
+
waitedMs
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
// Calculate remaining timeout for BLPOP
|
|
336
|
+
const remainingSeconds = timeoutSeconds - (waitedMs / 1000);
|
|
337
|
+
// BLPOP on all remaining keys
|
|
338
|
+
const pendingKeys = agentIds
|
|
339
|
+
.filter(id => !completed.includes(id))
|
|
340
|
+
.map(id => `${namespace}:${taskId}:${id}:done`);
|
|
341
|
+
if (pendingKeys.length === 0)
|
|
342
|
+
break;
|
|
343
|
+
// BLPOP returns [key, value] or null
|
|
344
|
+
const blpopArgs = [...pendingKeys, Math.ceil(remainingSeconds)];
|
|
345
|
+
const result = await this.redis.blpop(...blpopArgs);
|
|
346
|
+
if (result) {
|
|
347
|
+
const key = result[0];
|
|
348
|
+
// Extract agent ID from key: "namespace:taskId:agentId:done"
|
|
349
|
+
const agentId = key.split(':')[2];
|
|
350
|
+
if (!completed.includes(agentId)) {
|
|
351
|
+
completed.push(agentId);
|
|
352
|
+
this.logger.info(`✅ Agent completed: ${agentId}`);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
const waitedMs = Date.now() - startTime;
|
|
357
|
+
this.logger.info(`✅ All agents completed (waited ${waitedMs}ms)`);
|
|
358
|
+
return {
|
|
359
|
+
completed,
|
|
360
|
+
timedOut: false,
|
|
361
|
+
waitedMs
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
this.logger.error('Failed to wait for multiple agents', error);
|
|
366
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to wait for multiple agents: ${error.message}`);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Poll for condition (non-blocking alternative to BLPOP)
|
|
371
|
+
*
|
|
372
|
+
* Useful when you can't use BLPOP (Task Mode stubbing issues).
|
|
373
|
+
*/
|
|
374
|
+
async pollForCondition(taskId, conditionName, timeoutSeconds = 300, pollIntervalMs = 1000, namespace = 'swarm') {
|
|
375
|
+
// Validate input
|
|
376
|
+
if (!(0, types_1.isValidTaskId)(taskId)) {
|
|
377
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.VALIDATION_ERROR, `Invalid task ID: ${taskId}`);
|
|
378
|
+
}
|
|
379
|
+
const startTime = Date.now();
|
|
380
|
+
const conditionKey = `${namespace}:${taskId}:${conditionName}`;
|
|
381
|
+
try {
|
|
382
|
+
this.logger.info(`⏳ Polling for condition: ${conditionName} (timeout: ${timeoutSeconds}s, poll interval: ${pollIntervalMs}ms)`);
|
|
383
|
+
while (true) {
|
|
384
|
+
const waitedMs = Date.now() - startTime;
|
|
385
|
+
// Check timeout
|
|
386
|
+
if (waitedMs / 1000 >= timeoutSeconds) {
|
|
387
|
+
this.logger.warn(`⏱️ Timeout polling for condition: ${conditionName}`);
|
|
388
|
+
return {
|
|
389
|
+
condition: conditionName,
|
|
390
|
+
met: false,
|
|
391
|
+
timedOut: true,
|
|
392
|
+
waitedMs
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
// Check condition
|
|
396
|
+
if (this.redis.canUseRedis) {
|
|
397
|
+
const result = await this.redis.get(conditionKey);
|
|
398
|
+
if (result && result === 'true') {
|
|
399
|
+
this.logger.info(`✅ Condition met via polling: ${conditionName}`);
|
|
400
|
+
return {
|
|
401
|
+
condition: conditionName,
|
|
402
|
+
met: true,
|
|
403
|
+
timedOut: false,
|
|
404
|
+
waitedMs
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
// Wait before next poll
|
|
409
|
+
await new Promise(resolve => setTimeout(resolve, pollIntervalMs));
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
catch (error) {
|
|
413
|
+
this.logger.error('Failed to poll for condition', error);
|
|
414
|
+
throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `Failed to poll for condition ${conditionName}: ${error.message}`);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
exports.WaitingCoordinator = WaitingCoordinator;
|
|
419
|
+
//# sourceMappingURL=waiting-coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waiting-coordinator.js","sourceRoot":"","sources":["../src/waiting-coordinator.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAOH,mCAKiB;AAkBjB,MAAa,kBAAkB;IAEnB;IACA;IAFV,YACU,KAAuB,EACvB,MAAc;QADd,UAAK,GAAL,KAAK,CAAkB;QACvB,WAAM,GAAN,MAAM,CAAQ;IACrB,CAAC;IAEJ;;;;;;OAMG;IACH,KAAK,CAAC,iBAAiB,CACrB,MAAc,EACd,OAAgB,EAChB,iBAAyB,GAAG,EAC5B,YAAoB,OAAO;QAE3B,kBAAkB;QAClB,IAAI,CAAC,IAAA,qBAAa,EAAC,MAAM,CAAC,EAAE,CAAC;YAC3B,MAAM,IAAI,yBAAiB,CACzB,6BAAqB,CAAC,gBAAgB,EACtC,oBAAoB,MAAM,EAAE,CAC7B,CAAC;QACJ,CA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