@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 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AACA,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,WAAW,CAAC"}
@@ -1,11 +0,0 @@
1
- // Plugin exports
2
- export * from './conversation-history';
3
- export * from './error-handling';
4
- export * from './execution';
5
- export { LimitsPlugin } from './limits-plugin';
6
- export * from './logging';
7
- export * from './performance';
8
- export * from './usage';
9
- export { EventEmitterPlugin } from './event-emitter-plugin';
10
- export * from './webhook';
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,iBAAiB;AACjB,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,cAAc,WAAW,CAAC"}
@@ -1,61 +0,0 @@
1
- import type { IPluginOptions } from '../../abstracts/abstract-plugin';
2
- /**
3
- * Rate limiting strategies
4
- */
5
- export type TLimitsStrategy = 'token-bucket' | 'sliding-window' | 'fixed-window' | 'none';
6
- /**
7
- * Limits plugin configuration
8
- */
9
- export interface ILimitsPluginOptions extends IPluginOptions {
10
- /** Rate limiting strategy */
11
- strategy: TLimitsStrategy;
12
- /** Maximum tokens per time window */
13
- maxTokens?: number;
14
- /** Maximum requests per time window */
15
- maxRequests?: number;
16
- /** Time window in milliseconds */
17
- timeWindow?: number;
18
- /** Maximum cost per time window (in USD) */
19
- maxCost?: number;
20
- /** Token cost per 1000 tokens (in USD) */
21
- tokenCostPer1000?: number;
22
- /** Bucket refill rate for token bucket strategy */
23
- refillRate?: number;
24
- /** Initial bucket size for token bucket strategy */
25
- bucketSize?: number;
26
- /** Custom cost calculator */
27
- costCalculator?: (tokens: number, model: string) => number;
28
- }
29
- /**
30
- * Plugin limits status data type - supports nested objects and null values for comprehensive status reporting
31
- *
32
- * REASON: Status data needs to include nested objects for bucket/window details and null values for missing data
33
- * ALTERNATIVES_CONSIDERED:
34
- * 1. Strict primitive types (loses nested status information)
35
- * 2. Union types without null (breaks null handling)
36
- * 3. Interface definitions (too rigid for dynamic status)
37
- * 4. Generic constraints (too complex for status data)
38
- * 5. Type assertions (decreases type safety)
39
- * TODO: Consider specific status interfaces if patterns emerge
40
- */
41
- export type TPluginLimitsStatusData = Record<string, string | number | boolean | Array<string | number | boolean> | Record<string, string | number | boolean> | null>;
42
- /**
43
- * Rate limiting window data
44
- */
45
- export interface ILimitWindow {
46
- count: number;
47
- tokens: number;
48
- cost: number;
49
- windowStart: number;
50
- }
51
- /**
52
- * Token bucket state
53
- */
54
- export interface ITokenBucket {
55
- tokens: number;
56
- lastRefill: number;
57
- requests: number;
58
- cost: number;
59
- windowStart: number;
60
- }
61
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/plugins/limits/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE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b,WAAW,EAAE,MAAM,CAAC;CACvB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/limits/types.ts"],"names":[],"mappings":""}
@@ -1,113 +0,0 @@
1
- import { AbstractPlugin, type IPluginExecutionContext, type IPluginExecutionResult } from '../abstracts/abstract-plugin';
2
- import type { TLimitsStrategy, ILimitsPluginOptions, TPluginLimitsStatusData } from './limits/types';
3
- export type { TLimitsStrategy, ILimitsPluginOptions, TPluginLimitsStatusData };
4
- /**
5
- * Reusable type definitions for limits plugin
6
- */
7
- /**
8
- * Plugin execution context type
9
- * Used for processing execution context in limits plugin
10
- * Extends IPluginExecutionContext for compatibility
11
- */
12
- export interface ILimitsPluginExecutionContext extends IPluginExecutionContext {
13
- config?: {
14
- model?: string;
15
- maxTokens?: number;
16
- temperature?: number;
17
- };
18
- conversationId?: string;
19
- }
20
- /**
21
- * Plugin execution result type
22
- * Used for processing execution results in limits plugin
23
- */
24
- export type TLimitsPluginExecutionResult = {
25
- tokensUsed?: number;
26
- cost?: number;
27
- success?: boolean;
28
- [key: string]: string | number | boolean | undefined;
29
- };
30
- /**
31
- * Plugin for rate limiting and resource control
32
- * Enforces limits on token usage, request frequency, and costs
33
- */
34
- export declare class LimitsPlugin extends AbstractPlugin<ILimitsPluginOptions> {
35
- name: string;
36
- version: string;
37
- private pluginOptions;
38
- private logger;
39
- private windows;
40
- private buckets;
41
- private requestCounts;
42
- constructor(options: ILimitsPluginOptions);
43
- /**
44
- * Check limits before execution
45
- */
46
- beforeExecution(context: IPluginExecutionContext): Promise<void>;
47
- /**
48
- * Update limits after execution
49
- */
50
- afterExecution(context: IPluginExecutionContext, result: IPluginExecutionResult): Promise<void>;
51
- /**
52
- * Token bucket rate limiting
53
- */
54
- private checkTokenBucket;
55
- /**
56
- * Sliding window rate limiting
57
- */
58
- private checkSlidingWindow;
59
- /**
60
- * Fixed window rate limiting
61
- */
62
- private checkFixedWindow;
63
- /**
64
- * Update token bucket after execution
65
- */
66
- private updateTokenBucket;
67
- /**
68
- * Update window after execution
69
- */
70
- private updateWindow;
71
- /**
72
- * Get or create token bucket for key
73
- */
74
- private getBucket;
75
- /**
76
- * Get or create window for key
77
- */
78
- private getWindow;
79
- /**
80
- * Generate key for rate limiting (user/session based)
81
- */
82
- private getKey;
83
- /**
84
- * Estimate tokens needed for request
85
- */
86
- private estimateTokens;
87
- /**
88
- * Default cost calculator
89
- */
90
- private defaultCostCalculator;
91
- /**
92
- * Validate plugin options
93
- */
94
- private validateOptions;
95
- /**
96
- * Get current limits status
97
- *
98
- * REASON: Limits status contains mixed data types (numbers, strings, arrays, objects) for comprehensive status reporting
99
- * ALTERNATIVES_CONSIDERED:
100
- * 1. Strict interface definitions (too rigid for dynamic status data)
101
- * 2. Union types (becomes unwieldy for status reporting)
102
- * 3. Generic constraints (too complex for status methods)
103
- * 4. Separate status types (breaks existing functionality)
104
- * 5. Type assertions (decreases type safety)
105
- * TODO: Consider specific status interface if patterns emerge
106
- */
107
- getLimitsStatus(key?: string): TPluginLimitsStatusData;
108
- /**
109
- * Reset limits for a key or all keys
110
- */
111
- resetLimits(key?: string): void;
112
- }
113
- //# sourceMappingURL=limits-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"limits-plugin.d.ts","sourceRoot":"","sources":["../../src/plugins/limits-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAG9B,MAAM,8BAA8B,CAAC;AAGtC,OAAO,KAAK,EACR,eAAe,EACf,oBAAoB,EACpB,uBAAuB,EAG1B,MAAM,gBAAgB,CAAC;AAIxB,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,CAAC;AAE/E;;GAEG;AAEH;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,uBAAuB;IAC1E,MAAM,C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,CAAC,qBAAqB;IAe7B;;GAED;IACC,OAAO,CAAC,eAAe;IAsFvB;;;;;;;;;;;OAWG;IACH,eAAe,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,uBAAuB;IA8BtD;;OAEG;IACH,WAAW,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;CAalC"}
@@ -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,OAAO,IAAI,IAAI,EAAE,MAAM;YACxC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,IAAI,KAAK,EAAE,uBAAuB;YAC5E,UAAU,EAA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,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