n8n 2.22.4 → 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 (626) 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 -4
  89. package/dist/manual-execution.service.js +3 -0
  90. package/dist/manual-execution.service.js.map +1 -1
  91. package/dist/modules/agents/agent-execution.service.js +5 -5
  92. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  93. package/dist/modules/agents/agent-sse-stream.js +17 -1
  94. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  95. package/dist/modules/agents/agents-tools.service.js +7 -5
  96. package/dist/modules/agents/agents-tools.service.js.map +1 -1
  97. package/dist/modules/agents/agents.controller.d.ts +29 -3
  98. package/dist/modules/agents/agents.controller.js +88 -7
  99. package/dist/modules/agents/agents.controller.js.map +1 -1
  100. package/dist/modules/agents/agents.module.d.ts +1 -1
  101. package/dist/modules/agents/agents.module.js +12 -6
  102. package/dist/modules/agents/agents.module.js.map +1 -1
  103. package/dist/modules/agents/agents.service.d.ts +7 -8
  104. package/dist/modules/agents/agents.service.js +120 -65
  105. package/dist/modules/agents/agents.service.js.map +1 -1
  106. package/dist/modules/agents/builder/agents-builder-model-recommendations.d.ts +1 -1
  107. package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -3
  108. package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
  109. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +9 -17
  110. package/dist/modules/agents/builder/agents-builder-prompts.js +145 -549
  111. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  112. package/dist/modules/agents/builder/agents-builder-settings.service.js +2 -2
  113. package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -1
  114. package/dist/modules/agents/builder/agents-builder-tools.service.js +10 -10
  115. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  116. package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
  117. package/dist/modules/agents/builder/agents-builder.service.js +58 -9
  118. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  119. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +2 -2
  120. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  121. package/dist/modules/agents/builder/interactive/ask-llm.tool.js +2 -2
  122. package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
  123. package/dist/modules/agents/builder/interactive/ask-question.tool.js +2 -2
  124. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
  125. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
  126. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  127. package/dist/modules/agents/builder/prompts/config-mutation.prompt.d.ts +1 -0
  128. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +132 -0
  129. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -0
  130. package/dist/modules/agents/builder/prompts/config-rules.prompt.d.ts +2 -0
  131. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +63 -0
  132. package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -0
  133. package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -0
  134. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +47 -0
  135. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -0
  136. package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -0
  137. package/dist/modules/agents/builder/prompts/memory.prompt.js +60 -0
  138. package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -0
  139. package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -0
  140. package/dist/modules/agents/builder/prompts/tools.prompt.js +81 -0
  141. package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -0
  142. package/dist/modules/agents/builder/skills/index.d.ts +2 -0
  143. package/dist/modules/agents/builder/skills/index.js +12 -0
  144. package/dist/modules/agents/builder/skills/index.js.map +1 -0
  145. package/dist/modules/agents/builder/skills/integrations.skill.d.ts +2 -0
  146. package/dist/modules/agents/builder/skills/integrations.skill.js +53 -0
  147. package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -0
  148. package/dist/modules/agents/builder/skills/research.skill.d.ts +2 -0
  149. package/dist/modules/agents/builder/skills/research.skill.js +42 -0
  150. package/dist/modules/agents/builder/skills/research.skill.js.map +1 -0
  151. package/dist/modules/agents/builder/skills/target-skills.skill.d.ts +2 -0
  152. package/dist/modules/agents/builder/skills/target-skills.skill.js +59 -0
  153. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -0
  154. package/dist/modules/agents/entities/{agent-published-version.entity.d.ts → agent-history.entity.d.ts} +4 -7
  155. package/dist/modules/agents/entities/{agent-published-version.entity.js → agent-history.entity.js} +22 -34
  156. package/dist/modules/agents/entities/agent-history.entity.js.map +1 -0
  157. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.d.ts +7 -0
  158. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js +38 -0
  159. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js.map +1 -0
  160. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.d.ts +7 -0
  161. package/dist/modules/{instance-ai/entities/instance-ai-workflow-snapshot.entity.js → agents/entities/agent-memory-entry-lock.entity.js} +16 -19
  162. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.js.map +1 -0
  163. package/dist/modules/agents/entities/agent-memory-entry-source.entity.d.ts +9 -0
  164. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js +49 -0
  165. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js.map +1 -0
  166. package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +15 -0
  167. package/dist/modules/agents/entities/agent-memory-entry.entity.js +65 -0
  168. package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -0
  169. package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +2 -3
  170. package/dist/modules/agents/entities/agent-observation-cursor.entity.js +5 -4
  171. package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -1
  172. package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +2 -3
  173. package/dist/modules/agents/entities/agent-observation-lock.entity.js +5 -4
  174. package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -1
  175. package/dist/modules/agents/entities/agent-observation.entity.d.ts +2 -3
  176. package/dist/modules/agents/entities/agent-observation.entity.js +6 -5
  177. package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -1
  178. package/dist/modules/agents/entities/agent.entity.d.ts +3 -5
  179. package/dist/modules/agents/entities/agent.entity.js +7 -14
  180. package/dist/modules/agents/entities/agent.entity.js.map +1 -1
  181. package/dist/modules/agents/episodic-memory.d.ts +2 -0
  182. package/dist/modules/agents/episodic-memory.js +12 -0
  183. package/dist/modules/agents/episodic-memory.js.map +1 -0
  184. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +2 -1
  185. package/dist/modules/agents/integrations/agent-chat-bridge.js +19 -5
  186. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  187. package/dist/modules/agents/integrations/agent-schedule.service.js +10 -6
  188. package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -1
  189. package/dist/modules/agents/integrations/chat-integration.service.js +1 -1
  190. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  191. package/dist/modules/agents/integrations/n8n-memory.d.ts +41 -18
  192. package/dist/modules/agents/integrations/n8n-memory.js +519 -77
  193. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
  194. package/dist/modules/agents/integrations/platforms/slack-integration.js +2 -12
  195. package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
  196. package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +1 -1
  197. package/dist/modules/agents/integrations/rich-interaction-tool.js +2 -2
  198. package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -1
  199. package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +52 -0
  200. package/dist/modules/agents/integrations/slack-app-setup.service.js +316 -0
  201. package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -0
  202. package/dist/modules/agents/json-config/from-json-config.d.ts +2 -3
  203. package/dist/modules/agents/json-config/from-json-config.js +76 -61
  204. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  205. package/dist/modules/agents/json-config/schema-text-serializer.js +2 -1
  206. package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
  207. package/dist/modules/agents/repositories/agent-history.repository.d.ts +19 -0
  208. package/dist/modules/agents/repositories/agent-history.repository.js +51 -0
  209. package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -0
  210. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.d.ts +5 -0
  211. package/dist/modules/{instance-ai/repositories/instance-ai-workflow-snapshot.repository.js → agents/repositories/agent-memory-entry-cursor.repository.js} +8 -8
  212. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js.map +1 -0
  213. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.d.ts +5 -0
  214. package/dist/modules/{instance-ai/repositories/instance-ai-observational-memory.repository.js → agents/repositories/agent-memory-entry-lock.repository.js} +8 -8
  215. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.js.map +1 -0
  216. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.d.ts +5 -0
  217. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js +26 -0
  218. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js.map +1 -0
  219. package/dist/modules/agents/repositories/agent-memory-entry.repository.d.ts +5 -0
  220. package/dist/modules/agents/repositories/agent-memory-entry.repository.js +26 -0
  221. package/dist/modules/agents/repositories/agent-memory-entry.repository.js.map +1 -0
  222. package/dist/modules/agents/repositories/agent.repository.js +3 -3
  223. package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
  224. package/dist/modules/agents/runtime/agent-secure-runtime.js +5 -5
  225. package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -1
  226. package/dist/modules/agents/tools/environment-tool.d.ts +1 -1
  227. package/dist/modules/agents/tools/environment-tool.js +3 -3
  228. package/dist/modules/agents/tools/environment-tool.js.map +1 -1
  229. package/dist/modules/agents/tools/node-tool-factory.js +5 -5
  230. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
  231. package/dist/modules/agents/tools/workflow-tool-factory.js +3 -3
  232. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  233. package/dist/modules/agents/tracing/builder-telemetry.d.ts +2 -3
  234. package/dist/modules/agents/tracing/builder-telemetry.js +36 -3
  235. package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -1
  236. package/dist/modules/agents/utils/agent-draft.utils.js +1 -2
  237. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
  238. package/dist/modules/agents/utils/agent-memory-scope.d.ts +3 -0
  239. package/dist/modules/agents/utils/agent-memory-scope.js +15 -0
  240. package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -0
  241. package/dist/modules/chat-hub/chat-hub.constants.js +4 -0
  242. package/dist/modules/chat-hub/chat-hub.constants.js.map +1 -1
  243. package/dist/modules/chat-hub/context-limits.js +1 -0
  244. package/dist/modules/chat-hub/context-limits.js.map +1 -1
  245. package/dist/modules/dynamic-credentials.ee/constants.d.ts +3 -0
  246. package/dist/modules/dynamic-credentials.ee/constants.js +7 -0
  247. package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -0
  248. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +14 -2
  249. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
  250. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +2 -2
  251. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
  252. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
  253. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +1 -1
  254. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +4 -1
  255. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
  256. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.d.ts +4 -0
  257. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js +11 -0
  258. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js.map +1 -0
  259. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +7 -0
  260. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +40 -0
  261. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -0
  262. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.d.ts +3 -1
  263. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js +6 -3
  264. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
  265. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +2 -0
  266. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +22 -0
  267. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
  268. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +3 -1
  269. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +7 -3
  270. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
  271. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +4 -1
  272. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +11 -3
  273. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
  274. package/dist/modules/dynamic-credentials.ee/services/index.d.ts +2 -0
  275. package/dist/modules/dynamic-credentials.ee/services/index.js +2 -0
  276. package/dist/modules/dynamic-credentials.ee/services/index.js.map +1 -1
  277. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +14 -0
  278. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +70 -0
  279. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -0
  280. package/dist/modules/insights/insights-collection.service.js +1 -1
  281. package/dist/modules/insights/insights-collection.service.js.map +1 -1
  282. package/dist/modules/instance-ai/entities/index.d.ts +6 -2
  283. package/dist/modules/instance-ai/entities/index.js +9 -5
  284. package/dist/modules/instance-ai/entities/index.js.map +1 -1
  285. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.d.ts +12 -0
  286. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js +54 -0
  287. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js.map +1 -0
  288. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.d.ts +6 -0
  289. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js +33 -0
  290. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js.map +1 -0
  291. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.d.ts +8 -0
  292. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js +37 -0
  293. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js.map +1 -0
  294. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.d.ts +12 -0
  295. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js +52 -0
  296. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js.map +1 -0
  297. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.d.ts +19 -0
  298. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js +82 -0
  299. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js.map +1 -0
  300. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +2 -0
  301. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +8 -0
  302. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -1
  303. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +12 -2
  304. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +40 -4
  305. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
  306. package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
  307. package/dist/modules/instance-ai/eval/execution.service.js +137 -47
  308. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  309. package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +31 -0
  310. package/dist/modules/instance-ai/eval/llm-wire-server.js +127 -0
  311. package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -0
  312. package/dist/modules/instance-ai/eval/openai-envelope.d.ts +6 -0
  313. package/dist/modules/instance-ai/eval/openai-envelope.js +96 -0
  314. package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -0
  315. package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +1 -0
  316. package/dist/modules/instance-ai/eval/proxy-loopback.js +44 -0
  317. package/dist/modules/instance-ai/eval/proxy-loopback.js.map +1 -0
  318. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +29 -7
  319. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +1 -1
  320. package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +7 -1
  321. package/dist/modules/instance-ai/eval/workflow-analysis.js +178 -3
  322. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  323. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +6 -6
  324. package/dist/modules/instance-ai/instance-ai-memory.service.js +44 -85
  325. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  326. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -1
  327. package/dist/modules/instance-ai/instance-ai-settings.service.js +11 -22
  328. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  329. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -0
  330. package/dist/modules/instance-ai/instance-ai.adapter.service.js +105 -13
  331. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  332. package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
  333. package/dist/modules/instance-ai/instance-ai.module.js +10 -6
  334. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  335. package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -12
  336. package/dist/modules/instance-ai/instance-ai.service.js +724 -264
  337. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  338. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +4 -1
  339. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +3 -1
  340. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
  341. package/dist/modules/instance-ai/message-parser.d.ts +3 -3
  342. package/dist/modules/instance-ai/message-parser.js +65 -61
  343. package/dist/modules/instance-ai/message-parser.js.map +1 -1
  344. package/dist/modules/instance-ai/node-definition-resolver.js +12 -48
  345. package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
  346. package/dist/modules/instance-ai/repositories/index.d.ts +4 -2
  347. package/dist/modules/instance-ai/repositories/index.js +9 -5
  348. package/dist/modules/instance-ai/repositories/index.js.map +1 -1
  349. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +5 -0
  350. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +26 -0
  351. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -0
  352. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.d.ts +5 -0
  353. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js +26 -0
  354. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js.map +1 -0
  355. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.d.ts +5 -0
  356. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js +26 -0
  357. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js.map +1 -0
  358. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.d.ts +5 -0
  359. package/dist/modules/{agents/repositories/agent-published-version.repository.js → instance-ai/repositories/instance-ai-observation.repository.js} +8 -17
  360. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js.map +1 -0
  361. package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +2 -0
  362. package/dist/modules/instance-ai/storage/db-snapshot-storage.js +12 -2
  363. package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
  364. package/dist/modules/instance-ai/storage/index.d.ts +2 -3
  365. package/dist/modules/instance-ai/storage/index.js +5 -7
  366. package/dist/modules/instance-ai/storage/index.js.map +1 -1
  367. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +15 -0
  368. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +94 -0
  369. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -0
  370. package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +94 -0
  371. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +324 -0
  372. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -0
  373. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +37 -0
  374. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +212 -0
  375. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -0
  376. package/dist/modules/instance-ai/web-research/fetch-and-extract.js +34 -11
  377. package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
  378. package/dist/modules/mcp/mcp.service.js +5 -5
  379. package/dist/modules/mcp/mcp.service.js.map +1 -1
  380. package/dist/modules/mcp/tools/schemas.d.ts +24 -24
  381. package/dist/modules/mcp/tools/search-projects.tool.js +59 -13
  382. package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
  383. package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
  384. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +35 -0
  385. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js +88 -0
  386. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -0
  387. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +3 -2
  388. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +41 -9
  389. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  390. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.d.ts +13 -0
  391. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js +87 -0
  392. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js.map +1 -0
  393. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +2 -1
  394. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +42 -6
  395. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  396. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +2 -1
  397. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +5 -1
  398. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
  399. package/dist/modules/mcp/tools/workflow-validation.utils.js +1 -1
  400. package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
  401. package/dist/modules/mcp-registry/mcp-registry-test.controller.js +5 -1
  402. package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -1
  403. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +18 -0
  404. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +73 -0
  405. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -0
  406. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +5 -0
  407. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +31 -0
  408. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -0
  409. package/dist/modules/n8n-packages/io/package-writer.d.ts +6 -0
  410. package/dist/{scaling/multi-main-setup.types.js → modules/n8n-packages/io/package-writer.js} +1 -1
  411. package/dist/modules/n8n-packages/io/package-writer.js.map +1 -0
  412. package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -0
  413. package/dist/modules/n8n-packages/io/slug.utils.js +16 -0
  414. package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -0
  415. package/dist/modules/n8n-packages/io/tar/tar-package-writer.d.ts +9 -0
  416. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js +71 -0
  417. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js.map +1 -0
  418. package/dist/modules/n8n-packages/n8n-packages.controller.d.ts +10 -0
  419. package/dist/modules/n8n-packages/n8n-packages.controller.js +45 -0
  420. package/dist/modules/n8n-packages/n8n-packages.controller.js.map +1 -0
  421. package/dist/modules/{inbound-secrets/inbound-secrets.module.d.ts → n8n-packages/n8n-packages.module.d.ts} +1 -1
  422. package/dist/modules/{inbound-secrets/inbound-secrets.module.js → n8n-packages/n8n-packages.module.js} +12 -16
  423. package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -0
  424. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +10 -0
  425. package/dist/modules/n8n-packages/n8n-packages.service.js +49 -0
  426. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -0
  427. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +5 -0
  428. package/dist/modules/n8n-packages/n8n-packages.types.js +3 -0
  429. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -0
  430. package/dist/modules/n8n-packages/spec/constants.d.ts +1 -0
  431. package/dist/modules/n8n-packages/spec/constants.js +5 -0
  432. package/dist/modules/n8n-packages/spec/constants.js.map +1 -0
  433. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +55 -0
  434. package/dist/modules/n8n-packages/spec/manifest.schema.js +17 -0
  435. package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -0
  436. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +169 -0
  437. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +46 -0
  438. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -0
  439. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.d.ts +5 -1
  440. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js +18 -2
  441. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js.map +1 -1
  442. package/dist/modules/oauth-jwe/oauth-jwe.utils.js +27 -2
  443. package/dist/modules/oauth-jwe/oauth-jwe.utils.js.map +1 -1
  444. package/dist/modules/otel/execution-level-tracer.js +1 -0
  445. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  446. package/dist/modules/otel/execution-level-tracer.types.d.ts +11 -6
  447. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  448. package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
  449. package/dist/modules/otel/otel-lifecycle-handler.js +30 -2
  450. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  451. package/dist/modules/otel/otel.constants.d.ts +1 -0
  452. package/dist/modules/otel/otel.constants.js +1 -0
  453. package/dist/modules/otel/otel.constants.js.map +1 -1
  454. package/dist/modules/runtime-credentials/path-traversal.js.map +1 -0
  455. package/dist/modules/runtime-credentials/runtime-credentials-access.service.d.ts +8 -0
  456. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js +35 -0
  457. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js.map +1 -0
  458. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.d.ts → runtime-credentials/runtime-credentials-context-hook.d.ts} +4 -5
  459. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.js → runtime-credentials/runtime-credentials-context-hook.js} +14 -22
  460. package/dist/modules/runtime-credentials/runtime-credentials-context-hook.js.map +1 -0
  461. package/dist/modules/runtime-credentials/runtime-credentials.config.d.ts +3 -0
  462. package/dist/modules/{inbound-secrets/inbound-secrets.config.js → runtime-credentials/runtime-credentials.config.js} +7 -7
  463. package/dist/modules/runtime-credentials/runtime-credentials.config.js.map +1 -0
  464. package/dist/modules/runtime-credentials/runtime-credentials.module.d.ts +4 -0
  465. package/dist/modules/runtime-credentials/runtime-credentials.module.js +65 -0
  466. package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -0
  467. package/dist/modules/runtime-credentials/runtime-credentials.schemas.d.ts +23 -0
  468. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js +10 -0
  469. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js.map +1 -0
  470. package/dist/modules/runtime-credentials/runtime-credentials.service.d.ts +18 -0
  471. package/dist/modules/{inbound-secrets/inbound-secrets.service.js → runtime-credentials/runtime-credentials.service.js} +31 -28
  472. package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -0
  473. package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
  474. package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -1
  475. package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
  476. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +2 -2
  477. package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -8
  478. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  479. package/dist/modules/source-control.ee/source-control-status.service.ee.js +4 -4
  480. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  481. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
  482. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
  483. package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +2 -1
  484. package/dist/modules/sso-saml/saml.service.ee.js +5 -1
  485. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  486. package/dist/modules/workflow-index/workflow-dependency.controller.d.ts +1 -4
  487. package/dist/modules/workflow-index/workflow-dependency.controller.js +2 -13
  488. package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
  489. package/dist/node-catalog/node-catalog.service.d.ts +1 -2
  490. package/dist/node-catalog/node-catalog.service.js +6 -10
  491. package/dist/node-catalog/node-catalog.service.js.map +1 -1
  492. package/dist/node-execution/ephemeral-node-executor.js +19 -11
  493. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  494. package/dist/oauth/oauth-jwe-service.proxy.d.ts +12 -2
  495. package/dist/oauth/oauth-jwe-service.proxy.js +5 -0
  496. package/dist/oauth/oauth-jwe-service.proxy.js.map +1 -1
  497. package/dist/oauth/oauth.service.d.ts +6 -1
  498. package/dist/oauth/oauth.service.js +42 -4
  499. package/dist/oauth/oauth.service.js.map +1 -1
  500. package/dist/permissions.ee/check-access.d.ts +2 -2
  501. package/dist/permissions.ee/check-access.js +15 -11
  502. package/dist/permissions.ee/check-access.js.map +1 -1
  503. package/dist/posthog/index.d.ts +2 -0
  504. package/dist/posthog/index.js +28 -6
  505. package/dist/posthog/index.js.map +1 -1
  506. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +10 -0
  507. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +42 -0
  508. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -0
  509. package/dist/public-api/v1/openapi.yml +55 -0
  510. package/dist/requests.d.ts +1 -1
  511. package/dist/scaling/constants.js +3 -0
  512. package/dist/scaling/constants.js.map +1 -1
  513. package/dist/scaling/multi-main-setup.ee.d.ts +12 -7
  514. package/dist/scaling/multi-main-setup.ee.js +125 -22
  515. package/dist/scaling/multi-main-setup.ee.js.map +1 -1
  516. package/dist/server.d.ts +1 -0
  517. package/dist/server.js +3 -4
  518. package/dist/server.js.map +1 -1
  519. package/dist/services/dynamic-node-parameters.service.d.ts +0 -1
  520. package/dist/services/dynamic-node-parameters.service.js +6 -14
  521. package/dist/services/dynamic-node-parameters.service.js.map +1 -1
  522. package/dist/services/frontend.service.js +1 -1
  523. package/dist/services/frontend.service.js.map +1 -1
  524. package/dist/services/import.service.js +3 -1
  525. package/dist/services/import.service.js.map +1 -1
  526. package/dist/services/proxy-token-manager.js +2 -13
  527. package/dist/services/proxy-token-manager.js.map +1 -1
  528. package/dist/services/runtime-credential-proxy.service.d.ts +9 -0
  529. package/dist/services/runtime-credential-proxy.service.js +29 -0
  530. package/dist/services/runtime-credential-proxy.service.js.map +1 -0
  531. package/dist/services/url.service.d.ts +1 -0
  532. package/dist/services/url.service.js +3 -0
  533. package/dist/services/url.service.js.map +1 -1
  534. package/dist/telemetry/index.d.ts +4 -1
  535. package/dist/telemetry/index.js +16 -8
  536. package/dist/telemetry/index.js.map +1 -1
  537. package/dist/utils.d.ts +2 -1
  538. package/dist/utils.js +10 -0
  539. package/dist/utils.js.map +1 -1
  540. package/dist/webhooks/live-webhooks.js +2 -2
  541. package/dist/webhooks/live-webhooks.js.map +1 -1
  542. package/dist/webhooks/webhook-helpers.js +1 -1
  543. package/dist/webhooks/webhook-helpers.js.map +1 -1
  544. package/dist/workflow-execute-additional-data.d.ts +3 -1
  545. package/dist/workflow-execute-additional-data.js +26 -3
  546. package/dist/workflow-execute-additional-data.js.map +1 -1
  547. package/dist/workflow-helpers.d.ts +3 -1
  548. package/dist/workflow-helpers.js +39 -5
  549. package/dist/workflow-helpers.js.map +1 -1
  550. package/dist/workflow-hook-context.service.d.ts +6 -0
  551. package/dist/workflow-hook-context.service.js +32 -0
  552. package/dist/workflow-hook-context.service.js.map +1 -0
  553. package/dist/workflow-runner.js +2 -1
  554. package/dist/workflow-runner.js.map +1 -1
  555. package/dist/workflows/utils.d.ts +3 -0
  556. package/dist/workflows/utils.js +19 -0
  557. package/dist/workflows/utils.js.map +1 -1
  558. package/dist/workflows/workflow-creation.service.js +4 -2
  559. package/dist/workflows/workflow-creation.service.js.map +1 -1
  560. package/dist/workflows/workflow-execution.service.d.ts +4 -3
  561. package/dist/workflows/workflow-execution.service.js +8 -3
  562. package/dist/workflows/workflow-execution.service.js.map +1 -1
  563. package/dist/workflows/workflow-finder.service.d.ts +6 -2
  564. package/dist/workflows/workflow-finder.service.js +18 -0
  565. package/dist/workflows/workflow-finder.service.js.map +1 -1
  566. package/dist/workflows/workflow-history/workflow-history.controller.d.ts +1 -1
  567. package/dist/workflows/workflow-history/workflow-history.service.d.ts +2 -1
  568. package/dist/workflows/workflow-history/workflow-history.service.js +1 -0
  569. package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
  570. package/dist/workflows/workflow-validation.service.d.ts +3 -1
  571. package/dist/workflows/workflow-validation.service.js +6 -3
  572. package/dist/workflows/workflow-validation.service.js.map +1 -1
  573. package/dist/workflows/workflow.service.d.ts +3 -3
  574. package/dist/workflows/workflow.service.js +26 -4
  575. package/dist/workflows/workflow.service.js.map +1 -1
  576. package/dist/workflows/workflows.controller.d.ts +31 -21
  577. package/dist/workflows/workflows.controller.js +6 -2
  578. package/dist/workflows/workflows.controller.js.map +1 -1
  579. package/package.json +36 -34
  580. package/dist/modules/agents/entities/agent-published-version.entity.js.map +0 -1
  581. package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +0 -20
  582. package/dist/modules/agents/repositories/agent-published-version.repository.js.map +0 -1
  583. package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js.map +0 -1
  584. package/dist/modules/inbound-secrets/inbound-secrets.config.d.ts +0 -3
  585. package/dist/modules/inbound-secrets/inbound-secrets.config.js.map +0 -1
  586. package/dist/modules/inbound-secrets/inbound-secrets.module.js.map +0 -1
  587. package/dist/modules/inbound-secrets/inbound-secrets.schemas.d.ts +0 -3
  588. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js +0 -6
  589. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js.map +0 -1
  590. package/dist/modules/inbound-secrets/inbound-secrets.service.d.ts +0 -17
  591. package/dist/modules/inbound-secrets/inbound-secrets.service.js.map +0 -1
  592. package/dist/modules/inbound-secrets/path-traversal.js.map +0 -1
  593. package/dist/modules/instance-ai/compaction.service.d.ts +0 -24
  594. package/dist/modules/instance-ai/compaction.service.js +0 -213
  595. package/dist/modules/instance-ai/compaction.service.js.map +0 -1
  596. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +0 -33
  597. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +0 -145
  598. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +0 -1
  599. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +0 -8
  600. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +0 -1
  601. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +0 -5
  602. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +0 -1
  603. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +0 -5
  604. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +0 -1
  605. package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +0 -17
  606. package/dist/modules/instance-ai/snapshot-pruning.service.js +0 -89
  607. package/dist/modules/instance-ai/snapshot-pruning.service.js.map +0 -1
  608. package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +0 -9
  609. package/dist/modules/instance-ai/storage/typeorm-composite-store.js +0 -33
  610. package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +0 -1
  611. package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +0 -96
  612. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +0 -864
  613. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +0 -1
  614. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +0 -44
  615. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +0 -156
  616. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +0 -1
  617. package/dist/scaling/multi-main-setup-legacy.d.ts +0 -25
  618. package/dist/scaling/multi-main-setup-legacy.js +0 -75
  619. package/dist/scaling/multi-main-setup-legacy.js.map +0 -1
  620. package/dist/scaling/multi-main-setup-v2.d.ts +0 -25
  621. package/dist/scaling/multi-main-setup-v2.js +0 -143
  622. package/dist/scaling/multi-main-setup-v2.js.map +0 -1
  623. package/dist/scaling/multi-main-setup.types.d.ts +0 -6
  624. package/dist/scaling/multi-main-setup.types.js.map +0 -1
  625. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.d.ts +0 -0
  626. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.js +0 -0
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfigMutationPrompt = getConfigMutationPrompt;
4
+ const config_rules_prompt_1 = require("./config-rules.prompt");
5
+ function getConfigMutationPrompt() {
6
+ return `\
7
+ ## Config Mutation Guidance
8
+
9
+ ### Purpose
10
+
11
+ Use this after deciding a config change is needed and before calling
12
+ \`read_config\`, \`write_config\`, or \`patch_config\`.
13
+
14
+ ### Workflow
15
+
16
+ 1. Call \`read_config\` immediately before every \`write_config\` or \`patch_config\`.
17
+ 2. Use only the \`config\` and \`configHash\` returned by that same \`read_config\`.
18
+ 3. For \`write_config\`, send the complete config JSON string plus \`baseConfigHash\`.
19
+ 4. For \`patch_config\`, send RFC 6902 operations as a JSON string plus \`baseConfigHash\`.
20
+ 5. Use JSON Pointer paths like \`/field\`, \`/nested/field\`, \`/array/0\`, and \`/array/-\`.
21
+ 6. On \`stage: "stale"\`, retry once from the returned \`config\` and \`configHash\`.
22
+ 7. On parse, patch, or schema errors, fix the payload, call \`read_config\`
23
+ again, and retry from the fresh \`configHash\`.
24
+
25
+ ### Rules
26
+
27
+ ${(0, config_rules_prompt_1.getConfigRulesSection)()}
28
+
29
+ ${(0, config_rules_prompt_1.getSchemaReferenceSection)()}
30
+
31
+ - Follow the Config schema reference exactly; do not invent top-level fields.
32
+ - Keep each feature in the schema path where it belongs.
33
+ - Preserve unrelated existing config unless the user asked to change it.
34
+ - Never write placeholder instructions.
35
+ - Never copy credential IDs from \`list_credentials\`; use \`resolve_llm\`, \`ask_llm\`, or \`ask_credential\`.
36
+ - Valid provider tool keys are complete provider tool IDs documented in the Tool Guidance section.
37
+ - \`providerTools\` keys must be complete provider tool IDs from the valid key list.
38
+
39
+ ### Recipes
40
+
41
+ #### Create Or Replace A Fresh Runnable Agent
42
+
43
+ - Requires \`name\`, \`model\`, \`credential\`, and \`instructions\`.
44
+ - Keep \`tools\` and \`skills\` arrays if present.
45
+
46
+ Good minimal shape:
47
+ \`\`\`json
48
+ {
49
+ "name": "Support assistant",
50
+ "model": "openrouter/openai/gpt-5.5",
51
+ "credential": "<main-llm-credential-id>",
52
+ "instructions": "Help the user with support questions.",
53
+ "tools": [],
54
+ "skills": []
55
+ }
56
+ \`\`\`
57
+
58
+ #### Update Only Instructions
59
+
60
+ Use \`patch_config\` with:
61
+ \`\`\`json
62
+ [{ "op": "replace", "path": "/instructions", "value": "New instructions" }]
63
+ \`\`\`
64
+
65
+ #### Add A Target-Agent Skill Ref
66
+
67
+ - If \`skills\` exists, append to \`/skills/-\`.
68
+ - If \`skills\` is missing, add \`/skills\` with an array.
69
+ - Ref shape: \`{ "type": "skill", "id": "<returned-id>" }\`.
70
+
71
+ #### Configure Native Provider Features
72
+
73
+ - Thinking lives under \`config.thinking\`.
74
+ - The write path fills native provider tool defaults. Do not invent provider tool keys.
75
+
76
+ #### Configure Fallback Services
77
+
78
+ - Services that require credentials must call \`ask_credential\` first.
79
+ - Persist only the credential id returned by \`ask_credential\`.
80
+ - If credential selection is skipped, do not enable the feature unless it supports missing credentials.
81
+
82
+ #### Add Node Or Workflow Tools
83
+
84
+ - Node and workflow tools live in \`tools[]\`.
85
+ - Use Tool Guidance for node/workflow details.
86
+ - Do not mix node tool config into \`config.*\` fields.
87
+
88
+ ### Do Not Do This
89
+
90
+ Bad: inventing top-level fields
91
+ \`\`\`json
92
+ { "temperature": 0.7 }
93
+ \`\`\`
94
+
95
+ Bad: provider namespace as provider tool
96
+ \`\`\`json
97
+ { "providerTools": { "anthropic": {} } }
98
+ \`\`\`
99
+
100
+ Bad: copying credential IDs from \`list_credentials\`
101
+ \`\`\`json
102
+ { "credential": "<id-from-list_credentials>" }
103
+ \`\`\`
104
+
105
+ Bad: replacing \`config\` while dropping unrelated settings
106
+ \`\`\`json
107
+ { "config": { "thinking": { "provider": "anthropic", "budgetTokens": 1024 } } }
108
+ \`\`\`
109
+
110
+ ### Gotchas
111
+
112
+ - \`write_config\` replaces the full config; include every field that should survive.
113
+ - \`patch_config\` cannot create a config when none exists; use \`write_config\` first.
114
+ - \`/array/-\` appends to an array; \`/array/0\` inserts before the current first item.
115
+ - Empty, placeholder, or guessed \`instructions\` are rejected; ask for details instead.
116
+
117
+ ### Verify
118
+
119
+ - The final payload validates against the Config schema reference.
120
+ - Existing unrelated config, tools, skills, integrations, and memory remain present unless intentionally changed.
121
+ - Credential fields use ids returned by the correct interactive credential tools.
122
+ - Provider tool keys are valid and match the selected model provider.
123
+
124
+ ### Error Recovery
125
+
126
+ - \`stage: "stale"\`: retry once from the returned \`config\` and \`configHash\`.
127
+ - \`stage: "parse"\`: fix JSON syntax, then call \`read_config\` before retrying.
128
+ - \`stage: "patch"\`: fix JSON Pointer paths or operation shape, then call \`read_config\` before retrying.
129
+ - \`stage: "schema"\`: compare the payload against the Config schema reference, then call \`read_config\` before retrying.
130
+ - \`ask_credential\` skipped: omit or disable the feature that required it.`;
131
+ }
132
+ //# sourceMappingURL=config-mutation.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-mutation.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-mutation.prompt.ts"],"names":[],"mappings":";;AAEA,0DA8HC;AAhID,+DAAyF;AAEzF,SAAgB,uBAAuB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;EAqBN,IAAA,2CAAqB,GAAE;;EAEvB,IAAA,+CAAyB,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAqG+C,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function getConfigRulesSection(): string;
2
+ export declare function getSchemaReferenceSection(): string;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfigRulesSection = getConfigRulesSection;
4
+ exports.getSchemaReferenceSection = getSchemaReferenceSection;
5
+ const zod_1 = require("zod");
6
+ const zod_to_json_schema_1 = require("zod-to-json-schema");
7
+ const api_types_1 = require("@n8n/api-types");
8
+ const schema_text_serializer_1 = require("../../json-config/schema-text-serializer");
9
+ const BuilderPromptMemoryConfigSchema = zod_1.z.object({
10
+ enabled: zod_1.z.boolean(),
11
+ storage: zod_1.z.literal('n8n'),
12
+ lastMessages: zod_1.z.number().int().min(1).max(200).optional(),
13
+ observationalMemory: zod_1.z
14
+ .object({
15
+ enabled: zod_1.z.boolean().optional(),
16
+ observerThresholdTokens: zod_1.z.number().int().min(1).optional(),
17
+ reflectorThresholdTokens: zod_1.z.number().int().min(1).optional(),
18
+ renderTokenBudget: zod_1.z.number().int().min(1).optional(),
19
+ observationLogTailLimit: zod_1.z.number().int().min(1).optional(),
20
+ lockTtlMs: zod_1.z.number().int().min(0).optional(),
21
+ })
22
+ .optional(),
23
+ episodicMemory: zod_1.z
24
+ .discriminatedUnion('enabled', [
25
+ zod_1.z.object({ enabled: zod_1.z.literal(false) }),
26
+ zod_1.z.object({
27
+ enabled: zod_1.z.literal(true),
28
+ credential: zod_1.z.string().min(1),
29
+ topK: zod_1.z.number().int().min(1).max(100).optional(),
30
+ maxEntriesPerRun: zod_1.z.number().int().min(1).max(50).optional(),
31
+ }),
32
+ ])
33
+ .optional(),
34
+ });
35
+ const BuilderPromptAgentJsonConfigSchema = api_types_1.RunnableAgentJsonConfigSchema.extend({
36
+ memory: BuilderPromptMemoryConfigSchema.optional(),
37
+ });
38
+ function getConfigRulesSection() {
39
+ return `\
40
+ #### Agent Config Rules
41
+
42
+ - \`model\` must be "provider/model-name".
43
+ - \`credential\` must be the id returned by \`resolve_llm\` or \`ask_llm\`.
44
+ - Fresh agents must include
45
+ \`memory: { "enabled": true, "storage": "n8n", "lastMessages": 50 }\`
46
+ unless the user explicitly asks to disable memory.
47
+ - \`memory.storage\` must be "n8n"; \`memory.lastMessages\` defaults to 50.
48
+ - \`memory.episodicMemory\` requires \`ask_credential\` with
49
+ \`credentialType: "openAiApi"\`.
50
+ - \`config.maxIterations\` caps the number of agent loop iterations per run. Do not set or change this unless the user explicitly asks.
51
+ - Fresh agents need a real model, credential, and instructions before config
52
+ is written.`;
53
+ }
54
+ function getSchemaReferenceSection() {
55
+ const jsonSchemaText = (0, schema_text_serializer_1.jsonSchemaToCompactText)((0, zod_to_json_schema_1.zodToJsonSchema)(BuilderPromptAgentJsonConfigSchema));
56
+ return `\
57
+ #### Config Schema Reference
58
+
59
+ \`\`\`text
60
+ ${jsonSchemaText}
61
+ \`\`\``;
62
+ }
63
+ //# sourceMappingURL=config-rules.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-rules.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-rules.prompt.ts"],"names":[],"mappings":";;AAuCA,sDAeC;AAED,8DAUC;AAjED,6BAAwB;AACxB,2DAAqD;AAErD,8CAA+D;AAE/D,qFAAmF;AAEnF,MAAM,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACzD,mBAAmB,EAAE,OAAC;SACpB,MAAM,CAAC;QACP,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC/B,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3D,wBAAwB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC5D,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACrD,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3D,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC7C,CAAC;SACD,QAAQ,EAAE;IACZ,cAAc,EAAE,OAAC;SACf,kBAAkB,CAAC,SAAS,EAAE;QAC9B,OAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,OAAC,CAAC,MAAM,CAAC;YACR,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;YACxB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACjD,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SAC5D,CAAC;KACF,CAAC;SACD,QAAQ,EAAE;CACZ,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,yCAA6B,CAAC,MAAM,CAAC;IAC/E,MAAM,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEH,SAAgB,qBAAqB;IACpC,OAAO;;;;;;;;;;;;;cAaM,CAAC;AACf,CAAC;AAED,SAAgB,yBAAyB;IACxC,MAAM,cAAc,GAAG,IAAA,gDAAuB,EAC7C,IAAA,oCAAe,EAAC,kCAAkC,CAAgB,CAClE,CAAC;IACF,OAAO;;;;EAIN,cAAc;OACT,CAAC;AACR,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function getLlmSelectionPrompt(modelRecommendationsSection: string | null): string;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getLlmSelectionPrompt = getLlmSelectionPrompt;
4
+ function getLlmSelectionPrompt(modelRecommendationsSection) {
5
+ const recommendationGuidance = modelRecommendationsSection
6
+ ? `\n\n${modelRecommendationsSection}`
7
+ : '\n\nNo Recommended LLM models section is available; do not recommend or name current, best, latest, or fallback model IDs from memory. Call ask_llm when the user needs model guidance or choice.';
8
+ return `\
9
+ ## LLM Selection Guidance
10
+
11
+ ### Purpose
12
+
13
+ Use this to resolve the target agent's main \`model\` and \`credential\`.
14
+
15
+ ### Workflow
16
+
17
+ 1. Use \`resolve_llm\` before \`ask_llm\` when the request contains enough provider/model detail.
18
+ 2. If \`resolve_llm\` succeeds, persist \`model = "{provider}/{model}"\` and \`credential = credentialId\`.
19
+ 3. If the user asks to pick, change, confirm, or configure a model or main credential, call \`ask_llm\`; do not ask in prose.
20
+ 4. If \`resolve_llm\` reports missing or ambiguous credentials/provider, call \`ask_llm\`.
21
+ 5. If \`resolve_llm\` reports \`unknown_model\`, retry with a plausible returned model value or call \`ask_llm\`.
22
+
23
+ ### Rules
24
+
25
+ - Fresh agents need a resolved \`model\` and \`credential\` before config is written.
26
+ - Explicit provider/model requests go to \`resolve_llm\` first.
27
+ - If the user asks to pick, change, confirm, or configure a model or main credential, call \`ask_llm\`; do not ask in prose.
28
+ - If \`resolve_llm\` succeeds, persist \`model = "{provider}/{model}"\` and \`credential = credentialId\`.
29
+ - If \`resolve_llm\` reports missing or ambiguous credentials/provider, call \`ask_llm\`.
30
+ - If it reports \`unknown_model\`, retry with a plausible returned model value or call \`ask_llm\`.
31
+ - For "Anthropic via OpenRouter", pass \`provider: "openrouter"\`; if the user names a routed model, pass the routed id without adding another provider prefix.
32
+ - Prefer a provider the user already has credentials for when choosing from recommendations.
33
+ - Never copy main LLM credential IDs from \`list_credentials\`.
34
+
35
+ ### Gotchas
36
+
37
+ - Use \`resolve_llm\` or \`ask_llm\` only for the target agent's main model credential.
38
+ - Use \`ask_credential\` for node tools, integrations, and Episodic Memory.
39
+ - For OpenRouter, \`provider\` is \`"openrouter"\`; the model can be a routed id such as \`anthropic/...\`.
40
+ - Do not recommend current, best, latest, or fallback model IDs from memory when the recommendation catalog is unavailable.
41
+
42
+ ### Verify
43
+
44
+ - The persisted \`model\` is in \`provider/model\` form.
45
+ - The persisted \`credential\` came from \`resolve_llm\` or \`ask_llm\`.${recommendationGuidance}`;
46
+ }
47
+ //# sourceMappingURL=llm-selection.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llm-selection.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/llm-selection.prompt.ts"],"names":[],"mappings":";;AAAA,sDA2CC;AA3CD,SAAgB,qBAAqB,CAAC,2BAA0C;IAC/E,MAAM,sBAAsB,GAAG,2BAA2B;QACzD,CAAC,CAAC,OAAO,2BAA2B,EAAE;QACtC,CAAC,CAAC,mMAAmM,CAAC;IAEvM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAqCkE,sBAAsB,EAAE,CAAC;AACnG,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const MEMORY_PROMPT = "## Memory Guidance\n\n### Purpose\n\nUse this to configure the target agent's memory behavior.\n\n### Workflow\n\nFresh agents must include this default memory config unless the user explicitly asks to disable or change memory:\n```json\n{\n \"enabled\": true,\n \"storage\": \"n8n\",\n \"lastMessages\": 50,\n \"observationalMemory\": {\n \"enabled\": true\n }\n}\n```\n\nThis is the configurable agent's session memory. The runtime-managed\n`observationalMemory` settings tune that memory behavior; they are not a\nseparate user-facing memory product.\n\n### Rules\n\n- When creating a new agent, always write the exact default `memory` object above.\n- Set `storage` to \"n8n\".\n- `lastMessages` defaults to 50.\n- Set `observationalMemory.enabled` to `true` for new agents unless the user explicitly asks to disable observational memory.\n- Keep the rest of `observationalMemory` optional; add tuning fields only for explicit tuning or disabling.\n- Supported observational memory tuning fields: `enabled`, `observerThresholdTokens`, `reflectorThresholdTokens`, `renderTokenBudget`, `observationLogTailLimit`, and `lockTtlMs`.\n\n### Episodic Memory\n\n- Enable `memory.episodicMemory` only when the user asks for Episodic Memory, long-term memory, prior conversations, remembered decisions, exact artifacts, or cross-session memory.\n- Before enabling it, call `ask_credential({ credentialType: \"openAiApi\", purpose: \"OpenAI credential for Episodic Memory embeddings\" })`.\n- On success, set `memory.episodicMemory = { \"enabled\": true, \"credential\": \"<credentialId>\" }` and preserve existing `topK` or `maxEntriesPerRun`.\n- If credential selection is skipped, do not enable Episodic Memory; explain that it needs an OpenAI credential for embeddings.\n- Do not add instructions saying the agent should remember, store, save, or decide what context matters. The runtime handles memory extraction and indexing.\n- If instructions mention Episodic Memory, phrase it as retrieval/use only, e.g. \"Use recalled prior context when relevant to the user's request.\"\n- Do not invent Episodic Memory credential IDs or reuse the main model credential unless `ask_credential` returned it for this purpose.\n\n### Gotchas\n\n- Session memory and Episodic Memory are different features; do not use one as a substitute for the other.\n- Observational memory is runtime-managed session memory behavior; do not add target-agent instructions telling it how to save observations.\n- A skipped Episodic Memory credential means Episodic Memory stays disabled.\n\n### Verify\n\n- Fresh runnable agents have enabled n8n memory unless explicitly disabled.\n- Fresh runnable agents set `observationalMemory.enabled` to `true` unless explicitly disabled.\n- Episodic Memory has an OpenAI credential returned by `ask_credential`.\n- Existing memory tuning is preserved unless the user asked to change it.";
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MEMORY_PROMPT = void 0;
4
+ exports.MEMORY_PROMPT = `\
5
+ ## Memory Guidance
6
+
7
+ ### Purpose
8
+
9
+ Use this to configure the target agent's memory behavior.
10
+
11
+ ### Workflow
12
+
13
+ Fresh agents must include this default memory config unless the user explicitly asks to disable or change memory:
14
+ \`\`\`json
15
+ {
16
+ "enabled": true,
17
+ "storage": "n8n",
18
+ "lastMessages": 50,
19
+ "observationalMemory": {
20
+ "enabled": true
21
+ }
22
+ }
23
+ \`\`\`
24
+
25
+ This is the configurable agent's session memory. The runtime-managed
26
+ \`observationalMemory\` settings tune that memory behavior; they are not a
27
+ separate user-facing memory product.
28
+
29
+ ### Rules
30
+
31
+ - When creating a new agent, always write the exact default \`memory\` object above.
32
+ - Set \`storage\` to "n8n".
33
+ - \`lastMessages\` defaults to 50.
34
+ - Set \`observationalMemory.enabled\` to \`true\` for new agents unless the user explicitly asks to disable observational memory.
35
+ - Keep the rest of \`observationalMemory\` optional; add tuning fields only for explicit tuning or disabling.
36
+ - Supported observational memory tuning fields: \`enabled\`, \`observerThresholdTokens\`, \`reflectorThresholdTokens\`, \`renderTokenBudget\`, \`observationLogTailLimit\`, and \`lockTtlMs\`.
37
+
38
+ ### Episodic Memory
39
+
40
+ - Enable \`memory.episodicMemory\` only when the user asks for Episodic Memory, long-term memory, prior conversations, remembered decisions, exact artifacts, or cross-session memory.
41
+ - Before enabling it, call \`ask_credential({ credentialType: "openAiApi", purpose: "OpenAI credential for Episodic Memory embeddings" })\`.
42
+ - On success, set \`memory.episodicMemory = { "enabled": true, "credential": "<credentialId>" }\` and preserve existing \`topK\` or \`maxEntriesPerRun\`.
43
+ - If credential selection is skipped, do not enable Episodic Memory; explain that it needs an OpenAI credential for embeddings.
44
+ - Do not add instructions saying the agent should remember, store, save, or decide what context matters. The runtime handles memory extraction and indexing.
45
+ - If instructions mention Episodic Memory, phrase it as retrieval/use only, e.g. "Use recalled prior context when relevant to the user's request."
46
+ - Do not invent Episodic Memory credential IDs or reuse the main model credential unless \`ask_credential\` returned it for this purpose.
47
+
48
+ ### Gotchas
49
+
50
+ - Session memory and Episodic Memory are different features; do not use one as a substitute for the other.
51
+ - Observational memory is runtime-managed session memory behavior; do not add target-agent instructions telling it how to save observations.
52
+ - A skipped Episodic Memory credential means Episodic Memory stays disabled.
53
+
54
+ ### Verify
55
+
56
+ - Fresh runnable agents have enabled n8n memory unless explicitly disabled.
57
+ - Fresh runnable agents set \`observationalMemory.enabled\` to \`true\` unless explicitly disabled.
58
+ - Episodic Memory has an OpenAI credential returned by \`ask_credential\`.
59
+ - Existing memory tuning is preserved unless the user asked to change it.`;
60
+ //# sourceMappingURL=memory.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/memory.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAuD6C,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const TOOLS_PROMPT = "## Tool Guidance\n\n### Purpose\n\nUse this to give the target agent callable capabilities through workflows,\nnodes, custom code tools, or provider tools.\n\n### Workflow\n\nUse this guidance before calling `search_nodes`, `get_node_types`, `build_custom_tool`,\nor adding, changing, or removing entries in `tools[]` / `providerTools`.\n\nPrefer existing workflow tools and node tools over custom tools for real-world actions.\nCustom tools are for pure computation, validation, formatting, or planning logic;\nthey cannot perform live network, filesystem, process, timer, or host I/O.\n\n#### Workflow Tools\n\n- Call `list_workflows`; reference supported workflows by name with `{ \"type\": \"workflow\", \"workflow\": \"<name>\" }`.\n\n#### Node Tools\n\n- Use `search_nodes`, then `get_node_types`; never guess node type names.\n- Use the tool node id from discovery, usually ending in `Tool`.\n- Put fixed values in `nodeParameters`; use complete n8n expressions for values the agent should decide at runtime:\n `={{ $fromAI('url', 'The URL to inspect', 'string') }}`.\n- Never write literal `\"$fromAI\"` or bare `$fromAI`; the node will treat it as the actual value.\n- Do not pipe AI-chosen fields through `$json`.\n- Do not include `inputSchema` or `toolDescription` for node tools.\n- For each required credential slot, call `ask_credential` once before config mutation. If skipped, still add the tool and omit only that credential slot.\n\n#### Custom Tools\n\n- Use `build_custom_tool` with `export default new Tool(...)` and imports only from `@n8n/agents` and `zod`.\n- Do not use custom tools for live website crawling, HTTP fetching, API calls, SEO crawlers, or scraping. Use workflow or node tools for those.\n- Register the returned custom tool id in config after `build_custom_tool`.\n- Custom handlers are pure functions: take validated `input`, compute, and return a JSON-serializable value. Do not call `.build()`.\n- Follow this pattern:\n```typescript\nimport { Tool } from '@n8n/agents';\nimport { z } from 'zod';\n\nexport default new Tool('tool_name')\n .description('What the tool does')\n .input(z.object({ query: z.string() }))\n .handler(async ({ query }, ctx) => {\n return { result: query.toUpperCase() };\n });\n```\n- Custom handlers run in a V8 isolate. No network, filesystem, process, Buffer, fetch, timers, wall-clock waiting, or host I/O.\n- Some globals may exist as stubs: `setTimeout` fires synchronously, `console.log` goes nowhere, and `TextEncoder.encode` returns its input unchanged.\n- Safe globals include `Math`, `Date`, `JSON`, `RegExp`, `Array`, `Object`, `Map`, `Set`, `Promise`, typed arrays, and methods on provided values.\n- The handler receives `(input, ctx)`; `ctx.suspend(payload)` pauses for human-in-the-loop flows. Ignore `ctx` otherwise.\n- Execution is capped at 5 seconds and about 32 MB memory. If runtime fails, fix the code from the returned error and call `build_custom_tool` again.\n\n#### Provider Tools\n\n- Match provider tools to the configured model provider.\n- Anthropic: `providerTools[\"anthropic.web_search\"]`.\n- OpenAI: `providerTools[\"openai.web_search\"]` or `providerTools[\"openai.image_generation\"]`, only for compatible OpenAI models.\n\n### Gotchas\n\n- Live crawling, fetching, and API integrations need workflow or node tools, not custom tools.\n- Do not include `inputSchema` or `toolDescription` for node tools.\n- `$fromAI(...)` placeholders define the node tool input schema; do not add it manually.\n- Do not invent node type names, workflow names, credential ids, or provider tool keys.\n- If a required node-tool credential is skipped, add the tool and omit only that credential slot.\n- `build_custom_tool` stores code only; the config still needs a `{ \"type\": \"custom\", \"id\": \"<returned id>\" }` tool ref.\n\n### Verify\n\n- Workflow tools reference discovered workflow names.\n- Node tools use discovered tool node ids and valid node parameters.\n- Custom tools return a stored custom tool id that is registered in config.\n- Provider tool keys match the configured model provider and the valid key list.";
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TOOLS_PROMPT = void 0;
4
+ exports.TOOLS_PROMPT = `\
5
+ ## Tool Guidance
6
+
7
+ ### Purpose
8
+
9
+ Use this to give the target agent callable capabilities through workflows,
10
+ nodes, custom code tools, or provider tools.
11
+
12
+ ### Workflow
13
+
14
+ Use this guidance before calling \`search_nodes\`, \`get_node_types\`, \`build_custom_tool\`,
15
+ or adding, changing, or removing entries in \`tools[]\` / \`providerTools\`.
16
+
17
+ Prefer existing workflow tools and node tools over custom tools for real-world actions.
18
+ Custom tools are for pure computation, validation, formatting, or planning logic;
19
+ they cannot perform live network, filesystem, process, timer, or host I/O.
20
+
21
+ #### Workflow Tools
22
+
23
+ - Call \`list_workflows\`; reference supported workflows by name with \`{ "type": "workflow", "workflow": "<name>" }\`.
24
+
25
+ #### Node Tools
26
+
27
+ - Use \`search_nodes\`, then \`get_node_types\`; never guess node type names.
28
+ - Use the tool node id from discovery, usually ending in \`Tool\`.
29
+ - Put fixed values in \`nodeParameters\`; use complete n8n expressions for values the agent should decide at runtime:
30
+ \`={{ $fromAI('url', 'The URL to inspect', 'string') }}\`.
31
+ - Never write literal \`"$fromAI"\` or bare \`$fromAI\`; the node will treat it as the actual value.
32
+ - Do not pipe AI-chosen fields through \`$json\`.
33
+ - Do not include \`inputSchema\` or \`toolDescription\` for node tools.
34
+ - For each required credential slot, call \`ask_credential\` once before config mutation. If skipped, still add the tool and omit only that credential slot.
35
+
36
+ #### Custom Tools
37
+
38
+ - Use \`build_custom_tool\` with \`export default new Tool(...)\` and imports only from \`@n8n/agents\` and \`zod\`.
39
+ - Do not use custom tools for live website crawling, HTTP fetching, API calls, SEO crawlers, or scraping. Use workflow or node tools for those.
40
+ - Register the returned custom tool id in config after \`build_custom_tool\`.
41
+ - Custom handlers are pure functions: take validated \`input\`, compute, and return a JSON-serializable value. Do not call \`.build()\`.
42
+ - Follow this pattern:
43
+ \`\`\`typescript
44
+ import { Tool } from '@n8n/agents';
45
+ import { z } from 'zod';
46
+
47
+ export default new Tool('tool_name')
48
+ .description('What the tool does')
49
+ .input(z.object({ query: z.string() }))
50
+ .handler(async ({ query }, ctx) => {
51
+ return { result: query.toUpperCase() };
52
+ });
53
+ \`\`\`
54
+ - Custom handlers run in a V8 isolate. No network, filesystem, process, Buffer, fetch, timers, wall-clock waiting, or host I/O.
55
+ - Some globals may exist as stubs: \`setTimeout\` fires synchronously, \`console.log\` goes nowhere, and \`TextEncoder.encode\` returns its input unchanged.
56
+ - Safe globals include \`Math\`, \`Date\`, \`JSON\`, \`RegExp\`, \`Array\`, \`Object\`, \`Map\`, \`Set\`, \`Promise\`, typed arrays, and methods on provided values.
57
+ - The handler receives \`(input, ctx)\`; \`ctx.suspend(payload)\` pauses for human-in-the-loop flows. Ignore \`ctx\` otherwise.
58
+ - Execution is capped at 5 seconds and about 32 MB memory. If runtime fails, fix the code from the returned error and call \`build_custom_tool\` again.
59
+
60
+ #### Provider Tools
61
+
62
+ - Match provider tools to the configured model provider.
63
+ - Anthropic: \`providerTools["anthropic.web_search"]\`.
64
+ - OpenAI: \`providerTools["openai.web_search"]\` or \`providerTools["openai.image_generation"]\`, only for compatible OpenAI models.
65
+
66
+ ### Gotchas
67
+
68
+ - Live crawling, fetching, and API integrations need workflow or node tools, not custom tools.
69
+ - Do not include \`inputSchema\` or \`toolDescription\` for node tools.
70
+ - \`$fromAI(...)\` placeholders define the node tool input schema; do not add it manually.
71
+ - Do not invent node type names, workflow names, credential ids, or provider tool keys.
72
+ - If a required node-tool credential is skipped, add the tool and omit only that credential slot.
73
+ - \`build_custom_tool\` stores code only; the config still needs a \`{ "type": "custom", "id": "<returned id>" }\` tool ref.
74
+
75
+ ### Verify
76
+
77
+ - Workflow tools reference discovered workflow names.
78
+ - Node tools use discovered tool node ids and valid node parameters.
79
+ - Custom tools return a stored custom tool id that is registered in config.
80
+ - Provider tool keys match the configured model provider and the valid key list.`;
81
+ //# sourceMappingURL=tools.prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/tools.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFA4EqD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { RuntimeSkill } from '@n8n/agents';
2
+ export declare function getBuilderRuntimeSkills(): RuntimeSkill[];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBuilderRuntimeSkills = getBuilderRuntimeSkills;
4
+ const integrations_skill_1 = require("./integrations.skill");
5
+ const target_skills_skill_1 = require("./target-skills.skill");
6
+ function getBuilderRuntimeSkills() {
7
+ return [
8
+ (0, integrations_skill_1.integrationsSkill)(),
9
+ (0, target_skills_skill_1.targetSkillsSkill)(),
10
+ ];
11
+ }
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/index.ts"],"names":[],"mappings":";;AAKA,0DASC;AAZD,6DAAyD;AACzD,+DAA0D;AAE1D,SAAgB,uBAAuB;IACtC,OAAO;QACN,IAAA,sCAAiB,GAAE;QACnB,IAAA,uCAAiB,GAAE;KAKnB,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { RuntimeSkill } from '@n8n/agents';
2
+ export declare function integrationsSkill(): RuntimeSkill;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.integrationsSkill = integrationsSkill;
4
+ function integrationsSkill() {
5
+ return {
6
+ id: 'agent-builder-integrations',
7
+ name: 'Agent Builder Integrations',
8
+ description: 'Use when adding or changing target-agent schedule triggers or connected external chat-platform integrations; not for built-in Build chat or Preview chat behavior.',
9
+ instructions: `\
10
+ ## Purpose
11
+
12
+ Use this to configure entries in the target agent's \`integrations\` array.
13
+
14
+ ## Boundaries
15
+
16
+ - The user is asking for Build chat or Preview chat behavior.
17
+ - The user wants an agent tool that sends messages; follow the Tool Guidance section instead.
18
+ - The user only needs model, memory, or config-schema guidance.
19
+ - Built-in Preview chat does not need an \`integrations\` entry.
20
+
21
+ ## Workflow
22
+
23
+ The \`integrations\` array controls how the target agent is triggered.
24
+
25
+ ### Schedule
26
+
27
+ - One schedule integration per agent.
28
+ - Use \`{ "type": "schedule", "active": false, "cronExpression": "0 9 * * *", "wakeUpPrompt": "..." }\`.
29
+ - Keep \`active: false\`; schedules run only after publish and activation.
30
+ - Use standard 5-field cron.
31
+
32
+ ### Chat Integrations
33
+
34
+ - These are connected external chat platforms, not built-in Preview chat.
35
+ - Call \`list_integration_types\` first.
36
+ - Pick one returned \`credentialTypes\` entry and pass it to \`ask_credential\`.
37
+ - Persist only \`type\` and \`credentialId\`; never invent credential IDs or names.
38
+ - Preserve existing schedule and chat integrations unless the user asked to remove them.
39
+
40
+ ## Gotchas
41
+
42
+ - Active schedules are rejected until the agent is published; create or update schedules as inactive.
43
+ - The schedule \`wakeUpPrompt\` is the message sent when the schedule fires, not target-agent system instructions.
44
+ - Chat integration credential types must come from \`list_integration_types\`.
45
+
46
+ ## Verify
47
+
48
+ - Schedule configs include \`type\`, \`active\`, \`cronExpression\`, and \`wakeUpPrompt\`.
49
+ - Connected chat integrations use a credential id returned by \`ask_credential\`.
50
+ - The final \`integrations\` array keeps unrelated integrations intact.`,
51
+ };
52
+ }
53
+ //# sourceMappingURL=integrations.skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"integrations.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/integrations.skill.ts"],"names":[],"mappings":";;AAEA,8CAiDC;AAjDD,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,oKAAoK;QACrK,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAyCwD;KACtE,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { RuntimeSkill } from '@n8n/agents';
2
+ export declare function researchSkill(): RuntimeSkill;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.researchSkill = researchSkill;
4
+ function researchSkill() {
5
+ return {
6
+ id: 'agent-builder-research',
7
+ name: 'Agent Builder Research',
8
+ description: 'Use when current external API, service, product, standard, or spec facts affect target-agent config, tool choices, credential choices, or instructions; not for n8n internals, local schema, or builder tool contracts.',
9
+ instructions: `\
10
+ ## Purpose
11
+
12
+ Use this when external facts can change the target-agent build.
13
+
14
+ ## Boundaries
15
+
16
+ - You need n8n internals, local schema, or builder-tool guidance.
17
+ - The API or service is well known enough to configure confidently from current context.
18
+ - The user is asking for a general explanation that does not affect the target agent build.
19
+
20
+ ## Workflow
21
+
22
+ 1. Loading this skill is not research; when current external facts affect the
23
+ build, use the available research capability before relying on memory.
24
+ 2. Search only for the external facts that change the config or implementation choice.
25
+ 3. Prefer primary docs for endpoint, auth, product, or spec details.
26
+ 4. Apply only the verified details needed for the current target-agent build.
27
+ 5. If no research capability is available, say so instead of filling current facts from memory.
28
+
29
+ ## Gotchas
30
+
31
+ - Do not browse for n8n internals, common JavaScript or TypeScript patterns, or local schema facts.
32
+ - Do not let a web result override the target agent config schema or builder tool contracts.
33
+ - Do not substitute unsourced model memory for current external facts when the user asked for research.
34
+ - If research does not change the build, stop researching and continue from local context.
35
+
36
+ ## Verify
37
+
38
+ - Configuration choices that depend on external facts are source-backed.
39
+ - The final config still follows the local Config schema and credential rules.`,
40
+ };
41
+ }
42
+ //# sourceMappingURL=research.skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"research.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/research.skill.ts"],"names":[],"mappings":";;AAEA,sCAsCC;AAtCD,SAAgB,aAAa;IAC5B,OAAO;QACN,EAAE,EAAE,wBAAwB;QAC5B,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EACV,yNAAyN;QAC1N,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+EA8B+D;KAC7E,CAAC;AACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { RuntimeSkill } from '@n8n/agents';
2
+ export declare function targetSkillsSkill(): RuntimeSkill;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.targetSkillsSkill = targetSkillsSkill;
4
+ function targetSkillsSkill() {
5
+ return {
6
+ id: 'agent-builder-target-skills',
7
+ name: 'Agent Builder Target Skills',
8
+ description: 'Use when creating reusable target-agent skills, playbooks, policies, style guides, or domain instructions with create_skill that should load only for relevant future requests; not for builder guidance or one-off instructions.',
9
+ instructions: `\
10
+ ## Purpose
11
+
12
+ Use this to create reusable load-on-demand instructions for the target agent.
13
+
14
+ ## Boundaries
15
+
16
+ - The instruction is one-off and belongs directly in the target agent instructions.
17
+ - You need guidance for your own builder behavior.
18
+ - The user is asking to edit config, tools, integrations, memory, or model settings without a reusable target-agent skill.
19
+
20
+ ## Workflow
21
+
22
+ - Call \`create_skill\` with \`name\`, \`description\`, and \`body\`.
23
+ - Treat the description as the routing contract: it is what the runtime sees
24
+ before deciding whether to load the skill.
25
+ - Put all "when to use" and "when not to use" guidance in the description.
26
+ - The body is loaded only after the skill triggers, so it should be a compact
27
+ operating manual: purpose, workflow, rules, gotchas, and verification where
28
+ useful.
29
+ - Do not rely on a body "Use when" section for activation; include routing
30
+ guidance in \`description\`.
31
+ - \`create_skill\` stores the body only; it does not attach the skill.
32
+ - After it returns an id, call \`read_config\`.
33
+ - Use \`patch_config\` or \`write_config\` to add \`{ "type": "skill", "id": "<returned id>" }\` to \`skills\`.
34
+
35
+ ## Rules
36
+
37
+ - Write descriptions as intent-oriented "Use when..." guidance with concrete
38
+ triggers, contexts, and boundaries.
39
+ - Keep skill bodies narrow, operational, and verifiable.
40
+ - Do not rely on a body "Use when" section to trigger the skill; the body is
41
+ not visible until after the skill is selected.
42
+ - Include concrete gotchas that prevent predictable target-agent mistakes.
43
+ - Do not use \`create_skill\` for builder instructions. These skills belong to the target agent.
44
+
45
+ ## Gotchas
46
+
47
+ - \`create_skill\` does not attach the skill to the target agent config.
48
+ - A skill that is useful for every request probably belongs in instructions, not in \`skills\`.
49
+ - A vague description creates a vague skill, even if the body is excellent.
50
+ - Do not create placeholder or vague skills; ask for missing domain details first.
51
+
52
+ ## Verify
53
+
54
+ - The returned skill id is attached in config as \`{ "type": "skill", "id": "<returned id>" }\`.
55
+ - The skill description clearly states when it should load.
56
+ - The body tells the target agent what to do differently when the skill is loaded.`,
57
+ };
58
+ }
59
+ //# sourceMappingURL=target-skills.skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"target-skills.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/target-skills.skill.ts"],"names":[],"mappings":";;AAEA,8CAuDC;AAvDD,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,6BAA6B;QACjC,IAAI,EAAE,6BAA6B;QACnC,WAAW,EACV,mOAAmO;QACpO,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mFA+CmE;KACjF,CAAC;AACH,CAAC"}