aec-agent 1.0.1 → 1.0.4

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 (557) hide show
  1. package/dist/agent-core.d.ts +123 -3
  2. package/dist/agent-core.d.ts.map +1 -1
  3. package/dist/agent-core.js +219 -23
  4. package/dist/agent-core.js.map +1 -1
  5. package/dist/components/artifact-hub/artifact-hub.d.ts +11 -1
  6. package/dist/components/artifact-hub/artifact-hub.d.ts.map +1 -1
  7. package/dist/components/artifact-hub/artifact-hub.js +21 -1
  8. package/dist/components/artifact-hub/artifact-hub.js.map +1 -1
  9. package/dist/components/channel-platform-hub/adapter-kit.d.ts +51 -0
  10. package/dist/components/channel-platform-hub/adapter-kit.d.ts.map +1 -0
  11. package/dist/components/channel-platform-hub/adapter-kit.js +153 -0
  12. package/dist/components/channel-platform-hub/adapter-kit.js.map +1 -0
  13. package/dist/components/channel-platform-hub/channel-platform-hub.d.ts +34 -0
  14. package/dist/components/channel-platform-hub/channel-platform-hub.d.ts.map +1 -0
  15. package/dist/components/channel-platform-hub/channel-platform-hub.js +52 -0
  16. package/dist/components/channel-platform-hub/channel-platform-hub.js.map +1 -0
  17. package/dist/components/channel-platform-hub/discord/discord-adapter.d.ts +57 -0
  18. package/dist/components/channel-platform-hub/discord/discord-adapter.d.ts.map +1 -0
  19. package/dist/components/channel-platform-hub/discord/discord-adapter.js +412 -0
  20. package/dist/components/channel-platform-hub/discord/discord-adapter.js.map +1 -0
  21. package/dist/components/channel-platform-hub/slack/slack-adapter.d.ts +56 -0
  22. package/dist/components/channel-platform-hub/slack/slack-adapter.d.ts.map +1 -0
  23. package/dist/components/channel-platform-hub/slack/slack-adapter.js +349 -0
  24. package/dist/components/channel-platform-hub/slack/slack-adapter.js.map +1 -0
  25. package/dist/components/channel-platform-hub/slack/slack-mrkdwn.d.ts +3 -0
  26. package/dist/components/channel-platform-hub/slack/slack-mrkdwn.d.ts.map +1 -0
  27. package/dist/components/channel-platform-hub/slack/slack-mrkdwn.js +70 -0
  28. package/dist/components/channel-platform-hub/slack/slack-mrkdwn.js.map +1 -0
  29. package/dist/components/channel-platform-hub/teams/teams-adapter.d.ts +51 -0
  30. package/dist/components/channel-platform-hub/teams/teams-adapter.d.ts.map +1 -0
  31. package/dist/components/channel-platform-hub/teams/teams-adapter.js +333 -0
  32. package/dist/components/channel-platform-hub/teams/teams-adapter.js.map +1 -0
  33. package/dist/components/channel-platform-hub/telegram/telegram-adapter.d.ts +46 -0
  34. package/dist/components/channel-platform-hub/telegram/telegram-adapter.d.ts.map +1 -0
  35. package/dist/components/channel-platform-hub/telegram/telegram-adapter.js +304 -0
  36. package/dist/components/channel-platform-hub/telegram/telegram-adapter.js.map +1 -0
  37. package/dist/components/channel-platform-hub/telegram/telegram-markdown.d.ts +3 -0
  38. package/dist/components/channel-platform-hub/telegram/telegram-markdown.d.ts.map +1 -0
  39. package/dist/components/channel-platform-hub/telegram/telegram-markdown.js +87 -0
  40. package/dist/components/channel-platform-hub/telegram/telegram-markdown.js.map +1 -0
  41. package/dist/components/channel-platform-hub/types.d.ts +290 -0
  42. package/dist/components/channel-platform-hub/types.d.ts.map +1 -0
  43. package/dist/components/channel-platform-hub/types.js +23 -0
  44. package/dist/components/channel-platform-hub/types.js.map +1 -0
  45. package/dist/components/event-handler/event-dispatcher.d.ts +28 -3
  46. package/dist/components/event-handler/event-dispatcher.d.ts.map +1 -1
  47. package/dist/components/event-handler/event-dispatcher.js +77 -13
  48. package/dist/components/event-handler/event-dispatcher.js.map +1 -1
  49. package/dist/components/event-handler/events.d.ts +316 -15
  50. package/dist/components/event-handler/events.d.ts.map +1 -1
  51. package/dist/components/event-handler/events.js +94 -2
  52. package/dist/components/event-handler/events.js.map +1 -1
  53. package/dist/components/event-handler/types.d.ts +26 -0
  54. package/dist/components/event-handler/types.d.ts.map +1 -1
  55. package/dist/components/group-hub/group-hub.d.ts +117 -0
  56. package/dist/components/group-hub/group-hub.d.ts.map +1 -0
  57. package/dist/components/group-hub/group-hub.js +334 -0
  58. package/dist/components/group-hub/group-hub.js.map +1 -0
  59. package/dist/components/group-hub/group-turns.d.ts +109 -0
  60. package/dist/components/group-hub/group-turns.d.ts.map +1 -0
  61. package/dist/components/group-hub/group-turns.js +834 -0
  62. package/dist/components/group-hub/group-turns.js.map +1 -0
  63. package/dist/components/group-hub/member-prompt.d.ts +28 -0
  64. package/dist/components/group-hub/member-prompt.d.ts.map +1 -0
  65. package/dist/components/group-hub/member-prompt.js +111 -0
  66. package/dist/components/group-hub/member-prompt.js.map +1 -0
  67. package/dist/components/group-hub/recipients.d.ts +10 -0
  68. package/dist/components/group-hub/recipients.d.ts.map +1 -0
  69. package/dist/components/group-hub/recipients.js +83 -0
  70. package/dist/components/group-hub/recipients.js.map +1 -0
  71. package/dist/components/group-hub/thread.d.ts +57 -0
  72. package/dist/components/group-hub/thread.d.ts.map +1 -0
  73. package/dist/components/group-hub/thread.js +126 -0
  74. package/dist/components/group-hub/thread.js.map +1 -0
  75. package/dist/components/group-hub/types.d.ts +277 -0
  76. package/dist/components/group-hub/types.d.ts.map +1 -0
  77. package/dist/components/group-hub/types.js +51 -0
  78. package/dist/components/group-hub/types.js.map +1 -0
  79. package/dist/components/llm-provider-hub/providers/anthropic-provider.d.ts.map +1 -1
  80. package/dist/components/llm-provider-hub/providers/anthropic-provider.js +22 -2
  81. package/dist/components/llm-provider-hub/providers/anthropic-provider.js.map +1 -1
  82. package/dist/components/llm-provider-hub/providers/bedrock-provider.d.ts.map +1 -1
  83. package/dist/components/llm-provider-hub/providers/bedrock-provider.js +15 -3
  84. package/dist/components/llm-provider-hub/providers/bedrock-provider.js.map +1 -1
  85. package/dist/components/llm-provider-hub/providers/model-info-mappers.d.ts.map +1 -1
  86. package/dist/components/llm-provider-hub/providers/model-info-mappers.js +27 -0
  87. package/dist/components/llm-provider-hub/providers/model-info-mappers.js.map +1 -1
  88. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.d.ts.map +1 -1
  89. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js +10 -3
  90. package/dist/components/llm-provider-hub/providers/openai-compatible-provider.js.map +1 -1
  91. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts +1 -0
  92. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.d.ts.map +1 -1
  93. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js +35 -3
  94. package/dist/components/llm-provider-hub/providers/openai-subscription-provider.js.map +1 -1
  95. package/dist/components/llm-provider-hub/types.d.ts +20 -0
  96. package/dist/components/llm-provider-hub/types.d.ts.map +1 -1
  97. package/dist/components/llm-provider-hub/types.js +5 -0
  98. package/dist/components/llm-provider-hub/types.js.map +1 -1
  99. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts +87 -8
  100. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.d.ts.map +1 -1
  101. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js +465 -62
  102. package/dist/components/multi-agent-orchestration/agent/agent-loop/agent-loop.js.map +1 -1
  103. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts +14 -1
  104. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.d.ts.map +1 -1
  105. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js +25 -1
  106. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/compactor.js.map +1 -1
  107. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts +14 -1
  108. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.d.ts.map +1 -1
  109. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js +14 -22
  110. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/counter.js.map +1 -1
  111. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts +41 -3
  112. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.d.ts.map +1 -1
  113. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js +152 -44
  114. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/harness-executor.js.map +1 -1
  115. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts +15 -0
  116. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.d.ts.map +1 -1
  117. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js +35 -1
  118. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/run-trace.js.map +1 -1
  119. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts +10 -1
  120. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.d.ts.map +1 -1
  121. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js +39 -6
  122. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.js.map +1 -1
  123. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts +2 -1
  124. package/dist/components/multi-agent-orchestration/agent/agent-loop/components/summarizer.types.d.ts.map +1 -1
  125. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.d.ts +47 -0
  126. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.d.ts.map +1 -0
  127. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.js +61 -0
  128. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.js.map +1 -0
  129. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts +1 -1
  130. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.d.ts.map +1 -1
  131. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js +1 -1
  132. package/dist/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.js.map +1 -1
  133. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts +131 -8
  134. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.d.ts.map +1 -1
  135. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js +17 -1
  136. package/dist/components/multi-agent-orchestration/agent/agent-loop/types.js.map +1 -1
  137. package/dist/components/multi-agent-orchestration/agent/agent.d.ts +101 -15
  138. package/dist/components/multi-agent-orchestration/agent/agent.d.ts.map +1 -1
  139. package/dist/components/multi-agent-orchestration/agent/agent.js +415 -44
  140. package/dist/components/multi-agent-orchestration/agent/agent.js.map +1 -1
  141. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts +245 -1
  142. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.d.ts.map +1 -1
  143. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js +1583 -0
  144. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-manager.js.map +1 -1
  145. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.d.ts +76 -0
  146. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.d.ts.map +1 -0
  147. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.js +236 -0
  148. package/dist/components/multi-agent-orchestration/agent/channel-manager/channel-prompts.js.map +1 -0
  149. package/dist/components/multi-agent-orchestration/agent/channel-manager/text.d.ts +15 -0
  150. package/dist/components/multi-agent-orchestration/agent/channel-manager/text.d.ts.map +1 -0
  151. package/dist/components/multi-agent-orchestration/agent/channel-manager/text.js +80 -0
  152. package/dist/components/multi-agent-orchestration/agent/channel-manager/text.js.map +1 -0
  153. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.d.ts +13 -0
  154. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.d.ts.map +1 -0
  155. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.js +41 -0
  156. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-stream.js.map +1 -0
  157. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.d.ts +69 -0
  158. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.d.ts.map +1 -0
  159. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.js +210 -0
  160. package/dist/components/multi-agent-orchestration/agent/channel-manager/turn-view.js.map +1 -0
  161. package/dist/components/multi-agent-orchestration/agent/channel-manager/types.d.ts +76 -0
  162. package/dist/components/multi-agent-orchestration/agent/channel-manager/types.d.ts.map +1 -0
  163. package/dist/components/multi-agent-orchestration/agent/channel-manager/types.js +7 -0
  164. package/dist/components/multi-agent-orchestration/agent/channel-manager/types.js.map +1 -0
  165. package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.d.ts +37 -0
  166. package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.d.ts.map +1 -0
  167. package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.js +544 -0
  168. package/dist/components/multi-agent-orchestration/agent/command-manager/built-in-commands.js.map +1 -0
  169. package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.d.ts +75 -0
  170. package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.d.ts.map +1 -0
  171. package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.js +299 -0
  172. package/dist/components/multi-agent-orchestration/agent/command-manager/command-manager.js.map +1 -0
  173. package/dist/components/multi-agent-orchestration/agent/command-manager/parse.d.ts +17 -0
  174. package/dist/components/multi-agent-orchestration/agent/command-manager/parse.d.ts.map +1 -0
  175. package/dist/components/multi-agent-orchestration/agent/command-manager/parse.js +19 -0
  176. package/dist/components/multi-agent-orchestration/agent/command-manager/parse.js.map +1 -0
  177. package/dist/components/multi-agent-orchestration/agent/command-manager/types.d.ts +197 -0
  178. package/dist/components/multi-agent-orchestration/agent/command-manager/types.d.ts.map +1 -0
  179. package/dist/components/multi-agent-orchestration/agent/command-manager/types.js +3 -0
  180. package/dist/components/multi-agent-orchestration/agent/command-manager/types.js.map +1 -0
  181. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts +37 -1
  182. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.d.ts.map +1 -1
  183. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js +54 -2
  184. package/dist/components/multi-agent-orchestration/agent/context-manager/context-manager.js.map +1 -1
  185. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts +118 -14
  186. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.d.ts.map +1 -1
  187. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js +239 -50
  188. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation-manager.js.map +1 -1
  189. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.d.ts +34 -0
  190. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.d.ts.map +1 -0
  191. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.js +74 -0
  192. package/dist/components/multi-agent-orchestration/agent/conversation-manager/conversation.js.map +1 -0
  193. package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.d.ts +49 -0
  194. package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.d.ts.map +1 -0
  195. package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.js +171 -0
  196. package/dist/components/multi-agent-orchestration/agent/conversation-manager/turn-gate.js.map +1 -0
  197. package/dist/components/multi-agent-orchestration/agent/job-manager/clock.d.ts +43 -0
  198. package/dist/components/multi-agent-orchestration/agent/job-manager/clock.d.ts.map +1 -0
  199. package/dist/components/multi-agent-orchestration/agent/job-manager/clock.js +116 -0
  200. package/dist/components/multi-agent-orchestration/agent/job-manager/clock.js.map +1 -0
  201. package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.d.ts +17 -0
  202. package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.d.ts.map +1 -0
  203. package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.js +93 -0
  204. package/dist/components/multi-agent-orchestration/agent/job-manager/internal-events.js.map +1 -0
  205. package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.d.ts +208 -0
  206. package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.d.ts.map +1 -0
  207. package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.js +1207 -0
  208. package/dist/components/multi-agent-orchestration/agent/job-manager/job-manager.js.map +1 -0
  209. package/dist/components/multi-agent-orchestration/agent/job-manager/rules.d.ts +129 -0
  210. package/dist/components/multi-agent-orchestration/agent/job-manager/rules.d.ts.map +1 -0
  211. package/dist/components/multi-agent-orchestration/agent/job-manager/rules.js +598 -0
  212. package/dist/components/multi-agent-orchestration/agent/job-manager/rules.js.map +1 -0
  213. package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.d.ts +15 -0
  214. package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.d.ts.map +1 -0
  215. package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.js +113 -0
  216. package/dist/components/multi-agent-orchestration/agent/job-manager/schedule.js.map +1 -0
  217. package/dist/components/multi-agent-orchestration/agent/job-manager/timers.d.ts +8 -0
  218. package/dist/components/multi-agent-orchestration/agent/job-manager/timers.d.ts.map +1 -0
  219. package/dist/components/multi-agent-orchestration/agent/job-manager/timers.js +33 -0
  220. package/dist/components/multi-agent-orchestration/agent/job-manager/timers.js.map +1 -0
  221. package/dist/components/multi-agent-orchestration/agent/job-manager/types.d.ts +495 -0
  222. package/dist/components/multi-agent-orchestration/agent/job-manager/types.d.ts.map +1 -0
  223. package/dist/components/multi-agent-orchestration/agent/job-manager/types.js +50 -0
  224. package/dist/components/multi-agent-orchestration/agent/job-manager/types.js.map +1 -0
  225. package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.d.ts +37 -0
  226. package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.d.ts.map +1 -0
  227. package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.js +157 -0
  228. package/dist/components/multi-agent-orchestration/agent/job-manager/webhook.js.map +1 -0
  229. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.d.ts.map +1 -1
  230. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js +17 -3
  231. package/dist/components/multi-agent-orchestration/agent/memory-system/components/dreaming.js.map +1 -1
  232. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts +7 -0
  233. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts.map +1 -1
  234. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js +189 -30
  235. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js.map +1 -1
  236. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts +17 -0
  237. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts.map +1 -1
  238. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js +51 -0
  239. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js.map +1 -1
  240. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts +5 -0
  241. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts.map +1 -1
  242. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js +16 -0
  243. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js.map +1 -1
  244. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts +41 -0
  245. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts.map +1 -0
  246. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js +98 -0
  247. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js.map +1 -0
  248. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts +37 -0
  249. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts.map +1 -0
  250. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.js.map +1 -0
  251. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts.map +1 -1
  252. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js +1 -0
  253. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js.map +1 -1
  254. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts +21 -0
  255. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts.map +1 -0
  256. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js +113 -0
  257. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js.map +1 -0
  258. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts +52 -0
  259. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts.map +1 -0
  260. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js +63 -0
  261. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js.map +1 -0
  262. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts +18 -0
  263. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts.map +1 -0
  264. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js +56 -0
  265. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js.map +1 -0
  266. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts +128 -0
  267. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts.map +1 -0
  268. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js +661 -0
  269. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js.map +1 -0
  270. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts +307 -0
  271. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts.map +1 -0
  272. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js +60 -0
  273. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js.map +1 -0
  274. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts +14 -3
  275. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts.map +1 -1
  276. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js +18 -5
  277. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js.map +1 -1
  278. package/dist/components/multi-agent-orchestration/agent/types.d.ts +84 -1
  279. package/dist/components/multi-agent-orchestration/agent/types.d.ts.map +1 -1
  280. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts +11 -4
  281. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts.map +1 -1
  282. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js +72 -4
  283. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js.map +1 -1
  284. package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts +11 -0
  285. package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts.map +1 -0
  286. package/dist/components/persistence-hub/default-stores/memory-channel-store.js +33 -0
  287. package/dist/components/persistence-hub/default-stores/memory-channel-store.js.map +1 -0
  288. package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts +21 -0
  289. package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts.map +1 -0
  290. package/dist/components/persistence-hub/default-stores/memory-group-store.js +62 -0
  291. package/dist/components/persistence-hub/default-stores/memory-group-store.js.map +1 -0
  292. package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts +31 -0
  293. package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts.map +1 -0
  294. package/dist/components/persistence-hub/default-stores/memory-job-store.js +234 -0
  295. package/dist/components/persistence-hub/default-stores/memory-job-store.js.map +1 -0
  296. package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts +12 -0
  297. package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts.map +1 -0
  298. package/dist/components/persistence-hub/default-stores/memory-secret-store.js +38 -0
  299. package/dist/components/persistence-hub/default-stores/memory-secret-store.js.map +1 -0
  300. package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts.map +1 -1
  301. package/dist/components/persistence-hub/default-stores/memory-session-store.js +7 -0
  302. package/dist/components/persistence-hub/default-stores/memory-session-store.js.map +1 -1
  303. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts +10 -0
  304. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts.map +1 -0
  305. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js +30 -0
  306. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js.map +1 -0
  307. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts +9 -0
  308. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts.map +1 -0
  309. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js +17 -0
  310. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js.map +1 -0
  311. package/dist/components/persistence-hub/persistence-hub.d.ts +41 -0
  312. package/dist/components/persistence-hub/persistence-hub.d.ts.map +1 -1
  313. package/dist/components/persistence-hub/persistence-hub.js +41 -0
  314. package/dist/components/persistence-hub/persistence-hub.js.map +1 -1
  315. package/dist/components/persistence-hub/types/channel-store.d.ts +12 -0
  316. package/dist/components/persistence-hub/types/channel-store.d.ts.map +1 -0
  317. package/dist/components/persistence-hub/types/channel-store.js +2 -0
  318. package/dist/components/persistence-hub/types/channel-store.js.map +1 -0
  319. package/dist/components/persistence-hub/types/group-store.d.ts +27 -0
  320. package/dist/components/persistence-hub/types/group-store.d.ts.map +1 -0
  321. package/dist/components/persistence-hub/types/group-store.js +2 -0
  322. package/dist/components/persistence-hub/types/group-store.js.map +1 -0
  323. package/dist/components/persistence-hub/types/job-store.d.ts +112 -0
  324. package/dist/components/persistence-hub/types/job-store.d.ts.map +1 -0
  325. package/dist/components/persistence-hub/types/job-store.js +2 -0
  326. package/dist/components/persistence-hub/types/job-store.js.map +1 -0
  327. package/dist/components/persistence-hub/types/secret-store.d.ts +18 -0
  328. package/dist/components/persistence-hub/types/secret-store.d.ts.map +1 -0
  329. package/dist/components/persistence-hub/types/secret-store.js +2 -0
  330. package/dist/components/persistence-hub/types/secret-store.js.map +1 -0
  331. package/dist/components/persistence-hub/types/session-store.d.ts +5 -0
  332. package/dist/components/persistence-hub/types/session-store.d.ts.map +1 -1
  333. package/dist/components/persistence-hub/types/subagent-run-store.d.ts +11 -0
  334. package/dist/components/persistence-hub/types/subagent-run-store.d.ts.map +1 -0
  335. package/dist/components/persistence-hub/types/subagent-run-store.js +2 -0
  336. package/dist/components/persistence-hub/types/subagent-run-store.js.map +1 -0
  337. package/dist/components/persistence-hub/types/subagent-type-store.d.ts +9 -0
  338. package/dist/components/persistence-hub/types/subagent-type-store.d.ts.map +1 -0
  339. package/dist/components/persistence-hub/types/subagent-type-store.js +2 -0
  340. package/dist/components/persistence-hub/types/subagent-type-store.js.map +1 -0
  341. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts +4 -1
  342. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts.map +1 -1
  343. package/dist/components/sandbox-hub/docker/docker-sandbox.js +398 -1
  344. package/dist/components/sandbox-hub/docker/docker-sandbox.js.map +1 -1
  345. package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts.map +1 -1
  346. package/dist/components/sandbox-hub/docker/sandbox-helper.js +386 -5
  347. package/dist/components/sandbox-hub/docker/sandbox-helper.js.map +1 -1
  348. package/dist/components/sandbox-hub/host/host-sandbox.d.ts +16 -0
  349. package/dist/components/sandbox-hub/host/host-sandbox.d.ts.map +1 -1
  350. package/dist/components/sandbox-hub/host/host-sandbox.js +283 -2
  351. package/dist/components/sandbox-hub/host/host-sandbox.js.map +1 -1
  352. package/dist/components/sandbox-hub/sandbox-hub.d.ts +9 -0
  353. package/dist/components/sandbox-hub/sandbox-hub.d.ts.map +1 -1
  354. package/dist/components/sandbox-hub/sandbox-hub.js +18 -0
  355. package/dist/components/sandbox-hub/sandbox-hub.js.map +1 -1
  356. package/dist/components/sandbox-hub/traced-sandbox.d.ts.map +1 -1
  357. package/dist/components/sandbox-hub/traced-sandbox.js +32 -0
  358. package/dist/components/sandbox-hub/traced-sandbox.js.map +1 -1
  359. package/dist/components/sandbox-hub/types/sandbox.d.ts +106 -1
  360. package/dist/components/sandbox-hub/types/sandbox.d.ts.map +1 -1
  361. package/dist/components/sandbox-hub/types/sandbox.js +0 -13
  362. package/dist/components/sandbox-hub/types/sandbox.js.map +1 -1
  363. package/dist/components/secret-hub/envelope.d.ts +48 -0
  364. package/dist/components/secret-hub/envelope.d.ts.map +1 -0
  365. package/dist/components/secret-hub/envelope.js +157 -0
  366. package/dist/components/secret-hub/envelope.js.map +1 -0
  367. package/dist/components/secret-hub/rules.d.ts +33 -0
  368. package/dist/components/secret-hub/rules.d.ts.map +1 -0
  369. package/dist/components/secret-hub/rules.js +142 -0
  370. package/dist/components/secret-hub/rules.js.map +1 -0
  371. package/dist/components/secret-hub/secret-hub-provider.d.ts +61 -0
  372. package/dist/components/secret-hub/secret-hub-provider.d.ts.map +1 -0
  373. package/dist/components/secret-hub/secret-hub-provider.js +73 -0
  374. package/dist/components/secret-hub/secret-hub-provider.js.map +1 -0
  375. package/dist/components/secret-hub/secret-hub.d.ts +102 -0
  376. package/dist/components/secret-hub/secret-hub.d.ts.map +1 -0
  377. package/dist/components/secret-hub/secret-hub.js +267 -0
  378. package/dist/components/secret-hub/secret-hub.js.map +1 -0
  379. package/dist/components/secret-hub/types.d.ts +77 -0
  380. package/dist/components/secret-hub/types.d.ts.map +1 -0
  381. package/dist/components/secret-hub/types.js +23 -0
  382. package/dist/components/secret-hub/types.js.map +1 -0
  383. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts +1 -1
  384. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts.map +1 -1
  385. package/dist/components/skill-hub/built-in-skills/essential-skills.js +7 -2
  386. package/dist/components/skill-hub/built-in-skills/essential-skills.js.map +1 -1
  387. package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts +3 -0
  388. package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts.map +1 -0
  389. package/dist/components/skill-hub/built-in-skills/watch-and-notify.js +94 -0
  390. package/dist/components/skill-hub/built-in-skills/watch-and-notify.js.map +1 -0
  391. package/dist/components/skill-hub/skill-hub.d.ts +9 -1
  392. package/dist/components/skill-hub/skill-hub.d.ts.map +1 -1
  393. package/dist/components/skill-hub/skill-hub.js +11 -1
  394. package/dist/components/skill-hub/skill-hub.js.map +1 -1
  395. package/dist/components/subagent-hub/built-in-types.d.ts +3 -0
  396. package/dist/components/subagent-hub/built-in-types.d.ts.map +1 -0
  397. package/dist/components/subagent-hub/built-in-types.js +24 -0
  398. package/dist/components/subagent-hub/built-in-types.js.map +1 -0
  399. package/dist/components/subagent-hub/subagent-hub.d.ts +41 -0
  400. package/dist/components/subagent-hub/subagent-hub.d.ts.map +1 -0
  401. package/dist/components/subagent-hub/subagent-hub.js +158 -0
  402. package/dist/components/subagent-hub/subagent-hub.js.map +1 -0
  403. package/dist/components/subagent-hub/types.d.ts +40 -0
  404. package/dist/components/subagent-hub/types.d.ts.map +1 -0
  405. package/dist/components/subagent-hub/types.js +8 -0
  406. package/dist/components/subagent-hub/types.js.map +1 -0
  407. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts +4 -1
  408. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts.map +1 -1
  409. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js +4 -0
  410. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js.map +1 -1
  411. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts.map +1 -1
  412. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js +4 -1
  413. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js.map +1 -1
  414. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts.map +1 -1
  415. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js +4 -1
  416. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js.map +1 -1
  417. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts +10 -0
  418. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts.map +1 -0
  419. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js +13 -0
  420. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js.map +1 -0
  421. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts +60 -0
  422. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts.map +1 -0
  423. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js +240 -0
  424. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js.map +1 -0
  425. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts +14 -0
  426. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts.map +1 -0
  427. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js +36 -0
  428. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js.map +1 -0
  429. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts +32 -0
  430. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts.map +1 -0
  431. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js +458 -0
  432. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js.map +1 -0
  433. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts +9 -0
  434. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts.map +1 -0
  435. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js +20 -0
  436. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js.map +1 -0
  437. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts +12 -0
  438. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts.map +1 -0
  439. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js +57 -0
  440. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js.map +1 -0
  441. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts +15 -0
  442. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts.map +1 -0
  443. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js +80 -0
  444. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js.map +1 -0
  445. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts +53 -0
  446. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts.map +1 -0
  447. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js +100 -0
  448. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js.map +1 -0
  449. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts +14 -0
  450. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts.map +1 -0
  451. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js +63 -0
  452. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js.map +1 -0
  453. package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts +33 -0
  454. package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts.map +1 -0
  455. package/dist/components/tool-hub/built-in-tools/preview/service-tools.js +180 -0
  456. package/dist/components/tool-hub/built-in-tools/preview/service-tools.js.map +1 -0
  457. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts +6 -0
  458. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts.map +1 -0
  459. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js +9 -0
  460. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js.map +1 -0
  461. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts +12 -0
  462. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts.map +1 -0
  463. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js +30 -0
  464. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js.map +1 -0
  465. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts +22 -0
  466. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts.map +1 -0
  467. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js +113 -0
  468. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js.map +1 -0
  469. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts +9 -0
  470. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts.map +1 -0
  471. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js +29 -0
  472. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js.map +1 -0
  473. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts +27 -0
  474. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts.map +1 -0
  475. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js +112 -0
  476. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js.map +1 -0
  477. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts +43 -0
  478. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts.map +1 -0
  479. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js +234 -0
  480. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js.map +1 -0
  481. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts.map +1 -1
  482. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js +2 -0
  483. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js.map +1 -1
  484. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts.map +1 -1
  485. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js +2 -0
  486. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js.map +1 -1
  487. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts.map +1 -1
  488. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js +9 -1
  489. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js.map +1 -1
  490. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts.map +1 -1
  491. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js +9 -2
  492. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js.map +1 -1
  493. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts +17 -0
  494. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts.map +1 -1
  495. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js +29 -0
  496. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js.map +1 -1
  497. package/dist/components/tool-hub/tool-links.d.ts +9 -0
  498. package/dist/components/tool-hub/tool-links.d.ts.map +1 -0
  499. package/dist/components/tool-hub/tool-links.js +11 -0
  500. package/dist/components/tool-hub/tool-links.js.map +1 -0
  501. package/dist/components/tool-hub/types.d.ts +101 -1
  502. package/dist/components/tool-hub/types.d.ts.map +1 -1
  503. package/dist/index.d.ts +109 -8
  504. package/dist/index.d.ts.map +1 -1
  505. package/dist/index.js +68 -0
  506. package/dist/index.js.map +1 -1
  507. package/dist/kernel/errors/channel-error.d.ts +24 -0
  508. package/dist/kernel/errors/channel-error.d.ts.map +1 -0
  509. package/dist/kernel/errors/channel-error.js +15 -0
  510. package/dist/kernel/errors/channel-error.js.map +1 -0
  511. package/dist/kernel/errors/command-error.d.ts +12 -0
  512. package/dist/kernel/errors/command-error.d.ts.map +1 -0
  513. package/dist/kernel/errors/command-error.js +11 -0
  514. package/dist/kernel/errors/command-error.js.map +1 -0
  515. package/dist/kernel/errors/group-error.d.ts +15 -0
  516. package/dist/kernel/errors/group-error.d.ts.map +1 -0
  517. package/dist/kernel/errors/group-error.js +10 -0
  518. package/dist/kernel/errors/group-error.js.map +1 -0
  519. package/dist/kernel/errors/job-error.d.ts +23 -0
  520. package/dist/kernel/errors/job-error.d.ts.map +1 -0
  521. package/dist/kernel/errors/job-error.js +15 -0
  522. package/dist/kernel/errors/job-error.js.map +1 -0
  523. package/dist/kernel/errors/secret-error.d.ts +19 -0
  524. package/dist/kernel/errors/secret-error.d.ts.map +1 -0
  525. package/dist/kernel/errors/secret-error.js +10 -0
  526. package/dist/kernel/errors/secret-error.js.map +1 -0
  527. package/dist/kernel/errors/session-error.d.ts +5 -1
  528. package/dist/kernel/errors/session-error.d.ts.map +1 -1
  529. package/dist/kernel/errors/session-error.js.map +1 -1
  530. package/dist/kernel/errors/subagent-error.d.ts +19 -0
  531. package/dist/kernel/errors/subagent-error.d.ts.map +1 -0
  532. package/dist/kernel/errors/subagent-error.js +10 -0
  533. package/dist/kernel/errors/subagent-error.js.map +1 -0
  534. package/dist/kernel/interfaces/kernel.d.ts +15 -0
  535. package/dist/kernel/interfaces/kernel.d.ts.map +1 -1
  536. package/dist/kernel/types.d.ts +80 -1
  537. package/dist/kernel/types.d.ts.map +1 -1
  538. package/dist/testing/fake-channel.d.ts +60 -0
  539. package/dist/testing/fake-channel.d.ts.map +1 -0
  540. package/dist/testing/fake-channel.js +135 -0
  541. package/dist/testing/fake-channel.js.map +1 -0
  542. package/dist/testing/in-memory-sandbox.d.ts +4 -1
  543. package/dist/testing/in-memory-sandbox.d.ts.map +1 -1
  544. package/dist/testing/in-memory-sandbox.js +63 -3
  545. package/dist/testing/in-memory-sandbox.js.map +1 -1
  546. package/dist/testing/mock-session-store.d.ts.map +1 -1
  547. package/dist/testing/mock-session-store.js +7 -0
  548. package/dist/testing/mock-session-store.js.map +1 -1
  549. package/package.json +2 -1
  550. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts +0 -38
  551. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts.map +0 -1
  552. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js +0 -155
  553. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js.map +0 -1
  554. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts +0 -27
  555. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts.map +0 -1
  556. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js.map +0 -1
  557. /package/dist/components/multi-agent-orchestration/agent/{scheduled-job-manager → secret-manager}/types.js +0 -0
@@ -0,0 +1,157 @@
1
+ import { createHmac, randomBytes, timingSafeEqual } from "node:crypto";
2
+ import { readPath, toRevision, toSubject } from "./rules.js";
3
+ // ---------------------------------------------------------------------------
4
+ // Webhook deliveries for triggers (A-70): the signing secret, signature checks
5
+ // on the raw bytes, and turning a delivery into an event envelope.
6
+ // Update (A-126): for webhook jobs (a trigger is now a job with `when.kind: "webhook"`).
7
+ //
8
+ // - "standard" — Standard Webhooks (standardwebhooks.com): webhook-id,
9
+ // webhook-timestamp and webhook-signature ("v1,<base64>", space separated);
10
+ // HMAC-SHA256 over "<id>.<timestamp>.<body>" with the base64-decoded secret;
11
+ // the timestamp must be within 5 minutes, so a captured request cannot be
12
+ // replayed later.
13
+ // - "github" — X-Hub-Signature-256 ("sha256=<hex>"), HMAC-SHA256 over the body
14
+ // with the secret's text. GitHub signs no timestamp, so none is enforced;
15
+ // X-GitHub-Delivery is the event id (a redelivery keeps it, so it dedupes),
16
+ // and X-GitHub-Event (+ the body's "action") is the type.
17
+ //
18
+ // Comparisons are constant-time. Nothing here throws for a bad request: the
19
+ // result says what is wrong, for a 4xx answer.
20
+ // ---------------------------------------------------------------------------
21
+ /** A webhook signature older or newer than this is refused. */
22
+ export const WEBHOOK_TOLERANCE_MS = 5 * 60_000;
23
+ const SECRET_PREFIX = "whsec_";
24
+ /** A fresh signing secret: "whsec_" + 32 random bytes in base64. */
25
+ export function generateWebhookSecret() {
26
+ return SECRET_PREFIX + randomBytes(32).toString("base64");
27
+ }
28
+ /** Sign a Standard Webhooks delivery — what a sender does (tests, the docs' example). */
29
+ export function signStandardWebhook(secret, id, timestamp, body) {
30
+ const mac = createHmac("sha256", standardKey(secret))
31
+ .update(`${id}.${timestamp}.`)
32
+ .update(toBytes(body))
33
+ .digest("base64");
34
+ return `v1,${mac}`;
35
+ }
36
+ /** Sign a GitHub-style delivery: the X-Hub-Signature-256 value. */
37
+ export function signGithubWebhook(secret, body) {
38
+ return `sha256=${createHmac("sha256", Buffer.from(secret, "utf8")).update(toBytes(body)).digest("hex")}`;
39
+ }
40
+ /** Undefined when the signature is valid, otherwise why it is not. */
41
+ export function verifyWebhookSignature(scheme, secret, request, now) {
42
+ const body = toBytes(request.body);
43
+ if (scheme === "github") {
44
+ const header = request.headers["x-hub-signature-256"];
45
+ if (!header?.startsWith("sha256="))
46
+ return "missing X-Hub-Signature-256";
47
+ return safeEqual(header, signGithubWebhook(secret, body)) ? undefined : "the signature does not match";
48
+ }
49
+ const id = request.headers["webhook-id"];
50
+ const timestamp = request.headers["webhook-timestamp"];
51
+ const signatures = request.headers["webhook-signature"];
52
+ if (!id || !timestamp || !signatures)
53
+ return "missing webhook-id, webhook-timestamp or webhook-signature";
54
+ const seconds = Number(timestamp);
55
+ if (!Number.isInteger(seconds))
56
+ return "webhook-timestamp is not a number of seconds";
57
+ if (Math.abs(now - seconds * 1000) > WEBHOOK_TOLERANCE_MS)
58
+ return "webhook-timestamp is too old or in the future";
59
+ const expected = signStandardWebhook(secret, id, seconds, body);
60
+ const ok = signatures.split(" ").some((s) => s.startsWith("v1,") && safeEqual(s, expected));
61
+ return ok ? undefined : "the signature does not match";
62
+ }
63
+ /**
64
+ * The event a verified delivery carries, or an error message. A CloudEvents body
65
+ * (with "specversion") supplies id, source, type, subject, time and data; a
66
+ * Standard Webhooks body supplies type, timestamp and data; a GitHub delivery
67
+ * is its whole body.
68
+ */
69
+ export function parseWebhookEvent(source, request) {
70
+ let body;
71
+ try {
72
+ body = JSON.parse(Buffer.from(toBytes(request.body)).toString("utf8"));
73
+ }
74
+ catch {
75
+ return { error: "the body is not JSON" };
76
+ }
77
+ if (typeof body !== "object" || body === null || Array.isArray(body))
78
+ return { error: "the body must be a JSON object" };
79
+ const b = body;
80
+ let envelope;
81
+ if (typeof b["specversion"] === "string") {
82
+ // CloudEvents (structured mode).
83
+ const id = str(b["id"]);
84
+ const type = str(b["type"]);
85
+ if (!id || !type)
86
+ return { error: "a CloudEvents body needs id and type" };
87
+ envelope = {
88
+ sourceEventId: id,
89
+ source: str(b["source"]) ?? "webhook",
90
+ type,
91
+ ...(toSubject(b["subject"]) !== undefined ? { subject: toSubject(b["subject"]) } : {}),
92
+ ...(isoTime(b["time"]) ? { time: isoTime(b["time"]) } : {}),
93
+ data: b["data"] ?? null,
94
+ };
95
+ }
96
+ else if (source.signature === "github") {
97
+ const id = request.headers["x-github-delivery"];
98
+ const event = request.headers["x-github-event"];
99
+ if (!id || !event)
100
+ return { error: "missing X-GitHub-Delivery or X-GitHub-Event" };
101
+ const action = str(b["action"]);
102
+ envelope = { sourceEventId: id, source: "github", type: action ? `${event}.${action}` : event, data: body };
103
+ }
104
+ else {
105
+ const id = request.headers["webhook-id"];
106
+ const type = str(b["type"]);
107
+ if (!id)
108
+ return { error: "missing webhook-id" };
109
+ if (!type)
110
+ return { error: 'the body needs a "type"' };
111
+ envelope = {
112
+ sourceEventId: id,
113
+ source: "webhook",
114
+ type,
115
+ ...(isoTime(b["timestamp"]) ? { time: isoTime(b["timestamp"]) } : {}),
116
+ data: b["data"] ?? body,
117
+ };
118
+ }
119
+ // The job's mapping picks the subject / revision when the body did not set one.
120
+ const view = { type: envelope.type, ...(envelope.subject !== undefined ? { subject: envelope.subject } : {}), source: envelope.source, data: envelope.data };
121
+ if (envelope.subject === undefined && source.subjectPath) {
122
+ const subject = toSubject(readPath(view, source.subjectPath));
123
+ if (subject !== undefined)
124
+ envelope.subject = subject;
125
+ }
126
+ if (source.revisionPath) {
127
+ const revision = toRevision(readPath(view, source.revisionPath));
128
+ if (revision !== undefined)
129
+ envelope.revision = revision;
130
+ }
131
+ if (envelope.sourceEventId.length > 200)
132
+ return { error: "the event id is longer than 200 characters" };
133
+ if (envelope.type.length > 200)
134
+ return { error: "the event type is longer than 200 characters" };
135
+ return envelope;
136
+ }
137
+ function standardKey(secret) {
138
+ return Buffer.from(secret.startsWith(SECRET_PREFIX) ? secret.slice(SECRET_PREFIX.length) : secret, "base64");
139
+ }
140
+ function toBytes(body) {
141
+ return typeof body === "string" ? Buffer.from(body, "utf8") : body;
142
+ }
143
+ function safeEqual(a, b) {
144
+ const x = Buffer.from(a, "utf8");
145
+ const y = Buffer.from(b, "utf8");
146
+ return x.length === y.length && timingSafeEqual(x, y);
147
+ }
148
+ function str(value) {
149
+ return typeof value === "string" && value.trim() !== "" ? value : undefined;
150
+ }
151
+ function isoTime(value) {
152
+ if (typeof value !== "string" && typeof value !== "number")
153
+ return undefined;
154
+ const ms = typeof value === "number" ? value * 1000 : Date.parse(value);
155
+ return Number.isFinite(ms) ? new Date(ms).toISOString() : undefined;
156
+ }
157
+ //# sourceMappingURL=webhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/job-manager/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAM7D,8EAA8E;AAC9E,+EAA+E;AAC/E,mEAAmE;AACnE,yFAAyF;AACzF,EAAE;AACF,wEAAwE;AACxE,+EAA+E;AAC/E,gFAAgF;AAChF,6EAA6E;AAC7E,qBAAqB;AACrB,gFAAgF;AAChF,6EAA6E;AAC7E,+EAA+E;AAC/E,6DAA6D;AAC7D,EAAE;AACF,4EAA4E;AAC5E,+CAA+C;AAC/C,8EAA8E;AAE9E,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../src/components/multi-agent-orchestration/agent/memory-system/components/dreaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAY1C,MAAM,WAAW,cAAc;IAE7B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAMD,MAAM,WAAW,YAAY;IAC3B,gEAAgE;IAChE,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,YAAY,CAAC;IAC3B,yFAAyF;IACzF,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAClC;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,aAAa,CAAe;IACpC,OAAO,CAAC,YAAY,CAAc;IAClC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAiB;IAEhC,YAAY,IAAI,EAAE,YAAY,EAO7B;IAED,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CAElD;IAED;;;;;OAKG;IACG,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGjE;IAOK,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA6BnE;YAMa,YAAY;CA2B3B"}
1
+ {"version":3,"file":"dreaming.d.ts","sourceRoot":"","sources":["../../../../../../src/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ryDays: 30,
3
3
  };
4
+ /**
5
+ * True when a message is plain conversation: not a tool message and carrying no
6
+ * tool calls or tool results. Only these are worth sending to memory extraction.
7
+ */
8
+ function isConversationalMessage(message) {
9
+ if (message.role === "tool")
10
+ return false;
11
+ if (message.toolCalls && message.toolCalls.length > 0)
12
+ return false;
13
+ if (message.toolResults && message.toolResults.length > 0)
14
+ return false;
15
+ return true;
16
+ }
4
17
  export class Dreaming {
5
18
  _agentId;
6
19
  _messageStore;
@@ -40,10 +53,11 @@ export class Dreaming {
40
53
  if (total <= lastIndex)
41
54
  return results;
42
55
  const slice = await this._messageStore.getRange(sessionId, total, total - lastIndex);
43
- const messages = slice.messages;
44
- if (messages.length === 0)
56
+ if (slice.messages.length === 0)
45
57
  return results;
46
- // Phase 2 — Pass to Memory for LLM extraction
58
+ // Phase 2 — Pass to Memory for LLM extraction. Tool calls and tool results are
59
+ // dropped first to save tokens; the checkpoint still advances past them below.
60
+ const messages = slice.messages.filter(isConversationalMessage);
47
61
  const records = await this._memory.evaluateMessages(messages);
48
62
  for (const record of records) {
49
63
  results.push({
@@ -1 +1 @@
1
- {"version":3,"file":"dreaming.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/dreaming.ts"],"names":[],"mappings":"AAqBA,MAAM,cAAc,GAAmB;IACrC,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAaF,MAAM,OAAO,QAAQ;IACX,QAAQ,CAAS;IACjB,aAAa,CAAe;IAC5B,aAAa,CAAe;IAC5B,YAAY,CAAc;IAC1B,OAAO,CAAS;IAChB,OAAO,CAAiB;IAEhC,YAAY,IAAkB;QAC5B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC;QACvC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC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,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC,CAAC;gBAC/F,CAAC;gBACD,SAAS;YACX,CAAC;YAED,yEAAyE;YACzE,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC;YACxD,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;YACjH,IAAI,SAAS,GAAG,MAAM,EAAE,CAAC;gBACvB,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC;gBAC1B,MAAM,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACvC,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,8BAA8B,IAAI,CAAC,OAAO,CAAC,gBAAgB,OAAO,EAAE,CAAC,CAAC;YACtI,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
1
+ {"version":3,"file":"dreaming.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/dreaming.ts"],"names":[],"mappings":"AAsBA,MAAM,cAAc,GAAmB;IACrC,gBAAgB,EAAE,EAAE;CACrB,CAAC;AAaF;;;GAGG;AACH,SAAS,uBAAuB,CAAC,OAAgB;IAC/C,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACpE,IAAI,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACxE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memory {
15
15
  constructor(deps: MemoryDeps);
16
16
  evaluateMessages(messages: Message[]): Promise<MemoryRecord[]>;
17
17
  private _extractFromMessages;
18
+ /** Rebuild the compacted user profile (USER.md). Returns null when the LLM returned nothing. */
19
+ compactUserMemory(current: string): Promise<string | null>;
20
+ /** Rebuild the compacted memory (MEMORY.md). Returns null when the LLM returned nothing. */
21
+ compactMemory(current: string): Promise<string | null>;
22
+ /** Refine the agent's soul (SOUL.md). Returns null when the LLM returned nothing. */
23
+ compactSoul(current: string): Promise<string | null>;
24
+ private _compact;
18
25
  private _existingKeyCatalog;
19
26
  private _handleDuplicate;
20
27
  private _createRecord;
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,oBAAoB,CAAC;AA2D5B,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAS;IAExB,YAAY,IAAI,EAAE,UAAU,EAI3B;IAMK,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA6BnE;YAMa,oBAAoB;YAwCpB,mBAAmB;YAuBnB,gBAAgB;YAuBhB,aAAa;CAuB5B"}
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/memory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,EACV,YAAY,EAIb,MAAM,oBAAoB,CAAC;AAuK5B,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,WAAW,CAAC;IACzB,yFAAyF;IACzF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,KAAK,CAAc;IAC3B,OAAO,CAAC,OAAO,CAAS;IAExB,YAAY,IAAI,EAAE,UAAU,EAI3B;IAMK,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CA6BnE;YAMa,oBAAoB;IAuClC,gGAAgG;IAC1F,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE/D;IAED,4FAA4F;IACtF,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE3D;IAED,qFAAqF;IAC/E,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAEzD;YAEa,QAAQ;YA2CR,mBAAmB;YAuBnB,gBAAgB;YAuBhB,aAAa;CAuB5B"}
@@ -4,40 +4,144 @@
4
4
  // Given recent conversation messages, the LLM decides what facts, preferences,
5
5
  // or decisions are worth remembering and extracts clean typed records.
6
6
  // ---------------------------------------------------------------------------
7
- const SYSTEM_PROMPT = `You are a memory extraction engine for an AI agent.
8
- You receive a batch of recent conversation messages between a user and an assistant.
9
-
10
- Your job:
11
- 1. Identify facts, preferences, decisions, or procedures worth storing as long-term memories.
12
- 2. Extract each as a clean, structured memory record.
13
-
14
- Rules:
15
- - Tool telemetry ("Tool X completed", "Tool X called") is NOT worth remembering unless it reveals a reusable fact about the environment.
16
- - User preferences, corrections, decisions, and recurring facts ARE worth remembering.
17
- - Write each memory value as a clean, concise statement — not the raw message text.
18
- - Detect the language of the input. Write memory values in the SAME language as the user's input.
19
- - For technical terms, keep them in English regardless of the surrounding language.
20
- - If no messages are worth remembering, return an empty array.
21
-
22
- Keys:
23
- - You may receive a list of EXISTING KEYS grouped by scope. If a memory is about the same topic as an existing key, reuse that exact key — even if the value changed.
24
- - Only create a new key when no existing key covers the topic.
25
- - A key names the topic, not the value: lowercase snake_case, 1–4 words (e.g. unit_system, not uses_metric).
26
-
27
- Respond with ONLY a JSON array (no markdown fences):
28
- [
29
- {
30
- "kind": "user_preference" | "fact" | "decision" | "procedure" | "task_state" | "source_reference",
31
- "scope": "user" | "project" | "profile" | "organization" | "task",
32
- "subject": "who or what this is about",
33
- "key": "short unique identifier for dedup (e.g. response_language, deploy_process)",
34
- "value": "clean memory statement",
35
- "confidence": "explicit" | "verified" | "inferred" | "unverified"
36
- }
7
+ const SYSTEM_PROMPT = `You are a memory extraction engine for an AI agent.
8
+ You receive a batch of recent conversation messages between a user and an assistant.
9
+
10
+ Your job:
11
+ 1. Identify facts, preferences, decisions, or procedures worth storing as long-term memories.
12
+ 2. Extract each as a clean, structured memory record.
13
+
14
+ Rules:
15
+ - Tool telemetry ("Tool X completed", "Tool X called") is NOT worth remembering unless it reveals a reusable fact about the environment.
16
+ - User preferences, corrections, decisions, and recurring facts ARE worth remembering.
17
+ - Write each memory value as a clean, concise statement — not the raw message text.
18
+ - Detect the language of the input. Write memory values in the SAME language as the user's input.
19
+ - For technical terms, keep them in English regardless of the surrounding language.
20
+ - If no messages are worth remembering, return an empty array.
21
+
22
+ Keys:
23
+ - You may receive a list of EXISTING KEYS grouped by scope. If a memory is about the same topic as an existing key, reuse that exact key — even if the value changed.
24
+ - Only create a new key when no existing key covers the topic.
25
+ - A key names the topic, not the value: lowercase snake_case, 1–4 words (e.g. unit_system, not uses_metric).
26
+
27
+ Respond with ONLY a JSON array (no markdown fences):
28
+ [
29
+ {
30
+ "kind": "user_preference" | "fact" | "decision" | "procedure" | "task_state" | "source_reference",
31
+ "scope": "user" | "project" | "profile" | "organization" | "task",
32
+ "subject": "who or what this is about",
33
+ "key": "short unique identifier for dedup (e.g. response_language, deploy_process)",
34
+ "value": "clean memory statement",
35
+ "confidence": "explicit" | "verified" | "inferred" | "unverified"
36
+ }
37
37
  ]`;
38
+ const COMPACTED_USER_MEMORY_PROMPT = `# Task: Build a concise, useful profile of me
39
+
40
+ Review the conversation history, saved memory, and any sources I explicitly provide. Create a structured profile that another AI agent can use to understand my background, current work, preferences, and recurring projects.
41
+
42
+ ## Source and accuracy rules
43
+
44
+ - Use only information available in the conversation history, saved memory, or sources I provide.
45
+ - Do not invent, infer, or fill gaps with guesses. If something is uncertain, leave it out or label it as an inference.
46
+ - Mark where information came from:
47
+ - **(user stated)** — I directly said it.
48
+ - **(prior sessions)** — It appeared in earlier conversations or saved memory.
49
+ - **(source: [name or URL])** — It came from a website, document, or other supplied source.
50
+ - **(inferred)** — It is a reasonable interpretation, but I did not state it directly.
51
+ - Keep claims from external sources separate from details learned in conversations. Do not present website claims as independently verified facts.
52
+ - Add an “as of” date to facts that may change, such as roles, products, plans, employment, health goals, or current projects. Preserve older dates when useful.
53
+ - If sources conflict, prefer the newest direct statement. Briefly note meaningful conflicts instead of silently choosing one.
54
+ - Include only details that could help an AI give more relevant answers. Avoid sensitive personal information, credentials, exact addresses, and unrelated one-off details.
55
+ - Preserve useful names, technical terms, product details, decisions, constraints, and lessons learned. Summarize repeated topics without flattening important specifics.
56
+ - Use clear, compact Markdown. Remove empty sections and avoid repeating the same fact in multiple places.
57
+
58
+ ## Output format
59
+
60
+ # [Preferred name] — Profile
61
+
62
+ *Compiled [date]. Sections marked **(source: …)** come from external or supplied sources; other details come from conversation history.*
63
+
64
+ ---
65
+
66
+ ## Who
67
+
68
+ - **Name and location:**
69
+ - **Languages:**
70
+ - **Profession and background:**
71
+ - **Areas of expertise:**
72
+
73
+ ## Companies and products
74
+
75
+ ### [Company or product name]
76
+
77
+ - **What it is:**
78
+ - **Audience or problem it serves:**
79
+ - **Products and services:**
80
+ - **Positioning or track record:** Include only if sourced.
81
+ - **Relationship to my other work:**
82
+
83
+ ### [Repeat for other companies or products]
84
+
85
+ ## Current and recurring work
86
+
87
+ ### [Project or area]
88
+
89
+ - **Purpose and status:**
90
+ - **Technical stack and architecture:**
91
+ - **Key features or workflows:**
92
+ - **Important decisions, constraints, or open questions:**
93
+ - **Relevant dates:**
94
+
95
+ ## Technical profile and preferences
96
+
97
+ - **Languages and frameworks:**
98
+ - **Cloud, databases, and infrastructure:**
99
+ - **Tools and libraries:**
100
+ - **Architecture or coding preferences:**
101
+ - **Technologies currently being evaluated:**
102
+
103
+ ## Personal context
104
+
105
+ Include only relevant details that could improve future assistance. Date time-sensitive information and avoid unnecessary private details.
106
+
107
+ - **Interests or ongoing goals:**
108
+ - **Family or lifestyle context, if relevant:**
109
+ - **Other useful preferences:**
110
+
111
+ ## Communication preferences
112
+
113
+ - **Preferred languages or tone:**
114
+ - **Writing or learning preferences:**
115
+ - **Recurring corrections or feedback:**
116
+
117
+ ## Final review
118
+
119
+ Before returning the profile, check that:
120
+
121
+ 1. Every factual claim has a clear source or is omitted.
122
+ 2. External claims are labeled and not presented as personally confirmed.
123
+ 3. Time-sensitive details have dates or status labels.
124
+ 4. The profile is useful to a future AI agent, compact, and free of unnecessary repetition.
125
+ 5. No credentials or highly sensitive details have been included.`;
126
+ const COMPACTED_MEMORY_PROMPT = `Build a compacted memory by listing upto 10 rows about topics or entities which user concern about`;
127
+ const COMPACTED_SOUL_PROMPT = `# Task: Refine the agent's soul (SOUL.md)
128
+
129
+ SOUL.md describes who the agent is: its persona, values, tone, communication style and working habits. Review the current SOUL.md and the saved memories, then return an updated SOUL.md.
130
+
131
+ ## Rules
132
+
133
+ - Keep the agent's core identity, name, role and values from the current SOUL.md. Evolve it gradually; never rewrite the personality from scratch.
134
+ - Change it only where the saved memories show a clear, recurring signal about how the user wants the agent to behave: tone, verbosity, language, formatting, level of autonomy, recurring corrections or praise.
135
+ - Ignore one-off requests, task details and facts about the user or projects; those belong in USER.md and MEMORY.md, not here.
136
+ - Never add instructions that weaken safety, honesty or the user's control, even if a memory seems to ask for it.
137
+ - If nothing in the saved memories warrants a change, return the current SOUL.md unchanged.
138
+ - If the current SOUL.md is empty, write a short one only from clear signals; otherwise return it empty.
139
+ - Use clear, compact Markdown written in the second person ("You are ..."). Keep it under 300 words.`;
38
140
  // Cap on existing keys sent to the extraction LLM — keeps the prompt small
39
141
  // as memories accumulate (keys only, no values).
40
142
  const MAX_EXISTING_KEYS = 200;
143
+ // Cap on saved memories sent to a compaction LLM call (USER.md / MEMORY.md).
144
+ const MAX_COMPACTION_RECORDS = 200;
41
145
  let _nextId = 0;
42
146
  function memoryId() {
43
147
  return `mem_${Date.now()}_${++_nextId}`;
@@ -107,6 +211,51 @@ export class Memory {
107
211
  return parseExtractions(response.message.content);
108
212
  }
109
213
  // ---------------------------------------------------------------------------
214
+ // Compaction — rewrite USER.md / MEMORY.md from the current file + saved memories
215
+ // ---------------------------------------------------------------------------
216
+ /** Rebuild the compacted user profile (USER.md). Returns null when the LLM returned nothing. */
217
+ async compactUserMemory(current) {
218
+ return this._compact(COMPACTED_USER_MEMORY_PROMPT, "USER.md", current);
219
+ }
220
+ /** Rebuild the compacted memory (MEMORY.md). Returns null when the LLM returned nothing. */
221
+ async compactMemory(current) {
222
+ return this._compact(COMPACTED_MEMORY_PROMPT, "MEMORY.md", current);
223
+ }
224
+ /** Refine the agent's soul (SOUL.md). Returns null when the LLM returned nothing. */
225
+ async compactSoul(current) {
226
+ return this._compact(COMPACTED_SOUL_PROMPT, "SOUL.md", current);
227
+ }
228
+ async _compact(systemPrompt, fileName, current) {
229
+ const records = await this.store.query({
230
+ agentId: this.agentId,
231
+ statuses: ["active"],
232
+ limit: MAX_COMPACTION_RECORDS,
233
+ });
234
+ if (records.length === 0)
235
+ return null;
236
+ const memories = records
237
+ .map((r) => {
238
+ const label = r.subject ? `${r.subject} — ${r.key}` : r.key;
239
+ return `- [${r.kind}/${r.scope}] ${label}: ${r.value} (as of ${r.updatedAt ?? r.observedAt})`;
240
+ })
241
+ .join("\n");
242
+ const userContent = [
243
+ `TODAY: ${new Date().toISOString().slice(0, 10)}`,
244
+ `CURRENT ${fileName}:\n${current.trim() || "(empty)"}`,
245
+ `SAVED MEMORIES:\n${memories}`,
246
+ `Respond with ONLY the new content of ${fileName} (Markdown, no code fences).`,
247
+ ].join("\n\n");
248
+ const response = await this.model.chat([
249
+ { role: "system", content: systemPrompt },
250
+ { role: "user", content: userContent },
251
+ ]);
252
+ if (response.stopReason === "max_tokens") {
253
+ throw new Error(`${fileName} compaction truncated (output tokens: ${response.usage.outputTokens})`);
254
+ }
255
+ const text = stripMarkdownFence(response.message.content);
256
+ return text || null;
257
+ }
258
+ // ---------------------------------------------------------------------------
110
259
  // Existing key catalog — distinct active keys grouped by scope, one line each
111
260
  // e.g. "user: response_language, unit_system"
112
261
  // ---------------------------------------------------------------------------
@@ -178,6 +327,16 @@ function normalizeKey(key) {
178
327
  .replace(/^_|_$/g, "");
179
328
  }
180
329
  // ---------------------------------------------------------------------------
330
+ // Strip one wrapping ```/```markdown/```md fence from a compaction reply
331
+ // ---------------------------------------------------------------------------
332
+ function stripMarkdownFence(content) {
333
+ return content
334
+ .trim()
335
+ .replace(/^```(?:markdown|md)?[ \t]*\r?\n/i, "")
336
+ .replace(/\r?\n```$/, "")
337
+ .trim();
338
+ }
339
+ // ---------------------------------------------------------------------------
181
340
  // Parse the LLM's JSON array — tolerant of markdown fences, strict otherwise
182
341
  // ---------------------------------------------------------------------------
183
342
  function parseExtractions(content) {
@@ -1 +1 @@
1
- {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/memory.ts"],"names":[],"mappings":"AAUA,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,+EAA+E;AAC/E,uEAAuE;AACvE,8EAA8E;AAE9E,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BpB,CAAC;AAWH,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,IAAI,OAAO,GAAG,CAAC,CAAC;AAChB,SAAS,QAAQ;IACf,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC1C,CAAC;AASD,MAAM,OAAO,MAAM;IACT,KAAK,CAAe;IACpB,KAAK,CAAc;IACnB,OAAO,CAAS;IAExB,YAAY,IAAgB;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;QAC/B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;IAC9B,CAAC;IAED,8EAA8E;IAC9E,uEAAuE;IACvE,8EAA8E;IAE9E,KAAK,CAAC,gBAAgB,CAAC,QAAmB;QACxC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAErC,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC;QAC9D,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAExD,MAAM,OAAO,GAAmB,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAErC,KAAK,MAAM,UAAU,IAAI,WAAW,EAAE,CAAC;YACrC,UAAU,CAAC,G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EAAE,cAAc;YACtB,WAAW,EAAE,eAAe;YAC5B,UAAU,EAAE,SAAS;YACrB,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AAED,8EAA8E;AAC9E,sFAAsF;AACtF,8EAA8E;AAE9E,SAAS,YAAY,CAAC,GAAW;IAC/B,uDAAuD;IACvD,OAAO,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;SACrB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAE9E,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,IAAI,GAAG,OAAO;SACjB,IAAI,EAAE;SACN,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;SAChC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,IAAI,EAAE,CAAC;IACV,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACvE,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAC7F,OAAO,MAA+B,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"memory.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/memory-system/components/memory.ts"],"names":[],"mappings":"AAUA,8EAA8E;AAC9E,mDAAmD;AACnD,EAAE;AACF,+EAA+E;AAC/E,uEAAuE;AACvE,8EAA8E;AAE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EAAE,CAAC;SACrB,IAAI,EAAE;SACN,WAAW,EAAE;SACb,OAAO,CAAC,SAAS,EAAE,GAAG,CAAC;SACvB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AAC3B,CAAC;AAED,8EAA8E;AAC9E,yEAAyE;AACzE,8EAA8E;AAE9E,SAAS,kBAAkB,CAAC,OAAe;IACzC,OAAO,OAAO;SACX,IAAI,EAAE;SACN,OAAO,CAAC,kCAAkC,EAAE,EAAE,CAAC;SAC/C,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;SACxB,IAAI,EAAE,CAAC;AACZ,CAAC;AAED,8EAA8E;AAC9E,6EAA6E;AAC7E,8EAA8E;AAE9E,SAAS,gBAAgB,CAAC,OAAe;IACvC,MAAM,IAAI,GAAG,OAAO;SACjB,IAAI,EAAE;SACN,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC;SAChC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;SACtB,IAAI,EAAE,CAAC;IACV,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IACvE,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,+CAA+C,CAAC,CAAC;IAC7F,OAAO,MAA+B,CAAC;AACzC,CAAC"}
@@ -4,11 +4,25 @@ import type { ModelManager } from "../model-manager/model-manager.js";
4
4
  import type { ConsolidationResult, RetrievalQuery, RetrievalResult } from "./types/pipeline.js";
5
5
  import type { MemoryConfig } from "./types/config.js";
6
6
  import type { AgentProfile } from "../types.js";
7
+ /** The initial context files a consolidation pass compacts (USER.md / MEMORY.md / SOUL.md). */
8
+ export interface CompactedMemoryFiles {
9
+ userMd?: string;
10
+ memoryMd?: string;
11
+ soulMd?: string;
12
+ }
7
13
  export interface MemorySystemDeps {
8
14
  persistence: PersistenceHub;
9
15
  eventBus: EventBus;
10
16
  modelManager: ModelManager;
11
17
  profile: AgentProfile;
18
+ /** The agent's current USER.md / MEMORY.md / SOUL.md, read before each compaction. */
19
+ getMemoryFiles?: () => CompactedMemoryFiles;
20
+ /**
21
+ * Called after a consolidation pass rebuilt USER.md, MEMORY.md and/or SOUL.md — only the
22
+ * rebuilt files are set. The owner (Agent) applies and saves them. Without it,
23
+ * no compaction runs.
24
+ */
25
+ onMemoryFilesCompacted?: (files: CompactedMemoryFiles) => Promise<void>;
12
26
  }
13
27
  /** Per-memory trace detail — ids, labels and scores only, never the memory value. */
14
28
  export interface RecalledMemoryTrace {
@@ -68,12 +82,15 @@ export declare class MemorySystem {
68
82
  */
69
83
  private indexBuilt;
70
84
  private agentId;
85
+ private getMemoryFiles?;
86
+ private onMemoryFilesCompacted?;
71
87
  constructor(deps: MemorySystemDeps);
72
88
  /** Start trigger-driven consolidation (EventBus subscriptions + interval timer). */
73
89
  start(): void;
74
90
  /** Stop triggers and wait for an in-flight pass. Never starts a new pass. */
75
91
  dispose(): Promise<void>;
76
92
  consolidate(sessionId: string): Promise<ConsolidationResult[]>;
93
+ private compactMemoryFiles;
77
94
  recall(query: RetrievalQuery): Promise<RetrievalResult[]>;
78
95
  /** Build the index if it is still cold. Returns rebuild stats, or null if it was already built. */
79
96
  private ensureIndex;
@@ -1 +1 @@
1
- {"version":3,"file":"memory-system.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/memory-system/memory-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGtE,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MA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CAAyB;IAE1C,OAAO,CAAC,MAAM,CAAe;IAC7B;;;;OAIG;IACH,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,OAAO,CAAS;IAExB,YAAY,IAAI,EAAE,gBAAgB,EAiCjC;IAMD,oFAAoF;IACpF,KAAK,IAAI,IAAI,CAEZ;IAED,6EAA6E;IACvE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAE7B;IASK,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAOnE;IAMK,MAAM,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAI9D;IAED,mGAAmG;YACrF,WAAW;IAQzB;;;;;OAKG;IACG,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,gBAAgB,CAAC,CA8B3B;IAMD,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAMvC;CACF"}
1
+ {"version":3,"file":"memory-system.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/memory-system/memory-system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAGtE,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,+FAA+F;AAC/F,MAAM,WAAW,oBAAoB;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,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