@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,374 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { ConversationSession, ConversationHistory, isToolMessage, isAssistantMessage, createAssistantMessage, createToolMessage } from './conversation-history-manager';
3
- describe('ConversationSession', () => {
4
- describe('addToolMessageWithId', () => {
5
- it('should add tool message successfully with unique toolCallId', () => {
6
- const session = new ConversationSession();
7
- session.addToolMessageWithId('Tool result content', 'tool-call-1', 'testTool', { success: true });
8
- const messages = session.getMessages();
9
- expect(messages).toHaveLength(1);
10
- expect(messages[0].role).toBe('tool');
11
- expect(messages[0].content).toBe('Tool result content');
12
- expect(isToolMessage(messages[0]) && messages[0].toolCallId).toBe('tool-call-1');
13
- });
14
- it('should throw error when adding tool message with duplicate toolCallId', () => {
15
- const session = new ConversationSession();
16
- // Add first tool message
17
- session.addToolMessageWithId('First tool result', 'tool-call-1', 'testTool', { success: true });
18
- // Attempt to add second tool message with same toolCallId
19
- expect(() => {
20
- session.addToolMessageWithId('Second tool result', 'tool-call-1', // Same toolCallId
21
- 'testTool', { success: true });
22
- }).toThrow('Duplicate tool message detected for toolCallId: tool-call-1');
23
- // Verify only one message was added
24
- const messages = session.getMessages();
25
- expect(messages).toHaveLength(1);
26
- expect(messages[0].content).toBe('First tool result');
27
- });
28
- it('should allow different toolCallIds', () => {
29
- const session = new ConversationSession();
30
- session.addToolMessageWithId('First tool result', 'tool-call-1', 'testTool', { success: true });
31
- session.addToolMessageWithId('Second tool result', 'tool-call-2', // Different toolCallId
32
- 'testTool', { success: true });
33
- const messages = session.getMessages();
34
- expect(messages).toHaveLength(2);
35
- expect(isToolMessage(messages[0]) && messages[0].toolCallId).toBe('tool-call-1');
36
- expect(isToolMessage(messages[1]) && messages[1].toolCallId).toBe('tool-call-2');
37
- });
38
- it('should maintain proper message order', () => {
39
- const session = new ConversationSession();
40
- session.addUserMessage('User input');
41
- session.addAssistantMessage('Assistant response', [
42
- { id: 'tool-call-1', type: 'function', function: { name: 'testTool', arguments: '{}' } }
43
- ]);
44
- session.addToolMessageWithId('Tool result', 'tool-call-1', 'testTool');
45
- const messages = session.getMessages();
46
- expect(messages).toHaveLength(3);
47
- expect(messages[0].role).toBe('user');
48
- expect(messages[1].role).toBe('assistant');
49
- expect(messages[2].role).toBe('tool');
50
- });
51
- });
52
- describe('High-level API data integrity', () => {
53
- it('should preserve assistant message with null content and tool calls', () => {
54
- const session = new ConversationSession();
55
- // Add user message
56
- session.addUserMessage('What is 5 plus 3?');
57
- // Add assistant message with null content and tool calls (simulating OpenAI API response)
58
- session.addAssistantMessage(null, [
59
- {
60
- id: 'call_calculate_123',
61
- type: 'function',
62
- function: {
63
- name: 'calculate',
64
- arguments: '{"operation":"add","a":5,"b":3}'
65
- }
66
- }
67
- ]);
68
- // Add tool result
69
- session.addToolMessage('{"result":8,"operation":"5 + 3 = 8"}', 'call_calculate_123', 'calculate');
70
- const messages = session.getMessages();
71
- expect(messages).toHaveLength(3);
72
- // Verify user message
73
- expect(messages[0].role).toBe('user');
74
- expect(messages[0].content).toBe('What is 5 plus 3?');
75
- // Verify assistant message with null content is preserved
76
- expect(messages[1].role).toBe('assistant');
77
- expect(messages[1].content).toBe(null); // Critical: null should be preserved, not converted to empty string
78
- expect(isAssistantMessage(messages[1]) && messages[1].toolCalls).toHaveLength(1);
79
- expect(isAssistantMessage(messages[1]) && messages[1].toolCalls?.[0].id).toBe('call_calculate_123');
80
- // Verify tool message
81
- expect(messages[2].role).toBe('tool');
82
- expect(messages[2].content).toBe('{"result":8,"operation":"5 + 3 = 8"}');
83
- expect(isToolMessage(messages[2]) && messages[2].toolCallId).toBe('call_calculate_123');
84
- });
85
- it('should preserve assistant message with empty string content and tool calls', () => {
86
- const session = new ConversationSession();
87
- // Add assistant message with empty content and tool calls
88
- session.addAssistantMessage('', [
89
- {
90
- id: 'call_weather_456',
91
- type: 'function',
92
- function: {
93
- name: 'getWeather',
94
- arguments: '{"city":"Seoul"}'
95
- }
96
- }
97
- ]);
98
- const messages = session.getMessages();
99
- expect(messages).toHaveLength(1);
100
- const assistantMessage = messages[0];
101
- expect(assistantMessage.role).toBe('assistant');
102
- expect(assistantMessage.content).toBe(''); // Empty string should be preserved as-is
103
- expect(isAssistantMessage(assistantMessage) && assistantMessage.toolCalls).toHaveLength(1);
104
- });
105
- it('should preserve assistant message with meaningful content and tool calls', () => {
106
- const session = new ConversationSession();
107
- session.addAssistantMessage('Let me calculate that for you.', [
108
- {
109
- id: 'call_789',
110
- type: 'function',
111
- function: {
112
- name: 'calculate',
113
- arguments: '{"operation":"multiply","a":7,"b":8}'
114
- }
115
- }
116
- ]);
117
- const messages = session.getMessages();
118
- expect(messages).toHaveLength(1);
119
- const assistantMessage = messages[0];
120
- expect(assistantMessage.role).toBe('assistant');
121
- expect(assistantMessage.content).toBe('Let me calculate that for you.');
122
- expect(isAssistantMessage(assistantMessage) && assistantMessage.toolCalls).toHaveLength(1);
123
- expect(isAssistantMessage(assistantMessage) && assistantMessage.toolCalls?.[0].function.name).toBe('calculate');
124
- });
125
- it('should handle complete tool execution conversation flow', () => {
126
- const session = new ConversationSession();
127
- // Step 1: User asks question
128
- session.addUserMessage('Calculate 15 * 24');
129
- // Step 2: Assistant responds with tool call (null content)
130
- session.addAssistantMessage(null, [
131
- {
132
- id: 'call_multiply_001',
133
- type: 'function',
134
- function: {
135
- name: 'calculate',
136
- arguments: '{"operation":"multiply","a":15,"b":24}'
137
- }
138
- }
139
- ]);
140
- // Step 3: Tool returns result
141
- session.addToolMessage('{"result":360,"operation":"15 * 24 = 360"}', 'call_multiply_001', 'calculate');
142
- // Step 4: Assistant provides final response
143
- session.addAssistantMessage('The result of 15 * 24 is 360.');
144
- const messages = session.getMessages();
145
- expect(messages).toHaveLength(4);
146
- // Validate the complete flow
147
- expect(messages[0].role).toBe('user');
148
- expect(messages[1].role).toBe('assistant');
149
- expect(messages[1].content).toBe(null); // Tool call assistant message should have null content
150
- expect(messages[2].role).toBe('tool');
151
- expect(messages[3].role).toBe('assistant');
152
- expect(messages[3].content).toBe('The result of 15 * 24 is 360.');
153
- // Verify tool call data integrity
154
- expect(isAssistantMessage(messages[1]) && messages[1].toolCalls?.[0].id).toBe('call_multiply_001');
155
- expect(isToolMessage(messages[2]) && messages[2].toolCallId).toBe('call_multiply_001');
156
- });
157
- it('should handle multiple tool calls in single assistant message', () => {
158
- const session = new ConversationSession();
159
- session.addAssistantMessage(null, [
160
- {
161
- id: 'call_weather_001',
162
- type: 'function',
163
- function: {
164
- name: 'getWeather',
165
- arguments: '{"city":"Seoul"}'
166
- }
167
- },
168
- {
169
- id: 'call_weather_002',
170
- type: 'function',
171
- function: {
172
- name: 'getWeather',
173
- arguments: '{"city":"Tokyo"}'
174
- }
175
- }
176
- ]);
177
- session.addToolMessage('{"weather":"Sunny, 25°C"}', 'call_weather_001', 'getWeather');
178
- session.addToolMessage('{"weather":"Cloudy, 18°C"}', 'call_weather_002', 'getWeather');
179
- const messages = session.getMessages();
180
- expect(messages).toHaveLength(3);
181
- // Verify assistant message has multiple tool calls
182
- expect(isAssistantMessage(messages[0]) && messages[0].toolCalls).toHaveLength(2);
183
- expect(isAssistantMessage(messages[0]) && messages[0].content).toBe(null);
184
- // Verify tool messages are correctly linked
185
- expect(isToolMessage(messages[1]) && messages[1].toolCallId).toBe('call_weather_001');
186
- expect(isToolMessage(messages[2]) && messages[2].toolCallId).toBe('call_weather_002');
187
- });
188
- it('should preserve metadata for all message types', () => {
189
- const session = new ConversationSession();
190
- const userMetadata = { userId: 'user123', timestamp: '2024-01-01' };
191
- const assistantMetadata = { model: 'gpt-4', provider: 'openai' };
192
- const toolMetadata = { executionTime: 150, success: true };
193
- session.addUserMessage('Test message', userMetadata);
194
- session.addAssistantMessage('Response', [], assistantMetadata);
195
- session.addToolMessage('Tool result', 'call_123', 'testTool', toolMetadata);
196
- const messages = session.getMessages();
197
- expect(messages[0].metadata).toEqual(userMetadata);
198
- expect(messages[1].metadata).toEqual(assistantMetadata);
199
- expect(messages[2].metadata).toEqual(toolMetadata);
200
- });
201
- });
202
- describe('Factory functions data integrity', () => {
203
- it('should create assistant message with null content correctly', () => {
204
- const message = createAssistantMessage(null, {
205
- toolCalls: [
206
- {
207
- id: 'call_123',
208
- type: 'function',
209
- function: { name: 'test', arguments: '{}' }
210
- }
211
- ]
212
- });
213
- expect(message.role).toBe('assistant');
214
- expect(message.content).toBe(null);
215
- expect(message.toolCalls).toHaveLength(1);
216
- expect(message.timestamp).toBeInstanceOf(Date);
217
- });
218
- it('should create tool message with all required fields', () => {
219
- const message = createToolMessage('{"result": "success"}', {
220
- toolCallId: 'call_123',
221
- name: 'testTool',
222
- metadata: { success: true }
223
- });
224
- expect(message.role).toBe('tool');
225
- expect(message.content).toBe('{"result": "success"}');
226
- expect(message.toolCallId).toBe('call_123');
227
- expect(message.name).toBe('testTool');
228
- expect(message.metadata).toEqual({ success: true });
229
- expect(message.timestamp).toBeInstanceOf(Date);
230
- });
231
- });
232
- });
233
- describe('ConversationHistory', () => {
234
- describe('High-level conversation management', () => {
235
- it('should maintain conversation integrity across sessions', () => {
236
- const history = new ConversationHistory();
237
- const sessionA = history.getConversationSession('conversation-a');
238
- const sessionB = history.getConversationSession('conversation-b');
239
- // Add messages to different sessions
240
- sessionA.addUserMessage('Hello from A');
241
- sessionA.addAssistantMessage(null, [
242
- { id: 'call_a_1', type: 'function', function: { name: 'toolA', arguments: '{}' } }
243
- ]);
244
- sessionB.addUserMessage('Hello from B');
245
- sessionB.addAssistantMessage('Response from B');
246
- // Verify session isolation
247
- expect(sessionA.getMessages()).toHaveLength(2);
248
- expect(sessionB.getMessages()).toHaveLength(2);
249
- // Verify content integrity
250
- expect(sessionA.getMessages()[0].content).toBe('Hello from A');
251
- expect(sessionA.getMessages()[1].content).toBe(null);
252
- expect(sessionB.getMessages()[0].content).toBe('Hello from B');
253
- expect(sessionB.getMessages()[1].content).toBe('Response from B');
254
- });
255
- it('should provide accurate statistics', () => {
256
- const history = new ConversationHistory();
257
- const session1 = history.getConversationSession('conv1');
258
- const session2 = history.getConversationSession('conv2');
259
- session1.addUserMessage('Message 1');
260
- session1.addAssistantMessage('Response 1');
261
- session2.addUserMessage('Message 2');
262
- const stats = history.getStats();
263
- expect(stats.totalConversations).toBe(2);
264
- expect(stats.totalMessages).toBe(3);
265
- expect(stats.conversationIds).toContain('conv1');
266
- expect(stats.conversationIds).toContain('conv2');
267
- });
268
- });
269
- describe('Tool execution loop prevention integration test', () => {
270
- it('should prevent infinite tool execution by preserving conversation history correctly', () => {
271
- // This test simulates the exact scenario that was causing infinite tool execution
272
- const session = new ConversationSession();
273
- // Simulate the conversation flow that was causing the issue:
274
- // Turn 1: User asks for calculation
275
- session.addUserMessage('What is 5 plus 3?');
276
- // Turn 2: AI decides to use calculator tool
277
- // This is the critical point - OpenAI API returns content: null when making tool calls
278
- session.addAssistantMessage(null, [
279
- {
280
- id: 'call_calculate_abc123',
281
- type: 'function',
282
- function: {
283
- name: 'calculate',
284
- arguments: '{"operation":"add","a":5,"b":3}'
285
- }
286
- }
287
- ]);
288
- // Turn 3: Tool executes and returns result
289
- session.addToolMessage('{"result":8,"operation":"5 + 3 = 8"}', 'call_calculate_abc123', 'calculate');
290
- // Turn 4: AI provides final answer
291
- session.addAssistantMessage('The result of 5 plus 3 is 8.');
292
- // Now simulate what would happen if we send this conversation back to AI
293
- const messages = session.getMessages();
294
- expect(messages).toHaveLength(4);
295
- // The key test: AI should be able to see that it already made a tool call
296
- // by looking at the assistant message with null content and tool_calls
297
- const assistantToolCallMessage = messages[1];
298
- expect(assistantToolCallMessage.role).toBe('assistant');
299
- expect(assistantToolCallMessage.content).toBe(null); // This is critical!
300
- expect(isAssistantMessage(assistantToolCallMessage) && assistantToolCallMessage.toolCalls).toHaveLength(1);
301
- // The tool result should be properly linked
302
- const toolResultMessage = messages[2];
303
- expect(toolResultMessage.role).toBe('tool');
304
- expect(isToolMessage(toolResultMessage) && toolResultMessage.toolCallId).toBe('call_calculate_abc123');
305
- // If this conversation history is sent back to AI, it should NOT call the tool again
306
- // because it can see the tool was already called and the result was provided
307
- });
308
- it('should demonstrate the infinite loop scenario that was happening before the fix', () => {
309
- // This test documents what was happening before we fixed the content handling
310
- const session = new ConversationSession();
311
- session.addUserMessage('What is 5 plus 3?');
312
- // BEFORE FIX: We were incorrectly storing empty string instead of null
313
- // This made the AI think no tool call was made, causing it to call the tool again
314
- const incorrectAssistantMessage = createAssistantMessage('', {
315
- toolCalls: [
316
- {
317
- id: 'call_calculate_xyz789',
318
- type: 'function',
319
- function: {
320
- name: 'calculate',
321
- arguments: '{"operation":"add","a":5,"b":3}'
322
- }
323
- }
324
- ]
325
- });
326
- // AFTER FIX: We now correctly store null content
327
- const correctAssistantMessage = createAssistantMessage(null, {
328
- toolCalls: [
329
- {
330
- id: 'call_calculate_xyz789',
331
- type: 'function',
332
- function: {
333
- name: 'calculate',
334
- arguments: '{"operation":"add","a":5,"b":3}'
335
- }
336
- }
337
- ]
338
- });
339
- // Both messages have tool calls, but content differs
340
- expect(incorrectAssistantMessage.content).toBe(''); // This was causing the problem
341
- expect(correctAssistantMessage.content).toBe(null); // This is the correct way
342
- // When converted by OpenAI adapter, both should become content: null
343
- // But in conversation history, we need to preserve the original null from API
344
- expect(correctAssistantMessage.content).toBe(null);
345
- });
346
- it('should handle edge case of assistant message with both content and tool calls', () => {
347
- // Some AI models might return both content and tool calls
348
- const session = new ConversationSession();
349
- session.addUserMessage('Calculate 10 * 5 and explain the process');
350
- // Assistant message with both explanation and tool call
351
- session.addAssistantMessage('I\'ll calculate 10 * 5 for you.', [
352
- {
353
- id: 'call_calc_explain_001',
354
- type: 'function',
355
- function: {
356
- name: 'calculate',
357
- arguments: '{"operation":"multiply","a":10,"b":5}'
358
- }
359
- }
360
- ]);
361
- session.addToolMessage('{"result":50}', 'call_calc_explain_001', 'calculate');
362
- session.addAssistantMessage('The result is 50. I used multiplication to get 10 × 5 = 50.');
363
- const messages = session.getMessages();
364
- // Verify the assistant message with both content and tool calls
365
- const assistantMessage = messages[1];
366
- expect(assistantMessage.role).toBe('assistant');
367
- expect(assistantMessage.content).toBe('I\'ll calculate 10 * 5 for you.');
368
- expect(isAssistantMessage(assistantMessage) && assistantMessage.toolCalls).toHaveLength(1);
369
- // This should NOT cause infinite loops because the tool call ID is preserved
370
- expect(isToolMessage(messages[2]) && messages[2].toolCallId).toBe('call_calc_explain_001');
371
- });
372
- });
373
- });
374
- //# sourceMappingURL=conversation-history-manager.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conversation-history-manager.test.js","sourceRoot":"","sources":["../../src/managers/conversation-history-manager.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EAGpB,MAAM,gCAAgC,CAAC;AAExC,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACjC,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QAClC,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE;YACnE,MAAM,OAAO,GAAG,IAAI,mBAAmB,EAAE,CAAC;YAE1C,OAAO,CAAC,oBAAoB,CACxB,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,EAAE,OAAO,EAAE,IAAI,EAAE,CACpB,CAAC;YAEF,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;YACvC,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YACjC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACtC,MAAM,CAAC,QAAQ,CAAC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C,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,gBAAgB,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;YAE3F,6EAA6E;YAC7E,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAC;QAC/F,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export { AgentFactory } from './agent-factory';
2
- export { Tools } from './tool-manager';
3
- export { AIProviders } from './ai-provider-manager';
4
- export { AgentTemplates, type ITemplateApplicationResult } from './agent-templates';
5
- export { ConversationHistory, ConversationSession, type IProviderApiMessage, type IConversationHistoryOptions, createUserMessage, createAssistantMessage, createSystemMessage, createToolMessage, isAssistantMessage, isToolMessage, isSystemMessage } from './conversation-history-manager';
6
- export { Plugins } from './plugins';
7
- export type { IPluginsManager, IPluginLifecycleEvents, IPluginDependency, IPluginRegistrationOptions, IPluginStatus } from './plugins';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/managers/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,KAAK,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EACnB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,eAAe,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,YAAY,EACR,eAAe,EACf,sBAAsB,EACtB,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,EAChB,MAAM,WAAW,CAAC"}
@@ -1,8 +0,0 @@
1
- // Manager exports
2
- export { AgentFactory } from './agent-factory';
3
- export { Tools } from './tool-manager';
4
- export { AIProviders } from './ai-provider-manager';
5
- export { AgentTemplates } from './agent-templates';
6
- export { ConversationHistory, ConversationSession, createUserMessage, createAssistantMessage, createSystemMessage, createToolMessage, isAssistantMessage, isToolMessage, isSystemMessage } from './conversation-history-manager';
7
- export { Plugins } from './plugins';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/managers/index.ts"],"names":[],"mappings":"AAAA,kBAAkB;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAmC,MAAM,mBAAmB,CAAC;AACpF,OAAO,EACH,mBAAmB,EACnB,mBAAmB,EAGnB,iBAAiB,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,eAAe,EAClB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -1,161 +0,0 @@
1
- import type { IBaseModuleOptions, IModule, IModuleExecutionContext, IModuleExecutionResult } from '../abstracts/abstract-module';
2
- import type { IEventEmitterPlugin } from '../plugins/event-emitter/types';
3
- export declare const MODULE_REGISTRY_EVENTS: {
4
- /** Emitted when a module is registered in ModuleRegistry */
5
- readonly REGISTERED: "module.registered";
6
- /** Emitted when a module is unregistered in ModuleRegistry */
7
- readonly UNREGISTERED: "module.unregistered";
8
- };
9
- /**
10
- * Module registration options
11
- */
12
- export interface IModuleRegistrationOptions {
13
- /** Whether to initialize the module immediately */
14
- autoInitialize?: boolean;
15
- /** Custom initialization options */
16
- initOptions?: IBaseModuleOptions;
17
- /** Whether to validate dependencies */
18
- validateDependencies?: boolean;
19
- /** Custom initialization timeout */
20
- initTimeout?: number;
21
- }
22
- /**
23
- * Module status information
24
- */
25
- export interface IModuleStatus {
26
- name: string;
27
- type: string;
28
- enabled: boolean;
29
- initialized: boolean;
30
- hasEventEmitter: boolean;
31
- registrationTime: Date;
32
- initializationTime?: Date;
33
- lastActivity?: Date;
34
- dependencies: string[];
35
- dependents: string[];
36
- }
37
- /**
38
- * Module execution statistics
39
- */
40
- export interface IModuleExecutionStats {
41
- totalExecutions: number;
42
- successfulExecutions: number;
43
- failedExecutions: number;
44
- averageExecutionTime: number;
45
- lastExecutionTime?: Date;
46
- totalExecutionTime: number;
47
- }
48
- /**
49
- * Registry for managing module instances
50
- * Handles module lifecycle, dependencies, and execution coordination
51
- *
52
- * Key features:
53
- * - Dependency-based initialization ordering
54
- * - Module lifecycle management (register, initialize, dispose)
55
- * - Event-driven communication through EventEmitter
56
- * - Module status tracking and statistics
57
- * - Error handling and recovery
58
- */
59
- export declare class ModuleRegistry {
60
- private modules;
61
- private moduleOptions;
62
- private moduleStatuses;
63
- private moduleStats;
64
- private registrationOrder;
65
- private initializationOrder;
66
- private typeRegistry;
67
- private eventEmitter;
68
- private logger;
69
- private isDisposing;
70
- constructor(eventEmitter?: IEventEmitterPlugin);
71
- /**
72
- * Register a module instance
73
- */
74
- registerModule(module: IModule, options?: IModuleRegistrationOptions): Promise<void>;
75
- /**
76
- * Unregister a module
77
- */
78
- unregisterModule(moduleName: string): Promise<boolean>;
79
- /**
80
- * Initialize a specific module
81
- */
82
- initializeModule(moduleName: string, timeout?: number): Promise<void>;
83
- /**
84
- * Initialize all registered modules in dependency order
85
- */
86
- initializeAllModules(timeout?: number): Promise<void>;
87
- /**
88
- * Execute a module by name
89
- */
90
- executeModule(moduleName: string, context: IModuleExecutionContext): Promise<IModuleExecutionResult>;
91
- /**
92
- * Get a module by name
93
- */
94
- getModule(moduleName: string): IModule | null;
95
- /**
96
- * Get modules by type
97
- */
98
- getModulesByType(moduleType: string): IModule[];
99
- /**
100
- * Get all registered modules
101
- */
102
- getAllModules(): IModule[];
103
- /**
104
- * Get module names
105
- */
106
- getModuleNames(): string[];
107
- /**
108
- * Check if a module is registered
109
- */
110
- hasModule(moduleName: string): boolean;
111
- /**
112
- * Get module status
113
- */
114
- getModuleStatus(moduleName: string): IModuleStatus | null;
115
- /**
116
- * Get all module statuses
117
- */
118
- getAllModuleStatuses(): IModuleStatus[];
119
- /**
120
- * Get module execution statistics
121
- */
122
- getModuleStats(moduleName: string): IModuleExecutionStats | null;
123
- /**
124
- * Get all module execution statistics
125
- */
126
- getAllModuleStats(): Record<string, IModuleExecutionStats>;
127
- /**
128
- * Dispose all modules in reverse initialization order
129
- */
130
- disposeAllModules(): Promise<void>;
131
- /**
132
- * Clear all modules (for testing)
133
- */
134
- clearAllModules(): void;
135
- /**
136
- * Get registry statistics
137
- */
138
- getRegistryStats(): {
139
- totalModules: number;
140
- initializedModules: number;
141
- enabledModules: number;
142
- modulesByType: Record<string, number>;
143
- totalExecutions: number;
144
- totalSuccessfulExecutions: number;
145
- totalFailedExecutions: number;
146
- averageExecutionTime: number;
147
- };
148
- /**
149
- * Validate a module before registration
150
- */
151
- private validateModule;
152
- /**
153
- * Validate module dependencies
154
- */
155
- private validateModuleDependencies;
156
- /**
157
- * Find modules that depend on the given module
158
- */
159
- private findDependentModules;
160
- }
161
- //# sourceMappingURL=module-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module-registry.d.ts","sourceRoot":"","sources":["../../src/managers/module-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,kBAAkB,EAClB,OAAO,EACP,uBAAuB,EACvB,sBAAsB,EACzB,MAAM,8BAA8B,CA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