@n8n/instance-ai 1.24.3 → 1.25.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/README.md +2 -3
- package/dist/agent/credential-guardrails.prompt.d.ts +1 -0
- package/dist/agent/credential-guardrails.prompt.js +2 -1
- package/dist/agent/credential-guardrails.prompt.js.map +1 -1
- package/dist/agent/instance-agent.js +25 -21
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/shared-prompts.d.ts +2 -2
- package/dist/agent/shared-prompts.js +2 -2
- package/dist/agent/shared-prompts.js.map +1 -1
- package/dist/agent/sub-agent-factory.d.ts +1 -1
- package/dist/agent/sub-agent-factory.js +2 -1
- package/dist/agent/sub-agent-factory.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +1 -0
- package/dist/agent/system-prompt.js +29 -4
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants/max-steps.d.ts +0 -1
- package/dist/constants/max-steps.js +0 -1
- package/dist/constants/max-steps.js.map +1 -1
- package/dist/debug/sanitize-debug-snapshot.js +3 -3
- package/dist/debug/sanitize-debug-snapshot.js.map +1 -1
- package/dist/error-formatting.js +5 -12
- package/dist/error-formatting.js.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.js +17 -9
- package/dist/index.js.map +1 -1
- package/dist/knowledge-base/materialize-knowledge-base.js +24 -16
- package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -1
- package/dist/mcp/mcp-client-manager.js +3 -4
- package/dist/mcp/mcp-client-manager.js.map +1 -1
- package/dist/prompts/prompt-profiles.d.ts +24 -0
- package/dist/prompts/prompt-profiles.js +77 -0
- package/dist/prompts/prompt-profiles.js.map +1 -0
- package/dist/prompts/skill-variants.d.ts +15 -0
- package/dist/prompts/skill-variants.js +81 -0
- package/dist/prompts/skill-variants.js.map +1 -0
- package/dist/runtime/background-task-manager.js +5 -5
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/resumable-stream-executor.js +2 -3
- package/dist/runtime/resumable-stream-executor.js.map +1 -1
- package/dist/runtime/run-state-registry.d.ts +12 -2
- package/dist/runtime/run-state-registry.js +35 -2
- package/dist/runtime/run-state-registry.js.map +1 -1
- package/dist/skills/materialize-runtime-skills.js +30 -23
- package/dist/skills/materialize-runtime-skills.js.map +1 -1
- package/dist/skills/runtime-skills.d.ts +8 -0
- package/dist/skills/runtime-skills.js +27 -0
- package/dist/skills/runtime-skills.js.map +1 -1
- package/dist/skills/skill-gates.d.ts +2 -0
- package/dist/skills/skill-gates.js +4 -1
- package/dist/skills/skill-gates.js.map +1 -1
- package/dist/storage/workflow-loop-storage.d.ts +550 -0
- package/dist/storage/workflow-loop-storage.js +31 -1
- package/dist/storage/workflow-loop-storage.js.map +1 -1
- package/dist/stream/consume-with-hitl.d.ts +0 -28
- package/dist/stream/consume-with-hitl.js +0 -50
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/tools/activity.tool.d.ts +2 -0
- package/dist/tools/activity.tool.js +102 -0
- package/dist/tools/activity.tool.js.map +1 -0
- package/dist/tools/credentials.tool.js +5 -3
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +47 -10
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +1 -0
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +45 -55
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/n8n-docs/schemas.js +1 -1
- package/dist/tools/n8n-docs/schemas.js.map +1 -1
- package/dist/tools/n8n-docs.tool.d.ts +2 -1
- package/dist/tools/n8n-docs.tool.js +11 -3
- package/dist/tools/n8n-docs.tool.js.map +1 -1
- package/dist/tools/orchestration/agent-persistence.d.ts +0 -12
- package/dist/tools/orchestration/agent-persistence.js +0 -34
- package/dist/tools/orchestration/agent-persistence.js.map +1 -1
- package/dist/tools/orchestration/build-agent.tool.js +3 -3
- package/dist/tools/orchestration/build-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/complete-checkpoint.tool.js +1 -1
- package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
- package/dist/tools/orchestration/plan.tool.js +5 -1
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.js +7 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/tracing-utils.d.ts +1 -6
- package/dist/tools/orchestration/tracing-utils.js +0 -99
- package/dist/tools/orchestration/tracing-utils.js.map +1 -1
- package/dist/tools/orchestration/verification/analyze-result.d.ts +5 -0
- package/dist/tools/orchestration/verification/analyze-result.js +27 -5
- package/dist/tools/orchestration/verification/analyze-result.js.map +1 -1
- package/dist/tools/orchestration/verification/claim.d.ts +14 -0
- package/dist/tools/orchestration/verification/claim.js +52 -0
- package/dist/tools/orchestration/verification/claim.js.map +1 -0
- package/dist/tools/orchestration/verification/finalize-result.d.ts +5 -2
- package/dist/tools/orchestration/verification/finalize-result.js +21 -25
- package/dist/tools/orchestration/verification/finalize-result.js.map +1 -1
- package/dist/tools/orchestration/verification/resolve-target.js +39 -15
- package/dist/tools/orchestration/verification/resolve-target.js.map +1 -1
- package/dist/tools/orchestration/verification/resolved-parameter-warnings.d.ts +58 -0
- package/dist/tools/orchestration/verification/resolved-parameter-warnings.js +127 -0
- package/dist/tools/orchestration/verification/resolved-parameter-warnings.js.map +1 -0
- package/dist/tools/orchestration/verification/scripted-gate-run.d.ts +3 -0
- package/dist/tools/orchestration/verification/scripted-gate-run.js +22 -2
- package/dist/tools/orchestration/verification/scripted-gate-run.js.map +1 -1
- package/dist/tools/orchestration/verification/types.d.ts +8 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +3 -0
- package/dist/tools/orchestration/verify-built-workflow.tool.js +141 -18
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.js +3 -2
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/task-control.tool.js +8 -1
- package/dist/tools/task-control.tool.js.map +1 -1
- package/dist/tools/tool-ids.d.ts +1 -3
- package/dist/tools/tool-ids.js +2 -3
- package/dist/tools/tool-ids.js.map +1 -1
- package/dist/tools/web-research/sanitize-web-content.d.ts +1 -2
- package/dist/tools/web-research/sanitize-web-content.js +6 -19
- package/dist/tools/web-research/sanitize-web-content.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.d.ts +12 -0
- package/dist/tools/workflows/build-workflow.tool.js +173 -32
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/detect-unparseable-openai-schema.js +1 -1
- package/dist/tools/workflows/detect-unparseable-openai-schema.js.map +1 -1
- package/dist/tools/workflows/detect-wrong-kind-locator.js +7 -9
- package/dist/tools/workflows/detect-wrong-kind-locator.js.map +1 -1
- package/dist/tools/workflows/reconcile-simulation-plan.js +1 -1
- package/dist/tools/workflows/reconcile-simulation-plan.js.map +1 -1
- package/dist/tools/workflows/resolve-credentials.js.map +1 -1
- package/dist/tools/workflows/setup-items.d.ts +5 -0
- package/dist/tools/workflows/setup-items.js +29 -0
- package/dist/tools/workflows/setup-items.js.map +1 -1
- package/dist/tools/workflows/setup-panel-state.d.ts +31 -0
- package/dist/tools/workflows/setup-panel-state.js +197 -0
- package/dist/tools/workflows/setup-panel-state.js.map +1 -0
- package/dist/tools/workflows/setup-workflow.service.d.ts +3 -1
- package/dist/tools/workflows/setup-workflow.service.js +20 -13
- package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
- package/dist/tools/workflows/validate-workflow.service.js.map +1 -1
- package/dist/tools/workflows/wait-gate-script.js +1 -1
- package/dist/tools/workflows/wait-gate-script.js.map +1 -1
- package/dist/tools/workflows/workflow-build-reporting.d.ts +1 -0
- package/dist/tools/workflows/workflow-build-reporting.js +1 -0
- package/dist/tools/workflows/workflow-build-reporting.js.map +1 -1
- package/dist/tools/workflows/workflow-build-telemetry.d.ts +5 -1
- package/dist/tools/workflows/workflow-build-telemetry.js +8 -0
- package/dist/tools/workflows/workflow-build-telemetry.js.map +1 -1
- package/dist/tools/workflows/workflow-file-bindings.js +0 -2
- package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
- package/dist/tools/workflows/workflow-source-compiler.js +80 -25
- package/dist/tools/workflows/workflow-source-compiler.js.map +1 -1
- package/dist/tools/workflows/workflow-validation-warnings.d.ts +13 -2
- package/dist/tools/workflows/workflow-validation-warnings.js +55 -1
- package/dist/tools/workflows/workflow-validation-warnings.js.map +1 -1
- package/dist/tools/workflows.tool.d.ts +1 -5
- package/dist/tools/workflows.tool.js +112 -136
- package/dist/tools/workflows.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +11 -22
- package/dist/tracing/langsmith-tracing.js +127 -112
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/sandbox-tracing.d.ts +17 -0
- package/dist/tracing/sandbox-tracing.js +60 -0
- package/dist/tracing/sandbox-tracing.js.map +1 -0
- package/dist/tracing/trace-payloads.d.ts +3 -0
- package/dist/tracing/trace-payloads.js +25 -4
- package/dist/tracing/trace-payloads.js.map +1 -1
- package/dist/tracing/trace-replay.js.map +1 -1
- package/dist/types.d.ts +57 -67
- package/dist/types.js.map +1 -1
- package/dist/utils/eval-agents.js +3 -7
- package/dist/utils/eval-agents.js.map +1 -1
- package/dist/utils/generate-validated-json.js +2 -6
- package/dist/utils/generate-validated-json.js.map +1 -1
- package/dist/workflow-loop/guidance.d.ts +1 -0
- package/dist/workflow-loop/guidance.js +48 -4
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workflow-loop/render-claim.d.ts +6 -0
- package/dist/workflow-loop/render-claim.js +61 -0
- package/dist/workflow-loop/render-claim.js.map +1 -0
- package/dist/workflow-loop/setup-verification-policy.d.ts +3 -1
- package/dist/workflow-loop/setup-verification-policy.js +38 -0
- package/dist/workflow-loop/setup-verification-policy.js.map +1 -1
- package/dist/workflow-loop/verification-obligation.d.ts +1 -0
- package/dist/workflow-loop/verification-obligation.js +47 -14
- package/dist/workflow-loop/verification-obligation.js.map +1 -1
- package/dist/workflow-loop/verification-progress.d.ts +62 -0
- package/dist/workflow-loop/verification-progress.js +64 -0
- package/dist/workflow-loop/verification-progress.js.map +1 -0
- package/dist/workflow-loop/workflow-loop-controller.js +2 -0
- package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +993 -0
- package/dist/workflow-loop/workflow-loop-state.js +32 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workflow-loop/workflow-task-service.d.ts +6 -1
- package/dist/workflow-loop/workflow-task-service.js +86 -6
- package/dist/workflow-loop/workflow-task-service.js.map +1 -1
- package/dist/workspace/lazy-runtime-workspace.js +57 -9
- package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
- package/dist/workspace/prebaked-workspace-bundle.js +93 -58
- package/dist/workspace/prebaked-workspace-bundle.js.map +1 -1
- package/dist/workspace/sandbox-fs.js +56 -32
- package/dist/workspace/sandbox-fs.js.map +1 -1
- package/dist/workspace/sandbox-setup.js +65 -52
- package/dist/workspace/sandbox-setup.js.map +1 -1
- package/dist/workspace/workspace-files.js +76 -57
- package/dist/workspace/workspace-files.js.map +1 -1
- package/knowledge-base/reference/workflow-builder-guardrails.md +4 -2
- package/package.json +12 -12
- package/skills/agent-builder/SKILL.md +15 -6
- package/skills/credential-recipe-research/SKILL.md +1 -1
- package/skills/debugging-executions/SKILL.md +24 -0
- package/skills/instance-awareness/SKILL.md +122 -0
- package/skills/intent-recognition/SKILL.md +83 -49
- package/skills/n8n-docs-assistant/SKILL.md +5 -9
- package/skills/planned-task-runtime/SKILL.md +2 -2
- package/skills/planning/SKILL.md +3 -0
- package/skills/post-build-flow/SKILL.md +173 -23
- package/skills/progressive-building/SKILL.md +112 -0
- package/skills/workflow-builder/SKILL.md +45 -21
- package/dist/agent/sub-agent-briefing.d.ts +0 -20
- package/dist/agent/sub-agent-briefing.js +0 -39
- package/dist/agent/sub-agent-briefing.js.map +0 -1
- package/dist/tools/evals/analyze-agent-input-columns.service.d.ts +0 -6
- package/dist/tools/evals/analyze-agent-input-columns.service.js +0 -17
- package/dist/tools/evals/analyze-agent-input-columns.service.js.map +0 -1
- package/dist/tools/evals/apply-pin-data.service.d.ts +0 -3
- package/dist/tools/evals/apply-pin-data.service.js +0 -19
- package/dist/tools/evals/apply-pin-data.service.js.map +0 -1
- package/dist/tools/evals/column-ref-utils.d.ts +0 -20
- package/dist/tools/evals/column-ref-utils.js +0 -274
- package/dist/tools/evals/column-ref-utils.js.map +0 -1
- package/dist/tools/evals/describe-metric-for-workflow.service.d.ts +0 -6
- package/dist/tools/evals/describe-metric-for-workflow.service.js +0 -90
- package/dist/tools/evals/describe-metric-for-workflow.service.js.map +0 -1
- package/dist/tools/evals/detect-agent-named-refs.service.d.ts +0 -9
- package/dist/tools/evals/detect-agent-named-refs.service.js +0 -83
- package/dist/tools/evals/detect-agent-named-refs.service.js.map +0 -1
- package/dist/tools/evals/detect-ai-nodes.d.ts +0 -7
- package/dist/tools/evals/detect-ai-nodes.js +0 -75
- package/dist/tools/evals/detect-ai-nodes.js.map +0 -1
- package/dist/tools/evals/detect-tool-refs.service.d.ts +0 -7
- package/dist/tools/evals/detect-tool-refs.service.js +0 -66
- package/dist/tools/evals/detect-tool-refs.service.js.map +0 -1
- package/dist/tools/evals/ensure-eval-data-table.service.d.ts +0 -15
- package/dist/tools/evals/ensure-eval-data-table.service.js +0 -83
- package/dist/tools/evals/ensure-eval-data-table.service.js.map +0 -1
- package/dist/tools/evals/eval-data-requirements.service.d.ts +0 -20
- package/dist/tools/evals/eval-data-requirements.service.js +0 -187
- package/dist/tools/evals/eval-data-requirements.service.js.map +0 -1
- package/dist/tools/evals/evals.tool.d.ts +0 -45
- package/dist/tools/evals/evals.tool.js +0 -454
- package/dist/tools/evals/evals.tool.js.map +0 -1
- package/dist/tools/evals/extract-rows-from-history.service.d.ts +0 -17
- package/dist/tools/evals/extract-rows-from-history.service.js +0 -103
- package/dist/tools/evals/extract-rows-from-history.service.js.map +0 -1
- package/dist/tools/evals/format-eval-setup-task.d.ts +0 -16
- package/dist/tools/evals/format-eval-setup-task.js +0 -167
- package/dist/tools/evals/format-eval-setup-task.js.map +0 -1
- package/dist/tools/evals/generate-sample-rows.service.d.ts +0 -35
- package/dist/tools/evals/generate-sample-rows.service.js +0 -259
- package/dist/tools/evals/generate-sample-rows.service.js.map +0 -1
- package/dist/tools/evals/generate-tool-ref-pin-data.service.d.ts +0 -11
- package/dist/tools/evals/generate-tool-ref-pin-data.service.js +0 -112
- package/dist/tools/evals/generate-tool-ref-pin-data.service.js.map +0 -1
- package/dist/tools/evals/metric-catalog.d.ts +0 -63
- package/dist/tools/evals/metric-catalog.js +0 -81
- package/dist/tools/evals/metric-catalog.js.map +0 -1
- package/dist/tools/orchestration/eval-data-agent.tool.d.ts +0 -2
- package/dist/tools/orchestration/eval-data-agent.tool.js +0 -184
- package/dist/tools/orchestration/eval-data-agent.tool.js.map +0 -1
- package/dist/tools/orchestration/eval-setup-agent.prompt.d.ts +0 -1
- package/dist/tools/orchestration/eval-setup-agent.prompt.js +0 -238
- package/dist/tools/orchestration/eval-setup-agent.prompt.js.map +0 -1
- package/dist/tools/orchestration/eval-setup-agent.tool.d.ts +0 -31
- package/dist/tools/orchestration/eval-setup-agent.tool.js +0 -204
- package/dist/tools/orchestration/eval-setup-agent.tool.js.map +0 -1
- package/dist/tools/workflows/observed-workflow-checksums.d.ts +0 -4
- package/dist/tools/workflows/observed-workflow-checksums.js +0 -82
- package/dist/tools/workflows/observed-workflow-checksums.js.map +0 -1
|
@@ -33,6 +33,50 @@ For trigger `inputData` shapes, read
|
|
|
33
33
|
the sandbox workspace when available, or load this skill's
|
|
34
34
|
`references/trigger-input-data-shapes.md` linked file.
|
|
35
35
|
|
|
36
|
+
## Setup panel
|
|
37
|
+
|
|
38
|
+
Use this section when the system prompt describes the persistent setup panel,
|
|
39
|
+
setup returns `announced: true`, or the current user input contains
|
|
40
|
+
`<workflow-test-request>`. Otherwise, keep the setup card flow below.
|
|
41
|
+
|
|
42
|
+
- Verify what the build can simulate before asking the user to finish setup.
|
|
43
|
+
Missing credentials do not prevent this verification. Report which outputs
|
|
44
|
+
were simulated. A simulated result does not prove a live connection.
|
|
45
|
+
- When setup returns `announced: true`, summarize the open items and any
|
|
46
|
+
validation warnings. End the turn. The user can complete setup in the panel
|
|
47
|
+
while chat stays available. Do not wait, poll, or open a trigger-test card.
|
|
48
|
+
- On a later user turn, trust `<workflow-setup-state>` over earlier setup
|
|
49
|
+
results. If items settled, none remain open, and there are no validation
|
|
50
|
+
warnings, verify the current saved configuration with `verify-built-workflow`.
|
|
51
|
+
It refreshes the credential plan.
|
|
52
|
+
Report remaining simulations or connection failures. Do not claim live
|
|
53
|
+
success from the earlier build result.
|
|
54
|
+
- `<workflow-test-request>` in the current user input means the user clicked
|
|
55
|
+
Execute. A block in conversation history does not request another execution.
|
|
56
|
+
Use the workflow ID in the current block. Inspect its current
|
|
57
|
+
`<workflow-setup-state>` and read the saved workflow with
|
|
58
|
+
`workflows(action="get-as-code")`. Do not call `workflows(action="setup")`
|
|
59
|
+
for this precheck. It announces setup and ends the turn. If the target is
|
|
60
|
+
absent from the state block, inspect its saved configuration. If required
|
|
61
|
+
setup cannot be confirmed, report what is missing and end the turn.
|
|
62
|
+
If required items remain open for this
|
|
63
|
+
workflow, report them and end the turn without a live run. Otherwise,
|
|
64
|
+
use `executions(action="run")` with suitable trigger input. The user has
|
|
65
|
+
already requested this test; do not ask whether they want it. The execution
|
|
66
|
+
tool still enforces its approval policy. Do not publish the workflow to test it.
|
|
67
|
+
- Read the execution output and summarize what ran and what it returned. For
|
|
68
|
+
failures, inspect `executions(action="debug")`. Fix the same workflow when
|
|
69
|
+
possible. Use the current saved source so panel edits are preserved. Report
|
|
70
|
+
unresolved setup or failures in chat. Before another live run, inspect the
|
|
71
|
+
successful effect nodes from the failed run. Follow
|
|
72
|
+
[Cleaning up after a live test](#cleaning-up-after-a-live-test) for any artifacts
|
|
73
|
+
they left behind. After a repair and that artifact check, test the updated
|
|
74
|
+
workflow and inspect its output. Do not substitute mocked verification
|
|
75
|
+
for the requested execution.
|
|
76
|
+
|
|
77
|
+
A setup card that was already open keeps its apply and trigger-test resume
|
|
78
|
+
flow. Its result is not a panel announcement unless it has `announced: true`.
|
|
79
|
+
|
|
36
80
|
## Verification follow-up
|
|
37
81
|
|
|
38
82
|
When the current message contains `<workflow-verification-follow-up>`, verify
|
|
@@ -41,14 +85,17 @@ obligation is `ready_to_verify` or `verifying`, call `verify-built-workflow`. Do
|
|
|
41
85
|
**not** call `workflows(action="setup")` in this turn and do **not** declare the
|
|
42
86
|
workflow finished if `outcome.setupRequirement.status === "required"` — setup is
|
|
43
87
|
routed automatically as a separate `<workflow-setup-required>` step after
|
|
44
|
-
verification.
|
|
88
|
+
verification. For a multi-trigger outcome, verify every trigger that does not
|
|
89
|
+
yet have a recorded successful verification. Make all of these calls in this turn.
|
|
45
90
|
|
|
46
91
|
## Setup follow-up
|
|
47
92
|
|
|
48
93
|
When the current message contains `<workflow-setup-required>`, your first action
|
|
49
94
|
is to call `workflows(action="setup")` with the `workflowId` from the payload. Do
|
|
50
95
|
not verify, do not ask, do not write a message first — the inline setup card in
|
|
51
|
-
the
|
|
96
|
+
the n8n Assistant panel is the user-visible surface. If the result has
|
|
97
|
+
`announced: true`, use the persistent panel instructions above and end the turn.
|
|
98
|
+
If it returns `deferred:
|
|
52
99
|
true`, respect the user's choice and do not retry with any other setup tool.
|
|
53
100
|
A result carrying `skippedByUser` names credentials the user already passed on:
|
|
54
101
|
never re-open setup for those, in this turn or any later one — see
|
|
@@ -93,7 +140,7 @@ it has you fetch, never from memory:
|
|
|
93
140
|
- `placeholders` — one entry per marker: `name`, user-facing `title`, an
|
|
94
141
|
optional `info` clarifying the value itself — its format or which of the
|
|
95
142
|
provider's tokens it is (e.g. "Starts with tvly-"). Never where to obtain
|
|
96
|
-
it, and never a URL or domain: the user asks the
|
|
143
|
+
it, and never a URL or domain: the user asks the n8n Assistant for that from
|
|
97
144
|
the credential form. `type` is `password` unless clearly non-secret (at
|
|
98
145
|
least one placeholder must stay `password`). Add `optional: true` only when
|
|
99
146
|
the provider documents the value as optional (e.g. an org/region
|
|
@@ -101,7 +148,7 @@ it has you fetch, never from memory:
|
|
|
101
148
|
omitted from the request.
|
|
102
149
|
- `docsUrl` — the provider page where a logged-in user CREATES/COPIES the
|
|
103
150
|
secret (e.g. `https://replicate.com/account/api-tokens`) — never the API
|
|
104
|
-
reference. Not shown in the form: the
|
|
151
|
+
reference. Not shown in the form: the n8n Assistant help thread uses it to
|
|
105
152
|
send the user to the exact page. Found via the `credential-recipe-research`
|
|
106
153
|
procedure; omit when it finds nothing conclusive.
|
|
107
154
|
- `testUrl` — a documented side-effect-free GET that rejects a bad key with
|
|
@@ -193,6 +240,14 @@ workflow does not need to be active. Form, webhook, chat, and other event-based
|
|
|
193
240
|
triggers are all testable while the workflow is unpublished. Never publish a
|
|
194
241
|
workflow as a precondition for running it.
|
|
195
242
|
|
|
243
|
+
**Webhook input must carry the fields the workflow reads.** A flat `inputData`
|
|
244
|
+
becomes the request `body` only; `query`, `headers` and `params` stay empty. When
|
|
245
|
+
any expression reads `$json.query.*`, `$json.headers.*` or `$json.params.*`, pass
|
|
246
|
+
the request envelope `{ body: {...}, query: {...}, headers: {...}, params: {...} }` (or a
|
|
247
|
+
`fixtureOverrides` entry on the trigger node). Otherwise the field resolves empty,
|
|
248
|
+
the run still succeeds, and that field is unverified — say so instead of
|
|
249
|
+
reporting it as working.
|
|
250
|
+
|
|
196
251
|
Do not proactively offer, recommend, or mention publishing until a successful
|
|
197
252
|
execution has run every required node on the claimed path without mocked
|
|
198
253
|
credentials, simulated node output, fixture overrides, or temporary pin data
|
|
@@ -201,6 +256,14 @@ publish-readiness evidence. If the user explicitly asks to publish before a
|
|
|
201
256
|
live execution succeeds, warn that the live path remains untested, then follow
|
|
202
257
|
the requested publish flow.
|
|
203
258
|
|
|
259
|
+
`workflows(action="publish")` enforces this. While the latest verification left
|
|
260
|
+
nodes unreached or simulated, the call is refused and returns
|
|
261
|
+
`verificationDisclosure` — the coverage facts, generated from the run. Relay
|
|
262
|
+
those facts to the user and offer a live end-to-end test. Publish only if they
|
|
263
|
+
still ask, by calling publish again with `acknowledgeUnverified: true`. Never
|
|
264
|
+
set that flag to skip the disclosure. The user also sees the same facts in the
|
|
265
|
+
publish approval prompt, so a summary that contradicts them is visible to them.
|
|
266
|
+
|
|
204
267
|
Execution evidence can come from a run you started or a run the user started.
|
|
205
268
|
If the user says they ran the workflow manually, call
|
|
206
269
|
`executions(action="list", workflowId)`, identify the relevant run, and inspect
|
|
@@ -210,7 +273,7 @@ when the inspected result confirms success and that every required node on the
|
|
|
210
273
|
claimed path ran. Do not count it if mocked, simulated, fixture, or pinned output
|
|
211
274
|
was used. You may offer publishing after that confirmation.
|
|
212
275
|
|
|
213
|
-
For workflows produced by `build-workflow`, **always verify with
|
|
276
|
+
For post-build verification of workflows produced by `build-workflow`, **always verify with
|
|
214
277
|
`verify-built-workflow`, never with raw `executions(action="run")`.** It reuses
|
|
215
278
|
the build outcome simulation plan, mocked credentials, and temporary pin data, so
|
|
216
279
|
destructive nodes are pinned and it is safe to call repeatedly. A raw
|
|
@@ -250,17 +313,43 @@ For a workflow with more than one trigger (`triggerNodes` has multiple entries),
|
|
|
250
313
|
entry in `triggerNodes`. Naming no trigger verifies only the auto-detected
|
|
251
314
|
one. An unresolvable name is rejected outright, so a rejected call means the
|
|
252
315
|
name is wrong — re-read `triggerNodes`, never fall back to editing.
|
|
253
|
-
- Each pass
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
-
|
|
258
|
-
|
|
259
|
-
|
|
316
|
+
- Each pass reports `nodesNotReached` only for its selected trigger's main-flow
|
|
317
|
+
branch. Coverage is the **union** across successful passes. Run every trigger
|
|
318
|
+
before you report a workflow coverage gap. Different triggers can select
|
|
319
|
+
different outputs of a shared Switch or If node.
|
|
320
|
+
- A failed rerun removes that trigger's earlier coverage. Verify that trigger
|
|
321
|
+
again before you claim that the workflow is verified.
|
|
322
|
+
- Report each trigger and whether its branch ran. Use the combined `claim` to
|
|
323
|
+
describe the result (see "Claiming success").
|
|
260
324
|
- When the user asked for a live run, pass `triggerNodeName` to
|
|
261
325
|
`executions(action="run")` the same way — one run per trigger — and report
|
|
262
326
|
each branch's result.
|
|
263
327
|
|
|
328
|
+
### Fixing a workflow that is already published
|
|
329
|
+
|
|
330
|
+
The publishing rules above assume a new workflow. A repair of a workflow that
|
|
331
|
+
is already published is different. That workflow runs in production right now,
|
|
332
|
+
and it runs the version published before your fix. Your save creates a draft,
|
|
333
|
+
and the draft is not live. The published version keeps running, broken, until
|
|
334
|
+
somebody publishes the fix.
|
|
335
|
+
|
|
336
|
+
For a repair on a published workflow:
|
|
337
|
+
|
|
338
|
+
- Telling the user the fix is not live yet is not an offer to publish. Say it.
|
|
339
|
+
- Do NOT report the workflow as fixed, live, running, or working in production
|
|
340
|
+
while the published version is the older one. Say the fix is in the draft.
|
|
341
|
+
- `verify-built-workflow` returns `claim.liveState`. `live-stale` means the
|
|
342
|
+
published version is older than the draft you just verified. The result also
|
|
343
|
+
carries `liveStateNote`. Relay it.
|
|
344
|
+
- Without a claim, call `workflows(action="get", workflowId)` and compare
|
|
345
|
+
`versionId` (the draft) with `activeVersionId` (the published version). They
|
|
346
|
+
differ while the fix is not live. A null `activeVersionId` means the workflow
|
|
347
|
+
is not published at all.
|
|
348
|
+
- Ask whether to publish the fix. Publish only after the user agrees.
|
|
349
|
+
- Name the version in a retest invitation: the draft, or the published version.
|
|
350
|
+
"Send another email to test it" is wrong when the fix is still a draft — the
|
|
351
|
+
test would run the broken version and look like the fix failed.
|
|
352
|
+
|
|
264
353
|
## After build-workflow succeeds
|
|
265
354
|
|
|
266
355
|
1. Read `workflowId`, `workItemId`, `triggerNodes`, `verificationReadiness`,
|
|
@@ -276,16 +365,23 @@ For a workflow with more than one trigger (`triggerNodes` has multiple entries),
|
|
|
276
365
|
`workflow-builder` skill and patch the same workflow with `build-workflow`
|
|
277
366
|
using the existing `workflowId` and `workItemId`; then inspect and verify
|
|
278
367
|
again.
|
|
279
|
-
- If `verificationReadiness.status === "already_verified"`,
|
|
280
|
-
|
|
368
|
+
- If `verificationReadiness.status === "already_verified"`, do not repeat
|
|
369
|
+
automatic verification. Read the saved claim before describing the workflow
|
|
370
|
+
as verified. For tracked multi-trigger builds, follow the verification
|
|
371
|
+
obligation until every trigger has a successful pass.
|
|
281
372
|
|
|
282
373
|
- If `verificationReadiness.status === "ready"`, call
|
|
283
374
|
`verify-built-workflow` with the `workflowId`, the `workItemId` when you
|
|
284
375
|
have it, and the trigger-appropriate `inputData` shape. When `triggerNodes`
|
|
285
376
|
has more than one entry, call it once per trigger with `triggerNodeName`.
|
|
286
|
-
- If `verificationReadiness.status === "needs_setup"
|
|
287
|
-
|
|
288
|
-
|
|
377
|
+
- If `verificationReadiness.status === "needs_setup"` and the persistent setup
|
|
378
|
+
panel is enabled, first try `verify-built-workflow` when verification has not
|
|
379
|
+
run. It can verify simulated paths or report that a simulation plan is
|
|
380
|
+
unavailable. Then announce setup with `workflows(action="setup")`. Do not use
|
|
381
|
+
a live execution to work around a blocker.
|
|
382
|
+
- If `verificationReadiness.status === "needs_setup"` and the persistent setup
|
|
383
|
+
panel is disabled, call `workflows(action="setup")` with the workflow ID.
|
|
384
|
+
The user configures the workflow through the inline setup card.
|
|
289
385
|
- If `verificationReadiness.status === "not_verifiable"`, do not infer
|
|
290
386
|
lower-level verification conditions; use the readiness guidance to give a
|
|
291
387
|
clear warning or manual-test note. This is a warning completion state, not
|
|
@@ -317,10 +413,26 @@ For a workflow with more than one trigger (`triggerNodes` has multiple entries),
|
|
|
317
413
|
budget is exhausted.
|
|
318
414
|
- Relay `simulationNote` (nodes whose output was simulated) to the user
|
|
319
415
|
whenever it is present.
|
|
416
|
+
- Read `resolvedParameterWarnings`. A simulated node's preview is fixture
|
|
417
|
+
data: it never proves an expression resolved. Each warning names a
|
|
418
|
+
parameter that resolved to empty or threw on the real input — the usual
|
|
419
|
+
causes are a trigger input that lacks the field (body-only webhook input
|
|
420
|
+
for a `$json.query.*` expression) or a wrong expression. Fix the input
|
|
421
|
+
shape or the expression, re-run, and never report that field as working
|
|
422
|
+
while a warning stands. Each warning carries the execution ID that was
|
|
423
|
+
checked. Use that ID with `executions(action="get-resolved-node-parameters")`
|
|
424
|
+
to inspect the same input.
|
|
425
|
+
- Read `skippedParameterChecks`. These nodes have unchecked dynamic fields.
|
|
426
|
+
The list shows at most 20 checks. `skippedParameterCheckCount` includes
|
|
427
|
+
omitted checks, which also leave dynamic fields unverified.
|
|
428
|
+
State that limitation even if the run succeeded and no parameter warnings
|
|
429
|
+
were returned. Do not request parameter values when sharing is disabled.
|
|
320
430
|
3. After verification handling, if `setupRequirement.status === "required"` and
|
|
321
431
|
setup has not already run for this build, call `workflows(action="setup")`
|
|
322
432
|
with the workflowId.
|
|
323
|
-
4. When `workflows(action="setup")`
|
|
433
|
+
4. When `workflows(action="setup")` returns `announced: true`, summarize the
|
|
434
|
+
panel state and end the turn. The live-test follow-up waits for a later user
|
|
435
|
+
turn or Execute request. When the tool opens the inline setup card, the card is the
|
|
324
436
|
user-visible surface. Do not tell the user to open the editor, use the canvas,
|
|
325
437
|
or click a Setup button; the user does not need to navigate anywhere.
|
|
326
438
|
5. When `workflows(action="setup")` returns `deferred: true`, or reports
|
|
@@ -350,7 +462,9 @@ For a workflow with more than one trigger (`triggerNodes` has multiple entries),
|
|
|
350
462
|
proved it works end-to-end with full coverage.
|
|
351
463
|
9. Only call `workflows(action="publish")` when the user explicitly asks to
|
|
352
464
|
publish. Never publish automatically or proactively offer publishing before
|
|
353
|
-
the publish-readiness requirement above is met.
|
|
465
|
+
the publish-readiness requirement above is met. A repair of a workflow that
|
|
466
|
+
is already published is the exception — follow
|
|
467
|
+
[Fixing a workflow that is already published](#fixing-a-workflow-that-is-already-published).
|
|
354
468
|
10. After a direct new primary workflow is successfully published, follow
|
|
355
469
|
[Error workflow follow-up](#error-workflow-follow-up).
|
|
356
470
|
Do not replace this explicit opt-in with a generic "add
|
|
@@ -417,6 +531,9 @@ After workflow setup completes or is applied, if the latest verification for
|
|
|
417
531
|
that workflow used mocked credentials, simulated node output, fixture overrides,
|
|
418
532
|
temporary pin data, or another mocked input, ask whether the user wants a live
|
|
419
533
|
test without mocks. Ask only about the live test. Do not run it automatically.
|
|
534
|
+
An explicit test request in the current user input, including
|
|
535
|
+
`<workflow-test-request>`, already answers
|
|
536
|
+
this question. Run the requested test through `executions(action="run")`.
|
|
420
537
|
Do not offer publishing as an alternative or describe the workflow as ready to
|
|
421
538
|
use or publish.
|
|
422
539
|
|
|
@@ -476,9 +593,39 @@ result.
|
|
|
476
593
|
|
|
477
594
|
## Claiming success
|
|
478
595
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
`
|
|
596
|
+
For tracked multi-trigger builds, `claim` combines the saved successful passes.
|
|
597
|
+
A `verified` claim requires every trigger to pass and real coverage for every planned node.
|
|
598
|
+
Verify `claim.pendingTriggers` within the attempt limit. `nodesNotReached`
|
|
599
|
+
outside the claim describes only the current trigger's branch.
|
|
600
|
+
|
|
601
|
+
`verify-built-workflow` returns a `claim`, and its `level` decides what you may
|
|
602
|
+
say:
|
|
603
|
+
|
|
604
|
+
- `verified` — you may call the workflow verified, tested, or working.
|
|
605
|
+
- `partial`, `unproven`, or `failed` — you may NOT. Name what is unconfirmed
|
|
606
|
+
instead.
|
|
607
|
+
|
|
608
|
+
`claim.liveState` decides separately whether you may call the workflow live. A
|
|
609
|
+
run always executes the draft, so `verified` says nothing about production:
|
|
610
|
+
|
|
611
|
+
- `live-stale` — the published version is older than the draft you verified.
|
|
612
|
+
Do NOT call the workflow live, running, or working in production. Say the fix
|
|
613
|
+
is in the draft, and see
|
|
614
|
+
[Fixing a workflow that is already published](#fixing-a-workflow-that-is-already-published).
|
|
615
|
+
- `live-current` — the published version is the one you verified.
|
|
616
|
+
- `unpublished` — the workflow does not run in production at all.
|
|
617
|
+
|
|
618
|
+
**`success: true` does not mean verified.** It means the run ended without an
|
|
619
|
+
error, and a run with every write simulated also ends without an error. Read
|
|
620
|
+
`claim.level`, not `success`.
|
|
621
|
+
|
|
622
|
+
Nothing else tells the user how strong the claim is. Your message is the only
|
|
623
|
+
place they learn it, so name the unreached and simulated nodes yourself, and say
|
|
624
|
+
what stays unconfigured and what that means when the workflow runs.
|
|
625
|
+
|
|
626
|
+
Without a claim, do not tell the user a workflow is "fixed", "verified",
|
|
627
|
+
"tested", "working", or has "no errors" unless you have a passing
|
|
628
|
+
`executions(action="run")` or an inspected user-run execution that exercised the
|
|
482
629
|
path being claimed. Do not call a workflow "ready to use" or "ready to publish"
|
|
483
630
|
unless a passing execution met the publish-readiness requirement above. A
|
|
484
631
|
successful `build-workflow`/save, a static `workflows(action="validate")`, or
|
|
@@ -489,7 +636,10 @@ applies to rows or records written to an external system: never make quantitativ
|
|
|
489
636
|
claims ("22 rows written", "columns matched") that you did not read back from
|
|
490
637
|
the effect node's actual output (`executions(action="get-node-output")`) or from
|
|
491
638
|
the target system itself — a successful run status does not prove the _right
|
|
492
|
-
data_ was written, only that nodes ran.
|
|
639
|
+
data_ was written, only that nodes ran. Output of a simulated or pinned node is
|
|
640
|
+
fixture data: never quote it as what the workflow produced, and never cite it as
|
|
641
|
+
proof that an expression resolved — use `resolvedParameterWarnings` or
|
|
642
|
+
`executions(action="get-resolved-node-parameters")` for that. If you could not run the
|
|
493
643
|
failing path or inspect the artifact, say so plainly — "I couldn't verify X
|
|
494
644
|
because Y" — and name what is unconfirmed. An honest "could not verify" beats an
|
|
495
645
|
unverified success claim.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: progressive-building
|
|
3
|
+
dependencies:
|
|
4
|
+
tools:
|
|
5
|
+
- build-workflow
|
|
6
|
+
- verify-built-workflow
|
|
7
|
+
- workflows
|
|
8
|
+
- executions
|
|
9
|
+
description: >-
|
|
10
|
+
Load before build-workflow and before scoping or planning new workflows and
|
|
11
|
+
feature additions, including requests spanning multiple workflows. Implement
|
|
12
|
+
one increment per user message. Finish setup and inspect a successful real
|
|
13
|
+
execution before offering another increment. Then wait for the next user
|
|
14
|
+
reply. Partial setup is incomplete. A first setup or test refusal pauses
|
|
15
|
+
building. Follow the skill's full-build exceptions. Also supports workflow edits
|
|
16
|
+
and repairs. For workflows that create or write Data Tables, load
|
|
17
|
+
data-table-manager first. Requests only to
|
|
18
|
+
run, inspect, or manage existing resources use their normal tools and skills.
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Progressive building
|
|
22
|
+
|
|
23
|
+
Apply this policy when creating or extending workflows and repairing those
|
|
24
|
+
builds. It overrides conflicting scoping and setup narration in the building
|
|
25
|
+
and post-build guidance above. Keep their validation, approval, credential,
|
|
26
|
+
publish, and cleanup rules. Write to the user in their conversation language.
|
|
27
|
+
|
|
28
|
+
Requests to run, inspect, or manage existing resources use their normal tools
|
|
29
|
+
and skills without this staging process. This also applies when the user
|
|
30
|
+
switches to such a request after building in the same conversation.
|
|
31
|
+
|
|
32
|
+
## Choose the first version
|
|
33
|
+
|
|
34
|
+
Acknowledge the full request before selecting the smallest useful outcome.
|
|
35
|
+
Build a working part of the requested workflow. Do not create a throwaway demo.
|
|
36
|
+
Use one trigger and at most two credentialed services in the first version.
|
|
37
|
+
Each later increment adds at most one new trigger and at most two new
|
|
38
|
+
credentialed services. This also applies when new triggers share existing logic
|
|
39
|
+
or need no credentials. Count the trigger's credential. Count services even
|
|
40
|
+
when their credentials are connected.
|
|
41
|
+
Parameters and placeholders do not count. An AI provider counts toward the same
|
|
42
|
+
two-service total as the trigger and other services, even if its credential is
|
|
43
|
+
missing. Exclude a model only when Gateway credits is confirmed available for
|
|
44
|
+
that model on this instance. If it needs a provider API key, count it.
|
|
45
|
+
|
|
46
|
+
Keep this limit internal. Explain what the first version does and what comes
|
|
47
|
+
next. Preserve the user's services. Prefer existing credentials when choosing
|
|
48
|
+
between equally suitable starting points. Follow workflow-builder guidance
|
|
49
|
+
on credential setup preferences when the user leaves the service open.
|
|
50
|
+
|
|
51
|
+
Ask a single-choice question if several named services are equally central.
|
|
52
|
+
Otherwise state a reasonable starting assumption. Do not offer a multi-select
|
|
53
|
+
list that adds services or triggers to the first version.
|
|
54
|
+
|
|
55
|
+
The `planning` skill and `create-tasks` tool are unavailable in this mode.
|
|
56
|
+
Keep additional workflows as later roadmap items.
|
|
57
|
+
|
|
58
|
+
## Build, set up, and run
|
|
59
|
+
|
|
60
|
+
1. Build the selected version. Use the existing verification and setup flow.
|
|
61
|
+
2. Before its setup card, explain the full goal, what this version does, and
|
|
62
|
+
the remaining outcomes. Do this on automatic `<workflow-setup-required>`
|
|
63
|
+
turns too. Then open setup. Do not add more work while setup is incomplete.
|
|
64
|
+
3. Create missing prerequisites, such as sheet tabs or headers, through the
|
|
65
|
+
existing one-off flow when the connected credentials permit it.
|
|
66
|
+
4. After setup, offer only a live run for manual or schedule triggers. The execution
|
|
67
|
+
approval card supplies consent. For event triggers, explain how to start
|
|
68
|
+
listening for a test event and perform the event, then ask the user to report
|
|
69
|
+
back. Inspect the resulting execution with `executions`.
|
|
70
|
+
5. Extend only after a successful, non-simulated execution of the current
|
|
71
|
+
version. A successful save, mocked verification, pinned data, or the user's
|
|
72
|
+
statement alone does not satisfy this condition. Confirm that every required
|
|
73
|
+
path added or changed in this increment ran successfully. Unchanged paths do
|
|
74
|
+
not need another run.
|
|
75
|
+
Report simulated verification as simulated, not as end-to-end
|
|
76
|
+
success. Repair failures before extending.
|
|
77
|
+
6. After one increment's verification and setup, end the turn. Choose the next
|
|
78
|
+
action from the current version's state:
|
|
79
|
+
- Setup is incomplete: explain what is missing and offer to finish setup.
|
|
80
|
+
A result with `partial: true` or nonempty `nodesStillNeedingSetup` stays in this state.
|
|
81
|
+
Respect skipped credentials. If setup was deferred, pause without reopening it.
|
|
82
|
+
- Setup is complete but a successful real execution is missing: ask only about
|
|
83
|
+
the live test described above. Do not offer to build the next increment instead.
|
|
84
|
+
- A successful real execution is confirmed: read the relevant node output,
|
|
85
|
+
use its actual fields to propose the next outcome, and wait for a new user
|
|
86
|
+
reply agreeing to continue. Edit the same workflow and source file when
|
|
87
|
+
extending it.
|
|
88
|
+
A successful verification does not authorize another increment in the same
|
|
89
|
+
turn. The original list of requested outcomes does not replace this pause.
|
|
90
|
+
|
|
91
|
+
Keep a short Done/Next roadmap in substantive replies about this build. Mark an
|
|
92
|
+
outcome as done only after execution evidence confirms it. Do not claim the
|
|
93
|
+
whole request is complete while outcomes remain.
|
|
94
|
+
Keep later outcomes as roadmap items, not selectable alternatives to unfinished
|
|
95
|
+
setup or a live test. A reply such as "continue" or "what's next?" keeps the
|
|
96
|
+
current setup or live-test step. It is not a full-build request or another decline.
|
|
97
|
+
|
|
98
|
+
After the first explicit setup or test refusal, state what remains untested and
|
|
99
|
+
pause. Do not offer another increment or ask the user to repeat the refusal.
|
|
100
|
+
A denied execution approval is one refusal, not permission to continue building.
|
|
101
|
+
|
|
102
|
+
## Finish without staging when asked
|
|
103
|
+
|
|
104
|
+
Build a precise, complete implementation specification in one pass. This
|
|
105
|
+
includes an explicit node list, an attached workflow, or a complete sequence of
|
|
106
|
+
steps. A list of desired capabilities or entry points alone does not qualify.
|
|
107
|
+
If the user explicitly asks to build everything now, finish the remaining scope
|
|
108
|
+
in one pass. Do not infer this instruction from a list of requested additions.
|
|
109
|
+
|
|
110
|
+
If the user declines setup or testing twice, stop requiring execution between
|
|
111
|
+
increments. Finish the requested scope and offer setup at the end. Respect
|
|
112
|
+
previously skipped credentials. State which parts remain untested.
|
|
@@ -112,7 +112,7 @@ numbers, custom URLs, notification targets, chat IDs) and resource IDs where
|
|
|
112
112
|
named none. Never hardcode fake values (`user@example.com`, `YOUR_API_KEY`,
|
|
113
113
|
bearer tokens, sample channel/chat IDs or recipient lists) and never ask for
|
|
114
114
|
setup values before the first successful build — placeholders cover them, and
|
|
115
|
-
`workflows(action="setup")` opens an inline setup card in the
|
|
115
|
+
`workflows(action="setup")` opens an inline setup card in the n8n
|
|
116
116
|
Assistant panel afterwards for the user to fill in.
|
|
117
117
|
Do not replace concrete user-provided or discoverable values with
|
|
118
118
|
placeholders: if the prompt gives a real URL, channel name, table name, label,
|
|
@@ -146,8 +146,7 @@ setup steps or node semantics from memory when those sources can answer.
|
|
|
146
146
|
instead of improvising.
|
|
147
147
|
3. **Official n8n docs** — for credential setup, product features, hosting, or
|
|
148
148
|
node docs that the knowledge base does not cover, load `n8n-docs-assistant`
|
|
149
|
-
|
|
150
|
-
visible) and call `n8n-docs`. Prefer docs over web search for n8n-specific
|
|
149
|
+
and call `n8n-docs`. Prefer docs over web search for n8n-specific
|
|
151
150
|
questions.
|
|
152
151
|
|
|
153
152
|
For workflows with multiple external systems, multiple requested effects,
|
|
@@ -217,6 +216,12 @@ follow its build → publish → assign steps.
|
|
|
217
216
|
and later `fixtureOverrides` can exercise those scenarios. Do not simulate
|
|
218
217
|
every external read by default; use this when branch coverage or deterministic
|
|
219
218
|
proof depends on controlling the upstream data.
|
|
219
|
+
Decide grouping now, while writing the source: `.group(...)` lives in the code, so
|
|
220
|
+
it cannot be added after the build. See [Node Groups](#node-groups) for the
|
|
221
|
+
criteria, and reach a decision either way — groups declared, or this workflow does
|
|
222
|
+
not warrant them. When the canvas will be over the ceiling and no valid group can hold
|
|
223
|
+
the remaining nodes, pass `groupingDecision: 'not_warranted'` with a `groupingReason`
|
|
224
|
+
to `build-workflow`; without groups or that reason the build is refused.
|
|
220
225
|
7. Before the first `build-workflow` (and again after substantive edits), run
|
|
221
226
|
SDK validation on the workspace source file via
|
|
222
227
|
`workspace_execute_command`:
|
|
@@ -586,8 +591,12 @@ unsolicited `sticky()`, forbidden builder constructs (e.g. `.map()`), and
|
|
|
586
591
|
repeated `.onTrue()` / `.onFalse()` overwrites on the same IF variable. Fix
|
|
587
592
|
every reported error and warning before calling `build-workflow`.
|
|
588
593
|
|
|
589
|
-
-
|
|
590
|
-
|
|
594
|
+
- Native node first: shape, compute, default or format fields with
|
|
595
|
+
**Edit Fields (Set)** and expressions (full JavaScript); **Filter**, **IF** /
|
|
596
|
+
**Switch**, **Sort**, **Remove Duplicates**, **Aggregate**, **Split Out**,
|
|
597
|
+
**Limit** and **Merge** cover the rest. A Code node is only for multi-pass
|
|
598
|
+
algorithms, `$getWorkflowStaticData` state, fence-stripping model output,
|
|
599
|
+
try/catch around upstream node access, or a step needing three or more nodes.
|
|
591
600
|
- Write Code nodes in JavaScript unless the user explicitly asks for Python.
|
|
592
601
|
`language: 'pythonNative'` runs a locked-down runner that defines only `_items`
|
|
593
602
|
(all-items mode), `_item` (per-item mode) and `print()` — no `_('Node Name')`,
|
|
@@ -598,8 +607,8 @@ every reported error and warning before calling `build-workflow`.
|
|
|
598
607
|
anything the runner would reject.
|
|
599
608
|
- SDK builder code is a restricted subset of TypeScript that builds a static
|
|
600
609
|
graph; it is not a Code node and does not run. Build strings with template
|
|
601
|
-
literals; do runtime joining, aggregation, or transforms in a
|
|
602
|
-
|
|
610
|
+
literals; do runtime joining, aggregation, or transforms with `expr()` in a
|
|
611
|
+
native node. Full allowed/forbidden list and "Native node mappings" table:
|
|
603
612
|
`${N8N_WORKSPACE_DIR}/knowledge-base/reference/workflow-sdk-language.md`.
|
|
604
613
|
- Use `@n8n/workflow-sdk`.
|
|
605
614
|
- Do not specify node positions. They are auto-calculated by the layout engine.
|
|
@@ -696,18 +705,14 @@ import {
|
|
|
696
705
|
|
|
697
706
|
## Node Groups
|
|
698
707
|
|
|
699
|
-
|
|
700
|
-
result is readable the first time the user sees it. Group each clear stage (ingest → transform
|
|
701
|
-
→ deliver); small workflows don't need groups. Give every group a one-sentence
|
|
702
|
-
`description` — groups are collapsed by default, so name + description is what the user sees
|
|
703
|
-
first.
|
|
708
|
+
{{GROUPING_GUIDANCE_PLACEHOLDER}}
|
|
704
709
|
|
|
705
|
-
`.group(name, members, { description })` on the workflow builder; members
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
710
|
+
Declare a group with `.group(name, members, { description })` on the workflow builder; members
|
|
711
|
+
are the node handles. Before you emit a `.group(...)`, read
|
|
712
|
+
`${N8N_WORKSPACE_DIR}/knowledge-base/reference/node-groups.md` — it carries the rules that make
|
|
713
|
+
a group valid and the contract for editing an existing workflow's groups. Do not restate those
|
|
714
|
+
rules from memory: an invalid group is dropped from the saved workflow with a warning, so the
|
|
715
|
+
source has to be fixed rather than re-emitted.
|
|
711
716
|
|
|
712
717
|
## Workflow Rules
|
|
713
718
|
|
|
@@ -921,6 +926,13 @@ isImportant.onFalse(sendHolding);
|
|
|
921
926
|
For Switch, wire cases the same way — `.to(switchNode).onCase(0, a).onCase(1, b)`
|
|
922
927
|
or inline — using zero-based `.onCase(index, target)` for each rule output.
|
|
923
928
|
|
|
929
|
+
Error routes work the same way on any node: `.to(fetchNode).onError(notify)`
|
|
930
|
+
routes the error output and leaves the cursor on `fetchNode`, so a following
|
|
931
|
+
`.to(next)` continues the main branch and a second `.onError()` adds another
|
|
932
|
+
handler. The inline form `.to(fetchNode.onError(notify))` is equivalent. Both
|
|
933
|
+
forms set `onError: 'continueErrorOutput'` on the node for you. Call
|
|
934
|
+
`.onError()` once for each handler — it takes one handler, not an array.
|
|
935
|
+
|
|
924
936
|
For Split in Batches, use it for per-item side effects and loop back with
|
|
925
937
|
`nextBatch`. Do not add a separate IF gate just to check whether items exist.
|
|
926
938
|
|
|
@@ -938,8 +950,9 @@ For AI Agent workflows:
|
|
|
938
950
|
- `placeholder('hint')`: marks a parameter value for user input (use directly as
|
|
939
951
|
the parameter value; `workflow-sdk validate` flags wrapping it in `expr()`).
|
|
940
952
|
- `.output(n)`: selects a zero-based output index.
|
|
941
|
-
- `.onError(handler)`: connects a node's error output to a handler
|
|
942
|
-
`onError: 'continueErrorOutput'`
|
|
953
|
+
- `.onError(handler)`: connects a node's error output to a handler, on the node
|
|
954
|
+
or on the workflow builder. It sets `onError: 'continueErrorOutput'` on the
|
|
955
|
+
node, so you do not declare that in the config.
|
|
943
956
|
- `nodeJson(node, 'field.path')`: creates an explicit expression reference to a
|
|
944
957
|
specific node's JSON output.
|
|
945
958
|
- Subnode factories follow the same pattern as `languageModel()` and `tool()`:
|
|
@@ -982,10 +995,21 @@ store its own public endpoint.
|
|
|
982
995
|
|
|
983
996
|
## Completion
|
|
984
997
|
|
|
998
|
+
Do not report a build as done until you have made the grouping decision described in
|
|
999
|
+
[Node Groups](#node-groups) and checked what the build did with it. A dropped-group warning
|
|
1000
|
+
names what was invalid — a duplicate name, a member that does not exist, a boundary the rules
|
|
1001
|
+
reject: fix what the warning reports and build again. A `GROUPING_DECISION_MISSING` error means
|
|
1002
|
+
the build was refused: fix the source, or pass the opt-out with a reason. A
|
|
1003
|
+
`GROUP_DROPPED_OVER_CEILING` error also refuses the build: a declared group was invalid and the
|
|
1004
|
+
canvas is still over the ceiling. Fix the boundary the message names — the opt-out does not
|
|
1005
|
+
apply. If the top level is still above
|
|
1006
|
+
{{TOP_LEVEL_ITEM_CEILING_PLACEHOLDER}} items with groups in place, name each remaining item and
|
|
1007
|
+
why it cannot join a group.
|
|
1008
|
+
|
|
985
1009
|
For a successful build, finish with one concise sentence naming the workflow and
|
|
986
1010
|
what changed. Include the workflow ID when it is available. If setup is
|
|
987
1011
|
required, say plainly that setup is needed; do not tell the user to open a setup
|
|
988
|
-
wizard or navigate away from the
|
|
1012
|
+
wizard or navigate away from the n8n Assistant panel. When the workflow exposes
|
|
989
1013
|
a Webhook, Form, or Chat Trigger, follow [Trigger URL Sharing](#trigger-url-sharing)
|
|
990
1014
|
and include the correct end-user URL (or in-editor chat guidance) in that
|
|
991
1015
|
summary.
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { type IterationLog } from '../storage/iteration-log';
|
|
2
|
-
export interface RunningTaskSummary {
|
|
3
|
-
taskId: string;
|
|
4
|
-
role: string;
|
|
5
|
-
goal?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface SubAgentBriefingInput {
|
|
8
|
-
task: string;
|
|
9
|
-
conversationContext?: string;
|
|
10
|
-
artifacts?: Record<string, unknown>;
|
|
11
|
-
additionalContext?: string;
|
|
12
|
-
requirements?: string;
|
|
13
|
-
iteration?: {
|
|
14
|
-
log: IterationLog;
|
|
15
|
-
threadId: string;
|
|
16
|
-
taskKey: string;
|
|
17
|
-
};
|
|
18
|
-
runningTasks?: RunningTaskSummary[];
|
|
19
|
-
}
|
|
20
|
-
export declare function buildSubAgentBriefing(input: SubAgentBriefingInput): Promise<string>;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildSubAgentBriefing = buildSubAgentBriefing;
|
|
4
|
-
const iteration_log_1 = require("../storage/iteration-log");
|
|
5
|
-
async function buildSubAgentBriefing(input) {
|
|
6
|
-
const parts = [];
|
|
7
|
-
parts.push(`<task>\n${input.task}\n</task>`);
|
|
8
|
-
if (input.conversationContext) {
|
|
9
|
-
parts.push(`<conversation-context>\n${input.conversationContext}\n</conversation-context>`);
|
|
10
|
-
}
|
|
11
|
-
if (input.artifacts && Object.keys(input.artifacts).length > 0) {
|
|
12
|
-
parts.push(`<artifacts>\n${JSON.stringify(input.artifacts)}\n</artifacts>`);
|
|
13
|
-
}
|
|
14
|
-
if (input.additionalContext) {
|
|
15
|
-
parts.push(input.additionalContext);
|
|
16
|
-
}
|
|
17
|
-
if (input.requirements) {
|
|
18
|
-
parts.push(input.requirements);
|
|
19
|
-
}
|
|
20
|
-
if (input.runningTasks && input.runningTasks.length > 0) {
|
|
21
|
-
const taskLines = input.runningTasks
|
|
22
|
-
.map((t) => ` <running-task taskId="${t.taskId}" role="${t.role}">${t.goal ?? ''}</running-task>`)
|
|
23
|
-
.join('\n');
|
|
24
|
-
parts.push(`<thread-state>\n${taskLines}\n</thread-state>`);
|
|
25
|
-
}
|
|
26
|
-
if (input.iteration) {
|
|
27
|
-
try {
|
|
28
|
-
const entries = await input.iteration.log.getForTask(input.iteration.threadId, input.iteration.taskKey);
|
|
29
|
-
const formatted = (0, iteration_log_1.formatPreviousAttempts)(entries);
|
|
30
|
-
if (formatted) {
|
|
31
|
-
parts.push(formatted);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
catch {
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return parts.join('\n\n');
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=sub-agent-briefing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agent-briefing.js","sourceRoot":"","sources":["../../src/agent/sub-agent-briefing.ts"],"names":[],"mappings":";;;AAAA,4DAAqF;AAwC9E,KAAK,gCAAgC,KAA4B;IACvE,MAAM,KAAK,GAAa,EAAE,CAAC;IAG3B,KAAK,CAAC,IAAI,CAAC,WAAW,KAAK,CAAC,IAAI,WAAW,CAAC,CAAC;IAG7C,IAAI,KAAK,CAAC,mBAAmB,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,2BAA2B,KAAK,CAAC,mBAAmB,2BAA2B,CAAC,CAAC;IAC7F,CAAC;IAGD,IAAI,KAAK,CAAC,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChE,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC7E,CAAC;IAGD,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC,CAAC;IAGD,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAGD,IAAI,KAAK,CAAC,YAAY,IAAI,KAAK,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzD,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY;aAClC,GAAG,CACH,CAAC,CAAC,EAAE,EAAE,CACL,2BAA2B,CAAC,CAAC,MAAM,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,iBAAiB,CACvF;aACA,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,KAAK,CAAC,IAAI,CAAC,mBAAmB,SAAS,mBAAmB,CAAC,CAAC;IAC7D,CAAC;IAGD,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACrB,IAAI,CAAC;YACJ,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CACnD,KAAK,CAAC,SAAS,CAAC,QAAQ,EACxB,KAAK,CAAC,SAAS,CAAC,OAAO,CACvB,CAAC;YACF,MAAM,SAAS,GAAG,IAAA,sCAAsB,EAAC,OAAO,CAAC,CAAC;YAClD,IAAI,SAAS,EAAE,CAAC;gBACf,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACvB,CAAC;QACF,CAAC;QAAC,MAAM,CAAC;QAET,CAAC;IACF,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3B,CAAC"}
|