@n8n/instance-ai 1.16.2 → 1.17.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 (140) hide show
  1. package/dist/agent/instance-agent.js +7 -1
  2. package/dist/agent/instance-agent.js.map +1 -1
  3. package/dist/agent/system-prompt.js +3 -3
  4. package/dist/agent/system-prompt.js.map +1 -1
  5. package/dist/build.tsbuildinfo +1 -1
  6. package/dist/event-bus/event-bus.interface.d.ts +1 -1
  7. package/dist/index.d.ts +10 -1
  8. package/dist/index.js +17 -2
  9. package/dist/index.js.map +1 -1
  10. package/dist/parsers/xlsx-parser.js +1 -1
  11. package/dist/parsers/xlsx-parser.js.map +1 -1
  12. package/dist/runtime/terminal-response-guard.js +2 -1
  13. package/dist/runtime/terminal-response-guard.js.map +1 -1
  14. package/dist/skills/skill-gates.d.ts +5 -0
  15. package/dist/skills/skill-gates.js +12 -0
  16. package/dist/skills/skill-gates.js.map +1 -0
  17. package/dist/storage/workflow-loop-storage.d.ts +7 -7
  18. package/dist/stream/consume-with-hitl.d.ts +3 -0
  19. package/dist/stream/consume-with-hitl.js +2 -0
  20. package/dist/stream/consume-with-hitl.js.map +1 -1
  21. package/dist/stream/map-chunk.js +7 -0
  22. package/dist/stream/map-chunk.js.map +1 -1
  23. package/dist/stream/usage-accumulator.d.ts +2 -0
  24. package/dist/stream/usage-accumulator.js +13 -3
  25. package/dist/stream/usage-accumulator.js.map +1 -1
  26. package/dist/tool-registry.js +5 -1
  27. package/dist/tool-registry.js.map +1 -1
  28. package/dist/tools/agents.tool.d.ts +2 -0
  29. package/dist/tools/agents.tool.js +40 -0
  30. package/dist/tools/agents.tool.js.map +1 -0
  31. package/dist/tools/credentials.tool.js +8 -3
  32. package/dist/tools/credentials.tool.js.map +1 -1
  33. package/dist/tools/evals/eval-config.tool.js +10 -2
  34. package/dist/tools/evals/eval-config.tool.js.map +1 -1
  35. package/dist/tools/executions.tool.js +3 -2
  36. package/dist/tools/executions.tool.js.map +1 -1
  37. package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -2
  38. package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
  39. package/dist/tools/index.js +15 -2
  40. package/dist/tools/index.js.map +1 -1
  41. package/dist/tools/n8n-docs/registry.d.ts +2 -2
  42. package/dist/tools/n8n-docs/registry.js +20 -8
  43. package/dist/tools/n8n-docs/registry.js.map +1 -1
  44. package/dist/tools/n8n-docs.tool.js +18 -12
  45. package/dist/tools/n8n-docs.tool.js.map +1 -1
  46. package/dist/tools/nodes.tool.js +1 -1
  47. package/dist/tools/orchestration/agent-preview-session-binding.d.ts +20 -0
  48. package/dist/tools/orchestration/agent-preview-session-binding.js +47 -0
  49. package/dist/tools/orchestration/agent-preview-session-binding.js.map +1 -0
  50. package/dist/tools/orchestration/agent-target-binding.d.ts +6 -1
  51. package/dist/tools/orchestration/agent-target-binding.js +43 -4
  52. package/dist/tools/orchestration/agent-target-binding.js.map +1 -1
  53. package/dist/tools/orchestration/build-agent.tool.js +365 -71
  54. package/dist/tools/orchestration/build-agent.tool.js.map +1 -1
  55. package/dist/tools/orchestration/builder-thread-id.d.ts +1 -0
  56. package/dist/tools/orchestration/builder-thread-id.js +7 -0
  57. package/dist/tools/orchestration/builder-thread-id.js.map +1 -0
  58. package/dist/tools/orchestration/get-session.tool.d.ts +2 -0
  59. package/dist/tools/orchestration/get-session.tool.js +49 -0
  60. package/dist/tools/orchestration/get-session.tool.js.map +1 -0
  61. package/dist/tools/orchestration/verification/reconcile-plan.js +4 -1
  62. package/dist/tools/orchestration/verification/reconcile-plan.js.map +1 -1
  63. package/dist/tools/orchestration/verify-built-workflow.tool.js +1 -0
  64. package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
  65. package/dist/tools/research.tool.js +2 -0
  66. package/dist/tools/research.tool.js.map +1 -1
  67. package/dist/tools/tool-ids.d.ts +2 -0
  68. package/dist/tools/tool-ids.js +3 -0
  69. package/dist/tools/tool-ids.js.map +1 -1
  70. package/dist/tools/workflows/build-workflow.tool.js +12 -4
  71. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  72. package/dist/tools/workflows/classify-node-destructiveness.service.d.ts +1 -1
  73. package/dist/tools/workflows/classify-node-destructiveness.service.js +5 -7
  74. package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
  75. package/dist/tools/workflows/credential-utils.d.ts +1 -1
  76. package/dist/tools/workflows/credential-utils.js +2 -2
  77. package/dist/tools/workflows/credential-utils.js.map +1 -1
  78. package/dist/tools/workflows/detect-unparseable-openai-schema.d.ts +3 -0
  79. package/dist/tools/workflows/detect-unparseable-openai-schema.js +85 -0
  80. package/dist/tools/workflows/detect-unparseable-openai-schema.js.map +1 -0
  81. package/dist/tools/workflows/generate-simulation-fixtures.service.d.ts +2 -1
  82. package/dist/tools/workflows/generate-simulation-fixtures.service.js +27 -5
  83. package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
  84. package/dist/tools/workflows/materialize-node-type.tool.js +4 -2
  85. package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
  86. package/dist/tools/workflows/plan-verification-simulation.d.ts +5 -2
  87. package/dist/tools/workflows/plan-verification-simulation.js +117 -2
  88. package/dist/tools/workflows/plan-verification-simulation.js.map +1 -1
  89. package/dist/tools/workflows/reconcile-simulation-plan.js +48 -17
  90. package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -1
  91. package/dist/tools/workflows/resolve-credentials.js +35 -1
  92. package/dist/tools/workflows/resolve-credentials.js.map +1 -1
  93. package/dist/tools/workflows/setup-workflow.schema.d.ts +66 -66
  94. package/dist/tools/workflows/validate-workflow.service.js +4 -4
  95. package/dist/tools/workflows/workflow-build-routing.js +3 -3
  96. package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
  97. package/dist/tools/workflows/workflow-file-bindings.d.ts +1 -1
  98. package/dist/tools/workflows/workflow-file-bindings.js +2 -1
  99. package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
  100. package/dist/tools/workflows/workflow-json-utils.js +11 -12
  101. package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
  102. package/dist/tools/workflows/workflow-source-compiler.d.ts +1 -1
  103. package/dist/tools/workflows/workflow-source-compiler.js +11 -4
  104. package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
  105. package/dist/tools/workflows/write-sandbox-file.tool.js +4 -2
  106. package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
  107. package/dist/tracing/langsmith-tracing.d.ts +1 -0
  108. package/dist/tracing/langsmith-tracing.js +69 -9
  109. package/dist/tracing/langsmith-tracing.js.map +1 -1
  110. package/dist/tracing/trace-payloads.js +8 -0
  111. package/dist/tracing/trace-payloads.js.map +1 -1
  112. package/dist/types.d.ts +52 -5
  113. package/dist/types.js.map +1 -1
  114. package/dist/utils/stream-helpers.d.ts +1 -0
  115. package/dist/utils/stream-helpers.js +2 -1
  116. package/dist/utils/stream-helpers.js.map +1 -1
  117. package/dist/workflow-loop/workflow-loop-state.d.ts +13 -13
  118. package/dist/workflow-loop/workflow-loop-state.js +6 -1
  119. package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
  120. package/dist/workspace/create-workspace.js +24 -1
  121. package/dist/workspace/create-workspace.js.map +1 -1
  122. package/dist/workspace/lazy-runtime-workspace.js +19 -19
  123. package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
  124. package/dist/workspace/sandbox-fs.d.ts +16 -4
  125. package/dist/workspace/sandbox-fs.js +80 -25
  126. package/dist/workspace/sandbox-fs.js.map +1 -1
  127. package/dist/workspace/scoped-workspace.js +6 -6
  128. package/dist/workspace/scoped-workspace.js.map +1 -1
  129. package/dist/workspace/snapshot-manager.d.ts +1 -0
  130. package/dist/workspace/snapshot-manager.js +37 -5
  131. package/dist/workspace/snapshot-manager.js.map +1 -1
  132. package/dist/workspace/workspace-files.d.ts +4 -0
  133. package/dist/workspace/workspace-files.js +21 -7
  134. package/dist/workspace/workspace-files.js.map +1 -1
  135. package/knowledge-base/reference/workflow-builder-guardrails.md +3 -0
  136. package/package.json +12 -12
  137. package/skills/config-evals/SKILL.md +96 -0
  138. package/skills/config-evals/references/config-eval-playbook.md +109 -0
  139. package/skills/intent-recognition/SKILL.md +145 -34
  140. package/skills/workflow-builder/SKILL.md +25 -17
@@ -259,19 +259,19 @@ decision after testing.
259
259
  collects real ones later.
260
260
  - When `build-workflow` returns `resolvedCredentialsByNode`, the build already
261
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:
262
+ an n8n credits–managed one (entries with `id: null` and `__aiGatewayManaged:
263
263
  true`). Treat them all as connected: do not ask the user to connect or create
264
264
  those credentials, do not route them to credential setup, and mention at most
265
- that the credential (or n8n Connect) is being used.
265
+ that the credential (or n8n credits) is being used.
266
266
  - Never use raw credential objects like `{ id: '...', name: '...' }` in SDK
267
267
  code; replace them with `newCredential()` when editing roundtripped code.
268
268
  - If a required credential type is not listed, call
269
269
  `credentials(action="search-types")` with the service name. Prefer dedicated
270
270
  credential types over generic auth; when generic auth is truly needed,
271
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
272
+ - `credentials(action="list", type=...)` may include a synthetic n8n credits
273
+ entry `{ id: null, name: "n8n credits", type, __aiGatewayManaged: true }`
274
+ when the type is covered by n8n credits (see n8n credits Preference). It is
275
275
  not a stored credential: never pass it to `newCredential(...)` and never
276
276
  emit `id: null` or the `__aiGatewayManaged` marker in SDK output. Setup
277
277
  applies it automatically when the user has no stored credential of that type.
@@ -281,11 +281,11 @@ decision after testing.
281
281
  - Always declare `output` on nodes that use unresolved credentials when mock
282
282
  data is needed for verification.
283
283
 
284
- ## n8n Connect Preference
284
+ ## n8n credits Preference
285
285
 
286
- "n8n Connect" is the user-facing name of n8n's managed credential
286
+ "n8n credits" is the user-facing name of n8n's managed credential
287
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.
288
+ scraping nodes can run with no API key required on the user's side.
289
289
 
290
290
  **Discovery (while building):** `nodes(action="search")` and
291
291
  `nodes(action="describe")` results carry an `aiGateway` field on covered nodes
@@ -298,7 +298,7 @@ tool*, and respect the constraints it reports:
298
298
  use the marker key `__operation_only__`.
299
299
  - Do not set parameters listed in `aiGateway.hiddenProperties`.
300
300
 
301
- **Enumeration (answering "what does n8n Connect support?"):**
301
+ **Enumeration (answering "what does n8n credits support?"):**
302
302
  - All supported nodes: `nodes(action="list", n8nConnectOnly=true)` — each
303
303
  result carries the full `aiGateway` field (minVersion, operations,
304
304
  hiddenProperties).
@@ -308,18 +308,20 @@ tool*, and respect the constraints it reports:
308
308
  → `aiGateway.operations`.
309
309
 
310
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
311
+ yet, prefer n8n credits over stored credentials if the credential type is
312
+ supported — it works with no API key required and avoids spending the user's
313
+ API quota. The synthetic entry in `credentials(action="list", type=...)` (see
314
314
  Credential Rules) is your signal that a type is covered. Do not change
315
315
  credentials on nodes that already have one assigned (editing an existing
316
316
  workflow, or after the user has made a credential choice).
317
317
 
318
318
  - If the user explicitly specified their own credential (by name or by
319
319
  choosing one from a list), use that credential and do not substitute
320
- n8n Connect.
320
+ n8n credits.
321
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.
322
+ "n8n credits" — never "n8n Connect", "AI Gateway", or "gateway". Those are
323
+ internal names only, including the `aiGateway` field on node/credential
324
+ results: read it to make decisions, but never surface that name to the user.
323
325
 
324
326
  ## Missing Resources
325
327
 
@@ -452,7 +454,6 @@ import {
452
454
  workflow,
453
455
  node,
454
456
  trigger,
455
- sticky,
456
457
  placeholder,
457
458
  newCredential,
458
459
  ifElse,
@@ -521,6 +522,12 @@ Follow these rules strictly when generating workflows:
521
522
  match time units broadly (day/days, week/weeks…), and give every classifier
522
523
  an explicit fallback bucket — a one-phrasing regex silently misroutes every
523
524
  other phrasing.
525
+ 7. Do not add sticky notes (`sticky(...)` / `n8n-nodes-base.stickyNote`) unless
526
+ the user explicitly asks for canvas notes. They add visual noise and are
527
+ often poorly positioned. Put explanations in your chat reply instead. Even
528
+ when the SDK language reference documents `sticky()`, do not use it by
529
+ default. When editing a workflow, do not add or reintroduce stickies unless the user
530
+ explicitly asks for them.
524
531
 
525
532
  ## Tool Naming Rules
526
533
 
@@ -682,8 +689,9 @@ For AI Agent workflows:
682
689
  ## Additional SDK Functions
683
690
 
684
691
  - `placeholder('hint')`: marks a parameter value for user input.
685
- - `sticky('content', nodes?, config?)`: creates a sticky note. It must still be
686
- added to the workflow.
692
+ - `sticky('content', nodes?, config?)`: opt-in only when the user explicitly
693
+ asks for a sticky note on the canvas. Do not import or call it otherwise.
694
+ When used, it must still be added to the workflow.
687
695
  - `.output(n)`: selects a zero-based output index.
688
696
  - `.onError(handler)`: connects a node's error output to a handler. Requires
689
697
  `onError: 'continueErrorOutput'` in the node config.