@robota-sdk/agent-core 3.0.0-beta.7 → 3.0.0-beta.71

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 (511) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/README.md +41 -12
  3. package/dist/browser/index.d.ts +3736 -3090
  4. package/dist/browser/index.d.ts.map +1 -0
  5. package/dist/browser/index.js +12 -5
  6. package/dist/browser/index.js.map +1 -0
  7. package/dist/node/index.cjs +11 -5
  8. package/dist/node/index.d.ts +3736 -3090
  9. package/dist/node/index.d.ts.map +1 -0
  10. package/dist/node/index.js +12 -5
  11. package/dist/node/index.js.map +1 -0
  12. package/package.json +8 -5
  13. package/dist/abstracts/abstract-agent.d.ts +0 -56
  14. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  15. package/dist/abstracts/abstract-agent.js +0 -55
  16. package/dist/abstracts/abstract-agent.js.map +0 -1
  17. package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
  18. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  19. package/dist/abstracts/abstract-ai-provider.js +0 -252
  20. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  21. package/dist/abstracts/abstract-executor.d.ts +0 -110
  22. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  23. package/dist/abstracts/abstract-executor.js +0 -156
  24. package/dist/abstracts/abstract-executor.js.map +0 -1
  25. package/dist/abstracts/abstract-manager.d.ts +0 -42
  26. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  27. package/dist/abstracts/abstract-manager.js +0 -49
  28. package/dist/abstracts/abstract-manager.js.map +0 -1
  29. package/dist/abstracts/abstract-module.d.ts +0 -365
  30. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  31. package/dist/abstracts/abstract-module.js +0 -474
  32. package/dist/abstracts/abstract-module.js.map +0 -1
  33. package/dist/abstracts/abstract-plugin.d.ts +0 -369
  34. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  35. package/dist/abstracts/abstract-plugin.js +0 -258
  36. package/dist/abstracts/abstract-plugin.js.map +0 -1
  37. package/dist/abstracts/abstract-tool.d.ts +0 -175
  38. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  39. package/dist/abstracts/abstract-tool.js +0 -140
  40. package/dist/abstracts/abstract-tool.js.map +0 -1
  41. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  42. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  43. package/dist/abstracts/abstract-workflow-converter.js +0 -252
  44. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  45. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
  46. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  47. package/dist/abstracts/abstract-workflow-validator.js +0 -447
  48. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  49. package/dist/abstracts/index.d.ts +0 -6
  50. package/dist/abstracts/index.d.ts.map +0 -1
  51. package/dist/abstracts/index.js +0 -9
  52. package/dist/abstracts/index.js.map +0 -1
  53. package/dist/agents/constants.d.ts +0 -23
  54. package/dist/agents/constants.d.ts.map +0 -1
  55. package/dist/agents/constants.js +0 -22
  56. package/dist/agents/constants.js.map +0 -1
  57. package/dist/agents/index.d.ts +0 -1
  58. package/dist/agents/index.d.ts.map +0 -1
  59. package/dist/agents/index.js +0 -4
  60. package/dist/agents/index.js.map +0 -1
  61. package/dist/agents/robota.test.d.ts +0 -2
  62. package/dist/agents/robota.test.d.ts.map +0 -1
  63. package/dist/agents/robota.test.js +0 -416
  64. package/dist/agents/robota.test.js.map +0 -1
  65. package/dist/browser/builtin-templates.json +0 -107
  66. package/dist/core/robota.d.ts +0 -694
  67. package/dist/core/robota.d.ts.map +0 -1
  68. package/dist/core/robota.js +0 -1277
  69. package/dist/core/robota.js.map +0 -1
  70. package/dist/executors/local-executor.d.ts +0 -96
  71. package/dist/executors/local-executor.d.ts.map +0 -1
  72. package/dist/executors/local-executor.js +0 -197
  73. package/dist/executors/local-executor.js.map +0 -1
  74. package/dist/executors/local-executor.test.d.ts +0 -2
  75. package/dist/executors/local-executor.test.d.ts.map +0 -1
  76. package/dist/executors/local-executor.test.js +0 -192
  77. package/dist/executors/local-executor.test.js.map +0 -1
  78. package/dist/index.d.ts +0 -274
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js +0 -235
  81. package/dist/index.js.map +0 -1
  82. package/dist/interfaces/agent.d.ts +0 -198
  83. package/dist/interfaces/agent.d.ts.map +0 -1
  84. package/dist/interfaces/agent.js +0 -2
  85. package/dist/interfaces/agent.js.map +0 -1
  86. package/dist/interfaces/event-service.d.ts +0 -79
  87. package/dist/interfaces/event-service.d.ts.map +0 -1
  88. package/dist/interfaces/event-service.js +0 -2
  89. package/dist/interfaces/event-service.js.map +0 -1
  90. package/dist/interfaces/executor.d.ts +0 -128
  91. package/dist/interfaces/executor.d.ts.map +0 -1
  92. package/dist/interfaces/executor.js +0 -2
  93. package/dist/interfaces/executor.js.map +0 -1
  94. package/dist/interfaces/history-module.d.ts +0 -19
  95. package/dist/interfaces/history-module.d.ts.map +0 -1
  96. package/dist/interfaces/history-module.js +0 -2
  97. package/dist/interfaces/history-module.js.map +0 -1
  98. package/dist/interfaces/index.d.ts +0 -13
  99. package/dist/interfaces/index.d.ts.map +0 -1
  100. package/dist/interfaces/index.js +0 -4
  101. package/dist/interfaces/index.js.map +0 -1
  102. package/dist/interfaces/manager.d.ts +0 -142
  103. package/dist/interfaces/manager.d.ts.map +0 -1
  104. package/dist/interfaces/manager.js +0 -2
  105. package/dist/interfaces/manager.js.map +0 -1
  106. package/dist/interfaces/messages.d.ts +0 -75
  107. package/dist/interfaces/messages.d.ts.map +0 -1
  108. package/dist/interfaces/messages.js +0 -29
  109. package/dist/interfaces/messages.js.map +0 -1
  110. package/dist/interfaces/progress-reporting.d.ts +0 -86
  111. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  112. package/dist/interfaces/progress-reporting.js +0 -37
  113. package/dist/interfaces/progress-reporting.js.map +0 -1
  114. package/dist/interfaces/provider.d.ts +0 -217
  115. package/dist/interfaces/provider.d.ts.map +0 -1
  116. package/dist/interfaces/provider.js +0 -2
  117. package/dist/interfaces/provider.js.map +0 -1
  118. package/dist/interfaces/service.d.ts +0 -205
  119. package/dist/interfaces/service.d.ts.map +0 -1
  120. package/dist/interfaces/service.js +0 -6
  121. package/dist/interfaces/service.js.map +0 -1
  122. package/dist/interfaces/tool.d.ts +0 -248
  123. package/dist/interfaces/tool.d.ts.map +0 -1
  124. package/dist/interfaces/tool.js +0 -2
  125. package/dist/interfaces/tool.js.map +0 -1
  126. package/dist/interfaces/types.d.ts +0 -71
  127. package/dist/interfaces/types.d.ts.map +0 -1
  128. package/dist/interfaces/types.js +0 -33
  129. package/dist/interfaces/types.js.map +0 -1
  130. package/dist/interfaces/workflow-converter.d.ts +0 -193
  131. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  132. package/dist/interfaces/workflow-converter.js +0 -11
  133. package/dist/interfaces/workflow-converter.js.map +0 -1
  134. package/dist/interfaces/workflow-validator.d.ts +0 -209
  135. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  136. package/dist/interfaces/workflow-validator.js +0 -16
  137. package/dist/interfaces/workflow-validator.js.map +0 -1
  138. package/dist/managers/agent-factory.d.ts +0 -132
  139. package/dist/managers/agent-factory.d.ts.map +0 -1
  140. package/dist/managers/agent-factory.js +0 -284
  141. package/dist/managers/agent-factory.js.map +0 -1
  142. package/dist/managers/agent-factory.test.d.ts +0 -2
  143. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  144. package/dist/managers/agent-factory.test.js +0 -249
  145. package/dist/managers/agent-factory.test.js.map +0 -1
  146. package/dist/managers/agent-templates.d.ts +0 -84
  147. package/dist/managers/agent-templates.d.ts.map +0 -1
  148. package/dist/managers/agent-templates.js +0 -159
  149. package/dist/managers/agent-templates.js.map +0 -1
  150. package/dist/managers/ai-provider-manager.d.ts +0 -80
  151. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  152. package/dist/managers/ai-provider-manager.js +0 -226
  153. package/dist/managers/ai-provider-manager.js.map +0 -1
  154. package/dist/managers/conversation-history-manager.d.ts +0 -455
  155. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  156. package/dist/managers/conversation-history-manager.js +0 -578
  157. package/dist/managers/conversation-history-manager.js.map +0 -1
  158. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  159. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  160. package/dist/managers/conversation-history-manager.test.js +0 -374
  161. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  162. package/dist/managers/index.d.ts +0 -8
  163. package/dist/managers/index.d.ts.map +0 -1
  164. package/dist/managers/index.js +0 -8
  165. package/dist/managers/index.js.map +0 -1
  166. package/dist/managers/module-registry.d.ts +0 -161
  167. package/dist/managers/module-registry.d.ts.map +0 -1
  168. package/dist/managers/module-registry.js +0 -519
  169. package/dist/managers/module-registry.js.map +0 -1
  170. package/dist/managers/module-type-registry.d.ts +0 -113
  171. package/dist/managers/module-type-registry.d.ts.map +0 -1
  172. package/dist/managers/module-type-registry.js +0 -439
  173. package/dist/managers/module-type-registry.js.map +0 -1
  174. package/dist/managers/plugins.d.ts +0 -166
  175. package/dist/managers/plugins.d.ts.map +0 -1
  176. package/dist/managers/plugins.js +0 -339
  177. package/dist/managers/plugins.js.map +0 -1
  178. package/dist/managers/tool-manager.d.ts +0 -70
  179. package/dist/managers/tool-manager.d.ts.map +0 -1
  180. package/dist/managers/tool-manager.js +0 -138
  181. package/dist/managers/tool-manager.js.map +0 -1
  182. package/dist/managers/tool-manager.test.d.ts +0 -2
  183. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  184. package/dist/managers/tool-manager.test.js +0 -186
  185. package/dist/managers/tool-manager.test.js.map +0 -1
  186. package/dist/node/builtin-templates.json +0 -107
  187. package/dist/node/index.d.cts +0 -4238
  188. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  189. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  190. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  191. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  192. package/dist/plugins/conversation-history/index.d.ts +0 -3
  193. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  194. package/dist/plugins/conversation-history/index.js +0 -2
  195. package/dist/plugins/conversation-history/index.js.map +0 -1
  196. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  197. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  198. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  199. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  200. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  201. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  202. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  203. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  204. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  205. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  206. package/dist/plugins/conversation-history/storages/index.js +0 -4
  207. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  208. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  209. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  210. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  211. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  212. package/dist/plugins/conversation-history/types.d.ts +0 -61
  213. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  214. package/dist/plugins/conversation-history/types.js +0 -2
  215. package/dist/plugins/conversation-history/types.js.map +0 -1
  216. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  217. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  218. package/dist/plugins/error-handling/context-adapter.js +0 -41
  219. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  220. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  221. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  222. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  223. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  224. package/dist/plugins/error-handling/index.d.ts +0 -10
  225. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  226. package/dist/plugins/error-handling/index.js +0 -10
  227. package/dist/plugins/error-handling/index.js.map +0 -1
  228. package/dist/plugins/error-handling/types.d.ts +0 -73
  229. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  230. package/dist/plugins/error-handling/types.js +0 -14
  231. package/dist/plugins/error-handling/types.js.map +0 -1
  232. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  233. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  234. package/dist/plugins/event-emitter/metrics.js +0 -17
  235. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  236. package/dist/plugins/event-emitter/types.d.ts +0 -112
  237. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  238. package/dist/plugins/event-emitter/types.js +0 -65
  239. package/dist/plugins/event-emitter/types.js.map +0 -1
  240. package/dist/plugins/event-emitter-plugin.d.ts +0 -222
  241. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  242. package/dist/plugins/event-emitter-plugin.js +0 -432
  243. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  244. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  245. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  246. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  247. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  248. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  249. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  250. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  251. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  252. package/dist/plugins/execution/index.d.ts +0 -3
  253. package/dist/plugins/execution/index.d.ts.map +0 -1
  254. package/dist/plugins/execution/index.js +0 -2
  255. package/dist/plugins/execution/index.js.map +0 -1
  256. package/dist/plugins/execution/types.d.ts +0 -90
  257. package/dist/plugins/execution/types.d.ts.map +0 -1
  258. package/dist/plugins/execution/types.js +0 -2
  259. package/dist/plugins/execution/types.js.map +0 -1
  260. package/dist/plugins/index.d.ts +0 -10
  261. package/dist/plugins/index.d.ts.map +0 -1
  262. package/dist/plugins/index.js +0 -11
  263. package/dist/plugins/index.js.map +0 -1
  264. package/dist/plugins/limits/types.d.ts +0 -61
  265. package/dist/plugins/limits/types.d.ts.map +0 -1
  266. package/dist/plugins/limits/types.js +0 -2
  267. package/dist/plugins/limits/types.js.map +0 -1
  268. package/dist/plugins/limits-plugin.d.ts +0 -113
  269. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  270. package/dist/plugins/limits-plugin.js +0 -380
  271. package/dist/plugins/limits-plugin.js.map +0 -1
  272. package/dist/plugins/logging/formatters.d.ts +0 -14
  273. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  274. package/dist/plugins/logging/formatters.js +0 -24
  275. package/dist/plugins/logging/formatters.js.map +0 -1
  276. package/dist/plugins/logging/index.d.ts +0 -3
  277. package/dist/plugins/logging/index.d.ts.map +0 -1
  278. package/dist/plugins/logging/index.js +0 -2
  279. package/dist/plugins/logging/index.js.map +0 -1
  280. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  281. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  282. package/dist/plugins/logging/logging-plugin.js +0 -335
  283. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  284. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  285. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  286. package/dist/plugins/logging/storages/console-storage.js +0 -38
  287. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  288. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  289. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  290. package/dist/plugins/logging/storages/file-storage.js +0 -41
  291. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  292. package/dist/plugins/logging/storages/index.d.ts +0 -5
  293. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  294. package/dist/plugins/logging/storages/index.js +0 -5
  295. package/dist/plugins/logging/storages/index.js.map +0 -1
  296. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  297. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  298. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  299. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  300. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  301. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  302. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  303. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  304. package/dist/plugins/logging/types.d.ts +0 -84
  305. package/dist/plugins/logging/types.d.ts.map +0 -1
  306. package/dist/plugins/logging/types.js +0 -2
  307. package/dist/plugins/logging/types.js.map +0 -1
  308. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  309. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  310. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  311. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  312. package/dist/plugins/performance/index.d.ts +0 -5
  313. package/dist/plugins/performance/index.d.ts.map +0 -1
  314. package/dist/plugins/performance/index.js +0 -4
  315. package/dist/plugins/performance/index.js.map +0 -1
  316. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  317. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  318. package/dist/plugins/performance/performance-plugin.js +0 -293
  319. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  320. package/dist/plugins/performance/storages/index.d.ts +0 -2
  321. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  322. package/dist/plugins/performance/storages/index.js +0 -4
  323. package/dist/plugins/performance/storages/index.js.map +0 -1
  324. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  325. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  326. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  327. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  328. package/dist/plugins/performance/types.d.ts +0 -154
  329. package/dist/plugins/performance/types.d.ts.map +0 -1
  330. package/dist/plugins/performance/types.js +0 -2
  331. package/dist/plugins/performance/types.js.map +0 -1
  332. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  333. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  334. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  335. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  336. package/dist/plugins/usage/index.d.ts +0 -5
  337. package/dist/plugins/usage/index.d.ts.map +0 -1
  338. package/dist/plugins/usage/index.js +0 -4
  339. package/dist/plugins/usage/index.js.map +0 -1
  340. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  341. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  342. package/dist/plugins/usage/storages/file-storage.js +0 -111
  343. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  344. package/dist/plugins/usage/storages/index.d.ts +0 -5
  345. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  346. package/dist/plugins/usage/storages/index.js +0 -5
  347. package/dist/plugins/usage/storages/index.js.map +0 -1
  348. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  349. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  350. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  351. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  352. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  353. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  354. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  355. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  356. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  357. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  358. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  359. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  360. package/dist/plugins/usage/types.d.ts +0 -127
  361. package/dist/plugins/usage/types.d.ts.map +0 -1
  362. package/dist/plugins/usage/types.js +0 -2
  363. package/dist/plugins/usage/types.js.map +0 -1
  364. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  365. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  366. package/dist/plugins/usage/usage-plugin.js +0 -309
  367. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  368. package/dist/plugins/webhook/http-client.d.ts +0 -30
  369. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  370. package/dist/plugins/webhook/http-client.js +0 -110
  371. package/dist/plugins/webhook/http-client.js.map +0 -1
  372. package/dist/plugins/webhook/index.d.ts +0 -9
  373. package/dist/plugins/webhook/index.d.ts.map +0 -1
  374. package/dist/plugins/webhook/index.js +0 -9
  375. package/dist/plugins/webhook/index.js.map +0 -1
  376. package/dist/plugins/webhook/transformer.d.ts +0 -63
  377. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  378. package/dist/plugins/webhook/transformer.js +0 -157
  379. package/dist/plugins/webhook/transformer.js.map +0 -1
  380. package/dist/plugins/webhook/types.d.ts +0 -183
  381. package/dist/plugins/webhook/types.d.ts.map +0 -1
  382. package/dist/plugins/webhook/types.js +0 -2
  383. package/dist/plugins/webhook/types.js.map +0 -1
  384. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  385. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  386. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  387. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  388. package/dist/schemas/agent-template-schema.d.ts +0 -137
  389. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  390. package/dist/schemas/agent-template-schema.js +0 -87
  391. package/dist/schemas/agent-template-schema.js.map +0 -1
  392. package/dist/services/conversation-service/index.d.ts +0 -88
  393. package/dist/services/conversation-service/index.d.ts.map +0 -1
  394. package/dist/services/conversation-service/index.js +0 -441
  395. package/dist/services/conversation-service/index.js.map +0 -1
  396. package/dist/services/conversation-service/types.d.ts +0 -32
  397. package/dist/services/conversation-service/types.d.ts.map +0 -1
  398. package/dist/services/conversation-service/types.js +0 -8
  399. package/dist/services/conversation-service/types.js.map +0 -1
  400. package/dist/services/event-service.d.ts +0 -61
  401. package/dist/services/event-service.d.ts.map +0 -1
  402. package/dist/services/event-service.js +0 -110
  403. package/dist/services/event-service.js.map +0 -1
  404. package/dist/services/event-service.test.d.ts +0 -2
  405. package/dist/services/event-service.test.d.ts.map +0 -1
  406. package/dist/services/event-service.test.js +0 -86
  407. package/dist/services/event-service.test.js.map +0 -1
  408. package/dist/services/execution-service.d.ts +0 -151
  409. package/dist/services/execution-service.d.ts.map +0 -1
  410. package/dist/services/execution-service.js +0 -1262
  411. package/dist/services/execution-service.js.map +0 -1
  412. package/dist/services/execution-service.test.d.ts +0 -2
  413. package/dist/services/execution-service.test.d.ts.map +0 -1
  414. package/dist/services/execution-service.test.js +0 -338
  415. package/dist/services/execution-service.test.js.map +0 -1
  416. package/dist/services/history-module.d.ts +0 -15
  417. package/dist/services/history-module.d.ts.map +0 -1
  418. package/dist/services/history-module.js +0 -42
  419. package/dist/services/history-module.js.map +0 -1
  420. package/dist/services/in-memory-history-store.d.ts +0 -12
  421. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  422. package/dist/services/in-memory-history-store.js +0 -41
  423. package/dist/services/in-memory-history-store.js.map +0 -1
  424. package/dist/services/index.d.ts +0 -7
  425. package/dist/services/index.d.ts.map +0 -1
  426. package/dist/services/index.js +0 -13
  427. package/dist/services/index.js.map +0 -1
  428. package/dist/services/task-events.d.ts +0 -6
  429. package/dist/services/task-events.d.ts.map +0 -1
  430. package/dist/services/task-events.js +0 -6
  431. package/dist/services/task-events.js.map +0 -1
  432. package/dist/services/tool-execution-service.d.ts +0 -74
  433. package/dist/services/tool-execution-service.d.ts.map +0 -1
  434. package/dist/services/tool-execution-service.js +0 -189
  435. package/dist/services/tool-execution-service.js.map +0 -1
  436. package/dist/services/user-events.d.ts +0 -7
  437. package/dist/services/user-events.d.ts.map +0 -1
  438. package/dist/services/user-events.js +0 -6
  439. package/dist/services/user-events.js.map +0 -1
  440. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  441. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  442. package/dist/tools/implementations/function-tool/index.js +0 -13
  443. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  444. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  445. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  446. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  447. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  448. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  449. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  450. package/dist/tools/implementations/function-tool/types.js +0 -14
  451. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  452. package/dist/tools/implementations/function-tool.d.ts +0 -49
  453. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  454. package/dist/tools/implementations/function-tool.js +0 -223
  455. package/dist/tools/implementations/function-tool.js.map +0 -1
  456. package/dist/tools/implementations/index.d.ts +0 -4
  457. package/dist/tools/implementations/index.d.ts.map +0 -1
  458. package/dist/tools/implementations/index.js +0 -5
  459. package/dist/tools/implementations/index.js.map +0 -1
  460. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  461. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  462. package/dist/tools/implementations/mcp-tool.js +0 -246
  463. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  464. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  465. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  466. package/dist/tools/implementations/openapi-tool.js +0 -324
  467. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  468. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  469. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  470. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  471. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  472. package/dist/tools/index.d.ts +0 -3
  473. package/dist/tools/index.d.ts.map +0 -1
  474. package/dist/tools/index.js +0 -4
  475. package/dist/tools/index.js.map +0 -1
  476. package/dist/tools/registry/index.d.ts +0 -2
  477. package/dist/tools/registry/index.d.ts.map +0 -1
  478. package/dist/tools/registry/index.js +0 -3
  479. package/dist/tools/registry/index.js.map +0 -1
  480. package/dist/tools/registry/tool-registry.d.ts +0 -54
  481. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  482. package/dist/tools/registry/tool-registry.js +0 -146
  483. package/dist/tools/registry/tool-registry.js.map +0 -1
  484. package/dist/utils/errors.d.ts +0 -155
  485. package/dist/utils/errors.d.ts.map +0 -1
  486. package/dist/utils/errors.js +0 -203
  487. package/dist/utils/errors.js.map +0 -1
  488. package/dist/utils/execution-proxy.d.ts +0 -75
  489. package/dist/utils/execution-proxy.d.ts.map +0 -1
  490. package/dist/utils/execution-proxy.js +0 -230
  491. package/dist/utils/execution-proxy.js.map +0 -1
  492. package/dist/utils/index.d.ts +0 -11
  493. package/dist/utils/index.d.ts.map +0 -1
  494. package/dist/utils/index.js +0 -7
  495. package/dist/utils/index.js.map +0 -1
  496. package/dist/utils/logger.d.ts +0 -74
  497. package/dist/utils/logger.d.ts.map +0 -1
  498. package/dist/utils/logger.js +0 -143
  499. package/dist/utils/logger.js.map +0 -1
  500. package/dist/utils/message-converter.d.ts +0 -68
  501. package/dist/utils/message-converter.d.ts.map +0 -1
  502. package/dist/utils/message-converter.js +0 -87
  503. package/dist/utils/message-converter.js.map +0 -1
  504. package/dist/utils/periodic-task.d.ts +0 -14
  505. package/dist/utils/periodic-task.d.ts.map +0 -1
  506. package/dist/utils/periodic-task.js +0 -26
  507. package/dist/utils/periodic-task.js.map +0 -1
  508. package/dist/utils/validation.d.ts +0 -40
  509. package/dist/utils/validation.d.ts.map +0 -1
  510. package/dist/utils/validation.js +0 -162
  511. package/dist/utils/validation.js.map +0 -1
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@robota-sdk/agent-core",
3
- "version": "3.0.0-beta.7",
3
+ "version": "3.0.0-beta.71",
4
4
  "description": "Complete AI agent implementation with unified core and tools functionality - conversation management, plugin system, and advanced agent features",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.js",
7
- "module": "dist/node/index.mjs",
8
7
  "types": "dist/node/index.d.ts",
9
8
  "exports": {
10
9
  ".": {
11
10
  "types": "./dist/node/index.d.ts",
11
+ "source": "./src/index.ts",
12
12
  "node": {
13
13
  "import": "./dist/node/index.js",
14
14
  "require": "./dist/node/index.cjs"
@@ -79,7 +79,7 @@
79
79
  "eslint": "^8.56.0",
80
80
  "openapi-types": "^12.1.3",
81
81
  "rimraf": "^5.0.5",
82
- "tsup": "^8.0.1",
82
+ "tsdown": "^0.22.0",
83
83
  "typescript": "^5.3.3",
84
84
  "vitest": "^1.1.0"
85
85
  },
@@ -87,15 +87,18 @@
87
87
  "access": "public"
88
88
  },
89
89
  "scripts": {
90
- "build": "tsup",
90
+ "build": "tsdown",
91
+ "build:js": "tsdown --no-dts",
92
+ "build:types": "tsdown --dts",
91
93
  "dev": "tsup --watch",
92
94
  "clean": "rimraf dist",
93
95
  "test": "vitest run --passWithNoTests",
94
96
  "test:watch": "vitest",
95
97
  "test:coverage": "vitest run --coverage",
96
98
  "lint": "eslint src --ext .ts,.tsx",
99
+ "typecheck": "tsc -p tsconfig.json --noEmit",
97
100
  "lint:fix": "eslint src --ext .ts,.tsx --fix",
98
101
  "scenario:verify": "pnpm exec tsx examples/verify-offline.ts",
99
- "scenario:record": "node ../../scripts/harness/record-owner-scenario.mjs --scope packages/agents --output examples/scenarios/offline-verify.record.json -- pnpm scenario:verify"
102
+ "scenario:record": "node ../../scripts/harness/record-owner-scenario.mjs --scope packages/agent-core --output examples/scenarios/offline-verify.record.json -- pnpm scenario:verify"
100
103
  }
101
104
  }
@@ -1,56 +0,0 @@
1
- /**
2
- * @fileoverview Abstract Agent Base Class
3
- *
4
- * 🎯 ABSTRACT CLASS - DO NOT DEPEND ON CONCRETE IMPLEMENTATIONS
5
- *
6
- * This class defines the foundational lifecycle for agent implementations.
7
- * Subclasses provide provider/tool-specific behavior while inheriting the
8
- * shared guarantees around initialization, history, and disposal.
9
- */
10
- import type { IAgent, IAgentConfig, TUniversalMessage, IRunOptions } from '../interfaces/agent';
11
- export declare abstract class AbstractAgent<TConfig = IAgentConfig, TContext = IRunOptions, TMessage = TUniversalMessage> implements IAgent<TConfig, TContext, TMessage> {
12
- protected history: TMessage[];
13
- protected isInitialized: boolean;
14
- protected config?: TConfig;
15
- /**
16
- * Initialize the agent (subclass responsibility)
17
- */
18
- protected abstract initialize(): Promise<void>;
19
- /**
20
- * Configure the agent with type-safe configuration
21
- */
22
- configure(config: TConfig): Promise<void>;
23
- /**
24
- * Run agent with user input and type-safe context
25
- */
26
- abstract run(input: string, context?: TContext): Promise<string>;
27
- /**
28
- * Run agent with streaming response and type-safe context
29
- */
30
- abstract runStream(input: string, context?: TContext): AsyncGenerator<string, void, never>;
31
- /**
32
- * Get conversation history with type-safe messages
33
- */
34
- getHistory(): TMessage[];
35
- /**
36
- * Clear conversation history
37
- */
38
- clearHistory(): void;
39
- /**
40
- * Add message to history
41
- */
42
- protected addMessage(message: TMessage): void;
43
- /**
44
- * Validate user input
45
- */
46
- protected validateInput(input: string): void;
47
- /**
48
- * Ensure agent is initialized before running
49
- */
50
- protected ensureInitialized(): Promise<void>;
51
- /**
52
- * Cleanup resources
53
- */
54
- dispose(): Promise<void>;
55
- }
56
- //# sourceMappingURL=abstract-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-agent.d.ts","sourceRoot":"","sources":["../../src/abstracts/abstract-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEhG,8BAAsB,aAAa,CAC/B,OAAO,GAAG,YAAY,EACtB,QAAQ,GAAG,WAAW,EACtB,QAAQ,GAAG,iBAAiB,CAC9B,YAAW,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;IAC5C,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAM;IACnC,SAAS,CAAC,aAAa,UAAS;IAChC,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAE3B;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAE9C;;OAEG;IACG,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAK/C;;OAEG;IACH,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAEhE;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC;IAE1F;;OAEG;IACH,UAAU,IAAI,QAAQ,EAAE;IAIxB;;OAEG;IACH,YAAY,IAAI,IAAI;IAIpB;;OAEG;IACH,SAAS,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI;IAI7C;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAM5C;;OAEG;cACa,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAOlD;;OAEG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAIjC"}
@@ -1,55 +0,0 @@
1
- export class AbstractAgent {
2
- history = [];
3
- isInitialized = false;
4
- config;
5
- /**
6
- * Configure the agent with type-safe configuration
7
- */
8
- async configure(config) {
9
- this.config = config;
10
- await this.ensureInitialized();
11
- }
12
- /**
13
- * Get conversation history with type-safe messages
14
- */
15
- getHistory() {
16
- return [...this.history];
17
- }
18
- /**
19
- * Clear conversation history
20
- */
21
- clearHistory() {
22
- this.history = [];
23
- }
24
- /**
25
- * Add message to history
26
- */
27
- addMessage(message) {
28
- this.history.push(message);
29
- }
30
- /**
31
- * Validate user input
32
- */
33
- validateInput(input) {
34
- if (!input || typeof input !== 'string') {
35
- throw new Error('Input must be a non-empty string');
36
- }
37
- }
38
- /**
39
- * Ensure agent is initialized before running
40
- */
41
- async ensureInitialized() {
42
- if (!this.isInitialized) {
43
- await this.initialize();
44
- this.isInitialized = true;
45
- }
46
- }
47
- /**
48
- * Cleanup resources
49
- */
50
- async dispose() {
51
- this.clearHistory();
52
- this.isInitialized = false;
53
- }
54
- }
55
- //# sourceMappingURL=abstract-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-agent.js","sourceRoot":"","sources":["../../src/abstracts/abstract-agent.ts"],"names":[],"mappings":"AAWA,MAAM,OAAgB,aAAa;IAKrB,OAAO,GAAe,EAAE,CAAC;IACzB,aAAa,GAAG,KAAK,CAAC;IACtB,MAAM,CAAW;IAO3B;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,MAAe;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;IACnC,CAAC;IAYD;;OAEG;IACH,UAAU;QACN,OAAO,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,YAAY;QACR,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;IACtB,CAAC;IAED;;OAEG;IACO,UAAU,CAAC,OAAiB;QAClC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IAED;;OAEG;IACO,aAAa,CAAC,KAAa;QACjC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACxD,CAAC;IACL,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,iBAAiB;QAC7B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO;QACT,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;CACJ"}
@@ -1,187 +0,0 @@
1
- /**
2
- * @fileoverview Abstract AI Provider Base Class
3
- *
4
- * 🎯 ABSTRACT CLASS - DO NOT DEPEND ON CONCRETE IMPLEMENTATIONS
5
- *
6
- * Defines the shared contract and helper utilities for all AI provider implementations.
7
- * Concrete providers should extend this class and inject their own dependencies.
8
- */
9
- import type { IAIProvider, IToolSchema, IChatOptions, IProviderRequest, IRawProviderResponse } from '../interfaces/provider';
10
- import type { IExecutor } from '../interfaces/executor';
11
- import type { TUniversalMessage } from '../interfaces/messages';
12
- import type { ILogger } from '../utils/logger';
13
- /**
14
- * Provider logging data type
15
- * Used for storing logging information in provider operations
16
- */
17
- export type TProviderLoggingData = Record<string, string | number | boolean | Date | string[]>;
18
- /**
19
- * Provider configuration base interface
20
- */
21
- export interface IProviderConfig {
22
- apiKey?: string;
23
- baseUrl?: string;
24
- timeout?: number;
25
- [key: string]: string | number | boolean | undefined;
26
- }
27
- /**
28
- * Enhanced provider configuration that supports executor injection
29
- */
30
- export interface IExecutorAwareProviderConfig {
31
- apiKey?: string;
32
- baseUrl?: string;
33
- timeout?: number;
34
- /**
35
- * Optional executor for handling AI requests
36
- * When provided, the provider will delegate all chat operations to this executor
37
- * instead of making direct API calls. This enables remote execution capabilities.
38
- */
39
- executor?: IExecutor;
40
- [key: string]: string | number | boolean | IExecutor | undefined;
41
- }
42
- /**
43
- * Base AI provider implementation with proper type constraints
44
- * All AI providers should extend this class
45
- *
46
- * ========================================
47
- * CRITICAL IMPLEMENTATION GUIDELINES
48
- * ========================================
49
- *
50
- * ALL AI PROVIDER IMPLEMENTATIONS (OpenAI, Anthropic, Google, etc.) MUST:
51
- *
52
- * 1. EXTEND THIS CLASS:
53
- * ```typescript
54
- * export class OpenAIProvider extends AbstractAIProvider {
55
- * override readonly name = 'openai';
56
- * override readonly version = '1.0.0';
57
- * ```
58
- *
59
- * 2. USE IMPORTS FROM @robota-sdk/agents:
60
- * ```typescript
61
- * import { AbstractAIProvider } from '@robota-sdk/agents';
62
- * import type {
63
- * TUniversalMessage,
64
- * ChatOptions,
65
- * IToolCall,
66
- * ToolSchema,
67
- * AssistantMessage
68
- * } from '@robota-sdk/agents';
69
- * ```
70
- *
71
- * 3. USE OVERRIDE KEYWORD FOR ALL INHERITED METHODS:
72
- * - override async chat(...)
73
- * - override async *chatStream(...)
74
- * - override supportsTools()
75
- * - override validateConfig()
76
- * - override async dispose()
77
- *
78
- * 4. DO NOT REDEFINE TYPES THAT EXIST IN @robota-sdk/agents:
79
- * - TUniversalMessage
80
- * - ChatOptions
81
- * - IToolCall
82
- * - ToolSchema
83
- * - AssistantMessage
84
- * - SystemMessage
85
- * - UserMessage
86
- * - ToolMessage
87
- *
88
- * 5. HANDLE MESSAGE CONTENT PROPERLY:
89
- * - For tool calls: content should be null (not empty string)
90
- * - For regular messages: content can be string or null
91
- * - Always preserve null values from API responses
92
- *
93
- * 6. CALL SUPER() IN CONSTRUCTOR:
94
- * ```typescript
95
- * constructor(options: IProviderOptions) {
96
- * super();
97
- * // provider-specific initialization
98
- * }
99
- * ```
100
- *
101
- * This ensures ExecutionService can properly identify providers
102
- * and prevents type conflicts across the codebase.
103
- *
104
- * ========================================
105
- *
106
- * @template TConfig - Provider configuration type (defaults to IProviderConfig for type safety)
107
- * @template TUniversalMessage - Message type (defaults to TUniversalMessage for backward compatibility)
108
- * @template TResponse - Response type (defaults to TUniversalMessage for backward compatibility)
109
- */
110
- export declare abstract class AbstractAIProvider<TConfig = IProviderConfig> implements IAIProvider {
111
- abstract readonly name: string;
112
- abstract readonly version: string;
113
- protected config?: TConfig;
114
- protected executor?: IExecutor;
115
- protected readonly logger: ILogger;
116
- constructor(logger?: ILogger);
117
- /**
118
- * Configure the provider with type-safe configuration
119
- */
120
- configure(config: TConfig): Promise<void>;
121
- /**
122
- * Each provider must implement chat using their own native SDK types internally
123
- * @param messages - Array of messages from conversation history
124
- * @param options - Chat options including tools, model settings, etc.
125
- * @returns Promise resolving to a response
126
- */
127
- abstract chat(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
128
- /**
129
- * Each provider must implement streaming chat using their own native SDK types internally
130
- * @param messages - Array of messages from conversation history
131
- * @param options - Chat options including tools, model settings, etc.
132
- * @returns AsyncIterable of response chunks
133
- */
134
- abstract chatStream?(messages: TUniversalMessage[], options?: IChatOptions): AsyncIterable<TUniversalMessage>;
135
- /**
136
- * Provider-agnostic raw response API.
137
- *
138
- * This is the canonical "raw payload" entrypoint required by the AIProvider contract.
139
- * The default implementation delegates to `chat()` and adapts the result into a
140
- * RawProviderResponse shape.
141
- */
142
- generateResponse(payload: IProviderRequest): Promise<IRawProviderResponse>;
143
- /**
144
- * Provider-agnostic raw streaming API.
145
- *
146
- * If a provider does not implement chatStream, it does not support streaming.
147
- */
148
- generateStreamingResponse(payload: IProviderRequest): AsyncIterable<IRawProviderResponse>;
149
- /**
150
- * Default implementation - most modern providers support tools
151
- * @returns true if tool calling is supported
152
- */
153
- supportsTools(): boolean;
154
- /**
155
- * Default implementation - providers can override for specific validation
156
- * @returns true if configuration is valid
157
- */
158
- validateConfig(): boolean;
159
- /**
160
- * Utility method for validating TUniversalMessage array
161
- * @param messages - Messages to validate
162
- */
163
- protected validateMessages(messages: TUniversalMessage[]): void;
164
- /**
165
- * Utility method for validating tool schemas
166
- * @param tools - Tool schemas to validate
167
- */
168
- protected validateTools(tools?: IToolSchema[]): void;
169
- /**
170
- * Execute chat via executor.
171
- *
172
- * Subclasses should call this only when an executor is configured.
173
- */
174
- protected executeViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): Promise<TUniversalMessage>;
175
- /**
176
- * Execute streaming chat via executor.
177
- *
178
- * Subclasses should call this only when an executor is configured.
179
- */
180
- protected executeStreamViaExecutorOrDirect(messages: TUniversalMessage[], options?: IChatOptions): AsyncIterable<TUniversalMessage>;
181
- /**
182
- * Clean up resources when provider is no longer needed
183
- * Override this method in subclasses for additional cleanup
184
- */
185
- dispose(): Promise<void>;
186
- }
187
- //# sourceMappingURL=abstract-ai-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-ai-provider.d.ts","sourceRoot":"","sources":["../../src/abstracts/abstract-ai-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC7H,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAA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AAY,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAEhG;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE,iBAAiB,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC,iBAAiB,CAAC;IAE7G;;;;;;OAMG;IACG,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAgBhF;;;;OAIG;IACI,yBAAyB,CAAC,OAAO,EAAE,gBAAgB,GAAG,aAAa,CAAC,oBAAoB,CAAC;IAoBhG;;;OAGG;IACH,aAAa,IAAI,OAAO;IAIxB;;;OAGG;IACH,cAAc,IAAI,OAAO;IAMzB;;;OAGG;IACH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,GAAG,IAAI;IAgB/D;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,GAAG,IAAI;IAoBpD;;;;OAIG;cACa,0BAA0B,CACtC,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,OAAO,CAAC,EAAE,YAAY,GACvB,OAAO,CAAC,iBAAiB,CAAC;IAmB7B;;;;OAIG;cACc,gCAAgC,CAC7C,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,OAAO,CAAC,EAAE,YAAY,GACvB,aAAa,CAAC,iBAAiB,CAAC;IAmCnC;;;OAGG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAQjC"}
@@ -1,252 +0,0 @@
1
- import { isAssistantMessage } from '../interfaces/messages';
2
- import { SilentLogger } from '../utils/logger';
3
- /**
4
- * Base AI provider implementation with proper type constraints
5
- * All AI providers should extend this class
6
- *
7
- * ========================================
8
- * CRITICAL IMPLEMENTATION GUIDELINES
9
- * ========================================
10
- *
11
- * ALL AI PROVIDER IMPLEMENTATIONS (OpenAI, Anthropic, Google, etc.) MUST:
12
- *
13
- * 1. EXTEND THIS CLASS:
14
- * ```typescript
15
- * export class OpenAIProvider extends AbstractAIProvider {
16
- * override readonly name = 'openai';
17
- * override readonly version = '1.0.0';
18
- * ```
19
- *
20
- * 2. USE IMPORTS FROM @robota-sdk/agents:
21
- * ```typescript
22
- * import { AbstractAIProvider } from '@robota-sdk/agents';
23
- * import type {
24
- * TUniversalMessage,
25
- * ChatOptions,
26
- * IToolCall,
27
- * ToolSchema,
28
- * AssistantMessage
29
- * } from '@robota-sdk/agents';
30
- * ```
31
- *
32
- * 3. USE OVERRIDE KEYWORD FOR ALL INHERITED METHODS:
33
- * - override async chat(...)
34
- * - override async *chatStream(...)
35
- * - override supportsTools()
36
- * - override validateConfig()
37
- * - override async dispose()
38
- *
39
- * 4. DO NOT REDEFINE TYPES THAT EXIST IN @robota-sdk/agents:
40
- * - TUniversalMessage
41
- * - ChatOptions
42
- * - IToolCall
43
- * - ToolSchema
44
- * - AssistantMessage
45
- * - SystemMessage
46
- * - UserMessage
47
- * - ToolMessage
48
- *
49
- * 5. HANDLE MESSAGE CONTENT PROPERLY:
50
- * - For tool calls: content should be null (not empty string)
51
- * - For regular messages: content can be string or null
52
- * - Always preserve null values from API responses
53
- *
54
- * 6. CALL SUPER() IN CONSTRUCTOR:
55
- * ```typescript
56
- * constructor(options: IProviderOptions) {
57
- * super();
58
- * // provider-specific initialization
59
- * }
60
- * ```
61
- *
62
- * This ensures ExecutionService can properly identify providers
63
- * and prevents type conflicts across the codebase.
64
- *
65
- * ========================================
66
- *
67
- * @template TConfig - Provider configuration type (defaults to IProviderConfig for type safety)
68
- * @template TUniversalMessage - Message type (defaults to TUniversalMessage for backward compatibility)
69
- * @template TResponse - Response type (defaults to TUniversalMessage for backward compatibility)
70
- */
71
- export class AbstractAIProvider {
72
- config;
73
- executor;
74
- logger;
75
- constructor(logger = SilentLogger) {
76
- this.logger = logger;
77
- }
78
- /**
79
- * Configure the provider with type-safe configuration
80
- */
81
- async configure(config) {
82
- this.config = config;
83
- // Check if config includes executor and set it
84
- if (config && typeof config === 'object' && 'executor' in config && config.executor) {
85
- this.executor = config.executor;
86
- }
87
- // Subclasses can override for additional setup
88
- }
89
- /**
90
- * Provider-agnostic raw response API.
91
- *
92
- * This is the canonical "raw payload" entrypoint required by the AIProvider contract.
93
- * The default implementation delegates to `chat()` and adapts the result into a
94
- * RawProviderResponse shape.
95
- */
96
- async generateResponse(payload) {
97
- const response = await this.chat(payload.messages, {
98
- ...(payload.model !== undefined && { model: payload.model }),
99
- ...(payload.temperature !== undefined && { temperature: payload.temperature }),
100
- ...(payload.maxTokens !== undefined && { maxTokens: payload.maxTokens }),
101
- ...(payload.tools !== undefined && { tools: payload.tools })
102
- });
103
- return {
104
- content: response.content ?? null,
105
- toolCalls: isAssistantMessage(response) ? response.toolCalls : undefined,
106
- model: payload.model,
107
- metadata: payload.metadata
108
- };
109
- }
110
- /**
111
- * Provider-agnostic raw streaming API.
112
- *
113
- * If a provider does not implement chatStream, it does not support streaming.
114
- */
115
- async *generateStreamingResponse(payload) {
116
- if (!this.chatStream) {
117
- throw new Error(`[AI-PROVIDER] Streaming is not supported by provider "${this.name}"`);
118
- }
119
- for await (const chunk of this.chatStream(payload.messages, {
120
- ...(payload.model !== undefined && { model: payload.model }),
121
- ...(payload.temperature !== undefined && { temperature: payload.temperature }),
122
- ...(payload.maxTokens !== undefined && { maxTokens: payload.maxTokens }),
123
- ...(payload.tools !== undefined && { tools: payload.tools })
124
- })) {
125
- yield {
126
- content: chunk.content ?? null,
127
- toolCalls: isAssistantMessage(chunk) ? chunk.toolCalls : undefined,
128
- model: payload.model,
129
- metadata: payload.metadata
130
- };
131
- }
132
- }
133
- /**
134
- * Default implementation - most modern providers support tools
135
- * @returns true if tool calling is supported
136
- */
137
- supportsTools() {
138
- return true;
139
- }
140
- /**
141
- * Default implementation - providers can override for specific validation
142
- * @returns true if configuration is valid
143
- */
144
- validateConfig() {
145
- return true;
146
- }
147
- /**
148
- * Utility method for validating TUniversalMessage array
149
- * @param messages - Messages to validate
150
- */
151
- validateMessages(messages) {
152
- if (!Array.isArray(messages)) {
153
- throw new Error('Messages must be an array');
154
- }
155
- if (messages.length === 0) {
156
- throw new Error('Messages array cannot be empty');
157
- }
158
- for (const message of messages) {
159
- if (!message.role || !['user', 'assistant', 'system', 'tool'].includes(message.role)) {
160
- throw new Error(`Invalid message role: ${message.role}`);
161
- }
162
- }
163
- }
164
- /**
165
- * Utility method for validating tool schemas
166
- * @param tools - Tool schemas to validate
167
- */
168
- validateTools(tools) {
169
- if (!tools)
170
- return;
171
- if (!Array.isArray(tools)) {
172
- throw new Error('Tools must be an array');
173
- }
174
- for (const tool of tools) {
175
- if (!tool.name || typeof tool.name !== 'string') {
176
- throw new Error('Tool must have a valid name');
177
- }
178
- if (!tool.description || typeof tool.description !== 'string') {
179
- throw new Error('Tool must have a valid description');
180
- }
181
- if (!tool.parameters || typeof tool.parameters !== 'object' || tool.parameters === null || Array.isArray(tool.parameters)) {
182
- throw new Error('Tool must have valid parameters');
183
- }
184
- }
185
- }
186
- /**
187
- * Execute chat via executor.
188
- *
189
- * Subclasses should call this only when an executor is configured.
190
- */
191
- async executeViaExecutorOrDirect(messages, options) {
192
- if (!this.executor) {
193
- throw new Error(`Executor is required for ${this.name} provider. Configure an executor or use direct execution path.`);
194
- }
195
- if (!options?.model) {
196
- throw new Error(`Model is required for executor execution in ${this.name} provider.`);
197
- }
198
- const result = await this.executor.executeChat({
199
- messages,
200
- options,
201
- provider: this.name,
202
- model: options.model,
203
- ...(options.tools && { tools: options.tools })
204
- });
205
- return result;
206
- }
207
- /**
208
- * Execute streaming chat via executor.
209
- *
210
- * Subclasses should call this only when an executor is configured.
211
- */
212
- async *executeStreamViaExecutorOrDirect(messages, options) {
213
- if (!this.executor || !this.executor.executeChatStream) {
214
- throw new Error(`Streaming executor is required for ${this.name} provider.`);
215
- }
216
- if (!options?.model) {
217
- throw new Error(`Model is required for executor streaming in ${this.name} provider.`);
218
- }
219
- // 🔍 [TOOL-FLOW] AbstractAIProvider.executeStreamViaExecutorOrDirect() - Preparing executor request
220
- this.logger.debug?.('🔍 [TOOL-FLOW] AbstractAIProvider.executeStreamViaExecutorOrDirect() - Executor request', {
221
- provider: this.name,
222
- model: options.model,
223
- hasTools: !!options.tools,
224
- toolsCount: options.tools?.length || 0,
225
- toolNames: options.tools?.map((t) => t.name) || []
226
- });
227
- const stream = this.executor.executeChatStream({
228
- messages,
229
- options,
230
- provider: this.name,
231
- model: options.model,
232
- stream: true,
233
- ...(options.tools && { tools: options.tools })
234
- });
235
- for await (const chunk of stream) {
236
- yield chunk;
237
- }
238
- return;
239
- }
240
- /**
241
- * Clean up resources when provider is no longer needed
242
- * Override this method in subclasses for additional cleanup
243
- */
244
- async dispose() {
245
- // Clean up executor if present
246
- if (this.executor?.dispose) {
247
- await this.executor.dispose();
248
- }
249
- // Subclasses can override for additional cleanup
250
- }
251
- }
252
- //# sourceMappingURL=abstract-ai-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract-ai-provider.js","sourceRoot":"","sources":["../../src/abstracts/abstract-ai-provider.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAkC/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,MAAM,OAAgB,kBAAkB;IAI1B,MAAM,CAAW;IACjB,QAAQ,CAAa;IACZ,MAAM,CAAU;IAEnC,YAAY,SAAkB,YAAY;QACtC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;GAED;IACC,KAAK,CAAC,SAAS,CAAC,MAAe;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,+CAA+C;QAC/C,IAAI,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,UAAU,IAAI,MAAM,IAAK,MAAc,CAAC,QAAQ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