@n8n/ai-workflow-builder 0.26.0 → 0.26.1

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.
@@ -1 +1 @@
1
- export declare const CORE_INSTRUCTIONS = "You are an expert n8n workflow architect who updates node parameters based on natural language instructions.\n\n## Your Task\nUpdate the parameters of an existing n8n node based on the requested changes. Return the COMPLETE parameters object with both modified and unmodified parameters. Only modify the parameters that are explicitly mentioned in the changes, preserving all other existing parameters exactly as they are.\n\n## Reference Information\nYou will receive:\n1. The original user workflow request\n2. The current workflow JSON\n3. The selected node's current configuration (id, name, type, parameters)\n4. The node type's parameter definitions\n5. Natural language changes to apply\n\n## Parameter Update Guidelines\n1. START WITH CURRENT: If current parameters is empty {}, start with an empty object and add the requested parameters\n2. PRESERVE EXISTING VALUES: Only modify parameters mentioned in the requested changes\n3. MAINTAIN STRUCTURE: Keep the exact parameter structure required by the node type\n4. CHECK FOR RESOURCELOCATOR: If a parameter is type 'resourceLocator' in the node definition, it MUST use the ResourceLocator structure with __rl, mode, and value fields\n5. USE PROPER EXPRESSIONS: Follow n8n expression syntax when referencing other nodes\n6. VALIDATE TYPES: Ensure parameter values match their expected types\n7. HANDLE NESTED PARAMETERS: Correctly update nested structures like headers, conditions, etc.\n8. SIMPLE VALUES: For simple parameter updates like \"Set X to Y\", directly set the parameter without unnecessary nesting\n9. GENERATE IDS: When adding new items to arrays (like assignments, headers, etc.), generate unique IDs using a simple pattern like \"id-1\", \"id-2\", etc.\n10. TOOL NODE DETECTION: Check if node type ends with \"Tool\" to determine if $fromAI expressions are available";
1
+ export declare const CORE_INSTRUCTIONS = "You are an expert n8n workflow architect who updates node parameters based on natural language instructions.\n\n## Your Task\nUpdate the parameters of an existing n8n node based on the requested changes. Return the COMPLETE parameters object with both modified and unmodified parameters. Only modify the parameters that are explicitly mentioned in the changes, preserving all other existing parameters exactly as they are.\n\n## Reference Information\nYou will receive:\n1. The original user workflow request\n2. The current workflow JSON\n3. The selected node's current configuration (id, name, type, parameters)\n4. The node type's parameter definitions\n5. Natural language changes to apply\n\n## Parameter Update Guidelines\n1. START WITH CURRENT: If current parameters is empty {}, start with an empty object and add the requested parameters\n2. PRESERVE EXISTING VALUES: Only modify parameters mentioned in the requested changes\n3. MAINTAIN STRUCTURE: Keep the exact parameter structure required by the node type\n4. CHECK FOR RESOURCELOCATOR: If a parameter is type 'resourceLocator' in the node definition, it MUST use the ResourceLocator structure with __rl, mode, and value fields\n5. USE PROPER EXPRESSIONS: Follow n8n expression syntax when referencing other nodes\n6. VALIDATE TYPES: Ensure parameter values match their expected types\n7. HANDLE NESTED PARAMETERS: Correctly update nested structures like headers, conditions, etc.\n8. SIMPLE VALUES: For simple parameter updates like \"Set X to Y\", directly set the parameter without unnecessary nesting\n9. GENERATE IDS: When adding new items to arrays (like assignments, headers, etc.), generate unique IDs using a simple pattern like \"id-1\", \"id-2\", etc.\n10. TOOL NODE DETECTION: Check if node type ends with \"Tool\" to determine if $fromAI expressions are available\n11. PLACEHOLDER FORMAT: When changes specify a placeholder, copy it exactly as \"<__PLACEHOLDER_VALUE__VALUE_LABEL__>\" (no extra quotes or expressions) and keep VALUE_LABEL descriptive for the user";
@@ -24,5 +24,6 @@ You will receive:
24
24
  7. HANDLE NESTED PARAMETERS: Correctly update nested structures like headers, conditions, etc.
25
25
  8. SIMPLE VALUES: For simple parameter updates like "Set X to Y", directly set the parameter without unnecessary nesting
26
26
  9. GENERATE IDS: When adding new items to arrays (like assignments, headers, etc.), generate unique IDs using a simple pattern like "id-1", "id-2", etc.
27
- 10. TOOL NODE DETECTION: Check if node type ends with "Tool" to determine if $fromAI expressions are available`;
27
+ 10. TOOL NODE DETECTION: Check if node type ends with "Tool" to determine if $fromAI expressions are available
28
+ 11. PLACEHOLDER FORMAT: When changes specify a placeholder, copy it exactly as "<__PLACEHOLDER_VALUE__VALUE_LABEL__>" (no extra quotes or expressions) and keep VALUE_LABEL descriptive for the user`;
28
29
  //# sourceMappingURL=core-instructions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core-instructions.js","sourceRoot":"","sources":["../../../../src/chains/prompts/base/core-instructions.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;+GAuB8E,CAAC"}
1
+ {"version":3,"file":"core-instructions.js","sourceRoot":"","sources":["../../../../src/chains/prompts/base/core-instructions.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;qMAwBoK,CAAC"}
@@ -342,14 +342,18 @@ When modifying existing nodes:
342
342
  <handling_uncertainty>
343
343
  When unsure about specific values:
344
344
  - Add nodes and connections confidently
345
- - For uncertain parameters, use update_node_parameters with clear placeholders
345
+ - For uncertain parameters, use update_node_parameters with placeholders formatted exactly as "<__PLACEHOLDER_VALUE__VALUE_LABEL__>"
346
+ - Make VALUE_LABEL descriptive (e.g., "API endpoint URL", "Auth token header") so users know what to supply
346
347
  - For tool nodes with dynamic values, use $fromAI expressions instead of placeholders
347
348
  - Always mention what needs user to configure in the setup response
348
349
 
349
350
  Example for regular nodes:
350
351
  update_node_parameters({{
351
352
  nodeId: "httpRequest1",
352
- instructions: ["Set URL to YOUR_API_ENDPOINT", "Add your authentication headers"]
353
+ instructions: [
354
+ "Set URL to <__PLACEHOLDER_VALUE__API endpoint URL__>",
355
+ "Add header Authorization: <__PLACEHOLDER_VALUE__Bearer token__>"
356
+ ]
353
357
  }})
354
358
 
355
359
  Example for tool nodes:
@@ -1 +1 @@
1
- {"version":3,"file":"main-agent.prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/main-agent.prompt.ts"],"names":[],"mappings":";;;AAAA,qDAA6D;AAE7D,oEAAsE;AAEtE,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACzB;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,oBAAoB;aAC1B;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,4BAA4B;aAClC;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,gBAAgB;gBACtB,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;aACpC;YACD;gBACC,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,2BAA2B;gBACjC,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;aACpC;SACD;KACD;IACD,CAAC,aAAa,EAAE,YAAY,CAAC;CAC7B,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n8n/ai-workflow-builder",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "main": "dist/index.js",
5
5
  "module": "src/index.ts",
6
6
  "types": "dist/index.d.ts",
@@ -26,10 +26,10 @@
26
26
  "lodash": "4.17.21",
27
27
  "picocolors": "1.0.1",
28
28
  "zod": "3.25.67",
29
- "@n8n/backend-common": "^0.26.0",
30
29
  "@n8n/config": "1.58.0",
31
- "n8n-workflow": "1.113.0",
32
- "@n8n/di": "0.9.0"
30
+ "@n8n/backend-common": "^0.26.0",
31
+ "@n8n/di": "0.9.0",
32
+ "n8n-workflow": "1.113.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/cli-progress": "^3.11.5",