@robota-sdk/agent-core 3.0.0-beta.6 → 3.0.0-beta.60

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 (505) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +34 -11
  3. package/dist/browser/index.d.ts +646 -324
  4. package/dist/browser/index.js +10 -4
  5. package/dist/node/index.cjs +10 -4
  6. package/dist/node/index.d.cts +646 -324
  7. package/dist/node/index.d.ts +646 -324
  8. package/dist/node/index.js +10 -4
  9. package/package.json +5 -3
  10. package/dist/abstracts/abstract-agent.d.ts +0 -56
  11. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  12. package/dist/abstracts/abstract-agent.js +0 -55
  13. package/dist/abstracts/abstract-agent.js.map +0 -1
  14. package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
  15. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  16. package/dist/abstracts/abstract-ai-provider.js +0 -252
  17. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  18. package/dist/abstracts/abstract-executor.d.ts +0 -110
  19. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  20. package/dist/abstracts/abstract-executor.js +0 -156
  21. package/dist/abstracts/abstract-executor.js.map +0 -1
  22. package/dist/abstracts/abstract-manager.d.ts +0 -42
  23. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  24. package/dist/abstracts/abstract-manager.js +0 -49
  25. package/dist/abstracts/abstract-manager.js.map +0 -1
  26. package/dist/abstracts/abstract-module.d.ts +0 -365
  27. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  28. package/dist/abstracts/abstract-module.js +0 -474
  29. package/dist/abstracts/abstract-module.js.map +0 -1
  30. package/dist/abstracts/abstract-plugin.d.ts +0 -369
  31. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  32. package/dist/abstracts/abstract-plugin.js +0 -258
  33. package/dist/abstracts/abstract-plugin.js.map +0 -1
  34. package/dist/abstracts/abstract-tool.d.ts +0 -175
  35. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  36. package/dist/abstracts/abstract-tool.js +0 -140
  37. package/dist/abstracts/abstract-tool.js.map +0 -1
  38. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  39. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  40. package/dist/abstracts/abstract-workflow-converter.js +0 -252
  41. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  42. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
  43. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  44. package/dist/abstracts/abstract-workflow-validator.js +0 -447
  45. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  46. package/dist/abstracts/index.d.ts +0 -6
  47. package/dist/abstracts/index.d.ts.map +0 -1
  48. package/dist/abstracts/index.js +0 -9
  49. package/dist/abstracts/index.js.map +0 -1
  50. package/dist/agents/constants.d.ts +0 -23
  51. package/dist/agents/constants.d.ts.map +0 -1
  52. package/dist/agents/constants.js +0 -22
  53. package/dist/agents/constants.js.map +0 -1
  54. package/dist/agents/index.d.ts +0 -1
  55. package/dist/agents/index.d.ts.map +0 -1
  56. package/dist/agents/index.js +0 -4
  57. package/dist/agents/index.js.map +0 -1
  58. package/dist/agents/robota.test.d.ts +0 -2
  59. package/dist/agents/robota.test.d.ts.map +0 -1
  60. package/dist/agents/robota.test.js +0 -416
  61. package/dist/agents/robota.test.js.map +0 -1
  62. package/dist/core/robota.d.ts +0 -694
  63. package/dist/core/robota.d.ts.map +0 -1
  64. package/dist/core/robota.js +0 -1277
  65. package/dist/core/robota.js.map +0 -1
  66. package/dist/executors/local-executor.d.ts +0 -96
  67. package/dist/executors/local-executor.d.ts.map +0 -1
  68. package/dist/executors/local-executor.js +0 -197
  69. package/dist/executors/local-executor.js.map +0 -1
  70. package/dist/executors/local-executor.test.d.ts +0 -2
  71. package/dist/executors/local-executor.test.d.ts.map +0 -1
  72. package/dist/executors/local-executor.test.js +0 -192
  73. package/dist/executors/local-executor.test.js.map +0 -1
  74. package/dist/index.d.ts +0 -274
  75. package/dist/index.d.ts.map +0 -1
  76. package/dist/index.js +0 -235
  77. package/dist/index.js.map +0 -1
  78. package/dist/interfaces/agent.d.ts +0 -198
  79. package/dist/interfaces/agent.d.ts.map +0 -1
  80. package/dist/interfaces/agent.js +0 -2
  81. package/dist/interfaces/agent.js.map +0 -1
  82. package/dist/interfaces/event-service.d.ts +0 -79
  83. package/dist/interfaces/event-service.d.ts.map +0 -1
  84. package/dist/interfaces/event-service.js +0 -2
  85. package/dist/interfaces/event-service.js.map +0 -1
  86. package/dist/interfaces/executor.d.ts +0 -128
  87. package/dist/interfaces/executor.d.ts.map +0 -1
  88. package/dist/interfaces/executor.js +0 -2
  89. package/dist/interfaces/executor.js.map +0 -1
  90. package/dist/interfaces/history-module.d.ts +0 -19
  91. package/dist/interfaces/history-module.d.ts.map +0 -1
  92. package/dist/interfaces/history-module.js +0 -2
  93. package/dist/interfaces/history-module.js.map +0 -1
  94. package/dist/interfaces/index.d.ts +0 -13
  95. package/dist/interfaces/index.d.ts.map +0 -1
  96. package/dist/interfaces/index.js +0 -4
  97. package/dist/interfaces/index.js.map +0 -1
  98. package/dist/interfaces/manager.d.ts +0 -142
  99. package/dist/interfaces/manager.d.ts.map +0 -1
  100. package/dist/interfaces/manager.js +0 -2
  101. package/dist/interfaces/manager.js.map +0 -1
  102. package/dist/interfaces/messages.d.ts +0 -75
  103. package/dist/interfaces/messages.d.ts.map +0 -1
  104. package/dist/interfaces/messages.js +0 -29
  105. package/dist/interfaces/messages.js.map +0 -1
  106. package/dist/interfaces/progress-reporting.d.ts +0 -86
  107. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  108. package/dist/interfaces/progress-reporting.js +0 -37
  109. package/dist/interfaces/progress-reporting.js.map +0 -1
  110. package/dist/interfaces/provider.d.ts +0 -217
  111. package/dist/interfaces/provider.d.ts.map +0 -1
  112. package/dist/interfaces/provider.js +0 -2
  113. package/dist/interfaces/provider.js.map +0 -1
  114. package/dist/interfaces/service.d.ts +0 -205
  115. package/dist/interfaces/service.d.ts.map +0 -1
  116. package/dist/interfaces/service.js +0 -6
  117. package/dist/interfaces/service.js.map +0 -1
  118. package/dist/interfaces/tool.d.ts +0 -248
  119. package/dist/interfaces/tool.d.ts.map +0 -1
  120. package/dist/interfaces/tool.js +0 -2
  121. package/dist/interfaces/tool.js.map +0 -1
  122. package/dist/interfaces/types.d.ts +0 -71
  123. package/dist/interfaces/types.d.ts.map +0 -1
  124. package/dist/interfaces/types.js +0 -33
  125. package/dist/interfaces/types.js.map +0 -1
  126. package/dist/interfaces/workflow-converter.d.ts +0 -193
  127. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  128. package/dist/interfaces/workflow-converter.js +0 -11
  129. package/dist/interfaces/workflow-converter.js.map +0 -1
  130. package/dist/interfaces/workflow-validator.d.ts +0 -209
  131. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  132. package/dist/interfaces/workflow-validator.js +0 -16
  133. package/dist/interfaces/workflow-validator.js.map +0 -1
  134. package/dist/managers/agent-factory.d.ts +0 -132
  135. package/dist/managers/agent-factory.d.ts.map +0 -1
  136. package/dist/managers/agent-factory.js +0 -284
  137. package/dist/managers/agent-factory.js.map +0 -1
  138. package/dist/managers/agent-factory.test.d.ts +0 -2
  139. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  140. package/dist/managers/agent-factory.test.js +0 -249
  141. package/dist/managers/agent-factory.test.js.map +0 -1
  142. package/dist/managers/agent-templates.d.ts +0 -84
  143. package/dist/managers/agent-templates.d.ts.map +0 -1
  144. package/dist/managers/agent-templates.js +0 -159
  145. package/dist/managers/agent-templates.js.map +0 -1
  146. package/dist/managers/ai-provider-manager.d.ts +0 -80
  147. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  148. package/dist/managers/ai-provider-manager.js +0 -226
  149. package/dist/managers/ai-provider-manager.js.map +0 -1
  150. package/dist/managers/conversation-history-manager.d.ts +0 -455
  151. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  152. package/dist/managers/conversation-history-manager.js +0 -578
  153. package/dist/managers/conversation-history-manager.js.map +0 -1
  154. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  155. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  156. package/dist/managers/conversation-history-manager.test.js +0 -374
  157. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  158. package/dist/managers/index.d.ts +0 -8
  159. package/dist/managers/index.d.ts.map +0 -1
  160. package/dist/managers/index.js +0 -8
  161. package/dist/managers/index.js.map +0 -1
  162. package/dist/managers/module-registry.d.ts +0 -161
  163. package/dist/managers/module-registry.d.ts.map +0 -1
  164. package/dist/managers/module-registry.js +0 -519
  165. package/dist/managers/module-registry.js.map +0 -1
  166. package/dist/managers/module-type-registry.d.ts +0 -113
  167. package/dist/managers/module-type-registry.d.ts.map +0 -1
  168. package/dist/managers/module-type-registry.js +0 -439
  169. package/dist/managers/module-type-registry.js.map +0 -1
  170. package/dist/managers/plugins.d.ts +0 -166
  171. package/dist/managers/plugins.d.ts.map +0 -1
  172. package/dist/managers/plugins.js +0 -339
  173. package/dist/managers/plugins.js.map +0 -1
  174. package/dist/managers/tool-manager.d.ts +0 -70
  175. package/dist/managers/tool-manager.d.ts.map +0 -1
  176. package/dist/managers/tool-manager.js +0 -138
  177. package/dist/managers/tool-manager.js.map +0 -1
  178. package/dist/managers/tool-manager.test.d.ts +0 -2
  179. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  180. package/dist/managers/tool-manager.test.js +0 -186
  181. package/dist/managers/tool-manager.test.js.map +0 -1
  182. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  183. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  184. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  185. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  186. package/dist/plugins/conversation-history/index.d.ts +0 -3
  187. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  188. package/dist/plugins/conversation-history/index.js +0 -2
  189. package/dist/plugins/conversation-history/index.js.map +0 -1
  190. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  191. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  192. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  193. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  194. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  195. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  196. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  197. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  198. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  199. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  200. package/dist/plugins/conversation-history/storages/index.js +0 -4
  201. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  202. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  203. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  204. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  205. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  206. package/dist/plugins/conversation-history/types.d.ts +0 -61
  207. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  208. package/dist/plugins/conversation-history/types.js +0 -2
  209. package/dist/plugins/conversation-history/types.js.map +0 -1
  210. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  211. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  212. package/dist/plugins/error-handling/context-adapter.js +0 -41
  213. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  214. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  215. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  216. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  217. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  218. package/dist/plugins/error-handling/index.d.ts +0 -10
  219. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  220. package/dist/plugins/error-handling/index.js +0 -10
  221. package/dist/plugins/error-handling/index.js.map +0 -1
  222. package/dist/plugins/error-handling/types.d.ts +0 -73
  223. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  224. package/dist/plugins/error-handling/types.js +0 -14
  225. package/dist/plugins/error-handling/types.js.map +0 -1
  226. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  227. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  228. package/dist/plugins/event-emitter/metrics.js +0 -17
  229. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  230. package/dist/plugins/event-emitter/types.d.ts +0 -112
  231. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  232. package/dist/plugins/event-emitter/types.js +0 -65
  233. package/dist/plugins/event-emitter/types.js.map +0 -1
  234. package/dist/plugins/event-emitter-plugin.d.ts +0 -222
  235. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  236. package/dist/plugins/event-emitter-plugin.js +0 -432
  237. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  238. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  239. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  240. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  241. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  242. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  243. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  244. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  245. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  246. package/dist/plugins/execution/index.d.ts +0 -3
  247. package/dist/plugins/execution/index.d.ts.map +0 -1
  248. package/dist/plugins/execution/index.js +0 -2
  249. package/dist/plugins/execution/index.js.map +0 -1
  250. package/dist/plugins/execution/types.d.ts +0 -90
  251. package/dist/plugins/execution/types.d.ts.map +0 -1
  252. package/dist/plugins/execution/types.js +0 -2
  253. package/dist/plugins/execution/types.js.map +0 -1
  254. package/dist/plugins/index.d.ts +0 -10
  255. package/dist/plugins/index.d.ts.map +0 -1
  256. package/dist/plugins/index.js +0 -11
  257. package/dist/plugins/index.js.map +0 -1
  258. package/dist/plugins/limits/types.d.ts +0 -61
  259. package/dist/plugins/limits/types.d.ts.map +0 -1
  260. package/dist/plugins/limits/types.js +0 -2
  261. package/dist/plugins/limits/types.js.map +0 -1
  262. package/dist/plugins/limits-plugin.d.ts +0 -113
  263. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  264. package/dist/plugins/limits-plugin.js +0 -380
  265. package/dist/plugins/limits-plugin.js.map +0 -1
  266. package/dist/plugins/logging/formatters.d.ts +0 -14
  267. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  268. package/dist/plugins/logging/formatters.js +0 -24
  269. package/dist/plugins/logging/formatters.js.map +0 -1
  270. package/dist/plugins/logging/index.d.ts +0 -3
  271. package/dist/plugins/logging/index.d.ts.map +0 -1
  272. package/dist/plugins/logging/index.js +0 -2
  273. package/dist/plugins/logging/index.js.map +0 -1
  274. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  275. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  276. package/dist/plugins/logging/logging-plugin.js +0 -335
  277. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  278. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  279. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  280. package/dist/plugins/logging/storages/console-storage.js +0 -38
  281. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  282. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  283. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  284. package/dist/plugins/logging/storages/file-storage.js +0 -41
  285. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  286. package/dist/plugins/logging/storages/index.d.ts +0 -5
  287. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  288. package/dist/plugins/logging/storages/index.js +0 -5
  289. package/dist/plugins/logging/storages/index.js.map +0 -1
  290. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  291. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  292. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  293. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  294. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  295. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  296. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  297. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  298. package/dist/plugins/logging/types.d.ts +0 -84
  299. package/dist/plugins/logging/types.d.ts.map +0 -1
  300. package/dist/plugins/logging/types.js +0 -2
  301. package/dist/plugins/logging/types.js.map +0 -1
  302. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  303. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  304. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  305. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  306. package/dist/plugins/performance/index.d.ts +0 -5
  307. package/dist/plugins/performance/index.d.ts.map +0 -1
  308. package/dist/plugins/performance/index.js +0 -4
  309. package/dist/plugins/performance/index.js.map +0 -1
  310. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  311. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  312. package/dist/plugins/performance/performance-plugin.js +0 -293
  313. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  314. package/dist/plugins/performance/storages/index.d.ts +0 -2
  315. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  316. package/dist/plugins/performance/storages/index.js +0 -4
  317. package/dist/plugins/performance/storages/index.js.map +0 -1
  318. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  319. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  320. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  321. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  322. package/dist/plugins/performance/types.d.ts +0 -154
  323. package/dist/plugins/performance/types.d.ts.map +0 -1
  324. package/dist/plugins/performance/types.js +0 -2
  325. package/dist/plugins/performance/types.js.map +0 -1
  326. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  327. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  328. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  329. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  330. package/dist/plugins/usage/index.d.ts +0 -5
  331. package/dist/plugins/usage/index.d.ts.map +0 -1
  332. package/dist/plugins/usage/index.js +0 -4
  333. package/dist/plugins/usage/index.js.map +0 -1
  334. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  335. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  336. package/dist/plugins/usage/storages/file-storage.js +0 -111
  337. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  338. package/dist/plugins/usage/storages/index.d.ts +0 -5
  339. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  340. package/dist/plugins/usage/storages/index.js +0 -5
  341. package/dist/plugins/usage/storages/index.js.map +0 -1
  342. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  343. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  344. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  345. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  346. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  347. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  348. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  349. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  350. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  351. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  352. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  353. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  354. package/dist/plugins/usage/types.d.ts +0 -127
  355. package/dist/plugins/usage/types.d.ts.map +0 -1
  356. package/dist/plugins/usage/types.js +0 -2
  357. package/dist/plugins/usage/types.js.map +0 -1
  358. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  359. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  360. package/dist/plugins/usage/usage-plugin.js +0 -309
  361. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  362. package/dist/plugins/webhook/http-client.d.ts +0 -30
  363. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  364. package/dist/plugins/webhook/http-client.js +0 -110
  365. package/dist/plugins/webhook/http-client.js.map +0 -1
  366. package/dist/plugins/webhook/index.d.ts +0 -9
  367. package/dist/plugins/webhook/index.d.ts.map +0 -1
  368. package/dist/plugins/webhook/index.js +0 -9
  369. package/dist/plugins/webhook/index.js.map +0 -1
  370. package/dist/plugins/webhook/transformer.d.ts +0 -63
  371. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  372. package/dist/plugins/webhook/transformer.js +0 -157
  373. package/dist/plugins/webhook/transformer.js.map +0 -1
  374. package/dist/plugins/webhook/types.d.ts +0 -183
  375. package/dist/plugins/webhook/types.d.ts.map +0 -1
  376. package/dist/plugins/webhook/types.js +0 -2
  377. package/dist/plugins/webhook/types.js.map +0 -1
  378. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  379. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  380. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  381. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  382. package/dist/schemas/agent-template-schema.d.ts +0 -137
  383. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  384. package/dist/schemas/agent-template-schema.js +0 -87
  385. package/dist/schemas/agent-template-schema.js.map +0 -1
  386. package/dist/services/conversation-service/index.d.ts +0 -88
  387. package/dist/services/conversation-service/index.d.ts.map +0 -1
  388. package/dist/services/conversation-service/index.js +0 -441
  389. package/dist/services/conversation-service/index.js.map +0 -1
  390. package/dist/services/conversation-service/types.d.ts +0 -32
  391. package/dist/services/conversation-service/types.d.ts.map +0 -1
  392. package/dist/services/conversation-service/types.js +0 -8
  393. package/dist/services/conversation-service/types.js.map +0 -1
  394. package/dist/services/event-service.d.ts +0 -61
  395. package/dist/services/event-service.d.ts.map +0 -1
  396. package/dist/services/event-service.js +0 -110
  397. package/dist/services/event-service.js.map +0 -1
  398. package/dist/services/event-service.test.d.ts +0 -2
  399. package/dist/services/event-service.test.d.ts.map +0 -1
  400. package/dist/services/event-service.test.js +0 -86
  401. package/dist/services/event-service.test.js.map +0 -1
  402. package/dist/services/execution-service.d.ts +0 -151
  403. package/dist/services/execution-service.d.ts.map +0 -1
  404. package/dist/services/execution-service.js +0 -1262
  405. package/dist/services/execution-service.js.map +0 -1
  406. package/dist/services/execution-service.test.d.ts +0 -2
  407. package/dist/services/execution-service.test.d.ts.map +0 -1
  408. package/dist/services/execution-service.test.js +0 -338
  409. package/dist/services/execution-service.test.js.map +0 -1
  410. package/dist/services/history-module.d.ts +0 -15
  411. package/dist/services/history-module.d.ts.map +0 -1
  412. package/dist/services/history-module.js +0 -42
  413. package/dist/services/history-module.js.map +0 -1
  414. package/dist/services/in-memory-history-store.d.ts +0 -12
  415. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  416. package/dist/services/in-memory-history-store.js +0 -41
  417. package/dist/services/in-memory-history-store.js.map +0 -1
  418. package/dist/services/index.d.ts +0 -7
  419. package/dist/services/index.d.ts.map +0 -1
  420. package/dist/services/index.js +0 -13
  421. package/dist/services/index.js.map +0 -1
  422. package/dist/services/task-events.d.ts +0 -6
  423. package/dist/services/task-events.d.ts.map +0 -1
  424. package/dist/services/task-events.js +0 -6
  425. package/dist/services/task-events.js.map +0 -1
  426. package/dist/services/tool-execution-service.d.ts +0 -74
  427. package/dist/services/tool-execution-service.d.ts.map +0 -1
  428. package/dist/services/tool-execution-service.js +0 -189
  429. package/dist/services/tool-execution-service.js.map +0 -1
  430. package/dist/services/user-events.d.ts +0 -7
  431. package/dist/services/user-events.d.ts.map +0 -1
  432. package/dist/services/user-events.js +0 -6
  433. package/dist/services/user-events.js.map +0 -1
  434. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  435. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  436. package/dist/tools/implementations/function-tool/index.js +0 -13
  437. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  438. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  439. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  440. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  441. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  442. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  443. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  444. package/dist/tools/implementations/function-tool/types.js +0 -14
  445. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  446. package/dist/tools/implementations/function-tool.d.ts +0 -49
  447. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  448. package/dist/tools/implementations/function-tool.js +0 -223
  449. package/dist/tools/implementations/function-tool.js.map +0 -1
  450. package/dist/tools/implementations/index.d.ts +0 -4
  451. package/dist/tools/implementations/index.d.ts.map +0 -1
  452. package/dist/tools/implementations/index.js +0 -5
  453. package/dist/tools/implementations/index.js.map +0 -1
  454. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  455. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  456. package/dist/tools/implementations/mcp-tool.js +0 -246
  457. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  458. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  459. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  460. package/dist/tools/implementations/openapi-tool.js +0 -324
  461. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  462. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  463. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  464. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  465. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  466. package/dist/tools/index.d.ts +0 -3
  467. package/dist/tools/index.d.ts.map +0 -1
  468. package/dist/tools/index.js +0 -4
  469. package/dist/tools/index.js.map +0 -1
  470. package/dist/tools/registry/index.d.ts +0 -2
  471. package/dist/tools/registry/index.d.ts.map +0 -1
  472. package/dist/tools/registry/index.js +0 -3
  473. package/dist/tools/registry/index.js.map +0 -1
  474. package/dist/tools/registry/tool-registry.d.ts +0 -54
  475. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  476. package/dist/tools/registry/tool-registry.js +0 -146
  477. package/dist/tools/registry/tool-registry.js.map +0 -1
  478. package/dist/utils/errors.d.ts +0 -155
  479. package/dist/utils/errors.d.ts.map +0 -1
  480. package/dist/utils/errors.js +0 -203
  481. package/dist/utils/errors.js.map +0 -1
  482. package/dist/utils/execution-proxy.d.ts +0 -75
  483. package/dist/utils/execution-proxy.d.ts.map +0 -1
  484. package/dist/utils/execution-proxy.js +0 -230
  485. package/dist/utils/execution-proxy.js.map +0 -1
  486. package/dist/utils/index.d.ts +0 -11
  487. package/dist/utils/index.d.ts.map +0 -1
  488. package/dist/utils/index.js +0 -7
  489. package/dist/utils/index.js.map +0 -1
  490. package/dist/utils/logger.d.ts +0 -74
  491. package/dist/utils/logger.d.ts.map +0 -1
  492. package/dist/utils/logger.js +0 -143
  493. package/dist/utils/logger.js.map +0 -1
  494. package/dist/utils/message-converter.d.ts +0 -68
  495. package/dist/utils/message-converter.d.ts.map +0 -1
  496. package/dist/utils/message-converter.js +0 -87
  497. package/dist/utils/message-converter.js.map +0 -1
  498. package/dist/utils/periodic-task.d.ts +0 -14
  499. package/dist/utils/periodic-task.d.ts.map +0 -1
  500. package/dist/utils/periodic-task.js +0 -26
  501. package/dist/utils/periodic-task.js.map +0 -1
  502. package/dist/utils/validation.d.ts +0 -40
  503. package/dist/utils/validation.d.ts.map +0 -1
  504. package/dist/utils/validation.js +0 -162
  505. package/dist/utils/validation.js.map +0 -1
@@ -44,12 +44,18 @@ interface IToolCall {
44
44
  arguments: string;
45
45
  };
46
46
  }
47
+ /** State of a message in conversation history */
48
+ type TMessageState = 'complete' | 'interrupted';
47
49
  /**
48
50
  * Base message contract shared by all message variants.
49
51
  */
50
52
  interface IBaseMessage {
53
+ /** Unique message identifier */
54
+ id: string;
51
55
  /** Message creation timestamp */
52
56
  timestamp: Date;
57
+ /** Whether this message is complete or was interrupted */
58
+ state: TMessageState;
53
59
  /** Additional metadata */
54
60
  metadata?: TUniversalMessageMetadata;
55
61
  }
@@ -81,8 +87,49 @@ interface IToolMessage extends IBaseMessage {
81
87
  }
82
88
  /**
83
89
  * Universal message union used across the SDK as the canonical contract.
90
+ * Used for AI provider communication. Extracted from IHistoryEntry[] via filtering.
84
91
  */
85
92
  type TUniversalMessage = IUserMessage | IAssistantMessage | ISystemMessage | IToolMessage;
93
+ /**
94
+ * Universal history entry — the base type for all records in conversation history.
95
+ *
96
+ * History is a universal timeline that records everything: AI chat messages,
97
+ * system events, skill invocations, permission decisions, etc.
98
+ * AI provider receives only chat entries (filtered and converted to TUniversalMessage).
99
+ * TUI can render any range of entries.
100
+ *
101
+ * - append-only, read-only
102
+ * - category + type for classification (free-form strings, no pre-defined enum)
103
+ * - data holds type-specific structured content
104
+ */
105
+ interface IHistoryEntry<T = unknown> {
106
+ /** Unique entry identifier */
107
+ id: string;
108
+ /** Entry creation timestamp */
109
+ timestamp: Date;
110
+ /** Top-level classification: 'chat', 'event', etc. */
111
+ category: string;
112
+ /** Sub-classification within category. Free-form, not pre-defined. */
113
+ type: string;
114
+ /** Type-specific structured data */
115
+ data?: T;
116
+ }
117
+ /** Check if a history entry is a chat message (for AI provider filtering). */
118
+ declare function isChatEntry(entry: IHistoryEntry): boolean;
119
+ /**
120
+ * Convert a chat history entry to TUniversalMessage for AI provider consumption.
121
+ * Only call on entries where isChatEntry() returns true.
122
+ */
123
+ declare function chatEntryToMessage(entry: IHistoryEntry): TUniversalMessage;
124
+ /**
125
+ * Convert a TUniversalMessage to an IHistoryEntry for storage.
126
+ */
127
+ declare function messageToHistoryEntry(message: TUniversalMessage): IHistoryEntry;
128
+ /**
129
+ * Filter history entries and convert chat entries to TUniversalMessage[].
130
+ * Used when passing conversation to AI provider.
131
+ */
132
+ declare function getMessagesForAPI(history: IHistoryEntry[]): TUniversalMessage[];
86
133
  /**
87
134
  * Type guards for the canonical TUniversalMessage union.
88
135
  *
@@ -155,6 +202,42 @@ interface IPluginContext {
155
202
  error?: Error;
156
203
  executionContext?: TContextData;
157
204
  }
205
+ /**
206
+ * Type utility functions for safe type checking and validation
207
+ * @internal
208
+ */
209
+ declare const TypeUtils: {
210
+ isPrimitive: (value: TUniversalValue) => value is TPrimitiveValue;
211
+ isArray: (value: TUniversalValue) => value is TUniversalArrayValue;
212
+ isObject: (value: TUniversalValue) => value is IUniversalObjectValue;
213
+ isUniversalValue: (value: TUniversalValue) => value is TUniversalValue;
214
+ };
215
+
216
+ interface IProviderFunctionCallingCapability {
217
+ supported: boolean;
218
+ reason?: string;
219
+ }
220
+ interface IProviderNativeWebToolCapability {
221
+ supported: boolean;
222
+ enabled: boolean;
223
+ source?: string;
224
+ reason?: string;
225
+ }
226
+ interface IProviderNativeWebToolCapabilities {
227
+ webSearch: IProviderNativeWebToolCapability;
228
+ webFetch: IProviderNativeWebToolCapability;
229
+ }
230
+ interface IProviderCapabilities {
231
+ functionCalling: IProviderFunctionCallingCapability;
232
+ nativeWebTools: IProviderNativeWebToolCapabilities;
233
+ }
234
+ interface IProviderNativeWebToolRequest {
235
+ webSearch?: boolean;
236
+ webFetch?: boolean;
237
+ }
238
+ declare function createDefaultProviderCapabilities(functionCallingSupported: boolean): IProviderCapabilities;
239
+ declare function getProviderCapabilities(provider: IAIProvider): IProviderCapabilities;
240
+ declare function assertProviderNativeWebToolsAvailable(providerName: string, capabilities: IProviderCapabilities, request: IProviderNativeWebToolRequest | undefined): void;
158
241
 
159
242
  /**
160
243
  * Reusable type definitions for provider layer
@@ -187,6 +270,7 @@ interface IToolSchema {
187
270
  type: 'object';
188
271
  properties: Record<string, IParameterSchema>;
189
272
  required?: string[];
273
+ additionalProperties?: boolean | IParameterSchema;
190
274
  };
191
275
  }
192
276
  /**
@@ -299,6 +383,10 @@ interface IChatOptions extends IProviderSpecificOptions {
299
383
  * should use streaming internally and call this for each text chunk,
300
384
  * while still returning the complete assembled message. */
301
385
  onTextDelta?: TTextDeltaCallback;
386
+ /** AbortSignal for cancelling the provider call */
387
+ signal?: AbortSignal;
388
+ /** Provider-native hosted web tools requested for this call */
389
+ nativeWebTools?: IProviderNativeWebToolRequest;
302
390
  }
303
391
  /**
304
392
  * Provider-agnostic AI Provider interface
@@ -340,6 +428,15 @@ interface IAIProvider {
340
428
  * @returns true if tool calling is supported
341
429
  */
342
430
  supportsTools(): boolean;
431
+ /**
432
+ * Report provider-neutral capability state.
433
+ * Providers without native web support can omit this and use default capability helpers.
434
+ */
435
+ getCapabilities?(): IProviderCapabilities;
436
+ /**
437
+ * Optional generic hook for enabling provider-native hosted web behavior.
438
+ */
439
+ configureNativeWebTools?(request: IProviderNativeWebToolRequest): IProviderCapabilities;
343
440
  /**
344
441
  * Validate provider configuration
345
442
  * @returns true if configuration is valid
@@ -481,6 +578,78 @@ interface IEventServiceOwnerBinding {
481
578
  ownerPath: IOwnerPathSegment[];
482
579
  }
483
580
 
581
+ /**
582
+ * Abstract base for event services.
583
+ * Concrete implementations decide how events are delivered.
584
+ */
585
+ declare abstract class AbstractEventService implements IEventService {
586
+ private listeners;
587
+ abstract emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
588
+ subscribe(listener: TEventListener): void;
589
+ unsubscribe(listener: TEventListener): void;
590
+ protected notifyListeners(eventType: string, data: IBaseEventData, context?: IEventContext): void;
591
+ }
592
+ /**
593
+ * Default no-op event service (production-safe).
594
+ * When injected, emit() intentionally does nothing.
595
+ */
596
+ declare class DefaultEventService extends AbstractEventService {
597
+ emit(_eventType: string, _data: IBaseEventData, _context?: IEventContext): void;
598
+ }
599
+ /**
600
+ * Singleton default event service instance.
601
+ */
602
+ declare const DEFAULT_ABSTRACT_EVENT_SERVICE: IEventService;
603
+ /**
604
+ * Check if a given service is the default no-op implementation.
605
+ */
606
+ declare function isDefaultEventService(service: IEventService): boolean;
607
+ /**
608
+ * Compose a full event name from owner prefix and local name.
609
+ * Local names must not contain dots.
610
+ */
611
+ declare function composeEventName(ownerType: string, localName: string): string;
612
+ /**
613
+ * A scoped event service that always emits with an owner binding applied.
614
+ */
615
+ declare class StructuredEventService extends AbstractEventService {
616
+ private readonly base;
617
+ private readonly binding;
618
+ constructor(base: IEventService, binding: IEventServiceOwnerBinding);
619
+ emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
620
+ subscribe(listener: TEventListener): void;
621
+ unsubscribe(listener: TEventListener): void;
622
+ }
623
+ /**
624
+ * Bind an EventService to an explicit owner path.
625
+ * This is the standard entry point for scoped emission (path-only architecture).
626
+ */
627
+ declare function bindWithOwnerPath(base: IEventService, binding: IEventServiceOwnerBinding): IEventService;
628
+ /**
629
+ * Alias for bindWithOwnerPath for historical call sites.
630
+ * Intentionally forwards to the single authoritative implementation.
631
+ */
632
+ declare function bindEventServiceOwner(base: IEventService, binding: IEventServiceOwnerBinding): IEventService;
633
+ /**
634
+ * Observable EventService that notifies subscribed listeners.
635
+ */
636
+ declare class ObservableEventService extends AbstractEventService {
637
+ emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
638
+ }
639
+
640
+ declare const TASK_EVENTS: {
641
+ readonly ASSIGNED: "assigned";
642
+ readonly COMPLETED: "completed";
643
+ };
644
+ declare const TASK_EVENT_PREFIX: "task";
645
+
646
+ declare const USER_EVENTS: {
647
+ readonly MESSAGE: "message";
648
+ readonly INPUT: "input";
649
+ };
650
+ declare const USER_EVENT_PREFIX: "user";
651
+ type TUserEvent = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
652
+
484
653
  type TToolContextExtensionValue = TUniversalValue | Date | Error | TLoggerData | TContextData | TToolParameters | TToolMetadata;
485
654
  /**
486
655
  * Tool metadata structure - specific type definition
@@ -593,57 +762,6 @@ interface IParameterValidationResult {
593
762
  * Generic tool executor function
594
763
  */
595
764
  type TToolExecutor<TParams = TToolParameters, TResult = TUniversalValue> = (parameters: TParams, context?: IToolExecutionContext) => Promise<TResult>;
596
- /**
597
- * OpenAPI specification configuration
598
- */
599
- interface IOpenAPIToolConfig {
600
- /** OpenAPI 3.0 specification */
601
- spec: {
602
- openapi: string;
603
- info: {
604
- title: string;
605
- version: string;
606
- description?: string;
607
- };
608
- servers?: Array<{
609
- url: string;
610
- description?: string;
611
- }>;
612
- paths: Record<string, Record<string, string | number | boolean | Record<string, string | number | boolean>>>;
613
- components?: Record<string, Record<string, string | number | boolean>>;
614
- };
615
- /** Operation ID from the OpenAPI spec */
616
- operationId: string;
617
- /** Base URL for API calls */
618
- baseURL: string;
619
- /** Authentication configuration */
620
- auth?: {
621
- type: 'bearer' | 'apiKey' | 'basic';
622
- token?: string;
623
- apiKey?: string;
624
- header?: string;
625
- username?: string;
626
- password?: string;
627
- };
628
- }
629
- /**
630
- * MCP (Model Context Protocol) configuration
631
- */
632
- interface IMCPToolConfig {
633
- /** MCP server endpoint */
634
- endpoint: string;
635
- /** Protocol version */
636
- version?: string;
637
- /** Authentication configuration */
638
- auth?: {
639
- type: 'bearer' | 'apiKey';
640
- token: string;
641
- };
642
- /** Tool-specific configuration */
643
- toolConfig?: Record<string, string | number | boolean>;
644
- /** Timeout in milliseconds */
645
- timeout?: number;
646
- }
647
765
  /**
648
766
  * Base tool interface
649
767
  */
@@ -707,23 +825,6 @@ interface IToolRegistry {
707
825
  */
708
826
  clear(): void;
709
827
  }
710
- /**
711
- * Tool factory interface
712
- */
713
- interface IToolFactory {
714
- /**
715
- * Create function tool from schema and function
716
- */
717
- createFunctionTool(schema: IToolSchema, fn: TToolExecutor): IFunctionTool;
718
- /**
719
- * Create tool from OpenAPI specification
720
- */
721
- createOpenAPITool(config: IOpenAPIToolConfig): ITool;
722
- /**
723
- * Create MCP tool
724
- */
725
- createMCPTool(config: IMCPToolConfig): ITool;
726
- }
727
828
 
728
829
  declare const EXECUTION_EVENT_NAMES: {
729
830
  readonly START: "execution.start";
@@ -864,6 +965,24 @@ interface ILogger {
864
965
  * - Inject a real logger explicitly if you want output.
865
966
  */
866
967
  declare const SilentLogger: ILogger;
968
+ /**
969
+ * Console logger implementation
970
+ * @internal
971
+ */
972
+ declare class ConsoleLogger implements ILogger {
973
+ private level?;
974
+ private packageName;
975
+ private sinkLogger;
976
+ constructor(packageName: string, logger?: ILogger);
977
+ debug(...args: Array<TUniversalValue | TLoggerData | Error>): void;
978
+ info(...args: Array<TUniversalValue | TLoggerData | Error>): void;
979
+ warn(...args: Array<TUniversalValue | TLoggerData | Error>): void;
980
+ error(...args: Array<TUniversalValue | TLoggerData | Error>): void;
981
+ log(...args: Array<TUniversalValue | TLoggerData | Error>): void;
982
+ private getLevel;
983
+ private shouldLog;
984
+ private forward;
985
+ }
867
986
  /**
868
987
  * Create a named logger instance for a package or module.
869
988
  * Use this to create loggers with a specific name prefix for easy log filtering.
@@ -1513,6 +1632,7 @@ interface IAgentConfig {
1513
1632
  responseFormat?: IResponseFormatConfig;
1514
1633
  safetySettings?: ISafetySetting[];
1515
1634
  timeout?: number;
1635
+ maxExecutionRounds?: number;
1516
1636
  retryAttempts?: number;
1517
1637
  rateLimiting?: {
1518
1638
  enabled?: boolean;
@@ -1549,7 +1669,20 @@ interface IRunOptions {
1549
1669
  sessionId?: string;
1550
1670
  userId?: string;
1551
1671
  metadata?: TMetadata;
1672
+ /** AbortSignal for cancelling execution */
1673
+ signal?: AbortSignal;
1674
+ /** Per-run streaming text callback. Prefer this over mutating provider callback state. */
1675
+ onTextDelta?: TTextDeltaCallback;
1676
+ /** Per-run replay event callback for provider/tool execution boundaries. */
1677
+ onExecutionEvent?: TExecutionEventCallback;
1678
+ /**
1679
+ * Maximum model/tool rounds for this run.
1680
+ * Use 0 for no core round cap.
1681
+ */
1682
+ maxExecutionRounds?: number;
1552
1683
  }
1684
+ type TExecutionEventData = Record<string, unknown>;
1685
+ type TExecutionEventCallback = (event: string, data: TExecutionEventData) => void;
1553
1686
  /**
1554
1687
  * Generic agent interface with type parameters for enhanced type safety
1555
1688
  *
@@ -1595,6 +1728,56 @@ interface ISafetySetting {
1595
1728
  [key: string]: TConfigValue;
1596
1729
  }
1597
1730
 
1731
+ interface IProviderConfig$1 {
1732
+ name: string;
1733
+ model: string;
1734
+ apiKey?: string;
1735
+ baseURL?: string;
1736
+ timeout?: number;
1737
+ options?: Record<string, TUniversalValue>;
1738
+ }
1739
+ interface IProviderProfileDefaults {
1740
+ model?: string;
1741
+ apiKey?: string;
1742
+ baseURL?: string;
1743
+ timeout?: number;
1744
+ options?: Record<string, TUniversalValue>;
1745
+ }
1746
+ interface IProviderProfileConfig {
1747
+ type?: string;
1748
+ model?: string;
1749
+ apiKey?: string;
1750
+ baseURL?: string;
1751
+ timeout?: number;
1752
+ options?: Record<string, TUniversalValue>;
1753
+ }
1754
+ interface IProviderProbeResult {
1755
+ ok: boolean;
1756
+ message: string;
1757
+ models?: string[];
1758
+ }
1759
+ type TProviderSetupField = 'baseURL' | 'model' | 'apiKey';
1760
+ interface IProviderSetupStepDefinition {
1761
+ key: TProviderSetupField;
1762
+ title: string;
1763
+ defaultValue?: string;
1764
+ required?: boolean;
1765
+ masked?: boolean;
1766
+ }
1767
+ interface IProviderDefinition {
1768
+ type: string;
1769
+ aliases?: readonly string[];
1770
+ displayName?: string;
1771
+ description?: string;
1772
+ defaults?: IProviderProfileDefaults;
1773
+ setupSteps?: readonly IProviderSetupStepDefinition[];
1774
+ requiresApiKey?: boolean;
1775
+ createProvider: (config: IProviderConfig$1) => IAIProvider;
1776
+ probeProfile?: (profile: IProviderProfileConfig) => Promise<IProviderProbeResult>;
1777
+ }
1778
+ declare function findProviderDefinition(definitions: readonly IProviderDefinition[], type: string): IProviderDefinition | undefined;
1779
+ declare function formatSupportedProviderTypes(definitions: readonly IProviderDefinition[]): string;
1780
+
1598
1781
  /**
1599
1782
  * Provider-agnostic media output reference.
1600
1783
  * Providers must not return raw binary payloads in this contract.
@@ -1818,6 +2001,75 @@ interface IAgentFactory {
1818
2001
  mergeConfig(base: IAgentConfig, override: Partial<IAgentConfig>): IAgentConfig;
1819
2002
  }
1820
2003
 
2004
+ /**
2005
+ * OpenAPI specification configuration
2006
+ */
2007
+ interface IOpenAPIToolConfig {
2008
+ /** OpenAPI 3.0 specification */
2009
+ spec: {
2010
+ openapi: string;
2011
+ info: {
2012
+ title: string;
2013
+ version: string;
2014
+ description?: string;
2015
+ };
2016
+ servers?: Array<{
2017
+ url: string;
2018
+ description?: string;
2019
+ }>;
2020
+ paths: Record<string, Record<string, string | number | boolean | Record<string, string | number | boolean>>>;
2021
+ components?: Record<string, Record<string, string | number | boolean>>;
2022
+ };
2023
+ /** Operation ID from the OpenAPI spec */
2024
+ operationId: string;
2025
+ /** Base URL for API calls */
2026
+ baseURL: string;
2027
+ /** Authentication configuration */
2028
+ auth?: {
2029
+ type: 'bearer' | 'apiKey' | 'basic';
2030
+ token?: string;
2031
+ apiKey?: string;
2032
+ header?: string;
2033
+ username?: string;
2034
+ password?: string;
2035
+ };
2036
+ }
2037
+ /**
2038
+ * MCP (Model Context Protocol) configuration
2039
+ */
2040
+ interface IMCPToolConfig {
2041
+ /** MCP server endpoint */
2042
+ endpoint: string;
2043
+ /** Protocol version */
2044
+ version?: string;
2045
+ /** Authentication configuration */
2046
+ auth?: {
2047
+ type: 'bearer' | 'apiKey';
2048
+ token: string;
2049
+ };
2050
+ /** Tool-specific configuration */
2051
+ toolConfig?: Record<string, string | number | boolean>;
2052
+ /** Timeout in milliseconds */
2053
+ timeout?: number;
2054
+ }
2055
+ /**
2056
+ * Tool factory interface
2057
+ */
2058
+ interface IToolFactory {
2059
+ /**
2060
+ * Create function tool from schema and function
2061
+ */
2062
+ createFunctionTool(schema: IToolSchema, fn: TToolExecutor): IFunctionTool;
2063
+ /**
2064
+ * Create tool from OpenAPI specification
2065
+ */
2066
+ createOpenAPITool(config: IOpenAPIToolConfig): ITool;
2067
+ /**
2068
+ * Create MCP tool
2069
+ */
2070
+ createMCPTool(config: IMCPToolConfig): ITool;
2071
+ }
2072
+
1821
2073
  /**
1822
2074
  * Execution step definition for tools that support step-by-step progress reporting
1823
2075
  */
@@ -2384,72 +2636,13 @@ interface IExecutorAwareProviderConfig {
2384
2636
  [key: string]: string | number | boolean | IExecutor | undefined;
2385
2637
  }
2386
2638
  /**
2387
- * Base AI provider implementation with proper type constraints
2388
- * All AI providers should extend this class
2389
- *
2390
- * ========================================
2391
- * CRITICAL IMPLEMENTATION GUIDELINES
2392
- * ========================================
2393
- *
2394
- * ALL AI PROVIDER IMPLEMENTATIONS (OpenAI, Anthropic, Google, etc.) MUST:
2395
- *
2396
- * 1. EXTEND THIS CLASS:
2397
- * ```typescript
2398
- * export class OpenAIProvider extends AbstractAIProvider {
2399
- * override readonly name = 'openai';
2400
- * override readonly version = '1.0.0';
2401
- * ```
2402
- *
2403
- * 2. USE IMPORTS FROM @robota-sdk/agent-core:
2404
- * ```typescript
2405
- * import { AbstractAIProvider } from '@robota-sdk/agent-core';
2406
- * import type {
2407
- * TUniversalMessage,
2408
- * ChatOptions,
2409
- * IToolCall,
2410
- * ToolSchema,
2411
- * AssistantMessage
2412
- * } from '@robota-sdk/agent-core';
2413
- * ```
2414
- *
2415
- * 3. USE OVERRIDE KEYWORD FOR ALL INHERITED METHODS:
2416
- * - override async chat(...)
2417
- * - override async *chatStream(...)
2418
- * - override supportsTools()
2419
- * - override validateConfig()
2420
- * - override async dispose()
2421
- *
2422
- * 4. DO NOT REDEFINE TYPES THAT EXIST IN @robota-sdk/agent-core:
2423
- * - TUniversalMessage
2424
- * - ChatOptions
2425
- * - IToolCall
2426
- * - ToolSchema
2427
- * - AssistantMessage
2428
- * - SystemMessage
2429
- * - UserMessage
2430
- * - ToolMessage
2639
+ * Base AI provider implementation with proper type constraints.
2640
+ * All AI providers should extend this class.
2431
2641
  *
2432
- * 5. HANDLE MESSAGE CONTENT PROPERLY:
2433
- * - For tool calls: content should be null (not empty string)
2434
- * - For regular messages: content can be string or null
2435
- * - Always preserve null values from API responses
2642
+ * Subclasses MUST: extend this class, use override keyword, call super() in constructor,
2643
+ * not redefine types that exist in agent-core, handle null message content correctly.
2436
2644
  *
2437
- * 6. CALL SUPER() IN CONSTRUCTOR:
2438
- * ```typescript
2439
- * constructor(options: IProviderOptions) {
2440
- * super();
2441
- * // provider-specific initialization
2442
- * }
2443
- * ```
2444
- *
2445
- * This ensures ExecutionService can properly identify providers
2446
- * and prevents type conflicts across the codebase.
2447
- *
2448
- * ========================================
2449
- *
2450
- * @template TConfig - Provider configuration type (defaults to IProviderConfig for type safety)
2451
- * @template TUniversalMessage - Message type (defaults to TUniversalMessage for backward compatibility)
2452
- * @template TResponse - Response type (defaults to TUniversalMessage for backward compatibility)
2645
+ * @template TConfig - Provider configuration type
2453
2646
  */
2454
2647
  declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements IAIProvider {
2455
2648
  abstract readonly name: string;
@@ -2470,6 +2663,15 @@ declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements
2470
2663
  * @returns Promise resolving to a response
2471
2664
  */
2472
2665
  abstract chat(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
2666
+ /**
2667
+ * Wrap an async iterable to yield to the macrotask queue periodically.
2668
+ * Providers MUST use this when iterating over streaming events to ensure
2669
+ * the main thread event loop stays responsive (ESC abort, Ctrl+C, etc.).
2670
+ *
2671
+ * Usage in provider:
2672
+ * for await (const event of this.streamWithAbort(stream, signal)) { ... }
2673
+ */
2674
+ protected streamWithAbort<T>(source: AsyncIterable<T>, signal?: AbortSignal): AsyncGenerator<T>;
2473
2675
  /**
2474
2676
  * Each provider must implement streaming chat using their own native SDK types internally
2475
2677
  * @param messages - Array of messages from conversation history
@@ -2496,30 +2698,24 @@ declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements
2496
2698
  * @returns true if tool calling is supported
2497
2699
  */
2498
2700
  supportsTools(): boolean;
2701
+ getCapabilities(): IProviderCapabilities;
2499
2702
  /**
2500
2703
  * Default implementation - providers can override for specific validation
2501
2704
  * @returns true if configuration is valid
2502
2705
  */
2503
2706
  validateConfig(): boolean;
2504
- /**
2505
- * Utility method for validating TUniversalMessage array
2506
- * @param messages - Messages to validate
2507
- */
2707
+ /** Validate that messages is a non-empty array with valid roles. */
2508
2708
  protected validateMessages(messages: TUniversalMessage[]): void;
2509
- /**
2510
- * Utility method for validating tool schemas
2511
- * @param tools - Tool schemas to validate
2512
- */
2709
+ /** Validate tool schemas. No-ops if tools is undefined. */
2513
2710
  protected validateTools(tools?: IToolSchema[]): void;
2711
+ protected validateNativeWebTools(request?: IProviderNativeWebToolRequest): void;
2514
2712
  /**
2515
2713
  * Execute chat via executor.
2516
- *
2517
2714
  * Subclasses should call this only when an executor is configured.
2518
2715
  */
2519
2716
  protected executeViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
2520
2717
  /**
2521
2718
  * Execute streaming chat via executor.
2522
- *
2523
2719
  * Subclasses should call this only when an executor is configured.
2524
2720
  */
2525
2721
  protected executeStreamViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): AsyncIterable<TUniversalMessage>;
@@ -2636,55 +2832,26 @@ declare abstract class AbstractExecutor implements IExecutor {
2636
2832
  protected validateResponse(response: TUniversalMessage): void;
2637
2833
  }
2638
2834
 
2639
- interface IOpenAIMessage {
2640
- role: 'system' | 'user' | 'assistant' | 'tool';
2641
- content: string | null;
2642
- tool_calls?: {
2643
- id: string;
2644
- type: 'function';
2645
- function: {
2646
- name: string;
2647
- arguments: string;
2648
- };
2649
- }[];
2650
- tool_call_id?: string;
2651
- name?: string;
2652
- }
2653
- interface IAnthropicProviderMessage {
2654
- role: 'user' | 'assistant';
2655
- content: string;
2656
- }
2657
- interface IGoogleProviderMessage {
2658
- role: 'user' | 'model';
2659
- parts: {
2660
- text: string;
2661
- }[];
2662
- }
2663
2835
  /**
2664
- * Provider message format union type
2836
+ * Provider message format type.
2837
+ *
2838
+ * Provider packages own concrete message shapes. Core only carries the generic
2839
+ * conversion hook and never branches on provider names.
2665
2840
  */
2666
- type TProviderMessage = IOpenAIMessage | IAnthropicProviderMessage | IGoogleProviderMessage | TUniversalMessage;
2841
+ type TProviderMessage = TUniversalMessage | IUniversalObjectValue;
2842
+ type TMessageFormatConverter<TMessage extends TProviderMessage = TProviderMessage> = (messages: readonly TUniversalMessage[]) => TMessage[];
2843
+ type TMessageConverterRegistry = Readonly<Record<string, TMessageFormatConverter>>;
2667
2844
  /**
2668
2845
  * Universal message converter utility
2669
- * Handles message format conversion between different providers
2846
+ *
2847
+ * The converter is registry-based so provider-specific message conversion is
2848
+ * injected by provider packages or callers instead of being hardcoded in core.
2670
2849
  */
2671
2850
  declare class MessageConverter {
2672
2851
  /**
2673
- * Convert messages to provider-specific format
2674
- */
2675
- static toProviderFormat(messages: TUniversalMessage[], providerName: string): TProviderMessage[];
2676
- /**
2677
- * Convert to OpenAI format
2852
+ * Convert messages using an injected converter or converter registry.
2678
2853
  */
2679
- private static toOpenAIFormat;
2680
- /**
2681
- * Convert to Anthropic format
2682
- */
2683
- private static toAnthropicFormat;
2684
- /**
2685
- * Convert to Google format
2686
- */
2687
- private static toGoogleFormat;
2854
+ static toProviderFormat(messages: TUniversalMessage[], converter?: TMessageFormatConverter | string, registry?: TMessageConverterRegistry): TProviderMessage[];
2688
2855
  /**
2689
2856
  * Convert to universal format (no conversion)
2690
2857
  */
@@ -2730,7 +2897,7 @@ declare class Validator {
2730
2897
  /**
2731
2898
  * Validate API key format (basic check)
2732
2899
  */
2733
- static validateApiKey(apiKey: string, provider?: string): ISimpleValidationResult;
2900
+ static validateApiKey(apiKey: string): ISimpleValidationResult;
2734
2901
  }
2735
2902
  declare const validateAgentConfig: typeof Validator.validateAgentConfig;
2736
2903
  declare const validateUserInput: typeof Validator.validateUserInput;
@@ -2919,6 +3086,132 @@ declare function stopPeriodicTask(timer: TTimerId | undefined): void;
2919
3086
  */
2920
3087
  type TTimerId = ReturnType<typeof setTimeout>;
2921
3088
 
3089
+ /** Create a user message. */
3090
+ declare function createUserMessage(content: string, options?: {
3091
+ name?: string;
3092
+ metadata?: TUniversalMessageMetadata;
3093
+ parts?: TUniversalMessagePart[];
3094
+ }): IUserMessage;
3095
+ /** Create an assistant message. */
3096
+ declare function createAssistantMessage(content: string | null, options?: {
3097
+ toolCalls?: IToolCall[];
3098
+ metadata?: TUniversalMessageMetadata;
3099
+ parts?: TUniversalMessagePart[];
3100
+ state?: TMessageState;
3101
+ }): IAssistantMessage;
3102
+ /** Create a system message. */
3103
+ declare function createSystemMessage(content: string, options?: {
3104
+ name?: string;
3105
+ metadata?: TUniversalMessageMetadata;
3106
+ parts?: TUniversalMessagePart[];
3107
+ }): ISystemMessage;
3108
+ /** Create a tool message. */
3109
+ declare function createToolMessage(content: string, options: {
3110
+ toolCallId: string;
3111
+ name?: string;
3112
+ metadata?: TUniversalMessageMetadata;
3113
+ parts?: TUniversalMessagePart[];
3114
+ }): IToolMessage;
3115
+
3116
+ /** API message format for provider consumption */
3117
+ interface IProviderApiMessage {
3118
+ role: string;
3119
+ content: string | null;
3120
+ tool_calls?: Array<{
3121
+ id: string;
3122
+ type: 'function';
3123
+ function: {
3124
+ name: string;
3125
+ arguments: string;
3126
+ };
3127
+ }>;
3128
+ tool_call_id?: string;
3129
+ }
3130
+ /**
3131
+ * Conversation store with duplicate prevention and API format conversion.
3132
+ * @public
3133
+ */
3134
+ declare class ConversationStore implements IConversationHistory {
3135
+ private history;
3136
+ private pendingAssistant;
3137
+ constructor(maxMessages?: number);
3138
+ addMessage(message: TUniversalMessage): void;
3139
+ addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3140
+ addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3141
+ addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3142
+ addToolMessage(content: string, toolCallId: string, toolName?: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3143
+ addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3144
+ /** Add a raw history entry (events, etc.) */
3145
+ addEntry(entry: IHistoryEntry): void;
3146
+ /** Get all history entries (universal timeline) */
3147
+ getHistory(): IHistoryEntry[];
3148
+ getMessages(): TUniversalMessage[];
3149
+ getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3150
+ getRecentMessages(count: number): TUniversalMessage[];
3151
+ getMessageCount(): number;
3152
+ /** Begin a new assistant response. Must be called before provider call.
3153
+ * Ensures pendingAssistant exists so commitAssistant always has data to save. */
3154
+ beginAssistant(): void;
3155
+ /** Append streaming text delta to pending assistant response */
3156
+ appendStreaming(delta: string): void;
3157
+ /** Append a tool call to pending assistant response (deduplicates by id) */
3158
+ appendToolCall(toolCall: IToolCall): void;
3159
+ /**
3160
+ * Commit pending assistant response to history.
3161
+ * Precondition: beginAssistant() must have been called before the provider call.
3162
+ * History is append-only — this always adds a message.
3163
+ */
3164
+ commitAssistant(state: TMessageState, metadata?: TUniversalMessageMetadata): void;
3165
+ /** Discard pending assistant response without saving */
3166
+ discardPending(): void;
3167
+ /** Returns true if there is accumulated pending assistant state (streaming or tool calls) */
3168
+ hasPendingAssistant(): boolean;
3169
+ /** Get pending assistant content (empty string if no content streamed yet) */
3170
+ getPendingContent(): string;
3171
+ getMessagesForAPI(): IProviderApiMessage[];
3172
+ clear(): void;
3173
+ }
3174
+
3175
+ /** Interface for managing conversation history. @public */
3176
+ interface IConversationHistory {
3177
+ addMessage(message: TUniversalMessage): void;
3178
+ addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3179
+ addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3180
+ addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3181
+ addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3182
+ addEntry(entry: IHistoryEntry): void;
3183
+ getHistory(): IHistoryEntry[];
3184
+ getMessages(): TUniversalMessage[];
3185
+ getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3186
+ getRecentMessages(count: number): TUniversalMessage[];
3187
+ clear(): void;
3188
+ getMessageCount(): number;
3189
+ }
3190
+ /** Configuration options for ConversationHistory manager */
3191
+ interface IConversationHistoryOptions {
3192
+ maxMessagesPerConversation?: number;
3193
+ maxConversations?: number;
3194
+ }
3195
+ /** Multi-session conversation history manager. @public */
3196
+ declare class ConversationHistory {
3197
+ private conversations;
3198
+ private logger;
3199
+ private readonly maxMessagesPerConversation;
3200
+ private readonly maxConversations;
3201
+ constructor(options?: IConversationHistoryOptions);
3202
+ getConversationStore(conversationId: string): ConversationStore;
3203
+ hasConversation(conversationId: string): boolean;
3204
+ removeConversation(conversationId: string): boolean;
3205
+ clearAll(): void;
3206
+ getStats(): {
3207
+ totalConversations: number;
3208
+ conversationIds: string[];
3209
+ totalMessages: number;
3210
+ };
3211
+ /** @internal */
3212
+ private cleanupOldConversations;
3213
+ }
3214
+
2922
3215
  /**
2923
3216
  * Local executor that directly delegates to AI provider instances
2924
3217
  *
@@ -3047,7 +3340,6 @@ interface IEventEmitterHierarchicalEventData extends IEventEmitterEventData {
3047
3340
  actualResult?: IToolResult;
3048
3341
  };
3049
3342
  }
3050
-
3051
3343
  /** Event emitter configuration */
3052
3344
  interface IEventEmitterPluginOptions extends IPluginOptions {
3053
3345
  events?: TEventName[];
@@ -3104,17 +3396,49 @@ declare class EventEmitterPlugin extends AbstractPlugin<IEventEmitterPluginOptio
3104
3396
  off(eventType: TEventName, handlerIdOrListener: string | TEventEmitterListener): boolean;
3105
3397
  emit(eventType: TEventName, eventData?: Partial<IEventEmitterEventData>): Promise<void>;
3106
3398
  private processEvent;
3107
- private executeHandler;
3108
3399
  flushBuffer(): Promise<void>;
3109
3400
  getStats(): IEventEmitterPluginStats;
3110
3401
  clearAllListeners(): void;
3111
3402
  destroy(): Promise<void>;
3112
- private validateOptions;
3113
3403
  }
3114
3404
 
3405
+ /**
3406
+ * Configuration and tool management delegate for the Robota agent.
3407
+ *
3408
+ * Extracted from robota.ts to keep the main class under 300 lines.
3409
+ */
3410
+
3115
3411
  /** Agent statistics metadata type */
3116
3412
  type TAgentStatsMetadata = Record<string, string | number | boolean | Date | string[]>;
3117
3413
 
3414
+ /** Shared model configuration shape used in setModel / getModel. */
3415
+ type TModelConfig = {
3416
+ provider: string;
3417
+ model: string;
3418
+ temperature?: number;
3419
+ maxTokens?: number;
3420
+ topP?: number;
3421
+ systemMessage?: string;
3422
+ };
3423
+ /** Return shape of getConfiguration(). */
3424
+ type TConfigurationSnapshot = {
3425
+ version: number;
3426
+ tools: Array<{
3427
+ name: string;
3428
+ parameters?: string[];
3429
+ }>;
3430
+ updatedAt: number;
3431
+ };
3432
+ /** Return shape of getModuleStats(). */
3433
+ type TModuleStats = {
3434
+ totalExecutions: number;
3435
+ successfulExecutions: number;
3436
+ failedExecutions: number;
3437
+ averageExecutionTime: number;
3438
+ lastExecutionTime?: Date;
3439
+ } | undefined;
3440
+ /** Shorthand for the plugin contract type used throughout this class. */
3441
+ type TPlugin = IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks;
3118
3442
  /**
3119
3443
  * Core AI agent integrating multiple AI providers, tools, and plugins
3120
3444
  * into a unified conversational interface.
@@ -3144,50 +3468,33 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3144
3468
  private pluginManager;
3145
3469
  private configManager;
3146
3470
  constructor(config: IAgentConfig);
3147
- private initDelegates;
3148
- private emitCreatedEvent;
3149
3471
  run(input: string, options?: IRunOptions): Promise<string>;
3150
3472
  runStream(input: string, options?: IRunOptions): AsyncGenerator<string, void, undefined>;
3151
3473
  private executionDeps;
3152
3474
  getHistory(): TUniversalMessage[];
3475
+ getFullHistory(): IHistoryEntry[];
3476
+ addHistoryEntry(entry: IHistoryEntry): void;
3153
3477
  clearHistory(): void;
3478
+ injectMessage(role: 'user' | 'assistant' | 'system' | 'tool', content: string, options?: {
3479
+ toolCallId?: string;
3480
+ name?: string;
3481
+ }): void;
3154
3482
  updateTools(next: Array<IToolWithEventService>): Promise<{
3155
3483
  version: number;
3156
3484
  }>;
3157
3485
  updateConfiguration(patch: Partial<IAgentConfig>): Promise<{
3158
3486
  version: number;
3159
3487
  }>;
3160
- getConfiguration(): Promise<{
3161
- version: number;
3162
- tools: Array<{
3163
- name: string;
3164
- parameters?: string[];
3165
- }>;
3166
- updatedAt: number;
3167
- }>;
3168
- setModel(mc: {
3169
- provider: string;
3170
- model: string;
3171
- temperature?: number;
3172
- maxTokens?: number;
3173
- topP?: number;
3174
- systemMessage?: string;
3175
- }): void;
3176
- getModel(): {
3177
- provider: string;
3178
- model: string;
3179
- temperature?: number;
3180
- maxTokens?: number;
3181
- topP?: number;
3182
- systemMessage?: string;
3183
- };
3488
+ getConfiguration(): Promise<TConfigurationSnapshot>;
3489
+ setModel(mc: TModelConfig): void;
3490
+ getModel(): TModelConfig;
3184
3491
  registerTool(tool: AbstractTool): void;
3185
3492
  unregisterTool(toolName: string): void;
3186
3493
  getConfig(): IAgentConfig;
3187
- addPlugin(plugin: IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks): void;
3494
+ addPlugin(plugin: TPlugin): void;
3188
3495
  removePlugin(pluginName: string): boolean;
3189
- getPlugin(pluginName: string): (IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks) | undefined;
3190
- getPlugins(): Array<IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks>;
3496
+ getPlugin(pluginName: string): TPlugin | undefined;
3497
+ getPlugins(): TPlugin[];
3191
3498
  getPluginNames(): string[];
3192
3499
  registerModule(module: IModule, options?: {
3193
3500
  autoInitialize?: boolean;
@@ -3210,13 +3517,7 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3210
3517
  error?: Error;
3211
3518
  duration?: number;
3212
3519
  }>;
3213
- getModuleStats(moduleName: string): {
3214
- totalExecutions: number;
3215
- successfulExecutions: number;
3216
- failedExecutions: number;
3217
- averageExecutionTime: number;
3218
- lastExecutionTime?: Date;
3219
- } | undefined;
3520
+ getModuleStats(moduleName: string): TModuleStats;
3220
3521
  getStats(): {
3221
3522
  name: string;
3222
3523
  version: string;
@@ -3235,7 +3536,6 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3235
3536
  private ensureFullyInitialized;
3236
3537
  private doAsyncInit;
3237
3538
  private emitAgentEvent;
3238
- private buildOwnerPath;
3239
3539
  }
3240
3540
 
3241
3541
  /**
@@ -3356,6 +3656,7 @@ interface IAgentLifecycleEvents {
3356
3656
  /** Called when agent is destroyed */
3357
3657
  onDestroy?: (agentId: string) => Promise<void> | void;
3358
3658
  }
3659
+
3359
3660
  /**
3360
3661
  * Agent Factory for creating and managing agents
3361
3662
  * Instance-based for isolated agent factory management
@@ -3429,97 +3730,18 @@ declare class AgentFactory {
3429
3730
  isValid: boolean;
3430
3731
  errors: string[];
3431
3732
  };
3432
- /**
3433
- * Apply default configuration values
3434
- */
3435
- private applyDefaults;
3436
- /**
3437
- * Generate unique agent ID
3438
- */
3439
- private generateAgentId;
3440
- /**
3441
- * Update creation statistics
3442
- */
3443
- private updateCreationStats;
3444
- }
3445
-
3446
- /**
3447
- * Conversation session implementations.
3448
- *
3449
- * Extracted from conversation-history-manager.ts.
3450
- */
3451
-
3452
- /** API message format for provider consumption */
3453
- interface IProviderApiMessage {
3454
- role: string;
3455
- content: string | null;
3456
- tool_calls?: Array<{
3457
- id: string;
3458
- type: 'function';
3459
- function: {
3460
- name: string;
3461
- arguments: string;
3462
- };
3463
- }>;
3464
- tool_call_id?: string;
3465
- }
3466
- /**
3467
- * Conversation session with duplicate prevention and API format conversion.
3468
- * @public
3469
- */
3470
- declare class ConversationSession implements IConversationHistory {
3471
- private history;
3472
- private toolCallIds;
3473
- constructor(maxMessages?: number);
3474
- addMessage(message: TUniversalMessage): void;
3475
- addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3476
- addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3477
- addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3478
- addToolMessage(content: string, toolCallId: string, toolName?: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3479
- addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3480
- getMessages(): TUniversalMessage[];
3481
- getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3482
- getRecentMessages(count: number): TUniversalMessage[];
3483
- getMessageCount(): number;
3484
- getMessagesForAPI(): IProviderApiMessage[];
3485
- clear(): void;
3486
3733
  }
3487
3734
 
3488
- /** Interface for managing conversation history. @public */
3489
- interface IConversationHistory {
3490
- addMessage(message: TUniversalMessage): void;
3491
- addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3492
- addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3493
- addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3494
- addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3495
- getMessages(): TUniversalMessage[];
3496
- getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3497
- getRecentMessages(count: number): TUniversalMessage[];
3498
- clear(): void;
3499
- getMessageCount(): number;
3500
- }
3501
- /** Configuration options for ConversationHistory manager */
3502
- interface IConversationHistoryOptions {
3503
- maxMessagesPerConversation?: number;
3504
- maxConversations?: number;
3505
- }
3506
- /** Multi-session conversation history manager. @public */
3507
- declare class ConversationHistory {
3508
- private conversations;
3509
- private logger;
3510
- private readonly maxMessagesPerConversation;
3511
- private readonly maxConversations;
3512
- constructor(options?: IConversationHistoryOptions);
3513
- getConversationSession(conversationId: string): ConversationSession;
3514
- hasConversation(conversationId: string): boolean;
3515
- removeConversation(conversationId: string): boolean;
3516
- clearAll(): void;
3517
- getStats(): {
3518
- totalConversations: number;
3519
- conversationIds: string[];
3520
- totalMessages: number;
3735
+ interface IAssistantUsageMetadata {
3736
+ inputTokens: number;
3737
+ outputTokens: number;
3738
+ usage: {
3739
+ totalTokens: number;
3740
+ inputTokens: number;
3741
+ outputTokens: number;
3521
3742
  };
3522
3743
  }
3744
+ declare function collectAssistantUsageMetadata(message: TUniversalMessage): IAssistantUsageMetadata | undefined;
3523
3745
 
3524
3746
  declare class EventHistoryModule implements IEventHistoryModule {
3525
3747
  private readonly store;
@@ -3997,11 +4219,13 @@ interface IExecutionProxyConfig {
3997
4219
  task?: boolean;
3998
4220
  };
3999
4221
  }
4222
+ /** Internal target shape for proxy interception */
4223
+ type TExecutionProxyTarget = Record<string, TUniversalValue>;
4224
+ /** Internal args shape for proxy interception */
4225
+ type TExecutionProxyArgs = TUniversalValue[];
4000
4226
  /**
4001
4227
  * Metadata extractor function type
4002
4228
  */
4003
- type TExecutionProxyTarget = Record<string, TUniversalValue>;
4004
- type TExecutionProxyArgs = TUniversalValue[];
4005
4229
  type TMetadataExtractor = (target: TExecutionProxyTarget, methodName: string, args: TExecutionProxyArgs) => Record<string, TUniversalValue>;
4006
4230
  /**
4007
4231
  * Method configuration for proxy
@@ -4013,6 +4237,7 @@ interface IMethodConfig {
4013
4237
  extractMetadata?: TMetadataExtractor;
4014
4238
  extractResult?: (result: TUniversalValue) => Record<string, TUniversalValue>;
4015
4239
  }
4240
+
4016
4241
  /**
4017
4242
  * ExecutionProxy - Automatic event emission using Proxy pattern
4018
4243
  *
@@ -4129,7 +4354,7 @@ declare function evaluatePermission(toolName: string, toolArgs: TToolArgs, mode:
4129
4354
  * Permission mode definitions for Robota CLI
4130
4355
  *
4131
4356
  * Matches Claude Code-compatible permission modes:
4132
- * - plan: read-only tools only (Read, Glob, Grep auto; Write, Edit, Bash denied)
4357
+ * - plan: read-only tools only (Read, Glob, Grep, WebFetch, WebSearch auto; Write, Edit, Bash denied)
4133
4358
  * - default: safe reads auto, writes and bash need approval
4134
4359
  * - acceptEdits: reads + writes auto, bash needs approval
4135
4360
  * - bypassPermissions: all tools auto
@@ -4138,7 +4363,7 @@ declare function evaluatePermission(toolName: string, toolArgs: TToolArgs, mode:
4138
4363
  /**
4139
4364
  * Tool names known to the permission system
4140
4365
  */
4141
- type TKnownToolName = 'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep';
4366
+ type TKnownToolName = 'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'WebFetch' | 'WebSearch';
4142
4367
  /**
4143
4368
  * Permission mode → tool policy matrix
4144
4369
  * Maps each mode to a decision for each known tool.
@@ -4175,22 +4400,78 @@ interface IContextWindowState {
4175
4400
  remainingPercentage: number;
4176
4401
  }
4177
4402
 
4403
+ /**
4404
+ * Claude model definitions — SSOT for model metadata.
4405
+ * Source: https://platform.claude.com/docs/en/about-claude/models/overview
4406
+ */
4407
+ interface IModelDefinition {
4408
+ /** Human-readable model name */
4409
+ name: string;
4410
+ /** API model identifier */
4411
+ id: string;
4412
+ /** Context window size in tokens */
4413
+ contextWindow: number;
4414
+ /** Maximum output tokens */
4415
+ maxOutput: number;
4416
+ }
4417
+ /**
4418
+ * Known Claude models (4.5+).
4419
+ * Keyed by API model ID for fast lookup.
4420
+ */
4421
+ declare const CLAUDE_MODELS: Record<string, IModelDefinition>;
4422
+ declare const DEFAULT_CONTEXT_WINDOW = 200000;
4423
+ /** Get context window size for a model ID. Falls back to DEFAULT_CONTEXT_WINDOW. */
4424
+ declare function getModelContextWindow(modelId: string): number;
4425
+ declare const DEFAULT_MAX_OUTPUT = 16384;
4426
+ /** Get max output tokens for a model ID. Falls back to DEFAULT_MAX_OUTPUT. */
4427
+ declare function getModelMaxOutput(modelId: string): number;
4428
+ /** Get human-readable model name for a model ID. Falls back to the ID itself. */
4429
+ declare function getModelName(modelId: string): string;
4430
+ /** Format token count as human-readable (e.g., 200K, 1M, 1.2M). Minimum unit is K. */
4431
+ declare function formatTokenCount(tokens: number): string;
4432
+
4178
4433
  /**
4179
4434
  * Hook system types — Claude Code compatible event/hook model.
4180
4435
  */
4181
4436
  /** Hook lifecycle events */
4182
- type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'Stop' | 'PreCompact' | 'PostCompact';
4183
- /** A single hook definition */
4184
- interface IHookDefinition {
4185
- /** Shell command to execute */
4437
+ type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit' | 'SubagentStart' | 'SubagentStop' | 'WorktreeCreate' | 'WorktreeRemove';
4438
+ /** Claude Code compatible session end reasons. */
4439
+ type TSessionEndReason = 'clear' | 'resume' | 'logout' | 'prompt_input_exit' | 'bypass_permissions_disabled' | 'other';
4440
+ /** Command hook executes a shell command */
4441
+ interface ICommandHookDefinition {
4186
4442
  type: 'command';
4187
4443
  command: string;
4444
+ timeout?: number;
4445
+ }
4446
+ /** HTTP hook — sends an HTTP request */
4447
+ interface IHttpHookDefinition {
4448
+ type: 'http';
4449
+ url: string;
4450
+ headers?: Record<string, string>;
4451
+ timeout?: number;
4188
4452
  }
4453
+ /** Prompt hook — evaluates a prompt via an AI model */
4454
+ interface IPromptHookDefinition {
4455
+ type: 'prompt';
4456
+ prompt: string;
4457
+ model?: string;
4458
+ }
4459
+ /** Agent hook — delegates to a sub-agent */
4460
+ interface IAgentHookDefinition {
4461
+ type: 'agent';
4462
+ agent: string;
4463
+ maxTurns?: number;
4464
+ timeout?: number;
4465
+ }
4466
+ /** Discriminated union of all hook definition types */
4467
+ type IHookDefinition = ICommandHookDefinition | IHttpHookDefinition | IPromptHookDefinition | IAgentHookDefinition;
4189
4468
  /** A hook group — matcher + array of hook definitions */
4190
4469
  interface IHookGroup {
4191
4470
  /** Regex pattern to match tool name (empty string = match all) */
4192
4471
  matcher: string;
4193
4472
  hooks: IHookDefinition[];
4473
+ /** Environment variables injected into hook child processes for this group */
4474
+ env?: Record<string, string>;
4194
4475
  }
4195
4476
  /** Complete hooks configuration: event → array of hook groups */
4196
4477
  type THooksConfig = Partial<Record<THookEvent, IHookGroup[]>>;
@@ -4206,6 +4487,28 @@ interface IHookInput {
4206
4487
  trigger?: 'auto' | 'manual';
4207
4488
  /** Compaction summary text (PostCompact only) */
4208
4489
  compact_summary?: string;
4490
+ /** User message text (UserPromptSubmit only) */
4491
+ user_message?: string;
4492
+ /** User prompt text — Claude Code compatible alias for user_message (UserPromptSubmit only) */
4493
+ prompt?: string;
4494
+ /** Assistant response text (Stop only) */
4495
+ response?: string;
4496
+ /** Last assistant message text (StopFailure only) */
4497
+ last_assistant_message?: string;
4498
+ /** Stop hook recursion guard (Stop/StopFailure only) */
4499
+ stop_hook_active?: boolean;
4500
+ /** Session end reason (SessionEnd only) */
4501
+ reason?: TSessionEndReason | string;
4502
+ /** Session transcript path when available (SessionEnd/SubagentStop only) */
4503
+ transcript_path?: string;
4504
+ /** Subagent identifier (SubagentStart/SubagentStop only) */
4505
+ agent_id?: string;
4506
+ /** Subagent type/name (SubagentStart/SubagentStop only) */
4507
+ agent_type?: string;
4508
+ /** Subagent transcript path when available (SubagentStop only) */
4509
+ agent_transcript_path?: string;
4510
+ /** Additional environment variables to pass to hook child processes */
4511
+ env?: Record<string, string>;
4209
4512
  }
4210
4513
  /** Hook execution result */
4211
4514
  interface IHookResult {
@@ -4214,11 +4517,21 @@ interface IHookResult {
4214
4517
  stdout: string;
4215
4518
  stderr: string;
4216
4519
  }
4520
+ /** Strategy interface for hook type executors */
4521
+ interface IHookTypeExecutor {
4522
+ /** The hook type this executor handles */
4523
+ type: IHookDefinition['type'];
4524
+ /** Execute a hook definition with the given input */
4525
+ execute(definition: IHookDefinition, input: IHookInput): Promise<IHookResult>;
4526
+ }
4217
4527
 
4218
4528
  /**
4219
- * Hook runner — executes shell command hooks for lifecycle events.
4529
+ * Hook runner — executes hooks for lifecycle events using the strategy pattern.
4530
+ *
4531
+ * Dispatches to registered IHookTypeExecutor implementations by definition type.
4532
+ * Default executors: CommandExecutor (shell), HttpExecutor (HTTP POST).
4220
4533
  *
4221
- * Hooks receive JSON input on stdin and communicate results via exit codes:
4534
+ * Exit code semantics:
4222
4535
  * - 0: allow/proceed
4223
4536
  * - 2: block/deny (stderr contains reason)
4224
4537
  * - other: proceed (logged as warning)
@@ -4229,10 +4542,19 @@ interface IHookResult {
4229
4542
  *
4230
4543
  * For PreToolUse: if any hook returns exit code 2, the tool call is blocked.
4231
4544
  * Returns { blocked: true, reason: string } if blocked, { blocked: false } otherwise.
4545
+ *
4546
+ * @param config - Hooks configuration mapping events to hook groups
4547
+ * @param event - The lifecycle event being fired
4548
+ * @param input - Hook input data passed to executors
4549
+ * @param executors - Optional array of hook type executors (defaults to command + http)
4232
4550
  */
4233
- declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput): Promise<{
4551
+ /** Result of running hooks for an event. */
4552
+ interface IRunHooksResult {
4234
4553
  blocked: boolean;
4235
4554
  reason?: string;
4236
- }>;
4555
+ /** Collected stdout from all successful hooks (exit code 0). */
4556
+ stdout: string;
4557
+ }
4558
+ declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
4237
4559
 
4238
- export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConversationHistory, ConversationSession, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IProviderConfig, type IProviderMediaError, type IProviderOptions, type IProviderRequest, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventListener, type TEventName, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderOptionValueBase, TRUST_TO_MODE, type TResponseMetadata, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUtilLogLevel, ToolExecutionError, UNKNOWN_TOOL_FALLBACK, ValidationError, ValidationSeverity, Validator, createExecutionProxy, createLogger, evaluatePermission, getGlobalLogLevel, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };
4560
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConsoleLogger, ConversationHistory, ConversationStore, DEFAULT_ABSTRACT_EVENT_SERVICE, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT, DefaultEventService, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentHookDefinition, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IAssistantUsageMetadata, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type ICommandHookDefinition, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventObjectValue, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHistoryEntry, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IHookTypeExecutor, type IHttpHookDefinition, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IModelDefinition, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IPromptHookDefinition, type IProviderCapabilities, type IProviderConfig$1 as IProviderConfig, type IProviderDefinition, type IProviderFunctionCallingCapability, type IProviderMediaError, type IProviderNativeWebToolCapabilities, type IProviderNativeWebToolCapability, type IProviderNativeWebToolRequest, type IProviderOptions, type IProviderProbeResult, type IProviderProfileConfig, type IProviderProfileDefaults, type IProviderRequest, type IProviderSetupStepDefinition, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, ObservableEventService, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, StructuredEventService, TASK_EVENTS, TASK_EVENT_PREFIX, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventExtensionValue, type TEventListener, type TEventLoggerData, type TEventName, type TEventUniversalValue, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMessageConverterRegistry, type TMessageFormatConverter, type TMessageState, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderMessage, type TProviderOptionValueBase, type TProviderSetupField, TRUST_TO_MODE, type TResponseMetadata, type TSessionEndReason, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUserEvent, type TUtilLogLevel, ToolExecutionError, TypeUtils, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, assertProviderNativeWebToolsAvailable, bindEventServiceOwner, bindWithOwnerPath, chatEntryToMessage, collectAssistantUsageMetadata, composeEventName, createAssistantMessage, createDefaultProviderCapabilities, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, findProviderDefinition, formatSupportedProviderTypes, formatTokenCount, getGlobalLogLevel, getMessagesForAPI, getModelContextWindow, getModelMaxOutput, getModelName, getProviderCapabilities, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isChatEntry, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, messageToHistoryEntry, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };