n8n 2.25.6 → 2.26.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 (641) hide show
  1. package/dist/active-executions.js +1 -1
  2. package/dist/active-executions.js.map +1 -1
  3. package/dist/active-workflow-manager.d.ts +7 -7
  4. package/dist/active-workflow-manager.js +20 -20
  5. package/dist/active-workflow-manager.js.map +1 -1
  6. package/dist/agent-library-bundle.js +42 -10
  7. package/dist/build.tsbuildinfo +1 -1
  8. package/dist/chat/chat-execution-manager.d.ts +3 -1
  9. package/dist/chat/chat-execution-manager.js +6 -3
  10. package/dist/chat/chat-execution-manager.js.map +1 -1
  11. package/dist/chat/chat-service.types.d.ts +4 -4
  12. package/dist/commands/base-command.js +2 -2
  13. package/dist/commands/base-command.js.map +1 -1
  14. package/dist/commands/execute-batch.d.ts +2 -2
  15. package/dist/commands/execute.d.ts +2 -2
  16. package/dist/commands/export/credentials.d.ts +4 -4
  17. package/dist/commands/export/entities.d.ts +2 -2
  18. package/dist/commands/export/workflow.d.ts +4 -4
  19. package/dist/commands/import/credentials.d.ts +2 -2
  20. package/dist/commands/import/workflow.d.ts +2 -2
  21. package/dist/commands/start.js +1 -1
  22. package/dist/commands/start.js.map +1 -1
  23. package/dist/commands/ttwf/generate.d.ts +2 -2
  24. package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
  25. package/dist/controllers/api-keys.controller.d.ts +16 -4
  26. package/dist/controllers/api-keys.controller.js +11 -8
  27. package/dist/controllers/api-keys.controller.js.map +1 -1
  28. package/dist/controllers/e2e.controller.d.ts +15 -0
  29. package/dist/controllers/e2e.controller.js +60 -0
  30. package/dist/controllers/e2e.controller.js.map +1 -1
  31. package/dist/controllers/oauth/oauth1-credential.controller.js +7 -9
  32. package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
  33. package/dist/controllers/oauth/oauth2-credential.controller.js +3 -3
  34. package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
  35. package/dist/controllers/project.controller.d.ts +1 -1
  36. package/dist/controllers/project.controller.js +9 -1
  37. package/dist/controllers/project.controller.js.map +1 -1
  38. package/dist/controllers/security-settings.controller.d.ts +1 -1
  39. package/dist/controllers/security-settings.controller.js +18 -14
  40. package/dist/controllers/security-settings.controller.js.map +1 -1
  41. package/dist/controllers/telemetry.controller.d.ts +4 -1
  42. package/dist/controllers/telemetry.controller.js +61 -2
  43. package/dist/controllers/telemetry.controller.js.map +1 -1
  44. package/dist/controllers/users.controller.d.ts +2 -2
  45. package/dist/credentials/credential-connection-status-provider.interface.d.ts +1 -0
  46. package/dist/credentials/credential-connection-status-proxy.d.ts +1 -0
  47. package/dist/credentials/credential-connection-status-proxy.js +5 -0
  48. package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
  49. package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -0
  50. package/dist/credentials/credentials.controller.d.ts +3 -1
  51. package/dist/credentials/credentials.controller.js +23 -2
  52. package/dist/credentials/credentials.controller.js.map +1 -1
  53. package/dist/credentials-helper.js +3 -0
  54. package/dist/credentials-helper.js.map +1 -1
  55. package/dist/errors/http-error-serializers.js +22 -2
  56. package/dist/errors/http-error-serializers.js.map +1 -1
  57. package/dist/errors/response-errors/conflict.error.d.ts +2 -1
  58. package/dist/errors/response-errors/conflict.error.js +2 -1
  59. package/dist/errors/response-errors/conflict.error.js.map +1 -1
  60. package/dist/evaluation.ee/evaluation-config-validator.d.ts +1 -0
  61. package/dist/evaluation.ee/evaluation-config-validator.js +69 -0
  62. package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -1
  63. package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js +2 -1
  64. package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js.map +1 -1
  65. package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +6 -2
  66. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +59 -16
  67. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
  68. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +28 -1
  69. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
  70. package/dist/evaluation.ee/test-runs.controller.ee.js +6 -1
  71. package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
  72. package/dist/events/event.service.d.ts +2 -1
  73. package/dist/events/event.service.js.map +1 -1
  74. package/dist/events/maps/execution-data.event-map.d.ts +14 -0
  75. package/dist/events/maps/execution-data.event-map.js +3 -0
  76. package/dist/events/maps/execution-data.event-map.js.map +1 -0
  77. package/dist/events/maps/relay.event-map.d.ts +19 -5
  78. package/dist/events/relays/log-streaming.event-relay.js +2 -0
  79. package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
  80. package/dist/events/relays/telemetry.event-relay.d.ts +3 -0
  81. package/dist/events/relays/telemetry.event-relay.js +47 -6
  82. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  83. package/dist/execution-lifecycle/save-execution-progress.js +3 -3
  84. package/dist/execution-lifecycle/save-execution-progress.js.map +1 -1
  85. package/dist/execution-lifecycle/shared/shared-hook-functions.js +3 -3
  86. package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
  87. package/dist/executions/execution-persistence.d.ts +8 -1
  88. package/dist/executions/execution-persistence.js +183 -42
  89. package/dist/executions/execution-persistence.js.map +1 -1
  90. package/dist/executions/execution-recovery.service.d.ts +3 -1
  91. package/dist/executions/execution-recovery.service.js +7 -4
  92. package/dist/executions/execution-recovery.service.js.map +1 -1
  93. package/dist/executions/execution.service.d.ts +1 -0
  94. package/dist/executions/execution.service.js +21 -7
  95. package/dist/executions/execution.service.js.map +1 -1
  96. package/dist/interfaces.d.ts +1 -1
  97. package/dist/load-nodes-and-credentials.js +6 -0
  98. package/dist/load-nodes-and-credentials.js.map +1 -1
  99. package/dist/metrics/prometheus-metrics.service.d.ts +5 -2
  100. package/dist/metrics/prometheus-metrics.service.js +74 -3
  101. package/dist/metrics/prometheus-metrics.service.js.map +1 -1
  102. package/dist/metrics/types.d.ts +1 -1
  103. package/dist/modules/agents/agent-execution.service.d.ts +2 -0
  104. package/dist/modules/agents/agent-execution.service.js +2 -2
  105. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  106. package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +84 -0
  107. package/dist/modules/agents/agent-runtime-reconstruction.service.js +362 -0
  108. package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -0
  109. package/dist/modules/agents/agent-sse-stream.js +15 -1
  110. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  111. package/dist/modules/agents/agents-tools.service.js +8 -1
  112. package/dist/modules/agents/agents-tools.service.js.map +1 -1
  113. package/dist/modules/agents/agents.controller.d.ts +34 -19
  114. package/dist/modules/agents/agents.controller.js +39 -3
  115. package/dist/modules/agents/agents.controller.js.map +1 -1
  116. package/dist/modules/agents/agents.module.d.ts +1 -1
  117. package/dist/modules/agents/agents.service.d.ts +13 -31
  118. package/dist/modules/agents/agents.service.js +154 -282
  119. package/dist/modules/agents/agents.service.js.map +1 -1
  120. package/dist/modules/agents/builder/agents-builder-prompts.js +1 -0
  121. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  122. package/dist/modules/agents/builder/agents-builder-tools.service.js +21 -2
  123. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  124. package/dist/modules/agents/builder/agents-builder.service.js +3 -11
  125. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  126. package/dist/modules/agents/builder/builder-tool-names.d.ts +1 -0
  127. package/dist/modules/agents/builder/builder-tool-names.js +1 -0
  128. package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
  129. package/dist/modules/agents/builder/interactive/ask-question.tool.js +1 -1
  130. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
  131. package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +10 -0
  132. package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -1
  133. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +5 -3
  134. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
  135. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +7 -2
  136. package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
  137. package/dist/modules/agents/builder/skills/index.js +2 -0
  138. package/dist/modules/agents/builder/skills/index.js.map +1 -1
  139. package/dist/modules/agents/builder/skills/sub-agents.skill.d.ts +2 -0
  140. package/dist/modules/agents/builder/skills/sub-agents.skill.js +101 -0
  141. package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -0
  142. package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +2 -0
  143. package/dist/modules/agents/entities/agent-execution-thread.entity.js +8 -0
  144. package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
  145. package/dist/modules/agents/entities/agent-execution.entity.js +1 -1
  146. package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
  147. package/dist/modules/agents/execution-recorder.d.ts +3 -0
  148. package/dist/modules/agents/execution-recorder.js +75 -10
  149. package/dist/modules/agents/execution-recorder.js.map +1 -1
  150. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +4 -7
  151. package/dist/modules/agents/integrations/agent-chat-bridge.js +138 -105
  152. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  153. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
  154. package/dist/modules/agents/integrations/chat-integration.service.d.ts +5 -0
  155. package/dist/modules/agents/integrations/chat-integration.service.js +5 -0
  156. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  157. package/dist/modules/agents/integrations/component-mapper.d.ts +21 -11
  158. package/dist/modules/agents/integrations/component-mapper.js +50 -20
  159. package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
  160. package/dist/modules/agents/integrations/integration-action-executor.d.ts +1 -0
  161. package/dist/modules/agents/integrations/integration-action-executor.js +20 -9
  162. package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
  163. package/dist/modules/agents/integrations/integration-tools.js +176 -31
  164. package/dist/modules/agents/integrations/integration-tools.js.map +1 -1
  165. package/dist/modules/agents/integrations/platforms/slack-integration.js +1 -1
  166. package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
  167. package/dist/modules/agents/integrations/platforms/telegram-integration.js +1 -1
  168. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
  169. package/dist/modules/agents/json-config/credential-field-mapping.js +1 -0
  170. package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
  171. package/dist/modules/agents/json-config/from-json-config.d.ts +2 -1
  172. package/dist/modules/agents/json-config/from-json-config.js +41 -15
  173. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  174. package/dist/modules/agents/json-config/mcp-client-factory.d.ts +0 -6
  175. package/dist/modules/agents/json-config/mcp-client-factory.js +2 -31
  176. package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
  177. package/dist/modules/agents/json-config/model-config.d.ts +2 -0
  178. package/dist/modules/agents/json-config/model-config.js +11 -0
  179. package/dist/modules/agents/json-config/model-config.js.map +1 -0
  180. package/dist/modules/agents/json-config/model-id.d.ts +1 -0
  181. package/dist/modules/agents/json-config/model-id.js +8 -0
  182. package/dist/modules/agents/json-config/model-id.js.map +1 -0
  183. package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +0 -1
  184. package/dist/modules/agents/json-config/native-web-search-provider-tools.js +3 -7
  185. package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +1 -1
  186. package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.d.ts +1 -0
  187. package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +63 -0
  188. package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -0
  189. package/dist/modules/agents/model-catalog.d.ts +1 -0
  190. package/dist/modules/agents/model-catalog.js +15 -0
  191. package/dist/modules/agents/model-catalog.js.map +1 -0
  192. package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +5 -1
  193. package/dist/modules/agents/repositories/agent-execution-thread.repository.js +5 -3
  194. package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
  195. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +17 -0
  196. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +66 -0
  197. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -0
  198. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +27 -0
  199. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +235 -0
  200. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -0
  201. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +20 -0
  202. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +87 -0
  203. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -0
  204. package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +2 -2
  205. package/dist/modules/agents/tools/knowledge/schemas.d.ts +91 -91
  206. package/dist/modules/agents/tools/node-tool-factory.js +9 -12
  207. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
  208. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +2 -3
  209. package/dist/modules/agents/tools/workflow-tool-factory.js +6 -4
  210. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  211. package/dist/modules/agents/utils/agent-stream.d.ts +2 -0
  212. package/dist/modules/agents/utils/agent-stream.js +27 -0
  213. package/dist/modules/agents/utils/agent-stream.js.map +1 -0
  214. package/dist/modules/agents/utils/execution-to-message-mapper.js +2 -0
  215. package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
  216. package/dist/modules/agents/utils/structured-output-error.d.ts +1 -0
  217. package/dist/modules/agents/utils/structured-output-error.js +34 -0
  218. package/dist/modules/agents/utils/structured-output-error.js.map +1 -0
  219. package/dist/modules/chat-hub/chat-hub-execution-watcher.service.d.ts +3 -3
  220. package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js +5 -5
  221. package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js.map +1 -1
  222. package/dist/modules/chat-hub/chat-hub-execution.service.d.ts +3 -1
  223. package/dist/modules/chat-hub/chat-hub-execution.service.js +6 -3
  224. package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
  225. package/dist/modules/chat-hub/chat-hub-title.service.d.ts +4 -3
  226. package/dist/modules/chat-hub/chat-hub-title.service.js +5 -5
  227. package/dist/modules/chat-hub/chat-hub-title.service.js.map +1 -1
  228. package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
  229. package/dist/modules/chat-hub/chat-hub.service.d.ts +4 -3
  230. package/dist/modules/chat-hub/chat-hub.service.js +5 -5
  231. package/dist/modules/chat-hub/chat-hub.service.js.map +1 -1
  232. package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
  233. package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -5
  234. package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
  235. package/dist/modules/data-table/data-table.module.d.ts +1 -1
  236. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
  237. package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.d.ts +1 -0
  238. package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js +3 -0
  239. package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js.map +1 -1
  240. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.d.ts +5 -0
  241. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js +15 -0
  242. package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js.map +1 -1
  243. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +9 -1
  244. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +57 -3
  245. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
  246. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +14 -3
  247. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
  248. package/dist/modules/external-secrets.ee/providers/infisical.d.ts +20 -14
  249. package/dist/modules/external-secrets.ee/providers/infisical.js +215 -90
  250. package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
  251. package/dist/modules/favorites/dto/add-favorite.dto.d.ts +1 -1
  252. package/dist/modules/insights/database/entities/insights-shared.d.ts +1 -1
  253. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +2 -1
  254. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +2 -3
  255. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +1 -1
  256. package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +3 -3
  257. package/dist/modules/insights/insights.service.d.ts +3 -3
  258. package/dist/modules/instance-ai/entities/index.d.ts +1 -0
  259. package/dist/modules/instance-ai/entities/index.js +3 -1
  260. package/dist/modules/instance-ai/entities/index.js.map +1 -1
  261. package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.d.ts +12 -0
  262. package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.js +42 -0
  263. package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.js.map +1 -0
  264. package/dist/modules/instance-ai/entities/instance-ai-thread.entity.d.ts +3 -1
  265. package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js +10 -0
  266. package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js.map +1 -1
  267. package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
  268. package/dist/modules/instance-ai/eval/execution.service.js +183 -40
  269. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  270. package/dist/modules/instance-ai/eval/workflow-analysis.js +5 -0
  271. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  272. package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +1 -2
  273. package/dist/modules/instance-ai/extract-resolved-node-parameters.js +4 -2
  274. package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -1
  275. package/dist/modules/instance-ai/instance-ai-gateway.service.d.ts +31 -0
  276. package/dist/modules/instance-ai/instance-ai-gateway.service.js +84 -0
  277. package/dist/modules/instance-ai/instance-ai-gateway.service.js.map +1 -0
  278. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +1 -1
  279. package/dist/modules/instance-ai/instance-ai-memory.service.js +5 -4
  280. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  281. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +10 -1
  282. package/dist/modules/instance-ai/instance-ai-settings.service.js +47 -5
  283. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  284. package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +6 -2
  285. package/dist/modules/instance-ai/instance-ai-test.controller.js +17 -3
  286. package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
  287. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +5 -5
  288. package/dist/modules/instance-ai/instance-ai.adapter.service.js +104 -36
  289. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  290. package/dist/modules/instance-ai/instance-ai.controller.d.ts +8 -6
  291. package/dist/modules/instance-ai/instance-ai.controller.js +31 -36
  292. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  293. package/dist/modules/instance-ai/instance-ai.module.d.ts +4 -1
  294. package/dist/modules/instance-ai/instance-ai.module.js +7 -6
  295. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  296. package/dist/modules/instance-ai/instance-ai.service.d.ts +50 -41
  297. package/dist/modules/instance-ai/instance-ai.service.js +599 -246
  298. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  299. package/dist/modules/instance-ai/internal-messages.js +1 -1
  300. package/dist/modules/instance-ai/internal-messages.js.map +1 -1
  301. package/dist/modules/instance-ai/mcp/index.d.ts +1 -0
  302. package/dist/modules/instance-ai/mcp/index.js +18 -0
  303. package/dist/modules/instance-ai/mcp/index.js.map +1 -0
  304. package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +17 -0
  305. package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +125 -0
  306. package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -0
  307. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +35 -0
  308. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +264 -0
  309. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -0
  310. package/dist/modules/instance-ai/planned-task-action-runner.d.ts +91 -0
  311. package/dist/modules/instance-ai/planned-task-action-runner.js +138 -0
  312. package/dist/modules/instance-ai/planned-task-action-runner.js.map +1 -0
  313. package/dist/modules/instance-ai/repositories/index.d.ts +1 -0
  314. package/dist/modules/instance-ai/repositories/index.js +3 -1
  315. package/dist/modules/instance-ai/repositories/index.js.map +1 -1
  316. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
  317. package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.d.ts +5 -0
  318. package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.js +26 -0
  319. package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.js.map +1 -0
  320. package/dist/modules/instance-ai/sandbox-provider.d.ts +4 -0
  321. package/dist/modules/instance-ai/sandbox-provider.js +19 -0
  322. package/dist/modules/instance-ai/sandbox-provider.js.map +1 -0
  323. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
  324. package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +4 -1
  325. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +103 -12
  326. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
  327. package/dist/modules/instance-ai/trace-replay-state.d.ts +2 -0
  328. package/dist/modules/instance-ai/trace-replay-state.js +56 -6
  329. package/dist/modules/instance-ai/trace-replay-state.js.map +1 -1
  330. package/dist/modules/instance-ai/workflow-verification-obligation-service.d.ts +20 -0
  331. package/dist/modules/instance-ai/workflow-verification-obligation-service.js +59 -0
  332. package/dist/modules/instance-ai/workflow-verification-obligation-service.js.map +1 -0
  333. package/dist/modules/instance-ai/workflow-verification-task-projector.d.ts +21 -0
  334. package/dist/modules/instance-ai/workflow-verification-task-projector.js +323 -0
  335. package/dist/modules/instance-ai/workflow-verification-task-projector.js.map +1 -0
  336. package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.d.ts +1 -0
  337. package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.js +4 -0
  338. package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.js.map +1 -1
  339. package/dist/modules/mcp/mcp-oauth-authorization-code.service.d.ts +3 -1
  340. package/dist/modules/mcp/mcp-oauth-authorization-code.service.js +35 -5
  341. package/dist/modules/mcp/mcp-oauth-authorization-code.service.js.map +1 -1
  342. package/dist/modules/mcp/mcp-oauth-consent.service.js +1 -1
  343. package/dist/modules/mcp/mcp-oauth-consent.service.js.map +1 -1
  344. package/dist/modules/mcp/mcp-oauth-service.d.ts +4 -2
  345. package/dist/modules/mcp/mcp-oauth-service.js +60 -9
  346. package/dist/modules/mcp/mcp-oauth-service.js.map +1 -1
  347. package/dist/modules/mcp/mcp-oauth-token.service.d.ts +8 -6
  348. package/dist/modules/mcp/mcp-oauth-token.service.js +53 -16
  349. package/dist/modules/mcp/mcp-oauth-token.service.js.map +1 -1
  350. package/dist/modules/mcp/mcp-server-middleware.service.js +2 -1
  351. package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
  352. package/dist/modules/mcp/mcp.constants.d.ts +1 -0
  353. package/dist/modules/mcp/mcp.constants.js +2 -1
  354. package/dist/modules/mcp/mcp.constants.js.map +1 -1
  355. package/dist/modules/mcp/mcp.controller.js +1 -1
  356. package/dist/modules/mcp/mcp.controller.js.map +1 -1
  357. package/dist/modules/mcp/mcp.service.d.ts +7 -4
  358. package/dist/modules/mcp/mcp.service.js +60 -9
  359. package/dist/modules/mcp/mcp.service.js.map +1 -1
  360. package/dist/modules/mcp/mcp.types.d.ts +5 -4
  361. package/dist/modules/mcp/mcp.utils.d.ts +2 -4
  362. package/dist/modules/mcp/mcp.utils.js.map +1 -1
  363. package/dist/modules/mcp/oauth-session.service.d.ts +1 -0
  364. package/dist/modules/mcp/oauth-session.service.js.map +1 -1
  365. package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +7 -7
  366. package/dist/modules/mcp/tools/get-execution.tool.d.ts +1 -1
  367. package/dist/modules/mcp/tools/get-execution.tool.js +3 -3
  368. package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
  369. package/dist/modules/mcp/tools/schemas.d.ts +28 -28
  370. package/dist/modules/mcp/tools/search-projects.tool.d.ts +2 -1
  371. package/dist/modules/mcp/tools/search-projects.tool.js +16 -7
  372. package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
  373. package/dist/modules/mcp/tools/workflow-builder/constants.d.ts +1 -1
  374. package/dist/modules/mcp/tools/workflow-builder/constants.js +2 -2
  375. package/dist/modules/mcp/tools/workflow-builder/constants.js.map +1 -1
  376. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +1 -0
  377. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +9 -2
  378. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  379. package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.d.ts +27 -0
  380. package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +123 -0
  381. package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -0
  382. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
  383. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
  384. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
  385. package/dist/modules/mcp/tools/workflow-builder/skills-used.d.ts +1 -0
  386. package/dist/modules/mcp/tools/workflow-builder/skills-used.js +26 -0
  387. package/dist/modules/mcp/tools/workflow-builder/skills-used.js.map +1 -0
  388. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +20 -19
  389. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +9 -2
  390. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  391. package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +2 -2
  392. package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +19 -19
  393. package/dist/modules/mcp-registry/mcp-registry-node-loader.js +3 -2
  394. package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -1
  395. package/dist/modules/mcp-registry/mcp-registry.controller.d.ts +7 -0
  396. package/dist/modules/mcp-registry/mcp-registry.controller.js +54 -0
  397. package/dist/modules/mcp-registry/mcp-registry.controller.js.map +1 -0
  398. package/dist/modules/mcp-registry/mcp-registry.module.js +1 -0
  399. package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -1
  400. package/dist/modules/mcp-registry/node-description-transform.d.ts +5 -3
  401. package/dist/modules/mcp-registry/node-description-transform.js +82 -24
  402. package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
  403. package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +8 -4
  404. package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -1
  405. package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +1 -0
  406. package/dist/modules/mcp-registry/registry/mcp-registry.service.js +7 -0
  407. package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
  408. package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +35 -1
  409. package/dist/modules/mcp-registry/registry/mcp-registry.types.js +13 -0
  410. package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
  411. package/dist/modules/mcp-registry/registry/mock-servers.d.ts +2 -0
  412. package/dist/modules/mcp-registry/registry/mock-servers.js +45 -1
  413. package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
  414. package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +5 -3
  415. package/dist/modules/n8n-packages/engine/import-pipeline.js +36 -25
  416. package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -1
  417. package/dist/modules/n8n-packages/entities/credential/credential-importer.d.ts +9 -0
  418. package/dist/modules/n8n-packages/entities/credential/credential-importer.js +41 -0
  419. package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -0
  420. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.d.ts +8 -0
  421. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js +35 -0
  422. package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js.map +1 -0
  423. package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +18 -0
  424. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +34 -0
  425. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -0
  426. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.d.ts +7 -0
  427. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js +35 -0
  428. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js.map +1 -0
  429. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.d.ts +7 -0
  430. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +17 -0
  431. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -0
  432. package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.d.ts +3 -0
  433. package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js +14 -0
  434. package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js.map +1 -0
  435. package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +30 -0
  436. package/dist/modules/n8n-packages/entities/credential/credential.types.js +12 -0
  437. package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
  438. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.d.ts +13 -0
  439. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +47 -0
  440. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -0
  441. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.d.ts +9 -0
  442. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js +41 -0
  443. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js.map +1 -0
  444. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.d.ts +10 -0
  445. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js +20 -0
  446. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js.map +1 -0
  447. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.d.ts +11 -0
  448. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js +42 -0
  449. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js.map +1 -0
  450. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.d.ts +9 -0
  451. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js +33 -0
  452. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js.map +1 -0
  453. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.d.ts +10 -0
  454. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js +37 -0
  455. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js.map +1 -0
  456. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.d.ts +20 -0
  457. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.js +3 -0
  458. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.js.map +1 -0
  459. package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.d.ts +7 -0
  460. package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js +54 -0
  461. package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js.map +1 -0
  462. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.d.ts +14 -0
  463. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +47 -0
  464. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -0
  465. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +23 -1
  466. package/dist/modules/n8n-packages/n8n-packages.types.js +21 -0
  467. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  468. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +41 -31
  469. package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
  470. package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +17 -7
  471. package/dist/modules/n8n-packages/spec/requirements.schema.js +17 -1
  472. package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
  473. package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +2 -2
  474. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +40 -33
  475. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +2 -1
  476. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
  477. package/dist/modules/n8n-packages/utils/import-package-upload.js +1 -1
  478. package/dist/modules/oauth-jwe/oauth-jwe.schemas.d.ts +18 -18
  479. package/dist/modules/otel/otel-lifecycle-handler.d.ts +6 -2
  480. package/dist/modules/otel/otel-lifecycle-handler.js +30 -17
  481. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  482. package/dist/modules/quick-connect/quick-connect.config.d.ts +29 -29
  483. package/dist/modules/quick-connect/quick-connect.module.d.ts +11 -11
  484. package/dist/modules/redaction/executions/execution-redaction.interfaces.d.ts +1 -1
  485. package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -0
  486. package/dist/modules/redaction/executions/execution-redaction.service.js +25 -11
  487. package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
  488. package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js +1 -1
  489. package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js.map +1 -1
  490. package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +9 -7
  491. package/dist/modules/redaction/instance-redaction-enforcement.service.js +32 -14
  492. package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
  493. package/dist/modules/redaction/redaction-context-hook.js +14 -16
  494. package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
  495. package/dist/modules/redaction/redaction-enforcement.service.d.ts +5 -5
  496. package/dist/modules/redaction/redaction-enforcement.service.js +13 -11
  497. package/dist/modules/redaction/redaction-enforcement.service.js.map +1 -1
  498. package/dist/modules/redaction/redaction-policy.d.ts +7 -0
  499. package/dist/modules/redaction/redaction-policy.js +31 -0
  500. package/dist/modules/redaction/redaction-policy.js.map +1 -0
  501. package/dist/modules/redaction/redaction.module.js +1 -0
  502. package/dist/modules/redaction/redaction.module.js.map +1 -1
  503. package/dist/modules/source-control.ee/source-control-import.service.ee.js +1 -1
  504. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  505. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -4
  506. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +2 -2
  507. package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +1 -1
  508. package/dist/modules/sso-oidc/oidc.service.ee.d.ts +2 -1
  509. package/dist/modules/sso-oidc/oidc.service.ee.js +35 -18
  510. package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
  511. package/dist/modules/token-exchange/token-exchange.schemas.d.ts +12 -12
  512. package/dist/node-execution/ephemeral-node-executor.js +3 -0
  513. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  514. package/dist/oauth/oauth.service.d.ts +20 -6
  515. package/dist/oauth/oauth.service.js +80 -18
  516. package/dist/oauth/oauth.service.js.map +1 -1
  517. package/dist/public-api/v1/handlers/executions/executions.handler.js +4 -4
  518. package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
  519. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +3 -0
  520. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
  521. package/dist/public-api/v1/handlers/users/users.service.ee.js +1 -0
  522. package/dist/public-api/v1/handlers/users/users.service.ee.js.map +1 -1
  523. package/dist/public-api/v1/handlers/workflows/workflows.service.js +2 -0
  524. package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
  525. package/dist/public-api/v1/openapi.yml +169 -6
  526. package/dist/response-helper.js +16 -1
  527. package/dist/response-helper.js.map +1 -1
  528. package/dist/scaling/constants.d.ts +2 -2
  529. package/dist/scaling/job-processor.d.ts +3 -1
  530. package/dist/scaling/job-processor.js +6 -3
  531. package/dist/scaling/job-processor.js.map +1 -1
  532. package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
  533. package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
  534. package/dist/scaling/scaling.service.d.ts +3 -1
  535. package/dist/scaling/scaling.service.js +5 -2
  536. package/dist/scaling/scaling.service.js.map +1 -1
  537. package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +4 -3
  538. package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +6 -4
  539. package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
  540. package/dist/services/ai-workflow-builder.service.d.ts +1 -2
  541. package/dist/services/ai-workflow-builder.service.js +2 -3
  542. package/dist/services/ai-workflow-builder.service.js.map +1 -1
  543. package/dist/services/dynamic-node-parameters.service.js +3 -5
  544. package/dist/services/dynamic-node-parameters.service.js.map +1 -1
  545. package/dist/services/frontend.service.js +2 -0
  546. package/dist/services/frontend.service.js.map +1 -1
  547. package/dist/services/project.service.ee.d.ts +1 -0
  548. package/dist/services/project.service.ee.js +34 -2
  549. package/dist/services/project.service.ee.js.map +1 -1
  550. package/dist/services/public-api-key.service.d.ts +25 -7
  551. package/dist/services/public-api-key.service.js +93 -14
  552. package/dist/services/public-api-key.service.js.map +1 -1
  553. package/dist/services/role.service.d.ts +3 -3
  554. package/dist/task-runners/errors/task-cancelled.error.d.ts +4 -0
  555. package/dist/task-runners/errors/task-cancelled.error.js +11 -0
  556. package/dist/task-runners/errors/task-cancelled.error.js.map +1 -0
  557. package/dist/task-runners/task-managers/task-requester.js +2 -1
  558. package/dist/task-runners/task-managers/task-requester.js.map +1 -1
  559. package/dist/telemetry/index.js +2 -2
  560. package/dist/tool-generation/hitl-tools.js +1 -1
  561. package/dist/tool-generation/hitl-tools.js.map +1 -1
  562. package/dist/utils/auth-fetch.d.ts +6 -0
  563. package/dist/utils/auth-fetch.js +33 -0
  564. package/dist/utils/auth-fetch.js.map +1 -0
  565. package/dist/wait-tracker.d.ts +6 -1
  566. package/dist/wait-tracker.js +43 -18
  567. package/dist/wait-tracker.js.map +1 -1
  568. package/dist/webhooks/waiting-webhooks.d.ts +3 -3
  569. package/dist/webhooks/waiting-webhooks.js +5 -5
  570. package/dist/webhooks/waiting-webhooks.js.map +1 -1
  571. package/dist/webhooks/webhook-helpers.js +1 -19
  572. package/dist/webhooks/webhook-helpers.js.map +1 -1
  573. package/dist/webhooks/webhook-server.d.ts +1 -0
  574. package/dist/webhooks/webhook-server.js +39 -0
  575. package/dist/webhooks/webhook-server.js.map +1 -1
  576. package/dist/workflow-execute-additional-data.d.ts +3 -2
  577. package/dist/workflow-execute-additional-data.js +42 -15
  578. package/dist/workflow-execute-additional-data.js.map +1 -1
  579. package/dist/workflow-helpers.d.ts +2 -2
  580. package/dist/workflow-helpers.js +5 -3
  581. package/dist/workflow-helpers.js.map +1 -1
  582. package/dist/workflow-runner.d.ts +3 -1
  583. package/dist/workflow-runner.js +8 -2
  584. package/dist/workflow-runner.js.map +1 -1
  585. package/dist/workflows/utils.d.ts +2 -0
  586. package/dist/workflows/utils.js +6 -0
  587. package/dist/workflows/utils.js.map +1 -1
  588. package/dist/workflows/workflow-creation.service.d.ts +7 -3
  589. package/dist/workflows/workflow-creation.service.js +38 -14
  590. package/dist/workflows/workflow-creation.service.js.map +1 -1
  591. package/dist/workflows/workflow-finder.service.d.ts +9 -0
  592. package/dist/workflows/workflow-finder.service.js +60 -16
  593. package/dist/workflows/workflow-finder.service.js.map +1 -1
  594. package/dist/workflows/workflow-publication-outbox-consumer.d.ts +31 -0
  595. package/dist/workflows/workflow-publication-outbox-consumer.js +209 -0
  596. package/dist/workflows/workflow-publication-outbox-consumer.js.map +1 -0
  597. package/dist/workflows/workflow-validation.service.js +1 -1
  598. package/dist/workflows/workflow-validation.service.js.map +1 -1
  599. package/dist/workflows/workflow.service.d.ts +5 -5
  600. package/dist/workflows/workflow.service.js +1 -1
  601. package/dist/workflows/workflow.service.js.map +1 -1
  602. package/dist/workflows/workflows.controller.d.ts +29 -29
  603. package/dist/workflows/workflows.controller.js +3 -4
  604. package/dist/workflows/workflows.controller.js.map +1 -1
  605. package/package.json +38 -38
  606. package/dist/controllers/redaction-enforcement-mapper.d.ts +0 -3
  607. package/dist/controllers/redaction-enforcement-mapper.js +0 -27
  608. package/dist/controllers/redaction-enforcement-mapper.js.map +0 -1
  609. package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +0 -47
  610. package/dist/modules/agents/integrations/rich-interaction-tool.js +0 -109
  611. package/dist/modules/agents/integrations/rich-interaction-tool.js.map +0 -1
  612. package/dist/modules/instance-ai/eval/sub-agent-eval.service.d.ts +0 -13
  613. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +0 -154
  614. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +0 -1
  615. package/dist/modules/instance-ai/eval/sub-agent-roles.d.ts +0 -7
  616. package/dist/modules/instance-ai/eval/sub-agent-roles.js +0 -21
  617. package/dist/modules/instance-ai/eval/sub-agent-roles.js.map +0 -1
  618. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.d.ts +0 -10
  619. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +0 -64
  620. package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +0 -1
  621. package/dist/modules/redaction/redaction.config.d.ts +0 -3
  622. package/dist/modules/redaction/redaction.config.js +0 -27
  623. package/dist/modules/redaction/redaction.config.js.map +0 -1
  624. package/dist/services/ssrf/dns-resolver.d.ts +0 -13
  625. package/dist/services/ssrf/dns-resolver.js +0 -93
  626. package/dist/services/ssrf/dns-resolver.js.map +0 -1
  627. package/dist/services/ssrf/hostname-matcher.d.ts +0 -6
  628. package/dist/services/ssrf/hostname-matcher.js +0 -38
  629. package/dist/services/ssrf/hostname-matcher.js.map +0 -1
  630. package/dist/services/ssrf/in-memory-dns-cache.service.d.ts +0 -11
  631. package/dist/services/ssrf/in-memory-dns-cache.service.js +0 -61
  632. package/dist/services/ssrf/in-memory-dns-cache.service.js.map +0 -1
  633. package/dist/services/ssrf/ip-range-builder.d.ts +0 -10
  634. package/dist/services/ssrf/ip-range-builder.js +0 -52
  635. package/dist/services/ssrf/ip-range-builder.js.map +0 -1
  636. package/dist/services/ssrf/ssrf-blocked-ip.error.d.ts +0 -6
  637. package/dist/services/ssrf/ssrf-blocked-ip.error.js +0 -21
  638. package/dist/services/ssrf/ssrf-blocked-ip.error.js.map +0 -1
  639. package/dist/services/ssrf/ssrf-protection.service.d.ts +0 -26
  640. package/dist/services/ssrf/ssrf-protection.service.js +0 -159
  641. package/dist/services/ssrf/ssrf-protection.service.js.map +0 -1
@@ -21,12 +21,13 @@ const instance_ai_thread_repository_1 = require("./repositories/instance-ai-thre
21
21
  const instance_ai_service_1 = require("./instance-ai.service");
22
22
  const instance_ai_memory_service_1 = require("./instance-ai-memory.service");
23
23
  let InstanceAiTestController = class InstanceAiTestController {
24
- constructor(instanceAiService, threadRepo, workflowRepo, userRepo, memoryService) {
24
+ constructor(instanceAiService, threadRepo, workflowRepo, userRepo, memoryService, projectRepo) {
25
25
  this.instanceAiService = instanceAiService;
26
26
  this.threadRepo = threadRepo;
27
27
  this.workflowRepo = workflowRepo;
28
28
  this.userRepo = userRepo;
29
29
  this.memoryService = memoryService;
30
+ this.projectRepo = projectRepo;
30
31
  }
31
32
  loadToolTrace(req) {
32
33
  this.assertTraceReplayEnabled();
@@ -41,11 +42,16 @@ let InstanceAiTestController = class InstanceAiTestController {
41
42
  this.assertTraceReplayEnabled();
42
43
  return { events: this.instanceAiService.getTraceEvents(slug) };
43
44
  }
45
+ getIdleState() {
46
+ this.assertTraceReplayEnabled();
47
+ return { idle: !this.instanceAiService.hasRunningWorkForTest() };
48
+ }
44
49
  async startBackgroundTimeoutSimulation(payload) {
45
50
  this.assertTraceReplayEnabled();
46
51
  const threadId = payload.threadId ?? (0, uuid_1.v4)();
47
52
  const user = await this.userRepo.findOneByOrFail({ id: payload.userId });
48
- await this.memoryService.ensureThread(user.id, threadId);
53
+ const personalProject = await this.projectRepo.getPersonalProjectForUserOrFail(user.id);
54
+ await this.memoryService.ensureThread(user.id, threadId, personalProject.id);
49
55
  return await this.instanceAiService.startStuckBackgroundTaskForTest(user, threadId);
50
56
  }
51
57
  async runLivenessSweep(payload = {}) {
@@ -61,6 +67,7 @@ let InstanceAiTestController = class InstanceAiTestController {
61
67
  async reset() {
62
68
  this.assertTraceReplayEnabled();
63
69
  this.instanceAiService.cancelAllBackgroundTasks();
70
+ this.instanceAiService.clearTraceContextsForTest();
64
71
  const threads = await this.threadRepo.find({ select: ['id'] });
65
72
  for (const { id } of threads) {
66
73
  await this.instanceAiService.clearThreadState(id);
@@ -96,6 +103,12 @@ __decorate([
96
103
  __metadata("design:paramtypes", [Object, Object, String]),
97
104
  __metadata("design:returntype", void 0)
98
105
  ], InstanceAiTestController.prototype, "getToolTrace", null);
106
+ __decorate([
107
+ (0, decorators_1.Get)('/test/idle', { skipAuth: true }),
108
+ __metadata("design:type", Function),
109
+ __metadata("design:paramtypes", []),
110
+ __metadata("design:returntype", void 0)
111
+ ], InstanceAiTestController.prototype, "getIdleState", null);
99
112
  __decorate([
100
113
  (0, decorators_1.Post)('/test/background-timeout/start', { skipAuth: true }),
101
114
  __param(0, decorators_1.Body),
@@ -129,6 +142,7 @@ exports.InstanceAiTestController = InstanceAiTestController = __decorate([
129
142
  instance_ai_thread_repository_1.InstanceAiThreadRepository,
130
143
  db_1.WorkflowRepository,
131
144
  db_1.UserRepository,
132
- instance_ai_memory_service_1.InstanceAiMemoryService])
145
+ instance_ai_memory_service_1.InstanceAiMemoryService,
146
+ db_1.ProjectRepository])
133
147
  ], InstanceAiTestController);
134
148
  //# sourceMappingURL=instance-ai-test.controller.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"instance-ai-test.controller.js","sourceRoot":"","sources":["../../../src/modules/instance-ai/instance-ai-test.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gCAA6D;AAC7D,gDAAiF;AAEjF,+BAAoC;AAEpC,8EAA0E;AAE1E,gGAA0F;AAC1F,+DAA0D;AAC1D,6EAAuE;AAOhE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACpC,YACkB,iBAAoC,EACpC,UAAsC,EACtC,YAAgC,EAChC,QAAwB,EACxB,aAAsC;QAJtC,sBAAiB,GAAjB,iBAAiB,CAAmB;QACpC,eAAU,GAAV,UAAU,CAA4B;QACtC,iBAAY,GAAZ,YAAY,CAAoB;QAChC,aAAQ,GAAR,QAAQ,CAAgB;QACxB,kBAAa,GAAb,aAAa,CAAyB;IACrD,CAAC;IAGJ,aAAa,CAAC,GAAY;QACzB,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAChC,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Y,EAAE,CAAC;YAC/E,MAAM,IAAI,gCAAc,CAAC,6BAA6B,CAAC,CAAC;QACzD,CAAC;IACF,CAAC;CACD,CAAA;AA/FY,4DAAwB;AAUpC;IADC,IAAA,iBAAI,EAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;6DAU5C;AAGD;IADC,IAAA,gBAAG,EAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACL,WAAA,IAAA,kBAAK,EAAC,MAAM,CAAC,CAAA;;;;4DAGzD;AAGK;IADL,IAAA,iBAAI,EAAC,gCAAgC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACnB,WAAA,iBAAI,CAAA;;;;gFAO3C;AAGK;IADL,IAAA,iBAAI,EAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,WAAA,iBAAI,CAAA;;;;gEAI3B;AAGD;IADC,IAAA,mBAAM,EAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACN,WAAA,IAAA,kBAAK,EAAC,MAAM,CAAC,CAAA;;;;8DAI3D;AAeK;IADL,IAAA,iBAAI,EAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;qDAyBvC;mCAxFW,wBAAwB;IADpC,IAAA,2BAAc,EAAC,cAAc,CAAC;qCAGO,uCAAiB;QACxB,0DAA0B;QACxB,uBAAkB;QACtB,mBAAc;QACT,oDAAuB;GAN5C,wBAAwB,CA+FpC"}
1
+ {"version":3,"file":"instance-ai-test.controller.js","sourceRoot":"","sources":["../../../src/modules/instance-ai/instance-ai-test.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gCAAgF;AAChF,gDAAiF;AAEjF,+BAAoC;AAEpC,8EAA0E;AAE1E,gGAA0F;AAC1F,+DAA0D;AAC1D,6EAAuE;AAOhE,IAAM,wBAAwB,GAA9B,MAAM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AC;IACnB,WAAA,iBAAI,CAAA;;;;gFAQ3C;AAGK;IADL,IAAA,iBAAI,EAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,WAAA,iBAAI,CAAA;;;;gEAI3B;AAGD;IADC,IAAA,mBAAM,EAAC,wBAAwB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACN,WAAA,IAAA,kBAAK,EAAC,MAAM,CAAC,CAAA;;;;8DAI3D;AAeK;IADL,IAAA,iBAAI,EAAC,aAAa,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;;qDA0BvC;mCAjGW,wBAAwB;IADpC,IAAA,2BAAc,EAAC,cAAc,CAAC;qCAGO,uCAAiB;QACxB,0DAA0B;QACxB,uBAAkB;QACtB,mBAAc;QACT,oDAAuB;QACzB,sBAAiB;GAPpC,wBAAwB,CAwGpC"}
@@ -5,7 +5,6 @@ import { InstanceAiSettingsService } from './instance-ai-settings.service';
5
5
  import { AiBuilderTemporaryWorkflowRepository, ExecutionRepository, ProjectRepository, SharedWorkflowRepository, WorkflowRepository } from '@n8n/db';
6
6
  import { Logger } from '@n8n/backend-common';
7
7
  import { type ExecutionError } from 'n8n-workflow';
8
- import { InstanceSettings } from 'n8n-core';
9
8
  import { ActiveExecutions } from '../../active-executions';
10
9
  import { CredentialsFinderService } from '../../credentials/credentials-finder.service';
11
10
  import { CredentialsService } from '../../credentials/credentials.service';
@@ -21,7 +20,7 @@ import { DynamicNodeParametersService } from '../../services/dynamic-node-parame
21
20
  import { FolderService } from '../../services/folder.service';
22
21
  import { ProjectService } from '../../services/project.service.ee';
23
22
  import { RoleService } from '../../services/role.service';
24
- import { SsrfProtectionService } from '../../services/ssrf/ssrf-protection.service';
23
+ import { InstanceSettings, SsrfProtectionService } from 'n8n-core';
25
24
  import { TagService } from '../../services/tag.service';
26
25
  import { WorkflowFinderService } from '../../workflows/workflow-finder.service';
27
26
  import { WorkflowHistoryService } from '../../workflows/workflow-history/workflow-history.service';
@@ -71,6 +70,7 @@ export declare class InstanceAiAdapterService {
71
70
  searchProxyConfig?: ServiceProxyConfig;
72
71
  pushRef?: string;
73
72
  threadId?: string;
73
+ projectId?: string;
74
74
  }): InstanceAiContext;
75
75
  private getTemplatesService;
76
76
  private buildLicenseHints;
@@ -120,12 +120,12 @@ export declare function resolveDataTableByIdOrName(repository: DataTableIdOrName
120
120
  accessFilter?: (id: string) => Promise<boolean>;
121
121
  }): Promise<ResolveDataTableResult>;
122
122
  export declare function truncateResultData(resultData: Record<string, unknown>): Record<string, unknown>;
123
- export declare function extractExecutionResult(executionRepository: ExecutionRepository, executionId: string, includeOutputData?: boolean): Promise<ExecutionResult>;
123
+ export declare function extractExecutionResult(executionId: string, includeOutputData?: boolean): Promise<ExecutionResult>;
124
124
  export declare function formatExecutionError(error: ExecutionError, includeUpstreamDetails: boolean): string;
125
125
  export declare function truncateNodeOutput(items: unknown[]): unknown[] | unknown;
126
- export declare function extractNodeOutput(executionRepository: ExecutionRepository, executionId: string, nodeName: string, options?: {
126
+ export declare function extractNodeOutput(executionId: string, nodeName: string, options?: {
127
127
  startIndex?: number;
128
128
  maxItems?: number;
129
129
  }): Promise<NodeOutputResult>;
130
- export declare function extractExecutionDebugInfo(executionRepository: ExecutionRepository, executionId: string, includeOutputData?: boolean, nodeTypes?: NodeTypes): Promise<ExecutionDebugInfo>;
130
+ export declare function extractExecutionDebugInfo(executionId: string, includeOutputData?: boolean, nodeTypes?: NodeTypes): Promise<ExecutionDebugInfo>;
131
131
  export {};
@@ -70,7 +70,6 @@ const di_1 = require("@n8n/di");
70
70
  const permissions_1 = require("@n8n/permissions");
71
71
  const typeorm_1 = require("@n8n/typeorm");
72
72
  const n8n_workflow_1 = require("n8n-workflow");
73
- const n8n_core_1 = require("n8n-core");
74
73
  const active_executions_1 = require("../../active-executions");
75
74
  const credentials_finder_service_1 = require("../../credentials/credentials-finder.service");
76
75
  const credentials_service_1 = require("../../credentials/credentials.service");
@@ -89,7 +88,7 @@ const dynamic_node_parameters_service_1 = require("../../services/dynamic-node-p
89
88
  const folder_service_1 = require("../../services/folder.service");
90
89
  const project_service_ee_1 = require("../../services/project.service.ee");
91
90
  const role_service_1 = require("../../services/role.service");
92
- const ssrf_protection_service_1 = require("../../services/ssrf/ssrf-protection.service");
91
+ const n8n_core_1 = require("n8n-core");
93
92
  const tag_service_1 = require("../../services/tag.service");
94
93
  const workflow_finder_service_1 = require("../../workflows/workflow-finder.service");
95
94
  const workflow_history_service_1 = require("../../workflows/workflow-history/workflow-history.service");
@@ -169,14 +168,15 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
169
168
  this.allowSendingParameterValues = globalConfig.ai.allowSendingParameterValues;
170
169
  }
171
170
  createContext(user, options) {
172
- const { searchProxyConfig, pushRef, threadId } = options ?? {};
171
+ const { searchProxyConfig, pushRef, threadId, projectId } = options ?? {};
173
172
  return {
174
173
  userId: user.id,
175
- workflowService: this.createWorkflowAdapter(user, threadId),
174
+ projectId,
175
+ workflowService: this.createWorkflowAdapter(user, threadId, projectId),
176
176
  executionService: this.createExecutionAdapter(user, pushRef, threadId),
177
- credentialService: this.createCredentialAdapter(user),
177
+ credentialService: this.createCredentialAdapter(user, projectId),
178
178
  nodeService: this.createNodeAdapter(user),
179
- dataTableService: this.createDataTableAdapter(user),
179
+ dataTableService: this.createDataTableAdapter(user, projectId),
180
180
  webResearchService: this.createWebResearchAdapter(user, searchProxyConfig),
181
181
  workspaceService: this.createWorkspaceAdapter(user),
182
182
  templatesService: this.getTemplatesService(),
@@ -211,7 +211,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
211
211
  throw new Error(`Cannot modify ${resourceType} on a protected instance. This instance is in read-only mode.`);
212
212
  }
213
213
  }
214
- createProjectScopeHelpers(user) {
214
+ createProjectScopeHelpers(user, boundProjectId) {
215
215
  const { projectRepository } = this;
216
216
  let personalProjectIdPromise = null;
217
217
  const getPersonalProjectId = async () => {
@@ -227,23 +227,31 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
227
227
  }
228
228
  };
229
229
  const resolveProjectId = async (scopes, providedProjectId) => {
230
- const projectId = providedProjectId ?? (await getPersonalProjectId());
230
+ const projectId = providedProjectId ?? boundProjectId ?? (await getPersonalProjectId());
231
231
  await assertProjectScope(scopes, projectId);
232
232
  return projectId;
233
233
  };
234
- return { getPersonalProjectId, assertProjectScope, resolveProjectId };
234
+ const resolveBoundProjectId = async (scopes) => {
235
+ if (!boundProjectId) {
236
+ throw new n8n_workflow_1.UnexpectedError('Cannot create a resource: this Instance AI run has no bound project.');
237
+ }
238
+ await assertProjectScope(scopes, boundProjectId);
239
+ return boundProjectId;
240
+ };
241
+ return { getPersonalProjectId, assertProjectScope, resolveProjectId, resolveBoundProjectId };
235
242
  }
236
- createWorkflowAdapter(user, threadId) {
237
- const { workflowService, workflowFinderService, workflowRepository, sharedWorkflowRepository, aiBuilderTemporaryWorkflowRepository, workflowHistoryService, enterpriseWorkflowService, executionRepository, license, allowSendingParameterValues, telemetry, } = this;
243
+ createWorkflowAdapter(user, threadId, boundProjectId) {
244
+ const { workflowService, workflowFinderService, workflowRepository, sharedWorkflowRepository, aiBuilderTemporaryWorkflowRepository, workflowHistoryService, enterpriseWorkflowService, executionRepository, executionPersistence, license, allowSendingParameterValues, telemetry, } = this;
238
245
  const logger = this.logger;
239
246
  const assertNotReadOnly = () => this.assertInstanceNotReadOnly('workflows');
240
- const { resolveProjectId } = this.createProjectScopeHelpers(user);
247
+ const { resolveBoundProjectId } = this.createProjectScopeHelpers(user, boundProjectId);
241
248
  const redactParameters = !allowSendingParameterValues;
242
249
  return {
243
250
  async list(options) {
244
251
  const filter = {
245
252
  ...(options?.status === 'all' ? {} : { isArchived: options?.status === 'archived' }),
246
253
  ...(options?.query ? { query: options.query } : {}),
254
+ ...(options?.scope !== 'instance' && boundProjectId ? { projectId: boundProjectId } : {}),
247
255
  };
248
256
  const { workflows } = await workflowService.getMany(user, {
249
257
  take: options?.limit ?? 50,
@@ -345,6 +353,26 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
345
353
  throw new Error(`Workflow ${workflowId} not found or not accessible`);
346
354
  return toWorkflowJSON(wf, { redactParameters });
347
355
  },
356
+ async getWorkflowHead(workflowId) {
357
+ const head = await workflowFinderService.findWorkflowHeadForUser(workflowId, user, [
358
+ 'workflow:read',
359
+ ]);
360
+ if (!head)
361
+ throw new Error(`Workflow ${workflowId} not found or not accessible`);
362
+ return { versionId: head.versionId, updatedAt: head.updatedAt.getTime() };
363
+ },
364
+ async getWorkflowSnapshot(workflowId) {
365
+ const wf = await workflowFinderService.findWorkflowForUser(workflowId, user, [
366
+ 'workflow:read',
367
+ ]);
368
+ if (!wf)
369
+ throw new Error(`Workflow ${workflowId} not found or not accessible`);
370
+ return {
371
+ json: toWorkflowJSON(wf, { redactParameters }),
372
+ versionId: wf.versionId,
373
+ updatedAt: wf.updatedAt.getTime(),
374
+ };
375
+ },
348
376
  async getLatestRunData(workflowId) {
349
377
  const accessible = await workflowFinderService.findWorkflowForUser(workflowId, user, [
350
378
  'workflow:read',
@@ -359,7 +387,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
359
387
  });
360
388
  if (!latest)
361
389
  return null;
362
- const execution = await executionRepository.findSingleExecution(latest.id, {
390
+ const execution = await executionPersistence.findSingleExecution(latest.id, {
363
391
  includeData: true,
364
392
  unflattenData: true,
365
393
  });
@@ -367,7 +395,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
367
395
  },
368
396
  async createFromWorkflowJSON(json, options) {
369
397
  assertNotReadOnly();
370
- const projectId = await resolveProjectId(['workflow:create'], options?.projectId);
398
+ const projectId = await resolveBoundProjectId(['workflow:create']);
371
399
  const settings = (json.settings ?? {});
372
400
  if (settings.redactionPolicy !== undefined && settings.redactionPolicy !== 'none') {
373
401
  const canUpdateRedaction = await (0, check_access_1.userHasScopes)(user, ['workflow:enableRedaction'], false, { projectId });
@@ -394,9 +422,10 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
394
422
  }
395
423
  return workflow;
396
424
  });
425
+ const nodes = sanitizeCredentialReferencesForSave(json.nodes);
397
426
  let updateData = workflowRepository.create({
398
427
  name: json.name,
399
- nodes: json.nodes,
428
+ nodes: nodes,
400
429
  connections: json.connections,
401
430
  settings,
402
431
  pinData: sdkPinDataToRuntime(json.pinData),
@@ -457,9 +486,10 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
457
486
  }
458
487
  }
459
488
  }
489
+ const nodes = sanitizeCredentialReferencesForSave(json.nodes);
460
490
  let updateData = workflowRepository.create({
461
491
  name: json.name,
462
- nodes: json.nodes,
492
+ nodes: nodes,
463
493
  connections: json.connections,
464
494
  settings,
465
495
  pinData: sdkPinDataToRuntime(json.pinData),
@@ -736,7 +766,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
736
766
  throw error;
737
767
  }
738
768
  }
739
- const result = await extractExecutionResult(executionRepository, executionId, allowSendingParameterValues);
769
+ const result = await extractExecutionResult(executionId, allowSendingParameterValues);
740
770
  trackBuilderExecutedWorkflow(result.status);
741
771
  return result;
742
772
  },
@@ -746,14 +776,14 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
746
776
  if (isRunning) {
747
777
  return { executionId, status: 'running' };
748
778
  }
749
- return await extractExecutionResult(executionRepository, executionId, allowSendingParameterValues);
779
+ return await extractExecutionResult(executionId, allowSendingParameterValues);
750
780
  },
751
781
  async getResult(executionId) {
752
782
  await assertExecutionAccess(executionId);
753
783
  if (activeExecutions.has(executionId)) {
754
784
  await activeExecutions.getPostExecutePromise(executionId);
755
785
  }
756
- return await extractExecutionResult(executionRepository, executionId, allowSendingParameterValues);
786
+ return await extractExecutionResult(executionId, allowSendingParameterValues);
757
787
  },
758
788
  async stop(executionId) {
759
789
  assertNotReadOnly();
@@ -777,7 +807,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
777
807
  },
778
808
  async getDebugInfo(executionId) {
779
809
  await assertExecutionAccess(executionId);
780
- return await extractExecutionDebugInfo(executionRepository, executionId, allowSendingParameterValues, nodeTypes);
810
+ return await extractExecutionDebugInfo(executionId, allowSendingParameterValues, nodeTypes);
781
811
  },
782
812
  async getNodeOutput(executionId, nodeName, options) {
783
813
  await assertExecutionAccess(executionId);
@@ -789,7 +819,7 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
789
819
  returned: { from: 0, to: 0 },
790
820
  };
791
821
  }
792
- return await extractNodeOutput(executionRepository, executionId, nodeName, options);
822
+ return await extractNodeOutput(executionId, nodeName, options);
793
823
  },
794
824
  getResolvedNodeParameters: async (executionId, nodeName, options) => {
795
825
  await assertExecutionAccess(executionId);
@@ -805,14 +835,21 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
805
835
  suppressed: 'parameter-values-disabled',
806
836
  };
807
837
  }
808
- return await (0, extract_resolved_node_parameters_1.extractResolvedNodeParameters)(executionRepository, nodeTypes, executionId, nodeName, options);
838
+ return await (0, extract_resolved_node_parameters_1.extractResolvedNodeParameters)(nodeTypes, executionId, nodeName, options);
809
839
  },
810
840
  };
811
841
  }
812
- createCredentialAdapter(user) {
842
+ createCredentialAdapter(user, boundProjectId) {
813
843
  const { credentialsService, credentialsFinderService, loadNodesAndCredentials } = this;
814
844
  return {
815
845
  async list(options) {
846
+ if (boundProjectId) {
847
+ const scoped = await credentialsService.getCredentialsAUserCanUseInAWorkflow(user, {
848
+ projectId: boundProjectId,
849
+ });
850
+ const filtered = options?.type ? scoped.filter((c) => c.type === options.type) : scoped;
851
+ return filtered.map((c) => ({ id: c.id, name: c.name, type: c.type }));
852
+ }
816
853
  if (options?.workflowId || options?.projectId) {
817
854
  const scoped = options.workflowId
818
855
  ? await credentialsService.getCredentialsAUserCanUseInAWorkflow(user, {
@@ -1024,10 +1061,10 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
1024
1061
  },
1025
1062
  };
1026
1063
  }
1027
- createDataTableAdapter(user) {
1064
+ createDataTableAdapter(user, boundProjectId) {
1028
1065
  const { dataTableService, dataTableRepository } = this;
1029
1066
  const assertNotReadOnly = () => this.assertInstanceNotReadOnly('data tables');
1030
- const { resolveProjectId } = this.createProjectScopeHelpers(user);
1067
+ const { resolveProjectId, resolveBoundProjectId } = this.createProjectScopeHelpers(user, boundProjectId);
1031
1068
  const logger = this.logger;
1032
1069
  const resolveAccessibleTable = async (scopes, dataTableId, disambiguator) => {
1033
1070
  const projectIdFilter = disambiguator?.projectId;
@@ -1078,9 +1115,9 @@ let InstanceAiAdapterService = class InstanceAiAdapterService {
1078
1115
  updatedAt: t.updatedAt.toISOString(),
1079
1116
  }));
1080
1117
  },
1081
- async create(name, columns, options) {
1118
+ async create(name, columns) {
1082
1119
  assertNotReadOnly();
1083
- const projectId = await resolveProjectId(['dataTable:create'], options?.projectId);
1120
+ const projectId = await resolveBoundProjectId(['dataTable:create']);
1084
1121
  const result = await dataTableService.createDataTable(projectId, { name, columns });
1085
1122
  return {
1086
1123
  id: result.id,
@@ -1818,7 +1855,7 @@ exports.InstanceAiAdapterService = InstanceAiAdapterService = __decorate([
1818
1855
  role_service_1.RoleService,
1819
1856
  telemetry_1.Telemetry,
1820
1857
  db_1.AiBuilderTemporaryWorkflowRepository,
1821
- ssrf_protection_service_1.SsrfProtectionService])
1858
+ n8n_core_1.SsrfProtectionService])
1822
1859
  ], InstanceAiAdapterService);
1823
1860
  const MAX_RESULT_CHARS = 20_000;
1824
1861
  const MAX_NODE_OUTPUT_CHARS = 1_000;
@@ -1917,8 +1954,8 @@ function wrapResultDataEntries(data) {
1917
1954
  }
1918
1955
  return wrapped;
1919
1956
  }
1920
- async function extractExecutionResult(executionRepository, executionId, includeOutputData = true) {
1921
- const execution = await executionRepository.findSingleExecution(executionId, {
1957
+ async function extractExecutionResult(executionId, includeOutputData = true) {
1958
+ const execution = await di_1.Container.get(execution_persistence_1.ExecutionPersistence).findSingleExecution(executionId, {
1922
1959
  includeData: true,
1923
1960
  unflattenData: true,
1924
1961
  });
@@ -2009,8 +2046,8 @@ function truncateNodeOutput(items) {
2009
2046
  };
2010
2047
  }
2011
2048
  const MAX_ITEM_CHARS = 50_000;
2012
- async function extractNodeOutput(executionRepository, executionId, nodeName, options) {
2013
- const execution = await executionRepository.findSingleExecution(executionId, {
2049
+ async function extractNodeOutput(executionId, nodeName, options) {
2050
+ const execution = await di_1.Container.get(execution_persistence_1.ExecutionPersistence).findSingleExecution(executionId, {
2014
2051
  includeData: true,
2015
2052
  unflattenData: true,
2016
2053
  });
@@ -2169,8 +2206,8 @@ function getPinDataForTrigger(node, inputData) {
2169
2206
  };
2170
2207
  }
2171
2208
  }
2172
- async function extractExecutionDebugInfo(executionRepository, executionId, includeOutputData = true, nodeTypes) {
2173
- const execution = await executionRepository.findSingleExecution(executionId, {
2209
+ async function extractExecutionDebugInfo(executionId, includeOutputData = true, nodeTypes) {
2210
+ const execution = await di_1.Container.get(execution_persistence_1.ExecutionPersistence).findSingleExecution(executionId, {
2174
2211
  includeData: true,
2175
2212
  unflattenData: true,
2176
2213
  });
@@ -2181,7 +2218,7 @@ async function extractExecutionDebugInfo(executionRepository, executionId, inclu
2181
2218
  nodeTrace: [],
2182
2219
  };
2183
2220
  }
2184
- const baseResult = await extractExecutionResult(executionRepository, executionId, includeOutputData);
2221
+ const baseResult = await extractExecutionResult(executionId, includeOutputData);
2185
2222
  const runData = execution.data?.resultData?.runData;
2186
2223
  const nodeTrace = [];
2187
2224
  let failedNode;
@@ -2233,7 +2270,10 @@ async function extractExecutionDebugInfo(executionRepository, executionId, inclu
2233
2270
  }
2234
2271
  if (failedNode && includeOutputData && nodeTypes) {
2235
2272
  try {
2236
- const { nodeName: _omitName, suppressed: _omitSuppressed, ...bundle } = await (0, extract_resolved_node_parameters_1.extractResolvedNodeParameters)(executionRepository, nodeTypes, executionId, failedNode.name, { itemIndex: failedItemIndex, runIndex: failedRunIndex });
2273
+ const { nodeName: _omitName, suppressed: _omitSuppressed, ...bundle } = await (0, extract_resolved_node_parameters_1.extractResolvedNodeParameters)(nodeTypes, executionId, failedNode.name, {
2274
+ itemIndex: failedItemIndex,
2275
+ runIndex: failedRunIndex,
2276
+ });
2237
2277
  failedNode.resolvedParameters = bundle;
2238
2278
  }
2239
2279
  catch {
@@ -2254,6 +2294,34 @@ function sdkPinDataToRuntime(pinData) {
2254
2294
  }
2255
2295
  return result;
2256
2296
  }
2297
+ function hasCredentialId(value) {
2298
+ if (typeof value !== 'object' || value === null)
2299
+ return false;
2300
+ const id = Reflect.get(value, 'id');
2301
+ return typeof id === 'string' && id.trim() !== '';
2302
+ }
2303
+ function sanitizeCredentialReferencesForSave(nodes) {
2304
+ return nodes.map((node) => {
2305
+ if (!node.credentials)
2306
+ return node;
2307
+ const credentials = Object.entries(node.credentials).reduce((acc, [type, value]) => {
2308
+ if (hasCredentialId(value)) {
2309
+ acc[type] = value;
2310
+ }
2311
+ return acc;
2312
+ }, {});
2313
+ if (Object.keys(credentials).length === Object.keys(node.credentials).length)
2314
+ return node;
2315
+ const sanitized = { ...node };
2316
+ if (Object.keys(credentials).length > 0) {
2317
+ sanitized.credentials = credentials;
2318
+ }
2319
+ else {
2320
+ delete sanitized.credentials;
2321
+ }
2322
+ return sanitized;
2323
+ });
2324
+ }
2257
2325
  function toWorkflowJSON(workflow, options) {
2258
2326
  const redact = options?.redactParameters ?? false;
2259
2327
  return {