@robota-sdk/agent-core 3.0.0-beta.1

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 (508) hide show
  1. package/CHANGELOG.md +180 -0
  2. package/LICENSE +21 -0
  3. package/README.md +230 -0
  4. package/dist/abstracts/abstract-agent.d.ts +56 -0
  5. package/dist/abstracts/abstract-agent.d.ts.map +1 -0
  6. package/dist/abstracts/abstract-agent.js +55 -0
  7. package/dist/abstracts/abstract-agent.js.map +1 -0
  8. package/dist/abstracts/abstract-ai-provider.d.ts +187 -0
  9. package/dist/abstracts/abstract-ai-provider.d.ts.map +1 -0
  10. package/dist/abstracts/abstract-ai-provider.js +252 -0
  11. package/dist/abstracts/abstract-ai-provider.js.map +1 -0
  12. package/dist/abstracts/abstract-executor.d.ts +110 -0
  13. package/dist/abstracts/abstract-executor.d.ts.map +1 -0
  14. package/dist/abstracts/abstract-executor.js +156 -0
  15. package/dist/abstracts/abstract-executor.js.map +1 -0
  16. package/dist/abstracts/abstract-manager.d.ts +42 -0
  17. package/dist/abstracts/abstract-manager.d.ts.map +1 -0
  18. package/dist/abstracts/abstract-manager.js +49 -0
  19. package/dist/abstracts/abstract-manager.js.map +1 -0
  20. package/dist/abstracts/abstract-module.d.ts +365 -0
  21. package/dist/abstracts/abstract-module.d.ts.map +1 -0
  22. package/dist/abstracts/abstract-module.js +474 -0
  23. package/dist/abstracts/abstract-module.js.map +1 -0
  24. package/dist/abstracts/abstract-plugin.d.ts +369 -0
  25. package/dist/abstracts/abstract-plugin.d.ts.map +1 -0
  26. package/dist/abstracts/abstract-plugin.js +258 -0
  27. package/dist/abstracts/abstract-plugin.js.map +1 -0
  28. package/dist/abstracts/abstract-tool.d.ts +175 -0
  29. package/dist/abstracts/abstract-tool.d.ts.map +1 -0
  30. package/dist/abstracts/abstract-tool.js +140 -0
  31. package/dist/abstracts/abstract-tool.js.map +1 -0
  32. package/dist/abstracts/abstract-workflow-converter.d.ts +136 -0
  33. package/dist/abstracts/abstract-workflow-converter.d.ts.map +1 -0
  34. package/dist/abstracts/abstract-workflow-converter.js +252 -0
  35. package/dist/abstracts/abstract-workflow-converter.js.map +1 -0
  36. package/dist/abstracts/abstract-workflow-validator.d.ts +203 -0
  37. package/dist/abstracts/abstract-workflow-validator.d.ts.map +1 -0
  38. package/dist/abstracts/abstract-workflow-validator.js +447 -0
  39. package/dist/abstracts/abstract-workflow-validator.js.map +1 -0
  40. package/dist/abstracts/index.d.ts +6 -0
  41. package/dist/abstracts/index.d.ts.map +1 -0
  42. package/dist/abstracts/index.js +9 -0
  43. package/dist/abstracts/index.js.map +1 -0
  44. package/dist/agents/constants.d.ts +23 -0
  45. package/dist/agents/constants.d.ts.map +1 -0
  46. package/dist/agents/constants.js +22 -0
  47. package/dist/agents/constants.js.map +1 -0
  48. package/dist/agents/index.d.ts +1 -0
  49. package/dist/agents/index.d.ts.map +1 -0
  50. package/dist/agents/index.js +4 -0
  51. package/dist/agents/index.js.map +1 -0
  52. package/dist/agents/robota.test.d.ts +2 -0
  53. package/dist/agents/robota.test.d.ts.map +1 -0
  54. package/dist/agents/robota.test.js +416 -0
  55. package/dist/agents/robota.test.js.map +1 -0
  56. package/dist/browser/builtin-templates.json +107 -0
  57. package/dist/browser/index.d.ts +4237 -0
  58. package/dist/browser/index.js +4 -0
  59. package/dist/core/robota.d.ts +694 -0
  60. package/dist/core/robota.d.ts.map +1 -0
  61. package/dist/core/robota.js +1277 -0
  62. package/dist/core/robota.js.map +1 -0
  63. package/dist/executors/local-executor.d.ts +96 -0
  64. package/dist/executors/local-executor.d.ts.map +1 -0
  65. package/dist/executors/local-executor.js +197 -0
  66. package/dist/executors/local-executor.js.map +1 -0
  67. package/dist/executors/local-executor.test.d.ts +2 -0
  68. package/dist/executors/local-executor.test.d.ts.map +1 -0
  69. package/dist/executors/local-executor.test.js +192 -0
  70. package/dist/executors/local-executor.test.js.map +1 -0
  71. package/dist/index.d.ts +274 -0
  72. package/dist/index.d.ts.map +1 -0
  73. package/dist/index.js +235 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/interfaces/agent.d.ts +198 -0
  76. package/dist/interfaces/agent.d.ts.map +1 -0
  77. package/dist/interfaces/agent.js +2 -0
  78. package/dist/interfaces/agent.js.map +1 -0
  79. package/dist/interfaces/event-service.d.ts +79 -0
  80. package/dist/interfaces/event-service.d.ts.map +1 -0
  81. package/dist/interfaces/event-service.js +2 -0
  82. package/dist/interfaces/event-service.js.map +1 -0
  83. package/dist/interfaces/executor.d.ts +128 -0
  84. package/dist/interfaces/executor.d.ts.map +1 -0
  85. package/dist/interfaces/executor.js +2 -0
  86. package/dist/interfaces/executor.js.map +1 -0
  87. package/dist/interfaces/history-module.d.ts +19 -0
  88. package/dist/interfaces/history-module.d.ts.map +1 -0
  89. package/dist/interfaces/history-module.js +2 -0
  90. package/dist/interfaces/history-module.js.map +1 -0
  91. package/dist/interfaces/index.d.ts +13 -0
  92. package/dist/interfaces/index.d.ts.map +1 -0
  93. package/dist/interfaces/index.js +4 -0
  94. package/dist/interfaces/index.js.map +1 -0
  95. package/dist/interfaces/manager.d.ts +142 -0
  96. package/dist/interfaces/manager.d.ts.map +1 -0
  97. package/dist/interfaces/manager.js +2 -0
  98. package/dist/interfaces/manager.js.map +1 -0
  99. package/dist/interfaces/messages.d.ts +75 -0
  100. package/dist/interfaces/messages.d.ts.map +1 -0
  101. package/dist/interfaces/messages.js +29 -0
  102. package/dist/interfaces/messages.js.map +1 -0
  103. package/dist/interfaces/progress-reporting.d.ts +86 -0
  104. package/dist/interfaces/progress-reporting.d.ts.map +1 -0
  105. package/dist/interfaces/progress-reporting.js +37 -0
  106. package/dist/interfaces/progress-reporting.js.map +1 -0
  107. package/dist/interfaces/provider.d.ts +217 -0
  108. package/dist/interfaces/provider.d.ts.map +1 -0
  109. package/dist/interfaces/provider.js +2 -0
  110. package/dist/interfaces/provider.js.map +1 -0
  111. package/dist/interfaces/service.d.ts +205 -0
  112. package/dist/interfaces/service.d.ts.map +1 -0
  113. package/dist/interfaces/service.js +6 -0
  114. package/dist/interfaces/service.js.map +1 -0
  115. package/dist/interfaces/tool.d.ts +248 -0
  116. package/dist/interfaces/tool.d.ts.map +1 -0
  117. package/dist/interfaces/tool.js +2 -0
  118. package/dist/interfaces/tool.js.map +1 -0
  119. package/dist/interfaces/types.d.ts +71 -0
  120. package/dist/interfaces/types.d.ts.map +1 -0
  121. package/dist/interfaces/types.js +33 -0
  122. package/dist/interfaces/types.js.map +1 -0
  123. package/dist/interfaces/workflow-converter.d.ts +193 -0
  124. package/dist/interfaces/workflow-converter.d.ts.map +1 -0
  125. package/dist/interfaces/workflow-converter.js +11 -0
  126. package/dist/interfaces/workflow-converter.js.map +1 -0
  127. package/dist/interfaces/workflow-validator.d.ts +209 -0
  128. package/dist/interfaces/workflow-validator.d.ts.map +1 -0
  129. package/dist/interfaces/workflow-validator.js +16 -0
  130. package/dist/interfaces/workflow-validator.js.map +1 -0
  131. package/dist/managers/agent-factory.d.ts +132 -0
  132. package/dist/managers/agent-factory.d.ts.map +1 -0
  133. package/dist/managers/agent-factory.js +284 -0
  134. package/dist/managers/agent-factory.js.map +1 -0
  135. package/dist/managers/agent-factory.test.d.ts +2 -0
  136. package/dist/managers/agent-factory.test.d.ts.map +1 -0
  137. package/dist/managers/agent-factory.test.js +249 -0
  138. package/dist/managers/agent-factory.test.js.map +1 -0
  139. package/dist/managers/agent-templates.d.ts +84 -0
  140. package/dist/managers/agent-templates.d.ts.map +1 -0
  141. package/dist/managers/agent-templates.js +159 -0
  142. package/dist/managers/agent-templates.js.map +1 -0
  143. package/dist/managers/ai-provider-manager.d.ts +80 -0
  144. package/dist/managers/ai-provider-manager.d.ts.map +1 -0
  145. package/dist/managers/ai-provider-manager.js +226 -0
  146. package/dist/managers/ai-provider-manager.js.map +1 -0
  147. package/dist/managers/conversation-history-manager.d.ts +455 -0
  148. package/dist/managers/conversation-history-manager.d.ts.map +1 -0
  149. package/dist/managers/conversation-history-manager.js +578 -0
  150. package/dist/managers/conversation-history-manager.js.map +1 -0
  151. package/dist/managers/conversation-history-manager.test.d.ts +2 -0
  152. package/dist/managers/conversation-history-manager.test.d.ts.map +1 -0
  153. package/dist/managers/conversation-history-manager.test.js +374 -0
  154. package/dist/managers/conversation-history-manager.test.js.map +1 -0
  155. package/dist/managers/index.d.ts +8 -0
  156. package/dist/managers/index.d.ts.map +1 -0
  157. package/dist/managers/index.js +8 -0
  158. package/dist/managers/index.js.map +1 -0
  159. package/dist/managers/module-registry.d.ts +161 -0
  160. package/dist/managers/module-registry.d.ts.map +1 -0
  161. package/dist/managers/module-registry.js +519 -0
  162. package/dist/managers/module-registry.js.map +1 -0
  163. package/dist/managers/module-type-registry.d.ts +113 -0
  164. package/dist/managers/module-type-registry.d.ts.map +1 -0
  165. package/dist/managers/module-type-registry.js +439 -0
  166. package/dist/managers/module-type-registry.js.map +1 -0
  167. package/dist/managers/plugins.d.ts +166 -0
  168. package/dist/managers/plugins.d.ts.map +1 -0
  169. package/dist/managers/plugins.js +339 -0
  170. package/dist/managers/plugins.js.map +1 -0
  171. package/dist/managers/tool-manager.d.ts +70 -0
  172. package/dist/managers/tool-manager.d.ts.map +1 -0
  173. package/dist/managers/tool-manager.js +138 -0
  174. package/dist/managers/tool-manager.js.map +1 -0
  175. package/dist/managers/tool-manager.test.d.ts +2 -0
  176. package/dist/managers/tool-manager.test.d.ts.map +1 -0
  177. package/dist/managers/tool-manager.test.js +186 -0
  178. package/dist/managers/tool-manager.test.js.map +1 -0
  179. package/dist/node/builtin-templates.json +107 -0
  180. package/dist/node/index.cjs +4 -0
  181. package/dist/node/index.d.cts +4237 -0
  182. package/dist/node/index.d.ts +4237 -0
  183. package/dist/node/index.js +4 -0
  184. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts +67 -0
  185. package/dist/plugins/conversation-history/conversation-history-plugin.d.ts.map +1 -0
  186. package/dist/plugins/conversation-history/conversation-history-plugin.js +270 -0
  187. package/dist/plugins/conversation-history/conversation-history-plugin.js.map +1 -0
  188. package/dist/plugins/conversation-history/index.d.ts +3 -0
  189. package/dist/plugins/conversation-history/index.d.ts.map +1 -0
  190. package/dist/plugins/conversation-history/index.js +2 -0
  191. package/dist/plugins/conversation-history/index.js.map +1 -0
  192. package/dist/plugins/conversation-history/storages/database-storage.d.ts +19 -0
  193. package/dist/plugins/conversation-history/storages/database-storage.d.ts.map +1 -0
  194. package/dist/plugins/conversation-history/storages/database-storage.js +94 -0
  195. package/dist/plugins/conversation-history/storages/database-storage.js.map +1 -0
  196. package/dist/plugins/conversation-history/storages/file-storage.d.ts +15 -0
  197. package/dist/plugins/conversation-history/storages/file-storage.d.ts.map +1 -0
  198. package/dist/plugins/conversation-history/storages/file-storage.js +94 -0
  199. package/dist/plugins/conversation-history/storages/file-storage.js.map +1 -0
  200. package/dist/plugins/conversation-history/storages/index.d.ts +4 -0
  201. package/dist/plugins/conversation-history/storages/index.d.ts.map +1 -0
  202. package/dist/plugins/conversation-history/storages/index.js +4 -0
  203. package/dist/plugins/conversation-history/storages/index.js.map +1 -0
  204. package/dist/plugins/conversation-history/storages/memory-storage.d.ts +15 -0
  205. package/dist/plugins/conversation-history/storages/memory-storage.d.ts.map +1 -0
  206. package/dist/plugins/conversation-history/storages/memory-storage.js +33 -0
  207. package/dist/plugins/conversation-history/storages/memory-storage.js.map +1 -0
  208. package/dist/plugins/conversation-history/types.d.ts +61 -0
  209. package/dist/plugins/conversation-history/types.d.ts.map +1 -0
  210. package/dist/plugins/conversation-history/types.js +2 -0
  211. package/dist/plugins/conversation-history/types.js.map +1 -0
  212. package/dist/plugins/error-handling/context-adapter.d.ts +30 -0
  213. package/dist/plugins/error-handling/context-adapter.d.ts.map +1 -0
  214. package/dist/plugins/error-handling/context-adapter.js +41 -0
  215. package/dist/plugins/error-handling/context-adapter.js.map +1 -0
  216. package/dist/plugins/error-handling/error-handling-plugin.d.ts +49 -0
  217. package/dist/plugins/error-handling/error-handling-plugin.d.ts.map +1 -0
  218. package/dist/plugins/error-handling/error-handling-plugin.js +229 -0
  219. package/dist/plugins/error-handling/error-handling-plugin.js.map +1 -0
  220. package/dist/plugins/error-handling/index.d.ts +10 -0
  221. package/dist/plugins/error-handling/index.d.ts.map +1 -0
  222. package/dist/plugins/error-handling/index.js +10 -0
  223. package/dist/plugins/error-handling/index.js.map +1 -0
  224. package/dist/plugins/error-handling/types.d.ts +73 -0
  225. package/dist/plugins/error-handling/types.d.ts.map +1 -0
  226. package/dist/plugins/error-handling/types.js +14 -0
  227. package/dist/plugins/error-handling/types.js.map +1 -0
  228. package/dist/plugins/event-emitter/metrics.d.ts +17 -0
  229. package/dist/plugins/event-emitter/metrics.d.ts.map +1 -0
  230. package/dist/plugins/event-emitter/metrics.js +17 -0
  231. package/dist/plugins/event-emitter/metrics.js.map +1 -0
  232. package/dist/plugins/event-emitter/types.d.ts +112 -0
  233. package/dist/plugins/event-emitter/types.d.ts.map +1 -0
  234. package/dist/plugins/event-emitter/types.js +65 -0
  235. package/dist/plugins/event-emitter/types.js.map +1 -0
  236. package/dist/plugins/event-emitter-plugin.d.ts +222 -0
  237. package/dist/plugins/event-emitter-plugin.d.ts.map +1 -0
  238. package/dist/plugins/event-emitter-plugin.js +432 -0
  239. package/dist/plugins/event-emitter-plugin.js.map +1 -0
  240. package/dist/plugins/event-emitter-plugin.test.d.ts +2 -0
  241. package/dist/plugins/event-emitter-plugin.test.d.ts.map +1 -0
  242. package/dist/plugins/event-emitter-plugin.test.js +94 -0
  243. package/dist/plugins/event-emitter-plugin.test.js.map +1 -0
  244. package/dist/plugins/execution/execution-analytics-plugin.d.ts +129 -0
  245. package/dist/plugins/execution/execution-analytics-plugin.d.ts.map +1 -0
  246. package/dist/plugins/execution/execution-analytics-plugin.js +517 -0
  247. package/dist/plugins/execution/execution-analytics-plugin.js.map +1 -0
  248. package/dist/plugins/execution/index.d.ts +3 -0
  249. package/dist/plugins/execution/index.d.ts.map +1 -0
  250. package/dist/plugins/execution/index.js +2 -0
  251. package/dist/plugins/execution/index.js.map +1 -0
  252. package/dist/plugins/execution/types.d.ts +90 -0
  253. package/dist/plugins/execution/types.d.ts.map +1 -0
  254. package/dist/plugins/execution/types.js +2 -0
  255. package/dist/plugins/execution/types.js.map +1 -0
  256. package/dist/plugins/index.d.ts +10 -0
  257. package/dist/plugins/index.d.ts.map +1 -0
  258. package/dist/plugins/index.js +11 -0
  259. package/dist/plugins/index.js.map +1 -0
  260. package/dist/plugins/limits/types.d.ts +61 -0
  261. package/dist/plugins/limits/types.d.ts.map +1 -0
  262. package/dist/plugins/limits/types.js +2 -0
  263. package/dist/plugins/limits/types.js.map +1 -0
  264. package/dist/plugins/limits-plugin.d.ts +113 -0
  265. package/dist/plugins/limits-plugin.d.ts.map +1 -0
  266. package/dist/plugins/limits-plugin.js +380 -0
  267. package/dist/plugins/limits-plugin.js.map +1 -0
  268. package/dist/plugins/logging/formatters.d.ts +14 -0
  269. package/dist/plugins/logging/formatters.d.ts.map +1 -0
  270. package/dist/plugins/logging/formatters.js +24 -0
  271. package/dist/plugins/logging/formatters.js.map +1 -0
  272. package/dist/plugins/logging/index.d.ts +3 -0
  273. package/dist/plugins/logging/index.d.ts.map +1 -0
  274. package/dist/plugins/logging/index.js +2 -0
  275. package/dist/plugins/logging/index.js.map +1 -0
  276. package/dist/plugins/logging/logging-plugin.d.ts +91 -0
  277. package/dist/plugins/logging/logging-plugin.d.ts.map +1 -0
  278. package/dist/plugins/logging/logging-plugin.js +335 -0
  279. package/dist/plugins/logging/logging-plugin.js.map +1 -0
  280. package/dist/plugins/logging/storages/console-storage.d.ts +14 -0
  281. package/dist/plugins/logging/storages/console-storage.d.ts.map +1 -0
  282. package/dist/plugins/logging/storages/console-storage.js +38 -0
  283. package/dist/plugins/logging/storages/console-storage.js.map +1 -0
  284. package/dist/plugins/logging/storages/file-storage.d.ts +14 -0
  285. package/dist/plugins/logging/storages/file-storage.d.ts.map +1 -0
  286. package/dist/plugins/logging/storages/file-storage.js +41 -0
  287. package/dist/plugins/logging/storages/file-storage.js.map +1 -0
  288. package/dist/plugins/logging/storages/index.d.ts +5 -0
  289. package/dist/plugins/logging/storages/index.d.ts.map +1 -0
  290. package/dist/plugins/logging/storages/index.js +5 -0
  291. package/dist/plugins/logging/storages/index.js.map +1 -0
  292. package/dist/plugins/logging/storages/remote-storage.d.ts +20 -0
  293. package/dist/plugins/logging/storages/remote-storage.d.ts.map +1 -0
  294. package/dist/plugins/logging/storages/remote-storage.js +61 -0
  295. package/dist/plugins/logging/storages/remote-storage.js.map +1 -0
  296. package/dist/plugins/logging/storages/silent-storage.d.ts +10 -0
  297. package/dist/plugins/logging/storages/silent-storage.d.ts.map +1 -0
  298. package/dist/plugins/logging/storages/silent-storage.js +15 -0
  299. package/dist/plugins/logging/storages/silent-storage.js.map +1 -0
  300. package/dist/plugins/logging/types.d.ts +84 -0
  301. package/dist/plugins/logging/types.d.ts.map +1 -0
  302. package/dist/plugins/logging/types.js +2 -0
  303. package/dist/plugins/logging/types.js.map +1 -0
  304. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts +12 -0
  305. package/dist/plugins/performance/collectors/system-metrics-collector.d.ts.map +1 -0
  306. package/dist/plugins/performance/collectors/system-metrics-collector.js +65 -0
  307. package/dist/plugins/performance/collectors/system-metrics-collector.js.map +1 -0
  308. package/dist/plugins/performance/index.d.ts +5 -0
  309. package/dist/plugins/performance/index.d.ts.map +1 -0
  310. package/dist/plugins/performance/index.js +4 -0
  311. package/dist/plugins/performance/index.js.map +1 -0
  312. package/dist/plugins/performance/performance-plugin.d.ts +49 -0
  313. package/dist/plugins/performance/performance-plugin.d.ts.map +1 -0
  314. package/dist/plugins/performance/performance-plugin.js +293 -0
  315. package/dist/plugins/performance/performance-plugin.js.map +1 -0
  316. package/dist/plugins/performance/storages/index.d.ts +2 -0
  317. package/dist/plugins/performance/storages/index.d.ts.map +1 -0
  318. package/dist/plugins/performance/storages/index.js +4 -0
  319. package/dist/plugins/performance/storages/index.js.map +1 -0
  320. package/dist/plugins/performance/storages/memory-storage.d.ts +19 -0
  321. package/dist/plugins/performance/storages/memory-storage.d.ts.map +1 -0
  322. package/dist/plugins/performance/storages/memory-storage.js +69 -0
  323. package/dist/plugins/performance/storages/memory-storage.js.map +1 -0
  324. package/dist/plugins/performance/types.d.ts +154 -0
  325. package/dist/plugins/performance/types.d.ts.map +1 -0
  326. package/dist/plugins/performance/types.js +2 -0
  327. package/dist/plugins/performance/types.js.map +1 -0
  328. package/dist/plugins/usage/aggregate-usage-stats.d.ts +12 -0
  329. package/dist/plugins/usage/aggregate-usage-stats.d.ts.map +1 -0
  330. package/dist/plugins/usage/aggregate-usage-stats.js +115 -0
  331. package/dist/plugins/usage/aggregate-usage-stats.js.map +1 -0
  332. package/dist/plugins/usage/index.d.ts +5 -0
  333. package/dist/plugins/usage/index.d.ts.map +1 -0
  334. package/dist/plugins/usage/index.js +4 -0
  335. package/dist/plugins/usage/index.js.map +1 -0
  336. package/dist/plugins/usage/storages/file-storage.d.ts +22 -0
  337. package/dist/plugins/usage/storages/file-storage.d.ts.map +1 -0
  338. package/dist/plugins/usage/storages/file-storage.js +111 -0
  339. package/dist/plugins/usage/storages/file-storage.js.map +1 -0
  340. package/dist/plugins/usage/storages/index.d.ts +5 -0
  341. package/dist/plugins/usage/storages/index.d.ts.map +1 -0
  342. package/dist/plugins/usage/storages/index.js +5 -0
  343. package/dist/plugins/usage/storages/index.js.map +1 -0
  344. package/dist/plugins/usage/storages/memory-storage.d.ts +22 -0
  345. package/dist/plugins/usage/storages/memory-storage.d.ts.map +1 -0
  346. package/dist/plugins/usage/storages/memory-storage.js +42 -0
  347. package/dist/plugins/usage/storages/memory-storage.js.map +1 -0
  348. package/dist/plugins/usage/storages/remote-storage.d.ts +26 -0
  349. package/dist/plugins/usage/storages/remote-storage.d.ts.map +1 -0
  350. package/dist/plugins/usage/storages/remote-storage.js +115 -0
  351. package/dist/plugins/usage/storages/remote-storage.js.map +1 -0
  352. package/dist/plugins/usage/storages/silent-storage.d.ts +19 -0
  353. package/dist/plugins/usage/storages/silent-storage.d.ts.map +1 -0
  354. package/dist/plugins/usage/storages/silent-storage.js +26 -0
  355. package/dist/plugins/usage/storages/silent-storage.js.map +1 -0
  356. package/dist/plugins/usage/types.d.ts +127 -0
  357. package/dist/plugins/usage/types.d.ts.map +1 -0
  358. package/dist/plugins/usage/types.js +2 -0
  359. package/dist/plugins/usage/types.js.map +1 -0
  360. package/dist/plugins/usage/usage-plugin.d.ts +67 -0
  361. package/dist/plugins/usage/usage-plugin.d.ts.map +1 -0
  362. package/dist/plugins/usage/usage-plugin.js +309 -0
  363. package/dist/plugins/usage/usage-plugin.js.map +1 -0
  364. package/dist/plugins/webhook/http-client.d.ts +30 -0
  365. package/dist/plugins/webhook/http-client.d.ts.map +1 -0
  366. package/dist/plugins/webhook/http-client.js +110 -0
  367. package/dist/plugins/webhook/http-client.js.map +1 -0
  368. package/dist/plugins/webhook/index.d.ts +9 -0
  369. package/dist/plugins/webhook/index.d.ts.map +1 -0
  370. package/dist/plugins/webhook/index.js +9 -0
  371. package/dist/plugins/webhook/index.js.map +1 -0
  372. package/dist/plugins/webhook/transformer.d.ts +63 -0
  373. package/dist/plugins/webhook/transformer.d.ts.map +1 -0
  374. package/dist/plugins/webhook/transformer.js +157 -0
  375. package/dist/plugins/webhook/transformer.js.map +1 -0
  376. package/dist/plugins/webhook/types.d.ts +183 -0
  377. package/dist/plugins/webhook/types.d.ts.map +1 -0
  378. package/dist/plugins/webhook/types.js +2 -0
  379. package/dist/plugins/webhook/types.js.map +1 -0
  380. package/dist/plugins/webhook/webhook-plugin.d.ts +92 -0
  381. package/dist/plugins/webhook/webhook-plugin.d.ts.map +1 -0
  382. package/dist/plugins/webhook/webhook-plugin.js +328 -0
  383. package/dist/plugins/webhook/webhook-plugin.js.map +1 -0
  384. package/dist/schemas/agent-template-schema.d.ts +137 -0
  385. package/dist/schemas/agent-template-schema.d.ts.map +1 -0
  386. package/dist/schemas/agent-template-schema.js +87 -0
  387. package/dist/schemas/agent-template-schema.js.map +1 -0
  388. package/dist/services/conversation-service/index.d.ts +88 -0
  389. package/dist/services/conversation-service/index.d.ts.map +1 -0
  390. package/dist/services/conversation-service/index.js +441 -0
  391. package/dist/services/conversation-service/index.js.map +1 -0
  392. package/dist/services/conversation-service/types.d.ts +32 -0
  393. package/dist/services/conversation-service/types.d.ts.map +1 -0
  394. package/dist/services/conversation-service/types.js +8 -0
  395. package/dist/services/conversation-service/types.js.map +1 -0
  396. package/dist/services/event-service.d.ts +61 -0
  397. package/dist/services/event-service.d.ts.map +1 -0
  398. package/dist/services/event-service.js +110 -0
  399. package/dist/services/event-service.js.map +1 -0
  400. package/dist/services/event-service.test.d.ts +2 -0
  401. package/dist/services/event-service.test.d.ts.map +1 -0
  402. package/dist/services/event-service.test.js +86 -0
  403. package/dist/services/event-service.test.js.map +1 -0
  404. package/dist/services/execution-service.d.ts +151 -0
  405. package/dist/services/execution-service.d.ts.map +1 -0
  406. package/dist/services/execution-service.js +1262 -0
  407. package/dist/services/execution-service.js.map +1 -0
  408. package/dist/services/execution-service.test.d.ts +2 -0
  409. package/dist/services/execution-service.test.d.ts.map +1 -0
  410. package/dist/services/execution-service.test.js +338 -0
  411. package/dist/services/execution-service.test.js.map +1 -0
  412. package/dist/services/history-module.d.ts +15 -0
  413. package/dist/services/history-module.d.ts.map +1 -0
  414. package/dist/services/history-module.js +42 -0
  415. package/dist/services/history-module.js.map +1 -0
  416. package/dist/services/in-memory-history-store.d.ts +12 -0
  417. package/dist/services/in-memory-history-store.d.ts.map +1 -0
  418. package/dist/services/in-memory-history-store.js +41 -0
  419. package/dist/services/in-memory-history-store.js.map +1 -0
  420. package/dist/services/index.d.ts +7 -0
  421. package/dist/services/index.d.ts.map +1 -0
  422. package/dist/services/index.js +13 -0
  423. package/dist/services/index.js.map +1 -0
  424. package/dist/services/task-events.d.ts +6 -0
  425. package/dist/services/task-events.d.ts.map +1 -0
  426. package/dist/services/task-events.js +6 -0
  427. package/dist/services/task-events.js.map +1 -0
  428. package/dist/services/tool-execution-service.d.ts +74 -0
  429. package/dist/services/tool-execution-service.d.ts.map +1 -0
  430. package/dist/services/tool-execution-service.js +189 -0
  431. package/dist/services/tool-execution-service.js.map +1 -0
  432. package/dist/services/user-events.d.ts +7 -0
  433. package/dist/services/user-events.d.ts.map +1 -0
  434. package/dist/services/user-events.js +6 -0
  435. package/dist/services/user-events.js.map +1 -0
  436. package/dist/tools/implementations/function-tool/index.d.ts +9 -0
  437. package/dist/tools/implementations/function-tool/index.d.ts.map +1 -0
  438. package/dist/tools/implementations/function-tool/index.js +13 -0
  439. package/dist/tools/implementations/function-tool/index.js.map +1 -0
  440. package/dist/tools/implementations/function-tool/schema-converter.d.ts +32 -0
  441. package/dist/tools/implementations/function-tool/schema-converter.d.ts.map +1 -0
  442. package/dist/tools/implementations/function-tool/schema-converter.js +164 -0
  443. package/dist/tools/implementations/function-tool/schema-converter.js.map +1 -0
  444. package/dist/tools/implementations/function-tool/types.d.ts +72 -0
  445. package/dist/tools/implementations/function-tool/types.d.ts.map +1 -0
  446. package/dist/tools/implementations/function-tool/types.js +14 -0
  447. package/dist/tools/implementations/function-tool/types.js.map +1 -0
  448. package/dist/tools/implementations/function-tool.d.ts +49 -0
  449. package/dist/tools/implementations/function-tool.d.ts.map +1 -0
  450. package/dist/tools/implementations/function-tool.js +223 -0
  451. package/dist/tools/implementations/function-tool.js.map +1 -0
  452. package/dist/tools/implementations/index.d.ts +4 -0
  453. package/dist/tools/implementations/index.d.ts.map +1 -0
  454. package/dist/tools/implementations/index.js +5 -0
  455. package/dist/tools/implementations/index.js.map +1 -0
  456. package/dist/tools/implementations/mcp-tool.d.ts +72 -0
  457. package/dist/tools/implementations/mcp-tool.d.ts.map +1 -0
  458. package/dist/tools/implementations/mcp-tool.js +246 -0
  459. package/dist/tools/implementations/mcp-tool.js.map +1 -0
  460. package/dist/tools/implementations/openapi-tool.d.ts +56 -0
  461. package/dist/tools/implementations/openapi-tool.d.ts.map +1 -0
  462. package/dist/tools/implementations/openapi-tool.js +324 -0
  463. package/dist/tools/implementations/openapi-tool.js.map +1 -0
  464. package/dist/tools/implementations/relay-mcp-tool.d.ts +38 -0
  465. package/dist/tools/implementations/relay-mcp-tool.d.ts.map +1 -0
  466. package/dist/tools/implementations/relay-mcp-tool.js +46 -0
  467. package/dist/tools/implementations/relay-mcp-tool.js.map +1 -0
  468. package/dist/tools/index.d.ts +3 -0
  469. package/dist/tools/index.d.ts.map +1 -0
  470. package/dist/tools/index.js +4 -0
  471. package/dist/tools/index.js.map +1 -0
  472. package/dist/tools/registry/index.d.ts +2 -0
  473. package/dist/tools/registry/index.d.ts.map +1 -0
  474. package/dist/tools/registry/index.js +3 -0
  475. package/dist/tools/registry/index.js.map +1 -0
  476. package/dist/tools/registry/tool-registry.d.ts +54 -0
  477. package/dist/tools/registry/tool-registry.d.ts.map +1 -0
  478. package/dist/tools/registry/tool-registry.js +146 -0
  479. package/dist/tools/registry/tool-registry.js.map +1 -0
  480. package/dist/utils/errors.d.ts +155 -0
  481. package/dist/utils/errors.d.ts.map +1 -0
  482. package/dist/utils/errors.js +203 -0
  483. package/dist/utils/errors.js.map +1 -0
  484. package/dist/utils/execution-proxy.d.ts +75 -0
  485. package/dist/utils/execution-proxy.d.ts.map +1 -0
  486. package/dist/utils/execution-proxy.js +230 -0
  487. package/dist/utils/execution-proxy.js.map +1 -0
  488. package/dist/utils/index.d.ts +11 -0
  489. package/dist/utils/index.d.ts.map +1 -0
  490. package/dist/utils/index.js +7 -0
  491. package/dist/utils/index.js.map +1 -0
  492. package/dist/utils/logger.d.ts +74 -0
  493. package/dist/utils/logger.d.ts.map +1 -0
  494. package/dist/utils/logger.js +143 -0
  495. package/dist/utils/logger.js.map +1 -0
  496. package/dist/utils/message-converter.d.ts +68 -0
  497. package/dist/utils/message-converter.d.ts.map +1 -0
  498. package/dist/utils/message-converter.js +87 -0
  499. package/dist/utils/message-converter.js.map +1 -0
  500. package/dist/utils/periodic-task.d.ts +14 -0
  501. package/dist/utils/periodic-task.d.ts.map +1 -0
  502. package/dist/utils/periodic-task.js +26 -0
  503. package/dist/utils/periodic-task.js.map +1 -0
  504. package/dist/utils/validation.d.ts +40 -0
  505. package/dist/utils/validation.d.ts.map +1 -0
  506. package/dist/utils/validation.js +162 -0
  507. package/dist/utils/validation.js.map +1 -0
  508. package/package.json +101 -0
@@ -0,0 +1,198 @@
1
+ import type { TProviderConfigValue, IAIProvider } from './provider';
2
+ import type { IPluginContract, IPluginOptions, IPluginStats } from '../abstracts/abstract-plugin';
3
+ import type { IModule } from '../abstracts/abstract-module';
4
+ import type { IToolWithEventService } from '../abstracts/abstract-tool';
5
+ import type { TUtilLogLevel } from '../utils/logger';
6
+ import type { TMetadata, TConfigValue } from './types';
7
+ import type { IEventService } from '../services/event-service';
8
+ import type { IOwnerPathSegment } from '../services/event-service';
9
+ import type { TUniversalMessageMetadata, TUniversalMessage } from './messages';
10
+ export type { TUniversalMessage, TUniversalMessageMetadata, IBaseMessage, IUserMessage, IAssistantMessage, ISystemMessage, IToolMessage, IToolCall, TUniversalMessageRole, } from './messages';
11
+ /**
12
+ * IExecutionContextInjection
13
+ *
14
+ * Minimal context payload used to inject an existing ownerPath into a new agent instance
15
+ * (e.g., when a tool creates an agent and must preserve absolute ownerPath semantics).
16
+ *
17
+ * NOTE: This is intentionally NOT ToolExecutionContext. ToolExecutionContext is for tool calls
18
+ * and requires toolName/parameters; agent creation only needs ownerPath and execution linkage.
19
+ */
20
+ export interface IExecutionContextInjection {
21
+ ownerPath?: IOwnerPathSegment[];
22
+ parentExecutionId?: string;
23
+ rootExecutionId?: string;
24
+ executionLevel?: number;
25
+ sourceId?: string;
26
+ }
27
+ /**
28
+ * Provider-specific configuration
29
+ */
30
+ export interface IAgentProviderConfig {
31
+ openai?: {
32
+ apiKey?: string;
33
+ baseURL?: string;
34
+ organization?: string;
35
+ [key: string]: TProviderConfigValue | undefined;
36
+ };
37
+ anthropic?: {
38
+ apiKey?: string;
39
+ baseURL?: string;
40
+ [key: string]: TProviderConfigValue | undefined;
41
+ };
42
+ google?: {
43
+ apiKey?: string;
44
+ projectId?: string;
45
+ location?: string;
46
+ [key: string]: TProviderConfigValue | undefined;
47
+ };
48
+ [provider: string]: Record<string, TProviderConfigValue | undefined> | undefined;
49
+ }
50
+ /**
51
+ * Agent configuration options - New design with aiProviders array and defaultModel
52
+ */
53
+ export interface IAgentConfig {
54
+ id?: string;
55
+ name: string;
56
+ aiProviders: IAIProvider[];
57
+ defaultModel: {
58
+ provider: string;
59
+ model: string;
60
+ temperature?: number;
61
+ maxTokens?: number;
62
+ topP?: number;
63
+ systemMessage?: string;
64
+ };
65
+ tools?: Array<IToolWithEventService>;
66
+ plugins?: Array<IPluginContract<IPluginOptions, IPluginStats>>;
67
+ modules?: IModule[];
68
+ systemMessage?: string;
69
+ systemPrompt?: string;
70
+ conversationId?: string;
71
+ sessionId?: string;
72
+ userId?: string;
73
+ metadata?: TUniversalMessageMetadata;
74
+ context?: Record<string, TConfigValue>;
75
+ logging?: {
76
+ level?: TUtilLogLevel;
77
+ enabled?: boolean;
78
+ format?: string;
79
+ destination?: string;
80
+ };
81
+ providerConfig?: IAgentProviderConfig;
82
+ stream?: boolean;
83
+ toolChoice?: 'auto' | 'none' | string;
84
+ responseFormat?: IResponseFormatConfig;
85
+ safetySettings?: ISafetySetting[];
86
+ timeout?: number;
87
+ retryAttempts?: number;
88
+ rateLimiting?: {
89
+ enabled?: boolean;
90
+ maxRequests?: number;
91
+ windowMs?: number;
92
+ };
93
+ eventService?: IEventService;
94
+ executionContext?: IExecutionContextInjection;
95
+ }
96
+ /**
97
+ * Agent template interface
98
+ */
99
+ export interface IAgentTemplate {
100
+ id: string;
101
+ name: string;
102
+ description?: string;
103
+ category?: string;
104
+ tags?: string[];
105
+ config: IAgentConfig;
106
+ version?: string;
107
+ author?: string;
108
+ createdAt?: Date;
109
+ updatedAt?: Date;
110
+ }
111
+ /**
112
+ * Agent run options - type-safe interface for all agent execution options
113
+ */
114
+ export interface IRunOptions {
115
+ temperature?: number;
116
+ maxTokens?: number;
117
+ stream?: boolean;
118
+ toolChoice?: 'auto' | 'none' | string;
119
+ sessionId?: string;
120
+ userId?: string;
121
+ metadata?: TMetadata;
122
+ }
123
+ /**
124
+ * Generic agent interface with type parameters for enhanced type safety
125
+ *
126
+ * @template TConfig - Agent configuration type (defaults to IAgentConfig for backward compatibility)
127
+ * @template TContext - Execution context type (defaults to IRunOptions for backward compatibility)
128
+ * @template TUniversalMessage - Message type (defaults to TUniversalMessage for backward compatibility)
129
+ */
130
+ export interface IAgent<TConfig = IAgentConfig, TContext = IRunOptions, TMessage = TUniversalMessage> {
131
+ /**
132
+ * Configure the agent with type-safe configuration
133
+ */
134
+ configure?(config: TConfig): Promise<void>;
135
+ /**
136
+ * Run agent with user input and type-safe context
137
+ */
138
+ run(input: string, context?: TContext): Promise<string>;
139
+ /**
140
+ * Run agent with streaming response and type-safe context
141
+ */
142
+ runStream(input: string, context?: TContext): AsyncGenerator<string, void, never>;
143
+ /**
144
+ * Get conversation history with type-safe messages
145
+ */
146
+ getHistory(): TMessage[];
147
+ /**
148
+ * Clear conversation history
149
+ */
150
+ clearHistory(): void;
151
+ }
152
+ /**
153
+ * Extended run context with provider-agnostic options
154
+ * Supports dynamic provider configurations without hardcoding specific providers
155
+ */
156
+ export interface IExtendedRunContext {
157
+ temperature?: number;
158
+ maxTokens?: number;
159
+ stream?: boolean;
160
+ toolChoice?: 'auto' | 'none' | string;
161
+ sessionId?: string;
162
+ userId?: string;
163
+ metadata?: TMetadata;
164
+ providerOptions?: Record<string, TConfigValue>;
165
+ stopSequences?: string[];
166
+ topK?: number;
167
+ topP?: number;
168
+ seed?: number;
169
+ responseFormat?: IResponseFormatConfig;
170
+ safetySettings?: ISafetySetting[];
171
+ generationConfig?: IGenerationConfig;
172
+ }
173
+ /**
174
+ * Response format configuration
175
+ */
176
+ export interface IResponseFormatConfig {
177
+ type?: 'text' | 'json_object';
178
+ schema?: Record<string, TConfigValue>;
179
+ }
180
+ /**
181
+ * Safety setting configuration
182
+ */
183
+ export interface ISafetySetting {
184
+ category: string;
185
+ threshold: string;
186
+ [key: string]: TConfigValue;
187
+ }
188
+ /**
189
+ * Generation configuration
190
+ */
191
+ export interface IGenerationConfig {
192
+ temperature?: number;
193
+ maxTokens?: number;
194
+ topP?: number;
195
+ topK?: number;
196
+ [key: string]: TConfigValue;
197
+ }
198
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/E,YAAY,EACR,iBAAiB,EACjB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,SAAS,EACT,qBAAqB,GACxB,MAAM,YAAY,CAAC;AAEpB;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IACvC,SAAS,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eA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 @@
1
+ {"version":3,"file":"agent.js","sourceRoot":"","sources":["../../src/interfaces/agent.ts"],"names":[],"mappings":""}
@@ -0,0 +1,79 @@
1
+ import type { TLoggerData, TUniversalValue } from './types';
2
+ /**
3
+ * A single segment in an explicit ownerPath.
4
+ *
5
+ * Path-only rule:
6
+ * - Relationships must be derived from these explicit segments, not from parsing IDs.
7
+ */
8
+ export interface IOwnerPathSegment {
9
+ type: string;
10
+ id: string;
11
+ }
12
+ /**
13
+ * Event context that accompanies an emitted event.
14
+ * This is the single source of truth for deterministic linking in subscribers.
15
+ */
16
+ export interface IEventContext {
17
+ ownerType: string;
18
+ ownerId: string;
19
+ ownerPath: IOwnerPathSegment[];
20
+ /** Optional structured metadata for debugging/observability */
21
+ metadata?: TLoggerData;
22
+ }
23
+ /**
24
+ * Allowed extension values for event payloads.
25
+ *
26
+ * NOTE:
27
+ * - Must not use `any`/`unknown`.
28
+ * - Includes IEventContext so `context` can be carried in data bags when needed.
29
+ */
30
+ export type TEventExtensionValue = TUniversalValue | TLoggerData | Error | IEventContext | IOwnerPathSegment[];
31
+ /**
32
+ * Base event payload shape.
33
+ * Emitters may add additional fields, but MUST keep linkage information explicit.
34
+ */
35
+ export interface IBaseEventData {
36
+ /** Timestamp when the event was emitted. This is required for deterministic ordering. */
37
+ timestamp: Date;
38
+ /** Optional structured metadata */
39
+ metadata?: TLoggerData;
40
+ /** Extensible fields for event-specific payloads */
41
+ [key: string]: TEventExtensionValue | undefined;
42
+ }
43
+ /**
44
+ * Execution-related event payload.
45
+ */
46
+ export interface IExecutionEventData extends IBaseEventData {
47
+ }
48
+ /**
49
+ * Tool-related event payload.
50
+ */
51
+ export interface IToolEventData extends IBaseEventData {
52
+ toolName?: string;
53
+ parameters?: Record<string, TUniversalValue>;
54
+ }
55
+ /**
56
+ * Agent-related event payload.
57
+ */
58
+ export interface IAgentEventData extends IBaseEventData {
59
+ agentId?: string;
60
+ }
61
+ export type TEventListener = (eventType: string, data: IBaseEventData, context?: IEventContext) => void;
62
+ /**
63
+ * Minimal EventService contract for emitting events.
64
+ * Subscriptions are handled by dedicated modules (e.g., EventEmitterPlugin), not here.
65
+ */
66
+ export interface IEventService {
67
+ emit(eventType: string, data: IBaseEventData, context?: IEventContext): void;
68
+ subscribe(listener: TEventListener): void;
69
+ unsubscribe(listener: TEventListener): void;
70
+ }
71
+ /**
72
+ * Explicit owner binding information used for scoped event emission.
73
+ */
74
+ export interface IEventServiceOwnerBinding {
75
+ ownerType: string;
76
+ ownerId: string;
77
+ ownerPath: IOwnerPathSegment[];
78
+ }
79
+ //# sourceMappingURL=event-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-service.d.ts","sourceRoot":"","sources":["../../src/interfaces/event-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5D;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAE/B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,WAAW,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG,WAAW,GAAG,KAAK,GAAG,aAAa,GAAG,iBAAiB,EAAE,CAAC;AAE/G;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC3B,yFAAyF;IACzF,SAAS,EAAE,IAAI,CAAC;IAEhB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAEvB,oDAAoD;IACpD,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB,GAAG,SAAS,CAAC;CACnD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG;AAE9D;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,cAAc;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAChD;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACnD,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAExG;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7E,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;IAC1C,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,iBAAiB,EAAE,CAAC;CAClC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=event-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-service.js","sourceRoot":"","sources":["../../src/interfaces/event-service.ts"],"names":[],"mappings":""}
@@ -0,0 +1,128 @@
1
+ import type { IChatOptions, IToolSchema } from './index';
2
+ import type { TUniversalMessage, IAssistantMessage } from './messages';
3
+ /**
4
+ * Request for executing a streaming chat completion through an executor
5
+ */
6
+ export interface IChatExecutionRequest {
7
+ /** Array of messages in the conversation */
8
+ messages: TUniversalMessage[];
9
+ /** Chat options including model, temperature, etc. */
10
+ options?: IChatOptions;
11
+ /** Available tools for the AI to use */
12
+ tools?: IToolSchema[];
13
+ /** Target AI provider (e.g., 'openai', 'anthropic', 'google') */
14
+ provider: string;
15
+ /** Specific model to use */
16
+ model: string;
17
+ }
18
+ /**
19
+ * Request for executing a streaming chat completion through an executor
20
+ */
21
+ export interface IStreamExecutionRequest extends IChatExecutionRequest {
22
+ /** Indicates this is a streaming request */
23
+ stream: true;
24
+ }
25
+ /**
26
+ * Interface for executing AI provider operations
27
+ *
28
+ * Executors abstract the execution mechanism, allowing providers to work
29
+ * with either local API calls or remote server calls transparently.
30
+ *
31
+ * Implementation patterns:
32
+ * - LocalExecutor: Direct API calls using provider SDKs
33
+ * - RemoteExecutor: HTTP/WebSocket calls to remote server
34
+ * - CacheExecutor: Cached responses with explicit error propagation
35
+ * - HybridExecutor: Conditional local/remote execution
36
+ */
37
+ export interface IExecutor {
38
+ /**
39
+ * Execute a chat completion request
40
+ *
41
+ * @param request - Chat execution request with messages, options, and tools
42
+ * @returns Promise resolving to assistant message response
43
+ *
44
+ * @example
45
+ * ```typescript
46
+ * const response = await executor.executeChat({
47
+ * messages: [{ role: 'user', content: 'Hello!' }],
48
+ * options: { model: 'gpt-4', temperature: 0.7 },
49
+ * provider: 'openai',
50
+ * model: 'gpt-4'
51
+ * });
52
+ * ```
53
+ */
54
+ executeChat(request: IChatExecutionRequest): Promise<IAssistantMessage>;
55
+ /**
56
+ * Execute a streaming chat completion request
57
+ *
58
+ * @param request - Streaming chat execution request
59
+ * @returns AsyncIterable of message chunks
60
+ *
61
+ * @example
62
+ * ```typescript
63
+ * for await (const chunk of executor.executeChatStream({
64
+ * messages: [{ role: 'user', content: 'Tell me a story' }],
65
+ * options: { model: 'gpt-4' },
66
+ * provider: 'openai',
67
+ * model: 'gpt-4',
68
+ * stream: true
69
+ * })) {
70
+ * console.log(chunk.content);
71
+ * }
72
+ * ```
73
+ */
74
+ executeChatStream?(request: IStreamExecutionRequest): AsyncIterable<TUniversalMessage>;
75
+ /**
76
+ * Check if the executor supports tool calling
77
+ * @returns true if tool calling is supported
78
+ */
79
+ supportsTools(): boolean;
80
+ /**
81
+ * Validate executor configuration
82
+ * @returns true if configuration is valid
83
+ */
84
+ validateConfig(): boolean;
85
+ /**
86
+ * Clean up resources when executor is no longer needed
87
+ */
88
+ dispose?(): Promise<void>;
89
+ /**
90
+ * Get executor name/identifier
91
+ */
92
+ readonly name: string;
93
+ /**
94
+ * Get executor version
95
+ */
96
+ readonly version: string;
97
+ }
98
+ /**
99
+ * Configuration options for local executor
100
+ */
101
+ export interface ILocalExecutorConfig {
102
+ /** Timeout for API requests in milliseconds */
103
+ timeout?: number;
104
+ /** Maximum number of retry attempts */
105
+ maxRetries?: number;
106
+ /** Base delay between retries in milliseconds */
107
+ retryDelay?: number;
108
+ /** Whether to enable request/response logging */
109
+ enableLogging?: boolean;
110
+ }
111
+ /**
112
+ * Configuration options for remote executor
113
+ */
114
+ export interface IRemoteExecutorConfig {
115
+ /** Remote server URL */
116
+ serverUrl: string;
117
+ /** User authentication token */
118
+ userApiKey: string;
119
+ /** Timeout for HTTP requests in milliseconds */
120
+ timeout?: number;
121
+ /** Maximum number of retry attempts */
122
+ maxRetries?: number;
123
+ /** Whether to enable WebSocket for streaming */
124
+ enableWebSocket?: boolean;
125
+ /** Custom headers to include in requests */
126
+ headers?: Record<string, string>;
127
+ }
128
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEvE;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,4CAA4C;IAC5C,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,sDAAsD;IACtD,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,wCAAwC;IACxC,KAAK,CAAC,EAAE,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M,CAAC;IACpB,gDAAgD;IAChD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../../src/interfaces/executor.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import type { IBaseEventData, IEventContext } from './event-service';
2
+ export interface IEventHistoryRecord {
3
+ eventName: string;
4
+ sequenceId: number;
5
+ timestamp: Date;
6
+ eventData: IBaseEventData;
7
+ context: IEventContext;
8
+ }
9
+ export interface IEventHistorySnapshot {
10
+ lastSequenceId: number;
11
+ createdAt: Date;
12
+ }
13
+ export interface IEventHistoryModule {
14
+ append(record: IEventHistoryRecord): void;
15
+ read(fromSequenceId: number, toSequenceId?: number): IEventHistoryRecord[];
16
+ readStream(fromSequenceId: number, toSequenceId?: number): AsyncIterable<IEventHistoryRecord>;
17
+ getSnapshot?(): IEventHistorySnapshot | undefined;
18
+ }
19
+ //# sourceMappingURL=history-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history-module.d.ts","sourceRoot":"","sources":["../../src/interfaces/history-module.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,mBAAmB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,cAAc,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,IAAI,CAAC;CACnB;AAED,MAAM,WAAW,mBAAmB;IAChC,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAC1C,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAAC;IAC3E,UAAU,CAAC,cAAc,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAC;IAC9F,WAAW,CAAC,IAAI,qBAAqB,GAAG,SAAS,CAAC;CACrD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=history-module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"history-module.js","sourceRoot":"","sources":["../../src/interfaces/history-module.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ export * from './types';
2
+ export type { IAgentConfig, IAgentTemplate, IRunOptions } from './agent';
3
+ export type { TUniversalMessage, TUniversalMessageRole, TUniversalMessageMetadata, IBaseMessage, IUserMessage, IAssistantMessage, ISystemMessage, IToolMessage, IToolCall } from './messages';
4
+ export type { IAIProvider, IToolSchema, IParameterSchema, TJSONSchemaKind, TJSONSchemaEnum, TParameterDefaultValue, IChatOptions, IProviderOptions, IProviderRequest, IRawProviderResponse, ITokenUsage, IProviderSpecificOptions, TProviderConfigValue, TProviderOptionValueBase } from './provider';
5
+ export type { TAgentCreationMetadata, TManagerToolParameters, IConfigValidationResult, IAgentCreationOptions, IAgentFactory, IAIProviderManager, IToolManager } from './manager';
6
+ export type { ITool, IFunctionTool, IToolRegistry, IToolFactory, IToolResult, IToolExecutionResult, IToolExecutionContext, IParameterValidationResult, TToolExecutor, IOpenAPIToolConfig, IMCPToolConfig, TToolMetadata, } from './tool';
7
+ export type { IEventService, IEventContext, IOwnerPathSegment, IBaseEventData, IExecutionEventData, IToolEventData, IAgentEventData, IEventServiceOwnerBinding, TEventListener } from './event-service';
8
+ export type { IProgressReportingTool, IToolExecutionStep, TToolProgressCallback } from './progress-reporting';
9
+ export { isProgressReportingTool, getToolEstimatedDuration, getToolExecutionSteps, setToolProgressCallback } from './progress-reporting';
10
+ export type { TConversationContextMetadata, TToolExecutionParameters, TExecutionMetadata, TResponseMetadata, IToolExecutionRequest, IConversationContext, IConversationResponse, IStreamingChunk, IContextOptions, IExecutionServiceOptions, IConversationServiceOptions, IConversationService, IToolExecutionService, IExecutionService } from './service';
11
+ export type { IExecutor, IChatExecutionRequest, IStreamExecutionRequest, ILocalExecutorConfig, IRemoteExecutorConfig } from './executor';
12
+ export type { IEventHistoryModule, IEventHistoryRecord, IEventHistorySnapshot } from './history-module';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,YAAY,EACR,YAAY,EACZ,cAAc,EACd,WAAW,EACd,MAAM,SAAS,CAAC;AAGjB,YAAY,EACR,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,YAAY,EACZ,SAAS,EACZ,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,WAAW,EACX,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EAC3B,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,kBAAkB,EAClB,YAAY,EACf,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,KAAK,EACL,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,aAAa,GAChB,MAAM,QAAQ,CAAC;AAEhB,YAAY,EACR,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,cAAc,EACjB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACR,sBAAsB,EACtB,kBAAkB,EAClB,qBAAqB,EACxB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACR,4BAA4B,EAC5B,wBAAwB,EACxB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACpB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACR,SAAS,EACT,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACR,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,4 @@
1
+ // Interface exports - centralized types first
2
+ export * from './types';
3
+ export { isProgressReportingTool, getToolEstimatedDuration, getToolExecutionSteps, setToolProgressCallback } from './progress-reporting';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/interfaces/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,cAAc,SAAS,CAAC;AAmFxB,OAAO,EACH,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EAC1B,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,142 @@
1
+ import type { IAIProvider, IToolSchema } from './provider';
2
+ import type { ITool, TToolExecutor, IToolExecutionContext, TToolParameters } from './tool';
3
+ import type { TUniversalValue } from './types';
4
+ import type { IAgentConfig, IAgent } from './agent';
5
+ /**
6
+ * Reusable type definitions for manager layer
7
+ */
8
+ /**
9
+ * Agent creation metadata type
10
+ * Used for storing additional information about agent creation and configuration
11
+ */
12
+ export type TAgentCreationMetadata = Record<string, string | number | boolean | Date>;
13
+ /**
14
+ * Tool execution parameters for manager operations
15
+ * Used for tool parameter validation and execution in manager context
16
+ */
17
+ export type TManagerToolParameters = Record<string, string | number | boolean | string[] | number[] | boolean[]>;
18
+ /**
19
+ * Configuration validation result
20
+ */
21
+ export interface IConfigValidationResult {
22
+ isValid: boolean;
23
+ errors: string[];
24
+ warnings?: string[];
25
+ }
26
+ /**
27
+ * AI Provider Manager interface for provider registration and selection
28
+ */
29
+ export interface IAIProviderManager {
30
+ /**
31
+ * Register an AI provider
32
+ */
33
+ addProvider(name: string, provider: IAIProvider): void;
34
+ /**
35
+ * Remove an AI provider
36
+ */
37
+ removeProvider(name: string): void;
38
+ /**
39
+ * Get registered provider by name
40
+ */
41
+ getProvider(name: string): IAIProvider | undefined;
42
+ /**
43
+ * Get all registered providers
44
+ */
45
+ getProviders(): Record<string, IAIProvider>;
46
+ /**
47
+ * Set current provider and model
48
+ */
49
+ setCurrentProvider(name: string, model: string): void;
50
+ /**
51
+ * Get current provider and model
52
+ */
53
+ getCurrentProvider(): {
54
+ provider: string;
55
+ model: string;
56
+ } | undefined;
57
+ /**
58
+ * Check if provider is configured
59
+ */
60
+ isConfigured(): boolean;
61
+ /**
62
+ * Get available models for a provider
63
+ */
64
+ getAvailableModels(providerName: string): string[];
65
+ }
66
+ /**
67
+ * Tool Manager interface for tool registration and management
68
+ */
69
+ export interface IToolManager {
70
+ /**
71
+ * Register a tool
72
+ */
73
+ addTool(schema: IToolSchema, executor: TToolExecutor): void;
74
+ /**
75
+ * Remove a tool by name
76
+ */
77
+ removeTool(name: string): void;
78
+ /**
79
+ * Get tool interface by name
80
+ */
81
+ getTool(name: string): ITool | undefined;
82
+ /**
83
+ * Get tool schema by name
84
+ */
85
+ getToolSchema(name: string): IToolSchema | undefined;
86
+ /**
87
+ * Get all registered tools
88
+ */
89
+ getTools(): IToolSchema[];
90
+ /**
91
+ * Execute a tool
92
+ */
93
+ executeTool(name: string, parameters: TToolParameters, context?: IToolExecutionContext): Promise<TUniversalValue>;
94
+ /**
95
+ * Check if tool exists
96
+ */
97
+ hasTool(name: string): boolean;
98
+ /**
99
+ * Set allowed tools (for filtering)
100
+ */
101
+ setAllowedTools(tools: string[]): void;
102
+ /**
103
+ * Get allowed tools
104
+ */
105
+ getAllowedTools(): string[] | undefined;
106
+ }
107
+ /**
108
+ * Agent creation options
109
+ */
110
+ export interface IAgentCreationOptions {
111
+ /** Override default configuration */
112
+ overrides?: Partial<IAgentConfig>;
113
+ /** Validation options */
114
+ validation?: {
115
+ strict?: boolean;
116
+ skipOptional?: boolean;
117
+ };
118
+ /** Additional metadata */
119
+ metadata?: TAgentCreationMetadata;
120
+ }
121
+ /**
122
+ * Agent Factory interface for agent creation and configuration
123
+ */
124
+ export interface IAgentFactory {
125
+ /**
126
+ * Create agent instance
127
+ */
128
+ createAgent(config: IAgentConfig, options?: IAgentCreationOptions): IAgent<IAgentConfig>;
129
+ /**
130
+ * Validate agent configuration
131
+ */
132
+ validateConfig(config: IAgentConfig): IConfigValidationResult;
133
+ /**
134
+ * Get default configuration
135
+ */
136
+ getDefaultConfig(): IAgentConfig;
137
+ /**
138
+ * Merge configurations
139
+ */
140
+ mergeConfig(base: IAgentConfig, override: Partial<IAgentConfig>): IAgentConfig;
141
+ }
142
+ //# sourceMappingURL=manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/interfaces/manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,qBAAqB,E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GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAEzF;;OAEG;IACH,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,uBAAuB,CAAC;IAE9D;;OAEG;IACH,gBAAgB,IAAI,YAAY,CAAC;IAEjC;;OAEG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG,YAAY,CAAC;CAClF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=manager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/interfaces/manager.ts"],"names":[],"mappings":""}