@robota-sdk/agent-core 3.0.0-beta.32 → 3.0.0-beta.34

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 (796) hide show
  1. package/README.md +18 -12
  2. package/dist/browser/index.d.ts +211 -79
  3. package/dist/browser/index.js +8 -6
  4. package/dist/node/index.cjs +8 -6
  5. package/dist/node/index.d.cts +211 -79
  6. package/dist/node/index.d.ts +211 -79
  7. package/dist/node/index.js +8 -6
  8. package/package.json +1 -2
  9. package/dist/abstracts/abstract-agent.d.ts +0 -56
  10. package/dist/abstracts/abstract-agent.d.ts.map +0 -1
  11. package/dist/abstracts/abstract-agent.js +0 -55
  12. package/dist/abstracts/abstract-agent.js.map +0 -1
  13. package/dist/abstracts/abstract-ai-provider.d.ts +0 -188
  14. package/dist/abstracts/abstract-ai-provider.d.ts.map +0 -1
  15. package/dist/abstracts/abstract-ai-provider.js +0 -258
  16. package/dist/abstracts/abstract-ai-provider.js.map +0 -1
  17. package/dist/abstracts/abstract-executor.d.ts +0 -110
  18. package/dist/abstracts/abstract-executor.d.ts.map +0 -1
  19. package/dist/abstracts/abstract-executor.js +0 -164
  20. package/dist/abstracts/abstract-executor.js.map +0 -1
  21. package/dist/abstracts/abstract-manager.d.ts +0 -42
  22. package/dist/abstracts/abstract-manager.d.ts.map +0 -1
  23. package/dist/abstracts/abstract-manager.js +0 -49
  24. package/dist/abstracts/abstract-manager.js.map +0 -1
  25. package/dist/abstracts/abstract-module-events.d.ts +0 -77
  26. package/dist/abstracts/abstract-module-events.d.ts.map +0 -1
  27. package/dist/abstracts/abstract-module-events.js +0 -8
  28. package/dist/abstracts/abstract-module-events.js.map +0 -1
  29. package/dist/abstracts/abstract-module-types.d.ts +0 -110
  30. package/dist/abstracts/abstract-module-types.d.ts.map +0 -1
  31. package/dist/abstracts/abstract-module-types.js +0 -20
  32. package/dist/abstracts/abstract-module-types.js.map +0 -1
  33. package/dist/abstracts/abstract-module.d.ts +0 -66
  34. package/dist/abstracts/abstract-module.d.ts.map +0 -1
  35. package/dist/abstracts/abstract-module.js +0 -309
  36. package/dist/abstracts/abstract-module.js.map +0 -1
  37. package/dist/abstracts/abstract-module.test.d.ts +0 -2
  38. package/dist/abstracts/abstract-module.test.d.ts.map +0 -1
  39. package/dist/abstracts/abstract-module.test.js +0 -150
  40. package/dist/abstracts/abstract-module.test.js.map +0 -1
  41. package/dist/abstracts/abstract-plugin-types.d.ts +0 -152
  42. package/dist/abstracts/abstract-plugin-types.d.ts.map +0 -1
  43. package/dist/abstracts/abstract-plugin-types.js +0 -29
  44. package/dist/abstracts/abstract-plugin-types.js.map +0 -1
  45. package/dist/abstracts/abstract-plugin.d.ts +0 -80
  46. package/dist/abstracts/abstract-plugin.d.ts.map +0 -1
  47. package/dist/abstracts/abstract-plugin.js +0 -142
  48. package/dist/abstracts/abstract-plugin.js.map +0 -1
  49. package/dist/abstracts/abstract-tool.d.ts +0 -175
  50. package/dist/abstracts/abstract-tool.d.ts.map +0 -1
  51. package/dist/abstracts/abstract-tool.js +0 -140
  52. package/dist/abstracts/abstract-tool.js.map +0 -1
  53. package/dist/abstracts/abstract-workflow-converter.d.ts +0 -136
  54. package/dist/abstracts/abstract-workflow-converter.d.ts.map +0 -1
  55. package/dist/abstracts/abstract-workflow-converter.js +0 -261
  56. package/dist/abstracts/abstract-workflow-converter.js.map +0 -1
  57. package/dist/abstracts/abstract-workflow-converter.test.d.ts +0 -2
  58. package/dist/abstracts/abstract-workflow-converter.test.d.ts.map +0 -1
  59. package/dist/abstracts/abstract-workflow-converter.test.js +0 -144
  60. package/dist/abstracts/abstract-workflow-converter.test.js.map +0 -1
  61. package/dist/abstracts/abstract-workflow-validator-helpers.d.ts +0 -37
  62. package/dist/abstracts/abstract-workflow-validator-helpers.d.ts.map +0 -1
  63. package/dist/abstracts/abstract-workflow-validator-helpers.js +0 -147
  64. package/dist/abstracts/abstract-workflow-validator-helpers.js.map +0 -1
  65. package/dist/abstracts/abstract-workflow-validator-helpers.test.d.ts +0 -2
  66. package/dist/abstracts/abstract-workflow-validator-helpers.test.d.ts.map +0 -1
  67. package/dist/abstracts/abstract-workflow-validator-helpers.test.js +0 -157
  68. package/dist/abstracts/abstract-workflow-validator-helpers.test.js.map +0 -1
  69. package/dist/abstracts/abstract-workflow-validator.d.ts +0 -91
  70. package/dist/abstracts/abstract-workflow-validator.d.ts.map +0 -1
  71. package/dist/abstracts/abstract-workflow-validator.js +0 -179
  72. package/dist/abstracts/abstract-workflow-validator.js.map +0 -1
  73. package/dist/abstracts/abstract-workflow-validator.test.d.ts +0 -2
  74. package/dist/abstracts/abstract-workflow-validator.test.d.ts.map +0 -1
  75. package/dist/abstracts/abstract-workflow-validator.test.js +0 -142
  76. package/dist/abstracts/abstract-workflow-validator.test.js.map +0 -1
  77. package/dist/abstracts/index.d.ts +0 -7
  78. package/dist/abstracts/index.d.ts.map +0 -1
  79. package/dist/abstracts/index.js +0 -10
  80. package/dist/abstracts/index.js.map +0 -1
  81. package/dist/agents/constants.d.ts +0 -23
  82. package/dist/agents/constants.d.ts.map +0 -1
  83. package/dist/agents/constants.js +0 -22
  84. package/dist/agents/constants.js.map +0 -1
  85. package/dist/agents/index.d.ts +0 -1
  86. package/dist/agents/index.d.ts.map +0 -1
  87. package/dist/agents/index.js +0 -4
  88. package/dist/agents/index.js.map +0 -1
  89. package/dist/agents/robota.test.d.ts +0 -2
  90. package/dist/agents/robota.test.d.ts.map +0 -1
  91. package/dist/agents/robota.test.js +0 -416
  92. package/dist/agents/robota.test.js.map +0 -1
  93. package/dist/context/index.d.ts +0 -4
  94. package/dist/context/index.d.ts.map +0 -1
  95. package/dist/context/index.js +0 -2
  96. package/dist/context/index.js.map +0 -1
  97. package/dist/context/models.d.ts +0 -27
  98. package/dist/context/models.d.ts.map +0 -1
  99. package/dist/context/models.js +0 -76
  100. package/dist/context/models.js.map +0 -1
  101. package/dist/context/models.test.d.ts +0 -2
  102. package/dist/context/models.test.d.ts.map +0 -1
  103. package/dist/context/models.test.js +0 -51
  104. package/dist/context/models.test.js.map +0 -1
  105. package/dist/context/types.d.ts +0 -25
  106. package/dist/context/types.d.ts.map +0 -1
  107. package/dist/context/types.js +0 -8
  108. package/dist/context/types.js.map +0 -1
  109. package/dist/core/robota-config-manager.d.ts +0 -78
  110. package/dist/core/robota-config-manager.d.ts.map +0 -1
  111. package/dist/core/robota-config-manager.js +0 -216
  112. package/dist/core/robota-config-manager.js.map +0 -1
  113. package/dist/core/robota-execution.d.ts +0 -23
  114. package/dist/core/robota-execution.d.ts.map +0 -1
  115. package/dist/core/robota-execution.js +0 -81
  116. package/dist/core/robota-execution.js.map +0 -1
  117. package/dist/core/robota-initializer.d.ts +0 -37
  118. package/dist/core/robota-initializer.d.ts.map +0 -1
  119. package/dist/core/robota-initializer.js +0 -77
  120. package/dist/core/robota-initializer.js.map +0 -1
  121. package/dist/core/robota-lifecycle.d.ts +0 -53
  122. package/dist/core/robota-lifecycle.d.ts.map +0 -1
  123. package/dist/core/robota-lifecycle.js +0 -73
  124. package/dist/core/robota-lifecycle.js.map +0 -1
  125. package/dist/core/robota-module-manager.d.ts +0 -78
  126. package/dist/core/robota-module-manager.d.ts.map +0 -1
  127. package/dist/core/robota-module-manager.js +0 -114
  128. package/dist/core/robota-module-manager.js.map +0 -1
  129. package/dist/core/robota-plugin-manager.d.ts +0 -40
  130. package/dist/core/robota-plugin-manager.d.ts.map +0 -1
  131. package/dist/core/robota-plugin-manager.js +0 -71
  132. package/dist/core/robota-plugin-manager.js.map +0 -1
  133. package/dist/core/robota.d.ts +0 -144
  134. package/dist/core/robota.d.ts.map +0 -1
  135. package/dist/core/robota.js +0 -335
  136. package/dist/core/robota.js.map +0 -1
  137. package/dist/core/robota.test.d.ts +0 -2
  138. package/dist/core/robota.test.d.ts.map +0 -1
  139. package/dist/core/robota.test.js +0 -353
  140. package/dist/core/robota.test.js.map +0 -1
  141. package/dist/event-service/event-service.d.ts +0 -61
  142. package/dist/event-service/event-service.d.ts.map +0 -1
  143. package/dist/event-service/event-service.js +0 -120
  144. package/dist/event-service/event-service.js.map +0 -1
  145. package/dist/event-service/index.d.ts +0 -6
  146. package/dist/event-service/index.d.ts.map +0 -1
  147. package/dist/event-service/index.js +0 -4
  148. package/dist/event-service/index.js.map +0 -1
  149. package/dist/event-service/interfaces.d.ts +0 -98
  150. package/dist/event-service/interfaces.d.ts.map +0 -1
  151. package/dist/event-service/interfaces.js +0 -8
  152. package/dist/event-service/interfaces.js.map +0 -1
  153. package/dist/event-service/task-events.d.ts +0 -6
  154. package/dist/event-service/task-events.d.ts.map +0 -1
  155. package/dist/event-service/task-events.js +0 -6
  156. package/dist/event-service/task-events.js.map +0 -1
  157. package/dist/event-service/user-events.d.ts +0 -7
  158. package/dist/event-service/user-events.d.ts.map +0 -1
  159. package/dist/event-service/user-events.js +0 -6
  160. package/dist/event-service/user-events.js.map +0 -1
  161. package/dist/executors/local-executor.d.ts +0 -96
  162. package/dist/executors/local-executor.d.ts.map +0 -1
  163. package/dist/executors/local-executor.js +0 -197
  164. package/dist/executors/local-executor.js.map +0 -1
  165. package/dist/executors/local-executor.test.d.ts +0 -2
  166. package/dist/executors/local-executor.test.d.ts.map +0 -1
  167. package/dist/executors/local-executor.test.js +0 -192
  168. package/dist/executors/local-executor.test.js.map +0 -1
  169. package/dist/hooks/hook-runner.d.ts +0 -20
  170. package/dist/hooks/hook-runner.d.ts.map +0 -1
  171. package/dist/hooks/hook-runner.js +0 -95
  172. package/dist/hooks/hook-runner.js.map +0 -1
  173. package/dist/hooks/index.d.ts +0 -3
  174. package/dist/hooks/index.d.ts.map +0 -1
  175. package/dist/hooks/index.js +0 -3
  176. package/dist/hooks/index.js.map +0 -1
  177. package/dist/hooks/types.d.ts +0 -40
  178. package/dist/hooks/types.d.ts.map +0 -1
  179. package/dist/hooks/types.js +0 -5
  180. package/dist/hooks/types.js.map +0 -1
  181. package/dist/index.d.ts +0 -248
  182. package/dist/index.d.ts.map +0 -1
  183. package/dist/index.js +0 -190
  184. package/dist/index.js.map +0 -1
  185. package/dist/interfaces/agent.d.ts +0 -199
  186. package/dist/interfaces/agent.d.ts.map +0 -1
  187. package/dist/interfaces/agent.js +0 -2
  188. package/dist/interfaces/agent.js.map +0 -1
  189. package/dist/interfaces/cache.d.ts +0 -64
  190. package/dist/interfaces/cache.d.ts.map +0 -1
  191. package/dist/interfaces/cache.js +0 -2
  192. package/dist/interfaces/cache.js.map +0 -1
  193. package/dist/interfaces/event-service.d.ts +0 -8
  194. package/dist/interfaces/event-service.d.ts.map +0 -1
  195. package/dist/interfaces/event-service.js +0 -2
  196. package/dist/interfaces/event-service.js.map +0 -1
  197. package/dist/interfaces/executor.d.ts +0 -128
  198. package/dist/interfaces/executor.d.ts.map +0 -1
  199. package/dist/interfaces/executor.js +0 -2
  200. package/dist/interfaces/executor.js.map +0 -1
  201. package/dist/interfaces/history-module.d.ts +0 -19
  202. package/dist/interfaces/history-module.d.ts.map +0 -1
  203. package/dist/interfaces/history-module.js +0 -2
  204. package/dist/interfaces/history-module.js.map +0 -1
  205. package/dist/interfaces/index.d.ts +0 -16
  206. package/dist/interfaces/index.d.ts.map +0 -1
  207. package/dist/interfaces/index.js +0 -5
  208. package/dist/interfaces/index.js.map +0 -1
  209. package/dist/interfaces/manager.d.ts +0 -142
  210. package/dist/interfaces/manager.d.ts.map +0 -1
  211. package/dist/interfaces/manager.js +0 -2
  212. package/dist/interfaces/manager.js.map +0 -1
  213. package/dist/interfaces/media-provider.d.ts +0 -86
  214. package/dist/interfaces/media-provider.d.ts.map +0 -1
  215. package/dist/interfaces/media-provider.js +0 -13
  216. package/dist/interfaces/media-provider.js.map +0 -1
  217. package/dist/interfaces/messages.d.ts +0 -97
  218. package/dist/interfaces/messages.d.ts.map +0 -1
  219. package/dist/interfaces/messages.js +0 -29
  220. package/dist/interfaces/messages.js.map +0 -1
  221. package/dist/interfaces/progress-reporting.d.ts +0 -86
  222. package/dist/interfaces/progress-reporting.d.ts.map +0 -1
  223. package/dist/interfaces/progress-reporting.js +0 -35
  224. package/dist/interfaces/progress-reporting.js.map +0 -1
  225. package/dist/interfaces/provider.d.ts +0 -228
  226. package/dist/interfaces/provider.d.ts.map +0 -1
  227. package/dist/interfaces/provider.js +0 -2
  228. package/dist/interfaces/provider.js.map +0 -1
  229. package/dist/interfaces/service.d.ts +0 -205
  230. package/dist/interfaces/service.d.ts.map +0 -1
  231. package/dist/interfaces/service.js +0 -6
  232. package/dist/interfaces/service.js.map +0 -1
  233. package/dist/interfaces/tool.d.ts +0 -249
  234. package/dist/interfaces/tool.d.ts.map +0 -1
  235. package/dist/interfaces/tool.js +0 -2
  236. package/dist/interfaces/tool.js.map +0 -1
  237. package/dist/interfaces/types.d.ts +0 -71
  238. package/dist/interfaces/types.d.ts.map +0 -1
  239. package/dist/interfaces/types.js +0 -33
  240. package/dist/interfaces/types.js.map +0 -1
  241. package/dist/interfaces/workflow-converter.d.ts +0 -193
  242. package/dist/interfaces/workflow-converter.d.ts.map +0 -1
  243. package/dist/interfaces/workflow-converter.js +0 -11
  244. package/dist/interfaces/workflow-converter.js.map +0 -1
  245. package/dist/interfaces/workflow-validator.d.ts +0 -209
  246. package/dist/interfaces/workflow-validator.d.ts.map +0 -1
  247. package/dist/interfaces/workflow-validator.js +0 -16
  248. package/dist/interfaces/workflow-validator.js.map +0 -1
  249. package/dist/managers/agent-factory.d.ts +0 -132
  250. package/dist/managers/agent-factory.d.ts.map +0 -1
  251. package/dist/managers/agent-factory.js +0 -292
  252. package/dist/managers/agent-factory.js.map +0 -1
  253. package/dist/managers/agent-factory.test.d.ts +0 -2
  254. package/dist/managers/agent-factory.test.d.ts.map +0 -1
  255. package/dist/managers/agent-factory.test.js +0 -259
  256. package/dist/managers/agent-factory.test.js.map +0 -1
  257. package/dist/managers/agent-templates.d.ts +0 -84
  258. package/dist/managers/agent-templates.d.ts.map +0 -1
  259. package/dist/managers/agent-templates.js +0 -171
  260. package/dist/managers/agent-templates.js.map +0 -1
  261. package/dist/managers/agent-templates.test.d.ts +0 -2
  262. package/dist/managers/agent-templates.test.d.ts.map +0 -1
  263. package/dist/managers/agent-templates.test.js +0 -175
  264. package/dist/managers/agent-templates.test.js.map +0 -1
  265. package/dist/managers/ai-provider-manager.d.ts +0 -80
  266. package/dist/managers/ai-provider-manager.d.ts.map +0 -1
  267. package/dist/managers/ai-provider-manager.js +0 -224
  268. package/dist/managers/ai-provider-manager.js.map +0 -1
  269. package/dist/managers/ai-provider-manager.test.d.ts +0 -2
  270. package/dist/managers/ai-provider-manager.test.d.ts.map +0 -1
  271. package/dist/managers/ai-provider-manager.test.js +0 -327
  272. package/dist/managers/ai-provider-manager.test.js.map +0 -1
  273. package/dist/managers/conversation-history-manager.d.ts +0 -43
  274. package/dist/managers/conversation-history-manager.d.ts.map +0 -1
  275. package/dist/managers/conversation-history-manager.js +0 -62
  276. package/dist/managers/conversation-history-manager.js.map +0 -1
  277. package/dist/managers/conversation-history-manager.test.d.ts +0 -2
  278. package/dist/managers/conversation-history-manager.test.d.ts.map +0 -1
  279. package/dist/managers/conversation-history-manager.test.js +0 -413
  280. package/dist/managers/conversation-history-manager.test.js.map +0 -1
  281. package/dist/managers/conversation-message-factory.d.ts +0 -40
  282. package/dist/managers/conversation-message-factory.d.ts.map +0 -1
  283. package/dist/managers/conversation-message-factory.js +0 -66
  284. package/dist/managers/conversation-message-factory.js.map +0 -1
  285. package/dist/managers/conversation-message-factory.test.d.ts +0 -2
  286. package/dist/managers/conversation-message-factory.test.d.ts.map +0 -1
  287. package/dist/managers/conversation-message-factory.test.js +0 -95
  288. package/dist/managers/conversation-message-factory.test.js.map +0 -1
  289. package/dist/managers/conversation-session.d.ts +0 -90
  290. package/dist/managers/conversation-session.d.ts.map +0 -1
  291. package/dist/managers/conversation-session.js +0 -177
  292. package/dist/managers/conversation-session.js.map +0 -1
  293. package/dist/managers/index.d.ts +0 -8
  294. package/dist/managers/index.d.ts.map +0 -1
  295. package/dist/managers/index.js +0 -8
  296. package/dist/managers/index.js.map +0 -1
  297. package/dist/managers/module-registry-validation.d.ts +0 -38
  298. package/dist/managers/module-registry-validation.d.ts.map +0 -1
  299. package/dist/managers/module-registry-validation.js +0 -100
  300. package/dist/managers/module-registry-validation.js.map +0 -1
  301. package/dist/managers/module-registry-validation.test.d.ts +0 -2
  302. package/dist/managers/module-registry-validation.test.d.ts.map +0 -1
  303. package/dist/managers/module-registry-validation.test.js +0 -144
  304. package/dist/managers/module-registry-validation.test.js.map +0 -1
  305. package/dist/managers/module-registry.d.ts +0 -63
  306. package/dist/managers/module-registry.d.ts.map +0 -1
  307. package/dist/managers/module-registry.js +0 -249
  308. package/dist/managers/module-registry.js.map +0 -1
  309. package/dist/managers/module-type-registry-helpers.d.ts +0 -34
  310. package/dist/managers/module-type-registry-helpers.d.ts.map +0 -1
  311. package/dist/managers/module-type-registry-helpers.js +0 -255
  312. package/dist/managers/module-type-registry-helpers.js.map +0 -1
  313. package/dist/managers/module-type-registry.d.ts +0 -59
  314. package/dist/managers/module-type-registry.d.ts.map +0 -1
  315. package/dist/managers/module-type-registry.js +0 -91
  316. package/dist/managers/module-type-registry.js.map +0 -1
  317. package/dist/managers/plugins-helpers.d.ts +0 -18
  318. package/dist/managers/plugins-helpers.d.ts.map +0 -1
  319. package/dist/managers/plugins-helpers.js +0 -118
  320. package/dist/managers/plugins-helpers.js.map +0 -1
  321. package/dist/managers/plugins-helpers.test.d.ts +0 -2
  322. package/dist/managers/plugins-helpers.test.d.ts.map +0 -1
  323. package/dist/managers/plugins-helpers.test.js +0 -68
  324. package/dist/managers/plugins-helpers.test.js.map +0 -1
  325. package/dist/managers/plugins.d.ts +0 -73
  326. package/dist/managers/plugins.d.ts.map +0 -1
  327. package/dist/managers/plugins.js +0 -148
  328. package/dist/managers/plugins.js.map +0 -1
  329. package/dist/managers/plugins.test.d.ts +0 -2
  330. package/dist/managers/plugins.test.d.ts.map +0 -1
  331. package/dist/managers/plugins.test.js +0 -160
  332. package/dist/managers/plugins.test.js.map +0 -1
  333. package/dist/managers/tool-manager.d.ts +0 -70
  334. package/dist/managers/tool-manager.d.ts.map +0 -1
  335. package/dist/managers/tool-manager.js +0 -148
  336. package/dist/managers/tool-manager.js.map +0 -1
  337. package/dist/managers/tool-manager.test.d.ts +0 -2
  338. package/dist/managers/tool-manager.test.d.ts.map +0 -1
  339. package/dist/managers/tool-manager.test.js +0 -202
  340. package/dist/managers/tool-manager.test.js.map +0 -1
  341. package/dist/permissions/index.d.ts +0 -7
  342. package/dist/permissions/index.d.ts.map +0 -1
  343. package/dist/permissions/index.js +0 -4
  344. package/dist/permissions/index.js.map +0 -1
  345. package/dist/permissions/permission-gate.d.ts +0 -38
  346. package/dist/permissions/permission-gate.d.ts.map +0 -1
  347. package/dist/permissions/permission-gate.js +0 -119
  348. package/dist/permissions/permission-gate.js.map +0 -1
  349. package/dist/permissions/permission-mode.d.ts +0 -25
  350. package/dist/permissions/permission-mode.d.ts.map +0 -1
  351. package/dist/permissions/permission-mode.js +0 -58
  352. package/dist/permissions/permission-mode.js.map +0 -1
  353. package/dist/permissions/types.d.ts +0 -27
  354. package/dist/permissions/types.d.ts.map +0 -1
  355. package/dist/permissions/types.js +0 -9
  356. package/dist/permissions/types.js.map +0 -1
  357. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +0 -67
  358. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +0 -1
  359. package/dist/plugins/conversation-history/conversation-history-plugin.js +0 -270
  360. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +0 -1
  361. package/dist/plugins/conversation-history/index.d.ts +0 -3
  362. package/dist/plugins/conversation-history/index.d.ts.map +0 -1
  363. package/dist/plugins/conversation-history/index.js +0 -2
  364. package/dist/plugins/conversation-history/index.js.map +0 -1
  365. package/dist/plugins/conversation-history/storages/database-storage.d.ts +0 -19
  366. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +0 -1
  367. package/dist/plugins/conversation-history/storages/database-storage.js +0 -94
  368. package/dist/plugins/conversation-history/storages/database-storage.js.map +0 -1
  369. package/dist/plugins/conversation-history/storages/file-storage.d.ts +0 -15
  370. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +0 -1
  371. package/dist/plugins/conversation-history/storages/file-storage.js +0 -94
  372. package/dist/plugins/conversation-history/storages/file-storage.js.map +0 -1
  373. package/dist/plugins/conversation-history/storages/index.d.ts +0 -4
  374. package/dist/plugins/conversation-history/storages/index.d.ts.map +0 -1
  375. package/dist/plugins/conversation-history/storages/index.js +0 -4
  376. package/dist/plugins/conversation-history/storages/index.js.map +0 -1
  377. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +0 -15
  378. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +0 -1
  379. package/dist/plugins/conversation-history/storages/memory-storage.js +0 -33
  380. package/dist/plugins/conversation-history/storages/memory-storage.js.map +0 -1
  381. package/dist/plugins/conversation-history/types.d.ts +0 -61
  382. package/dist/plugins/conversation-history/types.d.ts.map +0 -1
  383. package/dist/plugins/conversation-history/types.js +0 -2
  384. package/dist/plugins/conversation-history/types.js.map +0 -1
  385. package/dist/plugins/error-handling/context-adapter.d.ts +0 -30
  386. package/dist/plugins/error-handling/context-adapter.d.ts.map +0 -1
  387. package/dist/plugins/error-handling/context-adapter.js +0 -41
  388. package/dist/plugins/error-handling/context-adapter.js.map +0 -1
  389. package/dist/plugins/error-handling/error-handling-plugin.d.ts +0 -49
  390. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +0 -1
  391. package/dist/plugins/error-handling/error-handling-plugin.js +0 -229
  392. package/dist/plugins/error-handling/error-handling-plugin.js.map +0 -1
  393. package/dist/plugins/error-handling/index.d.ts +0 -10
  394. package/dist/plugins/error-handling/index.d.ts.map +0 -1
  395. package/dist/plugins/error-handling/index.js +0 -10
  396. package/dist/plugins/error-handling/index.js.map +0 -1
  397. package/dist/plugins/error-handling/types.d.ts +0 -73
  398. package/dist/plugins/error-handling/types.d.ts.map +0 -1
  399. package/dist/plugins/error-handling/types.js +0 -14
  400. package/dist/plugins/error-handling/types.js.map +0 -1
  401. package/dist/plugins/event-emitter/metrics.d.ts +0 -17
  402. package/dist/plugins/event-emitter/metrics.d.ts.map +0 -1
  403. package/dist/plugins/event-emitter/metrics.js +0 -17
  404. package/dist/plugins/event-emitter/metrics.js.map +0 -1
  405. package/dist/plugins/event-emitter/plugin-types.d.ts +0 -88
  406. package/dist/plugins/event-emitter/plugin-types.d.ts.map +0 -1
  407. package/dist/plugins/event-emitter/plugin-types.js +0 -2
  408. package/dist/plugins/event-emitter/plugin-types.js.map +0 -1
  409. package/dist/plugins/event-emitter/types.d.ts +0 -112
  410. package/dist/plugins/event-emitter/types.d.ts.map +0 -1
  411. package/dist/plugins/event-emitter/types.js +0 -65
  412. package/dist/plugins/event-emitter/types.js.map +0 -1
  413. package/dist/plugins/event-emitter-plugin.d.ts +0 -47
  414. package/dist/plugins/event-emitter-plugin.d.ts.map +0 -1
  415. package/dist/plugins/event-emitter-plugin.js +0 -288
  416. package/dist/plugins/event-emitter-plugin.js.map +0 -1
  417. package/dist/plugins/event-emitter-plugin.test.d.ts +0 -2
  418. package/dist/plugins/event-emitter-plugin.test.d.ts.map +0 -1
  419. package/dist/plugins/event-emitter-plugin.test.js +0 -94
  420. package/dist/plugins/event-emitter-plugin.test.js.map +0 -1
  421. package/dist/plugins/execution/execution-analytics-plugin.d.ts +0 -129
  422. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +0 -1
  423. package/dist/plugins/execution/execution-analytics-plugin.js +0 -517
  424. package/dist/plugins/execution/execution-analytics-plugin.js.map +0 -1
  425. package/dist/plugins/execution/index.d.ts +0 -3
  426. package/dist/plugins/execution/index.d.ts.map +0 -1
  427. package/dist/plugins/execution/index.js +0 -2
  428. package/dist/plugins/execution/index.js.map +0 -1
  429. package/dist/plugins/execution/types.d.ts +0 -90
  430. package/dist/plugins/execution/types.d.ts.map +0 -1
  431. package/dist/plugins/execution/types.js +0 -2
  432. package/dist/plugins/execution/types.js.map +0 -1
  433. package/dist/plugins/index.d.ts +0 -10
  434. package/dist/plugins/index.d.ts.map +0 -1
  435. package/dist/plugins/index.js +0 -11
  436. package/dist/plugins/index.js.map +0 -1
  437. package/dist/plugins/limits/types.d.ts +0 -61
  438. package/dist/plugins/limits/types.d.ts.map +0 -1
  439. package/dist/plugins/limits/types.js +0 -2
  440. package/dist/plugins/limits/types.js.map +0 -1
  441. package/dist/plugins/limits-plugin.d.ts +0 -113
  442. package/dist/plugins/limits-plugin.d.ts.map +0 -1
  443. package/dist/plugins/limits-plugin.js +0 -380
  444. package/dist/plugins/limits-plugin.js.map +0 -1
  445. package/dist/plugins/logging/formatters.d.ts +0 -14
  446. package/dist/plugins/logging/formatters.d.ts.map +0 -1
  447. package/dist/plugins/logging/formatters.js +0 -24
  448. package/dist/plugins/logging/formatters.js.map +0 -1
  449. package/dist/plugins/logging/index.d.ts +0 -3
  450. package/dist/plugins/logging/index.d.ts.map +0 -1
  451. package/dist/plugins/logging/index.js +0 -2
  452. package/dist/plugins/logging/index.js.map +0 -1
  453. package/dist/plugins/logging/logging-plugin.d.ts +0 -91
  454. package/dist/plugins/logging/logging-plugin.d.ts.map +0 -1
  455. package/dist/plugins/logging/logging-plugin.js +0 -335
  456. package/dist/plugins/logging/logging-plugin.js.map +0 -1
  457. package/dist/plugins/logging/storages/console-storage.d.ts +0 -14
  458. package/dist/plugins/logging/storages/console-storage.d.ts.map +0 -1
  459. package/dist/plugins/logging/storages/console-storage.js +0 -38
  460. package/dist/plugins/logging/storages/console-storage.js.map +0 -1
  461. package/dist/plugins/logging/storages/file-storage.d.ts +0 -14
  462. package/dist/plugins/logging/storages/file-storage.d.ts.map +0 -1
  463. package/dist/plugins/logging/storages/file-storage.js +0 -41
  464. package/dist/plugins/logging/storages/file-storage.js.map +0 -1
  465. package/dist/plugins/logging/storages/index.d.ts +0 -5
  466. package/dist/plugins/logging/storages/index.d.ts.map +0 -1
  467. package/dist/plugins/logging/storages/index.js +0 -5
  468. package/dist/plugins/logging/storages/index.js.map +0 -1
  469. package/dist/plugins/logging/storages/remote-storage.d.ts +0 -20
  470. package/dist/plugins/logging/storages/remote-storage.d.ts.map +0 -1
  471. package/dist/plugins/logging/storages/remote-storage.js +0 -61
  472. package/dist/plugins/logging/storages/remote-storage.js.map +0 -1
  473. package/dist/plugins/logging/storages/silent-storage.d.ts +0 -10
  474. package/dist/plugins/logging/storages/silent-storage.d.ts.map +0 -1
  475. package/dist/plugins/logging/storages/silent-storage.js +0 -15
  476. package/dist/plugins/logging/storages/silent-storage.js.map +0 -1
  477. package/dist/plugins/logging/types.d.ts +0 -84
  478. package/dist/plugins/logging/types.d.ts.map +0 -1
  479. package/dist/plugins/logging/types.js +0 -2
  480. package/dist/plugins/logging/types.js.map +0 -1
  481. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +0 -12
  482. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +0 -1
  483. package/dist/plugins/performance/collectors/system-metrics-collector.js +0 -65
  484. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +0 -1
  485. package/dist/plugins/performance/index.d.ts +0 -5
  486. package/dist/plugins/performance/index.d.ts.map +0 -1
  487. package/dist/plugins/performance/index.js +0 -4
  488. package/dist/plugins/performance/index.js.map +0 -1
  489. package/dist/plugins/performance/performance-plugin.d.ts +0 -49
  490. package/dist/plugins/performance/performance-plugin.d.ts.map +0 -1
  491. package/dist/plugins/performance/performance-plugin.js +0 -293
  492. package/dist/plugins/performance/performance-plugin.js.map +0 -1
  493. package/dist/plugins/performance/storages/index.d.ts +0 -2
  494. package/dist/plugins/performance/storages/index.d.ts.map +0 -1
  495. package/dist/plugins/performance/storages/index.js +0 -4
  496. package/dist/plugins/performance/storages/index.js.map +0 -1
  497. package/dist/plugins/performance/storages/memory-storage.d.ts +0 -19
  498. package/dist/plugins/performance/storages/memory-storage.d.ts.map +0 -1
  499. package/dist/plugins/performance/storages/memory-storage.js +0 -69
  500. package/dist/plugins/performance/storages/memory-storage.js.map +0 -1
  501. package/dist/plugins/performance/types.d.ts +0 -154
  502. package/dist/plugins/performance/types.d.ts.map +0 -1
  503. package/dist/plugins/performance/types.js +0 -2
  504. package/dist/plugins/performance/types.js.map +0 -1
  505. package/dist/plugins/usage/aggregate-usage-stats.d.ts +0 -12
  506. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +0 -1
  507. package/dist/plugins/usage/aggregate-usage-stats.js +0 -115
  508. package/dist/plugins/usage/aggregate-usage-stats.js.map +0 -1
  509. package/dist/plugins/usage/index.d.ts +0 -5
  510. package/dist/plugins/usage/index.d.ts.map +0 -1
  511. package/dist/plugins/usage/index.js +0 -4
  512. package/dist/plugins/usage/index.js.map +0 -1
  513. package/dist/plugins/usage/storages/file-storage.d.ts +0 -22
  514. package/dist/plugins/usage/storages/file-storage.d.ts.map +0 -1
  515. package/dist/plugins/usage/storages/file-storage.js +0 -111
  516. package/dist/plugins/usage/storages/file-storage.js.map +0 -1
  517. package/dist/plugins/usage/storages/index.d.ts +0 -5
  518. package/dist/plugins/usage/storages/index.d.ts.map +0 -1
  519. package/dist/plugins/usage/storages/index.js +0 -5
  520. package/dist/plugins/usage/storages/index.js.map +0 -1
  521. package/dist/plugins/usage/storages/memory-storage.d.ts +0 -22
  522. package/dist/plugins/usage/storages/memory-storage.d.ts.map +0 -1
  523. package/dist/plugins/usage/storages/memory-storage.js +0 -42
  524. package/dist/plugins/usage/storages/memory-storage.js.map +0 -1
  525. package/dist/plugins/usage/storages/remote-storage.d.ts +0 -26
  526. package/dist/plugins/usage/storages/remote-storage.d.ts.map +0 -1
  527. package/dist/plugins/usage/storages/remote-storage.js +0 -115
  528. package/dist/plugins/usage/storages/remote-storage.js.map +0 -1
  529. package/dist/plugins/usage/storages/silent-storage.d.ts +0 -19
  530. package/dist/plugins/usage/storages/silent-storage.d.ts.map +0 -1
  531. package/dist/plugins/usage/storages/silent-storage.js +0 -26
  532. package/dist/plugins/usage/storages/silent-storage.js.map +0 -1
  533. package/dist/plugins/usage/types.d.ts +0 -127
  534. package/dist/plugins/usage/types.d.ts.map +0 -1
  535. package/dist/plugins/usage/types.js +0 -2
  536. package/dist/plugins/usage/types.js.map +0 -1
  537. package/dist/plugins/usage/usage-plugin.d.ts +0 -67
  538. package/dist/plugins/usage/usage-plugin.d.ts.map +0 -1
  539. package/dist/plugins/usage/usage-plugin.js +0 -309
  540. package/dist/plugins/usage/usage-plugin.js.map +0 -1
  541. package/dist/plugins/webhook/http-client.d.ts +0 -30
  542. package/dist/plugins/webhook/http-client.d.ts.map +0 -1
  543. package/dist/plugins/webhook/http-client.js +0 -110
  544. package/dist/plugins/webhook/http-client.js.map +0 -1
  545. package/dist/plugins/webhook/index.d.ts +0 -9
  546. package/dist/plugins/webhook/index.d.ts.map +0 -1
  547. package/dist/plugins/webhook/index.js +0 -9
  548. package/dist/plugins/webhook/index.js.map +0 -1
  549. package/dist/plugins/webhook/transformer.d.ts +0 -63
  550. package/dist/plugins/webhook/transformer.d.ts.map +0 -1
  551. package/dist/plugins/webhook/transformer.js +0 -157
  552. package/dist/plugins/webhook/transformer.js.map +0 -1
  553. package/dist/plugins/webhook/types.d.ts +0 -183
  554. package/dist/plugins/webhook/types.d.ts.map +0 -1
  555. package/dist/plugins/webhook/types.js +0 -2
  556. package/dist/plugins/webhook/types.js.map +0 -1
  557. package/dist/plugins/webhook/webhook-plugin.d.ts +0 -92
  558. package/dist/plugins/webhook/webhook-plugin.d.ts.map +0 -1
  559. package/dist/plugins/webhook/webhook-plugin.js +0 -328
  560. package/dist/plugins/webhook/webhook-plugin.js.map +0 -1
  561. package/dist/schemas/agent-template-schema.d.ts +0 -137
  562. package/dist/schemas/agent-template-schema.d.ts.map +0 -1
  563. package/dist/schemas/agent-template-schema.js +0 -89
  564. package/dist/schemas/agent-template-schema.js.map +0 -1
  565. package/dist/services/cache/cache-key-builder.d.ts +0 -13
  566. package/dist/services/cache/cache-key-builder.d.ts.map +0 -1
  567. package/dist/services/cache/cache-key-builder.js +0 -30
  568. package/dist/services/cache/cache-key-builder.js.map +0 -1
  569. package/dist/services/cache/cache-key-builder.test.d.ts +0 -2
  570. package/dist/services/cache/cache-key-builder.test.d.ts.map +0 -1
  571. package/dist/services/cache/cache-key-builder.test.js +0 -56
  572. package/dist/services/cache/cache-key-builder.test.js.map +0 -1
  573. package/dist/services/cache/execution-cache-service.d.ts +0 -18
  574. package/dist/services/cache/execution-cache-service.d.ts.map +0 -1
  575. package/dist/services/cache/execution-cache-service.js +0 -26
  576. package/dist/services/cache/execution-cache-service.js.map +0 -1
  577. package/dist/services/cache/execution-cache-service.test.d.ts +0 -2
  578. package/dist/services/cache/execution-cache-service.test.d.ts.map +0 -1
  579. package/dist/services/cache/execution-cache-service.test.js +0 -59
  580. package/dist/services/cache/execution-cache-service.test.js.map +0 -1
  581. package/dist/services/cache/index.d.ts +0 -4
  582. package/dist/services/cache/index.d.ts.map +0 -1
  583. package/dist/services/cache/index.js +0 -4
  584. package/dist/services/cache/index.js.map +0 -1
  585. package/dist/services/cache/memory-cache-storage.d.ts +0 -25
  586. package/dist/services/cache/memory-cache-storage.d.ts.map +0 -1
  587. package/dist/services/cache/memory-cache-storage.js +0 -89
  588. package/dist/services/cache/memory-cache-storage.js.map +0 -1
  589. package/dist/services/cache/memory-cache-storage.test.d.ts +0 -2
  590. package/dist/services/cache/memory-cache-storage.test.d.ts.map +0 -1
  591. package/dist/services/cache/memory-cache-storage.test.js +0 -94
  592. package/dist/services/cache/memory-cache-storage.test.js.map +0 -1
  593. package/dist/services/conversation-service/conversation-service.test.d.ts +0 -2
  594. package/dist/services/conversation-service/conversation-service.test.d.ts.map +0 -1
  595. package/dist/services/conversation-service/conversation-service.test.js +0 -248
  596. package/dist/services/conversation-service/conversation-service.test.js.map +0 -1
  597. package/dist/services/conversation-service/index.d.ts +0 -27
  598. package/dist/services/conversation-service/index.d.ts.map +0 -1
  599. package/dist/services/conversation-service/index.js +0 -144
  600. package/dist/services/conversation-service/index.js.map +0 -1
  601. package/dist/services/conversation-service/message-helpers.d.ts +0 -47
  602. package/dist/services/conversation-service/message-helpers.d.ts.map +0 -1
  603. package/dist/services/conversation-service/message-helpers.js +0 -150
  604. package/dist/services/conversation-service/message-helpers.js.map +0 -1
  605. package/dist/services/conversation-service/types.d.ts +0 -32
  606. package/dist/services/conversation-service/types.d.ts.map +0 -1
  607. package/dist/services/conversation-service/types.js +0 -8
  608. package/dist/services/conversation-service/types.js.map +0 -1
  609. package/dist/services/event-service.d.ts +0 -61
  610. package/dist/services/event-service.d.ts.map +0 -1
  611. package/dist/services/event-service.js +0 -110
  612. package/dist/services/event-service.js.map +0 -1
  613. package/dist/services/event-service.test.d.ts +0 -2
  614. package/dist/services/event-service.test.d.ts.map +0 -1
  615. package/dist/services/event-service.test.js +0 -86
  616. package/dist/services/event-service.test.js.map +0 -1
  617. package/dist/services/execution-constants.d.ts +0 -16
  618. package/dist/services/execution-constants.d.ts.map +0 -1
  619. package/dist/services/execution-constants.js +0 -16
  620. package/dist/services/execution-constants.js.map +0 -1
  621. package/dist/services/execution-event-emitter.d.ts +0 -60
  622. package/dist/services/execution-event-emitter.d.ts.map +0 -1
  623. package/dist/services/execution-event-emitter.js +0 -323
  624. package/dist/services/execution-event-emitter.js.map +0 -1
  625. package/dist/services/execution-round.d.ts +0 -58
  626. package/dist/services/execution-round.d.ts.map +0 -1
  627. package/dist/services/execution-round.js +0 -323
  628. package/dist/services/execution-round.js.map +0 -1
  629. package/dist/services/execution-round.test.d.ts +0 -2
  630. package/dist/services/execution-round.test.d.ts.map +0 -1
  631. package/dist/services/execution-round.test.js +0 -188
  632. package/dist/services/execution-round.test.js.map +0 -1
  633. package/dist/services/execution-service.d.ts +0 -54
  634. package/dist/services/execution-service.d.ts.map +0 -1
  635. package/dist/services/execution-service.js +0 -350
  636. package/dist/services/execution-service.js.map +0 -1
  637. package/dist/services/execution-service.test.d.ts +0 -2
  638. package/dist/services/execution-service.test.d.ts.map +0 -1
  639. package/dist/services/execution-service.test.js +0 -381
  640. package/dist/services/execution-service.test.js.map +0 -1
  641. package/dist/services/execution-stream.d.ts +0 -32
  642. package/dist/services/execution-stream.d.ts.map +0 -1
  643. package/dist/services/execution-stream.js +0 -268
  644. package/dist/services/execution-stream.js.map +0 -1
  645. package/dist/services/execution-types.d.ts +0 -122
  646. package/dist/services/execution-types.d.ts.map +0 -1
  647. package/dist/services/execution-types.js +0 -48
  648. package/dist/services/execution-types.js.map +0 -1
  649. package/dist/services/history-module.d.ts +0 -15
  650. package/dist/services/history-module.d.ts.map +0 -1
  651. package/dist/services/history-module.js +0 -42
  652. package/dist/services/history-module.js.map +0 -1
  653. package/dist/services/history-module.test.d.ts +0 -2
  654. package/dist/services/history-module.test.d.ts.map +0 -1
  655. package/dist/services/history-module.test.js +0 -137
  656. package/dist/services/history-module.test.js.map +0 -1
  657. package/dist/services/in-memory-history-store.d.ts +0 -12
  658. package/dist/services/in-memory-history-store.d.ts.map +0 -1
  659. package/dist/services/in-memory-history-store.js +0 -41
  660. package/dist/services/in-memory-history-store.js.map +0 -1
  661. package/dist/services/index.d.ts +0 -6
  662. package/dist/services/index.d.ts.map +0 -1
  663. package/dist/services/index.js +0 -12
  664. package/dist/services/index.js.map +0 -1
  665. package/dist/services/plugin-hook-dispatcher.d.ts +0 -11
  666. package/dist/services/plugin-hook-dispatcher.d.ts.map +0 -1
  667. package/dist/services/plugin-hook-dispatcher.js +0 -68
  668. package/dist/services/plugin-hook-dispatcher.js.map +0 -1
  669. package/dist/services/plugin-hook-dispatcher.test.d.ts +0 -2
  670. package/dist/services/plugin-hook-dispatcher.test.d.ts.map +0 -1
  671. package/dist/services/plugin-hook-dispatcher.test.js +0 -93
  672. package/dist/services/plugin-hook-dispatcher.test.js.map +0 -1
  673. package/dist/services/plugin-priority.test.d.ts +0 -2
  674. package/dist/services/plugin-priority.test.d.ts.map +0 -1
  675. package/dist/services/plugin-priority.test.js +0 -119
  676. package/dist/services/plugin-priority.test.js.map +0 -1
  677. package/dist/services/task-events.d.ts +0 -6
  678. package/dist/services/task-events.d.ts.map +0 -1
  679. package/dist/services/task-events.js +0 -6
  680. package/dist/services/task-events.js.map +0 -1
  681. package/dist/services/tool-execution-service.d.ts +0 -75
  682. package/dist/services/tool-execution-service.d.ts.map +0 -1
  683. package/dist/services/tool-execution-service.js +0 -232
  684. package/dist/services/tool-execution-service.js.map +0 -1
  685. package/dist/services/tool-execution-service.test.d.ts +0 -2
  686. package/dist/services/tool-execution-service.test.d.ts.map +0 -1
  687. package/dist/services/tool-execution-service.test.js +0 -358
  688. package/dist/services/tool-execution-service.test.js.map +0 -1
  689. package/dist/services/user-events.d.ts +0 -7
  690. package/dist/services/user-events.d.ts.map +0 -1
  691. package/dist/services/user-events.js +0 -6
  692. package/dist/services/user-events.js.map +0 -1
  693. package/dist/tool-registry/function-tool.d.ts +0 -54
  694. package/dist/tool-registry/function-tool.d.ts.map +0 -1
  695. package/dist/tool-registry/function-tool.js +0 -190
  696. package/dist/tool-registry/function-tool.js.map +0 -1
  697. package/dist/tool-registry/index.d.ts +0 -3
  698. package/dist/tool-registry/index.d.ts.map +0 -1
  699. package/dist/tool-registry/index.js +0 -3
  700. package/dist/tool-registry/index.js.map +0 -1
  701. package/dist/tool-registry/tool-registry.d.ts +0 -54
  702. package/dist/tool-registry/tool-registry.d.ts.map +0 -1
  703. package/dist/tool-registry/tool-registry.js +0 -148
  704. package/dist/tool-registry/tool-registry.js.map +0 -1
  705. package/dist/tools/implementations/function-tool/index.d.ts +0 -9
  706. package/dist/tools/implementations/function-tool/index.d.ts.map +0 -1
  707. package/dist/tools/implementations/function-tool/index.js +0 -13
  708. package/dist/tools/implementations/function-tool/index.js.map +0 -1
  709. package/dist/tools/implementations/function-tool/schema-converter.d.ts +0 -32
  710. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +0 -1
  711. package/dist/tools/implementations/function-tool/schema-converter.js +0 -164
  712. package/dist/tools/implementations/function-tool/schema-converter.js.map +0 -1
  713. package/dist/tools/implementations/function-tool/types.d.ts +0 -72
  714. package/dist/tools/implementations/function-tool/types.d.ts.map +0 -1
  715. package/dist/tools/implementations/function-tool/types.js +0 -14
  716. package/dist/tools/implementations/function-tool/types.js.map +0 -1
  717. package/dist/tools/implementations/function-tool.d.ts +0 -49
  718. package/dist/tools/implementations/function-tool.d.ts.map +0 -1
  719. package/dist/tools/implementations/function-tool.js +0 -223
  720. package/dist/tools/implementations/function-tool.js.map +0 -1
  721. package/dist/tools/implementations/index.d.ts +0 -4
  722. package/dist/tools/implementations/index.d.ts.map +0 -1
  723. package/dist/tools/implementations/index.js +0 -5
  724. package/dist/tools/implementations/index.js.map +0 -1
  725. package/dist/tools/implementations/mcp-tool.d.ts +0 -72
  726. package/dist/tools/implementations/mcp-tool.d.ts.map +0 -1
  727. package/dist/tools/implementations/mcp-tool.js +0 -246
  728. package/dist/tools/implementations/mcp-tool.js.map +0 -1
  729. package/dist/tools/implementations/openapi-tool.d.ts +0 -56
  730. package/dist/tools/implementations/openapi-tool.d.ts.map +0 -1
  731. package/dist/tools/implementations/openapi-tool.js +0 -324
  732. package/dist/tools/implementations/openapi-tool.js.map +0 -1
  733. package/dist/tools/implementations/relay-mcp-tool.d.ts +0 -38
  734. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +0 -1
  735. package/dist/tools/implementations/relay-mcp-tool.js +0 -46
  736. package/dist/tools/implementations/relay-mcp-tool.js.map +0 -1
  737. package/dist/tools/index.d.ts +0 -3
  738. package/dist/tools/index.d.ts.map +0 -1
  739. package/dist/tools/index.js +0 -4
  740. package/dist/tools/index.js.map +0 -1
  741. package/dist/tools/registry/index.d.ts +0 -2
  742. package/dist/tools/registry/index.d.ts.map +0 -1
  743. package/dist/tools/registry/index.js +0 -3
  744. package/dist/tools/registry/index.js.map +0 -1
  745. package/dist/tools/registry/tool-registry.d.ts +0 -54
  746. package/dist/tools/registry/tool-registry.d.ts.map +0 -1
  747. package/dist/tools/registry/tool-registry.js +0 -146
  748. package/dist/tools/registry/tool-registry.js.map +0 -1
  749. package/dist/utils/errors.d.ts +0 -164
  750. package/dist/utils/errors.d.ts.map +0 -1
  751. package/dist/utils/errors.js +0 -214
  752. package/dist/utils/errors.js.map +0 -1
  753. package/dist/utils/errors.test.d.ts +0 -2
  754. package/dist/utils/errors.test.d.ts.map +0 -1
  755. package/dist/utils/errors.test.js +0 -361
  756. package/dist/utils/errors.test.js.map +0 -1
  757. package/dist/utils/execution-proxy.d.ts +0 -79
  758. package/dist/utils/execution-proxy.d.ts.map +0 -1
  759. package/dist/utils/execution-proxy.js +0 -252
  760. package/dist/utils/execution-proxy.js.map +0 -1
  761. package/dist/utils/execution-proxy.test.d.ts +0 -2
  762. package/dist/utils/execution-proxy.test.d.ts.map +0 -1
  763. package/dist/utils/execution-proxy.test.js +0 -179
  764. package/dist/utils/execution-proxy.test.js.map +0 -1
  765. package/dist/utils/index.d.ts +0 -11
  766. package/dist/utils/index.d.ts.map +0 -1
  767. package/dist/utils/index.js +0 -7
  768. package/dist/utils/index.js.map +0 -1
  769. package/dist/utils/logger.d.ts +0 -74
  770. package/dist/utils/logger.d.ts.map +0 -1
  771. package/dist/utils/logger.js +0 -147
  772. package/dist/utils/logger.js.map +0 -1
  773. package/dist/utils/message-converter.d.ts +0 -65
  774. package/dist/utils/message-converter.d.ts.map +0 -1
  775. package/dist/utils/message-converter.js +0 -88
  776. package/dist/utils/message-converter.js.map +0 -1
  777. package/dist/utils/message-converter.test.d.ts +0 -2
  778. package/dist/utils/message-converter.test.d.ts.map +0 -1
  779. package/dist/utils/message-converter.test.js +0 -164
  780. package/dist/utils/message-converter.test.js.map +0 -1
  781. package/dist/utils/periodic-task.d.ts +0 -14
  782. package/dist/utils/periodic-task.d.ts.map +0 -1
  783. package/dist/utils/periodic-task.js +0 -26
  784. package/dist/utils/periodic-task.js.map +0 -1
  785. package/dist/utils/periodic-task.test.d.ts +0 -2
  786. package/dist/utils/periodic-task.test.d.ts.map +0 -1
  787. package/dist/utils/periodic-task.test.js +0 -87
  788. package/dist/utils/periodic-task.test.js.map +0 -1
  789. package/dist/utils/validation.d.ts +0 -40
  790. package/dist/utils/validation.d.ts.map +0 -1
  791. package/dist/utils/validation.js +0 -168
  792. package/dist/utils/validation.js.map +0 -1
  793. package/dist/utils/validation.test.d.ts +0 -2
  794. package/dist/utils/validation.test.d.ts.map +0 -1
  795. package/dist/utils/validation.test.js +0 -249
  796. package/dist/utils/validation.test.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":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M,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,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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O,CAAC,MAAM;IAId;;OAEG;IACH,OAAO,CAAC,cAAc;IAStB;;OAEG;IACH,OAAO,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,gBAAg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,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