@robota-sdk/agent-core 3.0.0-beta.4 → 3.0.0-beta.43

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 (504) hide show
  1. package/README.md +72 -186
  2. package/dist/browser/index.d.ts +302 -87
  3. package/dist/browser/index.js +10 -4
  4. package/dist/node/index.cjs +10 -4
  5. package/dist/node/index.d.cts +302 -87
  6. package/dist/node/index.d.ts +302 -87
  7. package/dist/node/index.js +10 -4
  8. package/package.json +1 -2
  9. package/dist/abstracts/abstract-agent.d.ts +0 -56
  10. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  11. package/dist/abstracts/abstract-agent.js +0 -55
  12. package/dist/abstracts/abstract-agent.js.map +0 -1
  13. package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
  14. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  15. package/dist/abstracts/abstract-ai-provider.js +0 -252
  16. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  17. package/dist/abstracts/abstract-executor.d.ts +0 -110
  18. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  19. package/dist/abstracts/abstract-executor.js +0 -156
  20. package/dist/abstracts/abstract-executor.js.map +0 -1
  21. package/dist/abstracts/abstract-manager.d.ts +0 -42
  22. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  23. package/dist/abstracts/abstract-manager.js +0 -49
  24. package/dist/abstracts/abstract-manager.js.map +0 -1
  25. package/dist/abstracts/abstract-module.d.ts +0 -365
  26. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  27. package/dist/abstracts/abstract-module.js +0 -474
  28. package/dist/abstracts/abstract-module.js.map +0 -1
  29. package/dist/abstracts/abstract-plugin.d.ts +0 -369
  30. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  31. package/dist/abstracts/abstract-plugin.js +0 -258
  32. package/dist/abstracts/abstract-plugin.js.map +0 -1
  33. package/dist/abstracts/abstract-tool.d.ts +0 -175
  34. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  35. package/dist/abstracts/abstract-tool.js +0 -140
  36. package/dist/abstracts/abstract-tool.js.map +0 -1
  37. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  38. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  39. package/dist/abstracts/abstract-workflow-converter.js +0 -252
  40. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  41. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
  42. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  43. package/dist/abstracts/abstract-workflow-validator.js +0 -447
  44. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  45. package/dist/abstracts/index.d.ts +0 -6
  46. package/dist/abstracts/index.d.ts.map +0 -1
  47. package/dist/abstracts/index.js +0 -9
  48. package/dist/abstracts/index.js.map +0 -1
  49. package/dist/agents/constants.d.ts +0 -23
  50. package/dist/agents/constants.d.ts.map +0 -1
  51. package/dist/agents/constants.js +0 -22
  52. package/dist/agents/constants.js.map +0 -1
  53. package/dist/agents/index.d.ts +0 -1
  54. package/dist/agents/index.d.ts.map +0 -1
  55. package/dist/agents/index.js +0 -4
  56. package/dist/agents/index.js.map +0 -1
  57. package/dist/agents/robota.test.d.ts +0 -2
  58. package/dist/agents/robota.test.d.ts.map +0 -1
  59. package/dist/agents/robota.test.js +0 -416
  60. package/dist/agents/robota.test.js.map +0 -1
  61. package/dist/core/robota.d.ts +0 -694
  62. package/dist/core/robota.d.ts.map +0 -1
  63. package/dist/core/robota.js +0 -1277
  64. package/dist/core/robota.js.map +0 -1
  65. package/dist/executors/local-executor.d.ts +0 -96
  66. package/dist/executors/local-executor.d.ts.map +0 -1
  67. package/dist/executors/local-executor.js +0 -197
  68. package/dist/executors/local-executor.js.map +0 -1
  69. package/dist/executors/local-executor.test.d.ts +0 -2
  70. package/dist/executors/local-executor.test.d.ts.map +0 -1
  71. package/dist/executors/local-executor.test.js +0 -192
  72. package/dist/executors/local-executor.test.js.map +0 -1
  73. package/dist/index.d.ts +0 -274
  74. package/dist/index.d.ts.map +0 -1
  75. package/dist/index.js +0 -235
  76. package/dist/index.js.map +0 -1
  77. package/dist/interfaces/agent.d.ts +0 -198
  78. package/dist/interfaces/agent.d.ts.map +0 -1
  79. package/dist/interfaces/agent.js +0 -2
  80. package/dist/interfaces/agent.js.map +0 -1
  81. package/dist/interfaces/event-service.d.ts +0 -79
  82. package/dist/interfaces/event-service.d.ts.map +0 -1
  83. package/dist/interfaces/event-service.js +0 -2
  84. package/dist/interfaces/event-service.js.map +0 -1
  85. package/dist/interfaces/executor.d.ts +0 -128
  86. package/dist/interfaces/executor.d.ts.map +0 -1
  87. package/dist/interfaces/executor.js +0 -2
  88. package/dist/interfaces/executor.js.map +0 -1
  89. package/dist/interfaces/history-module.d.ts +0 -19
  90. package/dist/interfaces/history-module.d.ts.map +0 -1
  91. package/dist/interfaces/history-module.js +0 -2
  92. package/dist/interfaces/history-module.js.map +0 -1
  93. package/dist/interfaces/index.d.ts +0 -13
  94. package/dist/interfaces/index.d.ts.map +0 -1
  95. package/dist/interfaces/index.js +0 -4
  96. package/dist/interfaces/index.js.map +0 -1
  97. package/dist/interfaces/manager.d.ts +0 -142
  98. package/dist/interfaces/manager.d.ts.map +0 -1
  99. package/dist/interfaces/manager.js +0 -2
  100. package/dist/interfaces/manager.js.map +0 -1
  101. package/dist/interfaces/messages.d.ts +0 -75
  102. package/dist/interfaces/messages.d.ts.map +0 -1
  103. package/dist/interfaces/messages.js +0 -29
  104. package/dist/interfaces/messages.js.map +0 -1
  105. package/dist/interfaces/progress-reporting.d.ts +0 -86
  106. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  107. package/dist/interfaces/progress-reporting.js +0 -37
  108. package/dist/interfaces/progress-reporting.js.map +0 -1
  109. package/dist/interfaces/provider.d.ts +0 -217
  110. package/dist/interfaces/provider.d.ts.map +0 -1
  111. package/dist/interfaces/provider.js +0 -2
  112. package/dist/interfaces/provider.js.map +0 -1
  113. package/dist/interfaces/service.d.ts +0 -205
  114. package/dist/interfaces/service.d.ts.map +0 -1
  115. package/dist/interfaces/service.js +0 -6
  116. package/dist/interfaces/service.js.map +0 -1
  117. package/dist/interfaces/tool.d.ts +0 -248
  118. package/dist/interfaces/tool.d.ts.map +0 -1
  119. package/dist/interfaces/tool.js +0 -2
  120. package/dist/interfaces/tool.js.map +0 -1
  121. package/dist/interfaces/types.d.ts +0 -71
  122. package/dist/interfaces/types.d.ts.map +0 -1
  123. package/dist/interfaces/types.js +0 -33
  124. package/dist/interfaces/types.js.map +0 -1
  125. package/dist/interfaces/workflow-converter.d.ts +0 -193
  126. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  127. package/dist/interfaces/workflow-converter.js +0 -11
  128. package/dist/interfaces/workflow-converter.js.map +0 -1
  129. package/dist/interfaces/workflow-validator.d.ts +0 -209
  130. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  131. package/dist/interfaces/workflow-validator.js +0 -16
  132. package/dist/interfaces/workflow-validator.js.map +0 -1
  133. package/dist/managers/agent-factory.d.ts +0 -132
  134. package/dist/managers/agent-factory.d.ts.map +0 -1
  135. package/dist/managers/agent-factory.js +0 -284
  136. package/dist/managers/agent-factory.js.map +0 -1
  137. package/dist/managers/agent-factory.test.d.ts +0 -2
  138. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  139. package/dist/managers/agent-factory.test.js +0 -249
  140. package/dist/managers/agent-factory.test.js.map +0 -1
  141. package/dist/managers/agent-templates.d.ts +0 -84
  142. package/dist/managers/agent-templates.d.ts.map +0 -1
  143. package/dist/managers/agent-templates.js +0 -159
  144. package/dist/managers/agent-templates.js.map +0 -1
  145. package/dist/managers/ai-provider-manager.d.ts +0 -80
  146. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  147. package/dist/managers/ai-provider-manager.js +0 -226
  148. package/dist/managers/ai-provider-manager.js.map +0 -1
  149. package/dist/managers/conversation-history-manager.d.ts +0 -455
  150. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  151. package/dist/managers/conversation-history-manager.js +0 -578
  152. package/dist/managers/conversation-history-manager.js.map +0 -1
  153. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  154. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  155. package/dist/managers/conversation-history-manager.test.js +0 -374
  156. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  157. package/dist/managers/index.d.ts +0 -8
  158. package/dist/managers/index.d.ts.map +0 -1
  159. package/dist/managers/index.js +0 -8
  160. package/dist/managers/index.js.map +0 -1
  161. package/dist/managers/module-registry.d.ts +0 -161
  162. package/dist/managers/module-registry.d.ts.map +0 -1
  163. package/dist/managers/module-registry.js +0 -519
  164. package/dist/managers/module-registry.js.map +0 -1
  165. package/dist/managers/module-type-registry.d.ts +0 -113
  166. package/dist/managers/module-type-registry.d.ts.map +0 -1
  167. package/dist/managers/module-type-registry.js +0 -439
  168. package/dist/managers/module-type-registry.js.map +0 -1
  169. package/dist/managers/plugins.d.ts +0 -166
  170. package/dist/managers/plugins.d.ts.map +0 -1
  171. package/dist/managers/plugins.js +0 -339
  172. package/dist/managers/plugins.js.map +0 -1
  173. package/dist/managers/tool-manager.d.ts +0 -70
  174. package/dist/managers/tool-manager.d.ts.map +0 -1
  175. package/dist/managers/tool-manager.js +0 -138
  176. package/dist/managers/tool-manager.js.map +0 -1
  177. package/dist/managers/tool-manager.test.d.ts +0 -2
  178. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  179. package/dist/managers/tool-manager.test.js +0 -186
  180. package/dist/managers/tool-manager.test.js.map +0 -1
  181. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  182. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  183. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  184. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  185. package/dist/plugins/conversation-history/index.d.ts +0 -3
  186. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  187. package/dist/plugins/conversation-history/index.js +0 -2
  188. package/dist/plugins/conversation-history/index.js.map +0 -1
  189. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  190. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  191. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  192. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  193. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  194. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  195. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  196. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  197. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  198. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  199. package/dist/plugins/conversation-history/storages/index.js +0 -4
  200. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  201. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  202. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  203. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  204. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  205. package/dist/plugins/conversation-history/types.d.ts +0 -61
  206. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  207. package/dist/plugins/conversation-history/types.js +0 -2
  208. package/dist/plugins/conversation-history/types.js.map +0 -1
  209. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  210. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  211. package/dist/plugins/error-handling/context-adapter.js +0 -41
  212. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  213. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  214. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  215. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  216. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  217. package/dist/plugins/error-handling/index.d.ts +0 -10
  218. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  219. package/dist/plugins/error-handling/index.js +0 -10
  220. package/dist/plugins/error-handling/index.js.map +0 -1
  221. package/dist/plugins/error-handling/types.d.ts +0 -73
  222. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  223. package/dist/plugins/error-handling/types.js +0 -14
  224. package/dist/plugins/error-handling/types.js.map +0 -1
  225. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  226. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  227. package/dist/plugins/event-emitter/metrics.js +0 -17
  228. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  229. package/dist/plugins/event-emitter/types.d.ts +0 -112
  230. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  231. package/dist/plugins/event-emitter/types.js +0 -65
  232. package/dist/plugins/event-emitter/types.js.map +0 -1
  233. package/dist/plugins/event-emitter-plugin.d.ts +0 -222
  234. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  235. package/dist/plugins/event-emitter-plugin.js +0 -432
  236. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  237. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  238. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  239. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  240. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  241. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  242. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  243. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  244. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  245. package/dist/plugins/execution/index.d.ts +0 -3
  246. package/dist/plugins/execution/index.d.ts.map +0 -1
  247. package/dist/plugins/execution/index.js +0 -2
  248. package/dist/plugins/execution/index.js.map +0 -1
  249. package/dist/plugins/execution/types.d.ts +0 -90
  250. package/dist/plugins/execution/types.d.ts.map +0 -1
  251. package/dist/plugins/execution/types.js +0 -2
  252. package/dist/plugins/execution/types.js.map +0 -1
  253. package/dist/plugins/index.d.ts +0 -10
  254. package/dist/plugins/index.d.ts.map +0 -1
  255. package/dist/plugins/index.js +0 -11
  256. package/dist/plugins/index.js.map +0 -1
  257. package/dist/plugins/limits/types.d.ts +0 -61
  258. package/dist/plugins/limits/types.d.ts.map +0 -1
  259. package/dist/plugins/limits/types.js +0 -2
  260. package/dist/plugins/limits/types.js.map +0 -1
  261. package/dist/plugins/limits-plugin.d.ts +0 -113
  262. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  263. package/dist/plugins/limits-plugin.js +0 -380
  264. package/dist/plugins/limits-plugin.js.map +0 -1
  265. package/dist/plugins/logging/formatters.d.ts +0 -14
  266. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  267. package/dist/plugins/logging/formatters.js +0 -24
  268. package/dist/plugins/logging/formatters.js.map +0 -1
  269. package/dist/plugins/logging/index.d.ts +0 -3
  270. package/dist/plugins/logging/index.d.ts.map +0 -1
  271. package/dist/plugins/logging/index.js +0 -2
  272. package/dist/plugins/logging/index.js.map +0 -1
  273. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  274. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  275. package/dist/plugins/logging/logging-plugin.js +0 -335
  276. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  277. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  278. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  279. package/dist/plugins/logging/storages/console-storage.js +0 -38
  280. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  281. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  282. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  283. package/dist/plugins/logging/storages/file-storage.js +0 -41
  284. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  285. package/dist/plugins/logging/storages/index.d.ts +0 -5
  286. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  287. package/dist/plugins/logging/storages/index.js +0 -5
  288. package/dist/plugins/logging/storages/index.js.map +0 -1
  289. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  290. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  291. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  292. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  293. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  294. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  295. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  296. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  297. package/dist/plugins/logging/types.d.ts +0 -84
  298. package/dist/plugins/logging/types.d.ts.map +0 -1
  299. package/dist/plugins/logging/types.js +0 -2
  300. package/dist/plugins/logging/types.js.map +0 -1
  301. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  302. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  303. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  304. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  305. package/dist/plugins/performance/index.d.ts +0 -5
  306. package/dist/plugins/performance/index.d.ts.map +0 -1
  307. package/dist/plugins/performance/index.js +0 -4
  308. package/dist/plugins/performance/index.js.map +0 -1
  309. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  310. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  311. package/dist/plugins/performance/performance-plugin.js +0 -293
  312. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  313. package/dist/plugins/performance/storages/index.d.ts +0 -2
  314. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  315. package/dist/plugins/performance/storages/index.js +0 -4
  316. package/dist/plugins/performance/storages/index.js.map +0 -1
  317. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  318. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  319. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  320. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  321. package/dist/plugins/performance/types.d.ts +0 -154
  322. package/dist/plugins/performance/types.d.ts.map +0 -1
  323. package/dist/plugins/performance/types.js +0 -2
  324. package/dist/plugins/performance/types.js.map +0 -1
  325. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  326. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  327. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  328. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  329. package/dist/plugins/usage/index.d.ts +0 -5
  330. package/dist/plugins/usage/index.d.ts.map +0 -1
  331. package/dist/plugins/usage/index.js +0 -4
  332. package/dist/plugins/usage/index.js.map +0 -1
  333. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  334. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  335. package/dist/plugins/usage/storages/file-storage.js +0 -111
  336. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  337. package/dist/plugins/usage/storages/index.d.ts +0 -5
  338. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  339. package/dist/plugins/usage/storages/index.js +0 -5
  340. package/dist/plugins/usage/storages/index.js.map +0 -1
  341. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  342. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  343. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  344. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  345. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  346. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  347. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  348. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  349. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  350. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  351. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  352. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  353. package/dist/plugins/usage/types.d.ts +0 -127
  354. package/dist/plugins/usage/types.d.ts.map +0 -1
  355. package/dist/plugins/usage/types.js +0 -2
  356. package/dist/plugins/usage/types.js.map +0 -1
  357. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  358. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  359. package/dist/plugins/usage/usage-plugin.js +0 -309
  360. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  361. package/dist/plugins/webhook/http-client.d.ts +0 -30
  362. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  363. package/dist/plugins/webhook/http-client.js +0 -110
  364. package/dist/plugins/webhook/http-client.js.map +0 -1
  365. package/dist/plugins/webhook/index.d.ts +0 -9
  366. package/dist/plugins/webhook/index.d.ts.map +0 -1
  367. package/dist/plugins/webhook/index.js +0 -9
  368. package/dist/plugins/webhook/index.js.map +0 -1
  369. package/dist/plugins/webhook/transformer.d.ts +0 -63
  370. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  371. package/dist/plugins/webhook/transformer.js +0 -157
  372. package/dist/plugins/webhook/transformer.js.map +0 -1
  373. package/dist/plugins/webhook/types.d.ts +0 -183
  374. package/dist/plugins/webhook/types.d.ts.map +0 -1
  375. package/dist/plugins/webhook/types.js +0 -2
  376. package/dist/plugins/webhook/types.js.map +0 -1
  377. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  378. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  379. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  380. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  381. package/dist/schemas/agent-template-schema.d.ts +0 -137
  382. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  383. package/dist/schemas/agent-template-schema.js +0 -87
  384. package/dist/schemas/agent-template-schema.js.map +0 -1
  385. package/dist/services/conversation-service/index.d.ts +0 -88
  386. package/dist/services/conversation-service/index.d.ts.map +0 -1
  387. package/dist/services/conversation-service/index.js +0 -441
  388. package/dist/services/conversation-service/index.js.map +0 -1
  389. package/dist/services/conversation-service/types.d.ts +0 -32
  390. package/dist/services/conversation-service/types.d.ts.map +0 -1
  391. package/dist/services/conversation-service/types.js +0 -8
  392. package/dist/services/conversation-service/types.js.map +0 -1
  393. package/dist/services/event-service.d.ts +0 -61
  394. package/dist/services/event-service.d.ts.map +0 -1
  395. package/dist/services/event-service.js +0 -110
  396. package/dist/services/event-service.js.map +0 -1
  397. package/dist/services/event-service.test.d.ts +0 -2
  398. package/dist/services/event-service.test.d.ts.map +0 -1
  399. package/dist/services/event-service.test.js +0 -86
  400. package/dist/services/event-service.test.js.map +0 -1
  401. package/dist/services/execution-service.d.ts +0 -151
  402. package/dist/services/execution-service.d.ts.map +0 -1
  403. package/dist/services/execution-service.js +0 -1262
  404. package/dist/services/execution-service.js.map +0 -1
  405. package/dist/services/execution-service.test.d.ts +0 -2
  406. package/dist/services/execution-service.test.d.ts.map +0 -1
  407. package/dist/services/execution-service.test.js +0 -338
  408. package/dist/services/execution-service.test.js.map +0 -1
  409. package/dist/services/history-module.d.ts +0 -15
  410. package/dist/services/history-module.d.ts.map +0 -1
  411. package/dist/services/history-module.js +0 -42
  412. package/dist/services/history-module.js.map +0 -1
  413. package/dist/services/in-memory-history-store.d.ts +0 -12
  414. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  415. package/dist/services/in-memory-history-store.js +0 -41
  416. package/dist/services/in-memory-history-store.js.map +0 -1
  417. package/dist/services/index.d.ts +0 -7
  418. package/dist/services/index.d.ts.map +0 -1
  419. package/dist/services/index.js +0 -13
  420. package/dist/services/index.js.map +0 -1
  421. package/dist/services/task-events.d.ts +0 -6
  422. package/dist/services/task-events.d.ts.map +0 -1
  423. package/dist/services/task-events.js +0 -6
  424. package/dist/services/task-events.js.map +0 -1
  425. package/dist/services/tool-execution-service.d.ts +0 -74
  426. package/dist/services/tool-execution-service.d.ts.map +0 -1
  427. package/dist/services/tool-execution-service.js +0 -189
  428. package/dist/services/tool-execution-service.js.map +0 -1
  429. package/dist/services/user-events.d.ts +0 -7
  430. package/dist/services/user-events.d.ts.map +0 -1
  431. package/dist/services/user-events.js +0 -6
  432. package/dist/services/user-events.js.map +0 -1
  433. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  434. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  435. package/dist/tools/implementations/function-tool/index.js +0 -13
  436. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  437. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  438. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  439. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  440. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  441. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  442. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  443. package/dist/tools/implementations/function-tool/types.js +0 -14
  444. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  445. package/dist/tools/implementations/function-tool.d.ts +0 -49
  446. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  447. package/dist/tools/implementations/function-tool.js +0 -223
  448. package/dist/tools/implementations/function-tool.js.map +0 -1
  449. package/dist/tools/implementations/index.d.ts +0 -4
  450. package/dist/tools/implementations/index.d.ts.map +0 -1
  451. package/dist/tools/implementations/index.js +0 -5
  452. package/dist/tools/implementations/index.js.map +0 -1
  453. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  454. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  455. package/dist/tools/implementations/mcp-tool.js +0 -246
  456. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  457. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  458. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  459. package/dist/tools/implementations/openapi-tool.js +0 -324
  460. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  461. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  462. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  463. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  464. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  465. package/dist/tools/index.d.ts +0 -3
  466. package/dist/tools/index.d.ts.map +0 -1
  467. package/dist/tools/index.js +0 -4
  468. package/dist/tools/index.js.map +0 -1
  469. package/dist/tools/registry/index.d.ts +0 -2
  470. package/dist/tools/registry/index.d.ts.map +0 -1
  471. package/dist/tools/registry/index.js +0 -3
  472. package/dist/tools/registry/index.js.map +0 -1
  473. package/dist/tools/registry/tool-registry.d.ts +0 -54
  474. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  475. package/dist/tools/registry/tool-registry.js +0 -146
  476. package/dist/tools/registry/tool-registry.js.map +0 -1
  477. package/dist/utils/errors.d.ts +0 -155
  478. package/dist/utils/errors.d.ts.map +0 -1
  479. package/dist/utils/errors.js +0 -203
  480. package/dist/utils/errors.js.map +0 -1
  481. package/dist/utils/execution-proxy.d.ts +0 -75
  482. package/dist/utils/execution-proxy.d.ts.map +0 -1
  483. package/dist/utils/execution-proxy.js +0 -230
  484. package/dist/utils/execution-proxy.js.map +0 -1
  485. package/dist/utils/index.d.ts +0 -11
  486. package/dist/utils/index.d.ts.map +0 -1
  487. package/dist/utils/index.js +0 -7
  488. package/dist/utils/index.js.map +0 -1
  489. package/dist/utils/logger.d.ts +0 -74
  490. package/dist/utils/logger.d.ts.map +0 -1
  491. package/dist/utils/logger.js +0 -143
  492. package/dist/utils/logger.js.map +0 -1
  493. package/dist/utils/message-converter.d.ts +0 -68
  494. package/dist/utils/message-converter.d.ts.map +0 -1
  495. package/dist/utils/message-converter.js +0 -87
  496. package/dist/utils/message-converter.js.map +0 -1
  497. package/dist/utils/periodic-task.d.ts +0 -14
  498. package/dist/utils/periodic-task.d.ts.map +0 -1
  499. package/dist/utils/periodic-task.js +0 -26
  500. package/dist/utils/periodic-task.js.map +0 -1
  501. package/dist/utils/validation.d.ts +0 -40
  502. package/dist/utils/validation.d.ts.map +0 -1
  503. package/dist/utils/validation.js +0 -162
  504. package/dist/utils/validation.js.map +0 -1
@@ -1,110 +0,0 @@
1
- /**
2
- * Webhook HTTP client for sending webhook requests
3
- * Handles retries, timeouts, and error scenarios
4
- */
5
- import jsSHA from 'jssha';
6
- /**
7
- * HTTP client for webhook requests
8
- */
9
- export class WebhookHttpClient {
10
- logger;
11
- constructor(logger) {
12
- this.logger = logger;
13
- }
14
- /**
15
- * Send a single webhook request with retries
16
- */
17
- async sendRequest(request) {
18
- const { endpoint, payload, attempt } = request;
19
- const timeout = endpoint.timeout ?? 5000;
20
- const maxRetries = endpoint.retries ?? 3;
21
- try {
22
- // Prepare request body
23
- const body = JSON.stringify(payload);
24
- // Prepare headers
25
- const headers = {
26
- 'Content-Type': 'application/json',
27
- 'User-Agent': 'robota-webhook/1.0.0',
28
- ...endpoint.headers
29
- };
30
- // Add signature if secret is provided
31
- if (endpoint.secret) {
32
- const signature = this.generateSignature(body, endpoint.secret);
33
- headers['X-Webhook-Signature'] = signature;
34
- }
35
- // Make HTTP request
36
- const response = await this.makeHttpRequest(endpoint.url, {
37
- method: 'POST',
38
- headers,
39
- body,
40
- timeout
41
- });
42
- if (!response.ok) {
43
- throw new Error(`HTTP ${response.status}: ${response.statusText}`);
44
- }
45
- this.logger.debug('Webhook sent successfully', {
46
- url: endpoint.url,
47
- event: payload.event,
48
- attempt,
49
- status: response.status
50
- });
51
- }
52
- catch (error) {
53
- this.logger.error('Webhook request failed', {
54
- url: endpoint.url,
55
- event: payload.event,
56
- attempt,
57
- error: error instanceof Error ? error.message : String(error)
58
- });
59
- // Retry if we haven't exceeded max attempts
60
- if (attempt < maxRetries) {
61
- const retryRequest = {
62
- ...request,
63
- attempt: attempt + 1
64
- };
65
- // Exponential backoff
66
- const delay = Math.min(1000 * Math.pow(2, attempt - 1), 10000);
67
- await this.delay(delay);
68
- return this.sendRequest(retryRequest);
69
- }
70
- // Max retries exceeded
71
- throw error;
72
- }
73
- }
74
- /**
75
- * Generate HMAC signature for webhook security using jsSHA (browser compatible)
76
- */
77
- generateSignature(body, secret) {
78
- const shaObj = new jsSHA("SHA-256", "TEXT", {
79
- hmacKey: { value: secret, format: "TEXT" }
80
- });
81
- shaObj.update(body);
82
- return shaObj.getHash("HEX").toLowerCase();
83
- }
84
- /**
85
- * Make HTTP request with timeout support
86
- */
87
- async makeHttpRequest(url, options) {
88
- const controller = new AbortController();
89
- const timeoutId = setTimeout(() => controller.abort(), options.timeout);
90
- try {
91
- const response = await fetch(url, {
92
- method: options.method,
93
- headers: options.headers,
94
- body: options.body,
95
- signal: controller.signal
96
- });
97
- return response;
98
- }
99
- finally {
100
- clearTimeout(timeoutId);
101
- }
102
- }
103
- /**
104
- * Delay utility for retry backoff
105
- */
106
- delay(ms) {
107
- return new Promise(resolve => setTimeout(resolve, ms));
108
- }
109
- }
110
- //# sourceMappingURL=http-client.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-client.js","sourceRoot":"","sources":["../../../src/plugins/webhook/http-client.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAClB,MAAM,CAAU;IAExB,YAAY,MAAe;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,OAAwB;QACtC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC;QACzC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;QAEzC,IAAI,CAAC;YACD,uBAAuB;YACvB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;YAEr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AM,EAAE,UAAU,CAAC,MAAM;aAC5B,CAAC,CAAC;YAEH,OAAO,QAAQ,CAAC;QACpB,CAAC;gBAAS,CAAC;YACP,YAAY,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,EAAU;QACpB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;CACJ"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Webhook plugin exports
3
- * Centralized export point for all webhook plugin components
4
- */
5
- export * from './types';
6
- export * from './transformer';
7
- export * from './http-client';
8
- export { WebhookPlugin } from './webhook-plugin';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/webhook/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Webhook plugin exports
3
- * Centralized export point for all webhook plugin components
4
- */
5
- export * from './types';
6
- export * from './transformer';
7
- export * from './http-client';
8
- export { WebhookPlugin } from './webhook-plugin';
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/webhook/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,63 +0,0 @@
1
- /**
2
- * Webhook data transformation utilities
3
- * Converts base plugin types to webhook-specific types safely
4
- */
5
- import type { IPluginExecutionContext, IPluginExecutionResult } from '../../abstracts/abstract-plugin';
6
- import type { TLoggerData } from '../../interfaces/types';
7
- import type { IWebhookExecutionContext, IWebhookExecutionResult, IWebhookEventData, TWebhookEventName } from './types';
8
- /**
9
- * Webhook data transformer utility class
10
- */
11
- export declare class WebhookTransformer {
12
- /**
13
- * Convert IPluginExecutionContext to WebhookExecutionContext
14
- */
15
- static contextToWebhook(context: IPluginExecutionContext): IWebhookExecutionContext;
16
- /**
17
- * Convert IPluginExecutionResult to WebhookExecutionResult
18
- */
19
- static resultToWebhook(result: IPluginExecutionResult): IWebhookExecutionResult;
20
- /**
21
- * Create execution event data
22
- */
23
- static createExecutionData(context: IWebhookExecutionContext, result: IWebhookExecutionResult): IWebhookEventData;
24
- /**
25
- * Create conversation event data
26
- */
27
- static createConversationData(context: IWebhookExecutionContext, result: IWebhookExecutionResult): IWebhookEventData;
28
- /**
29
- * Create tool execution event data
30
- *
31
- * REASON: Tool result structure varies by tool type and provider, needs flexible handling for webhook processing
32
- * ALTERNATIVES_CONSIDERED:
33
- * 1. Strict tool result interfaces (breaks tool compatibility)
34
- * 2. Union types (insufficient for dynamic tool results)
35
- * 3. Generic constraints (too complex for webhook processing)
36
- * 4. Interface definitions (too rigid for varied tool results)
37
- * 5. Type assertions (decreases type safety)
38
- * TODO: Consider standardized tool result interface across tools
39
- */
40
- static createToolData(context: IWebhookExecutionContext, toolResult: TLoggerData): IWebhookEventData;
41
- /**
42
- * Create error event data
43
- */
44
- static createErrorData(context: IWebhookExecutionContext, error: Error): IWebhookEventData;
45
- /**
46
- * Safely get property from object (handles index signature issues)
47
- *
48
- * REASON: Safe property access for webhook data transformation needs flexible input/output types
49
- * ALTERNATIVES_CONSIDERED:
50
- * 1. Strict object types (breaks dynamic property access)
51
- * 2. Union types (insufficient for property extraction)
52
- * 3. Generic constraints (too complex for simple property access)
53
- * 4. Interface definitions (too rigid for dynamic objects)
54
- * 5. Type assertions (decreases type safety)
55
- * TODO: Consider typed property access if patterns emerge
56
- */
57
- private static safeGetProperty;
58
- /**
59
- * Default payload transformer for webhook events
60
- */
61
- static defaultPayloadTransformer(_event: TWebhookEventName, data: IWebhookEventData): IWebhookEventData;
62
- }
63
- //# sourceMappingURL=transformer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../../src/plugins/webhook/transformer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACvG,OAAO,KAAK,EAAE,WAAW,EAAmB,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EACR,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EAMjB,iBAAiB,EACpB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,qBAAa,kBAAkB;IAC3B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,wBAAwB;IAQnF;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,uBAAuB;IAc/E;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACtB,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,uBAAuB,GAChC,iBAAiB;IAiBpB;;OAEG;IACH,MAAM,CAAC,sBAAsB,CACzB,OAAO,EAAE,wBAAwB,EACjC,MAAM,EAAE,uBAAuB,GAChC,iBAAiB;IAsBpB;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,cAAc,CACjB,OAAO,EAAE,wBAAwB,EACjC,UAAU,EAAE,WAAW,GACxB,iBAAiB;IA0BpB;;OAEG;IACH,MAAM,CAAC,eAAe,CAClB,OAAO,EAAE,wBAAwB,EACjC,KAAK,EAAE,KAAK,GACb,iBAAiB;IAoBpB;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,CAAC,eAAe;IAO9B;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAC5B,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,iBAAiB,GACxB,iBAAiB;CAIvB"}
@@ -1,157 +0,0 @@
1
- /**
2
- * Webhook data transformation utilities
3
- * Converts base plugin types to webhook-specific types safely
4
- */
5
- /**
6
- * Webhook data transformer utility class
7
- */
8
- export class WebhookTransformer {
9
- /**
10
- * Convert IPluginExecutionContext to WebhookExecutionContext
11
- */
12
- static contextToWebhook(context) {
13
- return {
14
- executionId: context.executionId,
15
- sessionId: context.sessionId,
16
- userId: context.userId
17
- };
18
- }
19
- /**
20
- * Convert IPluginExecutionResult to WebhookExecutionResult
21
- */
22
- static resultToWebhook(result) {
23
- return {
24
- response: result.response,
25
- content: result.content,
26
- duration: result.duration,
27
- tokensUsed: result.tokensUsed,
28
- toolsExecuted: result.toolsExecuted,
29
- success: result.success,
30
- usage: result.usage,
31
- toolCalls: result.toolCalls,
32
- error: result.error
33
- };
34
- }
35
- /**
36
- * Create execution event data
37
- */
38
- static createExecutionData(context, result) {
39
- const executionData = {
40
- response: result.response || undefined,
41
- duration: result.duration || undefined,
42
- tokensUsed: result.tokensUsed || undefined,
43
- toolsExecuted: result.toolsExecuted || undefined,
44
- success: result.success !== undefined ? result.success : undefined
45
- };
46
- return {
47
- executionId: context.executionId,
48
- sessionId: context.sessionId,
49
- userId: context.userId,
50
- result: executionData
51
- };
52
- }
53
- /**
54
- * Create conversation event data
55
- */
56
- static createConversationData(context, result) {
57
- const toolCalls = result.toolCalls?.map(call => ({
58
- id: call.id || '',
59
- name: call.name || '',
60
- arguments: JSON.stringify(call.arguments || {}),
61
- result: String(call.result || '')
62
- })) || [];
63
- const conversationData = {
64
- response: result.content || result.response || undefined,
65
- tokensUsed: result.usage?.totalTokens || result.tokensUsed || undefined,
66
- toolCalls: toolCalls.length > 0 ? toolCalls : undefined
67
- };
68
- return {
69
- executionId: context.executionId,
70
- sessionId: context.sessionId,
71
- userId: context.userId,
72
- conversation: conversationData
73
- };
74
- }
75
- /**
76
- * Create tool execution event data
77
- *
78
- * REASON: Tool result structure varies by tool type and provider, needs flexible handling for webhook processing
79
- * ALTERNATIVES_CONSIDERED:
80
- * 1. Strict tool result interfaces (breaks tool compatibility)
81
- * 2. Union types (insufficient for dynamic tool results)
82
- * 3. Generic constraints (too complex for webhook processing)
83
- * 4. Interface definitions (too rigid for varied tool results)
84
- * 5. Type assertions (decreases type safety)
85
- * TODO: Consider standardized tool result interface across tools
86
- */
87
- static createToolData(context, toolResult) {
88
- // Safely extract tool data from result
89
- const toolName = this.safeGetProperty(toolResult, 'toolName') || 'unknown';
90
- const toolId = this.safeGetProperty(toolResult, 'toolId') ||
91
- this.safeGetProperty(toolResult, 'executionId') || 'unknown';
92
- const hasError = this.safeGetProperty(toolResult, 'error');
93
- const duration = this.safeGetProperty(toolResult, 'duration');
94
- const result = this.safeGetProperty(toolResult, 'result');
95
- const toolData = {
96
- name: String(toolName),
97
- id: String(toolId),
98
- success: !hasError,
99
- duration: typeof duration === 'number' ? duration : undefined,
100
- result: hasError ? undefined : String(result || ''),
101
- error: hasError ? (hasError instanceof Error ? hasError.message : String(hasError)) : undefined
102
- };
103
- return {
104
- executionId: context.executionId,
105
- sessionId: context.sessionId,
106
- userId: context.userId,
107
- tool: toolData
108
- };
109
- }
110
- /**
111
- * Create error event data
112
- */
113
- static createErrorData(context, error) {
114
- const errorData = {
115
- message: error instanceof Error ? error.message : String(error),
116
- stack: error instanceof Error ? error.stack : undefined,
117
- type: error instanceof Error ? error.constructor.name : 'Unknown',
118
- context: context ? {
119
- executionId: context.executionId || '',
120
- sessionId: context.sessionId || '',
121
- userId: context.userId || ''
122
- } : undefined
123
- };
124
- return {
125
- executionId: context.executionId,
126
- sessionId: context.sessionId,
127
- userId: context.userId,
128
- error: errorData
129
- };
130
- }
131
- /**
132
- * Safely get property from object (handles index signature issues)
133
- *
134
- * REASON: Safe property access for webhook data transformation needs flexible input/output types
135
- * ALTERNATIVES_CONSIDERED:
136
- * 1. Strict object types (breaks dynamic property access)
137
- * 2. Union types (insufficient for property extraction)
138
- * 3. Generic constraints (too complex for simple property access)
139
- * 4. Interface definitions (too rigid for dynamic objects)
140
- * 5. Type assertions (decreases type safety)
141
- * TODO: Consider typed property access if patterns emerge
142
- */
143
- static safeGetProperty(obj, key) {
144
- if (!obj || typeof obj !== 'object' || obj === null || Array.isArray(obj)) {
145
- return undefined;
146
- }
147
- return obj[key];
148
- }
149
- /**
150
- * Default payload transformer for webhook events
151
- */
152
- static defaultPayloadTransformer(_event, data) {
153
- // Simply return the data as-is for the default transformer
154
- return data;
155
- }
156
- }
157
- //# sourceMappingURL=transformer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transformer.js","sourceRoot":"","sources":["../../../src/plugins/webhook/transformer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH;;GAEG;AACH,MAAM,OAAO,kBAAkB;IAC3B;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,OAAgC;QACpD,OAAO;YACH,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACzB,CAAC;IACN,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,MAA8B;QACjD,OAAO;YACH,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,aAAa,EAAE,MAAM,CAAC,aAAa;YACnC,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,KAAK,EAAE,MAAM,CAAC,KAAK;SACtB,CAAC;IACN,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,mBAAmB,CACtB,OAAiC,EACjC,MAA+B;QAE/B,MAAM,aAAa,GAA0B;YACzC,QAAQ,EAAE,MAAM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G,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAC5B,MAAyB,EACzB,IAAuB;QAEvB,2DAA2D;QAC3D,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ"}
@@ -1,183 +0,0 @@
1
- import { EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX } from '../../services/execution-service';
2
- /**
3
- * Webhook plugin type definitions
4
- * Clean separation of concerns with domain-specific types
5
- */
6
- /**
7
- * Webhook event types for different lifecycle events
8
- */
9
- type TExecutionEventName = `${typeof EXECUTION_EVENT_PREFIX}.${typeof EXECUTION_EVENTS[keyof typeof EXECUTION_EVENTS]}`;
10
- export type TWebhookEventName = TExecutionEventName | 'conversation.complete' | 'tool.executed' | 'error.occurred' | 'custom';
11
- /**
12
- * Base webhook context data
13
- */
14
- export interface IWebhookContextData {
15
- executionId?: string | undefined;
16
- sessionId?: string | undefined;
17
- userId?: string | undefined;
18
- }
19
- /**
20
- * Execution result data for webhooks
21
- */
22
- export interface IWebhookExecutionData {
23
- response?: string | undefined;
24
- duration?: number | undefined;
25
- tokensUsed?: number | undefined;
26
- toolsExecuted?: number | undefined;
27
- success?: boolean | undefined;
28
- }
29
- /**
30
- * Conversation result data for webhooks
31
- */
32
- export interface IWebhookConversationData {
33
- response?: string | undefined;
34
- tokensUsed?: number | undefined;
35
- toolCalls?: IWebhookToolCallData[] | undefined;
36
- }
37
- /**
38
- * Tool call data for webhooks
39
- */
40
- export interface IWebhookToolCallData {
41
- id: string;
42
- name: string;
43
- arguments: string;
44
- result: string;
45
- }
46
- /**
47
- * Tool execution data for webhooks
48
- */
49
- export interface IWebhookToolData {
50
- name: string;
51
- id: string;
52
- success: boolean;
53
- duration?: number | undefined;
54
- result?: string | undefined;
55
- error?: string | undefined;
56
- }
57
- /**
58
- * Error data for webhooks
59
- */
60
- export interface IWebhookErrorData {
61
- message: string;
62
- stack?: string | undefined;
63
- context?: Record<string, string | number | boolean> | undefined;
64
- type?: string | undefined;
65
- }
66
- /**
67
- * Complete webhook event data structure
68
- */
69
- export interface IWebhookEventData extends IWebhookContextData {
70
- result?: IWebhookExecutionData | undefined;
71
- conversation?: IWebhookConversationData | undefined;
72
- tool?: IWebhookToolData | undefined;
73
- error?: IWebhookErrorData | undefined;
74
- }
75
- /**
76
- * Webhook metadata for additional context
77
- */
78
- export type TWebhookMetadata = Record<string, string | number | boolean | Date | string[]>;
79
- /**
80
- * Webhook execution context (simplified from base types)
81
- */
82
- export interface IWebhookExecutionContext {
83
- executionId?: string | undefined;
84
- sessionId?: string | undefined;
85
- userId?: string | undefined;
86
- }
87
- /**
88
- * Webhook execution result (simplified from base types)
89
- */
90
- export interface IWebhookExecutionResult {
91
- response?: string | undefined;
92
- content?: string | undefined;
93
- duration?: number | undefined;
94
- tokensUsed?: number | undefined;
95
- toolsExecuted?: number | undefined;
96
- success?: boolean | undefined;
97
- usage?: {
98
- totalTokens?: number | undefined;
99
- } | undefined;
100
- toolCalls?: import('../../abstracts/abstract-plugin').IPluginExecutionResult['toolCalls'];
101
- results?: Array<{
102
- toolName?: string | undefined;
103
- toolId?: string | undefined;
104
- executionId?: string | undefined;
105
- error?: Error | undefined;
106
- duration?: number | undefined;
107
- result?: string | number | boolean | undefined;
108
- }> | undefined;
109
- error?: Error | undefined;
110
- }
111
- /**
112
- * Webhook payload structure
113
- */
114
- export interface IWebhookPayload {
115
- event: TWebhookEventName;
116
- timestamp: string;
117
- executionId?: string;
118
- sessionId?: string;
119
- userId?: string;
120
- data: IWebhookEventData;
121
- metadata?: TWebhookMetadata;
122
- }
123
- /**
124
- * Webhook endpoint configuration
125
- */
126
- export interface IWebhookEndpoint {
127
- url: string;
128
- headers?: Record<string, string>;
129
- events?: TWebhookEventName[];
130
- retries?: number;
131
- timeout?: number;
132
- secret?: string;
133
- }
134
- import type { IPluginOptions, IPluginStats } from '../../abstracts/abstract-plugin';
135
- /**
136
- * Webhook plugin configuration options
137
- */
138
- export interface IWebhookPluginOptions extends IPluginOptions {
139
- /** Webhook endpoints */
140
- endpoints: IWebhookEndpoint[];
141
- /** Events to send webhooks for */
142
- events?: TWebhookEventName[];
143
- /** Default timeout for webhook requests */
144
- defaultTimeout?: number;
145
- /** Default retry attempts */
146
- defaultRetries?: number;
147
- /** Whether to use async sending */
148
- async?: boolean;
149
- /** Maximum concurrent webhook requests */
150
- maxConcurrency?: number;
151
- /** Whether to batch webhook requests */
152
- batching?: {
153
- enabled: boolean;
154
- maxSize: number;
155
- flushInterval: number;
156
- };
157
- /** Custom payload transformer */
158
- payloadTransformer?: (event: TWebhookEventName, data: IWebhookEventData) => IWebhookEventData;
159
- }
160
- /**
161
- * Webhook plugin statistics
162
- */
163
- export interface IWebhookPluginStats extends IPluginStats {
164
- endpointCount: number;
165
- queueLength: number;
166
- batchQueueLength: number;
167
- activeConcurrency: number;
168
- supportedEvents: TWebhookEventName[];
169
- totalSent: number;
170
- totalErrors: number;
171
- averageResponseTime: number;
172
- }
173
- /**
174
- * Internal webhook request structure
175
- */
176
- export interface IWebhookRequest {
177
- endpoint: IWebhookEndpoint;
178
- payload: IWebhookPayload;
179
- attempt: number;
180
- timestamp: Date;
181
- }
182
- export {};
183
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/webhook/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE5F;;;GAGG;AAEH;;GAEG;AACH,KAAK,mBAAmB,GAAG,GAAG,OAAO,sBAAsB,IAAI,OAAO,gBAAgB,CAAC,MAAM,OAAO,gBAAgB,CAAC,EAAE,CAAC;AAExH,MAAM,MAAM,iBAAiB,GACvB,mBAAmB,GACnB,uBAAuB,GACvB,eAAe,GACf,gBAAgB,GAChB,QAAQ,CAAC;AAEf;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,WAAW,CAAC,EAAE,MAAM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2CAA2C;IAC3C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wCAAwC;IACxC,QAAQ,CAAC,EAAE;QACP,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iCAAiC;IACjC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,iBAAiB,KAAK,iBAAiB,CAAC;CACjG;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACrD,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,OAAO,EAAE,eAAe,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACnB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/webhook/types.ts"],"names":[],"mappings":""}
@@ -1,92 +0,0 @@
1
- /**
2
- * Webhook Plugin - Facade Pattern Implementation
3
- * Coordinates webhook functionality through clean, separated components
4
- */
5
- import { AbstractPlugin, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginErrorContext } from '../../abstracts/abstract-plugin';
6
- import type { TWebhookEventName, IWebhookEventData, TWebhookMetadata, IWebhookPluginOptions, IWebhookPluginStats } from './types';
7
- /**
8
- * Webhook Plugin using Facade Pattern
9
- * Provides a clean interface for webhook functionality
10
- */
11
- export declare class WebhookPlugin extends AbstractPlugin<IWebhookPluginOptions, IWebhookPluginStats> {
12
- name: string;
13
- version: string;
14
- private pluginOptions;
15
- private logger;
16
- private httpClient;
17
- private requestQueue;
18
- private batchQueue;
19
- private activeConcurrency;
20
- private batchTimer?;
21
- constructor(options: IWebhookPluginOptions);
22
- /**
23
- * After execution completes
24
- */
25
- afterExecution(context: IPluginExecutionContext, result: IPluginExecutionResult): Promise<void>;
26
- /**
27
- * After conversation completes
28
- */
29
- afterConversation(context: IPluginExecutionContext, result: IPluginExecutionResult): Promise<void>;
30
- /**
31
- * After tool execution
32
- *
33
- * REASON: Tool results structure varies by tool type and provider, needs flexible handling for webhook processing
34
- * ALTERNATIVES_CONSIDERED:
35
- * 1. Strict tool result interfaces (breaks tool compatibility)
36
- * 2. Union types (insufficient for dynamic tool results)
37
- * 3. Generic constraints (too complex for webhook processing)
38
- * 4. Interface definitions (too rigid for varied tool results)
39
- * 5. Type assertions (decreases type safety)
40
- * TODO: Consider standardized tool result interface across tools
41
- */
42
- afterToolExecution(context: IPluginExecutionContext, toolResults: IPluginExecutionResult): Promise<void>;
43
- /**
44
- * On error
45
- */
46
- onError(error: Error, context?: IPluginErrorContext): Promise<void>;
47
- /**
48
- * Send webhook notification
49
- */
50
- sendWebhook(event: TWebhookEventName, data: IWebhookEventData, metadata?: TWebhookMetadata): Promise<void>;
51
- /**
52
- * Send custom webhook
53
- */
54
- sendCustomWebhook(data: IWebhookEventData, metadata?: TWebhookMetadata): Promise<void>;
55
- /**
56
- * Send payload to all applicable endpoints
57
- */
58
- private sendToEndpoints;
59
- /**
60
- * Process webhook request queue
61
- */
62
- private processQueue;
63
- /**
64
- * Get endpoints that should receive the event
65
- */
66
- private getEndpointsForEvent;
67
- /**
68
- * Setup event batching
69
- */
70
- private setupBatching;
71
- /**
72
- * Flush batched webhooks
73
- */
74
- private flushBatch;
75
- /**
76
- * Validate webhook endpoints
77
- */
78
- private validateEndpoints;
79
- /**
80
- * Get webhook plugin statistics
81
- */
82
- getStats(): IWebhookPluginStats;
83
- /**
84
- * Clear webhook queue
85
- */
86
- clearQueue(): void;
87
- /**
88
- * Cleanup on plugin destruction
89
- */
90
- destroy(): Promise<void>;
91
- }
92
- //# sourceMappingURL=webhook-plugin.d.ts.map