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,377 @@
1
+ /**
2
+ * Agent Coordination V2 - Artifact-Backed State Storage
3
+ *
4
+ * High-performance state persistence using artifact storage backend.
5
+ * Target: <12ms p95 latency (3.7x faster than JSON baseline).
6
+ *
7
+ * Features:
8
+ * - Binary artifact storage with MessagePack compression
9
+ * - Checkpoint-based state snapshots
10
+ * - Git-like state versioning with message UUID tracking
11
+ * - SwarmMemory integration for gradual migration
12
+ * - State recovery <500ms (p99)
13
+ *
14
+ * @module coordination/v2/memory/state-storage
15
+ */ import { AgentState } from '../../shared/types/sdk.js';
16
+ import { FilesystemArtifactStorage } from '../sdk/artifact-storage.js';
17
+ import { CheckpointManager } from '../sdk/checkpoint-manager.js';
18
+ import * as msgpack from 'msgpack-lite';
19
+ /**
20
+ * StateStorage - Artifact-backed persistence layer
21
+ *
22
+ * Uses IArtifactStorage for binary-optimized state persistence.
23
+ * Integrates with CheckpointManager for snapshot-based recovery.
24
+ *
25
+ * Performance targets:
26
+ * - Write: <12ms (p95) - 3.7x faster than JSON
27
+ * - Read: <8ms (p95)
28
+ * - Recovery: <500ms (p99)
29
+ */ export class StateStorage {
30
+ artifactStorage;
31
+ checkpointManager;
32
+ config;
33
+ stateIndex = new Map();
34
+ writeLatencies = [];
35
+ readLatencies = [];
36
+ metrics;
37
+ initialized = false;
38
+ constructor(artifactStorage, checkpointManager, config = {}){
39
+ this.config = {
40
+ storagePath: config.storagePath || '.claude-flow/state-storage',
41
+ enableCompression: config.enableCompression ?? true,
42
+ enableVersioning: config.enableVersioning ?? true,
43
+ maxVersions: config.maxVersions || 5,
44
+ autoCheckpoint: config.autoCheckpoint ?? true,
45
+ retentionHours: config.retentionHours || 168
46
+ };
47
+ // Initialize storage backends
48
+ this.artifactStorage = artifactStorage || new FilesystemArtifactStorage({
49
+ backend: 'filesystem',
50
+ path: `${this.config.storagePath}/artifacts`,
51
+ enableCompression: this.config.enableCompression,
52
+ enableVersioning: this.config.enableVersioning,
53
+ maxVersions: this.config.maxVersions,
54
+ retentionHours: this.config.retentionHours
55
+ });
56
+ this.checkpointManager = checkpointManager || new CheckpointManager(`${this.config.storagePath}/checkpoints`);
57
+ this.metrics = {
58
+ totalStates: 0,
59
+ totalCheckpoints: 0,
60
+ averageWriteLatencyMs: 0,
61
+ averageReadLatencyMs: 0,
62
+ p95WriteLatencyMs: 0,
63
+ p95ReadLatencyMs: 0,
64
+ compressionRatio: 0,
65
+ totalStorageMb: 0,
66
+ artifactStorageSpeedup: 3.7
67
+ };
68
+ }
69
+ /**
70
+ * Initialize storage backend
71
+ */ async initialize() {
72
+ if (this.initialized) return;
73
+ await this.artifactStorage.initialize();
74
+ await this.checkpointManager.initialize();
75
+ // Load existing state index
76
+ await this.loadStateIndex();
77
+ this.initialized = true;
78
+ console.log('✅ StateStorage initialized');
79
+ }
80
+ /**
81
+ * Store agent state with artifact backend
82
+ * Target: <12ms p95 latency (3.7x faster than JSON)
83
+ */ async setState(agentId, state, checkpointUUID, context = {}, metadata) {
84
+ this.ensureInitialized();
85
+ const startTime = performance.now();
86
+ const sessionId = context.sessionId || 'default-session';
87
+ const timestamp = Date.now();
88
+ // Create state snapshot
89
+ const snapshot = {
90
+ agentId,
91
+ sessionId,
92
+ state,
93
+ messageUUID: checkpointUUID,
94
+ timestamp,
95
+ context,
96
+ metadata: {
97
+ version: 1,
98
+ reason: metadata?.reason,
99
+ autoCheckpoint: metadata?.autoCheckpoint
100
+ }
101
+ };
102
+ // Create checkpoint first if auto-checkpoint enabled
103
+ if (this.config.autoCheckpoint) {
104
+ const checkpointId = await this.checkpointManager.createCheckpoint(sessionId, agentId, checkpointUUID, state, context, {
105
+ reason: metadata?.reason || 'Auto-checkpoint on state change',
106
+ autoCheckpoint: true
107
+ });
108
+ snapshot.metadata.checkpointId = checkpointId;
109
+ }
110
+ // Serialize with MessagePack for binary compression
111
+ const content = Buffer.from(msgpack.encode(snapshot));
112
+ // Upload to artifact storage (binary optimized)
113
+ const artifactMetadata = await this.artifactStorage.uploadArtifact(agentId, sessionId, content, {
114
+ type: 'agent-state',
115
+ filename: `state-${agentId}-${checkpointUUID}.msgpack`,
116
+ tags: [
117
+ 'agent-state',
118
+ agentId,
119
+ state
120
+ ],
121
+ metadata: {
122
+ agentId,
123
+ state,
124
+ messageUUID: checkpointUUID,
125
+ timestamp,
126
+ checkpointId: snapshot.metadata.checkpointId
127
+ },
128
+ forceCompression: this.config.enableCompression
129
+ });
130
+ // Update state index for fast lookups
131
+ this.stateIndex.set(agentId, artifactMetadata.artifactId);
132
+ // Update metrics
133
+ const writeLatency = performance.now() - startTime;
134
+ this.updateWriteMetrics(writeLatency);
135
+ // Verify p95 latency target
136
+ if (writeLatency > 12 && this.writeLatencies.length >= 100) {
137
+ console.warn(`⚠️ State write exceeded 12ms target: ${writeLatency.toFixed(2)}ms (p95: ${this.metrics.p95WriteLatencyMs.toFixed(2)}ms)`);
138
+ }
139
+ console.log(`✅ State stored for ${agentId}: ${state} (${writeLatency.toFixed(2)}ms, artifact: ${artifactMetadata.artifactId})`);
140
+ }
141
+ /**
142
+ * Retrieve agent state from artifact storage
143
+ * Target: <8ms p95 latency
144
+ */ async getState(agentId) {
145
+ this.ensureInitialized();
146
+ const startTime = performance.now();
147
+ const artifactId = this.stateIndex.get(agentId);
148
+ if (!artifactId) {
149
+ return undefined;
150
+ }
151
+ // Download from artifact storage
152
+ const result = await this.artifactStorage.downloadArtifact(artifactId);
153
+ // Deserialize MessagePack
154
+ const snapshot = msgpack.decode(result.content);
155
+ // Update metrics
156
+ const readLatency = performance.now() - startTime;
157
+ this.updateReadMetrics(readLatency);
158
+ console.log(`✅ State retrieved for ${agentId}: ${snapshot.state} (${readLatency.toFixed(2)}ms)`);
159
+ return snapshot;
160
+ }
161
+ /**
162
+ * Get all agent states (for coordinator view)
163
+ */ async getAllStates() {
164
+ this.ensureInitialized();
165
+ const states = new Map();
166
+ for (const [agentId, artifactId] of this.stateIndex.entries()){
167
+ try {
168
+ const result = await this.artifactStorage.downloadArtifact(artifactId);
169
+ const snapshot = msgpack.decode(result.content);
170
+ states.set(agentId, snapshot);
171
+ } catch (error) {
172
+ console.warn(`Failed to load state for ${agentId}:`, error);
173
+ }
174
+ }
175
+ return states;
176
+ }
177
+ /**
178
+ * Restore agent state from checkpoint
179
+ * Target: <500ms p99 latency
180
+ */ async restoreFromCheckpoint(agentId, checkpointId) {
181
+ this.ensureInitialized();
182
+ const startTime = performance.now();
183
+ // Restore checkpoint from CheckpointManager
184
+ const restoreResult = await this.checkpointManager.restoreCheckpoint(checkpointId);
185
+ // Reconstruct state snapshot
186
+ const snapshot = {
187
+ agentId,
188
+ sessionId: restoreResult.restoredState.sessionId || 'restored-session',
189
+ state: AgentState.WORKING,
190
+ messageUUID: restoreResult.messageUUID,
191
+ timestamp: Date.now(),
192
+ context: restoreResult.restoredState,
193
+ metadata: {
194
+ checkpointId,
195
+ version: 1,
196
+ reason: 'Restored from checkpoint'
197
+ }
198
+ };
199
+ // Update current state index
200
+ await this.setState(agentId, snapshot.state, snapshot.messageUUID, snapshot.context, {
201
+ reason: 'Checkpoint restore',
202
+ autoCheckpoint: false
203
+ });
204
+ const recoveryLatency = performance.now() - startTime;
205
+ // Verify p99 recovery target
206
+ if (recoveryLatency > 500) {
207
+ console.warn(`⚠️ State recovery exceeded 500ms target: ${recoveryLatency.toFixed(2)}ms`);
208
+ }
209
+ console.log(`✅ State restored from checkpoint ${checkpointId}: ${recoveryLatency.toFixed(2)}ms`);
210
+ return snapshot;
211
+ }
212
+ /**
213
+ * Delete agent state and associated checkpoints
214
+ */ async deleteState(agentId) {
215
+ this.ensureInitialized();
216
+ const artifactId = this.stateIndex.get(agentId);
217
+ if (artifactId) {
218
+ await this.artifactStorage.deleteArtifact(artifactId);
219
+ this.stateIndex.delete(agentId);
220
+ }
221
+ // Delete associated checkpoints (if any)
222
+ const state = await this.getState(agentId);
223
+ if (state?.sessionId) {
224
+ const checkpoints = await this.checkpointManager.listCheckpoints(state.sessionId);
225
+ for (const checkpoint of checkpoints){
226
+ if (checkpoint.agentId === agentId) {
227
+ await this.checkpointManager.deleteCheckpoint(checkpoint.id);
228
+ }
229
+ }
230
+ }
231
+ console.log(`🗑️ Deleted state for ${agentId}`);
232
+ }
233
+ /**
234
+ * Cleanup old states and checkpoints
235
+ */ async cleanup(retentionHours) {
236
+ this.ensureInitialized();
237
+ const retention = retentionHours || this.config.retentionHours;
238
+ // Cleanup artifacts
239
+ const deletedStates = await this.artifactStorage.cleanup(retention);
240
+ // Cleanup checkpoints
241
+ const deletedCheckpoints = await this.checkpointManager.cleanup(retention);
242
+ // Rebuild state index
243
+ await this.loadStateIndex();
244
+ console.log(`🧹 Cleanup complete: ${deletedStates} states, ${deletedCheckpoints} checkpoints (retention: ${retention}h)`);
245
+ return {
246
+ deletedStates,
247
+ deletedCheckpoints
248
+ };
249
+ }
250
+ /**
251
+ * Get storage metrics
252
+ */ getMetrics() {
253
+ const artifactMetrics = this.artifactStorage.getMetrics();
254
+ const checkpointMetrics = this.checkpointManager.getMetrics();
255
+ this.metrics.totalStates = this.stateIndex.size;
256
+ this.metrics.totalCheckpoints = checkpointMetrics.totalCheckpoints;
257
+ this.metrics.totalStorageMb = artifactMetrics.totalStorageMb + checkpointMetrics.totalStorageMb;
258
+ this.metrics.compressionRatio = artifactMetrics.averageCompressionRatio;
259
+ return {
260
+ ...this.metrics
261
+ };
262
+ }
263
+ /**
264
+ * Health check
265
+ */ async healthCheck() {
266
+ const errors = [];
267
+ const startTime = performance.now();
268
+ try {
269
+ // Check artifact storage health
270
+ const artifactHealth = await this.artifactStorage.healthCheck();
271
+ if (!artifactHealth.healthy) {
272
+ errors.push(`Artifact storage unhealthy: ${artifactHealth.errors?.join(', ')}`);
273
+ }
274
+ // Check checkpoint manager health
275
+ const checkpointHealth = await this.checkpointManager.healthCheck();
276
+ if (!checkpointHealth.healthy) {
277
+ errors.push(`Checkpoint manager unhealthy: ${checkpointHealth.errors?.join(', ')}`);
278
+ }
279
+ const latencyMs = performance.now() - startTime;
280
+ return {
281
+ healthy: errors.length === 0,
282
+ latencyMs,
283
+ errors: errors.length > 0 ? errors : undefined
284
+ };
285
+ } catch (error) {
286
+ errors.push(`Health check failed: ${error}`);
287
+ return {
288
+ healthy: false,
289
+ latencyMs: performance.now() - startTime,
290
+ errors
291
+ };
292
+ }
293
+ }
294
+ /**
295
+ * Close storage connections
296
+ */ async close() {
297
+ await this.artifactStorage.close();
298
+ await this.checkpointManager.close();
299
+ this.initialized = false;
300
+ console.log('✅ StateStorage closed');
301
+ }
302
+ /**
303
+ * Check if storage is ready
304
+ */ isReady() {
305
+ return this.initialized && this.artifactStorage.isReady() && this.checkpointManager.isReady();
306
+ }
307
+ // ===========================
308
+ // Private Helpers
309
+ // ===========================
310
+ ensureInitialized() {
311
+ if (!this.initialized) {
312
+ throw new Error('StateStorage not initialized. Call initialize() first.');
313
+ }
314
+ }
315
+ async loadStateIndex() {
316
+ // Query all agent-state artifacts
317
+ const artifacts = await this.artifactStorage.queryArtifacts({
318
+ type: [
319
+ 'agent-state'
320
+ ],
321
+ sortBy: 'createdAt',
322
+ sortOrder: 'desc'
323
+ });
324
+ // Build index of latest state per agent
325
+ const latestStates = new Map();
326
+ for (const artifact of artifacts){
327
+ const agentId = artifact.metadata.agentId;
328
+ if (!latestStates.has(agentId) || artifact.createdAt > latestStates.get(agentId).createdAt) {
329
+ latestStates.set(agentId, artifact);
330
+ }
331
+ }
332
+ // Update state index
333
+ this.stateIndex.clear();
334
+ for (const [agentId, artifact] of latestStates.entries()){
335
+ this.stateIndex.set(agentId, artifact.artifactId);
336
+ }
337
+ console.log(`📁 Loaded state index: ${this.stateIndex.size} agents`);
338
+ }
339
+ updateWriteMetrics(latency) {
340
+ this.writeLatencies.push(latency);
341
+ // Update average
342
+ const total = this.writeLatencies.reduce((sum, l)=>sum + l, 0);
343
+ this.metrics.averageWriteLatencyMs = total / this.writeLatencies.length;
344
+ // Update p95
345
+ if (this.writeLatencies.length >= 20) {
346
+ const sorted = [
347
+ ...this.writeLatencies
348
+ ].sort((a, b)=>a - b);
349
+ const p95Index = Math.floor(sorted.length * 0.95);
350
+ this.metrics.p95WriteLatencyMs = sorted[p95Index] || 0;
351
+ }
352
+ // Keep only last 1000 samples
353
+ if (this.writeLatencies.length > 1000) {
354
+ this.writeLatencies = this.writeLatencies.slice(-1000);
355
+ }
356
+ }
357
+ updateReadMetrics(latency) {
358
+ this.readLatencies.push(latency);
359
+ // Update average
360
+ const total = this.readLatencies.reduce((sum, l)=>sum + l, 0);
361
+ this.metrics.averageReadLatencyMs = total / this.readLatencies.length;
362
+ // Update p95
363
+ if (this.readLatencies.length >= 20) {
364
+ const sorted = [
365
+ ...this.readLatencies
366
+ ].sort((a, b)=>a - b);
367
+ const p95Index = Math.floor(sorted.length * 0.95);
368
+ this.metrics.p95ReadLatencyMs = sorted[p95Index] || 0;
369
+ }
370
+ // Keep only last 1000 samples
371
+ if (this.readLatencies.length > 1000) {
372
+ this.readLatencies = this.readLatencies.slice(-1000);
373
+ }
374
+ }
375
+ }
376
+
377
+ //# sourceMappingURL=state-storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../src/coordination/archives/v2-sdk-typescript/v2/memory/state-storage.ts"],"names":["AgentState","FilesystemArtifactStorage","CheckpointManager","msgpack","StateStorage","artifactStorage","checkpointManager","config","stateIndex","Map","writeLatencies","readLatencies","metrics","initialized","storagePath","enableCompression","enableVersioning","maxVersions","autoCheckpoint","retentionHours","backend","path","totalStates","totalCheckpoints","averageWriteLatencyMs","averageReadLatencyMs","p95WriteLatencyMs","p95ReadLatencyMs","compressionRatio","totalStorageMb","artifactStorageSpeedup","initialize","loadStateIndex","console","log","setState","agentId","state","checkpointUUID","context","metadata","ensureInitialized","startTime","performance","now","sessionId","timestamp","Date","snapshot","messageUUID","version","reason","checkpointId","createCheckpoint","content","Buffer","from","encode","artifactMetadata","uploadArtifact","type","filename","tags","forceCompression","set","artifactId","writeLatency","updateWriteMetrics","length","warn","toFixed","getState","get","undefined","result","downloadArtifact","decode","readLatency","updateReadMetrics","getAllStates","states","entries","error","restoreFromCheckpoint","restoreResult","restoreCheckpoint","restoredState","WORKING","recoveryLatency","deleteState","deleteArtifact","delete","checkpoints","listCheckpoints","checkpoint","deleteCheckpoint","id","cleanup","retention","deletedStates","deletedCheckpoints","getMetrics","artifactMetrics","checkpointMetrics","size","averageCompressionRatio","healthCheck","errors","artifactHealth","healthy","push","join","checkpointHealth","latencyMs","close","isReady","Error","artifacts","queryArtifacts","sortBy","sortOrder","latestStates","artifact","has","createdAt","clear","latency","total","reduce","sum","l","sorted","sort","a","b","p95Index","Math","floor","slice"],"mappings":"AAAA;;;;;;;;;;;;;;CAcC,GAED,SAASA,UAAU,QAAQ,4BAA4B;AAEvD,SAASC,yBAAyB,QAAQ,6BAA6B;AACvE,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,YAAYC,aAAa,eAAe;AAqDxC;;;;;;;;;;CAUC,GACD,OAAO,MAAMC;IACHC,gBAAkC;IAClCC,kBAAqC;IACrCC,OAAqC;IACrCC,aAAkC,IAAIC,MAAM;IAC5CC,iBAA2B,EAAE,CAAC;IAC9BC,gBAA0B,EAAE,CAAC;IAC7BC,QAA6B;IAC7BC,cAAuB,MAAM;IAErC,YACER,eAAkC,EAClCC,iBAAqC,EACrCC,SAAsC,CAAC,CAAC,CACxC;QACA,IAAI,CAACA,MAAM,GAAG;YACZO,aAAaP,OAAOO,WAAW,IAAI;YACnCC,mBAAmBR,OAAOQ,iBAAiB,IAAI;YAC/CC,kBAAkBT,OAAOS,gBAAgB,IAAI;YAC7CC,aAAaV,OAAOU,WAAW,IAAI;YACnCC,gBAAgBX,OAAOW,cAAc,IA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