n8n 2.30.4 → 2.31.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 (518) hide show
  1. package/dist/agent-library-bundle.js +9 -0
  2. package/dist/blob-storage/azure-byte-store.ee.d.ts +1 -1
  3. package/dist/blob-storage/azure-byte-store.ee.js +3 -18
  4. package/dist/blob-storage/azure-byte-store.ee.js.map +1 -1
  5. package/dist/blob-storage/json-store.js +3 -0
  6. package/dist/blob-storage/json-store.js.map +1 -1
  7. package/dist/blob-storage/s3-byte-store.ee.d.ts +1 -1
  8. package/dist/blob-storage/s3-byte-store.ee.js +2 -17
  9. package/dist/blob-storage/s3-byte-store.ee.js.map +1 -1
  10. package/dist/build.tsbuildinfo +1 -1
  11. package/dist/commands/base-command.d.ts +2 -2
  12. package/dist/commands/base-command.js +5 -5
  13. package/dist/commands/base-command.js.map +1 -1
  14. package/dist/commands/start.js +2 -0
  15. package/dist/commands/start.js.map +1 -1
  16. package/dist/constants/workflow-reviews.d.ts +4 -0
  17. package/dist/constants/workflow-reviews.js +14 -0
  18. package/dist/constants/workflow-reviews.js.map +1 -0
  19. package/dist/constants.js +2 -0
  20. package/dist/constants.js.map +1 -1
  21. package/dist/controllers/e2e.controller.js +1 -0
  22. package/dist/controllers/e2e.controller.js.map +1 -1
  23. package/dist/controllers/security-settings.controller.d.ts +15 -10
  24. package/dist/controllers/security-settings.controller.js +41 -65
  25. package/dist/controllers/security-settings.controller.js.map +1 -1
  26. package/dist/controllers/users.controller.d.ts +2 -2
  27. package/dist/credentials/credential-connection-status-provider.interface.d.ts +2 -1
  28. package/dist/credentials/credential-connection-status-proxy.d.ts +2 -1
  29. package/dist/credentials/credential-connection-status-proxy.js +7 -2
  30. package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
  31. package/dist/credentials/credentials.controller.js +5 -5
  32. package/dist/credentials/credentials.controller.js.map +1 -1
  33. package/dist/credentials/credentials.service.d.ts +1 -0
  34. package/dist/credentials/credentials.service.ee.d.ts +3 -1
  35. package/dist/credentials/credentials.service.ee.js +10 -2
  36. package/dist/credentials/credentials.service.ee.js.map +1 -1
  37. package/dist/credentials/credentials.service.js +14 -0
  38. package/dist/credentials/credentials.service.js.map +1 -1
  39. package/dist/eventbus/event-message-classes/index.d.ts +2 -2
  40. package/dist/eventbus/event-message-classes/index.js +4 -2
  41. package/dist/eventbus/event-message-classes/index.js.map +1 -1
  42. package/dist/events/maps/relay.event-map.d.ts +19 -2
  43. package/dist/events/relays/log-streaming.event-relay.d.ts +2 -0
  44. package/dist/events/relays/log-streaming.event-relay.js +30 -2
  45. package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
  46. package/dist/events/relays/telemetry.event-relay.d.ts +3 -0
  47. package/dist/events/relays/telemetry.event-relay.js +88 -10
  48. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  49. package/dist/execution-lifecycle/execution-lifecycle-hooks.js +21 -4
  50. package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
  51. package/dist/executions/execution-data/db-store.d.ts +8 -15
  52. package/dist/executions/execution-data/db-store.js +12 -25
  53. package/dist/executions/execution-data/db-store.js.map +1 -1
  54. package/dist/executions/execution-data/execution-data-json-store.d.ts +7 -0
  55. package/dist/executions/execution-data/execution-data-json-store.js +45 -0
  56. package/dist/executions/execution-data/execution-data-json-store.js.map +1 -0
  57. package/dist/executions/execution-data/types.d.ts +3 -14
  58. package/dist/executions/execution-data/types.js.map +1 -1
  59. package/dist/executions/execution-persistence.d.ts +7 -14
  60. package/dist/executions/execution-persistence.js +40 -88
  61. package/dist/executions/execution-persistence.js.map +1 -1
  62. package/dist/interfaces.d.ts +4 -1
  63. package/dist/load-nodes-and-credentials.js +1 -1
  64. package/dist/load-nodes-and-credentials.js.map +1 -1
  65. package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
  66. package/dist/metrics/prometheus/prometheus.service.js +5 -2
  67. package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
  68. package/dist/metrics/prometheus/scheduler-metrics.service.d.ts +35 -0
  69. package/dist/metrics/prometheus/scheduler-metrics.service.js +187 -0
  70. package/dist/metrics/prometheus/scheduler-metrics.service.js.map +1 -0
  71. package/dist/modules/agents/adapters/agents-credential-provider.d.ts +1 -0
  72. package/dist/modules/agents/adapters/agents-credential-provider.js +13 -3
  73. package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
  74. package/dist/modules/agents/agent-config.service.js +11 -1
  75. package/dist/modules/agents/agent-config.service.js.map +1 -1
  76. package/dist/modules/agents/agent-knowledge.controller.js +1 -1
  77. package/dist/modules/agents/agent-knowledge.controller.js.map +1 -1
  78. package/dist/modules/agents/agent-upload.middleware.d.ts +2 -0
  79. package/dist/modules/agents/agent-upload.middleware.js +11 -0
  80. package/dist/modules/agents/agent-upload.middleware.js.map +1 -1
  81. package/dist/modules/agents/agent-validation.service.js +19 -2
  82. package/dist/modules/agents/agent-validation.service.js.map +1 -1
  83. package/dist/modules/agents/agent-vector-stores.controller.d.ts +11 -0
  84. package/dist/modules/agents/agent-vector-stores.controller.js +41 -0
  85. package/dist/modules/agents/agent-vector-stores.controller.js.map +1 -0
  86. package/dist/modules/agents/agent-vector-stores.service.d.ts +9 -0
  87. package/dist/modules/agents/agent-vector-stores.service.js +195 -0
  88. package/dist/modules/agents/agent-vector-stores.service.js.map +1 -0
  89. package/dist/modules/agents/agents-config.controller.d.ts +112 -69
  90. package/dist/modules/agents/agents.controller.d.ts +5 -1
  91. package/dist/modules/agents/agents.controller.js +11 -0
  92. package/dist/modules/agents/agents.controller.js.map +1 -1
  93. package/dist/modules/agents/agents.module.js +1 -0
  94. package/dist/modules/agents/agents.module.js.map +1 -1
  95. package/dist/modules/agents/agents.service.d.ts +7 -2
  96. package/dist/modules/agents/agents.service.js +65 -2
  97. package/dist/modules/agents/agents.service.js.map +1 -1
  98. package/dist/modules/agents/attachable-workflows.service.d.ts +12 -0
  99. package/dist/modules/agents/attachable-workflows.service.js +58 -0
  100. package/dist/modules/agents/attachable-workflows.service.js.map +1 -0
  101. package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -2
  102. package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
  103. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +4 -4
  104. package/dist/modules/agents/builder/agents-builder-prompts.js +40 -27
  105. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  106. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +3 -5
  107. package/dist/modules/agents/builder/agents-builder-tools.service.js +48 -194
  108. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  109. package/dist/modules/agents/builder/agents-builder.service.d.ts +10 -3
  110. package/dist/modules/agents/builder/agents-builder.service.js +22 -12
  111. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  112. package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
  113. package/dist/modules/agents/builder/errors.d.ts +3 -2
  114. package/dist/modules/agents/builder/errors.js +3 -2
  115. package/dist/modules/agents/builder/errors.js.map +1 -1
  116. package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +99 -2
  117. package/dist/modules/agents/builder/get-resource-locator-options.tool.js +103 -101
  118. package/dist/modules/agents/builder/get-resource-locator-options.tool.js.map +1 -1
  119. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +48 -32
  120. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  121. package/dist/modules/agents/builder/interactive/ask-questions.tool.d.ts +2 -0
  122. package/dist/modules/agents/builder/interactive/ask-questions.tool.js +108 -0
  123. package/dist/modules/agents/builder/interactive/ask-questions.tool.js.map +1 -0
  124. package/dist/modules/agents/builder/interactive/configure-channel.tool.d.ts +7 -0
  125. package/dist/modules/agents/builder/interactive/configure-channel.tool.js +52 -0
  126. package/dist/modules/agents/builder/interactive/configure-channel.tool.js.map +1 -0
  127. package/dist/modules/agents/builder/interactive/index.d.ts +2 -2
  128. package/dist/modules/agents/builder/interactive/index.js +5 -5
  129. package/dist/modules/agents/builder/interactive/index.js.map +1 -1
  130. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
  131. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  132. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +1 -1
  133. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +2 -2
  134. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +10 -10
  135. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
  136. package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
  137. package/dist/modules/agents/builder/prompts/memory.prompt.js +1 -1
  138. package/dist/modules/agents/builder/search-mcp-servers.tool.js +1 -63
  139. package/dist/modules/agents/builder/search-mcp-servers.tool.js.map +1 -1
  140. package/dist/modules/agents/builder/skills/index.d.ts +1 -1
  141. package/dist/modules/agents/builder/skills/index.js +5 -1
  142. package/dist/modules/agents/builder/skills/index.js.map +1 -1
  143. package/dist/modules/agents/builder/skills/integrations.skill.js +15 -6
  144. package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
  145. package/dist/modules/agents/builder/skills/mcp.skill.js +2 -2
  146. package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -1
  147. package/dist/modules/agents/builder/skills/resource-locators.skill.js +2 -2
  148. package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
  149. package/dist/modules/agents/builder/skills/sub-agents.skill.js +7 -5
  150. package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
  151. package/dist/modules/agents/builder/skills/target-skills.skill.js +5 -4
  152. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
  153. package/dist/modules/agents/builder/skills/target-tasks.skill.js +5 -5
  154. package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
  155. package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +14 -0
  156. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +96 -0
  157. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -0
  158. package/dist/modules/agents/integrations/integration-action-executor.d.ts +72 -72
  159. package/dist/modules/agents/integrations/integration-tool-definitions.d.ts +574 -574
  160. package/dist/modules/agents/json-config/embedding-credential.d.ts +4 -0
  161. package/dist/modules/agents/json-config/embedding-credential.js +25 -0
  162. package/dist/modules/agents/json-config/embedding-credential.js.map +1 -0
  163. package/dist/modules/agents/json-config/from-json-config.d.ts +2 -6
  164. package/dist/modules/agents/json-config/from-json-config.js +16 -16
  165. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  166. package/dist/modules/agents/json-config/model-config.js +2 -2
  167. package/dist/modules/agents/json-config/model-config.js.map +1 -1
  168. package/dist/modules/agents/json-config/vector-store-factory.d.ts +5 -0
  169. package/dist/modules/agents/json-config/vector-store-factory.js +138 -0
  170. package/dist/modules/agents/json-config/vector-store-factory.js.map +1 -0
  171. package/dist/modules/breaking-changes/rules/index.d.ts +8 -0
  172. package/dist/modules/breaking-changes/rules/index.js +8 -0
  173. package/dist/modules/breaking-changes/rules/index.js.map +1 -1
  174. package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.d.ts +6 -0
  175. package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js +59 -0
  176. package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js.map +1 -0
  177. package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.d.ts +9 -0
  178. package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js +57 -0
  179. package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js.map +1 -0
  180. package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.d.ts +10 -0
  181. package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js +53 -0
  182. package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js.map +1 -0
  183. package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.d.ts +9 -0
  184. package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js +56 -0
  185. package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js.map +1 -0
  186. package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.d.ts +9 -0
  187. package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js +57 -0
  188. package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js.map +1 -0
  189. package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.d.ts +6 -0
  190. package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js +50 -0
  191. package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js.map +1 -0
  192. package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.d.ts +9 -0
  193. package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +57 -0
  194. package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -0
  195. package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.d.ts +6 -0
  196. package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.js +47 -0
  197. package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.js.map +1 -0
  198. package/dist/modules/chat-hub/chat-hub.module.d.ts +1 -1
  199. package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +3 -3
  200. package/dist/modules/data-table/data-table-ddl.service.d.ts +2 -0
  201. package/dist/modules/data-table/data-table-ddl.service.js +16 -0
  202. package/dist/modules/data-table/data-table-ddl.service.js.map +1 -1
  203. package/dist/modules/data-table/data-table.service.d.ts +6 -3
  204. package/dist/modules/data-table/data-table.service.js +19 -0
  205. package/dist/modules/data-table/data-table.service.js.map +1 -1
  206. package/dist/modules/data-table/utils/sql-utils.d.ts +1 -0
  207. package/dist/modules/data-table/utils/sql-utils.js +4 -0
  208. package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
  209. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +0 -2
  210. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +0 -13
  211. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
  212. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +5 -3
  213. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +19 -7
  214. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
  215. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +1 -1
  216. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +1 -1
  217. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
  218. package/dist/modules/favorites/dto/add-favorite.dto.d.ts +2 -2
  219. package/dist/modules/favorites/favorites.event-relay.js +2 -3
  220. package/dist/modules/favorites/favorites.event-relay.js.map +1 -1
  221. package/dist/modules/favorites/favorites.service.d.ts +4 -1
  222. package/dist/modules/favorites/favorites.service.js +28 -3
  223. package/dist/modules/favorites/favorites.service.js.map +1 -1
  224. package/dist/modules/instance-ai/eval/execution.service.d.ts +4 -1
  225. package/dist/modules/instance-ai/eval/execution.service.js +26 -3
  226. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  227. package/dist/modules/instance-ai/eval/mock-handler.js +1 -1
  228. package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
  229. package/dist/modules/instance-ai/eval/mock-quirks.js +7 -0
  230. package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
  231. package/dist/modules/instance-ai/eval/pin-data-generator.js +17 -17
  232. package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
  233. package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +17 -6
  234. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +153 -30
  235. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
  236. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +7 -2
  237. package/dist/modules/instance-ai/instance-ai-memory.service.js +12 -1
  238. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  239. package/dist/modules/instance-ai/instance-ai-settings.service.js +0 -7
  240. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  241. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +89 -3
  242. package/dist/modules/instance-ai/instance-ai.adapter.service.js +264 -29
  243. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  244. package/dist/modules/instance-ai/instance-ai.controller.js +9 -2
  245. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  246. package/dist/modules/instance-ai/instance-ai.service.d.ts +0 -1
  247. package/dist/modules/instance-ai/instance-ai.service.js +45 -107
  248. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  249. package/dist/modules/instance-ai/workflow-templates.service.d.ts +17 -0
  250. package/dist/modules/instance-ai/workflow-templates.service.js +63 -0
  251. package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -0
  252. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.d.ts +1 -0
  253. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js +2 -0
  254. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js.map +1 -1
  255. package/dist/modules/mcp/dto/update-workflows-availability.dto.d.ts +2 -0
  256. package/dist/modules/mcp/dto/update-workflows-availability.dto.js +1 -0
  257. package/dist/modules/mcp/dto/update-workflows-availability.dto.js.map +1 -1
  258. package/dist/modules/mcp/mcp-protected-resource.d.ts +4 -1
  259. package/dist/modules/mcp/mcp-protected-resource.js +13 -3
  260. package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
  261. package/dist/modules/mcp/mcp.config.d.ts +1 -0
  262. package/dist/modules/mcp/mcp.config.js +20 -0
  263. package/dist/modules/mcp/mcp.config.js.map +1 -1
  264. package/dist/modules/mcp/mcp.module.d.ts +1 -0
  265. package/dist/modules/mcp/mcp.module.js +3 -1
  266. package/dist/modules/mcp/mcp.module.js.map +1 -1
  267. package/dist/modules/mcp/mcp.settings.service.d.ts +1 -1
  268. package/dist/modules/mcp/mcp.settings.service.js +33 -18
  269. package/dist/modules/mcp/mcp.settings.service.js.map +1 -1
  270. package/dist/modules/mcp/tools/search-workflows.tool.js +4 -2
  271. package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
  272. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +2 -0
  273. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +10 -5
  274. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  275. package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js +4 -0
  276. package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js.map +1 -1
  277. package/dist/modules/mcp/tools/workflow-builder/skills-used.d.ts +1 -0
  278. package/dist/modules/mcp/tools/workflow-builder/skills-used.js +5 -1
  279. package/dist/modules/mcp/tools/workflow-builder/skills-used.js.map +1 -1
  280. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +10 -5
  281. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  282. package/dist/modules/mcp/tools/workflow-builder/version-metadata.d.ts +27 -0
  283. package/dist/modules/mcp/tools/workflow-builder/version-metadata.js +109 -0
  284. package/dist/modules/mcp/tools/workflow-builder/version-metadata.js.map +1 -0
  285. package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +18 -0
  286. package/dist/modules/mcp-registry/registry/mcp-registry-search.js +64 -0
  287. package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -0
  288. package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +2 -0
  289. package/dist/modules/mcp-registry/registry/mcp-registry.service.js +4 -0
  290. package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
  291. package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -1
  292. package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
  293. package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +30 -0
  294. package/dist/modules/n8n-packages/engine/import-orchestrator.js +86 -0
  295. package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -0
  296. package/dist/modules/n8n-packages/engine/import-result.d.ts +14 -0
  297. package/dist/modules/n8n-packages/engine/import-result.js +43 -0
  298. package/dist/modules/n8n-packages/engine/import-result.js.map +1 -0
  299. package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +7 -0
  300. package/dist/modules/n8n-packages/engine/n8n-package-parser.js +72 -13
  301. package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
  302. package/dist/modules/n8n-packages/engine/package-layout.d.ts +11 -0
  303. package/dist/modules/n8n-packages/engine/package-layout.js +21 -0
  304. package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -0
  305. package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +11 -0
  306. package/dist/modules/n8n-packages/engine/project-package-importer.js +44 -0
  307. package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -0
  308. package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +24 -0
  309. package/dist/modules/n8n-packages/engine/workflow-package-importer.js +168 -0
  310. package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -0
  311. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.d.ts +3 -1
  312. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js +8 -2
  313. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js.map +1 -1
  314. package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +6 -6
  315. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +34 -4
  316. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -1
  317. package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.d.ts +3 -0
  318. package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.js +27 -0
  319. package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.js.map +1 -0
  320. package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -0
  321. package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +18 -2
  322. package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
  323. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.d.ts +3 -7
  324. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +8 -23
  325. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -1
  326. package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.d.ts +8 -0
  327. package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.js +31 -0
  328. package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.js.map +1 -0
  329. package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.d.ts +8 -0
  330. package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.js +31 -0
  331. package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.js.map +1 -0
  332. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.d.ts +6 -0
  333. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js +38 -0
  334. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js.map +1 -0
  335. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.d.ts +26 -0
  336. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +97 -0
  337. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -0
  338. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.d.ts +5 -0
  339. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js +31 -0
  340. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js.map +1 -0
  341. package/dist/modules/n8n-packages/entities/data-table/data-table.types.d.ts +4 -0
  342. package/dist/modules/n8n-packages/entities/data-table/data-table.types.js +3 -0
  343. package/dist/modules/n8n-packages/entities/data-table/data-table.types.js.map +1 -0
  344. package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.d.ts +5 -0
  345. package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js +11 -0
  346. package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js.map +1 -0
  347. package/dist/modules/n8n-packages/entities/folder/folder-import.types.d.ts +20 -0
  348. package/dist/modules/n8n-packages/entities/folder/folder-import.types.js +3 -0
  349. package/dist/modules/n8n-packages/entities/folder/folder-import.types.js.map +1 -0
  350. package/dist/modules/n8n-packages/entities/folder/folder-importer.d.ts +10 -0
  351. package/dist/modules/n8n-packages/entities/folder/folder-importer.js +140 -0
  352. package/dist/modules/n8n-packages/entities/folder/folder-importer.js.map +1 -0
  353. package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +5 -2
  354. package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +48 -44
  355. package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
  356. package/dist/modules/n8n-packages/entities/folder/folder.serializer.js.map +1 -1
  357. package/dist/modules/n8n-packages/entities/package-export.errors.d.ts +8 -0
  358. package/dist/modules/n8n-packages/entities/package-export.errors.js +27 -0
  359. package/dist/modules/n8n-packages/entities/package-export.errors.js.map +1 -0
  360. package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +15 -0
  361. package/dist/modules/n8n-packages/entities/project/project-import.types.js +3 -0
  362. package/dist/modules/n8n-packages/entities/project/project-import.types.js.map +1 -0
  363. package/dist/modules/n8n-packages/entities/project/project-importer.d.ts +13 -0
  364. package/dist/modules/n8n-packages/entities/project/project-importer.js +97 -0
  365. package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -0
  366. package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +22 -4
  367. package/dist/modules/n8n-packages/entities/project/project.exporter.js +71 -26
  368. package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
  369. package/dist/modules/n8n-packages/entities/requirements.types.d.ts +2 -0
  370. package/dist/modules/n8n-packages/entities/requirements.types.js +1 -0
  371. package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
  372. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +4 -3
  373. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -17
  374. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
  375. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +12 -3
  376. package/dist/modules/n8n-packages/n8n-packages.service.js +51 -11
  377. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
  378. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +47 -22
  379. package/dist/modules/n8n-packages/n8n-packages.types.js +5 -1
  380. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  381. package/dist/modules/n8n-packages/package-failure-classifier.d.ts +2 -0
  382. package/dist/modules/n8n-packages/package-failure-classifier.js +29 -0
  383. package/dist/modules/n8n-packages/package-failure-classifier.js.map +1 -0
  384. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +62 -0
  385. package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +55 -0
  386. package/dist/modules/n8n-packages/spec/requirements.schema.js +26 -15
  387. package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
  388. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.d.ts +49 -0
  389. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js +20 -0
  390. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js.map +1 -0
  391. package/dist/modules/redaction/executions/execution-redaction.service.js +1 -1
  392. package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
  393. package/dist/modules/source-control.ee/constants.d.ts +1 -0
  394. package/dist/modules/source-control.ee/constants.js +2 -1
  395. package/dist/modules/source-control.ee/constants.js.map +1 -1
  396. package/dist/modules/source-control.ee/source-control-git.service.ee.d.ts +0 -1
  397. package/dist/modules/source-control.ee/source-control-git.service.ee.js +0 -22
  398. package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
  399. package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +3 -1
  400. package/dist/modules/source-control.ee/source-control-helper.ee.js +13 -0
  401. package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
  402. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +10 -2
  403. package/dist/modules/source-control.ee/source-control-import.service.ee.js +94 -59
  404. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  405. package/dist/modules/source-control.ee/source-control-status.service.ee.d.ts +0 -1
  406. package/dist/modules/source-control.ee/source-control-status.service.ee.js +30 -30
  407. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  408. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +6 -6
  409. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +3 -3
  410. package/dist/modules/source-control.ee/source-control.service.ee.js +8 -1
  411. package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
  412. package/dist/public-api/types.d.ts +5 -1
  413. package/dist/public-api/v1/handlers/credentials/credentials.handler.js +9 -0
  414. package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
  415. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +87 -38
  416. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
  417. package/dist/public-api/v1/handlers/security-policy/security-policy.handler.d.ts +8 -0
  418. package/dist/public-api/v1/handlers/security-policy/security-policy.handler.js +39 -0
  419. package/dist/public-api/v1/handlers/security-policy/security-policy.handler.js.map +1 -0
  420. package/dist/public-api/v1/openapi.yml +243 -12
  421. package/dist/scaling/job-processor.js +44 -6
  422. package/dist/scaling/job-processor.js.map +1 -1
  423. package/dist/scaling/pubsub/pubsub.event-map.d.ts +4 -1
  424. package/dist/scheduling/durable-job-provisioner.d.ts +16 -0
  425. package/dist/scheduling/durable-job-provisioner.js +135 -0
  426. package/dist/scheduling/durable-job-provisioner.js.map +1 -0
  427. package/dist/scheduling/durable-scheduler.d.ts +16 -0
  428. package/dist/scheduling/durable-scheduler.js +117 -0
  429. package/dist/scheduling/durable-scheduler.js.map +1 -0
  430. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.d.ts +23 -0
  431. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.js +149 -0
  432. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.js.map +1 -0
  433. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.d.ts +10 -0
  434. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js +33 -0
  435. package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js.map +1 -0
  436. package/dist/scheduling/scheduler-tracer.d.ts +3 -0
  437. package/dist/scheduling/scheduler-tracer.js +11 -0
  438. package/dist/scheduling/scheduler-tracer.js.map +1 -0
  439. package/dist/services/folder-finder.service.d.ts +2 -0
  440. package/dist/services/folder-finder.service.js +16 -0
  441. package/dist/services/folder-finder.service.js.map +1 -1
  442. package/dist/services/folder.service.d.ts +3 -2
  443. package/dist/services/folder.service.js +11 -1
  444. package/dist/services/folder.service.js.map +1 -1
  445. package/dist/services/frontend.service.d.ts +3 -1
  446. package/dist/services/frontend.service.js +14 -2
  447. package/dist/services/frontend.service.js.map +1 -1
  448. package/dist/services/project.service.ee.d.ts +7 -1
  449. package/dist/services/project.service.ee.js +21 -4
  450. package/dist/services/project.service.ee.js.map +1 -1
  451. package/dist/services/protected-resource.registry.d.ts +1 -0
  452. package/dist/services/protected-resource.registry.js +11 -7
  453. package/dist/services/protected-resource.registry.js.map +1 -1
  454. package/dist/services/security-settings.service.d.ts +31 -1
  455. package/dist/services/security-settings.service.js +75 -2
  456. package/dist/services/security-settings.service.js.map +1 -1
  457. package/dist/services/workflow-review-policy.service.d.ts +11 -0
  458. package/dist/services/workflow-review-policy.service.js +52 -0
  459. package/dist/services/workflow-review-policy.service.js.map +1 -0
  460. package/dist/telemetry/index.js +2 -2
  461. package/dist/telemetry/index.js.map +1 -1
  462. package/dist/workflow-execute-additional-data.js +5 -4
  463. package/dist/workflow-execute-additional-data.js.map +1 -1
  464. package/dist/workflow-helpers.js +26 -0
  465. package/dist/workflow-helpers.js.map +1 -1
  466. package/dist/workflows/triggers/webhook-trigger-registrar.js +22 -15
  467. package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
  468. package/dist/workflows/triggers/workflow-trigger-activator.js +1 -7
  469. package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
  470. package/dist/workflows/workflow-creation.service.d.ts +2 -0
  471. package/dist/workflows/workflow-creation.service.js +4 -2
  472. package/dist/workflows/workflow-creation.service.js.map +1 -1
  473. package/dist/workflows/workflow-execution.service.js +8 -5
  474. package/dist/workflows/workflow-execution.service.js.map +1 -1
  475. package/dist/workflows/workflow-finder.service.d.ts +5 -2
  476. package/dist/workflows/workflow-finder.service.js +25 -2
  477. package/dist/workflows/workflow-finder.service.js.map +1 -1
  478. package/dist/workflows/workflow-history/workflow-history.service.d.ts +4 -1
  479. package/dist/workflows/workflow-history/workflow-history.service.js +3 -1
  480. package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
  481. package/dist/workflows/workflow-validation.service.js +3 -3
  482. package/dist/workflows/workflow-validation.service.js.map +1 -1
  483. package/dist/workflows/workflow.request.d.ts +7 -22
  484. package/dist/workflows/workflow.service.d.ts +2 -0
  485. package/dist/workflows/workflow.service.js +4 -2
  486. package/dist/workflows/workflow.service.js.map +1 -1
  487. package/dist/workflows/workflows.controller.d.ts +1 -1
  488. package/dist/workflows/workflows.controller.js +8 -3
  489. package/dist/workflows/workflows.controller.js.map +1 -1
  490. package/package.json +43 -38
  491. package/templates/form-trigger-completion.handlebars +6 -6
  492. package/dist/executions/execution-data/azure-store.ee.d.ts +0 -15
  493. package/dist/executions/execution-data/azure-store.ee.js +0 -117
  494. package/dist/executions/execution-data/azure-store.ee.js.map +0 -1
  495. package/dist/executions/execution-data/fs-store.d.ts +0 -16
  496. package/dist/executions/execution-data/fs-store.js +0 -118
  497. package/dist/executions/execution-data/fs-store.js.map +0 -1
  498. package/dist/executions/execution-data/s3-store.ee.d.ts +0 -15
  499. package/dist/executions/execution-data/s3-store.ee.js +0 -116
  500. package/dist/executions/execution-data/s3-store.ee.js.map +0 -1
  501. package/dist/modules/agents/builder/from-ai-node-parameters.d.ts +0 -7
  502. package/dist/modules/agents/builder/from-ai-node-parameters.js +0 -43
  503. package/dist/modules/agents/builder/from-ai-node-parameters.js.map +0 -1
  504. package/dist/modules/agents/builder/interactive/ask-llm.tool.d.ts +0 -2
  505. package/dist/modules/agents/builder/interactive/ask-llm.tool.js +0 -25
  506. package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +0 -1
  507. package/dist/modules/agents/builder/interactive/ask-question.tool.d.ts +0 -2
  508. package/dist/modules/agents/builder/interactive/ask-question.tool.js +0 -27
  509. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +0 -1
  510. package/dist/modules/agents/json-config/model-id.d.ts +0 -1
  511. package/dist/modules/agents/json-config/model-id.js +0 -8
  512. package/dist/modules/agents/json-config/model-id.js.map +0 -1
  513. package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +0 -7
  514. package/dist/modules/agents/json-config/native-web-search-provider-tools.js +0 -55
  515. package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +0 -1
  516. package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +0 -28
  517. package/dist/modules/n8n-packages/engine/import-pipeline.js +0 -204
  518. package/dist/modules/n8n-packages/engine/import-pipeline.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"builder-tool-names.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/builder-tool-names.ts"],"names":[],"mappings":";;;AAIa,QAAA,aAAa,GAAG;IAC5B,WAAW,EAAE,aAAa;IAC1B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,4BAA4B,EAAE,8BAA8B;IAC5D,sBAAsB,EAAE,wBAAwB;IAChD,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;CAC7B,CAAC;AAKE,QAAA,mBAAmB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,UAAU;CACV,CAAC"}
1
+ {"version":3,"file":"builder-tool-names.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/builder-tool-names.ts"],"names":[],"mappings":";;;AASa,QAAA,aAAa,GAAG;IAC5B,WAAW,EAAE,aAAa;IAG1B,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,4BAA4B,EAAE,8BAA8B;IAC5D,sBAAsB,EAAE,wBAAwB;IAChD,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;IAC1B,kBAAkB,EAAE,oBAAoB;IACxC,iBAAiB,EAAE,mBAAmB;CAC7B,CAAC;AAKE,QAAA,mBAAmB,GAAG;IAClC,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,UAAU;CACV,CAAC"}
@@ -1,6 +1,7 @@
1
+ import { BUILDER_NOT_CONFIGURED_CODE } from '@n8n/api-types';
1
2
  import { UserError } from 'n8n-workflow';
2
- export declare const BUILDER_NOT_CONFIGURED_CODE = "BUILDER_NOT_CONFIGURED";
3
+ export { BUILDER_NOT_CONFIGURED_CODE };
3
4
  export declare class BuilderNotConfiguredError extends UserError {
4
- readonly code = "BUILDER_NOT_CONFIGURED";
5
+ readonly code: "BUILDER_NOT_CONFIGURED";
5
6
  constructor();
6
7
  }
@@ -1,12 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BuilderNotConfiguredError = exports.BUILDER_NOT_CONFIGURED_CODE = void 0;
4
+ const api_types_1 = require("@n8n/api-types");
5
+ Object.defineProperty(exports, "BUILDER_NOT_CONFIGURED_CODE", { enumerable: true, get: function () { return api_types_1.BUILDER_NOT_CONFIGURED_CODE; } });
4
6
  const n8n_workflow_1 = require("n8n-workflow");
5
- exports.BUILDER_NOT_CONFIGURED_CODE = 'BUILDER_NOT_CONFIGURED';
6
7
  class BuilderNotConfiguredError extends n8n_workflow_1.UserError {
7
8
  constructor() {
8
9
  super('Agent builder is not configured. An admin must select a provider and credential, or configure the n8n AI assistant proxy.');
9
- this.code = exports.BUILDER_NOT_CONFIGURED_CODE;
10
+ this.code = api_types_1.BUILDER_NOT_CONFIGURED_CODE;
10
11
  }
11
12
  }
12
13
  exports.BuilderNotConfiguredError = BuilderNotConfiguredError;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/errors.ts"],"names":[],"mappings":";;;AAAA,+CAAyC;AAO5B,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAEpE,MAAa,yBAA0B,SAAQ,wBAAS;IAGvD;QACC,KAAK,CACJ,2HAA2H,CAC3H,CAAC;QALM,SAAI,GAAG,mCAA2B,CAAC;IAM5C,CAAC;CACD;AARD,8DAQC"}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/errors.ts"],"names":[],"mappings":";;;AAAA,8CAA6D;AAWpD,4GAXA,uCAA2B,OAWA;AAVpC,+CAAyC;AAYzC,MAAa,yBAA0B,SAAQ,wBAAS;IAGvD;QACC,KAAK,CACJ,2HAA2H,CAC3H,CAAC;QALM,SAAI,GAAG,uCAA2B,CAAC;IAM5C,CAAC;CACD;AARD,8DAQC"}
@@ -1,10 +1,107 @@
1
1
  import type { BuiltTool } from '@n8n/agents';
2
2
  import type { User } from '@n8n/db';
3
+ import { z } from 'zod';
3
4
  import type { NodeTypes } from '../../../node-types';
4
5
  import type { DynamicNodeParametersService } from '../../../services/dynamic-node-parameters.service';
5
- export declare function buildGetResourceLocatorOptionsTool(deps: {
6
+ declare const getResourceLocatorOptionsInputSchema: z.ZodObject<{
7
+ nodeType: z.ZodString;
8
+ nodeTypeVersion: z.ZodNumber;
9
+ parameterPath: z.ZodString;
10
+ nodeParameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
11
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
12
+ id: z.ZodString;
13
+ name: z.ZodString;
14
+ }, "strip", z.ZodTypeAny, {
15
+ name: string;
16
+ id: string;
17
+ }, {
18
+ name: string;
19
+ id: string;
20
+ }>>>;
21
+ filter: z.ZodOptional<z.ZodString>;
22
+ paginationToken: z.ZodOptional<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ nodeType: string;
25
+ nodeTypeVersion: number;
26
+ parameterPath: string;
27
+ filter?: string | undefined;
28
+ credentials?: Record<string, {
29
+ name: string;
30
+ id: string;
31
+ }> | undefined;
32
+ nodeParameters?: Record<string, unknown> | undefined;
33
+ paginationToken?: string | undefined;
34
+ }, {
35
+ nodeType: string;
36
+ nodeTypeVersion: number;
37
+ parameterPath: string;
38
+ filter?: string | undefined;
39
+ credentials?: Record<string, {
40
+ name: string;
41
+ id: string;
42
+ }> | undefined;
43
+ nodeParameters?: Record<string, unknown> | undefined;
44
+ paginationToken?: string | undefined;
45
+ }>;
46
+ export interface ResolveResourceLocatorOptionsDeps {
6
47
  dynamicNodeParametersService: DynamicNodeParametersService;
7
48
  nodeTypes: NodeTypes;
8
49
  user: User;
9
50
  projectId: string;
10
- }): BuiltTool;
51
+ }
52
+ export type ResolveResourceLocatorOptionsInput = z.infer<typeof getResourceLocatorOptionsInputSchema>;
53
+ export declare function resolveResourceLocatorOptions({ nodeType, nodeTypeVersion, parameterPath, nodeParameters, credentials, filter, paginationToken, }: ResolveResourceLocatorOptionsInput, deps: ResolveResourceLocatorOptionsDeps): Promise<{
54
+ ok: boolean;
55
+ code: string;
56
+ message: string;
57
+ dynamicParameters?: undefined;
58
+ credentialSlots?: undefined;
59
+ } | {
60
+ ok: boolean;
61
+ code: string;
62
+ message: string;
63
+ dynamicParameters: import("@n8n/ai-utilities/node-catalog").DynamicNodeParameterPath[];
64
+ credentialSlots?: undefined;
65
+ } | {
66
+ ok: boolean;
67
+ code: string;
68
+ message: string;
69
+ credentialSlots: import("@n8n/ai-utilities/node-catalog").RequiredNodeCredentialSlot[];
70
+ dynamicParameters?: undefined;
71
+ } | {
72
+ builderHint?: string | undefined;
73
+ ok: boolean;
74
+ kind: "resourceLocator";
75
+ parameterPath: string;
76
+ methodName: string;
77
+ mode: string;
78
+ results: {
79
+ parameterValue: import("n8n-workflow").INodeParameterResourceLocator;
80
+ url?: string | undefined;
81
+ name: string;
82
+ value: string | number | boolean;
83
+ }[];
84
+ paginationToken: string | undefined;
85
+ code?: undefined;
86
+ message?: undefined;
87
+ dynamicParameters?: undefined;
88
+ credentialSlots?: undefined;
89
+ } | {
90
+ builderHint?: string | undefined;
91
+ results: {
92
+ parameterValue: import("n8n-workflow").NodeParameterValue;
93
+ description?: string | undefined;
94
+ name: string;
95
+ value: string | number | boolean;
96
+ }[];
97
+ methodName?: string | undefined;
98
+ ok: boolean;
99
+ kind: "loadOptionsMethod" | "loadOptionsRouting";
100
+ parameterPath: string;
101
+ code?: undefined;
102
+ message?: undefined;
103
+ dynamicParameters?: undefined;
104
+ credentialSlots?: undefined;
105
+ }>;
106
+ export declare function buildGetResourceLocatorOptionsTool(deps: ResolveResourceLocatorOptionsDeps): BuiltTool;
107
+ export {};
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveResourceLocatorOptions = resolveResourceLocatorOptions;
3
4
  exports.buildGetResourceLocatorOptionsTool = buildGetResourceLocatorOptionsTool;
4
5
  const tool_1 = require("@n8n/agents/tool");
5
6
  const node_catalog_1 = require("@n8n/ai-utilities/node-catalog");
@@ -30,119 +31,120 @@ const getResourceLocatorOptionsInputSchema = zod_1.z.object({
30
31
  .optional()
31
32
  .describe('Optional pagination token from a previous lookup'),
32
33
  });
33
- function buildGetResourceLocatorOptionsTool(deps) {
34
- return new tool_1.Tool(builder_tool_names_1.BUILDER_TOOLS.GET_RESOURCE_LOCATOR_OPTIONS)
35
- .description('Fetch live options for a node parameter that is configured through a resourceLocator, loadOptionsMethod, or loadOptions routing. ' +
36
- 'Use this for stable IDs such as Linear teamId, Slack channel, calendar, project, board, model, database, or table selectors before writing nodeParameters. ' +
37
- 'Call ask_credential first when the node needs credentials, then pass the returned credentials map. ' +
38
- 'The response includes parameterValue for each result; write that exact value into nodeParameters instead of using $fromAI for stable resource IDs.')
39
- .input(getResourceLocatorOptionsInputSchema)
40
- .handler(async ({ nodeType, nodeTypeVersion, parameterPath, nodeParameters, credentials, filter, paginationToken, }) => {
41
- let nodeTypeDescription;
42
- try {
43
- nodeTypeDescription = deps.nodeTypes.getByNameAndVersion(nodeType, nodeTypeVersion);
44
- }
45
- catch (error) {
46
- return {
47
- ok: false,
48
- code: 'node_type_not_found',
49
- message: error instanceof Error ? error.message : `Node type "${nodeType}" not found`,
50
- };
51
- }
52
- const property = (0, node_catalog_1.findNodeParameterProperty)(nodeTypeDescription.description.properties, parameterPath);
53
- if (!property) {
54
- return {
55
- ok: false,
56
- code: 'parameter_not_found',
57
- message: `Parameter "${parameterPath}" was not found on ${nodeType}.`,
58
- dynamicParameters: (0, node_catalog_1.collectDynamicNodeParameterPaths)(nodeTypeDescription.description.properties),
59
- };
60
- }
61
- const lookup = (0, node_catalog_1.getDynamicNodeParameterLookup)(property);
62
- if (!lookup) {
63
- return {
64
- ok: false,
65
- code: 'not_dynamic_selector',
66
- message: `Parameter "${parameterPath}" does not expose a resource locator or load-options lookup.`,
67
- dynamicParameters: (0, node_catalog_1.collectDynamicNodeParameterPaths)(nodeTypeDescription.description.properties),
68
- };
69
- }
70
- const credentialSlots = (0, node_catalog_1.getRequiredNodeCredentialSlots)(nodeTypeDescription.description);
71
- if (credentialSlots.length > 0 &&
72
- !lookup.skipCredentialsCheck &&
73
- !(0, node_catalog_1.hasNodeCredentials)(credentials)) {
74
- return {
75
- ok: false,
76
- code: 'missing_credentials',
77
- message: 'This parameter needs node credentials before live options can be fetched. Call ask_credential for one of the returned credential slots, then retry with the returned credentials map.',
78
- credentialSlots,
79
- };
80
- }
81
- const currentNodeParameters = (nodeParameters ?? {});
82
- const resourceIds = { projectId: deps.projectId, credentials };
83
- await deps.dynamicNodeParametersService.refineResourceIds(deps.user, resourceIds);
84
- if (!currentNodeParameters.authentication && resourceIds.credentials) {
85
- for (const credentialType of Object.keys(resourceIds.credentials)) {
86
- const authValue = (0, node_catalog_1.detectAuthenticationParameterValue)(nodeTypeDescription.description, credentialType);
87
- if (authValue !== undefined) {
88
- currentNodeParameters.authentication = authValue;
89
- break;
90
- }
34
+ async function resolveResourceLocatorOptions({ nodeType, nodeTypeVersion, parameterPath, nodeParameters, credentials, filter, paginationToken, }, deps) {
35
+ let nodeTypeDescription;
36
+ try {
37
+ nodeTypeDescription = deps.nodeTypes.getByNameAndVersion(nodeType, nodeTypeVersion);
38
+ }
39
+ catch (error) {
40
+ return {
41
+ ok: false,
42
+ code: 'node_type_not_found',
43
+ message: error instanceof Error ? error.message : `Node type "${nodeType}" not found`,
44
+ };
45
+ }
46
+ const property = (0, node_catalog_1.findNodeParameterProperty)(nodeTypeDescription.description.properties, parameterPath);
47
+ if (!property) {
48
+ return {
49
+ ok: false,
50
+ code: 'parameter_not_found',
51
+ message: `Parameter "${parameterPath}" was not found on ${nodeType}.`,
52
+ dynamicParameters: (0, node_catalog_1.collectDynamicNodeParameterPaths)(nodeTypeDescription.description.properties),
53
+ };
54
+ }
55
+ const lookup = (0, node_catalog_1.getDynamicNodeParameterLookup)(property);
56
+ if (!lookup) {
57
+ return {
58
+ ok: false,
59
+ code: 'not_dynamic_selector',
60
+ message: `Parameter "${parameterPath}" does not expose a resource locator or load-options lookup.`,
61
+ dynamicParameters: (0, node_catalog_1.collectDynamicNodeParameterPaths)(nodeTypeDescription.description.properties),
62
+ };
63
+ }
64
+ const credentialSlots = (0, node_catalog_1.getRequiredNodeCredentialSlots)(nodeTypeDescription.description);
65
+ if (credentialSlots.length > 0 &&
66
+ !lookup.skipCredentialsCheck &&
67
+ !(0, node_catalog_1.hasNodeCredentials)(credentials)) {
68
+ return {
69
+ ok: false,
70
+ code: 'missing_credentials',
71
+ message: 'This parameter needs node credentials before live options can be fetched. Call ask_credential for one of the returned credential slots, then retry with the returned credentials map.',
72
+ credentialSlots,
73
+ };
74
+ }
75
+ const currentNodeParameters = (nodeParameters ?? {});
76
+ const resourceIds = { projectId: deps.projectId, credentials };
77
+ await deps.dynamicNodeParametersService.refineResourceIds(deps.user, resourceIds);
78
+ if (!currentNodeParameters.authentication && resourceIds.credentials) {
79
+ for (const credentialType of Object.keys(resourceIds.credentials)) {
80
+ const authValue = (0, node_catalog_1.detectAuthenticationParameterValue)(nodeTypeDescription.description, credentialType);
81
+ if (authValue !== undefined) {
82
+ currentNodeParameters.authentication = authValue;
83
+ break;
91
84
  }
92
85
  }
93
- const builderHint = property.builderHint?.propertyHint;
94
- const additionalData = await (0, workflow_execute_additional_data_1.getBase)({
95
- userId: deps.user.id,
96
- projectId: resourceIds.projectId,
97
- currentNodeParameters,
98
- });
99
- additionalData.dataTableProjectId = resourceIds.projectId;
100
- const nodeTypeAndVersion = { name: nodeType, version: nodeTypeVersion };
101
- const dynamicPath = (0, node_catalog_1.toDynamicParameterPath)(parameterPath);
102
- try {
103
- if (lookup.kind === 'resourceLocator') {
104
- const result = await deps.dynamicNodeParametersService.getResourceLocatorResults(lookup.methodName, dynamicPath, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials, filter, paginationToken);
105
- return {
106
- ok: true,
107
- kind: lookup.kind,
108
- parameterPath: (0, node_catalog_1.normalizeParameterPath)(parameterPath),
109
- methodName: lookup.methodName,
110
- mode: lookup.mode,
111
- results: (result.results ?? []).map((option) => ({
112
- name: option.name,
113
- value: option.value,
114
- ...(option.url ? { url: option.url } : {}),
115
- parameterValue: (0, node_catalog_1.toResourceLocatorParameterValue)(option, lookup.mode),
116
- })),
117
- paginationToken: result.paginationToken,
118
- ...(builderHint ? { builderHint } : {}),
119
- };
120
- }
121
- const options = lookup.kind === 'loadOptionsMethod'
122
- ? await deps.dynamicNodeParametersService.getOptionsViaMethodName(lookup.methodName, dynamicPath, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials)
123
- : await deps.dynamicNodeParametersService.getOptionsViaLoadOptions(lookup.loadOptions, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials);
86
+ }
87
+ const builderHint = property.builderHint?.propertyHint;
88
+ const additionalData = await (0, workflow_execute_additional_data_1.getBase)({
89
+ userId: deps.user.id,
90
+ projectId: resourceIds.projectId,
91
+ currentNodeParameters,
92
+ });
93
+ additionalData.dataTableProjectId = resourceIds.projectId;
94
+ const nodeTypeAndVersion = { name: nodeType, version: nodeTypeVersion };
95
+ const dynamicPath = (0, node_catalog_1.toDynamicParameterPath)(parameterPath);
96
+ try {
97
+ if (lookup.kind === 'resourceLocator') {
98
+ const result = await deps.dynamicNodeParametersService.getResourceLocatorResults(lookup.methodName, dynamicPath, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials, filter, paginationToken);
124
99
  return {
125
100
  ok: true,
126
101
  kind: lookup.kind,
127
102
  parameterPath: (0, node_catalog_1.normalizeParameterPath)(parameterPath),
128
- ...(lookup.kind === 'loadOptionsMethod' ? { methodName: lookup.methodName } : {}),
129
- results: options.map((option) => ({
103
+ methodName: lookup.methodName,
104
+ mode: lookup.mode,
105
+ results: (result.results ?? []).map((option) => ({
130
106
  name: option.name,
131
107
  value: option.value,
132
- ...(option.description ? { description: option.description } : {}),
133
- parameterValue: (0, node_catalog_1.toLoadedOptionParameterValue)(option),
108
+ ...(option.url ? { url: option.url } : {}),
109
+ parameterValue: (0, node_catalog_1.toResourceLocatorParameterValue)(option, lookup.mode),
134
110
  })),
111
+ paginationToken: result.paginationToken,
135
112
  ...(builderHint ? { builderHint } : {}),
136
113
  };
137
114
  }
138
- catch (error) {
139
- return {
140
- ok: false,
141
- code: 'lookup_failed',
142
- message: error instanceof Error ? error.message : 'Failed to fetch parameter options',
143
- };
144
- }
145
- })
115
+ const options = lookup.kind === 'loadOptionsMethod'
116
+ ? await deps.dynamicNodeParametersService.getOptionsViaMethodName(lookup.methodName, dynamicPath, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials)
117
+ : await deps.dynamicNodeParametersService.getOptionsViaLoadOptions(lookup.loadOptions, additionalData, nodeTypeAndVersion, currentNodeParameters, resourceIds.credentials);
118
+ return {
119
+ ok: true,
120
+ kind: lookup.kind,
121
+ parameterPath: (0, node_catalog_1.normalizeParameterPath)(parameterPath),
122
+ ...(lookup.kind === 'loadOptionsMethod' ? { methodName: lookup.methodName } : {}),
123
+ results: options.map((option) => ({
124
+ name: option.name,
125
+ value: option.value,
126
+ ...(option.description ? { description: option.description } : {}),
127
+ parameterValue: (0, node_catalog_1.toLoadedOptionParameterValue)(option),
128
+ })),
129
+ ...(builderHint ? { builderHint } : {}),
130
+ };
131
+ }
132
+ catch (error) {
133
+ return {
134
+ ok: false,
135
+ code: 'lookup_failed',
136
+ message: error instanceof Error ? error.message : 'Failed to fetch parameter options',
137
+ };
138
+ }
139
+ }
140
+ function buildGetResourceLocatorOptionsTool(deps) {
141
+ return new tool_1.Tool(builder_tool_names_1.BUILDER_TOOLS.GET_RESOURCE_LOCATOR_OPTIONS)
142
+ .description('Fetch live options for a node parameter that is configured through a resourceLocator, loadOptionsMethod, or loadOptions routing. ' +
143
+ 'Use this for stable IDs such as Linear teamId, Slack channel, calendar, project, board, model, database, or table selectors before writing nodeParameters. ' +
144
+ 'Call ask_credential first when the node needs credentials, then pass the returned credentials map. ' +
145
+ 'The response includes parameterValue for each result; write that exact value into nodeParameters instead of using $fromAI for stable resource IDs.')
146
+ .input(getResourceLocatorOptionsInputSchema)
147
+ .handler(async (input) => await resolveResourceLocatorOptions(input, deps))
146
148
  .build();
147
149
  }
148
150
  //# sourceMappingURL=get-resource-locator-options.tool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-resource-locator-options.tool.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/get-resource-locator-options.tool.ts"],"names":[],"mappings":";;AAwDA,gFAqLC;AA7OD,2CAAwC;AAExC,iEAWwC;AAGxC,6BAAwB;AAIxB,yFAA6D;AAE7D,6DAAqD;AAErD,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC5E,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAChF,aAAa,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,CACR,sFAAsF,CACtF;IACF,cAAc,EAAE,OAAC;SACf,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CACR,sIAAsI,CACtI;IACF,WAAW,EAAE,OAAC;SACZ,MAAM,CAAC,oBAAoB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CACR,qFAAqF,CACrF;IACF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IAC/F,eAAe,EAAE,OAAC;SAChB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,kDAAkD,CAAC;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,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO;gBACN,EAAE,EAAE,KAAK;gBACT,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mCAAmC;aACrF,CAAC;QACH,CAAC;IACF,CAAC,CACD;SACA,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"get-resource-locator-options.tool.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/get-resource-locator-options.tool.ts"],"names":[],"mappings":";;AAyEA,sEAsKC;AAED,gFAaC;AA9PD,2CAAwC;AAExC,iEAWwC;AAGxC,6BAAwB;AAIxB,yFAA6D;AAE7D,6DAAqD;AAErD,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;CAChB,CAAC,CAAC;AAEH,MAAM,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC5E,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAChF,aAAa,EAAE,OAAC;SACd,MAAM,EAAE;SACR,QAAQ,CACR,sFAAsF,CACtF;IACF,cAAc,EAAE,OAAC;SACf,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CACR,sIAAsI,CACtI;IACF,WAAW,EAAE,OAAC;SACZ,MAAM,CAAC,oBAAoB,CAAC;SAC5B,QAAQ,EAAE;SACV,QAAQ,CACR,qFAAqF,CACrF;IACF,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,uDAAuD,CAAC;IA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AAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mCAAmC;SACrF,CAAC;IACH,CAAC;AACF,CAAC;AAED,SAAgB,kCAAkC,CACjD,IAAuC;IAEvC,OAAO,IAAI,WAAI,CAAC,kCAAa,CAAC,4BAA4B,CAAC;SACzD,WAAW,CACX,mIAAmI;QAClI,6JAA6J;QAC7J,qGAAqG;QACrG,oJAAoJ,CACrJ;SACA,KAAK,CAAC,oCAAoC,CAAC;SAC3C,OAAO,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,6BAA6B,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;SAC1E,KAAK,EAAE,CAAC;AACX,CAAC"}
@@ -4,39 +4,58 @@ exports.buildAskCredentialTool = buildAskCredentialTool;
4
4
  exports.buildAskEmbeddingCredentialTool = buildAskEmbeddingCredentialTool;
5
5
  const tool_1 = require("@n8n/agents/tool");
6
6
  const api_types_1 = require("@n8n/api-types");
7
- function withNodeCredentialMap(input, resume) {
8
- if ('skipped' in resume)
9
- return resume;
7
+ const nanoid_1 = require("nanoid");
8
+ function withNodeCredentialMap(input, credentialId, credentialName) {
10
9
  const credentialSlot = input.credentialSlot ?? input.credentialType;
11
10
  return {
12
- credentialId: resume.credentialId,
13
- credentialName: resume.credentialName,
11
+ credentialId,
12
+ credentialName,
14
13
  credentials: {
15
- [credentialSlot]: {
16
- id: resume.credentialId,
17
- name: resume.credentialName,
18
- },
14
+ [credentialSlot]: { id: credentialId, name: credentialName },
19
15
  },
20
16
  };
21
17
  }
22
- async function resolveCredentialSelection(input, ctx, deps, mapResume) {
23
- if (ctx.resumeData !== undefined)
24
- return mapResume(ctx.resumeData);
18
+ async function listExistingCredentials(credentialProvider, credentialType) {
19
+ const all = await credentialProvider.list();
20
+ return all.filter((c) => c.type === credentialType).map((c) => ({ id: c.id, name: c.name }));
21
+ }
22
+ async function resolveResume(input, resumeData, credentialProvider) {
23
+ if (!('credentials' in resumeData))
24
+ return { skipped: true };
25
+ const credentialId = resumeData.credentials[input.credentialType];
26
+ if (!credentialId)
27
+ return { skipped: true };
28
+ const existingCredentials = await listExistingCredentials(credentialProvider, input.credentialType);
29
+ const match = existingCredentials.find((c) => c.id === credentialId);
30
+ return withNodeCredentialMap(input, credentialId, match?.name ?? credentialId);
31
+ }
32
+ async function resolveCredentialSelection(input, ctx, deps) {
33
+ if (ctx.resumeData !== undefined && ctx.resumeData !== null) {
34
+ return await resolveResume(input, ctx.resumeData, deps.credentialProvider);
35
+ }
25
36
  if (deps.isCredentialTypeKnown && !deps.isCredentialTypeKnown(input.credentialType)) {
26
37
  throw new Error(`Unknown credential type "${input.credentialType}". Use an exact n8n credential type name.`);
27
38
  }
28
- const all = await deps.credentialProvider.list();
29
- const matching = all.filter((c) => c.type === input.credentialType);
30
- if (matching.length === 1) {
31
- return mapResume({
32
- credentialId: matching[0].id,
33
- credentialName: matching[0].name,
34
- });
39
+ const existingCredentials = await listExistingCredentials(deps.credentialProvider, input.credentialType);
40
+ if (existingCredentials.length === 1) {
41
+ return withNodeCredentialMap(input, existingCredentials[0].id, existingCredentials[0].name);
35
42
  }
36
- return await ctx.suspend(input);
43
+ return await ctx.suspend({
44
+ requestId: (0, nanoid_1.nanoid)(),
45
+ message: input.purpose,
46
+ severity: 'info',
47
+ credentialRequests: [
48
+ {
49
+ credentialType: input.credentialType,
50
+ reason: input.purpose,
51
+ existingCredentials,
52
+ },
53
+ ],
54
+ credentialFlow: { stage: 'generic' },
55
+ });
37
56
  }
38
57
  function buildAskCredentialTool(deps) {
39
- return (new tool_1.Tool(api_types_1.ASK_CREDENTIAL_TOOL_NAME)
58
+ return new tool_1.Tool(api_types_1.ASK_CREDENTIAL_TOOL_NAME)
40
59
  .description('Show a credential picker card in the chat UI and suspend until the user selects ' +
41
60
  'a credential. Call ONCE per credential slot, BEFORE the write_config / patch_config ' +
42
61
  'that introduces the node tool. Returns { credentialId, credentialName, credentials } on success ' +
@@ -44,12 +63,12 @@ function buildAskCredentialTool(deps) {
44
63
  'without credentials. For node tools, copy the returned `credentials` object into `node.credentials`. Auto-resolves without ' +
45
64
  'rendering a card when the user has exactly one credential of the requested type.')
46
65
  .input(api_types_1.askCredentialInputSchema)
47
- .suspend(api_types_1.askCredentialInputSchema)
48
- .resume(api_types_1.askCredentialResumeSchema)
66
+ .suspend(api_types_1.credentialSuspendPayloadSchema)
67
+ .resume(api_types_1.credentialResumeSchema)
49
68
  .handler(async (input, ctx) => {
50
- return await resolveCredentialSelection(input, ctx, deps, (resume) => withNodeCredentialMap(input, resume));
69
+ return await resolveCredentialSelection(input, ctx, deps);
51
70
  })
52
- .build());
71
+ .build();
53
72
  }
54
73
  function buildAskEmbeddingCredentialTool(deps) {
55
74
  return new tool_1.Tool(api_types_1.ASK_EMBEDDING_CREDENTIAL_TOOL_NAME)
@@ -58,16 +77,13 @@ function buildAskEmbeddingCredentialTool(deps) {
58
77
  'the user selects a credential. Returns { credentialId, credentialName, credentials } ' +
59
78
  'on success or { skipped: true } if the user skips credential setup.')
60
79
  .input(api_types_1.askCredentialInputSchema)
61
- .suspend(api_types_1.askCredentialInputSchema)
62
- .resume(api_types_1.askCredentialResumeSchema)
80
+ .suspend(api_types_1.credentialSuspendPayloadSchema)
81
+ .resume(api_types_1.credentialResumeSchema)
63
82
  .handler(async (input, ctx) => {
64
83
  if (deps.isAssistantProxyEnabled()) {
65
- return withNodeCredentialMap(input, {
66
- credentialId: api_types_1.MANAGED_CREDENTIAL_TOKEN,
67
- credentialName: 'Managed by n8n',
68
- });
84
+ return withNodeCredentialMap(input, api_types_1.MANAGED_CREDENTIAL_TOKEN, 'Managed by n8n');
69
85
  }
70
- return await resolveCredentialSelection(input, ctx, deps, (resume) => withNodeCredentialMap(input, resume));
86
+ return await resolveCredentialSelection(input, ctx, deps);
71
87
  })
72
88
  .build();
73
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ask-credential.tool.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/ask-credential.tool.ts"],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,CAAC,MAAM,EAAE,EAAE,CACpE,qBAAqB,CAAC,KAAK,EAAE,MAAM,CAAC,CACpC,CAAC;IACH,CAAC,CACD;SACA,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"ask-credential.tool.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/interactive/ask-credential.tool.ts"],"names":[],"mappings":";;AAoHA,wDAsBC;AAED,0EAuBC;AAlKD,2CAAwC;AACxC,8CAUwB;AACxB,mCAAgC;AAmBhC,SAAS,qBAAqB,CAC7B,KAAyB,EACzB,YAAoB,EACpB,cAAsB;IAEtB,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,CAAC;IACpE,OAAO;QACN,YAAY;QACZ,cAAc;QACd,WAAW,EAAE;YACZ,CAAC,cAAc,CAAC,EAAE,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE;SAC5D;KACD,CAAC;AACH,CAAC;AAGD,KAAK,UAAU,uBAAuB,CACrC,kBAAsC,EACtC,cAAsB;IAEtB,MAAM,GAAG,GAAG,MAAM,kBAAkB,CAAC,IAAI,EAAE,CAAC;IAC5C,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC;AAGD,KAAK,UAAU,aAAa,CAC3B,KAAyB,EACzB,UAAgC,EAChC,kBAAsC;IAEtC,IAAI,CAAC,CAAC,aAAa,IAAI,UAAU,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAE7D,MAAM,YAAY,GAAG,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,cAAc,CAAC,C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