claude-flow-novice 2.15.11 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (636) hide show
  1. package/.claude/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
  2. package/.claude/commands/cfn-loop-cli.md +158 -464
  3. package/.claude/commands/cfn-loop-trigger.md +114 -0
  4. package/.claude/hooks/cfn-invoke-post-edit-ts.sh +100 -0
  5. package/.claude/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
  6. package/.claude/hooks/cfn-invoke-post-edit.sh +22 -0
  7. package/.claude/hooks/cfn-invoke-post-edit.sh.backup +87 -0
  8. package/.claude/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
  9. package/.claude/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
  10. package/.claude/hooks/cfn-invoke-pre-edit.sh +22 -0
  11. package/.claude/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
  12. package/.claude/skills/cfn-agent-spawning/SKILL.md +48 -1
  13. package/.claude/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
  14. package/.claude/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
  15. package/.claude/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
  16. package/.claude/skills/{cfn-redis-coordination/check-dependencies.sh → cfn-agent-spawning/check-dependencies.sh.backup} +3 -5
  17. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
  18. package/.claude/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
  19. package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
  20. package/.claude/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
  21. package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
  22. package/.claude/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
  23. package/.claude/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
  24. package/.claude/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
  25. package/.claude/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
  26. package/.claude/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
  27. package/.claude/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
  28. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
  29. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
  30. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
  31. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
  32. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
  33. package/.claude/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
  34. package/.claude/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
  35. package/.claude/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
  36. package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
  37. package/.claude/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
  38. package/.claude/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
  39. package/.claude/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
  40. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
  41. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
  42. package/.claude/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
  43. package/.claude/skills/cfn-loop-orchestration/SKILL.md +159 -48
  44. package/.claude/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
  45. package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
  46. package/.claude/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
  47. package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
  48. package/.claude/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
  49. package/.claude/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
  50. package/.claude/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
  51. package/.claude/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
  52. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
  53. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
  54. package/{claude-assets/skills/cfn-loop-orchestration → .claude/skills/cfn-loop-orchestration/archive/legacy-bash}/orchestrate-wrapper.sh +11 -1
  55. package/.claude/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
  56. package/.claude/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
  57. package/.claude/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
  58. package/.claude/skills/cfn-loop-orchestration/package-lock.json +3 -0
  59. package/.claude/skills/cfn-loop-orchestration/package.json +4 -0
  60. package/.claude/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
  61. package/.claude/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
  62. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
  63. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
  64. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
  65. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
  66. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
  67. package/.claude/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
  68. package/.claude/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
  69. package/.claude/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
  70. package/.claude/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
  71. package/.claude/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
  72. package/.claude/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
  73. package/.claude/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
  74. package/.claude/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
  75. package/.claude/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
  76. package/.claude/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
  77. package/.claude/skills/cfn-loop-orchestration/src/index.ts +2 -0
  78. package/.claude/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
  79. package/.claude/skills/cfn-loop-orchestration/src/types.ts +56 -0
  80. package/.claude/skills/cfn-loop-orchestration/test-cli.sh +92 -0
  81. package/.claude/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
  82. package/.claude/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
  83. package/.claude/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
  84. package/.claude/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
  85. package/.claude/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
  86. package/.claude/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
  87. package/.claude/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
  88. package/.claude/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
  89. package/.claude/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
  90. package/.claude/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
  91. package/.claude/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
  92. package/.claude/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
  93. package/.claude/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
  94. package/.claude/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
  95. package/.claude/skills/cfn-loop-validation/INDEX.md +531 -0
  96. package/.claude/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
  97. package/.claude/skills/cfn-loop-validation/SKILL.md +48 -1
  98. package/.claude/skills/cfn-loop-validation/SKILL.md.backup +353 -0
  99. package/.claude/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
  100. package/.claude/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
  101. package/.claude/skills/cfn-loop-validation/check-dependencies.sh +22 -0
  102. package/{claude-assets/skills/cfn-redis-coordination/check-dependencies.sh → .claude/skills/cfn-loop-validation/check-dependencies.sh.backup} +4 -5
  103. package/.claude/skills/cfn-loop-validation/detect-vapor.sh +59 -0
  104. package/.claude/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
  105. package/.claude/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
  106. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
  107. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
  108. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
  109. package/.claude/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
  110. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
  111. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
  112. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
  113. package/.claude/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
  114. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
  115. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
  116. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
  117. package/.claude/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
  118. package/.claude/skills/cfn-loop-validation/dist/types.d.ts +156 -0
  119. package/.claude/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
  120. package/.claude/skills/cfn-loop-validation/dist/types.js +66 -0
  121. package/.claude/skills/cfn-loop-validation/dist/types.js.map +1 -0
  122. package/.claude/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
  123. package/.claude/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
  124. package/.claude/skills/cfn-loop-validation/dist/validator.js +411 -0
  125. package/.claude/skills/cfn-loop-validation/dist/validator.js.map +1 -0
  126. package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
  127. package/.claude/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
  128. package/.claude/skills/cfn-loop-validation/package.json +93 -0
  129. package/.claude/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
  130. package/.claude/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
  131. package/.claude/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
  132. package/.claude/skills/cfn-loop-validation/src/types.ts +215 -0
  133. package/.claude/skills/cfn-loop-validation/src/validator.ts +503 -0
  134. package/.claude/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
  135. package/.claude/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
  136. package/.claude/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
  137. package/.claude/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
  138. package/.claude/skills/cfn-loop-validation/validate-gate.sh +63 -0
  139. package/.claude/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
  140. package/.claude/skills/cfn-loop-validation/validate-iteration.sh +22 -0
  141. package/.claude/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
  142. package/.claude/skills/cfn-product-owner-decision/SKILL.md +479 -147
  143. package/.claude/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
  144. package/{claude-assets/skills/cfn-product-owner-decision → .claude/skills/cfn-product-owner-decision/archive/legacy-bash}/execute-decision.sh +24 -2
  145. package/.claude/skills/pre-edit-backup/SKILL.md +324 -0
  146. package/.claude/skills/pre-edit-backup/SKILL.md.backup +277 -0
  147. package/.claude/skills/pre-edit-backup/backup.sh +22 -0
  148. package/.claude/skills/pre-edit-backup/backup.sh.backup +107 -0
  149. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-frontend-coordinator.md +1 -0
  150. package/claude-assets/agents/cfn-dev-team/coordinators/consensus-builder.md +1 -0
  151. package/claude-assets/agents/cfn-dev-team/coordinators/handoff-coordinator.md +1 -0
  152. package/claude-assets/agents/cfn-dev-team/coordinators/multi-sprint-coordinator.md +1 -0
  153. package/claude-assets/agents/cfn-dev-team/dev-ops/devops-engineer.md +10 -0
  154. package/claude-assets/agents/cfn-dev-team/dev-ops/docker-specialist.md +56 -33
  155. package/claude-assets/agents/cfn-dev-team/dev-ops/kubernetes-specialist.md +46 -36
  156. package/claude-assets/agents/cfn-dev-team/dev-ops/monitoring-specialist.md +9 -0
  157. package/claude-assets/agents/cfn-dev-team/developers/api-gateway-specialist.md +17 -17
  158. package/claude-assets/agents/cfn-dev-team/developers/backend-developer.md +40 -58
  159. package/claude-assets/agents/cfn-dev-team/developers/data/data-engineer.md +18 -20
  160. package/claude-assets/agents/cfn-dev-team/developers/database/database-architect.md +19 -28
  161. package/claude-assets/agents/cfn-dev-team/developers/frontend/mobile-dev.md +15 -19
  162. package/claude-assets/agents/cfn-dev-team/developers/frontend/react-frontend-engineer.md +15 -10
  163. package/claude-assets/agents/cfn-dev-team/developers/frontend/typescript-specialist.md +15 -10
  164. package/claude-assets/agents/cfn-dev-team/developers/frontend/ui-designer.md +15 -25
  165. package/claude-assets/agents/cfn-dev-team/developers/graphql-specialist.md +17 -21
  166. package/claude-assets/agents/cfn-dev-team/developers/rust-developer.md +17 -21
  167. package/claude-assets/agents/cfn-dev-team/product-owners/product-owner.md +1 -5
  168. package/claude-assets/agents/cfn-dev-team/reviewers/code-reviewer.md +20 -51
  169. package/claude-assets/agents/cfn-dev-team/reviewers/quality/code-quality-validator.md +22 -71
  170. package/claude-assets/agents/cfn-dev-team/reviewers/quality/perf-analyzer.md +21 -64
  171. package/claude-assets/agents/cfn-dev-team/reviewers/quality/performance-benchmarker.md +22 -67
  172. package/claude-assets/agents/cfn-dev-team/reviewers/quality/security-specialist.md +23 -67
  173. package/claude-assets/agents/cfn-dev-team/testers/api-testing-specialist.md +7 -35
  174. package/claude-assets/agents/cfn-dev-team/testers/chaos-engineering-specialist.md +8 -37
  175. package/claude-assets/agents/cfn-dev-team/testers/contract-tester.md +16 -54
  176. package/claude-assets/agents/cfn-dev-team/testers/integration-tester.md +17 -55
  177. package/claude-assets/agents/cfn-dev-team/testers/interaction-tester.md +9 -37
  178. package/claude-assets/agents/cfn-dev-team/testers/load-testing-specialist.md +17 -55
  179. package/claude-assets/agents/cfn-dev-team/testers/mutation-testing-specialist.md +17 -48
  180. package/claude-assets/agents/cfn-dev-team/testers/playwright-tester.md +8 -37
  181. package/claude-assets/agents/cfn-dev-team/testers/tester.md +7 -27
  182. package/claude-assets/agents/cfn-dev-team/utility/analyst.md +12 -28
  183. package/claude-assets/agents/cfn-dev-team/utility/code-booster.md +13 -13
  184. package/claude-assets/agents/cfn-dev-team/utility/context-curator.md +7 -2
  185. package/claude-assets/agents/cfn-dev-team/utility/epic-creator.md +5 -10
  186. package/claude-assets/agents/cfn-dev-team/utility/memory-leak-specialist.md +120 -714
  187. package/claude-assets/agents/cfn-dev-team/utility/researcher.md +12 -21
  188. package/claude-assets/agents/cfn-dev-team/utility/z-ai-specialist.md +146 -572
  189. package/claude-assets/agents/custom/cfn-docker-expert.md +102 -0
  190. package/claude-assets/agents/custom/cfn-loops-cli-expert.md +129 -0
  191. package/claude-assets/cfn-extras/agents/cfn-v3-coordinator.md +517 -0
  192. package/claude-assets/commands/cfn-loop-cli.md +158 -464
  193. package/claude-assets/commands/cfn-loop-trigger.md +114 -0
  194. package/claude-assets/hooks/SKILL.md +518 -0
  195. package/claude-assets/hooks/SKILL.md.backup +471 -0
  196. package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh +100 -0
  197. package/claude-assets/hooks/cfn-invoke-post-edit-ts.sh.backup +78 -0
  198. package/claude-assets/hooks/cfn-invoke-post-edit.sh +22 -0
  199. package/claude-assets/hooks/cfn-invoke-post-edit.sh.backup +87 -0
  200. package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh +116 -0
  201. package/claude-assets/hooks/cfn-invoke-pre-edit-ts.sh.backup +94 -0
  202. package/claude-assets/hooks/cfn-invoke-pre-edit.sh +22 -0
  203. package/claude-assets/hooks/cfn-invoke-pre-edit.sh.backup +88 -0
  204. package/claude-assets/skills/cfn-agent-selection-with-fallback/DELIVERABLES.md +409 -0
  205. package/claude-assets/skills/cfn-agent-selection-with-fallback/IMPLEMENTATION_SUMMARY.md +396 -0
  206. package/claude-assets/skills/cfn-agent-selection-with-fallback/INTEGRATION_GUIDE.md +308 -0
  207. package/claude-assets/skills/cfn-agent-selection-with-fallback/QUICK_REFERENCE.md +239 -0
  208. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md +107 -1
  209. package/claude-assets/skills/cfn-agent-selection-with-fallback/SKILL.md.backup +302 -0
  210. package/claude-assets/skills/cfn-agent-selection-with-fallback/TYPESCRIPT_MIGRATION.md +295 -0
  211. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.cjs +297 -0
  212. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/agent-selector.js +297 -0
  213. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.cjs +96 -0
  214. package/claude-assets/skills/cfn-agent-selection-with-fallback/dist/cli.js +96 -0
  215. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh +45 -0
  216. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents-ts.sh.backup +23 -0
  217. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh +22 -0
  218. package/claude-assets/skills/cfn-agent-selection-with-fallback/select-agents.sh.backup +173 -0
  219. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.test.ts +357 -0
  220. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/agent-selector.ts +350 -0
  221. package/claude-assets/skills/cfn-agent-selection-with-fallback/src/cli.ts +74 -0
  222. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh +22 -0
  223. package/claude-assets/skills/cfn-agent-selection-with-fallback/task-classifier.sh.backup +71 -0
  224. package/claude-assets/skills/cfn-agent-selection-with-fallback/tsconfig.json +18 -0
  225. package/claude-assets/skills/cfn-agent-spawning/SKILL.md +48 -1
  226. package/claude-assets/skills/cfn-agent-spawning/SKILL.md.backup +135 -0
  227. package/claude-assets/skills/cfn-agent-spawning/TYPESCRIPT_MIGRATION.md +567 -0
  228. package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh +22 -0
  229. package/claude-assets/skills/cfn-agent-spawning/check-dependencies.sh.backup +30 -0
  230. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh +22 -0
  231. package/claude-assets/skills/cfn-agent-spawning/get-agent-provider-env.sh.backup +127 -0
  232. package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh +22 -0
  233. package/claude-assets/skills/cfn-agent-spawning/parse-agent-provider.sh.backup +59 -0
  234. package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh +63 -0
  235. package/claude-assets/skills/cfn-agent-spawning/spawn-agent-wrapper.sh.backup +41 -0
  236. package/claude-assets/skills/cfn-agent-spawning/spawn-agent.sh +26 -1
  237. package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh +22 -0
  238. package/claude-assets/skills/cfn-agent-spawning/spawn-templates.sh.backup +613 -0
  239. package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh +22 -0
  240. package/claude-assets/skills/cfn-agent-spawning/spawn-worker.sh.backup +176 -0
  241. package/claude-assets/skills/cfn-coordination/agent-completion.sh.backup +36 -0
  242. package/claude-assets/skills/cfn-coordination/coordination-signal.sh.backup +36 -0
  243. package/claude-assets/skills/cfn-coordination/coordination-wait.sh.backup +36 -0
  244. package/claude-assets/skills/cfn-dependency-ingestion/README.md +101 -0
  245. package/claude-assets/skills/cfn-dependency-ingestion/SKILL.md +369 -0
  246. package/claude-assets/skills/cfn-dependency-ingestion/build.sh +23 -0
  247. package/claude-assets/skills/cfn-dependency-ingestion/dist/ingest-dependencies.js +478 -0
  248. package/claude-assets/skills/cfn-dependency-ingestion/ingest-dependencies.sh +295 -0
  249. package/claude-assets/skills/cfn-dependency-ingestion/src/ingest-dependencies.ts +563 -0
  250. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/metadata.json +8 -0
  251. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/original +271 -0
  252. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763619700_33aff4a69b99159e4e849107ebc4d09f/revert.sh +7 -0
  253. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/metadata.json +8 -0
  254. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/original +325 -0
  255. package/claude-assets/skills/cfn-loop-orchestration/.backups/unknown/1763671642_06496e8c399a79db08167cc00ed4b31e/revert.sh +7 -0
  256. package/claude-assets/skills/cfn-loop-orchestration/CLI_IMPLEMENTATION_SUMMARY.md +330 -0
  257. package/claude-assets/skills/cfn-loop-orchestration/CONFIGURATION_IMPROVEMENTS.md +318 -0
  258. package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_MIGRATION.md +308 -0
  259. package/claude-assets/skills/cfn-loop-orchestration/CONTEXT_LOOKUP_QUICK_START.md +378 -0
  260. package/claude-assets/skills/cfn-loop-orchestration/E2E_VALIDATION_REPORT.md +262 -0
  261. package/claude-assets/skills/cfn-loop-orchestration/IMPLEMENTATION_SUMMARY.md +319 -519
  262. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_E2E_REPORT.md +299 -0
  263. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_EXECUTION_SUMMARY.md +403 -0
  264. package/claude-assets/skills/cfn-loop-orchestration/NORTH_STAR_INDEX.md +323 -0
  265. package/claude-assets/skills/cfn-loop-orchestration/SKILL.md +159 -48
  266. package/claude-assets/skills/cfn-loop-orchestration/SPAWN_AGENTS_IMPLEMENTATION.md +188 -0
  267. package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_REPORT.md +335 -0
  268. package/claude-assets/skills/cfn-loop-orchestration/TEST_COVERAGE_SUMMARY.md +456 -0
  269. package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_REPORT.md +709 -0
  270. package/claude-assets/skills/cfn-loop-orchestration/TYPESCRIPT_INTEGRATION_SUMMARY.md +257 -0
  271. package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_REPORT.md +572 -0
  272. package/claude-assets/skills/cfn-loop-orchestration/VALIDATION_SUMMARY.txt +196 -0
  273. package/claude-assets/skills/cfn-loop-orchestration/VALIDATOR_MODULE_GUIDE.md +526 -0
  274. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/README.md +167 -0
  275. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate-enhanced.sh +548 -0
  276. package/{.claude/skills/cfn-loop-orchestration → claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash}/orchestrate-wrapper.sh +11 -1
  277. package/claude-assets/skills/cfn-loop-orchestration/archive/legacy-bash/orchestrate.sh +182 -0
  278. package/claude-assets/skills/cfn-loop-orchestration/e2e-validation-fixed.js +240 -0
  279. package/claude-assets/skills/cfn-loop-orchestration/e2e-validation.js +213 -0
  280. package/claude-assets/skills/cfn-loop-orchestration/package-lock.json +3 -0
  281. package/claude-assets/skills/cfn-loop-orchestration/package.json +4 -0
  282. package/claude-assets/skills/cfn-loop-orchestration/run-north-star-e2e.ts +210 -0
  283. package/claude-assets/skills/cfn-loop-orchestration/src/cli/orchestrator-cli.ts +396 -0
  284. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR.md +564 -0
  285. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONFIDENCE_AGGREGATOR_QUICK_REF.md +241 -0
  286. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_IMPLEMENTATION.md +375 -0
  287. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_QUICK_REFERENCE.md +362 -0
  288. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_README.md +307 -0
  289. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/CONTEXT_INJECTOR_USAGE_GUIDE.md +508 -0
  290. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/confidence-aggregator.ts +473 -0
  291. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/consensus.ts +1 -1
  292. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-injector.ts +349 -0
  293. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/context-lookup.ts +486 -0
  294. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/deliverable-verifier.ts +6 -2
  295. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/gate-check.ts +1 -1
  296. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/product-owner-decision.ts +316 -0
  297. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/spawn-agents.ts +357 -0
  298. package/claude-assets/skills/cfn-loop-orchestration/src/helpers/validator.ts +276 -0
  299. package/claude-assets/skills/cfn-loop-orchestration/src/index.ts +2 -0
  300. package/claude-assets/skills/cfn-loop-orchestration/src/orchestrate.ts +743 -2
  301. package/claude-assets/skills/cfn-loop-orchestration/src/types.ts +56 -0
  302. package/claude-assets/skills/cfn-loop-orchestration/test-cli.sh +92 -0
  303. package/claude-assets/skills/cfn-loop-orchestration/test-typescript-integration.sh +442 -0
  304. package/claude-assets/skills/cfn-loop-orchestration/tests/agent-spawner.test.ts +124 -0
  305. package/claude-assets/skills/cfn-loop-orchestration/tests/confidence-aggregator.test.ts +604 -0
  306. package/claude-assets/skills/cfn-loop-orchestration/tests/context-injector.test.ts +561 -0
  307. package/claude-assets/skills/cfn-loop-orchestration/tests/context-lookup.test.ts +661 -0
  308. package/claude-assets/skills/cfn-loop-orchestration/tests/deliverable-verifier.test.ts +2 -2
  309. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-check-edge-cases.test.ts +422 -0
  310. package/claude-assets/skills/cfn-loop-orchestration/tests/gate-checker.test.ts +276 -0
  311. package/claude-assets/skills/cfn-loop-orchestration/tests/logger.test.ts +291 -0
  312. package/claude-assets/skills/cfn-loop-orchestration/tests/north-star-e2e.test.ts +334 -0
  313. package/claude-assets/skills/cfn-loop-orchestration/tests/redis-coordinator.test.ts +321 -0
  314. package/claude-assets/skills/cfn-loop-orchestration/tests/spawn-agents.test.ts +284 -0
  315. package/claude-assets/skills/cfn-loop-orchestration/tests/validator.test.ts +643 -0
  316. package/claude-assets/skills/cfn-loop-output-processing/.eslintrc.json +33 -0
  317. package/claude-assets/skills/cfn-loop-output-processing/DELIVERY_SUMMARY.txt +462 -0
  318. package/claude-assets/skills/cfn-loop-output-processing/DEPRECATION_NOTICE.md +183 -0
  319. package/claude-assets/skills/cfn-loop-output-processing/EXAMPLES.md +609 -0
  320. package/claude-assets/skills/cfn-loop-output-processing/IMPLEMENTATION_SUMMARY.md +418 -0
  321. package/claude-assets/skills/cfn-loop-output-processing/INDEX.md +531 -0
  322. package/claude-assets/skills/cfn-loop-output-processing/MIGRATION.md +362 -0
  323. package/claude-assets/skills/cfn-loop-output-processing/README.md +114 -0
  324. package/claude-assets/skills/cfn-loop-output-processing/SKILL.md +633 -0
  325. package/{.claude/skills/cfn-docker-redis-coordination → claude-assets/skills/cfn-loop-output-processing}/jest.config.js +7 -15
  326. package/claude-assets/skills/cfn-loop-output-processing/package.json +50 -0
  327. package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop2.ts +195 -0
  328. package/claude-assets/skills/cfn-loop-output-processing/src/cli/process-loop3.ts +157 -0
  329. package/claude-assets/skills/cfn-loop-output-processing/src/output-processor.ts +632 -0
  330. package/claude-assets/skills/cfn-loop-output-processing/tests/output-processor.test.ts +617 -0
  331. package/claude-assets/skills/{cfn-docker-redis-coordination → cfn-loop-output-processing}/tsconfig.json +16 -7
  332. package/claude-assets/skills/cfn-loop-validation/IMPLEMENTATION_SUMMARY.md +672 -0
  333. package/claude-assets/skills/cfn-loop-validation/INDEX.md +531 -0
  334. package/claude-assets/skills/cfn-loop-validation/README_TYPESCRIPT.md +454 -0
  335. package/claude-assets/skills/cfn-loop-validation/SKILL.md +48 -1
  336. package/claude-assets/skills/cfn-loop-validation/SKILL.md.backup +353 -0
  337. package/claude-assets/skills/cfn-loop-validation/SKILL_TYPESCRIPT.md +782 -0
  338. package/claude-assets/skills/cfn-loop-validation/VAPOR_DETECTION_EXAMPLES.md +598 -0
  339. package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh +22 -0
  340. package/claude-assets/skills/cfn-loop-validation/check-dependencies.sh.backup +31 -0
  341. package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh +59 -0
  342. package/claude-assets/skills/cfn-loop-validation/detect-vapor.sh.backup +37 -0
  343. package/claude-assets/skills/cfn-loop-validation/dist/.tsbuildinfo +1 -0
  344. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts +14 -0
  345. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.d.ts.map +1 -0
  346. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js +185 -0
  347. package/claude-assets/skills/cfn-loop-validation/dist/cli/detect-vapor.js.map +1 -0
  348. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts +14 -0
  349. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.d.ts.map +1 -0
  350. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js +176 -0
  351. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-deliverables.js.map +1 -0
  352. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts +19 -0
  353. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.d.ts.map +1 -0
  354. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js +123 -0
  355. package/claude-assets/skills/cfn-loop-validation/dist/cli/validate-gate.js.map +1 -0
  356. package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts +156 -0
  357. package/claude-assets/skills/cfn-loop-validation/dist/types.d.ts.map +1 -0
  358. package/claude-assets/skills/cfn-loop-validation/dist/types.js +66 -0
  359. package/claude-assets/skills/cfn-loop-validation/dist/types.js.map +1 -0
  360. package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts +85 -0
  361. package/claude-assets/skills/cfn-loop-validation/dist/validator.d.ts.map +1 -0
  362. package/claude-assets/skills/cfn-loop-validation/dist/validator.js +411 -0
  363. package/claude-assets/skills/cfn-loop-validation/dist/validator.js.map +1 -0
  364. package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh +22 -0
  365. package/claude-assets/skills/cfn-loop-validation/orchestrate-cfn-loop.sh.backup +252 -0
  366. package/claude-assets/skills/cfn-loop-validation/package.json +93 -0
  367. package/claude-assets/skills/cfn-loop-validation/src/cli/detect-vapor.ts +177 -0
  368. package/claude-assets/skills/cfn-loop-validation/src/cli/validate-deliverables.ts +161 -0
  369. package/claude-assets/skills/cfn-loop-validation/src/cli/validate-gate.ts +139 -0
  370. package/claude-assets/skills/cfn-loop-validation/src/types.ts +215 -0
  371. package/claude-assets/skills/cfn-loop-validation/src/validator.ts +503 -0
  372. package/claude-assets/skills/cfn-loop-validation/tests/validator.test.ts +537 -0
  373. package/claude-assets/skills/{cfn-redis-coordination → cfn-loop-validation}/tsconfig.json +34 -31
  374. package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh +59 -0
  375. package/claude-assets/skills/cfn-loop-validation/validate-deliverables.sh.backup +37 -0
  376. package/claude-assets/skills/cfn-loop-validation/validate-gate.sh +63 -0
  377. package/claude-assets/skills/cfn-loop-validation/validate-gate.sh.backup +41 -0
  378. package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh +22 -0
  379. package/claude-assets/skills/cfn-loop-validation/validate-iteration.sh.backup +134 -0
  380. package/claude-assets/skills/cfn-product-owner-decision/SKILL.md +479 -147
  381. package/claude-assets/skills/cfn-product-owner-decision/TYPESCRIPT_IMPLEMENTATION.md +653 -0
  382. package/{.claude/skills/cfn-product-owner-decision → claude-assets/skills/cfn-product-owner-decision/archive/legacy-bash}/execute-decision.sh +24 -2
  383. package/claude-assets/skills/cfn-provider-routing/README.md +129 -0
  384. package/claude-assets/skills/cfn-provider-routing/SKILL.md +192 -0
  385. package/claude-assets/skills/cfn-provider-routing/resolve-provider-model.ts +223 -0
  386. package/claude-assets/skills/pre-edit-backup/SKILL.md +324 -0
  387. package/claude-assets/skills/pre-edit-backup/SKILL.md.backup +277 -0
  388. package/claude-assets/skills/pre-edit-backup/backup.sh +22 -0
  389. package/claude-assets/skills/pre-edit-backup/backup.sh.backup +107 -0
  390. package/dist/agents/agent-loader.js +146 -165
  391. package/dist/agents/agent-loader.js.map +1 -1
  392. package/dist/api/auth-endpoints.js +415 -0
  393. package/dist/api/auth-endpoints.js.map +1 -0
  394. package/dist/api/task-endpoints.js +562 -0
  395. package/dist/api/task-endpoints.js.map +1 -0
  396. package/dist/backend/server.js +418 -0
  397. package/dist/backend/server.js.map +1 -0
  398. package/dist/cfn-loop/product-owner/decision-parser.js +356 -0
  399. package/dist/cfn-loop/product-owner/decision-parser.js.map +1 -0
  400. package/dist/cfn-loop/product-owner/index.js +1 -0
  401. package/dist/cfn-loop/product-owner/index.js.map +1 -1
  402. package/dist/cli/agent-command.js +1 -1
  403. package/dist/cli/agent-command.js.map +1 -1
  404. package/dist/cli/agent-completion.js +273 -0
  405. package/dist/cli/agent-completion.js.map +1 -0
  406. package/dist/cli/agent-prompt-builder.js +83 -48
  407. package/dist/cli/agent-prompt-builder.js.map +1 -1
  408. package/dist/cli/agent-spawner.js +499 -0
  409. package/dist/cli/agent-spawner.js.map +1 -0
  410. package/dist/cli/anthropic-client.js +10 -3
  411. package/dist/cli/anthropic-client.js.map +1 -1
  412. package/dist/cli/config-manager.js +91 -109
  413. package/dist/cli/index.js +11 -0
  414. package/dist/cli/index.js.map +1 -1
  415. package/dist/cli/parse-decision-cli.js +268 -0
  416. package/dist/cli/parse-decision-cli.js.map +1 -0
  417. package/dist/cli/post-edit-hook.js +83 -0
  418. package/dist/cli/post-edit-hook.js.map +1 -0
  419. package/dist/cli/pre-edit-hook.js +77 -0
  420. package/dist/cli/pre-edit-hook.js.map +1 -0
  421. package/dist/cli/spawn-agent-cli.js +209 -0
  422. package/dist/cli/spawn-agent-cli.js.map +1 -0
  423. package/dist/coordination/coordination-wrapper.js +383 -0
  424. package/dist/coordination/coordination-wrapper.js.map +1 -0
  425. package/dist/coordination/store-success-criteria.js +68 -0
  426. package/dist/coordination/store-success-criteria.js.map +1 -0
  427. package/dist/coordination/store-task-context.js +65 -0
  428. package/dist/coordination/store-task-context.js.map +1 -0
  429. package/dist/hooks/backup-manager.js +273 -0
  430. package/dist/hooks/backup-manager.js.map +1 -0
  431. package/dist/hooks/post-edit-validator.js +388 -0
  432. package/dist/hooks/post-edit-validator.js.map +1 -0
  433. package/dist/integration/index.js +19 -0
  434. package/dist/integration/index.js.map +1 -0
  435. package/dist/integration/task-mode-adapter.js +297 -0
  436. package/dist/integration/task-mode-adapter.js.map +1 -0
  437. package/dist/integration/trigger-dev-client.js +253 -0
  438. package/dist/integration/trigger-dev-client.js.map +1 -0
  439. package/dist/integration/trigger-dev-webhooks.js +362 -0
  440. package/dist/integration/trigger-dev-webhooks.js.map +1 -0
  441. package/dist/lib/path-validator.js +14 -5
  442. package/dist/lib/path-validator.js.map +1 -1
  443. package/dist/lib/redis-queue-manager.js +5 -1
  444. package/dist/lib/redis-queue-manager.js.map +1 -1
  445. package/dist/middleware/authentication.js +317 -0
  446. package/dist/middleware/authentication.js.map +1 -0
  447. package/dist/services/authentication.js +669 -0
  448. package/dist/services/authentication.js.map +1 -0
  449. package/dist/services/session-management.js +436 -0
  450. package/dist/services/session-management.js.map +1 -0
  451. package/dist/services/skill-deployment.js +8 -6
  452. package/dist/services/skill-deployment.js.map +1 -1
  453. package/dist/services/user-service.js +710 -0
  454. package/dist/services/user-service.js.map +1 -0
  455. package/dist/types/trigger-dev-events.d.js +10 -0
  456. package/dist/types/trigger-dev-events.d.js.map +1 -0
  457. package/docs/README.md +240 -0
  458. package/package.json +13 -4
  459. package/scripts/compare-workflow-performance.sh +556 -0
  460. package/scripts/migrate-to-optimized-workflows.sh +438 -0
  461. package/scripts/organize-docs.sh +338 -0
  462. package/scripts/trigger-dev-setup.sh +267 -0
  463. package/.claude/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
  464. package/.claude/skills/cfn-docker-redis-coordination/README.md +0 -294
  465. package/.claude/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
  466. package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
  467. package/.claude/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
  468. package/.claude/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
  469. package/.claude/skills/cfn-docker-redis-coordination/package.json +0 -40
  470. package/.claude/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
  471. package/.claude/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
  472. package/.claude/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
  473. package/.claude/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
  474. package/.claude/skills/cfn-docker-redis-coordination/tsconfig.json +0 -30
  475. package/.claude/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
  476. package/.claude/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
  477. package/.claude/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
  478. package/.claude/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
  479. package/.claude/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
  480. package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
  481. package/.claude/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
  482. package/.claude/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
  483. package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
  484. package/.claude/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
  485. package/.claude/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
  486. package/.claude/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
  487. package/.claude/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
  488. package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
  489. package/.claude/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
  490. package/.claude/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
  491. package/.claude/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
  492. package/.claude/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
  493. package/.claude/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
  494. package/.claude/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
  495. package/.claude/skills/cfn-redis-coordination/config.json +0 -61
  496. package/.claude/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
  497. package/.claude/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
  498. package/.claude/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
  499. package/.claude/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
  500. package/.claude/skills/cfn-redis-coordination/jest.config.js +0 -23
  501. package/.claude/skills/cfn-redis-coordination/package-lock.json +0 -5272
  502. package/.claude/skills/cfn-redis-coordination/package.json +0 -45
  503. package/.claude/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
  504. package/.claude/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
  505. package/.claude/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
  506. package/.claude/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
  507. package/.claude/skills/cfn-redis-coordination/src/index.ts +0 -82
  508. package/.claude/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
  509. package/.claude/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
  510. package/.claude/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
  511. package/.claude/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
  512. package/.claude/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
  513. package/.claude/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
  514. package/.claude/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
  515. package/.claude/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
  516. package/.claude/skills/cfn-redis-coordination/src/types.ts +0 -235
  517. package/.claude/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
  518. package/.claude/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
  519. package/.claude/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
  520. package/.claude/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
  521. package/.claude/skills/cfn-redis-coordination/test-redis-check.js +0 -84
  522. package/.claude/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
  523. package/.claude/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
  524. package/.claude/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
  525. package/claude-assets/agents/cfn-dev-team/coordinators/cfn-v3-coordinator.md +0 -980
  526. package/claude-assets/agents/typescript-specialist.md +0 -280
  527. package/claude-assets/skills/cfn-docker-redis-coordination/MIGRATION_SUMMARY.md +0 -348
  528. package/claude-assets/skills/cfn-docker-redis-coordination/README.md +0 -294
  529. package/claude-assets/skills/cfn-docker-redis-coordination/SKILL.md +0 -435
  530. package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh +0 -650
  531. package/claude-assets/skills/cfn-docker-redis-coordination/coordinate.sh.backup-1763145142 +0 -641
  532. package/claude-assets/skills/cfn-docker-redis-coordination/jest.config.js +0 -37
  533. package/claude-assets/skills/cfn-docker-redis-coordination/package-lock.json +0 -5259
  534. package/claude-assets/skills/cfn-docker-redis-coordination/package.json +0 -40
  535. package/claude-assets/skills/cfn-docker-redis-coordination/src/coordinator.ts +0 -801
  536. package/claude-assets/skills/cfn-docker-redis-coordination/src/index.ts +0 -42
  537. package/claude-assets/skills/cfn-docker-redis-coordination/src/types.ts +0 -351
  538. package/claude-assets/skills/cfn-docker-redis-coordination/tests/coordinator.test.ts +0 -1464
  539. package/claude-assets/skills/cfn-loop-orchestration/helpers/auto-tune-timeouts.sh +0 -228
  540. package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus-ts.sh +0 -104
  541. package/claude-assets/skills/cfn-loop-orchestration/helpers/consensus.sh +0 -94
  542. package/claude-assets/skills/cfn-loop-orchestration/helpers/context-injection.sh +0 -142
  543. package/claude-assets/skills/cfn-loop-orchestration/helpers/context-lookup.sh +0 -359
  544. package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier-ts.sh +0 -123
  545. package/claude-assets/skills/cfn-loop-orchestration/helpers/deliverable-verifier.sh +0 -71
  546. package/claude-assets/skills/cfn-loop-orchestration/helpers/gate-check.sh +0 -56
  547. package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager-ts.sh +0 -89
  548. package/claude-assets/skills/cfn-loop-orchestration/helpers/iteration-manager.sh +0 -87
  549. package/claude-assets/skills/cfn-loop-orchestration/helpers/orchestrate-ts.sh +0 -104
  550. package/claude-assets/skills/cfn-loop-orchestration/helpers/parse-test-results.sh +0 -56
  551. package/claude-assets/skills/cfn-loop-orchestration/helpers/spawn-agents.sh +0 -290
  552. package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator-ts.sh +0 -47
  553. package/claude-assets/skills/cfn-loop-orchestration/helpers/timeout-calculator.sh +0 -51
  554. package/claude-assets/skills/cfn-loop-orchestration/orchestrate.sh +0 -1345
  555. package/claude-assets/skills/cfn-redis-cleanup/cleanup-redis.sh +0 -130
  556. package/claude-assets/skills/cfn-redis-coordination/AGENT_LOGGING.md +0 -280
  557. package/claude-assets/skills/cfn-redis-coordination/BZPOPMIN_FIX_SUMMARY.md +0 -209
  558. package/claude-assets/skills/cfn-redis-coordination/CENTRALIZED_REDIS_WRAPPER.md +0 -319
  559. package/claude-assets/skills/cfn-redis-coordination/agent-log.sh.bak +0 -124
  560. package/claude-assets/skills/cfn-redis-coordination/config.json +0 -61
  561. package/claude-assets/skills/cfn-redis-coordination/demos/phase4-wake-queue-test-report.md +0 -82
  562. package/claude-assets/skills/cfn-redis-coordination/demos/test-bzpopmin-fix.sh +0 -274
  563. package/claude-assets/skills/cfn-redis-coordination/demos/test-cancel-swarm.sh +0 -0
  564. package/claude-assets/skills/cfn-redis-coordination/docs/migration/PHASE_3_REDIS_COORDINATION_COMPLETION_REPORT.md +0 -553
  565. package/claude-assets/skills/cfn-redis-coordination/jest.config.js +0 -23
  566. package/claude-assets/skills/cfn-redis-coordination/package-lock.json +0 -5272
  567. package/claude-assets/skills/cfn-redis-coordination/package.json +0 -45
  568. package/claude-assets/skills/cfn-redis-coordination/src/agent-logger.ts +0 -446
  569. package/claude-assets/skills/cfn-redis-coordination/src/agent-recovery.ts +0 -454
  570. package/claude-assets/skills/cfn-redis-coordination/src/completion-reporter.ts +0 -396
  571. package/claude-assets/skills/cfn-redis-coordination/src/context-manager.ts +0 -327
  572. package/claude-assets/skills/cfn-redis-coordination/src/index.ts +0 -82
  573. package/claude-assets/skills/cfn-redis-coordination/src/mode-detector.ts +0 -155
  574. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-client.ts +0 -305
  575. package/claude-assets/skills/cfn-redis-coordination/src/redis/redis-functions.ts +0 -283
  576. package/claude-assets/skills/cfn-redis-coordination/src/redis-client.ts +0 -654
  577. package/claude-assets/skills/cfn-redis-coordination/src/result-collector.ts +0 -437
  578. package/claude-assets/skills/cfn-redis-coordination/src/swarm-manager.ts +0 -494
  579. package/claude-assets/skills/cfn-redis-coordination/src/task-analyzer.ts +0 -404
  580. package/claude-assets/skills/cfn-redis-coordination/src/task-executor.ts +0 -423
  581. package/claude-assets/skills/cfn-redis-coordination/src/types.ts +0 -235
  582. package/claude-assets/skills/cfn-redis-coordination/src/waiting-coordinator.ts +0 -587
  583. package/claude-assets/skills/cfn-redis-coordination/store-success-criteria.sh +0 -85
  584. package/claude-assets/skills/cfn-redis-coordination/test-connection-attempts.js +0 -70
  585. package/claude-assets/skills/cfn-redis-coordination/test-mode-simple.js +0 -121
  586. package/claude-assets/skills/cfn-redis-coordination/test-redis-check.js +0 -84
  587. package/claude-assets/skills/cfn-redis-coordination/test-task-mode-redis.cjs +0 -391
  588. package/claude-assets/skills/cfn-redis-coordination/tests/coordination.test.ts +0 -788
  589. package/claude-assets/skills/cfn-redis-coordination/update-all-scripts.sh +0 -67
  590. package/claude-assets/skills/cfn-redis-data-extraction/SKILL.md +0 -442
  591. package/claude-assets/skills/cfn-redis-data-extraction/extract.sh +0 -306
  592. package/dist/coordination/index.js +0 -25
  593. package/dist/coordination/index.js.map +0 -1
  594. package/docs/BUG_19_MEMORY_LEAK_TASK_MODE.md +0 -405
  595. package/docs/MEMORY_CLEANUP_GUIDE.md +0 -358
  596. package/docs/MEMORY_LEAK_FIX_SUMMARY.md +0 -322
  597. package/docs/REDIS_CLEANUP_EXECUTIVE_SUMMARY.md +0 -319
  598. package/docs/REDIS_CLEANUP_VERIFICATION_REPORT.md +0 -574
  599. /package/.claude/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
  600. /package/.claude/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
  601. /package/.claude/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
  602. /package/.claude/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
  603. /package/.claude/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
  604. /package/.claude/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
  605. /package/.claude/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
  606. /package/.claude/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
  607. /package/.claude/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
  608. /package/.claude/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
  609. /package/.claude/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
  610. /package/.claude/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
  611. /package/.claude/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
  612. /package/.claude/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
  613. /package/.claude/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
  614. /package/.claude/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
  615. /package/.claude/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
  616. /package/.claude/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
  617. /package/.claude/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
  618. /package/claude-assets/skills/cfn-loop-orchestration/{inject-loop-context.sh → archive/legacy-bash/inject-loop-context.sh} +0 -0
  619. /package/claude-assets/skills/cfn-loop-orchestration/{monitor-execution.sh → archive/legacy-bash/monitor-execution.sh} +0 -0
  620. /package/claude-assets/skills/cfn-redis-coordination/{agent-log.sh → agent-log.sh.backup} +0 -0
  621. /package/claude-assets/skills/cfn-redis-coordination/{agent-recovery.sh → agent-recovery.sh.backup} +0 -0
  622. /package/claude-assets/skills/cfn-redis-coordination/{analyze-task-complexity.sh → analyze-task-complexity.sh.backup} +0 -0
  623. /package/claude-assets/skills/cfn-redis-coordination/bash-wrappers/{store-context.sh → store-context.sh.backup} +0 -0
  624. /package/claude-assets/skills/cfn-redis-coordination/{cancel-swarm.sh → cancel-swarm.sh.backup} +0 -0
  625. /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-exec.sh → cfn-loop-exec.sh.backup} +0 -0
  626. /package/claude-assets/skills/cfn-redis-coordination/{cfn-loop-relaunch.sh → cfn-loop-relaunch.sh.backup} +0 -0
  627. /package/claude-assets/skills/cfn-redis-coordination/{collect-confidence-scores.sh → collect-confidence-scores.sh.backup} +0 -0
  628. /package/claude-assets/skills/cfn-redis-coordination/{collect-results.sh → collect-results.sh.backup} +0 -0
  629. /package/claude-assets/skills/cfn-redis-coordination/{complete-swarm.sh → complete-swarm.sh.backup} +0 -0
  630. /package/claude-assets/skills/cfn-redis-coordination/{get-context.sh → get-context.sh.backup} +0 -0
  631. /package/claude-assets/skills/cfn-redis-coordination/{get-success-criteria.sh → get-success-criteria.sh.backup} +0 -0
  632. /package/claude-assets/skills/cfn-redis-coordination/{invoke-waiting-mode.sh → invoke-waiting-mode.sh.backup} +0 -0
  633. /package/claude-assets/skills/cfn-redis-coordination/{redis-cli-wrapper.sh → redis-cli-wrapper.sh.backup} +0 -0
  634. /package/claude-assets/skills/cfn-redis-coordination/{redis-functions.sh → redis-functions.sh.backup} +0 -0
  635. /package/claude-assets/skills/cfn-redis-coordination/{report-completion.sh → report-completion.sh.backup} +0 -0
  636. /package/claude-assets/skills/cfn-redis-coordination/{store-context.sh → store-context.sh.backup} +0 -0
@@ -0,0 +1,388 @@
1
+ /**
2
+ * Post-Edit Validator - File validation after modifications
3
+ * Runs syntax, formatting, and linting checks on edited files
4
+ */ import * as fs from 'fs/promises';
5
+ import * as path from 'path';
6
+ import { spawn } from 'child_process';
7
+ export class PostEditValidator {
8
+ config;
9
+ projectRoot;
10
+ configPath;
11
+ constructor(projectRoot = process.cwd()){
12
+ this.projectRoot = projectRoot;
13
+ this.configPath = path.join(projectRoot, '.claude/hooks/cfn-post-edit.config.json');
14
+ this.config = {
15
+ checkSyntax: true,
16
+ checkFormatting: true,
17
+ checkDuplication: false,
18
+ blockingValidation: false
19
+ };
20
+ }
21
+ /**
22
+ * Load validation config from JSON file
23
+ */ async loadConfig() {
24
+ try {
25
+ const configContent = await fs.readFile(this.configPath, 'utf-8');
26
+ const rawConfig = JSON.parse(configContent);
27
+ // Merge with defaults
28
+ this.config = {
29
+ checkSyntax: rawConfig.validation?.syntax?.enabled ?? true,
30
+ checkFormatting: rawConfig.validation?.formatting?.enabled ?? true,
31
+ checkDuplication: rawConfig.validation?.duplication?.enabled ?? false,
32
+ blockingValidation: rawConfig.blocking ?? false,
33
+ typescript: rawConfig.validation?.typescript ?? {
34
+ enabled: true,
35
+ noEmit: true,
36
+ skipLibCheck: true
37
+ },
38
+ bash: rawConfig.validation?.bash ?? {
39
+ enabled: true,
40
+ validators: [
41
+ 'pipe-safety',
42
+ 'dependency-checker',
43
+ 'line-endings'
44
+ ],
45
+ timeout: 5000
46
+ }
47
+ };
48
+ return this.config;
49
+ } catch (error) {
50
+ // Return defaults if config not found
51
+ return this.config;
52
+ }
53
+ }
54
+ /**
55
+ * Get file extension to determine file type
56
+ */ getFileExtension(filePath) {
57
+ return path.extname(filePath).toLowerCase();
58
+ }
59
+ /**
60
+ * Validate TypeScript/JavaScript files
61
+ */ async validateTypeScript(filePath) {
62
+ const startTime = Date.now();
63
+ const result = {
64
+ passed: true,
65
+ errors: [],
66
+ warnings: [],
67
+ suggestions: [],
68
+ timestamp: new Date().toISOString(),
69
+ filePath,
70
+ executionTime: 0
71
+ };
72
+ try {
73
+ // Check if tsc is available
74
+ const tscPath = path.join(this.projectRoot, 'node_modules/.bin/tsc');
75
+ await fs.stat(tscPath);
76
+ return await this.runTypeScriptCheck(filePath, result);
77
+ } catch {
78
+ // TypeScript not available, skip
79
+ result.warnings.push('TypeScript compiler not available, skipping type checking');
80
+ }
81
+ result.executionTime = Date.now() - startTime;
82
+ return result;
83
+ }
84
+ /**
85
+ * Run TypeScript compilation check
86
+ */ runTypeScriptCheck(filePath, result) {
87
+ return new Promise((resolve)=>{
88
+ try {
89
+ const tsc = spawn('npx', [
90
+ 'tsc',
91
+ '--noEmit',
92
+ filePath
93
+ ], {
94
+ cwd: this.projectRoot,
95
+ timeout: 10000
96
+ });
97
+ let stderr = '';
98
+ let stdout = '';
99
+ tsc.stdout?.on('data', (data)=>{
100
+ stdout += data.toString();
101
+ });
102
+ tsc.stderr?.on('data', (data)=>{
103
+ stderr += data.toString();
104
+ });
105
+ tsc.on('close', (code)=>{
106
+ if (code !== 0 && stdout) {
107
+ result.passed = false;
108
+ result.errors.push(`TypeScript compilation failed:\n${stdout}`);
109
+ }
110
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
111
+ resolve(result);
112
+ });
113
+ tsc.on('error', (error)=>{
114
+ result.warnings.push(`TypeScript check skipped: ${error.message}`);
115
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
116
+ resolve(result);
117
+ });
118
+ } catch (error) {
119
+ result.warnings.push(`Failed to run TypeScript check: ${error}`);
120
+ result.executionTime = Date.now() - new Date(result.timestamp).getTime();
121
+ resolve(result);
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Validate Bash scripts
127
+ */ async validateBash(filePath) {
128
+ const startTime = Date.now();
129
+ const result = {
130
+ passed: true,
131
+ errors: [],
132
+ warnings: [],
133
+ suggestions: [],
134
+ timestamp: new Date().toISOString(),
135
+ filePath,
136
+ executionTime: 0
137
+ };
138
+ try {
139
+ // Run basic bash syntax check with bash -n
140
+ const content = await fs.readFile(filePath, 'utf-8');
141
+ // Check for common bash issues
142
+ if (content.includes('[ -z')) {
143
+ result.warnings.push('Consider using [[ -z instead of [ -z for more robust string checking');
144
+ }
145
+ if (content.match(/\|\s*while.*read/)) {
146
+ result.warnings.push('Pipe to while-read can cause issues with variable scope, consider using process substitution');
147
+ }
148
+ if (!content.includes('set -euo pipefail')) {
149
+ result.suggestions.push('Add "set -euo pipefail" at the top of the script for safety');
150
+ }
151
+ // Check for unquoted variables
152
+ const unquotedVars = content.match(/\$\w+(?![\w"}])/g) || [];
153
+ if (unquotedVars.length > 0) {
154
+ result.warnings.push(`Found ${unquotedVars.length} potentially unquoted variables - consider quoting them`);
155
+ }
156
+ result.executionTime = Date.now() - startTime;
157
+ return result;
158
+ } catch (error) {
159
+ result.errors.push(`Bash validation failed: ${error}`);
160
+ result.passed = false;
161
+ result.executionTime = Date.now() - startTime;
162
+ return result;
163
+ }
164
+ }
165
+ /**
166
+ * Validate JSON files
167
+ */ async validateJSON(filePath) {
168
+ const startTime = Date.now();
169
+ const result = {
170
+ passed: true,
171
+ errors: [],
172
+ warnings: [],
173
+ suggestions: [],
174
+ timestamp: new Date().toISOString(),
175
+ filePath,
176
+ executionTime: 0
177
+ };
178
+ try {
179
+ const content = await fs.readFile(filePath, 'utf-8');
180
+ JSON.parse(content);
181
+ } catch (error) {
182
+ result.passed = false;
183
+ result.errors.push(`JSON validation failed: ${error}`);
184
+ }
185
+ result.executionTime = Date.now() - startTime;
186
+ return result;
187
+ }
188
+ /**
189
+ * Check for code duplication
190
+ */ async checkDuplication(filePath) {
191
+ const startTime = Date.now();
192
+ const result = {
193
+ passed: true,
194
+ errors: [],
195
+ warnings: [],
196
+ suggestions: [],
197
+ timestamp: new Date().toISOString(),
198
+ filePath,
199
+ executionTime: 0
200
+ };
201
+ try {
202
+ const content = await fs.readFile(filePath, 'utf-8');
203
+ const lines = content.split('\n');
204
+ // Check for duplicate consecutive lines
205
+ const seenLines = new Map();
206
+ for(let i = 0; i < lines.length; i++){
207
+ const line = lines[i].trim();
208
+ if (line && line.length > 20) {
209
+ // Only check non-trivial lines
210
+ const count = seenLines.get(line) || 0;
211
+ if (count > 0) {
212
+ result.suggestions.push(`Duplicate line found at line ${i + 1}: "${line.substring(0, 50)}..."`);
213
+ }
214
+ seenLines.set(line, count + 1);
215
+ }
216
+ }
217
+ } catch (error) {
218
+ result.warnings.push(`Duplication check skipped: ${error}`);
219
+ }
220
+ result.executionTime = Date.now() - startTime;
221
+ return result;
222
+ }
223
+ /**
224
+ * Check file formatting consistency
225
+ */ async checkFormatting(filePath) {
226
+ const startTime = Date.now();
227
+ const result = {
228
+ passed: true,
229
+ errors: [],
230
+ warnings: [],
231
+ suggestions: [],
232
+ timestamp: new Date().toISOString(),
233
+ filePath,
234
+ executionTime: 0
235
+ };
236
+ try {
237
+ const content = await fs.readFile(filePath, 'utf-8');
238
+ const lines = content.split('\n');
239
+ // Check for mixed line endings
240
+ const hasWindowsLineEndings = content.includes('\r\n');
241
+ const hasUnixLineEndings = content.includes('\n');
242
+ if (hasWindowsLineEndings && hasUnixLineEndings) {
243
+ result.warnings.push('Mixed line endings detected (CRLF and LF)');
244
+ }
245
+ // Check for trailing whitespace
246
+ let trailingWhitespaceCount = 0;
247
+ for (const line of lines){
248
+ if (line !== line.trimRight()) {
249
+ trailingWhitespaceCount++;
250
+ }
251
+ }
252
+ if (trailingWhitespaceCount > 0) {
253
+ result.suggestions.push(`${trailingWhitespaceCount} lines have trailing whitespace`);
254
+ }
255
+ // Check for tabs vs spaces
256
+ const hasTabs = content.includes('\t');
257
+ const hasSpaces = /^ +/.test(content);
258
+ if (hasTabs && hasSpaces) {
259
+ result.warnings.push('Mixed tabs and spaces detected');
260
+ }
261
+ } catch (error) {
262
+ result.warnings.push(`Formatting check skipped: ${error}`);
263
+ }
264
+ result.executionTime = Date.now() - startTime;
265
+ return result;
266
+ }
267
+ /**
268
+ * Run full validation pipeline on a file
269
+ */ async validateFile(filePath, agentId) {
270
+ try {
271
+ await this.loadConfig();
272
+ // Validate file exists
273
+ await fs.stat(filePath);
274
+ } catch {
275
+ return {
276
+ passed: false,
277
+ errors: [
278
+ `File does not exist: ${filePath}`
279
+ ],
280
+ warnings: [],
281
+ suggestions: [],
282
+ timestamp: new Date().toISOString(),
283
+ filePath,
284
+ executionTime: 0
285
+ };
286
+ }
287
+ // Run validation pipeline
288
+ return await this.runValidationPipeline(filePath);
289
+ }
290
+ /**
291
+ * Execute complete validation pipeline
292
+ */ async runValidationPipeline(filePath) {
293
+ const startTime = Date.now();
294
+ const ext = this.getFileExtension(filePath);
295
+ const aggregatedResult = {
296
+ passed: true,
297
+ errors: [],
298
+ warnings: [],
299
+ suggestions: [],
300
+ timestamp: new Date().toISOString(),
301
+ filePath,
302
+ executionTime: 0
303
+ };
304
+ try {
305
+ // Run type-specific validation
306
+ let typeValidation;
307
+ if ([
308
+ '.ts',
309
+ '.tsx'
310
+ ].includes(ext)) {
311
+ if (this.config.typescript?.enabled) {
312
+ typeValidation = await this.validateTypeScript(filePath);
313
+ this.mergeResults(aggregatedResult, typeValidation);
314
+ }
315
+ } else if ([
316
+ '.js',
317
+ '.jsx'
318
+ ].includes(ext)) {
319
+ // Basic JS validation would go here
320
+ } else if ([
321
+ '.json'
322
+ ].includes(ext)) {
323
+ typeValidation = await this.validateJSON(filePath);
324
+ this.mergeResults(aggregatedResult, typeValidation);
325
+ } else if ([
326
+ '.sh',
327
+ '.bash'
328
+ ].includes(ext)) {
329
+ if (this.config.bash?.enabled) {
330
+ typeValidation = await this.validateBash(filePath);
331
+ this.mergeResults(aggregatedResult, typeValidation);
332
+ }
333
+ }
334
+ // Run common checks
335
+ if (this.config.checkFormatting) {
336
+ const formattingResult = await this.checkFormatting(filePath);
337
+ this.mergeResults(aggregatedResult, formattingResult);
338
+ }
339
+ if (this.config.checkDuplication) {
340
+ const duplicationResult = await this.checkDuplication(filePath);
341
+ this.mergeResults(aggregatedResult, duplicationResult);
342
+ }
343
+ aggregatedResult.executionTime = Date.now() - startTime;
344
+ return aggregatedResult;
345
+ } catch (error) {
346
+ aggregatedResult.errors.push(`Validation pipeline failed: ${error}`);
347
+ aggregatedResult.passed = false;
348
+ aggregatedResult.executionTime = Date.now() - startTime;
349
+ return aggregatedResult;
350
+ }
351
+ }
352
+ /**
353
+ * Merge validation results
354
+ */ mergeResults(target, source) {
355
+ target.errors.push(...source.errors);
356
+ target.warnings.push(...source.warnings);
357
+ target.suggestions.push(...source.suggestions);
358
+ if (!source.passed) {
359
+ target.passed = false;
360
+ }
361
+ }
362
+ /**
363
+ * Get validation feedback summary
364
+ */ getValidationSummary(result) {
365
+ const lines = [];
366
+ if (result.passed) {
367
+ lines.push('✅ Validation passed');
368
+ } else {
369
+ lines.push('❌ Validation failed');
370
+ }
371
+ if (result.errors.length > 0) {
372
+ lines.push(`\nErrors (${result.errors.length}):`);
373
+ result.errors.forEach((error)=>lines.push(` - ${error}`));
374
+ }
375
+ if (result.warnings.length > 0) {
376
+ lines.push(`\nWarnings (${result.warnings.length}):`);
377
+ result.warnings.forEach((warning)=>lines.push(` - ${warning}`));
378
+ }
379
+ if (result.suggestions.length > 0) {
380
+ lines.push(`\nSuggestions (${result.suggestions.length}):`);
381
+ result.suggestions.forEach((suggestion)=>lines.push(` - ${suggestion}`));
382
+ }
383
+ lines.push(`\nExecution time: ${result.executionTime}ms`);
384
+ return lines.join('\n');
385
+ }
386
+ }
387
+
388
+ //# sourceMappingURL=post-edit-validator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/hooks/post-edit-validator.ts"],"sourcesContent":["/**\r\n * Post-Edit Validator - File validation after modifications\r\n * Runs syntax, formatting, and linting checks on edited files\r\n */\r\n\r\nimport * as fs from 'fs/promises';\r\nimport * as path from 'path';\r\nimport { spawn } from 'child_process';\r\n\r\ninterface ValidationConfig {\r\n checkSyntax: boolean;\r\n checkFormatting: boolean;\r\n checkDuplication: boolean;\r\n blockingValidation: boolean;\r\n typescript?: {\r\n enabled: boolean;\r\n noEmit: boolean;\r\n skipLibCheck: boolean;\r\n };\r\n bash?: {\r\n enabled: boolean;\r\n validators: string[];\r\n timeout: number;\r\n };\r\n}\r\n\r\ninterface ValidationResult {\r\n passed: boolean;\r\n errors: string[];\r\n warnings: string[];\r\n suggestions: string[];\r\n timestamp: string;\r\n filePath: string;\r\n executionTime: number;\r\n}\r\n\r\nexport class PostEditValidator {\r\n private config: ValidationConfig;\r\n private projectRoot: string;\r\n private configPath: string;\r\n\r\n constructor(projectRoot: string = process.cwd()) {\r\n this.projectRoot = projectRoot;\r\n this.configPath = path.join(projectRoot, '.claude/hooks/cfn-post-edit.config.json');\r\n this.config = {\r\n checkSyntax: true,\r\n checkFormatting: true,\r\n checkDuplication: false,\r\n blockingValidation: false,\r\n };\r\n }\r\n\r\n /**\r\n * Load validation config from JSON file\r\n */\r\n async loadConfig(): Promise<ValidationConfig> {\r\n try {\r\n const configContent = await fs.readFile(this.configPath, 'utf-8');\r\n const rawConfig = JSON.parse(configContent);\r\n\r\n // Merge with defaults\r\n this.config = {\r\n checkSyntax: rawConfig.validation?.syntax?.enabled ?? true,\r\n checkFormatting: rawConfig.validation?.formatting?.enabled ?? true,\r\n checkDuplication: rawConfig.validation?.duplication?.enabled ?? false,\r\n blockingValidation: rawConfig.blocking ?? false,\r\n typescript: rawConfig.validation?.typescript ?? {\r\n enabled: true,\r\n noEmit: true,\r\n skipLibCheck: true,\r\n },\r\n bash: rawConfig.validation?.bash ?? {\r\n enabled: true,\r\n validators: ['pipe-safety', 'dependency-checker', 'line-endings'],\r\n timeout: 5000,\r\n },\r\n };\r\n\r\n return this.config;\r\n } catch (error) {\r\n // Return defaults if config not found\r\n return this.config;\r\n }\r\n }\r\n\r\n /**\r\n * Get file extension to determine file type\r\n */\r\n private getFileExtension(filePath: string): string {\r\n return path.extname(filePath).toLowerCase();\r\n }\r\n\r\n /**\r\n * Validate TypeScript/JavaScript files\r\n */\r\n private async validateTypeScript(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Check if tsc is available\r\n const tscPath = path.join(this.projectRoot, 'node_modules/.bin/tsc');\r\n await fs.stat(tscPath);\r\n\r\n return await this.runTypeScriptCheck(filePath, result);\r\n } catch {\r\n // TypeScript not available, skip\r\n result.warnings.push('TypeScript compiler not available, skipping type checking');\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Run TypeScript compilation check\r\n */\r\n private runTypeScriptCheck(\r\n filePath: string,\r\n result: ValidationResult\r\n ): Promise<ValidationResult> {\r\n return new Promise((resolve) => {\r\n try {\r\n const tsc = spawn('npx', ['tsc', '--noEmit', filePath], {\r\n cwd: this.projectRoot,\r\n timeout: 10000,\r\n });\r\n\r\n let stderr = '';\r\n let stdout = '';\r\n\r\n tsc.stdout?.on('data', (data) => {\r\n stdout += data.toString();\r\n });\r\n\r\n tsc.stderr?.on('data', (data) => {\r\n stderr += data.toString();\r\n });\r\n\r\n tsc.on('close', (code) => {\r\n if (code !== 0 && stdout) {\r\n result.passed = false;\r\n result.errors.push(`TypeScript compilation failed:\\n${stdout}`);\r\n }\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n });\r\n\r\n tsc.on('error', (error) => {\r\n result.warnings.push(`TypeScript check skipped: ${error.message}`);\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n });\r\n } catch (error) {\r\n result.warnings.push(`Failed to run TypeScript check: ${error}`);\r\n result.executionTime = Date.now() - new Date(result.timestamp).getTime();\r\n resolve(result);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Validate Bash scripts\r\n */\r\n private async validateBash(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Run basic bash syntax check with bash -n\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n\r\n // Check for common bash issues\r\n if (content.includes('[ -z')) {\r\n result.warnings.push(\r\n 'Consider using [[ -z instead of [ -z for more robust string checking'\r\n );\r\n }\r\n\r\n if (content.match(/\\|\\s*while.*read/)) {\r\n result.warnings.push(\r\n 'Pipe to while-read can cause issues with variable scope, consider using process substitution'\r\n );\r\n }\r\n\r\n if (!content.includes('set -euo pipefail')) {\r\n result.suggestions.push('Add \"set -euo pipefail\" at the top of the script for safety');\r\n }\r\n\r\n // Check for unquoted variables\r\n const unquotedVars = content.match(/\\$\\w+(?![\\w\"}])/g) || [];\r\n if (unquotedVars.length > 0) {\r\n result.warnings.push(\r\n `Found ${unquotedVars.length} potentially unquoted variables - consider quoting them`\r\n );\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n } catch (error) {\r\n result.errors.push(`Bash validation failed: ${error}`);\r\n result.passed = false;\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n }\r\n\r\n /**\r\n * Validate JSON files\r\n */\r\n private async validateJSON(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n JSON.parse(content);\r\n } catch (error) {\r\n result.passed = false;\r\n result.errors.push(`JSON validation failed: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Check for code duplication\r\n */\r\n private async checkDuplication(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n const lines = content.split('\\n');\r\n\r\n // Check for duplicate consecutive lines\r\n const seenLines = new Map<string, number>();\r\n\r\n for (let i = 0; i < lines.length; i++) {\r\n const line = lines[i].trim();\r\n\r\n if (line && line.length > 20) {\r\n // Only check non-trivial lines\r\n const count = seenLines.get(line) || 0;\r\n\r\n if (count > 0) {\r\n result.suggestions.push(\r\n `Duplicate line found at line ${i + 1}: \"${line.substring(0, 50)}...\"`\r\n );\r\n }\r\n\r\n seenLines.set(line, count + 1);\r\n }\r\n }\r\n } catch (error) {\r\n result.warnings.push(`Duplication check skipped: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Check file formatting consistency\r\n */\r\n private async checkFormatting(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const result: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n const content = await fs.readFile(filePath, 'utf-8');\r\n const lines = content.split('\\n');\r\n\r\n // Check for mixed line endings\r\n const hasWindowsLineEndings = content.includes('\\r\\n');\r\n const hasUnixLineEndings = content.includes('\\n');\r\n\r\n if (hasWindowsLineEndings && hasUnixLineEndings) {\r\n result.warnings.push('Mixed line endings detected (CRLF and LF)');\r\n }\r\n\r\n // Check for trailing whitespace\r\n let trailingWhitespaceCount = 0;\r\n for (const line of lines) {\r\n if (line !== line.trimRight()) {\r\n trailingWhitespaceCount++;\r\n }\r\n }\r\n\r\n if (trailingWhitespaceCount > 0) {\r\n result.suggestions.push(\r\n `${trailingWhitespaceCount} lines have trailing whitespace`\r\n );\r\n }\r\n\r\n // Check for tabs vs spaces\r\n const hasTabs = content.includes('\\t');\r\n const hasSpaces = /^ +/.test(content);\r\n\r\n if (hasTabs && hasSpaces) {\r\n result.warnings.push('Mixed tabs and spaces detected');\r\n }\r\n } catch (error) {\r\n result.warnings.push(`Formatting check skipped: ${error}`);\r\n }\r\n\r\n result.executionTime = Date.now() - startTime;\r\n return result;\r\n }\r\n\r\n /**\r\n * Run full validation pipeline on a file\r\n */\r\n async validateFile(filePath: string, agentId?: string): Promise<ValidationResult> {\r\n try {\r\n await this.loadConfig();\r\n\r\n // Validate file exists\r\n await fs.stat(filePath);\r\n } catch {\r\n return {\r\n passed: false,\r\n errors: [`File does not exist: ${filePath}`],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n }\r\n\r\n // Run validation pipeline\r\n return await this.runValidationPipeline(filePath);\r\n }\r\n\r\n /**\r\n * Execute complete validation pipeline\r\n */\r\n async runValidationPipeline(filePath: string): Promise<ValidationResult> {\r\n const startTime = Date.now();\r\n const ext = this.getFileExtension(filePath);\r\n const aggregatedResult: ValidationResult = {\r\n passed: true,\r\n errors: [],\r\n warnings: [],\r\n suggestions: [],\r\n timestamp: new Date().toISOString(),\r\n filePath,\r\n executionTime: 0,\r\n };\r\n\r\n try {\r\n // Run type-specific validation\r\n let typeValidation: ValidationResult;\r\n\r\n if (['.ts', '.tsx'].includes(ext)) {\r\n if (this.config.typescript?.enabled) {\r\n typeValidation = await this.validateTypeScript(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n }\r\n } else if (['.js', '.jsx'].includes(ext)) {\r\n // Basic JS validation would go here\r\n } else if (['.json'].includes(ext)) {\r\n typeValidation = await this.validateJSON(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n } else if (['.sh', '.bash'].includes(ext)) {\r\n if (this.config.bash?.enabled) {\r\n typeValidation = await this.validateBash(filePath);\r\n this.mergeResults(aggregatedResult, typeValidation);\r\n }\r\n }\r\n\r\n // Run common checks\r\n if (this.config.checkFormatting) {\r\n const formattingResult = await this.checkFormatting(filePath);\r\n this.mergeResults(aggregatedResult, formattingResult);\r\n }\r\n\r\n if (this.config.checkDuplication) {\r\n const duplicationResult = await this.checkDuplication(filePath);\r\n this.mergeResults(aggregatedResult, duplicationResult);\r\n }\r\n\r\n aggregatedResult.executionTime = Date.now() - startTime;\r\n return aggregatedResult;\r\n } catch (error) {\r\n aggregatedResult.errors.push(`Validation pipeline failed: ${error}`);\r\n aggregatedResult.passed = false;\r\n aggregatedResult.executionTime = Date.now() - startTime;\r\n return aggregatedResult;\r\n }\r\n }\r\n\r\n /**\r\n * Merge validation results\r\n */\r\n private mergeResults(target: ValidationResult, source: ValidationResult): void {\r\n target.errors.push(...source.errors);\r\n target.warnings.push(...source.warnings);\r\n target.suggestions.push(...source.suggestions);\r\n\r\n if (!source.passed) {\r\n target.passed = false;\r\n }\r\n }\r\n\r\n /**\r\n * Get validation feedback summary\r\n */\r\n getValidationSummary(result: ValidationResult): string {\r\n const lines: string[] = [];\r\n\r\n if (result.passed) {\r\n lines.push('✅ Validation passed');\r\n } else {\r\n lines.push('❌ Validation failed');\r\n }\r\n\r\n if (result.errors.length > 0) {\r\n lines.push(`\\nErrors (${result.errors.length}):`);\r\n result.errors.forEach((error) => lines.push(` - ${error}`));\r\n }\r\n\r\n if (result.warnings.length > 0) {\r\n lines.push(`\\nWarnings (${result.warnings.length}):`);\r\n result.warnings.forEach((warning) => lines.push(` - ${warning}`));\r\n }\r\n\r\n if (result.suggestions.length > 0) {\r\n lines.push(`\\nSuggestions (${result.suggestions.length}):`);\r\n result.suggestions.forEach((suggestion) => lines.push(` - ${suggestion}`));\r\n }\r\n\r\n lines.push(`\\nExecution time: ${result.executionTime}ms`);\r\n\r\n return lines.join('\\n');\r\n }\r\n}\r\n"],"names":["fs","path","spawn","PostEditValidator","config","projectRoot","configPath","process","cwd","join","checkSyntax","checkFormatting","checkDuplication","blockingValidation","loadConfig","configContent","readFile","rawConfig","JSON","parse","validation","syntax","enabled","formatting","duplication","blocking","typescript","noEmit","skipLibCheck","bash","validators","timeout","error","getFileExtension","filePath","extname","toLowerCase","validateTypeScript","startTime","Date","now","result","passed","errors","warnings","suggestions","timestamp","toISOString","executionTime","tscPath","stat","runTypeScriptCheck","push","Promise","resolve","tsc","stderr","stdout","on","data","toString","code","getTime","message","validateBash","content","includes","match","unquotedVars","length","validateJSON","lines","split","seenLines","Map","i","line","trim","count","get","substring","set","hasWindowsLineEndings","hasUnixLineEndings","trailingWhitespaceCount","trimRight","hasTabs","hasSpaces","test","validateFile","agentId","runValidationPipeline","ext","aggregatedResult","typeValidation","mergeResults","formattingResult","duplicationResult","target","source","getValidationSummary","forEach","warning","suggestion"],"mappings":"AAAA;;;CAGC,GAED,YAAYA,QAAQ,cAAc;AAClC,YAAYC,UAAU,OAAO;AAC7B,SAAS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AACwB,MAAM,CAAC,EAAE,CAAC;YAC1D5B,OAAOI,WAAW,CAACwD,OAAO,CAAC,CAACE,aAAehC,MAAMnB,IAAI,CAAC,CAAC,IAAI,EAAEmD,YAAY;QAC3E;QAEAhC,MAAMnB,IAAI,CAAC,CAAC,kBAAkB,EAAEX,OAAOO,aAAa,CAAC,EAAE,CAAC;QAExD,OAAOuB,MAAM9D,IAAI,CAAC;IACpB;AACF"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Integration Module - Trigger.dev and Task Mode Adapters
3
+ *
4
+ * Exports all integration classes and utilities for CFN Loop orchestration:
5
+ * - TriggerDevClient: Type-safe trigger.dev API wrapper
6
+ * - TriggerDevWebhooks: Express webhook handlers
7
+ * - TaskModeCoordinator: In-memory and hybrid coordination
8
+ * - TaskModeEventQueue: Event queue for task mode
9
+ *
10
+ * Type exports from trigger-dev-events.d.ts are available via:
11
+ * import type { ... } from '../types/trigger-dev-events.js'
12
+ */ // TriggerDevClient exports
13
+ export { TriggerDevClient, TriggerDevError, createTriggerDevClient } from './trigger-dev-client.js';
14
+ // TriggerDevWebhooks exports
15
+ export { TriggerDevWebhooks, WebhookValidationError, createWebhookRouter } from './trigger-dev-webhooks.js';
16
+ // TaskModeAdapter exports
17
+ export { TaskModeCoordinator, TaskModeEventQueue, createTaskModeCoordinator, getTaskModeCoordinator } from './task-mode-adapter.js';
18
+
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/integration/index.ts"],"sourcesContent":["/**\r\n * Integration Module - Trigger.dev and Task Mode Adapters\r\n *\r\n * Exports all integration classes and utilities for CFN Loop orchestration:\r\n * - TriggerDevClient: Type-safe trigger.dev API wrapper\r\n * - TriggerDevWebhooks: Express webhook handlers\r\n * - TaskModeCoordinator: In-memory and hybrid coordination\r\n * - TaskModeEventQueue: Event queue for task mode\r\n *\r\n * Type exports from trigger-dev-events.d.ts are available via:\r\n * import type { ... } from '../types/trigger-dev-events.js'\r\n */\r\n\r\n// TriggerDevClient exports\r\nexport {\r\n TriggerDevClient,\r\n TriggerDevError,\r\n createTriggerDevClient,\r\n type RunFilterOptions,\r\n type TriggerDevConfig,\r\n} from './trigger-dev-client.js';\r\n\r\n// TriggerDevWebhooks exports\r\nexport {\r\n TriggerDevWebhooks,\r\n WebhookValidationError,\r\n createWebhookRouter,\r\n type WebhookConfig,\r\n type WebhookHandler,\r\n} from './trigger-dev-webhooks.js';\r\n\r\n// TaskModeAdapter exports\r\nexport {\r\n TaskModeCoordinator,\r\n TaskModeEventQueue,\r\n createTaskModeCoordinator,\r\n getTaskModeCoordinator,\r\n type TaskModeCoordinationResult,\r\n} from './task-mode-adapter.js';\r\n\r\n// Re-export types from trigger-dev-events for convenience\r\nexport type {\r\n RunStatusType,\r\n RunStatusResponse,\r\n AgentType,\r\n AgentCompletePayload,\r\n GateResultPayload,\r\n ConsensusResultPayload,\r\n PODecisionPayload,\r\n CFNLoopPayload,\r\n Run,\r\n WebhookVerificationOptions,\r\n WebhookContext,\r\n WebhookHandlerResult,\r\n TaskModeEvent,\r\n TaskModeSpawnRequest,\r\n TaskModeAgentResult,\r\n} from '../types/trigger-dev-events.js';\r\n"],"names":["TriggerDevClient","TriggerDevError","createTriggerDevClient","TriggerDevWebhooks","WebhookValidationError","createWebhookRouter","TaskModeCoordinator","TaskModeEventQueue","createTaskModeCoordinator","getTaskModeCoordinator"],"mappings":"AAAA;;;;;;;;;;;CAWC,GAED,2BAA2B;AAC3B,SACEA,gBAAgB,EAChBC,eAAe,EACfC,sBAAsB,QAGjB,0BAA0B;AAEjC,6BAA6B;AAC7B,SACEC,kBAAkB,EAClBC,sBAAsB,EACtBC,mBAAmB,QAGd,4BAA4B;AAEnC,0BAA0B;AAC1B,SACEC,mBAAmB,EACnBC,kBAAkB,EAClBC,yBAAyB,EACzBC,sBAAsB,QAEjB,yBAAyB"}