@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,339 +0,0 @@
1
- import { AbstractManager } from '../abstracts/abstract-manager';
2
- import { createLogger } from '../utils/logger';
3
- import { PluginError, ConfigurationError } from '../utils/errors';
4
- /**
5
- * Plugin Manager - manages plugin lifecycle and dependencies
6
- * Instance-based for isolation
7
- * @internal
8
- */
9
- export class Plugins extends AbstractManager {
10
- plugins = new Map();
11
- pluginOptions = new Map();
12
- initializationOrder = [];
13
- lifecycleEvents;
14
- logger;
15
- constructor(lifecycleEvents = {}) {
16
- super();
17
- this.lifecycleEvents = lifecycleEvents;
18
- this.logger = createLogger('Plugins');
19
- }
20
- /**
21
- * Actual initialization logic - required by AbstractManager
22
- */
23
- async doInitialize() {
24
- this.logger.debug('Plugins manager initializing');
25
- // No specific initialization needed for the manager itself
26
- }
27
- /**
28
- * Actual disposal logic - required by AbstractManager
29
- */
30
- async doDispose() {
31
- this.logger.debug('Plugins manager disposing');
32
- await this.destroyAll();
33
- this.plugins.clear();
34
- this.pluginOptions.clear();
35
- this.initializationOrder = [];
36
- }
37
- /**
38
- * Initialize the plugin manager
39
- */
40
- async initialize() {
41
- if (this.initialized) {
42
- return;
43
- }
44
- this.logger.debug('Initializing Plugins manager');
45
- this.initialized = true;
46
- this.logger.debug('Plugins manager initialized');
47
- }
48
- /**
49
- * Register a plugin with optional configuration
50
- */
51
- async register(plugin, options = {}) {
52
- const pluginName = plugin.name;
53
- if (this.plugins.has(pluginName)) {
54
- this.logger.warn(`Plugin "${pluginName}" is already registered, overriding`, {
55
- pluginName,
56
- existingVersion: this.plugins.get(pluginName)?.version,
57
- newVersion: plugin.version
58
- });
59
- // Unregister existing plugin first
60
- await this.unregister(pluginName);
61
- }
62
- // Validate dependencies
63
- if (options.dependencies) {
64
- await this.validateDependencies(options.dependencies);
65
- }
66
- // Store plugin and options
67
- this.plugins.set(pluginName, plugin);
68
- this.pluginOptions.set(pluginName, {
69
- dependencies: options.dependencies || [],
70
- priority: options.priority || 0,
71
- autoInitialize: options.autoInitialize ?? true,
72
- });
73
- this.logger.info(`Plugin "${pluginName}" registered`, {
74
- version: plugin.version,
75
- priority: options.priority || 0,
76
- dependencies: options.dependencies?.length || 0,
77
- autoInitialize: options.autoInitialize ?? true,
78
- });
79
- // Auto-initialize if requested
80
- if (options.autoInitialize !== false) {
81
- await this.initializePlugin(pluginName);
82
- }
83
- }
84
- /**
85
- * Unregister a plugin by name
86
- */
87
- async unregister(pluginName) {
88
- const plugin = this.plugins.get(pluginName);
89
- if (!plugin) {
90
- this.logger.warn(`Attempted to unregister non-existent plugin "${pluginName}"`);
91
- return false;
92
- }
93
- try {
94
- // Destroy plugin if initialized
95
- const status = plugin.getStatus();
96
- if (status.initialized) {
97
- await this.destroyPlugin(pluginName);
98
- }
99
- // Remove from collections
100
- this.plugins.delete(pluginName);
101
- this.pluginOptions.delete(pluginName);
102
- this.initializationOrder = this.initializationOrder.filter(name => name !== pluginName);
103
- this.logger.info(`Plugin "${pluginName}" unregistered successfully`);
104
- return true;
105
- }
106
- catch (error) {
107
- this.logger.error(`Failed to unregister plugin "${pluginName}"`, {
108
- error: error instanceof Error ? error.message : String(error),
109
- });
110
- throw new PluginError(`Failed to unregister plugin: ${error instanceof Error ? error.message : String(error)}`, pluginName);
111
- }
112
- }
113
- /**
114
- * Initialize all registered plugins in dependency order
115
- */
116
- async initializeAll() {
117
- const pluginNames = Array.from(this.plugins.keys());
118
- this.initializationOrder = this.resolveDependencyOrder(pluginNames);
119
- this.logger.debug('Initializing all plugins', {
120
- totalPlugins: pluginNames.length,
121
- initializationOrder: this.initializationOrder,
122
- });
123
- for (const pluginName of this.initializationOrder) {
124
- await this.initializePlugin(pluginName);
125
- }
126
- this.logger.info('All plugins initialized successfully', {
127
- totalPlugins: this.initializationOrder.length,
128
- });
129
- }
130
- /**
131
- * Destroy all plugins in reverse dependency order
132
- */
133
- async destroyAll() {
134
- const destroyOrder = [...this.initializationOrder].reverse();
135
- this.logger.debug('Destroying all plugins', {
136
- totalPlugins: destroyOrder.length,
137
- destroyOrder,
138
- });
139
- for (const pluginName of destroyOrder) {
140
- await this.destroyPlugin(pluginName);
141
- }
142
- this.initializationOrder = [];
143
- this.logger.info('All plugins destroyed successfully');
144
- }
145
- /**
146
- * Get plugin by name with type safety
147
- */
148
- getPlugin(name) {
149
- const plugin = this.plugins.get(name);
150
- return plugin ? plugin : null;
151
- }
152
- /**
153
- * Get all registered plugins
154
- */
155
- getPlugins() {
156
- return Array.from(this.plugins.values());
157
- }
158
- /**
159
- * Get plugin names
160
- */
161
- getPluginNames() {
162
- return Array.from(this.plugins.keys());
163
- }
164
- /**
165
- * Check if plugin is registered
166
- */
167
- hasPlugin(name) {
168
- return this.plugins.has(name);
169
- }
170
- /**
171
- * Get plugin status information
172
- */
173
- getPluginStatus(name) {
174
- const plugin = this.plugins.get(name);
175
- const options = this.pluginOptions.get(name);
176
- if (!plugin || !options) {
177
- return null;
178
- }
179
- const status = plugin.getStatus();
180
- return {
181
- name: status.name,
182
- version: status.version,
183
- enabled: status.enabled,
184
- initialized: status.initialized,
185
- dependencies: options.dependencies?.map(dep => dep.name) || [],
186
- priority: options.priority || 0,
187
- };
188
- }
189
- /**
190
- * Get all plugin statuses
191
- */
192
- getAllPluginStatuses() {
193
- return Array.from(this.plugins.keys())
194
- .map(name => this.getPluginStatus(name))
195
- .filter((status) => status !== null);
196
- }
197
- // ================================
198
- // Private helper methods
199
- // ================================
200
- /**
201
- * Initialize a single plugin
202
- */
203
- async initializePlugin(pluginName) {
204
- const plugin = this.plugins.get(pluginName);
205
- if (!plugin) {
206
- throw new PluginError(`Plugin "${pluginName}" not found`, pluginName);
207
- }
208
- const status = plugin.getStatus();
209
- if (status.initialized) {
210
- this.logger.debug(`Plugin "${pluginName}" already initialized`);
211
- return;
212
- }
213
- try {
214
- // Call before initialize lifecycle event
215
- if (this.lifecycleEvents.beforeInitialize) {
216
- await this.lifecycleEvents.beforeInitialize(plugin);
217
- }
218
- // Initialize the plugin
219
- const startTime = Date.now();
220
- await plugin.initialize();
221
- const duration = Date.now() - startTime;
222
- this.logger.info(`Plugin "${pluginName}" initialized successfully`, {
223
- duration,
224
- version: plugin.version,
225
- });
226
- // Call after initialize lifecycle event
227
- if (this.lifecycleEvents.afterInitialize) {
228
- await this.lifecycleEvents.afterInitialize(plugin);
229
- }
230
- }
231
- catch (error) {
232
- this.logger.error(`Failed to initialize plugin "${pluginName}"`, {
233
- error: error instanceof Error ? error.message : String(error),
234
- });
235
- // Call error lifecycle event
236
- if (this.lifecycleEvents.onError) {
237
- await this.lifecycleEvents.onError(plugin, error);
238
- }
239
- throw new PluginError(`Failed to initialize plugin: ${error instanceof Error ? error.message : String(error)}`, pluginName);
240
- }
241
- }
242
- /**
243
- * Destroy a single plugin
244
- */
245
- async destroyPlugin(pluginName) {
246
- const plugin = this.plugins.get(pluginName);
247
- if (!plugin) {
248
- return;
249
- }
250
- const status = plugin.getStatus();
251
- if (!status.initialized) {
252
- this.logger.debug(`Plugin "${pluginName}" not initialized, skipping destroy`);
253
- return;
254
- }
255
- try {
256
- // Call before destroy lifecycle event
257
- if (this.lifecycleEvents.beforeDestroy) {
258
- await this.lifecycleEvents.beforeDestroy(plugin);
259
- }
260
- // Destroy the plugin
261
- await plugin.dispose();
262
- this.logger.info(`Plugin "${pluginName}" destroyed successfully`);
263
- // Call after destroy lifecycle event
264
- if (this.lifecycleEvents.afterDestroy) {
265
- await this.lifecycleEvents.afterDestroy(plugin);
266
- }
267
- }
268
- catch (error) {
269
- this.logger.error(`Failed to destroy plugin "${pluginName}"`, {
270
- error: error instanceof Error ? error.message : String(error),
271
- });
272
- // Call error lifecycle event
273
- if (this.lifecycleEvents.onError) {
274
- await this.lifecycleEvents.onError(plugin, error);
275
- }
276
- throw new PluginError(`Failed to destroy plugin: ${error instanceof Error ? error.message : String(error)}`, pluginName);
277
- }
278
- }
279
- /**
280
- * Validate plugin dependencies
281
- */
282
- async validateDependencies(dependencies) {
283
- for (const dep of dependencies) {
284
- if (dep.required && !this.plugins.has(dep.name)) {
285
- throw new ConfigurationError(`Required dependency "${dep.name}" is not registered`);
286
- }
287
- // Version checking could be implemented here if needed
288
- if (dep.minVersion) {
289
- const dependencyPlugin = this.plugins.get(dep.name);
290
- if (dependencyPlugin && dependencyPlugin.version) {
291
- // Simple version comparison (could be enhanced with semver)
292
- if (dependencyPlugin.version < dep.minVersion) {
293
- throw new ConfigurationError(`Dependency "${dep.name}" version ${dependencyPlugin.version} is less than required ${dep.minVersion}`);
294
- }
295
- }
296
- }
297
- }
298
- }
299
- /**
300
- * Resolve dependency order for initialization
301
- */
302
- resolveDependencyOrder(pluginNames) {
303
- const resolved = [];
304
- const visiting = new Set();
305
- const visited = new Set();
306
- const visit = (pluginName) => {
307
- if (visited.has(pluginName)) {
308
- return;
309
- }
310
- if (visiting.has(pluginName)) {
311
- throw new ConfigurationError(`Circular dependency detected involving plugin "${pluginName}"`);
312
- }
313
- visiting.add(pluginName);
314
- // Visit dependencies first
315
- const options = this.pluginOptions.get(pluginName);
316
- if (options?.dependencies) {
317
- for (const dep of options.dependencies) {
318
- if (pluginNames.includes(dep.name)) {
319
- visit(dep.name);
320
- }
321
- }
322
- }
323
- visiting.delete(pluginName);
324
- visited.add(pluginName);
325
- resolved.push(pluginName);
326
- };
327
- // Sort by priority first, then resolve dependencies
328
- const sortedPlugins = pluginNames.sort((a, b) => {
329
- const priorityA = this.pluginOptions.get(a)?.priority || 0;
330
- const priorityB = this.pluginOptions.get(b)?.priority || 0;
331
- return priorityB - priorityA; // Higher priority first
332
- });
333
- for (const pluginName of sortedPlugins) {
334
- visit(pluginName);
335
- }
336
- return resolved;
337
- }
338
- }
339
- //# sourceMappingURL=plugins.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/managers/plugins.ts"],"names":[],"mappings":"AAAA,O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CAAC,YAAY,EAAE,CAAC;oBACrC,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;wBACjC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACpB,CAAC;gBACL,CAAC;YACL,CAAC;YAED,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YACxB,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC9B,CAAC,CAAC;QAEF,oDAAoD;QACpD,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YAC5C,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,CAAC,CAAC;YAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,IAAI,CAAC,CAAC;YAC3D,OAAO,SAAS,GAAG,SAAS,CAAC,CAAC,wBAAwB;QAC1D,CAAC,CAAC,CAAC;QAEH,KAAK,MAAM,UAAU,IAAI,aAAa,EAAE,CAAC;YACrC,KAAK,CAAC,UAAU,CAAC,CAAC;QACtB,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ"}
@@ -1,70 +0,0 @@
1
- import type { IToolManager } from '../interfaces/manager';
2
- import type { IToolSchema } from '../interfaces/provider';
3
- import type { ITool, TToolExecutor, TToolParameters, IToolExecutionContext } from '../interfaces/tool';
4
- import type { TUniversalValue } from '../interfaces/types';
5
- import { AbstractManager } from '../abstracts/abstract-manager';
6
- import { ToolRegistry } from '../tools/registry/tool-registry';
7
- /**
8
- * Tool Manager - manages tool registration and execution
9
- * Manages tool registration and execution using Tool Registry
10
- * Instance-based for isolated tool management
11
- * @internal
12
- */
13
- export declare class Tools extends AbstractManager implements IToolManager {
14
- private registry;
15
- private allowedTools?;
16
- constructor();
17
- /**
18
- * Initialize the manager
19
- */
20
- protected doInitialize(): Promise<void>;
21
- /**
22
- * Cleanup manager resources
23
- */
24
- protected doDispose(): Promise<void>;
25
- /**
26
- * Register a tool with schema and executor function
27
- */
28
- addTool(schema: IToolSchema, executor: TToolExecutor): void;
29
- /**
30
- * Remove a tool by name
31
- */
32
- removeTool(name: string): void;
33
- /**
34
- * Get tool interface by name
35
- */
36
- getTool(name: string): ITool | undefined;
37
- /**
38
- * Get tool schema by name
39
- */
40
- getToolSchema(name: string): IToolSchema | undefined;
41
- /**
42
- * Get all registered tool schemas
43
- */
44
- getTools(): IToolSchema[];
45
- /**
46
- * Execute a tool with parameters
47
- */
48
- executeTool(name: string, parameters: TToolParameters, context?: IToolExecutionContext): Promise<TUniversalValue>;
49
- /**
50
- * Check if tool exists
51
- */
52
- hasTool(name: string): boolean;
53
- /**
54
- * Set allowed tools for filtering
55
- */
56
- setAllowedTools(tools: string[]): void;
57
- /**
58
- * Get allowed tools
59
- */
60
- getAllowedTools(): string[] | undefined;
61
- /**
62
- * Get tool registry instance (for advanced operations)
63
- */
64
- getRegistry(): ToolRegistry;
65
- /**
66
- * Get tool count
67
- */
68
- getToolCount(): number;
69
- }
70
- //# sourceMappingURL=tool-manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-manager.d.ts","sourceRoot":"","sources":["../../src/managers/tool-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACvG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAK/D;;;;;GAKG;AACH,qBAAa,KAAM,SAAQ,eAAgB,YAAW,YAAY;IAC9D,OAAO,CAAC,QAAQ,CAAe;IAC/B,OAAO,CAAC,YAAY,CAAC,CAAW;;IAOhC;;OAEG;cACa,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7C;;OAEG;cACa,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAM1C;;OAEG;IACH,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,GAAG,IAAI;IAS3D;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK9B;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAKxC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAMpD;;OAEG;IACH,QAAQ,IAAI,WAAW,EAAE;IAazB;;OAEG;IACG,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;IAuCvH;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAK9B;;OAEG;IACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI;IAMtC;;OAEG;IACH,eAAe,IAAI,MAAM,EAAE,GAAG,SAAS;IAKvC;;OAEG;IACH,WAAW,IAAI,YAAY;IAK3B;;OAEG;IACH,YAAY,IAAI,MAAM;CAIzB"}
@@ -1,138 +0,0 @@
1
- import { AbstractManager } from '../abstracts/abstract-manager';
2
- import { ToolRegistry } from '../tools/registry/tool-registry';
3
- import { FunctionTool } from '../tools/implementations/function-tool';
4
- import { ToolExecutionError } from '../utils/errors';
5
- import { logger } from '../utils/logger';
6
- /**
7
- * Tool Manager - manages tool registration and execution
8
- * Manages tool registration and execution using Tool Registry
9
- * Instance-based for isolated tool management
10
- * @internal
11
- */
12
- export class Tools extends AbstractManager {
13
- registry;
14
- allowedTools;
15
- constructor() {
16
- super();
17
- this.registry = new ToolRegistry();
18
- }
19
- /**
20
- * Initialize the manager
21
- */
22
- async doInitialize() {
23
- logger.debug('Tools initialized');
24
- }
25
- /**
26
- * Cleanup manager resources
27
- */
28
- async doDispose() {
29
- this.registry.clear();
30
- delete this.allowedTools;
31
- logger.debug('Tools disposed');
32
- }
33
- /**
34
- * Register a tool with schema and executor function
35
- */
36
- addTool(schema, executor) {
37
- this.ensureInitialized();
38
- const tool = new FunctionTool(schema, executor);
39
- this.registry.register(tool);
40
- logger.debug(`Tool "${schema.name}" registered successfully`);
41
- }
42
- /**
43
- * Remove a tool by name
44
- */
45
- removeTool(name) {
46
- this.ensureInitialized();
47
- this.registry.unregister(name);
48
- }
49
- /**
50
- * Get tool interface by name
51
- */
52
- getTool(name) {
53
- this.ensureInitialized();
54
- return this.registry.get(name);
55
- }
56
- /**
57
- * Get tool schema by name
58
- */
59
- getToolSchema(name) {
60
- this.ensureInitialized();
61
- const tool = this.registry.get(name);
62
- return tool?.schema;
63
- }
64
- /**
65
- * Get all registered tool schemas
66
- */
67
- getTools() {
68
- this.ensureInitialized();
69
- const schemas = this.registry.getSchemas();
70
- // Filter by allowed tools if set
71
- if (this.allowedTools) {
72
- return schemas.filter(schema => this.allowedTools.includes(schema.name));
73
- }
74
- return schemas;
75
- }
76
- /**
77
- * Execute a tool with parameters
78
- */
79
- async executeTool(name, parameters, context) {
80
- this.ensureInitialized();
81
- // Check if tool is allowed
82
- if (this.allowedTools && !this.allowedTools.includes(name)) {
83
- throw new ToolExecutionError(`Tool "${name}" is not in the allowed tools list`, name);
84
- }
85
- const tool = this.registry.get(name);
86
- if (!tool) {
87
- throw new ToolExecutionError(`Tool "${name}" is not registered`, name);
88
- }
89
- const result = await tool.execute(parameters, context);
90
- if (!result.success) {
91
- throw new ToolExecutionError(result.error || 'Tool execution failed', name, undefined, {
92
- parameters: JSON.stringify(parameters),
93
- result: JSON.stringify(result)
94
- });
95
- }
96
- if (typeof result.data === 'undefined') {
97
- throw new ToolExecutionError('Tool execution succeeded but returned no data', name);
98
- }
99
- return result.data;
100
- }
101
- /**
102
- * Check if tool exists
103
- */
104
- hasTool(name) {
105
- this.ensureInitialized();
106
- return this.registry.has(name);
107
- }
108
- /**
109
- * Set allowed tools for filtering
110
- */
111
- setAllowedTools(tools) {
112
- this.ensureInitialized();
113
- this.allowedTools = [...tools];
114
- logger.debug(`Set allowed tools: ${tools.join(', ')}`);
115
- }
116
- /**
117
- * Get allowed tools
118
- */
119
- getAllowedTools() {
120
- this.ensureInitialized();
121
- return this.allowedTools ? [...this.allowedTools] : undefined;
122
- }
123
- /**
124
- * Get tool registry instance (for advanced operations)
125
- */
126
- getRegistry() {
127
- this.ensureInitialized();
128
- return this.registry;
129
- }
130
- /**
131
- * Get tool count
132
- */
133
- getToolCount() {
134
- this.ensureInitialized();
135
- return this.registry.size();
136
- }
137
- }
138
- //# sourceMappingURL=tool-manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-manager.js","sourceRoot":"","sources":["../../src/managers/tool-manager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,OAAO,KAAM,SAAQ,eAAe;IAC9B,QAAQ,CAAe;IACvB,YAAY,CAAY;IAEhC;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;IACvC,CAAC;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,CAAC;QACxF,CAAC;QACD,OAAO,MAAM,CAAC,IAAI,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,IAAY;QAChB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,KAAe;QAC3B,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,IAAI,CAAC,YAAY,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC;QAC/B,MAAM,CAAC,KAAK,CAAC,sBAAsB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC;IAED;;OAEG;IACH,eAAe;QACX,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAClE,CAAC;IAED;;OAEG;IACH,WAAW;QACP,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,YAAY;QACR,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CACJ"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=tool-manager.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-manager.test.d.ts","sourceRoot":"","sources":["../../src/managers/tool-manager.test.ts"],"names":[],"mappings":""}