@robota-sdk/agent-core 3.0.0-beta.6 → 3.0.0-beta.60

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