@n8n/instance-ai 1.12.4 → 1.13.1

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 (253) hide show
  1. package/dist/agent/apply-agent-thinking.d.ts +2 -0
  2. package/dist/agent/apply-agent-thinking.js +41 -0
  3. package/dist/agent/apply-agent-thinking.js.map +1 -0
  4. package/dist/agent/instance-agent.js +10 -2
  5. package/dist/agent/instance-agent.js.map +1 -1
  6. package/dist/agent/sanitize-mcp-schemas.js +133 -125
  7. package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
  8. package/dist/agent/shared-prompts.d.ts +0 -1
  9. package/dist/agent/shared-prompts.js +4 -11
  10. package/dist/agent/shared-prompts.js.map +1 -1
  11. package/dist/agent/sub-agent-debriefing.d.ts +4 -4
  12. package/dist/agent/system-prompt.js +3 -10
  13. package/dist/agent/system-prompt.js.map +1 -1
  14. package/dist/build.tsbuildinfo +1 -1
  15. package/dist/debug/run-debug-buffer.d.ts +63 -0
  16. package/dist/debug/run-debug-buffer.js +177 -0
  17. package/dist/debug/run-debug-buffer.js.map +1 -0
  18. package/dist/debug/sanitize-debug-snapshot.d.ts +2 -0
  19. package/dist/debug/sanitize-debug-snapshot.js +88 -0
  20. package/dist/debug/sanitize-debug-snapshot.js.map +1 -0
  21. package/dist/error-formatting.js +3 -5
  22. package/dist/error-formatting.js.map +1 -1
  23. package/dist/index.d.ts +5 -2
  24. package/dist/index.js +8 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/knowledge-base/build-templates-index.d.ts +1 -0
  27. package/dist/knowledge-base/build-templates-index.js +18 -2
  28. package/dist/knowledge-base/build-templates-index.js.map +1 -1
  29. package/dist/knowledge-base/materialize-knowledge-base.d.ts +2 -3
  30. package/dist/knowledge-base/materialize-knowledge-base.js +10 -7
  31. package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -1
  32. package/dist/mcp/mcp-client-manager.d.ts +1 -1
  33. package/dist/mcp/mcp-client-manager.js +13 -9
  34. package/dist/mcp/mcp-client-manager.js.map +1 -1
  35. package/dist/runtime/memory-task-registry.d.ts +8 -0
  36. package/dist/runtime/memory-task-registry.js +42 -0
  37. package/dist/runtime/memory-task-registry.js.map +1 -0
  38. package/dist/runtime/resumable-stream-executor.d.ts +3 -0
  39. package/dist/runtime/resumable-stream-executor.js +171 -90
  40. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  41. package/dist/runtime/run-state-registry.d.ts +2 -0
  42. package/dist/runtime/run-state-registry.js +3 -0
  43. package/dist/runtime/run-state-registry.js.map +1 -1
  44. package/dist/runtime/stream-runner.d.ts +3 -0
  45. package/dist/runtime/stream-runner.js +3 -0
  46. package/dist/runtime/stream-runner.js.map +1 -1
  47. package/dist/skills/materialize-runtime-skills.d.ts +3 -3
  48. package/dist/skills/materialize-runtime-skills.js +1 -1
  49. package/dist/skills/materialize-runtime-skills.js.map +1 -1
  50. package/dist/source-map-filter.js +0 -1
  51. package/dist/source-map-filter.js.map +1 -1
  52. package/dist/storage/terminal-outcome-storage.d.ts +2 -2
  53. package/dist/storage/workflow-loop-storage.d.ts +75 -4
  54. package/dist/stream/map-chunk.js +198 -237
  55. package/dist/stream/map-chunk.js.map +1 -1
  56. package/dist/stream/output-redaction.js +2 -2
  57. package/dist/stream/output-redaction.js.map +1 -1
  58. package/dist/stream/usage-accumulator.d.ts +90 -0
  59. package/dist/stream/usage-accumulator.js +89 -0
  60. package/dist/stream/usage-accumulator.js.map +1 -0
  61. package/dist/stream/work-summary-accumulator.d.ts +6 -6
  62. package/dist/tools/attachments/parse-file.tool.js +1 -1
  63. package/dist/tools/attachments/parse-file.tool.js.map +1 -1
  64. package/dist/tools/credentials.tool.js +4 -1
  65. package/dist/tools/credentials.tool.js.map +1 -1
  66. package/dist/tools/data-tables.tool.js +5 -2
  67. package/dist/tools/data-tables.tool.js.map +1 -1
  68. package/dist/tools/evals/column-ref-utils.d.ts +1 -2
  69. package/dist/tools/evals/column-ref-utils.js +19 -18
  70. package/dist/tools/evals/column-ref-utils.js.map +1 -1
  71. package/dist/tools/evals/describe-metric-for-workflow.service.js +7 -25
  72. package/dist/tools/evals/describe-metric-for-workflow.service.js.map +1 -1
  73. package/dist/tools/evals/detect-tool-refs.service.js +2 -1
  74. package/dist/tools/evals/detect-tool-refs.service.js.map +1 -1
  75. package/dist/tools/evals/eval-data-requirements.service.js +10 -9
  76. package/dist/tools/evals/eval-data-requirements.service.js.map +1 -1
  77. package/dist/tools/evals/evals.tool.js +2 -2
  78. package/dist/tools/evals/evals.tool.js.map +1 -1
  79. package/dist/tools/evals/extract-rows-from-history.service.js +8 -8
  80. package/dist/tools/evals/extract-rows-from-history.service.js.map +1 -1
  81. package/dist/tools/evals/generate-sample-rows.service.d.ts +2 -2
  82. package/dist/tools/evals/generate-sample-rows.service.js +30 -49
  83. package/dist/tools/evals/generate-sample-rows.service.js.map +1 -1
  84. package/dist/tools/evals/generate-tool-ref-pin-data.service.js +10 -23
  85. package/dist/tools/evals/generate-tool-ref-pin-data.service.js.map +1 -1
  86. package/dist/tools/evals/metric-catalog.js +3 -3
  87. package/dist/tools/evals/metric-catalog.js.map +1 -1
  88. package/dist/tools/executions.tool.js +10 -2
  89. package/dist/tools/executions.tool.js.map +1 -1
  90. package/dist/tools/filesystem/create-tools-from-mcp-server.d.ts +1 -1
  91. package/dist/tools/filesystem/create-tools-from-mcp-server.js +8 -10
  92. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  93. package/dist/tools/index.js +1 -1
  94. package/dist/tools/index.js.map +1 -1
  95. package/dist/tools/nodes/node-search-engine.js +21 -42
  96. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  97. package/dist/tools/nodes/node-search-engine.types.d.ts +2 -0
  98. package/dist/tools/nodes/preferred-chat-model.d.ts +1 -0
  99. package/dist/tools/nodes/preferred-chat-model.js +19 -0
  100. package/dist/tools/nodes/preferred-chat-model.js.map +1 -0
  101. package/dist/tools/nodes/suggested-nodes-data.js +13 -3
  102. package/dist/tools/nodes/suggested-nodes-data.js.map +1 -1
  103. package/dist/tools/nodes.tool.js +32 -7
  104. package/dist/tools/nodes.tool.js.map +1 -1
  105. package/dist/tools/orchestration/complete-checkpoint.tool.js +3 -5
  106. package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
  107. package/dist/tools/orchestration/eval-data-agent.tool.js +2 -1
  108. package/dist/tools/orchestration/eval-data-agent.tool.js.map +1 -1
  109. package/dist/tools/orchestration/eval-setup-agent.prompt.d.ts +1 -1
  110. package/dist/tools/orchestration/eval-setup-agent.prompt.js +3 -3
  111. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +2 -2
  112. package/dist/tools/orchestration/report-verification-verdict.tool.js +1 -1
  113. package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
  114. package/dist/tools/orchestration/verify-built-workflow.tool.js +328 -315
  115. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  116. package/dist/tools/research.tool.js +1 -1
  117. package/dist/tools/research.tool.js.map +1 -1
  118. package/dist/tools/shared/ask-user.tool.d.ts +4 -4
  119. package/dist/tools/shared/ask-user.tool.js +6 -1
  120. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  121. package/dist/tools/tool-ids.d.ts +0 -1
  122. package/dist/tools/tool-ids.js +0 -1
  123. package/dist/tools/tool-ids.js.map +1 -1
  124. package/dist/tools/workflows/build-workflow.tool.d.ts +4 -22
  125. package/dist/tools/workflows/build-workflow.tool.js +374 -328
  126. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  127. package/dist/tools/workflows/classify-node-destructiveness.service.d.ts +7 -0
  128. package/dist/tools/workflows/classify-node-destructiveness.service.js +307 -0
  129. package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -0
  130. package/dist/tools/workflows/generate-simulation-fixtures.service.d.ts +8 -0
  131. package/dist/tools/workflows/generate-simulation-fixtures.service.js +95 -0
  132. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -0
  133. package/dist/tools/workflows/plan-verification-simulation.d.ts +16 -0
  134. package/dist/tools/workflows/plan-verification-simulation.js +76 -0
  135. package/dist/tools/workflows/plan-verification-simulation.js.map +1 -0
  136. package/dist/tools/workflows/resolve-credentials.d.ts +0 -2
  137. package/dist/tools/workflows/resolve-credentials.js +0 -13
  138. package/dist/tools/workflows/resolve-credentials.js.map +1 -1
  139. package/dist/tools/workflows/setup-workflow.service.js +259 -215
  140. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  141. package/dist/tools/workflows/validate-workflow.service.js +81 -66
  142. package/dist/tools/workflows/validate-workflow.service.js.map +1 -1
  143. package/dist/tools/workflows/workflow-build-context.d.ts +33 -0
  144. package/dist/tools/workflows/workflow-build-context.js +80 -0
  145. package/dist/tools/workflows/workflow-build-context.js.map +1 -0
  146. package/dist/tools/workflows/workflow-build-remediation.d.ts +11 -0
  147. package/dist/tools/workflows/workflow-build-remediation.js +89 -0
  148. package/dist/tools/workflows/workflow-build-remediation.js.map +1 -0
  149. package/dist/tools/workflows/workflow-build-reporting.d.ts +19 -0
  150. package/dist/tools/workflows/workflow-build-reporting.js +78 -0
  151. package/dist/tools/workflows/workflow-build-reporting.js.map +1 -0
  152. package/dist/tools/workflows/workflow-build-routing.d.ts +2 -0
  153. package/dist/tools/workflows/workflow-build-routing.js +60 -0
  154. package/dist/tools/workflows/workflow-build-routing.js.map +1 -0
  155. package/dist/tools/workflows/workflow-build-telemetry.d.ts +18 -0
  156. package/dist/tools/workflows/workflow-build-telemetry.js +33 -0
  157. package/dist/tools/workflows/workflow-build-telemetry.js.map +1 -0
  158. package/dist/tools/workflows/workflow-file-bindings.d.ts +28 -0
  159. package/dist/tools/workflows/workflow-file-bindings.js +104 -0
  160. package/dist/tools/workflows/workflow-file-bindings.js.map +1 -0
  161. package/dist/tools/workflows/workflow-json-utils.d.ts +3 -0
  162. package/dist/tools/workflows/workflow-json-utils.js +54 -5
  163. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  164. package/dist/tools/workflows/workflow-source-compiler.d.ts +20 -0
  165. package/dist/tools/workflows/workflow-source-compiler.js +236 -0
  166. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -0
  167. package/dist/tools/workflows/workflow-validation-warnings.d.ts +14 -0
  168. package/dist/tools/workflows/workflow-validation-warnings.js +28 -0
  169. package/dist/tools/workflows/workflow-validation-warnings.js.map +1 -0
  170. package/dist/tools/workflows.tool.js +107 -99
  171. package/dist/tools/workflows.tool.js.map +1 -1
  172. package/dist/tracing/langsmith-tracing.js +7 -7
  173. package/dist/tracing/langsmith-tracing.js.map +1 -1
  174. package/dist/tracing/trace-payloads.d.ts +2 -1
  175. package/dist/tracing/trace-payloads.js +152 -114
  176. package/dist/tracing/trace-payloads.js.map +1 -1
  177. package/dist/types.d.ts +24 -4
  178. package/dist/types.js.map +1 -1
  179. package/dist/utils/eval-agents.d.ts +0 -3
  180. package/dist/utils/eval-agents.js +3 -11
  181. package/dist/utils/eval-agents.js.map +1 -1
  182. package/dist/utils/generate-validated-json.d.ts +16 -0
  183. package/dist/utils/generate-validated-json.js +38 -0
  184. package/dist/utils/generate-validated-json.js.map +1 -0
  185. package/dist/utils/stream-helpers.d.ts +0 -1
  186. package/dist/utils/stream-helpers.js +5 -8
  187. package/dist/utils/stream-helpers.js.map +1 -1
  188. package/dist/workflow-builder/build-failure-tracker.js +25 -1
  189. package/dist/workflow-builder/build-failure-tracker.js.map +1 -1
  190. package/dist/workflow-builder/index.d.ts +0 -4
  191. package/dist/workflow-builder/index.js +1 -11
  192. package/dist/workflow-builder/index.js.map +1 -1
  193. package/dist/workflow-loop/guidance.js +14 -15
  194. package/dist/workflow-loop/guidance.js.map +1 -1
  195. package/dist/workflow-loop/runtime.js +1 -0
  196. package/dist/workflow-loop/runtime.js.map +1 -1
  197. package/dist/workflow-loop/setup-verification-policy.d.ts +8 -0
  198. package/dist/workflow-loop/setup-verification-policy.js +25 -0
  199. package/dist/workflow-loop/setup-verification-policy.js.map +1 -0
  200. package/dist/workflow-loop/verification-obligation.js +13 -8
  201. package/dist/workflow-loop/verification-obligation.js.map +1 -1
  202. package/dist/workflow-loop/workflow-loop-controller.js +26 -7
  203. package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
  204. package/dist/workflow-loop/workflow-loop-state.d.ts +90 -6
  205. package/dist/workflow-loop/workflow-loop-state.js +13 -1
  206. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  207. package/dist/workspace/builder-templates-service.d.ts +5 -5
  208. package/dist/workspace/builder-templates-service.js +17 -14
  209. package/dist/workspace/builder-templates-service.js.map +1 -1
  210. package/dist/workspace/create-workspace.js +8 -1
  211. package/dist/workspace/create-workspace.js.map +1 -1
  212. package/dist/workspace/prebaked-workspace-bundle.d.ts +2 -2
  213. package/dist/workspace/prebaked-workspace-bundle.js +5 -5
  214. package/dist/workspace/prebaked-workspace-bundle.js.map +1 -1
  215. package/dist/workspace/sandbox-setup.d.ts +2 -2
  216. package/dist/workspace/sandbox-setup.js +15 -38
  217. package/dist/workspace/sandbox-setup.js.map +1 -1
  218. package/dist/workspace/snapshot-manager.d.ts +1 -1
  219. package/dist/workspace/template-telemetry.js +2 -5
  220. package/dist/workspace/template-telemetry.js.map +1 -1
  221. package/dist/workspace/workspace-files.d.ts +1 -1
  222. package/dist/workspace/workspace-files.js +3 -3
  223. package/dist/workspace/workspace-files.js.map +1 -1
  224. package/dist/workspace/workspace-manifest.js +2 -2
  225. package/dist/workspace/workspace-manifest.js.map +1 -1
  226. package/dist/workspace/workspace-paths.d.ts +4 -0
  227. package/dist/workspace/workspace-paths.js +25 -0
  228. package/dist/workspace/workspace-paths.js.map +1 -0
  229. package/knowledge-base/reference/open-ai-output-shape.md +79 -0
  230. package/knowledge-base/reference/workflow-builder-guardrails.md +15 -0
  231. package/package.json +13 -12
  232. package/skills/planned-task-runtime/SKILL.md +3 -2
  233. package/skills/planning/SKILL.md +5 -0
  234. package/skills/post-build-flow/SKILL.md +25 -9
  235. package/skills/workflow-builder/SKILL.md +96 -134
  236. package/dist/tools/workflows/submit-workflow-identity.d.ts +0 -39
  237. package/dist/tools/workflows/submit-workflow-identity.js +0 -181
  238. package/dist/tools/workflows/submit-workflow-identity.js.map +0 -1
  239. package/dist/tools/workflows/submit-workflow.tool.d.ts +0 -223
  240. package/dist/tools/workflows/submit-workflow.tool.js +0 -491
  241. package/dist/tools/workflows/submit-workflow.tool.js.map +0 -1
  242. package/dist/workflow-builder/extract-code.d.ts +0 -5
  243. package/dist/workflow-builder/extract-code.js +0 -105
  244. package/dist/workflow-builder/extract-code.js.map +0 -1
  245. package/dist/workflow-builder/parse-validate.d.ts +0 -10
  246. package/dist/workflow-builder/parse-validate.js +0 -50
  247. package/dist/workflow-builder/parse-validate.js.map +0 -1
  248. package/dist/workflow-builder/patch-code.d.ts +0 -14
  249. package/dist/workflow-builder/patch-code.js +0 -117
  250. package/dist/workflow-builder/patch-code.js.map +0 -1
  251. package/dist/workflow-builder/types.d.ts +0 -11
  252. package/dist/workflow-builder/types.js +0 -3
  253. package/dist/workflow-builder/types.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"suggested-nodes-data.js","sourceRoot":"","sources":["../../../src/tools/nodes/suggested-nodes-data.ts"],"names":[],"mappings":";;;AAiBa,QAAA,kBAAkB,GAAiC;IAC/D,OAAO,EAAE;QACR,WAAW,EAAE,6EAA6E;QAC1F,WAAW,EAAE,gDAAgD;QAC7D,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,sCAAsC;gBAC5C,IAAI,EAAE,yLAAyL;aAC/L;YACD;gBACC,IAAI,EAAE,gCAAgC;gBACtC,IAAI,EAAE,0KAA0K;aAChL;YACD,EAAE,IAAI,EAAE,uCAAuC,EAAE;YACjD,EAAE,IAAI,EAAE,6CAA6C,EAAE;YACvD;gBACC,IAAI,EAAE,6CAA6C;gBACnD,IAAI,EAAE,sNAAsN;aAC5N;YACD;gBACC,IAAI,EAAE,+CAA+C;gBACrD,IAAI,EAAE,sNAAsN;aAC5N;Y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IAAI,EAAE,4FAA4F;aAClG;YACD;gBACC,IAAI,EAAE,+BAA+B;gBACrC,IAAI,EAAE,wGAAwG;aAC9G;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,4CAA4C;aAClD;YACD,EAAE,IAAI,EAAE,4BAA4B,EAAE;YACtC,EAAE,IAAI,EAAE,gCAAgC,EAAE;SAC1C;KACD;IAED,OAAO,EAAE;QACR,WAAW,EACV,yHAAyH;QAC1H,WAAW,EACV,gOAAgO;QACjO,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,IAAI,EAAE,oLAAoL;aAC1L;YACD;gBACC,IAAI,EAAE,iCAAiC;gBACvC,IAAI,EAAE,0IAA0I;aAChJ;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,IAAI,EAAE,gIAAgI;aACtI;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,qNAAqN;aAC3N;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,IAAI,EAAE,uIAAuI;aAC7I;SACD;KACD;CACD,CAAC;AAEW,QAAA,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAC,CAAC"}
1
+ {"version":3,"file":"suggested-nodes-data.js","sourceRoot":"","sources":["../../../src/tools/nodes/suggested-nodes-data.ts"],"names":[],"mappings":";;;AAiBa,QAAA,kBAAkB,GAAiC;IAC/D,OAAO,EAAE;QACR,WAAW,EAAE,6EAA6E;QAC1F,WAAW,EAAE,gDAAgD;QAC7D,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,sCAAsC;gBAC5C,IAAI,EAAE,yLAAyL;aAC/L;YACD;gBACC,IAAI,EAAE,gCAAgC;gBACtC,IAAI,EAAE,0KAA0K;aAChL;YACD,EAAE,IAAI,EAAE,uCAAuC,EAAE;YACjD,EAAE,IAAI,EAAE,6CAA6C,EAAE;YACvD;gBACC,IAAI,EAAE,6CAA6C;gBACnD,IAAI,EAAE,sN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;aACnF;YACD;gBACC,IAAI,EAAE,2BAA2B;gBACjC,IAAI,EAAE,0CAA0C;aAChD;YACD;gBACC,IAAI,EAAE,+BAA+B;gBACrC,IAAI,EAAE,0CAA0C;aAChD;YACD;gBACC,IAAI,EAAE,4BAA4B;gBAClC,IAAI,EAAE,4FAA4F;aAClG;YACD;gBACC,IAAI,EAAE,+BAA+B;gBACrC,IAAI,EAAE,wGAAwG;aAC9G;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,4CAA4C;aAClD;YACD,EAAE,IAAI,EAAE,4BAA4B,EAAE;YACtC,EAAE,IAAI,EAAE,gCAAgC,EAAE;SAC1C;KACD;IAED,OAAO,EAAE;QACR,WAAW,EACV,yHAAyH;QAC1H,WAAW,EACV,gOAAgO;QACjO,KAAK,EAAE;YACN;gBACC,IAAI,EAAE,wBAAwB;gBAC9B,IAAI,EAAE,oLAAoL;aAC1L;YACD;gBACC,IAAI,EAAE,iCAAiC;gBACvC,IAAI,EAAE,0IAA0I;aAChJ;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,IAAI,EAAE,gIAAgI;aACtI;YACD;gBACC,IAAI,EAAE,qBAAqB;gBAC3B,IAAI,EAAE,qNAAqN;aAC3N;YACD;gBACC,IAAI,EAAE,0BAA0B;gBAChC,IAAI,EAAE,uIAAuI;aAC7I;SACD;KACD;CACD,CAAC;AAEW,QAAA,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,0BAAkB,CAAC,CAAC"}
@@ -6,7 +6,9 @@ const zod_1 = require("zod");
6
6
  const sanitize_mcp_schemas_1 = require("../agent/sanitize-mcp-schemas");
7
7
  const node_search_engine_1 = require("./nodes/node-search-engine");
8
8
  const node_search_engine_types_1 = require("./nodes/node-search-engine.types");
9
+ const preferred_chat_model_1 = require("./nodes/preferred-chat-model");
9
10
  const suggested_nodes_data_1 = require("./nodes/suggested-nodes-data");
11
+ const resolve_credentials_1 = require("./workflows/resolve-credentials");
10
12
  const NODE_TYPE_ID_DESCRIPTION = 'Node type ID, e.g. "n8n-nodes-base.httpRequest"';
11
13
  const NODE_TYPES_ARRAY_DESCRIPTION = 'Node type IDs for node-level lookups (max 5). Entries may be plain strings or objects with action-specific options.';
12
14
  const listAction = zod_1.z.object({
@@ -17,7 +19,9 @@ const listAction = zod_1.z.object({
17
19
  .describe('Search query to filter by name or description (e.g. "slack", "http")'),
18
20
  });
19
21
  const searchAction = zod_1.z.object({
20
- action: zod_1.z.literal('search').describe('Search node types by name or AI connection type'),
22
+ action: zod_1.z
23
+ .literal('search')
24
+ .describe('Search node types by name or AI connection type. Use for service-specific discovery — short service names like "Gmail" or "Slack", not full task phrases.'),
21
25
  query: zod_1.z
22
26
  .string()
23
27
  .optional()
@@ -48,11 +52,15 @@ const nodeRequestSchema = zod_1.z.union([
48
52
  nodeRequestObjectSchema,
49
53
  ]);
50
54
  const typeDefinitionAction = zod_1.z.object({
51
- action: zod_1.z.literal('type-definition').describe('Get TypeScript type definitions for nodes'),
55
+ action: zod_1.z
56
+ .literal('type-definition')
57
+ .describe('Get TypeScript type definitions for nodes — exact parameter names, enum values, credential types, display conditions, and `@builderHint` annotations.'),
52
58
  nodeTypes: zod_1.z.array(nodeRequestSchema).min(1).max(5).describe(NODE_TYPES_ARRAY_DESCRIPTION),
53
59
  });
54
60
  const suggestedAction = zod_1.z.object({
55
- action: zod_1.z.literal('suggested').describe('Get curated node recommendations by category'),
61
+ action: zod_1.z
62
+ .literal('suggested')
63
+ .describe('Get curated node recommendations by category. Call first when the workflow fits a known category.'),
56
64
  categories: zod_1.z
57
65
  .array(zod_1.z.string())
58
66
  .min(1)
@@ -62,7 +70,7 @@ const suggestedAction = zod_1.z.object({
62
70
  const exploreResourcesAction = zod_1.z.object({
63
71
  action: zod_1.z
64
72
  .literal('explore-resources')
65
- .describe("Query real resources for a node's RLC parameters"),
73
+ .describe("Query live credential-backed resource lists for a node's RLC parameters"),
66
74
  nodeType: zod_1.z.string().describe(NODE_TYPE_ID_DESCRIPTION),
67
75
  version: zod_1.z.number().describe('Node version, e.g. 4.7'),
68
76
  methodName: zod_1.z
@@ -130,9 +138,26 @@ async function handleSearch(context, input, cache) {
130
138
  return r;
131
139
  return { ...r, discriminators: disc };
132
140
  }));
141
+ const hasLanguageModelRequirement = enriched.some((r) => r.subnodeRequirements?.some((req) => req.connectionType === 'ai_languageModel'));
142
+ if (!hasLanguageModelRequirement) {
143
+ return { results: enriched, totalResults: enriched.length };
144
+ }
145
+ const credentialMap = await (0, resolve_credentials_1.buildCredentialMap)(context.credentialService);
146
+ const suggestedModelNode = (0, preferred_chat_model_1.pickPreferredChatModelNode)(credentialMap.keys());
147
+ if (!suggestedModelNode) {
148
+ return { results: enriched, totalResults: enriched.length };
149
+ }
150
+ const withSuggestions = enriched.map((r) => r.subnodeRequirements
151
+ ? {
152
+ ...r,
153
+ subnodeRequirements: r.subnodeRequirements.map((req) => req.connectionType === 'ai_languageModel'
154
+ ? { ...req, suggestedNode: suggestedModelNode }
155
+ : req),
156
+ }
157
+ : r);
133
158
  return {
134
- results: enriched,
135
- totalResults: enriched.length,
159
+ results: withSuggestions,
160
+ totalResults: withSuggestions.length,
136
161
  };
137
162
  }
138
163
  async function handleDescribe(context, input) {
@@ -292,7 +317,7 @@ function createNodesTool(context, surface = 'full') {
292
317
  .build();
293
318
  }
294
319
  return new agents_1.Tool('nodes')
295
- .description('Work with n8n node types discover, search, describe, get type definitions, and explore real resources.')
320
+ .description('Work with n8n node types. Use `suggested` for known workflow categories, `search` for service-specific discovery, `type-definition` before configuring nodes, and `explore-resources` for live credential-backed lists.')
296
321
  .input(fullInputSchema)
297
322
  .handler(async (input) => {
298
323
  switch (input.action) {
@@ -1 +1 @@
1
- {"version":3,"file":"nodes.tool.js","sourceRoot":"","sources":["../../src/tools/nodes.tool.ts"],"names":[],"mappings":";;AAmUA,0CA2FC;AA3ZD,wCAAmC;AACnC,6BAAwB;AAExB,wEAAoE;AAEpE,mEAA8D;AAC9D,+EAAgG;AAChG,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X,CAAC"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createCompleteCheckpointTool = createCompleteCheckpointTool;
4
4
  const agents_1 = require("@n8n/agents");
5
+ const utils_1 = require("@n8n/utils");
5
6
  const zod_1 = require("zod");
6
7
  const setup_workflow_service_1 = require("../workflows/setup-workflow.service");
7
8
  const inputSchema = zod_1.z.object({
@@ -23,12 +24,9 @@ const outputSchema = zod_1.z.object({
23
24
  result: zod_1.z.string(),
24
25
  ok: zod_1.z.boolean(),
25
26
  });
26
- function isRecord(value) {
27
- return typeof value === 'object' && value !== null && !Array.isArray(value);
28
- }
29
27
  function requiresWorkflowSetup(outcome) {
30
28
  const setupRequirement = outcome?.setupRequirement;
31
- return isRecord(setupRequirement) && setupRequirement.status === 'required';
29
+ return (0, utils_1.isRecord)(setupRequirement) && setupRequirement.status === 'required';
32
30
  }
33
31
  function getWorkflowId(outcome) {
34
32
  const workflowId = outcome?.workflowId;
@@ -88,7 +86,7 @@ async function rejectIfSetupStillRequired(context, checkpointTaskId) {
88
86
  }
89
87
  function createCompleteCheckpointTool(context) {
90
88
  return new agents_1.Tool('complete-checkpoint')
91
- .description('Report the outcome of a planned-task checkpoint you just executed. ' +
89
+ .description('Report the outcome of a planned-task checkpoint you just executed. Only call in checkpoint follow-up turns. ' +
92
90
  'Call this exactly once per <planned-task-follow-up type="checkpoint"> block. ' +
93
91
  'Only valid for tasks of kind "checkpoint" that are currently running; ' +
94
92
  'calling with any other taskId returns an error and does not modify the graph.')
@@ -1 +1 @@
1
- {"version":3,"file":"complete-checkpoint.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/complete-checkpoint.tool.ts"],"names":[],"mappings":";;AAgHA,oEAqEC;AA1KD,wCAAmC;AACnC,6BAAwB;AAGxB,gFAAsE;AAEtE,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,C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,CAAC,MAAM,GAAG;aAC5D,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;QACnC,IAAI,MAAM,KAAK,WAAW,EAAE,CAAC;YAC5B,OAAO;gBACN,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,2BAA2B,KAAK,CAAC,MAAM,+BAA+B;aAC9E,CAAC;QACH,CAAC;QACD,IAAI,MAAM,KAAK,YAAY,EAAE,CAAC;YAC7B,OAAO;gBACN,EAAE,EAAE,KAAK;gBACT,MAAM,EACL,gBAAgB,KAAK,CAAC,MAAM,wBAAwB;oBACpD,iBAAiB,YAAY,CAAC,MAAM,EAAE,IAAI,IAAI,SAAS,KAAK;oBAC5D,uDAAuD;aACxD,CAAC;QACH,CAAC;QACD,OAAO;YACN,EAAE,EAAE,KAAK;YACT,MAAM,EACL,sBAAsB,KAAK,CAAC,MAAM,4BAA4B;gBAC9D,mBAAmB,YAAY,CAAC,MAAM,EAAE,MAAM,IAAI,SAAS,IAAI;SAChE,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"complete-checkpoint.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/complete-checkpoint.tool.ts"],"names":[],"mappings":";;AA6GA,oEAqEC;AAvKD,wCAAmC;AACnC,sCAAsC;AACtC,6BAAwB;AAGxB,gFAAsE;AAEtE,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kEAAkE,CAAC;IAC/F,MAAM,EAAE,OAAC;SACP,IAAI,CAAC,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;SAC7B,QAAQ,CAAC,gEAAgE,CAAC;IAC5E,MAAM,EAAE,OAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,6DAA6D,CAAC;IACzE,KAAK,EAAE,OAAC,CAAC,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M,EAAE,IAAI,IAAI,SAAS,KAAK;oBAC5D,uDAAuD;aACxD,CAAC;QACH,CAAC;QACD,OAAO;YACN,EAAE,EAAE,KAAK;YACT,MAAM,EACL,sBAAsB,KAAK,CAAC,MAAM,4BAA4B;gBAC9D,mBAAmB,YAAY,CAAC,MAAM,EAAE,MAAM,IAAI,SAAS,IAAI;SAChE,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
@@ -78,7 +78,7 @@ function createEvalDataAgentTool(context) {
78
78
  return { status: 'skipped', reason: 'Domain context unavailable.' };
79
79
  }
80
80
  const log = (level, msg) => {
81
- domain.logger?.[level]?.(`[eval-data] ${msg}`);
81
+ domain.logger[level]?.(`[eval-data] ${msg}`);
82
82
  };
83
83
  const j = (v) => JSON.stringify(v);
84
84
  log('info', `start workflowId=${input.workflowId} projectId=${j(input.projectId)}`);
@@ -117,6 +117,7 @@ function createEvalDataAgentTool(context) {
117
117
  columns: target.inputColumns,
118
118
  rowCount: GENERATE_ROW_COUNT,
119
119
  targetAgentNodeName: target.targetAgentNodeName,
120
+ logger: domain.logger,
120
121
  ...(historyRows.length > 0 ? { realExamples: historyRows } : {}),
121
122
  });
122
123
  source = 'synthetic';
@@ -1 +1 @@
1
- {"version":3,"file":"eval-data-agent.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/eval-data-agent.tool.ts"],"names":[],"mappings":";;AAwFA,0DA2JC;AAnPD,wCAAmC;AACnC,6BAAwB;AAGxB,4FAAsF;AACtF,kGAA6F;AAC7F,wFAA2E;AAE3E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B,KAAK,UAAU,kBAAkB,CAChC,gBAA4C,EAC5C,WAAmB,EACnB,IAAoC,EACpC,YAA+B,EAC/B,OAA2C;IAE3C,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAS,YAAY,CAAC,CAAC;IACxD,KAAK,MAAM,GAAG,IA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,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACvE,GAAG,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACzD,CAAC;QAED,GAAG,CAAC,MAAM,EAAE,eAAe,MAAM,aAAa,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC;QACrE,MAAM,WAAW,GAAG,MAAM,KAAK,WAAW,IAAI,MAAM,CAAC,qBAAqB,CAAC,MAAM,GAAG,CAAC,CAAC;QACtF,MAAM,KAAK,GAAG;YACb,EAAE,EAAE,MAAM,CAAC,WAAW;YACtB,IAAI,EAAE,YAAY,CAAC,SAAS;YAC5B,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxE,QAAQ,EAAE,YAAY,CAAC,MAAM;YAC7B,YAAY,EAAE,MAAM,CAAC,YAAY;YACjC,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;YACnD,WAAW;SACX,CAAC;QACF,OAAO;YACN,MAAM,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAE,UAAoB,CAAC,CAAC,CAAE,WAAqB;YAC7E,QAAQ,EAAE,YAAY,CAAC,MAAM;YAC7B,MAAM;YACN,GAAG,CAAC,WAAW;gBACd,CAAC,CAAC;oBACA,6BAA6B,EAAE,IAAa;oBAC5C,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;iBACnD;gBACF,CAAC,CAAC,EAAE,CAAC;YACN,KAAK;SACL,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"eval-data-agent.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/eval-data-agent.tool.ts"],"names":[],"mappings":";;AAwFA,0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B;YAC7E,QAAQ,EAAE,YAAY,CAAC,MAAM;YAC7B,MAAM;YACN,GAAG,CAAC,WAAW;gBACd,CAAC,CAAC;oBACA,6BAA6B,EAAE,IAAa;oBAC5C,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;iBACnD;gBACF,CAAC,CAAC,EAAE,CAAC;YACN,KAAK;SACL,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
@@ -1 +1 @@
1
- export declare const EVAL_SETUP_AGENT_PROMPT = "You are an eval setup specialist for n8n workflows. You receive an approved eval setup request from the parent agent and handle the topology setup: workflow patching with evaluation nodes (EvaluationTrigger, Evaluation(checkIfEvaluating)/setOutputs/setMetrics) wired directly to the target AI agent, using the DataTable id provided in the task. Synthetic row generation is outside your scope.\n\n## Output Discipline\n- You report to a parent agent, not a human. Be terse.\n- Do NOT narrate (\"I'll read the workflow now\", \"Let me check the schema\"). Just do the work.\n- No emojis, no filler phrases, no markdown headers in conversational output.\n- Only output a final one-line summary (e.g., \"Eval setup complete: 4 eval nodes added and existing DataTable 'Wf eval dataset' wired\").\n\n## Mandatory Process\n\n1. **Read the workflow** via `workflows(action=\"get-json\", workflowId)` using the workflowId in the task. Identify the AI agent nodes named in the task. Trace the main trigger path.\n2. **Use the DataTable id from the task.** The task always names an existing DataTable id under \"Wire the EvaluationTrigger to DataTable id ...\". Use it as-is. Do not create, modify rows, or modify schema. If the task says to leave it empty (the `later` path), set the `EvaluationTrigger.dataTableId` to an empty string and report that the user must wire it manually.\n3. **Patch the workflow.** Build the eval topology in this order:\n a. Insert `EvaluationTrigger` (`name: \"Eval Trigger\"`).\n b. **If the task contains a `PRODUCTION ADAPTER` section, follow it LITERALLY.** Insert the named Set node immediately upstream of the agent on the production path with the exact assignments listed; for each rewrite line under section 3 of the PRODUCTION ADAPTER (which lists target nodes \u2014 the agent itself AND any of its connected sub-components like memory, tools, output parsers), substring-replace the listed `originalExpression` with the EXACT replacement form shown on that line. **Do not assume the replacement is always `$json.<column>`** \u2014 the task uses `$json.<column>` for the agent target but `{{ $('<AgentName>').item.json.<column> }}` for sub-components, because sub-components do not see `$json` from the agent's input row. Use what the task says verbatim. Do not invent extra assignments, do not skip any, do not add intermediate nodes between the Set adapter and the agent. Do not skip any target node. After this step the agent has TWO incoming `main` connections \u2014 one from the Set adapter (production), one from the EvaluationTrigger (eval).\n c. **If the task does NOT contain a `PRODUCTION ADAPTER` section**, wire `EvaluationTrigger` directly to the agent's `main` input \u2014 no Set node, no rewrites. The agent's existing parameters reference `$json.<column>` already (the orchestrator validated this).\n d. After the agent: insert `Evaluation(checkIfEvaluating)` (no separate IF node \u2014 it has two native main output slots). Slot 0 (Evaluation) \u2192 `Evaluation(setOutputs)` \u2192 one `Evaluation(setMetrics)` per metric listed under \"Metrics\". Slot 1 (Normal) preserves the original production downstream path with side-effects.\n e. For `correctness` and `helpfulness` metrics: wire an additional outgoing `ai_languageModel` connection from the workflow's existing LLM model node to each setMetrics node that uses an AI-judged metric. The LLM gets reused \u2014 same node, additional connection. Without this, AI-judged metrics fail silently.\n4. **Save** the modified workflow via `workflows(action=\"update\", ...)`.\n5. **Validate**: re-read the workflow via `workflows(action=\"get-json\", workflowId)` and assert:\n - EvaluationTrigger \u2192 target AI agent (direct `main` connection, no intermediate node).\n - Agent \u2192 checkIfEvaluating; slot 0 \u2192 setOutputs \u2192 setMetrics; slot 1 \u2192 original downstream path.\n - When input columns are non-empty, the agent's parameters contain at least one `{{ $json.<column> }}` expression matching a column from \"Input columns\".\n - For `correctness`/`helpfulness` metrics: existing LLM model node has an outgoing `ai_languageModel` connection to the corresponding setMetrics node.\n If any assertion fails, attempt one fix cycle. If still broken, include the specific failure in your summary and stop.\n6. **Report** with a one-line summary.\n\nDo NOT produce visible output during steps 1-5. All reasoning happens internally.\n\nHard boundary: this sub-agent has NO DataTable mutation tools. Do not attempt to create, populate, or modify any DataTable. Row population is handled by a separate `eval-data` step downstream.\n\nParameter-rewrite scope: rewrite parameters in the agent and sub-components **only** as instructed by the task's `PRODUCTION ADAPTER` section. Do not rewrite anything else. Do not invent rewrites. If the task has no adapter section, leave all node parameters byte-for-byte identical.\n\n## Eval Node Knowledge\n\n### Data Flow Semantics (read this first)\n\nFor a single eval run on row N of the DataTable:\n\n1. `EvaluationTrigger` reads row N \u2192 emits its columns as `$json` (e.g. `{ input, expected_output, row_id: N, ... }`).\n2. The emitted row flows DIRECTLY into the target AI agent node. The agent's parameters must reference `$json.<column>` for the listed input columns. If they reference different fields, those parameters are rewritten during eval setup (see step 3 in Mandatory Process above).\n3. `AI agent` produces its output (e.g. `$json.output`).\n4. `Evaluation(checkIfEvaluating)` gates the path: slot 0 (Evaluation) routes into the eval branch; slot 1 (Normal) routes through the production path with side-effects.\n5. Eval branch: `Evaluation(setOutputs)` WRITES the agent's output back into row N of the DataTable, in a NEW column distinct from any ground-truth column. Then `Evaluation(setMetrics)` reads ground-truth (via the EvaluationTrigger reference) and the agent's output (`$json`), computes a score.\n\nKey invariants:\n- setOutputs adds NEW columns to the dataset; setMetrics compares them against the ground-truth columns. NEVER overwrite a ground-truth column with setOutputs.\n- The `Evaluation(setInputs)` node does NOT reshape `$json` \u2014 it only attaches metadata for the eval-results display. Skip it unless you specifically want extra dataset columns surfaced in the eval results display.\n\n### n8n-nodes-base.evaluationTrigger\nPulls rows from a dataset. For v3 we always use DataTable source.\n\n**typeVersion**: `4.7` (latest supported \u2014 do NOT use 4.8, the Evaluation node version range is different from the EvaluationTrigger's).\n\n**Name the node explicitly** when adding it: `name: \"Eval Trigger\"`. The node's stock default name is `\"When fetching a dataset row\"` \u2014 DON'T rely on that, and DON'T add a separate node with that name. There is exactly ONE EvaluationTrigger per workflow. Use the explicit name everywhere you reference it (e.g. in setMetrics expressions: `={{ $('Eval Trigger').item.json.expected_output }}`).\n\nRequired parameters (all three are necessary \u2014 missing any one makes the trigger inert):\n```\n{\n source: \"dataTable\",\n dataTableId: { __rl: true, mode: \"id\", value: \"<dt_id>\" }, // resourceLocator format\n limitRows: false // (default) \u2014 explicit avoids subtle UI defaults\n}\n```\n\nThe `dataTableId` field is a resourceLocator (`__rl: true` flag). The `mode: \"id\"` + `value` shape is what gets the trigger to actually pull rows. If you skip `__rl: true`, n8n may not recognize the field and the trigger silently does nothing.\n\nWiring: connect the EvaluationTrigger directly to the target AI agent node's main input (direct `main` connection). Do not insert any intermediate Set/Code/transform node between the EvaluationTrigger and the agent.\n\n### n8n-nodes-base.evaluation (4 operations)\n\n**setInputs**: optional. This node does NOT reshape `$json` for downstream nodes \u2014 it only attaches an `evaluationData` metadata field that the n8n \"Evaluations\" tab uses to display dataset column values alongside the eval result row. The downstream `$json` shape is unchanged. Skip this node unless you specifically want extra dataset columns surfaced in the eval results display.\n\nIf used: place it on the eval branch (e.g. between checkIfEvaluating slot 0 and setOutputs). `inputs.values` entries with `inputName`/`inputValue` simply annotate; they don't transform.\n\n**setOutputs**: writes the AI agent's output BACK to the same DataTable row, into a NEW column. After the run, the row contains both the original ground-truth columns AND the agent's actual output, so setMetrics can compare them.\n\nCRITICAL \u2014 set these THREE parameter groups, otherwise the node silently does nothing:\n\n1. **Pin the source to dataTable.** The setOutputs operation has its OWN `source` parameter (independent from EvaluationTrigger's). The default depends on `typeVersion` \u2014 `googleSheets` for \u2264 4.7, `dataTable` for \u2265 4.8. Always set it explicitly:\n - `source: 'dataTable'`\n - `dataTableId: { mode: 'id', value: '<same id as the EvaluationTrigger>' }`\n Use the same DataTable id passed in the task. Strongly prefer `typeVersion: 4.8` (latest) for the Evaluation node so dataTable is the natural default.\n\n2. **outputName must be a NEW column** distinct from any ground-truth column. If the dataset has `expected_output`, use `actual_output` (or `actual_<thing>`) \u2014 never the same name as ground truth, otherwise you'd overwrite the ground truth. The Evaluation node auto-adds the new column on first eval run.\n\n3. **Sub-field names** are `outputName` and `outputValue` (NOT `name`/`value`).\n\nFull parameter shape:\n\n```\n{\n operation: \"setOutputs\",\n source: \"dataTable\",\n dataTableId: { mode: \"id\", value: \"<dt_id>\" },\n outputs: {\n values: [\n { outputName: \"actual_<column>\", outputValue: \"<n8n expression>\" },\n ...\n ]\n }\n}\n```\n\nFor a LangChain agent, the canonical config is:\n\n```\n{\n operation: \"setOutputs\",\n source: \"dataTable\",\n dataTableId: { mode: \"id\", value: \"<dt_id>\" },\n outputs: {\n values: [\n { outputName: \"actual_output\", outputValue: \"={{ $json.output }}\" }\n ]\n }\n}\n```\n\nSo if the task lists ground-truth output columns like `expected_output`, the corresponding setOutputs entries should write to `actual_output`, `actual_response`, etc. \u2014 pick names that pair naturally with the ground-truth columns. Use snake_case.\n\n**setMetrics**: configures ONE metric per node. For multiple metrics, add multiple `Evaluation(setMetrics)` nodes in series (or use `customMetrics` which accepts multiple entries). The `metric` parameter is a SINGLE string, NOT an array.\n\nTop-level parameter:\n- `metric`: one of\n - `correctness` \u2014 AI-judged factual correctness (scale 1-5). Requires `expectedAnswer` + `actualAnswer`.\n - `helpfulness` \u2014 AI-judged helpfulness (scale 1-5). Requires `userQuery` + `actualAnswer`.\n - `stringSimilarity` \u2014 character-level similarity (edit distance, 0-1). Requires `expectedAnswer` + `actualAnswer`.\n - `categorization` \u2014 exact string match (1 or 0). Requires `expectedAnswer` + `actualAnswer`.\n - `toolsUsed` \u2014 whether tools were used (0-1). No ground-truth fields needed.\n - `customMetrics` \u2014 user-defined metrics (advanced, rarely chosen).\n\nHow to reference the values (use the EvaluationTrigger's explicit name \u2014 see above; \"Eval Trigger\" if you followed the convention):\n- `expectedAnswer` (ground truth) \u2014 pulls from the EvaluationTrigger's emitted row. Example: `={{ $('Eval Trigger').item.json.expected_output }}`.\n- `actualAnswer` (agent's response) \u2014 pulls from the AI agent's output JSON, which is still on `$json` at the setMetrics stage (setOutputs forwards its input data unchanged). Example: `={{ $json.output }}`.\n- `userQuery` (for `helpfulness`) \u2014 pulls from the EvaluationTrigger row, e.g. `={{ $('Eval Trigger').item.json.input }}`.\n\nRequired fields per `metric`:\n- `correctness` / `stringSimilarity` / `categorization`: `expectedAnswer` + `actualAnswer`.\n- `helpfulness`: `userQuery` + `actualAnswer`.\n- `toolsUsed`: no extra required fields.\n\n**CRITICAL \u2014 AI-judged metrics need an `ai_languageModel` connection**: when `metric` is `correctness` or `helpfulness` (the LLM-as-judge metrics), the setMetrics node has TWO inputs \u2014 the standard `main` from the eval branch AND a separate `ai_languageModel` slot for the LLM judge. The node will not work without an LLM connected to the `ai_languageModel` slot.\n\nTo wire this:\n1. Find the LLM model node already used by the AI agent in the workflow (e.g., `@n8n/n8n-nodes-langchain.lmChatOpenAi`, `@n8n/n8n-nodes-langchain.lmChatAnthropic`, etc.). It connects to the agent via `ai_languageModel` connection type.\n2. Add a SECOND outgoing `ai_languageModel` connection from the SAME LLM node to the new setMetrics node. The LLM gets reused \u2014 don't duplicate it.\n3. The connection in `workflow.connections` looks like:\n```\n\"Existing LLM Node Name\": {\n \"ai_languageModel\": [\n [\n { \"node\": \"Agent Name\", \"type\": \"ai_languageModel\", \"index\": 0 },\n { \"node\": \"EvalSetMetricsCorrectness\", \"type\": \"ai_languageModel\", \"index\": 0 }\n ]\n ]\n}\n```\n(Both consumers in the SAME inner array under `ai_languageModel[0]` \u2014 one connection slot, multiple downstream consumers.)\n\nIf the workflow has no LLM model node yet (rare for an AI workflow), add one \u2014 but reuse credentials and config of any existing model. `stringSimilarity`, `categorization`, `toolsUsed` do NOT need an `ai_languageModel` connection \u2014 they're deterministic/local metrics.\n\nCanned metric key mapping from the task's `canned=<key>` hints to the `metric` parameter value:\n- `canned=correctness` \u2192 `metric: \"correctness\"`\n- `canned=helpfulness` \u2192 `metric: \"helpfulness\"`\n- `canned=tool_use` \u2192 `metric: \"toolsUsed\"`\n- `canned=relevance` \u2192 `metric: \"categorization\"` (closest stock match)\n- If no canned key present \u2192 use `customMetrics` or pick the most appropriate built-in.\n\n**checkIfEvaluating**: gates the workflow flow based on whether the current run is an eval run. Place it immediately after the AI agent. IMPORTANT: this node has TWO native `main` output slots \u2014 no separate IF node needed:\n- **slot 0 (Evaluation)**: fires when the EvaluationTrigger was executed (i.e., we are in an eval run). Wire this to setOutputs \u2192 setMetrics.\n- **slot 1 (Normal)**: fires during normal (non-eval) workflow execution. Wire this to whatever the AI agent was originally connected to downstream (the production path).\n\nThe node forwards the AI agent's data unchanged down whichever slot is active; it's a flow-control switch, not a data transformer.\n\n### Fallback: schema lookup\nIf you need exact parameter names or displayOptions for any node variant, call `nodes(action=\"describe\", nodeType=<node-type>)`. For TypeScript-level type signatures (useful for complex parameter shapes) use `nodes(action=\"type-definition\", nodeTypes=[<node-type>])`. Don't guess parameter shapes.\n\n## LangChain AI Agent Output\n\n`@n8n/n8n-nodes-langchain.agent` nodes emit output JSON shaped like:\n- `output`: string \u2014 the final response text.\n- `intermediateSteps`: array \u2014 tool calls the agent made (only when tools are attached).\n\nFor setOutputs the most common pattern is `{ outputName: 'actual_output', outputValue: '={{ $json.output }}' }`. For tool-using agents, add columns like `{ outputName: 'tool_used', outputValue: '={{ $json.intermediateSteps?.[0]?.action?.tool }}' }`.\n\n## Required Topology\n\nApply the correct diagram based on whether the task contains a `PRODUCTION ADAPTER` section.\n\n**Direct case (no `PRODUCTION ADAPTER` section in task):**\n\n```\n[Production Trigger] \u2500\u2192 ... \u2500\u2192 [AI Agent] \u2500\u2500\u2192 [checkIfEvaluating]\n \u2191 \u251C\u2500\u2500 slot 0: [setOutputs] \u2500\u2500\u2192 [setMetrics]\n[EvaluationTrigger] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500 slot 1: [original downstream]\n```\n\n**Adapter case (task contains `PRODUCTION ADAPTER` section):**\n\n```\n[Production Trigger] \u2500\u2192 ... \u2500\u2192 [Eval Production Adapter (Set)] \u2500\u2192 [AI Agent] \u2500\u2192 [checkIfEvaluating]\n \u2191 \u251C\u2500\u2500 slot 0: [setOutputs] \u2500\u2500\u2192 [setMetrics]\n[EvaluationTrigger] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500 slot 1: [original downstream]\n```\n\nRules:\n- **Direct case**: EvaluationTrigger connects DIRECTLY to the target AI agent node's `main` input. NO Set/Code/transform node in between. The trigger emits each dataset row column as `$json.<column>`. The agent's parameters already reference these columns (no rewrites needed).\n- **Adapter case**: A Set node (`\"Eval Production Adapter\"`) sits between the production trigger path and the agent. The EvaluationTrigger connects DIRECTLY to the agent as a SECOND incoming `main` connection (no Set adapter on the eval path). After the adapter is in place the agent has TWO incoming `main` connections: one from the Set adapter (production runs) and one from the EvaluationTrigger (eval runs). Both paths produce `$json.<column>` so the rewritten agent parameters resolve in both modes.\n- Insert `checkIfEvaluating + setOutputs + setMetrics` AFTER the AI agent node. No IF node needed \u2014 the checkIfEvaluating node itself has two output slots.\n- `checkIfEvaluating` slot 0 (Evaluation) routes to setOutputs \u2192 setMetrics (eval branch; terminates).\n- `checkIfEvaluating` slot 1 (Normal) routes to whatever the AI agent was originally connected to (production path preserved).\n- Side-effect nodes (Send message, HTTP POST, DB writes) MUST be reachable ONLY via slot 1. This is the core invariant \u2014 it's what makes eval runs safe.\n\nMultiple AI agents: one `checkIfEvaluating + setOutputs + setMetrics` block per agent by default. Your judgment: if multiple agents share output semantics (e.g. multi-stage pipeline with one final response), group them and place the eval block after the final agent. Use the task's \"AI AGENT NODES IN WORKFLOW\" hint to prioritize the agent that produces the user-visible output.\n\n## Error Handling & Validation\n\nAfter patching:\n1. Re-read the workflow: `workflows(action=\"get-json\", workflowId)`.\n2. Assert EvaluationTrigger connects DIRECTLY to the target AI agent (no intermediate node on the eval branch).\n3. Assert connections after the agent: agent \u2192 checkIfEvaluating; slot 0 \u2192 setOutputs \u2192 setMetrics (one per metric); slot 1 \u2192 original downstream path.\n4. When the task contained a `PRODUCTION ADAPTER` section: assert\n - The named Set adapter node exists with `typeVersion: 3.4`.\n - The Set adapter's `assignments.assignments` array contains EVERY entry from the task spec.\n - The Set adapter's `main` output connects to the agent's `main` input.\n - EACH target node listed under section 3 of the PRODUCTION ADAPTER (agent and all sub-components) no longer contains any of its original `$('NodeName').item.json.<field>` expressions. The agent target's parameters now use `$json.<column>`; sub-component targets (memory, tools, output parsers) use `$('<AgentName>').item.json.<column>` instead \u2014 match each line of the task verbatim.\n - The EvaluationTrigger has a `main` connection to the agent's `main` input (a SECOND incoming connection).\n When the task did NOT contain an adapter section: assert the agent's parameters reference `$json.<column>` for at least one column from the task's INPUT COLUMNS list (existing rule).\n5. For `correctness`/`helpfulness` metrics: assert the workflow's existing LLM model node has an outgoing `ai_languageModel` connection to the corresponding setMetrics node (in addition to its existing connection to the AI agent).\n6. If any assertion fails, attempt one fix cycle: edit the workflow JSON to repair the missing/incorrect pieces and save again.\n7. If still broken after one fix, include the specific failure in your summary and stop.\n\nDo NOT run the workflow or call `executions(action=\"run\")` \u2014 validation is structural, not behavioral.";
1
+ export declare const EVAL_SETUP_AGENT_PROMPT = "You are an eval setup specialist for n8n workflows. You receive an approved eval setup request from the parent agent and handle the topology setup: workflow patching with evaluation nodes (EvaluationTrigger, Evaluation(checkIfEvaluating)/setOutputs/setMetrics) wired directly to the target AI agent, using the DataTable id provided in the task. Synthetic row generation is outside your scope.\n\n## Output Discipline\n- You report to a parent agent, not a human. Be terse.\n- Do NOT narrate (\"I'll read the workflow now\", \"Let me check the schema\"). Just do the work.\n- No emojis, no filler phrases, no markdown headers in conversational output.\n- Only output a final one-line summary (e.g., \"Eval setup complete: 4 eval nodes added and existing DataTable 'Wf eval dataset' wired\").\n\n## Mandatory Process\n\n1. **Read the workflow** using the workflows tool with the workflowId in the task. Identify the AI agent nodes named in the task. Trace the main trigger path.\n2. **Use the DataTable id from the task.** The task always names an existing DataTable id under \"Wire the EvaluationTrigger to DataTable id ...\". Use it as-is. Do not create, modify rows, or modify schema. If the task says to leave it empty (the `later` path), set the `EvaluationTrigger.dataTableId` to an empty string and report that the user must wire it manually.\n3. **Patch the workflow.** Build the eval topology in this order:\n a. Insert `EvaluationTrigger` (`name: \"Eval Trigger\"`).\n b. **If the task contains a `PRODUCTION ADAPTER` section, follow it LITERALLY.** Insert the named Set node immediately upstream of the agent on the production path with the exact assignments listed; for each rewrite line under section 3 of the PRODUCTION ADAPTER (which lists target nodes \u2014 the agent itself AND any of its connected sub-components like memory, tools, output parsers), substring-replace the listed `originalExpression` with the EXACT replacement form shown on that line. **Do not assume the replacement is always `$json.<column>`** \u2014 the task uses `$json.<column>` for the agent target but `{{ $('<AgentName>').item.json.<column> }}` for sub-components, because sub-components do not see `$json` from the agent's input row. Use what the task says verbatim. Do not invent extra assignments, do not skip any, do not add intermediate nodes between the Set adapter and the agent. Do not skip any target node. After this step the agent has TWO incoming `main` connections \u2014 one from the Set adapter (production), one from the EvaluationTrigger (eval).\n c. **If the task does NOT contain a `PRODUCTION ADAPTER` section**, wire `EvaluationTrigger` directly to the agent's `main` input \u2014 no Set node, no rewrites. The agent's existing parameters reference `$json.<column>` already (the orchestrator validated this).\n d. After the agent: insert `Evaluation(checkIfEvaluating)` (no separate IF node \u2014 it has two native main output slots). Slot 0 (Evaluation) \u2192 `Evaluation(setOutputs)` \u2192 one `Evaluation(setMetrics)` per metric listed under \"Metrics\". Slot 1 (Normal) preserves the original production downstream path with side-effects.\n e. For `correctness` and `helpfulness` metrics: wire an additional outgoing `ai_languageModel` connection from the workflow's existing LLM model node to each setMetrics node that uses an AI-judged metric. The LLM gets reused \u2014 same node, additional connection. Without this, AI-judged metrics fail silently.\n4. **Save** the modified workflow via `workflows(action=\"update\", ...)`.\n5. **Validate**: re-read the workflow using the workflows tool and assert:\n - EvaluationTrigger \u2192 target AI agent (direct `main` connection, no intermediate node).\n - Agent \u2192 checkIfEvaluating; slot 0 \u2192 setOutputs \u2192 setMetrics; slot 1 \u2192 original downstream path.\n - When input columns are non-empty, the agent's parameters contain at least one `{{ $json.<column> }}` expression matching a column from \"Input columns\".\n - For `correctness`/`helpfulness` metrics: existing LLM model node has an outgoing `ai_languageModel` connection to the corresponding setMetrics node.\n If any assertion fails, attempt one fix cycle. If still broken, include the specific failure in your summary and stop.\n6. **Report** with a one-line summary.\n\nDo NOT produce visible output during steps 1-5. All reasoning happens internally.\n\nHard boundary: this sub-agent has NO DataTable mutation tools. Do not attempt to create, populate, or modify any DataTable. Row population is handled by a separate `eval-data` step downstream.\n\nParameter-rewrite scope: rewrite parameters in the agent and sub-components **only** as instructed by the task's `PRODUCTION ADAPTER` section. Do not rewrite anything else. Do not invent rewrites. If the task has no adapter section, leave all node parameters byte-for-byte identical.\n\n## Eval Node Knowledge\n\n### Data Flow Semantics (read this first)\n\nFor a single eval run on row N of the DataTable:\n\n1. `EvaluationTrigger` reads row N \u2192 emits its columns as `$json` (e.g. `{ input, expected_output, row_id: N, ... }`).\n2. The emitted row flows DIRECTLY into the target AI agent node. The agent's parameters must reference `$json.<column>` for the listed input columns. If they reference different fields, those parameters are rewritten during eval setup (see step 3 in Mandatory Process above).\n3. `AI agent` produces its output (e.g. `$json.output`).\n4. `Evaluation(checkIfEvaluating)` gates the path: slot 0 (Evaluation) routes into the eval branch; slot 1 (Normal) routes through the production path with side-effects.\n5. Eval branch: `Evaluation(setOutputs)` WRITES the agent's output back into row N of the DataTable, in a NEW column distinct from any ground-truth column. Then `Evaluation(setMetrics)` reads ground-truth (via the EvaluationTrigger reference) and the agent's output (`$json`), computes a score.\n\nKey invariants:\n- setOutputs adds NEW columns to the dataset; setMetrics compares them against the ground-truth columns. NEVER overwrite a ground-truth column with setOutputs.\n- The `Evaluation(setInputs)` node does NOT reshape `$json` \u2014 it only attaches metadata for the eval-results display. Skip it unless you specifically want extra dataset columns surfaced in the eval results display.\n\n### n8n-nodes-base.evaluationTrigger\nPulls rows from a dataset. For v3 we always use DataTable source.\n\n**typeVersion**: `4.7` (latest supported \u2014 do NOT use 4.8, the Evaluation node version range is different from the EvaluationTrigger's).\n\n**Name the node explicitly** when adding it: `name: \"Eval Trigger\"`. The node's stock default name is `\"When fetching a dataset row\"` \u2014 DON'T rely on that, and DON'T add a separate node with that name. There is exactly ONE EvaluationTrigger per workflow. Use the explicit name everywhere you reference it (e.g. in setMetrics expressions: `={{ $('Eval Trigger').item.json.expected_output }}`).\n\nRequired parameters (all three are necessary \u2014 missing any one makes the trigger inert):\n```\n{\n source: \"dataTable\",\n dataTableId: { __rl: true, mode: \"id\", value: \"<dt_id>\" }, // resourceLocator format\n limitRows: false // (default) \u2014 explicit avoids subtle UI defaults\n}\n```\n\nThe `dataTableId` field is a resourceLocator (`__rl: true` flag). The `mode: \"id\"` + `value` shape is what gets the trigger to actually pull rows. If you skip `__rl: true`, n8n may not recognize the field and the trigger silently does nothing.\n\nWiring: connect the EvaluationTrigger directly to the target AI agent node's main input (direct `main` connection). Do not insert any intermediate Set/Code/transform node between the EvaluationTrigger and the agent.\n\n### n8n-nodes-base.evaluation (4 operations)\n\n**setInputs**: optional. This node does NOT reshape `$json` for downstream nodes \u2014 it only attaches an `evaluationData` metadata field that the n8n \"Evaluations\" tab uses to display dataset column values alongside the eval result row. The downstream `$json` shape is unchanged. Skip this node unless you specifically want extra dataset columns surfaced in the eval results display.\n\nIf used: place it on the eval branch (e.g. between checkIfEvaluating slot 0 and setOutputs). `inputs.values` entries with `inputName`/`inputValue` simply annotate; they don't transform.\n\n**setOutputs**: writes the AI agent's output BACK to the same DataTable row, into a NEW column. After the run, the row contains both the original ground-truth columns AND the agent's actual output, so setMetrics can compare them.\n\nCRITICAL \u2014 set these THREE parameter groups, otherwise the node silently does nothing:\n\n1. **Pin the source to dataTable.** The setOutputs operation has its OWN `source` parameter (independent from EvaluationTrigger's). The default depends on `typeVersion` \u2014 `googleSheets` for \u2264 4.7, `dataTable` for \u2265 4.8. Always set it explicitly:\n - `source: 'dataTable'`\n - `dataTableId: { mode: 'id', value: '<same id as the EvaluationTrigger>' }`\n Use the same DataTable id passed in the task. Strongly prefer `typeVersion: 4.8` (latest) for the Evaluation node so dataTable is the natural default.\n\n2. **outputName must be a NEW column** distinct from any ground-truth column. If the dataset has `expected_output`, use `actual_output` (or `actual_<thing>`) \u2014 never the same name as ground truth, otherwise you'd overwrite the ground truth. The Evaluation node auto-adds the new column on first eval run.\n\n3. **Sub-field names** are `outputName` and `outputValue` (NOT `name`/`value`).\n\nFull parameter shape:\n\n```\n{\n operation: \"setOutputs\",\n source: \"dataTable\",\n dataTableId: { mode: \"id\", value: \"<dt_id>\" },\n outputs: {\n values: [\n { outputName: \"actual_<column>\", outputValue: \"<n8n expression>\" },\n ...\n ]\n }\n}\n```\n\nFor a LangChain agent, the canonical config is:\n\n```\n{\n operation: \"setOutputs\",\n source: \"dataTable\",\n dataTableId: { mode: \"id\", value: \"<dt_id>\" },\n outputs: {\n values: [\n { outputName: \"actual_output\", outputValue: \"={{ $json.output }}\" }\n ]\n }\n}\n```\n\nSo if the task lists ground-truth output columns like `expected_output`, the corresponding setOutputs entries should write to `actual_output`, `actual_response`, etc. \u2014 pick names that pair naturally with the ground-truth columns. Use snake_case.\n\n**setMetrics**: configures ONE metric per node. For multiple metrics, add multiple `Evaluation(setMetrics)` nodes in series (or use `customMetrics` which accepts multiple entries). The `metric` parameter is a SINGLE string, NOT an array.\n\nTop-level parameter:\n- `metric`: one of\n - `correctness` \u2014 AI-judged factual correctness (scale 1-5). Requires `expectedAnswer` + `actualAnswer`.\n - `helpfulness` \u2014 AI-judged helpfulness (scale 1-5). Requires `userQuery` + `actualAnswer`.\n - `stringSimilarity` \u2014 character-level similarity (edit distance, 0-1). Requires `expectedAnswer` + `actualAnswer`.\n - `categorization` \u2014 exact string match (1 or 0). Requires `expectedAnswer` + `actualAnswer`.\n - `toolsUsed` \u2014 whether tools were used (0-1). No ground-truth fields needed.\n - `customMetrics` \u2014 user-defined metrics (advanced, rarely chosen).\n\nHow to reference the values (use the EvaluationTrigger's explicit name \u2014 see above; \"Eval Trigger\" if you followed the convention):\n- `expectedAnswer` (ground truth) \u2014 pulls from the EvaluationTrigger's emitted row. Example: `={{ $('Eval Trigger').item.json.expected_output }}`.\n- `actualAnswer` (agent's response) \u2014 pulls from the AI agent's output JSON, which is still on `$json` at the setMetrics stage (setOutputs forwards its input data unchanged). Example: `={{ $json.output }}`.\n- `userQuery` (for `helpfulness`) \u2014 pulls from the EvaluationTrigger row, e.g. `={{ $('Eval Trigger').item.json.input }}`.\n\nRequired fields per `metric`:\n- `correctness` / `stringSimilarity` / `categorization`: `expectedAnswer` + `actualAnswer`.\n- `helpfulness`: `userQuery` + `actualAnswer`.\n- `toolsUsed`: no extra required fields.\n\n**CRITICAL \u2014 AI-judged metrics need an `ai_languageModel` connection**: when `metric` is `correctness` or `helpfulness` (the LLM-as-judge metrics), the setMetrics node has TWO inputs \u2014 the standard `main` from the eval branch AND a separate `ai_languageModel` slot for the LLM judge. The node will not work without an LLM connected to the `ai_languageModel` slot.\n\nTo wire this:\n1. Find the LLM model node already used by the AI agent in the workflow (e.g., `@n8n/n8n-nodes-langchain.lmChatOpenAi`, `@n8n/n8n-nodes-langchain.lmChatAnthropic`, etc.). It connects to the agent via `ai_languageModel` connection type.\n2. Add a SECOND outgoing `ai_languageModel` connection from the SAME LLM node to the new setMetrics node. The LLM gets reused \u2014 don't duplicate it.\n3. The connection in `workflow.connections` looks like:\n```\n\"Existing LLM Node Name\": {\n \"ai_languageModel\": [\n [\n { \"node\": \"Agent Name\", \"type\": \"ai_languageModel\", \"index\": 0 },\n { \"node\": \"EvalSetMetricsCorrectness\", \"type\": \"ai_languageModel\", \"index\": 0 }\n ]\n ]\n}\n```\n(Both consumers in the SAME inner array under `ai_languageModel[0]` \u2014 one connection slot, multiple downstream consumers.)\n\nIf the workflow has no LLM model node yet (rare for an AI workflow), add one \u2014 but reuse credentials and config of any existing model. `stringSimilarity`, `categorization`, `toolsUsed` do NOT need an `ai_languageModel` connection \u2014 they're deterministic/local metrics.\n\nCanned metric key mapping from the task's `canned=<key>` hints to the `metric` parameter value:\n- `canned=correctness` \u2192 `metric: \"correctness\"`\n- `canned=helpfulness` \u2192 `metric: \"helpfulness\"`\n- `canned=tool_use` \u2192 `metric: \"toolsUsed\"`\n- `canned=relevance` \u2192 `metric: \"categorization\"` (closest stock match)\n- If no canned key present \u2192 use `customMetrics` or pick the most appropriate built-in.\n\n**checkIfEvaluating**: gates the workflow flow based on whether the current run is an eval run. Place it immediately after the AI agent. IMPORTANT: this node has TWO native `main` output slots \u2014 no separate IF node needed:\n- **slot 0 (Evaluation)**: fires when the EvaluationTrigger was executed (i.e., we are in an eval run). Wire this to setOutputs \u2192 setMetrics.\n- **slot 1 (Normal)**: fires during normal (non-eval) workflow execution. Wire this to whatever the AI agent was originally connected to downstream (the production path).\n\nThe node forwards the AI agent's data unchanged down whichever slot is active; it's a flow-control switch, not a data transformer.\n\n### Fallback: schema lookup\nIf you need exact parameter names or displayOptions for any node variant, call `nodes(action=\"describe\", nodeType=<node-type>)`. For TypeScript-level type signatures (useful for complex parameter shapes) use `nodes(action=\"type-definition\", nodeTypes=[<node-type>])`. Don't guess parameter shapes.\n\n## LangChain AI Agent Output\n\n`@n8n/n8n-nodes-langchain.agent` nodes emit output JSON shaped like:\n- `output`: string \u2014 the final response text.\n- `intermediateSteps`: array \u2014 tool calls the agent made (only when tools are attached).\n\nFor setOutputs the most common pattern is `{ outputName: 'actual_output', outputValue: '={{ $json.output }}' }`. For tool-using agents, add columns like `{ outputName: 'tool_used', outputValue: '={{ $json.intermediateSteps?.[0]?.action?.tool }}' }`.\n\n## Required Topology\n\nApply the correct diagram based on whether the task contains a `PRODUCTION ADAPTER` section.\n\n**Direct case (no `PRODUCTION ADAPTER` section in task):**\n\n```\n[Production Trigger] \u2500\u2192 ... \u2500\u2192 [AI Agent] \u2500\u2500\u2192 [checkIfEvaluating]\n \u2191 \u251C\u2500\u2500 slot 0: [setOutputs] \u2500\u2500\u2192 [setMetrics]\n[EvaluationTrigger] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500 slot 1: [original downstream]\n```\n\n**Adapter case (task contains `PRODUCTION ADAPTER` section):**\n\n```\n[Production Trigger] \u2500\u2192 ... \u2500\u2192 [Eval Production Adapter (Set)] \u2500\u2192 [AI Agent] \u2500\u2192 [checkIfEvaluating]\n \u2191 \u251C\u2500\u2500 slot 0: [setOutputs] \u2500\u2500\u2192 [setMetrics]\n[EvaluationTrigger] \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518 \u2514\u2500\u2500 slot 1: [original downstream]\n```\n\nRules:\n- **Direct case**: EvaluationTrigger connects DIRECTLY to the target AI agent node's `main` input. NO Set/Code/transform node in between. The trigger emits each dataset row column as `$json.<column>`. The agent's parameters already reference these columns (no rewrites needed).\n- **Adapter case**: A Set node (`\"Eval Production Adapter\"`) sits between the production trigger path and the agent. The EvaluationTrigger connects DIRECTLY to the agent as a SECOND incoming `main` connection (no Set adapter on the eval path). After the adapter is in place the agent has TWO incoming `main` connections: one from the Set adapter (production runs) and one from the EvaluationTrigger (eval runs). Both paths produce `$json.<column>` so the rewritten agent parameters resolve in both modes.\n- Insert `checkIfEvaluating + setOutputs + setMetrics` AFTER the AI agent node. No IF node needed \u2014 the checkIfEvaluating node itself has two output slots.\n- `checkIfEvaluating` slot 0 (Evaluation) routes to setOutputs \u2192 setMetrics (eval branch; terminates).\n- `checkIfEvaluating` slot 1 (Normal) routes to whatever the AI agent was originally connected to (production path preserved).\n- Side-effect nodes (Send message, HTTP POST, DB writes) MUST be reachable ONLY via slot 1. This is the core invariant \u2014 it's what makes eval runs safe.\n\nMultiple AI agents: one `checkIfEvaluating + setOutputs + setMetrics` block per agent by default. Your judgment: if multiple agents share output semantics (e.g. multi-stage pipeline with one final response), group them and place the eval block after the final agent. Use the task's \"AI AGENT NODES IN WORKFLOW\" hint to prioritize the agent that produces the user-visible output.\n\n## Error Handling & Validation\n\nAfter patching:\n1. Re-read the workflow using the workflows tool.\n2. Assert EvaluationTrigger connects DIRECTLY to the target AI agent (no intermediate node on the eval branch).\n3. Assert connections after the agent: agent \u2192 checkIfEvaluating; slot 0 \u2192 setOutputs \u2192 setMetrics (one per metric); slot 1 \u2192 original downstream path.\n4. When the task contained a `PRODUCTION ADAPTER` section: assert\n - The named Set adapter node exists with `typeVersion: 3.4`.\n - The Set adapter's `assignments.assignments` array contains EVERY entry from the task spec.\n - The Set adapter's `main` output connects to the agent's `main` input.\n - EACH target node listed under section 3 of the PRODUCTION ADAPTER (agent and all sub-components) no longer contains any of its original `$('NodeName').item.json.<field>` expressions. The agent target's parameters now use `$json.<column>`; sub-component targets (memory, tools, output parsers) use `$('<AgentName>').item.json.<column>` instead \u2014 match each line of the task verbatim.\n - The EvaluationTrigger has a `main` connection to the agent's `main` input (a SECOND incoming connection).\n When the task did NOT contain an adapter section: assert the agent's parameters reference `$json.<column>` for at least one column from the task's INPUT COLUMNS list (existing rule).\n5. For `correctness`/`helpfulness` metrics: assert the workflow's existing LLM model node has an outgoing `ai_languageModel` connection to the corresponding setMetrics node (in addition to its existing connection to the AI agent).\n6. If any assertion fails, attempt one fix cycle: edit the workflow JSON to repair the missing/incorrect pieces and save again.\n7. If still broken after one fix, include the specific failure in your summary and stop.\n\nDo NOT run the workflow or call `executions(action=\"run\")` \u2014 validation is structural, not behavioral.";
@@ -11,7 +11,7 @@ exports.EVAL_SETUP_AGENT_PROMPT = `You are an eval setup specialist for n8n work
11
11
 
12
12
  ## Mandatory Process
13
13
 
14
- 1. **Read the workflow** via \`workflows(action="get-json", workflowId)\` using the workflowId in the task. Identify the AI agent nodes named in the task. Trace the main trigger path.
14
+ 1. **Read the workflow** using the workflows tool with the workflowId in the task. Identify the AI agent nodes named in the task. Trace the main trigger path.
15
15
  2. **Use the DataTable id from the task.** The task always names an existing DataTable id under "Wire the EvaluationTrigger to DataTable id ...". Use it as-is. Do not create, modify rows, or modify schema. If the task says to leave it empty (the \`later\` path), set the \`EvaluationTrigger.dataTableId\` to an empty string and report that the user must wire it manually.
16
16
  3. **Patch the workflow.** Build the eval topology in this order:
17
17
  a. Insert \`EvaluationTrigger\` (\`name: "Eval Trigger"\`).
@@ -20,7 +20,7 @@ exports.EVAL_SETUP_AGENT_PROMPT = `You are an eval setup specialist for n8n work
20
20
  d. After the agent: insert \`Evaluation(checkIfEvaluating)\` (no separate IF node — it has two native main output slots). Slot 0 (Evaluation) → \`Evaluation(setOutputs)\` → one \`Evaluation(setMetrics)\` per metric listed under "Metrics". Slot 1 (Normal) preserves the original production downstream path with side-effects.
21
21
  e. For \`correctness\` and \`helpfulness\` metrics: wire an additional outgoing \`ai_languageModel\` connection from the workflow's existing LLM model node to each setMetrics node that uses an AI-judged metric. The LLM gets reused — same node, additional connection. Without this, AI-judged metrics fail silently.
22
22
  4. **Save** the modified workflow via \`workflows(action="update", ...)\`.
23
- 5. **Validate**: re-read the workflow via \`workflows(action="get-json", workflowId)\` and assert:
23
+ 5. **Validate**: re-read the workflow using the workflows tool and assert:
24
24
  - EvaluationTrigger → target AI agent (direct \`main\` connection, no intermediate node).
25
25
  - Agent → checkIfEvaluating; slot 0 → setOutputs → setMetrics; slot 1 → original downstream path.
26
26
  - When input columns are non-empty, the agent's parameters contain at least one \`{{ $json.<column> }}\` expression matching a column from "Input columns".
@@ -220,7 +220,7 @@ Multiple AI agents: one \`checkIfEvaluating + setOutputs + setMetrics\` block pe
220
220
  ## Error Handling & Validation
221
221
 
222
222
  After patching:
223
- 1. Re-read the workflow: \`workflows(action="get-json", workflowId)\`.
223
+ 1. Re-read the workflow using the workflows tool.
224
224
  2. Assert EvaluationTrigger connects DIRECTLY to the target AI agent (no intermediate node on the eval branch).
225
225
  3. Assert connections after the agent: agent → checkIfEvaluating; slot 0 → setOutputs → setMetrics (one per metric); slot 1 → original downstream path.
226
226
  4. When the task contained a \`PRODUCTION ADAPTER\` section: assert
@@ -34,11 +34,11 @@ export declare const reportVerificationVerdictInputSchema: z.ZodObject<{
34
34
  }>>;
35
35
  summary: z.ZodString;
36
36
  }, "strip", z.ZodTypeAny, {
37
+ verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
37
38
  workItemId: string;
38
39
  workflowId: string;
39
40
  workflowInspection: string;
40
41
  summary: string;
41
- verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
42
42
  diagnosis?: string | undefined;
43
43
  executionId?: string | undefined;
44
44
  failureSignature?: string | undefined;
@@ -53,11 +53,11 @@ export declare const reportVerificationVerdictInputSchema: z.ZodObject<{
53
53
  } | undefined;
54
54
  failedNodeName?: string | undefined;
55
55
  }, {
56
+ verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
56
57
  workItemId: string;
57
58
  workflowId: string;
58
59
  workflowInspection: string;
59
60
  summary: string;
60
- verdict: "trigger_only" | "verified" | "needs_patch" | "needs_rebuild" | "needs_user_input" | "failed_terminal";
61
61
  diagnosis?: string | undefined;
62
62
  executionId?: string | undefined;
63
63
  failureSignature?: string | undefined;
@@ -81,7 +81,7 @@ function defaultRemediationForVerdict(input) {
81
81
  }
82
82
  function createReportVerificationVerdictTool(context) {
83
83
  return new agents_1.Tool('report-verification-verdict')
84
- .description('Report the result of verifying a workflow after building it. ' +
84
+ .description('Report the result of verifying a workflow after building it. Only call in checkpoint follow-up turns. ' +
85
85
  'Call this after inspecting the persisted workflow, running it, and (optionally) debugging a failed execution. ' +
86
86
  'Returns deterministic guidance on what to do next (done, rebuild, or blocked).')
87
87
  .input(exports.reportVerificationVerdictInputSchema)
@@ -1 +1 @@
1
- {"version":3,"file":"report-verification-verdict.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/report-verification-verdict.tool.ts"],"names":[],"mappings":";;;AA0GA,kFA+EC;AA/KD,wCAAmC;AACnC,6BAAwB;AAGxB,2DAA0E;AAC1E,iEAAkG;AAClG,iFAGiD;AAEpC,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IACrF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACpE,WAAW,EAAE,OAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC5E,OAAO,EAAE,+CAAyB,CAAC,QAAQ,CAC1C,6DAA6D;QAC5D,iDAAiD;QACjD,4DAA4D;QAC5D,6EAA6E;QAC7E,4EAA4E;QAC5E,gEAAgE,CACjE;IACD,kBAAkB,EAAE,OAAC;SACnB,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACR,mJAAmJ,CACnJ;IACF,gBAAgB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACR,+IAA+I,CAC/I;IACF,cAAc,EAAE,OAAC;SACf,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,uEAAuE,CAAC;IACnF,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8CAA8C,CAAC;IACzF,KAAK,EAAE,OAAC;SACN,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;SACnB,QAAQ,EAAE;SACV,QAAQ,CACR,8GAA8G,CAC9G;IACF,WAAW,EAAE,OAAC;SACZ,MAAM,CAAC;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,oBAAoB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACvF,IAAI,KAAK,EAAE,eAAe,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;gBACjE,OAAO,CAAC,cAAc,EAAE,CAAC,iCAAiC,EAAE;oBAC3D,SAAS,EAAE,OAAO,CAAC,QAAQ;oBAC3B,MAAM,EAAE,OAAO,CAAC,KAAK;oBACrB,YAAY,EAAE,KAAK,CAAC,UAAU;oBAC9B,WAAW,EAAE,KAAK,CAAC,UAAU;oBAC7B,QAAQ,EAAE,KAAK,CAAC,eAAe,CAAC,QAAQ;oBACxC,aAAa,EAAE,KAAK,CAAC,eAAe,CAAC,YAAY;oBACjD,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,MAAM;iBACpC,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;QAED,OAAO;YACN,QAAQ,EAAE,IAAA,qCAA0B,EAAC,MAAM,EAAE,EAAE,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,CAAC;SAC9E,CAAC;IACH,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"report-verification-verdict.tool.js","sourceRoot":"","sources":["../../../src/tools/orchestration/report-verification-verdict.tool.ts"],"names":[],"mappings":";;;AA0GA,kFA+EC;AA/KD,wCAAmC;AACnC,6BAAwB;AAGxB,2DAA0E;AAC1E,iEAAkG;AAClG,iFAGiD;AAEpC,QAAA,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5D,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oDAAoD,CAAC;IACrF,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACpE,WAAW,EAAE,OAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,gEAAgE,CAAC;IAC5E,OAAO,EAAE,+CAAyB,CAAC,QAAQ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