@robota-sdk/agent-core 3.0.0-beta.1

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 (508) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/LICENSE +21 -0
  3. package/README.md +230 -0
  4. package/dist/abstracts/abstract-agent.d.ts +56 -0
  5. package/dist/abstracts/abstract-agent.d.ts.map +1 -0
  6. package/dist/abstracts/abstract-agent.js +55 -0
  7. package/dist/abstracts/abstract-agent.js.map +1 -0
  8. package/dist/abstracts/abstract-ai-provider.d.ts +187 -0
  9. package/dist/abstracts/abstract-ai-provider.d.ts.map +1 -0
  10. package/dist/abstracts/abstract-ai-provider.js +252 -0
  11. package/dist/abstracts/abstract-ai-provider.js.map +1 -0
  12. package/dist/abstracts/abstract-executor.d.ts +110 -0
  13. package/dist/abstracts/abstract-executor.d.ts.map +1 -0
  14. package/dist/abstracts/abstract-executor.js +156 -0
  15. package/dist/abstracts/abstract-executor.js.map +1 -0
  16. package/dist/abstracts/abstract-manager.d.ts +42 -0
  17. package/dist/abstracts/abstract-manager.d.ts.map +1 -0
  18. package/dist/abstracts/abstract-manager.js +49 -0
  19. package/dist/abstracts/abstract-manager.js.map +1 -0
  20. package/dist/abstracts/abstract-module.d.ts +365 -0
  21. package/dist/abstracts/abstract-module.d.ts.map +1 -0
  22. package/dist/abstracts/abstract-module.js +474 -0
  23. package/dist/abstracts/abstract-module.js.map +1 -0
  24. package/dist/abstracts/abstract-plugin.d.ts +369 -0
  25. package/dist/abstracts/abstract-plugin.d.ts.map +1 -0
  26. package/dist/abstracts/abstract-plugin.js +258 -0
  27. package/dist/abstracts/abstract-plugin.js.map +1 -0
  28. package/dist/abstracts/abstract-tool.d.ts +175 -0
  29. package/dist/abstracts/abstract-tool.d.ts.map +1 -0
  30. package/dist/abstracts/abstract-tool.js +140 -0
  31. package/dist/abstracts/abstract-tool.js.map +1 -0
  32. package/dist/abstracts/abstract-workflow-converter.d.ts +136 -0
  33. package/dist/abstracts/abstract-workflow-converter.d.ts.map +1 -0
  34. package/dist/abstracts/abstract-workflow-converter.js +252 -0
  35. package/dist/abstracts/abstract-workflow-converter.js.map +1 -0
  36. package/dist/abstracts/abstract-workflow-validator.d.ts +203 -0
  37. package/dist/abstracts/abstract-workflow-validator.d.ts.map +1 -0
  38. package/dist/abstracts/abstract-workflow-validator.js +447 -0
  39. package/dist/abstracts/abstract-workflow-validator.js.map +1 -0
  40. package/dist/abstracts/index.d.ts +6 -0
  41. package/dist/abstracts/index.d.ts.map +1 -0
  42. package/dist/abstracts/index.js +9 -0
  43. package/dist/abstracts/index.js.map +1 -0
  44. package/dist/agents/constants.d.ts +23 -0
  45. package/dist/agents/constants.d.ts.map +1 -0
  46. package/dist/agents/constants.js +22 -0
  47. package/dist/agents/constants.js.map +1 -0
  48. package/dist/agents/index.d.ts +1 -0
  49. package/dist/agents/index.d.ts.map +1 -0
  50. package/dist/agents/index.js +4 -0
  51. package/dist/agents/index.js.map +1 -0
  52. package/dist/agents/robota.test.d.ts +2 -0
  53. package/dist/agents/robota.test.d.ts.map +1 -0
  54. package/dist/agents/robota.test.js +416 -0
  55. package/dist/agents/robota.test.js.map +1 -0
  56. package/dist/browser/builtin-templates.json +107 -0
  57. package/dist/browser/index.d.ts +4237 -0
  58. package/dist/browser/index.js +4 -0
  59. package/dist/core/robota.d.ts +694 -0
  60. package/dist/core/robota.d.ts.map +1 -0
  61. package/dist/core/robota.js +1277 -0
  62. package/dist/core/robota.js.map +1 -0
  63. package/dist/executors/local-executor.d.ts +96 -0
  64. package/dist/executors/local-executor.d.ts.map +1 -0
  65. package/dist/executors/local-executor.js +197 -0
  66. package/dist/executors/local-executor.js.map +1 -0
  67. package/dist/executors/local-executor.test.d.ts +2 -0
  68. package/dist/executors/local-executor.test.d.ts.map +1 -0
  69. package/dist/executors/local-executor.test.js +192 -0
  70. package/dist/executors/local-executor.test.js.map +1 -0
  71. package/dist/index.d.ts +274 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +235 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/interfaces/agent.d.ts +198 -0
  76. package/dist/interfaces/agent.d.ts.map +1 -0
  77. package/dist/interfaces/agent.js +2 -0
  78. package/dist/interfaces/agent.js.map +1 -0
  79. package/dist/interfaces/event-service.d.ts +79 -0
  80. package/dist/interfaces/event-service.d.ts.map +1 -0
  81. package/dist/interfaces/event-service.js +2 -0
  82. package/dist/interfaces/event-service.js.map +1 -0
  83. package/dist/interfaces/executor.d.ts +128 -0
  84. package/dist/interfaces/executor.d.ts.map +1 -0
  85. package/dist/interfaces/executor.js +2 -0
  86. package/dist/interfaces/executor.js.map +1 -0
  87. package/dist/interfaces/history-module.d.ts +19 -0
  88. package/dist/interfaces/history-module.d.ts.map +1 -0
  89. package/dist/interfaces/history-module.js +2 -0
  90. package/dist/interfaces/history-module.js.map +1 -0
  91. package/dist/interfaces/index.d.ts +13 -0
  92. package/dist/interfaces/index.d.ts.map +1 -0
  93. package/dist/interfaces/index.js +4 -0
  94. package/dist/interfaces/index.js.map +1 -0
  95. package/dist/interfaces/manager.d.ts +142 -0
  96. package/dist/interfaces/manager.d.ts.map +1 -0
  97. package/dist/interfaces/manager.js +2 -0
  98. package/dist/interfaces/manager.js.map +1 -0
  99. package/dist/interfaces/messages.d.ts +75 -0
  100. package/dist/interfaces/messages.d.ts.map +1 -0
  101. package/dist/interfaces/messages.js +29 -0
  102. package/dist/interfaces/messages.js.map +1 -0
  103. package/dist/interfaces/progress-reporting.d.ts +86 -0
  104. package/dist/interfaces/progress-reporting.d.ts.map +1 -0
  105. package/dist/interfaces/progress-reporting.js +37 -0
  106. package/dist/interfaces/progress-reporting.js.map +1 -0
  107. package/dist/interfaces/provider.d.ts +217 -0
  108. package/dist/interfaces/provider.d.ts.map +1 -0
  109. package/dist/interfaces/provider.js +2 -0
  110. package/dist/interfaces/provider.js.map +1 -0
  111. package/dist/interfaces/service.d.ts +205 -0
  112. package/dist/interfaces/service.d.ts.map +1 -0
  113. package/dist/interfaces/service.js +6 -0
  114. package/dist/interfaces/service.js.map +1 -0
  115. package/dist/interfaces/tool.d.ts +248 -0
  116. package/dist/interfaces/tool.d.ts.map +1 -0
  117. package/dist/interfaces/tool.js +2 -0
  118. package/dist/interfaces/tool.js.map +1 -0
  119. package/dist/interfaces/types.d.ts +71 -0
  120. package/dist/interfaces/types.d.ts.map +1 -0
  121. package/dist/interfaces/types.js +33 -0
  122. package/dist/interfaces/types.js.map +1 -0
  123. package/dist/interfaces/workflow-converter.d.ts +193 -0
  124. package/dist/interfaces/workflow-converter.d.ts.map +1 -0
  125. package/dist/interfaces/workflow-converter.js +11 -0
  126. package/dist/interfaces/workflow-converter.js.map +1 -0
  127. package/dist/interfaces/workflow-validator.d.ts +209 -0
  128. package/dist/interfaces/workflow-validator.d.ts.map +1 -0
  129. package/dist/interfaces/workflow-validator.js +16 -0
  130. package/dist/interfaces/workflow-validator.js.map +1 -0
  131. package/dist/managers/agent-factory.d.ts +132 -0
  132. package/dist/managers/agent-factory.d.ts.map +1 -0
  133. package/dist/managers/agent-factory.js +284 -0
  134. package/dist/managers/agent-factory.js.map +1 -0
  135. package/dist/managers/agent-factory.test.d.ts +2 -0
  136. package/dist/managers/agent-factory.test.d.ts.map +1 -0
  137. package/dist/managers/agent-factory.test.js +249 -0
  138. package/dist/managers/agent-factory.test.js.map +1 -0
  139. package/dist/managers/agent-templates.d.ts +84 -0
  140. package/dist/managers/agent-templates.d.ts.map +1 -0
  141. package/dist/managers/agent-templates.js +159 -0
  142. package/dist/managers/agent-templates.js.map +1 -0
  143. package/dist/managers/ai-provider-manager.d.ts +80 -0
  144. package/dist/managers/ai-provider-manager.d.ts.map +1 -0
  145. package/dist/managers/ai-provider-manager.js +226 -0
  146. package/dist/managers/ai-provider-manager.js.map +1 -0
  147. package/dist/managers/conversation-history-manager.d.ts +455 -0
  148. package/dist/managers/conversation-history-manager.d.ts.map +1 -0
  149. package/dist/managers/conversation-history-manager.js +578 -0
  150. package/dist/managers/conversation-history-manager.js.map +1 -0
  151. package/dist/managers/conversation-history-manager.test.d.ts +2 -0
  152. package/dist/managers/conversation-history-manager.test.d.ts.map +1 -0
  153. package/dist/managers/conversation-history-manager.test.js +374 -0
  154. package/dist/managers/conversation-history-manager.test.js.map +1 -0
  155. package/dist/managers/index.d.ts +8 -0
  156. package/dist/managers/index.d.ts.map +1 -0
  157. package/dist/managers/index.js +8 -0
  158. package/dist/managers/index.js.map +1 -0
  159. package/dist/managers/module-registry.d.ts +161 -0
  160. package/dist/managers/module-registry.d.ts.map +1 -0
  161. package/dist/managers/module-registry.js +519 -0
  162. package/dist/managers/module-registry.js.map +1 -0
  163. package/dist/managers/module-type-registry.d.ts +113 -0
  164. package/dist/managers/module-type-registry.d.ts.map +1 -0
  165. package/dist/managers/module-type-registry.js +439 -0
  166. package/dist/managers/module-type-registry.js.map +1 -0
  167. package/dist/managers/plugins.d.ts +166 -0
  168. package/dist/managers/plugins.d.ts.map +1 -0
  169. package/dist/managers/plugins.js +339 -0
  170. package/dist/managers/plugins.js.map +1 -0
  171. package/dist/managers/tool-manager.d.ts +70 -0
  172. package/dist/managers/tool-manager.d.ts.map +1 -0
  173. package/dist/managers/tool-manager.js +138 -0
  174. package/dist/managers/tool-manager.js.map +1 -0
  175. package/dist/managers/tool-manager.test.d.ts +2 -0
  176. package/dist/managers/tool-manager.test.d.ts.map +1 -0
  177. package/dist/managers/tool-manager.test.js +186 -0
  178. package/dist/managers/tool-manager.test.js.map +1 -0
  179. package/dist/node/builtin-templates.json +107 -0
  180. package/dist/node/index.cjs +4 -0
  181. package/dist/node/index.d.cts +4237 -0
  182. package/dist/node/index.d.ts +4237 -0
  183. package/dist/node/index.js +4 -0
  184. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +67 -0
  185. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +1 -0
  186. package/dist/plugins/conversation-history/conversation-history-plugin.js +270 -0
  187. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +1 -0
  188. package/dist/plugins/conversation-history/index.d.ts +3 -0
  189. package/dist/plugins/conversation-history/index.d.ts.map +1 -0
  190. package/dist/plugins/conversation-history/index.js +2 -0
  191. package/dist/plugins/conversation-history/index.js.map +1 -0
  192. package/dist/plugins/conversation-history/storages/database-storage.d.ts +19 -0
  193. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +1 -0
  194. package/dist/plugins/conversation-history/storages/database-storage.js +94 -0
  195. package/dist/plugins/conversation-history/storages/database-storage.js.map +1 -0
  196. package/dist/plugins/conversation-history/storages/file-storage.d.ts +15 -0
  197. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +1 -0
  198. package/dist/plugins/conversation-history/storages/file-storage.js +94 -0
  199. package/dist/plugins/conversation-history/storages/file-storage.js.map +1 -0
  200. package/dist/plugins/conversation-history/storages/index.d.ts +4 -0
  201. package/dist/plugins/conversation-history/storages/index.d.ts.map +1 -0
  202. package/dist/plugins/conversation-history/storages/index.js +4 -0
  203. package/dist/plugins/conversation-history/storages/index.js.map +1 -0
  204. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +15 -0
  205. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +1 -0
  206. package/dist/plugins/conversation-history/storages/memory-storage.js +33 -0
  207. package/dist/plugins/conversation-history/storages/memory-storage.js.map +1 -0
  208. package/dist/plugins/conversation-history/types.d.ts +61 -0
  209. package/dist/plugins/conversation-history/types.d.ts.map +1 -0
  210. package/dist/plugins/conversation-history/types.js +2 -0
  211. package/dist/plugins/conversation-history/types.js.map +1 -0
  212. package/dist/plugins/error-handling/context-adapter.d.ts +30 -0
  213. package/dist/plugins/error-handling/context-adapter.d.ts.map +1 -0
  214. package/dist/plugins/error-handling/context-adapter.js +41 -0
  215. package/dist/plugins/error-handling/context-adapter.js.map +1 -0
  216. package/dist/plugins/error-handling/error-handling-plugin.d.ts +49 -0
  217. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +1 -0
  218. package/dist/plugins/error-handling/error-handling-plugin.js +229 -0
  219. package/dist/plugins/error-handling/error-handling-plugin.js.map +1 -0
  220. package/dist/plugins/error-handling/index.d.ts +10 -0
  221. package/dist/plugins/error-handling/index.d.ts.map +1 -0
  222. package/dist/plugins/error-handling/index.js +10 -0
  223. package/dist/plugins/error-handling/index.js.map +1 -0
  224. package/dist/plugins/error-handling/types.d.ts +73 -0
  225. package/dist/plugins/error-handling/types.d.ts.map +1 -0
  226. package/dist/plugins/error-handling/types.js +14 -0
  227. package/dist/plugins/error-handling/types.js.map +1 -0
  228. package/dist/plugins/event-emitter/metrics.d.ts +17 -0
  229. package/dist/plugins/event-emitter/metrics.d.ts.map +1 -0
  230. package/dist/plugins/event-emitter/metrics.js +17 -0
  231. package/dist/plugins/event-emitter/metrics.js.map +1 -0
  232. package/dist/plugins/event-emitter/types.d.ts +112 -0
  233. package/dist/plugins/event-emitter/types.d.ts.map +1 -0
  234. package/dist/plugins/event-emitter/types.js +65 -0
  235. package/dist/plugins/event-emitter/types.js.map +1 -0
  236. package/dist/plugins/event-emitter-plugin.d.ts +222 -0
  237. package/dist/plugins/event-emitter-plugin.d.ts.map +1 -0
  238. package/dist/plugins/event-emitter-plugin.js +432 -0
  239. package/dist/plugins/event-emitter-plugin.js.map +1 -0
  240. package/dist/plugins/event-emitter-plugin.test.d.ts +2 -0
  241. package/dist/plugins/event-emitter-plugin.test.d.ts.map +1 -0
  242. package/dist/plugins/event-emitter-plugin.test.js +94 -0
  243. package/dist/plugins/event-emitter-plugin.test.js.map +1 -0
  244. package/dist/plugins/execution/execution-analytics-plugin.d.ts +129 -0
  245. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +1 -0
  246. package/dist/plugins/execution/execution-analytics-plugin.js +517 -0
  247. package/dist/plugins/execution/execution-analytics-plugin.js.map +1 -0
  248. package/dist/plugins/execution/index.d.ts +3 -0
  249. package/dist/plugins/execution/index.d.ts.map +1 -0
  250. package/dist/plugins/execution/index.js +2 -0
  251. package/dist/plugins/execution/index.js.map +1 -0
  252. package/dist/plugins/execution/types.d.ts +90 -0
  253. package/dist/plugins/execution/types.d.ts.map +1 -0
  254. package/dist/plugins/execution/types.js +2 -0
  255. package/dist/plugins/execution/types.js.map +1 -0
  256. package/dist/plugins/index.d.ts +10 -0
  257. package/dist/plugins/index.d.ts.map +1 -0
  258. package/dist/plugins/index.js +11 -0
  259. package/dist/plugins/index.js.map +1 -0
  260. package/dist/plugins/limits/types.d.ts +61 -0
  261. package/dist/plugins/limits/types.d.ts.map +1 -0
  262. package/dist/plugins/limits/types.js +2 -0
  263. package/dist/plugins/limits/types.js.map +1 -0
  264. package/dist/plugins/limits-plugin.d.ts +113 -0
  265. package/dist/plugins/limits-plugin.d.ts.map +1 -0
  266. package/dist/plugins/limits-plugin.js +380 -0
  267. package/dist/plugins/limits-plugin.js.map +1 -0
  268. package/dist/plugins/logging/formatters.d.ts +14 -0
  269. package/dist/plugins/logging/formatters.d.ts.map +1 -0
  270. package/dist/plugins/logging/formatters.js +24 -0
  271. package/dist/plugins/logging/formatters.js.map +1 -0
  272. package/dist/plugins/logging/index.d.ts +3 -0
  273. package/dist/plugins/logging/index.d.ts.map +1 -0
  274. package/dist/plugins/logging/index.js +2 -0
  275. package/dist/plugins/logging/index.js.map +1 -0
  276. package/dist/plugins/logging/logging-plugin.d.ts +91 -0
  277. package/dist/plugins/logging/logging-plugin.d.ts.map +1 -0
  278. package/dist/plugins/logging/logging-plugin.js +335 -0
  279. package/dist/plugins/logging/logging-plugin.js.map +1 -0
  280. package/dist/plugins/logging/storages/console-storage.d.ts +14 -0
  281. package/dist/plugins/logging/storages/console-storage.d.ts.map +1 -0
  282. package/dist/plugins/logging/storages/console-storage.js +38 -0
  283. package/dist/plugins/logging/storages/console-storage.js.map +1 -0
  284. package/dist/plugins/logging/storages/file-storage.d.ts +14 -0
  285. package/dist/plugins/logging/storages/file-storage.d.ts.map +1 -0
  286. package/dist/plugins/logging/storages/file-storage.js +41 -0
  287. package/dist/plugins/logging/storages/file-storage.js.map +1 -0
  288. package/dist/plugins/logging/storages/index.d.ts +5 -0
  289. package/dist/plugins/logging/storages/index.d.ts.map +1 -0
  290. package/dist/plugins/logging/storages/index.js +5 -0
  291. package/dist/plugins/logging/storages/index.js.map +1 -0
  292. package/dist/plugins/logging/storages/remote-storage.d.ts +20 -0
  293. package/dist/plugins/logging/storages/remote-storage.d.ts.map +1 -0
  294. package/dist/plugins/logging/storages/remote-storage.js +61 -0
  295. package/dist/plugins/logging/storages/remote-storage.js.map +1 -0
  296. package/dist/plugins/logging/storages/silent-storage.d.ts +10 -0
  297. package/dist/plugins/logging/storages/silent-storage.d.ts.map +1 -0
  298. package/dist/plugins/logging/storages/silent-storage.js +15 -0
  299. package/dist/plugins/logging/storages/silent-storage.js.map +1 -0
  300. package/dist/plugins/logging/types.d.ts +84 -0
  301. package/dist/plugins/logging/types.d.ts.map +1 -0
  302. package/dist/plugins/logging/types.js +2 -0
  303. package/dist/plugins/logging/types.js.map +1 -0
  304. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +12 -0
  305. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +1 -0
  306. package/dist/plugins/performance/collectors/system-metrics-collector.js +65 -0
  307. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +1 -0
  308. package/dist/plugins/performance/index.d.ts +5 -0
  309. package/dist/plugins/performance/index.d.ts.map +1 -0
  310. package/dist/plugins/performance/index.js +4 -0
  311. package/dist/plugins/performance/index.js.map +1 -0
  312. package/dist/plugins/performance/performance-plugin.d.ts +49 -0
  313. package/dist/plugins/performance/performance-plugin.d.ts.map +1 -0
  314. package/dist/plugins/performance/performance-plugin.js +293 -0
  315. package/dist/plugins/performance/performance-plugin.js.map +1 -0
  316. package/dist/plugins/performance/storages/index.d.ts +2 -0
  317. package/dist/plugins/performance/storages/index.d.ts.map +1 -0
  318. package/dist/plugins/performance/storages/index.js +4 -0
  319. package/dist/plugins/performance/storages/index.js.map +1 -0
  320. package/dist/plugins/performance/storages/memory-storage.d.ts +19 -0
  321. package/dist/plugins/performance/storages/memory-storage.d.ts.map +1 -0
  322. package/dist/plugins/performance/storages/memory-storage.js +69 -0
  323. package/dist/plugins/performance/storages/memory-storage.js.map +1 -0
  324. package/dist/plugins/performance/types.d.ts +154 -0
  325. package/dist/plugins/performance/types.d.ts.map +1 -0
  326. package/dist/plugins/performance/types.js +2 -0
  327. package/dist/plugins/performance/types.js.map +1 -0
  328. package/dist/plugins/usage/aggregate-usage-stats.d.ts +12 -0
  329. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +1 -0
  330. package/dist/plugins/usage/aggregate-usage-stats.js +115 -0
  331. package/dist/plugins/usage/aggregate-usage-stats.js.map +1 -0
  332. package/dist/plugins/usage/index.d.ts +5 -0
  333. package/dist/plugins/usage/index.d.ts.map +1 -0
  334. package/dist/plugins/usage/index.js +4 -0
  335. package/dist/plugins/usage/index.js.map +1 -0
  336. package/dist/plugins/usage/storages/file-storage.d.ts +22 -0
  337. package/dist/plugins/usage/storages/file-storage.d.ts.map +1 -0
  338. package/dist/plugins/usage/storages/file-storage.js +111 -0
  339. package/dist/plugins/usage/storages/file-storage.js.map +1 -0
  340. package/dist/plugins/usage/storages/index.d.ts +5 -0
  341. package/dist/plugins/usage/storages/index.d.ts.map +1 -0
  342. package/dist/plugins/usage/storages/index.js +5 -0
  343. package/dist/plugins/usage/storages/index.js.map +1 -0
  344. package/dist/plugins/usage/storages/memory-storage.d.ts +22 -0
  345. package/dist/plugins/usage/storages/memory-storage.d.ts.map +1 -0
  346. package/dist/plugins/usage/storages/memory-storage.js +42 -0
  347. package/dist/plugins/usage/storages/memory-storage.js.map +1 -0
  348. package/dist/plugins/usage/storages/remote-storage.d.ts +26 -0
  349. package/dist/plugins/usage/storages/remote-storage.d.ts.map +1 -0
  350. package/dist/plugins/usage/storages/remote-storage.js +115 -0
  351. package/dist/plugins/usage/storages/remote-storage.js.map +1 -0
  352. package/dist/plugins/usage/storages/silent-storage.d.ts +19 -0
  353. package/dist/plugins/usage/storages/silent-storage.d.ts.map +1 -0
  354. package/dist/plugins/usage/storages/silent-storage.js +26 -0
  355. package/dist/plugins/usage/storages/silent-storage.js.map +1 -0
  356. package/dist/plugins/usage/types.d.ts +127 -0
  357. package/dist/plugins/usage/types.d.ts.map +1 -0
  358. package/dist/plugins/usage/types.js +2 -0
  359. package/dist/plugins/usage/types.js.map +1 -0
  360. package/dist/plugins/usage/usage-plugin.d.ts +67 -0
  361. package/dist/plugins/usage/usage-plugin.d.ts.map +1 -0
  362. package/dist/plugins/usage/usage-plugin.js +309 -0
  363. package/dist/plugins/usage/usage-plugin.js.map +1 -0
  364. package/dist/plugins/webhook/http-client.d.ts +30 -0
  365. package/dist/plugins/webhook/http-client.d.ts.map +1 -0
  366. package/dist/plugins/webhook/http-client.js +110 -0
  367. package/dist/plugins/webhook/http-client.js.map +1 -0
  368. package/dist/plugins/webhook/index.d.ts +9 -0
  369. package/dist/plugins/webhook/index.d.ts.map +1 -0
  370. package/dist/plugins/webhook/index.js +9 -0
  371. package/dist/plugins/webhook/index.js.map +1 -0
  372. package/dist/plugins/webhook/transformer.d.ts +63 -0
  373. package/dist/plugins/webhook/transformer.d.ts.map +1 -0
  374. package/dist/plugins/webhook/transformer.js +157 -0
  375. package/dist/plugins/webhook/transformer.js.map +1 -0
  376. package/dist/plugins/webhook/types.d.ts +183 -0
  377. package/dist/plugins/webhook/types.d.ts.map +1 -0
  378. package/dist/plugins/webhook/types.js +2 -0
  379. package/dist/plugins/webhook/types.js.map +1 -0
  380. package/dist/plugins/webhook/webhook-plugin.d.ts +92 -0
  381. package/dist/plugins/webhook/webhook-plugin.d.ts.map +1 -0
  382. package/dist/plugins/webhook/webhook-plugin.js +328 -0
  383. package/dist/plugins/webhook/webhook-plugin.js.map +1 -0
  384. package/dist/schemas/agent-template-schema.d.ts +137 -0
  385. package/dist/schemas/agent-template-schema.d.ts.map +1 -0
  386. package/dist/schemas/agent-template-schema.js +87 -0
  387. package/dist/schemas/agent-template-schema.js.map +1 -0
  388. package/dist/services/conversation-service/index.d.ts +88 -0
  389. package/dist/services/conversation-service/index.d.ts.map +1 -0
  390. package/dist/services/conversation-service/index.js +441 -0
  391. package/dist/services/conversation-service/index.js.map +1 -0
  392. package/dist/services/conversation-service/types.d.ts +32 -0
  393. package/dist/services/conversation-service/types.d.ts.map +1 -0
  394. package/dist/services/conversation-service/types.js +8 -0
  395. package/dist/services/conversation-service/types.js.map +1 -0
  396. package/dist/services/event-service.d.ts +61 -0
  397. package/dist/services/event-service.d.ts.map +1 -0
  398. package/dist/services/event-service.js +110 -0
  399. package/dist/services/event-service.js.map +1 -0
  400. package/dist/services/event-service.test.d.ts +2 -0
  401. package/dist/services/event-service.test.d.ts.map +1 -0
  402. package/dist/services/event-service.test.js +86 -0
  403. package/dist/services/event-service.test.js.map +1 -0
  404. package/dist/services/execution-service.d.ts +151 -0
  405. package/dist/services/execution-service.d.ts.map +1 -0
  406. package/dist/services/execution-service.js +1262 -0
  407. package/dist/services/execution-service.js.map +1 -0
  408. package/dist/services/execution-service.test.d.ts +2 -0
  409. package/dist/services/execution-service.test.d.ts.map +1 -0
  410. package/dist/services/execution-service.test.js +338 -0
  411. package/dist/services/execution-service.test.js.map +1 -0
  412. package/dist/services/history-module.d.ts +15 -0
  413. package/dist/services/history-module.d.ts.map +1 -0
  414. package/dist/services/history-module.js +42 -0
  415. package/dist/services/history-module.js.map +1 -0
  416. package/dist/services/in-memory-history-store.d.ts +12 -0
  417. package/dist/services/in-memory-history-store.d.ts.map +1 -0
  418. package/dist/services/in-memory-history-store.js +41 -0
  419. package/dist/services/in-memory-history-store.js.map +1 -0
  420. package/dist/services/index.d.ts +7 -0
  421. package/dist/services/index.d.ts.map +1 -0
  422. package/dist/services/index.js +13 -0
  423. package/dist/services/index.js.map +1 -0
  424. package/dist/services/task-events.d.ts +6 -0
  425. package/dist/services/task-events.d.ts.map +1 -0
  426. package/dist/services/task-events.js +6 -0
  427. package/dist/services/task-events.js.map +1 -0
  428. package/dist/services/tool-execution-service.d.ts +74 -0
  429. package/dist/services/tool-execution-service.d.ts.map +1 -0
  430. package/dist/services/tool-execution-service.js +189 -0
  431. package/dist/services/tool-execution-service.js.map +1 -0
  432. package/dist/services/user-events.d.ts +7 -0
  433. package/dist/services/user-events.d.ts.map +1 -0
  434. package/dist/services/user-events.js +6 -0
  435. package/dist/services/user-events.js.map +1 -0
  436. package/dist/tools/implementations/function-tool/index.d.ts +9 -0
  437. package/dist/tools/implementations/function-tool/index.d.ts.map +1 -0
  438. package/dist/tools/implementations/function-tool/index.js +13 -0
  439. package/dist/tools/implementations/function-tool/index.js.map +1 -0
  440. package/dist/tools/implementations/function-tool/schema-converter.d.ts +32 -0
  441. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +1 -0
  442. package/dist/tools/implementations/function-tool/schema-converter.js +164 -0
  443. package/dist/tools/implementations/function-tool/schema-converter.js.map +1 -0
  444. package/dist/tools/implementations/function-tool/types.d.ts +72 -0
  445. package/dist/tools/implementations/function-tool/types.d.ts.map +1 -0
  446. package/dist/tools/implementations/function-tool/types.js +14 -0
  447. package/dist/tools/implementations/function-tool/types.js.map +1 -0
  448. package/dist/tools/implementations/function-tool.d.ts +49 -0
  449. package/dist/tools/implementations/function-tool.d.ts.map +1 -0
  450. package/dist/tools/implementations/function-tool.js +223 -0
  451. package/dist/tools/implementations/function-tool.js.map +1 -0
  452. package/dist/tools/implementations/index.d.ts +4 -0
  453. package/dist/tools/implementations/index.d.ts.map +1 -0
  454. package/dist/tools/implementations/index.js +5 -0
  455. package/dist/tools/implementations/index.js.map +1 -0
  456. package/dist/tools/implementations/mcp-tool.d.ts +72 -0
  457. package/dist/tools/implementations/mcp-tool.d.ts.map +1 -0
  458. package/dist/tools/implementations/mcp-tool.js +246 -0
  459. package/dist/tools/implementations/mcp-tool.js.map +1 -0
  460. package/dist/tools/implementations/openapi-tool.d.ts +56 -0
  461. package/dist/tools/implementations/openapi-tool.d.ts.map +1 -0
  462. package/dist/tools/implementations/openapi-tool.js +324 -0
  463. package/dist/tools/implementations/openapi-tool.js.map +1 -0
  464. package/dist/tools/implementations/relay-mcp-tool.d.ts +38 -0
  465. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +1 -0
  466. package/dist/tools/implementations/relay-mcp-tool.js +46 -0
  467. package/dist/tools/implementations/relay-mcp-tool.js.map +1 -0
  468. package/dist/tools/index.d.ts +3 -0
  469. package/dist/tools/index.d.ts.map +1 -0
  470. package/dist/tools/index.js +4 -0
  471. package/dist/tools/index.js.map +1 -0
  472. package/dist/tools/registry/index.d.ts +2 -0
  473. package/dist/tools/registry/index.d.ts.map +1 -0
  474. package/dist/tools/registry/index.js +3 -0
  475. package/dist/tools/registry/index.js.map +1 -0
  476. package/dist/tools/registry/tool-registry.d.ts +54 -0
  477. package/dist/tools/registry/tool-registry.d.ts.map +1 -0
  478. package/dist/tools/registry/tool-registry.js +146 -0
  479. package/dist/tools/registry/tool-registry.js.map +1 -0
  480. package/dist/utils/errors.d.ts +155 -0
  481. package/dist/utils/errors.d.ts.map +1 -0
  482. package/dist/utils/errors.js +203 -0
  483. package/dist/utils/errors.js.map +1 -0
  484. package/dist/utils/execution-proxy.d.ts +75 -0
  485. package/dist/utils/execution-proxy.d.ts.map +1 -0
  486. package/dist/utils/execution-proxy.js +230 -0
  487. package/dist/utils/execution-proxy.js.map +1 -0
  488. package/dist/utils/index.d.ts +11 -0
  489. package/dist/utils/index.d.ts.map +1 -0
  490. package/dist/utils/index.js +7 -0
  491. package/dist/utils/index.js.map +1 -0
  492. package/dist/utils/logger.d.ts +74 -0
  493. package/dist/utils/logger.d.ts.map +1 -0
  494. package/dist/utils/logger.js +143 -0
  495. package/dist/utils/logger.js.map +1 -0
  496. package/dist/utils/message-converter.d.ts +68 -0
  497. package/dist/utils/message-converter.d.ts.map +1 -0
  498. package/dist/utils/message-converter.js +87 -0
  499. package/dist/utils/message-converter.js.map +1 -0
  500. package/dist/utils/periodic-task.d.ts +14 -0
  501. package/dist/utils/periodic-task.d.ts.map +1 -0
  502. package/dist/utils/periodic-task.js +26 -0
  503. package/dist/utils/periodic-task.js.map +1 -0
  504. package/dist/utils/validation.d.ts +40 -0
  505. package/dist/utils/validation.d.ts.map +1 -0
  506. package/dist/utils/validation.js +162 -0
  507. package/dist/utils/validation.js.map +1 -0
  508. package/package.json +101 -0
@@ -0,0 +1,274 @@
1
+ /**
2
+ * @fileoverview Robota SDK Agents Package - Comprehensive AI Agent Framework
3
+ *
4
+ * 🎯 Centralized node type management: domain-neutral workflow node type system
5
+ *
6
+ * The `@robota-sdk/agents` package provides a complete AI agent framework with support for
7
+ * multiple AI providers, tool calling, plugin systems, and streaming responses. This package
8
+ * provides a modern, modular architecture for building powerful AI applications.
9
+ *
10
+ * ## Key Features
11
+ *
12
+ * - **Multi-Provider Support**: OpenAI, Anthropic, Google, and custom AI providers
13
+ * - **Tool Calling**: Zod-based schema validation for function calls
14
+ * - **Plugin System**: Extensible lifecycle hooks for logging, analytics, error handling
15
+ * - **Streaming Responses**: Real-time response streaming from all providers
16
+ * - **Conversation Management**: Centralized history and session management
17
+ * - **Type Safety**: Full TypeScript support with strict type checking
18
+ * - **Modular Architecture**: Independent packages with clear separation of concerns
19
+ *
20
+ * ## Quick Start
21
+ *
22
+ * ```typescript
23
+ * import { Robota } from '@robota-sdk/agents';
24
+ * import { OpenAIProvider } from '@robota-sdk/openai';
25
+ *
26
+ * const robota = new Robota({
27
+ * name: 'MyAgent',
28
+ * aiProviders: {
29
+ * openai: new OpenAIProvider({ apiKey: 'sk-...' })
30
+ * },
31
+ * currentProvider: 'openai',
32
+ * currentModel: 'gpt-4'
33
+ * });
34
+ *
35
+ * const response = await robota.run('Hello, world!');
36
+ * console.log(response);
37
+ * ```
38
+ *
39
+ * ## Package Structure
40
+ *
41
+ * - **Core Agent**: `Robota` class for AI conversations
42
+ * - **Abstracts**: Base classes for extending functionality
43
+ * - **Interfaces**: TypeScript definitions for all components
44
+ * - **Plugins**: Extensible functionality (8+ built-in plugins)
45
+ * - **Tools**: Function calling and tool management
46
+ * - **Managers**: Resource and state management
47
+ * - **Utils**: Logging, error handling, validation utilities
48
+ *
49
+ * @public
50
+ * @packageDocumentation
51
+ */
52
+ /**
53
+ * Core interfaces defining the structure and contracts for all components.
54
+ * These provide type safety and enable extensibility throughout the framework.
55
+ *
56
+ * @public
57
+ */
58
+ export * from './interfaces';
59
+ /**
60
+ * 🎯 Centralized node type system (prevents arbitrary external custom node types)
61
+ *
62
+ * Provides domain-neutral, consistent workflow node types.
63
+ * Prevents external code from creating arbitrary node types and
64
+ * centralizes all node types through these constants.
65
+ *
66
+ * @public
67
+ */
68
+ /**
69
+ * Abstract base classes that provide common functionality and structure.
70
+ * Extend these classes to create custom agents, tools, plugins, and providers.
71
+ *
72
+ * @public
73
+ */
74
+ export * from './abstracts';
75
+ /**
76
+ * Utility functions for logging, error handling, validation, and other common tasks.
77
+ * These utilities ensure consistent behavior across all components.
78
+ *
79
+ * @public
80
+ */
81
+ export * from './utils';
82
+ /**
83
+ * Type definitions for AI provider integration.
84
+ * Used by OpenAI, Anthropic, Google, and custom provider packages.
85
+ *
86
+ * @public
87
+ */
88
+ export type { IToolSchema, IProviderOptions, IChatOptions, IAIProvider } from './interfaces/provider';
89
+ /**
90
+ * Message type definitions for conversation management.
91
+ * Supports all message types including tool calls and responses.
92
+ *
93
+ * @public
94
+ */
95
+ export type { IToolCall, IUserMessage, ISystemMessage, IToolMessage, } from './interfaces/agent';
96
+ /**
97
+ * Tool contract types used across tools and integrations.
98
+ *
99
+ * @public
100
+ */
101
+ export type { TToolParameters, IToolResult, IToolExecutionContext } from './interfaces/tool';
102
+ /**
103
+ * Universal message format and assistant message used internally by the conversation history manager.
104
+ * Provides a common format that can be converted to/from provider-specific formats.
105
+ *
106
+ * @public
107
+ */
108
+ export type { TUniversalMessage, IAssistantMessage, TUniversalMessageMetadata } from './interfaces/messages';
109
+ /**
110
+ * Type guards for the canonical TUniversalMessage union.
111
+ *
112
+ * @public
113
+ */
114
+ export { isUserMessage, isAssistantMessage, isSystemMessage, isToolMessage } from './interfaces/messages';
115
+ /**
116
+ * Provider request/response types (raw provider boundary).
117
+ *
118
+ * @public
119
+ */
120
+ export type { IProviderRequest, IRawProviderResponse } from './interfaces/provider';
121
+ /**
122
+ * Abstract AI provider implementation that all AI providers must extend.
123
+ * Provides common functionality for message conversion, error handling, and execution.
124
+ *
125
+ * @public
126
+ */
127
+ export { AbstractAIProvider } from './abstracts/abstract-ai-provider';
128
+ /**
129
+ * Executor implementations for local and remote AI provider execution
130
+ *
131
+ * @public
132
+ */
133
+ export { LocalExecutor, type IAIProviderInstance } from './executors/local-executor';
134
+ export { AbstractExecutor } from './abstracts/abstract-executor';
135
+ export type { IExecutor, IChatExecutionRequest, IStreamExecutionRequest, ILocalExecutorConfig, IRemoteExecutorConfig, } from './interfaces/executor';
136
+ /**
137
+ * Centralized logger instance with configurable levels and output targets.
138
+ * Use this for consistent logging across all components.
139
+ *
140
+ * @public
141
+ */
142
+ export { logger, SilentLogger, type ILogger } from './utils/logger';
143
+ /**
144
+ * Core plugins providing essential functionality through lifecycle hooks.
145
+ * These plugins can be combined to create powerful, extensible agent behaviors.
146
+ *
147
+ * ## Available Plugins:
148
+ * - **ConversationHistoryPlugin**: Persistent conversation storage
149
+ * - **LoggingPlugin**: Configurable logging with multiple strategies
150
+ * - **UsagePlugin**: Token usage and cost tracking
151
+ * - **PerformancePlugin**: Performance metrics and monitoring
152
+ * - **ExecutionPlugin**: Execution analytics and insights
153
+ * - **ErrorHandlingPlugin**: Error recovery and retry logic
154
+ * - **LimitsPlugin**: Rate limiting and resource control
155
+ * - **EventEmitterPlugin**: Event-driven plugin communication
156
+ * - **WebhookPlugin**: External system notifications
157
+ *
158
+ * @public
159
+ */
160
+ export * from './plugins/conversation-history';
161
+ export * from './plugins/logging';
162
+ export * from './plugins/usage';
163
+ export * from './plugins/performance';
164
+ export * from './plugins/execution';
165
+ export { ErrorHandlingPlugin, TErrorHandlingStrategy, IErrorHandlingPluginOptions } from './plugins/error-handling/index';
166
+ /**
167
+ * Additional specialized plugins for advanced use cases.
168
+ *
169
+ * @public
170
+ */
171
+ export { LimitsPlugin } from './plugins/limits-plugin';
172
+ export type { TLimitsStrategy, ILimitsPluginOptions } from './plugins/limits-plugin';
173
+ export { EventEmitterPlugin, TEventName, IEventEmitterEventData, TEventEmitterListener, IEventEmitterPluginOptions, IEventEmitterHierarchicalEventData } from './plugins/event-emitter-plugin';
174
+ export { WebhookPlugin } from './plugins/webhook';
175
+ export type { TWebhookEventName, IWebhookPayload, IWebhookEndpoint, IWebhookPluginOptions } from './plugins/webhook';
176
+ /**
177
+ * The Robota agent class.
178
+ * This is the primary entry point for creating AI agents.
179
+ *
180
+ * @example Basic Usage
181
+ * ```typescript
182
+ * import { Robota, type TAgentConfig } from '@robota-sdk/agents';
183
+ *
184
+ * const config: AgentConfig = {
185
+ * name: 'Assistant',
186
+ * aiProviders: [provider],
187
+ * defaultModel: {
188
+ * provider: 'openai',
189
+ * model: 'gpt-4'
190
+ * }
191
+ * };
192
+ *
193
+ * const agent = new Robota(config);
194
+ * ```
195
+ *
196
+ * @public
197
+ */
198
+ export { Robota } from './core/robota';
199
+ /**
200
+ * **Important**: Provider implementations are no longer re-exported to prevent circular dependencies.
201
+ *
202
+ * Import AI providers directly from their respective packages:
203
+ * - `OpenAIProvider` from `@robota-sdk/openai`
204
+ * - `AnthropicProvider` from `@robota-sdk/anthropic`
205
+ * - `GoogleProvider` from `@robota-sdk/google`
206
+ *
207
+ * @example
208
+ * ```typescript
209
+ * import { OpenAIProvider } from '@robota-sdk/openai';
210
+ * import { AnthropicProvider } from '@robota-sdk/anthropic';
211
+ * import { GoogleProvider } from '@robota-sdk/google';
212
+ * ```
213
+ */
214
+ /**
215
+ * Resource and state management components for agent lifecycle.
216
+ * These managers handle creation, configuration, and coordination of agent resources.
217
+ *
218
+ * @public
219
+ */
220
+ export { AgentFactory, type IAgentFactoryOptions, type IAgentCreationStats, type IAgentLifecycleEvents } from './managers/agent-factory';
221
+ export { AgentTemplates, type ITemplateApplicationResult } from './managers/agent-templates';
222
+ export { ConversationHistory, ConversationSession } from './managers/conversation-history-manager';
223
+ /**
224
+ * Tool management and function calling infrastructure.
225
+ * Provides schema-based validation and execution for AI tool calls.
226
+ *
227
+ * @public
228
+ */
229
+ export { ToolRegistry } from './tools/registry/tool-registry';
230
+ export { FunctionTool, createFunctionTool, createZodFunctionTool } from './tools/implementations/function-tool';
231
+ /**
232
+ * Core type definitions for agent configuration and templates.
233
+ * These types provide modern TypeScript support for agent creation.
234
+ *
235
+ * @public
236
+ */
237
+ export type { IAgent, IAgentConfig, IAgentTemplate, IRunOptions } from './interfaces/agent';
238
+ /**
239
+ * Tool provider types for function calling integration.
240
+ * Provides type safety for tool implementations and schema validation.
241
+ *
242
+ * @public
243
+ */
244
+ export type { IToolSchema as IFunctionSchema } from './interfaces/provider';
245
+ /**
246
+ * Event history module contracts (optional service).
247
+ *
248
+ * @public
249
+ */
250
+ export type { IEventHistoryModule, IEventHistoryRecord, IEventHistorySnapshot } from './interfaces/history-module';
251
+ export { EventHistoryModule } from './services/history-module';
252
+ /**
253
+ * EventService - Unified event emission system for Team/Agent/Tool integration.
254
+ * Provides single event handler architecture for complete execution tracking.
255
+ *
256
+ * @public
257
+ */
258
+ export { IEventContext, IOwnerPathSegment, AbstractEventService, DEFAULT_ABSTRACT_EVENT_SERVICE, isDefaultEventService, bindEventServiceOwner, bindWithOwnerPath, DefaultEventService, StructuredEventService, ObservableEventService, composeEventName, } from './services/event-service';
259
+ export type { IEventService, TEventListener } from './services/event-service';
260
+ export type { IBaseEventData } from './services/event-service';
261
+ export { RelayMcpTool, type IRelayMcpOptions, type IRelayMcpContext } from './tools/implementations/relay-mcp-tool';
262
+ export { EVENT_EMITTER_EVENTS } from './plugins/event-emitter/types';
263
+ export type { IEventEmitterPlugin } from './plugins/event-emitter/types';
264
+ export { InMemoryEventEmitterMetrics } from './plugins/event-emitter/metrics';
265
+ export type { IEventEmitterMetrics, IEventEmitterMetricsSnapshot } from './plugins/event-emitter/metrics';
266
+ export { EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX } from './services/execution-service';
267
+ export { TOOL_EVENTS, TOOL_EVENT_PREFIX } from './services/tool-execution-service';
268
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX } from './agents/constants';
269
+ export { TASK_EVENTS, TASK_EVENT_PREFIX } from './services/task-events';
270
+ export { USER_EVENTS, USER_EVENT_PREFIX } from './services/user-events';
271
+ export type { IWorkflowConverter, IWorkflowConversionOptions, IWorkflowConversionResult, IWorkflowData, IWorkflowConfig, IWorkflowMetadata } from './interfaces/workflow-converter';
272
+ export type { IWorkflowValidator, IValidationOptions, IValidationResult, IValidationIssue, ValidationSeverity } from './interfaces/workflow-validator';
273
+ export { ExecutionProxy, createExecutionProxy, withEventEmission } from './utils/execution-proxy';
274
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAGH;;;;;GAKG;AACH,cAAc,cAAc,CAAC;AAE7B;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,cAAc,aAAa,CAAC;AAE5B;;;;;GAKG;AACH,cAAc,SAAS,CAAC;AAGxB;;;;;GAKG;AACH,YAAY,EACR,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACd,MAAM,uBAAuB,CAAC;AAE/B;;;;;GAKG;AACH,YAAY,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,GACf,MAAM,oBAAoB,CAAC;AAE5B;;;;GAIG;AACH,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE7F;;;;;GAKG;AACH,YAAY,EACR,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,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EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAGpH,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,YAAY,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,YAAY,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAC;AAI1G,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAMxE,YAAY,EACR,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,aAAa,EACb,eAAe,EACf,iBAAiB,EACpB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EACR,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EACrB,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,235 @@
1
+ /**
2
+ * @fileoverview Robota SDK Agents Package - Comprehensive AI Agent Framework
3
+ *
4
+ * 🎯 Centralized node type management: domain-neutral workflow node type system
5
+ *
6
+ * The `@robota-sdk/agents` package provides a complete AI agent framework with support for
7
+ * multiple AI providers, tool calling, plugin systems, and streaming responses. This package
8
+ * provides a modern, modular architecture for building powerful AI applications.
9
+ *
10
+ * ## Key Features
11
+ *
12
+ * - **Multi-Provider Support**: OpenAI, Anthropic, Google, and custom AI providers
13
+ * - **Tool Calling**: Zod-based schema validation for function calls
14
+ * - **Plugin System**: Extensible lifecycle hooks for logging, analytics, error handling
15
+ * - **Streaming Responses**: Real-time response streaming from all providers
16
+ * - **Conversation Management**: Centralized history and session management
17
+ * - **Type Safety**: Full TypeScript support with strict type checking
18
+ * - **Modular Architecture**: Independent packages with clear separation of concerns
19
+ *
20
+ * ## Quick Start
21
+ *
22
+ * ```typescript
23
+ * import { Robota } from '@robota-sdk/agents';
24
+ * import { OpenAIProvider } from '@robota-sdk/openai';
25
+ *
26
+ * const robota = new Robota({
27
+ * name: 'MyAgent',
28
+ * aiProviders: {
29
+ * openai: new OpenAIProvider({ apiKey: 'sk-...' })
30
+ * },
31
+ * currentProvider: 'openai',
32
+ * currentModel: 'gpt-4'
33
+ * });
34
+ *
35
+ * const response = await robota.run('Hello, world!');
36
+ * console.log(response);
37
+ * ```
38
+ *
39
+ * ## Package Structure
40
+ *
41
+ * - **Core Agent**: `Robota` class for AI conversations
42
+ * - **Abstracts**: Base classes for extending functionality
43
+ * - **Interfaces**: TypeScript definitions for all components
44
+ * - **Plugins**: Extensible functionality (8+ built-in plugins)
45
+ * - **Tools**: Function calling and tool management
46
+ * - **Managers**: Resource and state management
47
+ * - **Utils**: Logging, error handling, validation utilities
48
+ *
49
+ * @public
50
+ * @packageDocumentation
51
+ */
52
+ // ===== CORE INTERFACES AND ABSTRACTS =====
53
+ /**
54
+ * Core interfaces defining the structure and contracts for all components.
55
+ * These provide type safety and enable extensibility throughout the framework.
56
+ *
57
+ * @public
58
+ */
59
+ export * from './interfaces';
60
+ /**
61
+ * 🎯 Centralized node type system (prevents arbitrary external custom node types)
62
+ *
63
+ * Provides domain-neutral, consistent workflow node types.
64
+ * Prevents external code from creating arbitrary node types and
65
+ * centralizes all node types through these constants.
66
+ *
67
+ * @public
68
+ */
69
+ /**
70
+ * Abstract base classes that provide common functionality and structure.
71
+ * Extend these classes to create custom agents, tools, plugins, and providers.
72
+ *
73
+ * @public
74
+ */
75
+ export * from './abstracts';
76
+ /**
77
+ * Utility functions for logging, error handling, validation, and other common tasks.
78
+ * These utilities ensure consistent behavior across all components.
79
+ *
80
+ * @public
81
+ */
82
+ export * from './utils';
83
+ /**
84
+ * Type guards for the canonical TUniversalMessage union.
85
+ *
86
+ * @public
87
+ */
88
+ export { isUserMessage, isAssistantMessage, isSystemMessage, isToolMessage } from './interfaces/messages';
89
+ /**
90
+ * Abstract AI provider implementation that all AI providers must extend.
91
+ * Provides common functionality for message conversion, error handling, and execution.
92
+ *
93
+ * @public
94
+ */
95
+ export { AbstractAIProvider } from './abstracts/abstract-ai-provider';
96
+ /**
97
+ * Executor implementations for local and remote AI provider execution
98
+ *
99
+ * @public
100
+ */
101
+ export { LocalExecutor } from './executors/local-executor';
102
+ export { AbstractExecutor } from './abstracts/abstract-executor';
103
+ /**
104
+ * Centralized logger instance with configurable levels and output targets.
105
+ * Use this for consistent logging across all components.
106
+ *
107
+ * @public
108
+ */
109
+ export { logger, SilentLogger } from './utils/logger';
110
+ // ===== PLUGIN SYSTEM EXPORTS =====
111
+ /**
112
+ * Core plugins providing essential functionality through lifecycle hooks.
113
+ * These plugins can be combined to create powerful, extensible agent behaviors.
114
+ *
115
+ * ## Available Plugins:
116
+ * - **ConversationHistoryPlugin**: Persistent conversation storage
117
+ * - **LoggingPlugin**: Configurable logging with multiple strategies
118
+ * - **UsagePlugin**: Token usage and cost tracking
119
+ * - **PerformancePlugin**: Performance metrics and monitoring
120
+ * - **ExecutionPlugin**: Execution analytics and insights
121
+ * - **ErrorHandlingPlugin**: Error recovery and retry logic
122
+ * - **LimitsPlugin**: Rate limiting and resource control
123
+ * - **EventEmitterPlugin**: Event-driven plugin communication
124
+ * - **WebhookPlugin**: External system notifications
125
+ *
126
+ * @public
127
+ */
128
+ export * from './plugins/conversation-history';
129
+ export * from './plugins/logging';
130
+ export * from './plugins/usage';
131
+ export * from './plugins/performance';
132
+ export * from './plugins/execution';
133
+ export { ErrorHandlingPlugin } from './plugins/error-handling/index';
134
+ /**
135
+ * Additional specialized plugins for advanced use cases.
136
+ *
137
+ * @public
138
+ */
139
+ export { LimitsPlugin } from './plugins/limits-plugin';
140
+ export { EventEmitterPlugin } from './plugins/event-emitter-plugin';
141
+ export { WebhookPlugin } from './plugins/webhook';
142
+ // ===== CORE AGENT EXPORTS =====
143
+ /**
144
+ * The Robota agent class.
145
+ * This is the primary entry point for creating AI agents.
146
+ *
147
+ * @example Basic Usage
148
+ * ```typescript
149
+ * import { Robota, type TAgentConfig } from '@robota-sdk/agents';
150
+ *
151
+ * const config: AgentConfig = {
152
+ * name: 'Assistant',
153
+ * aiProviders: [provider],
154
+ * defaultModel: {
155
+ * provider: 'openai',
156
+ * model: 'gpt-4'
157
+ * }
158
+ * };
159
+ *
160
+ * const agent = new Robota(config);
161
+ * ```
162
+ *
163
+ * @public
164
+ */
165
+ export { Robota } from './core/robota';
166
+ // ===== PROVIDER COMPATIBILITY NOTICE =====
167
+ /**
168
+ * **Important**: Provider implementations are no longer re-exported to prevent circular dependencies.
169
+ *
170
+ * Import AI providers directly from their respective packages:
171
+ * - `OpenAIProvider` from `@robota-sdk/openai`
172
+ * - `AnthropicProvider` from `@robota-sdk/anthropic`
173
+ * - `GoogleProvider` from `@robota-sdk/google`
174
+ *
175
+ * @example
176
+ * ```typescript
177
+ * import { OpenAIProvider } from '@robota-sdk/openai';
178
+ * import { AnthropicProvider } from '@robota-sdk/anthropic';
179
+ * import { GoogleProvider } from '@robota-sdk/google';
180
+ * ```
181
+ */
182
+ // ===== MANAGER EXPORTS =====
183
+ /**
184
+ * Resource and state management components for agent lifecycle.
185
+ * These managers handle creation, configuration, and coordination of agent resources.
186
+ *
187
+ * @public
188
+ */
189
+ export { AgentFactory } from './managers/agent-factory';
190
+ export { AgentTemplates } from './managers/agent-templates';
191
+ export { ConversationHistory, ConversationSession } from './managers/conversation-history-manager';
192
+ // ===== TOOL SYSTEM EXPORTS =====
193
+ /**
194
+ * Tool management and function calling infrastructure.
195
+ * Provides schema-based validation and execution for AI tool calls.
196
+ *
197
+ * @public
198
+ */
199
+ export { ToolRegistry } from './tools/registry/tool-registry';
200
+ export { FunctionTool, createFunctionTool, createZodFunctionTool } from './tools/implementations/function-tool';
201
+ export { EventHistoryModule } from './services/history-module';
202
+ // ===== EVENT SERVICE EXPORTS =====
203
+ /**
204
+ * EventService - Unified event emission system for Team/Agent/Tool integration.
205
+ * Provides single event handler architecture for complete execution tracking.
206
+ *
207
+ * @public
208
+ */
209
+ export { AbstractEventService, DEFAULT_ABSTRACT_EVENT_SERVICE, isDefaultEventService, bindEventServiceOwner, bindWithOwnerPath, DefaultEventService, StructuredEventService, ObservableEventService, composeEventName, } from './services/event-service';
210
+ export { RelayMcpTool } from './tools/implementations/relay-mcp-tool';
211
+ // ===== EVENT EMITTER (PLUGIN) EXPORTS =====
212
+ export { EVENT_EMITTER_EVENTS } from './plugins/event-emitter/types';
213
+ export { InMemoryEventEmitterMetrics } from './plugins/event-emitter/metrics';
214
+ // ===== EVENT CONSTANT EXPORTS (PUBLIC) =====
215
+ // NOTE: These are the single source of truth for event names. Do not hardcode strings.
216
+ export { EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX } from './services/execution-service';
217
+ export { TOOL_EVENTS, TOOL_EVENT_PREFIX } from './services/tool-execution-service';
218
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX } from './agents/constants';
219
+ export { TASK_EVENTS, TASK_EVENT_PREFIX } from './services/task-events';
220
+ export { USER_EVENTS, USER_EVENT_PREFIX } from './services/user-events';
221
+ // NOTE: Universal workflow conversion/validation/layout/visualization exports were removed from @robota-sdk/agents.
222
+ // Ownership is @robota-sdk/workflow. Agents must not depend on workflow to avoid circular package dependencies.
223
+ // EventServiceHookFactory removed - simplified architecture
224
+ export { ExecutionProxy, createExecutionProxy, withEventEmission } from './utils/execution-proxy';
225
+ // ExecutionHierarchyTracker removed
226
+ // ================================
227
+ // Real-Time System (Phase 3)
228
+ // ================================
229
+ // Real-Time React-Flow Generator - MOVED to apps/web/src/lib/workflow-visualization
230
+ // These exports have been moved to maintain clean architecture separation
231
+ // Real-Time Event Integration - MOVED to apps/web due to React-Flow dependencies
232
+ // Performance Optimizer - MOVED to apps/web/src/lib/workflow-visualization
233
+ // These exports have been moved to maintain clean architecture separation
234
+ // Real-Time System Integration Test - MOVED to apps/web due to React-Flow dependencies
235
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,4CAA4C;AAC5C;;;;;GAKG;AACH,cAAc,cAAc,CAAC;AAE7B;;;;;;;;GAQG;AAEH;;;;;GAKG;AACH,cAAc,aAAa,CAAC;AAE5B;;;;;GAKG;AACH,cAAc,SAAS,CAAC;AAgDxB;;;;GAIG;AACH,OAAO,EACH,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,aAAa,EAChB,MAAM,uBAAuB,CAAC;AAS/B;;;;;GAKG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAEtE;;;;GAIG;AACH,OAAO,EAAE,aAAa,EAA4B,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAajE;;;;;GAKG;AACH,OAAO,EAAE,MAAM,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAEpE,oCAAoC;AACpC;;;;;;;;;;;;;;;;GAgBG;AACH,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAuD,MAAM,gCAAgC,CAAC;AAE1H;;;;GAIG;AACH,OA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