@n8n/instance-ai 1.15.2 → 1.16.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 (283) hide show
  1. package/README.md +1 -1
  2. package/dist/agent/apply-agent-thinking.js.map +1 -1
  3. package/dist/agent/computer-use-prompt.js.map +1 -1
  4. package/dist/agent/instance-agent.js.map +1 -1
  5. package/dist/agent/mcp-tool-name-validation.js.map +1 -1
  6. package/dist/agent/runtime-workspace.js.map +1 -1
  7. package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
  8. package/dist/agent/shared-prompts.js +5 -3
  9. package/dist/agent/shared-prompts.js.map +1 -1
  10. package/dist/agent/sub-agent-briefing.js.map +1 -1
  11. package/dist/agent/sub-agent-debriefing.d.ts +14 -14
  12. package/dist/agent/sub-agent-debriefing.js.map +1 -1
  13. package/dist/agent/sub-agent-factory.js.map +1 -1
  14. package/dist/agent/system-prompt.js +29 -18
  15. package/dist/agent/system-prompt.js.map +1 -1
  16. package/dist/build.tsbuildinfo +1 -1
  17. package/dist/constants/max-steps.d.ts +0 -1
  18. package/dist/constants/max-steps.js +0 -1
  19. package/dist/constants/max-steps.js.map +1 -1
  20. package/dist/debug/run-debug-buffer.js.map +1 -1
  21. package/dist/debug/sanitize-debug-snapshot.js.map +1 -1
  22. package/dist/domain-access/domain-access-tracker.js.map +1 -1
  23. package/dist/domain-access/domain-gating.d.ts +6 -6
  24. package/dist/domain-access/domain-gating.js.map +1 -1
  25. package/dist/error-formatting.js.map +1 -1
  26. package/dist/errors/workflow-save-conflict.error.d.ts +4 -0
  27. package/dist/errors/workflow-save-conflict.error.js +13 -0
  28. package/dist/errors/workflow-save-conflict.error.js.map +1 -0
  29. package/dist/event-bus/event-bus.interface.d.ts +1 -1
  30. package/dist/index.d.ts +3 -4
  31. package/dist/index.js +8 -4
  32. package/dist/index.js.map +1 -1
  33. package/dist/knowledge-base/build-templates-index.js.map +1 -1
  34. package/dist/knowledge-base/extract-builder-templates-archive.js.map +1 -1
  35. package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -1
  36. package/dist/mcp/mcp-client-manager.js.map +1 -1
  37. package/dist/memory/title-utils.js.map +1 -1
  38. package/dist/parsers/docx-parser.js +1 -34
  39. package/dist/parsers/docx-parser.js.map +1 -1
  40. package/dist/parsers/html-parser.js +2 -35
  41. package/dist/parsers/html-parser.js.map +1 -1
  42. package/dist/parsers/ooxml-guard.js.map +1 -1
  43. package/dist/parsers/pdf-parser.js +2 -35
  44. package/dist/parsers/pdf-parser.js.map +1 -1
  45. package/dist/parsers/structured-file-parser.js.map +1 -1
  46. package/dist/parsers/validate-attachments.js.map +1 -1
  47. package/dist/parsers/xlsx-parser.js +1 -34
  48. package/dist/parsers/xlsx-parser.js.map +1 -1
  49. package/dist/planned-tasks/planned-task-permissions.d.ts +2 -2
  50. package/dist/planned-tasks/planned-task-permissions.js.map +1 -1
  51. package/dist/planned-tasks/planned-task-service.js +0 -3
  52. package/dist/planned-tasks/planned-task-service.js.map +1 -1
  53. package/dist/runtime/background-task-manager.js.map +1 -1
  54. package/dist/runtime/liveness-policy.js.map +1 -1
  55. package/dist/runtime/memory-task-registry.js.map +1 -1
  56. package/dist/runtime/orchestrator-identity.js.map +1 -1
  57. package/dist/runtime/orchestrator-run-control.js.map +1 -1
  58. package/dist/runtime/resumable-stream-executor.js +12 -1
  59. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  60. package/dist/runtime/run-state-registry.js.map +1 -1
  61. package/dist/runtime/stream-runner.js.map +1 -1
  62. package/dist/runtime/terminal-response-guard.js.map +1 -1
  63. package/dist/skills/materialize-runtime-skills.js.map +1 -1
  64. package/dist/skills/runtime-skills.js +5 -1
  65. package/dist/skills/runtime-skills.js.map +1 -1
  66. package/dist/source-map-filter.d.ts +1 -17
  67. package/dist/source-map-filter.js +1 -0
  68. package/dist/source-map-filter.js.map +1 -1
  69. package/dist/storage/iteration-log.js.map +1 -1
  70. package/dist/storage/planned-task-storage.js.map +1 -1
  71. package/dist/storage/terminal-outcome-storage.d.ts +10 -10
  72. package/dist/storage/terminal-outcome-storage.js.map +1 -1
  73. package/dist/storage/thread-iteration-log-storage.js.map +1 -1
  74. package/dist/storage/thread-patch.js.map +1 -1
  75. package/dist/storage/thread-task-storage.js.map +1 -1
  76. package/dist/storage/workflow-loop-storage.d.ts +246 -136
  77. package/dist/storage/workflow-loop-storage.js.map +1 -1
  78. package/dist/stream/consume-with-hitl.js.map +1 -1
  79. package/dist/stream/map-chunk.js +2 -0
  80. package/dist/stream/map-chunk.js.map +1 -1
  81. package/dist/stream/output-redaction.js.map +1 -1
  82. package/dist/stream/usage-accumulator.d.ts +12 -12
  83. package/dist/stream/usage-accumulator.js.map +1 -1
  84. package/dist/stream/work-summary-accumulator.d.ts +6 -6
  85. package/dist/stream/work-summary-accumulator.js.map +1 -1
  86. package/dist/tool-registry.js.map +1 -1
  87. package/dist/tools/attachments/parse-file.tool.d.ts +32 -32
  88. package/dist/tools/attachments/parse-file.tool.js.map +1 -1
  89. package/dist/tools/credentials.tool.d.ts +10 -7
  90. package/dist/tools/credentials.tool.js +41 -5
  91. package/dist/tools/credentials.tool.js.map +1 -1
  92. package/dist/tools/data-tables.tool.js.map +1 -1
  93. package/dist/tools/evals/analyze-agent-input-columns.service.js.map +1 -1
  94. package/dist/tools/evals/apply-pin-data.service.js.map +1 -1
  95. package/dist/tools/evals/column-ref-utils.js.map +1 -1
  96. package/dist/tools/evals/describe-metric-for-workflow.service.js.map +1 -1
  97. package/dist/tools/evals/detect-agent-named-refs.service.js.map +1 -1
  98. package/dist/tools/evals/detect-ai-nodes.js.map +1 -1
  99. package/dist/tools/evals/detect-tool-refs.service.js.map +1 -1
  100. package/dist/tools/evals/ensure-eval-data-table.service.js.map +1 -1
  101. package/dist/tools/evals/eval-config.tool.d.ts +4 -0
  102. package/dist/tools/evals/eval-config.tool.js +205 -0
  103. package/dist/tools/evals/eval-config.tool.js.map +1 -0
  104. package/dist/tools/evals/eval-data-requirements.service.js.map +1 -1
  105. package/dist/tools/evals/evals.tool.js +6 -1
  106. package/dist/tools/evals/evals.tool.js.map +1 -1
  107. package/dist/tools/evals/extract-rows-from-history.service.js.map +1 -1
  108. package/dist/tools/evals/format-eval-setup-task.js.map +1 -1
  109. package/dist/tools/evals/generate-sample-rows.service.js.map +1 -1
  110. package/dist/tools/evals/generate-tool-ref-pin-data.service.js.map +1 -1
  111. package/dist/tools/evals/metric-catalog.d.ts +1 -1
  112. package/dist/tools/evals/metric-catalog.js.map +1 -1
  113. package/dist/tools/executions.tool.js.map +1 -1
  114. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  115. package/dist/tools/index.js +13 -2
  116. package/dist/tools/index.js.map +1 -1
  117. package/dist/tools/n8n-docs/ranking.js.map +1 -1
  118. package/dist/tools/n8n-docs/registry.js.map +1 -1
  119. package/dist/tools/n8n-docs/schemas.d.ts +44 -44
  120. package/dist/tools/n8n-docs/schemas.js.map +1 -1
  121. package/dist/tools/n8n-docs.tool.js +1 -1
  122. package/dist/tools/n8n-docs.tool.js.map +1 -1
  123. package/dist/tools/nodes/node-search-engine.js.map +1 -1
  124. package/dist/tools/nodes/node-search-engine.types.d.ts +1 -1
  125. package/dist/tools/nodes/preferred-chat-model.js.map +1 -1
  126. package/dist/tools/nodes.tool.d.ts +21 -0
  127. package/dist/tools/nodes.tool.js +21 -13
  128. package/dist/tools/nodes.tool.js.map +1 -1
  129. package/dist/tools/orchestration/agent-persistence.js.map +1 -1
  130. package/dist/tools/orchestration/agent-target-binding.d.ts +19 -0
  131. package/dist/tools/orchestration/agent-target-binding.js +45 -0
  132. package/dist/tools/orchestration/agent-target-binding.js.map +1 -0
  133. package/dist/tools/orchestration/build-agent.tool.d.ts +2 -0
  134. package/dist/tools/orchestration/build-agent.tool.js +194 -0
  135. package/dist/tools/orchestration/build-agent.tool.js.map +1 -0
  136. package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
  137. package/dist/tools/orchestration/display-utils.js.map +1 -1
  138. package/dist/tools/orchestration/eval-data-agent.tool.js.map +1 -1
  139. package/dist/tools/orchestration/eval-setup-agent.tool.js.map +1 -1
  140. package/dist/tools/orchestration/plan.tool.d.ts +2 -2
  141. package/dist/tools/orchestration/plan.tool.js +10 -7
  142. package/dist/tools/orchestration/plan.tool.js.map +1 -1
  143. package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +12 -12
  144. package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
  145. package/dist/tools/orchestration/tracing-utils.js.map +1 -1
  146. package/dist/tools/orchestration/verification/analyze-result.d.ts +4 -0
  147. package/dist/tools/orchestration/verification/analyze-result.js +17 -3
  148. package/dist/tools/orchestration/verification/analyze-result.js.map +1 -1
  149. package/dist/tools/orchestration/verification/finalize-result.js +4 -2
  150. package/dist/tools/orchestration/verification/finalize-result.js.map +1 -1
  151. package/dist/tools/orchestration/verification/prepare-run.js.map +1 -1
  152. package/dist/tools/orchestration/verification/reconcile-plan.d.ts +10 -0
  153. package/dist/tools/orchestration/verification/reconcile-plan.js +33 -0
  154. package/dist/tools/orchestration/verification/reconcile-plan.js.map +1 -0
  155. package/dist/tools/orchestration/verification/resolve-target.js.map +1 -1
  156. package/dist/tools/orchestration/verification/types.d.ts +2 -1
  157. package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +6 -6
  158. package/dist/tools/orchestration/verify-built-workflow.tool.js +13 -2
  159. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  160. package/dist/tools/research.tool.js +1 -34
  161. package/dist/tools/research.tool.js.map +1 -1
  162. package/dist/tools/shared/ask-user.tool.d.ts +4 -4
  163. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  164. package/dist/tools/task-control.tool.js.map +1 -1
  165. package/dist/tools/templates.tool.d.ts +2 -0
  166. package/dist/tools/templates.tool.js +20 -0
  167. package/dist/tools/templates.tool.js.map +1 -0
  168. package/dist/tools/tool-ids.d.ts +25 -22
  169. package/dist/tools/tool-ids.js +6 -6
  170. package/dist/tools/tool-ids.js.map +1 -1
  171. package/dist/tools/web-research/sanitize-web-content.js.map +1 -1
  172. package/dist/tools/workflows/apply-workflow-credentials.tool.js +24 -7
  173. package/dist/tools/workflows/apply-workflow-credentials.tool.js.map +1 -1
  174. package/dist/tools/workflows/build-workflow.tool.d.ts +6 -6
  175. package/dist/tools/workflows/build-workflow.tool.js +63 -7
  176. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  177. package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
  178. package/dist/tools/workflows/credential-url-resolver.js.map +1 -1
  179. package/dist/tools/workflows/credential-utils.d.ts +4 -4
  180. package/dist/tools/workflows/credential-utils.js +2 -1
  181. package/dist/tools/workflows/credential-utils.js.map +1 -1
  182. package/dist/tools/workflows/detect-array-input-collapse.js.map +1 -1
  183. package/dist/tools/workflows/detect-wrong-kind-locator.js.map +1 -1
  184. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
  185. package/dist/tools/workflows/materialize-node-type.tool.d.ts +4 -4
  186. package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
  187. package/dist/tools/workflows/plan-verification-simulation.js.map +1 -1
  188. package/dist/tools/workflows/reconcile-simulation-plan.d.ts +9 -0
  189. package/dist/tools/workflows/reconcile-simulation-plan.js +70 -0
  190. package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -0
  191. package/dist/tools/workflows/resolve-credentials.d.ts +4 -0
  192. package/dist/tools/workflows/resolve-credentials.js +86 -4
  193. package/dist/tools/workflows/resolve-credentials.js.map +1 -1
  194. package/dist/tools/workflows/resolved-credential.schema.d.ts +30 -0
  195. package/dist/tools/workflows/resolved-credential.schema.js +18 -0
  196. package/dist/tools/workflows/resolved-credential.schema.js.map +1 -0
  197. package/dist/tools/workflows/setup-workflow.schema.d.ts +46 -46
  198. package/dist/tools/workflows/setup-workflow.service.js +109 -19
  199. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  200. package/dist/tools/workflows/summarize-workflow.js +1 -34
  201. package/dist/tools/workflows/summarize-workflow.js.map +1 -1
  202. package/dist/tools/workflows/validate-workflow.service.js +79 -4
  203. package/dist/tools/workflows/validate-workflow.service.js.map +1 -1
  204. package/dist/tools/workflows/workflow-build-context.js.map +1 -1
  205. package/dist/tools/workflows/workflow-build-remediation.d.ts +1 -0
  206. package/dist/tools/workflows/workflow-build-remediation.js +11 -0
  207. package/dist/tools/workflows/workflow-build-remediation.js.map +1 -1
  208. package/dist/tools/workflows/workflow-build-reporting.js.map +1 -1
  209. package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
  210. package/dist/tools/workflows/workflow-build-telemetry.d.ts +1 -1
  211. package/dist/tools/workflows/workflow-build-telemetry.js.map +1 -1
  212. package/dist/tools/workflows/workflow-file-bindings.d.ts +9 -0
  213. package/dist/tools/workflows/workflow-file-bindings.js +50 -0
  214. package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
  215. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  216. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
  217. package/dist/tools/workflows/workflow-validation-warnings.js.map +1 -1
  218. package/dist/tools/workflows/write-sandbox-file.tool.d.ts +2 -2
  219. package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
  220. package/dist/tools/workflows.tool.js +14 -34
  221. package/dist/tools/workflows.tool.js.map +1 -1
  222. package/dist/tools/workspace.tool.js.map +1 -1
  223. package/dist/tracing/langsmith-tracing.js.map +1 -1
  224. package/dist/tracing/trace-labels.js.map +1 -1
  225. package/dist/tracing/trace-payloads.js.map +1 -1
  226. package/dist/tracing/trace-replay.js.map +1 -1
  227. package/dist/types.d.ts +104 -7
  228. package/dist/types.js +7 -3
  229. package/dist/types.js.map +1 -1
  230. package/dist/utils/agent-feature-enabled.d.ts +1 -0
  231. package/dist/utils/agent-feature-enabled.js +12 -0
  232. package/dist/utils/agent-feature-enabled.js.map +1 -0
  233. package/dist/utils/agent-tree.js.map +1 -1
  234. package/dist/utils/eval-agents.d.ts +1 -1
  235. package/dist/utils/eval-agents.js.map +1 -1
  236. package/dist/utils/format-timestamp.js.map +1 -1
  237. package/dist/utils/generate-validated-json.js.map +1 -1
  238. package/dist/utils/stream-helpers.js.map +1 -1
  239. package/dist/workflow-builder/build-failure-tracker.js.map +1 -1
  240. package/dist/workflow-loop/guidance.js.map +1 -1
  241. package/dist/workflow-loop/remediation.js.map +1 -1
  242. package/dist/workflow-loop/runtime.js.map +1 -1
  243. package/dist/workflow-loop/setup-verification-policy.js.map +1 -1
  244. package/dist/workflow-loop/verification-obligation.js.map +1 -1
  245. package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
  246. package/dist/workflow-loop/workflow-loop-state.d.ts +319 -167
  247. package/dist/workflow-loop/workflow-loop-state.js +8 -1
  248. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  249. package/dist/workflow-loop/workflow-task-service.js.map +1 -1
  250. package/dist/workspace/builder-templates-service.js.map +1 -1
  251. package/dist/workspace/compute-workspace-content-hash.js.map +1 -1
  252. package/dist/workspace/create-workspace.js.map +1 -1
  253. package/dist/workspace/lazy-runtime-workspace.d.ts +1 -0
  254. package/dist/workspace/lazy-runtime-workspace.js +12 -1
  255. package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
  256. package/dist/workspace/pack-workspace-sdk.js.map +1 -1
  257. package/dist/workspace/prebaked-workspace-bundle.js.map +1 -1
  258. package/dist/workspace/sandbox-fs.js.map +1 -1
  259. package/dist/workspace/sandbox-setup.js.map +1 -1
  260. package/dist/workspace/scoped-workspace.js.map +1 -1
  261. package/dist/workspace/snapshot-image-context.js.map +1 -1
  262. package/dist/workspace/snapshot-manager.js.map +1 -1
  263. package/dist/workspace/template-telemetry.js.map +1 -1
  264. package/dist/workspace/workspace-file-content.js.map +1 -1
  265. package/dist/workspace/workspace-files.js.map +1 -1
  266. package/dist/workspace/workspace-manifest.js.map +1 -1
  267. package/dist/workspace/workspace-paths.js.map +1 -1
  268. package/package.json +13 -10
  269. package/skills/credential-setup-with-computer-use/SKILL.md +3 -2
  270. package/skills/data-table-manager/SKILL.md +3 -3
  271. package/skills/intent-recognition/SKILL.md +269 -0
  272. package/skills/n8n-docs-assistant/SKILL.md +6 -3
  273. package/skills/planned-task-runtime/SKILL.md +12 -14
  274. package/skills/planning/SKILL.md +12 -11
  275. package/skills/post-build-flow/SKILL.md +9 -0
  276. package/skills/workflow-builder/SKILL.md +55 -3
  277. package/skills/workflow-builder/references/compositional-workflows.md +1 -2
  278. package/dist/tools/orchestration/delegate.schemas.d.ts +0 -44
  279. package/dist/tools/orchestration/delegate.schemas.js +0 -46
  280. package/dist/tools/orchestration/delegate.schemas.js.map +0 -1
  281. package/dist/tools/orchestration/delegate.tool.d.ts +0 -18
  282. package/dist/tools/orchestration/delegate.tool.js +0 -334
  283. package/dist/tools/orchestration/delegate.tool.js.map +0 -1
@@ -16,8 +16,8 @@ platforms:
16
16
  # Data Table Manager
17
17
 
18
18
  Use this skill to build and maintain n8n Data Tables in the current turn with
19
- `data-tables` and, for attachments, `parse-file`. Do not delegate, spawn a
20
- sub-agent, or create a background plan for data-table-only work.
19
+ `data-tables` and, for attachments, `parse-file`. Do not spawn another agent or
20
+ create a background plan for data-table-only work.
21
21
 
22
22
  Also load this skill before planning or building a workflow whose trigger,
23
23
  processing steps, or outputs create, inspect, or write Data Table records, then
@@ -40,7 +40,7 @@ can target rows with narrow filters.
40
40
  4. Inspect schema before writes, deletes, column changes, imports into an
41
41
  existing table, and workflow-facing summaries.
42
42
  5. Execute the smallest direct tool sequence. Prefer read -> decide -> write;
43
- never use create-tasks or delegate for standalone table work.
43
+ never use create-tasks for standalone table work.
44
44
  6. Close with facts: table name, table ID when available, project if relevant,
45
45
  columns changed, row counts inserted/updated/deleted, skipped rows, and any
46
46
  approval or permission blocker.
@@ -0,0 +1,269 @@
1
+ ---
2
+ name: intent-recognition
3
+ description: >-
4
+ Classifies automation requests using two decisions: anchor (which primitive
5
+ owns the top-level control flow — workflow-anchored, agent-anchored,
6
+ needs-clarification, or out-of-scope) and embeds_other (whether the other
7
+ primitive appears embedded inside — an agent step inside a workflow, or a
8
+ workflow invoked as an agent tool). Must be used before deciding the intent
9
+ of any automation request, including compound requests with multiple
10
+ independent automations, mid-build extensions to an existing workflow or
11
+ agent, and requests that need clarification before an anchor can be chosen,
12
+ before choosing workflow-builder, planning, or an agent-oriented design.
13
+ ---
14
+
15
+ # Intent recognition
16
+
17
+ ## Purpose
18
+
19
+ Use this skill to classify an automation request before designing or building
20
+ it. This skill must be used before deciding whether a request is
21
+ workflow-anchored, agent-anchored, needs clarification, or out of scope, and
22
+ before deciding whether the other primitive is embedded inside it. The
23
+ deciding question is not a single "workflow or agent" label — it is two
24
+ questions: who owns the top-level control flow, and does the other primitive
25
+ show up inside that flow.
26
+
27
+ If the user asked to build, route on the result: workflow-builder for
28
+ workflow-anchored (a bounded LLM step is an AI node in the graph; an embedded
29
+ agent is an AI Agent step inside it), an agent-oriented design for
30
+ agent-anchored (a tool-use loop; build reusable actions as workflows the
31
+ agent invokes), `ask-user` for needs-clarification, or answer directly for
32
+ out-of-scope.
33
+
34
+ ## Inputs
35
+
36
+ - The user's request or scenario prompt.
37
+ - Whether the user is mid-build on an existing workflow or agent in this
38
+ conversation — incremental requests default to extending that primitive.
39
+ - Any explicit constraints about determinism, auditability, latency, cost,
40
+ compliance, reusability, or allowed tools.
41
+ - If the request is underspecified on an anchor-deciding axis, ask for the
42
+ missing detail instead of guessing.
43
+
44
+ ## Decisions
45
+
46
+ Two orthogonal decisions per request, or per part for compound requests:
47
+
48
+ **1. Anchor** — which primitive owns the top-level control flow:
49
+
50
+ - **workflow-anchored**: the outer shell is a workflow graph. May include LLM
51
+ steps as bounded transformers (classify, extract, summarize, score, a
52
+ single decision feeding fixed branches).
53
+ - **agent-anchored**: an agent owns the flow; the LLM decides the next step
54
+ at runtime.
55
+ - **needs-clarification**: the request is under-specified on an
56
+ anchor-deciding axis.
57
+ - **out-of-scope**: not a build intent at all. Covers meta or product
58
+ questions (e.g. asking what the assistant is capable of building) and
59
+ one-off content tasks with no trigger, no persistence, and no reuse intent
60
+ (summarize, translate, or draft something once) — answer or do these
61
+ directly instead of building an automation. Requests to operate on
62
+ existing resources (debugging a failed execution, listing or managing
63
+ workflows, querying data) are not classified by this skill at all — route
64
+ them through their normal paths.
65
+
66
+ **2. Embeds other** — whether the other primitive appears inside the anchor:
67
+
68
+ - workflow-anchored + `true`: an agent embedded as a workflow step (e.g. a
69
+ scheduled pipeline whose middle step is open-ended investigation).
70
+ - agent-anchored + `true`: workflows invoked as tools of the agent —
71
+ especially when the user wants reusable or manually-triggerable actions, or
72
+ an action is itself a deterministic multi-step procedure.
73
+ - `n/a` for needs-clarification and out-of-scope.
74
+
75
+ **Migration from the old taxonomy**: old **hybrid** → workflow-anchored,
76
+ `embeds_other: false`. Old **single AI task** → out-of-scope when it is a
77
+ one-off request (do the task directly); workflow-anchored with one LLM step
78
+ only when the user wants a persistent, triggerable automation. Old
79
+ **ambiguous** → needs-clarification. Old **workflow** and **agent** map
80
+ directly onto the matching anchor value.
81
+
82
+ ## Decision Steps
83
+
84
+ 0. If the user is mid-build on an existing workflow or agent, apply context
85
+ continuity (see Signals) before anything else — an incremental request
86
+ normally extends the current primitive.
87
+ 1. If the request is not a build intent — a meta or product question, or a
88
+ one-off content task with no trigger or reuse — classify **out-of-scope**
89
+ and answer or do it directly.
90
+ 2. Split the request into parts only if it contains multiple independent
91
+ automations with separate lifecycles (unrelated triggers, audiences, or
92
+ cadences). Markers like numbering or "and separately" are a giveaway but
93
+ are not required — a single plain sentence can contain two automations.
94
+ Do not split a single automation that merely enumerates many tools or
95
+ steps. Run steps 3-7 on each part.
96
+ 3. Test the agent signals. If any one holds, classify **agent-anchored**.
97
+ 4. Otherwise, test the workflow conditions. If all of them hold, classify
98
+ **workflow-anchored**.
99
+ 5. Decide `embeds_other` in both directions: does an agent step appear inside
100
+ this workflow, or does this agent invoke workflows as tools?
101
+ 6. If the request is under-specified on an anchor-deciding axis (rule-based
102
+ vs judgment-based, scope/autonomy, interaction mode), classify
103
+ **needs-clarification** and name the missing axis instead of guessing.
104
+ 7. If both anchors are genuinely defensible, apply the growth tiebreaker:
105
+ prefer whichever primitive scales with likely complexity growth — usually
106
+ agent-anchored when novel situations, longer horizons, or learning are
107
+ implied. The tiebreaker applies only to genuine ties: when a bounded
108
+ workflow reading fully satisfies the request, prefer it. If it is a real
109
+ toss-up, say so and name both readings instead of feigning certainty.
110
+
111
+ ## Signals
112
+
113
+ **Agent-anchored** (any one is enough):
114
+
115
+ - Reasoning dominates the flow: investigate, decide, act, iterate.
116
+ - Multi-session or long-running: coordination across days, tracked open
117
+ threads, daily check-ins.
118
+ - Proactive or heartbeat-driven: wakes on its own, checks state, decides
119
+ whether to intervene.
120
+ - Self-improving or skill accretion is first-class: learns from feedback
121
+ over time, gets better at the task.
122
+ - Chat or session-based interaction.
123
+ - Cross-session memory.
124
+
125
+ **Workflow-anchored** (all must hold):
126
+
127
+ - Structure is a graph of enumerable steps.
128
+ - Any LLM use is a bounded transformer: fixed-label classify, extract,
129
+ summarize, or a single decision.
130
+ - Trigger and actions are deterministic.
131
+ - Reproducibility or auditability is served by the same graph running every
132
+ time.
133
+
134
+ **Embeds-other signals**:
135
+
136
+ - Workflow with an embedded agent: a step in an otherwise fixed pipeline is
137
+ open-ended ("figure out why", "investigate", "decide what to do about it")
138
+ while the trigger and surrounding steps stay deterministic.
139
+ - The embedding is often implicit — the request never says "agent". Ask of
140
+ each step: could a fixed-instruction transform do it (enumerable labels,
141
+ one bounded rewrite), or does doing it well require gathering and weighing
142
+ context that differs per item, then producing a judgment? A nightly job
143
+ that drafts a tailored renewal pitch for each account from its usage
144
+ history embeds an agent; a nightly job that condenses each ticket into a
145
+ two-sentence summary does not.
146
+ - Agent with workflow tools: the user asks for actions that should also be
147
+ reusable, callable manually, or run outside the agent; or an action the
148
+ agent invokes is itself a deterministic multi-step procedure.
149
+
150
+ **Context continuity** (step 0): inside a workflow build, a request to insert
151
+ a scoring step stays a bounded LLM step, not a new agent. Inside an agent
152
+ build, a request to post an update on completion is a new tool on that
153
+ agent, not a spawned workflow. Only cross into the other primitive when the
154
+ incremental request itself carries its own anchor signal — and even then,
155
+ prefer asking before switching paradigm if it isn't clearly load-bearing.
156
+
157
+ **Clarify triggers**: rule-based vs judgment-based (what defines "important"
158
+ or "urgent"?), scope/autonomy (act on its own vs draft for review),
159
+ interaction mode (one-shot vs chat). Do not clarify when the criterion could
160
+ defensibly go either way — that is a genuine tie, name both readings
161
+ instead.
162
+
163
+ **False friends — not signals**:
164
+
165
+ - Surface vocabulary: "agent", "assistant", "bot", "workflow", "automate" in
166
+ the request text carry no weight. Classify the shape, not the words.
167
+ - Step count and tool count: long linear pipelines and high tool counts are
168
+ not agentic. Seven deterministic steps with zero branches is still a
169
+ workflow.
170
+
171
+ ## Examples
172
+
173
+ - "Every day at 6pm, pull today's Shopify order count and post it to a
174
+ Discord channel." -> **workflow-anchored**, `embeds_other: false`: fixed
175
+ schedule, source, and destination.
176
+ - "When a new Jira issue is created, classify it as bug/feature/question and
177
+ route it to the matching Discord channel." -> **workflow-anchored**,
178
+ `embeds_other: false`: bounded classification feeding fixed routing (would
179
+ have been **hybrid** under the old taxonomy).
180
+ - "Every night, gather the day's failed background jobs, dig into the logs
181
+ and recent deploys to work out why each one failed, and post a write-up to
182
+ a Notion page." -> **workflow-anchored**, `embeds_other: true`: schedule
183
+ and destination are fixed; "work out why" is open-ended investigation, best
184
+ run as an embedded agent step.
185
+ - "Give me a chat window where I can ask about our expense-reporting rules
186
+ and get answers pulled from the finance handbook." -> **agent-anchored**,
187
+ `embeds_other: false`: chat interaction, the LLM decides what to look up
188
+ each turn.
189
+ - "Build an ops agent that can check server health, restart services via our
190
+ runbook, and file a Jira ticket if it can't resolve things — the restart
191
+ and ticket-filing should also be triggerable manually elsewhere." ->
192
+ **agent-anchored**, `embeds_other: true`: explicitly reusable actions are
193
+ workflows the agent calls as tools.
194
+ - "Have an agent keep an eye on our AWS spend throughout the day and flag me
195
+ before we blow through budget, without me asking it to check." ->
196
+ **agent-anchored**, `embeds_other: false`: proactive, heartbeat-driven,
197
+ no fixed check schedule.
198
+ - "Build an agent that drafts replies to Notion comment threads and sharpens
199
+ its sense of our tone the more we correct it." -> **agent-anchored**,
200
+ `embeds_other: false`: skill accretion from feedback is first-class.
201
+ - "Put an agent in charge of coordinating our office relocation — track
202
+ vendors, follow up with each team lead, and send reminders through our
203
+ existing reminder workflow when a task stalls." -> **agent-anchored**,
204
+ `embeds_other: true`: long-running coordination invoking a workflow tool.
205
+ - "Configure an AI agent to send me a nightly digest of new GitHub stars."
206
+ -> **workflow-anchored**, `embeds_other: false`: fixed schedule and action
207
+ despite the word "agent" — a false friend.
208
+ - "Spin up a lightweight workflow that talks to shoppers on our storefront
209
+ and handles their product questions." -> **agent-anchored**: chat-based
210
+ Q&A means the LLM owns turn-by-turn control despite the word "workflow" —
211
+ a false friend in the other direction.
212
+ - "Post every new Airtable record to a Discord channel, and separately set up
213
+ an agent that handles customer refund requests end-to-end." -> two parts,
214
+ joined only by topic, not data or trigger: "Airtable-to-Discord posting"
215
+ (**workflow-anchored**, `embeds_other: false`) and "refund-handling agent"
216
+ (**agent-anchored**, `embeds_other: true`).
217
+ - "Transcribe my sales calls and chase the deals that go quiet." -> two
218
+ parts despite the plain single sentence: transcription is a bounded
219
+ per-call pipeline (**workflow-anchored**, `embeds_other: false`), while
220
+ chasing stalled deals is an ongoing judgment-driven automation with its
221
+ own lifecycle (**agent-anchored**).
222
+ - "Set up a research helper capable of searching the web, querying our
223
+ internal wiki, pulling numbers from Google Analytics, and drafting a slide
224
+ deck that summarizes the findings." -> one part, **agent-anchored**,
225
+ `embeds_other: true`: many tools but one lifecycle — do not split on tool
226
+ count.
227
+ - "Tell me when something important happens with our shipments." ->
228
+ **needs-clarification**: "important" is undefined; ask whether concrete
229
+ rules exist or this needs judgment-based triage.
230
+
231
+ ## Gotchas
232
+
233
+ - Do not label a request agent-anchored just because it is long, multi-step,
234
+ or mentions AI.
235
+ - Do not label classify-then-route as agent-anchored unless the model
236
+ repeatedly decides the next action after observing prior results.
237
+ - Do not force vague prompts into an anchor; ask when an anchor-deciding
238
+ axis is missing.
239
+ - Never default `embeds_other` to `false` without checking both directions:
240
+ an agent step hiding inside a workflow, and a workflow acting as an
241
+ agent's tool.
242
+ - Never split a compound request on tool or step enumeration alone — split
243
+ only on separate lifecycles.
244
+ - Unnecessary agency adds latency, cost, and compounding error risk — do not
245
+ reach for an agent when a bounded workflow fully satisfies the request.
246
+ - Do not use an agent when progress cannot be verified: if the path cannot
247
+ be scripted and the result cannot be checked, the design is not ready.
248
+ - Respect the current build context: an incremental request stays on the
249
+ active primitive unless it carries its own anchor signal.
250
+ - Keep n8n framing clear: agents operate inside workflow guardrails; they do
251
+ not replace the workflow engine.
252
+
253
+ ## Output Format
254
+
255
+ Return a concise classification and reason:
256
+
257
+ ```text
258
+ Anchor: workflow-anchored | agent-anchored | needs-clarification | out-of-scope
259
+ Embeds other: true | false | n/a
260
+ Reason: <one or two sentences citing the deciding signals>
261
+ Next step: <build workflow / build workflow with embedded agent step / design agent (workflows as tools where actions should be reusable) / ask clarification / answer directly>
262
+ ```
263
+
264
+ For build requests, do not expose this format unless the user asks for
265
+ classification. Instead, proceed according to the selected next step. When
266
+ the user asks for classification in a specific format, such as a JSON block,
267
+ follow that format and map the vocabulary accordingly (workflow-anchored,
268
+ agent-anchored, needs-clarification, out-of-scope, and their equivalents).
269
+ For compound requests, output one classification block per part.
@@ -16,11 +16,14 @@ recommended_tools:
16
16
  Use this skill when the user asks how to configure, set up, troubleshoot, or
17
17
  understand n8n behavior and the answer should come from current n8n docs.
18
18
 
19
+ Before calling `n8n-docs`, load it via `load_tool` (search "n8n docs" if it is
20
+ not visible).
21
+
19
22
  ## Default Procedure
20
23
 
21
- 1. Call `n8n-docs(action="lookup")` first for credential setup and direct n8n
22
- docs questions. Use `search` then `read` only when you need tighter control
23
- over candidate pages.
24
+ 1. Load `n8n-docs` via `load_tool` if needed, then call `n8n-docs(action="lookup")`
25
+ first for credential setup and direct n8n docs questions. Use `search` then
26
+ `read` only when you need tighter control over candidate pages.
24
27
  2. For credential setup, pass `intent: "credential-setup"` and all available
25
28
  context fields: `credentialType`, `credentialDisplayName`,
26
29
  `documentationUrl`, `oauthRedirectUrl`, and `nodeType`.
@@ -3,13 +3,12 @@ name: planned-task-runtime
3
3
  description: >-
4
4
  Handles system follow-up turns: planned-task-follow-up (synthesize, replan,
5
5
  build-workflow, checkpoint), background-task-completed, running-tasks context,
6
- create-tasks silence rules, and detached delegate completion. Load whenever
7
- any of these tags appear or after spawning create-tasks or delegate.
6
+ and create-tasks silence rules. Load whenever any of these tags appear or
7
+ after calling create-tasks.
8
8
  recommended_tools:
9
9
  - create-tasks
10
10
  - complete-checkpoint
11
11
  - build-workflow
12
- - delegate
13
12
  - task-control
14
13
  - workflows
15
14
  - verify-built-workflow
@@ -20,12 +19,12 @@ recommended_tools:
20
19
 
21
20
  Load this skill when the current message contains `<planned-task-follow-up>`,
22
21
  `<background-task-completed>`, `<running-tasks>`, or immediately after calling
23
- `create-tasks` or `delegate`.
22
+ `create-tasks`. Before calling `create-tasks`, load it via `load_tool` if it is
23
+ not already visible (search "create tasks" if needed).
24
24
 
25
25
  ## Silence after spawning tasks
26
26
 
27
- **After calling detached or scheduled task tools** (`delegate` or
28
- `create-tasks`): do not write any text. The task card or approval card shows the
27
+ **After calling `create-tasks`**: do not write any text. The task card or approval card shows the
29
28
  user what's being built or done; restating it is redundant. Do NOT summarize the
30
29
  plan, list credentials, describe what the agent will do, or add status details.
31
30
  Progress is already visible to the user in real time.
@@ -37,7 +36,7 @@ invent synthetic follow-up turns.
37
36
 
38
37
  ## Never poll
39
38
 
40
- **Never poll and never sleep.** Background tasks (`delegate`) settle via
39
+ **Never poll and never sleep.** Background tasks settle via
41
40
  `<planned-task-follow-up>` turns that arrive automatically when work finishes.
42
41
  After you spawn or acknowledge one, end your turn. Do not call
43
42
  `workflows(action="list")`, `executions(action="list")`, or any shell command
@@ -49,9 +48,6 @@ yourself. Do not re-dispatch a build whose task ID is already visible in
49
48
  When `<running-tasks>` context is present, use it only to reference active task
50
49
  IDs for cancellation or corrections.
51
50
 
52
- Always pass `conversationContext` when spawning background agents (`delegate`) —
53
- summarize what was discussed, decisions made, and information gathered.
54
-
55
51
  If the user sends a correction while a build is running, call
56
52
  `task-control(action="correct-task")` with the task ID and correction.
57
53
 
@@ -81,7 +77,8 @@ create another plan.
81
77
  When `<planned-task-follow-up type="replan">` is present, a planned task failed
82
78
  and the graph is in `awaiting_replan`. You MUST take action in this same turn —
83
79
  handle a single simple task directly (matching tool: `build-workflow`,
84
- `data-tables`, `delegate`, etc.), call `create-tasks` with
80
+ `data-tables`, etc.), load `create-tasks` via `load_tool` if needed and call
81
+ `create-tasks` with
85
82
  `planningContext.source: "replan"` for multiple dependent tasks, or explain the
86
83
  blocker to the user if nothing sensible remains. Do NOT reply with an
87
84
  acknowledgement or status update alone — the scheduler will not fire another
@@ -91,7 +88,8 @@ Replan routing (do not re-plan from scratch):
91
88
 
92
89
  - One simple task remains (single data-table op, credential setup, single-workflow
93
90
  patch) → handle directly with the matching tool.
94
- - Multiple dependent tasks still need scheduling → `create-tasks` with
91
+ - Multiple dependent tasks still need scheduling → load `create-tasks` via
92
+ `load_tool` if needed, then call `create-tasks` with
95
93
  `planningContext.source: "replan"`.
96
94
  - Nothing sensible remains → explain the blocker to the user.
97
95
 
@@ -157,8 +155,8 @@ and let replan take over.
157
155
  ## Background task completed
158
156
 
159
157
  When `<background-task-completed>` is present, a detached background task
160
- finished. The `result` field holds the sub-agent's authoritative summary of what
161
- was actually done. **When you write the user-facing recap, take factual details —
158
+ finished (for example eval setup). The `result` field holds the task's
159
+ authoritative summary of what was actually done. **When you write the user-facing recap, take factual details —
162
160
  model IDs, node names, resource IDs, parameter values — directly from this
163
161
  `result` text.** Do not substitute values from conversation history or training
164
162
  priors: if the `result` says `gpt-5.4-mini`, write `gpt-5.4-mini`, not "GPT-4o
@@ -20,8 +20,11 @@ recommended_tools:
20
20
  # Planning
21
21
 
22
22
  Use this skill to design a dependency-aware task graph in the orchestrator and
23
- submit it with `create-tasks`. Do not spawn another agent, do not delegate the
24
- planning step, and do not use incremental plan item tools.
23
+ submit it with `create-tasks`. Do not spawn another agent and do not use
24
+ incremental plan item tools.
25
+
26
+ Before calling `create-tasks`, load it via `load_tool` (search "create tasks" if
27
+ it is not visible).
25
28
 
26
29
  ## When NOT to use this skill
27
30
 
@@ -69,7 +72,8 @@ with direct `data-tables` and `parse-file` calls.
69
72
  artifact shared across tasks.
70
73
  6. Add checkpoint tasks only for exceptional semantic checks that normal
71
74
  workflow verification cannot cover.
72
- 7. Call `create-tasks` with `planningContext.source: "planning-skill"`,
75
+ 7. Load `create-tasks` via `load_tool` if needed, then call `create-tasks` with
76
+ `planningContext.source: "planning-skill"`,
73
77
  a concise `summary`, optional `assumptions`, `postBuildRunRequested: true`
74
78
  only when the user explicitly asked to run, execute, or test a workflow
75
79
  after building it, and the final task graph.
@@ -78,8 +82,7 @@ with direct `data-tables` and `parse-file` calls.
78
82
 
79
83
  ## Task Graph Rules
80
84
 
81
- - Use task kinds exactly as supported: `build-workflow`, `delegate`, and
82
- `checkpoint`.
85
+ - Use task kinds exactly as supported: `build-workflow` and `checkpoint`.
83
86
  - Each task `id` must be stable and referenced by dependency edges.
84
87
  - Each `title` should be short and user-facing.
85
88
  - Each `spec` must be the complete executor briefing for that task. The task
@@ -115,8 +118,6 @@ with direct `data-tables` and `parse-file` calls.
115
118
  set `isSupportingWorkflow: true` on that task. Do not set it for helper
116
119
  sub-workflows that are only intermediate artifacts inside a larger main
117
120
  workflow task.
118
- - For `delegate` tasks, include all context the background task needs and list
119
- only the tools it should use.
120
121
  - For `checkpoint` tasks, write structured semantic verification instructions:
121
122
  `Verify trigger mode`, `Verify external systems`, `Verify required effects`,
122
123
  `Verify required branches`, `Verify required data`,
@@ -166,13 +167,13 @@ contracts, confirming a report combines upstream data correctly, validating a
166
167
  business invariant across deliverables, or checking a condition that cannot be
167
168
  covered by normal runtime verification.
168
169
 
169
- Do not add checkpoints for delegate tasks, and do not list `tools` on checkpoint
170
- tasks.
170
+ Do not add checkpoints for routine verification-only work.
171
171
 
172
172
  ## Revisions
173
173
 
174
- If the user rejects the plan with requested changes, revise surgically and call
175
- `create-tasks` again in the same orchestrator run with
174
+ If the user rejects the plan with requested changes, revise surgically, load
175
+ `create-tasks` via `load_tool` if needed, and call `create-tasks` again in the
176
+ same orchestrator run with
176
177
  `planningContext.source: "planning-skill"`.
177
178
 
178
179
  If the user denies the plan outright, stop. Do not call `create-tasks` again in
@@ -257,6 +257,15 @@ default path. Workflow verification is automatic from the build outcome; the
257
257
  orchestrator handles workflow setup after verification when the saved workflow
258
258
  still has mocked credentials or placeholders.
259
259
 
260
+ **Trust the build outcome over your own source file.** When `build-workflow`
261
+ returns `resolvedCredentialsByNode` (or `setupRequirement.status ===
262
+ "not_required"`), the saved workflow is already connected to existing
263
+ credentials — even if your source used an unresolved `newCredential()` call.
264
+ Do not ask the user to connect those credentials, do not offer the setup card
265
+ for them, and do not describe them as missing; at most mention which existing
266
+ credential is being used. Route credential setup only when the build outcome
267
+ reports mocked credentials or `setupRequirement.status === "required"`.
268
+
260
269
  **Ask once when a service has multiple credentials of the same type.** If
261
270
  `credentials(action="list")` shows more than one entry of the type a requested
262
271
  integration needs (e.g. two `openAiApi` accounts, three Google Calendar
@@ -28,8 +28,8 @@ saved workflow changes.
28
28
 
29
29
  This skill runs inside the orchestrator — no separate builder agent, handoff,
30
30
  or tool allowlist; use the orchestrator and workspace file tools already
31
- available this turn (plus any relevant tool-search/MCP tool). Never call
32
- `delegate` to build, patch, fix, verify, or update workflows.
31
+ available this turn (plus any relevant tool-search/MCP tool). Workflow building
32
+ runs in the orchestrator with this skill and `build-workflow`.
33
33
 
34
34
  For new single-workflow requests, build directly with
35
35
  `build-workflow({ filePath, sourceCode })` — the complete TypeScript SDK
@@ -257,18 +257,70 @@ decision after testing.
257
257
  workflow already had it. Otherwise use `newCredential('Suggested Credential
258
258
  Name')` — build tools mock unresolved credentials for verification and setup
259
259
  collects real ones later.
260
+ - When `build-workflow` returns `resolvedCredentialsByNode`, the build already
261
+ attached a credential to those nodes — either an existing stored credential or
262
+ an n8n Connect–managed one (entries with `id: null` and `__aiGatewayManaged:
263
+ true`). Treat them all as connected: do not ask the user to connect or create
264
+ those credentials, do not route them to credential setup, and mention at most
265
+ that the credential (or n8n Connect) is being used.
260
266
  - Never use raw credential objects like `{ id: '...', name: '...' }` in SDK
261
267
  code; replace them with `newCredential()` when editing roundtripped code.
262
268
  - If a required credential type is not listed, call
263
269
  `credentials(action="search-types")` with the service name. Prefer dedicated
264
270
  credential types over generic auth; when generic auth is truly needed,
265
271
  prefer `httpBearerAuth` over `httpHeaderAuth`.
272
+ - `credentials(action="list", type=...)` may include a synthetic n8n Connect
273
+ entry `{ id: null, name: "n8n Connect", type, __aiGatewayManaged: true }`
274
+ when the type is covered by n8n Connect (see n8n Connect Preference). It is
275
+ not a stored credential: never pass it to `newCredential(...)` and never
276
+ emit `id: null` or the `__aiGatewayManaged` marker in SDK output. Setup
277
+ applies it automatically when the user has no stored credential of that type.
266
278
  - These rules apply to outbound service calls. Inbound trigger nodes (Webhook,
267
279
  Form, Chat, MCP Trigger) keep authentication at its default `none` unless
268
280
  the user explicitly asks to authenticate inbound traffic.
269
281
  - Always declare `output` on nodes that use unresolved credentials when mock
270
282
  data is needed for verification.
271
283
 
284
+ ## n8n Connect Preference
285
+
286
+ "n8n Connect" is the user-facing name of n8n's managed credential
287
+ service. On instances licensed for it, several common AI-provider and
288
+ scraping nodes can run with zero credential setup on the user's side.
289
+
290
+ **Discovery (while building):** `nodes(action="search")` and
291
+ `nodes(action="describe")` results carry an `aiGateway` field on covered nodes
292
+ — no separate lookup needed. When `aiGateway.supported === true`, prefer that
293
+ node over comparable alternatives *when the user has not named a specific
294
+ tool*, and respect the constraints it reports:
295
+ - Set `typeVersion >= aiGateway.minVersion` when present.
296
+ - Constrain `resource` / `operation` to entries in `aiGateway.operations` —
297
+ a `Record<resource, operation[]>` map; nodes without a resource dimension
298
+ use the marker key `__operation_only__`.
299
+ - Do not set parameters listed in `aiGateway.hiddenProperties`.
300
+
301
+ **Enumeration (answering "what does n8n Connect support?"):**
302
+ - All supported nodes: `nodes(action="list", n8nConnectOnly=true)` — each
303
+ result carries the full `aiGateway` field (minVersion, operations,
304
+ hiddenProperties).
305
+ - All supported credential types:
306
+ `credentials(action="search-types", n8nConnectOnly=true)`.
307
+ - Operations for a specific supported node: `nodes(action="describe", …)`
308
+ → `aiGateway.operations`.
309
+
310
+ **Preference rule:** When adding a new node that has no credential assigned
311
+ yet, prefer n8n Connect over stored credentials if the credential type is
312
+ supported — it provides zero-setup access and avoids spending the user's API
313
+ quota. The synthetic entry in `credentials(action="list", type=...)` (see
314
+ Credential Rules) is your signal that a type is covered. Do not change
315
+ credentials on nodes that already have one assigned (editing an existing
316
+ workflow, or after the user has made a credential choice).
317
+
318
+ - If the user explicitly specified their own credential (by name or by
319
+ choosing one from a list), use that credential and do not substitute
320
+ n8n Connect.
321
+ - When speaking to the user in chat, always refer to this feature as
322
+ "n8n Connect" — not "AI Gateway", which is only an internal name.
323
+
272
324
  ## Missing Resources
273
325
 
274
326
  When `nodes(action="explore-resources")` returns no results for a required
@@ -297,7 +349,7 @@ decompose into supporting sub-workflows (`executeWorkflowTrigger` v1.1 with an
297
349
  explicit input schema, built with `isSupportingWorkflow: true`) referenced from
298
350
  the main workflow's `executeWorkflow` node (`source: 'database'`, real returned
299
351
  `workflowId`), main workflow saved last. This is part of the approved build
300
- task — not a reason to call `delegate` or create a new plan, and simple
352
+ task — not a reason to create a new plan, and simple
301
353
  workflows stay in one workflow. Before writing multi-workflow code, load this
302
354
  skill's `references/compositional-workflows.md` linked file for the required
303
355
  steps and SDK examples.
@@ -1,8 +1,7 @@
1
1
  # Compositional Workflows
2
2
 
3
3
  For complex workflows, you may decompose work into supporting sub-workflows and
4
- a main workflow. This is part of an approved build task, not a reason to call
5
- `delegate` or create a new plan.
4
+ a main workflow. This is part of an approved build task, not a reason to create a new plan.
6
5
 
7
6
  Use this pattern when a workflow is large, has reusable chunks, or benefits from
8
7
  independent testing. Simple workflows should stay in one workflow.
@@ -1,44 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const delegateInputSchema: z.ZodObject<{
3
- role: z.ZodString;
4
- instructions: z.ZodString;
5
- tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6
- briefing: z.ZodString;
7
- artifacts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
8
- conversationContext: z.ZodOptional<z.ZodString>;
9
- }, "strip", z.ZodTypeAny, {
10
- tools: string[];
11
- role: string;
12
- instructions: string;
13
- briefing: string;
14
- artifacts?: Record<string, unknown> | undefined;
15
- conversationContext?: string | undefined;
16
- }, {
17
- role: string;
18
- instructions: string;
19
- briefing: string;
20
- tools?: string[] | undefined;
21
- artifacts?: Record<string, unknown> | undefined;
22
- conversationContext?: string | undefined;
23
- }>;
24
- export type DelegateInput = z.infer<typeof delegateInputSchema>;
25
- export declare const delegateOutputSchema: z.ZodObject<{
26
- result: z.ZodString;
27
- toolCallCount: z.ZodOptional<z.ZodNumber>;
28
- toolErrorCount: z.ZodOptional<z.ZodNumber>;
29
- durationMs: z.ZodOptional<z.ZodNumber>;
30
- blockers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
31
- }, "strip", z.ZodTypeAny, {
32
- result: string;
33
- toolCallCount?: number | undefined;
34
- toolErrorCount?: number | undefined;
35
- durationMs?: number | undefined;
36
- blockers?: string[] | undefined;
37
- }, {
38
- result: string;
39
- toolCallCount?: number | undefined;
40
- toolErrorCount?: number | undefined;
41
- durationMs?: number | undefined;
42
- blockers?: string[] | undefined;
43
- }>;
44
- export type DelegateOutput = z.infer<typeof delegateOutputSchema>;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.delegateOutputSchema = exports.delegateInputSchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.delegateInputSchema = zod_1.z.object({
6
- role: zod_1.z
7
- .string()
8
- .describe('Free-form role description (e.g., "workflow builder", "execution debugger")'),
9
- instructions: zod_1.z
10
- .string()
11
- .describe('Task-specific system prompt for the sub-agent. Be specific about what to do and how.'),
12
- tools: zod_1.z
13
- .array(zod_1.z.string())
14
- .default([])
15
- .describe('Subset of registered native domain tool names the sub-agent needs'),
16
- briefing: zod_1.z.string().describe('The specific task to accomplish, including all relevant context'),
17
- artifacts: zod_1.z
18
- .record(zod_1.z.unknown())
19
- .optional()
20
- .describe('Relevant IDs, data, or context (workflow IDs, credential IDs, etc.)'),
21
- conversationContext: zod_1.z
22
- .string()
23
- .optional()
24
- .describe('Brief summary of the conversation so far — what was discussed, decisions made, and information gathered. The sub-agent uses this to avoid repeating information the user already knows.'),
25
- });
26
- exports.delegateOutputSchema = zod_1.z.object({
27
- result: zod_1.z.string().describe('The sub-agent synthesized answer'),
28
- toolCallCount: zod_1.z
29
- .number()
30
- .int()
31
- .min(0)
32
- .optional()
33
- .describe('Total number of tool invocations the sub-agent made'),
34
- toolErrorCount: zod_1.z
35
- .number()
36
- .int()
37
- .min(0)
38
- .optional()
39
- .describe('Number of tool invocations that failed'),
40
- durationMs: zod_1.z.number().optional().describe('Wall-clock duration in milliseconds'),
41
- blockers: zod_1.z
42
- .array(zod_1.z.string())
43
- .optional()
44
- .describe('Specific blockers encountered during execution'),
45
- });
46
- //# sourceMappingURL=delegate.schemas.js.map