@ductape/sdk 0.1.6 → 0.1.8

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 (973) hide show
  1. package/package.json +5 -9
  2. package/dist/agents/agent-context.d.ts +0 -100
  3. package/dist/agents/agent-context.js +0 -604
  4. package/dist/agents/agent-context.js.map +0 -1
  5. package/dist/agents/agent-executor.d.ts +0 -180
  6. package/dist/agents/agent-executor.js +0 -715
  7. package/dist/agents/agent-executor.js.map +0 -1
  8. package/dist/agents/agents.service.d.ts +0 -310
  9. package/dist/agents/agents.service.js +0 -1255
  10. package/dist/agents/agents.service.js.map +0 -1
  11. package/dist/agents/index.d.ts +0 -55
  12. package/dist/agents/index.js +0 -110
  13. package/dist/agents/index.js.map +0 -1
  14. package/dist/agents/memory-manager.d.ts +0 -182
  15. package/dist/agents/memory-manager.js +0 -383
  16. package/dist/agents/memory-manager.js.map +0 -1
  17. package/dist/agents/tool-registry.d.ts +0 -141
  18. package/dist/agents/tool-registry.js +0 -355
  19. package/dist/agents/tool-registry.js.map +0 -1
  20. package/dist/agents/types/agents.types.d.ts +0 -1240
  21. package/dist/agents/types/agents.types.js +0 -12
  22. package/dist/agents/types/agents.types.js.map +0 -1
  23. package/dist/agents/types/index.d.ts +0 -6
  24. package/dist/agents/types/index.js +0 -23
  25. package/dist/agents/types/index.js.map +0 -1
  26. package/dist/agents/vector-store-adapter.d.ts +0 -108
  27. package/dist/agents/vector-store-adapter.js +0 -213
  28. package/dist/agents/vector-store-adapter.js.map +0 -1
  29. package/dist/api/services/appApi.service.d.ts +0 -78
  30. package/dist/api/services/appApi.service.js +0 -303
  31. package/dist/api/services/appApi.service.js.map +0 -1
  32. package/dist/api/services/logsApi.service.d.ts +0 -62
  33. package/dist/api/services/logsApi.service.js +0 -67
  34. package/dist/api/services/logsApi.service.js.map +0 -1
  35. package/dist/api/services/pricingApi.service.d.ts +0 -10
  36. package/dist/api/services/pricingApi.service.js +0 -34
  37. package/dist/api/services/pricingApi.service.js.map +0 -1
  38. package/dist/api/services/processorApi.service.d.ts +0 -927
  39. package/dist/api/services/processorApi.service.js +0 -787
  40. package/dist/api/services/processorApi.service.js.map +0 -1
  41. package/dist/api/services/productsApi.service.d.ts +0 -150
  42. package/dist/api/services/productsApi.service.js +0 -279
  43. package/dist/api/services/productsApi.service.js.map +0 -1
  44. package/dist/api/services/resilienceApi.service.d.ts +0 -106
  45. package/dist/api/services/resilienceApi.service.js +0 -224
  46. package/dist/api/services/resilienceApi.service.js.map +0 -1
  47. package/dist/api/services/secretsApi.service.d.ts +0 -51
  48. package/dist/api/services/secretsApi.service.js +0 -126
  49. package/dist/api/services/secretsApi.service.js.map +0 -1
  50. package/dist/api/services/userApi.service.d.ts +0 -10
  51. package/dist/api/services/userApi.service.js +0 -20
  52. package/dist/api/services/userApi.service.js.map +0 -1
  53. package/dist/api/services/webhooksApi.service.d.ts +0 -14
  54. package/dist/api/services/webhooksApi.service.js +0 -65
  55. package/dist/api/services/webhooksApi.service.js.map +0 -1
  56. package/dist/api/services/workflowApi.service.d.ts +0 -199
  57. package/dist/api/services/workflowApi.service.js +0 -201
  58. package/dist/api/services/workflowApi.service.js.map +0 -1
  59. package/dist/api/services/workspaceApi.service.d.ts +0 -20
  60. package/dist/api/services/workspaceApi.service.js +0 -54
  61. package/dist/api/services/workspaceApi.service.js.map +0 -1
  62. package/dist/api/urls.d.ts +0 -136
  63. package/dist/api/urls.js +0 -185
  64. package/dist/api/urls.js.map +0 -1
  65. package/dist/api/utils/auth.utils.d.ts +0 -10
  66. package/dist/api/utils/auth.utils.js +0 -24
  67. package/dist/api/utils/auth.utils.js.map +0 -1
  68. package/dist/api/utils/cache.utils.d.ts +0 -3
  69. package/dist/api/utils/cache.utils.js +0 -18
  70. package/dist/api/utils/cache.utils.js.map +0 -1
  71. package/dist/api/utils/strings.utils.d.ts +0 -7
  72. package/dist/api/utils/strings.utils.js +0 -64
  73. package/dist/api/utils/strings.utils.js.map +0 -1
  74. package/dist/apps/services/app.service.d.ts +0 -126
  75. package/dist/apps/services/app.service.js +0 -1436
  76. package/dist/apps/services/app.service.js.map +0 -1
  77. package/dist/apps/utils/auth-context-manager.d.ts +0 -137
  78. package/dist/apps/utils/auth-context-manager.js +0 -248
  79. package/dist/apps/utils/auth-context-manager.js.map +0 -1
  80. package/dist/apps/utils/credential-manager.d.ts +0 -128
  81. package/dist/apps/utils/credential-manager.js +0 -199
  82. package/dist/apps/utils/credential-manager.js.map +0 -1
  83. package/dist/apps/utils/index.d.ts +0 -10
  84. package/dist/apps/utils/index.js +0 -54
  85. package/dist/apps/utils/index.js.map +0 -1
  86. package/dist/apps/utils/input-helpers.d.ts +0 -67
  87. package/dist/apps/utils/input-helpers.js +0 -185
  88. package/dist/apps/utils/input-helpers.js.map +0 -1
  89. package/dist/apps/utils/input-resolver.d.ts +0 -165
  90. package/dist/apps/utils/input-resolver.js +0 -477
  91. package/dist/apps/utils/input-resolver.js.map +0 -1
  92. package/dist/apps/utils/oauth-manager.d.ts +0 -196
  93. package/dist/apps/utils/oauth-manager.js +0 -429
  94. package/dist/apps/utils/oauth-manager.js.map +0 -1
  95. package/dist/apps/utils/objects.utils.d.ts +0 -4
  96. package/dist/apps/utils/objects.utils.js +0 -59
  97. package/dist/apps/utils/objects.utils.js.map +0 -1
  98. package/dist/apps/utils/string.utils.d.ts +0 -9
  99. package/dist/apps/utils/string.utils.js +0 -89
  100. package/dist/apps/utils/string.utils.js.map +0 -1
  101. package/dist/apps/validators/index.d.ts +0 -17
  102. package/dist/apps/validators/index.js +0 -39
  103. package/dist/apps/validators/index.js.map +0 -1
  104. package/dist/apps/validators/joi-validators/create.app.validator.d.ts +0 -3
  105. package/dist/apps/validators/joi-validators/create.app.validator.js +0 -43
  106. package/dist/apps/validators/joi-validators/create.app.validator.js.map +0 -1
  107. package/dist/apps/validators/joi-validators/create.appAction.validator.d.ts +0 -3
  108. package/dist/apps/validators/joi-validators/create.appAction.validator.js +0 -72
  109. package/dist/apps/validators/joi-validators/create.appAction.validator.js.map +0 -1
  110. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.d.ts +0 -7
  111. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js +0 -81
  112. package/dist/apps/validators/joi-validators/create.appActionResponse.validator.js.map +0 -1
  113. package/dist/apps/validators/joi-validators/create.appAuth.validator.d.ts +0 -3
  114. package/dist/apps/validators/joi-validators/create.appAuth.validator.js +0 -64
  115. package/dist/apps/validators/joi-validators/create.appAuth.validator.js.map +0 -1
  116. package/dist/apps/validators/joi-validators/create.appBody.validators.d.ts +0 -4
  117. package/dist/apps/validators/joi-validators/create.appBody.validators.js +0 -44
  118. package/dist/apps/validators/joi-validators/create.appBody.validators.js.map +0 -1
  119. package/dist/apps/validators/joi-validators/create.appConstants.validator.d.ts +0 -4
  120. package/dist/apps/validators/joi-validators/create.appConstants.validator.js +0 -45
  121. package/dist/apps/validators/joi-validators/create.appConstants.validator.js.map +0 -1
  122. package/dist/apps/validators/joi-validators/create.appEnv.validator.d.ts +0 -4
  123. package/dist/apps/validators/joi-validators/create.appEnv.validator.js +0 -50
  124. package/dist/apps/validators/joi-validators/create.appEnv.validator.js.map +0 -1
  125. package/dist/apps/validators/joi-validators/create.appVariable.validator.d.ts +0 -4
  126. package/dist/apps/validators/joi-validators/create.appVariable.validator.js +0 -47
  127. package/dist/apps/validators/joi-validators/create.appVariable.validator.js.map +0 -1
  128. package/dist/apps/validators/joi-validators/create.appWebhook.validator.d.ts +0 -4
  129. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js +0 -60
  130. package/dist/apps/validators/joi-validators/create.appWebhook.validator.js.map +0 -1
  131. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.d.ts +0 -3
  132. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js +0 -48
  133. package/dist/apps/validators/joi-validators/create.appWebhookEvent.validator.js.map +0 -1
  134. package/dist/apps/validators/joi-validators/sample.validator.d.ts +0 -6
  135. package/dist/apps/validators/joi-validators/sample.validator.js +0 -65
  136. package/dist/apps/validators/joi-validators/sample.validator.js.map +0 -1
  137. package/dist/apps/validators/joi-validators/update.app.validator.d.ts +0 -4
  138. package/dist/apps/validators/joi-validators/update.app.validator.js +0 -66
  139. package/dist/apps/validators/joi-validators/update.app.validator.js.map +0 -1
  140. package/dist/apps/validators/joi-validators/update.appAction.validator.d.ts +0 -4
  141. package/dist/apps/validators/joi-validators/update.appAction.validator.js +0 -76
  142. package/dist/apps/validators/joi-validators/update.appAction.validator.js.map +0 -1
  143. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.d.ts +0 -3
  144. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js +0 -57
  145. package/dist/apps/validators/joi-validators/update.appActionResponse.validator.js.map +0 -1
  146. package/dist/apps/validators/joi-validators/update.appAuth.validator.d.ts +0 -4
  147. package/dist/apps/validators/joi-validators/update.appAuth.validator.js +0 -52
  148. package/dist/apps/validators/joi-validators/update.appAuth.validator.js.map +0 -1
  149. package/dist/apps/validators/joi-validators/update.appConstants.validator.d.ts +0 -4
  150. package/dist/apps/validators/joi-validators/update.appConstants.validator.js +0 -45
  151. package/dist/apps/validators/joi-validators/update.appConstants.validator.js.map +0 -1
  152. package/dist/apps/validators/joi-validators/update.appEnv.validator.d.ts +0 -4
  153. package/dist/apps/validators/joi-validators/update.appEnv.validator.js +0 -50
  154. package/dist/apps/validators/joi-validators/update.appEnv.validator.js.map +0 -1
  155. package/dist/apps/validators/joi-validators/update.appVariables.validator.d.ts +0 -4
  156. package/dist/apps/validators/joi-validators/update.appVariables.validator.js +0 -47
  157. package/dist/apps/validators/joi-validators/update.appVariables.validator.js.map +0 -1
  158. package/dist/apps/validators/joi-validators/update.appWebhook.validator.d.ts +0 -4
  159. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js +0 -59
  160. package/dist/apps/validators/joi-validators/update.appWebhook.validator.js.map +0 -1
  161. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.d.ts +0 -3
  162. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js +0 -48
  163. package/dist/apps/validators/joi-validators/update.appWebhookEvent.validator.js.map +0 -1
  164. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.d.ts +0 -3
  165. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js +0 -60
  166. package/dist/apps/validators/joi-validators/update.validation.entityData.validator.js.map +0 -1
  167. package/dist/bin.d.ts +0 -26
  168. package/dist/bin.js +0 -28
  169. package/dist/bin.js.map +0 -1
  170. package/dist/brokers/brokers.service.d.ts +0 -438
  171. package/dist/brokers/brokers.service.js +0 -1294
  172. package/dist/brokers/brokers.service.js.map +0 -1
  173. package/dist/brokers/index.d.ts +0 -46
  174. package/dist/brokers/index.js +0 -83
  175. package/dist/brokers/index.js.map +0 -1
  176. package/dist/brokers/types/index.d.ts +0 -569
  177. package/dist/brokers/types/index.js +0 -8
  178. package/dist/brokers/types/index.js.map +0 -1
  179. package/dist/brokers/utils/broker.util.d.ts +0 -33
  180. package/dist/brokers/utils/broker.util.js +0 -125
  181. package/dist/brokers/utils/broker.util.js.map +0 -1
  182. package/dist/brokers/utils/providers/aws-sqs.service.d.ts +0 -16
  183. package/dist/brokers/utils/providers/aws-sqs.service.js +0 -71
  184. package/dist/brokers/utils/providers/aws-sqs.service.js.map +0 -1
  185. package/dist/brokers/utils/providers/google-pubsub.service.d.ts +0 -16
  186. package/dist/brokers/utils/providers/google-pubsub.service.js +0 -43
  187. package/dist/brokers/utils/providers/google-pubsub.service.js.map +0 -1
  188. package/dist/brokers/utils/providers/index.d.ts +0 -6
  189. package/dist/brokers/utils/providers/index.js +0 -16
  190. package/dist/brokers/utils/providers/index.js.map +0 -1
  191. package/dist/brokers/utils/providers/kafka.service.d.ts +0 -23
  192. package/dist/brokers/utils/providers/kafka.service.js +0 -131
  193. package/dist/brokers/utils/providers/kafka.service.js.map +0 -1
  194. package/dist/brokers/utils/providers/nats.service.d.ts +0 -18
  195. package/dist/brokers/utils/providers/nats.service.js +0 -63
  196. package/dist/brokers/utils/providers/nats.service.js.map +0 -1
  197. package/dist/brokers/utils/providers/rabbitmq.service.d.ts +0 -25
  198. package/dist/brokers/utils/providers/rabbitmq.service.js +0 -138
  199. package/dist/brokers/utils/providers/rabbitmq.service.js.map +0 -1
  200. package/dist/brokers/utils/providers/redis.service.d.ts +0 -18
  201. package/dist/brokers/utils/providers/redis.service.js +0 -93
  202. package/dist/brokers/utils/providers/redis.service.js.map +0 -1
  203. package/dist/cache/cache.manager.d.ts +0 -308
  204. package/dist/cache/cache.manager.js +0 -900
  205. package/dist/cache/cache.manager.js.map +0 -1
  206. package/dist/cache/cache.service.d.ts +0 -192
  207. package/dist/cache/cache.service.js +0 -596
  208. package/dist/cache/cache.service.js.map +0 -1
  209. package/dist/cache/index.d.ts +0 -52
  210. package/dist/cache/index.js +0 -81
  211. package/dist/cache/index.js.map +0 -1
  212. package/dist/cache/types/index.d.ts +0 -112
  213. package/dist/cache/types/index.js +0 -6
  214. package/dist/cache/types/index.js.map +0 -1
  215. package/dist/clients/apps.client.d.ts +0 -4
  216. package/dist/clients/apps.client.js +0 -31
  217. package/dist/clients/apps.client.js.map +0 -1
  218. package/dist/clients/email.client.d.ts +0 -4
  219. package/dist/clients/email.client.js +0 -29
  220. package/dist/clients/email.client.js.map +0 -1
  221. package/dist/clients/expo.client.d.ts +0 -3
  222. package/dist/clients/expo.client.js +0 -28
  223. package/dist/clients/expo.client.js.map +0 -1
  224. package/dist/clients/function.client.d.ts +0 -3
  225. package/dist/clients/function.client.js +0 -27
  226. package/dist/clients/function.client.js.map +0 -1
  227. package/dist/clients/http.client.d.ts +0 -3
  228. package/dist/clients/http.client.js +0 -27
  229. package/dist/clients/http.client.js.map +0 -1
  230. package/dist/clients/logs.client.d.ts +0 -4
  231. package/dist/clients/logs.client.js +0 -34
  232. package/dist/clients/logs.client.js.map +0 -1
  233. package/dist/clients/pricing.client.d.ts +0 -4
  234. package/dist/clients/pricing.client.js +0 -34
  235. package/dist/clients/pricing.client.js.map +0 -1
  236. package/dist/clients/products.client.d.ts +0 -3
  237. package/dist/clients/products.client.js +0 -32
  238. package/dist/clients/products.client.js.map +0 -1
  239. package/dist/clients/users.client.d.ts +0 -4
  240. package/dist/clients/users.client.js +0 -34
  241. package/dist/clients/users.client.js.map +0 -1
  242. package/dist/clients/webhooks.client.d.ts +0 -4
  243. package/dist/clients/webhooks.client.js +0 -34
  244. package/dist/clients/webhooks.client.js.map +0 -1
  245. package/dist/clients/workspace.client.d.ts +0 -7
  246. package/dist/clients/workspace.client.js +0 -39
  247. package/dist/clients/workspace.client.js.map +0 -1
  248. package/dist/database/actions/action-manager.d.ts +0 -170
  249. package/dist/database/actions/action-manager.js +0 -465
  250. package/dist/database/actions/action-manager.js.map +0 -1
  251. package/dist/database/actions/index.d.ts +0 -6
  252. package/dist/database/actions/index.js +0 -13
  253. package/dist/database/actions/index.js.map +0 -1
  254. package/dist/database/adapters/adapter.factory.d.ts +0 -62
  255. package/dist/database/adapters/adapter.factory.js +0 -97
  256. package/dist/database/adapters/adapter.factory.js.map +0 -1
  257. package/dist/database/adapters/base.adapter.d.ts +0 -423
  258. package/dist/database/adapters/base.adapter.js +0 -260
  259. package/dist/database/adapters/base.adapter.js.map +0 -1
  260. package/dist/database/adapters/cassandra.adapter.d.ts +0 -92
  261. package/dist/database/adapters/cassandra.adapter.js +0 -1091
  262. package/dist/database/adapters/cassandra.adapter.js.map +0 -1
  263. package/dist/database/adapters/dynamodb.adapter.d.ts +0 -110
  264. package/dist/database/adapters/dynamodb.adapter.js +0 -1564
  265. package/dist/database/adapters/dynamodb.adapter.js.map +0 -1
  266. package/dist/database/adapters/index.d.ts +0 -11
  267. package/dist/database/adapters/index.js +0 -27
  268. package/dist/database/adapters/index.js.map +0 -1
  269. package/dist/database/adapters/mariadb.adapter.d.ts +0 -100
  270. package/dist/database/adapters/mariadb.adapter.js +0 -247
  271. package/dist/database/adapters/mariadb.adapter.js.map +0 -1
  272. package/dist/database/adapters/mongodb.adapter.d.ts +0 -121
  273. package/dist/database/adapters/mongodb.adapter.js +0 -1284
  274. package/dist/database/adapters/mongodb.adapter.js.map +0 -1
  275. package/dist/database/adapters/mysql.adapter.d.ts +0 -86
  276. package/dist/database/adapters/mysql.adapter.js +0 -1371
  277. package/dist/database/adapters/mysql.adapter.js.map +0 -1
  278. package/dist/database/adapters/postgresql.adapter.d.ts +0 -90
  279. package/dist/database/adapters/postgresql.adapter.js +0 -1487
  280. package/dist/database/adapters/postgresql.adapter.js.map +0 -1
  281. package/dist/database/databases.service.d.ts +0 -1496
  282. package/dist/database/databases.service.js +0 -3294
  283. package/dist/database/databases.service.js.map +0 -1
  284. package/dist/database/index.d.ts +0 -46
  285. package/dist/database/index.js +0 -109
  286. package/dist/database/index.js.map +0 -1
  287. package/dist/database/migrations/index.d.ts +0 -6
  288. package/dist/database/migrations/index.js +0 -12
  289. package/dist/database/migrations/index.js.map +0 -1
  290. package/dist/database/migrations/migration-engine.d.ts +0 -136
  291. package/dist/database/migrations/migration-engine.js +0 -1421
  292. package/dist/database/migrations/migration-engine.js.map +0 -1
  293. package/dist/database/operators/aggregation-builder.d.ts +0 -67
  294. package/dist/database/operators/aggregation-builder.js +0 -841
  295. package/dist/database/operators/aggregation-builder.js.map +0 -1
  296. package/dist/database/operators/index.d.ts +0 -7
  297. package/dist/database/operators/index.js +0 -15
  298. package/dist/database/operators/index.js.map +0 -1
  299. package/dist/database/operators/query-builder.d.ts +0 -69
  300. package/dist/database/operators/query-builder.js +0 -447
  301. package/dist/database/operators/query-builder.js.map +0 -1
  302. package/dist/database/presave/decrypt.d.ts +0 -25
  303. package/dist/database/presave/decrypt.js +0 -146
  304. package/dist/database/presave/decrypt.js.map +0 -1
  305. package/dist/database/presave/index.d.ts +0 -9
  306. package/dist/database/presave/index.js +0 -18
  307. package/dist/database/presave/index.js.map +0 -1
  308. package/dist/database/presave/presave-processor.d.ts +0 -148
  309. package/dist/database/presave/presave-processor.js +0 -702
  310. package/dist/database/presave/presave-processor.js.map +0 -1
  311. package/dist/database/schema/index.d.ts +0 -7
  312. package/dist/database/schema/index.js +0 -13
  313. package/dist/database/schema/index.js.map +0 -1
  314. package/dist/database/schema/schema-manager.d.ts +0 -258
  315. package/dist/database/schema/schema-manager.js +0 -638
  316. package/dist/database/schema/schema-manager.js.map +0 -1
  317. package/dist/database/transactions/index.d.ts +0 -6
  318. package/dist/database/transactions/index.js +0 -13
  319. package/dist/database/transactions/index.js.map +0 -1
  320. package/dist/database/transactions/transaction-manager.d.ts +0 -113
  321. package/dist/database/transactions/transaction-manager.js +0 -344
  322. package/dist/database/transactions/transaction-manager.js.map +0 -1
  323. package/dist/database/triggers/index.d.ts +0 -7
  324. package/dist/database/triggers/index.js +0 -14
  325. package/dist/database/triggers/index.js.map +0 -1
  326. package/dist/database/triggers/trigger-processor.d.ts +0 -239
  327. package/dist/database/triggers/trigger-processor.js +0 -1034
  328. package/dist/database/triggers/trigger-processor.js.map +0 -1
  329. package/dist/database/types/action.interface.d.ts +0 -148
  330. package/dist/database/types/action.interface.js +0 -6
  331. package/dist/database/types/action.interface.js.map +0 -1
  332. package/dist/database/types/aggregation.interface.d.ts +0 -185
  333. package/dist/database/types/aggregation.interface.js +0 -6
  334. package/dist/database/types/aggregation.interface.js.map +0 -1
  335. package/dist/database/types/connection.interface.d.ts +0 -137
  336. package/dist/database/types/connection.interface.js +0 -6
  337. package/dist/database/types/connection.interface.js.map +0 -1
  338. package/dist/database/types/dashboard.interface.d.ts +0 -74
  339. package/dist/database/types/dashboard.interface.js +0 -7
  340. package/dist/database/types/dashboard.interface.js.map +0 -1
  341. package/dist/database/types/enums.d.ts +0 -195
  342. package/dist/database/types/enums.js +0 -244
  343. package/dist/database/types/enums.js.map +0 -1
  344. package/dist/database/types/index.d.ts +0 -15
  345. package/dist/database/types/index.js +0 -31
  346. package/dist/database/types/index.js.map +0 -1
  347. package/dist/database/types/migration.interface.d.ts +0 -686
  348. package/dist/database/types/migration.interface.js +0 -9
  349. package/dist/database/types/migration.interface.js.map +0 -1
  350. package/dist/database/types/presave.interface.d.ts +0 -292
  351. package/dist/database/types/presave.interface.js +0 -60
  352. package/dist/database/types/presave.interface.js.map +0 -1
  353. package/dist/database/types/query.interface.d.ts +0 -205
  354. package/dist/database/types/query.interface.js +0 -6
  355. package/dist/database/types/query.interface.js.map +0 -1
  356. package/dist/database/types/schema.interface.d.ts +0 -412
  357. package/dist/database/types/schema.interface.js +0 -6
  358. package/dist/database/types/schema.interface.js.map +0 -1
  359. package/dist/database/types/transaction.interface.d.ts +0 -84
  360. package/dist/database/types/transaction.interface.js +0 -6
  361. package/dist/database/types/transaction.interface.js.map +0 -1
  362. package/dist/database/types/trigger.interface.d.ts +0 -612
  363. package/dist/database/types/trigger.interface.js +0 -121
  364. package/dist/database/types/trigger.interface.js.map +0 -1
  365. package/dist/database/types/write.interface.d.ts +0 -216
  366. package/dist/database/types/write.interface.js +0 -6
  367. package/dist/database/types/write.interface.js.map +0 -1
  368. package/dist/database/utils/database-error.d.ts +0 -96
  369. package/dist/database/utils/database-error.js +0 -221
  370. package/dist/database/utils/database-error.js.map +0 -1
  371. package/dist/database/utils/index.d.ts +0 -6
  372. package/dist/database/utils/index.js +0 -11
  373. package/dist/database/utils/index.js.map +0 -1
  374. package/dist/graph/adapters/adapter.factory.d.ts +0 -47
  375. package/dist/graph/adapters/adapter.factory.js +0 -77
  376. package/dist/graph/adapters/adapter.factory.js.map +0 -1
  377. package/dist/graph/adapters/arangodb.adapter.d.ts +0 -86
  378. package/dist/graph/adapters/arangodb.adapter.js +0 -1588
  379. package/dist/graph/adapters/arangodb.adapter.js.map +0 -1
  380. package/dist/graph/adapters/base.adapter.d.ts +0 -264
  381. package/dist/graph/adapters/base.adapter.js +0 -156
  382. package/dist/graph/adapters/base.adapter.js.map +0 -1
  383. package/dist/graph/adapters/index.d.ts +0 -11
  384. package/dist/graph/adapters/index.js +0 -21
  385. package/dist/graph/adapters/index.js.map +0 -1
  386. package/dist/graph/adapters/memgraph.adapter.d.ts +0 -110
  387. package/dist/graph/adapters/memgraph.adapter.js +0 -1452
  388. package/dist/graph/adapters/memgraph.adapter.js.map +0 -1
  389. package/dist/graph/adapters/neo4j.adapter.d.ts +0 -81
  390. package/dist/graph/adapters/neo4j.adapter.js +0 -1317
  391. package/dist/graph/adapters/neo4j.adapter.js.map +0 -1
  392. package/dist/graph/adapters/neptune.adapter.d.ts +0 -82
  393. package/dist/graph/adapters/neptune.adapter.js +0 -1369
  394. package/dist/graph/adapters/neptune.adapter.js.map +0 -1
  395. package/dist/graph/graphs.service.d.ts +0 -617
  396. package/dist/graph/graphs.service.js +0 -2594
  397. package/dist/graph/graphs.service.js.map +0 -1
  398. package/dist/graph/index.d.ts +0 -57
  399. package/dist/graph/index.js +0 -77
  400. package/dist/graph/index.js.map +0 -1
  401. package/dist/graph/transactions/index.d.ts +0 -4
  402. package/dist/graph/transactions/index.js +0 -9
  403. package/dist/graph/transactions/index.js.map +0 -1
  404. package/dist/graph/transactions/transaction-manager.d.ts +0 -61
  405. package/dist/graph/transactions/transaction-manager.js +0 -126
  406. package/dist/graph/transactions/transaction-manager.js.map +0 -1
  407. package/dist/graph/types/connection.interface.d.ts +0 -149
  408. package/dist/graph/types/connection.interface.js +0 -9
  409. package/dist/graph/types/connection.interface.js.map +0 -1
  410. package/dist/graph/types/enums.d.ts +0 -101
  411. package/dist/graph/types/enums.js +0 -114
  412. package/dist/graph/types/enums.js.map +0 -1
  413. package/dist/graph/types/index.d.ts +0 -13
  414. package/dist/graph/types/index.js +0 -20
  415. package/dist/graph/types/index.js.map +0 -1
  416. package/dist/graph/types/node.interface.d.ts +0 -248
  417. package/dist/graph/types/node.interface.js +0 -9
  418. package/dist/graph/types/node.interface.js.map +0 -1
  419. package/dist/graph/types/query.interface.d.ts +0 -175
  420. package/dist/graph/types/query.interface.js +0 -9
  421. package/dist/graph/types/query.interface.js.map +0 -1
  422. package/dist/graph/types/relationship.interface.d.ts +0 -207
  423. package/dist/graph/types/relationship.interface.js +0 -9
  424. package/dist/graph/types/relationship.interface.js.map +0 -1
  425. package/dist/graph/types/schema.interface.d.ts +0 -295
  426. package/dist/graph/types/schema.interface.js +0 -9
  427. package/dist/graph/types/schema.interface.js.map +0 -1
  428. package/dist/graph/types/transaction.interface.d.ts +0 -55
  429. package/dist/graph/types/transaction.interface.js +0 -9
  430. package/dist/graph/types/transaction.interface.js.map +0 -1
  431. package/dist/graph/types/traversal.interface.d.ts +0 -181
  432. package/dist/graph/types/traversal.interface.js +0 -9
  433. package/dist/graph/types/traversal.interface.js.map +0 -1
  434. package/dist/graph/utils/graph-error.d.ts +0 -71
  435. package/dist/graph/utils/graph-error.js +0 -142
  436. package/dist/graph/utils/graph-error.js.map +0 -1
  437. package/dist/graph/utils/index.d.ts +0 -4
  438. package/dist/graph/utils/index.js +0 -9
  439. package/dist/graph/utils/index.js.map +0 -1
  440. package/dist/imports/imports.repo.d.ts +0 -0
  441. package/dist/imports/imports.repo.js +0 -1
  442. package/dist/imports/imports.repo.js.map +0 -1
  443. package/dist/imports/imports.service.d.ts +0 -23
  444. package/dist/imports/imports.service.js +0 -71
  445. package/dist/imports/imports.service.js.map +0 -1
  446. package/dist/imports/imports.types.d.ts +0 -350
  447. package/dist/imports/imports.types.js +0 -33
  448. package/dist/imports/imports.types.js.map +0 -1
  449. package/dist/imports/openAPI3.0.types.d.ts +0 -52
  450. package/dist/imports/openAPI3.0.types.js +0 -3
  451. package/dist/imports/openAPI3.0.types.js.map +0 -1
  452. package/dist/imports/repos/openApi.repo.d.ts +0 -6
  453. package/dist/imports/repos/openApi.repo.js +0 -422
  454. package/dist/imports/repos/openApi.repo.js.map +0 -1
  455. package/dist/imports/repos/postmanV21.repo.d.ts +0 -14
  456. package/dist/imports/repos/postmanV21.repo.js +0 -257
  457. package/dist/imports/repos/postmanV21.repo.js.map +0 -1
  458. package/dist/imports/utils/imports.utils.d.ts +0 -80
  459. package/dist/imports/utils/imports.utils.js +0 -114
  460. package/dist/imports/utils/imports.utils.js.map +0 -1
  461. package/dist/imports/validators/index.d.ts +0 -0
  462. package/dist/imports/validators/index.js +0 -1
  463. package/dist/imports/validators/index.js.map +0 -1
  464. package/dist/imports/validators/joi-validators/postmanV21.validator.d.ts +0 -5
  465. package/dist/imports/validators/joi-validators/postmanV21.validator.js +0 -96
  466. package/dist/imports/validators/joi-validators/postmanV21.validator.js.map +0 -1
  467. package/dist/index.d.ts +0 -4021
  468. package/dist/index.js +0 -5895
  469. package/dist/index.js.map +0 -1
  470. package/dist/init.interface.d.ts +0 -407
  471. package/dist/init.interface.js +0 -3
  472. package/dist/init.interface.js.map +0 -1
  473. package/dist/inputs/inputs.repo.d.ts +0 -7
  474. package/dist/inputs/inputs.repo.js +0 -16
  475. package/dist/inputs/inputs.repo.js.map +0 -1
  476. package/dist/inputs/inputs.service.d.ts +0 -61
  477. package/dist/inputs/inputs.service.js +0 -468
  478. package/dist/inputs/inputs.service.js.map +0 -1
  479. package/dist/inputs/utils/inputs.utils.create.d.ts +0 -11
  480. package/dist/inputs/utils/inputs.utils.create.js +0 -273
  481. package/dist/inputs/utils/inputs.utils.create.js.map +0 -1
  482. package/dist/inputs/validators/inputs.validator.parse.d.ts +0 -4
  483. package/dist/inputs/validators/inputs.validator.parse.js +0 -53
  484. package/dist/inputs/validators/inputs.validator.parse.js.map +0 -1
  485. package/dist/jobs/index.d.ts +0 -38
  486. package/dist/jobs/index.js +0 -50
  487. package/dist/jobs/index.js.map +0 -1
  488. package/dist/jobs/jobs.service.d.ts +0 -154
  489. package/dist/jobs/jobs.service.js +0 -491
  490. package/dist/jobs/jobs.service.js.map +0 -1
  491. package/dist/jobs/jobs.state.d.ts +0 -113
  492. package/dist/jobs/jobs.state.js +0 -447
  493. package/dist/jobs/jobs.state.js.map +0 -1
  494. package/dist/jobs/types.d.ts +0 -449
  495. package/dist/jobs/types.js +0 -74
  496. package/dist/jobs/types.js.map +0 -1
  497. package/dist/logs/logs.repo.d.ts +0 -6
  498. package/dist/logs/logs.repo.js +0 -12
  499. package/dist/logs/logs.repo.js.map +0 -1
  500. package/dist/logs/logs.service.d.ts +0 -30
  501. package/dist/logs/logs.service.js +0 -89
  502. package/dist/logs/logs.service.js.map +0 -1
  503. package/dist/logs/logs.types.d.ts +0 -85
  504. package/dist/logs/logs.types.js +0 -52
  505. package/dist/logs/logs.types.js.map +0 -1
  506. package/dist/logs/utils/logs.utils.create.d.ts +0 -0
  507. package/dist/logs/utils/logs.utils.create.js +0 -1
  508. package/dist/logs/utils/logs.utils.create.js.map +0 -1
  509. package/dist/logs/utils/logs.utils.errors.d.ts +0 -2
  510. package/dist/logs/utils/logs.utils.errors.js +0 -8
  511. package/dist/logs/utils/logs.utils.errors.js.map +0 -1
  512. package/dist/models/index.d.ts +0 -6
  513. package/dist/models/index.js +0 -11
  514. package/dist/models/index.js.map +0 -1
  515. package/dist/models/models.service.d.ts +0 -137
  516. package/dist/models/models.service.js +0 -195
  517. package/dist/models/models.service.js.map +0 -1
  518. package/dist/notifications/index.d.ts +0 -13
  519. package/dist/notifications/index.js +0 -26
  520. package/dist/notifications/index.js.map +0 -1
  521. package/dist/notifications/notifications.service.d.ts +0 -268
  522. package/dist/notifications/notifications.service.js +0 -907
  523. package/dist/notifications/notifications.service.js.map +0 -1
  524. package/dist/notifications/types/index.d.ts +0 -4
  525. package/dist/notifications/types/index.js +0 -21
  526. package/dist/notifications/types/index.js.map +0 -1
  527. package/dist/notifications/types/notifications.types.d.ts +0 -454
  528. package/dist/notifications/types/notifications.types.js +0 -51
  529. package/dist/notifications/types/notifications.types.js.map +0 -1
  530. package/dist/parsers/index.d.ts +0 -3
  531. package/dist/parsers/index.js +0 -27
  532. package/dist/parsers/index.js.map +0 -1
  533. package/dist/parsers/pipelines/postman.pipelines.d.ts +0 -15
  534. package/dist/parsers/pipelines/postman.pipelines.js +0 -103
  535. package/dist/parsers/pipelines/postman.pipelines.js.map +0 -1
  536. package/dist/parsers/types/postman.types.d.ts +0 -200
  537. package/dist/parsers/types/postman.types.js +0 -3
  538. package/dist/parsers/types/postman.types.js.map +0 -1
  539. package/dist/parsers/utils/postman.utils.d.ts +0 -12
  540. package/dist/parsers/utils/postman.utils.js +0 -116
  541. package/dist/parsers/utils/postman.utils.js.map +0 -1
  542. package/dist/parsers/validators/postman-auth.validators.d.ts +0 -10
  543. package/dist/parsers/validators/postman-auth.validators.js +0 -127
  544. package/dist/parsers/validators/postman-auth.validators.js.map +0 -1
  545. package/dist/parsers/validators/postman-request.validators.d.ts +0 -13
  546. package/dist/parsers/validators/postman-request.validators.js +0 -139
  547. package/dist/parsers/validators/postman-request.validators.js.map +0 -1
  548. package/dist/parsers/validators/postman-response.validators.d.ts +0 -13
  549. package/dist/parsers/validators/postman-response.validators.js +0 -150
  550. package/dist/parsers/validators/postman-response.validators.js.map +0 -1
  551. package/dist/parsers/validators/postman-variable.validators.d.ts +0 -14
  552. package/dist/parsers/validators/postman-variable.validators.js +0 -163
  553. package/dist/parsers/validators/postman-variable.validators.js.map +0 -1
  554. package/dist/pricing/pricing.repo.d.ts +0 -0
  555. package/dist/pricing/pricing.repo.js +0 -1
  556. package/dist/pricing/pricing.repo.js.map +0 -1
  557. package/dist/pricing/pricing.service.d.ts +0 -24
  558. package/dist/pricing/pricing.service.js +0 -51
  559. package/dist/pricing/pricing.service.js.map +0 -1
  560. package/dist/pricing/pricing.types.d.ts +0 -76
  561. package/dist/pricing/pricing.types.js +0 -21
  562. package/dist/pricing/pricing.types.js.map +0 -1
  563. package/dist/pricing/utils/string.utils.d.ts +0 -1
  564. package/dist/pricing/utils/string.utils.js +0 -9
  565. package/dist/pricing/utils/string.utils.js.map +0 -1
  566. package/dist/processor/repos/mongo.repo.d.ts +0 -39
  567. package/dist/processor/repos/mongo.repo.js +0 -260
  568. package/dist/processor/repos/mongo.repo.js.map +0 -1
  569. package/dist/processor/repos/postgres.repo.d.ts +0 -31
  570. package/dist/processor/repos/postgres.repo.js +0 -185
  571. package/dist/processor/repos/postgres.repo.js.map +0 -1
  572. package/dist/processor/repos/sms.repo.d.ts +0 -39
  573. package/dist/processor/repos/sms.repo.js +0 -124
  574. package/dist/processor/repos/sms.repo.js.map +0 -1
  575. package/dist/processor/services/processor.service.d.ts +0 -465
  576. package/dist/processor/services/processor.service.js +0 -5343
  577. package/dist/processor/services/processor.service.js.map +0 -1
  578. package/dist/processor/services/request.service.d.ts +0 -36
  579. package/dist/processor/services/request.service.js +0 -304
  580. package/dist/processor/services/request.service.js.map +0 -1
  581. package/dist/processor/types/request.types.d.ts +0 -14
  582. package/dist/processor/types/request.types.js +0 -3
  583. package/dist/processor/types/request.types.js.map +0 -1
  584. package/dist/processor/utils/processor.utils.d.ts +0 -104
  585. package/dist/processor/utils/processor.utils.js +0 -1066
  586. package/dist/processor/utils/processor.utils.js.map +0 -1
  587. package/dist/processor/utils/request.utils.d.ts +0 -20
  588. package/dist/processor/utils/request.utils.js +0 -113
  589. package/dist/processor/utils/request.utils.js.map +0 -1
  590. package/dist/processor/utils/storage.util.d.ts +0 -8
  591. package/dist/processor/utils/storage.util.js +0 -106
  592. package/dist/processor/utils/storage.util.js.map +0 -1
  593. package/dist/products/services/products.service.d.ts +0 -577
  594. package/dist/products/services/products.service.js +0 -5845
  595. package/dist/products/services/products.service.js.map +0 -1
  596. package/dist/products/utils/crypt.utils.d.ts +0 -1
  597. package/dist/products/utils/crypt.utils.js +0 -17
  598. package/dist/products/utils/crypt.utils.js.map +0 -1
  599. package/dist/products/utils/functions.utils.d.ts +0 -13
  600. package/dist/products/utils/functions.utils.js +0 -294
  601. package/dist/products/utils/functions.utils.js.map +0 -1
  602. package/dist/products/utils/objects.utils.d.ts +0 -13
  603. package/dist/products/utils/objects.utils.js +0 -89
  604. package/dist/products/utils/objects.utils.js.map +0 -1
  605. package/dist/products/utils/string.utils.d.ts +0 -12
  606. package/dist/products/utils/string.utils.js +0 -168
  607. package/dist/products/utils/string.utils.js.map +0 -1
  608. package/dist/products/validators/index.d.ts +0 -33
  609. package/dist/products/validators/index.js +0 -75
  610. package/dist/products/validators/index.js.map +0 -1
  611. package/dist/products/validators/joi-validators/create.html.validator.d.ts +0 -2
  612. package/dist/products/validators/joi-validators/create.html.validator.js +0 -55
  613. package/dist/products/validators/joi-validators/create.html.validator.js.map +0 -1
  614. package/dist/products/validators/joi-validators/create.productAgent.validator.d.ts +0 -3
  615. package/dist/products/validators/joi-validators/create.productAgent.validator.js +0 -266
  616. package/dist/products/validators/joi-validators/create.productAgent.validator.js.map +0 -1
  617. package/dist/products/validators/joi-validators/create.productApp.validator.d.ts +0 -4
  618. package/dist/products/validators/joi-validators/create.productApp.validator.js +0 -61
  619. package/dist/products/validators/joi-validators/create.productApp.validator.js.map +0 -1
  620. package/dist/products/validators/joi-validators/create.productCache.validator.d.ts +0 -3
  621. package/dist/products/validators/joi-validators/create.productCache.validator.js +0 -46
  622. package/dist/products/validators/joi-validators/create.productCache.validator.js.map +0 -1
  623. package/dist/products/validators/joi-validators/create.productDatabase.validator.d.ts +0 -3
  624. package/dist/products/validators/joi-validators/create.productDatabase.validator.js +0 -77
  625. package/dist/products/validators/joi-validators/create.productDatabase.validator.js.map +0 -1
  626. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.d.ts +0 -7
  627. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js +0 -194
  628. package/dist/products/validators/joi-validators/create.productDatabaseAction.validator.js.map +0 -1
  629. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.d.ts +0 -4
  630. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js +0 -63
  631. package/dist/products/validators/joi-validators/create.productDatabaseMigration.validator.js.map +0 -1
  632. package/dist/products/validators/joi-validators/create.productEnv.validator.d.ts +0 -3
  633. package/dist/products/validators/joi-validators/create.productEnv.validator.js +0 -45
  634. package/dist/products/validators/joi-validators/create.productEnv.validator.js.map +0 -1
  635. package/dist/products/validators/joi-validators/create.productFallback.validator.d.ts +0 -3
  636. package/dist/products/validators/joi-validators/create.productFallback.validator.js +0 -64
  637. package/dist/products/validators/joi-validators/create.productFallback.validator.js.map +0 -1
  638. package/dist/products/validators/joi-validators/create.productFeature.validator.d.ts +0 -14
  639. package/dist/products/validators/joi-validators/create.productFeature.validator.js +0 -140
  640. package/dist/products/validators/joi-validators/create.productFeature.validator.js.map +0 -1
  641. package/dist/products/validators/joi-validators/create.productFunction.validator.d.ts +0 -3
  642. package/dist/products/validators/joi-validators/create.productFunction.validator.js +0 -57
  643. package/dist/products/validators/joi-validators/create.productFunction.validator.js.map +0 -1
  644. package/dist/products/validators/joi-validators/create.productGraph.validator.d.ts +0 -3
  645. package/dist/products/validators/joi-validators/create.productGraph.validator.js +0 -89
  646. package/dist/products/validators/joi-validators/create.productGraph.validator.js.map +0 -1
  647. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.d.ts +0 -4
  648. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js +0 -58
  649. package/dist/products/validators/joi-validators/create.productHealthcheck.validator.js.map +0 -1
  650. package/dist/products/validators/joi-validators/create.productJob.validator.d.ts +0 -12
  651. package/dist/products/validators/joi-validators/create.productJob.validator.js +0 -60
  652. package/dist/products/validators/joi-validators/create.productJob.validator.js.map +0 -1
  653. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.d.ts +0 -3
  654. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js +0 -52
  655. package/dist/products/validators/joi-validators/create.productMessageBrokerTopic.validator.js.map +0 -1
  656. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.d.ts +0 -3
  657. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js +0 -193
  658. package/dist/products/validators/joi-validators/create.productMessageBrokers.validator.js.map +0 -1
  659. package/dist/products/validators/joi-validators/create.productModel.validator.d.ts +0 -3
  660. package/dist/products/validators/joi-validators/create.productModel.validator.js +0 -132
  661. package/dist/products/validators/joi-validators/create.productModel.validator.js.map +0 -1
  662. package/dist/products/validators/joi-validators/create.productNotification.validator.d.ts +0 -4
  663. package/dist/products/validators/joi-validators/create.productNotification.validator.js +0 -241
  664. package/dist/products/validators/joi-validators/create.productNotification.validator.js.map +0 -1
  665. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.d.ts +0 -3
  666. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js +0 -57
  667. package/dist/products/validators/joi-validators/create.productNotificationMessage.validator.js.map +0 -1
  668. package/dist/products/validators/joi-validators/create.productNotifications.validator.d.ts +0 -0
  669. package/dist/products/validators/joi-validators/create.productNotifications.validator.js +0 -1
  670. package/dist/products/validators/joi-validators/create.productNotifications.validator.js.map +0 -1
  671. package/dist/products/validators/joi-validators/create.productQuota.validator.d.ts +0 -3
  672. package/dist/products/validators/joi-validators/create.productQuota.validator.js +0 -67
  673. package/dist/products/validators/joi-validators/create.productQuota.validator.js.map +0 -1
  674. package/dist/products/validators/joi-validators/create.productStorage.validator.d.ts +0 -3
  675. package/dist/products/validators/joi-validators/create.productStorage.validator.js +0 -158
  676. package/dist/products/validators/joi-validators/create.productStorage.validator.js.map +0 -1
  677. package/dist/products/validators/joi-validators/create.productVector.validator.d.ts +0 -3
  678. package/dist/products/validators/joi-validators/create.productVector.validator.js +0 -136
  679. package/dist/products/validators/joi-validators/create.productVector.validator.js.map +0 -1
  680. package/dist/products/validators/joi-validators/create.products.validator.d.ts +0 -3
  681. package/dist/products/validators/joi-validators/create.products.validator.js +0 -43
  682. package/dist/products/validators/joi-validators/create.products.validator.js.map +0 -1
  683. package/dist/products/validators/joi-validators/create.requestAction.validator.d.ts +0 -2
  684. package/dist/products/validators/joi-validators/create.requestAction.validator.js +0 -45
  685. package/dist/products/validators/joi-validators/create.requestAction.validator.js.map +0 -1
  686. package/dist/products/validators/joi-validators/create.userAuth.validator.d.ts +0 -3
  687. package/dist/products/validators/joi-validators/create.userAuth.validator.js +0 -48
  688. package/dist/products/validators/joi-validators/create.userAuth.validator.js.map +0 -1
  689. package/dist/products/validators/joi-validators/register.productWebhooks.validator.d.ts +0 -3
  690. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js +0 -48
  691. package/dist/products/validators/joi-validators/register.productWebhooks.validator.js.map +0 -1
  692. package/dist/products/validators/joi-validators/update.dataValue.validator.d.ts +0 -3
  693. package/dist/products/validators/joi-validators/update.dataValue.validator.js +0 -103
  694. package/dist/products/validators/joi-validators/update.dataValue.validator.js.map +0 -1
  695. package/dist/products/validators/joi-validators/update.productApp.validator.d.ts +0 -3
  696. package/dist/products/validators/joi-validators/update.productApp.validator.js +0 -42
  697. package/dist/products/validators/joi-validators/update.productApp.validator.js.map +0 -1
  698. package/dist/products/validators/joi-validators/update.productCache.validator.d.ts +0 -3
  699. package/dist/products/validators/joi-validators/update.productCache.validator.js +0 -45
  700. package/dist/products/validators/joi-validators/update.productCache.validator.js.map +0 -1
  701. package/dist/products/validators/joi-validators/update.productDatabase.validator.d.ts +0 -3
  702. package/dist/products/validators/joi-validators/update.productDatabase.validator.js +0 -76
  703. package/dist/products/validators/joi-validators/update.productDatabase.validator.js.map +0 -1
  704. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.d.ts +0 -3
  705. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js +0 -79
  706. package/dist/products/validators/joi-validators/update.productDatabaseAction.validator.js.map +0 -1
  707. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.d.ts +0 -4
  708. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js +0 -64
  709. package/dist/products/validators/joi-validators/update.productDatabaseMigration.validator.js.map +0 -1
  710. package/dist/products/validators/joi-validators/update.productEnv.validator.d.ts +0 -3
  711. package/dist/products/validators/joi-validators/update.productEnv.validator.js +0 -46
  712. package/dist/products/validators/joi-validators/update.productEnv.validator.js.map +0 -1
  713. package/dist/products/validators/joi-validators/update.productFallback.validator.d.ts +0 -3
  714. package/dist/products/validators/joi-validators/update.productFallback.validator.js +0 -60
  715. package/dist/products/validators/joi-validators/update.productFallback.validator.js.map +0 -1
  716. package/dist/products/validators/joi-validators/update.productFeature.validator.d.ts +0 -3
  717. package/dist/products/validators/joi-validators/update.productFeature.validator.js +0 -53
  718. package/dist/products/validators/joi-validators/update.productFeature.validator.js.map +0 -1
  719. package/dist/products/validators/joi-validators/update.productFunction.validator.d.ts +0 -3
  720. package/dist/products/validators/joi-validators/update.productFunction.validator.js +0 -41
  721. package/dist/products/validators/joi-validators/update.productFunction.validator.js.map +0 -1
  722. package/dist/products/validators/joi-validators/update.productGraph.validator.d.ts +0 -3
  723. package/dist/products/validators/joi-validators/update.productGraph.validator.js +0 -88
  724. package/dist/products/validators/joi-validators/update.productGraph.validator.js.map +0 -1
  725. package/dist/products/validators/joi-validators/update.productJob.validator.d.ts +0 -3
  726. package/dist/products/validators/joi-validators/update.productJob.validator.js +0 -50
  727. package/dist/products/validators/joi-validators/update.productJob.validator.js.map +0 -1
  728. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.d.ts +0 -3
  729. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js +0 -52
  730. package/dist/products/validators/joi-validators/update.productMessageBrokerTopic.validator.js.map +0 -1
  731. package/dist/products/validators/joi-validators/update.productNotification.validator.d.ts +0 -3
  732. package/dist/products/validators/joi-validators/update.productNotification.validator.js +0 -47
  733. package/dist/products/validators/joi-validators/update.productNotification.validator.js.map +0 -1
  734. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.d.ts +0 -3
  735. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js +0 -58
  736. package/dist/products/validators/joi-validators/update.productNotificationMessage.validator.js.map +0 -1
  737. package/dist/products/validators/joi-validators/update.productQuota.validator.d.ts +0 -3
  738. package/dist/products/validators/joi-validators/update.productQuota.validator.js +0 -64
  739. package/dist/products/validators/joi-validators/update.productQuota.validator.js.map +0 -1
  740. package/dist/products/validators/joi-validators/update.userAuth.validator.d.ts +0 -3
  741. package/dist/products/validators/joi-validators/update.userAuth.validator.js +0 -48
  742. package/dist/products/validators/joi-validators/update.userAuth.validator.js.map +0 -1
  743. package/dist/resilience/fallback.service.d.ts +0 -141
  744. package/dist/resilience/fallback.service.js +0 -766
  745. package/dist/resilience/fallback.service.js.map +0 -1
  746. package/dist/resilience/healthcheck.service.d.ts +0 -163
  747. package/dist/resilience/healthcheck.service.js +0 -1012
  748. package/dist/resilience/healthcheck.service.js.map +0 -1
  749. package/dist/resilience/index.d.ts +0 -104
  750. package/dist/resilience/index.js +0 -140
  751. package/dist/resilience/index.js.map +0 -1
  752. package/dist/resilience/quota.service.d.ts +0 -83
  753. package/dist/resilience/quota.service.js +0 -518
  754. package/dist/resilience/quota.service.js.map +0 -1
  755. package/dist/resilience/resilience.service.d.ts +0 -98
  756. package/dist/resilience/resilience.service.js +0 -560
  757. package/dist/resilience/resilience.service.js.map +0 -1
  758. package/dist/resilience/types/index.d.ts +0 -513
  759. package/dist/resilience/types/index.js +0 -29
  760. package/dist/resilience/types/index.js.map +0 -1
  761. package/dist/secrets/index.d.ts +0 -10
  762. package/dist/secrets/index.js +0 -33
  763. package/dist/secrets/index.js.map +0 -1
  764. package/dist/secrets/secrets.resolver.d.ts +0 -52
  765. package/dist/secrets/secrets.resolver.js +0 -236
  766. package/dist/secrets/secrets.resolver.js.map +0 -1
  767. package/dist/secrets/secrets.service.d.ts +0 -93
  768. package/dist/secrets/secrets.service.js +0 -246
  769. package/dist/secrets/secrets.service.js.map +0 -1
  770. package/dist/secrets/secrets.types.d.ts +0 -188
  771. package/dist/secrets/secrets.types.js +0 -87
  772. package/dist/secrets/secrets.types.js.map +0 -1
  773. package/dist/sessions/index.d.ts +0 -50
  774. package/dist/sessions/index.js +0 -96
  775. package/dist/sessions/index.js.map +0 -1
  776. package/dist/sessions/sessions.helper.d.ts +0 -88
  777. package/dist/sessions/sessions.helper.js +0 -190
  778. package/dist/sessions/sessions.helper.js.map +0 -1
  779. package/dist/sessions/sessions.resolver.d.ts +0 -188
  780. package/dist/sessions/sessions.resolver.js +0 -603
  781. package/dist/sessions/sessions.resolver.js.map +0 -1
  782. package/dist/sessions/sessions.service.d.ts +0 -194
  783. package/dist/sessions/sessions.service.js +0 -988
  784. package/dist/sessions/sessions.service.js.map +0 -1
  785. package/dist/sessions/types/index.d.ts +0 -344
  786. package/dist/sessions/types/index.js +0 -6
  787. package/dist/sessions/types/index.js.map +0 -1
  788. package/dist/storage/index.d.ts +0 -66
  789. package/dist/storage/index.js +0 -99
  790. package/dist/storage/index.js.map +0 -1
  791. package/dist/storage/storage.service.d.ts +0 -177
  792. package/dist/storage/storage.service.js +0 -905
  793. package/dist/storage/storage.service.js.map +0 -1
  794. package/dist/storage/types/index.d.ts +0 -270
  795. package/dist/storage/types/index.js +0 -6
  796. package/dist/storage/types/index.js.map +0 -1
  797. package/dist/storage/utils/storage.util.d.ts +0 -62
  798. package/dist/storage/utils/storage.util.js +0 -593
  799. package/dist/storage/utils/storage.util.js.map +0 -1
  800. package/dist/types/actions.types.d.ts +0 -0
  801. package/dist/types/actions.types.js +0 -1
  802. package/dist/types/actions.types.js.map +0 -1
  803. package/dist/types/appBuilder.types.d.ts +0 -316
  804. package/dist/types/appBuilder.types.js +0 -3
  805. package/dist/types/appBuilder.types.js.map +0 -1
  806. package/dist/types/database.types.d.ts +0 -9
  807. package/dist/types/database.types.js +0 -3
  808. package/dist/types/database.types.js.map +0 -1
  809. package/dist/types/enums.d.ts +0 -231
  810. package/dist/types/enums.js +0 -261
  811. package/dist/types/enums.js.map +0 -1
  812. package/dist/types/index.d.ts +0 -12
  813. package/dist/types/index.js +0 -29
  814. package/dist/types/index.js.map +0 -1
  815. package/dist/types/index.types.d.ts +0 -30
  816. package/dist/types/index.types.js +0 -9
  817. package/dist/types/index.types.js.map +0 -1
  818. package/dist/types/inputs.types.d.ts +0 -114
  819. package/dist/types/inputs.types.js +0 -44
  820. package/dist/types/inputs.types.js.map +0 -1
  821. package/dist/types/logs.types.d.ts +0 -19
  822. package/dist/types/logs.types.js +0 -8
  823. package/dist/types/logs.types.js.map +0 -1
  824. package/dist/types/pricing.types.d.ts +0 -4
  825. package/dist/types/pricing.types.js +0 -3
  826. package/dist/types/pricing.types.js.map +0 -1
  827. package/dist/types/processor.types.d.ts +0 -602
  828. package/dist/types/processor.types.js +0 -19
  829. package/dist/types/processor.types.js.map +0 -1
  830. package/dist/types/productsBuilder.types.d.ts +0 -1566
  831. package/dist/types/productsBuilder.types.js +0 -303
  832. package/dist/types/productsBuilder.types.js.map +0 -1
  833. package/dist/types/request-tracker.interface.d.ts +0 -0
  834. package/dist/types/request-tracker.interface.js +0 -1
  835. package/dist/types/request-tracker.interface.js.map +0 -1
  836. package/dist/types/requests.types.d.ts +0 -8
  837. package/dist/types/requests.types.js +0 -3
  838. package/dist/types/requests.types.js.map +0 -1
  839. package/dist/types/workspaces.types.d.ts +0 -28
  840. package/dist/types/workspaces.types.js +0 -4
  841. package/dist/types/workspaces.types.js.map +0 -1
  842. package/dist/utils/constants.d.ts +0 -1
  843. package/dist/utils/constants.js +0 -5
  844. package/dist/utils/constants.js.map +0 -1
  845. package/dist/utils/index.d.ts +0 -2
  846. package/dist/utils/index.js +0 -109
  847. package/dist/utils/index.js.map +0 -1
  848. package/dist/vector/actions/action-manager.d.ts +0 -140
  849. package/dist/vector/actions/action-manager.js +0 -356
  850. package/dist/vector/actions/action-manager.js.map +0 -1
  851. package/dist/vector/adapters/base.adapter.d.ts +0 -169
  852. package/dist/vector/adapters/base.adapter.js +0 -218
  853. package/dist/vector/adapters/base.adapter.js.map +0 -1
  854. package/dist/vector/adapters/index.d.ts +0 -10
  855. package/dist/vector/adapters/index.js +0 -19
  856. package/dist/vector/adapters/index.js.map +0 -1
  857. package/dist/vector/adapters/memory.adapter.d.ts +0 -85
  858. package/dist/vector/adapters/memory.adapter.js +0 -505
  859. package/dist/vector/adapters/memory.adapter.js.map +0 -1
  860. package/dist/vector/adapters/pinecone.adapter.d.ts +0 -52
  861. package/dist/vector/adapters/pinecone.adapter.js +0 -433
  862. package/dist/vector/adapters/pinecone.adapter.js.map +0 -1
  863. package/dist/vector/adapters/qdrant.adapter.d.ts +0 -56
  864. package/dist/vector/adapters/qdrant.adapter.js +0 -442
  865. package/dist/vector/adapters/qdrant.adapter.js.map +0 -1
  866. package/dist/vector/adapters/weaviate.adapter.d.ts +0 -68
  867. package/dist/vector/adapters/weaviate.adapter.js +0 -661
  868. package/dist/vector/adapters/weaviate.adapter.js.map +0 -1
  869. package/dist/vector/index.d.ts +0 -36
  870. package/dist/vector/index.js +0 -70
  871. package/dist/vector/index.js.map +0 -1
  872. package/dist/vector/types/action.interface.d.ts +0 -195
  873. package/dist/vector/types/action.interface.js +0 -100
  874. package/dist/vector/types/action.interface.js.map +0 -1
  875. package/dist/vector/types/connection.interface.d.ts +0 -151
  876. package/dist/vector/types/connection.interface.js +0 -8
  877. package/dist/vector/types/connection.interface.js.map +0 -1
  878. package/dist/vector/types/embedding.interface.d.ts +0 -144
  879. package/dist/vector/types/embedding.interface.js +0 -8
  880. package/dist/vector/types/embedding.interface.js.map +0 -1
  881. package/dist/vector/types/enums.d.ts +0 -104
  882. package/dist/vector/types/enums.js +0 -113
  883. package/dist/vector/types/enums.js.map +0 -1
  884. package/dist/vector/types/index.d.ts +0 -11
  885. package/dist/vector/types/index.js +0 -23
  886. package/dist/vector/types/index.js.map +0 -1
  887. package/dist/vector/types/vector.interface.d.ts +0 -315
  888. package/dist/vector/types/vector.interface.js +0 -8
  889. package/dist/vector/types/vector.interface.js.map +0 -1
  890. package/dist/vector/utils/index.d.ts +0 -6
  891. package/dist/vector/utils/index.js +0 -11
  892. package/dist/vector/utils/index.js.map +0 -1
  893. package/dist/vector/utils/vector-error.d.ts +0 -69
  894. package/dist/vector/utils/vector-error.js +0 -116
  895. package/dist/vector/utils/vector-error.js.map +0 -1
  896. package/dist/vector/vector-database.service.d.ts +0 -484
  897. package/dist/vector/vector-database.service.js +0 -1002
  898. package/dist/vector/vector-database.service.js.map +0 -1
  899. package/dist/vector/vector.service.d.ts +0 -283
  900. package/dist/vector/vector.service.js +0 -544
  901. package/dist/vector/vector.service.js.map +0 -1
  902. package/dist/warehouse/executor/index.d.ts +0 -5
  903. package/dist/warehouse/executor/index.js +0 -12
  904. package/dist/warehouse/executor/index.js.map +0 -1
  905. package/dist/warehouse/executor/joins/index.d.ts +0 -5
  906. package/dist/warehouse/executor/joins/index.js +0 -11
  907. package/dist/warehouse/executor/joins/index.js.map +0 -1
  908. package/dist/warehouse/executor/joins/join-executor.d.ts +0 -101
  909. package/dist/warehouse/executor/joins/join-executor.js +0 -493
  910. package/dist/warehouse/executor/joins/join-executor.js.map +0 -1
  911. package/dist/warehouse/executor/joins/semantic-join.d.ts +0 -64
  912. package/dist/warehouse/executor/joins/semantic-join.js +0 -241
  913. package/dist/warehouse/executor/joins/semantic-join.js.map +0 -1
  914. package/dist/warehouse/executor/single-source-executor.d.ts +0 -155
  915. package/dist/warehouse/executor/single-source-executor.js +0 -573
  916. package/dist/warehouse/executor/single-source-executor.js.map +0 -1
  917. package/dist/warehouse/index.d.ts +0 -79
  918. package/dist/warehouse/index.js +0 -111
  919. package/dist/warehouse/index.js.map +0 -1
  920. package/dist/warehouse/parser/index.d.ts +0 -4
  921. package/dist/warehouse/parser/index.js +0 -10
  922. package/dist/warehouse/parser/index.js.map +0 -1
  923. package/dist/warehouse/parser/query-parser.d.ts +0 -181
  924. package/dist/warehouse/parser/query-parser.js +0 -415
  925. package/dist/warehouse/parser/query-parser.js.map +0 -1
  926. package/dist/warehouse/registry/data-source-registry.d.ts +0 -207
  927. package/dist/warehouse/registry/data-source-registry.js +0 -396
  928. package/dist/warehouse/registry/data-source-registry.js.map +0 -1
  929. package/dist/warehouse/registry/index.d.ts +0 -4
  930. package/dist/warehouse/registry/index.js +0 -9
  931. package/dist/warehouse/registry/index.js.map +0 -1
  932. package/dist/warehouse/transactions/index.d.ts +0 -4
  933. package/dist/warehouse/transactions/index.js +0 -9
  934. package/dist/warehouse/transactions/index.js.map +0 -1
  935. package/dist/warehouse/transactions/saga-orchestrator.d.ts +0 -92
  936. package/dist/warehouse/transactions/saga-orchestrator.js +0 -383
  937. package/dist/warehouse/transactions/saga-orchestrator.js.map +0 -1
  938. package/dist/warehouse/types/index.d.ts +0 -9
  939. package/dist/warehouse/types/index.js +0 -33
  940. package/dist/warehouse/types/index.js.map +0 -1
  941. package/dist/warehouse/types/join.interface.d.ts +0 -225
  942. package/dist/warehouse/types/join.interface.js +0 -87
  943. package/dist/warehouse/types/join.interface.js.map +0 -1
  944. package/dist/warehouse/types/query.interface.d.ts +0 -232
  945. package/dist/warehouse/types/query.interface.js +0 -9
  946. package/dist/warehouse/types/query.interface.js.map +0 -1
  947. package/dist/warehouse/types/transaction.interface.d.ts +0 -236
  948. package/dist/warehouse/types/transaction.interface.js +0 -74
  949. package/dist/warehouse/types/transaction.interface.js.map +0 -1
  950. package/dist/warehouse/types/where.interface.d.ts +0 -208
  951. package/dist/warehouse/types/where.interface.js +0 -89
  952. package/dist/warehouse/types/where.interface.js.map +0 -1
  953. package/dist/warehouse/warehouse.service.d.ts +0 -200
  954. package/dist/warehouse/warehouse.service.js +0 -470
  955. package/dist/warehouse/warehouse.service.js.map +0 -1
  956. package/dist/workflows/index.d.ts +0 -30
  957. package/dist/workflows/index.js +0 -64
  958. package/dist/workflows/index.js.map +0 -1
  959. package/dist/workflows/types/index.d.ts +0 -6
  960. package/dist/workflows/types/index.js +0 -23
  961. package/dist/workflows/types/index.js.map +0 -1
  962. package/dist/workflows/types/workflows.types.d.ts +0 -1095
  963. package/dist/workflows/types/workflows.types.js +0 -13
  964. package/dist/workflows/types/workflows.types.js.map +0 -1
  965. package/dist/workflows/workflow-builder.d.ts +0 -70
  966. package/dist/workflows/workflow-builder.js +0 -353
  967. package/dist/workflows/workflow-builder.js.map +0 -1
  968. package/dist/workflows/workflow-executor.d.ts +0 -289
  969. package/dist/workflows/workflow-executor.js +0 -2467
  970. package/dist/workflows/workflow-executor.js.map +0 -1
  971. package/dist/workflows/workflows.service.d.ts +0 -412
  972. package/dist/workflows/workflows.service.js +0 -2233
  973. package/dist/workflows/workflows.service.js.map +0 -1
@@ -1,1255 +0,0 @@
1
- "use strict";
2
- /**
3
- * Agents Service
4
- *
5
- * Main service class for agentic workflows operations.
6
- * Provides CRUD operations and execution for Ductape Agents.
7
- *
8
- * Agentic workflows extend Ductape's workflow engine to support AI-driven,
9
- * autonomous multi-step processes where an LLM dynamically decides the
10
- * next action based on observations and reasoning.
11
- */
12
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- var desc = Object.getOwnPropertyDescriptor(m, k);
15
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
- desc = { enumerable: true, get: function() { return m[k]; } };
17
- }
18
- Object.defineProperty(o, k2, desc);
19
- }) : (function(o, m, k, k2) {
20
- if (k2 === undefined) k2 = k;
21
- o[k2] = m[k];
22
- }));
23
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
24
- Object.defineProperty(o, "default", { enumerable: true, value: v });
25
- }) : function(o, v) {
26
- o["default"] = v;
27
- });
28
- var __importStar = (this && this.__importStar) || (function () {
29
- var ownKeys = function(o) {
30
- ownKeys = Object.getOwnPropertyNames || function (o) {
31
- var ar = [];
32
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
- return ar;
34
- };
35
- return ownKeys(o);
36
- };
37
- return function (mod) {
38
- if (mod && mod.__esModule) return mod;
39
- var result = {};
40
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
- __setModuleDefault(result, mod);
42
- return result;
43
- };
44
- })();
45
- var __importDefault = (this && this.__importDefault) || function (mod) {
46
- return (mod && mod.__esModule) ? mod : { "default": mod };
47
- };
48
- Object.defineProperty(exports, "__esModule", { value: true });
49
- exports.agentsService = exports.AgentsService = exports.AgentError = void 0;
50
- const crypto_1 = require("crypto");
51
- const products_service_1 = __importDefault(require("../products/services/products.service"));
52
- const processor_service_1 = __importDefault(require("../processor/services/processor.service"));
53
- const logs_service_1 = __importDefault(require("../logs/logs.service"));
54
- const logs_types_1 = require("../logs/logs.types");
55
- const processor_utils_1 = require("../processor/utils/processor.utils");
56
- const productsBuilder_types_1 = require("../types/productsBuilder.types");
57
- const tool_registry_1 = require("./tool-registry");
58
- const agent_executor_1 = require("./agent-executor");
59
- const quota_service_1 = require("../resilience/quota.service");
60
- const fallback_service_1 = require("../resilience/fallback.service");
61
- const healthcheck_service_1 = require("../resilience/healthcheck.service");
62
- const secrets_1 = require("../secrets");
63
- /**
64
- * Error class for agent-related errors
65
- */
66
- class AgentError extends Error {
67
- constructor(message, code, details) {
68
- super(message);
69
- this.code = code;
70
- this.details = details;
71
- this.name = 'AgentError';
72
- }
73
- static configurationError(message) {
74
- return new AgentError(message, 'CONFIGURATION_ERROR');
75
- }
76
- static validationError(message, details) {
77
- return new AgentError(message, 'VALIDATION_ERROR', details);
78
- }
79
- static notFoundError(message) {
80
- return new AgentError(message, 'NOT_FOUND');
81
- }
82
- static executionError(message, details) {
83
- return new AgentError(message, 'EXECUTION_ERROR', details);
84
- }
85
- }
86
- exports.AgentError = AgentError;
87
- /**
88
- * Main Agents Service class
89
- * Provides unified interface for agent management and execution
90
- */
91
- class AgentsService {
92
- /**
93
- * Create a new AgentsService instance
94
- * @param config - Optional configuration for authentication and workspace context
95
- */
96
- constructor(config) {
97
- /** Service configuration */
98
- this.config = null;
99
- /** ProductBuilder instances cache (keyed by product tag) */
100
- this.productBuilders = new Map();
101
- /** Local agent definitions */
102
- this.localAgents = new Map();
103
- /** Tool registries per agent */
104
- this.toolRegistries = new Map();
105
- /** Active executors (for status/signal handling) */
106
- this.activeExecutors = new Map();
107
- /** LogService instance for logging operations */
108
- this.logService = null;
109
- /** Current product ID for logging */
110
- this.productId = '';
111
- this.config = config || null;
112
- this._privateKey = config ? config.private_key : '';
113
- }
114
- // ==================== CONFIGURATION ====================
115
- /**
116
- * Update service configuration
117
- */
118
- updateConfig(config) {
119
- this.config = config;
120
- }
121
- /**
122
- * Get service configuration
123
- */
124
- getConfig() {
125
- return this.config;
126
- }
127
- // ==================== PRODUCT BUILDER MANAGEMENT ====================
128
- /**
129
- * Create a new ProductBuilder instance
130
- */
131
- createNewProductBuilder() {
132
- if (!this.config) {
133
- throw AgentError.configurationError('AgentsService not configured. Please provide config when initializing.');
134
- }
135
- return new products_service_1.default({
136
- workspace_id: this.config.workspace_id,
137
- public_key: this.config.public_key,
138
- user_id: this.config.user_id,
139
- token: this.config.token,
140
- env_type: this.config.env_type,
141
- });
142
- }
143
- /**
144
- * Get or create a ProductBuilder instance for the given product tag
145
- */
146
- async getProductBuilder(productTag) {
147
- let builder = this.productBuilders.get(productTag);
148
- if (!builder) {
149
- builder = this.createNewProductBuilder();
150
- await builder.initializeProductByTag(productTag);
151
- this.productBuilders.set(productTag, builder);
152
- this.productId = builder.fetchProductId() || '';
153
- }
154
- return builder;
155
- }
156
- /**
157
- * Initialize logging service
158
- */
159
- initializeLogService() {
160
- var _a;
161
- if (!this.logService && this.config) {
162
- this.logService = new logs_service_1.default({
163
- product_id: this.productId,
164
- workspace_id: this.config.workspace_id,
165
- public_key: this.config.public_key,
166
- user_id: this.config.user_id,
167
- token: this.config.token,
168
- env_type: this.config.env_type,
169
- workspace_private_key: (_a = this._privateKey) !== null && _a !== void 0 ? _a : undefined,
170
- });
171
- }
172
- }
173
- /**
174
- * Create a new ProcessorService instance
175
- */
176
- createNewProcessor() {
177
- if (!this.config) {
178
- throw AgentError.configurationError('AgentsService not configured. Please provide config when initializing.');
179
- }
180
- return new processor_service_1.default({
181
- workspace_id: this.config.workspace_id,
182
- public_key: this.config.public_key,
183
- user_id: this.config.user_id,
184
- token: this.config.token,
185
- env_type: this.config.env_type,
186
- redis_client: this.config.redis_client,
187
- private_key: this._privateKey,
188
- });
189
- }
190
- /**
191
- * Create a resilience service wrapper for agent operations
192
- */
193
- createResilienceService() {
194
- if (!this.config) {
195
- return undefined;
196
- }
197
- const serviceConfig = {
198
- workspace_id: this.config.workspace_id,
199
- public_key: this.config.public_key,
200
- user_id: this.config.user_id,
201
- token: this.config.token,
202
- env_type: this.config.env_type,
203
- private_key: this._privateKey,
204
- access_key: this.config.access_key,
205
- };
206
- // Create individual services
207
- const quotaService = new quota_service_1.QuotaService(serviceConfig);
208
- const fallbackService = new fallback_service_1.FallbackService(serviceConfig);
209
- const healthcheckService = new healthcheck_service_1.HealthcheckService(serviceConfig);
210
- // Return a wrapper that delegates to the appropriate service
211
- return {
212
- async runQuota(options) {
213
- return quotaService.run({
214
- product: options.product,
215
- env: options.env,
216
- tag: options.tag,
217
- input: options.input,
218
- session: options.session,
219
- });
220
- },
221
- async runFallback(options) {
222
- return fallbackService.run({
223
- product: options.product,
224
- env: options.env,
225
- tag: options.tag,
226
- input: options.input,
227
- session: options.session,
228
- });
229
- },
230
- async checkHealth(options) {
231
- return healthcheckService.getStatus({
232
- product: options.product,
233
- env: options.env,
234
- tag: options.tag,
235
- });
236
- },
237
- async getQuotaStatus(options) {
238
- // This would need to be implemented in QuotaService
239
- // For now, return basic status
240
- return {
241
- tag: options.tag,
242
- totalQuota: undefined,
243
- usedQuota: undefined,
244
- remainingQuota: undefined,
245
- providers: [],
246
- };
247
- },
248
- };
249
- }
250
- /**
251
- * Get context services for agent execution
252
- */
253
- getContextServices(resilienceConfig) {
254
- return {
255
- config: this.config,
256
- processorService: this.createNewProcessor(),
257
- resilienceService: this.createResilienceService(),
258
- resilienceConfig,
259
- // Note: These services would be injected from the main Ductape class
260
- // databaseService, graphService, storageService, brokersService
261
- };
262
- }
263
- // ==================== AGENT DEFINITION ====================
264
- /**
265
- * Define a new agent and optionally persist to database
266
- *
267
- * @example
268
- * ```ts
269
- * // Define and persist to database
270
- * const agent = await ductape.agents.define({
271
- * product: 'my-product',
272
- * tag: 'customer-support',
273
- * name: 'Customer Support Agent',
274
- * model: { provider: 'anthropic', model: 'claude-sonnet-4-20250514' },
275
- * systemPrompt: 'You are a helpful customer support agent...',
276
- * tools: [
277
- * {
278
- * tag: 'lookup-order',
279
- * description: 'Look up order details',
280
- * parameters: { orderId: { type: 'string', description: 'Order ID' } },
281
- * handler: async (ctx, params) => ctx.database.query({ ... }),
282
- * },
283
- * ],
284
- * });
285
- * ```
286
- */
287
- async define(options) {
288
- var _a;
289
- // Validate required fields
290
- if (!options.tag) {
291
- throw AgentError.validationError('Agent tag is required');
292
- }
293
- if (!options.name) {
294
- throw AgentError.validationError('Agent name is required');
295
- }
296
- if (!options.model) {
297
- throw AgentError.validationError('Agent model configuration is required');
298
- }
299
- if (!options.systemPrompt) {
300
- throw AgentError.validationError('Agent system prompt is required');
301
- }
302
- // Create tool registry
303
- const toolRegistry = new tool_registry_1.ToolRegistry();
304
- if (options.tools && options.tools.length > 0) {
305
- toolRegistry.registerMany(options.tools);
306
- }
307
- // Store tool registry (with handlers for local execution)
308
- this.toolRegistries.set(options.tag, toolRegistry);
309
- // Get tool schemas (without handlers for storage)
310
- const toolSchemas = toolRegistry.getSchemas();
311
- // Create defined agent (without handlers for storage)
312
- const definedAgent = {
313
- tag: options.tag,
314
- name: options.name,
315
- description: options.description,
316
- model: options.model,
317
- modelConfig: options.modelConfig,
318
- systemPrompt: options.systemPrompt,
319
- toolSchemas,
320
- termination: options.termination,
321
- memory: options.memory,
322
- humanInLoop: options.humanInLoop,
323
- streaming: options.streaming,
324
- inputSchema: options.inputSchema,
325
- envs: options.envs,
326
- resilience: options.resilience,
327
- };
328
- // Store locally
329
- this.localAgents.set(options.tag, definedAgent);
330
- // If product is specified, persist to database
331
- if (options.product) {
332
- try {
333
- const productBuilder = await this.getProductBuilder(options.product);
334
- // Convert to IProductAgent format for storage
335
- const productAgent = {
336
- tag: options.tag,
337
- name: options.name,
338
- description: options.description,
339
- model: options.model, // Model is a tag reference to product-level model config
340
- modelConfig: options.modelConfig,
341
- systemPrompt: options.systemPrompt,
342
- tools: toolSchemas.map((schema) => ({
343
- tag: schema.tag,
344
- name: schema.name,
345
- description: schema.description,
346
- parameters: schema.parameters,
347
- requiresConfirmation: schema.requiresConfirmation,
348
- costEstimate: schema.costEstimate,
349
- timeout: schema.timeout,
350
- retries: schema.retries,
351
- })),
352
- termination: options.termination ? {
353
- maxIterations: options.termination.maxIterations,
354
- maxTokens: options.termination.maxTokens,
355
- timeout: typeof options.termination.timeout === 'string'
356
- ? parseInt(options.termination.timeout)
357
- : options.termination.timeout,
358
- allowManualStop: options.termination.allowManualStop,
359
- } : undefined,
360
- memory: options.memory ? {
361
- shortTerm: options.memory.shortTerm,
362
- longTerm: options.memory.longTerm,
363
- } : undefined,
364
- humanInLoop: options.humanInLoop ? {
365
- enabled: options.humanInLoop.enabled,
366
- alwaysRequireApproval: options.humanInLoop.alwaysRequireApproval,
367
- approvalTimeout: typeof options.humanInLoop.approvalTimeout === 'string'
368
- ? parseInt(options.humanInLoop.approvalTimeout)
369
- : options.humanInLoop.approvalTimeout,
370
- approvalWebhook: options.humanInLoop.approvalWebhook,
371
- approvalBroker: options.humanInLoop.approvalBroker,
372
- } : undefined,
373
- streaming: options.streaming ? {
374
- enabled: options.streaming.enabled,
375
- events: options.streaming.events,
376
- webhook: options.streaming.webhook,
377
- broker: options.streaming.broker,
378
- } : undefined,
379
- inputSchema: options.inputSchema,
380
- envs: (_a = options.envs) === null || _a === void 0 ? void 0 : _a.map((env) => ({
381
- slug: env.slug,
382
- active: env.active,
383
- model: env.model, // Model tag override for this environment
384
- modelConfig: env.modelConfig,
385
- toolOverrides: env.toolOverrides,
386
- })),
387
- resilience: options.resilience,
388
- };
389
- await productBuilder.createAgent(productAgent);
390
- }
391
- catch (error) {
392
- // Log but don't fail - agent is still stored locally
393
- console.warn(`Failed to persist agent to database: ${error}`);
394
- }
395
- }
396
- return definedAgent;
397
- }
398
- /**
399
- * Register a defined agent with a product (persists to database)
400
- *
401
- * @example
402
- * ```ts
403
- * await ductape.agents.register('my-product', agent);
404
- * ```
405
- */
406
- async register(product, agent) {
407
- var _a, _b, _c, _d, _e, _f, _g;
408
- const process_id = (0, processor_utils_1.generateObjectId)();
409
- // Initialize logging
410
- await this.getProductBuilder(product);
411
- this.initializeLogService();
412
- const baseLogs = {
413
- product_tag: product,
414
- workspace_id: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.workspace_id) || '',
415
- env: '',
416
- process_id,
417
- type: logs_types_1.LogEventTypes.WORKFLOW,
418
- parent_tag: agent.tag,
419
- data: { agent: agent.tag, operation: 'register' },
420
- };
421
- (_b = this.logService) === null || _b === void 0 ? void 0 : _b.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent register - initiated', status: logs_types_1.LogEventStatus.PROCESSING }));
422
- try {
423
- const productBuilder = await this.getProductBuilder(product);
424
- // Convert to IProductAgent format and persist to database
425
- const productAgent = {
426
- tag: agent.tag,
427
- name: agent.name,
428
- description: agent.description,
429
- model: agent.model, // Model is a tag reference to product-level model config
430
- modelConfig: agent.modelConfig,
431
- systemPrompt: agent.systemPrompt,
432
- tools: agent.toolSchemas.map((schema) => ({
433
- tag: schema.tag,
434
- name: schema.name,
435
- description: schema.description,
436
- parameters: schema.parameters,
437
- requiresConfirmation: schema.requiresConfirmation,
438
- costEstimate: schema.costEstimate,
439
- timeout: schema.timeout,
440
- retries: schema.retries,
441
- })),
442
- termination: agent.termination ? {
443
- maxIterations: agent.termination.maxIterations,
444
- maxTokens: agent.termination.maxTokens,
445
- timeout: typeof agent.termination.timeout === 'string'
446
- ? parseInt(agent.termination.timeout)
447
- : agent.termination.timeout,
448
- allowManualStop: agent.termination.allowManualStop,
449
- } : undefined,
450
- memory: agent.memory ? {
451
- shortTerm: agent.memory.shortTerm,
452
- longTerm: agent.memory.longTerm,
453
- } : undefined,
454
- humanInLoop: agent.humanInLoop ? {
455
- enabled: agent.humanInLoop.enabled,
456
- alwaysRequireApproval: agent.humanInLoop.alwaysRequireApproval,
457
- approvalTimeout: typeof agent.humanInLoop.approvalTimeout === 'string'
458
- ? parseInt(agent.humanInLoop.approvalTimeout)
459
- : agent.humanInLoop.approvalTimeout,
460
- approvalWebhook: agent.humanInLoop.approvalWebhook,
461
- approvalBroker: agent.humanInLoop.approvalBroker,
462
- } : undefined,
463
- streaming: agent.streaming ? {
464
- enabled: agent.streaming.enabled,
465
- events: agent.streaming.events,
466
- webhook: agent.streaming.webhook,
467
- broker: agent.streaming.broker,
468
- } : undefined,
469
- inputSchema: agent.inputSchema,
470
- envs: (_c = agent.envs) === null || _c === void 0 ? void 0 : _c.map((env) => ({
471
- slug: env.slug,
472
- active: env.active,
473
- model: env.model, // Model tag override for this environment
474
- modelConfig: env.modelConfig,
475
- toolOverrides: env.toolOverrides,
476
- })),
477
- resilience: agent.resilience,
478
- };
479
- await productBuilder.createAgent(productAgent);
480
- // Also store locally for immediate execution
481
- this.localAgents.set(agent.tag, agent);
482
- (_d = this.logService) === null || _d === void 0 ? void 0 : _d.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent register - success', successful_execution: true, status: logs_types_1.LogEventStatus.SUCCESS }));
483
- (_e = this.logService) === null || _e === void 0 ? void 0 : _e.publish();
484
- }
485
- catch (error) {
486
- (_f = this.logService) === null || _f === void 0 ? void 0 : _f.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent register - failed', failed_execution: true, data: { agent: agent.tag, operation: 'register', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
487
- await ((_g = this.logService) === null || _g === void 0 ? void 0 : _g.publish());
488
- throw AgentError.executionError(`Failed to register agent: ${error}`, { agent: agent.tag });
489
- }
490
- }
491
- // ==================== AGENT EXECUTION ====================
492
- /**
493
- * Run an agent
494
- *
495
- * @example
496
- * ```ts
497
- * const result = await ductape.agents.run({
498
- * product: 'my-product',
499
- * env: 'production',
500
- * tag: 'customer-support',
501
- * input: {
502
- * ticketId: 'TICKET-123',
503
- * message: 'I need help with my order',
504
- * },
505
- * });
506
- * ```
507
- */
508
- async run(options) {
509
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12;
510
- const process_id = (0, processor_utils_1.generateObjectId)();
511
- const startTime = Date.now();
512
- // Session log fields (will be populated if session is provided)
513
- let sessionLogFields = {};
514
- let resolvedOptions = options;
515
- // Initialize logging
516
- const productBuilder = await this.getProductBuilder(options.product);
517
- this.initializeLogService();
518
- // Process session if provided - verify and resolve $Session{} references
519
- if (options.session) {
520
- const privateKey = productBuilder.fetchPrivateKey();
521
- if (privateKey) {
522
- const { processSessionForExecution } = await Promise.resolve().then(() => __importStar(require('../sessions')));
523
- const sessionResult = await processSessionForExecution(options.session, privateKey, options, options.env, {
524
- fetchSessionSelector: async (sessionTag) => {
525
- const sessionConfig = await productBuilder.fetchSession(sessionTag);
526
- return sessionConfig === null || sessionConfig === void 0 ? void 0 : sessionConfig.selector;
527
- },
528
- });
529
- if (sessionResult.error) {
530
- throw AgentError.executionError(`Session validation failed: ${sessionResult.error}`);
531
- }
532
- resolvedOptions = sessionResult.input;
533
- sessionLogFields = sessionResult.logFields;
534
- }
535
- }
536
- const baseLogs = Object.assign({ product_tag: options.product, workspace_id: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.workspace_id) || '', env: options.env, process_id, type: logs_types_1.LogEventTypes.WORKFLOW, parent_tag: options.tag, data: { agent: options.tag, operation: 'run' } }, sessionLogFields);
537
- (_b = this.logService) === null || _b === void 0 ? void 0 : _b.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent run - initiated', status: logs_types_1.LogEventStatus.PROCESSING }));
538
- try {
539
- // Get agent definition - first check local, then fetch from database
540
- let agent = this.localAgents.get(resolvedOptions.tag);
541
- let toolRegistry = this.toolRegistries.get(resolvedOptions.tag);
542
- if (!agent) {
543
- // Try to fetch from database
544
- const storedAgent = await productBuilder.fetchAgent(resolvedOptions.tag);
545
- if (!storedAgent) {
546
- throw AgentError.notFoundError(`Agent '${resolvedOptions.tag}' not found`);
547
- }
548
- // Convert IProductAgent to IDefinedAgent
549
- agent = this.convertProductAgentToDefinedAgent(storedAgent);
550
- // Store locally for future use
551
- this.localAgents.set(resolvedOptions.tag, agent);
552
- // Create tool registry from stored schemas (without handlers)
553
- toolRegistry = new tool_registry_1.ToolRegistry();
554
- // Note: Tools from database won't have handlers - they need handlerRef or runtime registration
555
- for (const tool of storedAgent.tools || []) {
556
- toolRegistry.register({
557
- tag: tool.tag,
558
- name: tool.name,
559
- description: tool.description,
560
- parameters: tool.parameters,
561
- requiresConfirmation: tool.requiresConfirmation,
562
- costEstimate: tool.costEstimate,
563
- timeout: tool.timeout,
564
- retries: tool.retries,
565
- // Handler will need to be resolved from handlerRef or provided at runtime
566
- handler: tool.handlerRef
567
- ? this.createHandlerFromRef(tool.handlerRef, resolvedOptions.product, resolvedOptions.env)
568
- : async () => { throw new Error(`No handler for tool '${tool.tag}'. Provide handlerRef or register handler at runtime.`); },
569
- });
570
- }
571
- this.toolRegistries.set(resolvedOptions.tag, toolRegistry);
572
- }
573
- if (!toolRegistry) {
574
- throw AgentError.notFoundError(`Tool registry for agent '${resolvedOptions.tag}' not found`);
575
- }
576
- // Resolve model config from the model tag
577
- const modelConfig = await productBuilder.fetchModel(agent.model);
578
- if (!modelConfig) {
579
- throw AgentError.notFoundError(`Model '${agent.model}' not found`);
580
- }
581
- // Find the env-specific config
582
- const envConfig = modelConfig.envs.find(e => e.slug === resolvedOptions.env);
583
- if (!envConfig) {
584
- throw AgentError.configurationError(`Model '${agent.model}' has no configuration for environment '${resolvedOptions.env}'`);
585
- }
586
- // Decrypt API key using product private key, or resolve secret reference
587
- const privateKey = productBuilder.fetchPrivateKey();
588
- let apiKey = envConfig.apiKey;
589
- if (apiKey) {
590
- // Check if it's a secret reference
591
- if ((0, secrets_1.isSecretReference)(apiKey).isSecret) {
592
- const secretsService = (0, secrets_1.getSecretsService)();
593
- if (secretsService) {
594
- const resolved = await secretsService.resolve(apiKey, { env: resolvedOptions.env });
595
- apiKey = resolved.value;
596
- }
597
- else {
598
- throw AgentError.configurationError(`Model API key contains secret reference '${apiKey}' but secrets service is not initialized. ` +
599
- `Please ensure the Ductape client is properly initialized.`);
600
- }
601
- }
602
- else if (privateKey) {
603
- // Try to decrypt if it's not a secret reference
604
- try {
605
- const { decrypt } = await Promise.resolve().then(() => __importStar(require('../processor/utils/processor.utils')));
606
- apiKey = decrypt(apiKey, privateKey);
607
- }
608
- catch (e) {
609
- // If decryption fails, try using the key as-is (might be unencrypted in dev)
610
- console.warn('Failed to decrypt model API key, using as-is');
611
- }
612
- }
613
- }
614
- // Also resolve any secret references in baseUrl
615
- let baseUrl = envConfig.baseUrl;
616
- if (baseUrl && (0, secrets_1.isSecretReference)(baseUrl).isSecret) {
617
- const secretsService = (0, secrets_1.getSecretsService)();
618
- if (secretsService) {
619
- const resolved = await secretsService.resolve(baseUrl, { env: resolvedOptions.env });
620
- baseUrl = resolved.value;
621
- }
622
- else {
623
- throw AgentError.configurationError(`Model baseUrl contains secret reference but secrets service is not initialized.`);
624
- }
625
- }
626
- // Get environment-specific agent config if available
627
- const agentEnvConfig = (_c = agent.envs) === null || _c === void 0 ? void 0 : _c.find(e => e.slug === resolvedOptions.env);
628
- // Build the resolved LLM config with overrides
629
- // Precedence: model entity < agent.modelConfig < agentEnvConfig.modelConfig < resolvedOptions.modelConfig
630
- const resolvedModelConfig = {
631
- provider: modelConfig.provider,
632
- model: modelConfig.model,
633
- // Start with model entity values, then apply overrides
634
- temperature: (_j = (_g = (_e = (_d = resolvedOptions.modelConfig) === null || _d === void 0 ? void 0 : _d.temperature) !== null && _e !== void 0 ? _e : (_f = agentEnvConfig === null || agentEnvConfig === void 0 ? void 0 : agentEnvConfig.modelConfig) === null || _f === void 0 ? void 0 : _f.temperature) !== null && _g !== void 0 ? _g : (_h = agent.modelConfig) === null || _h === void 0 ? void 0 : _h.temperature) !== null && _j !== void 0 ? _j : modelConfig.temperature,
635
- maxTokens: (_q = (_o = (_l = (_k = resolvedOptions.modelConfig) === null || _k === void 0 ? void 0 : _k.maxTokens) !== null && _l !== void 0 ? _l : (_m = agentEnvConfig === null || agentEnvConfig === void 0 ? void 0 : agentEnvConfig.modelConfig) === null || _m === void 0 ? void 0 : _m.maxTokens) !== null && _o !== void 0 ? _o : (_p = agent.modelConfig) === null || _p === void 0 ? void 0 : _p.maxTokens) !== null && _q !== void 0 ? _q : modelConfig.maxTokens,
636
- topP: (_w = (_u = (_s = (_r = resolvedOptions.modelConfig) === null || _r === void 0 ? void 0 : _r.topP) !== null && _s !== void 0 ? _s : (_t = agentEnvConfig === null || agentEnvConfig === void 0 ? void 0 : agentEnvConfig.modelConfig) === null || _t === void 0 ? void 0 : _t.topP) !== null && _u !== void 0 ? _u : (_v = agent.modelConfig) === null || _v === void 0 ? void 0 : _v.topP) !== null && _w !== void 0 ? _w : modelConfig.topP,
637
- stopSequences: (_2 = (_0 = (_y = (_x = resolvedOptions.modelConfig) === null || _x === void 0 ? void 0 : _x.stopSequences) !== null && _y !== void 0 ? _y : (_z = agentEnvConfig === null || agentEnvConfig === void 0 ? void 0 : agentEnvConfig.modelConfig) === null || _z === void 0 ? void 0 : _z.stopSequences) !== null && _0 !== void 0 ? _0 : (_1 = agent.modelConfig) === null || _1 === void 0 ? void 0 : _1.stopSequences) !== null && _2 !== void 0 ? _2 : modelConfig.stopSequences,
638
- timeout: (_8 = (_6 = (_4 = (_3 = resolvedOptions.modelConfig) === null || _3 === void 0 ? void 0 : _3.timeout) !== null && _4 !== void 0 ? _4 : (_5 = agentEnvConfig === null || agentEnvConfig === void 0 ? void 0 : agentEnvConfig.modelConfig) === null || _5 === void 0 ? void 0 : _5.timeout) !== null && _6 !== void 0 ? _6 : (_7 = agent.modelConfig) === null || _7 === void 0 ? void 0 : _7.timeout) !== null && _8 !== void 0 ? _8 : modelConfig.timeout,
639
- apiKey,
640
- baseUrl,
641
- };
642
- // Create executor with resolved model config
643
- const executor = new agent_executor_1.AgentExecutor(agent, toolRegistry, this.getContextServices(agent.resilience), resolvedOptions, (0, agent_executor_1.createLLMProvider)(resolvedModelConfig), resolvedModelConfig);
644
- // Store executor for signal handling
645
- const executionId = executor.getState().execution_id;
646
- this.activeExecutors.set(executionId, executor);
647
- // Execute agent
648
- const result = await executor.execute();
649
- // Cleanup
650
- this.activeExecutors.delete(executionId);
651
- (_9 = this.logService) === null || _9 === void 0 ? void 0 : _9.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent run - success', successful_execution: result.status === 'completed', failed_execution: result.status === 'failed', data: {
652
- agent: resolvedOptions.tag,
653
- operation: 'run',
654
- execution_id: result.execution_id,
655
- iterations: result.iterations,
656
- status: result.status,
657
- }, status: result.status === 'completed' ? logs_types_1.LogEventStatus.SUCCESS : logs_types_1.LogEventStatus.FAIL }));
658
- (_10 = this.logService) === null || _10 === void 0 ? void 0 : _10.publish();
659
- return result;
660
- }
661
- catch (error) {
662
- (_11 = this.logService) === null || _11 === void 0 ? void 0 : _11.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent run - failed', failed_execution: true, data: { agent: resolvedOptions.tag, operation: 'run', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
663
- await ((_12 = this.logService) === null || _12 === void 0 ? void 0 : _12.publish());
664
- throw AgentError.executionError(`Failed to run agent: ${error}`, { agent: resolvedOptions.tag });
665
- }
666
- }
667
- // ==================== DISPATCH (SCHEDULED EXECUTION) ====================
668
- /**
669
- * Dispatch an agent for scheduled or deferred execution
670
- *
671
- * @example
672
- * ```ts
673
- * const job = await ductape.agents.dispatch({
674
- * product: 'my-product',
675
- * env: 'production',
676
- * agent: 'daily-report-agent',
677
- * input: { reportType: 'daily' },
678
- * schedule: { cron: '0 9 * * *' }, // Daily at 9 AM
679
- * });
680
- * ```
681
- */
682
- async dispatch(options) {
683
- var _a, _b, _c, _d, _e, _f;
684
- const process_id = (0, processor_utils_1.generateObjectId)();
685
- const processorService = this.createNewProcessor();
686
- const productBuilder = await this.getProductBuilder(options.product);
687
- const schedule = options.schedule || {};
688
- const startAt = typeof schedule.start_at === 'string'
689
- ? new Date(schedule.start_at).getTime()
690
- : schedule.start_at || Date.now();
691
- const jobTag = `agent:${options.agent}`;
692
- // Initialize logging
693
- this.initializeLogService();
694
- const baseLogs = {
695
- product_tag: options.product,
696
- workspace_id: ((_a = this.config) === null || _a === void 0 ? void 0 : _a.workspace_id) || '',
697
- env: options.env,
698
- process_id,
699
- type: logs_types_1.LogEventTypes.WORKFLOW,
700
- parent_tag: options.agent,
701
- data: { agent: options.agent, operation: 'dispatch' },
702
- };
703
- (_b = this.logService) === null || _b === void 0 ? void 0 : _b.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent dispatch - initiated', status: logs_types_1.LogEventStatus.PROCESSING }));
704
- try {
705
- // Check if job exists, if not create it
706
- const existingJob = await productBuilder.fetchJob(jobTag);
707
- if (!existingJob) {
708
- await productBuilder.createJob({
709
- tag: jobTag,
710
- name: `Agent: ${options.agent}`,
711
- description: `Auto-created job for agent ${options.agent}`,
712
- type: productsBuilder_types_1.JobEventTypes.ACTION, // Agent executions are actions
713
- app: options.agent,
714
- event: 'execute',
715
- executions: 0,
716
- intervals: schedule.every || 0,
717
- start_at: startAt,
718
- });
719
- }
720
- const jobInput = {
721
- product: options.product,
722
- env: options.env,
723
- event: jobTag,
724
- input: options.input,
725
- retries: options.retries || 0,
726
- start_at: startAt,
727
- session: options.session,
728
- cache: options.cache,
729
- repeat: schedule.cron || schedule.every
730
- ? {
731
- cron: schedule.cron,
732
- every: schedule.every,
733
- limit: schedule.limit,
734
- endDate: schedule.endDate,
735
- tz: schedule.tz,
736
- }
737
- : undefined,
738
- };
739
- await processorService.processJob(jobInput);
740
- const isRecurring = !!(schedule.cron || schedule.every);
741
- let nextRunAt;
742
- if (isRecurring && schedule.every) {
743
- nextRunAt = startAt + schedule.every;
744
- }
745
- const job_id = (0, crypto_1.randomUUID)();
746
- (_c = this.logService) === null || _c === void 0 ? void 0 : _c.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent dispatch - success', successful_execution: true, data: { agent: options.agent, operation: 'dispatch', job_id }, status: logs_types_1.LogEventStatus.SUCCESS }));
747
- (_d = this.logService) === null || _d === void 0 ? void 0 : _d.publish();
748
- return {
749
- job_id,
750
- status: startAt > Date.now() ? 'scheduled' : 'queued',
751
- scheduled_at: startAt,
752
- recurring: isRecurring,
753
- next_run_at: nextRunAt,
754
- };
755
- }
756
- catch (error) {
757
- (_e = this.logService) === null || _e === void 0 ? void 0 : _e.add(Object.assign(Object.assign({}, baseLogs), { message: 'Agent dispatch - failed', failed_execution: true, data: { agent: options.agent, operation: 'dispatch', error: String(error) }, status: logs_types_1.LogEventStatus.FAIL }));
758
- await ((_f = this.logService) === null || _f === void 0 ? void 0 : _f.publish());
759
- throw error;
760
- }
761
- }
762
- // ==================== SIGNALS ====================
763
- /**
764
- * Send a signal to a running agent
765
- *
766
- * @example
767
- * ```ts
768
- * // Stop an agent
769
- * await ductape.agents.signal({
770
- * product: 'my-product',
771
- * env: 'production',
772
- * execution_id: 'exec-123',
773
- * signal: 'stop',
774
- * });
775
- *
776
- * // Approve a tool call
777
- * await ductape.agents.signal({
778
- * product: 'my-product',
779
- * env: 'production',
780
- * execution_id: 'exec-123',
781
- * signal: 'approve',
782
- * payload: { toolCallId: 'tc-456' },
783
- * });
784
- * ```
785
- */
786
- async signal(options) {
787
- const executor = this.activeExecutors.get(options.execution_id);
788
- if (!executor) {
789
- throw AgentError.notFoundError(`Agent execution '${options.execution_id}' not found or not active`);
790
- }
791
- switch (options.signal) {
792
- case 'stop':
793
- executor.handleStop();
794
- break;
795
- case 'pause':
796
- executor.handlePause();
797
- break;
798
- case 'resume':
799
- executor.handleResume();
800
- break;
801
- case 'approve':
802
- executor.handleApproval(true, options.payload);
803
- break;
804
- case 'reject':
805
- executor.handleApproval(false);
806
- break;
807
- default:
808
- throw AgentError.validationError(`Unknown signal: ${options.signal}`);
809
- }
810
- }
811
- // ==================== STATUS ====================
812
- /**
813
- * Get the status of an agent execution
814
- *
815
- * @example
816
- * ```ts
817
- * const status = await ductape.agents.status({
818
- * product: 'my-product',
819
- * env: 'production',
820
- * execution_id: 'exec-123',
821
- * });
822
- * ```
823
- */
824
- async status(options) {
825
- const executor = this.activeExecutors.get(options.execution_id);
826
- if (!executor) {
827
- // Could query from database for completed executions
828
- return null;
829
- }
830
- return executor.getState();
831
- }
832
- /**
833
- * List agent executions
834
- *
835
- * @example
836
- * ```ts
837
- * const executions = await ductape.agents.list({
838
- * product: 'my-product',
839
- * env: 'production',
840
- * agent: 'customer-support',
841
- * status: 'completed',
842
- * limit: 10,
843
- * });
844
- * ```
845
- */
846
- async list(options) {
847
- // For now, return active executions
848
- // In production, would query from database
849
- const executions = [];
850
- for (const [executionId, executor] of this.activeExecutors) {
851
- const state = executor.getState();
852
- // Apply filters
853
- if (options.agent && state.agent_tag !== options.agent) {
854
- continue;
855
- }
856
- if (options.status) {
857
- const statuses = Array.isArray(options.status) ? options.status : [options.status];
858
- if (!statuses.includes(state.status)) {
859
- continue;
860
- }
861
- }
862
- executions.push({
863
- execution_id: state.execution_id,
864
- agent_tag: state.agent_tag,
865
- status: state.status,
866
- startedAt: state.startedAt,
867
- completedAt: state.status !== 'running' ? state.updatedAt : undefined,
868
- iterations: state.iteration,
869
- usage: state.usage,
870
- });
871
- }
872
- // Pagination
873
- const page = options.page || 1;
874
- const limit = options.limit || 10;
875
- const start = (page - 1) * limit;
876
- const paginatedExecutions = executions.slice(start, start + limit);
877
- return {
878
- executions: paginatedExecutions,
879
- total: executions.length,
880
- page,
881
- limit,
882
- };
883
- }
884
- // ==================== TOOL MANAGEMENT ====================
885
- /**
886
- * Add a tool to an agent
887
- *
888
- * @example
889
- * ```ts
890
- * await ductape.agents.addTool('customer-support', {
891
- * tag: 'new-tool',
892
- * description: 'A new tool',
893
- * parameters: { ... },
894
- * handler: async (ctx, params) => { ... },
895
- * });
896
- * ```
897
- */
898
- addTool(agentTag, tool) {
899
- const registry = this.toolRegistries.get(agentTag);
900
- if (!registry) {
901
- throw AgentError.notFoundError(`Agent '${agentTag}' not found`);
902
- }
903
- registry.register(tool);
904
- // Update agent definition
905
- const agent = this.localAgents.get(agentTag);
906
- if (agent) {
907
- agent.toolSchemas = registry.getSchemas();
908
- }
909
- }
910
- /**
911
- * Remove a tool from an agent
912
- */
913
- removeTool(agentTag, toolTag) {
914
- const registry = this.toolRegistries.get(agentTag);
915
- if (!registry) {
916
- return false;
917
- }
918
- const removed = registry.unregister(toolTag);
919
- // Update agent definition
920
- if (removed) {
921
- const agent = this.localAgents.get(agentTag);
922
- if (agent) {
923
- agent.toolSchemas = registry.getSchemas();
924
- }
925
- }
926
- return removed;
927
- }
928
- /**
929
- * Get tools for an agent
930
- */
931
- getTools(agentTag) {
932
- const registry = this.toolRegistries.get(agentTag);
933
- if (!registry) {
934
- return [];
935
- }
936
- return registry.getSchemas();
937
- }
938
- // ==================== AGENT AS TOOL ====================
939
- /**
940
- * Convert an agent into a tool that can be used by another agent
941
- *
942
- * This enables multi-agent orchestration where a "manager" agent can
943
- * delegate tasks to specialized agents.
944
- *
945
- * @example
946
- * ```ts
947
- * // Define specialized agents
948
- * const researchAgent = await ductape.agents.define({
949
- * tag: 'research-agent',
950
- * name: 'Research Agent',
951
- * // ...
952
- * });
953
- *
954
- * const writerAgent = await ductape.agents.define({
955
- * tag: 'writer-agent',
956
- * name: 'Writer Agent',
957
- * // ...
958
- * });
959
- *
960
- * // Create a manager agent that can delegate to specialists
961
- * const managerAgent = await ductape.agents.define({
962
- * tag: 'manager-agent',
963
- * name: 'Project Manager',
964
- * tools: [
965
- * ductape.agents.asTool({
966
- * agentTag: 'research-agent',
967
- * product: 'my-product',
968
- * options: {
969
- * toolDescription: 'Delegate research tasks to the research specialist',
970
- * },
971
- * }),
972
- * ductape.agents.asTool({
973
- * agentTag: 'writer-agent',
974
- * product: 'my-product',
975
- * options: {
976
- * toolDescription: 'Delegate writing tasks to the writing specialist',
977
- * },
978
- * }),
979
- * ],
980
- * });
981
- * ```
982
- */
983
- asTool(definition) {
984
- const { agentTag, product, env, options = {} } = definition;
985
- // Get the agent definition to extract metadata
986
- const agent = this.localAgents.get(agentTag);
987
- // Build input schema - either from options or use a generic input schema
988
- const inputSchema = options.inputSchema || {
989
- task: {
990
- type: 'string',
991
- description: 'The task or instruction to give to the agent',
992
- required: true,
993
- },
994
- context: {
995
- type: 'object',
996
- description: 'Additional context or data to pass to the agent',
997
- },
998
- };
999
- // Create the tool
1000
- const tool = {
1001
- tag: options.toolTag || `agent:${agentTag}`,
1002
- name: options.toolName || (agent === null || agent === void 0 ? void 0 : agent.name) || agentTag,
1003
- description: options.toolDescription ||
1004
- (agent === null || agent === void 0 ? void 0 : agent.description) ||
1005
- `Delegate task to the ${agentTag} agent`,
1006
- parameters: inputSchema,
1007
- requiresConfirmation: options.requiresConfirmation,
1008
- timeout: options.timeout,
1009
- retries: options.retries,
1010
- handler: async (ctx, params) => {
1011
- var _a;
1012
- // Transform input if transformer provided
1013
- const input = options.inputTransform
1014
- ? options.inputTransform(params)
1015
- : params;
1016
- // Build the input message for the sub-agent
1017
- const inputMessage = typeof input === 'string'
1018
- ? input
1019
- : input.task ||
1020
- JSON.stringify(input);
1021
- // Run the sub-agent
1022
- // When delegating to sub-agent, append agent tag to session for traceability
1023
- const subAgentSession = ctx.session ? `${ctx.session}:${agentTag}` : undefined;
1024
- const result = await this.run({
1025
- product,
1026
- env: env || ctx.env,
1027
- tag: agentTag,
1028
- input: typeof inputMessage === 'string' ? { message: inputMessage } : inputMessage,
1029
- session: subAgentSession,
1030
- });
1031
- // Transform output if transformer provided
1032
- if (options.outputTransform) {
1033
- return options.outputTransform(result);
1034
- }
1035
- // Return full details or just output based on options
1036
- if (options.includeDetails) {
1037
- return {
1038
- agent: agentTag,
1039
- status: result.status,
1040
- output: result.output,
1041
- iterations: result.iterations,
1042
- toolCalls: (_a = result.toolCalls) === null || _a === void 0 ? void 0 : _a.map((tc) => ({
1043
- tool: tc.tool,
1044
- success: tc.success,
1045
- })),
1046
- executionTime: result.executionTime,
1047
- };
1048
- }
1049
- // Default: return just the output
1050
- return result.output;
1051
- },
1052
- };
1053
- return tool;
1054
- }
1055
- /**
1056
- * Create an agent tool from a handlerRef string
1057
- *
1058
- * @example
1059
- * ```ts
1060
- * // In tool definition
1061
- * {
1062
- * tag: 'delegate-research',
1063
- * handlerRef: 'agent:research-agent',
1064
- * }
1065
- * ```
1066
- */
1067
- createAgentToolFromRef(handlerRef, product, env) {
1068
- // Parse handlerRef: "agent:agent-tag" or "agent:agent-tag:options"
1069
- const parts = handlerRef.split(':');
1070
- if (parts[0] !== 'agent') {
1071
- throw AgentError.validationError(`Invalid agent handlerRef format: ${handlerRef}. Expected "agent:agent-tag"`);
1072
- }
1073
- const agentTag = parts[1];
1074
- return async (ctx, params) => {
1075
- const input = typeof params === 'string'
1076
- ? params
1077
- : params.task || JSON.stringify(params);
1078
- // When delegating to sub-agent, append agent tag to session for traceability
1079
- const subAgentSession = ctx.session ? `${ctx.session}:${agentTag}` : undefined;
1080
- const result = await this.run({
1081
- product,
1082
- env,
1083
- tag: agentTag,
1084
- input: typeof input === 'string' ? { message: input } : input,
1085
- session: subAgentSession,
1086
- });
1087
- return result.output;
1088
- };
1089
- }
1090
- // ==================== UTILITIES ====================
1091
- /**
1092
- * Get a defined agent by tag
1093
- */
1094
- getAgent(tag) {
1095
- return this.localAgents.get(tag);
1096
- }
1097
- /**
1098
- * List all defined agents
1099
- */
1100
- listAgents() {
1101
- return Array.from(this.localAgents.values());
1102
- }
1103
- /**
1104
- * Delete an agent definition
1105
- */
1106
- deleteAgent(tag) {
1107
- this.toolRegistries.delete(tag);
1108
- return this.localAgents.delete(tag);
1109
- }
1110
- /**
1111
- * Clear all agent definitions
1112
- */
1113
- clearAll() {
1114
- this.localAgents.clear();
1115
- this.toolRegistries.clear();
1116
- this.activeExecutors.clear();
1117
- }
1118
- // ==================== PRIVATE HELPERS ====================
1119
- /**
1120
- * Convert a stored IProductAgent to IDefinedAgent format
1121
- */
1122
- convertProductAgentToDefinedAgent(storedAgent) {
1123
- var _a;
1124
- return {
1125
- tag: storedAgent.tag,
1126
- name: storedAgent.name,
1127
- description: storedAgent.description,
1128
- model: storedAgent.model, // Model tag reference - resolved at runtime
1129
- modelConfig: storedAgent.modelConfig,
1130
- systemPrompt: storedAgent.systemPrompt,
1131
- toolSchemas: (storedAgent.tools || []).map((tool) => ({
1132
- tag: tool.tag,
1133
- name: tool.name,
1134
- description: tool.description,
1135
- parameters: tool.parameters,
1136
- requiresConfirmation: tool.requiresConfirmation,
1137
- costEstimate: tool.costEstimate,
1138
- timeout: tool.timeout,
1139
- retries: tool.retries,
1140
- })),
1141
- termination: storedAgent.termination ? {
1142
- maxIterations: storedAgent.termination.maxIterations,
1143
- maxTokens: storedAgent.termination.maxTokens,
1144
- timeout: storedAgent.termination.timeout,
1145
- allowManualStop: storedAgent.termination.allowManualStop,
1146
- } : undefined,
1147
- memory: storedAgent.memory ? {
1148
- shortTerm: storedAgent.memory.shortTerm,
1149
- longTerm: storedAgent.memory.longTerm,
1150
- } : undefined,
1151
- humanInLoop: storedAgent.humanInLoop ? {
1152
- enabled: storedAgent.humanInLoop.enabled,
1153
- alwaysRequireApproval: storedAgent.humanInLoop.alwaysRequireApproval,
1154
- approvalTimeout: storedAgent.humanInLoop.approvalTimeout,
1155
- approvalWebhook: storedAgent.humanInLoop.approvalWebhook,
1156
- approvalBroker: storedAgent.humanInLoop.approvalBroker,
1157
- } : undefined,
1158
- streaming: storedAgent.streaming ? {
1159
- enabled: storedAgent.streaming.enabled,
1160
- events: storedAgent.streaming.events,
1161
- webhook: storedAgent.streaming.webhook,
1162
- broker: storedAgent.streaming.broker,
1163
- } : undefined,
1164
- inputSchema: storedAgent.inputSchema,
1165
- envs: (_a = storedAgent.envs) === null || _a === void 0 ? void 0 : _a.map((env) => ({
1166
- slug: env.slug,
1167
- active: env.active,
1168
- model: env.model, // Model tag override - resolved at runtime
1169
- modelConfig: env.modelConfig,
1170
- toolOverrides: env.toolOverrides,
1171
- })),
1172
- resilience: storedAgent.resilience,
1173
- };
1174
- }
1175
- /**
1176
- * Create a handler function from a handlerRef string
1177
- * Format: "type:tag:event" (e.g., "action:payment-app:process-payment", "feature:checkout-flow")
1178
- */
1179
- createHandlerFromRef(handlerRef, product, env) {
1180
- const parts = handlerRef.split(':');
1181
- const type = parts[0];
1182
- const tag = parts[1];
1183
- const event = parts[2];
1184
- return async (ctx, params) => {
1185
- switch (type) {
1186
- case 'action':
1187
- return ctx.action.run({
1188
- app: tag,
1189
- event,
1190
- input: params,
1191
- });
1192
- case 'feature':
1193
- return ctx.feature.run({
1194
- feature: tag,
1195
- input: params,
1196
- });
1197
- case 'database':
1198
- return ctx.database.execute({
1199
- database: tag,
1200
- event,
1201
- input: params,
1202
- });
1203
- case 'graph':
1204
- return ctx.graph.execute({
1205
- graph: tag,
1206
- action: event,
1207
- input: params,
1208
- });
1209
- case 'storage':
1210
- return ctx.storage.upload({
1211
- storage: tag,
1212
- event,
1213
- input: params,
1214
- });
1215
- case 'notification':
1216
- await ctx.notification.send({
1217
- notification: tag,
1218
- event,
1219
- input: params,
1220
- });
1221
- return { success: true };
1222
- case 'publish':
1223
- await ctx.messaging.produce({
1224
- event: `${tag}:${event}`,
1225
- message: (params || {}),
1226
- });
1227
- return { success: true };
1228
- case 'agent':
1229
- // Delegate to another agent
1230
- // Format: "agent:agent-tag"
1231
- const input = typeof params === 'string'
1232
- ? params
1233
- : params.task || JSON.stringify(params);
1234
- // When delegating to sub-agent, append agent tag to session for traceability
1235
- const subAgentSession = ctx.session ? `${ctx.session}:${tag}` : undefined;
1236
- const result = await this.run({
1237
- product,
1238
- env,
1239
- tag,
1240
- input: typeof input === 'string' ? { message: input } : input,
1241
- session: subAgentSession,
1242
- });
1243
- return result.output;
1244
- default:
1245
- throw new Error(`Unknown handler type: ${type}`);
1246
- }
1247
- };
1248
- }
1249
- }
1250
- exports.AgentsService = AgentsService;
1251
- // Export singleton instance for convenience
1252
- exports.agentsService = new AgentsService();
1253
- // Default export
1254
- exports.default = AgentsService;
1255
- //# sourceMappingURL=agents.service.js.map