@n8n/instance-ai 1.27.0 → 1.27.2

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 (27) hide show
  1. package/dist/agent/system-prompt.js +1 -1
  2. package/dist/agent/system-prompt.js.map +1 -1
  3. package/dist/build.tsbuildinfo +1 -1
  4. package/dist/tools/credentials.tool.js +77 -14
  5. package/dist/tools/credentials.tool.js.map +1 -1
  6. package/dist/tools/workflows/build-workflow.tool.js +36 -5
  7. package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
  8. package/dist/tools/workflows/prepare-workflow-setup.d.ts +25 -0
  9. package/dist/tools/workflows/prepare-workflow-setup.js +114 -0
  10. package/dist/tools/workflows/prepare-workflow-setup.js.map +1 -0
  11. package/dist/tools/workflows/resolve-credentials.d.ts +1 -1
  12. package/dist/tools/workflows/resolve-credentials.js +10 -2
  13. package/dist/tools/workflows/resolve-credentials.js.map +1 -1
  14. package/dist/tools/workflows/setup-credential-selections.d.ts +15 -0
  15. package/dist/tools/workflows/setup-credential-selections.js +97 -0
  16. package/dist/tools/workflows/setup-credential-selections.js.map +1 -0
  17. package/dist/tools/workflows/setup-items.d.ts +2 -0
  18. package/dist/tools/workflows/setup-items.js +27 -11
  19. package/dist/tools/workflows/setup-items.js.map +1 -1
  20. package/dist/tools/workflows/workflow-file-bindings.d.ts +32 -2
  21. package/dist/tools/workflows/workflow-file-bindings.js +27 -5
  22. package/dist/tools/workflows/workflow-file-bindings.js.map +1 -1
  23. package/dist/tools/workflows.tool.js +5 -2
  24. package/dist/tools/workflows.tool.js.map +1 -1
  25. package/package.json +6 -6
  26. package/skills/suggest-automations/SKILL.md +28 -13
  27. package/skills/workflow-builder/SKILL.md +20 -4
@@ -122,7 +122,7 @@ If the user asks for a blocked operation, explain that the instance is in read-o
122
122
  }
123
123
  function getCredentialSetupBullet(setupPanelEnabled) {
124
124
  if (setupPanelEnabled) {
125
- return '**Credential setup** uses `workflows(action="setup")` when a workflowId is available. Requirements can appear in the setup panel while the workflow is being built. The user can complete them immediately. Do not describe setup as happening only after the build. When the result has `announced: true`, the setup panel lists the remaining credentials and parameters. Summarize that result, report any validation warnings, and end your turn. Other results need their returned guidance: correct validation errors, respect denials and skipped items, and wait for requested destination approvals. Explicit credential replacement and an already-open setup card keep their card flow, including apply and test-trigger results. Do not treat a resumed card as a panel announcement. Each new user turn carries a `<workflow-setup-state>` block with current configuration; trust it over older tool results. Configuration alone does not prove successful testing. Use `credentials(action="setup")` when the user explicitly asks to create a credential outside of any workflow context. Never call both tools for the same workflow. Never describe workflow setup as something the user starts from the canvas or editor, and never ask the user to paste secrets into chat.';
125
+ return '**Early credential setup**: announce each explicitly requested service as soon as its exact credential type is known from node definitions or credential type search. Do this before detailed workflow planning, SDK research, or reasoning about implementation. Do not wait to identify every service. Call `credentials(action="setup", filePath, workflowName, credentials)` as the only tool call in that response. Wait for its successful `preBuild: true` result before planning the implementation or generating source. Never batch this call with workspace writes or build-workflow. Pick the source filePath now and reuse it throughout the build. Include workflowId for an existing workflow and folderPath when creating in a known folder. This creates the workflow context and makes setup actionable immediately. Use the announced credential types when configuring matching nodes. Announce only supported service-specific types; leave ambiguous services and generic authentication to build-time discovery. Pass the complete known requirement list again if the plan changes, including an empty list if all requirements are dropped. Do not wait for the user to connect. The early result has `preBuild: true`: continue generating source, omit folderPath from build-workflow, and do not end your turn. This early step overrides runtime skill guidance that defers all setup until after building. After the build, **credential setup** uses `workflows(action="setup")` when a workflowId is available. Requirements can appear in the setup panel while the workflow is being built. The user can complete them immediately. Do not describe setup as happening only after the build. When the result has `announced: true` without `preBuild: true`, the setup panel lists the remaining credentials and parameters. Summarize that result, report any validation warnings, and end your turn. Other results need their returned guidance: correct validation errors, respect denials and skipped items, and wait for requested destination approvals. Explicit credential replacement and an already-open setup card keep their card flow, including apply and test-trigger results. Do not treat a resumed card as a panel announcement. Each new user turn carries a `<workflow-setup-state>` block with current configuration; trust it over older tool results. Configuration alone does not prove successful testing. Use `credentials(action="setup")` without filePath when the user explicitly asks to create a credential outside of any workflow context. Early credential announcements and final workflow setup are separate stages; do not repeat either without changed requirements. Never describe workflow setup as something the user starts from the canvas or editor, and never ask the user to paste secrets into chat.';
126
126
  }
127
127
  return '**Credential setup** uses `workflows(action="setup")` when a workflowId is available — it opens the inline setup card in the n8n Assistant panel and handles credentials, parameters, and triggers in one step. Use `credentials(action="setup")` only when the user explicitly asks to create a credential outside of any workflow context. Never call both tools for the same workflow. Never describe workflow setup as something the user starts from the canvas or editor. Setup cards are only open while the setup call is pending — once it returns a result, the card is resolved: describe the outcome (e.g. credentials selected and ready), never that a card is open or that the user still needs to authorize. When a node in `nodesStillNeedingSetup` carries `parameterIssues`, the connected credential can\'t reach the value that was configured (e.g. a model outside what the credential allows) — fix the value, then tell the user plainly which value didn\'t work and what you set instead. Never silently swap a model or other parameter without saying so. Nodes listed under `skippedByUser` are different: the user chose to skip them, so never re-open the setup card for those — say what stays unconfigured and offer to set it up later.';
128
128
  }
@@ -1 +1 @@
1
- {"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../../src/agent/system-prompt.ts"],"names":[],"mappings":";;;;;AAAA,iCAAiC;AAEjC,6EAA2E;AAC3E,+DAA6D;AAC7D,iFAIwC;AACxC,qDAA0F;AAqB1F,4BAAmC,QAAiB;IACnD,MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAQ,CAAC,GAAG,EAAE,CAAC;IACzE,MAAM,OAAO,GAAG,GAAG;SACjB,OAAO,CAAC,QAAQ,CAAC;SACjB,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC,CAAC;IACpF,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,QAAQ,GAAG,CAAC,CAAC,CAAC,EAA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