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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (511) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/README.md +41 -12
  3. package/dist/browser/index.d.ts +3736 -3090
  4. package/dist/browser/index.d.ts.map +1 -0
  5. package/dist/browser/index.js +12 -5
  6. package/dist/browser/index.js.map +1 -0
  7. package/dist/node/index.cjs +11 -5
  8. package/dist/node/index.d.ts +3736 -3090
  9. package/dist/node/index.d.ts.map +1 -0
  10. package/dist/node/index.js +12 -5
  11. package/dist/node/index.js.map +1 -0
  12. package/package.json +8 -5
  13. package/dist/abstracts/abstract-agent.d.ts +0 -56
  14. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  15. package/dist/abstracts/abstract-agent.js +0 -55
  16. package/dist/abstracts/abstract-agent.js.map +0 -1
  17. package/dist/abstracts/abstract-ai-provider.d.ts +0 -187
  18. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  19. package/dist/abstracts/abstract-ai-provider.js +0 -252
  20. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  21. package/dist/abstracts/abstract-executor.d.ts +0 -110
  22. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  23. package/dist/abstracts/abstract-executor.js +0 -156
  24. package/dist/abstracts/abstract-executor.js.map +0 -1
  25. package/dist/abstracts/abstract-manager.d.ts +0 -42
  26. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  27. package/dist/abstracts/abstract-manager.js +0 -49
  28. package/dist/abstracts/abstract-manager.js.map +0 -1
  29. package/dist/abstracts/abstract-module.d.ts +0 -365
  30. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  31. package/dist/abstracts/abstract-module.js +0 -474
  32. package/dist/abstracts/abstract-module.js.map +0 -1
  33. package/dist/abstracts/abstract-plugin.d.ts +0 -369
  34. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  35. package/dist/abstracts/abstract-plugin.js +0 -258
  36. package/dist/abstracts/abstract-plugin.js.map +0 -1
  37. package/dist/abstracts/abstract-tool.d.ts +0 -175
  38. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  39. package/dist/abstracts/abstract-tool.js +0 -140
  40. package/dist/abstracts/abstract-tool.js.map +0 -1
  41. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  42. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  43. package/dist/abstracts/abstract-workflow-converter.js +0 -252
  44. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  45. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -203
  46. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  47. package/dist/abstracts/abstract-workflow-validator.js +0 -447
  48. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  49. package/dist/abstracts/index.d.ts +0 -6
  50. package/dist/abstracts/index.d.ts.map +0 -1
  51. package/dist/abstracts/index.js +0 -9
  52. package/dist/abstracts/index.js.map +0 -1
  53. package/dist/agents/constants.d.ts +0 -23
  54. package/dist/agents/constants.d.ts.map +0 -1
  55. package/dist/agents/constants.js +0 -22
  56. package/dist/agents/constants.js.map +0 -1
  57. package/dist/agents/index.d.ts +0 -1
  58. package/dist/agents/index.d.ts.map +0 -1
  59. package/dist/agents/index.js +0 -4
  60. package/dist/agents/index.js.map +0 -1
  61. package/dist/agents/robota.test.d.ts +0 -2
  62. package/dist/agents/robota.test.d.ts.map +0 -1
  63. package/dist/agents/robota.test.js +0 -416
  64. package/dist/agents/robota.test.js.map +0 -1
  65. package/dist/browser/builtin-templates.json +0 -107
  66. package/dist/core/robota.d.ts +0 -694
  67. package/dist/core/robota.d.ts.map +0 -1
  68. package/dist/core/robota.js +0 -1277
  69. package/dist/core/robota.js.map +0 -1
  70. package/dist/executors/local-executor.d.ts +0 -96
  71. package/dist/executors/local-executor.d.ts.map +0 -1
  72. package/dist/executors/local-executor.js +0 -197
  73. package/dist/executors/local-executor.js.map +0 -1
  74. package/dist/executors/local-executor.test.d.ts +0 -2
  75. package/dist/executors/local-executor.test.d.ts.map +0 -1
  76. package/dist/executors/local-executor.test.js +0 -192
  77. package/dist/executors/local-executor.test.js.map +0 -1
  78. package/dist/index.d.ts +0 -274
  79. package/dist/index.d.ts.map +0 -1
  80. package/dist/index.js +0 -235
  81. package/dist/index.js.map +0 -1
  82. package/dist/interfaces/agent.d.ts +0 -198
  83. package/dist/interfaces/agent.d.ts.map +0 -1
  84. package/dist/interfaces/agent.js +0 -2
  85. package/dist/interfaces/agent.js.map +0 -1
  86. package/dist/interfaces/event-service.d.ts +0 -79
  87. package/dist/interfaces/event-service.d.ts.map +0 -1
  88. package/dist/interfaces/event-service.js +0 -2
  89. package/dist/interfaces/event-service.js.map +0 -1
  90. package/dist/interfaces/executor.d.ts +0 -128
  91. package/dist/interfaces/executor.d.ts.map +0 -1
  92. package/dist/interfaces/executor.js +0 -2
  93. package/dist/interfaces/executor.js.map +0 -1
  94. package/dist/interfaces/history-module.d.ts +0 -19
  95. package/dist/interfaces/history-module.d.ts.map +0 -1
  96. package/dist/interfaces/history-module.js +0 -2
  97. package/dist/interfaces/history-module.js.map +0 -1
  98. package/dist/interfaces/index.d.ts +0 -13
  99. package/dist/interfaces/index.d.ts.map +0 -1
  100. package/dist/interfaces/index.js +0 -4
  101. package/dist/interfaces/index.js.map +0 -1
  102. package/dist/interfaces/manager.d.ts +0 -142
  103. package/dist/interfaces/manager.d.ts.map +0 -1
  104. package/dist/interfaces/manager.js +0 -2
  105. package/dist/interfaces/manager.js.map +0 -1
  106. package/dist/interfaces/messages.d.ts +0 -75
  107. package/dist/interfaces/messages.d.ts.map +0 -1
  108. package/dist/interfaces/messages.js +0 -29
  109. package/dist/interfaces/messages.js.map +0 -1
  110. package/dist/interfaces/progress-reporting.d.ts +0 -86
  111. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  112. package/dist/interfaces/progress-reporting.js +0 -37
  113. package/dist/interfaces/progress-reporting.js.map +0 -1
  114. package/dist/interfaces/provider.d.ts +0 -217
  115. package/dist/interfaces/provider.d.ts.map +0 -1
  116. package/dist/interfaces/provider.js +0 -2
  117. package/dist/interfaces/provider.js.map +0 -1
  118. package/dist/interfaces/service.d.ts +0 -205
  119. package/dist/interfaces/service.d.ts.map +0 -1
  120. package/dist/interfaces/service.js +0 -6
  121. package/dist/interfaces/service.js.map +0 -1
  122. package/dist/interfaces/tool.d.ts +0 -248
  123. package/dist/interfaces/tool.d.ts.map +0 -1
  124. package/dist/interfaces/tool.js +0 -2
  125. package/dist/interfaces/tool.js.map +0 -1
  126. package/dist/interfaces/types.d.ts +0 -71
  127. package/dist/interfaces/types.d.ts.map +0 -1
  128. package/dist/interfaces/types.js +0 -33
  129. package/dist/interfaces/types.js.map +0 -1
  130. package/dist/interfaces/workflow-converter.d.ts +0 -193
  131. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  132. package/dist/interfaces/workflow-converter.js +0 -11
  133. package/dist/interfaces/workflow-converter.js.map +0 -1
  134. package/dist/interfaces/workflow-validator.d.ts +0 -209
  135. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  136. package/dist/interfaces/workflow-validator.js +0 -16
  137. package/dist/interfaces/workflow-validator.js.map +0 -1
  138. package/dist/managers/agent-factory.d.ts +0 -132
  139. package/dist/managers/agent-factory.d.ts.map +0 -1
  140. package/dist/managers/agent-factory.js +0 -284
  141. package/dist/managers/agent-factory.js.map +0 -1
  142. package/dist/managers/agent-factory.test.d.ts +0 -2
  143. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  144. package/dist/managers/agent-factory.test.js +0 -249
  145. package/dist/managers/agent-factory.test.js.map +0 -1
  146. package/dist/managers/agent-templates.d.ts +0 -84
  147. package/dist/managers/agent-templates.d.ts.map +0 -1
  148. package/dist/managers/agent-templates.js +0 -159
  149. package/dist/managers/agent-templates.js.map +0 -1
  150. package/dist/managers/ai-provider-manager.d.ts +0 -80
  151. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  152. package/dist/managers/ai-provider-manager.js +0 -226
  153. package/dist/managers/ai-provider-manager.js.map +0 -1
  154. package/dist/managers/conversation-history-manager.d.ts +0 -455
  155. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  156. package/dist/managers/conversation-history-manager.js +0 -578
  157. package/dist/managers/conversation-history-manager.js.map +0 -1
  158. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  159. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  160. package/dist/managers/conversation-history-manager.test.js +0 -374
  161. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  162. package/dist/managers/index.d.ts +0 -8
  163. package/dist/managers/index.d.ts.map +0 -1
  164. package/dist/managers/index.js +0 -8
  165. package/dist/managers/index.js.map +0 -1
  166. package/dist/managers/module-registry.d.ts +0 -161
  167. package/dist/managers/module-registry.d.ts.map +0 -1
  168. package/dist/managers/module-registry.js +0 -519
  169. package/dist/managers/module-registry.js.map +0 -1
  170. package/dist/managers/module-type-registry.d.ts +0 -113
  171. package/dist/managers/module-type-registry.d.ts.map +0 -1
  172. package/dist/managers/module-type-registry.js +0 -439
  173. package/dist/managers/module-type-registry.js.map +0 -1
  174. package/dist/managers/plugins.d.ts +0 -166
  175. package/dist/managers/plugins.d.ts.map +0 -1
  176. package/dist/managers/plugins.js +0 -339
  177. package/dist/managers/plugins.js.map +0 -1
  178. package/dist/managers/tool-manager.d.ts +0 -70
  179. package/dist/managers/tool-manager.d.ts.map +0 -1
  180. package/dist/managers/tool-manager.js +0 -138
  181. package/dist/managers/tool-manager.js.map +0 -1
  182. package/dist/managers/tool-manager.test.d.ts +0 -2
  183. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  184. package/dist/managers/tool-manager.test.js +0 -186
  185. package/dist/managers/tool-manager.test.js.map +0 -1
  186. package/dist/node/builtin-templates.json +0 -107
  187. package/dist/node/index.d.cts +0 -4238
  188. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  189. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  190. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  191. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  192. package/dist/plugins/conversation-history/index.d.ts +0 -3
  193. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  194. package/dist/plugins/conversation-history/index.js +0 -2
  195. package/dist/plugins/conversation-history/index.js.map +0 -1
  196. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  197. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  198. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  199. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  200. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  201. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  202. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  203. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  204. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  205. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  206. package/dist/plugins/conversation-history/storages/index.js +0 -4
  207. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  208. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  209. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  210. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  211. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  212. package/dist/plugins/conversation-history/types.d.ts +0 -61
  213. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  214. package/dist/plugins/conversation-history/types.js +0 -2
  215. package/dist/plugins/conversation-history/types.js.map +0 -1
  216. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  217. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  218. package/dist/plugins/error-handling/context-adapter.js +0 -41
  219. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  220. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  221. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  222. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  223. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  224. package/dist/plugins/error-handling/index.d.ts +0 -10
  225. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  226. package/dist/plugins/error-handling/index.js +0 -10
  227. package/dist/plugins/error-handling/index.js.map +0 -1
  228. package/dist/plugins/error-handling/types.d.ts +0 -73
  229. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  230. package/dist/plugins/error-handling/types.js +0 -14
  231. package/dist/plugins/error-handling/types.js.map +0 -1
  232. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  233. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  234. package/dist/plugins/event-emitter/metrics.js +0 -17
  235. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  236. package/dist/plugins/event-emitter/types.d.ts +0 -112
  237. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  238. package/dist/plugins/event-emitter/types.js +0 -65
  239. package/dist/plugins/event-emitter/types.js.map +0 -1
  240. package/dist/plugins/event-emitter-plugin.d.ts +0 -222
  241. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  242. package/dist/plugins/event-emitter-plugin.js +0 -432
  243. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  244. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  245. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  246. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  247. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  248. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  249. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  250. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  251. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  252. package/dist/plugins/execution/index.d.ts +0 -3
  253. package/dist/plugins/execution/index.d.ts.map +0 -1
  254. package/dist/plugins/execution/index.js +0 -2
  255. package/dist/plugins/execution/index.js.map +0 -1
  256. package/dist/plugins/execution/types.d.ts +0 -90
  257. package/dist/plugins/execution/types.d.ts.map +0 -1
  258. package/dist/plugins/execution/types.js +0 -2
  259. package/dist/plugins/execution/types.js.map +0 -1
  260. package/dist/plugins/index.d.ts +0 -10
  261. package/dist/plugins/index.d.ts.map +0 -1
  262. package/dist/plugins/index.js +0 -11
  263. package/dist/plugins/index.js.map +0 -1
  264. package/dist/plugins/limits/types.d.ts +0 -61
  265. package/dist/plugins/limits/types.d.ts.map +0 -1
  266. package/dist/plugins/limits/types.js +0 -2
  267. package/dist/plugins/limits/types.js.map +0 -1
  268. package/dist/plugins/limits-plugin.d.ts +0 -113
  269. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  270. package/dist/plugins/limits-plugin.js +0 -380
  271. package/dist/plugins/limits-plugin.js.map +0 -1
  272. package/dist/plugins/logging/formatters.d.ts +0 -14
  273. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  274. package/dist/plugins/logging/formatters.js +0 -24
  275. package/dist/plugins/logging/formatters.js.map +0 -1
  276. package/dist/plugins/logging/index.d.ts +0 -3
  277. package/dist/plugins/logging/index.d.ts.map +0 -1
  278. package/dist/plugins/logging/index.js +0 -2
  279. package/dist/plugins/logging/index.js.map +0 -1
  280. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  281. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  282. package/dist/plugins/logging/logging-plugin.js +0 -335
  283. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  284. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  285. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  286. package/dist/plugins/logging/storages/console-storage.js +0 -38
  287. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  288. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  289. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  290. package/dist/plugins/logging/storages/file-storage.js +0 -41
  291. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  292. package/dist/plugins/logging/storages/index.d.ts +0 -5
  293. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  294. package/dist/plugins/logging/storages/index.js +0 -5
  295. package/dist/plugins/logging/storages/index.js.map +0 -1
  296. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  297. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  298. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  299. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  300. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  301. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  302. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  303. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  304. package/dist/plugins/logging/types.d.ts +0 -84
  305. package/dist/plugins/logging/types.d.ts.map +0 -1
  306. package/dist/plugins/logging/types.js +0 -2
  307. package/dist/plugins/logging/types.js.map +0 -1
  308. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  309. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  310. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  311. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  312. package/dist/plugins/performance/index.d.ts +0 -5
  313. package/dist/plugins/performance/index.d.ts.map +0 -1
  314. package/dist/plugins/performance/index.js +0 -4
  315. package/dist/plugins/performance/index.js.map +0 -1
  316. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  317. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  318. package/dist/plugins/performance/performance-plugin.js +0 -293
  319. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  320. package/dist/plugins/performance/storages/index.d.ts +0 -2
  321. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  322. package/dist/plugins/performance/storages/index.js +0 -4
  323. package/dist/plugins/performance/storages/index.js.map +0 -1
  324. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  325. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  326. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  327. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  328. package/dist/plugins/performance/types.d.ts +0 -154
  329. package/dist/plugins/performance/types.d.ts.map +0 -1
  330. package/dist/plugins/performance/types.js +0 -2
  331. package/dist/plugins/performance/types.js.map +0 -1
  332. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  333. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  334. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  335. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  336. package/dist/plugins/usage/index.d.ts +0 -5
  337. package/dist/plugins/usage/index.d.ts.map +0 -1
  338. package/dist/plugins/usage/index.js +0 -4
  339. package/dist/plugins/usage/index.js.map +0 -1
  340. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  341. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  342. package/dist/plugins/usage/storages/file-storage.js +0 -111
  343. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  344. package/dist/plugins/usage/storages/index.d.ts +0 -5
  345. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  346. package/dist/plugins/usage/storages/index.js +0 -5
  347. package/dist/plugins/usage/storages/index.js.map +0 -1
  348. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  349. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  350. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  351. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  352. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  353. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  354. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  355. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  356. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  357. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  358. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  359. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  360. package/dist/plugins/usage/types.d.ts +0 -127
  361. package/dist/plugins/usage/types.d.ts.map +0 -1
  362. package/dist/plugins/usage/types.js +0 -2
  363. package/dist/plugins/usage/types.js.map +0 -1
  364. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  365. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  366. package/dist/plugins/usage/usage-plugin.js +0 -309
  367. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  368. package/dist/plugins/webhook/http-client.d.ts +0 -30
  369. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  370. package/dist/plugins/webhook/http-client.js +0 -110
  371. package/dist/plugins/webhook/http-client.js.map +0 -1
  372. package/dist/plugins/webhook/index.d.ts +0 -9
  373. package/dist/plugins/webhook/index.d.ts.map +0 -1
  374. package/dist/plugins/webhook/index.js +0 -9
  375. package/dist/plugins/webhook/index.js.map +0 -1
  376. package/dist/plugins/webhook/transformer.d.ts +0 -63
  377. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  378. package/dist/plugins/webhook/transformer.js +0 -157
  379. package/dist/plugins/webhook/transformer.js.map +0 -1
  380. package/dist/plugins/webhook/types.d.ts +0 -183
  381. package/dist/plugins/webhook/types.d.ts.map +0 -1
  382. package/dist/plugins/webhook/types.js +0 -2
  383. package/dist/plugins/webhook/types.js.map +0 -1
  384. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  385. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  386. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  387. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  388. package/dist/schemas/agent-template-schema.d.ts +0 -137
  389. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  390. package/dist/schemas/agent-template-schema.js +0 -87
  391. package/dist/schemas/agent-template-schema.js.map +0 -1
  392. package/dist/services/conversation-service/index.d.ts +0 -88
  393. package/dist/services/conversation-service/index.d.ts.map +0 -1
  394. package/dist/services/conversation-service/index.js +0 -441
  395. package/dist/services/conversation-service/index.js.map +0 -1
  396. package/dist/services/conversation-service/types.d.ts +0 -32
  397. package/dist/services/conversation-service/types.d.ts.map +0 -1
  398. package/dist/services/conversation-service/types.js +0 -8
  399. package/dist/services/conversation-service/types.js.map +0 -1
  400. package/dist/services/event-service.d.ts +0 -61
  401. package/dist/services/event-service.d.ts.map +0 -1
  402. package/dist/services/event-service.js +0 -110
  403. package/dist/services/event-service.js.map +0 -1
  404. package/dist/services/event-service.test.d.ts +0 -2
  405. package/dist/services/event-service.test.d.ts.map +0 -1
  406. package/dist/services/event-service.test.js +0 -86
  407. package/dist/services/event-service.test.js.map +0 -1
  408. package/dist/services/execution-service.d.ts +0 -151
  409. package/dist/services/execution-service.d.ts.map +0 -1
  410. package/dist/services/execution-service.js +0 -1262
  411. package/dist/services/execution-service.js.map +0 -1
  412. package/dist/services/execution-service.test.d.ts +0 -2
  413. package/dist/services/execution-service.test.d.ts.map +0 -1
  414. package/dist/services/execution-service.test.js +0 -338
  415. package/dist/services/execution-service.test.js.map +0 -1
  416. package/dist/services/history-module.d.ts +0 -15
  417. package/dist/services/history-module.d.ts.map +0 -1
  418. package/dist/services/history-module.js +0 -42
  419. package/dist/services/history-module.js.map +0 -1
  420. package/dist/services/in-memory-history-store.d.ts +0 -12
  421. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  422. package/dist/services/in-memory-history-store.js +0 -41
  423. package/dist/services/in-memory-history-store.js.map +0 -1
  424. package/dist/services/index.d.ts +0 -7
  425. package/dist/services/index.d.ts.map +0 -1
  426. package/dist/services/index.js +0 -13
  427. package/dist/services/index.js.map +0 -1
  428. package/dist/services/task-events.d.ts +0 -6
  429. package/dist/services/task-events.d.ts.map +0 -1
  430. package/dist/services/task-events.js +0 -6
  431. package/dist/services/task-events.js.map +0 -1
  432. package/dist/services/tool-execution-service.d.ts +0 -74
  433. package/dist/services/tool-execution-service.d.ts.map +0 -1
  434. package/dist/services/tool-execution-service.js +0 -189
  435. package/dist/services/tool-execution-service.js.map +0 -1
  436. package/dist/services/user-events.d.ts +0 -7
  437. package/dist/services/user-events.d.ts.map +0 -1
  438. package/dist/services/user-events.js +0 -6
  439. package/dist/services/user-events.js.map +0 -1
  440. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  441. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  442. package/dist/tools/implementations/function-tool/index.js +0 -13
  443. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  444. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  445. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  446. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  447. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  448. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  449. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  450. package/dist/tools/implementations/function-tool/types.js +0 -14
  451. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  452. package/dist/tools/implementations/function-tool.d.ts +0 -49
  453. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  454. package/dist/tools/implementations/function-tool.js +0 -223
  455. package/dist/tools/implementations/function-tool.js.map +0 -1
  456. package/dist/tools/implementations/index.d.ts +0 -4
  457. package/dist/tools/implementations/index.d.ts.map +0 -1
  458. package/dist/tools/implementations/index.js +0 -5
  459. package/dist/tools/implementations/index.js.map +0 -1
  460. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  461. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  462. package/dist/tools/implementations/mcp-tool.js +0 -246
  463. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  464. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  465. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  466. package/dist/tools/implementations/openapi-tool.js +0 -324
  467. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  468. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  469. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  470. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  471. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  472. package/dist/tools/index.d.ts +0 -3
  473. package/dist/tools/index.d.ts.map +0 -1
  474. package/dist/tools/index.js +0 -4
  475. package/dist/tools/index.js.map +0 -1
  476. package/dist/tools/registry/index.d.ts +0 -2
  477. package/dist/tools/registry/index.d.ts.map +0 -1
  478. package/dist/tools/registry/index.js +0 -3
  479. package/dist/tools/registry/index.js.map +0 -1
  480. package/dist/tools/registry/tool-registry.d.ts +0 -54
  481. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  482. package/dist/tools/registry/tool-registry.js +0 -146
  483. package/dist/tools/registry/tool-registry.js.map +0 -1
  484. package/dist/utils/errors.d.ts +0 -155
  485. package/dist/utils/errors.d.ts.map +0 -1
  486. package/dist/utils/errors.js +0 -203
  487. package/dist/utils/errors.js.map +0 -1
  488. package/dist/utils/execution-proxy.d.ts +0 -75
  489. package/dist/utils/execution-proxy.d.ts.map +0 -1
  490. package/dist/utils/execution-proxy.js +0 -230
  491. package/dist/utils/execution-proxy.js.map +0 -1
  492. package/dist/utils/index.d.ts +0 -11
  493. package/dist/utils/index.d.ts.map +0 -1
  494. package/dist/utils/index.js +0 -7
  495. package/dist/utils/index.js.map +0 -1
  496. package/dist/utils/logger.d.ts +0 -74
  497. package/dist/utils/logger.d.ts.map +0 -1
  498. package/dist/utils/logger.js +0 -143
  499. package/dist/utils/logger.js.map +0 -1
  500. package/dist/utils/message-converter.d.ts +0 -68
  501. package/dist/utils/message-converter.d.ts.map +0 -1
  502. package/dist/utils/message-converter.js +0 -87
  503. package/dist/utils/message-converter.js.map +0 -1
  504. package/dist/utils/periodic-task.d.ts +0 -14
  505. package/dist/utils/periodic-task.d.ts.map +0 -1
  506. package/dist/utils/periodic-task.js +0 -26
  507. package/dist/utils/periodic-task.js.map +0 -1
  508. package/dist/utils/validation.d.ts +0 -40
  509. package/dist/utils/validation.d.ts.map +0 -1
  510. package/dist/utils/validation.js +0 -162
  511. package/dist/utils/validation.js.map +0 -1
@@ -1,380 +0,0 @@
1
- import { AbstractPlugin, PluginCategory, PluginPriority } from '../abstracts/abstract-plugin';
2
- import { createLogger } from '../utils/logger';
3
- import { PluginError } from '../utils/errors';
4
- /**
5
- * Plugin for rate limiting and resource control
6
- * Enforces limits on token usage, request frequency, and costs
7
- */
8
- export class LimitsPlugin extends AbstractPlugin {
9
- name = 'LimitsPlugin';
10
- version = '1.0.0';
11
- pluginOptions;
12
- logger;
13
- windows = new Map();
14
- buckets = new Map();
15
- requestCounts = new Map();
16
- constructor(options) {
17
- super();
18
- this.logger = createLogger('LimitsPlugin');
19
- // Validate options
20
- this.validateOptions(options);
21
- // Set defaults
22
- this.pluginOptions = {
23
- enabled: options.enabled ?? true,
24
- strategy: options.strategy,
25
- maxTokens: options.maxTokens ?? 100000,
26
- maxRequests: options.maxRequests ?? 1000,
27
- timeWindow: options.timeWindow ?? 3600000, // 1 hour
28
- maxCost: options.maxCost ?? 10.0, // $10
29
- tokenCostPer1000: options.tokenCostPer1000 ?? 0.002, // $0.002 per 1K tokens
30
- refillRate: options.refillRate ?? 100, // tokens per second
31
- bucketSize: options.bucketSize ?? 10000,
32
- costCalculator: options.costCalculator ?? this.defaultCostCalculator.bind(this),
33
- // Add plugin options defaults
34
- category: options.category ?? PluginCategory.LIMITS,
35
- priority: options.priority ?? PluginPriority.NORMAL,
36
- moduleEvents: options.moduleEvents ?? [],
37
- subscribeToAllModuleEvents: options.subscribeToAllModuleEvents ?? false
38
- };
39
- this.logger.info('LimitsPlugin initialized', {
40
- strategy: this.pluginOptions.strategy,
41
- maxTokens: this.pluginOptions.maxTokens,
42
- maxRequests: this.pluginOptions.maxRequests,
43
- timeWindow: this.pluginOptions.timeWindow
44
- });
45
- }
46
- /**
47
- * Check limits before execution
48
- */
49
- async beforeExecution(context) {
50
- if (this.pluginOptions.strategy === 'none') {
51
- return;
52
- }
53
- const key = this.getKey(context);
54
- try {
55
- switch (this.pluginOptions.strategy) {
56
- case 'token-bucket':
57
- await this.checkTokenBucket(key, context);
58
- break;
59
- case 'sliding-window':
60
- await this.checkSlidingWindow(key, context);
61
- break;
62
- case 'fixed-window':
63
- await this.checkFixedWindow(key, context);
64
- break;
65
- }
66
- this.logger.debug('Limits check passed', {
67
- strategy: this.pluginOptions.strategy,
68
- key
69
- });
70
- }
71
- catch (error) {
72
- this.logger.warn('Limits check failed', {
73
- strategy: this.pluginOptions.strategy,
74
- key,
75
- error: error instanceof Error ? error.message : String(error)
76
- });
77
- throw error;
78
- }
79
- }
80
- /**
81
- * Update limits after execution
82
- */
83
- async afterExecution(context, result) {
84
- if (this.pluginOptions.strategy === 'none') {
85
- return;
86
- }
87
- const key = this.getKey(context);
88
- const tokensUsed = result?.tokensUsed || 0;
89
- const cost = this.pluginOptions.costCalculator(tokensUsed, context.config?.['model'] || 'unknown');
90
- try {
91
- switch (this.pluginOptions.strategy) {
92
- case 'token-bucket':
93
- this.updateTokenBucket(key, tokensUsed, cost);
94
- break;
95
- case 'sliding-window':
96
- case 'fixed-window':
97
- this.updateWindow(key, tokensUsed, cost);
98
- break;
99
- }
100
- this.logger.debug('Limits updated after execution', {
101
- strategy: this.pluginOptions.strategy,
102
- key,
103
- tokensUsed,
104
- cost
105
- });
106
- }
107
- catch (error) {
108
- this.logger.error('Failed to update limits', {
109
- strategy: this.pluginOptions.strategy,
110
- key,
111
- error: error instanceof Error ? error.message : String(error)
112
- });
113
- }
114
- }
115
- /**
116
- * Token bucket rate limiting
117
- */
118
- async checkTokenBucket(key, context) {
119
- const bucket = this.getBucket(key);
120
- const now = Date.now();
121
- // Refill bucket
122
- const timePassed = (now - bucket.lastRefill) / 1000;
123
- const tokensToAdd = timePassed * this.pluginOptions.refillRate;
124
- bucket.tokens = Math.min(this.pluginOptions.bucketSize, bucket.tokens + tokensToAdd);
125
- bucket.lastRefill = now;
126
- // Check if we can process this request
127
- const estimatedTokens = this.estimateTokens(context);
128
- if (bucket.tokens < estimatedTokens) {
129
- throw new PluginError(`Token bucket depleted. Available: ${Math.floor(bucket.tokens)}, Required: ${estimatedTokens}`, this.name, { availableTokens: bucket.tokens, requiredTokens: estimatedTokens });
130
- }
131
- // Check time window limits for requests and cost
132
- if (now - bucket.windowStart >= this.pluginOptions.timeWindow) {
133
- bucket.requests = 0;
134
- bucket.cost = 0;
135
- bucket.windowStart = now;
136
- }
137
- if (bucket.requests >= this.pluginOptions.maxRequests) {
138
- throw new PluginError(`Request limit exceeded. Max: ${this.pluginOptions.maxRequests}`, this.name, { currentRequests: bucket.requests, maxRequests: this.pluginOptions.maxRequests });
139
- }
140
- const estimatedCost = this.pluginOptions.costCalculator(estimatedTokens, context.config?.model || 'unknown');
141
- if (bucket.cost + estimatedCost > this.pluginOptions.maxCost) {
142
- throw new PluginError(`Cost limit exceeded. Current: $${bucket.cost.toFixed(4)}, Estimated: $${estimatedCost.toFixed(4)}, Max: $${this.pluginOptions.maxCost}`, this.name, { currentCost: bucket.cost, estimatedCost, maxCost: this.pluginOptions.maxCost });
143
- }
144
- // Reserve tokens
145
- bucket.tokens -= estimatedTokens;
146
- bucket.requests++;
147
- }
148
- /**
149
- * Sliding window rate limiting
150
- */
151
- async checkSlidingWindow(key, context) {
152
- const now = Date.now();
153
- const window = this.getWindow(key);
154
- // For sliding window, we track usage more granularly
155
- // This is a simplified implementation
156
- if (now - window.windowStart < this.pluginOptions.timeWindow) {
157
- const estimatedTokens = this.estimateTokens(context);
158
- const estimatedCost = this.pluginOptions.costCalculator(estimatedTokens, context.config?.model || 'unknown');
159
- if (window.tokens + estimatedTokens > this.pluginOptions.maxTokens) {
160
- throw new PluginError(`Token limit exceeded in sliding window. Current: ${window.tokens}, Estimated: ${estimatedTokens}, Max: ${this.pluginOptions.maxTokens}`, this.name, { currentTokens: window.tokens, estimatedTokens, maxTokens: this.pluginOptions.maxTokens });
161
- }
162
- if (window.count >= this.pluginOptions.maxRequests) {
163
- throw new PluginError(`Request limit exceeded in sliding window. Current: ${window.count}, Max: ${this.pluginOptions.maxRequests}`, this.name, { currentRequests: window.count, maxRequests: this.pluginOptions.maxRequests });
164
- }
165
- if (window.cost + estimatedCost > this.pluginOptions.maxCost) {
166
- throw new PluginError(`Cost limit exceeded in sliding window. Current: $${window.cost.toFixed(4)}, Estimated: $${estimatedCost.toFixed(4)}, Max: $${this.pluginOptions.maxCost}`, this.name, { currentCost: window.cost, estimatedCost, maxCost: this.pluginOptions.maxCost });
167
- }
168
- }
169
- else {
170
- // Reset window
171
- window.count = 0;
172
- window.tokens = 0;
173
- window.cost = 0;
174
- window.windowStart = now;
175
- }
176
- window.count++;
177
- }
178
- /**
179
- * Fixed window rate limiting
180
- */
181
- async checkFixedWindow(key, context) {
182
- const now = Date.now();
183
- const window = this.getWindow(key);
184
- // Reset window if expired
185
- if (now - window.windowStart >= this.pluginOptions.timeWindow) {
186
- window.count = 0;
187
- window.tokens = 0;
188
- window.cost = 0;
189
- window.windowStart = now;
190
- }
191
- const estimatedTokens = this.estimateTokens(context);
192
- const estimatedCost = this.pluginOptions.costCalculator(estimatedTokens, context.config?.model || 'unknown');
193
- if (window.tokens + estimatedTokens > this.pluginOptions.maxTokens) {
194
- throw new PluginError(`Token limit exceeded in fixed window. Current: ${window.tokens}, Estimated: ${estimatedTokens}, Max: ${this.pluginOptions.maxTokens}`, this.name, { currentTokens: window.tokens, estimatedTokens, maxTokens: this.pluginOptions.maxTokens });
195
- }
196
- if (window.count >= this.pluginOptions.maxRequests) {
197
- throw new PluginError(`Request limit exceeded in fixed window. Current: ${window.count}, Max: ${this.pluginOptions.maxRequests}`, this.name, { currentRequests: window.count, maxRequests: this.pluginOptions.maxRequests });
198
- }
199
- if (window.cost + estimatedCost > this.pluginOptions.maxCost) {
200
- throw new PluginError(`Cost limit exceeded in fixed window. Current: $${window.cost.toFixed(4)}, Estimated: $${estimatedCost.toFixed(4)}, Max: $${this.pluginOptions.maxCost}`, this.name, { currentCost: window.cost, estimatedCost, maxCost: this.pluginOptions.maxCost });
201
- }
202
- window.count++;
203
- }
204
- /**
205
- * Update token bucket after execution
206
- */
207
- updateTokenBucket(key, _tokensUsed, cost) {
208
- const bucket = this.getBucket(key);
209
- bucket.cost += cost;
210
- }
211
- /**
212
- * Update window after execution
213
- */
214
- updateWindow(key, tokensUsed, cost) {
215
- const window = this.getWindow(key);
216
- window.tokens += tokensUsed;
217
- window.cost += cost;
218
- }
219
- /**
220
- * Get or create token bucket for key
221
- */
222
- getBucket(key) {
223
- if (!this.buckets.has(key)) {
224
- this.buckets.set(key, {
225
- tokens: this.pluginOptions.bucketSize,
226
- lastRefill: Date.now(),
227
- requests: 0,
228
- cost: 0,
229
- windowStart: Date.now()
230
- });
231
- }
232
- return this.buckets.get(key);
233
- }
234
- /**
235
- * Get or create window for key
236
- */
237
- getWindow(key) {
238
- if (!this.windows.has(key)) {
239
- this.windows.set(key, {
240
- count: 0,
241
- tokens: 0,
242
- cost: 0,
243
- windowStart: Date.now()
244
- });
245
- }
246
- return this.windows.get(key);
247
- }
248
- /**
249
- * Generate key for rate limiting (user/session based)
250
- */
251
- getKey(context) {
252
- return context.userId || context.sessionId || context['executionId'] || 'default';
253
- }
254
- /**
255
- * Estimate tokens needed for request
256
- */
257
- estimateTokens(context) {
258
- // Simple estimation - in real implementation, this would be more sophisticated
259
- const messageLength = context.messages?.reduce((total, msg) => total + (msg.content?.length || 0), 0) || 0;
260
- // Rough estimation: 1 token per 4 characters
261
- return Math.ceil(messageLength / 4) + 100; // Add some buffer
262
- }
263
- /**
264
- * Default cost calculator
265
- */
266
- defaultCostCalculator(tokens, model) {
267
- // Different models have different costs
268
- const modelCosts = {
269
- 'gpt-4': 0.03,
270
- 'gpt-4-turbo': 0.01,
271
- 'gpt-3.5-turbo': 0.002,
272
- 'claude-3-opus': 0.015,
273
- 'claude-3-sonnet': 0.003,
274
- 'claude-3-haiku': 0.00025
275
- };
276
- const costPer1000 = modelCosts[model] || this.pluginOptions.tokenCostPer1000;
277
- return (tokens / 1000) * costPer1000;
278
- }
279
- /**
280
- * Validate plugin options
281
- */
282
- validateOptions(options) {
283
- if (options.strategy === 'none') {
284
- this.logger.info('LimitsPlugin configured with "none" strategy - no rate limiting will be applied');
285
- return;
286
- }
287
- if (!options.strategy) {
288
- throw new PluginError('Strategy must be specified for limits plugin. Use "none" to disable rate limiting, or choose from: token-bucket, sliding-window, fixed-window', this.name, { availableStrategies: ['none', 'token-bucket', 'sliding-window', 'fixed-window'] });
289
- }
290
- const validStrategies = ['none', 'token-bucket', 'sliding-window', 'fixed-window'];
291
- if (!validStrategies.includes(options.strategy)) {
292
- throw new PluginError(`Invalid strategy "${options.strategy}". Must be one of: ${validStrategies.join(', ')}`, this.name, { provided: options.strategy, validStrategies });
293
- }
294
- // Token bucket strategy validation
295
- if (options.strategy === 'token-bucket') {
296
- if (options.bucketSize !== undefined && options.bucketSize <= 0) {
297
- throw new PluginError('Bucket size must be positive for token-bucket strategy', this.name, { strategy: options.strategy, bucketSize: options.bucketSize });
298
- }
299
- if (options.refillRate !== undefined && options.refillRate < 0) {
300
- throw new PluginError('Refill rate must be non-negative for token-bucket strategy', this.name, { strategy: options.strategy, refillRate: options.refillRate });
301
- }
302
- }
303
- // Sliding/Fixed window strategy validation
304
- if (['sliding-window', 'fixed-window'].includes(options.strategy)) {
305
- if (options.timeWindow !== undefined && options.timeWindow <= 0) {
306
- throw new PluginError(`Time window must be positive for ${options.strategy} strategy`, this.name, { strategy: options.strategy, timeWindow: options.timeWindow });
307
- }
308
- }
309
- // Common validations for all strategies
310
- if (options.maxRequests !== undefined && options.maxRequests < 0) {
311
- throw new PluginError('Max requests must be non-negative', this.name, { strategy: options.strategy, maxRequests: options.maxRequests });
312
- }
313
- if (options.maxTokens !== undefined && options.maxTokens < 0) {
314
- throw new PluginError('Max tokens must be non-negative', this.name, { strategy: options.strategy, maxTokens: options.maxTokens });
315
- }
316
- if (options.maxCost !== undefined && options.maxCost < 0) {
317
- throw new PluginError('Max cost must be non-negative', this.name, { strategy: options.strategy, maxCost: options.maxCost });
318
- }
319
- if (options.tokenCostPer1000 !== undefined && options.tokenCostPer1000 < 0) {
320
- throw new PluginError('Token cost per 1000 must be non-negative', this.name, { strategy: options.strategy, tokenCostPer1000: options.tokenCostPer1000 });
321
- }
322
- }
323
- /**
324
- * Get current limits status
325
- *
326
- * REASON: Limits status contains mixed data types (numbers, strings, arrays, objects) for comprehensive status reporting
327
- * ALTERNATIVES_CONSIDERED:
328
- * 1. Strict interface definitions (too rigid for dynamic status data)
329
- * 2. Union types (becomes unwieldy for status reporting)
330
- * 3. Generic constraints (too complex for status methods)
331
- * 4. Separate status types (breaks existing functionality)
332
- * 5. Type assertions (decreases type safety)
333
- * TODO: Consider specific status interface if patterns emerge
334
- */
335
- getLimitsStatus(key) {
336
- if (key) {
337
- const bucket = this.buckets.get(key);
338
- const window = this.windows.get(key);
339
- return {
340
- strategy: this.pluginOptions.strategy,
341
- key,
342
- bucket: bucket ? {
343
- availableTokens: Math.floor(bucket.tokens),
344
- requests: bucket.requests,
345
- cost: bucket.cost
346
- } : null,
347
- window: window ? {
348
- count: window.count,
349
- tokens: window.tokens,
350
- cost: window.cost,
351
- windowStart: window.windowStart
352
- } : null
353
- };
354
- }
355
- return {
356
- strategy: this.pluginOptions.strategy,
357
- totalKeys: this.buckets.size + this.windows.size,
358
- bucketKeys: Array.from(this.buckets.keys()),
359
- windowKeys: Array.from(this.windows.keys())
360
- };
361
- }
362
- /**
363
- * Reset limits for a key or all keys
364
- */
365
- resetLimits(key) {
366
- if (key) {
367
- this.buckets.delete(key);
368
- this.windows.delete(key);
369
- this.requestCounts.delete(key);
370
- this.logger.info('Limits reset for key', { key });
371
- }
372
- else {
373
- this.buckets.clear();
374
- this.windows.clear();
375
- this.requestCounts.clear();
376
- this.logger.info('All limits reset');
377
- }
378
- }
379
- }
380
- //# sourceMappingURL=limits-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"limits-plugin.js","sourceRoot":"","sources":["../../src/plugins/limits-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EAGd,cAAc,EACd,cAAc,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAgB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AA0C9C;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,cAAoC;IAClE,IAAI,GAAG,cAAc,CAAC;IACtB,OAAO,GAAG,OAAO,CAAC;IAEV,aAAa,CAAiC;IAC9C,MAAM,CAAU;IAChB,OAAO,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC1C,OAAO,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC1C,aAAa,GAAG,IAAI,GAAG,EAAkB,CAAC;IAElD,YAAY,OAA6B;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC,cAAc,CAAC,CAAC;QAE3C,mBAAmB;QACnB,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QAE9B,eAAe;QACf,IAAI,CAAC,aAAa,GAAG;YACjB,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,IAAI;YAChC,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,MAAM;YACtC,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,IAAI;YACxC,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,OAAO,EAAE,SAAS;YACpD,OAAO,EAAE,OAAO,CAAC,OA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AC,aAAa,CAAC,QAAQ;YACrC,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI;YAChD,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC3C,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SAC9C,CAAC;IACN,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,GAAY;QACpB,IAAI,GAAG,EAAE,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrB,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;YAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;QACzC,CAAC;IACL,CAAC;CACJ"}
@@ -1,14 +0,0 @@
1
- import type { ILogEntry, ILogFormatter } from './types';
2
- /**
3
- * Default console formatter
4
- */
5
- export declare class ConsoleLogFormatter implements ILogFormatter {
6
- format(entry: ILogEntry): string;
7
- }
8
- /**
9
- * JSON formatter for file/remote logging
10
- */
11
- export declare class JsonLogFormatter implements ILogFormatter {
12
- format(entry: ILogEntry): string;
13
- }
14
- //# sourceMappingURL=formatters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/plugins/logging/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExD;;GAEG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACrD,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;CAOnC;AAED;;GAEG;AACH,qBAAa,gBAAiB,YAAW,aAAa;IAClD,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;CAMnC"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Default console formatter
3
- */
4
- export class ConsoleLogFormatter {
5
- format(entry) {
6
- const timestamp = entry.timestamp.toISOString();
7
- const level = entry.level.toUpperCase().padStart(5);
8
- const contextStr = entry.context ? ` | ${JSON.stringify(entry.context)}` : '';
9
- const metadataStr = entry.metadata ? ` | ${JSON.stringify(entry.metadata)}` : '';
10
- return `[${timestamp}] ${level} | ${entry.message}${contextStr}${metadataStr}`;
11
- }
12
- }
13
- /**
14
- * JSON formatter for file/remote logging
15
- */
16
- export class JsonLogFormatter {
17
- format(entry) {
18
- return JSON.stringify({
19
- ...entry,
20
- timestamp: entry.timestamp.toISOString()
21
- });
22
- }
23
- }
24
- //# sourceMappingURL=formatters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/plugins/logging/formatters.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,OAAO,mBAAmB;IAC5B,MAAM,CAAC,KAAgB;QACnB,MAAM,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC;QAChD,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9E,MAAM,WAAW,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjF,OAAO,IAAI,SAAS,KAAK,KAAK,MAAM,KAAK,CAAC,OAAO,GAAG,UAAU,GAAG,WAAW,EAAE,CAAC;IACnF,CAAC;CACJ;AAED;;GAEG;AACH,MAAM,OAAO,gBAAgB;IACzB,MAAM,CAAC,KAAgB;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC;YAClB,GAAG,KAAK;YACR,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE;SAC3C,CAAC,CAAC;IACP,CAAC;CACJ"}
@@ -1,3 +0,0 @@
1
- export { LoggingPlugin } from './logging-plugin';
2
- export type { ILoggingPluginOptions, TLoggingStrategy, TLogLevel, ILogEntry, ILogFormatter, ILogStorage, ILoggingPluginStats } from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/plugins/logging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EACR,qBAAqB,EACrB,gBAAgB,EAChB,SAAS,EACT,SAAS,EACT,aAAa,EACb,WAAW,EACX,mBAAmB,EACtB,MAAM,SAAS,CAAC"}
@@ -1,2 +0,0 @@
1
- export { LoggingPlugin } from './logging-plugin';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/plugins/logging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,91 +0,0 @@
1
- import { AbstractPlugin } from '../../abstracts/abstract-plugin';
2
- import type { IEventEmitterEventData, TEventName } from '../event-emitter-plugin';
3
- import { TLogLevel, ILogEntry, ILoggingPluginOptions, ILoggingPluginStats } from './types';
4
- /**
5
- * Logging context data - structured data for log entries
6
- */
7
- export interface ILoggingContextData extends Record<string, string | number | boolean | Date | undefined> {
8
- userInput?: string;
9
- duration?: number;
10
- toolName?: string;
11
- success?: boolean;
12
- executionId?: string;
13
- operation?: string;
14
- errorMessage?: string;
15
- errorStack?: string;
16
- inputLength?: number;
17
- responseLength?: number;
18
- hasOptions?: boolean;
19
- modelName?: string;
20
- }
21
- /**
22
- * Plugin for logging agent operations
23
- * Supports multiple logging strategies: console, file, remote, silent
24
- */
25
- export declare class LoggingPlugin extends AbstractPlugin<ILoggingPluginOptions, ILoggingPluginStats> {
26
- name: string;
27
- version: string;
28
- private storage;
29
- private pluginOptions;
30
- private logger;
31
- private simpleLogger;
32
- private logLevels;
33
- constructor(options: ILoggingPluginOptions);
34
- /**
35
- * Handle module events for logging
36
- */
37
- onModuleEvent(eventName: TEventName, eventData: IEventEmitterEventData): Promise<void>;
38
- /**
39
- * Log a message
40
- */
41
- log(level: TLogLevel, message: string, context?: ILoggingContextData, metadata?: ILogEntry['metadata']): Promise<void>;
42
- /**
43
- * Log debug message
44
- */
45
- debug(message: string, context?: ILoggingContextData, metadata?: ILogEntry['metadata']): Promise<void>;
46
- /**
47
- * Log info message
48
- */
49
- info(message: string, context?: ILoggingContextData, metadata?: ILogEntry['metadata']): Promise<void>;
50
- /**
51
- * Log warning message
52
- */
53
- warn(message: string, context?: ILoggingContextData, metadata?: ILogEntry['metadata']): Promise<void>;
54
- /**
55
- * Log error message
56
- */
57
- error(message: string, error?: Error, context?: ILoggingContextData, metadata?: ILogEntry['metadata']): Promise<void>;
58
- /**
59
- * Log execution start
60
- */
61
- logExecutionStart(executionId: string, userInput: string, metadata?: ILogEntry['metadata']): Promise<void>;
62
- /**
63
- * Log execution completion
64
- */
65
- logExecutionComplete(executionId: string, duration: number, metadata?: ILogEntry['metadata']): Promise<void>;
66
- /**
67
- * Log tool execution
68
- */
69
- logToolExecution(toolName: string, executionId: string, duration?: number, success?: boolean, metadata?: ILogEntry['metadata']): Promise<void>;
70
- /**
71
- * Flush any pending logs
72
- */
73
- flush(): Promise<void>;
74
- /**
75
- * Cleanup resources
76
- */
77
- destroy(): Promise<void>;
78
- /**
79
- * Check if message should be logged based on level
80
- */
81
- private shouldLog;
82
- /**
83
- * Validate plugin options
84
- */
85
- private validateOptions;
86
- /**
87
- * Create storage instance based on strategy
88
- */
89
- private createStorage;
90
- }
91
- //# sourceMappingURL=logging-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logging-plugin.d.ts","sourceRoot":"","sources":["../../../src/plugins/logging/logging-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAkC,MAAM,iCAAiC,CAAC;AAIjG,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGlF,OAAO,EACH,SAAS,EACT,SAAS,EACT,qBAAqB,EACrB,mBAAmB,EAGtB,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;IACrG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,q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