n8n 2.20.6 → 2.21.0

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 (580) hide show
  1. package/dist/abstract-server.d.ts +1 -0
  2. package/dist/abstract-server.js +10 -3
  3. package/dist/abstract-server.js.map +1 -1
  4. package/dist/agent-library-bundle.js +5989 -0
  5. package/dist/auth/auth.service.js +3 -3
  6. package/dist/auth/auth.service.js.map +1 -1
  7. package/dist/build.tsbuildinfo +1 -1
  8. package/dist/commands/execute-batch.d.ts +2 -2
  9. package/dist/commands/export/workflow.d.ts +2 -2
  10. package/dist/commands/import/workflow.d.ts +3 -0
  11. package/dist/commands/import/workflow.js +15 -1
  12. package/dist/commands/import/workflow.js.map +1 -1
  13. package/dist/commands/start.js +2 -0
  14. package/dist/commands/start.js.map +1 -1
  15. package/dist/constants.d.ts +1 -0
  16. package/dist/constants.js +6 -1
  17. package/dist/constants.js.map +1 -1
  18. package/dist/controller.registry.js +6 -0
  19. package/dist/controller.registry.js.map +1 -1
  20. package/dist/controllers/auth.controller.js +7 -2
  21. package/dist/controllers/auth.controller.js.map +1 -1
  22. package/dist/controllers/me.controller.d.ts +1 -0
  23. package/dist/controllers/me.controller.js +4 -1
  24. package/dist/controllers/me.controller.js.map +1 -1
  25. package/dist/controllers/users.controller.d.ts +2 -2
  26. package/dist/credentials/credentials.service.d.ts +1 -0
  27. package/dist/credentials/credentials.service.js +11 -4
  28. package/dist/credentials/credentials.service.js.map +1 -1
  29. package/dist/evaluation.ee/evaluation-api-error.d.ts +7 -0
  30. package/dist/evaluation.ee/evaluation-api-error.js +16 -0
  31. package/dist/evaluation.ee/evaluation-api-error.js.map +1 -0
  32. package/dist/evaluation.ee/evaluation-config-validator.d.ts +30 -0
  33. package/dist/evaluation.ee/evaluation-config-validator.js +236 -0
  34. package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -0
  35. package/dist/evaluation.ee/evaluation-config.controller.d.ts +24 -0
  36. package/dist/evaluation.ee/evaluation-config.controller.js +94 -0
  37. package/dist/evaluation.ee/evaluation-config.controller.js.map +1 -0
  38. package/dist/evaluation.ee/evaluation-config.service.d.ts +18 -0
  39. package/dist/evaluation.ee/evaluation-config.service.js +74 -0
  40. package/dist/evaluation.ee/evaluation-config.service.js.map +1 -0
  41. package/dist/evaluation.ee/llm-judge-provider-registry.d.ts +13 -0
  42. package/dist/evaluation.ee/llm-judge-provider-registry.js +122 -0
  43. package/dist/evaluation.ee/llm-judge-provider-registry.js.map +1 -0
  44. package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +5 -0
  45. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +32 -10
  46. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
  47. package/dist/evaluation.ee/test-runner/workflow-compiler.service.d.ts +22 -0
  48. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +285 -0
  49. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -0
  50. package/dist/evaluation.ee/test-runs.controller.ee.d.ts +3 -0
  51. package/dist/evaluation.ee/test-runs.controller.ee.js +26 -9
  52. package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
  53. package/dist/evaluation.ee/test-runs.types.ee.d.ts +3 -0
  54. package/dist/eventbus/message-event-bus/message-event-bus.d.ts +2 -0
  55. package/dist/eventbus/message-event-bus/message-event-bus.js +54 -46
  56. package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
  57. package/dist/events/maps/relay.event-map.d.ts +3 -0
  58. package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +4 -2
  59. package/dist/instance-settings-loader/instance-settings-loader.service.js +7 -3
  60. package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -1
  61. package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.d.ts +20 -0
  62. package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js +235 -0
  63. package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js.map +1 -0
  64. package/dist/instance-settings-loader/loaders/{sso.instance-settings-loader.d.ts → sso/oidc.instance-settings-loader.d.ts} +4 -10
  65. package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js +98 -0
  66. package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js.map +1 -0
  67. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +10 -0
  68. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +65 -0
  69. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -0
  70. package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.d.ts +12 -0
  71. package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js +75 -0
  72. package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js.map +1 -0
  73. package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.d.ts +15 -0
  74. package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js +75 -0
  75. package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js.map +1 -0
  76. package/dist/load-nodes-and-credentials.d.ts +3 -3
  77. package/dist/load-nodes-and-credentials.js +25 -17
  78. package/dist/load-nodes-and-credentials.js.map +1 -1
  79. package/dist/modules/agents/adapters/agents-credential-provider.d.ts +12 -0
  80. package/dist/modules/agents/adapters/agents-credential-provider.js +63 -0
  81. package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -0
  82. package/dist/modules/agents/agent-execution.service.d.ts +42 -0
  83. package/dist/modules/agents/agent-execution.service.js +153 -0
  84. package/dist/modules/agents/agent-execution.service.js.map +1 -0
  85. package/dist/modules/agents/agent-message-mapper.d.ts +5 -0
  86. package/dist/modules/agents/agent-message-mapper.js +43 -0
  87. package/dist/modules/agents/agent-message-mapper.js.map +1 -0
  88. package/dist/modules/agents/agent-skills.service.d.ts +24 -0
  89. package/dist/modules/agents/agent-skills.service.js +166 -0
  90. package/dist/modules/agents/agent-skills.service.js.map +1 -0
  91. package/dist/modules/agents/agent-sse-stream.d.ts +15 -0
  92. package/dist/modules/agents/agent-sse-stream.js +194 -0
  93. package/dist/modules/agents/agent-sse-stream.js.map +1 -0
  94. package/dist/modules/agents/agents-tools.service.d.ts +18 -0
  95. package/dist/modules/agents/agents-tools.service.js +193 -0
  96. package/dist/modules/agents/agents-tools.service.js.map +1 -0
  97. package/dist/modules/agents/agents.controller.d.ts +260 -0
  98. package/dist/modules/agents/agents.controller.js +818 -0
  99. package/dist/modules/agents/agents.controller.js.map +1 -0
  100. package/dist/modules/agents/agents.module.d.ts +12 -0
  101. package/dist/modules/agents/agents.module.js +136 -0
  102. package/dist/modules/agents/agents.module.js.map +1 -0
  103. package/dist/modules/agents/agents.service.d.ts +151 -0
  104. package/dist/modules/agents/agents.service.js +1134 -0
  105. package/dist/modules/agents/agents.service.js.map +1 -0
  106. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +27 -0
  107. package/dist/modules/agents/builder/agents-builder-prompts.js +584 -0
  108. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -0
  109. package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +11 -0
  110. package/dist/modules/agents/builder/agents-builder-settings.controller.js +61 -0
  111. package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +1 -0
  112. package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +31 -0
  113. package/dist/modules/agents/builder/agents-builder-settings.service.js +199 -0
  114. package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -0
  115. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +31 -0
  116. package/dist/modules/agents/builder/agents-builder-tools.service.js +420 -0
  117. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -0
  118. package/dist/modules/agents/builder/agents-builder.service.d.ts +26 -0
  119. package/dist/modules/agents/builder/agents-builder.service.js +164 -0
  120. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -0
  121. package/dist/modules/agents/builder/builder-model-lookup.service.d.ts +17 -0
  122. package/dist/modules/agents/builder/builder-model-lookup.service.js +67 -0
  123. package/dist/modules/agents/builder/builder-model-lookup.service.js.map +1 -0
  124. package/dist/modules/agents/builder/builder-tool-names.d.ts +14 -0
  125. package/dist/modules/agents/builder/builder-tool-names.js +17 -0
  126. package/dist/modules/agents/builder/builder-tool-names.js.map +1 -0
  127. package/dist/modules/agents/builder/errors.d.ts +6 -0
  128. package/dist/modules/agents/builder/errors.js +13 -0
  129. package/dist/modules/agents/builder/errors.js.map +1 -0
  130. package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +5 -0
  131. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +29 -0
  132. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -0
  133. package/dist/modules/agents/builder/interactive/ask-llm.tool.d.ts +2 -0
  134. package/dist/modules/agents/builder/interactive/ask-llm.tool.js +27 -0
  135. package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -0
  136. package/dist/modules/agents/builder/interactive/ask-question.tool.d.ts +2 -0
  137. package/dist/modules/agents/builder/interactive/ask-question.tool.js +26 -0
  138. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -0
  139. package/dist/modules/agents/builder/interactive/index.d.ts +4 -0
  140. package/dist/modules/agents/builder/interactive/index.js +12 -0
  141. package/dist/modules/agents/builder/interactive/index.js.map +1 -0
  142. package/dist/modules/agents/builder/interactive/llm-provider-defaults.d.ts +17 -0
  143. package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +60 -0
  144. package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -0
  145. package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +13 -0
  146. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +136 -0
  147. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -0
  148. package/dist/modules/agents/entities/agent-checkpoint.entity.d.ts +9 -0
  149. package/dist/modules/agents/entities/agent-checkpoint.entity.js +43 -0
  150. package/dist/modules/agents/entities/agent-checkpoint.entity.js.map +1 -0
  151. package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +16 -0
  152. package/dist/modules/agents/entities/agent-execution-thread.entity.js +74 -0
  153. package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -0
  154. package/dist/modules/agents/entities/agent-execution.entity.d.ts +26 -0
  155. package/dist/modules/agents/entities/agent-execution.entity.js +100 -0
  156. package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -0
  157. package/dist/modules/agents/entities/agent-message.entity.d.ts +10 -0
  158. package/dist/modules/agents/entities/agent-message.entity.js +47 -0
  159. package/dist/modules/agents/entities/agent-message.entity.js.map +1 -0
  160. package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +8 -0
  161. package/dist/modules/agents/entities/agent-observation-cursor.entity.js +37 -0
  162. package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -0
  163. package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +8 -0
  164. package/dist/modules/agents/entities/agent-observation-lock.entity.js +37 -0
  165. package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -0
  166. package/dist/modules/agents/entities/agent-observation.entity.d.ts +10 -0
  167. package/dist/modules/agents/entities/agent-observation.entity.js +47 -0
  168. package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -0
  169. package/dist/modules/agents/entities/agent-published-version.entity.d.ts +22 -0
  170. package/dist/modules/agents/entities/agent-published-version.entity.js +67 -0
  171. package/dist/modules/agents/entities/agent-published-version.entity.js.map +1 -0
  172. package/dist/modules/agents/entities/agent-resource.entity.d.ts +5 -0
  173. package/dist/modules/agents/entities/agent-resource.entity.js +29 -0
  174. package/dist/modules/agents/entities/agent-resource.entity.js.map +1 -0
  175. package/dist/modules/agents/entities/agent-thread.entity.d.ts +6 -0
  176. package/dist/modules/agents/entities/agent-thread.entity.js +33 -0
  177. package/dist/modules/agents/entities/agent-thread.entity.js.map +1 -0
  178. package/dist/modules/agents/entities/agent.entity.d.ts +24 -0
  179. package/dist/modules/agents/entities/agent.entity.js +74 -0
  180. package/dist/modules/agents/entities/agent.entity.js.map +1 -0
  181. package/dist/modules/agents/execution-recorder.d.ts +82 -0
  182. package/dist/modules/agents/execution-recorder.js +272 -0
  183. package/dist/modules/agents/execution-recorder.js.map +1 -0
  184. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +62 -0
  185. package/dist/modules/agents/integrations/agent-chat-bridge.js +540 -0
  186. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -0
  187. package/dist/modules/agents/integrations/agent-chat-integration.d.ts +39 -0
  188. package/dist/modules/agents/integrations/agent-chat-integration.js +45 -0
  189. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -0
  190. package/dist/modules/agents/integrations/agent-schedule.service.d.ts +30 -0
  191. package/dist/modules/agents/integrations/agent-schedule.service.js +327 -0
  192. package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -0
  193. package/dist/modules/agents/integrations/callback-store.d.ts +11 -0
  194. package/dist/modules/agents/integrations/callback-store.js +30 -0
  195. package/dist/modules/agents/integrations/callback-store.js.map +1 -0
  196. package/dist/modules/agents/integrations/chat-integration.service.d.ts +58 -0
  197. package/dist/modules/agents/integrations/chat-integration.service.js +397 -0
  198. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -0
  199. package/dist/modules/agents/integrations/component-mapper.d.ts +57 -0
  200. package/dist/modules/agents/integrations/component-mapper.js +223 -0
  201. package/dist/modules/agents/integrations/component-mapper.js.map +1 -0
  202. package/dist/modules/agents/integrations/cron-validation.d.ts +1 -0
  203. package/dist/modules/agents/integrations/cron-validation.js +8 -0
  204. package/dist/modules/agents/integrations/cron-validation.js.map +1 -0
  205. package/dist/modules/agents/integrations/esm-loader.d.ts +5 -0
  206. package/dist/modules/agents/integrations/esm-loader.js +24 -0
  207. package/dist/modules/agents/integrations/esm-loader.js.map +1 -0
  208. package/dist/modules/agents/integrations/integrations-sync.d.ts +4 -0
  209. package/dist/modules/agents/integrations/integrations-sync.js +78 -0
  210. package/dist/modules/agents/integrations/integrations-sync.js.map +1 -0
  211. package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +36 -0
  212. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +148 -0
  213. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -0
  214. package/dist/modules/agents/integrations/n8n-memory.d.ts +76 -0
  215. package/dist/modules/agents/integrations/n8n-memory.js +383 -0
  216. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -0
  217. package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +14 -0
  218. package/dist/modules/agents/integrations/platforms/linear-integration.js +83 -0
  219. package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -0
  220. package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +12 -0
  221. package/dist/modules/agents/integrations/platforms/slack-integration.js +81 -0
  222. package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -0
  223. package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +30 -0
  224. package/dist/modules/agents/integrations/platforms/telegram-integration.js +122 -0
  225. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -0
  226. package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +47 -0
  227. package/dist/modules/agents/integrations/rich-interaction-tool.js +109 -0
  228. package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -0
  229. package/dist/modules/agents/integrations/types.d.ts +8 -0
  230. package/dist/modules/agents/integrations/types.js +12 -0
  231. package/dist/modules/agents/integrations/types.js.map +1 -0
  232. package/dist/modules/agents/json-config/agent-config-composition.d.ts +9 -0
  233. package/dist/modules/agents/json-config/agent-config-composition.js +27 -0
  234. package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -0
  235. package/dist/modules/agents/json-config/agent-json-config.d.ts +1022 -0
  236. package/dist/modules/agents/json-config/agent-json-config.js +128 -0
  237. package/dist/modules/agents/json-config/agent-json-config.js.map +1 -0
  238. package/dist/modules/agents/json-config/credential-field-mapping.d.ts +4 -0
  239. package/dist/modules/agents/json-config/credential-field-mapping.js +41 -0
  240. package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -0
  241. package/dist/modules/agents/json-config/from-json-config.d.ts +18 -0
  242. package/dist/modules/agents/json-config/from-json-config.js +209 -0
  243. package/dist/modules/agents/json-config/from-json-config.js.map +1 -0
  244. package/dist/modules/agents/json-config/integration-config.d.ts +61 -0
  245. package/dist/modules/agents/json-config/integration-config.js +33 -0
  246. package/dist/modules/agents/json-config/integration-config.js.map +1 -0
  247. package/dist/modules/agents/json-config/provider-tool-aliases.d.ts +1 -0
  248. package/dist/modules/agents/json-config/provider-tool-aliases.js +15 -0
  249. package/dist/modules/agents/json-config/provider-tool-aliases.js.map +1 -0
  250. package/dist/modules/agents/json-config/schema-text-serializer.d.ts +2 -0
  251. package/dist/modules/agents/json-config/schema-text-serializer.js +205 -0
  252. package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -0
  253. package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +6 -0
  254. package/dist/modules/agents/repositories/agent-checkpoint.repository.js +35 -0
  255. package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -0
  256. package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +18 -0
  257. package/dist/modules/agents/repositories/agent-execution-thread.repository.js +120 -0
  258. package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -0
  259. package/dist/modules/agents/repositories/agent-execution.repository.d.ts +10 -0
  260. package/dist/modules/agents/repositories/agent-execution.repository.js +59 -0
  261. package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -0
  262. package/dist/modules/agents/repositories/agent-message.repository.d.ts +5 -0
  263. package/dist/modules/agents/repositories/agent-message.repository.js +26 -0
  264. package/dist/modules/agents/repositories/agent-message.repository.js.map +1 -0
  265. package/dist/modules/agents/repositories/agent-observation-cursor.repository.d.ts +5 -0
  266. package/dist/modules/agents/repositories/agent-observation-cursor.repository.js +26 -0
  267. package/dist/modules/agents/repositories/agent-observation-cursor.repository.js.map +1 -0
  268. package/dist/modules/agents/repositories/agent-observation-lock.repository.d.ts +5 -0
  269. package/dist/modules/agents/repositories/agent-observation-lock.repository.js +26 -0
  270. package/dist/modules/agents/repositories/agent-observation-lock.repository.js.map +1 -0
  271. package/dist/modules/agents/repositories/agent-observation.repository.d.ts +5 -0
  272. package/dist/modules/agents/repositories/agent-observation.repository.js +26 -0
  273. package/dist/modules/agents/repositories/agent-observation.repository.js.map +1 -0
  274. package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +20 -0
  275. package/dist/modules/agents/repositories/agent-published-version.repository.js +35 -0
  276. package/dist/modules/agents/repositories/agent-published-version.repository.js.map +1 -0
  277. package/dist/modules/agents/repositories/agent-resource.repository.d.ts +5 -0
  278. package/dist/modules/agents/repositories/agent-resource.repository.js +26 -0
  279. package/dist/modules/agents/repositories/agent-resource.repository.js.map +1 -0
  280. package/dist/modules/agents/repositories/agent-thread.repository.d.ts +5 -0
  281. package/dist/modules/agents/repositories/agent-thread.repository.js +26 -0
  282. package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -0
  283. package/dist/modules/agents/repositories/agent.repository.d.ts +9 -0
  284. package/dist/modules/agents/repositories/agent.repository.js +50 -0
  285. package/dist/modules/agents/repositories/agent.repository.js.map +1 -0
  286. package/dist/modules/agents/runtime/agent-isolate-pool.d.ts +48 -0
  287. package/dist/modules/agents/runtime/agent-isolate-pool.js +246 -0
  288. package/dist/modules/agents/runtime/agent-isolate-pool.js.map +1 -0
  289. package/dist/modules/agents/runtime/agent-secure-runtime.d.ts +21 -0
  290. package/dist/modules/agents/runtime/agent-secure-runtime.js +281 -0
  291. package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -0
  292. package/dist/modules/agents/runtime/sandbox-polyfills.d.ts +1 -0
  293. package/dist/modules/agents/runtime/sandbox-polyfills.js +74 -0
  294. package/dist/modules/agents/runtime/sandbox-polyfills.js.map +1 -0
  295. package/dist/modules/agents/tool-registry.d.ts +13 -0
  296. package/dist/modules/agents/tool-registry.js +42 -0
  297. package/dist/modules/agents/tool-registry.js.map +1 -0
  298. package/dist/modules/agents/tools/environment-tool.d.ts +3 -0
  299. package/dist/modules/agents/tools/environment-tool.js +26 -0
  300. package/dist/modules/agents/tools/environment-tool.js.map +1 -0
  301. package/dist/modules/agents/tools/node-tool-factory.d.ts +10 -0
  302. package/dist/modules/agents/tools/node-tool-factory.js +100 -0
  303. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -0
  304. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +43 -0
  305. package/dist/modules/agents/tools/workflow-tool-factory.js +404 -0
  306. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -0
  307. package/dist/modules/agents/tracing/builder-telemetry.d.ts +12 -0
  308. package/dist/modules/agents/tracing/builder-telemetry.js +48 -0
  309. package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -0
  310. package/dist/modules/agents/types/components.d.ts +71 -0
  311. package/dist/modules/agents/types/components.js +3 -0
  312. package/dist/modules/agents/types/components.js.map +1 -0
  313. package/dist/modules/agents/types/index.d.ts +1 -0
  314. package/dist/modules/agents/types/index.js +3 -0
  315. package/dist/modules/agents/types/index.js.map +1 -0
  316. package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -0
  317. package/dist/modules/agents/utils/agent-draft.utils.js +11 -0
  318. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -0
  319. package/dist/modules/agents/utils/agent-resource-id.d.ts +3 -0
  320. package/dist/modules/agents/utils/agent-resource-id.js +14 -0
  321. package/dist/modules/agents/utils/agent-resource-id.js.map +1 -0
  322. package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
  323. package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
  324. package/dist/modules/chat-hub/chat-hub.types.d.ts +2 -2
  325. package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
  326. package/dist/modules/community-packages/community-packages.config.js +2 -2
  327. package/dist/modules/community-packages/community-packages.config.js.map +1 -1
  328. package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +4 -1
  329. package/dist/modules/community-packages/community-packages.lifecycle.service.js +14 -2
  330. package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
  331. package/dist/modules/community-packages/community-packages.module.d.ts +1 -1
  332. package/dist/modules/community-packages/community-packages.module.js +10 -5
  333. package/dist/modules/community-packages/community-packages.module.js.map +1 -1
  334. package/dist/modules/data-table/data-table.service.js +6 -0
  335. package/dist/modules/data-table/data-table.service.js.map +1 -1
  336. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.d.ts +1 -1
  337. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.d.ts +2 -0
  338. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js +10 -0
  339. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js.map +1 -1
  340. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +1 -1
  341. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +16 -4
  342. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
  343. package/dist/modules/dynamic-credentials.ee/workflow-status.controller.d.ts +3 -3
  344. package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +11 -3
  345. package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
  346. package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js +4 -2
  347. package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js.map +1 -1
  348. package/dist/modules/encryption-key-manager/encryption-key-manager.module.js +5 -2
  349. package/dist/modules/encryption-key-manager/encryption-key-manager.module.js.map +1 -1
  350. package/dist/modules/encryption-key-manager/encryption-key.controller.d.ts +3 -3
  351. package/dist/modules/encryption-key-manager/encryption-key.controller.js +8 -2
  352. package/dist/modules/encryption-key-manager/encryption-key.controller.js.map +1 -1
  353. package/dist/modules/encryption-key-manager/key-manager.service.d.ts +5 -1
  354. package/dist/modules/encryption-key-manager/key-manager.service.js +11 -4
  355. package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
  356. package/dist/modules/insights/insights-collection.service.js +1 -0
  357. package/dist/modules/insights/insights-collection.service.js.map +1 -1
  358. package/dist/modules/instance-ai/eval/mock-handler.js +17 -49
  359. package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
  360. package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +1 -0
  361. package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +21 -3
  362. package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -1
  363. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +3 -2
  364. package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -9
  365. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  366. package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +21 -2
  367. package/dist/modules/instance-ai/instance-ai-test.controller.js +35 -3
  368. package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
  369. package/dist/modules/instance-ai/instance-ai.adapter.service.js +72 -42
  370. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  371. package/dist/modules/instance-ai/instance-ai.controller.d.ts +2 -0
  372. package/dist/modules/instance-ai/instance-ai.controller.js +25 -1
  373. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  374. package/dist/modules/instance-ai/instance-ai.module.d.ts +0 -1
  375. package/dist/modules/instance-ai/instance-ai.module.js +0 -2
  376. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  377. package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -5
  378. package/dist/modules/instance-ai/instance-ai.service.js +723 -76
  379. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  380. package/dist/modules/instance-ai/liveness/index.d.ts +1 -0
  381. package/dist/modules/instance-ai/liveness/index.js +7 -0
  382. package/dist/modules/instance-ai/liveness/index.js.map +1 -0
  383. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +72 -0
  384. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +123 -0
  385. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -0
  386. package/dist/modules/instance-ai/message-parser.js +85 -6
  387. package/dist/modules/instance-ai/message-parser.js.map +1 -1
  388. package/dist/modules/instance-ai/storage/db-snapshot-storage.js +4 -0
  389. package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
  390. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +1 -0
  391. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -1
  392. package/dist/modules/instance-ai/web-research/fetch-and-extract.js +23 -7
  393. package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
  394. package/dist/modules/mcp/mcp.service.d.ts +3 -3
  395. package/dist/modules/mcp/mcp.service.js +12 -9
  396. package/dist/modules/mcp/mcp.service.js.map +1 -1
  397. package/dist/modules/mcp/tools/get-execution.tool.js +6 -4
  398. package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
  399. package/dist/modules/mcp/tools/list-credentials.tool.d.ts +40 -0
  400. package/dist/modules/mcp/tools/list-credentials.tool.js +148 -0
  401. package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -0
  402. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +5 -4
  403. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  404. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.d.ts +2 -2
  405. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +3 -3
  406. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +1 -1
  407. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
  408. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +2 -2
  409. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
  410. package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +3 -2
  411. package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
  412. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +3 -3
  413. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
  414. package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.d.ts +1 -1
  415. package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +12 -4
  416. package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
  417. package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +2 -2
  418. package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +12 -5
  419. package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
  420. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +1 -2
  421. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  422. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +1 -1
  423. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
  424. package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +5 -1
  425. package/dist/modules/mcp/tools/workflow-validation.utils.js +4 -2
  426. package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
  427. package/dist/modules/mcp-registry/mcp-registry-node-loader.d.ts +27 -0
  428. package/dist/modules/mcp-registry/mcp-registry-node-loader.js +105 -0
  429. package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -0
  430. package/dist/modules/mcp-registry/mcp-registry-node-loader.test.d.ts +1 -0
  431. package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js +244 -0
  432. package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js.map +1 -0
  433. package/dist/modules/mcp-registry/mcp-registry.module.d.ts +4 -0
  434. package/dist/modules/mcp-registry/mcp-registry.module.js +60 -0
  435. package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -0
  436. package/dist/modules/mcp-registry/node-description-transform.d.ts +8 -0
  437. package/dist/modules/mcp-registry/node-description-transform.js +133 -0
  438. package/dist/modules/mcp-registry/node-description-transform.js.map +1 -0
  439. package/dist/modules/mcp-registry/node-description-transform.test.d.ts +1 -0
  440. package/dist/modules/mcp-registry/node-description-transform.test.js +286 -0
  441. package/dist/modules/mcp-registry/node-description-transform.test.js.map +1 -0
  442. package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +8 -0
  443. package/dist/modules/mcp-registry/registry/mcp-registry.service.js +31 -0
  444. package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -0
  445. package/dist/modules/mcp-registry/registry/mcp-registry.service.test.d.ts +1 -0
  446. package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js +41 -0
  447. package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js.map +1 -0
  448. package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +36 -0
  449. package/dist/modules/mcp-registry/registry/mcp-registry.types.js +3 -0
  450. package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -0
  451. package/dist/modules/mcp-registry/registry/mock-servers.d.ts +3 -0
  452. package/dist/modules/mcp-registry/registry/mock-servers.js +80 -0
  453. package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -0
  454. package/dist/modules/otel/execution-level-tracer.d.ts +1 -1
  455. package/dist/modules/otel/execution-level-tracer.js +24 -9
  456. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  457. package/dist/modules/otel/execution-level-tracer.types.d.ts +9 -7
  458. package/dist/modules/otel/execution-level-tracer.types.js +14 -0
  459. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  460. package/dist/modules/quick-connect/quick-connect.config.d.ts +176 -0
  461. package/dist/modules/quick-connect/quick-connect.config.js +8 -0
  462. package/dist/modules/quick-connect/quick-connect.config.js.map +1 -1
  463. package/dist/modules/quick-connect/quick-connect.module.d.ts +15 -0
  464. package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -3
  465. package/dist/modules/redaction/executions/execution-redaction.service.js +2 -6
  466. package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
  467. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
  468. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
  469. package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +3 -1
  470. package/dist/modules/sso-oidc/oidc.controller.ee.js +8 -1
  471. package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
  472. package/dist/node-catalog/index.d.ts +1 -0
  473. package/dist/node-catalog/index.js +6 -0
  474. package/dist/node-catalog/index.js.map +1 -0
  475. package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.d.ts → node-catalog/node-catalog.service.d.ts} +9 -15
  476. package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js → node-catalog/node-catalog.service.js} +38 -28
  477. package/dist/node-catalog/node-catalog.service.js.map +1 -0
  478. package/dist/node-execution/ephemeral-node-executor.d.ts +47 -0
  479. package/dist/node-execution/ephemeral-node-executor.js +289 -0
  480. package/dist/node-execution/ephemeral-node-executor.js.map +1 -0
  481. package/dist/node-execution/index.d.ts +2 -0
  482. package/dist/node-execution/index.js +8 -0
  483. package/dist/node-execution/index.js.map +1 -0
  484. package/dist/public-api/v1/handlers/audit/audit.handler.d.ts +5 -4
  485. package/dist/public-api/v1/handlers/audit/audit.handler.js +5 -9
  486. package/dist/public-api/v1/handlers/audit/audit.handler.js.map +1 -1
  487. package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +20 -17
  488. package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +12 -39
  489. package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -1
  490. package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +12 -49
  491. package/dist/public-api/v1/handlers/credentials/credentials.handler.js +6 -5
  492. package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
  493. package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.d.ts +8 -19
  494. package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js +11 -11
  495. package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js.map +1 -1
  496. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.d.ts +9 -17
  497. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +19 -23
  498. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
  499. package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.d.ts +9 -23
  500. package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +17 -27
  501. package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
  502. package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +11 -9
  503. package/dist/public-api/v1/handlers/discover/discover.handler.js +5 -3
  504. package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
  505. package/dist/public-api/v1/handlers/executions/executions.handler.d.ts +12 -11
  506. package/dist/public-api/v1/handlers/executions/executions.handler.js +46 -80
  507. package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
  508. package/dist/public-api/v1/handlers/folders/folders.handler.d.ts +12 -17
  509. package/dist/public-api/v1/handlers/folders/folders.handler.js +17 -20
  510. package/dist/public-api/v1/handlers/folders/folders.handler.js.map +1 -1
  511. package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +5 -4
  512. package/dist/public-api/v1/handlers/insights/insights.handler.js +9 -5
  513. package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -1
  514. package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +28 -11
  515. package/dist/public-api/v1/handlers/projects/projects.handler.js +44 -75
  516. package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
  517. package/dist/public-api/v1/handlers/source-control/source-control.handler.d.ts +5 -6
  518. package/dist/public-api/v1/handlers/source-control/source-control.handler.js +3 -2
  519. package/dist/public-api/v1/handlers/source-control/source-control.handler.js.map +1 -1
  520. package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +9 -8
  521. package/dist/public-api/v1/handlers/tags/tags.handler.js +11 -8
  522. package/dist/public-api/v1/handlers/tags/tags.handler.js.map +1 -1
  523. package/dist/public-api/v1/handlers/users/users.handler.ee.d.ts +14 -11
  524. package/dist/public-api/v1/handlers/users/users.handler.ee.js +7 -8
  525. package/dist/public-api/v1/handlers/users/users.handler.ee.js.map +1 -1
  526. package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +13 -7
  527. package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -3
  528. package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
  529. package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +17 -49
  530. package/dist/public-api/v1/handlers/workflows/workflows.handler.js +27 -46
  531. package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
  532. package/dist/public-api/v1/shared/handler.types.d.ts +7 -1
  533. package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -2
  534. package/dist/public-api/v1/shared/middlewares/global.middleware.js +7 -6
  535. package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
  536. package/dist/scaling/constants.d.ts +2 -2
  537. package/dist/scaling/job-processor.js +2 -0
  538. package/dist/scaling/job-processor.js.map +1 -1
  539. package/dist/scaling/pubsub/pubsub.event-map.d.ts +9 -0
  540. package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
  541. package/dist/scaling/scaling.types.d.ts +1 -0
  542. package/dist/server.d.ts +2 -0
  543. package/dist/server.js +2 -0
  544. package/dist/server.js.map +1 -1
  545. package/dist/services/frontend.service.js +7 -14
  546. package/dist/services/frontend.service.js.map +1 -1
  547. package/dist/services/import.service.d.ts +9 -3
  548. package/dist/services/import.service.js +72 -5
  549. package/dist/services/import.service.js.map +1 -1
  550. package/dist/services/proxy-token-manager.js.map +1 -0
  551. package/dist/services/workflow-statistics.service.js +1 -0
  552. package/dist/services/workflow-statistics.service.js.map +1 -1
  553. package/dist/task-runners/task-broker/task-broker.service.d.ts +2 -0
  554. package/dist/task-runners/task-broker/task-broker.service.js +13 -1
  555. package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
  556. package/dist/utils/ttl-map.d.ts +17 -0
  557. package/dist/utils/ttl-map.js +80 -0
  558. package/dist/utils/ttl-map.js.map +1 -0
  559. package/dist/webhooks/test-webhooks.d.ts +3 -1
  560. package/dist/webhooks/test-webhooks.js +11 -3
  561. package/dist/webhooks/test-webhooks.js.map +1 -1
  562. package/dist/workflow-execute-additional-data.d.ts +2 -1
  563. package/dist/workflow-execute-additional-data.js +34 -0
  564. package/dist/workflow-execute-additional-data.js.map +1 -1
  565. package/dist/workflow-helpers.d.ts +1 -0
  566. package/dist/workflow-helpers.js +15 -0
  567. package/dist/workflow-helpers.js.map +1 -1
  568. package/dist/workflow-runner.js +2 -0
  569. package/dist/workflow-runner.js.map +1 -1
  570. package/dist/workflows/workflow-creation.service.js +1 -0
  571. package/dist/workflows/workflow-creation.service.js.map +1 -1
  572. package/dist/workflows/workflow.service.js +4 -0
  573. package/dist/workflows/workflow.service.js.map +1 -1
  574. package/package.json +40 -25
  575. package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js +0 -203
  576. package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js.map +0 -1
  577. package/dist/modules/instance-ai/proxy-token-manager.js.map +0 -1
  578. package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js.map +0 -1
  579. /package/dist/{modules/instance-ai → services}/proxy-token-manager.d.ts +0 -0
  580. /package/dist/{modules/instance-ai → services}/proxy-token-manager.js +0 -0
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.TelegramIntegration = void 0;
13
+ const backend_common_1 = require("@n8n/backend-common");
14
+ const di_1 = require("@n8n/di");
15
+ const conflict_error_1 = require("../../../../errors/response-errors/conflict.error");
16
+ const url_service_1 = require("../../../../services/url.service");
17
+ const agent_repository_1 = require("../../repositories/agent.repository");
18
+ const agent_chat_integration_1 = require("../agent-chat-integration");
19
+ const esm_loader_1 = require("../esm-loader");
20
+ let TelegramIntegration = class TelegramIntegration extends agent_chat_integration_1.AgentChatIntegration {
21
+ constructor(logger, urlService, agentRepository) {
22
+ super();
23
+ this.logger = logger;
24
+ this.urlService = urlService;
25
+ this.agentRepository = agentRepository;
26
+ this.type = 'telegram';
27
+ this.credentialTypes = ['telegramApi'];
28
+ this.displayLabel = 'Telegram';
29
+ this.displayIcon = 'telegram';
30
+ this.supportedComponents = ['section', 'button', 'divider', 'fields'];
31
+ this.needsShortCallbackData = true;
32
+ this.disableStreaming = true;
33
+ this.formatThreadId = {
34
+ fromSdk: (thread) => {
35
+ const adapter = thread.adapter;
36
+ const botUserId = adapter.botUserId;
37
+ if (!botUserId) {
38
+ throw new Error('Telegram bot user ID is not set');
39
+ }
40
+ return `chat:${botUserId}-${thread.id}`;
41
+ },
42
+ toSdk: (threadId) => {
43
+ if (!threadId.includes('-')) {
44
+ return threadId;
45
+ }
46
+ return threadId.split('-').slice(1).join('-');
47
+ },
48
+ };
49
+ }
50
+ async createAdapter(ctx) {
51
+ const botToken = this.extractBotToken(ctx.credential);
52
+ const mode = this.getMode();
53
+ const { createTelegramAdapter } = await (0, esm_loader_1.loadTelegramAdapter)();
54
+ return createTelegramAdapter({ botToken, mode });
55
+ }
56
+ requiresLeader() {
57
+ return this.getMode() === 'polling';
58
+ }
59
+ async onBeforeConnect(ctx) {
60
+ const others = await this.agentRepository.findByIntegrationCredential(this.type, ctx.credentialId, ctx.projectId, ctx.agentId);
61
+ if (others.length > 0) {
62
+ throw new conflict_error_1.ConflictError(`Telegram credential is already connected to agent "${others[0].name}"`);
63
+ }
64
+ }
65
+ async onAfterConnect(ctx) {
66
+ if (this.getMode() !== 'webhook')
67
+ return;
68
+ const botToken = this.extractBotToken(ctx.credential);
69
+ const webhookUrl = ctx.webhookUrlFor('telegram');
70
+ const resp = await fetch(`https://api.telegram.org/bot${botToken}/setWebhook`, {
71
+ method: 'POST',
72
+ headers: { 'Content-Type': 'application/json' },
73
+ body: JSON.stringify({ url: webhookUrl }),
74
+ });
75
+ if (!resp.ok) {
76
+ throw new Error(`Failed to register Telegram webhook: ${await resp.text()}`);
77
+ }
78
+ this.logger.info(`[TelegramIntegration] Webhook registered: ${webhookUrl}`);
79
+ }
80
+ normalizeComponents(components) {
81
+ const normalized = [];
82
+ for (const c of components) {
83
+ switch (c.type) {
84
+ case 'select':
85
+ case 'radio_select':
86
+ for (const opt of c.options ?? []) {
87
+ normalized.push({ type: 'button', label: opt.label, value: opt.value });
88
+ }
89
+ break;
90
+ case 'image':
91
+ if (c.url) {
92
+ normalized.push({ type: 'section', text: `[${c.altText ?? 'Image'}](${c.url})` });
93
+ }
94
+ break;
95
+ default:
96
+ normalized.push(c);
97
+ }
98
+ }
99
+ return normalized;
100
+ }
101
+ getMode() {
102
+ const baseUrl = this.urlService.getWebhookBaseUrl();
103
+ const isPublic = baseUrl.startsWith('https://') && !baseUrl.includes('localhost');
104
+ return isPublic ? 'webhook' : 'polling';
105
+ }
106
+ extractBotToken(credential) {
107
+ const token = credential.accessToken;
108
+ if (typeof token === 'string' && token) {
109
+ return token;
110
+ }
111
+ throw new Error('Could not extract a bot token from the Telegram credential. ' +
112
+ 'Please ensure the credential has a valid access token from BotFather.');
113
+ }
114
+ };
115
+ exports.TelegramIntegration = TelegramIntegration;
116
+ exports.TelegramIntegration = TelegramIntegration = __decorate([
117
+ (0, di_1.Service)(),
118
+ __metadata("design:paramtypes", [backend_common_1.Logger,
119
+ url_service_1.UrlService,
120
+ agent_repository_1.AgentRepository])
121
+ ], TelegramIntegration);
122
+ //# sourceMappingURL=telegram-integration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telegram-integration.js","sourceRoot":"","sources":["../../../../../src/modules/agents/integrations/platforms/telegram-integration.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,gCAAkC;AAGlC,4EAAwE;AACxE,wDAAoD;AAEpD,0EAAsE;AACtE,sEAAmG;AAEnG,8CAAoD;AAkB7C,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,6CAAoB;IAiC5D,YACkB,MAAc,EACd,UAAsB,EACtB,eAAgC;QAEjD,KAAK,EAAE,CAAC;QAJS,WAAM,GAAN,MAAM,CAAQ;QACd,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAiB;QAnCzC,SAAI,GAAG,UAAU,CAAC;QAElB,oBAAe,GAAG,CAAC,aAAa,CAAC,CAAC;QAElC,iBAAY,GAAG,UAAU,CAAC;QAE1B,gBAAW,GAAG,UAAU,CAAC;QAEzB,wBAAmB,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;QAEjE,2BAAsB,GAAG,IAAI,CAAC;QAE9B,qBAAgB,GAAG,IAAI,CAAC;QAExB,mBAAc,GAAG;YACzB,OAAO,EAAE,CAAC,MAAgC,EAAE,EAAE;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AG,CAAC,KAAK,EAAE,CAAC,CAAC;oBACzE,CAAC;oBACD,MAAM;gBACP,KAAK,OAAO;oBAEX,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;wBACX,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,OAAO,IAAI,OAAO,KAAK,CAAC,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC;oBACnF,CAAC;oBACD,MAAM;gBACP;oBACC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YACrB,CAAC;QACF,CAAC;QACD,OAAO,UAAU,CAAC;IACnB,CAAC;IAGO,OAAO;QACd,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC;QACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAClF,OAAO,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACzC,CAAC;IAEO,eAAe,CAAC,UAAmC;QAC1D,MAAM,KAAK,GAAG,UAAU,CAAC,WAAW,CAAC;QACrC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,EAAE,CAAC;YACxC,OAAO,KAAK,CAAC;QACd,CAAC;QACD,MAAM,IAAI,KAAK,CACd,8DAA8D;YAC7D,uEAAuE,CACxE,CAAC;IACH,CAAC;CACD,CAAA;AArIY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,YAAO,GAAE;qCAmCiB,uBAAM;QACF,wBAAU;QACL,kCAAe;GApCtC,mBAAmB,CAqI/B"}
@@ -0,0 +1,47 @@
1
+ import { Tool } from '@n8n/agents';
2
+ import { z } from 'zod';
3
+ export declare function createRichInteractionTool(platform?: string): Tool<z.ZodObject<{
4
+ title: z.ZodOptional<z.ZodString>;
5
+ message: z.ZodOptional<z.ZodString>;
6
+ components: z.ZodArray<z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
7
+ [x: string]: any;
8
+ }, {
9
+ [x: string]: any;
10
+ }>, "many">;
11
+ }, "strip", z.ZodTypeAny, {
12
+ components: {
13
+ [x: string]: any;
14
+ }[];
15
+ message?: string | undefined;
16
+ title?: string | undefined;
17
+ }, {
18
+ components: {
19
+ [x: string]: any;
20
+ }[];
21
+ message?: string | undefined;
22
+ title?: string | undefined;
23
+ }>, z.ZodTypeAny, z.ZodObject<{
24
+ title: z.ZodOptional<z.ZodString>;
25
+ message: z.ZodOptional<z.ZodString>;
26
+ components: z.ZodArray<z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
27
+ [x: string]: any;
28
+ }, {
29
+ [x: string]: any;
30
+ }>, "many">;
31
+ }, "strip", z.ZodTypeAny, {
32
+ components: {
33
+ [x: string]: any;
34
+ }[];
35
+ message?: string | undefined;
36
+ title?: string | undefined;
37
+ }, {
38
+ components: {
39
+ [x: string]: any;
40
+ }[];
41
+ message?: string | undefined;
42
+ title?: string | undefined;
43
+ }>, z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
44
+ [x: string]: any;
45
+ }, {
46
+ [x: string]: any;
47
+ }>>;
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createRichInteractionTool = createRichInteractionTool;
4
+ const agents_1 = require("@n8n/agents");
5
+ const di_1 = require("@n8n/di");
6
+ const zod_1 = require("zod");
7
+ const agent_chat_integration_1 = require("./agent-chat-integration");
8
+ const DEFAULT_SUPPORTED_COMPONENTS = ['section', 'button', 'divider', 'fields'];
9
+ const RICH_INTERACTION_INSTRUCTION_FRAGMENT = 'When you have an image URL, gif, or content that benefits from visual ' +
10
+ 'structure (key-value summaries, info cards, choice options), call the ' +
11
+ 'rich_interaction tool to render it as a card instead of pasting URLs or ' +
12
+ 'text directly. With no buttons or selects, the card simply displays and ' +
13
+ 'you continue immediately — no need to wait for a user response.';
14
+ function buildDescription(supportedComponents) {
15
+ const componentList = supportedComponents.join(', ');
16
+ return [
17
+ 'Render a card to the user in chat. Use this whenever you want the user to ',
18
+ 'SEE rich content rather than read plain text — images and gifs, formatted ',
19
+ 'info cards, key-value summaries, or sets of choices.',
20
+ '\n\n',
21
+ `Available components: ${componentList}.`,
22
+ '\n\n',
23
+ 'Behavior depends on which components you include:',
24
+ '\n',
25
+ ' • Display-only (no button, select, or radio_select): the card renders in chat ',
26
+ 'and you continue immediately. Use this for posting gifs, screenshots, summary cards.',
27
+ '\n',
28
+ ' • Interactive (any button, select, or radio_select): the card renders and the ',
29
+ "run pauses; the user's click/selection is returned as your tool result.",
30
+ '\n\n',
31
+ 'Prefer this tool over plain text whenever you have an image URL, a gif, or ',
32
+ 'content that benefits from visual structure.',
33
+ ].join('');
34
+ }
35
+ const selectOptionSchema = zod_1.z.object({
36
+ label: zod_1.z.string().describe('Display text'),
37
+ value: zod_1.z.string().describe('Value returned on selection'),
38
+ description: zod_1.z.string().optional().describe('Help text'),
39
+ });
40
+ const fieldPairSchema = zod_1.z.object({
41
+ label: zod_1.z.string().describe('Field label'),
42
+ value: zod_1.z.string().describe('Field value'),
43
+ });
44
+ const resumeSchema = zod_1.z.discriminatedUnion('type', [
45
+ zod_1.z.object({
46
+ type: zod_1.z.literal('button'),
47
+ value: zod_1.z.string().describe('The clicked button value'),
48
+ }),
49
+ zod_1.z.object({
50
+ type: zod_1.z.literal('select'),
51
+ id: zod_1.z.string().describe('The select component ID'),
52
+ value: zod_1.z.string().describe('The selected option value'),
53
+ }),
54
+ ]);
55
+ function buildComponentSchema(supportedComponents) {
56
+ const types = supportedComponents;
57
+ const hasSelects = supportedComponents.includes('select') || supportedComponents.includes('radio_select');
58
+ const hasImage = supportedComponents.includes('image');
59
+ const shape = {
60
+ type: zod_1.z.enum(types).describe('Component type'),
61
+ text: zod_1.z.string().optional().describe('Text content (supports markdown)'),
62
+ label: zod_1.z.string().optional().describe('Display label'),
63
+ value: zod_1.z.string().optional().describe('Value returned on interaction'),
64
+ style: zod_1.z.enum(['primary', 'danger']).optional().describe('Button style'),
65
+ fields: zod_1.z.array(fieldPairSchema).optional().describe('Key-value pairs for fields component'),
66
+ };
67
+ if (hasSelects) {
68
+ shape.id = zod_1.z.string().optional().describe('Unique ID for select/radio_select');
69
+ shape.placeholder = zod_1.z.string().optional().describe('Placeholder text');
70
+ shape.options = zod_1.z
71
+ .array(selectOptionSchema)
72
+ .optional()
73
+ .describe('Options for select/radio_select');
74
+ }
75
+ if (hasImage) {
76
+ shape.url = zod_1.z.string().optional().describe('Image URL');
77
+ shape.alt = zod_1.z.string().optional().describe('Image alt text');
78
+ }
79
+ return zod_1.z.object(shape);
80
+ }
81
+ function createRichInteractionTool(platform) {
82
+ const integration = platform ? di_1.Container.get(agent_chat_integration_1.ChatIntegrationRegistry).get(platform) : undefined;
83
+ const supportedComponents = integration?.supportedComponents ?? DEFAULT_SUPPORTED_COMPONENTS;
84
+ const description = buildDescription(supportedComponents);
85
+ const componentSchema = buildComponentSchema(supportedComponents);
86
+ const inputSchema = zod_1.z.object({
87
+ title: zod_1.z.string().optional().describe('Card title / header text'),
88
+ message: zod_1.z.string().optional().describe('Subtitle or description text'),
89
+ components: zod_1.z.array(componentSchema).describe('Card components to render'),
90
+ });
91
+ const suspendSchema = inputSchema;
92
+ return new agents_1.Tool('rich_interaction')
93
+ .description(description)
94
+ .systemInstruction(RICH_INTERACTION_INSTRUCTION_FRAGMENT)
95
+ .input(inputSchema)
96
+ .suspend(suspendSchema)
97
+ .resume(resumeSchema)
98
+ .handler(async (input, ctx) => {
99
+ if (ctx.resumeData) {
100
+ return ctx.resumeData;
101
+ }
102
+ const hasActionable = input.components.some((c) => c.type === 'button' || c.type === 'select' || c.type === 'radio_select');
103
+ if (!hasActionable) {
104
+ return { displayOnly: true };
105
+ }
106
+ return await ctx.suspend(input);
107
+ });
108
+ }
109
+ //# sourceMappingURL=rich-interaction-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rich-interaction-tool.js","sourceRoot":"","sources":["../../../../src/modules/agents/integrations/rich-interaction-tool.ts"],"names":[],"mappings":";;AAmHA,8DAgDC;AAnKD,wCAAmC;AACnC,gCAAoC;AACpC,6BAAwB;AAExB,qEAAmE;AAInE,MAAM,4BAA4B,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAShF,MAAM,qCAAqC,GAC1C,wEAAwE;IACxE,wEAAwE;IACxE,0EAA0E;IAC1E,0EAA0E;IAC1E,iEAAiE,CAAC;AAQnE,SAAS,gBAAgB,CAAC,mBAA6B;IACtD,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrD,OAAO;QACN,4EAA4E;QAC5E,4EAA4E;QAC5E,sDAAsD;QACtD,MAAM;QACN,yBAAyB,aAAa,GAAG;QACzC,MAAM;QACN,mDAAmD;QACnD,IAAI;QACJ,iFAAiF;QACjF,sFAAsF;QACtF,IAAI;QACJ,iFAAiF;QACjF,yEAAyE;QACzE,MAAM;QACN,6EAA6E;QAC7E,8CAA8C;KAC9C,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACZ,CAAC;AAMD,MAAM,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IAC1C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACzD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC;CACxD,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IAChC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAA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KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type TextYieldFn = (text: string) => void;
2
+ export type TextEndFn = () => void;
3
+ export declare const INTERNAL_THREAD_ID_SYMBOL: unique symbol;
4
+ export interface InternalThread {
5
+ [INTERNAL_THREAD_ID_SYMBOL]: boolean;
6
+ id: string;
7
+ }
8
+ export declare const toInternalThreadId: (id: string) => InternalThread;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toInternalThreadId = exports.INTERNAL_THREAD_ID_SYMBOL = void 0;
4
+ exports.INTERNAL_THREAD_ID_SYMBOL = Symbol('internal-thread-id');
5
+ const toInternalThreadId = (id) => {
6
+ return {
7
+ [exports.INTERNAL_THREAD_ID_SYMBOL]: true,
8
+ id,
9
+ };
10
+ };
11
+ exports.toInternalThreadId = toInternalThreadId;
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/modules/agents/integrations/types.ts"],"names":[],"mappings":";;;AAKa,QAAA,yBAAyB,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAU/D,MAAM,kBAAkB,GAAG,CAAC,EAAU,EAAkB,EAAE;IAChE,OAAO;QACN,CAAC,iCAAyB,CAAC,EAAE,IAAI;QACjC,EAAE;KACF,CAAC;AACH,CAAC,CAAC;AALW,QAAA,kBAAkB,sBAK7B"}
@@ -0,0 +1,9 @@
1
+ import type { AgentIntegration } from '@n8n/api-types';
2
+ import type { Agent } from '../entities/agent.entity';
3
+ import type { AgentJsonConfig } from './agent-json-config';
4
+ export declare function composeJsonConfig(agent: Agent): AgentJsonConfig | null;
5
+ export declare function decomposeJsonConfig(config: AgentJsonConfig): {
6
+ schemaConfig: Omit<AgentJsonConfig, 'integrations'>;
7
+ integrations: AgentIntegration[];
8
+ };
9
+ export declare function sanitizeToolName(name: string): string;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.composeJsonConfig = composeJsonConfig;
4
+ exports.decomposeJsonConfig = decomposeJsonConfig;
5
+ exports.sanitizeToolName = sanitizeToolName;
6
+ function composeJsonConfig(agent) {
7
+ if (!agent.schema)
8
+ return null;
9
+ return {
10
+ ...agent.schema,
11
+ integrations: agent.integrations ?? [],
12
+ };
13
+ }
14
+ function decomposeJsonConfig(config) {
15
+ const { integrations, ...schemaConfig } = config;
16
+ return { schemaConfig, integrations: integrations ?? [] };
17
+ }
18
+ function sanitizeToolName(name) {
19
+ if (/^[a-zA-Z0-9_-]{1,128}$/.test(name))
20
+ return name;
21
+ return name
22
+ .toLowerCase()
23
+ .replace(/[^a-z0-9]+/g, '-')
24
+ .replace(/^-|-$/g, '')
25
+ .slice(0, 128);
26
+ }
27
+ //# sourceMappingURL=agent-config-composition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-config-composition.js","sourceRoot":"","sources":["../../../../src/modules/agents/json-config/agent-config-composition.ts"],"names":[],"mappings":";;AAUA,8CAMC;AAMD,kDAMC;AASD,4CAOC;AAlCD,SAAgB,iBAAiB,CAAC,KAAY;IAC7C,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO;QACN,GAAG,KAAK,CAAC,MAAM;QACf,YAAY,EAAE,KAAK,CAAC,YAAY,IAAI,EAAE;KACtC,CAAC;AACH,CAAC;AAMD,SAAgB,mBAAmB,CAAC,MAAuB;IAI1D,MAAM,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,MAAM,CAAC;IACjD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,IAAI,EAAE,EAAE,CAAC;AAC3D,CAAC;AASD,SAAgB,gBAAgB,CAAC,IAAY;IAC5C,IAAI,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACrD,OAAO,IAAI;SACT,WAAW,EAAE;SACb,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC;SAC3B,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACjB,CAAC"}