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

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 +89 -0
  2. package/README.md +40 -11
  3. package/dist/browser/index.d.ts +722 -324
  4. package/dist/browser/index.js +10 -4
  5. package/dist/node/index.cjs +10 -4
  6. package/dist/node/index.d.cts +722 -324
  7. package/dist/node/index.d.ts +722 -324
  8. package/dist/node/index.js +10 -4
  9. package/package.json +6 -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
  /**
@@ -283,6 +367,17 @@ interface IProviderSpecificOptions {
283
367
  * Called for each text chunk as the model generates output.
284
368
  */
285
369
  type TTextDeltaCallback = (delta: string) => void;
370
+ type TProviderNativeRawPayloadKind = 'request' | 'response' | 'stream_event';
371
+ type TProviderNativeRawPayload = string | number | boolean | object | null | undefined;
372
+ interface IProviderNativeRawPayloadEvent {
373
+ provider: string;
374
+ apiSurface?: string;
375
+ payloadKind: TProviderNativeRawPayloadKind;
376
+ payload: TProviderNativeRawPayload;
377
+ sequence?: number;
378
+ metadata?: Record<string, TProviderConfigValue>;
379
+ }
380
+ type TProviderNativeRawPayloadCallback = (event: IProviderNativeRawPayloadEvent) => void;
286
381
  /**
287
382
  * Options for AI provider chat requests
288
383
  */
@@ -299,6 +394,12 @@ interface IChatOptions extends IProviderSpecificOptions {
299
394
  * should use streaming internally and call this for each text chunk,
300
395
  * while still returning the complete assembled message. */
301
396
  onTextDelta?: TTextDeltaCallback;
397
+ /** Callback for provider-owned native SDK request/response/stream payload capture. */
398
+ onProviderNativeRawPayload?: TProviderNativeRawPayloadCallback;
399
+ /** AbortSignal for cancelling the provider call */
400
+ signal?: AbortSignal;
401
+ /** Provider-native hosted web tools requested for this call */
402
+ nativeWebTools?: IProviderNativeWebToolRequest;
302
403
  }
303
404
  /**
304
405
  * Provider-agnostic AI Provider interface
@@ -340,6 +441,15 @@ interface IAIProvider {
340
441
  * @returns true if tool calling is supported
341
442
  */
342
443
  supportsTools(): boolean;
444
+ /**
445
+ * Report provider-neutral capability state.
446
+ * Providers without native web support can omit this and use default capability helpers.
447
+ */
448
+ getCapabilities?(): IProviderCapabilities;
449
+ /**
450
+ * Optional generic hook for enabling provider-native hosted web behavior.
451
+ */
452
+ configureNativeWebTools?(request: IProviderNativeWebToolRequest): IProviderCapabilities;
343
453
  /**
344
454
  * Validate provider configuration
345
455
  * @returns true if configuration is valid
@@ -481,6 +591,78 @@ interface IEventServiceOwnerBinding {
481
591
  ownerPath: IOwnerPathSegment[];
482
592
  }
483
593
 
594
+ /**
595
+ * Abstract base for event services.
596
+ * Concrete implementations decide how events are delivered.
597
+ */
598
+ declare abstract class AbstractEventService implements IEventService {
599
+ private listeners;
600
+ abstract emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
601
+ subscribe(listener: TEventListener): void;
602
+ unsubscribe(listener: TEventListener): void;
603
+ protected notifyListeners(eventType: string, data: IBaseEventData, context?: IEventContext): void;
604
+ }
605
+ /**
606
+ * Default no-op event service (production-safe).
607
+ * When injected, emit() intentionally does nothing.
608
+ */
609
+ declare class DefaultEventService extends AbstractEventService {
610
+ emit(_eventType: string, _data: IBaseEventData, _context?: IEventContext): void;
611
+ }
612
+ /**
613
+ * Singleton default event service instance.
614
+ */
615
+ declare const DEFAULT_ABSTRACT_EVENT_SERVICE: IEventService;
616
+ /**
617
+ * Check if a given service is the default no-op implementation.
618
+ */
619
+ declare function isDefaultEventService(service: IEventService): boolean;
620
+ /**
621
+ * Compose a full event name from owner prefix and local name.
622
+ * Local names must not contain dots.
623
+ */
624
+ declare function composeEventName(ownerType: string, localName: string): string;
625
+ /**
626
+ * A scoped event service that always emits with an owner binding applied.
627
+ */
628
+ declare class StructuredEventService extends AbstractEventService {
629
+ private readonly base;
630
+ private readonly binding;
631
+ constructor(base: IEventService, binding: IEventServiceOwnerBinding);
632
+ emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
633
+ subscribe(listener: TEventListener): void;
634
+ unsubscribe(listener: TEventListener): void;
635
+ }
636
+ /**
637
+ * Bind an EventService to an explicit owner path.
638
+ * This is the standard entry point for scoped emission (path-only architecture).
639
+ */
640
+ declare function bindWithOwnerPath(base: IEventService, binding: IEventServiceOwnerBinding): IEventService;
641
+ /**
642
+ * Alias for bindWithOwnerPath for historical call sites.
643
+ * Intentionally forwards to the single authoritative implementation.
644
+ */
645
+ declare function bindEventServiceOwner(base: IEventService, binding: IEventServiceOwnerBinding): IEventService;
646
+ /**
647
+ * Observable EventService that notifies subscribed listeners.
648
+ */
649
+ declare class ObservableEventService extends AbstractEventService {
650
+ emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
651
+ }
652
+
653
+ declare const TASK_EVENTS: {
654
+ readonly ASSIGNED: "assigned";
655
+ readonly COMPLETED: "completed";
656
+ };
657
+ declare const TASK_EVENT_PREFIX: "task";
658
+
659
+ declare const USER_EVENTS: {
660
+ readonly MESSAGE: "message";
661
+ readonly INPUT: "input";
662
+ };
663
+ declare const USER_EVENT_PREFIX: "user";
664
+ type TUserEvent = (typeof USER_EVENTS)[keyof typeof USER_EVENTS];
665
+
484
666
  type TToolContextExtensionValue = TUniversalValue | Date | Error | TLoggerData | TContextData | TToolParameters | TToolMetadata;
485
667
  /**
486
668
  * Tool metadata structure - specific type definition
@@ -593,57 +775,6 @@ interface IParameterValidationResult {
593
775
  * Generic tool executor function
594
776
  */
595
777
  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
778
  /**
648
779
  * Base tool interface
649
780
  */
@@ -707,23 +838,6 @@ interface IToolRegistry {
707
838
  */
708
839
  clear(): void;
709
840
  }
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
841
 
728
842
  declare const EXECUTION_EVENT_NAMES: {
729
843
  readonly START: "execution.start";
@@ -864,6 +978,24 @@ interface ILogger {
864
978
  * - Inject a real logger explicitly if you want output.
865
979
  */
866
980
  declare const SilentLogger: ILogger;
981
+ /**
982
+ * Console logger implementation
983
+ * @internal
984
+ */
985
+ declare class ConsoleLogger implements ILogger {
986
+ private level?;
987
+ private packageName;
988
+ private sinkLogger;
989
+ constructor(packageName: string, logger?: ILogger);
990
+ debug(...args: Array<TUniversalValue | TLoggerData | Error>): void;
991
+ info(...args: Array<TUniversalValue | TLoggerData | Error>): void;
992
+ warn(...args: Array<TUniversalValue | TLoggerData | Error>): void;
993
+ error(...args: Array<TUniversalValue | TLoggerData | Error>): void;
994
+ log(...args: Array<TUniversalValue | TLoggerData | Error>): void;
995
+ private getLevel;
996
+ private shouldLog;
997
+ private forward;
998
+ }
867
999
  /**
868
1000
  * Create a named logger instance for a package or module.
869
1001
  * Use this to create loggers with a specific name prefix for easy log filtering.
@@ -1513,6 +1645,7 @@ interface IAgentConfig {
1513
1645
  responseFormat?: IResponseFormatConfig;
1514
1646
  safetySettings?: ISafetySetting[];
1515
1647
  timeout?: number;
1648
+ maxExecutionRounds?: number;
1516
1649
  retryAttempts?: number;
1517
1650
  rateLimiting?: {
1518
1651
  enabled?: boolean;
@@ -1549,7 +1682,20 @@ interface IRunOptions {
1549
1682
  sessionId?: string;
1550
1683
  userId?: string;
1551
1684
  metadata?: TMetadata;
1685
+ /** AbortSignal for cancelling execution */
1686
+ signal?: AbortSignal;
1687
+ /** Per-run streaming text callback. Prefer this over mutating provider callback state. */
1688
+ onTextDelta?: TTextDeltaCallback;
1689
+ /** Per-run replay event callback for provider/tool execution boundaries. */
1690
+ onExecutionEvent?: TExecutionEventCallback;
1691
+ /**
1692
+ * Maximum model/tool rounds for this run.
1693
+ * Use 0 for no core round cap.
1694
+ */
1695
+ maxExecutionRounds?: number;
1552
1696
  }
1697
+ type TExecutionEventData = Record<string, unknown>;
1698
+ type TExecutionEventCallback = (event: string, data: TExecutionEventData) => void;
1553
1699
  /**
1554
1700
  * Generic agent interface with type parameters for enhanced type safety
1555
1701
  *
@@ -1595,6 +1741,97 @@ interface ISafetySetting {
1595
1741
  [key: string]: TConfigValue;
1596
1742
  }
1597
1743
 
1744
+ interface IProviderConfig$1 {
1745
+ name: string;
1746
+ model: string;
1747
+ apiKey?: string;
1748
+ baseURL?: string;
1749
+ timeout?: number;
1750
+ options?: Record<string, TUniversalValue>;
1751
+ }
1752
+ interface IProviderProfileDefaults {
1753
+ model?: string;
1754
+ apiKey?: string;
1755
+ baseURL?: string;
1756
+ timeout?: number;
1757
+ options?: Record<string, TUniversalValue>;
1758
+ }
1759
+ interface IProviderProfileConfig {
1760
+ type?: string;
1761
+ model?: string;
1762
+ apiKey?: string;
1763
+ baseURL?: string;
1764
+ timeout?: number;
1765
+ options?: Record<string, TUniversalValue>;
1766
+ }
1767
+ interface IProviderProbeResult {
1768
+ ok: boolean;
1769
+ message: string;
1770
+ models?: string[];
1771
+ }
1772
+ type TProviderCredentialField = 'apiKey';
1773
+ type TProviderSetupField = 'baseURL' | 'model' | TProviderCredentialField;
1774
+ type TProviderSetupHelpLinkKind = 'api-key' | 'console' | 'official';
1775
+ interface IProviderCredentialRequirement {
1776
+ anyOf: readonly TProviderCredentialField[];
1777
+ }
1778
+ interface IProviderSetupHelpLink {
1779
+ kind: TProviderSetupHelpLinkKind;
1780
+ label: string;
1781
+ url: string;
1782
+ sourceUrl?: string;
1783
+ lastVerifiedAt?: string;
1784
+ }
1785
+ type TProviderModelCatalogStatus = 'live' | 'generated' | 'fallback' | 'unavailable';
1786
+ type TProviderModelLifecycle = 'active' | 'preview' | 'deprecated' | 'unavailable';
1787
+ type TProviderModelCapability = 'tools' | 'vision' | 'json_schema' | 'reasoning' | 'native_web' | 'streaming';
1788
+ interface IProviderModelCatalogEntry {
1789
+ id: string;
1790
+ displayName: string;
1791
+ aliases?: readonly string[];
1792
+ contextWindow?: number;
1793
+ capabilities?: readonly TProviderModelCapability[];
1794
+ lifecycle?: TProviderModelLifecycle;
1795
+ lastVerifiedAt?: string;
1796
+ sourceUrl?: string;
1797
+ }
1798
+ interface IProviderModelCatalog {
1799
+ status: TProviderModelCatalogStatus;
1800
+ entries?: readonly IProviderModelCatalogEntry[];
1801
+ lastVerifiedAt?: string;
1802
+ sourceUrl?: string;
1803
+ message?: string;
1804
+ }
1805
+ interface IProviderModelCatalogRefreshOptions {
1806
+ profile: IProviderProfileConfig;
1807
+ }
1808
+ type TProviderModelCatalogRefresh = (options: IProviderModelCatalogRefreshOptions) => Promise<IProviderModelCatalog>;
1809
+ interface IProviderSetupStepDefinition {
1810
+ key: TProviderSetupField;
1811
+ title: string;
1812
+ defaultValue?: string;
1813
+ required?: boolean;
1814
+ masked?: boolean;
1815
+ }
1816
+ interface IProviderDefinition {
1817
+ type: string;
1818
+ aliases?: readonly string[];
1819
+ displayName?: string;
1820
+ description?: string;
1821
+ defaults?: IProviderProfileDefaults;
1822
+ modelCatalog?: IProviderModelCatalog;
1823
+ refreshModelCatalog?: TProviderModelCatalogRefresh;
1824
+ setupHelpLinks?: readonly IProviderSetupHelpLink[];
1825
+ setupSteps?: readonly IProviderSetupStepDefinition[];
1826
+ credentialRequirement?: IProviderCredentialRequirement;
1827
+ requiresApiKey?: boolean;
1828
+ createProvider: (config: IProviderConfig$1) => IAIProvider;
1829
+ probeProfile?: (profile: IProviderProfileConfig) => Promise<IProviderProbeResult>;
1830
+ }
1831
+ declare function findProviderDefinition(definitions: readonly IProviderDefinition[], type: string): IProviderDefinition | undefined;
1832
+ declare function formatSupportedProviderTypes(definitions: readonly IProviderDefinition[]): string;
1833
+ declare function getProviderCredentialRequirement(definition: IProviderDefinition | undefined): IProviderCredentialRequirement | undefined;
1834
+
1598
1835
  /**
1599
1836
  * Provider-agnostic media output reference.
1600
1837
  * Providers must not return raw binary payloads in this contract.
@@ -1818,6 +2055,75 @@ interface IAgentFactory {
1818
2055
  mergeConfig(base: IAgentConfig, override: Partial<IAgentConfig>): IAgentConfig;
1819
2056
  }
1820
2057
 
2058
+ /**
2059
+ * OpenAPI specification configuration
2060
+ */
2061
+ interface IOpenAPIToolConfig {
2062
+ /** OpenAPI 3.0 specification */
2063
+ spec: {
2064
+ openapi: string;
2065
+ info: {
2066
+ title: string;
2067
+ version: string;
2068
+ description?: string;
2069
+ };
2070
+ servers?: Array<{
2071
+ url: string;
2072
+ description?: string;
2073
+ }>;
2074
+ paths: Record<string, Record<string, string | number | boolean | Record<string, string | number | boolean>>>;
2075
+ components?: Record<string, Record<string, string | number | boolean>>;
2076
+ };
2077
+ /** Operation ID from the OpenAPI spec */
2078
+ operationId: string;
2079
+ /** Base URL for API calls */
2080
+ baseURL: string;
2081
+ /** Authentication configuration */
2082
+ auth?: {
2083
+ type: 'bearer' | 'apiKey' | 'basic';
2084
+ token?: string;
2085
+ apiKey?: string;
2086
+ header?: string;
2087
+ username?: string;
2088
+ password?: string;
2089
+ };
2090
+ }
2091
+ /**
2092
+ * MCP (Model Context Protocol) configuration
2093
+ */
2094
+ interface IMCPToolConfig {
2095
+ /** MCP server endpoint */
2096
+ endpoint: string;
2097
+ /** Protocol version */
2098
+ version?: string;
2099
+ /** Authentication configuration */
2100
+ auth?: {
2101
+ type: 'bearer' | 'apiKey';
2102
+ token: string;
2103
+ };
2104
+ /** Tool-specific configuration */
2105
+ toolConfig?: Record<string, string | number | boolean>;
2106
+ /** Timeout in milliseconds */
2107
+ timeout?: number;
2108
+ }
2109
+ /**
2110
+ * Tool factory interface
2111
+ */
2112
+ interface IToolFactory {
2113
+ /**
2114
+ * Create function tool from schema and function
2115
+ */
2116
+ createFunctionTool(schema: IToolSchema, fn: TToolExecutor): IFunctionTool;
2117
+ /**
2118
+ * Create tool from OpenAPI specification
2119
+ */
2120
+ createOpenAPITool(config: IOpenAPIToolConfig): ITool;
2121
+ /**
2122
+ * Create MCP tool
2123
+ */
2124
+ createMCPTool(config: IMCPToolConfig): ITool;
2125
+ }
2126
+
1821
2127
  /**
1822
2128
  * Execution step definition for tools that support step-by-step progress reporting
1823
2129
  */
@@ -2384,72 +2690,13 @@ interface IExecutorAwareProviderConfig {
2384
2690
  [key: string]: string | number | boolean | IExecutor | undefined;
2385
2691
  }
2386
2692
  /**
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
2693
+ * Base AI provider implementation with proper type constraints.
2694
+ * All AI providers should extend this class.
2431
2695
  *
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
2696
+ * Subclasses MUST: extend this class, use override keyword, call super() in constructor,
2697
+ * not redefine types that exist in agent-core, handle null message content correctly.
2436
2698
  *
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)
2699
+ * @template TConfig - Provider configuration type
2453
2700
  */
2454
2701
  declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements IAIProvider {
2455
2702
  abstract readonly name: string;
@@ -2470,6 +2717,15 @@ declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements
2470
2717
  * @returns Promise resolving to a response
2471
2718
  */
2472
2719
  abstract chat(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
2720
+ /**
2721
+ * Wrap an async iterable to yield to the macrotask queue periodically.
2722
+ * Providers MUST use this when iterating over streaming events to ensure
2723
+ * the main thread event loop stays responsive (ESC abort, Ctrl+C, etc.).
2724
+ *
2725
+ * Usage in provider:
2726
+ * for await (const event of this.streamWithAbort(stream, signal)) { ... }
2727
+ */
2728
+ protected streamWithAbort<T>(source: AsyncIterable<T>, signal?: AbortSignal): AsyncGenerator<T>;
2473
2729
  /**
2474
2730
  * Each provider must implement streaming chat using their own native SDK types internally
2475
2731
  * @param messages - Array of messages from conversation history
@@ -2496,30 +2752,24 @@ declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements
2496
2752
  * @returns true if tool calling is supported
2497
2753
  */
2498
2754
  supportsTools(): boolean;
2755
+ getCapabilities(): IProviderCapabilities;
2499
2756
  /**
2500
2757
  * Default implementation - providers can override for specific validation
2501
2758
  * @returns true if configuration is valid
2502
2759
  */
2503
2760
  validateConfig(): boolean;
2504
- /**
2505
- * Utility method for validating TUniversalMessage array
2506
- * @param messages - Messages to validate
2507
- */
2761
+ /** Validate that messages is a non-empty array with valid roles. */
2508
2762
  protected validateMessages(messages: TUniversalMessage[]): void;
2509
- /**
2510
- * Utility method for validating tool schemas
2511
- * @param tools - Tool schemas to validate
2512
- */
2763
+ /** Validate tool schemas. No-ops if tools is undefined. */
2513
2764
  protected validateTools(tools?: IToolSchema[]): void;
2765
+ protected validateNativeWebTools(request?: IProviderNativeWebToolRequest): void;
2514
2766
  /**
2515
2767
  * Execute chat via executor.
2516
- *
2517
2768
  * Subclasses should call this only when an executor is configured.
2518
2769
  */
2519
2770
  protected executeViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
2520
2771
  /**
2521
2772
  * Execute streaming chat via executor.
2522
- *
2523
2773
  * Subclasses should call this only when an executor is configured.
2524
2774
  */
2525
2775
  protected executeStreamViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): AsyncIterable<TUniversalMessage>;
@@ -2636,55 +2886,26 @@ declare abstract class AbstractExecutor implements IExecutor {
2636
2886
  protected validateResponse(response: TUniversalMessage): void;
2637
2887
  }
2638
2888
 
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
2889
  /**
2664
- * Provider message format union type
2890
+ * Provider message format type.
2891
+ *
2892
+ * Provider packages own concrete message shapes. Core only carries the generic
2893
+ * conversion hook and never branches on provider names.
2665
2894
  */
2666
- type TProviderMessage = IOpenAIMessage | IAnthropicProviderMessage | IGoogleProviderMessage | TUniversalMessage;
2895
+ type TProviderMessage = TUniversalMessage | IUniversalObjectValue;
2896
+ type TMessageFormatConverter<TMessage extends TProviderMessage = TProviderMessage> = (messages: readonly TUniversalMessage[]) => TMessage[];
2897
+ type TMessageConverterRegistry = Readonly<Record<string, TMessageFormatConverter>>;
2667
2898
  /**
2668
2899
  * Universal message converter utility
2669
- * Handles message format conversion between different providers
2900
+ *
2901
+ * The converter is registry-based so provider-specific message conversion is
2902
+ * injected by provider packages or callers instead of being hardcoded in core.
2670
2903
  */
2671
2904
  declare class MessageConverter {
2672
2905
  /**
2673
- * Convert messages to provider-specific format
2674
- */
2675
- static toProviderFormat(messages: TUniversalMessage[], providerName: string): TProviderMessage[];
2676
- /**
2677
- * Convert to OpenAI format
2678
- */
2679
- private static toOpenAIFormat;
2680
- /**
2681
- * Convert to Anthropic format
2682
- */
2683
- private static toAnthropicFormat;
2684
- /**
2685
- * Convert to Google format
2906
+ * Convert messages using an injected converter or converter registry.
2686
2907
  */
2687
- private static toGoogleFormat;
2908
+ static toProviderFormat(messages: TUniversalMessage[], converter?: TMessageFormatConverter | string, registry?: TMessageConverterRegistry): TProviderMessage[];
2688
2909
  /**
2689
2910
  * Convert to universal format (no conversion)
2690
2911
  */
@@ -2730,7 +2951,7 @@ declare class Validator {
2730
2951
  /**
2731
2952
  * Validate API key format (basic check)
2732
2953
  */
2733
- static validateApiKey(apiKey: string, provider?: string): ISimpleValidationResult;
2954
+ static validateApiKey(apiKey: string): ISimpleValidationResult;
2734
2955
  }
2735
2956
  declare const validateAgentConfig: typeof Validator.validateAgentConfig;
2736
2957
  declare const validateUserInput: typeof Validator.validateUserInput;
@@ -2919,6 +3140,132 @@ declare function stopPeriodicTask(timer: TTimerId | undefined): void;
2919
3140
  */
2920
3141
  type TTimerId = ReturnType<typeof setTimeout>;
2921
3142
 
3143
+ /** Create a user message. */
3144
+ declare function createUserMessage(content: string, options?: {
3145
+ name?: string;
3146
+ metadata?: TUniversalMessageMetadata;
3147
+ parts?: TUniversalMessagePart[];
3148
+ }): IUserMessage;
3149
+ /** Create an assistant message. */
3150
+ declare function createAssistantMessage(content: string | null, options?: {
3151
+ toolCalls?: IToolCall[];
3152
+ metadata?: TUniversalMessageMetadata;
3153
+ parts?: TUniversalMessagePart[];
3154
+ state?: TMessageState;
3155
+ }): IAssistantMessage;
3156
+ /** Create a system message. */
3157
+ declare function createSystemMessage(content: string, options?: {
3158
+ name?: string;
3159
+ metadata?: TUniversalMessageMetadata;
3160
+ parts?: TUniversalMessagePart[];
3161
+ }): ISystemMessage;
3162
+ /** Create a tool message. */
3163
+ declare function createToolMessage(content: string, options: {
3164
+ toolCallId: string;
3165
+ name?: string;
3166
+ metadata?: TUniversalMessageMetadata;
3167
+ parts?: TUniversalMessagePart[];
3168
+ }): IToolMessage;
3169
+
3170
+ /** API message format for provider consumption */
3171
+ interface IProviderApiMessage {
3172
+ role: string;
3173
+ content: string | null;
3174
+ tool_calls?: Array<{
3175
+ id: string;
3176
+ type: 'function';
3177
+ function: {
3178
+ name: string;
3179
+ arguments: string;
3180
+ };
3181
+ }>;
3182
+ tool_call_id?: string;
3183
+ }
3184
+ /**
3185
+ * Conversation store with duplicate prevention and API format conversion.
3186
+ * @public
3187
+ */
3188
+ declare class ConversationStore implements IConversationHistory {
3189
+ private history;
3190
+ private pendingAssistant;
3191
+ constructor(maxMessages?: number);
3192
+ addMessage(message: TUniversalMessage): void;
3193
+ addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3194
+ addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3195
+ addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3196
+ addToolMessage(content: string, toolCallId: string, toolName?: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3197
+ addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3198
+ /** Add a raw history entry (events, etc.) */
3199
+ addEntry(entry: IHistoryEntry): void;
3200
+ /** Get all history entries (universal timeline) */
3201
+ getHistory(): IHistoryEntry[];
3202
+ getMessages(): TUniversalMessage[];
3203
+ getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3204
+ getRecentMessages(count: number): TUniversalMessage[];
3205
+ getMessageCount(): number;
3206
+ /** Begin a new assistant response. Must be called before provider call.
3207
+ * Ensures pendingAssistant exists so commitAssistant always has data to save. */
3208
+ beginAssistant(): void;
3209
+ /** Append streaming text delta to pending assistant response */
3210
+ appendStreaming(delta: string): void;
3211
+ /** Append a tool call to pending assistant response (deduplicates by id) */
3212
+ appendToolCall(toolCall: IToolCall): void;
3213
+ /**
3214
+ * Commit pending assistant response to history.
3215
+ * Precondition: beginAssistant() must have been called before the provider call.
3216
+ * History is append-only — this always adds a message.
3217
+ */
3218
+ commitAssistant(state: TMessageState, metadata?: TUniversalMessageMetadata): void;
3219
+ /** Discard pending assistant response without saving */
3220
+ discardPending(): void;
3221
+ /** Returns true if there is accumulated pending assistant state (streaming or tool calls) */
3222
+ hasPendingAssistant(): boolean;
3223
+ /** Get pending assistant content (empty string if no content streamed yet) */
3224
+ getPendingContent(): string;
3225
+ getMessagesForAPI(): IProviderApiMessage[];
3226
+ clear(): void;
3227
+ }
3228
+
3229
+ /** Interface for managing conversation history. @public */
3230
+ interface IConversationHistory {
3231
+ addMessage(message: TUniversalMessage): void;
3232
+ addUserMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3233
+ addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3234
+ addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3235
+ addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3236
+ addEntry(entry: IHistoryEntry): void;
3237
+ getHistory(): IHistoryEntry[];
3238
+ getMessages(): TUniversalMessage[];
3239
+ getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3240
+ getRecentMessages(count: number): TUniversalMessage[];
3241
+ clear(): void;
3242
+ getMessageCount(): number;
3243
+ }
3244
+ /** Configuration options for ConversationHistory manager */
3245
+ interface IConversationHistoryOptions {
3246
+ maxMessagesPerConversation?: number;
3247
+ maxConversations?: number;
3248
+ }
3249
+ /** Multi-session conversation history manager. @public */
3250
+ declare class ConversationHistory {
3251
+ private conversations;
3252
+ private logger;
3253
+ private readonly maxMessagesPerConversation;
3254
+ private readonly maxConversations;
3255
+ constructor(options?: IConversationHistoryOptions);
3256
+ getConversationStore(conversationId: string): ConversationStore;
3257
+ hasConversation(conversationId: string): boolean;
3258
+ removeConversation(conversationId: string): boolean;
3259
+ clearAll(): void;
3260
+ getStats(): {
3261
+ totalConversations: number;
3262
+ conversationIds: string[];
3263
+ totalMessages: number;
3264
+ };
3265
+ /** @internal */
3266
+ private cleanupOldConversations;
3267
+ }
3268
+
2922
3269
  /**
2923
3270
  * Local executor that directly delegates to AI provider instances
2924
3271
  *
@@ -3047,7 +3394,6 @@ interface IEventEmitterHierarchicalEventData extends IEventEmitterEventData {
3047
3394
  actualResult?: IToolResult;
3048
3395
  };
3049
3396
  }
3050
-
3051
3397
  /** Event emitter configuration */
3052
3398
  interface IEventEmitterPluginOptions extends IPluginOptions {
3053
3399
  events?: TEventName[];
@@ -3104,17 +3450,49 @@ declare class EventEmitterPlugin extends AbstractPlugin<IEventEmitterPluginOptio
3104
3450
  off(eventType: TEventName, handlerIdOrListener: string | TEventEmitterListener): boolean;
3105
3451
  emit(eventType: TEventName, eventData?: Partial<IEventEmitterEventData>): Promise<void>;
3106
3452
  private processEvent;
3107
- private executeHandler;
3108
3453
  flushBuffer(): Promise<void>;
3109
3454
  getStats(): IEventEmitterPluginStats;
3110
3455
  clearAllListeners(): void;
3111
3456
  destroy(): Promise<void>;
3112
- private validateOptions;
3113
3457
  }
3114
3458
 
3459
+ /**
3460
+ * Configuration and tool management delegate for the Robota agent.
3461
+ *
3462
+ * Extracted from robota.ts to keep the main class under 300 lines.
3463
+ */
3464
+
3115
3465
  /** Agent statistics metadata type */
3116
3466
  type TAgentStatsMetadata = Record<string, string | number | boolean | Date | string[]>;
3117
3467
 
3468
+ /** Shared model configuration shape used in setModel / getModel. */
3469
+ type TModelConfig = {
3470
+ provider: string;
3471
+ model: string;
3472
+ temperature?: number;
3473
+ maxTokens?: number;
3474
+ topP?: number;
3475
+ systemMessage?: string;
3476
+ };
3477
+ /** Return shape of getConfiguration(). */
3478
+ type TConfigurationSnapshot = {
3479
+ version: number;
3480
+ tools: Array<{
3481
+ name: string;
3482
+ parameters?: string[];
3483
+ }>;
3484
+ updatedAt: number;
3485
+ };
3486
+ /** Return shape of getModuleStats(). */
3487
+ type TModuleStats = {
3488
+ totalExecutions: number;
3489
+ successfulExecutions: number;
3490
+ failedExecutions: number;
3491
+ averageExecutionTime: number;
3492
+ lastExecutionTime?: Date;
3493
+ } | undefined;
3494
+ /** Shorthand for the plugin contract type used throughout this class. */
3495
+ type TPlugin = IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks;
3118
3496
  /**
3119
3497
  * Core AI agent integrating multiple AI providers, tools, and plugins
3120
3498
  * into a unified conversational interface.
@@ -3144,50 +3522,33 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3144
3522
  private pluginManager;
3145
3523
  private configManager;
3146
3524
  constructor(config: IAgentConfig);
3147
- private initDelegates;
3148
- private emitCreatedEvent;
3149
3525
  run(input: string, options?: IRunOptions): Promise<string>;
3150
3526
  runStream(input: string, options?: IRunOptions): AsyncGenerator<string, void, undefined>;
3151
3527
  private executionDeps;
3152
3528
  getHistory(): TUniversalMessage[];
3529
+ getFullHistory(): IHistoryEntry[];
3530
+ addHistoryEntry(entry: IHistoryEntry): void;
3153
3531
  clearHistory(): void;
3532
+ injectMessage(role: 'user' | 'assistant' | 'system' | 'tool', content: string, options?: {
3533
+ toolCallId?: string;
3534
+ name?: string;
3535
+ }): void;
3154
3536
  updateTools(next: Array<IToolWithEventService>): Promise<{
3155
3537
  version: number;
3156
3538
  }>;
3157
3539
  updateConfiguration(patch: Partial<IAgentConfig>): Promise<{
3158
3540
  version: number;
3159
3541
  }>;
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
- };
3542
+ getConfiguration(): Promise<TConfigurationSnapshot>;
3543
+ setModel(mc: TModelConfig): void;
3544
+ getModel(): TModelConfig;
3184
3545
  registerTool(tool: AbstractTool): void;
3185
3546
  unregisterTool(toolName: string): void;
3186
3547
  getConfig(): IAgentConfig;
3187
- addPlugin(plugin: IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks): void;
3548
+ addPlugin(plugin: TPlugin): void;
3188
3549
  removePlugin(pluginName: string): boolean;
3189
- getPlugin(pluginName: string): (IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks) | undefined;
3190
- getPlugins(): Array<IPluginContract<IPluginOptions, IPluginStats> & IPluginHooks>;
3550
+ getPlugin(pluginName: string): TPlugin | undefined;
3551
+ getPlugins(): TPlugin[];
3191
3552
  getPluginNames(): string[];
3192
3553
  registerModule(module: IModule, options?: {
3193
3554
  autoInitialize?: boolean;
@@ -3210,13 +3571,7 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3210
3571
  error?: Error;
3211
3572
  duration?: number;
3212
3573
  }>;
3213
- getModuleStats(moduleName: string): {
3214
- totalExecutions: number;
3215
- successfulExecutions: number;
3216
- failedExecutions: number;
3217
- averageExecutionTime: number;
3218
- lastExecutionTime?: Date;
3219
- } | undefined;
3574
+ getModuleStats(moduleName: string): TModuleStats;
3220
3575
  getStats(): {
3221
3576
  name: string;
3222
3577
  version: string;
@@ -3235,7 +3590,6 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3235
3590
  private ensureFullyInitialized;
3236
3591
  private doAsyncInit;
3237
3592
  private emitAgentEvent;
3238
- private buildOwnerPath;
3239
3593
  }
3240
3594
 
3241
3595
  /**
@@ -3356,6 +3710,7 @@ interface IAgentLifecycleEvents {
3356
3710
  /** Called when agent is destroyed */
3357
3711
  onDestroy?: (agentId: string) => Promise<void> | void;
3358
3712
  }
3713
+
3359
3714
  /**
3360
3715
  * Agent Factory for creating and managing agents
3361
3716
  * Instance-based for isolated agent factory management
@@ -3429,97 +3784,18 @@ declare class AgentFactory {
3429
3784
  isValid: boolean;
3430
3785
  errors: string[];
3431
3786
  };
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
3787
  }
3487
3788
 
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;
3789
+ interface IAssistantUsageMetadata {
3790
+ inputTokens: number;
3791
+ outputTokens: number;
3792
+ usage: {
3793
+ totalTokens: number;
3794
+ inputTokens: number;
3795
+ outputTokens: number;
3521
3796
  };
3522
3797
  }
3798
+ declare function collectAssistantUsageMetadata(message: TUniversalMessage): IAssistantUsageMetadata | undefined;
3523
3799
 
3524
3800
  declare class EventHistoryModule implements IEventHistoryModule {
3525
3801
  private readonly store;
@@ -3997,11 +4273,13 @@ interface IExecutionProxyConfig {
3997
4273
  task?: boolean;
3998
4274
  };
3999
4275
  }
4276
+ /** Internal target shape for proxy interception */
4277
+ type TExecutionProxyTarget = Record<string, TUniversalValue>;
4278
+ /** Internal args shape for proxy interception */
4279
+ type TExecutionProxyArgs = TUniversalValue[];
4000
4280
  /**
4001
4281
  * Metadata extractor function type
4002
4282
  */
4003
- type TExecutionProxyTarget = Record<string, TUniversalValue>;
4004
- type TExecutionProxyArgs = TUniversalValue[];
4005
4283
  type TMetadataExtractor = (target: TExecutionProxyTarget, methodName: string, args: TExecutionProxyArgs) => Record<string, TUniversalValue>;
4006
4284
  /**
4007
4285
  * Method configuration for proxy
@@ -4013,6 +4291,7 @@ interface IMethodConfig {
4013
4291
  extractMetadata?: TMetadataExtractor;
4014
4292
  extractResult?: (result: TUniversalValue) => Record<string, TUniversalValue>;
4015
4293
  }
4294
+
4016
4295
  /**
4017
4296
  * ExecutionProxy - Automatic event emission using Proxy pattern
4018
4297
  *
@@ -4129,7 +4408,7 @@ declare function evaluatePermission(toolName: string, toolArgs: TToolArgs, mode:
4129
4408
  * Permission mode definitions for Robota CLI
4130
4409
  *
4131
4410
  * Matches Claude Code-compatible permission modes:
4132
- * - plan: read-only tools only (Read, Glob, Grep auto; Write, Edit, Bash denied)
4411
+ * - plan: read-only tools only (Read, Glob, Grep, WebFetch, WebSearch auto; Write, Edit, Bash denied)
4133
4412
  * - default: safe reads auto, writes and bash need approval
4134
4413
  * - acceptEdits: reads + writes auto, bash needs approval
4135
4414
  * - bypassPermissions: all tools auto
@@ -4138,7 +4417,7 @@ declare function evaluatePermission(toolName: string, toolArgs: TToolArgs, mode:
4138
4417
  /**
4139
4418
  * Tool names known to the permission system
4140
4419
  */
4141
- type TKnownToolName = 'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep';
4420
+ type TKnownToolName = 'Bash' | 'Read' | 'Write' | 'Edit' | 'Glob' | 'Grep' | 'WebFetch' | 'WebSearch';
4142
4421
  /**
4143
4422
  * Permission mode → tool policy matrix
4144
4423
  * Maps each mode to a decision for each known tool.
@@ -4175,22 +4454,100 @@ interface IContextWindowState {
4175
4454
  remainingPercentage: number;
4176
4455
  }
4177
4456
 
4457
+ declare const CONTEXT_ESTIMATE_CHARS_PER_TOKEN = 4;
4458
+ interface IContextTokenEstimateOptions {
4459
+ readonly usageFloorTokens?: number;
4460
+ }
4461
+ interface IContextTokenEstimate {
4462
+ readonly usedTokens: number;
4463
+ readonly serializedTokens: number;
4464
+ readonly providerTokens?: number;
4465
+ readonly usageFloorTokens?: number;
4466
+ }
4467
+ declare function estimateSerializedContextTokens(messages: readonly TUniversalMessage[]): number;
4468
+ declare function estimateContextTokensFromMessages(messages: readonly TUniversalMessage[], options?: IContextTokenEstimateOptions): IContextTokenEstimate;
4469
+
4470
+ interface IMessageTokenUsage {
4471
+ readonly inputTokens: number;
4472
+ readonly outputTokens: number;
4473
+ readonly totalTokens?: number;
4474
+ }
4475
+ /** Read normalized provider usage from a universal message when present. */
4476
+ declare function readTokenUsageFromMessage(message: TUniversalMessage): IMessageTokenUsage | undefined;
4477
+ declare function readTokenUsageFromMetadata(metadata: TUniversalMessageMetadata | undefined): IMessageTokenUsage | undefined;
4478
+
4479
+ /**
4480
+ * Claude model definitions — SSOT for model metadata.
4481
+ * Source: https://platform.claude.com/docs/en/about-claude/models/overview
4482
+ */
4483
+ interface IModelDefinition {
4484
+ /** Human-readable model name */
4485
+ name: string;
4486
+ /** API model identifier */
4487
+ id: string;
4488
+ /** Context window size in tokens */
4489
+ contextWindow: number;
4490
+ /** Maximum output tokens */
4491
+ maxOutput: number;
4492
+ }
4493
+ /**
4494
+ * Known Claude models (4.5+).
4495
+ * Keyed by API model ID for fast lookup.
4496
+ */
4497
+ declare const CLAUDE_MODELS: Record<string, IModelDefinition>;
4498
+ declare const DEFAULT_CONTEXT_WINDOW = 200000;
4499
+ /** Get context window size for a model ID. Falls back to DEFAULT_CONTEXT_WINDOW. */
4500
+ declare function getModelContextWindow(modelId: string): number;
4501
+ declare const DEFAULT_MAX_OUTPUT = 16384;
4502
+ /** Get max output tokens for a model ID. Falls back to DEFAULT_MAX_OUTPUT. */
4503
+ declare function getModelMaxOutput(modelId: string): number;
4504
+ /** Get human-readable model name for a model ID. Falls back to the ID itself. */
4505
+ declare function getModelName(modelId: string): string;
4506
+ /** Format token count as human-readable (e.g., 200K, 1M, 1.2M). Minimum unit is K. */
4507
+ declare function formatTokenCount(tokens: number): string;
4508
+
4178
4509
  /**
4179
4510
  * Hook system types — Claude Code compatible event/hook model.
4180
4511
  */
4181
4512
  /** 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 */
4513
+ type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit' | 'SubagentStart' | 'SubagentStop' | 'WorktreeCreate' | 'WorktreeRemove';
4514
+ /** Claude Code compatible session end reasons. */
4515
+ type TSessionEndReason = 'clear' | 'resume' | 'logout' | 'prompt_input_exit' | 'bypass_permissions_disabled' | 'other';
4516
+ /** Command hook executes a shell command */
4517
+ interface ICommandHookDefinition {
4186
4518
  type: 'command';
4187
4519
  command: string;
4520
+ timeout?: number;
4521
+ }
4522
+ /** HTTP hook — sends an HTTP request */
4523
+ interface IHttpHookDefinition {
4524
+ type: 'http';
4525
+ url: string;
4526
+ headers?: Record<string, string>;
4527
+ timeout?: number;
4188
4528
  }
4529
+ /** Prompt hook — evaluates a prompt via an AI model */
4530
+ interface IPromptHookDefinition {
4531
+ type: 'prompt';
4532
+ prompt: string;
4533
+ model?: string;
4534
+ }
4535
+ /** Agent hook — delegates to a sub-agent */
4536
+ interface IAgentHookDefinition {
4537
+ type: 'agent';
4538
+ agent: string;
4539
+ maxTurns?: number;
4540
+ timeout?: number;
4541
+ }
4542
+ /** Discriminated union of all hook definition types */
4543
+ type IHookDefinition = ICommandHookDefinition | IHttpHookDefinition | IPromptHookDefinition | IAgentHookDefinition;
4189
4544
  /** A hook group — matcher + array of hook definitions */
4190
4545
  interface IHookGroup {
4191
4546
  /** Regex pattern to match tool name (empty string = match all) */
4192
4547
  matcher: string;
4193
4548
  hooks: IHookDefinition[];
4549
+ /** Environment variables injected into hook child processes for this group */
4550
+ env?: Record<string, string>;
4194
4551
  }
4195
4552
  /** Complete hooks configuration: event → array of hook groups */
4196
4553
  type THooksConfig = Partial<Record<THookEvent, IHookGroup[]>>;
@@ -4206,6 +4563,28 @@ interface IHookInput {
4206
4563
  trigger?: 'auto' | 'manual';
4207
4564
  /** Compaction summary text (PostCompact only) */
4208
4565
  compact_summary?: string;
4566
+ /** User message text (UserPromptSubmit only) */
4567
+ user_message?: string;
4568
+ /** User prompt text — Claude Code compatible alias for user_message (UserPromptSubmit only) */
4569
+ prompt?: string;
4570
+ /** Assistant response text (Stop only) */
4571
+ response?: string;
4572
+ /** Last assistant message text (StopFailure only) */
4573
+ last_assistant_message?: string;
4574
+ /** Stop hook recursion guard (Stop/StopFailure only) */
4575
+ stop_hook_active?: boolean;
4576
+ /** Session end reason (SessionEnd only) */
4577
+ reason?: TSessionEndReason | string;
4578
+ /** Session transcript path when available (SessionEnd/SubagentStop only) */
4579
+ transcript_path?: string;
4580
+ /** Subagent identifier (SubagentStart/SubagentStop only) */
4581
+ agent_id?: string;
4582
+ /** Subagent type/name (SubagentStart/SubagentStop only) */
4583
+ agent_type?: string;
4584
+ /** Subagent transcript path when available (SubagentStop only) */
4585
+ agent_transcript_path?: string;
4586
+ /** Additional environment variables to pass to hook child processes */
4587
+ env?: Record<string, string>;
4209
4588
  }
4210
4589
  /** Hook execution result */
4211
4590
  interface IHookResult {
@@ -4214,11 +4593,21 @@ interface IHookResult {
4214
4593
  stdout: string;
4215
4594
  stderr: string;
4216
4595
  }
4596
+ /** Strategy interface for hook type executors */
4597
+ interface IHookTypeExecutor {
4598
+ /** The hook type this executor handles */
4599
+ type: IHookDefinition['type'];
4600
+ /** Execute a hook definition with the given input */
4601
+ execute(definition: IHookDefinition, input: IHookInput): Promise<IHookResult>;
4602
+ }
4217
4603
 
4218
4604
  /**
4219
- * Hook runner — executes shell command hooks for lifecycle events.
4605
+ * Hook runner — executes hooks for lifecycle events using the strategy pattern.
4606
+ *
4607
+ * Dispatches to registered IHookTypeExecutor implementations by definition type.
4608
+ * Default executors: CommandExecutor (shell), HttpExecutor (HTTP POST).
4220
4609
  *
4221
- * Hooks receive JSON input on stdin and communicate results via exit codes:
4610
+ * Exit code semantics:
4222
4611
  * - 0: allow/proceed
4223
4612
  * - 2: block/deny (stderr contains reason)
4224
4613
  * - other: proceed (logged as warning)
@@ -4229,10 +4618,19 @@ interface IHookResult {
4229
4618
  *
4230
4619
  * For PreToolUse: if any hook returns exit code 2, the tool call is blocked.
4231
4620
  * Returns { blocked: true, reason: string } if blocked, { blocked: false } otherwise.
4621
+ *
4622
+ * @param config - Hooks configuration mapping events to hook groups
4623
+ * @param event - The lifecycle event being fired
4624
+ * @param input - Hook input data passed to executors
4625
+ * @param executors - Optional array of hook type executors (defaults to command + http)
4232
4626
  */
4233
- declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput): Promise<{
4627
+ /** Result of running hooks for an event. */
4628
+ interface IRunHooksResult {
4234
4629
  blocked: boolean;
4235
4630
  reason?: string;
4236
- }>;
4631
+ /** Collected stdout from all successful hooks (exit code 0). */
4632
+ stdout: string;
4633
+ }
4634
+ declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
4237
4635
 
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 };
4636
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CONTEXT_ESTIMATE_CHARS_PER_TOKEN, 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 IContextTokenEstimate, type IContextTokenEstimateOptions, 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 IMessageTokenUsage, 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 IProviderCredentialRequirement, type IProviderDefinition, type IProviderFunctionCallingCapability, type IProviderMediaError, type IProviderModelCatalog, type IProviderModelCatalogEntry, type IProviderModelCatalogRefreshOptions, type IProviderNativeRawPayloadEvent, type IProviderNativeWebToolCapabilities, type IProviderNativeWebToolCapability, type IProviderNativeWebToolRequest, type IProviderOptions, type IProviderProbeResult, type IProviderProfileConfig, type IProviderProfileDefaults, type IProviderRequest, type IProviderSetupHelpLink, 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 TExecutionEventCallback, type TExecutionEventData, 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 TProviderCredentialField, type TProviderLoggingData, type TProviderMediaResult, type TProviderMessage, type TProviderModelCapability, type TProviderModelCatalogRefresh, type TProviderModelCatalogStatus, type TProviderModelLifecycle, type TProviderNativeRawPayload, type TProviderNativeRawPayloadCallback, type TProviderNativeRawPayloadKind, type TProviderOptionValueBase, type TProviderSetupField, type TProviderSetupHelpLinkKind, 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, estimateContextTokensFromMessages, estimateSerializedContextTokens, evaluatePermission, findProviderDefinition, formatSupportedProviderTypes, formatTokenCount, getGlobalLogLevel, getMessagesForAPI, getModelContextWindow, getModelMaxOutput, getModelName, getProviderCapabilities, getProviderCredentialRequirement, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isChatEntry, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, messageToHistoryEntry, readTokenUsageFromMessage, readTokenUsageFromMetadata, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };