claude-flow-novice 1.6.4 → 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 (269) hide show
  1. package/.claude/commands/parse-epic.js +180 -0
  2. package/.claude/settings.local.json +2 -1
  3. package/.claude-flow-novice/dist/mcp/mcp-server-novice.js +37 -2
  4. package/.claude-flow-novice/dist/mcp/transports/base.js +5 -0
  5. package/.claude-flow-novice/dist/mcp/transports/base.js.map +1 -0
  6. package/.claude-flow-novice/dist/mcp/transports/http.js +414 -0
  7. package/.claude-flow-novice/dist/mcp/transports/http.js.map +1 -0
  8. package/.claude-flow-novice/dist/mcp/transports/stdio.js +217 -0
  9. package/.claude-flow-novice/dist/mcp/transports/stdio.js.map +1 -0
  10. package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js +129 -0
  11. package/.claude-flow-novice/dist/src/cli/commands/parse-epic.js.map +1 -0
  12. package/.claude-flow-novice/dist/src/cli/index.js +3 -0
  13. package/.claude-flow-novice/dist/src/cli/index.js.map +1 -1
  14. package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js +266 -0
  15. package/.claude-flow-novice/dist/src/cli/utils/epic-parser.js.map +1 -0
  16. package/.claude-flow-novice/dist/src/communication/message-bus.js +105 -2
  17. package/.claude-flow-novice/dist/src/communication/message-bus.js.map +1 -1
  18. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +1 -1
  19. package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -1
  20. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js +632 -0
  21. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/artifact-cache-optimizer.js.map +1 -0
  22. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js +11 -0
  23. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/cache/index.js.map +1 -0
  24. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js +318 -0
  25. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/checkpoints/checkpoint-compressor.js.map +1 -0
  26. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js +234 -0
  27. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/completion-detector.js.map +1 -0
  28. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js +347 -0
  29. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/hierarchical-detector.js.map +1 -0
  30. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js +13 -0
  31. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/index.js.map +1 -0
  32. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js +173 -0
  33. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/lamport-clock.js.map +1 -0
  34. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js +526 -0
  35. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/mesh-detector.js.map +1 -0
  36. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js +443 -0
  37. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/sdk-completion-detector.js.map +1 -0
  38. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js +366 -0
  39. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/completion/swarm-shutdown.js.map +1 -0
  40. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js +287 -0
  41. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinator-factory.js.map +1 -0
  42. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js +364 -0
  43. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.example.js.map +1 -0
  44. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js +492 -0
  45. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/cascading-shutdown.js.map +1 -0
  46. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js +786 -0
  47. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/hierarchical-coordinator.js.map +1 -0
  48. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js +16 -0
  49. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/index.js.map +1 -0
  50. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js +342 -0
  51. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/parent-child-manager.js.map +1 -0
  52. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js +601 -0
  53. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
  54. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js +9 -0
  55. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/agent-state.js.map +1 -0
  56. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js +413 -0
  57. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dead-letter-queue.js.map +1 -0
  58. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js +471 -0
  59. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-graph.js.map +1 -0
  60. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js +379 -0
  61. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-node.js.map +1 -0
  62. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js +335 -0
  63. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/dependency-resolver.js.map +1 -0
  64. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js +211 -0
  65. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/help-request-metrics.js.map +1 -0
  66. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js +33 -0
  67. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/index.js.map +1 -0
  68. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js +920 -0
  69. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-broker.js.map +1 -0
  70. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js +385 -0
  71. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message-router.js.map +1 -0
  72. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js +138 -0
  73. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/message.js.map +1 -0
  74. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js +478 -0
  75. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/resource-manager-safe.js.map +1 -0
  76. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js +358 -0
  77. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine-config.js.map +1 -0
  78. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js +588 -0
  79. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-machine.js.map +1 -0
  80. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js +153 -0
  81. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.js.map +1 -0
  82. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js +360 -0
  83. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.js.map +1 -0
  84. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js +337 -0
  85. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/core/topic-manager.js.map +1 -0
  86. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js +424 -0
  87. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/deadlock-detector.js.map +1 -0
  88. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js +9 -0
  89. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/index.js.map +1 -0
  90. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js +669 -0
  91. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/deadlock/resource-manager.js.map +1 -0
  92. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js +451 -0
  93. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/artifact-storage.js.map +1 -0
  94. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js +271 -0
  95. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/cycle-detector.js.map +1 -0
  96. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js +335 -0
  97. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-graph.js.map +1 -0
  98. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js +439 -0
  99. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-manager.js.map +1 -0
  100. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js +92 -0
  101. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/dependency-request.js.map +1 -0
  102. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js +21 -0
  103. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/index.js.map +1 -0
  104. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js +223 -0
  105. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/dependency/topological-sort.js.map +1 -0
  106. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js +436 -0
  107. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-coordinator.js.map +1 -0
  108. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js +278 -0
  109. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-matcher.js.map +1 -0
  110. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js +317 -0
  111. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request-handler.js.map +1 -0
  112. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js +273 -0
  113. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/help-request.js.map +1 -0
  114. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js +15 -0
  115. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/index.js.map +1 -0
  116. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js +512 -0
  117. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/help-system/waiting-agent-pool.js.map +1 -0
  118. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js +67 -0
  119. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/index.js.map +1 -0
  120. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js +557 -0
  121. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/help-deadlock-integration.js.map +1 -0
  122. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js +14 -0
  123. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/index.js.map +1 -0
  124. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js +212 -0
  125. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.example.js.map +1 -0
  126. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js +552 -0
  127. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/message-bus-completion-integration.js.map +1 -0
  128. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js +635 -0
  129. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/integration/state-machine-integration.js.map +1 -0
  130. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js +28 -0
  131. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/IArtifactStorage.js.map +1 -0
  132. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js +9 -0
  133. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ICoordinator.js.map +1 -0
  134. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js +25 -0
  135. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/ISessionStore.js.map +1 -0
  136. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js +14 -0
  137. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/interfaces/index.js.map +1 -0
  138. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js +308 -0
  139. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/artifact-adapter.js.map +1 -0
  140. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js +439 -0
  141. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.js.map +1 -0
  142. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js +540 -0
  143. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-graph-storage.js.map +1 -0
  144. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js +367 -0
  145. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/dependency-storage.js.map +1 -0
  146. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js +14 -0
  147. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/index.js.map +1 -0
  148. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js +518 -0
  149. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/message-storage.js.map +1 -0
  150. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js +377 -0
  151. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.js.map +1 -0
  152. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js +371 -0
  153. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channel.js.map +1 -0
  154. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js +355 -0
  155. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/dependency-channel.js.map +1 -0
  156. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js +424 -0
  157. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/help-channel.js.map +1 -0
  158. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js +16 -0
  159. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/index.js.map +1 -0
  160. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js +295 -0
  161. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/state-channel.js.map +1 -0
  162. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js +411 -0
  163. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/channels/task-channel.js.map +1 -0
  164. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js +14 -0
  165. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/index.js.map +1 -0
  166. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js +387 -0
  167. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-bus.js.map +1 -0
  168. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js +589 -0
  169. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-persistence.js.map +1 -0
  170. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js +444 -0
  171. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/messaging/message-router.js.map +1 -0
  172. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js +560 -0
  173. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/artifact-storage.js.map +1 -0
  174. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js +335 -0
  175. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/background-orchestrator.js.map +1 -0
  176. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js +104 -0
  177. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/bash-output-monitor.js.map +1 -0
  178. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js +847 -0
  179. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/checkpoint-manager.js.map +1 -0
  180. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js +470 -0
  181. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/help-coordinator.js.map +1 -0
  182. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js +450 -0
  183. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/hierarchical-background-integration.js.map +1 -0
  184. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js +13 -0
  185. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/index.js.map +1 -0
  186. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js +625 -0
  187. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/message-bus-integration.js.map +1 -0
  188. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js +545 -0
  189. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/multi-level-control.js.map +1 -0
  190. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js +740 -0
  191. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-controller.js.map +1 -0
  192. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js +415 -0
  193. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/query-message-integration.js.map +1 -0
  194. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js +615 -0
  195. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/session-pool-optimizer.js.map +1 -0
  196. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js +547 -0
  197. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-machine-integration.js.map +1 -0
  198. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js +342 -0
  199. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/sdk/state-sdk-integration.js.map +1 -0
  200. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js +259 -0
  201. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/security/payload-validator.js.map +1 -0
  202. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js +273 -0
  203. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/framework-registry.js.map +1 -0
  204. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js +8 -0
  205. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/index.js.map +1 -0
  206. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js +310 -0
  207. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-config-manager.js.map +1 -0
  208. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js +218 -0
  209. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/truth/truth-validator.js.map +1 -0
  210. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js +9 -0
  211. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/types/sdk.js.map +1 -0
  212. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js +6 -0
  213. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/index.js.map +1 -0
  214. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js +145 -0
  215. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/priority-queue.js.map +1 -0
  216. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js +122 -0
  217. package/.claude-flow-novice/dist/src/coordination/archives/v2-sdk-typescript/v2/utils/sdk-helpers.js.map +1 -0
  218. package/.claude-flow-novice/dist/src/coordination/config-translator.js +17 -43
  219. package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -1
  220. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +34 -76
  221. package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -1
  222. package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js +172 -0
  223. package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js.map +1 -0
  224. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js +7 -0
  225. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js.map +1 -0
  226. package/.claude-flow-novice/dist/src/coordination/shared/index.js +19 -0
  227. package/.claude-flow-novice/dist/src/coordination/shared/index.js.map +1 -0
  228. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js +24 -0
  229. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js.map +1 -0
  230. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js +7 -0
  231. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js.map +1 -0
  232. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js +920 -0
  233. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js.map +1 -0
  234. package/.claude-flow-novice/dist/src/coordination/shared/message.js +138 -0
  235. package/.claude-flow-novice/dist/src/coordination/shared/message.js.map +1 -0
  236. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js +259 -0
  237. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js.map +1 -0
  238. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js +17 -0
  239. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js.map +1 -0
  240. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js +19 -0
  241. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js.map +1 -0
  242. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js +357 -0
  243. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js.map +1 -0
  244. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js +679 -0
  245. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js.map +1 -0
  246. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js +7 -0
  247. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js.map +1 -0
  248. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js +10 -0
  249. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js.map +1 -0
  250. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js +52 -2
  251. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -1
  252. package/.claude-flow-novice/dist/src/mcp/mcp-server-novice.js +37 -2
  253. package/.claude-flow-novice/dist/src/mcp/session-manager.js +3 -1
  254. package/.claude-flow-novice/dist/src/mcp/session-manager.js.map +1 -1
  255. package/.claude-flow-novice/dist/src/providers/provider-manager.js +36 -3
  256. package/.claude-flow-novice/dist/src/providers/provider-manager.js.map +1 -1
  257. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js +65 -41
  258. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js.map +1 -1
  259. package/.claude-flow-novice/dist/src/web/api/server.js +1 -1
  260. package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -1
  261. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js +30 -0
  262. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js.map +1 -1
  263. package/.claude-flow-novice/metrics.db-shm +0 -0
  264. package/.claude-flow-novice/metrics.db-wal +0 -0
  265. package/package.json +2 -2
  266. package/scripts/monitoring/alert-monitor.sh +220 -0
  267. package/scripts/monitoring/view-alerts.sh +307 -0
  268. package/scripts/test-zai-api.cjs +2 -2
  269. package/src/slash-commands/parse-epic.js +1 -1
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Agent Coordination V2 - State Transition System
3
+ *
4
+ * Defines event structures and transition validation logic for the state machine.
5
+ * Ensures type-safe state transitions with runtime validation.
6
+ *
7
+ * @module coordination/v2/core/state-transition
8
+ */ import { AgentState } from './agent-state.js';
9
+ /**
10
+ * State transition event types.
11
+ * Maps to specific agent lifecycle events from SDK sessions.
12
+ */ export var TransitionEventType = /*#__PURE__*/ function(TransitionEventType) {
13
+ /** Task assigned to agent */ TransitionEventType["TASK_ASSIGNED"] = "task_assigned";
14
+ /** Agent started execution */ TransitionEventType["EXECUTION_STARTED"] = "execution_started";
15
+ /** Agent completed task successfully */ TransitionEventType["EXECUTION_COMPLETED"] = "execution_completed";
16
+ /** Agent encountered error */ TransitionEventType["EXECUTION_FAILED"] = "execution_failed";
17
+ /** Agent waiting on dependency */ TransitionEventType["DEPENDENCY_BLOCKED"] = "dependency_blocked";
18
+ /** Dependency resolved, agent can resume */ TransitionEventType["DEPENDENCY_RESOLVED"] = "dependency_resolved";
19
+ /** Agent requested to help another agent */ TransitionEventType["HELP_REQUESTED"] = "help_requested";
20
+ /** Agent finished helping and returning to own work */ TransitionEventType["HELP_COMPLETED"] = "help_completed";
21
+ /** Agent deadlocked or requires intervention */ TransitionEventType["DEADLOCK_DETECTED"] = "deadlock_detected";
22
+ /** Agent recovered from error and ready to retry */ TransitionEventType["ERROR_RECOVERED"] = "error_recovered";
23
+ return TransitionEventType;
24
+ }({});
25
+ /**
26
+ * Validates a state transition against allowed transitions.
27
+ *
28
+ * @param fromState - Current agent state
29
+ * @param toState - Target agent state
30
+ * @param allowedTransitions - Map of allowed state transitions
31
+ * @returns Validation result with error details if invalid
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * const result = validateTransition(
36
+ * AgentState.IDLE,
37
+ * AgentState.WORKING,
38
+ * STATE_TRANSITIONS
39
+ * );
40
+ * if (!result.isValid) {
41
+ * throw new Error(result.error);
42
+ * }
43
+ * ```
44
+ */ export function validateTransition(fromState, toState, allowedTransitions) {
45
+ const startTime = Date.now();
46
+ // Check if fromState exists in transition map
47
+ const allowedStates = allowedTransitions[fromState];
48
+ if (!allowedStates) {
49
+ return {
50
+ isValid: false,
51
+ error: `Invalid source state: ${fromState}`
52
+ };
53
+ }
54
+ // Check if transition to toState is allowed
55
+ if (!allowedStates.includes(toState)) {
56
+ return {
57
+ isValid: false,
58
+ error: `Invalid transition from ${fromState} to ${toState}. Allowed: ${allowedStates.join(', ')}`
59
+ };
60
+ }
61
+ // Validate performance requirement: <1ms
62
+ const duration = Date.now() - startTime;
63
+ const warnings = [];
64
+ if (duration >= 1) {
65
+ warnings.push(`Transition validation took ${duration}ms (target: <1ms)`);
66
+ }
67
+ return {
68
+ isValid: true,
69
+ warnings: warnings.length > 0 ? warnings : undefined
70
+ };
71
+ }
72
+ /**
73
+ * Creates a state transition event with proper timestamp and validation.
74
+ *
75
+ * @param type - Event type
76
+ * @param agentId - Agent triggering the transition
77
+ * @param fromState - Current state
78
+ * @param toState - Target state
79
+ * @param metadata - Optional event-specific metadata
80
+ * @returns Validated transition event
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const event = createTransitionEvent(
85
+ * TransitionEventType.TASK_ASSIGNED,
86
+ * 'agent-123',
87
+ * AgentState.IDLE,
88
+ * AgentState.WORKING,
89
+ * { taskId: 'task-456', taskType: 'coder' }
90
+ * );
91
+ * ```
92
+ */ export function createTransitionEvent(type, agentId, fromState, toState, metadata) {
93
+ if (!agentId || agentId.trim().length === 0) {
94
+ throw new Error('agentId is required and cannot be empty');
95
+ }
96
+ return {
97
+ type,
98
+ agentId,
99
+ timestamp: new Date().toISOString(),
100
+ fromState,
101
+ toState,
102
+ metadata
103
+ };
104
+ }
105
+ /**
106
+ * Type guard to check if an event is a specific transition event type.
107
+ *
108
+ * @param event - Event to check
109
+ * @param type - Expected event type
110
+ * @returns True if event matches the specified type
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * if (isEventType(event, TransitionEventType.TASK_ASSIGNED)) {
115
+ * // TypeScript knows event is TaskAssignedEvent
116
+ * console.log(event.metadata.taskId);
117
+ * }
118
+ * ```
119
+ */ export function isEventType(event, type) {
120
+ return event.type === type;
121
+ }
122
+ /**
123
+ * Checks if a transition event represents an error condition.
124
+ *
125
+ * @param event - Transition event to check
126
+ * @returns True if event represents an error
127
+ *
128
+ * @example
129
+ * ```typescript
130
+ * if (isErrorEvent(event)) {
131
+ * handleError(event);
132
+ * }
133
+ * ```
134
+ */ export function isErrorEvent(event) {
135
+ return event.type === "execution_failed" || event.type === "deadlock_detected" || event.toState === AgentState.ERROR || event.toState === AgentState.BLOCKED;
136
+ }
137
+ /**
138
+ * Checks if a transition event represents a terminal state change.
139
+ *
140
+ * @param event - Transition event to check
141
+ * @returns True if event leads to terminal state
142
+ *
143
+ * @example
144
+ * ```typescript
145
+ * if (isTerminalEvent(event)) {
146
+ * finalizeAgent(event.agentId);
147
+ * }
148
+ * ```
149
+ */ export function isTerminalEvent(event) {
150
+ return event.toState === AgentState.COMPLETED || event.toState === AgentState.TERMINATED || event.toState === AgentState.ERROR;
151
+ }
152
+
153
+ //# sourceMappingURL=state-transition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/core/state-transition.ts"],"names":["AgentState","TransitionEventType","validateTransition","fromState","toState","allowedTransitions","startTime","Date","now","allowedStates","isValid","error","includes","join","duration","warnings","push","length","undefined","createTransitionEvent","type","agentId","metadata","trim","Error","timestamp","toISOString","isEventType","event","isErrorEvent","ERROR","BLOCKED","isTerminalEvent","COMPLETED","TERMINATED"],"mappings":"AAAA;;;;;;;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,OAAO;QACLJ;QACAC;QACAI,WAAW,IAAIlB,OAAOmB,WAAW;QACjCvB;QACAC;QACAkB;IACF;AACF;AAEA;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASK,YACdC,KAA2B,EAC3BR,IAAO;IAEP,OAAOQ,MAAMR,IAAI,KAAKA;AACxB;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASS,aAAaD,KAA2B;IACtD,OACEA,MAAMR,IAAI,2BACVQ,MAAMR,IAAI,4BACVQ,MAAMxB,OAAO,KAAKJ,WAAW8B,KAAK,IAClCF,MAAMxB,OAAO,KAAKJ,WAAW+B,OAAO;AAExC;AAEA;;;;;;;;;;;;CAYC,GACD,OAAO,SAASC,gBAAgBJ,KAA2B;IACzD,OACEA,MAAMxB,OAAO,KAAKJ,WAAWiC,SAAS,IACtCL,MAAMxB,OAAO,KAAKJ,WAAWkC,UAAU,IACvCN,MAAMxB,OAAO,KAAKJ,WAAW8B,KAAK;AAEtC"}
@@ -0,0 +1,360 @@
1
+ /**
2
+ * Agent Coordination V2 - Task Scheduler Implementation
3
+ *
4
+ * Priority-based task scheduler with:
5
+ * - Event-driven architecture (task:assigned, task:completed, task:failed)
6
+ * - 3 priority strategies: strict, balanced, loose
7
+ * - Configurable retry logic with retry limits
8
+ * - Comprehensive metrics tracking
9
+ * - Polling-based task assignment
10
+ *
11
+ * @module coordination/v2/core/task-scheduler
12
+ */ import { EventEmitter } from 'events';
13
+ import { DependencyResolver } from './dependency-resolver.js';
14
+ import { DependencyNodeStatus } from './dependency-node.js';
15
+ /**
16
+ * Task Scheduler - Priority-based scheduling with dependency resolution.
17
+ *
18
+ * Provides:
19
+ * - Automatic task assignment based on dependency readiness
20
+ * - Three priority weighting strategies
21
+ * - Event-driven notifications for task lifecycle
22
+ * - Retry logic with configurable limits
23
+ * - Real-time metrics tracking
24
+ *
25
+ * @example
26
+ * ```typescript
27
+ * const scheduler = new TaskScheduler(graph, {
28
+ * maxConcurrency: 5,
29
+ * pollInterval: 100,
30
+ * retryLimit: 3,
31
+ * priorityWeighting: 'balanced'
32
+ * });
33
+ *
34
+ * scheduler.on('task:assigned', ({ taskId, task }) => {
35
+ * console.log(`Task ${taskId} assigned for execution`);
36
+ * });
37
+ *
38
+ * scheduler.on('task:completed', ({ taskId }) => {
39
+ * console.log(`Task ${taskId} completed`);
40
+ * });
41
+ *
42
+ * scheduler.start();
43
+ * ```
44
+ */ export class TaskScheduler extends EventEmitter {
45
+ graph;
46
+ config;
47
+ resolver;
48
+ runningTasks;
49
+ schedulerInterval;
50
+ retryCounters;
51
+ taskOwners;
52
+ /**
53
+ * Creates a new task scheduler.
54
+ *
55
+ * @param graph - Dependency graph containing tasks
56
+ * @param config - Scheduler configuration
57
+ */ constructor(graph, config){
58
+ super(), this.graph = graph, this.config = config;
59
+ this.resolver = new DependencyResolver(graph);
60
+ this.runningTasks = new Set();
61
+ this.retryCounters = new Map();
62
+ this.taskOwners = new Map(); // SEC-005: Initialize ownership map
63
+ }
64
+ // ============================================
65
+ // Lifecycle Management
66
+ // ============================================
67
+ /**
68
+ * Starts the task scheduler.
69
+ *
70
+ * Begins polling for ready tasks at the configured interval.
71
+ */ start() {
72
+ if (this.schedulerInterval) {
73
+ throw new Error('Scheduler is already running');
74
+ }
75
+ this.schedulerInterval = setInterval(()=>{
76
+ this.scheduleTasks();
77
+ }, this.config.pollInterval);
78
+ // Run initial scheduling immediately
79
+ this.scheduleTasks();
80
+ }
81
+ /**
82
+ * Stops the task scheduler.
83
+ *
84
+ * Cancels the polling interval but does not affect running tasks.
85
+ */ stop() {
86
+ if (this.schedulerInterval) {
87
+ clearInterval(this.schedulerInterval);
88
+ this.schedulerInterval = undefined;
89
+ }
90
+ }
91
+ // ============================================
92
+ // Task Scheduling
93
+ // ============================================
94
+ /**
95
+ * Adds a task to the scheduler queue.
96
+ *
97
+ * The task is added to the dependency graph and scheduling is triggered immediately.
98
+ * If the scheduler is running, the task will be picked up in the next polling cycle.
99
+ *
100
+ * @param task - Task to schedule
101
+ */ scheduleTask(task) {
102
+ // Normalize task: ensure taskId is set (use id if taskId not provided)
103
+ const normalizedTask = {
104
+ ...task,
105
+ taskId: task.taskId || task.id || task.id
106
+ };
107
+ this.graph.addNode(normalizedTask);
108
+ this.scheduleTasks(); // Trigger immediate scheduling check
109
+ this.emit('task:queued', {
110
+ taskId: normalizedTask.taskId
111
+ });
112
+ }
113
+ /**
114
+ * Schedules tasks based on dependency readiness and concurrency limits.
115
+ *
116
+ * Called automatically at each poll interval.
117
+ * @private
118
+ */ scheduleTasks() {
119
+ const tasks = this.selectNextTasks();
120
+ for (const task of tasks){
121
+ this.assignTask(task);
122
+ }
123
+ }
124
+ /**
125
+ * Selects next tasks to run based on priority strategy.
126
+ *
127
+ * @returns Array of tasks to assign
128
+ * @private
129
+ */ selectNextTasks() {
130
+ // Get ready tasks from resolver
131
+ const ready = this.resolver.getNextBatch(this.config.maxConcurrency - this.runningTasks.size);
132
+ if (ready.length === 0) {
133
+ return [];
134
+ }
135
+ // Apply priority weighting strategy
136
+ switch(this.config.priorityWeighting){
137
+ case 'strict':
138
+ return this.strictPrioritySelection(ready);
139
+ case 'balanced':
140
+ return this.balancedSelection(ready);
141
+ case 'loose':
142
+ return this.loosePrioritySelection(ready);
143
+ default:
144
+ return ready;
145
+ }
146
+ }
147
+ /**
148
+ * Strict priority selection: Always choose highest priority tasks.
149
+ *
150
+ * @param ready - Array of ready tasks
151
+ * @returns Selected tasks
152
+ * @private
153
+ */ strictPrioritySelection(ready) {
154
+ // Tasks are already sorted by priority (highest first) from graph.getReadyTasks()
155
+ return ready;
156
+ }
157
+ /**
158
+ * Balanced selection: Mix high priority with longest-waiting tasks.
159
+ *
160
+ * Algorithm:
161
+ * - 70% high priority tasks
162
+ * - 30% longest waiting tasks (by createdAt timestamp)
163
+ *
164
+ * @param ready - Array of ready tasks
165
+ * @returns Selected tasks
166
+ * @private
167
+ */ balancedSelection(ready) {
168
+ if (ready.length <= 2) {
169
+ return ready; // Too few to balance
170
+ }
171
+ const available = this.config.maxConcurrency - this.runningTasks.size;
172
+ const highPriorityCount = Math.ceil(available * 0.7);
173
+ const longWaitingCount = available - highPriorityCount;
174
+ // Get high priority tasks (already sorted)
175
+ const highPriority = ready.slice(0, highPriorityCount);
176
+ // Get longest waiting tasks (sort by createdAt)
177
+ const remaining = ready.slice(highPriorityCount);
178
+ const longWaiting = remaining.sort((a, b)=>a.createdAt - b.createdAt).slice(0, longWaitingCount);
179
+ return [
180
+ ...highPriority,
181
+ ...longWaiting
182
+ ];
183
+ }
184
+ /**
185
+ * Loose priority selection: Favor fairness over strict priority.
186
+ *
187
+ * Algorithm:
188
+ * - Round-robin selection across priority levels
189
+ * - Prevents high-priority task monopolization
190
+ *
191
+ * @param ready - Array of ready tasks
192
+ * @returns Selected tasks
193
+ * @private
194
+ */ loosePrioritySelection(ready) {
195
+ // Group tasks by priority level
196
+ const priorityGroups = new Map();
197
+ for (const task of ready){
198
+ const priority = task.priority;
199
+ if (!priorityGroups.has(priority)) {
200
+ priorityGroups.set(priority, []);
201
+ }
202
+ priorityGroups.get(priority).push(task);
203
+ }
204
+ // Round-robin selection across priority groups
205
+ const selected = [];
206
+ const available = this.config.maxConcurrency - this.runningTasks.size;
207
+ const priorities = Array.from(priorityGroups.keys()).sort((a, b)=>b - a);
208
+ let index = 0;
209
+ while(selected.length < available && selected.length < ready.length){
210
+ const priority = priorities[index % priorities.length];
211
+ const group = priorityGroups.get(priority);
212
+ if (group.length > 0) {
213
+ selected.push(group.shift());
214
+ }
215
+ index++;
216
+ // Remove empty groups
217
+ if (group.length === 0) {
218
+ priorityGroups.delete(priority);
219
+ priorities.splice(priorities.indexOf(priority), 1);
220
+ }
221
+ if (priorities.length === 0) {
222
+ break;
223
+ }
224
+ }
225
+ return selected;
226
+ }
227
+ /**
228
+ * Assigns a task for execution.
229
+ *
230
+ * @param task - Task to assign
231
+ * @private
232
+ */ assignTask(task) {
233
+ // Mark as running
234
+ this.runningTasks.add(task.taskId);
235
+ this.taskOwners.set(task.taskId, task.agentId); // SEC-005: Track ownership
236
+ this.graph.updateStatus(task.taskId, DependencyNodeStatus.EXECUTING);
237
+ // Emit assignment event
238
+ this.emit('task:assigned', {
239
+ taskId: task.taskId,
240
+ task
241
+ });
242
+ }
243
+ // ============================================
244
+ // Task Lifecycle Handlers
245
+ // ============================================
246
+ /**
247
+ * Handles task completion.
248
+ *
249
+ * Called by external execution system when a task finishes successfully.
250
+ *
251
+ * @param taskId - ID of the completed task
252
+ * @param callerId - Optional caller ID for authorization (SEC-005)
253
+ */ onTaskCompleted(taskId, callerId) {
254
+ if (!this.runningTasks.has(taskId)) {
255
+ console.warn(`Task ${taskId} completed but was not tracked as running`);
256
+ return;
257
+ }
258
+ // SEC-005: Validate caller is task owner
259
+ const owner = this.taskOwners.get(taskId);
260
+ if (callerId && callerId !== owner) {
261
+ throw new Error(`Unauthorized task completion: ${callerId} is not owner of ${taskId} (owner: ${owner})`);
262
+ }
263
+ // Remove from running set
264
+ this.runningTasks.delete(taskId);
265
+ this.taskOwners.delete(taskId); // SEC-005: Cleanup ownership
266
+ // Update graph status
267
+ this.graph.updateStatus(taskId, DependencyNodeStatus.COMPLETED);
268
+ // Clear retry counter
269
+ this.retryCounters.delete(taskId);
270
+ // Emit completion event
271
+ this.emit('task:completed', {
272
+ taskId
273
+ });
274
+ // Trigger immediate scheduling check (dependent tasks may now be ready)
275
+ this.scheduleTasks();
276
+ }
277
+ /**
278
+ * Handles task failure.
279
+ *
280
+ * Implements retry logic with configurable retry limit.
281
+ * If retries exhausted, marks task as FAILED.
282
+ *
283
+ * @param taskId - ID of the failed task
284
+ * @param error - Error that caused the failure
285
+ * @param callerId - Optional caller ID for authorization (SEC-005)
286
+ */ onTaskFailed(taskId, error, callerId) {
287
+ if (!this.runningTasks.has(taskId)) {
288
+ console.warn(`Task ${taskId} failed but was not tracked as running`);
289
+ return;
290
+ }
291
+ // SEC-005: Validate caller is task owner
292
+ const owner = this.taskOwners.get(taskId);
293
+ if (callerId && callerId !== owner) {
294
+ throw new Error(`Unauthorized task failure report: ${callerId} is not owner of ${taskId} (owner: ${owner})`);
295
+ }
296
+ // Remove from running set
297
+ this.runningTasks.delete(taskId);
298
+ this.taskOwners.delete(taskId); // SEC-005: Cleanup ownership
299
+ // Get/increment retry counter
300
+ const retryCount = (this.retryCounters.get(taskId) ?? 0) + 1;
301
+ this.retryCounters.set(taskId, retryCount);
302
+ // Check retry limit
303
+ if (retryCount < this.config.retryLimit) {
304
+ // Retry: reset to READY status
305
+ this.graph.updateStatus(taskId, DependencyNodeStatus.READY);
306
+ // Emit failure event with retry indication
307
+ this.emit('task:failed', {
308
+ taskId,
309
+ error,
310
+ retryCount
311
+ });
312
+ // Schedule retry on next poll
313
+ // (task will be picked up automatically as READY)
314
+ } else {
315
+ // Retries exhausted: mark as FAILED
316
+ this.graph.updateStatus(taskId, DependencyNodeStatus.FAILED);
317
+ // Emit failure event
318
+ this.emit('task:failed', {
319
+ taskId,
320
+ error,
321
+ retryCount
322
+ });
323
+ }
324
+ }
325
+ // ============================================
326
+ // Metrics
327
+ // ============================================
328
+ /**
329
+ * Gets current scheduler metrics.
330
+ *
331
+ * @returns Scheduler metrics snapshot
332
+ */ getMetrics() {
333
+ const readyTasks = this.graph.getReadyTasks();
334
+ const blockedTasks = this.graph.getBlockedTasks();
335
+ return {
336
+ totalTasks: this.graph.size(),
337
+ completed: this.graph.completedTasks.size,
338
+ running: this.runningTasks.size,
339
+ ready: readyTasks.length,
340
+ blocked: blockedTasks.length
341
+ };
342
+ }
343
+ /**
344
+ * Gets the set of currently running task IDs.
345
+ *
346
+ * @returns Set of running task IDs
347
+ */ getRunningTasks() {
348
+ return new Set(this.runningTasks);
349
+ }
350
+ /**
351
+ * Gets the retry count for a specific task.
352
+ *
353
+ * @param taskId - Task ID
354
+ * @returns Retry count (0 if no retries)
355
+ */ getRetryCount(taskId) {
356
+ return this.retryCounters.get(taskId) ?? 0;
357
+ }
358
+ }
359
+
360
+ //# sourceMappingURL=task-scheduler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/core/task-scheduler.ts"],"names":["EventEmitter","DependencyResolver","DependencyNodeStatus","TaskScheduler","resolver","runningTasks","schedulerInterval","retryCounters","taskOwners","graph","config","Set","Map","start","Error","setInterval","scheduleTasks","pollInterval","stop","clearInterval","undefined","scheduleTask","task","normalizedTask","taskId","id","addNode","emit","tasks","selectNextTasks","assignTask","ready","getNextBatch","maxConcurrency","size","length","priorityWeighting","strictPrioritySelection","balancedSelection","loosePrioritySelection","available","highPriorityCount","Math","ceil","longWaitingCount","highPriority","slice","remaining","longWaiting","sort","a","b","createdAt","priorityGroups","priority","has","set","get","push","selected","priorities","Array","from","keys","index","group","shift","delete","splice","indexOf","add","agentId","updateStatus","EXECUTING","onTaskCompleted","callerId","console","warn","owner","COMPLETED","onTaskFailed","error","retryCount","retryLimit","READY","FAILED","getMetrics","readyTasks","getReadyTasks","blockedTasks","getBlockedTasks","totalTasks","completed","completedTasks","running","blocked","getRunningTasks","getRetryCount"],"mappings":"AAAA;;;;;;;;;;;CAWC,GAED,SAASA,YAAY,QAAQ,SAAS;AACtC,SAASC,kBAAkB,QAAQ,2BAA2B;AAE9D,SAAyBC,oBAAoB,QAAQ,uBAAuB;AAwE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BC,GACD,OAAO,MAAMC,sBAAsBH;;;IACzBI,SAA6B;IAC7BC,aAA0B;IAC1BC,kBAAmC;IACnCC,cAAmC;IACnCC,WAAgC;IAExC;;;;;GAKC,GACD,YACE,AAAQC,KAAsB,EAC9B,AAAQC,MAAuB,CAC/B;QACA,KAAK,SAHGD,QAAAA,YACAC,SAAAA;QAGR,IAAI,CAACN,QAAQ,GAAG,IAAIH,mBAAmBQ;QACvC,IAAI,CAACJ,YAAY,GAAG,IAAIM;QACxB,IAAI,CAACJ,aAAa,GAAG,IAAIK;QACzB,IAAI,CAACJ,UAAU,GAAG,IA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