@n8n/instance-ai 1.13.2 → 1.14.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 (118) hide show
  1. package/dist/agent/apply-agent-thinking.js +24 -19
  2. package/dist/agent/apply-agent-thinking.js.map +1 -1
  3. package/dist/agent/computer-use-prompt.js +5 -6
  4. package/dist/agent/computer-use-prompt.js.map +1 -1
  5. package/dist/agent/shared-prompts.d.ts +1 -1
  6. package/dist/agent/shared-prompts.js +1 -1
  7. package/dist/agent/shared-prompts.js.map +1 -1
  8. package/dist/agent/sub-agent-factory.d.ts +1 -1
  9. package/dist/agent/system-prompt.js +20 -3
  10. package/dist/agent/system-prompt.js.map +1 -1
  11. package/dist/build.tsbuildinfo +1 -1
  12. package/dist/index.d.ts +4 -0
  13. package/dist/index.js +7 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/runtime/orchestrator-identity.d.ts +1 -0
  16. package/dist/runtime/orchestrator-identity.js +7 -0
  17. package/dist/runtime/orchestrator-identity.js.map +1 -0
  18. package/dist/runtime/orchestrator-run-control.d.ts +16 -0
  19. package/dist/runtime/orchestrator-run-control.js +26 -0
  20. package/dist/runtime/orchestrator-run-control.js.map +1 -0
  21. package/dist/runtime/resumable-stream-executor.d.ts +3 -0
  22. package/dist/runtime/resumable-stream-executor.js +26 -0
  23. package/dist/runtime/resumable-stream-executor.js.map +1 -1
  24. package/dist/runtime/run-state-registry.d.ts +4 -0
  25. package/dist/runtime/run-state-registry.js.map +1 -1
  26. package/dist/runtime/stream-runner.d.ts +3 -0
  27. package/dist/runtime/stream-runner.js +2 -0
  28. package/dist/runtime/stream-runner.js.map +1 -1
  29. package/dist/storage/terminal-outcome-storage.d.ts +2 -2
  30. package/dist/storage/workflow-loop-storage.d.ts +5 -0
  31. package/dist/tools/executions.tool.js +2 -1
  32. package/dist/tools/executions.tool.js.map +1 -1
  33. package/dist/tools/index.js +3 -0
  34. package/dist/tools/index.js.map +1 -1
  35. package/dist/tools/n8n-docs/ranking.d.ts +12 -0
  36. package/dist/tools/n8n-docs/ranking.js +170 -0
  37. package/dist/tools/n8n-docs/ranking.js.map +1 -0
  38. package/dist/tools/n8n-docs/registry.d.ts +34 -0
  39. package/dist/tools/n8n-docs/registry.js +216 -0
  40. package/dist/tools/n8n-docs/registry.js.map +1 -0
  41. package/dist/tools/n8n-docs/schemas.d.ts +163 -0
  42. package/dist/tools/n8n-docs/schemas.js +89 -0
  43. package/dist/tools/n8n-docs/schemas.js.map +1 -0
  44. package/dist/tools/n8n-docs.tool.d.ts +7 -0
  45. package/dist/tools/n8n-docs.tool.js +147 -0
  46. package/dist/tools/n8n-docs.tool.js.map +1 -0
  47. package/dist/tools/nodes/suggested-nodes-data.js +1 -4
  48. package/dist/tools/nodes/suggested-nodes-data.js.map +1 -1
  49. package/dist/tools/orchestration/plan.tool.js +1 -0
  50. package/dist/tools/orchestration/plan.tool.js.map +1 -1
  51. package/dist/tools/orchestration/verification/analyze-result.d.ts +28 -0
  52. package/dist/tools/orchestration/verification/analyze-result.js +238 -0
  53. package/dist/tools/orchestration/verification/analyze-result.js.map +1 -0
  54. package/dist/tools/orchestration/verification/finalize-result.d.ts +18 -0
  55. package/dist/tools/orchestration/verification/finalize-result.js +137 -0
  56. package/dist/tools/orchestration/verification/finalize-result.js.map +1 -0
  57. package/dist/tools/orchestration/verification/prepare-run.d.ts +16 -0
  58. package/dist/tools/orchestration/verification/prepare-run.js +58 -0
  59. package/dist/tools/orchestration/verification/prepare-run.js.map +1 -0
  60. package/dist/tools/orchestration/verification/resolve-target.d.ts +18 -0
  61. package/dist/tools/orchestration/verification/resolve-target.js +113 -0
  62. package/dist/tools/orchestration/verification/resolve-target.js.map +1 -0
  63. package/dist/tools/orchestration/verification/types.d.ts +44 -0
  64. package/dist/tools/orchestration/verification/types.js +3 -0
  65. package/dist/tools/orchestration/verification/types.js.map +1 -0
  66. package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +6 -3
  67. package/dist/tools/orchestration/verify-built-workflow.tool.js +70 -448
  68. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  69. package/dist/tools/shared/ask-user.tool.d.ts +4 -4
  70. package/dist/tools/shared/ask-user.tool.js +6 -0
  71. package/dist/tools/shared/ask-user.tool.js.map +1 -1
  72. package/dist/tools/tool-ids.d.ts +2 -0
  73. package/dist/tools/tool-ids.js +4 -1
  74. package/dist/tools/tool-ids.js.map +1 -1
  75. package/dist/tools/workflows/build-workflow.tool.js +4 -0
  76. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  77. package/dist/tools/workflows/detect-array-input-collapse.d.ts +3 -0
  78. package/dist/tools/workflows/detect-array-input-collapse.js +76 -0
  79. package/dist/tools/workflows/detect-array-input-collapse.js.map +1 -0
  80. package/dist/tools/workflows/generate-simulation-fixtures.service.js +1 -1
  81. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
  82. package/dist/tools/workflows/setup-workflow.schema.d.ts +26 -26
  83. package/dist/tools/workflows/setup-workflow.service.d.ts +1 -1
  84. package/dist/tools/workflows/setup-workflow.service.js +24 -1
  85. package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
  86. package/dist/tools/workflows/workflow-build-routing.d.ts +5 -1
  87. package/dist/tools/workflows/workflow-build-routing.js +9 -1
  88. package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
  89. package/dist/tools/workflows/workflow-json-utils.d.ts +1 -0
  90. package/dist/tools/workflows/workflow-json-utils.js +95 -0
  91. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  92. package/dist/tools/workflows/workflow-source-compiler.js +2 -0
  93. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
  94. package/dist/tools/workflows.tool.js +1 -1
  95. package/dist/tools/workflows.tool.js.map +1 -1
  96. package/dist/types.d.ts +4 -5
  97. package/dist/types.js.map +1 -1
  98. package/dist/workflow-loop/guidance.js +4 -2
  99. package/dist/workflow-loop/guidance.js.map +1 -1
  100. package/dist/workflow-loop/remediation.d.ts +1 -0
  101. package/dist/workflow-loop/remediation.js +2 -1
  102. package/dist/workflow-loop/remediation.js.map +1 -1
  103. package/dist/workflow-loop/verification-obligation.js +10 -0
  104. package/dist/workflow-loop/verification-obligation.js.map +1 -1
  105. package/dist/workflow-loop/workflow-loop-state.d.ts +3 -0
  106. package/dist/workflow-loop/workflow-loop-state.js +1 -0
  107. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  108. package/dist/workflow-loop/workflow-task-service.d.ts +1 -0
  109. package/dist/workflow-loop/workflow-task-service.js +13 -0
  110. package/dist/workflow-loop/workflow-task-service.js.map +1 -1
  111. package/package.json +16 -15
  112. package/skills/data-table-manager/SKILL.md +21 -0
  113. package/skills/data-table-manager/references/data-table-playbook.md +9 -0
  114. package/skills/debugging-executions/SKILL.md +15 -2
  115. package/skills/n8n-docs-assistant/SKILL.md +49 -0
  116. package/skills/planned-task-runtime/SKILL.md +4 -2
  117. package/skills/post-build-flow/SKILL.md +51 -5
  118. package/skills/workflow-builder/SKILL.md +65 -12
@@ -61,10 +61,18 @@ with the same `filePath`. Do not send inline workflow code or string patches to
61
61
 
62
62
  ## Escalation
63
63
 
64
- If you are stuck or need information only a human can provide, use `ask-user`.
65
- Do not retry the same failing approach more than twice. Never re-ask a question
66
- the user has already answered, deferred, or skipped treat a skip as permission
67
- to assume a sensible default or leave the detail for setup, and move on. Never
64
+ Before the first successful `build-workflow` call, use `ask-user` only when a
65
+ missing choice changes the workflow's intent or topology, such as which
66
+ destination service to use. Do not ask for setup details after the service is
67
+ known; recipients, accounts, resources, channels, credentials, and timezone
68
+ belong in placeholders or unresolved `newCredential()` calls until post-build
69
+ setup.
70
+
71
+ After the first build, or when the workflow intent is genuinely ambiguous, use
72
+ `ask-user` if you are stuck or need information only a human can provide. Do not
73
+ retry the same failing approach more than twice. Never re-ask a question the
74
+ user has already answered, deferred, or skipped — treat a skip as permission to
75
+ assume a sensible default or leave the detail for setup, and move on. Never
68
76
  solicit API keys, tokens, passwords, or other secrets through `ask-user`; route
69
77
  credential collection through workflow setup or credential setup surfaces.
70
78
 
@@ -84,6 +92,12 @@ tokens, Slack channel IDs, Telegram chat IDs, or sample recipient lists. After
84
92
  the build, `workflows(action="setup")` opens an inline setup card in the AI
85
93
  Assistant panel so the user can fill placeholder values.
86
94
 
95
+ Do not ask for missing setup values before the first successful build. Once the
96
+ service or workflow shape is known, missing email recipients, notification
97
+ targets, account labels or IDs, channel IDs, resource IDs, credentials,
98
+ timezone, and similar node configuration belong in placeholders during the
99
+ initial build; route them to setup only after the workflow is saved.
100
+
87
101
  Do not replace concrete user-provided or discoverable values with placeholders.
88
102
  If the prompt gives a real URL, channel name, table name, label, folder,
89
103
  database, or other literal selector, preserve that value and only use a
@@ -135,6 +149,14 @@ When mapping downstream fields from an OpenAI node, read
135
149
  7. Write complete TypeScript SDK code to the workspace `filePath`, or read and
136
150
  selectively edit the existing `.workflow.ts` file for workflow changes. Do
137
151
  not put secrets in the source file.
152
+ Before building, decide whether verification needs branch fixtures. When a
153
+ live or nondeterministic upstream node (such as HTTP Request, search/list
154
+ lookups, weather feeds, or AI classifiers) feeds IF/Switch logic and
155
+ alternate branches need verification, declare representative `output`
156
+ fixtures on that upstream node now so `verify-built-workflow` can simulate it
157
+ and later `fixtureOverrides` can exercise those scenarios. Do not simulate
158
+ every external read by default; use this when branch coverage or deterministic
159
+ proof depends on controlling the upstream data.
138
160
  8. Call `build-workflow` with `filePath`.
139
161
  For planned build follow-ups where `buildTask.isSupportingWorkflow === true`,
140
162
  pass `isSupportingWorkflow: true`; that saved supporting workflow is the
@@ -184,6 +206,12 @@ If the saved workflow is only a draft, misses the intended outcome, or has weak
184
206
  evidence, edit the same workflow source file and call `build-workflow` with the
185
207
  same `filePath`, then inspect and verify again.
186
208
 
209
+ Do not tell the user a workflow is fixed, verified, tested, or working from a
210
+ successful build, save, or static `validate` alone — only from a
211
+ `verify-built-workflow` or `executions` run that exercised the failing path, or
212
+ state explicitly that you could not verify and why. Never dismiss a live
213
+ execution error as a harness or stale-state artifact without re-running.
214
+
187
215
  When this turn is responsible for verification, do not stop after a successful
188
216
  save. The job is done when one of these is true:
189
217
 
@@ -192,9 +220,18 @@ save. The job is done when one of these is true:
192
220
  - A remediation guard says `shouldEdit: false`.
193
221
  - You are blocked after one repair attempt per unique failure signature.
194
222
 
223
+ Prefer `verify-built-workflow` for workflows saved by `build-workflow`; it can
224
+ be called again with `workflowId` if the original `workItemId` is no longer in
225
+ context. For alternate deterministic scenarios, pass `fixtureOverrides` for
226
+ nodes already classified as simulated. Use raw `executions(action="run")` only
227
+ for ad hoc non-build verification or when the user explicitly wants a live run.
228
+ If live connectivity also matters for a branch-controlled workflow, verify the
229
+ fixture-backed branch coverage first and run a separate live smoke check, or
230
+ state exactly which branch remains unverified.
231
+
195
232
  Trigger input shapes:
196
233
 
197
- - Manual or Schedule: use `executions(action="run")` when appropriate. Schedule
234
+ - Manual or Schedule: use `verify-built-workflow` when appropriate. Schedule
198
235
  usually needs no `inputData`.
199
236
  - Form Trigger: pass a flat field map, for example
200
237
  `{ "name": "Alice", "email": "a@b.c" }`. Do not wrap in `formFields`.
@@ -256,6 +293,14 @@ resource:
256
293
  For resources that cannot be created via n8n, explain clearly what the user
257
294
  needs to create manually and what ID or value belongs in setup.
258
295
 
296
+ If part of the requested workflow is infeasible (no node or API for it, a source
297
+ that blocks automated access, an action that cannot be performed
298
+ programmatically, or a third-party API whose region/use-case coverage you have
299
+ not verified), do not quietly substitute a stand-in and present it as the
300
+ requested capability. Flag the substitution as an approximation that may not
301
+ work — and any unverified region/country support — and name that gap in the
302
+ one-line completion summary so the result is not mistaken for the original ask.
303
+
259
304
  ## Compositional Workflows
260
305
 
261
306
  For complex workflows, you may decompose work into supporting sub-workflows and
@@ -368,19 +413,27 @@ column names.
368
413
  explicitly expects an object and the placeholder is the direct value of one
369
414
  field.
370
415
  - For unresolved resource-locator fields (values shaped like `{ __rl: true,
371
- mode, value }`, such as Slack channel selectors), use the resource-locator
372
- object shape instead of a raw `placeholder()` string. Pick the mode per the
373
- resource-locator rule in Node Configuration Safety Rules: a `name`/`url`
374
- mode with the known value when the locator offers one and you know the
375
- resource by name; otherwise id mode with an empty value and a cached result
376
- name, for example `{ __rl: true, mode: 'id', value: '',
377
- cachedResultName: 'Select support channel to monitor' }`.
416
+ mode, value }`, such as Slack channel or Google Sheets document selectors),
417
+ use the resource-locator object shape instead of a raw `placeholder()`
418
+ string. Prefer the locator's picker (`list`) mode when it offers one, since
419
+ it gives the user a searchable picker at setup, with an empty value and a
420
+ `cachedResultName` hint, for example `{ __rl: true, mode: 'list', value: '',
421
+ cachedResultName: 'Select support channel to monitor' }`. Not every locator
422
+ has a `list` mode; when it doesn't, use a `name`/`url` mode with the known
423
+ value, or `id` mode only when you have a concrete ID. Never use `id` with an
424
+ empty or placeholder value.
378
425
  - For single-execution nodes that receive many items but should run once, set
379
426
  `executeOnce: true`.
380
427
  - Whenever a node declares mock `output` for verification, include every field
381
428
  later referenced by `$json` expressions, including optional trigger fields
382
429
  used in filters (for example Slack `subtype`, `bot_id`, `text`, `user`, `ts`,
383
430
  `channel`). Missing optional fields make expression-path validation fail.
431
+ - Match real cardinality in mock `output`. When a node's real response is a
432
+ collection (HTTP list endpoints, search results, a top-level array such as
433
+ Binance klines or a bare array of IDs), declare at least two items so
434
+ single-item assumptions like `$input.first()` break during verification
435
+ instead of on the user's first run. A single-item mock hides array-vs-single
436
+ bugs.
384
437
  - SDK node `output` mocks are raw `$json` objects. Do not wrap mock items in
385
438
  n8n runtime item envelopes like `{ json: { ... } }` unless downstream
386
439
  expressions intentionally read `$json.json.*`. Correct: