claude-flow-novice 1.6.1 → 1.6.2

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 (244) hide show
  1. package/.claude/agents/cfn-loop/product-owner.md +54 -4
  2. package/.claude/commands/cfn-claude-sync.md +303 -0
  3. package/.claude/commands/cfn-loop-epic.md +290 -0
  4. package/.claude/commands/cfn-loop-single.md +168 -0
  5. package/.claude/commands/cfn-loop-sprints.md +384 -0
  6. package/.claude/commands/cfn-loop.md +180 -0
  7. package/.claude/commands/metrics-summary.md +58 -0
  8. package/.claude/commands/parse-epic.md +357 -0
  9. package/.claude/settings.json +4 -4
  10. package/.claude/settings.local.json +9 -2
  11. package/.claude-flow-novice/.claude/agents/cfn-loop/product-owner.md +792 -0
  12. package/.claude-flow-novice/dist/mcp/server.js +21 -2
  13. package/.claude-flow-novice/dist/src/api/claude-client.js +138 -3
  14. package/.claude-flow-novice/dist/src/api/claude-client.js.map +1 -1
  15. package/.claude-flow-novice/dist/src/cfn-loop/phase-orchestrator-example.js +1 -1
  16. package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js +247 -0
  17. package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js.map +1 -0
  18. package/.claude-flow-novice/dist/src/cli/commands/swarm.js +32 -15
  19. package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
  20. package/.claude-flow-novice/dist/src/cli/commands/transparency.js +455 -0
  21. package/.claude-flow-novice/dist/src/cli/commands/transparency.js.map +1 -0
  22. package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +129 -13
  23. package/.claude-flow-novice/dist/src/components/visualizations/index.js +9 -0
  24. package/.claude-flow-novice/dist/src/components/visualizations/index.js.map +1 -0
  25. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +462 -0
  26. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -0
  27. package/.claude-flow-novice/dist/src/coordination/config-translator.js +248 -0
  28. package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -0
  29. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +287 -0
  30. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -0
  31. package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js +68 -9
  32. package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js.map +1 -1
  33. package/.claude-flow-novice/dist/src/coordination/feature-flags.js +166 -0
  34. package/.claude-flow-novice/dist/src/coordination/feature-flags.js.map +1 -0
  35. package/.claude-flow-novice/dist/src/coordination/queen-agent.js +18 -4
  36. package/.claude-flow-novice/dist/src/coordination/queen-agent.js.map +1 -1
  37. package/.claude-flow-novice/dist/src/coordination/role-assignment.js +6 -110
  38. package/.claude-flow-novice/dist/src/coordination/role-assignment.js.map +1 -1
  39. package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js +632 -0
  40. package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js.map +1 -0
  41. package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js +11 -0
  42. package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js.map +1 -0
  43. package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js +318 -0
  44. package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js.map +1 -0
  45. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js +364 -0
  46. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js.map +1 -0
  47. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js +492 -0
  48. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js.map +1 -0
  49. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js +786 -0
  50. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js.map +1 -0
  51. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js +16 -0
  52. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js.map +1 -0
  53. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js +342 -0
  54. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js.map +1 -0
  55. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js +601 -0
  56. package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
  57. package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js +211 -0
  58. package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js.map +1 -0
  59. package/.claude-flow-novice/dist/src/coordination/v2/core/index.js +1 -0
  60. package/.claude-flow-novice/dist/src/coordination/v2/core/index.js.map +1 -1
  61. package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js +365 -6
  62. package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js.map +1 -1
  63. package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js +478 -0
  64. package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js.map +1 -0
  65. package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js +5 -2
  66. package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js.map +1 -1
  67. package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js +189 -0
  68. package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js.map +1 -1
  69. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js +424 -0
  70. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js.map +1 -0
  71. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js +9 -0
  72. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js.map +1 -0
  73. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js +669 -0
  74. package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js.map +1 -0
  75. package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js +451 -0
  76. package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js.map +1 -0
  77. package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js +271 -0
  78. package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js.map +1 -0
  79. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js +335 -0
  80. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js.map +1 -0
  81. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js +439 -0
  82. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js.map +1 -0
  83. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js +92 -0
  84. package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js.map +1 -0
  85. package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js +21 -0
  86. package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js.map +1 -0
  87. package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js +223 -0
  88. package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js.map +1 -0
  89. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js +436 -0
  90. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js.map +1 -0
  91. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js +278 -0
  92. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js.map +1 -0
  93. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js +317 -0
  94. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js.map +1 -0
  95. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js +273 -0
  96. package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js.map +1 -0
  97. package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js +15 -0
  98. package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js.map +1 -0
  99. package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js +512 -0
  100. package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js.map +1 -0
  101. package/.claude-flow-novice/dist/src/coordination/v2/index.js +6 -0
  102. package/.claude-flow-novice/dist/src/coordination/v2/index.js.map +1 -1
  103. package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js +557 -0
  104. package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js.map +1 -0
  105. package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js +14 -0
  106. package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js.map +1 -0
  107. package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js +212 -0
  108. package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js.map +1 -0
  109. package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js +552 -0
  110. package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js.map +1 -0
  111. package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js +367 -0
  112. package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js.map +1 -0
  113. package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js +1 -0
  114. package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js.map +1 -1
  115. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js +371 -0
  116. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js.map +1 -0
  117. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js +355 -0
  118. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js.map +1 -0
  119. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js +424 -0
  120. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js.map +1 -0
  121. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js +16 -0
  122. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js.map +1 -0
  123. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js +295 -0
  124. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js.map +1 -0
  125. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js +411 -0
  126. package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js.map +1 -0
  127. package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js +14 -0
  128. package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js.map +1 -0
  129. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js +387 -0
  130. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js.map +1 -0
  131. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js +589 -0
  132. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js.map +1 -0
  133. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js +444 -0
  134. package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js.map +1 -0
  135. package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js +29 -8
  136. package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js.map +1 -1
  137. package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js +470 -0
  138. package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js.map +1 -0
  139. package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js +450 -0
  140. package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js.map +1 -0
  141. package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js +5 -0
  142. package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js.map +1 -1
  143. package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js +545 -0
  144. package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js.map +1 -0
  145. package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js +44 -0
  146. package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js.map +1 -1
  147. package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js +415 -0
  148. package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js.map +1 -0
  149. package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js +615 -0
  150. package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js.map +1 -0
  151. package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js +259 -0
  152. package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js.map +1 -0
  153. package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js +17 -0
  154. package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js.map +1 -0
  155. package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js +357 -0
  156. package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js.map +1 -0
  157. package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js +679 -0
  158. package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js.map +1 -0
  159. package/.claude-flow-novice/dist/src/core/agent-manager.js +30 -0
  160. package/.claude-flow-novice/dist/src/core/agent-manager.js.map +1 -1
  161. package/.claude-flow-novice/dist/src/mcp/server.js +21 -2
  162. package/.claude-flow-novice/dist/src/mcp/server.js.map +1 -1
  163. package/.claude-flow-novice/dist/src/observability/metrics-counter.js +268 -0
  164. package/.claude-flow-novice/dist/src/observability/metrics-counter.js.map +1 -0
  165. package/.claude-flow-novice/dist/src/observability/metrics-storage.js +265 -0
  166. package/.claude-flow-novice/dist/src/observability/metrics-storage.js.map +1 -0
  167. package/.claude-flow-novice/dist/src/observability/telemetry.js +26 -0
  168. package/.claude-flow-novice/dist/src/observability/telemetry.js.map +1 -1
  169. package/.claude-flow-novice/dist/src/providers/tiered-router.js +64 -10
  170. package/.claude-flow-novice/dist/src/providers/tiered-router.js.map +1 -1
  171. package/.claude-flow-novice/dist/src/providers/zai-provider.js +196 -97
  172. package/.claude-flow-novice/dist/src/providers/zai-provider.js.map +1 -1
  173. package/.claude-flow-novice/dist/src/slash-commands/cfn-claude-sync.js +533 -0
  174. package/.claude-flow-novice/dist/src/slash-commands/index.js +5 -0
  175. package/.claude-flow-novice/dist/src/slash-commands/metrics-summary-class.js +74 -0
  176. package/.claude-flow-novice/dist/src/slash-commands/metrics-summary.js +335 -0
  177. package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +12 -0
  178. package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js +96 -0
  179. package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js.map +1 -0
  180. package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js +406 -0
  181. package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js.map +1 -0
  182. package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js +35 -5
  183. package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js.map +1 -1
  184. package/.claude-flow-novice/dist/src/web/api/config/api-config.js +186 -0
  185. package/.claude-flow-novice/dist/src/web/api/config/api-config.js.map +1 -0
  186. package/.claude-flow-novice/dist/src/web/api/middleware/auth.js +205 -0
  187. package/.claude-flow-novice/dist/src/web/api/middleware/auth.js.map +1 -0
  188. package/.claude-flow-novice/dist/src/web/api/middleware/cache.js +262 -0
  189. package/.claude-flow-novice/dist/src/web/api/middleware/cache.js.map +1 -0
  190. package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js +250 -0
  191. package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js.map +1 -0
  192. package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js +217 -0
  193. package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js.map +1 -0
  194. package/.claude-flow-novice/dist/src/web/api/middleware/validation.js +325 -0
  195. package/.claude-flow-novice/dist/src/web/api/middleware/validation.js.map +1 -0
  196. package/.claude-flow-novice/dist/src/web/api/routes/events.js +465 -0
  197. package/.claude-flow-novice/dist/src/web/api/routes/events.js.map +1 -0
  198. package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js +302 -0
  199. package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js.map +1 -0
  200. package/.claude-flow-novice/dist/src/web/api/routes/index.js +14 -0
  201. package/.claude-flow-novice/dist/src/web/api/routes/index.js.map +1 -0
  202. package/.claude-flow-novice/dist/src/web/api/routes/metrics.js +561 -0
  203. package/.claude-flow-novice/dist/src/web/api/routes/metrics.js.map +1 -0
  204. package/.claude-flow-novice/dist/src/web/api/routes/status.js +450 -0
  205. package/.claude-flow-novice/dist/src/web/api/routes/status.js.map +1 -0
  206. package/.claude-flow-novice/dist/src/web/api/server.js +451 -0
  207. package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -0
  208. package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js +385 -0
  209. package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js.map +1 -0
  210. package/.claude-flow-novice/dist/src/web/dashboard/index.js +87 -0
  211. package/.claude-flow-novice/dist/src/web/dashboard/index.js.map +1 -0
  212. package/.claude-flow-novice/dist/src/web/dashboard/types.js +6 -0
  213. package/.claude-flow-novice/dist/src/web/dashboard/types.js.map +1 -0
  214. package/.claude-flow-novice/metrics.db +0 -0
  215. package/.claude-flow-novice/metrics.db-shm +0 -0
  216. package/.claude-flow-novice/metrics.db-wal +0 -0
  217. package/CLAUDE.md +29 -0
  218. package/README.md +27 -0
  219. package/config/hooks/post-edit-pipeline.js +36 -2
  220. package/examples/metrics-counter-demo.ts +106 -0
  221. package/examples/persistent-metrics-demo.ts +83 -0
  222. package/examples/phase-5-multi-level-control.ts +282 -0
  223. package/examples/session-pool-optimizer-example.ts +311 -0
  224. package/package.json +15 -3
  225. package/scripts/check-routing-stats.cjs +122 -0
  226. package/scripts/pre-publish-validation.cjs +212 -0
  227. package/scripts/test-provider-routing.cjs +228 -0
  228. package/scripts/test-routing-telemetry.cjs +147 -0
  229. package/scripts/test-zai-10k.cjs +81 -0
  230. package/scripts/test-zai-api.cjs +191 -0
  231. package/scripts/test-zai-diagnostic.cjs +151 -0
  232. package/scripts/test-zai-final.cjs +128 -0
  233. package/scripts/test-zai-with-env.cjs +85 -0
  234. package/scripts/validate-coordination-cli.js +69 -0
  235. package/scripts/validate-coordination-toggle-integration.cjs +501 -0
  236. package/src/cli/simple-commands/init/templates/CLAUDE.md +29 -0
  237. package/src/observability/metrics-counter.ts +347 -0
  238. package/src/observability/metrics-storage.ts +356 -0
  239. package/src/observability/telemetry.ts +658 -0
  240. package/src/slash-commands/cfn-claude-sync.js +533 -0
  241. package/src/slash-commands/index.js +5 -0
  242. package/src/slash-commands/metrics-summary-class.js +74 -0
  243. package/src/slash-commands/metrics-summary.js +335 -0
  244. package/src/slash-commands/register-all-commands.js +12 -0
@@ -0,0 +1,557 @@
1
+ /**
2
+ * Phase 9 Sprint 9.1: Help System + Deadlock Detection Integration
3
+ *
4
+ * Connects HelpCoordinator with DeadlockDetector to enable automatic help
5
+ * requests when agents are blocked in deadlock cycles. Implements:
6
+ * - Deadlock detection → Automated help routing
7
+ * - Blocked agents → Help request triggers
8
+ * - WFG cycle analysis → Helper capability matching
9
+ * - Automated recovery coordination
10
+ *
11
+ * @module coordination/v2/integration/help-deadlock-integration
12
+ */ import { EventEmitter } from 'events';
13
+ import { HelpRequestPriority } from '../help-system/help-request.js';
14
+ /**
15
+ * Help-Deadlock Integration Layer
16
+ *
17
+ * Bridges deadlock detection with help system for automated recovery.
18
+ */ export class HelpDeadlockIntegration extends EventEmitter {
19
+ deadlockDetector;
20
+ helpCoordinator;
21
+ config;
22
+ metrics;
23
+ activeResolutions;
24
+ resolutionCounter;
25
+ constructor(deadlockDetector, helpCoordinator, config){
26
+ super();
27
+ this.deadlockDetector = deadlockDetector;
28
+ this.helpCoordinator = helpCoordinator;
29
+ this.activeResolutions = new Map();
30
+ this.resolutionCounter = 0;
31
+ this.config = {
32
+ autoRequestHelp: config?.autoRequestHelp ?? true,
33
+ minSeverityThreshold: config?.minSeverityThreshold ?? 20,
34
+ enableWfgHelperSelection: config?.enableWfgHelperSelection ?? true,
35
+ maxConcurrentResolutions: config?.maxConcurrentResolutions ?? 10,
36
+ autoRetryFailedResolutions: config?.autoRetryFailedResolutions ?? true,
37
+ maxResolutionAttempts: config?.maxResolutionAttempts ?? 3,
38
+ resolutionTimeoutMs: config?.resolutionTimeoutMs ?? 60000
39
+ };
40
+ this.metrics = {
41
+ totalDeadlocksDetected: 0,
42
+ autoHelpRequestsTriggered: 0,
43
+ successfulResolutions: 0,
44
+ failedResolutions: 0,
45
+ avgResolutionTimeMs: 0,
46
+ activeResolutions: 0,
47
+ helpersUtilized: new Set(),
48
+ commonPatterns: new Map()
49
+ };
50
+ this.setupDeadlockListeners();
51
+ }
52
+ /**
53
+ * Setup listeners for deadlock events
54
+ */ setupDeadlockListeners() {
55
+ // Listen for deadlock detection events
56
+ this.deadlockDetector.on('deadlock', async (cycle)=>{
57
+ this.metrics.totalDeadlocksDetected++;
58
+ this.trackDeadlockPattern(cycle);
59
+ this.emit('deadlock-detected', {
60
+ cycleId: cycle.cycleId,
61
+ agents: cycle.agents,
62
+ severity: cycle.severity,
63
+ timestamp: new Date()
64
+ });
65
+ // Trigger automatic help if enabled and severity threshold met
66
+ if (this.config.autoRequestHelp && cycle.severity >= this.config.minSeverityThreshold) {
67
+ await this.handleDeadlock(cycle);
68
+ }
69
+ });
70
+ // Listen for detection warnings
71
+ this.deadlockDetector.on('warning', (warning)=>{
72
+ this.emit('detector-warning', warning);
73
+ });
74
+ }
75
+ /**
76
+ * Handle detected deadlock by triggering help requests
77
+ */ async handleDeadlock(cycle) {
78
+ // Check concurrent resolution limit
79
+ if (this.activeResolutions.size >= this.config.maxConcurrentResolutions) {
80
+ this.emit('resolution-rejected', {
81
+ cycleId: cycle.cycleId,
82
+ reason: 'Max concurrent resolutions reached'
83
+ });
84
+ return;
85
+ }
86
+ const resolutionId = this.generateResolutionId();
87
+ const resolution = {
88
+ resolutionId,
89
+ cycle,
90
+ helpRoutes: new Map(),
91
+ status: 'pending',
92
+ attempt: 1,
93
+ startedAt: new Date(),
94
+ helpers: []
95
+ };
96
+ this.activeResolutions.set(resolutionId, resolution);
97
+ this.metrics.activeResolutions = this.activeResolutions.size;
98
+ try {
99
+ await this.resolveDeadlock(resolution);
100
+ } catch (error) {
101
+ this.handleResolutionFailure(resolution, error);
102
+ }
103
+ }
104
+ /**
105
+ * Resolve deadlock by requesting help for blocked agents
106
+ */ async resolveDeadlock(resolution) {
107
+ resolution.status = 'in_progress';
108
+ this.emit('resolution-started', {
109
+ resolutionId: resolution.resolutionId,
110
+ cycleId: resolution.cycle.cycleId,
111
+ agents: resolution.cycle.agents
112
+ });
113
+ // Analyze WFG to identify helper candidates
114
+ const helperCandidates = await this.identifyHelperCandidates(resolution.cycle);
115
+ // Create help requests for each blocked agent in cycle
116
+ const helpRequests = await Promise.all(resolution.cycle.agents.map(async (agentId)=>{
117
+ const capabilities = this.extractRequiredCapabilities(agentId, resolution.cycle);
118
+ const priority = this.calculateHelpPriority(resolution.cycle);
119
+ try {
120
+ const result = await this.helpCoordinator.createHelpRequest(agentId, `Deadlock resolution: Agent blocked in cycle ${resolution.cycle.cycleId}`, capabilities, priority, {
121
+ cycleId: resolution.cycle.cycleId,
122
+ resolutionId: resolution.resolutionId,
123
+ cycleAgents: resolution.cycle.agents,
124
+ suggestedHelpers: helperCandidates.filter((c)=>c.capabilities.some((cap)=>capabilities.some((req)=>req.capability === cap))).map((c)=>c.agentId)
125
+ });
126
+ this.metrics.autoHelpRequestsTriggered++;
127
+ resolution.helpRoutes.set(agentId, result);
128
+ if (result.match) {
129
+ resolution.helpers.push(result.match.agentId);
130
+ this.metrics.helpersUtilized.add(result.match.agentId);
131
+ }
132
+ return result;
133
+ } catch (error) {
134
+ this.emit('help-request-failed', {
135
+ agentId,
136
+ resolutionId: resolution.resolutionId,
137
+ error: error instanceof Error ? error.message : 'Unknown error'
138
+ });
139
+ return null;
140
+ }
141
+ }));
142
+ // Check if all agents got help
143
+ const successfulRoutes = helpRequests.filter((r)=>r !== null && r.status === 'success');
144
+ if (successfulRoutes.length === resolution.cycle.agents.length) {
145
+ await this.monitorResolution(resolution);
146
+ } else {
147
+ throw new Error(`Failed to route help for ${resolution.cycle.agents.length - successfulRoutes.length} agents`);
148
+ }
149
+ }
150
+ /**
151
+ * Identify helper candidates using WFG analysis
152
+ */ async identifyHelperCandidates(cycle) {
153
+ if (!this.config.enableWfgHelperSelection) {
154
+ return [];
155
+ }
156
+ const graph = this.deadlockDetector.getGraph();
157
+ const candidates = [];
158
+ // Find agents NOT in the deadlock cycle
159
+ const cycleAgentSet = new Set(cycle.agents);
160
+ for (const [agentId, node] of Array.from(graph.entries())){
161
+ if (cycleAgentSet.has(agentId)) {
162
+ continue; // Skip agents in cycle
163
+ }
164
+ // Only consider agents that are not waiting
165
+ if (node.state === 'waiting' || node.state === 'blocked') {
166
+ continue;
167
+ }
168
+ // Check if agent holds resources needed by cycle
169
+ const relevantResources = this.findRelevantResources(node, cycle);
170
+ if (relevantResources.length > 0) {
171
+ candidates.push({
172
+ agentId,
173
+ relevance: this.calculateRelevance(node, cycle, relevantResources),
174
+ capabilities: relevantResources,
175
+ workload: this.estimateWorkload(node),
176
+ reason: `Holds ${relevantResources.length} resources needed by deadlock cycle`
177
+ });
178
+ }
179
+ }
180
+ // Sort by relevance descending
181
+ return candidates.sort((a, b)=>b.relevance - a.relevance);
182
+ }
183
+ /**
184
+ * Find resources held by candidate that are relevant to cycle
185
+ */ findRelevantResources(candidate, cycle) {
186
+ const cycleResources = new Set(cycle.resources);
187
+ const relevantResources = [];
188
+ for (const resource of Array.from(candidate.holdingResources)){
189
+ if (cycleResources.has(resource)) {
190
+ relevantResources.push(resource);
191
+ }
192
+ }
193
+ return relevantResources;
194
+ }
195
+ /**
196
+ * Calculate relevance score for helper candidate
197
+ */ calculateRelevance(candidate, cycle, relevantResources) {
198
+ // Base score from resource overlap
199
+ const resourceScore = relevantResources.length / cycle.resources.length;
200
+ // Priority bonus (higher priority agents are more valuable helpers)
201
+ const priorityScore = (candidate.priority ?? 5) / 10;
202
+ // Workload penalty (prefer less busy agents)
203
+ const workloadPenalty = this.estimateWorkload(candidate);
204
+ return resourceScore * 0.6 + priorityScore * 0.3 - workloadPenalty * 0.1;
205
+ }
206
+ /**
207
+ * Estimate agent workload from WFG state
208
+ */ estimateWorkload(node) {
209
+ // Workload estimation based on held and waiting resources
210
+ const heldCount = node.holdingResources.size;
211
+ const waitingCount = node.waitingForResources.size;
212
+ // Normalize to 0.0-1.0 range
213
+ const maxResources = 10; // Assume max 10 resources per agent
214
+ return Math.min((heldCount + waitingCount) / maxResources, 1.0);
215
+ }
216
+ /**
217
+ * Extract required capabilities from deadlock context
218
+ */ extractRequiredCapabilities(agentId, cycle) {
219
+ const graph = this.deadlockDetector.getGraph();
220
+ const node = graph.get(agentId);
221
+ if (!node) {
222
+ return [];
223
+ }
224
+ // Map waiting resources to capability requirements
225
+ const capabilities = [];
226
+ for (const resource of Array.from(node.waitingForResources)){
227
+ // Check if resource is another agent or a lock/data resource
228
+ const resourceAgent = graph.get(resource);
229
+ if (resourceAgent) {
230
+ // Waiting for another agent - need that agent's capabilities
231
+ capabilities.push({
232
+ capability: `agent-coordination:${resource}`,
233
+ required: true,
234
+ minProficiency: 0.7,
235
+ metadata: {
236
+ resourceType: 'agent',
237
+ waitingFor: resource
238
+ }
239
+ });
240
+ } else {
241
+ // Waiting for non-agent resource (lock, data, etc.)
242
+ capabilities.push({
243
+ capability: `deadlock-resolution:${cycle.resolution}`,
244
+ required: true,
245
+ minProficiency: 0.6,
246
+ metadata: {
247
+ resourceType: 'resource',
248
+ resourceId: resource,
249
+ resolution: cycle.resolution
250
+ }
251
+ });
252
+ }
253
+ }
254
+ return capabilities;
255
+ }
256
+ /**
257
+ * Calculate help request priority from cycle severity
258
+ */ calculateHelpPriority(cycle) {
259
+ if (cycle.severity >= 50) {
260
+ return HelpRequestPriority.CRITICAL;
261
+ } else if (cycle.severity >= 35) {
262
+ return HelpRequestPriority.HIGH;
263
+ } else if (cycle.severity >= 20) {
264
+ return HelpRequestPriority.NORMAL;
265
+ } else {
266
+ return HelpRequestPriority.LOW;
267
+ }
268
+ }
269
+ /**
270
+ * Monitor resolution progress and handle completion
271
+ */ async monitorResolution(resolution) {
272
+ const timeout = setTimeout(()=>{
273
+ this.handleResolutionTimeout(resolution);
274
+ }, this.config.resolutionTimeoutMs);
275
+ try {
276
+ // Track completion status for all help requests in cycle
277
+ const completionPromises = Array.from(resolution.helpRoutes.entries()).map(async ([agentId, helpRoute])=>{
278
+ return new Promise((resolve, reject)=>{
279
+ if (!helpRoute.match) {
280
+ reject(new Error(`No helper matched for agent ${agentId}`));
281
+ return;
282
+ }
283
+ const requestId = helpRoute.request.requestId;
284
+ // Subscribe to help completion event via MessageBroker
285
+ const completionTopic = `help.completed.${requestId}`;
286
+ let completed = false;
287
+ let subscription = null;
288
+ const completionHandler = async (message)=>{
289
+ if (message.payload.requestId === requestId) {
290
+ completed = true;
291
+ // Cleanup subscription
292
+ if (subscription) {
293
+ subscription.unsubscribe();
294
+ }
295
+ if (message.payload.success) {
296
+ resolve();
297
+ } else {
298
+ reject(new Error(message.payload.error || 'Help request failed'));
299
+ }
300
+ }
301
+ };
302
+ // Listen for completion event
303
+ const messageBroker = this.helpCoordinator.config?.messageBroker;
304
+ if (messageBroker) {
305
+ // Subscribe using MessageBroker API
306
+ messageBroker.subscribe({
307
+ topic: completionTopic,
308
+ handler: completionHandler
309
+ }).then((sub)=>{
310
+ subscription = sub;
311
+ }).catch((err)=>{
312
+ reject(new Error(`Subscription failed: ${err.message}`));
313
+ });
314
+ // Auto-cleanup and timeout after resolution timeout
315
+ setTimeout(()=>{
316
+ if (!completed) {
317
+ if (subscription) {
318
+ subscription.unsubscribe();
319
+ }
320
+ reject(new Error('Help request monitoring timeout'));
321
+ }
322
+ }, this.config.resolutionTimeoutMs);
323
+ } else {
324
+ // Fallback: Poll HelpCoordinator for request status
325
+ const pollInterval = setInterval(()=>{
326
+ const requestStatus = this.helpCoordinator.getRequestStatus(requestId);
327
+ if (requestStatus === 'resolved') {
328
+ clearInterval(pollInterval);
329
+ completed = true;
330
+ resolve();
331
+ } else if (requestStatus === 'failed' || requestStatus === 'cancelled') {
332
+ clearInterval(pollInterval);
333
+ completed = true;
334
+ reject(new Error(`Help request ${requestStatus}`));
335
+ }
336
+ }, 500);
337
+ // Stop polling after timeout
338
+ setTimeout(()=>{
339
+ if (!completed) {
340
+ clearInterval(pollInterval);
341
+ reject(new Error('Help request polling timeout'));
342
+ }
343
+ }, this.config.resolutionTimeoutMs);
344
+ }
345
+ });
346
+ });
347
+ // Wait for all help requests to complete
348
+ await Promise.all(completionPromises);
349
+ clearTimeout(timeout);
350
+ // Verify deadlock is actually resolved by checking WFG
351
+ const isResolved = await this.verifyDeadlockResolution(resolution.cycle);
352
+ if (!isResolved) {
353
+ throw new Error('Deadlock persists after help completion - verification failed');
354
+ }
355
+ // Mark resolution as complete
356
+ resolution.status = 'resolved';
357
+ resolution.completedAt = new Date();
358
+ const resolutionTime = resolution.completedAt.getTime() - resolution.startedAt.getTime();
359
+ this.metrics.successfulResolutions++;
360
+ this.updateAvgResolutionTime(resolutionTime);
361
+ this.activeResolutions.delete(resolution.resolutionId);
362
+ this.metrics.activeResolutions = this.activeResolutions.size;
363
+ this.emit('resolution-completed', {
364
+ resolutionId: resolution.resolutionId,
365
+ cycleId: resolution.cycle.cycleId,
366
+ durationMs: resolutionTime,
367
+ helpers: resolution.helpers
368
+ });
369
+ } catch (error) {
370
+ clearTimeout(timeout);
371
+ throw error; // Propagate to handleResolutionFailure
372
+ }
373
+ }
374
+ /**
375
+ * Verify deadlock is resolved by re-checking WFG
376
+ */ async verifyDeadlockResolution(originalCycle) {
377
+ // Re-run deadlock detection to check if cycle still exists
378
+ const currentDeadlocks = await this.deadlockDetector.detectDeadlocks();
379
+ // Check if original cycle is still present
380
+ const stillExists = currentDeadlocks.some((cycle)=>{
381
+ // Compare agent sets (cycle is the same if same agents are involved)
382
+ const originalAgentSet = new Set(originalCycle.agents);
383
+ const currentAgentSet = new Set(cycle.agents);
384
+ if (originalAgentSet.size !== currentAgentSet.size) {
385
+ return false;
386
+ }
387
+ // Convert Set to Array for iteration
388
+ for (const agent of Array.from(originalAgentSet)){
389
+ if (!currentAgentSet.has(agent)) {
390
+ return false;
391
+ }
392
+ }
393
+ return true; // Same agents = same cycle
394
+ });
395
+ return !stillExists; // Resolved if cycle no longer exists
396
+ }
397
+ /**
398
+ * Handle resolution timeout
399
+ */ handleResolutionTimeout(resolution) {
400
+ resolution.status = 'timeout';
401
+ resolution.completedAt = new Date();
402
+ resolution.error = 'Resolution timeout exceeded';
403
+ this.emit('resolution-timeout', {
404
+ resolutionId: resolution.resolutionId,
405
+ cycleId: resolution.cycle.cycleId,
406
+ attempt: resolution.attempt
407
+ });
408
+ // Retry if enabled and under attempt limit
409
+ if (this.config.autoRetryFailedResolutions && resolution.attempt < this.config.maxResolutionAttempts) {
410
+ this.retryResolution(resolution);
411
+ } else {
412
+ this.finalizeFailedResolution(resolution);
413
+ }
414
+ }
415
+ /**
416
+ * Handle resolution failure
417
+ */ handleResolutionFailure(resolution, error) {
418
+ resolution.status = 'failed';
419
+ resolution.completedAt = new Date();
420
+ resolution.error = error instanceof Error ? error.message : 'Unknown error';
421
+ this.emit('resolution-failed', {
422
+ resolutionId: resolution.resolutionId,
423
+ cycleId: resolution.cycle.cycleId,
424
+ error: resolution.error,
425
+ attempt: resolution.attempt
426
+ });
427
+ // Retry if enabled and under attempt limit
428
+ if (this.config.autoRetryFailedResolutions && resolution.attempt < this.config.maxResolutionAttempts) {
429
+ this.retryResolution(resolution);
430
+ } else {
431
+ this.finalizeFailedResolution(resolution);
432
+ }
433
+ }
434
+ /**
435
+ * Retry failed resolution
436
+ */ async retryResolution(resolution) {
437
+ resolution.attempt++;
438
+ resolution.status = 'pending';
439
+ resolution.startedAt = new Date();
440
+ resolution.completedAt = undefined;
441
+ resolution.helpRoutes.clear();
442
+ resolution.helpers = [];
443
+ this.emit('resolution-retry', {
444
+ resolutionId: resolution.resolutionId,
445
+ cycleId: resolution.cycle.cycleId,
446
+ attempt: resolution.attempt
447
+ });
448
+ try {
449
+ await this.resolveDeadlock(resolution);
450
+ } catch (error) {
451
+ this.handleResolutionFailure(resolution, error);
452
+ }
453
+ }
454
+ /**
455
+ * Finalize failed resolution after max attempts
456
+ */ finalizeFailedResolution(resolution) {
457
+ this.metrics.failedResolutions++;
458
+ this.activeResolutions.delete(resolution.resolutionId);
459
+ this.metrics.activeResolutions = this.activeResolutions.size;
460
+ this.emit('resolution-abandoned', {
461
+ resolutionId: resolution.resolutionId,
462
+ cycleId: resolution.cycle.cycleId,
463
+ attempts: resolution.attempt,
464
+ error: resolution.error
465
+ });
466
+ }
467
+ /**
468
+ * Track deadlock pattern for analytics
469
+ */ trackDeadlockPattern(cycle) {
470
+ // Create pattern signature from cycle structure
471
+ const pattern = this.generatePatternSignature(cycle);
472
+ const count = this.metrics.commonPatterns.get(pattern) ?? 0;
473
+ this.metrics.commonPatterns.set(pattern, count + 1);
474
+ }
475
+ /**
476
+ * Generate pattern signature for deadlock cycle
477
+ */ generatePatternSignature(cycle) {
478
+ // Pattern: cycleLength-resourceCount-resolution
479
+ return `${cycle.agents.length}-${cycle.resources.length}-${cycle.resolution}`;
480
+ }
481
+ /**
482
+ * Update average resolution time metric
483
+ */ updateAvgResolutionTime(resolutionTime) {
484
+ const total = this.metrics.successfulResolutions;
485
+ this.metrics.avgResolutionTimeMs = (this.metrics.avgResolutionTimeMs * (total - 1) + resolutionTime) / total;
486
+ }
487
+ /**
488
+ * Generate unique resolution ID
489
+ */ generateResolutionId() {
490
+ return `resolution_${Date.now()}_${++this.resolutionCounter}`;
491
+ }
492
+ /**
493
+ * Get integration metrics
494
+ */ getMetrics() {
495
+ return {
496
+ ...this.metrics,
497
+ deadlockMetrics: this.deadlockDetector.getMetrics(),
498
+ helpMetrics: this.helpCoordinator.getMetrics()
499
+ };
500
+ }
501
+ /**
502
+ * Get active resolutions
503
+ */ getActiveResolutions() {
504
+ return Array.from(this.activeResolutions.values());
505
+ }
506
+ /**
507
+ * Get resolution by ID
508
+ */ getResolution(resolutionId) {
509
+ return this.activeResolutions.get(resolutionId) ?? null;
510
+ }
511
+ /**
512
+ * Force retry resolution
513
+ */ async forceRetryResolution(resolutionId) {
514
+ const resolution = this.activeResolutions.get(resolutionId);
515
+ if (!resolution) {
516
+ return false;
517
+ }
518
+ if (resolution.status === 'in_progress') {
519
+ return false; // Already in progress
520
+ }
521
+ await this.retryResolution(resolution);
522
+ return true;
523
+ }
524
+ /**
525
+ * Cancel active resolution
526
+ */ cancelResolution(resolutionId) {
527
+ const resolution = this.activeResolutions.get(resolutionId);
528
+ if (!resolution) {
529
+ return false;
530
+ }
531
+ resolution.status = 'failed';
532
+ resolution.completedAt = new Date();
533
+ resolution.error = 'Cancelled by user';
534
+ this.activeResolutions.delete(resolutionId);
535
+ this.metrics.activeResolutions = this.activeResolutions.size;
536
+ this.emit('resolution-cancelled', {
537
+ resolutionId,
538
+ cycleId: resolution.cycle.cycleId
539
+ });
540
+ return true;
541
+ }
542
+ /**
543
+ * Clear all state
544
+ */ clear() {
545
+ this.activeResolutions.clear();
546
+ this.metrics.activeResolutions = 0;
547
+ this.resolutionCounter = 0;
548
+ }
549
+ /**
550
+ * Cleanup resources
551
+ */ destroy() {
552
+ this.clear();
553
+ this.removeAllListeners();
554
+ }
555
+ }
556
+
557
+ //# sourceMappingURL=help-deadlock-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/coordination/v2/integration/help-deadlock-integration.ts"],"names":["EventEmitter","HelpRequestPriority","HelpDeadlockIntegration","deadlockDetector","helpCoordinator","config","metrics","activeResolutions","resolutionCounter","Map","autoRequestHelp","minSeverityThreshold","enableWfgHelperSelection","maxConcurrentResolutions","autoRetryFailedResolutions","maxResolutionAttempts","resolutionTimeoutMs","totalDeadlocksDetected","autoHelpRequestsTriggered","successfulResolutions","failedResolutions","avgResolutionTimeMs","helpersUtilized","Set","commonPatterns","setupDeadlockListeners","on","cycle","trackDeadlockPattern","emit","cycleId","agents","severity","timestamp","Date","handleDeadlock","warning","size","reason","resolutionId","generateResolutionId","resolution","helpRoutes","status","attempt","startedAt","helpers","set","resolveDeadlock","error","handleResolutionFailure","helperCandidates","identifyHelperCandidates","helpRequests","Promise","all","map","agentId","capabilities","extractRequiredCapabilities","priority","calculateHelpPriority","result","createHelpRequest","cycleAgents","suggestedHelpers","filter","c","some","cap","req","capability","match","push","add","Error","message","successfulRoutes","r","length","monitorResolution","graph","getGraph","candidates","cycleAgentSet","node","Array","from","entries","has","state","relevantResources","findRelevantResources","relevance","calculateRelevance","workload","estimateWorkload","sort","a","b","candidate","cycleResources","resources","resource","holdingResources","resourceScore","priorityScore","workloadPenalty","heldCount","waitingCount","waitingForResources","maxResources","Math","min","get","resourceAgent","required","minProficiency","metadata","resourceType","waitingFor","resourceId","CRITICAL","HIGH","NORMAL","LOW","timeout","setTimeout","handleResolutionTimeout","completionPromises","helpRoute","resolve","reject","requestId","request","completionTopic","completed","subscription","completionHandler","payload","unsubscribe","success","messageBroker","subscribe","topic","handler","then","sub","catch","err","pollInterval","setInterval","requestStatus","getRequestStatus","clearInterval","clearTimeout","isResolved","verifyDeadlockResolution","completedAt","resolutionTime","getTime","updateAvgResolutionTime","delete","durationMs","originalCycle","currentDeadlocks","detectDeadlocks","stillExists","originalAgentSet","currentAgentSet","agent","retryResolution","finalizeFailedResolution","undefined","clear","attempts","pattern","generatePatternSignature","count","total","now","getMetrics","deadlockMetrics","helpMetrics","getActiveResolutions","values","getResolution","forceRetryResolution","cancelResolution","destroy","removeAllListeners"],"mappings":"AAAA;;;;;;;;;;;CAWC,GAED,SAASA,YAAY,QAAQ,SAAS;AAGtC,SAASC,mBAAmB,QAA+B,iCAAiC;AAiH5F;;;;CAIC,GACD,OAAO,MAAMC,gCAAgCF;IACnCG,iBAAmC;IACnCC,gBAAiC;IACjCC,OAAgD;IAChDC,QAA6B;IAC7BC,kBAA0D;IAC1DC,kBAA0B;IAElC,YACEL,gBAAkC,EAClCC,eAAgC,EAChCC,MAAsC,CACtC;QACA,KAAK;QAEL,IAAI,CAACF,gBAAgB,GAAGA;QACxB,IAAI,CAACC,eAAe,GAAGA;QACvB,IAAI,CAACG,iBAAiB,GAAG,IAAIE;QAC7B,IAAI,CAACD,iBAAiB,GAAG;QAEzB,IAAI,CAACH,MAAM,GAAG;YACZK,iBAAiBL,QAAQK,mBAAmB;YAC5CC,sBAAsBN,QAAQM,wBAAwB;YACtDC,0BAA0BP,QAAQO,4BAA4B;YAC9DC,0BAA0BR,QAAQQ,4BAA4B;YAC9DC,4BAA4BT,QAAQS,8BAA8B;YAClEC,uBAAuBV,QAAQU,yBAAyB;YACxDC,qBAAqBX,QAAQW,uBAAuB;QACtD;QAEA,IAAI,CAACV,OAAO,GAAG;YACbW,wBAAwB;YACxBC,2BAA2B;YAC3BC,uBAAuB;YACvBC,mBAAmB;YACnBC,qBAAqB;YACrBd,mBAAmB;YACnBe,iBAAiB,IAAIC;YACrBC,gBAAgB,IAAIf;QACtB;QAEA,IAAI,CAACgB,sBAAsB;IAC7B;IAEA;;GAEC,GACD,AAAQA,yBAA+B;QACrC,uCAAuC;QACvC,IAAI,CAACtB,gBAAgB,CAACuB,EAAE,CAAC,YAAY,OAAOC;YAC1C,IAAI,CAACrB,OAAO,CAACW,sBAAsB;YACnC,IAAI,CAACW,oBAAoB,CAACD;YAE1B,IAAI,CAACE,IAAI,CAAC,qBAAqB;gBAC7B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I;QAE5D,IAAI,CAACR,IAAI,CAAC,wBAAwB;YAChCU;YACAT,SAASW,WAAWd,KAAK,CAACG,OAAO;QACnC;QAEA,OAAO;IACT;IAEA;;GAEC,GACD,AAAOgJ,QAAc;QACnB,IAAI,CAACvK,iBAAiB,CAACuK,KAAK;QAC5B,IAAI,CAACxK,OAAO,CAACC,iBAAiB,GAAG;QACjC,IAAI,CAACC,iBAAiB,GAAG;IAC3B;IAEA;;GAEC,GACD,AAAOqL,UAAgB;QACrB,IAAI,CAACf,KAAK;QACV,IAAI,CAACgB,kBAAkB;IACzB;AACF"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Agent Coordination V2 - Integration Layer
3
+ *
4
+ * Event-driven integrations connecting core coordination components:
5
+ * - Message Bus ↔ Completion Detector (Phase 9 Sprint 9.1)
6
+ * - State Machine ↔ SDK Integration
7
+ * - Help System ↔ Deadlock Detection
8
+ *
9
+ * @module coordination/v2/integration
10
+ */ export { MessageBusCompletionIntegration, IntegrationEvent } from './message-bus-completion-integration.js';
11
+ export { StateMachineIntegration } from './state-machine-integration.js';
12
+ export { HelpDeadlockIntegration } from './help-deadlock-integration.js';
13
+
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../src/coordination/v2/integration/index.ts"],"names":["MessageBusCompletionIntegration","IntegrationEvent","StateMachineIntegration","HelpDeadlockIntegration"],"mappings":"AAAA;;;;;;;;;CASC,GAED,SACEA,+BAA+B,EAG/BC,gBAAgB,QACX,0CAA0C;AAEjD,SACEC,uBAAuB,QAGlB,iCAAiC;AAExC,SACEC,uBAAuB,QAIlB,iCAAiC"}