claude-flow-novice 1.6.3 → 1.6.5

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 (290) hide show
  1. package/.claude/commands/parse-epic.js +180 -0
  2. package/.claude/settings.json +12 -2
  3. package/.claude/settings.local.json +4 -2
  4. package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +37 -2
  5. package/.claude-flow-novice/dist/mcp/transports/base.js +5 -0
  6. package/.claude-flow-novice/dist/mcp/transports/base.js.map +1 -0
  7. package/.claude-flow-novice/dist/mcp/transports/http.js +414 -0
  8. package/.claude-flow-novice/dist/mcp/transports/http.js.map +1 -0
  9. package/.claude-flow-novice/dist/mcp/transports/stdio.js +217 -0
  10. package/.claude-flow-novice/dist/mcp/transports/stdio.js.map +1 -0
  11. package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js +129 -0
  12. package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js.map +1 -0
  13. package/.claude-flow-novice/dist/src/cli/index.js +3 -0
  14. package/.claude-flow-novice/dist/src/cli/index.js.map +1 -1
  15. package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js +266 -0
  16. package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js.map +1 -0
  17. package/.claude-flow-novice/dist/src/communication/message-bus.js +105 -2
  18. package/.claude-flow-novice/dist/src/communication/message-bus.js.map +1 -1
  19. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +1 -1
  20. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -1
  21. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js +632 -0
  22. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js.map +1 -0
  23. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js +11 -0
  24. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js.map +1 -0
  25. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js +318 -0
  26. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js.map +1 -0
  27. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js +234 -0
  28. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js.map +1 -0
  29. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js +347 -0
  30. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js.map +1 -0
  31. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js +13 -0
  32. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js.map +1 -0
  33. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js +173 -0
  34. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js.map +1 -0
  35. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js +526 -0
  36. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js.map +1 -0
  37. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js +443 -0
  38. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js.map +1 -0
  39. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js +366 -0
  40. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js.map +1 -0
  41. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js +287 -0
  42. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js.map +1 -0
  43. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js +364 -0
  44. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js.map +1 -0
  45. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js +492 -0
  46. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js.map +1 -0
  47. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js +786 -0
  48. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js.map +1 -0
  49. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js +16 -0
  50. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js.map +1 -0
  51. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js +342 -0
  52. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js.map +1 -0
  53. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js +601 -0
  54. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
  55. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js +9 -0
  56. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js.map +1 -0
  57. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js +413 -0
  58. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js.map +1 -0
  59. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js +471 -0
  60. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js.map +1 -0
  61. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js +379 -0
  62. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js.map +1 -0
  63. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js +335 -0
  64. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js.map +1 -0
  65. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js +211 -0
  66. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js.map +1 -0
  67. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js +33 -0
  68. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js.map +1 -0
  69. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js +920 -0
  70. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js.map +1 -0
  71. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js +385 -0
  72. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js.map +1 -0
  73. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js +138 -0
  74. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js.map +1 -0
  75. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js +478 -0
  76. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js.map +1 -0
  77. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js +358 -0
  78. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js.map +1 -0
  79. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js +588 -0
  80. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js.map +1 -0
  81. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js +153 -0
  82. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js.map +1 -0
  83. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js +360 -0
  84. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js.map +1 -0
  85. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js +337 -0
  86. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js.map +1 -0
  87. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js +424 -0
  88. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js.map +1 -0
  89. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js +9 -0
  90. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js.map +1 -0
  91. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js +669 -0
  92. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js.map +1 -0
  93. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js +451 -0
  94. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js.map +1 -0
  95. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js +271 -0
  96. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js.map +1 -0
  97. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js +335 -0
  98. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js.map +1 -0
  99. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js +439 -0
  100. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js.map +1 -0
  101. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js +92 -0
  102. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js.map +1 -0
  103. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js +21 -0
  104. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js.map +1 -0
  105. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js +223 -0
  106. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js.map +1 -0
  107. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js +436 -0
  108. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js.map +1 -0
  109. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js +278 -0
  110. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js.map +1 -0
  111. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js +317 -0
  112. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js.map +1 -0
  113. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js +273 -0
  114. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js.map +1 -0
  115. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js +15 -0
  116. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js.map +1 -0
  117. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js +512 -0
  118. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js.map +1 -0
  119. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js +67 -0
  120. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js.map +1 -0
  121. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js +557 -0
  122. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js.map +1 -0
  123. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js +14 -0
  124. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js.map +1 -0
  125. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js +212 -0
  126. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js.map +1 -0
  127. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js +552 -0
  128. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js.map +1 -0
  129. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js +635 -0
  130. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js.map +1 -0
  131. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js +28 -0
  132. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js.map +1 -0
  133. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js +9 -0
  134. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js.map +1 -0
  135. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js +25 -0
  136. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js.map +1 -0
  137. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js +14 -0
  138. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js.map +1 -0
  139. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js +308 -0
  140. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js.map +1 -0
  141. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js +439 -0
  142. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js.map +1 -0
  143. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js +540 -0
  144. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js.map +1 -0
  145. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js +367 -0
  146. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js.map +1 -0
  147. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js +14 -0
  148. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js.map +1 -0
  149. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js +518 -0
  150. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js.map +1 -0
  151. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js +377 -0
  152. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js.map +1 -0
  153. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js +371 -0
  154. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js.map +1 -0
  155. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js +355 -0
  156. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js.map +1 -0
  157. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js +424 -0
  158. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js.map +1 -0
  159. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js +16 -0
  160. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js.map +1 -0
  161. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js +295 -0
  162. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js.map +1 -0
  163. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js +411 -0
  164. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js.map +1 -0
  165. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js +14 -0
  166. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js.map +1 -0
  167. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js +387 -0
  168. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js.map +1 -0
  169. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js +589 -0
  170. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js.map +1 -0
  171. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js +444 -0
  172. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js.map +1 -0
  173. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js +560 -0
  174. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js.map +1 -0
  175. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js +335 -0
  176. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js.map +1 -0
  177. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js +104 -0
  178. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js.map +1 -0
  179. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js +847 -0
  180. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js.map +1 -0
  181. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js +470 -0
  182. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js.map +1 -0
  183. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js +450 -0
  184. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js.map +1 -0
  185. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js +13 -0
  186. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js.map +1 -0
  187. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js +625 -0
  188. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js.map +1 -0
  189. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js +545 -0
  190. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js.map +1 -0
  191. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js +740 -0
  192. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js.map +1 -0
  193. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js +415 -0
  194. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js.map +1 -0
  195. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js +615 -0
  196. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js.map +1 -0
  197. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js +547 -0
  198. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js.map +1 -0
  199. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js +342 -0
  200. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js.map +1 -0
  201. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js +259 -0
  202. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js.map +1 -0
  203. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js +273 -0
  204. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js.map +1 -0
  205. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js +8 -0
  206. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js.map +1 -0
  207. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js +310 -0
  208. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js.map +1 -0
  209. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js +218 -0
  210. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js.map +1 -0
  211. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js +9 -0
  212. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js.map +1 -0
  213. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js +6 -0
  214. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js.map +1 -0
  215. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js +145 -0
  216. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js.map +1 -0
  217. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js +122 -0
  218. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js.map +1 -0
  219. package/.claude-flow-novice/dist/src/coordination/config-translator.js +17 -43
  220. package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -1
  221. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +34 -76
  222. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -1
  223. package/.claude-flow-novice/dist/src/coordination/index.js +3 -0
  224. package/.claude-flow-novice/dist/src/coordination/index.js.map +1 -1
  225. package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js +172 -0
  226. package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js.map +1 -0
  227. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js +7 -0
  228. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js.map +1 -0
  229. package/.claude-flow-novice/dist/src/coordination/shared/index.js +19 -0
  230. package/.claude-flow-novice/dist/src/coordination/shared/index.js.map +1 -0
  231. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js +24 -0
  232. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js.map +1 -0
  233. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js +7 -0
  234. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js.map +1 -0
  235. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js +920 -0
  236. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js.map +1 -0
  237. package/.claude-flow-novice/dist/src/coordination/shared/message.js +138 -0
  238. package/.claude-flow-novice/dist/src/coordination/shared/message.js.map +1 -0
  239. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js +259 -0
  240. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js.map +1 -0
  241. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js +17 -0
  242. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js.map +1 -0
  243. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js +19 -0
  244. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js.map +1 -0
  245. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js +357 -0
  246. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js.map +1 -0
  247. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js +679 -0
  248. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js.map +1 -0
  249. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js +7 -0
  250. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js.map +1 -0
  251. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js +10 -0
  252. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js.map +1 -0
  253. package/.claude-flow-novice/dist/src/coordination/v1-transparency/interfaces/v1-transparency-system.js +12 -0
  254. package/.claude-flow-novice/dist/src/coordination/v1-transparency/interfaces/v1-transparency-system.js.map +1 -0
  255. package/.claude-flow-novice/dist/src/coordination/v1-transparency/v1-to-v2-bridge.js +433 -0
  256. package/.claude-flow-novice/dist/src/coordination/v1-transparency/v1-to-v2-bridge.js.map +1 -0
  257. package/.claude-flow-novice/dist/src/coordination/v1-transparency/v1-transparency-adapter.js +1468 -0
  258. package/.claude-flow-novice/dist/src/coordination/v1-transparency/v1-transparency-adapter.js.map +1 -0
  259. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js +52 -2
  260. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -1
  261. package/.claude-flow-novice/dist/src/mcp/mcp-server-novice.js +37 -2
  262. package/.claude-flow-novice/dist/src/mcp/session-manager.js +3 -1
  263. package/.claude-flow-novice/dist/src/mcp/session-manager.js.map +1 -1
  264. package/.claude-flow-novice/dist/src/monitoring/apm/apm-integration.js +5 -0
  265. package/.claude-flow-novice/dist/src/monitoring/apm/apm-integration.js.map +1 -1
  266. package/.claude-flow-novice/dist/src/providers/provider-manager.js +41 -6
  267. package/.claude-flow-novice/dist/src/providers/provider-manager.js.map +1 -1
  268. package/.claude-flow-novice/dist/src/providers/tiered-router.js +9 -17
  269. package/.claude-flow-novice/dist/src/providers/tiered-router.js.map +1 -1
  270. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js +65 -41
  271. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js.map +1 -1
  272. package/.claude-flow-novice/dist/src/web/api/server.js +1 -1
  273. package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -1
  274. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js +30 -0
  275. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js.map +1 -1
  276. package/.claude-flow-novice/metrics.db +0 -0
  277. package/.claude-flow-novice/metrics.db-shm +0 -0
  278. package/.claude-flow-novice/metrics.db-wal +0 -0
  279. package/CLAUDE.md +72 -0
  280. package/config/hooks/post-edit-pipeline.js +68 -118
  281. package/config/hooks/pre-tool-memory-safety.js +209 -0
  282. package/package.json +7 -4
  283. package/scripts/cleanup-idle-sessions.sh +59 -0
  284. package/scripts/monitoring/alert-monitor.sh +220 -0
  285. package/scripts/monitoring/view-alerts.sh +307 -0
  286. package/scripts/test-provider-routing.cjs +7 -9
  287. package/scripts/test-zai-api.cjs +2 -2
  288. package/src/slash-commands/parse-epic.js +1 -1
  289. package/wiki/Provider-Routing.md +57 -69
  290. package/MEMORY_LEAK_ROOT_CAUSE.md +0 -149
@@ -0,0 +1,450 @@
1
+ /**
2
+ * Agent Coordination V2 - Hierarchical Background Integration
3
+ *
4
+ * Sprint 5.2 Integration Layer
5
+ * Connects HierarchicalCoordinator with BackgroundOrchestrator for
6
+ * multi-level bash process spawning with 500ms failure detection.
7
+ *
8
+ * Key Features:
9
+ * - Multi-level spawning (Level 1-N) via BackgroundOrchestrator
10
+ * - Child process monitoring via BashOutputMonitor
11
+ * - 500ms failure detection latency
12
+ * - Cascade termination support
13
+ * - Clean process lifecycle management
14
+ *
15
+ * @module coordination/v2/sdk/hierarchical-background-integration
16
+ */ import { EventEmitter } from 'events';
17
+ import { BackgroundOrchestrator } from './background-orchestrator.js';
18
+ import { BashOutputMonitor } from './bash-output-monitor.js';
19
+ import { Logger } from '../../../core/logger.js';
20
+ /**
21
+ * Integration layer connecting HierarchicalCoordinator to BackgroundOrchestrator
22
+ *
23
+ * Manages background bash process spawning for hierarchical agent coordination.
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const integration = new HierarchicalBackgroundIntegration(hierarchicalCoordinator, {
28
+ * maxLevels: 10,
29
+ * failureDetectionTimeout: 500
30
+ * });
31
+ *
32
+ * await integration.initialize();
33
+ *
34
+ * // Spawn child agent at Level 3
35
+ * const childProcess = await integration.spawnChildAgent(parentAgent, childConfig, 3);
36
+ *
37
+ * // Monitor all child processes
38
+ * await integration.monitorChildren(parentAgentId);
39
+ * ```
40
+ */ export class HierarchicalBackgroundIntegration extends EventEmitter {
41
+ logger;
42
+ config;
43
+ coordinator;
44
+ backgroundOrchestrator;
45
+ bashOutputMonitor;
46
+ agentToProcessMap = new Map();
47
+ processToAgentMap = new Map();
48
+ failureDetectionTimers = new Map();
49
+ isInitialized = false;
50
+ constructor(coordinator, config){
51
+ super();
52
+ this.coordinator = coordinator;
53
+ this.logger = new Logger({
54
+ level: 'info',
55
+ format: 'json',
56
+ destination: 'console'
57
+ }, {
58
+ component: 'HierarchicalBackgroundIntegration'
59
+ });
60
+ this.config = {
61
+ maxLevels: 10,
62
+ maxProcessesPerLevel: 20,
63
+ monitoringInterval: 500,
64
+ failureDetectionTimeout: 500,
65
+ autoCleanup: true,
66
+ cleanupRetentionMs: 60000,
67
+ ...config
68
+ };
69
+ this.backgroundOrchestrator = new BackgroundOrchestrator({
70
+ maxLevels: this.config.maxLevels,
71
+ maxProcessesPerLevel: this.config.maxProcessesPerLevel,
72
+ monitoringInterval: this.config.monitoringInterval,
73
+ autoCleanup: this.config.autoCleanup,
74
+ cleanupRetentionMs: this.config.cleanupRetentionMs
75
+ });
76
+ this.bashOutputMonitor = new BashOutputMonitor();
77
+ }
78
+ /**
79
+ * Initialize integration layer
80
+ */ async initialize() {
81
+ if (this.isInitialized) {
82
+ this.logger.warn('Integration already initialized');
83
+ return;
84
+ }
85
+ this.logger.info('Initializing hierarchical background integration...');
86
+ // Setup event listeners
87
+ this.setupEventHandlers();
88
+ this.isInitialized = true;
89
+ this.logger.info('Hierarchical background integration initialized');
90
+ this.emit('integration:initialized');
91
+ }
92
+ /**
93
+ * Spawn child agent as background bash process
94
+ *
95
+ * @param parentAgent - Parent hierarchical agent
96
+ * @param childConfig - Child agent configuration
97
+ * @param level - Spawning level (1-N)
98
+ * @returns Promise resolving to spawned BackgroundProcess
99
+ */ async spawnChildAgent(parentAgent, childConfig, level) {
100
+ if (!this.isInitialized) {
101
+ throw new Error('Integration not initialized. Call initialize() first.');
102
+ }
103
+ this.logger.info(`Spawning child agent at level ${level}`, {
104
+ parentId: parentAgent.id,
105
+ childId: childConfig.agentId,
106
+ level
107
+ });
108
+ // Create agent definition for BackgroundOrchestrator
109
+ const agent = {
110
+ agentId: childConfig.agentId,
111
+ type: childConfig.type,
112
+ priority: childConfig.priority || 5,
113
+ sessionId: childConfig.sessionId,
114
+ capabilities: childConfig.capabilities,
115
+ metadata: {
116
+ ...childConfig.metadata,
117
+ parentAgentId: parentAgent.id,
118
+ parentLevel: parentAgent.level,
119
+ coordinatorIntegration: true
120
+ }
121
+ };
122
+ // Get parent process ID if exists
123
+ const parentProcess = this.agentToProcessMap.get(parentAgent.id);
124
+ const parentProcessId = parentProcess?.id;
125
+ // Spawn background process via BackgroundOrchestrator
126
+ const childProcess = await this.backgroundOrchestrator.spawnBackground(agent, level, parentProcessId);
127
+ // Register mappings
128
+ this.agentToProcessMap.set(childConfig.agentId, childProcess);
129
+ this.processToAgentMap.set(childProcess.id, childConfig.agentId);
130
+ // Start bash output monitoring
131
+ this.bashOutputMonitor.startMonitoring(childProcess);
132
+ // Start failure detection with 500ms timeout
133
+ this.startFailureDetection(childProcess);
134
+ this.logger.info(`Child agent spawned at level ${level}`, {
135
+ processId: childProcess.id,
136
+ agentId: childConfig.agentId,
137
+ parentId: parentAgent.id
138
+ });
139
+ this.emit('child:spawned', {
140
+ processId: childProcess.id,
141
+ agentId: childConfig.agentId,
142
+ level,
143
+ parentId: parentAgent.id
144
+ });
145
+ return childProcess;
146
+ }
147
+ /**
148
+ * Monitor all child processes for a given parent agent
149
+ *
150
+ * @param parentAgentId - Parent agent ID to monitor children for
151
+ * @returns Array of monitored child processes
152
+ */ async monitorChildren(parentAgentId) {
153
+ const parentProcess = this.agentToProcessMap.get(parentAgentId);
154
+ if (!parentProcess) {
155
+ this.logger.warn('Parent agent has no associated process', {
156
+ parentAgentId
157
+ });
158
+ return [];
159
+ }
160
+ const children = this.backgroundOrchestrator.getChildProcesses(parentProcess.id);
161
+ this.logger.debug(`Monitoring ${children.length} children for parent ${parentAgentId}`);
162
+ // Ensure all children are being monitored
163
+ for (const child of children){
164
+ if (!this.bashOutputMonitor.getOutputs(child.id).length) {
165
+ this.bashOutputMonitor.startMonitoring(child);
166
+ }
167
+ // Ensure failure detection is active
168
+ if (!this.failureDetectionTimers.has(child.id)) {
169
+ this.startFailureDetection(child);
170
+ }
171
+ }
172
+ return children;
173
+ }
174
+ /**
175
+ * Get all processes at specific nesting level
176
+ *
177
+ * @param level - Nesting level to query
178
+ * @returns Array of BackgroundProcess at specified level
179
+ */ getProcessesAtLevel(level) {
180
+ return this.backgroundOrchestrator.getProcessesAtLevel(level);
181
+ }
182
+ /**
183
+ * Get child processes for a specific agent
184
+ *
185
+ * @param agentId - Agent ID to get children for
186
+ * @returns Array of child BackgroundProcess instances
187
+ */ getChildrenForAgent(agentId) {
188
+ const process = this.agentToProcessMap.get(agentId);
189
+ if (!process) {
190
+ return [];
191
+ }
192
+ return this.backgroundOrchestrator.getChildProcesses(process.id);
193
+ }
194
+ /**
195
+ * Pause background process for agent
196
+ *
197
+ * @param agentId - Agent to pause
198
+ */ async pauseAgent(agentId) {
199
+ const process = this.agentToProcessMap.get(agentId);
200
+ if (!process) {
201
+ throw new Error(`No background process for agent ${agentId}`);
202
+ }
203
+ await this.backgroundOrchestrator.pauseProcess(process.id);
204
+ this.logger.info('Agent background process paused', {
205
+ agentId,
206
+ processId: process.id
207
+ });
208
+ this.emit('agent:paused', {
209
+ agentId,
210
+ processId: process.id
211
+ });
212
+ }
213
+ /**
214
+ * Resume background process for agent
215
+ *
216
+ * @param agentId - Agent to resume
217
+ */ async resumeAgent(agentId) {
218
+ const process = this.agentToProcessMap.get(agentId);
219
+ if (!process) {
220
+ throw new Error(`No background process for agent ${agentId}`);
221
+ }
222
+ await this.backgroundOrchestrator.resumeProcess(process.id);
223
+ this.logger.info('Agent background process resumed', {
224
+ agentId,
225
+ processId: process.id
226
+ });
227
+ this.emit('agent:resumed', {
228
+ agentId,
229
+ processId: process.id
230
+ });
231
+ }
232
+ /**
233
+ * Terminate agent and all children (cascade)
234
+ *
235
+ * @param agentId - Agent to terminate
236
+ */ async terminateAgent(agentId) {
237
+ const process = this.agentToProcessMap.get(agentId);
238
+ if (!process) {
239
+ this.logger.warn('No background process found for agent', {
240
+ agentId
241
+ });
242
+ return;
243
+ }
244
+ // Clear failure detection timer
245
+ this.clearFailureDetection(process.id);
246
+ // Terminate process (cascade to children)
247
+ await this.backgroundOrchestrator.terminateProcess(process.id);
248
+ // Stop monitoring
249
+ this.bashOutputMonitor.stopMonitoring(process.id);
250
+ // Clean up mappings
251
+ this.agentToProcessMap.delete(agentId);
252
+ this.processToAgentMap.delete(process.id);
253
+ this.logger.info('Agent background process terminated', {
254
+ agentId,
255
+ processId: process.id
256
+ });
257
+ this.emit('agent:terminated', {
258
+ agentId,
259
+ processId: process.id
260
+ });
261
+ }
262
+ /**
263
+ * Terminate all processes at level and deeper (cascade)
264
+ *
265
+ * @param level - Starting level for termination
266
+ */ async terminateLevel(level) {
267
+ this.logger.info(`Terminating all processes at level ${level} and deeper`);
268
+ const processes = this.backgroundOrchestrator.getProcessesAtLevel(level);
269
+ for (const process of processes){
270
+ const agentId = this.processToAgentMap.get(process.id);
271
+ if (agentId) {
272
+ await this.terminateAgent(agentId);
273
+ }
274
+ }
275
+ await this.backgroundOrchestrator.terminateLevel(level);
276
+ this.logger.info(`Terminated all processes at level ${level}+`);
277
+ this.emit('level:terminated', {
278
+ level
279
+ });
280
+ }
281
+ /**
282
+ * Get background process for agent
283
+ *
284
+ * @param agentId - Agent ID
285
+ * @returns BackgroundProcess or undefined
286
+ */ getProcessForAgent(agentId) {
287
+ return this.agentToProcessMap.get(agentId);
288
+ }
289
+ /**
290
+ * Get agent ID for background process
291
+ *
292
+ * @param processId - Process ID
293
+ * @returns Agent ID or undefined
294
+ */ getAgentForProcess(processId) {
295
+ return this.processToAgentMap.get(processId);
296
+ }
297
+ /**
298
+ * Get bash output for agent process
299
+ *
300
+ * @param agentId - Agent ID
301
+ * @returns Combined stdout or empty string
302
+ */ getAgentOutput(agentId) {
303
+ const process = this.agentToProcessMap.get(agentId);
304
+ if (!process) {
305
+ return '';
306
+ }
307
+ return this.bashOutputMonitor.getCombinedStdout(process.id);
308
+ }
309
+ /**
310
+ * Get bash stderr for agent process
311
+ *
312
+ * @param agentId - Agent ID
313
+ * @returns Combined stderr or empty string
314
+ */ getAgentErrors(agentId) {
315
+ const process = this.agentToProcessMap.get(agentId);
316
+ if (!process) {
317
+ return '';
318
+ }
319
+ return this.bashOutputMonitor.getCombinedStderr(process.id);
320
+ }
321
+ /**
322
+ * Get integration statistics
323
+ */ getStats() {
324
+ const bgStats = this.backgroundOrchestrator.getStats();
325
+ const monitorStats = this.bashOutputMonitor.getStats();
326
+ return {
327
+ backgroundOrchestrator: bgStats,
328
+ bashOutputMonitor: monitorStats,
329
+ agentMappings: this.agentToProcessMap.size,
330
+ activeFailureDetection: this.failureDetectionTimers.size
331
+ };
332
+ }
333
+ /**
334
+ * Cleanup and shutdown integration
335
+ */ async cleanup() {
336
+ this.logger.info('Cleaning up hierarchical background integration...');
337
+ // Clear all failure detection timers
338
+ for (const [processId, timer] of Array.from(this.failureDetectionTimers.entries())){
339
+ clearTimeout(timer);
340
+ }
341
+ this.failureDetectionTimers.clear();
342
+ // Cleanup background orchestrator
343
+ await this.backgroundOrchestrator.cleanup();
344
+ // Cleanup bash output monitor
345
+ this.bashOutputMonitor.cleanup();
346
+ // Clear mappings
347
+ this.agentToProcessMap.clear();
348
+ this.processToAgentMap.clear();
349
+ this.isInitialized = false;
350
+ this.logger.info('Hierarchical background integration cleanup complete');
351
+ this.emit('integration:cleanup');
352
+ }
353
+ /**
354
+ * Start failure detection for background process
355
+ * Detects failures within 500ms
356
+ */ startFailureDetection(process) {
357
+ const timer = setTimeout(()=>{
358
+ // Check if process is still running
359
+ if (process.status === 'running') {
360
+ const latestOutput = this.bashOutputMonitor.getLatestOutput(process.id);
361
+ const stderr = this.bashOutputMonitor.getCombinedStderr(process.id);
362
+ // Check for error indicators
363
+ if (stderr && stderr.length > 0) {
364
+ this.handleProcessFailure(process.id, new Error(`Process stderr: ${stderr.substring(0, 200)}`));
365
+ }
366
+ }
367
+ // Re-schedule failure detection
368
+ this.failureDetectionTimers.delete(process.id);
369
+ if (process.status === 'running') {
370
+ this.startFailureDetection(process);
371
+ }
372
+ }, this.config.failureDetectionTimeout);
373
+ this.failureDetectionTimers.set(process.id, timer);
374
+ }
375
+ /**
376
+ * Clear failure detection timer
377
+ */ clearFailureDetection(processId) {
378
+ const timer = this.failureDetectionTimers.get(processId);
379
+ if (timer) {
380
+ clearTimeout(timer);
381
+ this.failureDetectionTimers.delete(processId);
382
+ }
383
+ }
384
+ /**
385
+ * Handle process failure
386
+ */ async handleProcessFailure(processId, error) {
387
+ const agentId = this.processToAgentMap.get(processId);
388
+ this.logger.error('Background process failed', {
389
+ processId,
390
+ agentId,
391
+ error: error.message
392
+ });
393
+ // Mark process as failed in orchestrator
394
+ await this.backgroundOrchestrator.failProcess(processId, error);
395
+ // Clear failure detection
396
+ this.clearFailureDetection(processId);
397
+ this.emit('process:failed', {
398
+ processId,
399
+ agentId,
400
+ error: error.message
401
+ });
402
+ }
403
+ /**
404
+ * Setup event handlers for integration
405
+ */ setupEventHandlers() {
406
+ // BackgroundOrchestrator events
407
+ this.backgroundOrchestrator.on('process:spawned', (process)=>{
408
+ this.logger.debug('Background process spawned', {
409
+ processId: process.id
410
+ });
411
+ });
412
+ this.backgroundOrchestrator.on('process:terminated', (process)=>{
413
+ this.logger.debug('Background process terminated', {
414
+ processId: process.id
415
+ });
416
+ this.clearFailureDetection(process.id);
417
+ });
418
+ this.backgroundOrchestrator.on('process:failed', (process, error)=>{
419
+ this.logger.error('Background process failed event', {
420
+ processId: process.id,
421
+ error: error.message
422
+ });
423
+ this.clearFailureDetection(process.id);
424
+ });
425
+ // BashOutputMonitor events
426
+ this.bashOutputMonitor.on('process:error', ({ processId, stderr })=>{
427
+ this.logger.warn('Process stderr output detected', {
428
+ processId,
429
+ stderr: stderr.substring(0, 200)
430
+ });
431
+ });
432
+ this.bashOutputMonitor.on('monitoring:completed', ({ processId, exitCode })=>{
433
+ this.logger.debug('Process monitoring completed', {
434
+ processId,
435
+ exitCode
436
+ });
437
+ if (exitCode !== 0) {
438
+ const error = new Error(`Process exited with code ${exitCode}`);
439
+ this.handleProcessFailure(processId, error);
440
+ }
441
+ });
442
+ }
443
+ }
444
+ /**
445
+ * Factory function to create integration layer
446
+ */ export function createHierarchicalBackgroundIntegration(coordinator, config) {
447
+ return new HierarchicalBackgroundIntegration(coordinator, config);
448
+ }
449
+
450
+ //# sourceMappingURL=hierarchical-background-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.ts"],"names":["EventEmitter","BackgroundOrchestrator","BashOutputMonitor","Logger","HierarchicalBackgroundIntegration","logger","config","coordinator","backgroundOrchestrator","bashOutputMonitor","agentToProcessMap","Map","processToAgentMap","failureDetectionTimers","isInitialized","level","format","destination","component","maxLevels","maxProcessesPerLevel","monitoringInterval","failureDetectionTimeout","autoCleanup","cleanupRetentionMs","initialize","warn","info","setupEventHandlers","emit","spawnChildAgent","parentAgent","childConfig","Error","parentId","id","childId","agentId","agent","type","priority","sessionId","capabilities","metadata","parentAgentId","parentLevel","coordinatorIntegration","parentProcess","get","parentProcessId","childProcess","spawnBackground","set","startMonitoring","startFailureDetection","processId","monitorChildren","children","getChildProcesses","debug","length","child","getOutputs","has","getProcessesAtLevel","getChildrenForAgent","process","pauseAgent","pauseProcess","resumeAgent","resumeProcess","terminateAgent","clearFailureDetection","terminateProcess","stopMonitoring","delete","terminateLevel","processes","getProcessForAgent","getAgentForProcess","getAgentOutput","getCombinedStdout","getAgentErrors","getCombinedStderr","getStats","bgStats","monitorStats","agentMappings","size","activeFailureDetection","cleanup","timer","Array","from","entries","clearTimeout","clear","setTimeout","status","latestOutput","getLatestOutput","stderr","handleProcessFailure","substring","error","message","failProcess","on","exitCode","createHierarchicalBackgroundIntegration"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED,SAASA,YAAY,QAAQ,SAAS;AAEtC,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,iBAAiB,QAAQ,2BAA2B;AAE7D,SAASC,MAAM,QAAQ,0BAA0B;AAyBjD;;;;;;;;;;;;;;;;;;;;CAoBC,GACD,OAAO,MAAMC,0CAA0CJ;IAC7CK,OAAe;IACfC,OAAqC;IACrCC,YAAqC;IACrCC,uBAA+C;IAC/CC,kBAAqC;IACrCC,oBAAoD,IAAIC,MAAM;IAC9DC,oBAAyC,IAAID,MAAM;IACnDE,yBAAsD,IA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,CAAC9F,iBAAiB,CAACkG,EAAE,CAAC,wBAAwB,CAAC,EAAEpD,SAAS,EAAEqD,QAAQ,EAA2C;YACjH,IAAI,CAACvG,MAAM,CAACsD,KAAK,CAAC,gCAAgC;gBAAEJ;gBAAWqD;YAAS;YAExE,IAAIA,aAAa,GAAG;gBAClB,MAAMJ,QAAQ,IAAIvE,MAAM,CAAC,yBAAyB,EAAE2E,UAAU;gBAC9D,IAAI,CAACN,oBAAoB,CAAC/C,WAAWiD;YACvC;QACF;IACF;AACF;AAEA;;CAEC,GACD,OAAO,SAASK,wCACdtG,WAAoC,EACpCD,MAA8C;IAE9C,OAAO,IAAIF,kCAAkCG,aAAaD;AAC5D"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Agent Coordination V2 - SDK Module Exports
3
+ */ export { CheckpointManager, CheckpointData, CheckpointMetrics, RestoreResult } from './checkpoint-manager.js';
4
+ export { QueryController, QueryControllerConfig } from './query-controller.js';
5
+ export { HelpCoordinator, HelpCoordinatorConfig, HelpCoordinatorMetrics, HelperAgent, HelpRequest, HelpAssignment } from './help-coordinator.js';
6
+ export { FilesystemArtifactStorage } from './artifact-storage.js';
7
+ export { StateSDKIntegration, StateSDKIntegrationConfig, StateSDKMetrics, StateChangeEventData } from './state-sdk-integration.js';
8
+ export { BackgroundOrchestrator, BackgroundOrchestratorConfig, ProcessStats } from './background-orchestrator.js';
9
+ export { BashOutputMonitor, ProcessOutput } from './bash-output-monitor.js';
10
+ export { HierarchicalBackgroundIntegration, HierarchicalBackgroundConfig, createHierarchicalBackgroundIntegration } from './hierarchical-background-integration.js';
11
+ export { SessionPoolOptimizer, SessionPoolConfig, PooledSession, PoolMetrics, SessionRequest } from './session-pool-optimizer.js';
12
+
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/sdk/index.ts"],"names":["CheckpointManager","CheckpointData","CheckpointMetrics","RestoreResult","QueryController","QueryControllerConfig","HelpCoordinator","HelpCoordinatorConfig","HelpCoordinatorMetrics","HelperAgent","HelpRequest","HelpAssignment","FilesystemArtifactStorage","StateSDKIntegration","StateSDKIntegrationConfig","StateSDKMetrics","StateChangeEventData","BackgroundOrchestrator","BackgroundOrchestratorConfig","ProcessStats","BashOutputMonitor","ProcessOutput","HierarchicalBackgroundIntegration","HierarchicalBackgroundConfig","createHierarchicalBackgroundIntegration","SessionPoolOptimizer","SessionPoolConfig","PooledSession","PoolMetrics","SessionRequest"],"mappings":"AAAA;;CAEC,GAED,SACEA,iBAAiB,EACjBC,cAAc,EACdC,iBAAiB,EACjBC,aAAa,QACR,0BAA0B;AAEjC,SACEC,eAAe,EACfC,qBAAqB,QAChB,wBAAwB;AAE/B,SACEC,eAAe,EACfC,qBAAqB,EACrBC,sBAAsB,EACtBC,WAAW,EACXC,WAAW,EACXC,cAAc,QACT,wBAAwB;AAE/B,SAASC,yBAAyB,QAAQ,wBAAwB;AAElE,SACEC,mBAAmB,EACnBC,yBAAyB,EACzBC,eAAe,EACfC,oBAAoB,QACf,6BAA6B;AAEpC,SACEC,sBAAsB,EACtBC,4BAA4B,EAC5BC,YAAY,QACP,+BAA+B;AAEtC,SACEC,iBAAiB,EACjBC,aAAa,QACR,2BAA2B;AAElC,SACEC,iCAAiC,EACjCC,4BAA4B,EAC5BC,uCAAuC,QAClC,2CAA2C;AAElD,SACEC,oBAAoB,EACpBC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,cAAc,QACT,8BAA8B"}