@robota-sdk/agent-core 3.0.0-beta.8 → 3.0.0-beta.81

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 (557) hide show
  1. package/CHANGELOG.md +844 -0
  2. package/LICENSE +661 -21
  3. package/README.md +153 -26
  4. package/dist/browser/bounded-output-DpjpS98g.js +2 -0
  5. package/dist/browser/bounded-output-DpjpS98g.js.map +1 -0
  6. package/dist/browser/command-executor-cI7XJ374.js +2 -0
  7. package/dist/browser/command-executor-cI7XJ374.js.map +1 -0
  8. package/dist/browser/http-executor-CHy6UeBU.js +2 -0
  9. package/dist/browser/http-executor-CHy6UeBU.js.map +1 -0
  10. package/dist/browser/index.d.ts +6381 -3394
  11. package/dist/browser/index.d.ts.map +1 -0
  12. package/dist/browser/index.js +13 -5
  13. package/dist/browser/index.js.map +1 -0
  14. package/dist/browser/verdict-decoder-Dk_w2NG9.js +2 -0
  15. package/dist/browser/verdict-decoder-Dk_w2NG9.js.map +1 -0
  16. package/dist/node/bounded-output-DpjpS98g.js +2 -0
  17. package/dist/node/bounded-output-DpjpS98g.js.map +1 -0
  18. package/dist/node/command-executor-Aat_q7P2.cjs +1 -0
  19. package/dist/node/command-executor-DV-H2oD6.js +2 -0
  20. package/dist/node/command-executor-DV-H2oD6.js.map +1 -0
  21. package/dist/node/http-executor-71JiIdFP.cjs +1 -0
  22. package/dist/node/http-executor-cWzI2svn.js +2 -0
  23. package/dist/node/http-executor-cWzI2svn.js.map +1 -0
  24. package/dist/node/index-CiFlpr7-.d.cts +6893 -0
  25. package/dist/node/index-CiFlpr7-.d.cts.map +1 -0
  26. package/dist/node/index-DFlMw376.d.ts +6893 -0
  27. package/dist/node/index-DFlMw376.d.ts.map +1 -0
  28. package/dist/node/index.cjs +12 -5
  29. package/dist/node/index.d.cts +3 -4238
  30. package/dist/node/index.d.ts +3 -4238
  31. package/dist/node/index.js +13 -5
  32. package/dist/node/index.js.map +1 -0
  33. package/dist/node/node.cjs +1 -0
  34. package/dist/node/node.d.cts +236 -0
  35. package/dist/node/node.d.cts.map +1 -0
  36. package/dist/node/node.d.ts +236 -0
  37. package/dist/node/node.d.ts.map +1 -0
  38. package/dist/node/node.js +2 -0
  39. package/dist/node/node.js.map +1 -0
  40. package/dist/node/project-tool-schema-DrDjGKnH.cjs +1 -0
  41. package/dist/node/project-tool-schema-_UKfY7yO.js +2 -0
  42. package/dist/node/project-tool-schema-_UKfY7yO.js.map +1 -0
  43. package/dist/node/rolldown-runtime-DK3Fl9T5.js +1 -0
  44. package/dist/node/rolldown-runtime-DWNI8pZO.cjs +1 -0
  45. package/dist/node/testing/index.cjs +1 -0
  46. package/dist/node/testing/index.d.cts +96 -0
  47. package/dist/node/testing/index.d.cts.map +1 -0
  48. package/dist/node/testing/index.d.ts +96 -0
  49. package/dist/node/testing/index.d.ts.map +1 -0
  50. package/dist/node/testing/index.js +2 -0
  51. package/dist/node/testing/index.js.map +1 -0
  52. package/dist/node/types-gNrckgFE.d.cts +335 -0
  53. package/dist/node/types-gNrckgFE.d.cts.map +1 -0
  54. package/dist/node/types-gNrckgFE.d.ts +335 -0
  55. package/dist/node/types-gNrckgFE.d.ts.map +1 -0
  56. package/dist/node/verdict-decoder-Dk_w2NG9.js +2 -0
  57. package/dist/node/verdict-decoder-Dk_w2NG9.js.map +1 -0
  58. package/dist/node/verdict-decoder-Estx9MtY.cjs +1 -0
  59. package/package.json +89 -23
  60. package/dist/abstracts/abstract-agent.d.ts +0 -56
  61. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  62. package/dist/abstracts/abstract-agent.js +0 -55
  63. package/dist/abstracts/abstract-agent.js.map +0 -1
  64. package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
  65. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  66. package/dist/abstracts/abstract-ai-provider.js +0 -252
  67. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  68. package/dist/abstracts/abstract-executor.d.ts +0 -110
  69. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  70. package/dist/abstracts/abstract-executor.js +0 -156
  71. package/dist/abstracts/abstract-executor.js.map +0 -1
  72. package/dist/abstracts/abstract-manager.d.ts +0 -42
  73. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  74. package/dist/abstracts/abstract-manager.js +0 -49
  75. package/dist/abstracts/abstract-manager.js.map +0 -1
  76. package/dist/abstracts/abstract-module.d.ts +0 -365
  77. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  78. package/dist/abstracts/abstract-module.js +0 -474
  79. package/dist/abstracts/abstract-module.js.map +0 -1
  80. package/dist/abstracts/abstract-plugin.d.ts +0 -369
  81. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  82. package/dist/abstracts/abstract-plugin.js +0 -258
  83. package/dist/abstracts/abstract-plugin.js.map +0 -1
  84. package/dist/abstracts/abstract-tool.d.ts +0 -175
  85. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  86. package/dist/abstracts/abstract-tool.js +0 -140
  87. package/dist/abstracts/abstract-tool.js.map +0 -1
  88. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  89. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  90. package/dist/abstracts/abstract-workflow-converter.js +0 -252
  91. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  92. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
  93. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  94. package/dist/abstracts/abstract-workflow-validator.js +0 -447
  95. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  96. package/dist/abstracts/index.d.ts +0 -6
  97. package/dist/abstracts/index.d.ts.map +0 -1
  98. package/dist/abstracts/index.js +0 -9
  99. package/dist/abstracts/index.js.map +0 -1
  100. package/dist/agents/constants.d.ts +0 -23
  101. package/dist/agents/constants.d.ts.map +0 -1
  102. package/dist/agents/constants.js +0 -22
  103. package/dist/agents/constants.js.map +0 -1
  104. package/dist/agents/index.d.ts +0 -1
  105. package/dist/agents/index.d.ts.map +0 -1
  106. package/dist/agents/index.js +0 -4
  107. package/dist/agents/index.js.map +0 -1
  108. package/dist/agents/robota.test.d.ts +0 -2
  109. package/dist/agents/robota.test.d.ts.map +0 -1
  110. package/dist/agents/robota.test.js +0 -416
  111. package/dist/agents/robota.test.js.map +0 -1
  112. package/dist/browser/builtin-templates.json +0 -107
  113. package/dist/core/robota.d.ts +0 -694
  114. package/dist/core/robota.d.ts.map +0 -1
  115. package/dist/core/robota.js +0 -1277
  116. package/dist/core/robota.js.map +0 -1
  117. package/dist/executors/local-executor.d.ts +0 -96
  118. package/dist/executors/local-executor.d.ts.map +0 -1
  119. package/dist/executors/local-executor.js +0 -197
  120. package/dist/executors/local-executor.js.map +0 -1
  121. package/dist/executors/local-executor.test.d.ts +0 -2
  122. package/dist/executors/local-executor.test.d.ts.map +0 -1
  123. package/dist/executors/local-executor.test.js +0 -192
  124. package/dist/executors/local-executor.test.js.map +0 -1
  125. package/dist/index.d.ts +0 -274
  126. package/dist/index.d.ts.map +0 -1
  127. package/dist/index.js +0 -235
  128. package/dist/index.js.map +0 -1
  129. package/dist/interfaces/agent.d.ts +0 -198
  130. package/dist/interfaces/agent.d.ts.map +0 -1
  131. package/dist/interfaces/agent.js +0 -2
  132. package/dist/interfaces/agent.js.map +0 -1
  133. package/dist/interfaces/event-service.d.ts +0 -79
  134. package/dist/interfaces/event-service.d.ts.map +0 -1
  135. package/dist/interfaces/event-service.js +0 -2
  136. package/dist/interfaces/event-service.js.map +0 -1
  137. package/dist/interfaces/executor.d.ts +0 -128
  138. package/dist/interfaces/executor.d.ts.map +0 -1
  139. package/dist/interfaces/executor.js +0 -2
  140. package/dist/interfaces/executor.js.map +0 -1
  141. package/dist/interfaces/history-module.d.ts +0 -19
  142. package/dist/interfaces/history-module.d.ts.map +0 -1
  143. package/dist/interfaces/history-module.js +0 -2
  144. package/dist/interfaces/history-module.js.map +0 -1
  145. package/dist/interfaces/index.d.ts +0 -13
  146. package/dist/interfaces/index.d.ts.map +0 -1
  147. package/dist/interfaces/index.js +0 -4
  148. package/dist/interfaces/index.js.map +0 -1
  149. package/dist/interfaces/manager.d.ts +0 -142
  150. package/dist/interfaces/manager.d.ts.map +0 -1
  151. package/dist/interfaces/manager.js +0 -2
  152. package/dist/interfaces/manager.js.map +0 -1
  153. package/dist/interfaces/messages.d.ts +0 -75
  154. package/dist/interfaces/messages.d.ts.map +0 -1
  155. package/dist/interfaces/messages.js +0 -29
  156. package/dist/interfaces/messages.js.map +0 -1
  157. package/dist/interfaces/progress-reporting.d.ts +0 -86
  158. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  159. package/dist/interfaces/progress-reporting.js +0 -37
  160. package/dist/interfaces/progress-reporting.js.map +0 -1
  161. package/dist/interfaces/provider.d.ts +0 -217
  162. package/dist/interfaces/provider.d.ts.map +0 -1
  163. package/dist/interfaces/provider.js +0 -2
  164. package/dist/interfaces/provider.js.map +0 -1
  165. package/dist/interfaces/service.d.ts +0 -205
  166. package/dist/interfaces/service.d.ts.map +0 -1
  167. package/dist/interfaces/service.js +0 -6
  168. package/dist/interfaces/service.js.map +0 -1
  169. package/dist/interfaces/tool.d.ts +0 -248
  170. package/dist/interfaces/tool.d.ts.map +0 -1
  171. package/dist/interfaces/tool.js +0 -2
  172. package/dist/interfaces/tool.js.map +0 -1
  173. package/dist/interfaces/types.d.ts +0 -71
  174. package/dist/interfaces/types.d.ts.map +0 -1
  175. package/dist/interfaces/types.js +0 -33
  176. package/dist/interfaces/types.js.map +0 -1
  177. package/dist/interfaces/workflow-converter.d.ts +0 -193
  178. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  179. package/dist/interfaces/workflow-converter.js +0 -11
  180. package/dist/interfaces/workflow-converter.js.map +0 -1
  181. package/dist/interfaces/workflow-validator.d.ts +0 -209
  182. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  183. package/dist/interfaces/workflow-validator.js +0 -16
  184. package/dist/interfaces/workflow-validator.js.map +0 -1
  185. package/dist/managers/agent-factory.d.ts +0 -132
  186. package/dist/managers/agent-factory.d.ts.map +0 -1
  187. package/dist/managers/agent-factory.js +0 -284
  188. package/dist/managers/agent-factory.js.map +0 -1
  189. package/dist/managers/agent-factory.test.d.ts +0 -2
  190. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  191. package/dist/managers/agent-factory.test.js +0 -249
  192. package/dist/managers/agent-factory.test.js.map +0 -1
  193. package/dist/managers/agent-templates.d.ts +0 -84
  194. package/dist/managers/agent-templates.d.ts.map +0 -1
  195. package/dist/managers/agent-templates.js +0 -159
  196. package/dist/managers/agent-templates.js.map +0 -1
  197. package/dist/managers/ai-provider-manager.d.ts +0 -80
  198. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  199. package/dist/managers/ai-provider-manager.js +0 -226
  200. package/dist/managers/ai-provider-manager.js.map +0 -1
  201. package/dist/managers/conversation-history-manager.d.ts +0 -455
  202. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  203. package/dist/managers/conversation-history-manager.js +0 -578
  204. package/dist/managers/conversation-history-manager.js.map +0 -1
  205. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  206. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  207. package/dist/managers/conversation-history-manager.test.js +0 -374
  208. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  209. package/dist/managers/index.d.ts +0 -8
  210. package/dist/managers/index.d.ts.map +0 -1
  211. package/dist/managers/index.js +0 -8
  212. package/dist/managers/index.js.map +0 -1
  213. package/dist/managers/module-registry.d.ts +0 -161
  214. package/dist/managers/module-registry.d.ts.map +0 -1
  215. package/dist/managers/module-registry.js +0 -519
  216. package/dist/managers/module-registry.js.map +0 -1
  217. package/dist/managers/module-type-registry.d.ts +0 -113
  218. package/dist/managers/module-type-registry.d.ts.map +0 -1
  219. package/dist/managers/module-type-registry.js +0 -439
  220. package/dist/managers/module-type-registry.js.map +0 -1
  221. package/dist/managers/plugins.d.ts +0 -166
  222. package/dist/managers/plugins.d.ts.map +0 -1
  223. package/dist/managers/plugins.js +0 -339
  224. package/dist/managers/plugins.js.map +0 -1
  225. package/dist/managers/tool-manager.d.ts +0 -70
  226. package/dist/managers/tool-manager.d.ts.map +0 -1
  227. package/dist/managers/tool-manager.js +0 -138
  228. package/dist/managers/tool-manager.js.map +0 -1
  229. package/dist/managers/tool-manager.test.d.ts +0 -2
  230. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  231. package/dist/managers/tool-manager.test.js +0 -186
  232. package/dist/managers/tool-manager.test.js.map +0 -1
  233. package/dist/node/builtin-templates.json +0 -107
  234. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  235. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  236. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  237. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  238. package/dist/plugins/conversation-history/index.d.ts +0 -3
  239. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  240. package/dist/plugins/conversation-history/index.js +0 -2
  241. package/dist/plugins/conversation-history/index.js.map +0 -1
  242. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  243. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  244. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  245. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  246. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  247. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  248. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  249. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  250. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  251. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  252. package/dist/plugins/conversation-history/storages/index.js +0 -4
  253. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  254. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  255. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  256. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  257. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  258. package/dist/plugins/conversation-history/types.d.ts +0 -61
  259. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  260. package/dist/plugins/conversation-history/types.js +0 -2
  261. package/dist/plugins/conversation-history/types.js.map +0 -1
  262. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  263. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  264. package/dist/plugins/error-handling/context-adapter.js +0 -41
  265. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  266. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  267. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  268. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  269. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  270. package/dist/plugins/error-handling/index.d.ts +0 -10
  271. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  272. package/dist/plugins/error-handling/index.js +0 -10
  273. package/dist/plugins/error-handling/index.js.map +0 -1
  274. package/dist/plugins/error-handling/types.d.ts +0 -73
  275. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  276. package/dist/plugins/error-handling/types.js +0 -14
  277. package/dist/plugins/error-handling/types.js.map +0 -1
  278. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  279. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  280. package/dist/plugins/event-emitter/metrics.js +0 -17
  281. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  282. package/dist/plugins/event-emitter/types.d.ts +0 -112
  283. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  284. package/dist/plugins/event-emitter/types.js +0 -65
  285. package/dist/plugins/event-emitter/types.js.map +0 -1
  286. package/dist/plugins/event-emitter-plugin.d.ts +0 -222
  287. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  288. package/dist/plugins/event-emitter-plugin.js +0 -432
  289. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  290. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  291. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  292. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  293. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  294. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  295. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  296. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  297. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  298. package/dist/plugins/execution/index.d.ts +0 -3
  299. package/dist/plugins/execution/index.d.ts.map +0 -1
  300. package/dist/plugins/execution/index.js +0 -2
  301. package/dist/plugins/execution/index.js.map +0 -1
  302. package/dist/plugins/execution/types.d.ts +0 -90
  303. package/dist/plugins/execution/types.d.ts.map +0 -1
  304. package/dist/plugins/execution/types.js +0 -2
  305. package/dist/plugins/execution/types.js.map +0 -1
  306. package/dist/plugins/index.d.ts +0 -10
  307. package/dist/plugins/index.d.ts.map +0 -1
  308. package/dist/plugins/index.js +0 -11
  309. package/dist/plugins/index.js.map +0 -1
  310. package/dist/plugins/limits/types.d.ts +0 -61
  311. package/dist/plugins/limits/types.d.ts.map +0 -1
  312. package/dist/plugins/limits/types.js +0 -2
  313. package/dist/plugins/limits/types.js.map +0 -1
  314. package/dist/plugins/limits-plugin.d.ts +0 -113
  315. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  316. package/dist/plugins/limits-plugin.js +0 -380
  317. package/dist/plugins/limits-plugin.js.map +0 -1
  318. package/dist/plugins/logging/formatters.d.ts +0 -14
  319. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  320. package/dist/plugins/logging/formatters.js +0 -24
  321. package/dist/plugins/logging/formatters.js.map +0 -1
  322. package/dist/plugins/logging/index.d.ts +0 -3
  323. package/dist/plugins/logging/index.d.ts.map +0 -1
  324. package/dist/plugins/logging/index.js +0 -2
  325. package/dist/plugins/logging/index.js.map +0 -1
  326. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  327. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  328. package/dist/plugins/logging/logging-plugin.js +0 -335
  329. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  330. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  331. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  332. package/dist/plugins/logging/storages/console-storage.js +0 -38
  333. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  334. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  335. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  336. package/dist/plugins/logging/storages/file-storage.js +0 -41
  337. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  338. package/dist/plugins/logging/storages/index.d.ts +0 -5
  339. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  340. package/dist/plugins/logging/storages/index.js +0 -5
  341. package/dist/plugins/logging/storages/index.js.map +0 -1
  342. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  343. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  344. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  345. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  346. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  347. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  348. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  349. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  350. package/dist/plugins/logging/types.d.ts +0 -84
  351. package/dist/plugins/logging/types.d.ts.map +0 -1
  352. package/dist/plugins/logging/types.js +0 -2
  353. package/dist/plugins/logging/types.js.map +0 -1
  354. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  355. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  356. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  357. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  358. package/dist/plugins/performance/index.d.ts +0 -5
  359. package/dist/plugins/performance/index.d.ts.map +0 -1
  360. package/dist/plugins/performance/index.js +0 -4
  361. package/dist/plugins/performance/index.js.map +0 -1
  362. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  363. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  364. package/dist/plugins/performance/performance-plugin.js +0 -293
  365. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  366. package/dist/plugins/performance/storages/index.d.ts +0 -2
  367. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  368. package/dist/plugins/performance/storages/index.js +0 -4
  369. package/dist/plugins/performance/storages/index.js.map +0 -1
  370. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  371. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  372. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  373. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  374. package/dist/plugins/performance/types.d.ts +0 -154
  375. package/dist/plugins/performance/types.d.ts.map +0 -1
  376. package/dist/plugins/performance/types.js +0 -2
  377. package/dist/plugins/performance/types.js.map +0 -1
  378. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  379. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  380. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  381. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  382. package/dist/plugins/usage/index.d.ts +0 -5
  383. package/dist/plugins/usage/index.d.ts.map +0 -1
  384. package/dist/plugins/usage/index.js +0 -4
  385. package/dist/plugins/usage/index.js.map +0 -1
  386. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  387. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  388. package/dist/plugins/usage/storages/file-storage.js +0 -111
  389. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  390. package/dist/plugins/usage/storages/index.d.ts +0 -5
  391. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  392. package/dist/plugins/usage/storages/index.js +0 -5
  393. package/dist/plugins/usage/storages/index.js.map +0 -1
  394. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  395. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  396. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  397. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  398. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  399. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  400. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  401. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  402. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  403. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  404. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  405. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  406. package/dist/plugins/usage/types.d.ts +0 -127
  407. package/dist/plugins/usage/types.d.ts.map +0 -1
  408. package/dist/plugins/usage/types.js +0 -2
  409. package/dist/plugins/usage/types.js.map +0 -1
  410. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  411. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  412. package/dist/plugins/usage/usage-plugin.js +0 -309
  413. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  414. package/dist/plugins/webhook/http-client.d.ts +0 -30
  415. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  416. package/dist/plugins/webhook/http-client.js +0 -110
  417. package/dist/plugins/webhook/http-client.js.map +0 -1
  418. package/dist/plugins/webhook/index.d.ts +0 -9
  419. package/dist/plugins/webhook/index.d.ts.map +0 -1
  420. package/dist/plugins/webhook/index.js +0 -9
  421. package/dist/plugins/webhook/index.js.map +0 -1
  422. package/dist/plugins/webhook/transformer.d.ts +0 -63
  423. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  424. package/dist/plugins/webhook/transformer.js +0 -157
  425. package/dist/plugins/webhook/transformer.js.map +0 -1
  426. package/dist/plugins/webhook/types.d.ts +0 -183
  427. package/dist/plugins/webhook/types.d.ts.map +0 -1
  428. package/dist/plugins/webhook/types.js +0 -2
  429. package/dist/plugins/webhook/types.js.map +0 -1
  430. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  431. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  432. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  433. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  434. package/dist/schemas/agent-template-schema.d.ts +0 -137
  435. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  436. package/dist/schemas/agent-template-schema.js +0 -87
  437. package/dist/schemas/agent-template-schema.js.map +0 -1
  438. package/dist/services/conversation-service/index.d.ts +0 -88
  439. package/dist/services/conversation-service/index.d.ts.map +0 -1
  440. package/dist/services/conversation-service/index.js +0 -441
  441. package/dist/services/conversation-service/index.js.map +0 -1
  442. package/dist/services/conversation-service/types.d.ts +0 -32
  443. package/dist/services/conversation-service/types.d.ts.map +0 -1
  444. package/dist/services/conversation-service/types.js +0 -8
  445. package/dist/services/conversation-service/types.js.map +0 -1
  446. package/dist/services/event-service.d.ts +0 -61
  447. package/dist/services/event-service.d.ts.map +0 -1
  448. package/dist/services/event-service.js +0 -110
  449. package/dist/services/event-service.js.map +0 -1
  450. package/dist/services/event-service.test.d.ts +0 -2
  451. package/dist/services/event-service.test.d.ts.map +0 -1
  452. package/dist/services/event-service.test.js +0 -86
  453. package/dist/services/event-service.test.js.map +0 -1
  454. package/dist/services/execution-service.d.ts +0 -151
  455. package/dist/services/execution-service.d.ts.map +0 -1
  456. package/dist/services/execution-service.js +0 -1262
  457. package/dist/services/execution-service.js.map +0 -1
  458. package/dist/services/execution-service.test.d.ts +0 -2
  459. package/dist/services/execution-service.test.d.ts.map +0 -1
  460. package/dist/services/execution-service.test.js +0 -338
  461. package/dist/services/execution-service.test.js.map +0 -1
  462. package/dist/services/history-module.d.ts +0 -15
  463. package/dist/services/history-module.d.ts.map +0 -1
  464. package/dist/services/history-module.js +0 -42
  465. package/dist/services/history-module.js.map +0 -1
  466. package/dist/services/in-memory-history-store.d.ts +0 -12
  467. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  468. package/dist/services/in-memory-history-store.js +0 -41
  469. package/dist/services/in-memory-history-store.js.map +0 -1
  470. package/dist/services/index.d.ts +0 -7
  471. package/dist/services/index.d.ts.map +0 -1
  472. package/dist/services/index.js +0 -13
  473. package/dist/services/index.js.map +0 -1
  474. package/dist/services/task-events.d.ts +0 -6
  475. package/dist/services/task-events.d.ts.map +0 -1
  476. package/dist/services/task-events.js +0 -6
  477. package/dist/services/task-events.js.map +0 -1
  478. package/dist/services/tool-execution-service.d.ts +0 -74
  479. package/dist/services/tool-execution-service.d.ts.map +0 -1
  480. package/dist/services/tool-execution-service.js +0 -189
  481. package/dist/services/tool-execution-service.js.map +0 -1
  482. package/dist/services/user-events.d.ts +0 -7
  483. package/dist/services/user-events.d.ts.map +0 -1
  484. package/dist/services/user-events.js +0 -6
  485. package/dist/services/user-events.js.map +0 -1
  486. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  487. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  488. package/dist/tools/implementations/function-tool/index.js +0 -13
  489. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  490. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  491. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  492. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  493. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  494. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  495. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  496. package/dist/tools/implementations/function-tool/types.js +0 -14
  497. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  498. package/dist/tools/implementations/function-tool.d.ts +0 -49
  499. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  500. package/dist/tools/implementations/function-tool.js +0 -223
  501. package/dist/tools/implementations/function-tool.js.map +0 -1
  502. package/dist/tools/implementations/index.d.ts +0 -4
  503. package/dist/tools/implementations/index.d.ts.map +0 -1
  504. package/dist/tools/implementations/index.js +0 -5
  505. package/dist/tools/implementations/index.js.map +0 -1
  506. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  507. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  508. package/dist/tools/implementations/mcp-tool.js +0 -246
  509. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  510. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  511. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  512. package/dist/tools/implementations/openapi-tool.js +0 -324
  513. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  514. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  515. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  516. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  517. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  518. package/dist/tools/index.d.ts +0 -3
  519. package/dist/tools/index.d.ts.map +0 -1
  520. package/dist/tools/index.js +0 -4
  521. package/dist/tools/index.js.map +0 -1
  522. package/dist/tools/registry/index.d.ts +0 -2
  523. package/dist/tools/registry/index.d.ts.map +0 -1
  524. package/dist/tools/registry/index.js +0 -3
  525. package/dist/tools/registry/index.js.map +0 -1
  526. package/dist/tools/registry/tool-registry.d.ts +0 -54
  527. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  528. package/dist/tools/registry/tool-registry.js +0 -146
  529. package/dist/tools/registry/tool-registry.js.map +0 -1
  530. package/dist/utils/errors.d.ts +0 -155
  531. package/dist/utils/errors.d.ts.map +0 -1
  532. package/dist/utils/errors.js +0 -203
  533. package/dist/utils/errors.js.map +0 -1
  534. package/dist/utils/execution-proxy.d.ts +0 -75
  535. package/dist/utils/execution-proxy.d.ts.map +0 -1
  536. package/dist/utils/execution-proxy.js +0 -230
  537. package/dist/utils/execution-proxy.js.map +0 -1
  538. package/dist/utils/index.d.ts +0 -11
  539. package/dist/utils/index.d.ts.map +0 -1
  540. package/dist/utils/index.js +0 -7
  541. package/dist/utils/index.js.map +0 -1
  542. package/dist/utils/logger.d.ts +0 -74
  543. package/dist/utils/logger.d.ts.map +0 -1
  544. package/dist/utils/logger.js +0 -143
  545. package/dist/utils/logger.js.map +0 -1
  546. package/dist/utils/message-converter.d.ts +0 -68
  547. package/dist/utils/message-converter.d.ts.map +0 -1
  548. package/dist/utils/message-converter.js +0 -87
  549. package/dist/utils/message-converter.js.map +0 -1
  550. package/dist/utils/periodic-task.d.ts +0 -14
  551. package/dist/utils/periodic-task.d.ts.map +0 -1
  552. package/dist/utils/periodic-task.js +0 -26
  553. package/dist/utils/periodic-task.js.map +0 -1
  554. package/dist/utils/validation.d.ts +0 -40
  555. package/dist/utils/validation.d.ts.map +0 -1
  556. package/dist/utils/validation.js +0 -162
  557. 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.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AAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE;SAC7C,CAAC,CAAC;QACH,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/C,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe,CAAC,GAAW,EAAE,OAK1C;QACG,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;QACzC,MAAM,SAAS,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QAExE,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;gBAC9B,MAAM,EAAE,OAAO,CAAC,MAAM;gBACtB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,MAAM,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,WAA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C,CAAC,CAAC;gBACf,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;gBACtC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,EAAE;gBAClC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,EAAE;aAC/B,CAAC,CAAC,CAAC,SAAS;SAChB,CAAC;QAEF,OAAO;YACH,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,KAAK,EAAE,SAAS;SACnB,CAAC;IACN,CAAC;IAED;;;;;;;;;;;OAWG;IACK,MAAM,CAAC,eAAe,CAAC,GAAgB,EAAE,GAAW;QACxD,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YACxE,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,GAAG,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,GAAG,SAAS,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,SAAS,CAAC,EAAE,oBAAoB,EAAE,GAAG,SAAS,CAAC;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zB,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