n8n 2.22.3 → 2.23.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 (628) hide show
  1. package/dist/auth/auth.service.d.ts +2 -0
  2. package/dist/auth/auth.service.js +15 -4
  3. package/dist/auth/auth.service.js.map +1 -1
  4. package/dist/build.tsbuildinfo +1 -1
  5. package/dist/chat/chat-service.types.d.ts +4 -4
  6. package/dist/commands/execute.d.ts +2 -2
  7. package/dist/commands/export/workflow.js +1 -0
  8. package/dist/commands/export/workflow.js.map +1 -1
  9. package/dist/commands/license/info.js +4 -4
  10. package/dist/commands/license/info.js.map +1 -1
  11. package/dist/commands/start.js +21 -1
  12. package/dist/commands/start.js.map +1 -1
  13. package/dist/constants.js +1 -0
  14. package/dist/constants.js.map +1 -1
  15. package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
  16. package/dist/controllers/e2e.controller.js +1 -0
  17. package/dist/controllers/e2e.controller.js.map +1 -1
  18. package/dist/controllers/oauth/oauth1-credential.controller.d.ts +1 -1
  19. package/dist/controllers/oauth/oauth1-credential.controller.js +4 -7
  20. package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
  21. package/dist/controllers/oauth/oauth2-credential.controller.js +3 -6
  22. package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
  23. package/dist/controllers/redaction-enforcement-mapper.d.ts +3 -0
  24. package/dist/controllers/redaction-enforcement-mapper.js +27 -0
  25. package/dist/controllers/redaction-enforcement-mapper.js.map +1 -0
  26. package/dist/controllers/security-settings.controller.d.ts +8 -2
  27. package/dist/controllers/security-settings.controller.js +35 -25
  28. package/dist/controllers/security-settings.controller.js.map +1 -1
  29. package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
  30. package/dist/credentials/credential-connection-status-provider.interface.js +3 -0
  31. package/dist/credentials/credential-connection-status-provider.interface.js.map +1 -0
  32. package/dist/credentials/credential-connection-status-proxy.d.ts +6 -0
  33. package/dist/credentials/credential-connection-status-proxy.js +25 -0
  34. package/dist/credentials/credential-connection-status-proxy.js.map +1 -0
  35. package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -0
  36. package/dist/credentials/credentials.controller.d.ts +2 -0
  37. package/dist/credentials/credentials.service.d.ts +10 -1
  38. package/dist/credentials/credentials.service.ee.d.ts +2 -0
  39. package/dist/credentials/credentials.service.ee.js +13 -3
  40. package/dist/credentials/credentials.service.ee.js.map +1 -1
  41. package/dist/credentials/credentials.service.js +34 -7
  42. package/dist/credentials/credentials.service.js.map +1 -1
  43. package/dist/credentials/dynamic-credentials-proxy.d.ts +2 -0
  44. package/dist/credentials/dynamic-credentials-proxy.js +9 -0
  45. package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
  46. package/dist/credentials-helper.js +2 -1
  47. package/dist/credentials-helper.js.map +1 -1
  48. package/dist/errors/feature-not-licensed.error.d.ts +3 -1
  49. package/dist/errors/feature-not-licensed.error.js +2 -2
  50. package/dist/errors/feature-not-licensed.error.js.map +1 -1
  51. package/dist/evaluation.ee/evaluation-collection.service.js +2 -0
  52. package/dist/evaluation.ee/evaluation-collection.service.js.map +1 -1
  53. package/dist/evaluation.ee/insights/eval-insights.controller.ee.d.ts +41 -0
  54. package/dist/evaluation.ee/insights/eval-insights.controller.ee.js +62 -0
  55. package/dist/evaluation.ee/insights/eval-insights.controller.ee.js.map +1 -0
  56. package/dist/evaluation.ee/insights/eval-insights.service.d.ts +25 -0
  57. package/dist/evaluation.ee/insights/eval-insights.service.js +206 -0
  58. package/dist/evaluation.ee/insights/eval-insights.service.js.map +1 -0
  59. package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +3 -2
  60. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +16 -2
  61. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
  62. package/dist/events/relays/telemetry.event-relay.d.ts +3 -1
  63. package/dist/events/relays/telemetry.event-relay.js +9 -3
  64. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  65. package/dist/execution-lifecycle/execution-lifecycle-hooks.d.ts +1 -1
  66. package/dist/execution-lifecycle/execution-lifecycle-hooks.js +4 -2
  67. package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
  68. package/dist/executions/execution-data/db-store.d.ts +4 -2
  69. package/dist/executions/execution-data/db-store.js +9 -4
  70. package/dist/executions/execution-data/db-store.js.map +1 -1
  71. package/dist/executions/execution-data/missing-execution-data.error.d.ts +5 -0
  72. package/dist/executions/execution-data/missing-execution-data.error.js +11 -0
  73. package/dist/executions/execution-data/missing-execution-data.error.js.map +1 -0
  74. package/dist/executions/execution-data/types.d.ts +3 -2
  75. package/dist/executions/execution-data/types.js.map +1 -1
  76. package/dist/executions/execution-persistence.d.ts +12 -3
  77. package/dist/executions/execution-persistence.js +102 -26
  78. package/dist/executions/execution-persistence.js.map +1 -1
  79. package/dist/external-hooks.d.ts +6 -1
  80. package/dist/external-hooks.js.map +1 -1
  81. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +3 -2
  82. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +17 -12
  83. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -1
  84. package/dist/interfaces.d.ts +1 -0
  85. package/dist/license.d.ts +2 -0
  86. package/dist/license.js +6 -0
  87. package/dist/license.js.map +1 -1
  88. package/dist/load-nodes-and-credentials.d.ts +32 -6
  89. package/dist/load-nodes-and-credentials.js +8 -79
  90. package/dist/load-nodes-and-credentials.js.map +1 -1
  91. package/dist/manual-execution.service.js +3 -0
  92. package/dist/manual-execution.service.js.map +1 -1
  93. package/dist/modules/agents/agent-execution.service.js +5 -5
  94. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  95. package/dist/modules/agents/agent-sse-stream.js +17 -1
  96. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  97. package/dist/modules/agents/agents-tools.service.js +7 -5
  98. package/dist/modules/agents/agents-tools.service.js.map +1 -1
  99. package/dist/modules/agents/agents.controller.d.ts +29 -3
  100. package/dist/modules/agents/agents.controller.js +88 -7
  101. package/dist/modules/agents/agents.controller.js.map +1 -1
  102. package/dist/modules/agents/agents.module.d.ts +1 -1
  103. package/dist/modules/agents/agents.module.js +12 -6
  104. package/dist/modules/agents/agents.module.js.map +1 -1
  105. package/dist/modules/agents/agents.service.d.ts +7 -8
  106. package/dist/modules/agents/agents.service.js +120 -65
  107. package/dist/modules/agents/agents.service.js.map +1 -1
  108. package/dist/modules/agents/builder/agents-builder-model-recommendations.d.ts +1 -1
  109. package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -3
  110. package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
  111. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +9 -17
  112. package/dist/modules/agents/builder/agents-builder-prompts.js +145 -549
  113. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  114. package/dist/modules/agents/builder/agents-builder-settings.service.js +2 -2
  115. package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -1
  116. package/dist/modules/agents/builder/agents-builder-tools.service.js +10 -10
  117. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  118. package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
  119. package/dist/modules/agents/builder/agents-builder.service.js +58 -9
  120. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  121. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +2 -2
  122. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  123. package/dist/modules/agents/builder/interactive/ask-llm.tool.js +2 -2
  124. package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
  125. package/dist/modules/agents/builder/interactive/ask-question.tool.js +2 -2
  126. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
  127. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
  128. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  129. package/dist/modules/agents/builder/prompts/config-mutation.prompt.d.ts +1 -0
  130. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +132 -0
  131. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -0
  132. package/dist/modules/agents/builder/prompts/config-rules.prompt.d.ts +2 -0
  133. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +63 -0
  134. package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -0
  135. package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -0
  136. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +47 -0
  137. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -0
  138. package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -0
  139. package/dist/modules/agents/builder/prompts/memory.prompt.js +60 -0
  140. package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -0
  141. package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -0
  142. package/dist/modules/agents/builder/prompts/tools.prompt.js +81 -0
  143. package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -0
  144. package/dist/modules/agents/builder/skills/index.d.ts +2 -0
  145. package/dist/modules/agents/builder/skills/index.js +12 -0
  146. package/dist/modules/agents/builder/skills/index.js.map +1 -0
  147. package/dist/modules/agents/builder/skills/integrations.skill.d.ts +2 -0
  148. package/dist/modules/agents/builder/skills/integrations.skill.js +53 -0
  149. package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -0
  150. package/dist/modules/agents/builder/skills/research.skill.d.ts +2 -0
  151. package/dist/modules/agents/builder/skills/research.skill.js +42 -0
  152. package/dist/modules/agents/builder/skills/research.skill.js.map +1 -0
  153. package/dist/modules/agents/builder/skills/target-skills.skill.d.ts +2 -0
  154. package/dist/modules/agents/builder/skills/target-skills.skill.js +59 -0
  155. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -0
  156. package/dist/modules/agents/entities/{agent-published-version.entity.d.ts → agent-history.entity.d.ts} +4 -7
  157. package/dist/modules/agents/entities/{agent-published-version.entity.js → agent-history.entity.js} +22 -34
  158. package/dist/modules/agents/entities/agent-history.entity.js.map +1 -0
  159. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.d.ts +7 -0
  160. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js +38 -0
  161. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js.map +1 -0
  162. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.d.ts +7 -0
  163. package/dist/modules/{instance-ai/entities/instance-ai-workflow-snapshot.entity.js → agents/entities/agent-memory-entry-lock.entity.js} +16 -19
  164. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.js.map +1 -0
  165. package/dist/modules/agents/entities/agent-memory-entry-source.entity.d.ts +9 -0
  166. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js +49 -0
  167. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js.map +1 -0
  168. package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +15 -0
  169. package/dist/modules/agents/entities/agent-memory-entry.entity.js +65 -0
  170. package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -0
  171. package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +2 -3
  172. package/dist/modules/agents/entities/agent-observation-cursor.entity.js +5 -4
  173. package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -1
  174. package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +2 -3
  175. package/dist/modules/agents/entities/agent-observation-lock.entity.js +5 -4
  176. package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -1
  177. package/dist/modules/agents/entities/agent-observation.entity.d.ts +2 -3
  178. package/dist/modules/agents/entities/agent-observation.entity.js +6 -5
  179. package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -1
  180. package/dist/modules/agents/entities/agent.entity.d.ts +3 -5
  181. package/dist/modules/agents/entities/agent.entity.js +7 -14
  182. package/dist/modules/agents/entities/agent.entity.js.map +1 -1
  183. package/dist/modules/agents/episodic-memory.d.ts +2 -0
  184. package/dist/modules/agents/episodic-memory.js +12 -0
  185. package/dist/modules/agents/episodic-memory.js.map +1 -0
  186. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +2 -1
  187. package/dist/modules/agents/integrations/agent-chat-bridge.js +19 -5
  188. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  189. package/dist/modules/agents/integrations/agent-schedule.service.js +10 -6
  190. package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -1
  191. package/dist/modules/agents/integrations/chat-integration.service.js +1 -1
  192. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  193. package/dist/modules/agents/integrations/n8n-memory.d.ts +41 -18
  194. package/dist/modules/agents/integrations/n8n-memory.js +519 -77
  195. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
  196. package/dist/modules/agents/integrations/platforms/slack-integration.js +2 -12
  197. package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
  198. package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +1 -1
  199. package/dist/modules/agents/integrations/rich-interaction-tool.js +2 -2
  200. package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -1
  201. package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +52 -0
  202. package/dist/modules/agents/integrations/slack-app-setup.service.js +316 -0
  203. package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -0
  204. package/dist/modules/agents/json-config/from-json-config.d.ts +2 -3
  205. package/dist/modules/agents/json-config/from-json-config.js +76 -61
  206. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  207. package/dist/modules/agents/json-config/schema-text-serializer.js +2 -1
  208. package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
  209. package/dist/modules/agents/repositories/agent-history.repository.d.ts +19 -0
  210. package/dist/modules/agents/repositories/agent-history.repository.js +51 -0
  211. package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -0
  212. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.d.ts +5 -0
  213. package/dist/modules/{instance-ai/repositories/instance-ai-workflow-snapshot.repository.js → agents/repositories/agent-memory-entry-cursor.repository.js} +8 -8
  214. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js.map +1 -0
  215. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.d.ts +5 -0
  216. package/dist/modules/{instance-ai/repositories/instance-ai-observational-memory.repository.js → agents/repositories/agent-memory-entry-lock.repository.js} +8 -8
  217. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.js.map +1 -0
  218. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.d.ts +5 -0
  219. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js +26 -0
  220. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js.map +1 -0
  221. package/dist/modules/agents/repositories/agent-memory-entry.repository.d.ts +5 -0
  222. package/dist/modules/agents/repositories/agent-memory-entry.repository.js +26 -0
  223. package/dist/modules/agents/repositories/agent-memory-entry.repository.js.map +1 -0
  224. package/dist/modules/agents/repositories/agent.repository.js +3 -3
  225. package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
  226. package/dist/modules/agents/runtime/agent-secure-runtime.js +5 -5
  227. package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -1
  228. package/dist/modules/agents/tools/environment-tool.d.ts +1 -1
  229. package/dist/modules/agents/tools/environment-tool.js +3 -3
  230. package/dist/modules/agents/tools/environment-tool.js.map +1 -1
  231. package/dist/modules/agents/tools/node-tool-factory.js +5 -5
  232. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
  233. package/dist/modules/agents/tools/workflow-tool-factory.js +3 -3
  234. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  235. package/dist/modules/agents/tracing/builder-telemetry.d.ts +2 -3
  236. package/dist/modules/agents/tracing/builder-telemetry.js +36 -3
  237. package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -1
  238. package/dist/modules/agents/utils/agent-draft.utils.js +1 -2
  239. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
  240. package/dist/modules/agents/utils/agent-memory-scope.d.ts +3 -0
  241. package/dist/modules/agents/utils/agent-memory-scope.js +15 -0
  242. package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -0
  243. package/dist/modules/chat-hub/chat-hub.constants.js +4 -0
  244. package/dist/modules/chat-hub/chat-hub.constants.js.map +1 -1
  245. package/dist/modules/chat-hub/context-limits.js +1 -0
  246. package/dist/modules/chat-hub/context-limits.js.map +1 -1
  247. package/dist/modules/dynamic-credentials.ee/constants.d.ts +3 -0
  248. package/dist/modules/dynamic-credentials.ee/constants.js +7 -0
  249. package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -0
  250. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +14 -2
  251. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
  252. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +2 -2
  253. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
  254. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
  255. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +1 -1
  256. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +4 -1
  257. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
  258. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.d.ts +4 -0
  259. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js +11 -0
  260. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js.map +1 -0
  261. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +7 -0
  262. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +40 -0
  263. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -0
  264. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.d.ts +3 -1
  265. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js +6 -3
  266. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
  267. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +2 -0
  268. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +22 -0
  269. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
  270. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +3 -1
  271. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +7 -3
  272. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
  273. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +4 -1
  274. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +11 -3
  275. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
  276. package/dist/modules/dynamic-credentials.ee/services/index.d.ts +2 -0
  277. package/dist/modules/dynamic-credentials.ee/services/index.js +2 -0
  278. package/dist/modules/dynamic-credentials.ee/services/index.js.map +1 -1
  279. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +14 -0
  280. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +70 -0
  281. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -0
  282. package/dist/modules/insights/insights-collection.service.js +1 -1
  283. package/dist/modules/insights/insights-collection.service.js.map +1 -1
  284. package/dist/modules/instance-ai/entities/index.d.ts +6 -2
  285. package/dist/modules/instance-ai/entities/index.js +9 -5
  286. package/dist/modules/instance-ai/entities/index.js.map +1 -1
  287. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.d.ts +12 -0
  288. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js +54 -0
  289. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js.map +1 -0
  290. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.d.ts +6 -0
  291. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js +33 -0
  292. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js.map +1 -0
  293. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.d.ts +8 -0
  294. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js +37 -0
  295. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js.map +1 -0
  296. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.d.ts +12 -0
  297. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js +52 -0
  298. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js.map +1 -0
  299. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.d.ts +19 -0
  300. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js +82 -0
  301. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js.map +1 -0
  302. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +2 -0
  303. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +8 -0
  304. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -1
  305. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +12 -2
  306. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +40 -4
  307. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
  308. package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
  309. package/dist/modules/instance-ai/eval/execution.service.js +137 -47
  310. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  311. package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +31 -0
  312. package/dist/modules/instance-ai/eval/llm-wire-server.js +127 -0
  313. package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -0
  314. package/dist/modules/instance-ai/eval/openai-envelope.d.ts +6 -0
  315. package/dist/modules/instance-ai/eval/openai-envelope.js +96 -0
  316. package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -0
  317. package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +1 -0
  318. package/dist/modules/instance-ai/eval/proxy-loopback.js +44 -0
  319. package/dist/modules/instance-ai/eval/proxy-loopback.js.map +1 -0
  320. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +29 -7
  321. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +1 -1
  322. package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +7 -1
  323. package/dist/modules/instance-ai/eval/workflow-analysis.js +178 -3
  324. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  325. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +6 -6
  326. package/dist/modules/instance-ai/instance-ai-memory.service.js +44 -85
  327. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  328. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -1
  329. package/dist/modules/instance-ai/instance-ai-settings.service.js +11 -22
  330. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  331. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -0
  332. package/dist/modules/instance-ai/instance-ai.adapter.service.js +105 -13
  333. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  334. package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
  335. package/dist/modules/instance-ai/instance-ai.module.js +10 -6
  336. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  337. package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -12
  338. package/dist/modules/instance-ai/instance-ai.service.js +724 -264
  339. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  340. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +4 -1
  341. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +3 -1
  342. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
  343. package/dist/modules/instance-ai/message-parser.d.ts +3 -3
  344. package/dist/modules/instance-ai/message-parser.js +65 -61
  345. package/dist/modules/instance-ai/message-parser.js.map +1 -1
  346. package/dist/modules/instance-ai/node-definition-resolver.js +12 -48
  347. package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
  348. package/dist/modules/instance-ai/repositories/index.d.ts +4 -2
  349. package/dist/modules/instance-ai/repositories/index.js +9 -5
  350. package/dist/modules/instance-ai/repositories/index.js.map +1 -1
  351. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +5 -0
  352. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +26 -0
  353. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -0
  354. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.d.ts +5 -0
  355. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js +26 -0
  356. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js.map +1 -0
  357. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.d.ts +5 -0
  358. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js +26 -0
  359. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js.map +1 -0
  360. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.d.ts +5 -0
  361. package/dist/modules/{agents/repositories/agent-published-version.repository.js → instance-ai/repositories/instance-ai-observation.repository.js} +8 -17
  362. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js.map +1 -0
  363. package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +2 -0
  364. package/dist/modules/instance-ai/storage/db-snapshot-storage.js +12 -2
  365. package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
  366. package/dist/modules/instance-ai/storage/index.d.ts +2 -3
  367. package/dist/modules/instance-ai/storage/index.js +5 -7
  368. package/dist/modules/instance-ai/storage/index.js.map +1 -1
  369. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +15 -0
  370. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +94 -0
  371. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -0
  372. package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +94 -0
  373. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +324 -0
  374. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -0
  375. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +37 -0
  376. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +212 -0
  377. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -0
  378. package/dist/modules/instance-ai/web-research/fetch-and-extract.js +34 -11
  379. package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
  380. package/dist/modules/mcp/mcp.service.js +5 -5
  381. package/dist/modules/mcp/mcp.service.js.map +1 -1
  382. package/dist/modules/mcp/tools/schemas.d.ts +24 -24
  383. package/dist/modules/mcp/tools/search-projects.tool.js +59 -13
  384. package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
  385. package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
  386. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +35 -0
  387. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js +88 -0
  388. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -0
  389. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +3 -2
  390. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +41 -9
  391. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  392. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.d.ts +13 -0
  393. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js +87 -0
  394. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js.map +1 -0
  395. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +2 -1
  396. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +42 -6
  397. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  398. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +2 -1
  399. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +5 -1
  400. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
  401. package/dist/modules/mcp/tools/workflow-validation.utils.js +1 -1
  402. package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
  403. package/dist/modules/mcp-registry/mcp-registry-test.controller.js +5 -1
  404. package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -1
  405. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +18 -0
  406. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +73 -0
  407. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -0
  408. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +5 -0
  409. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +31 -0
  410. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -0
  411. package/dist/modules/n8n-packages/io/package-writer.d.ts +6 -0
  412. package/dist/{scaling/multi-main-setup.types.js → modules/n8n-packages/io/package-writer.js} +1 -1
  413. package/dist/modules/n8n-packages/io/package-writer.js.map +1 -0
  414. package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -0
  415. package/dist/modules/n8n-packages/io/slug.utils.js +16 -0
  416. package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -0
  417. package/dist/modules/n8n-packages/io/tar/tar-package-writer.d.ts +9 -0
  418. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js +71 -0
  419. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js.map +1 -0
  420. package/dist/modules/n8n-packages/n8n-packages.controller.d.ts +10 -0
  421. package/dist/modules/n8n-packages/n8n-packages.controller.js +45 -0
  422. package/dist/modules/n8n-packages/n8n-packages.controller.js.map +1 -0
  423. package/dist/modules/{inbound-secrets/inbound-secrets.module.d.ts → n8n-packages/n8n-packages.module.d.ts} +1 -1
  424. package/dist/modules/{inbound-secrets/inbound-secrets.module.js → n8n-packages/n8n-packages.module.js} +12 -16
  425. package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -0
  426. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +10 -0
  427. package/dist/modules/n8n-packages/n8n-packages.service.js +49 -0
  428. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -0
  429. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +5 -0
  430. package/dist/modules/n8n-packages/n8n-packages.types.js +3 -0
  431. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -0
  432. package/dist/modules/n8n-packages/spec/constants.d.ts +1 -0
  433. package/dist/modules/n8n-packages/spec/constants.js +5 -0
  434. package/dist/modules/n8n-packages/spec/constants.js.map +1 -0
  435. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +55 -0
  436. package/dist/modules/n8n-packages/spec/manifest.schema.js +17 -0
  437. package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -0
  438. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +169 -0
  439. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +46 -0
  440. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -0
  441. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.d.ts +5 -1
  442. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js +18 -2
  443. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js.map +1 -1
  444. package/dist/modules/oauth-jwe/oauth-jwe.utils.js +27 -2
  445. package/dist/modules/oauth-jwe/oauth-jwe.utils.js.map +1 -1
  446. package/dist/modules/otel/execution-level-tracer.js +1 -0
  447. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  448. package/dist/modules/otel/execution-level-tracer.types.d.ts +11 -6
  449. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  450. package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
  451. package/dist/modules/otel/otel-lifecycle-handler.js +30 -2
  452. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  453. package/dist/modules/otel/otel.constants.d.ts +1 -0
  454. package/dist/modules/otel/otel.constants.js +1 -0
  455. package/dist/modules/otel/otel.constants.js.map +1 -1
  456. package/dist/modules/runtime-credentials/path-traversal.js.map +1 -0
  457. package/dist/modules/runtime-credentials/runtime-credentials-access.service.d.ts +8 -0
  458. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js +35 -0
  459. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js.map +1 -0
  460. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.d.ts → runtime-credentials/runtime-credentials-context-hook.d.ts} +4 -5
  461. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.js → runtime-credentials/runtime-credentials-context-hook.js} +14 -22
  462. package/dist/modules/runtime-credentials/runtime-credentials-context-hook.js.map +1 -0
  463. package/dist/modules/runtime-credentials/runtime-credentials.config.d.ts +3 -0
  464. package/dist/modules/{inbound-secrets/inbound-secrets.config.js → runtime-credentials/runtime-credentials.config.js} +7 -7
  465. package/dist/modules/runtime-credentials/runtime-credentials.config.js.map +1 -0
  466. package/dist/modules/runtime-credentials/runtime-credentials.module.d.ts +4 -0
  467. package/dist/modules/runtime-credentials/runtime-credentials.module.js +65 -0
  468. package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -0
  469. package/dist/modules/runtime-credentials/runtime-credentials.schemas.d.ts +23 -0
  470. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js +10 -0
  471. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js.map +1 -0
  472. package/dist/modules/runtime-credentials/runtime-credentials.service.d.ts +18 -0
  473. package/dist/modules/{inbound-secrets/inbound-secrets.service.js → runtime-credentials/runtime-credentials.service.js} +31 -28
  474. package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -0
  475. package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
  476. package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -1
  477. package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
  478. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +2 -2
  479. package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -8
  480. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  481. package/dist/modules/source-control.ee/source-control-status.service.ee.js +4 -4
  482. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  483. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
  484. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
  485. package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +2 -1
  486. package/dist/modules/sso-saml/saml.service.ee.js +5 -1
  487. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  488. package/dist/modules/workflow-index/workflow-dependency.controller.d.ts +1 -4
  489. package/dist/modules/workflow-index/workflow-dependency.controller.js +2 -13
  490. package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
  491. package/dist/node-catalog/node-catalog.service.d.ts +1 -2
  492. package/dist/node-catalog/node-catalog.service.js +6 -10
  493. package/dist/node-catalog/node-catalog.service.js.map +1 -1
  494. package/dist/node-execution/ephemeral-node-executor.js +19 -11
  495. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  496. package/dist/oauth/oauth-jwe-service.proxy.d.ts +12 -2
  497. package/dist/oauth/oauth-jwe-service.proxy.js +5 -0
  498. package/dist/oauth/oauth-jwe-service.proxy.js.map +1 -1
  499. package/dist/oauth/oauth.service.d.ts +6 -1
  500. package/dist/oauth/oauth.service.js +42 -4
  501. package/dist/oauth/oauth.service.js.map +1 -1
  502. package/dist/permissions.ee/check-access.d.ts +2 -2
  503. package/dist/permissions.ee/check-access.js +15 -11
  504. package/dist/permissions.ee/check-access.js.map +1 -1
  505. package/dist/posthog/index.d.ts +2 -0
  506. package/dist/posthog/index.js +28 -6
  507. package/dist/posthog/index.js.map +1 -1
  508. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +10 -0
  509. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +42 -0
  510. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -0
  511. package/dist/public-api/v1/openapi.yml +55 -0
  512. package/dist/requests.d.ts +1 -1
  513. package/dist/scaling/constants.js +3 -0
  514. package/dist/scaling/constants.js.map +1 -1
  515. package/dist/scaling/multi-main-setup.ee.d.ts +12 -7
  516. package/dist/scaling/multi-main-setup.ee.js +125 -22
  517. package/dist/scaling/multi-main-setup.ee.js.map +1 -1
  518. package/dist/server.d.ts +1 -0
  519. package/dist/server.js +3 -4
  520. package/dist/server.js.map +1 -1
  521. package/dist/services/dynamic-node-parameters.service.d.ts +0 -1
  522. package/dist/services/dynamic-node-parameters.service.js +6 -14
  523. package/dist/services/dynamic-node-parameters.service.js.map +1 -1
  524. package/dist/services/frontend.service.js +1 -1
  525. package/dist/services/frontend.service.js.map +1 -1
  526. package/dist/services/import.service.js +3 -1
  527. package/dist/services/import.service.js.map +1 -1
  528. package/dist/services/proxy-token-manager.js +2 -13
  529. package/dist/services/proxy-token-manager.js.map +1 -1
  530. package/dist/services/runtime-credential-proxy.service.d.ts +9 -0
  531. package/dist/services/runtime-credential-proxy.service.js +29 -0
  532. package/dist/services/runtime-credential-proxy.service.js.map +1 -0
  533. package/dist/services/url.service.d.ts +1 -0
  534. package/dist/services/url.service.js +3 -0
  535. package/dist/services/url.service.js.map +1 -1
  536. package/dist/telemetry/index.d.ts +4 -1
  537. package/dist/telemetry/index.js +16 -8
  538. package/dist/telemetry/index.js.map +1 -1
  539. package/dist/utils.d.ts +2 -1
  540. package/dist/utils.js +10 -0
  541. package/dist/utils.js.map +1 -1
  542. package/dist/webhooks/live-webhooks.js +2 -2
  543. package/dist/webhooks/live-webhooks.js.map +1 -1
  544. package/dist/webhooks/webhook-helpers.js +1 -1
  545. package/dist/webhooks/webhook-helpers.js.map +1 -1
  546. package/dist/workflow-execute-additional-data.d.ts +3 -1
  547. package/dist/workflow-execute-additional-data.js +26 -3
  548. package/dist/workflow-execute-additional-data.js.map +1 -1
  549. package/dist/workflow-helpers.d.ts +3 -1
  550. package/dist/workflow-helpers.js +39 -5
  551. package/dist/workflow-helpers.js.map +1 -1
  552. package/dist/workflow-hook-context.service.d.ts +6 -0
  553. package/dist/workflow-hook-context.service.js +32 -0
  554. package/dist/workflow-hook-context.service.js.map +1 -0
  555. package/dist/workflow-runner.js +2 -1
  556. package/dist/workflow-runner.js.map +1 -1
  557. package/dist/workflows/utils.d.ts +3 -0
  558. package/dist/workflows/utils.js +19 -0
  559. package/dist/workflows/utils.js.map +1 -1
  560. package/dist/workflows/workflow-creation.service.js +4 -2
  561. package/dist/workflows/workflow-creation.service.js.map +1 -1
  562. package/dist/workflows/workflow-execution.service.d.ts +4 -3
  563. package/dist/workflows/workflow-execution.service.js +8 -3
  564. package/dist/workflows/workflow-execution.service.js.map +1 -1
  565. package/dist/workflows/workflow-finder.service.d.ts +6 -2
  566. package/dist/workflows/workflow-finder.service.js +18 -0
  567. package/dist/workflows/workflow-finder.service.js.map +1 -1
  568. package/dist/workflows/workflow-history/workflow-history.controller.d.ts +1 -1
  569. package/dist/workflows/workflow-history/workflow-history.service.d.ts +2 -1
  570. package/dist/workflows/workflow-history/workflow-history.service.js +1 -0
  571. package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
  572. package/dist/workflows/workflow-validation.service.d.ts +3 -1
  573. package/dist/workflows/workflow-validation.service.js +6 -3
  574. package/dist/workflows/workflow-validation.service.js.map +1 -1
  575. package/dist/workflows/workflow.service.d.ts +3 -3
  576. package/dist/workflows/workflow.service.js +26 -4
  577. package/dist/workflows/workflow.service.js.map +1 -1
  578. package/dist/workflows/workflows.controller.d.ts +31 -21
  579. package/dist/workflows/workflows.controller.js +6 -2
  580. package/dist/workflows/workflows.controller.js.map +1 -1
  581. package/package.json +37 -35
  582. package/dist/modules/agents/entities/agent-published-version.entity.js.map +0 -1
  583. package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +0 -20
  584. package/dist/modules/agents/repositories/agent-published-version.repository.js.map +0 -1
  585. package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js.map +0 -1
  586. package/dist/modules/inbound-secrets/inbound-secrets.config.d.ts +0 -3
  587. package/dist/modules/inbound-secrets/inbound-secrets.config.js.map +0 -1
  588. package/dist/modules/inbound-secrets/inbound-secrets.module.js.map +0 -1
  589. package/dist/modules/inbound-secrets/inbound-secrets.schemas.d.ts +0 -3
  590. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js +0 -6
  591. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js.map +0 -1
  592. package/dist/modules/inbound-secrets/inbound-secrets.service.d.ts +0 -17
  593. package/dist/modules/inbound-secrets/inbound-secrets.service.js.map +0 -1
  594. package/dist/modules/inbound-secrets/path-traversal.js.map +0 -1
  595. package/dist/modules/instance-ai/compaction.service.d.ts +0 -24
  596. package/dist/modules/instance-ai/compaction.service.js +0 -213
  597. package/dist/modules/instance-ai/compaction.service.js.map +0 -1
  598. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +0 -33
  599. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +0 -145
  600. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +0 -1
  601. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +0 -8
  602. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +0 -1
  603. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +0 -5
  604. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +0 -1
  605. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +0 -5
  606. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +0 -1
  607. package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +0 -17
  608. package/dist/modules/instance-ai/snapshot-pruning.service.js +0 -89
  609. package/dist/modules/instance-ai/snapshot-pruning.service.js.map +0 -1
  610. package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +0 -9
  611. package/dist/modules/instance-ai/storage/typeorm-composite-store.js +0 -33
  612. package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +0 -1
  613. package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +0 -96
  614. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +0 -864
  615. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +0 -1
  616. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +0 -44
  617. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +0 -156
  618. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +0 -1
  619. package/dist/scaling/multi-main-setup-legacy.d.ts +0 -25
  620. package/dist/scaling/multi-main-setup-legacy.js +0 -75
  621. package/dist/scaling/multi-main-setup-legacy.js.map +0 -1
  622. package/dist/scaling/multi-main-setup-v2.d.ts +0 -25
  623. package/dist/scaling/multi-main-setup-v2.js +0 -143
  624. package/dist/scaling/multi-main-setup-v2.js.map +0 -1
  625. package/dist/scaling/multi-main-setup.types.d.ts +0 -6
  626. package/dist/scaling/multi-main-setup.types.js.map +0 -1
  627. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.d.ts +0 -0
  628. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.js +0 -0
@@ -0,0 +1,5 @@
1
+ import type { WorkflowEntity } from '@n8n/db';
2
+ import { type SerializedWorkflow } from '../../spec/serialized/workflow.schema';
3
+ export declare class WorkflowSerializer {
4
+ serialize(workflow: WorkflowEntity): SerializedWorkflow;
5
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.WorkflowSerializer = void 0;
10
+ const di_1 = require("@n8n/di");
11
+ const workflow_schema_1 = require("../../spec/serialized/workflow.schema");
12
+ let WorkflowSerializer = class WorkflowSerializer {
13
+ serialize(workflow) {
14
+ return workflow_schema_1.serializedWorkflowSchema.parse({
15
+ id: workflow.id,
16
+ name: workflow.name,
17
+ nodes: workflow.nodes,
18
+ connections: workflow.connections,
19
+ settings: workflow.settings,
20
+ versionId: workflow.versionId,
21
+ parentFolderId: workflow.parentFolder?.id ?? null,
22
+ active: workflow.activeVersionId === workflow.versionId,
23
+ isArchived: workflow.isArchived,
24
+ });
25
+ }
26
+ };
27
+ exports.WorkflowSerializer = WorkflowSerializer;
28
+ exports.WorkflowSerializer = WorkflowSerializer = __decorate([
29
+ (0, di_1.Service)()
30
+ ], WorkflowSerializer);
31
+ //# sourceMappingURL=workflow.serializer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.serializer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/entities/workflow/workflow.serializer.ts"],"names":[],"mappings":";;;;;;;;;AACA,gCAAkC;AAElC,2EAG+C;AAGxC,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,SAAS,CAAC,QAAwB;QACjC,OAAO,0CAAwB,CAAC,KAAK,CAAC;YACrC,EAAE,EAAE,QAAQ,CAAC,EAAE;YACf,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,WAAW,EAAE,QAAQ,CAAC,WAAW;YACjC,QAAQ,EAAE,QAAQ,CAAC,QAAQ;YAC3B,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,cAAc,EAAE,QAAQ,CAAC,YAAY,EAAE,EAAE,IAAI,IAAI;YACjD,MAAM,EAAE,QAAQ,CAAC,eAAe,KAAK,QAAQ,CAAC,SAAS;YACvD,UAAU,EAAE,QAAQ,CAAC,UAAU;SAC/B,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAdY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;GACG,kBAAkB,CAc9B"}
@@ -0,0 +1,6 @@
1
+ import type { Readable } from 'node:stream';
2
+ export interface PackageWriter {
3
+ writeFile(path: string, content: string | Buffer): void;
4
+ writeDirectory(path: string): void;
5
+ finalize(): Readable;
6
+ }
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=multi-main-setup.types.js.map
3
+ //# sourceMappingURL=package-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-writer.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/package-writer.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare function generateSlug(name: string): string;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateSlug = generateSlug;
4
+ const EMPTY_SLUG_FALLBACK = 'workflow';
5
+ function generateSlug(name) {
6
+ let slug = name;
7
+ slug = slug
8
+ .toLowerCase()
9
+ .replace(/[^a-z0-9\s-]/g, '')
10
+ .trim()
11
+ .replace(/\s+/g, '-')
12
+ .replace(/-+/g, '-')
13
+ .replace(/^-|-$/g, '');
14
+ return slug || EMPTY_SLUG_FALLBACK;
15
+ }
16
+ //# sourceMappingURL=slug.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slug.utils.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/io/slug.utils.ts"],"names":[],"mappings":";;AAKA,oCAgBC;AArBD,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAKvC,SAAgB,YAAY,CAAC,IAAY;IACxC,IAAI,IAAI,GAAG,IAAI,CAAC;IAChB,IAAI,GAAG,IAAI;SACT,WAAW,EAAE;SAEb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAE5B,IAAI,EAAE;SAEN,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SAEpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SAEnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAExB,OAAO,IAAI,IAAI,mBAAmB,CAAC;AACpC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { Readable } from 'node:stream';
2
+ import type { PackageWriter } from '../package-writer';
3
+ export declare class TarPackageWriter implements PackageWriter {
4
+ private readonly entries;
5
+ private manifest;
6
+ writeFile(path: string, content: string | Buffer): void;
7
+ writeDirectory(path: string): void;
8
+ finalize(): Readable;
9
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TarPackageWriter = void 0;
4
+ const node_stream_1 = require("node:stream");
5
+ const tar_1 = require("tar");
6
+ const FIXED_MTIME = new Date(0);
7
+ const FILE_MODE = 0o644;
8
+ const DIRECTORY_MODE = 0o755;
9
+ const MANIFEST_PATH = 'manifest.json';
10
+ function normaliseEntryPath(path) {
11
+ return path.startsWith('./') ? path.slice(2) : path;
12
+ }
13
+ function fileEntry(path, content) {
14
+ const entry = new tar_1.ReadEntry(new tar_1.Header({
15
+ path,
16
+ size: content.length,
17
+ mode: FILE_MODE,
18
+ mtime: FIXED_MTIME,
19
+ type: 'File',
20
+ }));
21
+ entry.end(content);
22
+ return entry;
23
+ }
24
+ function directoryEntry(path) {
25
+ const normalised = path.endsWith('/') ? path : `${path}/`;
26
+ const entry = new tar_1.ReadEntry(new tar_1.Header({
27
+ path: normalised,
28
+ size: 0,
29
+ mode: DIRECTORY_MODE,
30
+ mtime: FIXED_MTIME,
31
+ type: 'Directory',
32
+ }));
33
+ entry.end();
34
+ return entry;
35
+ }
36
+ class TarPackageWriter {
37
+ constructor() {
38
+ this.entries = [];
39
+ this.manifest = null;
40
+ }
41
+ writeFile(path, content) {
42
+ const buffer = typeof content === 'string' ? Buffer.from(content, 'utf-8') : content;
43
+ const normalised = normaliseEntryPath(path);
44
+ if (normalised === MANIFEST_PATH) {
45
+ this.manifest = buffer;
46
+ return;
47
+ }
48
+ this.entries.push({ kind: 'file', path: normalised, content: buffer });
49
+ }
50
+ writeDirectory(path) {
51
+ this.entries.push({ kind: 'directory', path: normaliseEntryPath(path) });
52
+ }
53
+ finalize() {
54
+ const pack = new tar_1.Pack({ gzip: { portable: true }, mtime: FIXED_MTIME });
55
+ if (this.manifest) {
56
+ pack.write(fileEntry(MANIFEST_PATH, this.manifest));
57
+ }
58
+ for (const entry of this.entries) {
59
+ if (entry.kind === 'file') {
60
+ pack.write(fileEntry(entry.path, entry.content));
61
+ }
62
+ else {
63
+ pack.write(directoryEntry(entry.path));
64
+ }
65
+ }
66
+ pack.end();
67
+ return node_stream_1.Readable.from(pack);
68
+ }
69
+ }
70
+ exports.TarPackageWriter = TarPackageWriter;
71
+ //# sourceMappingURL=tar-package-writer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tar-package-writer.js","sourceRoot":"","sources":["../../../../../src/modules/n8n-packages/io/tar/tar-package-writer.ts"],"names":[],"mappings":";;;AAAA,6CAAuC;AACvC,6BAA8C;AAI9C,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;AAChC,MAAM,SAAS,GAAG,KAAK,CAAC;AACxB,MAAM,cAAc,GAAG,KAAK,CAAC;AAC7B,MAAM,aAAa,GAAG,eAAe,CAAC;AAItC,SAAS,kBAAkB,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAED,SAAS,SAAS,CAAC,IAAY,EAAE,OAAe;IAC/C,MAAM,KAAK,GAAG,IAAI,eAAS,CAC1B,IAAI,YAAM,CAAC;QACV,IAAI;QACJ,IAAI,EAAE,OAAO,CAAC,MAAM;QACpB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,MAAM;KACZ,CAAC,CACF,CAAC;IACF,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnB,OAAO,KAAK,CAAC;AACd,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IACnC,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC;IAC1D,MAAM,KAAK,GAAG,IAAI,eAAS,CAC1B,IAAI,YAAM,CAAC;QACV,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,CAAC;QACP,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,WAAW;KACjB,CAAC,CACF,CAAC;IACF,KAAK,CAAC,GAAG,EAAE,CAAC;IACZ,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAa,gBAAgB;IAA7B;QACkB,YAAO,GAAY,EAAE,CAAC;QAE/B,aAAQ,GAAkB,IAAI,CAAC;IAoCxC,CAAC;IAlCA,SAAS,CAAC,IAAY,EAAE,OAAwB;QAC/C,MAAM,MAAM,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACrF,MAAM,UAAU,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAE5C,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;YAClC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;YACvB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,cAAc,CAAC,IAAY;QAC1B,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,QAAQ;QACP,MAAM,IAAI,GAAG,IAAI,UAAI,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;QAExE,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QACrD,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YAClC,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBAC3B,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;YACxC,CAAC;QACF,CAAC;QAED,IAAI,CAAC,GAAG,EAAE,CAAC;QACX,OAAO,sBAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACD;AAvCD,4CAuCC"}
@@ -0,0 +1,10 @@
1
+ import { ExportWorkflowsRequestDto } from '@n8n/api-types';
2
+ import { AuthenticatedRequest } from '@n8n/db';
3
+ import type { Response } from 'express';
4
+ import type { Readable } from 'node:stream';
5
+ import { N8nPackagesService } from './n8n-packages.service';
6
+ export declare class N8nPackagesController {
7
+ private readonly packagesService;
8
+ constructor(packagesService: N8nPackagesService);
9
+ exportWorkflows(req: AuthenticatedRequest, res: Response, body: ExportWorkflowsRequestDto): Promise<Readable>;
10
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.N8nPackagesController = void 0;
16
+ const api_types_1 = require("@n8n/api-types");
17
+ const decorators_1 = require("@n8n/decorators");
18
+ const n8n_packages_service_1 = require("./n8n-packages.service");
19
+ let N8nPackagesController = class N8nPackagesController {
20
+ constructor(packagesService) {
21
+ this.packagesService = packagesService;
22
+ }
23
+ async exportWorkflows(req, res, body) {
24
+ res.setHeader('Content-Type', 'application/gzip');
25
+ res.setHeader('Content-Disposition', 'attachment; filename="export.n8np"');
26
+ return await this.packagesService.exportWorkflows({
27
+ user: req.user,
28
+ workflowIds: body.workflowIds,
29
+ });
30
+ }
31
+ };
32
+ exports.N8nPackagesController = N8nPackagesController;
33
+ __decorate([
34
+ (0, decorators_1.Post)('/export'),
35
+ (0, decorators_1.Licensed)('feat:n8nPackages'),
36
+ __param(2, decorators_1.Body),
37
+ __metadata("design:type", Function),
38
+ __metadata("design:paramtypes", [Object, Object, api_types_1.ExportWorkflowsRequestDto]),
39
+ __metadata("design:returntype", Promise)
40
+ ], N8nPackagesController.prototype, "exportWorkflows", null);
41
+ exports.N8nPackagesController = N8nPackagesController = __decorate([
42
+ (0, decorators_1.RestController)('/n8n-packages'),
43
+ __metadata("design:paramtypes", [n8n_packages_service_1.N8nPackagesService])
44
+ ], N8nPackagesController);
45
+ //# sourceMappingURL=n8n-packages.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"n8n-packages.controller.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAA2D;AAE3D,gDAAuE;AAIvE,iEAA4D;AAGrD,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YAA6B,eAAmC;QAAnC,oBAAe,GAAf,eAAe,CAAoB;IAAG,CAAC;IAI9D,AAAN,KAAK,CAAC,eAAe,CACpB,GAAyB,EACzB,GAAa,EACP,IAA+B;QAErC,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;QAClD,GAAG,CAAC,SAAS,CAAC,qBAAqB,EAAE,oCAAoC,CAAC,CAAC;QAE3E,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC;YACjD,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,WAAW,EAAE,IAAI,CAAC,WAAW;SAC7B,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;AAlBY,sDAAqB;AAK3B;IAFL,IAAA,iBAAI,EAAC,SAAS,CAAC;IACf,IAAA,qBAAQ,EAAC,kBAAkB,CAAC;IAI3B,WAAA,iBAAI,CAAA;;qDAAO,qCAAyB;;4DASrC;gCAjBW,qBAAqB;IADjC,IAAA,2BAAc,EAAC,eAAe,CAAC;qCAEe,yCAAkB;GADpD,qBAAqB,CAkBjC"}
@@ -1,4 +1,4 @@
1
1
  import type { ModuleInterface } from '@n8n/decorators';
2
- export declare class InboundSecretsModule implements ModuleInterface {
2
+ export declare class N8nPackagesModule implements ModuleInterface {
3
3
  init(): Promise<void>;
4
4
  }
@@ -39,23 +39,19 @@ var __importStar = (this && this.__importStar) || (function () {
39
39
  };
40
40
  })();
41
41
  Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.InboundSecretsModule = void 0;
42
+ exports.N8nPackagesModule = void 0;
43
+ const constants_1 = require("@n8n/constants");
43
44
  const decorators_1 = require("@n8n/decorators");
44
- const di_1 = require("@n8n/di");
45
- function isFeatureFlagEnabled() {
46
- return process.env.N8N_ENV_FEAT_INBOUND_SECRETS === 'true';
47
- }
48
- let InboundSecretsModule = class InboundSecretsModule {
45
+ let N8nPackagesModule = class N8nPackagesModule {
49
46
  async init() {
50
- if (!isFeatureFlagEnabled())
51
- return;
52
- const { InboundSecretsService } = await Promise.resolve().then(() => __importStar(require('./inbound-secrets.service')));
53
- di_1.Container.get(InboundSecretsService).init();
54
- await Promise.resolve().then(() => __importStar(require('./inbound-secrets-context-hook')));
47
+ await Promise.resolve().then(() => __importStar(require('./n8n-packages.controller')));
55
48
  }
56
49
  };
57
- exports.InboundSecretsModule = InboundSecretsModule;
58
- exports.InboundSecretsModule = InboundSecretsModule = __decorate([
59
- (0, decorators_1.BackendModule)({ name: 'inbound-secrets' })
60
- ], InboundSecretsModule);
61
- //# sourceMappingURL=inbound-secrets.module.js.map
50
+ exports.N8nPackagesModule = N8nPackagesModule;
51
+ exports.N8nPackagesModule = N8nPackagesModule = __decorate([
52
+ (0, decorators_1.BackendModule)({
53
+ name: 'n8n-packages',
54
+ licenseFlag: constants_1.LICENSE_FEATURES.N8N_PACKAGES,
55
+ })
56
+ ], N8nPackagesModule);
57
+ //# sourceMappingURL=n8n-packages.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"n8n-packages.module.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAkD;AAElD,gDAAgD;AAMzC,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,KAAK,CAAC,IAAI;QACT,wDAAa,2BAA2B,GAAC,CAAC;IAC3C,CAAC;CACD,CAAA;AAJY,8CAAiB;4BAAjB,iBAAiB;IAJ7B,IAAA,0BAAa,EAAC;QACd,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,4BAAgB,CAAC,YAAY;KAC1C,CAAC;GACW,iBAAiB,CAI7B"}
@@ -0,0 +1,10 @@
1
+ import { InstanceSettings } from 'n8n-core';
2
+ import type { Readable } from 'node:stream';
3
+ import { WorkflowExporter } from './entities/workflow/workflow.exporter';
4
+ import type { ExportWorkflowsRequest } from './n8n-packages.types';
5
+ export declare class N8nPackagesService {
6
+ private readonly workflowExporter;
7
+ private readonly instanceSettings;
8
+ constructor(workflowExporter: WorkflowExporter, instanceSettings: InstanceSettings);
9
+ exportWorkflows(request: ExportWorkflowsRequest): Promise<Readable>;
10
+ }
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.N8nPackagesService = void 0;
13
+ const di_1 = require("@n8n/di");
14
+ const n8n_core_1 = require("n8n-core");
15
+ const constants_1 = require("../../constants");
16
+ const workflow_exporter_1 = require("./entities/workflow/workflow.exporter");
17
+ const tar_package_writer_1 = require("./io/tar/tar-package-writer");
18
+ const constants_2 = require("./spec/constants");
19
+ const manifest_schema_1 = require("./spec/manifest.schema");
20
+ let N8nPackagesService = class N8nPackagesService {
21
+ constructor(workflowExporter, instanceSettings) {
22
+ this.workflowExporter = workflowExporter;
23
+ this.instanceSettings = instanceSettings;
24
+ }
25
+ async exportWorkflows(request) {
26
+ const writer = new tar_package_writer_1.TarPackageWriter();
27
+ const workflowEntries = await this.workflowExporter.export({
28
+ user: request.user,
29
+ workflowIds: request.workflowIds,
30
+ writer,
31
+ });
32
+ const manifest = manifest_schema_1.packageManifestSchema.parse({
33
+ packageFormatVersion: constants_2.FORMAT_VERSION,
34
+ exportedAt: new Date().toISOString(),
35
+ sourceN8nVersion: constants_1.N8N_VERSION,
36
+ sourceId: this.instanceSettings.instanceId,
37
+ workflows: workflowEntries,
38
+ });
39
+ writer.writeFile('manifest.json', JSON.stringify(manifest, null, '\t'));
40
+ return writer.finalize();
41
+ }
42
+ };
43
+ exports.N8nPackagesService = N8nPackagesService;
44
+ exports.N8nPackagesService = N8nPackagesService = __decorate([
45
+ (0, di_1.Service)(),
46
+ __metadata("design:paramtypes", [workflow_exporter_1.WorkflowExporter,
47
+ n8n_core_1.InstanceSettings])
48
+ ], N8nPackagesService);
49
+ //# sourceMappingURL=n8n-packages.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"n8n-packages.service.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAkC;AAClC,uCAA4C;AAG5C,2CAA0C;AAE1C,6EAAyE;AACzE,oEAA+D;AAE/D,gDAAkD;AAClD,4DAA+D;AAGxD,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YACkB,gBAAkC,EAClC,gBAAkC;QADlC,qBAAgB,GAAhB,gBAAgB,CAAkB;QAClC,qBAAgB,GAAhB,gBAAgB,CAAkB;IACjD,CAAC;IAEJ,KAAK,CAAC,eAAe,CAAC,OAA+B;QACpD,MAAM,MAAM,GAAG,IAAI,qCAAgB,EAAE,CAAC;QAEtC,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;YAC1D,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,MAAM;SACN,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAG,uCAAqB,CAAC,KAAK,CAAC;YAC5C,oBAAoB,EAAE,0BAAc;YACpC,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;YACpC,gBAAgB,EAAE,uBAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,UAAU;YAC1C,SAAS,EAAE,eAAe;SAC1B,CAAC,CAAC;QAEH,MAAM,CAAC,SAAS,CAAC,eAAe,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACxE,OAAO,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;CACD,CAAA;AA1BY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,YAAO,GAAE;qCAG2B,oCAAgB;QAChB,2BAAgB;GAHxC,kBAAkB,CA0B9B"}
@@ -0,0 +1,5 @@
1
+ import type { User } from '@n8n/db';
2
+ export interface ExportWorkflowsRequest {
3
+ user: User;
4
+ workflowIds: string[];
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=n8n-packages.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"n8n-packages.types.js","sourceRoot":"","sources":["../../../src/modules/n8n-packages/n8n-packages.types.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export declare const FORMAT_VERSION = "1";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FORMAT_VERSION = void 0;
4
+ exports.FORMAT_VERSION = '1';
5
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/spec/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG,GAAG,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { z } from 'zod';
2
+ export declare const manifestEntrySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ target: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ name: string;
8
+ id: string;
9
+ target: string;
10
+ }, {
11
+ name: string;
12
+ id: string;
13
+ target: string;
14
+ }>;
15
+ export declare const packageManifestSchema: z.ZodObject<{
16
+ packageFormatVersion: z.ZodString;
17
+ exportedAt: z.ZodString;
18
+ sourceN8nVersion: z.ZodString;
19
+ sourceId: z.ZodString;
20
+ workflows: z.ZodOptional<z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ name: z.ZodString;
23
+ target: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ name: string;
26
+ id: string;
27
+ target: string;
28
+ }, {
29
+ name: string;
30
+ id: string;
31
+ target: string;
32
+ }>, "many">>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ sourceId: string;
35
+ packageFormatVersion: string;
36
+ exportedAt: string;
37
+ sourceN8nVersion: string;
38
+ workflows?: {
39
+ name: string;
40
+ id: string;
41
+ target: string;
42
+ }[] | undefined;
43
+ }, {
44
+ sourceId: string;
45
+ packageFormatVersion: string;
46
+ exportedAt: string;
47
+ sourceN8nVersion: string;
48
+ workflows?: {
49
+ name: string;
50
+ id: string;
51
+ target: string;
52
+ }[] | undefined;
53
+ }>;
54
+ export type ManifestEntry = z.infer<typeof manifestEntrySchema>;
55
+ export type PackageManifest = z.infer<typeof packageManifestSchema>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.packageManifestSchema = exports.manifestEntrySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.manifestEntrySchema = zod_1.z.object({
6
+ id: zod_1.z.string().min(1),
7
+ name: zod_1.z.string(),
8
+ target: zod_1.z.string().min(1),
9
+ });
10
+ exports.packageManifestSchema = zod_1.z.object({
11
+ packageFormatVersion: zod_1.z.string().min(1),
12
+ exportedAt: zod_1.z.string().min(1),
13
+ sourceN8nVersion: zod_1.z.string().min(1),
14
+ sourceId: zod_1.z.string().min(1),
15
+ workflows: zod_1.z.array(exports.manifestEntrySchema).optional(),
16
+ });
17
+ //# sourceMappingURL=manifest.schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.schema.js","sourceRoot":"","sources":["../../../../src/modules/n8n-packages/spec/manifest.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,oBAAoB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACnC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,2BAAmB,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC"}
@@ -0,0 +1,169 @@
1
+ import { z } from 'zod';
2
+ export declare const serializedWorkflowSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ name: z.ZodString;
5
+ nodes: z.ZodArray<z.ZodObject<{
6
+ id: z.ZodString;
7
+ name: z.ZodString;
8
+ type: z.ZodString;
9
+ typeVersion: z.ZodNumber;
10
+ position: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
11
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
12
+ credentials: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
13
+ id: z.ZodString;
14
+ name: z.ZodString;
15
+ }, "strip", z.ZodTypeAny, {
16
+ name: string;
17
+ id: string;
18
+ }, {
19
+ name: string;
20
+ id: string;
21
+ }>>>;
22
+ disabled: z.ZodOptional<z.ZodBoolean>;
23
+ notes: z.ZodOptional<z.ZodString>;
24
+ notesInFlow: z.ZodOptional<z.ZodBoolean>;
25
+ continueOnFail: z.ZodOptional<z.ZodBoolean>;
26
+ retryOnFail: z.ZodOptional<z.ZodBoolean>;
27
+ maxTries: z.ZodOptional<z.ZodNumber>;
28
+ waitBetweenTries: z.ZodOptional<z.ZodNumber>;
29
+ alwaysOutputData: z.ZodOptional<z.ZodBoolean>;
30
+ executeOnce: z.ZodOptional<z.ZodBoolean>;
31
+ onError: z.ZodOptional<z.ZodString>;
32
+ webhookId: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ name: string;
35
+ id: string;
36
+ type: string;
37
+ typeVersion: number;
38
+ position: [number, number];
39
+ parameters: Record<string, unknown>;
40
+ credentials?: Record<string, {
41
+ name: string;
42
+ id: string;
43
+ }> | undefined;
44
+ disabled?: boolean | undefined;
45
+ webhookId?: string | undefined;
46
+ notes?: string | undefined;
47
+ notesInFlow?: boolean | undefined;
48
+ retryOnFail?: boolean | undefined;
49
+ maxTries?: number | undefined;
50
+ waitBetweenTries?: number | undefined;
51
+ alwaysOutputData?: boolean | undefined;
52
+ executeOnce?: boolean | undefined;
53
+ onError?: string | undefined;
54
+ continueOnFail?: boolean | undefined;
55
+ }, {
56
+ name: string;
57
+ id: string;
58
+ type: string;
59
+ typeVersion: number;
60
+ position: [number, number];
61
+ parameters: Record<string, unknown>;
62
+ credentials?: Record<string, {
63
+ name: string;
64
+ id: string;
65
+ }> | undefined;
66
+ disabled?: boolean | undefined;
67
+ webhookId?: string | undefined;
68
+ notes?: string | undefined;
69
+ notesInFlow?: boolean | undefined;
70
+ retryOnFail?: boolean | undefined;
71
+ maxTries?: number | undefined;
72
+ waitBetweenTries?: number | undefined;
73
+ alwaysOutputData?: boolean | undefined;
74
+ executeOnce?: boolean | undefined;
75
+ onError?: string | undefined;
76
+ continueOnFail?: boolean | undefined;
77
+ }>, "many">;
78
+ connections: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodNullable<z.ZodArray<z.ZodObject<{
79
+ node: z.ZodString;
80
+ type: z.ZodString;
81
+ index: z.ZodNumber;
82
+ }, "strip", z.ZodTypeAny, {
83
+ type: string;
84
+ node: string;
85
+ index: number;
86
+ }, {
87
+ type: string;
88
+ node: string;
89
+ index: number;
90
+ }>, "many">>, "many">>>;
91
+ settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
+ versionId: z.ZodString;
93
+ parentFolderId: z.ZodNullable<z.ZodString>;
94
+ active: z.ZodBoolean;
95
+ isArchived: z.ZodBoolean;
96
+ }, "strip", z.ZodTypeAny, {
97
+ name: string;
98
+ id: string;
99
+ active: boolean;
100
+ isArchived: boolean;
101
+ nodes: {
102
+ name: string;
103
+ id: string;
104
+ type: string;
105
+ typeVersion: number;
106
+ position: [number, number];
107
+ parameters: Record<string, unknown>;
108
+ credentials?: Record<string, {
109
+ name: string;
110
+ id: string;
111
+ }> | undefined;
112
+ disabled?: boolean | undefined;
113
+ webhookId?: string | undefined;
114
+ notes?: string | undefined;
115
+ notesInFlow?: boolean | undefined;
116
+ retryOnFail?: boolean | undefined;
117
+ maxTries?: number | undefined;
118
+ waitBetweenTries?: number | undefined;
119
+ alwaysOutputData?: boolean | undefined;
120
+ executeOnce?: boolean | undefined;
121
+ onError?: string | undefined;
122
+ continueOnFail?: boolean | undefined;
123
+ }[];
124
+ connections: Record<string, Record<string, ({
125
+ type: string;
126
+ node: string;
127
+ index: number;
128
+ }[] | null)[]>>;
129
+ versionId: string;
130
+ parentFolderId: string | null;
131
+ settings?: Record<string, unknown> | undefined;
132
+ }, {
133
+ name: string;
134
+ id: string;
135
+ active: boolean;
136
+ isArchived: boolean;
137
+ nodes: {
138
+ name: string;
139
+ id: string;
140
+ type: string;
141
+ typeVersion: number;
142
+ position: [number, number];
143
+ parameters: Record<string, unknown>;
144
+ credentials?: Record<string, {
145
+ name: string;
146
+ id: string;
147
+ }> | undefined;
148
+ disabled?: boolean | undefined;
149
+ webhookId?: string | undefined;
150
+ notes?: string | undefined;
151
+ notesInFlow?: boolean | undefined;
152
+ retryOnFail?: boolean | undefined;
153
+ maxTries?: number | undefined;
154
+ waitBetweenTries?: number | undefined;
155
+ alwaysOutputData?: boolean | undefined;
156
+ executeOnce?: boolean | undefined;
157
+ onError?: string | undefined;
158
+ continueOnFail?: boolean | undefined;
159
+ }[];
160
+ connections: Record<string, Record<string, ({
161
+ type: string;
162
+ node: string;
163
+ index: number;
164
+ }[] | null)[]>>;
165
+ versionId: string;
166
+ parentFolderId: string | null;
167
+ settings?: Record<string, unknown> | undefined;
168
+ }>;
169
+ export type SerializedWorkflow = z.infer<typeof serializedWorkflowSchema>;