claude-flow-novice 1.6.4 → 1.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) 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/mcp-server-sdk.js +45 -0
  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/shared/core/agent-state.js +172 -0
  224. package/.claude-flow-novice/dist/src/coordination/shared/core/agent-state.js.map +1 -0
  225. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js +7 -0
  226. package/.claude-flow-novice/dist/src/coordination/shared/core/index.js.map +1 -0
  227. package/.claude-flow-novice/dist/src/coordination/shared/index.js +19 -0
  228. package/.claude-flow-novice/dist/src/coordination/shared/index.js.map +1 -0
  229. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js +24 -0
  230. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/ICoordinator.js.map +1 -0
  231. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js +7 -0
  232. package/.claude-flow-novice/dist/src/coordination/shared/interfaces/index.js.map +1 -0
  233. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js +920 -0
  234. package/.claude-flow-novice/dist/src/coordination/shared/message-broker.js.map +1 -0
  235. package/.claude-flow-novice/dist/src/coordination/shared/message.js +138 -0
  236. package/.claude-flow-novice/dist/src/coordination/shared/message.js.map +1 -0
  237. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js +259 -0
  238. package/.claude-flow-novice/dist/src/coordination/shared/security/payload-validator.js.map +1 -0
  239. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js +17 -0
  240. package/.claude-flow-novice/dist/src/coordination/shared/transparency/index.js.map +1 -0
  241. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js +19 -0
  242. package/.claude-flow-novice/dist/src/coordination/shared/transparency/interfaces/transparency-system.js.map +1 -0
  243. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js +357 -0
  244. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-integration.js.map +1 -0
  245. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js +679 -0
  246. package/.claude-flow-novice/dist/src/coordination/shared/transparency/transparency-system.js.map +1 -0
  247. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js +7 -0
  248. package/.claude-flow-novice/dist/src/coordination/shared/types/index.js.map +1 -0
  249. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js +10 -0
  250. package/.claude-flow-novice/dist/src/coordination/shared/types/sdk.js.map +1 -0
  251. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js +52 -2
  252. package/.claude-flow-novice/dist/src/feature-flags/core/FeatureFlagManager.js.map +1 -1
  253. package/.claude-flow-novice/dist/src/mcp/mcp-server-novice.js +37 -2
  254. package/.claude-flow-novice/dist/src/mcp/session-manager.js +3 -1
  255. package/.claude-flow-novice/dist/src/mcp/session-manager.js.map +1 -1
  256. package/.claude-flow-novice/dist/src/providers/provider-manager.js +36 -3
  257. package/.claude-flow-novice/dist/src/providers/provider-manager.js.map +1 -1
  258. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js +65 -41
  259. package/.claude-flow-novice/dist/src/utils/markdown-sanitizer.js.map +1 -1
  260. package/.claude-flow-novice/dist/src/web/api/server.js +1 -1
  261. package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -1
  262. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js +30 -0
  263. package/.claude-flow-novice/dist/src/workflows/progressive-rollout-manager.js.map +1 -1
  264. package/.claude-flow-novice/metrics.db-shm +0 -0
  265. package/.claude-flow-novice/metrics.db-wal +0 -0
  266. package/config/.env.example +178 -0
  267. package/config/DEPLOYMENT_GUIDE.md +692 -0
  268. package/config/README-CONFIG.md +331 -0
  269. package/config/coordination-config.sh +327 -0
  270. package/config/docker/env.development +53 -0
  271. package/config/docker/env.production +83 -0
  272. package/config/docker/env.staging +70 -0
  273. package/config/k8s/configmap-development.yaml +60 -0
  274. package/config/k8s/configmap-production.yaml +85 -0
  275. package/config/k8s/configmap-staging.yaml +76 -0
  276. package/config/k8s/secret-production.yaml +62 -0
  277. package/config/k8s/secret-staging.yaml +36 -0
  278. package/package.json +2 -2
  279. package/scripts/monitoring/alert-monitor.sh +220 -0
  280. package/scripts/monitoring/dashboards/rate-limiting-dashboard.json +211 -0
  281. package/scripts/monitoring/quick-test-alerting.sh +118 -0
  282. package/scripts/monitoring/quick-test-rate-limiting.sh +206 -0
  283. package/scripts/monitoring/rate-limiting-monitor.sh +380 -0
  284. package/scripts/monitoring/view-alerts.sh +307 -0
  285. package/scripts/test-zai-api.cjs +2 -2
  286. package/src/slash-commands/parse-epic.js +1 -1
@@ -0,0 +1,439 @@
1
+ /**
2
+ * Agent Coordination V2 - Completion Storage Implementation
3
+ *
4
+ * Artifact-backed completion metrics persistence with MessagePack serialization and compression.
5
+ * Performance targets:
6
+ * - Save/load: <20ms p95
7
+ * - Storage efficiency: 3x compression ratio
8
+ *
9
+ * Features:
10
+ * - Binary MessagePack serialization (3x faster than JSON)
11
+ * - Gzip compression for storage efficiency
12
+ * - Completion timestamp and duration tracking
13
+ * - Agent count and swarm metadata
14
+ * - Schema versioning for backward compatibility
15
+ * - Integrity verification with checksums
16
+ *
17
+ * @module coordination/v2/memory/completion-storage
18
+ */ import * as msgpack from 'msgpack-lite';
19
+ import { gzip, gunzip } from 'zlib';
20
+ import { promisify } from 'util';
21
+ import { createHash } from 'crypto';
22
+ const gzipAsync = promisify(gzip);
23
+ const gunzipAsync = promisify(gunzip);
24
+ /**
25
+ * Schema version for forward/backward compatibility
26
+ */ const SCHEMA_VERSION = 1;
27
+ /**
28
+ * CompletionStorage - Artifact-backed completion metrics persistence
29
+ *
30
+ * Provides high-performance storage for swarm completion metrics using:
31
+ * - MessagePack binary serialization (smaller payloads)
32
+ * - Gzip compression (additional size reduction)
33
+ * - Schema versioning for compatibility
34
+ * - Integrity verification with checksums
35
+ *
36
+ * @example
37
+ * ```typescript
38
+ * const storage = new CompletionStorage(artifactStorage);
39
+ * await storage.initialize();
40
+ *
41
+ * // Save completion metrics
42
+ * const metrics: CompletionMetrics = {
43
+ * swarmId: 'swarm-001',
44
+ * completedAt: Date.now(),
45
+ * startedAt: Date.now() - 60000,
46
+ * durationMs: 60000,
47
+ * agentCount: 5,
48
+ * agentIds: ['agent-1', 'agent-2', 'agent-3', 'agent-4', 'agent-5'],
49
+ * consensusScore: 0.95,
50
+ * testCoverage: 87.5,
51
+ * status: 'success',
52
+ * metadata: {}
53
+ * };
54
+ * await storage.saveCompletion(metrics);
55
+ *
56
+ * // Load completion metrics
57
+ * const loaded = await storage.loadCompletion('swarm-001');
58
+ *
59
+ * // Query completions
60
+ * const successful = await storage.queryCompletions({
61
+ * status: ['success'],
62
+ * minConsensusScore: 0.90,
63
+ * limit: 10
64
+ * });
65
+ * ```
66
+ */ export class CompletionStorage {
67
+ artifactStorage;
68
+ metrics;
69
+ latencyBuffer = [];
70
+ ready = false;
71
+ constructor(artifactStorage){
72
+ this.artifactStorage = artifactStorage;
73
+ this.metrics = this.initializeMetrics();
74
+ }
75
+ // ===========================
76
+ // Lifecycle
77
+ // ===========================
78
+ /**
79
+ * Initialize storage backend
80
+ */ async initialize() {
81
+ if (!this.artifactStorage.isReady()) {
82
+ await this.artifactStorage.initialize();
83
+ }
84
+ this.ready = true;
85
+ }
86
+ /**
87
+ * Close storage connections
88
+ */ async close() {
89
+ this.ready = false;
90
+ }
91
+ /**
92
+ * Check if storage is ready
93
+ */ isReady() {
94
+ return this.ready && this.artifactStorage.isReady();
95
+ }
96
+ // ===========================
97
+ // Core Persistence Operations
98
+ // ===========================
99
+ /**
100
+ * Save completion metrics to artifact storage
101
+ *
102
+ * Performance target: <20ms p95
103
+ *
104
+ * @param metrics - CompletionMetrics to persist
105
+ * @throws Error if serialization or storage fails
106
+ */ async saveCompletion(metrics) {
107
+ this.ensureReady();
108
+ const startTime = Date.now();
109
+ try {
110
+ // Calculate checksum of metrics
111
+ const metricsJson = JSON.stringify(metrics);
112
+ const checksum = this.calculateChecksum(Buffer.from(metricsJson));
113
+ // Create serialized structure
114
+ const serialized = {
115
+ version: SCHEMA_VERSION,
116
+ metrics,
117
+ checksum,
118
+ serializedAt: Date.now()
119
+ };
120
+ // Encode with MessagePack (binary)
121
+ const packed = msgpack.encode(serialized);
122
+ // Compress with gzip
123
+ const compressed = await gzipAsync(packed);
124
+ // Store in artifact storage
125
+ await this.artifactStorage.uploadArtifact('completion-storage', metrics.swarmId, compressed, {
126
+ type: 'completion-metrics',
127
+ filename: `${metrics.swarmId}.msgpack.gz`,
128
+ tags: [
129
+ 'completion',
130
+ 'metrics',
131
+ metrics.swarmId,
132
+ metrics.status,
133
+ ...metrics.phaseId ? [
134
+ metrics.phaseId
135
+ ] : []
136
+ ],
137
+ metadata: {
138
+ schemaVersion: SCHEMA_VERSION,
139
+ swarmId: metrics.swarmId,
140
+ completedAt: metrics.completedAt,
141
+ durationMs: metrics.durationMs,
142
+ agentCount: metrics.agentCount,
143
+ status: metrics.status,
144
+ consensusScore: metrics.consensusScore,
145
+ testCoverage: metrics.testCoverage,
146
+ phaseId: metrics.phaseId,
147
+ uncompressedBytes: packed.length,
148
+ compressedBytes: compressed.length,
149
+ checksum
150
+ },
151
+ forceCompression: false // Already compressed
152
+ });
153
+ // Update metrics
154
+ const latency = Date.now() - startTime;
155
+ this.updateSaveMetrics(latency);
156
+ // Performance warning if exceeds target
157
+ if (latency > 20) {
158
+ console.warn(`[CompletionStorage] Save latency ${latency}ms exceeds 20ms target for swarm ${metrics.swarmId}`);
159
+ }
160
+ } catch (error) {
161
+ throw new Error(`Failed to save completion metrics for ${metrics.swarmId}: ${error instanceof Error ? error.message : String(error)}`);
162
+ }
163
+ }
164
+ /**
165
+ * Load completion metrics from artifact storage
166
+ *
167
+ * Performance target: <20ms p95
168
+ *
169
+ * @param swarmId - Swarm identifier
170
+ * @returns CompletionMetrics
171
+ * @throws Error if not found or deserialization fails
172
+ */ async loadCompletion(swarmId) {
173
+ this.ensureReady();
174
+ const startTime = Date.now();
175
+ try {
176
+ // Query for completion artifacts
177
+ const artifacts = await this.artifactStorage.queryArtifacts({
178
+ sessionId: swarmId,
179
+ type: [
180
+ 'completion-metrics'
181
+ ],
182
+ sortBy: 'createdAt',
183
+ sortOrder: 'desc',
184
+ limit: 1
185
+ });
186
+ if (artifacts.length === 0) {
187
+ throw new Error(`Completion metrics for swarm ${swarmId} not found in storage`);
188
+ }
189
+ // Download artifact
190
+ const result = await this.artifactStorage.downloadArtifact(artifacts[0].artifactId);
191
+ // Decompress
192
+ const decompressed = await gunzipAsync(result.content);
193
+ // Decode MessagePack
194
+ const serialized = msgpack.decode(decompressed);
195
+ // Validate schema version
196
+ if (serialized.version > SCHEMA_VERSION) {
197
+ throw new Error(`Unsupported schema version ${serialized.version}, current: ${SCHEMA_VERSION}`);
198
+ }
199
+ // Verify checksum
200
+ const metricsJson = JSON.stringify(serialized.metrics);
201
+ const calculatedChecksum = this.calculateChecksum(Buffer.from(metricsJson));
202
+ if (calculatedChecksum !== serialized.checksum) {
203
+ throw new Error(`Checksum mismatch for swarm ${swarmId}: expected ${serialized.checksum}, got ${calculatedChecksum}`);
204
+ }
205
+ // Update metrics
206
+ const latency = Date.now() - startTime;
207
+ this.updateLoadMetrics(latency);
208
+ // Performance warning if exceeds target
209
+ if (latency > 20) {
210
+ console.warn(`[CompletionStorage] Load latency ${latency}ms exceeds 20ms target for swarm ${swarmId}`);
211
+ }
212
+ return serialized.metrics;
213
+ } catch (error) {
214
+ throw new Error(`Failed to load completion metrics for ${swarmId}: ${error instanceof Error ? error.message : String(error)}`);
215
+ }
216
+ }
217
+ /**
218
+ * Query completion metrics with filtering
219
+ *
220
+ * @param filter - Query filter criteria
221
+ * @returns Array of matching CompletionMetrics
222
+ */ async queryCompletions(filter) {
223
+ this.ensureReady();
224
+ const startTime = Date.now();
225
+ try {
226
+ // Build artifact query
227
+ const tags = [
228
+ 'completion'
229
+ ];
230
+ if (filter.phaseId) {
231
+ tags.push(filter.phaseId);
232
+ }
233
+ if (filter.status) {
234
+ tags.push(...filter.status);
235
+ }
236
+ // Query artifacts
237
+ const artifacts = await this.artifactStorage.queryArtifacts({
238
+ tags,
239
+ type: [
240
+ 'completion-metrics'
241
+ ],
242
+ sortBy: filter.sortBy === 'completedAt' ? 'createdAt' : 'createdAt',
243
+ sortOrder: filter.sortOrder || 'desc',
244
+ limit: filter.limit
245
+ });
246
+ // Load and filter metrics
247
+ const completions = [];
248
+ for (const artifact of artifacts){
249
+ try {
250
+ const result = await this.artifactStorage.downloadArtifact(artifact.artifactId);
251
+ const decompressed = await gunzipAsync(result.content);
252
+ const serialized = msgpack.decode(decompressed);
253
+ const metrics = serialized.metrics;
254
+ // Apply additional filters
255
+ if (filter.swarmId && metrics.swarmId !== filter.swarmId) {
256
+ continue;
257
+ }
258
+ if (filter.completedAfter && metrics.completedAt < filter.completedAfter) {
259
+ continue;
260
+ }
261
+ if (filter.completedBefore && metrics.completedAt > filter.completedBefore) {
262
+ continue;
263
+ }
264
+ if (filter.minConsensusScore !== undefined && (metrics.consensusScore === undefined || metrics.consensusScore < filter.minConsensusScore)) {
265
+ continue;
266
+ }
267
+ if (filter.minTestCoverage !== undefined && (metrics.testCoverage === undefined || metrics.testCoverage < filter.minTestCoverage)) {
268
+ continue;
269
+ }
270
+ completions.push(metrics);
271
+ } catch (error) {
272
+ console.warn(`[CompletionStorage] Failed to load artifact ${artifact.artifactId}:`, error);
273
+ continue;
274
+ }
275
+ }
276
+ // Sort if needed
277
+ if (filter.sortBy && filter.sortBy !== 'completedAt') {
278
+ completions.sort((a, b)=>{
279
+ const aVal = a[filter.sortBy];
280
+ const bVal = b[filter.sortBy];
281
+ return filter.sortOrder === 'asc' ? aVal - bVal : bVal - aVal;
282
+ });
283
+ }
284
+ // Update metrics
285
+ const latency = Date.now() - startTime;
286
+ this.metrics.totalQueries++;
287
+ this.metrics.lastOperationMs = latency;
288
+ return completions;
289
+ } catch (error) {
290
+ throw new Error(`Failed to query completion metrics: ${error instanceof Error ? error.message : String(error)}`);
291
+ }
292
+ }
293
+ /**
294
+ * Delete completion metrics
295
+ *
296
+ * @param swarmId - Swarm identifier
297
+ * @returns Promise resolving when deleted
298
+ */ async deleteCompletion(swarmId) {
299
+ this.ensureReady();
300
+ try {
301
+ const artifacts = await this.artifactStorage.queryArtifacts({
302
+ sessionId: swarmId,
303
+ type: [
304
+ 'completion-metrics'
305
+ ]
306
+ });
307
+ for (const artifact of artifacts){
308
+ await this.artifactStorage.deleteArtifact(artifact.artifactId);
309
+ }
310
+ } catch (error) {
311
+ throw new Error(`Failed to delete completion metrics for ${swarmId}: ${error instanceof Error ? error.message : String(error)}`);
312
+ }
313
+ }
314
+ /**
315
+ * Get completion count for phase
316
+ *
317
+ * @param phaseId - Phase identifier
318
+ * @returns Number of completions in phase
319
+ */ async getPhaseCompletionCount(phaseId) {
320
+ const completions = await this.queryCompletions({
321
+ phaseId,
322
+ limit: 10000 // High limit to get all
323
+ });
324
+ return completions.length;
325
+ }
326
+ /**
327
+ * Get average completion duration for phase
328
+ *
329
+ * @param phaseId - Phase identifier
330
+ * @returns Average duration in milliseconds
331
+ */ async getPhaseAverageDuration(phaseId) {
332
+ const completions = await this.queryCompletions({
333
+ phaseId,
334
+ limit: 10000
335
+ });
336
+ if (completions.length === 0) {
337
+ return 0;
338
+ }
339
+ const totalDuration = completions.reduce((sum, c)=>sum + c.durationMs, 0);
340
+ return totalDuration / completions.length;
341
+ }
342
+ /**
343
+ * Get phase success rate
344
+ *
345
+ * @param phaseId - Phase identifier
346
+ * @returns Success rate (0-1)
347
+ */ async getPhaseSuccessRate(phaseId) {
348
+ const completions = await this.queryCompletions({
349
+ phaseId,
350
+ limit: 10000
351
+ });
352
+ if (completions.length === 0) {
353
+ return 0;
354
+ }
355
+ const successCount = completions.filter((c)=>c.status === 'success').length;
356
+ return successCount / completions.length;
357
+ }
358
+ // ===========================
359
+ // Utility Methods
360
+ // ===========================
361
+ /**
362
+ * Calculate SHA-256 checksum for integrity verification
363
+ */ calculateChecksum(buffer) {
364
+ return createHash('sha256').update(buffer).digest('hex');
365
+ }
366
+ /**
367
+ * Ensure storage is ready for operations
368
+ */ ensureReady() {
369
+ if (!this.ready) {
370
+ throw new Error('CompletionStorage not initialized. Call initialize() first.');
371
+ }
372
+ if (!this.artifactStorage.isReady()) {
373
+ throw new Error('Artifact storage backend not ready');
374
+ }
375
+ }
376
+ // ===========================
377
+ // Metrics & Monitoring
378
+ // ===========================
379
+ /**
380
+ * Get storage performance metrics
381
+ */ getMetrics() {
382
+ return {
383
+ ...this.metrics
384
+ };
385
+ }
386
+ /**
387
+ * Initialize metrics structure
388
+ */ initializeMetrics() {
389
+ return {
390
+ totalSaves: 0,
391
+ totalLoads: 0,
392
+ totalQueries: 0,
393
+ averageSaveMs: 0,
394
+ averageLoadMs: 0,
395
+ p95SaveMs: 0,
396
+ p95LoadMs: 0,
397
+ lastOperationMs: 0
398
+ };
399
+ }
400
+ /**
401
+ * Update save operation metrics
402
+ */ updateSaveMetrics(latency) {
403
+ this.metrics.totalSaves++;
404
+ this.metrics.averageSaveMs = this.updateAverage(this.metrics.averageSaveMs, latency, this.metrics.totalSaves);
405
+ this.latencyBuffer.push(latency);
406
+ this.metrics.p95SaveMs = this.calculateP95();
407
+ this.metrics.lastOperationMs = latency;
408
+ }
409
+ /**
410
+ * Update load operation metrics
411
+ */ updateLoadMetrics(latency) {
412
+ this.metrics.totalLoads++;
413
+ this.metrics.averageLoadMs = this.updateAverage(this.metrics.averageLoadMs, latency, this.metrics.totalLoads);
414
+ this.latencyBuffer.push(latency);
415
+ this.metrics.p95LoadMs = this.calculateP95();
416
+ this.metrics.lastOperationMs = latency;
417
+ }
418
+ /**
419
+ * Calculate rolling average
420
+ */ updateAverage(current, newValue, count) {
421
+ return (current * (count - 1) + newValue) / count;
422
+ }
423
+ /**
424
+ * Calculate 95th percentile latency
425
+ */ calculateP95() {
426
+ if (this.latencyBuffer.length === 0) return 0;
427
+ // Keep buffer size manageable
428
+ if (this.latencyBuffer.length > 1000) {
429
+ this.latencyBuffer = this.latencyBuffer.slice(-1000);
430
+ }
431
+ const sorted = [
432
+ ...this.latencyBuffer
433
+ ].sort((a, b)=>a - b);
434
+ const index = Math.floor(sorted.length * 0.95);
435
+ return sorted[index] || 0;
436
+ }
437
+ }
438
+
439
+ //# sourceMappingURL=completion-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/memory/completion-storage.ts"],"names":["msgpack","gzip","gunzip","promisify","createHash","gzipAsync","gunzipAsync","SCHEMA_VERSION","CompletionStorage","artifactStorage","metrics","latencyBuffer","ready","initializeMetrics","initialize","isReady","close","saveCompletion","ensureReady","startTime","Date","now","metricsJson","JSON","stringify","checksum","calculateChecksum","Buffer","from","serialized","version","serializedAt","packed","encode","compressed","uploadArtifact","swarmId","type","filename","tags","status","phaseId","metadata","schemaVersion","completedAt","durationMs","agentCount","consensusScore","testCoverage","uncompressedBytes","length","compressedBytes","forceCompression","latency","updateSaveMetrics","console","warn","error","Error","message","String","loadCompletion","artifacts","queryArtifacts","sessionId","sortBy","sortOrder","limit","result","downloadArtifact","artifactId","decompressed","content","decode","calculatedChecksum","updateLoadMetrics","queryCompletions","filter","push","completions","artifact","completedAfter","completedBefore","minConsensusScore","undefined","minTestCoverage","sort","a","b","aVal","bVal","totalQueries","lastOperationMs","deleteCompletion","deleteArtifact","getPhaseCompletionCount","getPhaseAverageDuration","totalDuration","reduce","sum","c","getPhaseSuccessRate","successCount","buffer","update","digest","getMetrics","totalSaves","totalLoads","averageSaveMs","averageLoadMs","p95SaveMs","p95LoadMs","updateAverage","calculateP95","current","newValue","count","slice","sorted","index","Math","floor"],"mappings":"AAAA;;;;;;;;;;;;;;;;;CAiBC,GAGD,YAAYA,aAAa,eAAe;AACxC,SAASC,IAAI,EAAEC,MAAM,QAAQ,OAAO;AACpC,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,UAAU,QAAQ,SAAS;AAEpC,MAAMC,YAAYF,UAAUF;AAC5B,MAAMK,cAAcH,UAAUD;AAE9B;;CAEC,GACD,MAAMK,iBAAiB;AA4GvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCC,GACD,OAAO,MAAMC;IACHC,gBAAkC;IAClCC,QAAwB;IACxBC,gBAA0B,EAAE,CAAC;IAC7BC,QAAiB,MAAM;IAE/B,YAAYH,eAAiC,CAAE;QAC7C,IAAI,CAACA,eAAe,GAAGA;QACvB,IAAI,CAACC,OAAO,GAAG,IAAI,CAACG,iBAAiB;IACvC;IAEA,8BAA8B;IAC9B,YAAY;IACZ,8BAA8B;IAE9B;;GAEC,GACD,MAAMC,aAA4B;QAChC,IAAI,CAAC,IAAI,CAACL,eAAe,CAACM,OAAO,IAAI;YACnC,MAAM,IAAI,CAACN,eAAe,CAACK,UAAU;QACvC;QACA,IAAI,CAACF,KAAK,GAAG;IACf;IAEA;;GAEC,GACD,MAAMI,QAAuB;QAC3B,IAAI,CAACJ,KAAK,GAAG;IACf;IAEA;;GAEC,GACDG,UAAmB;QACjB,OAAO,IAAI,CAACH,KAAK,IAAI,IAAI,CAACH,eAAe,CAACM,OAAO;IACnD;IAEA,8BAA8B;IAC9B,8BAA8B;IAC9B,8BAA8B;IAE9B;;;;;;;GAOC,GACD,MAAME,eAAeP,OAA0B,EAAiB;QAC9D,IAAI,CAACQ,WAAW;QAChB,MAAMC,YAAYC,K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