aec-agent 1.0.3 → 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 (554) 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/memory.d.ts +7 -0
  230. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.d.ts.map +1 -1
  231. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js +189 -30
  232. package/dist/components/multi-agent-orchestration/agent/memory-system/components/memory.js.map +1 -1
  233. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts +17 -0
  234. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.d.ts.map +1 -1
  235. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js +51 -0
  236. package/dist/components/multi-agent-orchestration/agent/memory-system/memory-system.js.map +1 -1
  237. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts +5 -0
  238. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.d.ts.map +1 -1
  239. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js +16 -0
  240. package/dist/components/multi-agent-orchestration/agent/model-manager/model-manager.js.map +1 -1
  241. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts +41 -0
  242. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.d.ts.map +1 -0
  243. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js +98 -0
  244. package/dist/components/multi-agent-orchestration/agent/secret-manager/secret-manager.js.map +1 -0
  245. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts +37 -0
  246. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.d.ts.map +1 -0
  247. package/dist/components/multi-agent-orchestration/agent/secret-manager/types.js.map +1 -0
  248. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.d.ts.map +1 -1
  249. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js +1 -0
  250. package/dist/components/multi-agent-orchestration/agent/skill-manager/skill-manager.js.map +1 -1
  251. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts +21 -0
  252. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.d.ts.map +1 -0
  253. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js +113 -0
  254. package/dist/components/multi-agent-orchestration/agent/subagent-manager/brief.js.map +1 -0
  255. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts +52 -0
  256. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.d.ts.map +1 -0
  257. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js +63 -0
  258. package/dist/components/multi-agent-orchestration/agent/subagent-manager/child-loop.js.map +1 -0
  259. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts +18 -0
  260. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.d.ts.map +1 -0
  261. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js +56 -0
  262. package/dist/components/multi-agent-orchestration/agent/subagent-manager/semaphore.js.map +1 -0
  263. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts +128 -0
  264. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.d.ts.map +1 -0
  265. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js +661 -0
  266. package/dist/components/multi-agent-orchestration/agent/subagent-manager/subagent-manager.js.map +1 -0
  267. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts +307 -0
  268. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.d.ts.map +1 -0
  269. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js +60 -0
  270. package/dist/components/multi-agent-orchestration/agent/subagent-manager/types.js.map +1 -0
  271. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts +14 -3
  272. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.d.ts.map +1 -1
  273. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js +18 -5
  274. package/dist/components/multi-agent-orchestration/agent/tool-manager/tool-manager.js.map +1 -1
  275. package/dist/components/multi-agent-orchestration/agent/types.d.ts +84 -1
  276. package/dist/components/multi-agent-orchestration/agent/types.d.ts.map +1 -1
  277. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts +11 -4
  278. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.d.ts.map +1 -1
  279. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js +72 -4
  280. package/dist/components/multi-agent-orchestration/multi-agent-orchestration.js.map +1 -1
  281. package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts +11 -0
  282. package/dist/components/persistence-hub/default-stores/memory-channel-store.d.ts.map +1 -0
  283. package/dist/components/persistence-hub/default-stores/memory-channel-store.js +33 -0
  284. package/dist/components/persistence-hub/default-stores/memory-channel-store.js.map +1 -0
  285. package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts +21 -0
  286. package/dist/components/persistence-hub/default-stores/memory-group-store.d.ts.map +1 -0
  287. package/dist/components/persistence-hub/default-stores/memory-group-store.js +62 -0
  288. package/dist/components/persistence-hub/default-stores/memory-group-store.js.map +1 -0
  289. package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts +31 -0
  290. package/dist/components/persistence-hub/default-stores/memory-job-store.d.ts.map +1 -0
  291. package/dist/components/persistence-hub/default-stores/memory-job-store.js +234 -0
  292. package/dist/components/persistence-hub/default-stores/memory-job-store.js.map +1 -0
  293. package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts +12 -0
  294. package/dist/components/persistence-hub/default-stores/memory-secret-store.d.ts.map +1 -0
  295. package/dist/components/persistence-hub/default-stores/memory-secret-store.js +38 -0
  296. package/dist/components/persistence-hub/default-stores/memory-secret-store.js.map +1 -0
  297. package/dist/components/persistence-hub/default-stores/memory-session-store.d.ts.map +1 -1
  298. package/dist/components/persistence-hub/default-stores/memory-session-store.js +7 -0
  299. package/dist/components/persistence-hub/default-stores/memory-session-store.js.map +1 -1
  300. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts +10 -0
  301. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.d.ts.map +1 -0
  302. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js +30 -0
  303. package/dist/components/persistence-hub/default-stores/memory-subagent-run-store.js.map +1 -0
  304. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts +9 -0
  305. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.d.ts.map +1 -0
  306. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js +17 -0
  307. package/dist/components/persistence-hub/default-stores/memory-subagent-type-store.js.map +1 -0
  308. package/dist/components/persistence-hub/persistence-hub.d.ts +41 -0
  309. package/dist/components/persistence-hub/persistence-hub.d.ts.map +1 -1
  310. package/dist/components/persistence-hub/persistence-hub.js +41 -0
  311. package/dist/components/persistence-hub/persistence-hub.js.map +1 -1
  312. package/dist/components/persistence-hub/types/channel-store.d.ts +12 -0
  313. package/dist/components/persistence-hub/types/channel-store.d.ts.map +1 -0
  314. package/dist/components/persistence-hub/types/channel-store.js +2 -0
  315. package/dist/components/persistence-hub/types/channel-store.js.map +1 -0
  316. package/dist/components/persistence-hub/types/group-store.d.ts +27 -0
  317. package/dist/components/persistence-hub/types/group-store.d.ts.map +1 -0
  318. package/dist/components/persistence-hub/types/group-store.js +2 -0
  319. package/dist/components/persistence-hub/types/group-store.js.map +1 -0
  320. package/dist/components/persistence-hub/types/job-store.d.ts +112 -0
  321. package/dist/components/persistence-hub/types/job-store.d.ts.map +1 -0
  322. package/dist/components/persistence-hub/types/job-store.js +2 -0
  323. package/dist/components/persistence-hub/types/job-store.js.map +1 -0
  324. package/dist/components/persistence-hub/types/secret-store.d.ts +18 -0
  325. package/dist/components/persistence-hub/types/secret-store.d.ts.map +1 -0
  326. package/dist/components/persistence-hub/types/secret-store.js +2 -0
  327. package/dist/components/persistence-hub/types/secret-store.js.map +1 -0
  328. package/dist/components/persistence-hub/types/session-store.d.ts +5 -0
  329. package/dist/components/persistence-hub/types/session-store.d.ts.map +1 -1
  330. package/dist/components/persistence-hub/types/subagent-run-store.d.ts +11 -0
  331. package/dist/components/persistence-hub/types/subagent-run-store.d.ts.map +1 -0
  332. package/dist/components/persistence-hub/types/subagent-run-store.js +2 -0
  333. package/dist/components/persistence-hub/types/subagent-run-store.js.map +1 -0
  334. package/dist/components/persistence-hub/types/subagent-type-store.d.ts +9 -0
  335. package/dist/components/persistence-hub/types/subagent-type-store.d.ts.map +1 -0
  336. package/dist/components/persistence-hub/types/subagent-type-store.js +2 -0
  337. package/dist/components/persistence-hub/types/subagent-type-store.js.map +1 -0
  338. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts +4 -1
  339. package/dist/components/sandbox-hub/docker/docker-sandbox.d.ts.map +1 -1
  340. package/dist/components/sandbox-hub/docker/docker-sandbox.js +398 -1
  341. package/dist/components/sandbox-hub/docker/docker-sandbox.js.map +1 -1
  342. package/dist/components/sandbox-hub/docker/sandbox-helper.d.ts.map +1 -1
  343. package/dist/components/sandbox-hub/docker/sandbox-helper.js +386 -5
  344. package/dist/components/sandbox-hub/docker/sandbox-helper.js.map +1 -1
  345. package/dist/components/sandbox-hub/host/host-sandbox.d.ts +16 -0
  346. package/dist/components/sandbox-hub/host/host-sandbox.d.ts.map +1 -1
  347. package/dist/components/sandbox-hub/host/host-sandbox.js +283 -2
  348. package/dist/components/sandbox-hub/host/host-sandbox.js.map +1 -1
  349. package/dist/components/sandbox-hub/sandbox-hub.d.ts +9 -0
  350. package/dist/components/sandbox-hub/sandbox-hub.d.ts.map +1 -1
  351. package/dist/components/sandbox-hub/sandbox-hub.js +18 -0
  352. package/dist/components/sandbox-hub/sandbox-hub.js.map +1 -1
  353. package/dist/components/sandbox-hub/traced-sandbox.d.ts.map +1 -1
  354. package/dist/components/sandbox-hub/traced-sandbox.js +32 -0
  355. package/dist/components/sandbox-hub/traced-sandbox.js.map +1 -1
  356. package/dist/components/sandbox-hub/types/sandbox.d.ts +106 -1
  357. package/dist/components/sandbox-hub/types/sandbox.d.ts.map +1 -1
  358. package/dist/components/sandbox-hub/types/sandbox.js +0 -13
  359. package/dist/components/sandbox-hub/types/sandbox.js.map +1 -1
  360. package/dist/components/secret-hub/envelope.d.ts +48 -0
  361. package/dist/components/secret-hub/envelope.d.ts.map +1 -0
  362. package/dist/components/secret-hub/envelope.js +157 -0
  363. package/dist/components/secret-hub/envelope.js.map +1 -0
  364. package/dist/components/secret-hub/rules.d.ts +33 -0
  365. package/dist/components/secret-hub/rules.d.ts.map +1 -0
  366. package/dist/components/secret-hub/rules.js +142 -0
  367. package/dist/components/secret-hub/rules.js.map +1 -0
  368. package/dist/components/secret-hub/secret-hub-provider.d.ts +61 -0
  369. package/dist/components/secret-hub/secret-hub-provider.d.ts.map +1 -0
  370. package/dist/components/secret-hub/secret-hub-provider.js +73 -0
  371. package/dist/components/secret-hub/secret-hub-provider.js.map +1 -0
  372. package/dist/components/secret-hub/secret-hub.d.ts +102 -0
  373. package/dist/components/secret-hub/secret-hub.d.ts.map +1 -0
  374. package/dist/components/secret-hub/secret-hub.js +267 -0
  375. package/dist/components/secret-hub/secret-hub.js.map +1 -0
  376. package/dist/components/secret-hub/types.d.ts +77 -0
  377. package/dist/components/secret-hub/types.d.ts.map +1 -0
  378. package/dist/components/secret-hub/types.js +23 -0
  379. package/dist/components/secret-hub/types.js.map +1 -0
  380. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts +1 -1
  381. package/dist/components/skill-hub/built-in-skills/essential-skills.d.ts.map +1 -1
  382. package/dist/components/skill-hub/built-in-skills/essential-skills.js +7 -2
  383. package/dist/components/skill-hub/built-in-skills/essential-skills.js.map +1 -1
  384. package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts +3 -0
  385. package/dist/components/skill-hub/built-in-skills/watch-and-notify.d.ts.map +1 -0
  386. package/dist/components/skill-hub/built-in-skills/watch-and-notify.js +94 -0
  387. package/dist/components/skill-hub/built-in-skills/watch-and-notify.js.map +1 -0
  388. package/dist/components/skill-hub/skill-hub.d.ts +9 -1
  389. package/dist/components/skill-hub/skill-hub.d.ts.map +1 -1
  390. package/dist/components/skill-hub/skill-hub.js +11 -1
  391. package/dist/components/skill-hub/skill-hub.js.map +1 -1
  392. package/dist/components/subagent-hub/built-in-types.d.ts +3 -0
  393. package/dist/components/subagent-hub/built-in-types.d.ts.map +1 -0
  394. package/dist/components/subagent-hub/built-in-types.js +24 -0
  395. package/dist/components/subagent-hub/built-in-types.js.map +1 -0
  396. package/dist/components/subagent-hub/subagent-hub.d.ts +41 -0
  397. package/dist/components/subagent-hub/subagent-hub.d.ts.map +1 -0
  398. package/dist/components/subagent-hub/subagent-hub.js +158 -0
  399. package/dist/components/subagent-hub/subagent-hub.js.map +1 -0
  400. package/dist/components/subagent-hub/types.d.ts +40 -0
  401. package/dist/components/subagent-hub/types.d.ts.map +1 -0
  402. package/dist/components/subagent-hub/types.js +8 -0
  403. package/dist/components/subagent-hub/types.js.map +1 -0
  404. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts +4 -1
  405. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.d.ts.map +1 -1
  406. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js +4 -0
  407. package/dist/components/tool-hub/built-in-tools/artifacts/artifact-helpers.js.map +1 -1
  408. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.d.ts.map +1 -1
  409. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js +4 -1
  410. package/dist/components/tool-hub/built-in-tools/artifacts/save-artifact-tool.js.map +1 -1
  411. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.d.ts.map +1 -1
  412. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js +4 -1
  413. package/dist/components/tool-hub/built-in-tools/artifacts/update-artifact-tool.js.map +1 -1
  414. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts +10 -0
  415. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.d.ts.map +1 -0
  416. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js +13 -0
  417. package/dist/components/tool-hub/built-in-tools/jobs/create-job-tools.js.map +1 -0
  418. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts +60 -0
  419. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.d.ts.map +1 -0
  420. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js +240 -0
  421. package/dist/components/tool-hub/built-in-tools/jobs/job-tool-helpers.js.map +1 -0
  422. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts +14 -0
  423. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.d.ts.map +1 -0
  424. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js +36 -0
  425. package/dist/components/tool-hub/built-in-tools/jobs/list-jobs-tool.js.map +1 -0
  426. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts +32 -0
  427. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.d.ts.map +1 -0
  428. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js +458 -0
  429. package/dist/components/tool-hub/built-in-tools/jobs/manage-job-tool.js.map +1 -0
  430. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts +9 -0
  431. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.d.ts.map +1 -0
  432. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js +20 -0
  433. package/dist/components/tool-hub/built-in-tools/preview/create-preview-tools.js.map +1 -0
  434. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts +12 -0
  435. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.d.ts.map +1 -0
  436. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js +57 -0
  437. package/dist/components/tool-hub/built-in-tools/preview/list-apps-tool.js.map +1 -0
  438. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts +15 -0
  439. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.d.ts.map +1 -0
  440. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js +80 -0
  441. package/dist/components/tool-hub/built-in-tools/preview/open-in-app-tool.js.map +1 -0
  442. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts +53 -0
  443. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.d.ts.map +1 -0
  444. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js +100 -0
  445. package/dist/components/tool-hub/built-in-tools/preview/preview-helpers.js.map +1 -0
  446. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts +14 -0
  447. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.d.ts.map +1 -0
  448. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js +63 -0
  449. package/dist/components/tool-hub/built-in-tools/preview/preview-tool.js.map +1 -0
  450. package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts +33 -0
  451. package/dist/components/tool-hub/built-in-tools/preview/service-tools.d.ts.map +1 -0
  452. package/dist/components/tool-hub/built-in-tools/preview/service-tools.js +180 -0
  453. package/dist/components/tool-hub/built-in-tools/preview/service-tools.js.map +1 -0
  454. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts +6 -0
  455. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.d.ts.map +1 -0
  456. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js +9 -0
  457. package/dist/components/tool-hub/built-in-tools/secrets/create-secret-tools.js.map +1 -0
  458. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts +12 -0
  459. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.d.ts.map +1 -0
  460. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js +30 -0
  461. package/dist/components/tool-hub/built-in-tools/secrets/list-secrets-tool.js.map +1 -0
  462. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts +22 -0
  463. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.d.ts.map +1 -0
  464. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js +113 -0
  465. package/dist/components/tool-hub/built-in-tools/secrets/manage-secret-tool.js.map +1 -0
  466. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts +9 -0
  467. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.d.ts.map +1 -0
  468. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js +29 -0
  469. package/dist/components/tool-hub/built-in-tools/secrets/secret-tool-helpers.js.map +1 -0
  470. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts +27 -0
  471. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.d.ts.map +1 -0
  472. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js +112 -0
  473. package/dist/components/tool-hub/built-in-tools/subagents/spawn-subagent-tool.js.map +1 -0
  474. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts +43 -0
  475. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.d.ts.map +1 -0
  476. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js +234 -0
  477. package/dist/components/tool-hub/built-in-tools/web/http-request-tool.js.map +1 -0
  478. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.d.ts.map +1 -1
  479. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js +2 -0
  480. package/dist/components/tool-hub/built-in-tools/web/web-extract-tool.js.map +1 -1
  481. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.d.ts.map +1 -1
  482. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js +2 -0
  483. package/dist/components/tool-hub/built-in-tools/web/web-search-tool.js.map +1 -1
  484. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.d.ts.map +1 -1
  485. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js +9 -1
  486. package/dist/components/tool-hub/built-in-tools/workspace/run-code-tool.js.map +1 -1
  487. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.d.ts.map +1 -1
  488. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js +9 -2
  489. package/dist/components/tool-hub/built-in-tools/workspace/terminal-tool.js.map +1 -1
  490. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts +17 -0
  491. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.d.ts.map +1 -1
  492. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js +29 -0
  493. package/dist/components/tool-hub/built-in-tools/workspace/workspace-helpers.js.map +1 -1
  494. package/dist/components/tool-hub/tool-links.d.ts +9 -0
  495. package/dist/components/tool-hub/tool-links.d.ts.map +1 -0
  496. package/dist/components/tool-hub/tool-links.js +11 -0
  497. package/dist/components/tool-hub/tool-links.js.map +1 -0
  498. package/dist/components/tool-hub/types.d.ts +101 -1
  499. package/dist/components/tool-hub/types.d.ts.map +1 -1
  500. package/dist/index.d.ts +109 -8
  501. package/dist/index.d.ts.map +1 -1
  502. package/dist/index.js +68 -0
  503. package/dist/index.js.map +1 -1
  504. package/dist/kernel/errors/channel-error.d.ts +24 -0
  505. package/dist/kernel/errors/channel-error.d.ts.map +1 -0
  506. package/dist/kernel/errors/channel-error.js +15 -0
  507. package/dist/kernel/errors/channel-error.js.map +1 -0
  508. package/dist/kernel/errors/command-error.d.ts +12 -0
  509. package/dist/kernel/errors/command-error.d.ts.map +1 -0
  510. package/dist/kernel/errors/command-error.js +11 -0
  511. package/dist/kernel/errors/command-error.js.map +1 -0
  512. package/dist/kernel/errors/group-error.d.ts +15 -0
  513. package/dist/kernel/errors/group-error.d.ts.map +1 -0
  514. package/dist/kernel/errors/group-error.js +10 -0
  515. package/dist/kernel/errors/group-error.js.map +1 -0
  516. package/dist/kernel/errors/job-error.d.ts +23 -0
  517. package/dist/kernel/errors/job-error.d.ts.map +1 -0
  518. package/dist/kernel/errors/job-error.js +15 -0
  519. package/dist/kernel/errors/job-error.js.map +1 -0
  520. package/dist/kernel/errors/secret-error.d.ts +19 -0
  521. package/dist/kernel/errors/secret-error.d.ts.map +1 -0
  522. package/dist/kernel/errors/secret-error.js +10 -0
  523. package/dist/kernel/errors/secret-error.js.map +1 -0
  524. package/dist/kernel/errors/session-error.d.ts +5 -1
  525. package/dist/kernel/errors/session-error.d.ts.map +1 -1
  526. package/dist/kernel/errors/session-error.js.map +1 -1
  527. package/dist/kernel/errors/subagent-error.d.ts +19 -0
  528. package/dist/kernel/errors/subagent-error.d.ts.map +1 -0
  529. package/dist/kernel/errors/subagent-error.js +10 -0
  530. package/dist/kernel/errors/subagent-error.js.map +1 -0
  531. package/dist/kernel/interfaces/kernel.d.ts +15 -0
  532. package/dist/kernel/interfaces/kernel.d.ts.map +1 -1
  533. package/dist/kernel/types.d.ts +80 -1
  534. package/dist/kernel/types.d.ts.map +1 -1
  535. package/dist/testing/fake-channel.d.ts +60 -0
  536. package/dist/testing/fake-channel.d.ts.map +1 -0
  537. package/dist/testing/fake-channel.js +135 -0
  538. package/dist/testing/fake-channel.js.map +1 -0
  539. package/dist/testing/in-memory-sandbox.d.ts +4 -1
  540. package/dist/testing/in-memory-sandbox.d.ts.map +1 -1
  541. package/dist/testing/in-memory-sandbox.js +63 -3
  542. package/dist/testing/in-memory-sandbox.js.map +1 -1
  543. package/dist/testing/mock-session-store.d.ts.map +1 -1
  544. package/dist/testing/mock-session-store.js +7 -0
  545. package/dist/testing/mock-session-store.js.map +1 -1
  546. package/package.json +2 -1
  547. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts +0 -38
  548. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.d.ts.map +0 -1
  549. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js +0 -155
  550. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/scheduled-job-manager.js.map +0 -1
  551. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts +0 -27
  552. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.d.ts.map +0 -1
  553. package/dist/components/multi-agent-orchestration/agent/scheduled-job-manager/types.js.map +0 -1
  554. /package/dist/components/multi-agent-orchestration/agent/{scheduled-job-manager → secret-manager}/types.js +0 -0
@@ -0,0 +1,47 @@
1
+ import type { Message, TokenUsage } from "../../../../../kernel/types.js";
2
+ import type { ContextSection } from "../../context-manager/context-manager.js";
3
+ import type { CompactorConfig } from "../components/compactor.types.js";
4
+ import type { ContextUsage } from "../types.js";
5
+ /** What measureContext() needs: the exact model input and how it was built. */
6
+ export interface MeasureContextInput {
7
+ sessionId: string;
8
+ model?: string;
9
+ /** Set when measured inside a run. */
10
+ iteration?: number;
11
+ /** The labelled parts of the always-loaded system message (ContextManager.prepare). */
12
+ sections: ContextSection[];
13
+ /** The messages sent to the model (or that would be sent), system message included. */
14
+ messages: Message[];
15
+ /** The recalled memories added to the system message, if any. */
16
+ recalled?: string | null;
17
+ /** The tool definitions sent, in order. */
18
+ tools: Array<{
19
+ name: string;
20
+ description: string;
21
+ parameters: unknown;
22
+ }>;
23
+ /**
24
+ * The model's answer, when measured after a response: it joins the context. Counted
25
+ * from `reported.outputTokens` when there is a reported usage, estimated otherwise.
26
+ */
27
+ response?: Message;
28
+ /** The provider's reported usage: input = context sent, output = what it generated. */
29
+ reported?: TokenUsage;
30
+ /** The session's effective compactor config (sessionCompactorConfig). */
31
+ compactor: Pick<CompactorConfig, "contextWindowTokens" | "threshold">;
32
+ /** Token estimate of one message (the run's session-calibrated Counter). */
33
+ countTokens: (message: Message) => number;
34
+ }
35
+ /**
36
+ * A-104: what fills a session's context window, by category. Every category is an
37
+ * estimate except `other`: when the provider reported a usage, `usedTokens` is that
38
+ * real total and `other` is the part of it the estimates do not cover (never below 0;
39
+ * nothing is scaled). Without a reported usage, `usedTokens` is the estimate.
40
+ *
41
+ * The system message is split into the ContextManager's sections, the recalled
42
+ * memories and whatever a middleware added (counted as system_prompt). A message the
43
+ * compactor marked `summary` counts as summary; every other non-system message as
44
+ * messages.
45
+ */
46
+ export declare function measureContext(input: MeasureContextInput): ContextUsage;
47
+ //# sourceMappingURL=context-usage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-usage.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAsB,YAAY,EAAE,MAAM,aAAa,CAAC;AAGpE,+EAA+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,QAAQ,EAAE,cAAc,EAAE,CAAC;IAC3B,uFAAuF;IACvF,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,2CAA2C;IAC3C,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzE;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uFAAuF;IACvF,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,yEAAyE;IACzE,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,qBAAqB,GAAG,WAAW,CAAC,CAAC;IACtE,4EAA4E;IAC5E,WAAW,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;CAC3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAqDvE"}
@@ -0,0 +1,61 @@
1
+ import { CONTEXT_CATEGORY_KEYS } from "../types.js";
2
+ /**
3
+ * A-104: what fills a session's context window, by category. Every category is an
4
+ * estimate except `other`: when the provider reported a usage, `usedTokens` is that
5
+ * real total and `other` is the part of it the estimates do not cover (never below 0;
6
+ * nothing is scaled). Without a reported usage, `usedTokens` is the estimate.
7
+ *
8
+ * The system message is split into the ContextManager's sections, the recalled
9
+ * memories and whatever a middleware added (counted as system_prompt). A message the
10
+ * compactor marked `summary` counts as summary; every other non-system message as
11
+ * messages.
12
+ */
13
+ export function measureContext(input) {
14
+ const { countTokens } = input;
15
+ const text = (content) => content ? countTokens({ role: "system", content }) : 0;
16
+ const tokens = new Map(CONTEXT_CATEGORY_KEYS.map((k) => [k, 0]));
17
+ const add = (key, n) => tokens.set(key, tokens.get(key) + n);
18
+ let sectionTotal = 0;
19
+ for (const section of input.sections) {
20
+ const n = text(section.text);
21
+ add(section.key, n);
22
+ sectionTotal += n;
23
+ }
24
+ const memories = text(input.recalled);
25
+ add("memories", memories);
26
+ let systemTotal = 0;
27
+ for (const message of input.messages) {
28
+ if (message.role === "system")
29
+ systemTotal += countTokens(message);
30
+ else
31
+ add(message.summary ? "summary" : "messages", countTokens(message));
32
+ }
33
+ // What the system messages hold beyond the sections and memories (a middleware's
34
+ // additions, separators) is part of the system prompt.
35
+ add("system_prompt", Math.max(0, systemTotal - sectionTotal - memories));
36
+ const tools = input.tools.map((t) => ({
37
+ name: t.name,
38
+ tokens: text(JSON.stringify({ name: t.name, description: t.description, parameters: t.parameters })),
39
+ }));
40
+ add("tools", tools.reduce((sum, t) => sum + t.tokens, 0));
41
+ const reported = input.reported && input.reported.inputTokens + input.reported.outputTokens > 0 ? input.reported : undefined;
42
+ if (input.response)
43
+ add("messages", reported ? reported.outputTokens : countTokens(input.response));
44
+ const estimated = [...tokens.values()].reduce((sum, n) => sum + n, 0);
45
+ const usedTokens = reported ? reported.inputTokens + reported.outputTokens : estimated;
46
+ add("other", Math.max(0, usedTokens - estimated));
47
+ const window = input.compactor.contextWindowTokens;
48
+ return {
49
+ sessionId: input.sessionId,
50
+ ...(input.model ? { model: input.model } : {}),
51
+ contextWindowTokens: window,
52
+ compactAtTokens: Math.floor(window * input.compactor.threshold),
53
+ usedTokens,
54
+ usedSource: reported ? "reported" : "estimated",
55
+ freeTokens: Math.max(0, window - usedTokens),
56
+ categories: CONTEXT_CATEGORY_KEYS.map((key) => ({ key, tokens: tokens.get(key) })),
57
+ tools,
58
+ ...(input.iteration !== undefined ? { iteration: input.iteration } : {}),
59
+ };
60
+ }
61
+ //# sourceMappingURL=context-usage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context-usage.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/context-usage.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AA6BpD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,KAA0B;IACvD,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,IAAI,GAAG,CAAC,OAAkC,EAAU,EAAE,CAC1D,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzD,MAAM,MAAM,GAAG,IAAI,GAAG,CAA6B,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7F,MAAM,GAAG,GAAG,CAAC,GAAuB,EAAE,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAE,GAAG,CAAC,CAAC,CAAC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CAAC,SAAS,CAAC;QAC/D,UAAU;QACV,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW;QAC/C,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;QAC5C,UAAU,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,CAAE,EAAE,CAAC,CAAC;QACnF,KAAK;QACL,GAAG,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACzE,CAAC;AACJ,CAAC"}
@@ -2,7 +2,7 @@ import type { MemorySystem, RecalledMemories } from "../../memory-system/memory-
2
2
  import type { Counter } from "../components/counter.js";
3
3
  import type { RunTrace } from "../components/run-trace.js";
4
4
  export declare function recallMemories(deps: {
5
- memorySystem: MemorySystem;
5
+ memorySystem: MemorySystem | undefined;
6
6
  counter: Counter;
7
7
  agentId: string;
8
8
  }, userMessage: string, sessionId: string, trace: RunTrace): Promise<RecalledMemories | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"memory-recall.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAK3D,wBAAsB,cAAc,CAClC,IAAI,EAAE;IAAE,YAAY,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACvE,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAoClC"}
1
+ {"version":3,"file":"memory-recall.d.ts","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAK3D,wBAAsB,cAAc,CAClC,IAAI,EAAE;IAAE,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EACnF,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,QAAQ,GACd,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAoClC"}
@@ -2,7 +2,7 @@
2
2
  // Traced as a "memory-recall" span (child of the run span) so recall latency,
3
3
  // hit rate, scores and injected size can be measured per turn.
4
4
  export async function recallMemories(deps, userMessage, sessionId, trace) {
5
- if (!deps.memorySystem.recallForTurn)
5
+ if (!deps.memorySystem?.recallForTurn)
6
6
  return null;
7
7
  const recallSpan = trace.span("memory-recall", "memory-recall", {
8
8
  queryLength: userMessage.length,
@@ -1 +1 @@
1
- {"version":3,"file":"memory-recall.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,8EAA8E;AAC9E,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAuE,EACvE,WAAmB,EACnB,SAAiB,EACjB,KAAe;IAEf,IAAI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AAC;QACjE,UAAU,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CACV,oCAAoC,IAAI,CAAC,OAAO,YAAY,SAAS,GAAG,EACxE,OAAO,CACR,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"memory-recall.js","sourceRoot":"","sources":["../../../../../../src/components/multi-agent-orchestration/agent/agent-loop/functions/memory-recall.ts"],"names":[],"mappings":"AAIA,iFAAiF;AACjF,8EAA8E;AAC9E,+DAA+D;AAC/D,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAmF,EACnF,WAAmB,EACnB,SAAiB,EACjB,KAAe;IAEf,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,aAAa;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,eAAe,EAAE,eAAe,EAAE;QAC9D,WAAW,EAAE,WAAW,CAAC,MAAM;QAC/B,YAAY,EAAE,WAAW;KAC1B,CAAC,CAAC;IACH,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAC/E,UAAU,EAAE,GAAG,CAAC;YACd,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM;YACxC,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,GAAG,EAAE,QAAQ,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;YAClC,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,YAAY,EAAE,QAAQ,CAAC,YAAY;YACnC,cAAc,EAAE,QAAQ,CAAC,cAAc;YACvC,YAAY,EAAE,QAAQ,CAAC,YAAY;YACnC,aAAa,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;YAC5C,cAAc,EAAE,QAAQ,CAAC,OAAO;gBAC9B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;oBACvB,IAAI,EAAE,QAAQ;oBACd,OAAO,EAAE,QAAQ,CAAC,OAAO;iBAC1B,CAAC;gBACJ,CAAC,CAAC,CAAC;YACL,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa;YAC7C,QAAQ,EAAE,QAAQ,CAAC,QAAQ;SAC5B,CAAC,CAAC;QACH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACjE,UAAU,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;QACpC,OAAO,CAAC,IAAI,CACV,oCAAoC,IAAI,CAAC,OAAO,YAAY,SAAS,GAAG,EACxE,OAAO,CACR,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,26 +1,32 @@
1
1
  import type { AgentProfile } from "../types.js";
2
2
  import type { EventBus } from "../../../event-handler/types.js";
3
- import type { Message, TokenUsage } from "../../../../kernel/types.js";
3
+ import type { ApprovalMode, Message, TokenUsage } from "../../../../kernel/types.js";
4
4
  import type { ModelOptions } from "../../../llm-provider-hub/types.js";
5
- import type { InteractionHandler, ToolPolicy } from "../../../tool-hub/types.js";
5
+ import type { InteractionHandler, ToolDefinition, ToolPolicy } from "../../../tool-hub/types.js";
6
6
  import { SDKEventType } from "../../../event-handler/events.js";
7
7
  import type { TraceService } from "../../../trace-service/trace-service.js";
8
8
  import type { ContextManager } from "../context-manager/context-manager.js";
9
+ import type { AgentJobs, JobDeliveryOptions } from "../job-manager/types.js";
9
10
  import type { MemorySystem } from "../memory-system/memory-system.js";
10
- import type { ConversationManager } from "../conversation-manager/conversation-manager.js";
11
11
  import type { ModelManager } from "../model-manager/model-manager.js";
12
12
  import type { SkillManager } from "../skill-manager/skill-manager.js";
13
13
  import type { ToolManager } from "../tool-manager/tool-manager.js";
14
14
  import type { SandboxManager } from "../sandbox-manager/sandbox-manager.js";
15
15
  import type { ArtifactManager } from "../artifact-manager/artifact-manager.js";
16
- export declare const MAX_ITERATIONS = 10;
16
+ import type { AgentSubagents } from "../subagent-manager/types.js";
17
+ import type { AgentSecrets } from "../secret-manager/types.js";
18
+ export declare const MAX_ITERATIONS = 100;
17
19
  export declare const MAX_TOOL_RETRIES = 2;
18
20
  export declare const RETRY_BACKOFF_MS = 500;
21
+ /** A-97: 0 = no cap — every session of an agent may run a turn at the same time. */
22
+ export declare const MAX_CONCURRENT_TURNS = 0;
19
23
  /** Agent-loop limits fully resolved for a single run/dispatch — no optional fields. */
20
24
  export interface ResolvedLoopConfig {
21
25
  maxIterations: number;
22
26
  maxToolRetries: number;
23
27
  retryBackoffMs: number;
28
+ /** A-97: most turns one agent runs at once across its sessions; 0 = no cap. */
29
+ maxConcurrentTurns: number;
24
30
  }
25
31
  /**
26
32
  * Resolve an agent's optional loopConfig into concrete limits, falling back
@@ -34,7 +40,6 @@ export interface AgentLoopDeps {
34
40
  toolManager: ToolManager;
35
41
  skillManager: SkillManager;
36
42
  contextManager: ContextManager;
37
- conversationManager: ConversationManager;
38
43
  eventBus: EventBus;
39
44
  profile: AgentProfile;
40
45
  /** Tool policy for authorization checks before dispatch (optional — no policy = allow all) */
@@ -45,17 +50,63 @@ export interface AgentLoopDeps {
45
50
  allowedTools?: string[];
46
51
  /** Centralized trace service for span-tree observability (optional — no tracing when absent) */
47
52
  traceService?: TraceService;
48
- memorySystem: MemorySystem;
53
+ /** Absent = no memory recall (A-105: a subagent type's short-lived loop has no memory of its own). */
54
+ memorySystem?: MemorySystem;
49
55
  /**
50
56
  * Host channel to the human user (clarify / approval), resolved lazily on every tool
51
57
  * dispatch so a handler registered after the agent was spawned is still picked up.
52
58
  * Absent = no interactive user: clarify reports an error and consequential tools are denied.
59
+ * A-100 phase 2: called with the turn's session, so the agent can route a channel turn's
60
+ * approvals and questions to its chat and every other session to the host's handler.
53
61
  */
54
- getInteractionHandler?: () => InteractionHandler | undefined;
62
+ getInteractionHandler?: (sessionId: string) => InteractionHandler | undefined;
63
+ /**
64
+ * A-135: the session's approval mode, read at every call that needs approval (so a switch
65
+ * during a turn applies to its next call). "yolo" runs the call without asking the
66
+ * interaction handler. Absent = always "ask".
67
+ */
68
+ getApprovalMode?: (sessionId: string) => ApprovalMode | Promise<ApprovalMode>;
55
69
  /** Resolves the agent's sandbox for file/terminal tools (absent = none). */
56
70
  sandboxManager?: SandboxManager;
57
71
  /** Scopes the artifact store to this agent for the artifact tools (absent = no artifacts). */
58
72
  artifactManager?: ArtifactManager;
73
+ /**
74
+ * The agent's prompt jobs (A-69), for the scheduled-job tools (absent = none).
75
+ * Update (A-126): its jobs of every kind (A-70 triggers merged in), handed to tools as
76
+ * ToolContext.jobs for manage_job / list_jobs.
77
+ */
78
+ jobs?: AgentJobs;
79
+ /**
80
+ * A-100 phase 3: the delivery of a job scheduled from the session's turn — its chat while
81
+ * a channel turn runs in it, undefined otherwise. Resolved on every tool dispatch.
82
+ */
83
+ /**
84
+ * Update (A-127): getJobDeliveryOptions — that chat, and the home chats of the agent's
85
+ * channels (where a job made outside a chat app reports).
86
+ */
87
+ getJobDeliveryOptions?: (sessionId: string) => JobDeliveryOptions;
88
+ /**
89
+ * A-105: the agent's subagents, handed to tools as ToolContext.subagents for
90
+ * spawn_subagent (absent = none).
91
+ */
92
+ subagents?: AgentSubagents;
93
+ /**
94
+ * A-101: the agent's secrets, handed to tools as ToolContext.secrets; every tool result
95
+ * and tool error is passed through its redact() before anyone sees it (absent = none).
96
+ */
97
+ secrets?: AgentSecrets;
98
+ /**
99
+ * A-105: which tools a session may use, beyond the agent's allowlist — a child run's
100
+ * session (a subagent) gets only its read-only tools, and never spawn_subagent.
101
+ * Resolved per model call and per dispatch; undefined = every tool of the agent.
102
+ */
103
+ toolScope?: (sessionId: string) => ((definition: ToolDefinition) => boolean) | undefined;
104
+ /**
105
+ * A-106: a call that runs without asking even though it needs approval — the user already
106
+ * agreed to it for this session (a group lead handing work to the group's members through
107
+ * spawn_subagent). The callee's own approval-gated calls still ask. Absent = none.
108
+ */
109
+ preApproved?: (sessionId: string, toolName: string) => boolean;
59
110
  }
60
111
  export interface RunResult {
61
112
  message: Message;
@@ -63,16 +114,53 @@ export interface RunResult {
63
114
  iterations: number;
64
115
  /** True when the run was stopped through RunOptions.signal instead of ending naturally (A-65). */
65
116
  aborted?: boolean;
117
+ /**
118
+ * Set when the run ended because the model's output was cut off at the output token limit (A-88):
119
+ * either a text reply that was cut short, or responses cut off mid tool call too many times in a row.
120
+ * Absent otherwise.
121
+ * "error" when the provider reported a stop that is not a normal finish (e.g. a refusal or a
122
+ * guardrail/content filter); the turn ends with the model's reply as-is.
123
+ */
124
+ stopReason?: "max_tokens" | "error";
66
125
  }
67
126
  export type EmitFn = (type: string, payload: unknown) => void;
68
127
  /**
69
128
  * Per-run control for Agent.chat/chatStream. Aborting `signal` stops the run
70
129
  * at the next safe point, saves what it has so far, and ends a stream with a
71
130
  * done chunk marked `aborted: true` (a blocking chat() call resolves with
72
- * `aborted: true` instead).
131
+ * `aborted: true` instead). Aborting it while the turn still waits for its
132
+ * session (A-97) ends it the same way, before anything is saved.
73
133
  */
74
134
  export interface RunOptions {
75
135
  signal?: AbortSignal;
136
+ /**
137
+ * A-97: the session to run in. Turns in different sessions of one agent run in
138
+ * parallel; turns in the same session run one at a time, in arrival order.
139
+ * Omitted = the session set by startSession()/loadSession().
140
+ */
141
+ sessionId?: string;
142
+ /**
143
+ * A-105: extra attributes for this run's root "agent-run" span — a child run puts its
144
+ * parent turn there (parentSessionId, parentRunId...), so the parent's trace view can
145
+ * show the child's trace too.
146
+ */
147
+ traceAttributes?: Record<string, unknown>;
148
+ /**
149
+ * A-136: run this turn in plan mode (only read-only tool calls), whatever the session's
150
+ * approval mode — /review reviews without changing anything.
151
+ */
152
+ readOnly?: boolean;
153
+ }
154
+ /** A-136: the outcome of a forced compaction (AgentLoop.compactNow, /compact). */
155
+ export interface CompactNowResult {
156
+ compacted: boolean;
157
+ /** The context size before: as last reported, else estimated. */
158
+ beforeTokens: number;
159
+ /** The estimated context size after (the same as before when not compacted). */
160
+ afterTokens: number;
161
+ /** Messages in the working set before and after. */
162
+ messagesBefore: number;
163
+ messagesAfter: number;
76
164
  }
77
165
  /** A single message as it appears in the exact array sent to the model. */
78
166
  export interface ContextTraceMessage {
@@ -96,6 +184,41 @@ export interface ContextTraceMessage {
96
184
  * for one iteration. Recorded on the "context-assembly" span so the trace
97
185
  * equals the model input, not a stale pre-compaction/pre-memory snapshot.
98
186
  */
187
+ /**
188
+ * A-104: what fills a session's context window. The categories are estimates
189
+ * (session-calibrated token counter); `usedTokens` is the provider's reported total
190
+ * when there is one, and `other` is the part of it the estimates do not cover.
191
+ */
192
+ export type ContextCategoryKey = "system_prompt" | "memory_files" | "skills" | "agents" | "secrets" | "tools" | "memories" | "messages" | "summary" | "other";
193
+ /** The categories of a ContextUsage, in the order they are always listed. */
194
+ export declare const CONTEXT_CATEGORY_KEYS: readonly ContextCategoryKey[];
195
+ export interface ContextCategory {
196
+ key: ContextCategoryKey;
197
+ tokens: number;
198
+ }
199
+ export interface ContextUsage {
200
+ sessionId: string;
201
+ /** The model the context was measured for, when known. */
202
+ model?: string;
203
+ /** The window the session plans around (its override, else the agent's compactor). */
204
+ contextWindowTokens: number;
205
+ /** Where compaction starts: contextWindowTokens × threshold. */
206
+ compactAtTokens: number;
207
+ /** The reported context size (input + output of the response) when the provider gave one, else the estimate. */
208
+ usedTokens: number;
209
+ usedSource: "reported" | "estimated";
210
+ /** contextWindowTokens − usedTokens, at least 0. */
211
+ freeTokens: number;
212
+ /** Every category, in CONTEXT_CATEGORY_KEYS order (zero-token ones included). */
213
+ categories: ContextCategory[];
214
+ /** The estimated tokens of each tool definition sent, in the order sent. */
215
+ tools: Array<{
216
+ name: string;
217
+ tokens: number;
218
+ }>;
219
+ /** The loop iteration it was measured after; absent when measured on demand. */
220
+ iteration?: number;
221
+ }
99
222
  export interface ContextAssemblyTraceAttributes {
100
223
  iteration: number;
101
224
  /** length of `messages` — the array sent to the model */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EACV,OAAO,EAIP,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EACV,kBAAkB,EAElB,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAO/E,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,gBAAgB,I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BAAmB,EAAE,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,eAAe,EAAE;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,mEAAmE;QACnE,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EAIP,UAAU,EACX,MAAM,6BAA6B,CAAC;AAErC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EAEd,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,YAAY,EAEb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MA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F,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzE,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,OAAO,EAAE,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IACrC,eAAe,EAAE;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,MAAM,CAAC;QACd,mEAAmE;QACnE,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH"}
@@ -3,9 +3,11 @@ import { SDKEventType } from "../../../event-handler/events.js";
3
3
  // Configuration
4
4
  // ---------------------------------------------------------------------------
5
5
  // Defaults — overridable per agent via AgentProfile.loopConfig (see resolveLoopConfig below).
6
- export const MAX_ITERATIONS = 10;
6
+ export const MAX_ITERATIONS = 100;
7
7
  export const MAX_TOOL_RETRIES = 2;
8
8
  export const RETRY_BACKOFF_MS = 500;
9
+ /** A-97: 0 = no cap — every session of an agent may run a turn at the same time. */
10
+ export const MAX_CONCURRENT_TURNS = 0;
9
11
  /**
10
12
  * Resolve an agent's optional loopConfig into concrete limits, falling back
11
13
  * to the SDK defaults per-field when a value is missing, non-finite, or
@@ -22,10 +24,24 @@ export function resolveLoopConfig(config) {
22
24
  maxIterations: resolveField(config?.maxIterations, 1, MAX_ITERATIONS),
23
25
  maxToolRetries: resolveField(config?.maxToolRetries, 0, MAX_TOOL_RETRIES),
24
26
  retryBackoffMs: resolveField(config?.retryBackoffMs, 0, RETRY_BACKOFF_MS),
27
+ maxConcurrentTurns: resolveField(config?.maxConcurrentTurns, 0, MAX_CONCURRENT_TURNS),
25
28
  };
26
29
  }
27
30
  // ---------------------------------------------------------------------------
28
31
  // SDKEventType re-exported for convenience within agent-loop
29
32
  // ---------------------------------------------------------------------------
30
33
  export { SDKEventType };
34
+ /** The categories of a ContextUsage, in the order they are always listed. */
35
+ export const CONTEXT_CATEGORY_KEYS = [
36
+ "system_prompt",
37
+ "memory_files",
38
+ "skills",
39
+ "agents",
40
+ "secrets",
41
+ "tools",
42
+ "memories",
43
+ "messages",
44
+ "summary",
45
+ "other",
46
+ ];
31
47
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAehE,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AACjC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AASpC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAA8C;IAE9C,MAAM,YAAY,GAAG,CACnB,KAAyB,EACzB,GAAW,EACX,QAAgB,EACR,EAAE;QACV,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;QAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7C,CAAC,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,CAAC;QACrE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACzE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,6DAA6D;AAC7D,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/components/multi-agent-orchestration/agent/agent-loop/types.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAiBhE,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E,8FAA8F;AAC9F,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC;AACpC,oFAAoF;AACpF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAWtC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAA8C;IAE9C,MAAM,YAAY,GAAG,CACnB,KAAyB,EACzB,GAAW,EACX,QAAgB,EACR,EAAE;QACV,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,OAAO,QAAQ,CAAC;QAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;IAC7C,CAAC,CAAC;IAEF,OAAO;QACL,aAAa,EAAE,YAAY,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,cAAc,CAAC;QACrE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACzE,cAAc,EAAE,YAAY,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,EAAE,gBAAgB,CAAC;QACzE,kBAAkB,EAAE,YAAY,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,EAAE,oBAAoB,CAAC;KACtF,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,6DAA6D;AAC7D,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,CAAC;AA0LxB,6EAA6E;AAC7E,MAAM,CAAC,MAAM,qBAAqB,GAAkC;IAClE,eAAe;IACf,cAAc;IACd,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,UAAU;IACV,UAAU;IACV,SAAS;IACT,OAAO;CACR,CAAC"}
@@ -1,9 +1,12 @@
1
- import type { AgentProfile } from "./types.js";
1
+ import type { AgentDeps, AgentProfile } from "./types.js";
2
2
  import type { ModelOptions } from "../../llm-provider-hub/types.js";
3
- import type { ScheduledJobHandler } from "./scheduled-job-manager/types.js";
4
- import type { Message, ModelResponse, Session, SessionFilter, StreamChunk } from "../../../kernel/types.js";
5
- import type { AgentCore } from "../../../agent-core.js";
6
- import type { RunOptions, RunResult } from "./agent-loop/types.js";
3
+ import type { ApprovalMode, Message, ModelResponse, Session, SessionFilter, StreamChunk } from "../../../kernel/types.js";
4
+ import type { AgentChannels } from "./channel-manager/types.js";
5
+ import type { AgentJobs } from "./job-manager/types.js";
6
+ import type { CompactNowResult, ContextUsage, RunOptions, RunResult } from "./agent-loop/types.js";
7
+ import type { AgentSubagents, SubagentChildSide } from "./subagent-manager/types.js";
8
+ import type { AgentCommands } from "./command-manager/types.js";
9
+ import type { AgentSecrets } from "./secret-manager/types.js";
7
10
  import type { SandboxSelection } from "../../sandbox-hub/types/policy.js";
8
11
  import type { SandboxView } from "../../sandbox-hub/types/sandbox.js";
9
12
  import type { ArtifactView } from "../../artifact-hub/types/artifact.js";
@@ -17,24 +20,66 @@ export declare class Agent {
17
20
  private contextManager;
18
21
  private conversationManager;
19
22
  private modelManager;
20
- private scheduledJobManager;
21
23
  private skillManager;
22
24
  private toolManager;
23
25
  private sandboxManager;
24
26
  private artifactManager;
25
27
  private memorySystem;
26
- constructor(agentCore: AgentCore, profile: AgentProfile);
28
+ private channelManager;
29
+ private jobManager;
30
+ private subagentManager;
31
+ private secretManager;
32
+ private commandManager;
33
+ constructor(deps: AgentDeps, profile: AgentProfile);
34
+ /**
35
+ * A-136: this agent's slash commands — list them (help, autocomplete), run one in a
36
+ * session, and register the agent's own.
37
+ */
38
+ get commands(): AgentCommands;
39
+ /**
40
+ * A-136: compact a session's working set now (/compact), with an optional focus for the
41
+ * summary. Waits for the session like a turn does. Null when there is no such session.
42
+ */
43
+ compact(sessionId: string, focus?: string): Promise<CompactNowResult | null>;
27
44
  startSession(metadata?: Record<string, unknown>, llmModel?: string): Promise<Session>;
45
+ /**
46
+ * Make a session the default for chat()/chatStream() calls that name none.
47
+ * A-97: turns that pass RunOptions.sessionId never need this, and each turn
48
+ * reads its session from the stores when it starts.
49
+ */
28
50
  loadSession(sessionId: string): Promise<Session | null>;
51
+ /** A-97: how many turns of this agent are running now, across all its sessions. */
52
+ get runningTurns(): number;
53
+ /** A-135: a session's approval mode ("ask" unless set to "yolo"). */
54
+ getApprovalMode(sessionId: string): Promise<ApprovalMode>;
55
+ /**
56
+ * A-135: set a session's approval mode — "yolo" runs its calls that need approval without
57
+ * asking. Applies at once, also to a turn running in the session. Null when there is no
58
+ * such session; SessionError "not_allowed" for YOLO in a job's session.
59
+ */
60
+ setApprovalMode(sessionId: string, mode: ApprovalMode): Promise<Session | null>;
61
+ /** A-135: the approval mode a session's calls use — a child run's session uses its parent's. */
62
+ private approvalModeFor;
29
63
  listSessions(filter?: SessionFilter): Promise<Session[]>;
64
+ /**
65
+ * A-104: what fills a session's context window now (default: the default session),
66
+ * by category. Reads the session without waiting for or blocking a running turn; no
67
+ * model call. Null when there is no such session.
68
+ */
69
+ contextUsage(sessionId?: string): Promise<ContextUsage | null>;
30
70
  listProviders(): string[];
31
71
  /**
32
72
  * `runOptions` (A-65) is a per-call control, separate from `options`
33
73
  * (model/inference overrides) — aborting `runOptions.signal` stops this
34
74
  * run at the next safe point instead of letting it run to completion.
75
+ *
76
+ * A-97: `runOptions.sessionId` picks the session (default: the one from
77
+ * startSession/loadSession). Turns in different sessions run in parallel; a
78
+ * turn in a busy session waits for it, and an abort while waiting resolves
79
+ * `aborted: true` with nothing saved.
35
80
  */
36
81
  chat(message: string, options?: ModelOptions, runOptions?: RunOptions): Promise<RunResult>;
37
- /** `runOptions` (A-65): see chat()'s doc comment above. */
82
+ /** `runOptions` (A-65, A-97): see chat()'s doc comment above. */
38
83
  chatStream(message: string, options?: ModelOptions, runOptions?: RunOptions): AsyncIterable<StreamChunk>;
39
84
  /**
40
85
  * One model call with this agent's provider, model and inference defaults —
@@ -60,6 +105,12 @@ export declare class Agent {
60
105
  updateLoopConfig(config: AgentProfile["loopConfig"]): void;
61
106
  /** Update the agent's memory config and propagate to the live MemorySystem. */
62
107
  updateMemoryConfig(config: AgentProfile["memory"]): void;
108
+ /** Replace the agent's initial context files (USER.md / MEMORY.md / SOUL.md); applies to the next model call. */
109
+ updateInitialContext(initialContext: AgentProfile["initialContext"]): void;
110
+ /** A-105: replace who the agent may delegate to and its subagent budget; applies to the next spawn. */
111
+ updateSubagents(config: AgentProfile["subagents"]): void;
112
+ /** A-101: replace which global secrets the agent may use; applies to the next tool call. */
113
+ updateSecrets(config: AgentProfile["secrets"]): void;
63
114
  /** Replace the agent's skill allowlist and propagate to the internal SkillManager. */
64
115
  updateSkills(skillNames: string[]): void;
65
116
  /**
@@ -78,13 +129,48 @@ export declare class Agent {
78
129
  * versions; reads never depend on it (artifacts outlive the session that made them).
79
130
  */
80
131
  artifacts(sessionId?: string): ArtifactView;
81
- useScheduledJob(job: ScheduledJobHandler): void;
82
- getScheduledJob(name: string): ScheduledJobHandler | undefined;
83
- getScheduledJobs(): ScheduledJobHandler[];
84
- startScheduledJob(name: string): void;
85
- stopScheduledJob(name: string): void;
86
- startAllScheduledJobs(): void;
87
- stopAllScheduledJobs(): void;
132
+ /** This agent's jobs — configure, run now, test events, webhook intake, event and run history. */
133
+ get jobs(): AgentJobs;
134
+ /**
135
+ * Load this agent's stored prompt jobs and arm their timers. Call once the host is
136
+ * ready to run turns (tools registered, runner set). A job whose time passed while
137
+ * the host was down runs once. Idempotent.
138
+ * Update (A-126): also starts working the job queue — due runs, retries, and runs a
139
+ * previous process left behind.
140
+ */
141
+ startJobs(): Promise<void>;
142
+ /**
143
+ * Default ScheduledJobRunner, used when the host set none: one turn in the run's
144
+ * session, one job at a time. Update (A-126): the default JobRunner, for every job run. It does not coordinate with chat()/chatStream() calls
145
+ * the host makes itself — a host that chats concurrently must supply a runner that
146
+ * shares its own run lock (AgentCore.useScheduledJobRunner).
147
+ *
148
+ * -> Superseded (A-97): runs used to be serialized here behind a jobRunQueue
149
+ * ("Serializes runs of the default job runner below"), and the run had to
150
+ * loadSession() first. Now the run names its session and the ConversationManager's TurnGate
151
+ * orders it with every other turn of that session, chat()/chatStream() included,
152
+ * while runs in other sessions go in parallel. A host still supplies its own runner
153
+ * when a run must also take its own bookkeeping (stop registry, traces, usage).
154
+ */
155
+ private runJobTurn;
156
+ /** This agent's child runs — targets, run records, stop. */
157
+ get subagents(): AgentSubagents;
158
+ /** This agent's side as somebody's subagent (used by the parent's SubagentManager). */
159
+ get subagentSide(): SubagentChildSide;
160
+ /** This agent's secrets — list (metadata only), its own secrets' CRUD, redaction. */
161
+ get secrets(): AgentSecrets;
162
+ /** This agent's channels — connect, edit, approve senders, send. */
163
+ get channels(): AgentChannels;
164
+ /**
165
+ * Connect this agent's stored, enabled channels. Call once the host is ready to run
166
+ * turns (tools registered, platforms and runner set). Idempotent.
167
+ */
168
+ startChannels(): Promise<void>;
169
+ /**
170
+ * Default ChannelTurnRunner, used when the host set none: one turn in the chat's session.
171
+ * Phase 2: streamed, so the chat shows the reply while it is written.
172
+ */
173
+ private runChannelTurn;
88
174
  /** Stop the agent. `removeData` (the agent is being deleted) also deletes its own sandbox's files. */
89
175
  dispose(opts?: {
90
176
  removeData?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-agent-orchestration/agent/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AASnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAEzE;;;GAGG;AACH,qBAAa,KAAK;IAChB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAE/B,OAAO,CAAC,SAAS,CAAY;IAC7B,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,mBAAmB,CAAsB;IACjD,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,mBAAmB,CAAsB;IACjD,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,YAAY,CAAe;IAEnC,YAAY,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,YAAY,EAgDtD;IAEK,YAAY,CAChB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,+EAA+E;IAC/E,kBAAkB,CAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAGvD;IAED,sFAAsF;IACtF,YAAY,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,IAAI,CAGvC;IAMD;;;OAGG;IACH,UAAU,IAAI,OAAO,CAAC,WAAW,CAAC,CAEjC;IAED;;;;OAIG;IACH,aAAa,CAAC,SAAS,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI,CAG3D;IAMD;;;OAGG;IACH,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,CAE1C;IAMD,eAAe,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAE9C;IAED,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE7D;IAED,gBAAgB,IAAI,mBAAmB,EAAE,CAExC;IAED,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEpC;IAED,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnC;IAED,qBAAqB,IAAI,IAAI,CAE5B;IAED,oBAAoB,IAAI,IAAI,CAE3B;IAED,sGAAsG;IAChG,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK5D;CACF"}
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../src/components/multi-agent-orchestration/agent/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EACV,YAAY,EACZ,OAAO,EACP,aAAa,EACb,OAAO,EACP,aAAa,EACb,WAAW,EACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAqB,MAAM,4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