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.
Files changed (440) hide show
  1. package/.claude/cfn-extras/.gs-api-quota.json +16 -0
  2. package/.claude/cfn-extras/.gs-progress-state.json +22 -0
  3. package/.claude/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
  4. package/.claude/cfn-extras/agents/google-sheets/README.md +114 -0
  5. package/.claude/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
  6. package/.claude/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
  7. package/.claude/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
  8. package/.claude/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
  9. package/.claude/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
  10. package/.claude/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
  11. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
  12. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
  13. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
  14. package/.claude/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
  15. package/.claude/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
  16. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
  17. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
  18. package/.claude/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
  19. package/.claude/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
  20. package/.claude/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
  21. package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
  22. package/.claude/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
  23. package/.claude/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
  24. package/.claude/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
  25. package/.claude/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
  26. package/.claude/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
  27. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
  28. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
  29. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
  30. package/.claude/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
  31. package/.claude/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
  32. package/.claude/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
  33. package/.claude/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
  34. package/.claude/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
  35. package/.claude/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
  36. package/.claude/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
  37. package/.claude/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
  38. package/.claude/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
  39. package/.claude/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
  40. package/.claude/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
  41. package/.claude/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
  42. package/.claude/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
  43. package/.claude/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
  44. package/.claude/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
  45. package/.claude/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
  46. package/.claude/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
  47. package/.claude/commands/cfn-context.md +10 -0
  48. package/.claude/commands/cfn-loop-cli.md +36 -15
  49. package/.claude/commands/google-sheets/google-sheets-loop.md +289 -0
  50. package/.claude/skills/cfn-agent-selector/SKILL.md +143 -0
  51. package/.claude/skills/cfn-agent-selector/select-agents.sh +94 -0
  52. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
  53. package/.claude/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
  54. package/.claude/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
  55. package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
  56. package/.claude/skills/cfn-docker-redis-coordination/README.md +294 -0
  57. package/.claude/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
  58. package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
  59. package/.claude/skills/cfn-docker-redis-coordination/package.json +40 -0
  60. package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
  61. package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
  62. package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
  63. package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
  64. package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
  65. package/.claude/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
  66. package/.claude/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
  67. package/.claude/skills/cfn-loop-orchestration/README.md +149 -41
  68. package/.claude/skills/cfn-loop-orchestration/jest.config.js +67 -0
  69. package/.claude/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
  70. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
  71. package/.claude/skills/cfn-loop-orchestration/package-lock.json +5470 -0
  72. package/.claude/skills/cfn-loop-orchestration/package.json +49 -0
  73. package/.claude/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
  74. package/.claude/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
  75. package/.claude/skills/cfn-loop-orchestration/src/index.ts +14 -0
  76. package/.claude/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
  77. package/.claude/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
  78. package/.claude/skills/cfn-loop-orchestration/src/types.ts +188 -0
  79. package/.claude/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
  80. package/.claude/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
  81. package/.claude/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
  82. package/.claude/skills/cfn-loop-orchestration/tsconfig.json +54 -0
  83. package/.claude/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
  84. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
  85. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
  86. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
  87. package/.claude/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
  88. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
  89. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
  90. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
  91. package/.claude/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
  92. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
  93. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
  94. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
  95. package/.claude/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
  96. package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
  97. package/.claude/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
  98. package/.claude/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
  99. package/.claude/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
  100. package/.claude/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
  101. package/.claude/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
  102. package/.claude/skills/cfn-redis-coordination/dist/index.js +114 -0
  103. package/.claude/skills/cfn-redis-coordination/dist/index.js.map +1 -0
  104. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
  105. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
  106. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
  107. package/.claude/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
  108. package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
  109. package/.claude/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
  110. package/.claude/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
  111. package/.claude/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
  112. package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
  113. package/.claude/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
  114. package/.claude/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
  115. package/.claude/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
  116. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
  117. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
  118. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
  119. package/.claude/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
  120. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
  121. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
  122. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
  123. package/.claude/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
  124. package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
  125. package/.claude/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
  126. package/.claude/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
  127. package/.claude/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
  128. package/.claude/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
  129. package/.claude/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
  130. package/.claude/skills/cfn-redis-coordination/dist/types.js +81 -0
  131. package/.claude/skills/cfn-redis-coordination/dist/types.js.map +1 -0
  132. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
  133. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
  134. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
  135. package/.claude/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
  136. package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
  137. package/.claude/skills/cfn-redis-coordination/jest.config.js +23 -0
  138. package/.claude/skills/cfn-redis-coordination/package-lock.json +5272 -0
  139. package/.claude/skills/cfn-redis-coordination/package.json +45 -0
  140. package/.claude/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
  141. package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
  142. package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
  143. package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
  144. package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
  145. package/.claude/skills/cfn-redis-coordination/src/index.ts +82 -0
  146. package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
  147. package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
  148. package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
  149. package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
  150. package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
  151. package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
  152. package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
  153. package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
  154. package/.claude/skills/cfn-redis-coordination/src/types.ts +235 -0
  155. package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
  156. package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
  157. package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
  158. package/.claude/skills/cfn-redis-coordination/test-redis-check.js +84 -0
  159. package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
  160. package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +779 -0
  161. package/.claude/skills/cfn-redis-coordination/tsconfig.json +31 -0
  162. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +172 -2
  163. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +1 -1
  164. package/claude-assets/agents/custom/cfn-redis-operations.md +530 -0
  165. package/claude-assets/agents/custom/cfn-system-expert.md +77 -0
  166. package/claude-assets/cfn-extras/.gs-api-quota.json +16 -0
  167. package/claude-assets/cfn-extras/.gs-progress-state.json +22 -0
  168. package/claude-assets/cfn-extras/GOOGLE_SHEETS_IMPLEMENTATION_SUMMARY.md +414 -0
  169. package/claude-assets/cfn-extras/agents/google-sheets/README.md +114 -0
  170. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-advanced-analytics-specialist.md +288 -0
  171. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-api-integrator.md +127 -0
  172. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-automation-scripting-specialist.md +195 -0
  173. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-business-validator.md +179 -0
  174. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-collaboration-security-specialist.md +240 -0
  175. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-coordinator.md +214 -0
  176. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-transformer.md +127 -0
  177. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validation-quality-specialist.md +177 -0
  178. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-validator.md +119 -0
  179. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-data-visualization-specialist.md +135 -0
  180. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-design-layout-specialist.md +109 -0
  181. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineer.md +127 -0
  182. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-engineering-specialist.md +138 -0
  183. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-formula-validator.md +128 -0
  184. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-generalist.md +645 -0
  185. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-integration-api-specialist.md +258 -0
  186. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-analyst.md +125 -0
  187. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-performance-optimization-specialist.md +211 -0
  188. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-schema-designer.md +130 -0
  189. package/claude-assets/cfn-extras/agents/google-sheets/google-sheets-template-architecture-specialist.md +259 -0
  190. package/claude-assets/cfn-extras/docs/GOOGLE_SHEETS_CFN_LOOP.md +617 -0
  191. package/claude-assets/cfn-extras/skills/GOOGLE_SHEETS_SKILLS_README.md +453 -0
  192. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/SKILL.md +272 -0
  193. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/api-call.sh +254 -0
  194. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/test.sh +174 -0
  195. package/claude-assets/cfn-extras/skills/google-sheets-api-coordinator/validate.sh +98 -0
  196. package/claude-assets/cfn-extras/skills/google-sheets-decomposition/SKILL.md +269 -0
  197. package/claude-assets/cfn-extras/skills/google-sheets-decomposition/decompose.sh +313 -0
  198. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/SKILL.md +237 -0
  199. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/build-formula.sh +220 -0
  200. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/test.sh +172 -0
  201. package/claude-assets/cfn-extras/skills/google-sheets-formula-builder/validate.sh +98 -0
  202. package/claude-assets/cfn-extras/skills/google-sheets-progress/SKILL.md +287 -0
  203. package/claude-assets/cfn-extras/skills/google-sheets-progress/test.sh +385 -0
  204. package/claude-assets/cfn-extras/skills/google-sheets-progress/track-progress.sh +516 -0
  205. package/claude-assets/cfn-extras/skills/google-sheets-progress/validate.sh +119 -0
  206. package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/SKILL.md +277 -0
  207. package/claude-assets/cfn-extras/skills/google-sheets-sprint-order/order-sprints.sh +233 -0
  208. package/claude-assets/cfn-extras/skills/google-sheets-validation/SKILL.md +352 -0
  209. package/claude-assets/cfn-extras/skills/google-sheets-validation/test.sh +355 -0
  210. package/claude-assets/cfn-extras/skills/google-sheets-validation/validate-state.sh +374 -0
  211. package/claude-assets/cfn-extras/skills/google-sheets-validation/validate.sh +128 -0
  212. package/claude-assets/commands/cfn-context.md +10 -0
  213. package/claude-assets/commands/cfn-loop-cli.md +36 -15
  214. package/claude-assets/commands/google-sheets/google-sheets-loop.md +289 -0
  215. package/claude-assets/hooks/cfn-pre-execution/SESSION_START_README.md +87 -0
  216. package/claude-assets/hooks/cfn-pre-execution/TEST_SESSION_START.md +128 -0
  217. package/claude-assets/hooks/cfn-pre-execution/session-start-context.sh +111 -0
  218. package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_EXAMPLE.md +209 -0
  219. package/claude-assets/skills/cfn-agent-selection-with-fallback/README.md +130 -0
  220. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +243 -0
  221. package/claude-assets/skills/cfn-agent-selection-with-fallback/agent-mappings.json +142 -0
  222. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +173 -0
  223. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +71 -0
  224. package/claude-assets/skills/cfn-agent-selection-with-fallback/test-agent-selection.sh +282 -0
  225. package/claude-assets/skills/cfn-agent-selector/SKILL.md +143 -0
  226. package/claude-assets/skills/cfn-agent-selector/select-agents.sh +94 -0
  227. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -2
  228. package/claude-assets/skills/cfn-docker-agent-spawning/spawn-agent.sh +21 -2
  229. package/claude-assets/skills/cfn-docker-coordination/.eslintrc.json +33 -0
  230. package/claude-assets/skills/cfn-docker-coordination/README.md +349 -0
  231. package/claude-assets/skills/cfn-docker-coordination/docker-helpers.sh +433 -0
  232. package/claude-assets/skills/cfn-docker-coordination/jest.config.js +25 -0
  233. package/claude-assets/skills/cfn-docker-coordination/package-lock.json +6827 -0
  234. package/claude-assets/skills/cfn-docker-coordination/package.json +38 -0
  235. package/claude-assets/skills/cfn-docker-coordination/src/agent-container.ts +471 -0
  236. package/claude-assets/skills/cfn-docker-coordination/src/docker-client.ts +483 -0
  237. package/claude-assets/skills/cfn-docker-coordination/src/health-checker.ts +418 -0
  238. package/claude-assets/skills/cfn-docker-coordination/src/index.ts +45 -0
  239. package/claude-assets/skills/cfn-docker-coordination/src/network-manager.ts +377 -0
  240. package/claude-assets/skills/cfn-docker-coordination/src/types.ts +412 -0
  241. package/claude-assets/skills/cfn-docker-coordination/src/volume-manager.ts +389 -0
  242. package/claude-assets/skills/cfn-docker-coordination/tests/agent-container.test.ts +379 -0
  243. package/claude-assets/skills/cfn-docker-coordination/tests/docker-client.test.ts +345 -0
  244. package/claude-assets/skills/cfn-docker-coordination/tests/health-checker.test.ts +535 -0
  245. package/claude-assets/skills/cfn-docker-coordination/tests/integration.test.ts +193 -0
  246. package/claude-assets/skills/cfn-docker-coordination/tests/network-manager.test.ts +352 -0
  247. package/claude-assets/skills/cfn-docker-coordination/tests/setup.ts +36 -0
  248. package/claude-assets/skills/cfn-docker-coordination/tsconfig.json +29 -0
  249. package/claude-assets/skills/cfn-docker-logging/INTEGRATION.md +268 -0
  250. package/claude-assets/skills/cfn-docker-logging/SAMPLE_OUTPUTS.md +237 -0
  251. package/claude-assets/skills/cfn-docker-logging/SKILL.md +442 -0
  252. package/claude-assets/skills/cfn-docker-logging/capture-container-logs.sh +120 -0
  253. package/claude-assets/skills/cfn-docker-logging/enable-logging.sh +430 -0
  254. package/claude-assets/skills/cfn-docker-logging/init-hybrid-logging.sh +210 -0
  255. package/claude-assets/skills/cfn-docker-logging/queries/analytics-summary.sh +87 -0
  256. package/claude-assets/skills/cfn-docker-logging/queries/query-agent-timeline.sh +51 -0
  257. package/claude-assets/skills/cfn-docker-logging/queries/query-consensus-history.sh +56 -0
  258. package/claude-assets/skills/cfn-docker-logging/queries/query-coordination-timeline.sh +39 -0
  259. package/claude-assets/skills/cfn-docker-logging/queries/query-failed-containers.sh +40 -0
  260. package/claude-assets/skills/cfn-docker-logging/queries/query-gate-checks.sh +39 -0
  261. package/claude-assets/skills/cfn-docker-logging/schema.sql +111 -0
  262. package/claude-assets/skills/cfn-docker-logging/sqlite-helpers.sh +240 -0
  263. package/claude-assets/skills/cfn-docker-logging/test-hybrid-logging.sh +331 -0
  264. package/claude-assets/skills/cfn-docker-loop-orchestration/orchestrate.sh +11 -5
  265. package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +348 -0
  266. package/claude-assets/skills/cfn-docker-redis-coordination/README.md +294 -0
  267. package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +37 -0
  268. package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +5259 -0
  269. package/claude-assets/skills/cfn-docker-redis-coordination/package.json +40 -0
  270. package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +801 -0
  271. package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +42 -0
  272. package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +351 -0
  273. package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +1464 -0
  274. package/claude-assets/skills/cfn-docker-redis-coordination/tsconfig.json +30 -0
  275. package/claude-assets/skills/cfn-error-logging/.eslintrc.json +57 -0
  276. package/claude-assets/skills/cfn-error-logging/.prettierrc.json +10 -0
  277. package/claude-assets/skills/cfn-error-logging/MIGRATION_SUMMARY.md +485 -0
  278. package/claude-assets/skills/cfn-error-logging/package.json +47 -0
  279. package/claude-assets/skills/cfn-error-logging/src/error-logger.ts +1042 -0
  280. package/claude-assets/skills/cfn-error-logging/src/index.ts +12 -0
  281. package/claude-assets/skills/cfn-error-logging/src/types.ts +456 -0
  282. package/claude-assets/skills/cfn-error-logging/tests/error-logger.test.ts +1302 -0
  283. package/claude-assets/skills/cfn-error-logging/tsconfig.json +38 -0
  284. package/claude-assets/skills/cfn-loop-orchestration/.eslintrc.js +56 -0
  285. package/claude-assets/skills/cfn-loop-orchestration/.prettierrc.json +18 -0
  286. package/claude-assets/skills/cfn-loop-orchestration/README.md +149 -41
  287. package/claude-assets/skills/cfn-loop-orchestration/jest.config.js +67 -0
  288. package/claude-assets/skills/cfn-loop-orchestration/orchestrate-wrapper.sh +268 -0
  289. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +91 -8
  290. package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +5470 -0
  291. package/claude-assets/skills/cfn-loop-orchestration/package.json +49 -0
  292. package/claude-assets/skills/cfn-loop-orchestration/src/agent-spawner/agent-spawner.ts +34 -0
  293. package/claude-assets/skills/cfn-loop-orchestration/src/gate-checker/gate-checker.ts +36 -0
  294. package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +14 -0
  295. package/claude-assets/skills/cfn-loop-orchestration/src/orchestrator/orchestrator.ts +31 -0
  296. package/claude-assets/skills/cfn-loop-orchestration/src/redis/redis-coordinator.ts +72 -0
  297. package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +188 -0
  298. package/claude-assets/skills/cfn-loop-orchestration/src/utils/logger.ts +32 -0
  299. package/claude-assets/skills/cfn-loop-orchestration/tests/setup.ts +22 -0
  300. package/claude-assets/skills/cfn-loop-orchestration/tests/types.test.ts +132 -0
  301. package/claude-assets/skills/cfn-loop-orchestration/tsconfig.json +54 -0
  302. package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/store-context.sh +23 -0
  303. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts +92 -0
  304. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.d.ts.map +1 -0
  305. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js +329 -0
  306. package/claude-assets/skills/cfn-redis-coordination/dist/agent-logger.js.map +1 -0
  307. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts +75 -0
  308. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.d.ts.map +1 -0
  309. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js +302 -0
  310. package/claude-assets/skills/cfn-redis-coordination/dist/agent-recovery.js.map +1 -0
  311. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts +58 -0
  312. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.d.ts.map +1 -0
  313. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js +237 -0
  314. package/claude-assets/skills/cfn-redis-coordination/dist/completion-reporter.js.map +1 -0
  315. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts +63 -0
  316. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.d.ts.map +1 -0
  317. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js +230 -0
  318. package/claude-assets/skills/cfn-redis-coordination/dist/context-manager.js.map +1 -0
  319. package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts +45 -0
  320. package/claude-assets/skills/cfn-redis-coordination/dist/index.d.ts.map +1 -0
  321. package/claude-assets/skills/cfn-redis-coordination/dist/index.js +114 -0
  322. package/claude-assets/skills/cfn-redis-coordination/dist/index.js.map +1 -0
  323. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts +31 -0
  324. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.d.ts.map +1 -0
  325. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js +185 -0
  326. package/claude-assets/skills/cfn-redis-coordination/dist/mode-detector.js.map +1 -0
  327. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts +191 -0
  328. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.d.ts.map +1 -0
  329. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js +509 -0
  330. package/claude-assets/skills/cfn-redis-coordination/dist/redis-client.js.map +1 -0
  331. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts +75 -0
  332. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.d.ts.map +1 -0
  333. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js +281 -0
  334. package/claude-assets/skills/cfn-redis-coordination/dist/result-collector.js.map +1 -0
  335. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts +75 -0
  336. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.d.ts.map +1 -0
  337. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js +354 -0
  338. package/claude-assets/skills/cfn-redis-coordination/dist/swarm-manager.js.map +1 -0
  339. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts +62 -0
  340. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.d.ts.map +1 -0
  341. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js +305 -0
  342. package/claude-assets/skills/cfn-redis-coordination/dist/task-analyzer.js.map +1 -0
  343. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts +97 -0
  344. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.d.ts.map +1 -0
  345. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js +283 -0
  346. package/claude-assets/skills/cfn-redis-coordination/dist/task-executor.js.map +1 -0
  347. package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts +176 -0
  348. package/claude-assets/skills/cfn-redis-coordination/dist/types.d.ts.map +1 -0
  349. package/claude-assets/skills/cfn-redis-coordination/dist/types.js +81 -0
  350. package/claude-assets/skills/cfn-redis-coordination/dist/types.js.map +1 -0
  351. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts +86 -0
  352. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.d.ts.map +1 -0
  353. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js +419 -0
  354. package/claude-assets/skills/cfn-redis-coordination/dist/waiting-coordinator.js.map +1 -0
  355. package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +553 -0
  356. package/claude-assets/skills/cfn-redis-coordination/jest.config.js +23 -0
  357. package/claude-assets/skills/cfn-redis-coordination/package-lock.json +5272 -0
  358. package/claude-assets/skills/cfn-redis-coordination/package.json +45 -0
  359. package/claude-assets/skills/cfn-redis-coordination/redis-cli-wrapper.sh +21 -8
  360. package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +446 -0
  361. package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +454 -0
  362. package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +396 -0
  363. package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +327 -0
  364. package/claude-assets/skills/cfn-redis-coordination/src/index.ts +82 -0
  365. package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +155 -0
  366. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +305 -0
  367. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +283 -0
  368. package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +654 -0
  369. package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +437 -0
  370. package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +494 -0
  371. package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +404 -0
  372. package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +423 -0
  373. package/claude-assets/skills/cfn-redis-coordination/src/types.ts +235 -0
  374. package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +587 -0
  375. package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +70 -0
  376. package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +121 -0
  377. package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +84 -0
  378. package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +391 -0
  379. package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +779 -0
  380. package/claude-assets/skills/cfn-redis-coordination/tsconfig.json +31 -0
  381. package/claude-assets/skills/cfn-skill-propagation/README.md +233 -0
  382. package/claude-assets/skills/cfn-skill-propagation/package-lock.json +5174 -0
  383. package/claude-assets/skills/cfn-skill-propagation/package.json +52 -0
  384. package/claude-assets/skills/cfn-skill-propagation/propagate-skill-update.sh +32 -0
  385. package/claude-assets/skills/cfn-skill-propagation/src/cli.ts +75 -0
  386. package/claude-assets/skills/cfn-skill-propagation/src/database-adapter.ts +239 -0
  387. package/claude-assets/skills/cfn-skill-propagation/src/file-system-adapter.ts +113 -0
  388. package/claude-assets/skills/cfn-skill-propagation/src/index.ts +72 -0
  389. package/claude-assets/skills/cfn-skill-propagation/src/logger.ts +43 -0
  390. package/claude-assets/skills/cfn-skill-propagation/src/metadata-parser.ts +154 -0
  391. package/claude-assets/skills/cfn-skill-propagation/src/skill-propagator.ts +274 -0
  392. package/claude-assets/skills/cfn-skill-propagation/src/skill-validator.ts +179 -0
  393. package/claude-assets/skills/cfn-skill-propagation/src/types.ts +143 -0
  394. package/claude-assets/skills/cfn-skill-propagation/src/version-manager.ts +118 -0
  395. package/claude-assets/skills/cfn-skill-propagation/tests/file-system-adapter.test.ts +91 -0
  396. package/claude-assets/skills/cfn-skill-propagation/tests/metadata-parser.test.ts +176 -0
  397. package/claude-assets/skills/cfn-skill-propagation/tests/skill-propagator.test.ts +209 -0
  398. package/claude-assets/skills/cfn-skill-propagation/tests/skill-validator.test.ts +203 -0
  399. package/claude-assets/skills/cfn-skill-propagation/tests/version-manager.test.ts +115 -0
  400. package/claude-assets/skills/cfn-skill-propagation/tsconfig.json +34 -0
  401. package/claude-assets/skills/task-classifier/SKILL.md +81 -0
  402. package/claude-assets/skills/task-classifier/classify-task.sh +62 -0
  403. package/claude-assets/skills/workflow-codification/package-lock.json +5170 -0
  404. package/claude-assets/skills/workflow-codification/package.json +30 -0
  405. package/claude-assets/skills/workflow-codification/src/index.ts +24 -0
  406. package/claude-assets/skills/workflow-codification/src/pattern-analyzer.ts +537 -0
  407. package/claude-assets/skills/workflow-codification/src/types.ts +180 -0
  408. package/claude-assets/skills/workflow-codification/tests/pattern-analyzer.test.ts +960 -0
  409. package/claude-assets/skills/workflow-codification/tsconfig.json +34 -0
  410. package/claude-assets/skills/workflow-codification/workflow-codification.db +0 -0
  411. package/dist/agent-spawner/agent-spawner.js +448 -0
  412. package/dist/agent-spawner/agent-spawner.js.map +1 -0
  413. package/dist/agent-spawner/index.js +10 -0
  414. package/dist/agent-spawner/index.js.map +1 -0
  415. package/dist/agent-spawner/types.js +14 -0
  416. package/dist/agent-spawner/types.js.map +1 -0
  417. package/dist/agents/agent-loader.js +146 -165
  418. package/dist/agents/agent-loader.js.map +1 -1
  419. package/dist/cli/agent-executor.js +47 -1
  420. package/dist/cli/agent-executor.js.map +1 -1
  421. package/dist/cli/agent-spawn.js +4 -1
  422. package/dist/cli/agent-spawn.js.map +1 -1
  423. package/dist/cli/tool-executor.js +3 -1
  424. package/dist/cli/tool-executor.js.map +1 -1
  425. package/dist/gate-checker/gate-checker.js +292 -0
  426. package/dist/gate-checker/gate-checker.js.map +1 -0
  427. package/dist/gate-checker/types.js +94 -0
  428. package/dist/gate-checker/types.js.map +1 -0
  429. package/dist/lib/database-service/connection-pool-manager.js +2 -1
  430. package/dist/lib/database-service/connection-pool-manager.js.map +1 -1
  431. package/dist/orchestrator/index.js +10 -0
  432. package/dist/orchestrator/index.js.map +1 -0
  433. package/dist/orchestrator/orchestrate.js +496 -0
  434. package/dist/orchestrator/orchestrate.js.map +1 -0
  435. package/dist/orchestrator/types.js +58 -0
  436. package/dist/orchestrator/types.js.map +1 -0
  437. package/package.json +1 -1
  438. package/scripts/switch-api.sh +142 -4
  439. package/scripts/verify-no-secrets.sh +6 -13
  440. package/tests/README.md +175 -58
@@ -0,0 +1,509 @@
1
+ "use strict";
2
+ /**
3
+ * Mode-Aware Redis Client
4
+ *
5
+ * Redis client that automatically stubs operations in Task Mode
6
+ * and executes normally in CLI Mode.
7
+ *
8
+ * CRITICAL ANTI-PATTERN PREVENTION (per audit):
9
+ * - Task Mode: All Redis operations gracefully no-op with warnings
10
+ * - CLI Mode: Full Redis coordination available
11
+ *
12
+ * This prevents the audit finding: "22 agent profiles with unconditional redis-cli"
13
+ */
14
+ var __importDefault = (this && this.__importDefault) || function (mod) {
15
+ return (mod && mod.__esModule) ? mod : { "default": mod };
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.RedisCoordinator = void 0;
19
+ const ioredis_1 = __importDefault(require("ioredis"));
20
+ const types_1 = require("./types");
21
+ const mode_detector_1 = require("./mode-detector");
22
+ /**
23
+ * Mode-aware Redis coordinator
24
+ *
25
+ * Automatically detects Task Mode vs CLI Mode and stubs Redis operations
26
+ * when appropriate. Prevents failures from undefined TASK_ID/AGENT_ID.
27
+ */
28
+ class RedisCoordinator {
29
+ config;
30
+ client = null;
31
+ modeDetection = null;
32
+ logger;
33
+ constructor(config = {}, logger) {
34
+ this.config = config;
35
+ this.logger = logger || new mode_detector_1.ConsoleLogger('[CFN-Redis]');
36
+ }
37
+ /**
38
+ * Initialize the Redis client with mode detection
39
+ *
40
+ * MUST be called before any Redis operations.
41
+ * Detects mode and creates client or stubs accordingly.
42
+ */
43
+ async initialize() {
44
+ // Detect mode first
45
+ this.modeDetection = await (0, mode_detector_1.detectMode)(this.logger);
46
+ // If Task Mode, don't create Redis client at all
47
+ if (this.modeDetection.mode === 'task') {
48
+ this.logger.info('Task Mode: Redis client will be stubbed');
49
+ this.client = null;
50
+ return;
51
+ }
52
+ // If CLI Mode but Redis unavailable, stub
53
+ if (!this.modeDetection.redisAvailable) {
54
+ this.logger.warn('CLI Mode but Redis unavailable: Operations will soft-fail');
55
+ this.client = null;
56
+ return;
57
+ }
58
+ // CLI Mode with Redis available: Create real client
59
+ const host = this.config.host || process.env.REDIS_HOST || 'localhost';
60
+ const port = this.config.port || parseInt(process.env.REDIS_PORT || '6379', 10);
61
+ const password = this.config.password || process.env.REDIS_PASSWORD || process.env.CFN_REDIS_PASSWORD;
62
+ this.client = new ioredis_1.default({
63
+ host,
64
+ port,
65
+ password: password || undefined,
66
+ db: this.config.db || 0,
67
+ connectTimeout: this.config.connectTimeout || 5000,
68
+ commandTimeout: this.config.commandTimeout || 5000,
69
+ retryStrategy: this.config.retryStrategy || ((times) => {
70
+ if (times > 3)
71
+ return null; // Stop retrying after 3 attempts
72
+ return Math.min(times * 100, 2000); // Exponential backoff
73
+ }),
74
+ lazyConnect: false
75
+ });
76
+ // Attach error handlers
77
+ this.client.on('error', (err) => {
78
+ this.logger.error('Redis connection error', err);
79
+ });
80
+ this.client.on('connect', () => {
81
+ this.logger.debug('Redis connected');
82
+ });
83
+ this.logger.info('✅ CLI Mode: Redis client initialized');
84
+ }
85
+ /**
86
+ * Check if Redis operations are safe to execute
87
+ *
88
+ * Agent profiles should check this before attempting Redis operations:
89
+ * ```typescript
90
+ * if (coordinator.canUseRedis) {
91
+ * await coordinator.lpush(...);
92
+ * } else {
93
+ * // Return results directly to Main Chat
94
+ * }
95
+ * ```
96
+ */
97
+ get canUseRedis() {
98
+ return this.modeDetection?.canUseRedis ?? false;
99
+ }
100
+ /**
101
+ * Get current execution mode
102
+ */
103
+ get mode() {
104
+ return this.modeDetection?.mode ?? 'unknown';
105
+ }
106
+ /**
107
+ * Get mode detection details
108
+ */
109
+ getModeDetection() {
110
+ return this.modeDetection;
111
+ }
112
+ /**
113
+ * Graceful stub for Task Mode
114
+ *
115
+ * Logs warning and returns immediately without error.
116
+ * Prevents agent failures from undefined variables.
117
+ */
118
+ gracefulStub(operation, defaultValue) {
119
+ if (!this.modeDetection) {
120
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.INVALID_STATE, 'Redis coordinator not initialized. Call initialize() first.');
121
+ }
122
+ this.logger.warn(`⚠️ Redis operation skipped: ${operation}`);
123
+ this.logger.info(`💡 Reason: ${this.modeDetection.reason}`);
124
+ this.logger.info('🔧 Task Mode agents return results directly to Main Chat');
125
+ return defaultValue;
126
+ }
127
+ /**
128
+ * Check if client is ready
129
+ */
130
+ ensureClient() {
131
+ if (!this.client) {
132
+ if (this.modeDetection?.mode === 'task') {
133
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.MODE_MISMATCH, 'Cannot execute Redis operations in Task Mode', 'task', false);
134
+ }
135
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, 'Redis client not available. Check initialization and Redis connectivity.', this.modeDetection?.mode, true);
136
+ }
137
+ return this.client;
138
+ }
139
+ // ==================== Redis Operations with Graceful Fallback ====================
140
+ /**
141
+ * LPUSH: Push to list (left/head)
142
+ *
143
+ * Gracefully stubs in Task Mode.
144
+ */
145
+ async lpush(key, ...values) {
146
+ if (!this.canUseRedis) {
147
+ return this.gracefulStub(`LPUSH ${key}`, 0);
148
+ }
149
+ try {
150
+ const client = this.ensureClient();
151
+ return await client.lpush(key, ...values);
152
+ }
153
+ catch (error) {
154
+ this.logger.error(`LPUSH failed for key: ${key}`, error);
155
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `LPUSH operation failed: ${error.message}`, this.mode, true);
156
+ }
157
+ }
158
+ /**
159
+ * RPUSH: Push to list (right/tail)
160
+ *
161
+ * Gracefully stubs in Task Mode.
162
+ */
163
+ async rpush(key, ...values) {
164
+ if (!this.canUseRedis) {
165
+ return this.gracefulStub(`RPUSH ${key}`, 0);
166
+ }
167
+ try {
168
+ const client = this.ensureClient();
169
+ return await client.rpush(key, ...values);
170
+ }
171
+ catch (error) {
172
+ this.logger.error(`RPUSH failed for key: ${key}`, error);
173
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `RPUSH operation failed: ${error.message}`, this.mode, true);
174
+ }
175
+ }
176
+ /**
177
+ * BLPOP: Blocking pop from list (left/head)
178
+ *
179
+ * CRITICAL: This is the coordination primitive for agent waiting.
180
+ * Gracefully stubs in Task Mode to prevent indefinite blocking.
181
+ *
182
+ * @param key Key(s) to pop from
183
+ * @param timeout Timeout in seconds
184
+ * @returns [key, value] or null if timeout
185
+ */
186
+ async blpop(...args) {
187
+ if (!this.canUseRedis) {
188
+ const keys = args.slice(0, -1).join(',');
189
+ return this.gracefulStub(`BLPOP ${keys}`, null);
190
+ }
191
+ try {
192
+ const client = this.ensureClient();
193
+ // Handle both forms: blpop(key, timeout) and blpop(key1, key2, ..., timeout)
194
+ const result = await client.blpop(...args);
195
+ return result;
196
+ }
197
+ catch (error) {
198
+ this.logger.error(`BLPOP failed`, error);
199
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `BLPOP operation failed: ${error.message}`, this.mode, true);
200
+ }
201
+ }
202
+ /**
203
+ * HSET: Set hash field
204
+ *
205
+ * Gracefully stubs in Task Mode.
206
+ */
207
+ async hset(key, ...fieldValues) {
208
+ if (!this.canUseRedis) {
209
+ return this.gracefulStub(`HSET ${key}`, 0);
210
+ }
211
+ try {
212
+ const client = this.ensureClient();
213
+ return await client.hset(key, ...fieldValues);
214
+ }
215
+ catch (error) {
216
+ this.logger.error(`HSET failed for key: ${key}`, error);
217
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `HSET operation failed: ${error.message}`, this.mode, true);
218
+ }
219
+ }
220
+ /**
221
+ * HGET: Get hash field
222
+ *
223
+ * Gracefully stubs in Task Mode.
224
+ */
225
+ async hget(key, field) {
226
+ if (!this.canUseRedis) {
227
+ return this.gracefulStub(`HGET ${key} ${field}`, null);
228
+ }
229
+ try {
230
+ const client = this.ensureClient();
231
+ return await client.hget(key, field);
232
+ }
233
+ catch (error) {
234
+ this.logger.error(`HGET failed for key: ${key}, field: ${field}`, error);
235
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `HGET operation failed: ${error.message}`, this.mode, true);
236
+ }
237
+ }
238
+ /**
239
+ * HGETALL: Get all hash fields
240
+ *
241
+ * Gracefully stubs in Task Mode.
242
+ */
243
+ async hgetall(key) {
244
+ if (!this.canUseRedis) {
245
+ return this.gracefulStub(`HGETALL ${key}`, {});
246
+ }
247
+ try {
248
+ const client = this.ensureClient();
249
+ return await client.hgetall(key);
250
+ }
251
+ catch (error) {
252
+ this.logger.error(`HGETALL failed for key: ${key}`, error);
253
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `HGETALL operation failed: ${error.message}`, this.mode, true);
254
+ }
255
+ }
256
+ /**
257
+ * SET: Set string value
258
+ *
259
+ * Gracefully stubs in Task Mode.
260
+ */
261
+ async set(key, value, expiryMode, time) {
262
+ if (!this.canUseRedis) {
263
+ return this.gracefulStub(`SET ${key}`, null);
264
+ }
265
+ try {
266
+ const client = this.ensureClient();
267
+ if (expiryMode && time) {
268
+ const result = await client.set(key, value, expiryMode, time);
269
+ return result;
270
+ }
271
+ const result = await client.set(key, value);
272
+ return result;
273
+ }
274
+ catch (error) {
275
+ this.logger.error(`SET failed for key: ${key}`, error);
276
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `SET operation failed: ${error.message}`, this.mode, true);
277
+ }
278
+ }
279
+ /**
280
+ * GET: Get string value
281
+ *
282
+ * Gracefully stubs in Task Mode.
283
+ */
284
+ async get(key) {
285
+ if (!this.canUseRedis) {
286
+ return this.gracefulStub(`GET ${key}`, null);
287
+ }
288
+ try {
289
+ const client = this.ensureClient();
290
+ return await client.get(key);
291
+ }
292
+ catch (error) {
293
+ this.logger.error(`GET failed for key: ${key}`, error);
294
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `GET operation failed: ${error.message}`, this.mode, true);
295
+ }
296
+ }
297
+ /**
298
+ * DEL: Delete key(s)
299
+ *
300
+ * Gracefully stubs in Task Mode.
301
+ */
302
+ async del(...keys) {
303
+ if (!this.canUseRedis) {
304
+ return this.gracefulStub(`DEL ${keys.join(',')}`, 0);
305
+ }
306
+ try {
307
+ const client = this.ensureClient();
308
+ return await client.del(...keys);
309
+ }
310
+ catch (error) {
311
+ this.logger.error(`DEL failed for keys: ${keys.join(',')}`, error);
312
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `DEL operation failed: ${error.message}`, this.mode, true);
313
+ }
314
+ }
315
+ /**
316
+ * EXPIRE: Set key expiry
317
+ *
318
+ * Gracefully stubs in Task Mode.
319
+ */
320
+ async expire(key, seconds) {
321
+ if (!this.canUseRedis) {
322
+ return this.gracefulStub(`EXPIRE ${key} ${seconds}`, 0);
323
+ }
324
+ try {
325
+ const client = this.ensureClient();
326
+ return await client.expire(key, seconds);
327
+ }
328
+ catch (error) {
329
+ this.logger.error(`EXPIRE failed for key: ${key}`, error);
330
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `EXPIRE operation failed: ${error.message}`, this.mode, true);
331
+ }
332
+ }
333
+ /**
334
+ * PING: Test connection
335
+ *
336
+ * Gracefully stubs in Task Mode.
337
+ */
338
+ async ping() {
339
+ if (!this.canUseRedis) {
340
+ return this.gracefulStub('PING', 'PONG (stubbed)');
341
+ }
342
+ try {
343
+ const client = this.ensureClient();
344
+ return await client.ping();
345
+ }
346
+ catch (error) {
347
+ this.logger.error('PING failed', error);
348
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `PING operation failed: ${error.message}`, this.mode, true);
349
+ }
350
+ }
351
+ /**
352
+ * EXISTS: Check if key exists
353
+ *
354
+ * Gracefully stubs in Task Mode.
355
+ */
356
+ async exists(key) {
357
+ if (!this.canUseRedis) {
358
+ return this.gracefulStub(`EXISTS ${key}`, 0);
359
+ }
360
+ try {
361
+ const client = this.ensureClient();
362
+ return await client.exists(key);
363
+ }
364
+ catch (error) {
365
+ this.logger.error(`EXISTS failed for key: ${key}`, error);
366
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `EXISTS operation failed: ${error.message}`, this.mode, true);
367
+ }
368
+ }
369
+ /**
370
+ * ZADD: Add to sorted set
371
+ *
372
+ * Gracefully stubs in Task Mode.
373
+ */
374
+ async zadd(key, ...args) {
375
+ if (!this.canUseRedis) {
376
+ return this.gracefulStub(`ZADD ${key}`, 0);
377
+ }
378
+ try {
379
+ const client = this.ensureClient();
380
+ return await client.zadd(key, ...args);
381
+ }
382
+ catch (error) {
383
+ this.logger.error(`ZADD failed for key: ${key}`, error);
384
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `ZADD operation failed: ${error.message}`, this.mode, true);
385
+ }
386
+ }
387
+ /**
388
+ * ZREVRANGE: Get sorted set in reverse order
389
+ *
390
+ * Gracefully stubs in Task Mode.
391
+ */
392
+ async zrevrange(key, start, stop) {
393
+ if (!this.canUseRedis) {
394
+ return this.gracefulStub(`ZREVRANGE ${key}`, []);
395
+ }
396
+ try {
397
+ const client = this.ensureClient();
398
+ return await client.zrevrange(key, start, stop);
399
+ }
400
+ catch (error) {
401
+ this.logger.error(`ZREVRANGE failed for key: ${key}`, error);
402
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `ZREVRANGE operation failed: ${error.message}`, this.mode, true);
403
+ }
404
+ }
405
+ /**
406
+ * ZRANGE: Get sorted set
407
+ *
408
+ * Gracefully stubs in Task Mode.
409
+ */
410
+ async zrange(key, start, stop) {
411
+ if (!this.canUseRedis) {
412
+ return this.gracefulStub(`ZRANGE ${key}`, []);
413
+ }
414
+ try {
415
+ const client = this.ensureClient();
416
+ return await client.zrange(key, start, stop);
417
+ }
418
+ catch (error) {
419
+ this.logger.error(`ZRANGE failed for key: ${key}`, error);
420
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `ZRANGE operation failed: ${error.message}`, this.mode, true);
421
+ }
422
+ }
423
+ /**
424
+ * ZREM: Remove from sorted set
425
+ *
426
+ * Gracefully stubs in Task Mode.
427
+ */
428
+ async zrem(key, member) {
429
+ if (!this.canUseRedis) {
430
+ return this.gracefulStub(`ZREM ${key}`, 0);
431
+ }
432
+ try {
433
+ const client = this.ensureClient();
434
+ return await client.zrem(key, member);
435
+ }
436
+ catch (error) {
437
+ this.logger.error(`ZREM failed for key: ${key}`, error);
438
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `ZREM operation failed: ${error.message}`, this.mode, true);
439
+ }
440
+ }
441
+ /**
442
+ * SADD: Add to set
443
+ *
444
+ * Gracefully stubs in Task Mode.
445
+ */
446
+ async sadd(key, ...members) {
447
+ if (!this.canUseRedis) {
448
+ return this.gracefulStub(`SADD ${key}`, 0);
449
+ }
450
+ try {
451
+ const client = this.ensureClient();
452
+ return await client.sadd(key, ...members);
453
+ }
454
+ catch (error) {
455
+ this.logger.error(`SADD failed for key: ${key}`, error);
456
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `SADD operation failed: ${error.message}`, this.mode, true);
457
+ }
458
+ }
459
+ /**
460
+ * SMEMBERS: Get all set members
461
+ *
462
+ * Gracefully stubs in Task Mode.
463
+ */
464
+ async smembers(key) {
465
+ if (!this.canUseRedis) {
466
+ return this.gracefulStub(`SMEMBERS ${key}`, []);
467
+ }
468
+ try {
469
+ const client = this.ensureClient();
470
+ return await client.smembers(key);
471
+ }
472
+ catch (error) {
473
+ this.logger.error(`SMEMBERS failed for key: ${key}`, error);
474
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `SMEMBERS operation failed: ${error.message}`, this.mode, true);
475
+ }
476
+ }
477
+ /**
478
+ * PUBLISH: Publish to channel
479
+ *
480
+ * Gracefully stubs in Task Mode.
481
+ */
482
+ async publish(channel, message) {
483
+ if (!this.canUseRedis) {
484
+ return this.gracefulStub(`PUBLISH ${channel}`, 0);
485
+ }
486
+ try {
487
+ const client = this.ensureClient();
488
+ return await client.publish(channel, message);
489
+ }
490
+ catch (error) {
491
+ this.logger.error(`PUBLISH failed for channel: ${channel}`, error);
492
+ throw new types_1.CoordinationError(types_1.CoordinationErrorType.REDIS_UNAVAILABLE, `PUBLISH operation failed: ${error.message}`, this.mode, true);
493
+ }
494
+ }
495
+ /**
496
+ * Disconnect from Redis
497
+ *
498
+ * Safe to call in Task Mode (no-op).
499
+ */
500
+ async disconnect() {
501
+ if (this.client) {
502
+ await this.client.quit();
503
+ this.client = null;
504
+ this.logger.debug('Redis client disconnected');
505
+ }
506
+ }
507
+ }
508
+ exports.RedisCoordinator = RedisCoordinator;
509
+ //# sourceMappingURL=redis-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redis-client.js","sourceRoot":"","sources":["../src/redis-client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;;;;AAEH,sDAA4B;AAO5B,mCAAmE;AACnE,mDAA4D;AAE5D;;;;;GAKG;AACH,MAAa,gBAAgB;IAMjB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,CAAC;YACzB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;YACnB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;CACF;AAhnBD,4CAgnBC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Result Collector
3
+ *
4
+ * Handles collecting results, confidence scores, and consensus from agents.
5
+ *
6
+ * Migrated from:
7
+ * - collect-results.sh (75 lines)
8
+ * - collect-confidence-scores.sh (209 lines)
9
+ */
10
+ import type { TaskId, AgentId, Logger, ConsensusScore } from './types';
11
+ import { RedisCoordinator } from './redis-client';
12
+ export interface CollectionResult {
13
+ agentId: AgentId;
14
+ confidence: number;
15
+ testPassRate?: number;
16
+ result?: Record<string, unknown>;
17
+ }
18
+ export interface AggregatedScores {
19
+ avgConfidence: number;
20
+ minConfidence: number;
21
+ maxConfidence: number;
22
+ consensus: number;
23
+ agentCount: number;
24
+ scores: ConsensusScore[];
25
+ timestamp: string;
26
+ }
27
+ export declare class ResultCollector {
28
+ private redis;
29
+ private logger;
30
+ constructor(redis: RedisCoordinator, logger: Logger);
31
+ /**
32
+ * Collect results from multiple agents
33
+ *
34
+ * In Task Mode: Returns empty array
35
+ * In CLI Mode: Retrieves from Redis
36
+ */
37
+ collectResults(taskId: TaskId, agentIds: AgentId[], namespace?: string): Promise<CollectionResult[]>;
38
+ /**
39
+ * Collect confidence scores from validator agents
40
+ *
41
+ * In Task Mode: Returns empty array
42
+ * In CLI Mode: Retrieves from Redis and aggregates
43
+ */
44
+ collectConfidenceScores(taskId: TaskId, validatorIds: AgentId[], namespace?: string): Promise<CollectionResult[]>;
45
+ /**
46
+ * Aggregate confidence scores and calculate consensus
47
+ *
48
+ * Calculates average, min, max, and overall consensus score
49
+ */
50
+ aggregateScores(scores: CollectionResult[]): AggregatedScores;
51
+ /**
52
+ * Store aggregated scores in Redis
53
+ *
54
+ * In Task Mode: Logs and returns gracefully
55
+ * In CLI Mode: Stores in Redis
56
+ */
57
+ storeAggregatedScores(taskId: TaskId, aggregated: AggregatedScores, iteration?: number, namespace?: string): Promise<void>;
58
+ /**
59
+ * Get aggregated scores for an iteration
60
+ */
61
+ getAggregatedScores(taskId: TaskId, iteration?: number, namespace?: string): Promise<AggregatedScores | null>;
62
+ /**
63
+ * Get combined results with confidence and test metrics
64
+ */
65
+ getCombinedMetrics(taskId: TaskId, agentIds: AgentId[], namespace?: string): Promise<{
66
+ results: CollectionResult[];
67
+ avgConfidence: number;
68
+ overallTestPassRate?: number;
69
+ }>;
70
+ /**
71
+ * Clear results for a task
72
+ */
73
+ clearResults(taskId: TaskId, agentIds?: AgentId[], namespace?: string): Promise<void>;
74
+ }
75
+ //# sourceMappingURL=result-collector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"result-collector.d.ts","sourceRoot":"","sources":["../src/result-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,MAAM,EACN,OAAO,EACP,MAAM,EACN,cAAc,EACf,MAAM,SAAS,CAAC;AAOjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qBAAa,eAAe;IAExB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,MAAM;gBADN,KAA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