@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.
- package/dist/agent/instance-agent.js +7 -1
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/system-prompt.js +3 -3
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/event-bus/event-bus.interface.d.ts +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/parsers/xlsx-parser.js +1 -1
- package/dist/parsers/xlsx-parser.js.map +1 -1
- package/dist/runtime/terminal-response-guard.js +2 -1
- package/dist/runtime/terminal-response-guard.js.map +1 -1
- package/dist/skills/skill-gates.d.ts +5 -0
- package/dist/skills/skill-gates.js +12 -0
- package/dist/skills/skill-gates.js.map +1 -0
- package/dist/storage/workflow-loop-storage.d.ts +7 -7
- package/dist/stream/consume-with-hitl.d.ts +3 -0
- package/dist/stream/consume-with-hitl.js +2 -0
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.js +7 -0
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/stream/usage-accumulator.d.ts +2 -0
- package/dist/stream/usage-accumulator.js +13 -3
- package/dist/stream/usage-accumulator.js.map +1 -1
- package/dist/tool-registry.js +5 -1
- package/dist/tool-registry.js.map +1 -1
- package/dist/tools/agents.tool.d.ts +2 -0
- package/dist/tools/agents.tool.js +40 -0
- package/dist/tools/agents.tool.js.map +1 -0
- package/dist/tools/credentials.tool.js +8 -3
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/evals/eval-config.tool.js +10 -2
- package/dist/tools/evals/eval-config.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +3 -2
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +2 -2
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.js +15 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/n8n-docs/registry.d.ts +2 -2
- package/dist/tools/n8n-docs/registry.js +20 -8
- package/dist/tools/n8n-docs/registry.js.map +1 -1
- package/dist/tools/n8n-docs.tool.js +18 -12
- package/dist/tools/n8n-docs.tool.js.map +1 -1
- package/dist/tools/nodes.tool.js +1 -1
- package/dist/tools/orchestration/agent-preview-session-binding.d.ts +20 -0
- package/dist/tools/orchestration/agent-preview-session-binding.js +47 -0
- package/dist/tools/orchestration/agent-preview-session-binding.js.map +1 -0
- package/dist/tools/orchestration/agent-target-binding.d.ts +6 -1
- package/dist/tools/orchestration/agent-target-binding.js +43 -4
- package/dist/tools/orchestration/agent-target-binding.js.map +1 -1
- package/dist/tools/orchestration/build-agent.tool.js +365 -71
- package/dist/tools/orchestration/build-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/builder-thread-id.d.ts +1 -0
- package/dist/tools/orchestration/builder-thread-id.js +7 -0
- package/dist/tools/orchestration/builder-thread-id.js.map +1 -0
- package/dist/tools/orchestration/get-session.tool.d.ts +2 -0
- package/dist/tools/orchestration/get-session.tool.js +49 -0
- package/dist/tools/orchestration/get-session.tool.js.map +1 -0
- package/dist/tools/orchestration/verification/reconcile-plan.js +4 -1
- package/dist/tools/orchestration/verification/reconcile-plan.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.js +1 -0
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.js +2 -0
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/tool-ids.d.ts +2 -0
- package/dist/tools/tool-ids.js +3 -0
- package/dist/tools/tool-ids.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.js +12 -4
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/classify-node-destructiveness.service.d.ts +1 -1
- package/dist/tools/workflows/classify-node-destructiveness.service.js +5 -7
- package/dist/tools/workflows/classify-node-destructiveness.service.js.map +1 -1
- package/dist/tools/workflows/credential-utils.d.ts +1 -1
- package/dist/tools/workflows/credential-utils.js +2 -2
- package/dist/tools/workflows/credential-utils.js.map +1 -1
- package/dist/tools/workflows/detect-unparseable-openai-schema.d.ts +3 -0
- package/dist/tools/workflows/detect-unparseable-openai-schema.js +85 -0
- package/dist/tools/workflows/detect-unparseable-openai-schema.js.map +1 -0
- package/dist/tools/workflows/generate-simulation-fixtures.service.d.ts +2 -1
- package/dist/tools/workflows/generate-simulation-fixtures.service.js +27 -5
- package/dist/tools/workflows/generate-simulation-fixtures.service.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.js +4 -2
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/plan-verification-simulation.d.ts +5 -2
- package/dist/tools/workflows/plan-verification-simulation.js +117 -2
- package/dist/tools/workflows/plan-verification-simulation.js.map +1 -1
- package/dist/tools/workflows/reconcile-simulation-plan.js +48 -17
- package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -1
- package/dist/tools/workflows/resolve-credentials.js +35 -1
- package/dist/tools/workflows/resolve-credentials.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.schema.d.ts +66 -66
- package/dist/tools/workflows/validate-workflow.service.js +4 -4
- package/dist/tools/workflows/workflow-build-routing.js +3 -3
- package/dist/tools/workflows/workflow-build-routing.js.map +1 -1
- package/dist/tools/workflows/workflow-file-bindings.d.ts +1 -1
- package/dist/tools/workflows/workflow-file-bindings.js +2 -1
- package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
- package/dist/tools/workflows/workflow-json-utils.js +11 -12
- package/dist/tools/workflows/workflow-json-utils.js.map +1 -1
- package/dist/tools/workflows/workflow-source-compiler.d.ts +1 -1
- package/dist/tools/workflows/workflow-source-compiler.js +11 -4
- package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
- package/dist/tools/workflows/write-sandbox-file.tool.js +4 -2
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +1 -0
- package/dist/tracing/langsmith-tracing.js +69 -9
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-payloads.js +8 -0
- package/dist/tracing/trace-payloads.js.map +1 -1
- package/dist/types.d.ts +52 -5
- package/dist/types.js.map +1 -1
- package/dist/utils/stream-helpers.d.ts +1 -0
- package/dist/utils/stream-helpers.js +2 -1
- package/dist/utils/stream-helpers.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +13 -13
- package/dist/workflow-loop/workflow-loop-state.js +6 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workspace/create-workspace.js +24 -1
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/lazy-runtime-workspace.js +19 -19
- package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
- package/dist/workspace/sandbox-fs.d.ts +16 -4
- package/dist/workspace/sandbox-fs.js +80 -25
- package/dist/workspace/sandbox-fs.js.map +1 -1
- package/dist/workspace/scoped-workspace.js +6 -6
- package/dist/workspace/scoped-workspace.js.map +1 -1
- package/dist/workspace/snapshot-manager.d.ts +1 -0
- package/dist/workspace/snapshot-manager.js +37 -5
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/dist/workspace/workspace-files.d.ts +4 -0
- package/dist/workspace/workspace-files.js +21 -7
- package/dist/workspace/workspace-files.js.map +1 -1
- package/knowledge-base/reference/workflow-builder-guardrails.md +3 -0
- package/package.json +12 -12
- package/skills/config-evals/SKILL.md +96 -0
- package/skills/config-evals/references/config-eval-playbook.md +109 -0
- package/skills/intent-recognition/SKILL.md +145 -34
- 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
|
|
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
|
|
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
|
|
273
|
-
entry `{ id: null, name: "n8n
|
|
274
|
-
when the type is covered by n8n
|
|
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
|
|
284
|
+
## n8n credits Preference
|
|
285
285
|
|
|
286
|
-
"n8n
|
|
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
|
|
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
|
|
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
|
|
312
|
-
supported — it
|
|
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
|
|
320
|
+
n8n credits.
|
|
321
321
|
- When speaking to the user in chat, always refer to this feature as
|
|
322
|
-
"n8n
|
|
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?)`:
|
|
686
|
-
|
|
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.
|