@n8n/ai-workflow-builder 0.13.0 → 0.15.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 (189) hide show
  1. package/dist/ai-workflow-builder-agent.service.d.ts +28 -0
  2. package/dist/ai-workflow-builder-agent.service.js +160 -0
  3. package/dist/ai-workflow-builder-agent.service.js.map +1 -0
  4. package/dist/build.tsbuildinfo +1 -1
  5. package/dist/chains/conversation-compact.d.ts +8 -0
  6. package/dist/chains/conversation-compact.js +56 -0
  7. package/dist/chains/conversation-compact.js.map +1 -0
  8. package/dist/chains/parameter-updater.d.ts +16 -0
  9. package/dist/chains/parameter-updater.js +94 -0
  10. package/dist/chains/parameter-updater.js.map +1 -0
  11. package/dist/chains/planner.js +2 -2
  12. package/dist/chains/planner.js.map +1 -1
  13. package/dist/chains/prompts/base/common-patterns.d.ts +1 -0
  14. package/dist/chains/prompts/base/common-patterns.js +13 -0
  15. package/dist/chains/prompts/base/common-patterns.js.map +1 -0
  16. package/dist/chains/prompts/base/core-instructions.d.ts +1 -0
  17. package/dist/chains/prompts/base/core-instructions.js +28 -0
  18. package/dist/chains/prompts/base/core-instructions.js.map +1 -0
  19. package/dist/chains/prompts/base/expression-rules.d.ts +1 -0
  20. package/dist/chains/prompts/base/expression-rules.js +15 -0
  21. package/dist/chains/prompts/base/expression-rules.js.map +1 -0
  22. package/dist/chains/prompts/base/output-format.d.ts +1 -0
  23. package/dist/chains/prompts/base/output-format.js +7 -0
  24. package/dist/chains/prompts/base/output-format.js.map +1 -0
  25. package/dist/chains/prompts/examples/advanced/resource-locator-examples.d.ts +1 -0
  26. package/dist/chains/prompts/examples/advanced/resource-locator-examples.js +79 -0
  27. package/dist/chains/prompts/examples/advanced/resource-locator-examples.js.map +1 -0
  28. package/dist/chains/prompts/examples/advanced/tool-node-examples.d.ts +1 -0
  29. package/dist/chains/prompts/examples/advanced/tool-node-examples.js +71 -0
  30. package/dist/chains/prompts/examples/advanced/tool-node-examples.js.map +1 -0
  31. package/dist/chains/prompts/examples/basic/if-node-examples.d.ts +1 -0
  32. package/dist/chains/prompts/examples/basic/if-node-examples.js +138 -0
  33. package/dist/chains/prompts/examples/basic/if-node-examples.js.map +1 -0
  34. package/dist/chains/prompts/examples/basic/set-node-examples.d.ts +1 -0
  35. package/dist/chains/prompts/examples/basic/set-node-examples.js +148 -0
  36. package/dist/chains/prompts/examples/basic/set-node-examples.js.map +1 -0
  37. package/dist/chains/prompts/examples/basic/simple-updates.d.ts +1 -0
  38. package/dist/chains/prompts/examples/basic/simple-updates.js +51 -0
  39. package/dist/chains/prompts/examples/basic/simple-updates.js.map +1 -0
  40. package/dist/chains/prompts/node-types/http-request.d.ts +1 -0
  41. package/dist/chains/prompts/node-types/http-request.js +113 -0
  42. package/dist/chains/prompts/node-types/http-request.js.map +1 -0
  43. package/dist/chains/prompts/node-types/if-node.d.ts +1 -0
  44. package/dist/chains/prompts/node-types/if-node.js +158 -0
  45. package/dist/chains/prompts/node-types/if-node.js.map +1 -0
  46. package/dist/chains/prompts/node-types/set-node.d.ts +1 -0
  47. package/dist/chains/prompts/node-types/set-node.js +91 -0
  48. package/dist/chains/prompts/node-types/set-node.js.map +1 -0
  49. package/dist/chains/prompts/node-types/tool-nodes.d.ts +1 -0
  50. package/dist/chains/prompts/node-types/tool-nodes.js +73 -0
  51. package/dist/chains/prompts/node-types/tool-nodes.js.map +1 -0
  52. package/dist/chains/prompts/parameter-types/resource-locator.d.ts +1 -0
  53. package/dist/chains/prompts/parameter-types/resource-locator.js +95 -0
  54. package/dist/chains/prompts/parameter-types/resource-locator.js.map +1 -0
  55. package/dist/chains/prompts/parameter-types/text-fields.d.ts +1 -0
  56. package/dist/chains/prompts/parameter-types/text-fields.js +22 -0
  57. package/dist/chains/prompts/parameter-types/text-fields.js.map +1 -0
  58. package/dist/chains/prompts/prompt-builder.d.ts +14 -0
  59. package/dist/chains/prompts/prompt-builder.js +118 -0
  60. package/dist/chains/prompts/prompt-builder.js.map +1 -0
  61. package/dist/chains/prompts/prompt-config.d.ts +5 -0
  62. package/dist/chains/prompts/prompt-config.js +52 -0
  63. package/dist/chains/prompts/prompt-config.js.map +1 -0
  64. package/dist/errors/index.d.ts +45 -0
  65. package/dist/errors/index.js +122 -0
  66. package/dist/errors/index.js.map +1 -0
  67. package/dist/index.d.ts +1 -1
  68. package/dist/index.js +1 -1
  69. package/dist/index.js.map +1 -1
  70. package/dist/llm-config.d.ts +6 -5
  71. package/dist/llm-config.js +19 -4
  72. package/dist/llm-config.js.map +1 -1
  73. package/dist/tools/add-node.tool.d.ts +56 -0
  74. package/dist/tools/add-node.tool.js +136 -0
  75. package/dist/tools/add-node.tool.js.map +1 -0
  76. package/dist/tools/connect-nodes.tool.d.ts +45 -0
  77. package/dist/tools/connect-nodes.tool.js +223 -0
  78. package/dist/tools/connect-nodes.tool.js.map +1 -0
  79. package/dist/tools/engines/node-search-engine.d.ts +25 -0
  80. package/dist/tools/engines/node-search-engine.js +121 -0
  81. package/dist/tools/engines/node-search-engine.js.map +1 -0
  82. package/dist/tools/helpers/index.d.ts +4 -0
  83. package/dist/tools/helpers/index.js +21 -0
  84. package/dist/tools/helpers/index.js.map +1 -0
  85. package/dist/tools/helpers/progress.d.ts +9 -0
  86. package/dist/tools/helpers/progress.js +114 -0
  87. package/dist/tools/helpers/progress.js.map +1 -0
  88. package/dist/tools/helpers/response.d.ts +7 -0
  89. package/dist/tools/helpers/response.js +31 -0
  90. package/dist/tools/helpers/response.js.map +1 -0
  91. package/dist/tools/helpers/state.d.ts +13 -0
  92. package/dist/tools/helpers/state.js +70 -0
  93. package/dist/tools/helpers/state.js.map +1 -0
  94. package/dist/tools/helpers/validation.d.ts +12 -0
  95. package/dist/tools/helpers/validation.js +69 -0
  96. package/dist/tools/helpers/validation.js.map +1 -0
  97. package/dist/tools/node-details.tool.d.ts +19 -0
  98. package/dist/tools/node-details.tool.js +133 -0
  99. package/dist/tools/node-details.tool.js.map +1 -0
  100. package/dist/tools/node-search.tool.d.ts +49 -0
  101. package/dist/tools/node-search.tool.js +146 -0
  102. package/dist/tools/node-search.tool.js.map +1 -0
  103. package/dist/tools/prompts/main-agent.prompt.d.ts +2 -0
  104. package/dist/tools/prompts/main-agent.prompt.js +390 -0
  105. package/dist/tools/prompts/main-agent.prompt.js.map +1 -0
  106. package/dist/tools/remove-node.tool.d.ts +13 -0
  107. package/dist/tools/remove-node.tool.js +97 -0
  108. package/dist/tools/remove-node.tool.js.map +1 -0
  109. package/dist/tools/update-node-parameters.tool.d.ts +19 -0
  110. package/dist/tools/update-node-parameters.tool.js +131 -0
  111. package/dist/tools/update-node-parameters.tool.js.map +1 -0
  112. package/dist/tools/utils/connection-parameters.utils.d.ts +8 -0
  113. package/dist/tools/utils/connection-parameters.utils.js +47 -0
  114. package/dist/tools/utils/connection-parameters.utils.js.map +1 -0
  115. package/dist/tools/utils/connection.utils.d.ts +15 -0
  116. package/dist/tools/utils/connection.utils.js +321 -0
  117. package/dist/tools/utils/connection.utils.js.map +1 -0
  118. package/dist/tools/utils/node-creation.utils.d.ts +8 -0
  119. package/dist/tools/utils/node-creation.utils.js +52 -0
  120. package/dist/tools/utils/node-creation.utils.js.map +1 -0
  121. package/dist/tools/utils/node-positioning.utils.d.ts +17 -0
  122. package/dist/tools/utils/node-positioning.utils.js +87 -0
  123. package/dist/tools/utils/node-positioning.utils.js.map +1 -0
  124. package/dist/tools/utils/parameter-update.utils.d.ts +6 -0
  125. package/dist/tools/utils/parameter-update.utils.js +75 -0
  126. package/dist/tools/utils/parameter-update.utils.js.map +1 -0
  127. package/dist/types/config.d.ts +53 -0
  128. package/dist/types/config.js +3 -0
  129. package/dist/types/config.js.map +1 -0
  130. package/dist/types/connections.d.ts +30 -0
  131. package/dist/types/connections.js +3 -0
  132. package/dist/types/connections.js.map +1 -0
  133. package/dist/types/index.d.ts +8 -0
  134. package/dist/types/index.js +25 -0
  135. package/dist/types/index.js.map +1 -0
  136. package/dist/types/messages.d.ts +38 -0
  137. package/dist/types/messages.js +3 -0
  138. package/dist/types/messages.js.map +1 -0
  139. package/dist/types/nodes.d.ts +26 -0
  140. package/dist/{types.js → types/nodes.js} +1 -1
  141. package/dist/types/nodes.js.map +1 -0
  142. package/dist/types/streaming.d.ts +33 -0
  143. package/dist/types/streaming.js +3 -0
  144. package/dist/types/streaming.js.map +1 -0
  145. package/dist/types/tools.d.ts +76 -0
  146. package/dist/types/tools.js +3 -0
  147. package/dist/types/tools.js.map +1 -0
  148. package/dist/types/utils.d.ts +2 -0
  149. package/dist/types/utils.js +3 -0
  150. package/dist/types/utils.js.map +1 -0
  151. package/dist/types/workflow.d.ts +21 -0
  152. package/dist/types/workflow.js +3 -0
  153. package/dist/types/workflow.js.map +1 -0
  154. package/dist/utils/node-helpers.d.ts +2 -0
  155. package/dist/utils/node-helpers.js +54 -0
  156. package/dist/utils/node-helpers.js.map +1 -0
  157. package/dist/utils/operations-processor.d.ts +10 -0
  158. package/dist/utils/operations-processor.js +114 -0
  159. package/dist/utils/operations-processor.js.map +1 -0
  160. package/dist/utils/stream-processor.d.ts +6 -0
  161. package/dist/utils/stream-processor.js +153 -0
  162. package/dist/utils/stream-processor.js.map +1 -0
  163. package/dist/utils/tool-executor.d.ts +3 -0
  164. package/dist/utils/tool-executor.js +86 -0
  165. package/dist/utils/tool-executor.js.map +1 -0
  166. package/dist/workflow-builder-agent.d.ts +41 -0
  167. package/dist/workflow-builder-agent.js +205 -0
  168. package/dist/workflow-builder-agent.js.map +1 -0
  169. package/dist/workflow-state.d.ts +12 -7
  170. package/dist/workflow-state.js +26 -7
  171. package/dist/workflow-state.js.map +1 -1
  172. package/package.json +26 -7
  173. package/dist/ai-workflow-builder.service.d.ts +0 -21
  174. package/dist/ai-workflow-builder.service.js +0 -294
  175. package/dist/ai-workflow-builder.service.js.map +0 -1
  176. package/dist/chains/connection-composer.d.ts +0 -10
  177. package/dist/chains/connection-composer.js +0 -135
  178. package/dist/chains/connection-composer.js.map +0 -1
  179. package/dist/chains/node-selector.d.ts +0 -8
  180. package/dist/chains/node-selector.js +0 -90
  181. package/dist/chains/node-selector.js.map +0 -1
  182. package/dist/chains/nodes-composer.d.ts +0 -8
  183. package/dist/chains/nodes-composer.js +0 -451
  184. package/dist/chains/nodes-composer.js.map +0 -1
  185. package/dist/chains/validator.d.ts +0 -2
  186. package/dist/chains/validator.js +0 -67
  187. package/dist/chains/validator.js.map +0 -1
  188. package/dist/types.d.ts +0 -87
  189. package/dist/types.js.map +0 -1
@@ -0,0 +1 @@
1
+ export declare const SET_NODE_EXAMPLES = "\n### Set Node Examples\n\n#### Example 1: Simple String Assignment\nCurrent Parameters: {}\nRequested Changes: Set message to \"Hello World\"\nExpected Output:\n{\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"id-1\",\n \"name\": \"message\",\n \"value\": \"Hello World\",\n \"type\": \"string\"\n }\n ]\n },\n \"options\": {}\n}\n\n#### Example 2: Multiple Type Assignments\nCurrent Parameters: {}\nRequested Changes:\n- Set productName to \"Widget\"\n- Set price to 19.99\n- Set inStock to true\n- Set categories to electronics and gadgets\n\nExpected Output:\n{\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"id-1\",\n \"name\": \"productName\",\n \"value\": \"Widget\",\n \"type\": \"string\"\n },\n {\n \"id\": \"id-2\",\n \"name\": \"price\",\n \"value\": 19.99,\n \"type\": \"number\"\n },\n {\n \"id\": \"id-3\",\n \"name\": \"inStock\",\n \"value\": true,\n \"type\": \"boolean\"\n },\n {\n \"id\": \"id-4\",\n \"name\": \"categories\",\n \"value\": \"[\\\"electronics\\\", \\\"gadgets\\\"]\",\n \"type\": \"array\"\n }\n ]\n },\n \"options\": {}\n}\n\n#### Example 3: Expression-Based Assignments\nCurrent Parameters: {}\nRequested Changes:\n- Set userId from HTTP Request node\n- Calculate totalPrice from quantity and unit price\n\nExpected Output:\n{\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"id-1\",\n \"name\": \"userId\",\n \"value\": \"={{ $('HTTP Request').item.json.id }}\",\n \"type\": \"string\"\n },\n {\n \"id\": \"id-2\",\n \"name\": \"totalPrice\",\n \"value\": \"={{ $('Set').item.json.quantity * $('Set').item.json.unitPrice }}\",\n \"type\": \"number\"\n }\n ]\n },\n \"options\": {}\n}\n\n#### Example 4: Set Node - Complex Object and Array Creation\nCurrent Parameters:\n{\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"existing-1\",\n \"name\": \"orderId\",\n \"value\": \"12345\",\n \"type\": \"string\"\n }\n ]\n },\n \"options\": {}\n}\n\nRequested Changes:\n- Keep orderId\n- Add customer object with name and email from previous nodes\n- Add items array from JSON string\n- Set processed timestamp\n\nExpected Output:\n{\n \"assignments\": {\n \"assignments\": [\n {\n \"id\": \"existing-1\",\n \"name\": \"orderId\",\n \"value\": \"12345\",\n \"type\": \"string\"\n },\n {\n \"id\": \"id-2\",\n \"name\": \"customer\",\n \"value\": \"={{ JSON.stringify({ \\\"name\\\": $('Form').item.json.customerName, \\\"email\\\": $('Form').item.json.customerEmail }) }}\",\n \"type\": \"object\"\n },\n {\n \"id\": \"id-3\",\n \"name\": \"items\",\n \"value\": \"={{ $('HTTP Request').item.json.itemsJson }}\",\n \"type\": \"array\"\n },\n {\n \"id\": \"id-4\",\n \"name\": \"processedAt\",\n \"value\": \"={{ $now.toISO() }}\",\n \"type\": \"string\"\n }\n ]\n },\n \"options\": {}\n}\n";
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SET_NODE_EXAMPLES = void 0;
4
+ exports.SET_NODE_EXAMPLES = `
5
+ ### Set Node Examples
6
+
7
+ #### Example 1: Simple String Assignment
8
+ Current Parameters: {}
9
+ Requested Changes: Set message to "Hello World"
10
+ Expected Output:
11
+ {
12
+ "assignments": {
13
+ "assignments": [
14
+ {
15
+ "id": "id-1",
16
+ "name": "message",
17
+ "value": "Hello World",
18
+ "type": "string"
19
+ }
20
+ ]
21
+ },
22
+ "options": {}
23
+ }
24
+
25
+ #### Example 2: Multiple Type Assignments
26
+ Current Parameters: {}
27
+ Requested Changes:
28
+ - Set productName to "Widget"
29
+ - Set price to 19.99
30
+ - Set inStock to true
31
+ - Set categories to electronics and gadgets
32
+
33
+ Expected Output:
34
+ {
35
+ "assignments": {
36
+ "assignments": [
37
+ {
38
+ "id": "id-1",
39
+ "name": "productName",
40
+ "value": "Widget",
41
+ "type": "string"
42
+ },
43
+ {
44
+ "id": "id-2",
45
+ "name": "price",
46
+ "value": 19.99,
47
+ "type": "number"
48
+ },
49
+ {
50
+ "id": "id-3",
51
+ "name": "inStock",
52
+ "value": true,
53
+ "type": "boolean"
54
+ },
55
+ {
56
+ "id": "id-4",
57
+ "name": "categories",
58
+ "value": "[\\"electronics\\", \\"gadgets\\"]",
59
+ "type": "array"
60
+ }
61
+ ]
62
+ },
63
+ "options": {}
64
+ }
65
+
66
+ #### Example 3: Expression-Based Assignments
67
+ Current Parameters: {}
68
+ Requested Changes:
69
+ - Set userId from HTTP Request node
70
+ - Calculate totalPrice from quantity and unit price
71
+
72
+ Expected Output:
73
+ {
74
+ "assignments": {
75
+ "assignments": [
76
+ {
77
+ "id": "id-1",
78
+ "name": "userId",
79
+ "value": "={{ $('HTTP Request').item.json.id }}",
80
+ "type": "string"
81
+ },
82
+ {
83
+ "id": "id-2",
84
+ "name": "totalPrice",
85
+ "value": "={{ $('Set').item.json.quantity * $('Set').item.json.unitPrice }}",
86
+ "type": "number"
87
+ }
88
+ ]
89
+ },
90
+ "options": {}
91
+ }
92
+
93
+ #### Example 4: Set Node - Complex Object and Array Creation
94
+ Current Parameters:
95
+ {
96
+ "assignments": {
97
+ "assignments": [
98
+ {
99
+ "id": "existing-1",
100
+ "name": "orderId",
101
+ "value": "12345",
102
+ "type": "string"
103
+ }
104
+ ]
105
+ },
106
+ "options": {}
107
+ }
108
+
109
+ Requested Changes:
110
+ - Keep orderId
111
+ - Add customer object with name and email from previous nodes
112
+ - Add items array from JSON string
113
+ - Set processed timestamp
114
+
115
+ Expected Output:
116
+ {
117
+ "assignments": {
118
+ "assignments": [
119
+ {
120
+ "id": "existing-1",
121
+ "name": "orderId",
122
+ "value": "12345",
123
+ "type": "string"
124
+ },
125
+ {
126
+ "id": "id-2",
127
+ "name": "customer",
128
+ "value": "={{ JSON.stringify({ \\"name\\": $('Form').item.json.customerName, \\"email\\": $('Form').item.json.customerEmail }) }}",
129
+ "type": "object"
130
+ },
131
+ {
132
+ "id": "id-3",
133
+ "name": "items",
134
+ "value": "={{ $('HTTP Request').item.json.itemsJson }}",
135
+ "type": "array"
136
+ },
137
+ {
138
+ "id": "id-4",
139
+ "name": "processedAt",
140
+ "value": "={{ $now.toISO() }}",
141
+ "type": "string"
142
+ }
143
+ ]
144
+ },
145
+ "options": {}
146
+ }
147
+ `;
148
+ //# sourceMappingURL=set-node-examples.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-node-examples.js","sourceRoot":"","sources":["../../../../../src/chains/prompts/examples/basic/set-node-examples.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+IhC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const SIMPLE_UPDATE_EXAMPLES = "\n## Examples of Parameter Updates\n\n### Example 1: Update HTTP Request URL\nChange: \"Set the URL to call the weather API for London\"\nCurrent parameters: { \"url\": \"https://api.example.com\", \"method\": \"GET\" }\nUpdated parameters: { \"url\": \"https://api.openweathermap.org/data/2.5/weather?q=London\", \"method\": \"GET\" }\n\n### Example 2: Add a header\nChange: \"Add an API key header with value from credentials\"\nCurrent parameters: { \"url\": \"...\", \"sendHeaders\": false }\nUpdated parameters: {\n \"url\": \"...\",\n \"sendHeaders\": true,\n \"headerParameters\": {\n \"parameters\": [\n {\n \"name\": \"X-API-Key\",\n \"value\": \"={{ $credentials.apiKey }}\"\n }\n ]\n }\n}\n\n### Example 3: Update condition\nChange: \"Check if temperature is above 25 degrees\"\nCurrent parameters: { \"conditions\": { \"conditions\": [] } }\nUpdated parameters: {\n \"conditions\": {\n \"options\": {\n \"caseSensitive\": false,\n \"leftValue\": \"\",\n \"typeValidation\": \"loose\"\n },\n \"conditions\": [\n {\n \"leftValue\": \"={{ $('Weather Node').item.json.main.temp }}\",\n \"rightValue\": 25,\n \"operator\": {\n \"type\": \"number\",\n \"operation\": \"gt\"\n }\n }\n ],\n \"combinator\": \"and\"\n }\n}";
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SIMPLE_UPDATE_EXAMPLES = void 0;
4
+ exports.SIMPLE_UPDATE_EXAMPLES = `
5
+ ## Examples of Parameter Updates
6
+
7
+ ### Example 1: Update HTTP Request URL
8
+ Change: "Set the URL to call the weather API for London"
9
+ Current parameters: { "url": "https://api.example.com", "method": "GET" }
10
+ Updated parameters: { "url": "https://api.openweathermap.org/data/2.5/weather?q=London", "method": "GET" }
11
+
12
+ ### Example 2: Add a header
13
+ Change: "Add an API key header with value from credentials"
14
+ Current parameters: { "url": "...", "sendHeaders": false }
15
+ Updated parameters: {
16
+ "url": "...",
17
+ "sendHeaders": true,
18
+ "headerParameters": {
19
+ "parameters": [
20
+ {
21
+ "name": "X-API-Key",
22
+ "value": "={{ $credentials.apiKey }}"
23
+ }
24
+ ]
25
+ }
26
+ }
27
+
28
+ ### Example 3: Update condition
29
+ Change: "Check if temperature is above 25 degrees"
30
+ Current parameters: { "conditions": { "conditions": [] } }
31
+ Updated parameters: {
32
+ "conditions": {
33
+ "options": {
34
+ "caseSensitive": false,
35
+ "leftValue": "",
36
+ "typeValidation": "loose"
37
+ },
38
+ "conditions": [
39
+ {
40
+ "leftValue": "={{ $('Weather Node').item.json.main.temp }}",
41
+ "rightValue": 25,
42
+ "operator": {
43
+ "type": "number",
44
+ "operation": "gt"
45
+ }
46
+ }
47
+ ],
48
+ "combinator": "and"
49
+ }
50
+ }`;
51
+ //# sourceMappingURL=simple-updates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simple-updates.js","sourceRoot":"","sources":["../../../../../src/chains/prompts/examples/basic/simple-updates.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CpC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const HTTP_REQUEST_GUIDE = "\n### HTTP Request Node Updates\n\n#### Common Parameters\n- **url**: The endpoint URL (can use expressions)\n- **method**: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS\n- **authentication**: Type of auth (none, genericCredentialType, etc.)\n- **sendHeaders**: Boolean to enable custom headers\n- **headerParameters**: Array of header key-value pairs\n- **sendBody**: Boolean to enable request body (for POST/PUT/PATCH)\n- **bodyParameters**: Array of body parameters or raw body content\n- **contentType**: json, form, raw, etc.\n- **options**: Additional options like timeout, proxy, etc.\n\n#### Header Structure\n{\n \"sendHeaders\": true,\n \"headerParameters\": {\n \"parameters\": [\n {\n \"name\": \"Header-Name\",\n \"value\": \"Header Value or {{ expression }}\"\n }\n ]\n }\n}\n\n#### Body Structure (JSON)\n{\n \"sendBody\": true,\n \"contentType\": \"json\",\n \"bodyParameters\": {\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"value\": \"fieldValue or {{ expression }}\"\n }\n ]\n }\n}\n\n#### Authentication Options\n- **none**: No authentication\n- **genericCredentialType**: Use stored credentials\n- **predefinedCredentialType**: Use specific credential type\n- Can also set custom auth headers\n\n#### Common Patterns\n1. **Adding API Key Header**:\n - Enable sendHeaders\n - Add header with name \"X-API-Key\" or \"Authorization\"\n\n2. **Setting Request Body**:\n - Enable sendBody\n - Set contentType (usually \"json\")\n - Add parameters to bodyParameters.parameters array\n\n3. **Dynamic URLs**:\n - Can use expressions: \"=https://api.example.com/{{ $('Set').item.json.endpoint }}\"\n - Can reference previous node data\n\n4. **Query Parameters**:\n - Can be part of URL or set in options.queryParameters\n\n#### Example: HTTP Request with Headers and Body\nCurrent Parameters:\n{\n \"method\": \"GET\",\n \"url\": \"https://api.example.com/data\"\n}\n\nRequested Changes:\n- Change to POST method\n- Add API key header\n- Add JSON body with user ID and status\n\nExpected Output:\n{\n \"method\": \"POST\",\n \"url\": \"https://api.example.com/data\",\n \"sendHeaders\": true,\n \"headerParameters\": {\n \"parameters\": [\n {\n \"name\": \"X-API-Key\",\n \"value\": \"={{ $credentials.apiKey }}\"\n },\n {\n \"name\": \"Content-Type\",\n \"value\": \"application/json\"\n }\n ]\n },\n \"sendBody\": true,\n \"contentType\": \"json\",\n \"bodyParameters\": {\n \"parameters\": [\n {\n \"name\": \"userId\",\n \"value\": \"={{ $('Previous Node').item.json.id }}\"\n },\n {\n \"name\": \"status\",\n \"value\": \"active\"\n }\n ]\n },\n \"options\": {}\n}";
@@ -0,0 +1,113 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTTP_REQUEST_GUIDE = void 0;
4
+ exports.HTTP_REQUEST_GUIDE = `
5
+ ### HTTP Request Node Updates
6
+
7
+ #### Common Parameters
8
+ - **url**: The endpoint URL (can use expressions)
9
+ - **method**: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS
10
+ - **authentication**: Type of auth (none, genericCredentialType, etc.)
11
+ - **sendHeaders**: Boolean to enable custom headers
12
+ - **headerParameters**: Array of header key-value pairs
13
+ - **sendBody**: Boolean to enable request body (for POST/PUT/PATCH)
14
+ - **bodyParameters**: Array of body parameters or raw body content
15
+ - **contentType**: json, form, raw, etc.
16
+ - **options**: Additional options like timeout, proxy, etc.
17
+
18
+ #### Header Structure
19
+ {
20
+ "sendHeaders": true,
21
+ "headerParameters": {
22
+ "parameters": [
23
+ {
24
+ "name": "Header-Name",
25
+ "value": "Header Value or {{ expression }}"
26
+ }
27
+ ]
28
+ }
29
+ }
30
+
31
+ #### Body Structure (JSON)
32
+ {
33
+ "sendBody": true,
34
+ "contentType": "json",
35
+ "bodyParameters": {
36
+ "parameters": [
37
+ {
38
+ "name": "fieldName",
39
+ "value": "fieldValue or {{ expression }}"
40
+ }
41
+ ]
42
+ }
43
+ }
44
+
45
+ #### Authentication Options
46
+ - **none**: No authentication
47
+ - **genericCredentialType**: Use stored credentials
48
+ - **predefinedCredentialType**: Use specific credential type
49
+ - Can also set custom auth headers
50
+
51
+ #### Common Patterns
52
+ 1. **Adding API Key Header**:
53
+ - Enable sendHeaders
54
+ - Add header with name "X-API-Key" or "Authorization"
55
+
56
+ 2. **Setting Request Body**:
57
+ - Enable sendBody
58
+ - Set contentType (usually "json")
59
+ - Add parameters to bodyParameters.parameters array
60
+
61
+ 3. **Dynamic URLs**:
62
+ - Can use expressions: "=https://api.example.com/{{ $('Set').item.json.endpoint }}"
63
+ - Can reference previous node data
64
+
65
+ 4. **Query Parameters**:
66
+ - Can be part of URL or set in options.queryParameters
67
+
68
+ #### Example: HTTP Request with Headers and Body
69
+ Current Parameters:
70
+ {
71
+ "method": "GET",
72
+ "url": "https://api.example.com/data"
73
+ }
74
+
75
+ Requested Changes:
76
+ - Change to POST method
77
+ - Add API key header
78
+ - Add JSON body with user ID and status
79
+
80
+ Expected Output:
81
+ {
82
+ "method": "POST",
83
+ "url": "https://api.example.com/data",
84
+ "sendHeaders": true,
85
+ "headerParameters": {
86
+ "parameters": [
87
+ {
88
+ "name": "X-API-Key",
89
+ "value": "={{ $credentials.apiKey }}"
90
+ },
91
+ {
92
+ "name": "Content-Type",
93
+ "value": "application/json"
94
+ }
95
+ ]
96
+ },
97
+ "sendBody": true,
98
+ "contentType": "json",
99
+ "bodyParameters": {
100
+ "parameters": [
101
+ {
102
+ "name": "userId",
103
+ "value": "={{ $('Previous Node').item.json.id }}"
104
+ },
105
+ {
106
+ "name": "status",
107
+ "value": "active"
108
+ }
109
+ ]
110
+ },
111
+ "options": {}
112
+ }`;
113
+ //# sourceMappingURL=http-request.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-request.js","sourceRoot":"","sources":["../../../../src/chains/prompts/node-types/http-request.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4GhC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const IF_NODE_GUIDE = "\n### IF Node Updates - Comprehensive Guide\n\nThe IF node uses a complex filter structure for conditional logic. Understanding the correct operator format is crucial.\n\n#### IF Node Structure\n```json\n{\n \"conditions\": {\n \"options\": {\n \"caseSensitive\": false, // For string comparisons\n \"leftValue\": \"\", // Optional default left value\n \"typeValidation\": \"loose\" // \"strict\" or \"loose\"\n },\n \"conditions\": [\n {\n \"id\": \"unique-id\", // Optional, auto-generated\n \"leftValue\": \"={{ $('Node').item.json.field }}\",\n \"rightValue\": \"value\", // Can be expression or literal\n \"operator\": {\n \"type\": \"string|number|boolean|dateTime|array|object\",\n \"operation\": \"specific-operation\"\n }\n }\n ],\n \"combinator\": \"and\" // \"and\" or \"or\"\n }\n}\n```\n\n#### Complete Operator Reference\n\n##### String Operators\n- **exists**: Check if value exists (singleValue: true, no rightValue needed)\n `{ \"type\": \"string\", \"operation\": \"exists\" }`\n- **notExists**: Check if value doesn't exist (singleValue: true)\n `{ \"type\": \"string\", \"operation\": \"notExists\" }`\n- **empty**: Check if string is empty (singleValue: true)\n `{ \"type\": \"string\", \"operation\": \"empty\" }`\n- **notEmpty**: Check if string is not empty (singleValue: true)\n `{ \"type\": \"string\", \"operation\": \"notEmpty\" }`\n- **equals**: Exact match\n `{ \"type\": \"string\", \"operation\": \"equals\" }`\n- **notEquals**: Not equal\n `{ \"type\": \"string\", \"operation\": \"notEquals\" }`\n- **contains**: Contains substring\n `{ \"type\": \"string\", \"operation\": \"contains\" }`\n- **notContains**: Doesn't contain substring\n `{ \"type\": \"string\", \"operation\": \"notContains\" }`\n- **startsWith**: Starts with string\n `{ \"type\": \"string\", \"operation\": \"startsWith\" }`\n- **notStartsWith**: Doesn't start with\n `{ \"type\": \"string\", \"operation\": \"notStartsWith\" }`\n- **endsWith**: Ends with string\n `{ \"type\": \"string\", \"operation\": \"endsWith\" }`\n- **notEndsWith**: Doesn't end with\n `{ \"type\": \"string\", \"operation\": \"notEndsWith\" }`\n- **regex**: Matches regex pattern\n `{ \"type\": \"string\", \"operation\": \"regex\" }`\n- **notRegex**: Doesn't match regex\n `{ \"type\": \"string\", \"operation\": \"notRegex\" }`\n\n##### Number Operators\n- **exists**: Check if number exists (singleValue: true)\n `{ \"type\": \"number\", \"operation\": \"exists\" }`\n- **notExists**: Check if number doesn't exist (singleValue: true)\n `{ \"type\": \"number\", \"operation\": \"notExists\" }`\n- **equals**: Equal to\n `{ \"type\": \"number\", \"operation\": \"equals\" }`\n- **notEquals**: Not equal to\n `{ \"type\": \"number\", \"operation\": \"notEquals\" }`\n- **gt**: Greater than\n `{ \"type\": \"number\", \"operation\": \"gt\" }`\n- **lt**: Less than\n `{ \"type\": \"number\", \"operation\": \"lt\" }`\n- **gte**: Greater than or equal\n `{ \"type\": \"number\", \"operation\": \"gte\" }`\n- **lte**: Less than or equal\n `{ \"type\": \"number\", \"operation\": \"lte\" }`\n\n##### DateTime Operators\n- **exists**: Check if date exists (singleValue: true)\n `{ \"type\": \"dateTime\", \"operation\": \"exists\" }`\n- **notExists**: Check if date doesn't exist (singleValue: true)\n `{ \"type\": \"dateTime\", \"operation\": \"notExists\" }`\n- **equals**: Same date/time\n `{ \"type\": \"dateTime\", \"operation\": \"equals\" }`\n- **notEquals**: Different date/time\n `{ \"type\": \"dateTime\", \"operation\": \"notEquals\" }`\n- **after**: After date\n `{ \"type\": \"dateTime\", \"operation\": \"after\" }`\n- **before**: Before date\n `{ \"type\": \"dateTime\", \"operation\": \"before\" }`\n- **afterOrEquals**: After or same date\n `{ \"type\": \"dateTime\", \"operation\": \"afterOrEquals\" }`\n- **beforeOrEquals**: Before or same date\n `{ \"type\": \"dateTime\", \"operation\": \"beforeOrEquals\" }`\n\n##### Boolean Operators\n- **exists**: Check if boolean exists (singleValue: true)\n `{ \"type\": \"boolean\", \"operation\": \"exists\" }`\n- **notExists**: Check if boolean doesn't exist (singleValue: true)\n `{ \"type\": \"boolean\", \"operation\": \"notExists\" }`\n- **true**: Is true (singleValue: true)\n `{ \"type\": \"boolean\", \"operation\": \"true\" }`\n- **false**: Is false (singleValue: true)\n `{ \"type\": \"boolean\", \"operation\": \"false\" }`\n- **equals**: Equal to boolean value\n `{ \"type\": \"boolean\", \"operation\": \"equals\" }`\n- **notEquals**: Not equal to boolean value\n `{ \"type\": \"boolean\", \"operation\": \"notEquals\" }`\n\n##### Array Operators\n- **exists**: Check if array exists (singleValue: true)\n `{ \"type\": \"array\", \"operation\": \"exists\" }`\n- **notExists**: Check if array doesn't exist (singleValue: true)\n `{ \"type\": \"array\", \"operation\": \"notExists\" }`\n- **empty**: Array is empty (singleValue: true)\n `{ \"type\": \"array\", \"operation\": \"empty\" }`\n- **notEmpty**: Array is not empty (singleValue: true)\n `{ \"type\": \"array\", \"operation\": \"notEmpty\" }`\n- **contains**: Array contains value\n `{ \"type\": \"array\", \"operation\": \"contains\" }`\n- **notContains**: Array doesn't contain value\n `{ \"type\": \"array\", \"operation\": \"notContains\" }`\n- **lengthEquals**: Array length equals\n `{ \"type\": \"array\", \"operation\": \"lengthEquals\" }`\n- **lengthNotEquals**: Array length not equals\n `{ \"type\": \"array\", \"operation\": \"lengthNotEquals\" }`\n- **lengthGt**: Array length greater than\n `{ \"type\": \"array\", \"operation\": \"lengthGt\" }`\n- **lengthLt**: Array length less than\n `{ \"type\": \"array\", \"operation\": \"lengthLt\" }`\n- **lengthGte**: Array length greater or equal\n `{ \"type\": \"array\", \"operation\": \"lengthGte\" }`\n- **lengthLte**: Array length less or equal\n `{ \"type\": \"array\", \"operation\": \"lengthLte\" }`\n\n##### Object Operators\n- **exists**: Check if object exists (singleValue: true)\n `{ \"type\": \"object\", \"operation\": \"exists\" }`\n- **notExists**: Check if object doesn't exist (singleValue: true)\n `{ \"type\": \"object\", \"operation\": \"notExists\" }`\n- **empty**: Object is empty (singleValue: true)\n `{ \"type\": \"object\", \"operation\": \"empty\" }`\n- **notEmpty**: Object is not empty (singleValue: true)\n `{ \"type\": \"object\", \"operation\": \"notEmpty\" }`\n\n#### Important Notes:\n1. **singleValue operators**: When using exists, notExists, empty, notEmpty, true, or false operators, DO NOT include a rightValue in the condition\n2. **Expression values**: Both leftValue and rightValue can be expressions using `={{ ... }}` syntax\n3. **Type matching**: The operator type must match the data type you're comparing\n4. **Case sensitivity**: Only applies to string comparisons when caseSensitive is true in options\n5. **Type validation**: \"loose\" allows type coercion, \"strict\" requires exact type matches";
@@ -0,0 +1,158 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IF_NODE_GUIDE = void 0;
4
+ exports.IF_NODE_GUIDE = `
5
+ ### IF Node Updates - Comprehensive Guide
6
+
7
+ The IF node uses a complex filter structure for conditional logic. Understanding the correct operator format is crucial.
8
+
9
+ #### IF Node Structure
10
+ \`\`\`json
11
+ {
12
+ "conditions": {
13
+ "options": {
14
+ "caseSensitive": false, // For string comparisons
15
+ "leftValue": "", // Optional default left value
16
+ "typeValidation": "loose" // "strict" or "loose"
17
+ },
18
+ "conditions": [
19
+ {
20
+ "id": "unique-id", // Optional, auto-generated
21
+ "leftValue": "={{ $('Node').item.json.field }}",
22
+ "rightValue": "value", // Can be expression or literal
23
+ "operator": {
24
+ "type": "string|number|boolean|dateTime|array|object",
25
+ "operation": "specific-operation"
26
+ }
27
+ }
28
+ ],
29
+ "combinator": "and" // "and" or "or"
30
+ }
31
+ }
32
+ \`\`\`
33
+
34
+ #### Complete Operator Reference
35
+
36
+ ##### String Operators
37
+ - **exists**: Check if value exists (singleValue: true, no rightValue needed)
38
+ \`{ "type": "string", "operation": "exists" }\`
39
+ - **notExists**: Check if value doesn't exist (singleValue: true)
40
+ \`{ "type": "string", "operation": "notExists" }\`
41
+ - **empty**: Check if string is empty (singleValue: true)
42
+ \`{ "type": "string", "operation": "empty" }\`
43
+ - **notEmpty**: Check if string is not empty (singleValue: true)
44
+ \`{ "type": "string", "operation": "notEmpty" }\`
45
+ - **equals**: Exact match
46
+ \`{ "type": "string", "operation": "equals" }\`
47
+ - **notEquals**: Not equal
48
+ \`{ "type": "string", "operation": "notEquals" }\`
49
+ - **contains**: Contains substring
50
+ \`{ "type": "string", "operation": "contains" }\`
51
+ - **notContains**: Doesn't contain substring
52
+ \`{ "type": "string", "operation": "notContains" }\`
53
+ - **startsWith**: Starts with string
54
+ \`{ "type": "string", "operation": "startsWith" }\`
55
+ - **notStartsWith**: Doesn't start with
56
+ \`{ "type": "string", "operation": "notStartsWith" }\`
57
+ - **endsWith**: Ends with string
58
+ \`{ "type": "string", "operation": "endsWith" }\`
59
+ - **notEndsWith**: Doesn't end with
60
+ \`{ "type": "string", "operation": "notEndsWith" }\`
61
+ - **regex**: Matches regex pattern
62
+ \`{ "type": "string", "operation": "regex" }\`
63
+ - **notRegex**: Doesn't match regex
64
+ \`{ "type": "string", "operation": "notRegex" }\`
65
+
66
+ ##### Number Operators
67
+ - **exists**: Check if number exists (singleValue: true)
68
+ \`{ "type": "number", "operation": "exists" }\`
69
+ - **notExists**: Check if number doesn't exist (singleValue: true)
70
+ \`{ "type": "number", "operation": "notExists" }\`
71
+ - **equals**: Equal to
72
+ \`{ "type": "number", "operation": "equals" }\`
73
+ - **notEquals**: Not equal to
74
+ \`{ "type": "number", "operation": "notEquals" }\`
75
+ - **gt**: Greater than
76
+ \`{ "type": "number", "operation": "gt" }\`
77
+ - **lt**: Less than
78
+ \`{ "type": "number", "operation": "lt" }\`
79
+ - **gte**: Greater than or equal
80
+ \`{ "type": "number", "operation": "gte" }\`
81
+ - **lte**: Less than or equal
82
+ \`{ "type": "number", "operation": "lte" }\`
83
+
84
+ ##### DateTime Operators
85
+ - **exists**: Check if date exists (singleValue: true)
86
+ \`{ "type": "dateTime", "operation": "exists" }\`
87
+ - **notExists**: Check if date doesn't exist (singleValue: true)
88
+ \`{ "type": "dateTime", "operation": "notExists" }\`
89
+ - **equals**: Same date/time
90
+ \`{ "type": "dateTime", "operation": "equals" }\`
91
+ - **notEquals**: Different date/time
92
+ \`{ "type": "dateTime", "operation": "notEquals" }\`
93
+ - **after**: After date
94
+ \`{ "type": "dateTime", "operation": "after" }\`
95
+ - **before**: Before date
96
+ \`{ "type": "dateTime", "operation": "before" }\`
97
+ - **afterOrEquals**: After or same date
98
+ \`{ "type": "dateTime", "operation": "afterOrEquals" }\`
99
+ - **beforeOrEquals**: Before or same date
100
+ \`{ "type": "dateTime", "operation": "beforeOrEquals" }\`
101
+
102
+ ##### Boolean Operators
103
+ - **exists**: Check if boolean exists (singleValue: true)
104
+ \`{ "type": "boolean", "operation": "exists" }\`
105
+ - **notExists**: Check if boolean doesn't exist (singleValue: true)
106
+ \`{ "type": "boolean", "operation": "notExists" }\`
107
+ - **true**: Is true (singleValue: true)
108
+ \`{ "type": "boolean", "operation": "true" }\`
109
+ - **false**: Is false (singleValue: true)
110
+ \`{ "type": "boolean", "operation": "false" }\`
111
+ - **equals**: Equal to boolean value
112
+ \`{ "type": "boolean", "operation": "equals" }\`
113
+ - **notEquals**: Not equal to boolean value
114
+ \`{ "type": "boolean", "operation": "notEquals" }\`
115
+
116
+ ##### Array Operators
117
+ - **exists**: Check if array exists (singleValue: true)
118
+ \`{ "type": "array", "operation": "exists" }\`
119
+ - **notExists**: Check if array doesn't exist (singleValue: true)
120
+ \`{ "type": "array", "operation": "notExists" }\`
121
+ - **empty**: Array is empty (singleValue: true)
122
+ \`{ "type": "array", "operation": "empty" }\`
123
+ - **notEmpty**: Array is not empty (singleValue: true)
124
+ \`{ "type": "array", "operation": "notEmpty" }\`
125
+ - **contains**: Array contains value
126
+ \`{ "type": "array", "operation": "contains" }\`
127
+ - **notContains**: Array doesn't contain value
128
+ \`{ "type": "array", "operation": "notContains" }\`
129
+ - **lengthEquals**: Array length equals
130
+ \`{ "type": "array", "operation": "lengthEquals" }\`
131
+ - **lengthNotEquals**: Array length not equals
132
+ \`{ "type": "array", "operation": "lengthNotEquals" }\`
133
+ - **lengthGt**: Array length greater than
134
+ \`{ "type": "array", "operation": "lengthGt" }\`
135
+ - **lengthLt**: Array length less than
136
+ \`{ "type": "array", "operation": "lengthLt" }\`
137
+ - **lengthGte**: Array length greater or equal
138
+ \`{ "type": "array", "operation": "lengthGte" }\`
139
+ - **lengthLte**: Array length less or equal
140
+ \`{ "type": "array", "operation": "lengthLte" }\`
141
+
142
+ ##### Object Operators
143
+ - **exists**: Check if object exists (singleValue: true)
144
+ \`{ "type": "object", "operation": "exists" }\`
145
+ - **notExists**: Check if object doesn't exist (singleValue: true)
146
+ \`{ "type": "object", "operation": "notExists" }\`
147
+ - **empty**: Object is empty (singleValue: true)
148
+ \`{ "type": "object", "operation": "empty" }\`
149
+ - **notEmpty**: Object is not empty (singleValue: true)
150
+ \`{ "type": "object", "operation": "notEmpty" }\`
151
+
152
+ #### Important Notes:
153
+ 1. **singleValue operators**: When using exists, notExists, empty, notEmpty, true, or false operators, DO NOT include a rightValue in the condition
154
+ 2. **Expression values**: Both leftValue and rightValue can be expressions using \`={{ ... }}\` syntax
155
+ 3. **Type matching**: The operator type must match the data type you're comparing
156
+ 4. **Case sensitivity**: Only applies to string comparisons when caseSensitive is true in options
157
+ 5. **Type validation**: "loose" allows type coercion, "strict" requires exact type matches`;
158
+ //# sourceMappingURL=if-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"if-node.js","sourceRoot":"","sources":["../../../../src/chains/prompts/node-types/if-node.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2FAyJ8D,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const SET_NODE_GUIDE = "\n### Set Node Updates - Comprehensive Type Handling Guide\n\nThe Set node uses assignments to create or modify data fields. Each assignment has a specific type that determines how the value is formatted and processed.\n\n#### Assignment Structure\n```json\n{\n \"id\": \"unique-id\",\n \"name\": \"field_name\",\n \"value\": \"field_value\", // Format depends on type\n \"type\": \"string|number|boolean|array|object\"\n}\n```\n\n**CRITICAL**: ALWAYS use \"value\" field for ALL types. NEVER use type-specific fields like \"stringValue\", \"numberValue\", \"booleanValue\", etc. The field is ALWAYS named \"value\" regardless of the type.\n\n#### Type-Specific Value Formatting\n\n##### String Type\n- **Format**: Direct string value or expression\n- **Examples**:\n - Literal: `\"Hello World\"`\n - Expression: `\"={{ $('Previous Node').item.json.message }}\"`\n - With embedded expressions: `\"=Order #{{ $('Set').item.json.orderId }} processed\"`\n- **Use when**: Text data, IDs, names, messages, dates as strings\n\n##### Number Type\n- **Format**: Direct numeric value (NOT as a string)\n- **Examples**:\n - Integer: `123`\n - Decimal: `45.67`\n - Negative: `-100`\n - Expression: `\"={{ $('HTTP Request').item.json.count }}\"`\n- **CRITICAL**: Use actual numbers, not strings: `123` not `\"123\"`\n- **Use when**: Quantities, prices, scores, numeric calculations\n\n##### Boolean Type\n- **Format**: Direct boolean value (NOT as a string)\n- **Examples**:\n - True: `true`\n - False: `false`\n - Expression: `\"={{ $('IF').item.json.isActive }}\"`\n- **CRITICAL**: Use actual booleans, not strings: `true` not `\"true\"`\n- **CRITICAL**: The field name is \"value\", NOT \"booleanValue\"\n- **Use when**: Flags, toggles, yes/no values, active/inactive states\n\n##### Array Type\n- **Format**: JSON stringified array\n- **Examples**:\n - Simple array: `\"[1, 2, 3]\"`\n - String array: `\"[\\\"apple\\\", \\\"banana\\\", \\\"orange\\\"]\"`\n - Mixed array: `\"[\\\"item1\\\", 123, true]\"`\n - Expression: `\"={{ JSON.stringify($('Previous Node').item.json.items) }}\"`\n- **CRITICAL**: Arrays must be JSON stringified\n- **Use when**: Lists, collections, multiple values\n\n##### Object Type\n- **Format**: JSON stringified object\n- **Examples**:\n - Simple object: `\"{ \\\"name\\\": \\\"John\\\", \\\"age\\\": 30 }\"`\n - Nested object: `\"{ \\\"user\\\": { \\\"id\\\": 123, \\\"role\\\": \\\"admin\\\" } }\"`\n - Expression: `\"={{ JSON.stringify($('Set').item.json.userData) }}\"`\n- **CRITICAL**: Objects must be JSON stringified with escaped quotes\n- **Use when**: Complex data structures, grouped properties\n\n#### Important Type Selection Rules\n\n1. **Analyze the requested data type**:\n - \"Set count to 5\" \u2192 number type with value: `5`\n - \"Set message to hello\" \u2192 string type with value: `\"hello\"`\n - \"Set active to true\" \u2192 boolean type with value: `true`\n - \"Set tags to apple, banana\" \u2192 array type with value: `\"[\\\"apple\\\", \\\"banana\\\"]\"`\n\n2. **Expression handling**:\n - All types can use expressions with `\"={{ ... }}\"`\n - For arrays/objects from expressions, use `JSON.stringify()`\n\n3. **Common mistakes to avoid**:\n - WRONG: Setting number as string: `{ \"value\": \"123\", \"type\": \"number\" }`\n - CORRECT: `{ \"value\": 123, \"type\": \"number\" }`\n - WRONG: Setting boolean as string: `{ \"value\": \"false\", \"type\": \"boolean\" }`\n - CORRECT: `{ \"value\": false, \"type\": \"boolean\" }`\n - WRONG: Using type-specific field names: `{ \"booleanValue\": true, \"type\": \"boolean\" }`\n - CORRECT: `{ \"value\": true, \"type\": \"boolean\" }`\n - WRONG: Setting array without stringification: `{ \"value\": [1,2,3], \"type\": \"array\" }`\n - CORRECT: `{ \"value\": \"[1,2,3]\", \"type\": \"array\" }`";
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SET_NODE_GUIDE = void 0;
4
+ exports.SET_NODE_GUIDE = `
5
+ ### Set Node Updates - Comprehensive Type Handling Guide
6
+
7
+ The Set node uses assignments to create or modify data fields. Each assignment has a specific type that determines how the value is formatted and processed.
8
+
9
+ #### Assignment Structure
10
+ \`\`\`json
11
+ {
12
+ "id": "unique-id",
13
+ "name": "field_name",
14
+ "value": "field_value", // Format depends on type
15
+ "type": "string|number|boolean|array|object"
16
+ }
17
+ \`\`\`
18
+
19
+ **CRITICAL**: ALWAYS use "value" field for ALL types. NEVER use type-specific fields like "stringValue", "numberValue", "booleanValue", etc. The field is ALWAYS named "value" regardless of the type.
20
+
21
+ #### Type-Specific Value Formatting
22
+
23
+ ##### String Type
24
+ - **Format**: Direct string value or expression
25
+ - **Examples**:
26
+ - Literal: \`"Hello World"\`
27
+ - Expression: \`"={{ $('Previous Node').item.json.message }}"\`
28
+ - With embedded expressions: \`"=Order #{{ $('Set').item.json.orderId }} processed"\`
29
+ - **Use when**: Text data, IDs, names, messages, dates as strings
30
+
31
+ ##### Number Type
32
+ - **Format**: Direct numeric value (NOT as a string)
33
+ - **Examples**:
34
+ - Integer: \`123\`
35
+ - Decimal: \`45.67\`
36
+ - Negative: \`-100\`
37
+ - Expression: \`"={{ $('HTTP Request').item.json.count }}"\`
38
+ - **CRITICAL**: Use actual numbers, not strings: \`123\` not \`"123"\`
39
+ - **Use when**: Quantities, prices, scores, numeric calculations
40
+
41
+ ##### Boolean Type
42
+ - **Format**: Direct boolean value (NOT as a string)
43
+ - **Examples**:
44
+ - True: \`true\`
45
+ - False: \`false\`
46
+ - Expression: \`"={{ $('IF').item.json.isActive }}"\`
47
+ - **CRITICAL**: Use actual booleans, not strings: \`true\` not \`"true"\`
48
+ - **CRITICAL**: The field name is "value", NOT "booleanValue"
49
+ - **Use when**: Flags, toggles, yes/no values, active/inactive states
50
+
51
+ ##### Array Type
52
+ - **Format**: JSON stringified array
53
+ - **Examples**:
54
+ - Simple array: \`"[1, 2, 3]"\`
55
+ - String array: \`"[\\"apple\\", \\"banana\\", \\"orange\\"]"\`
56
+ - Mixed array: \`"[\\"item1\\", 123, true]"\`
57
+ - Expression: \`"={{ JSON.stringify($('Previous Node').item.json.items) }}"\`
58
+ - **CRITICAL**: Arrays must be JSON stringified
59
+ - **Use when**: Lists, collections, multiple values
60
+
61
+ ##### Object Type
62
+ - **Format**: JSON stringified object
63
+ - **Examples**:
64
+ - Simple object: \`"{ \\"name\\": \\"John\\", \\"age\\": 30 }"\`
65
+ - Nested object: \`"{ \\"user\\": { \\"id\\": 123, \\"role\\": \\"admin\\" } }"\`
66
+ - Expression: \`"={{ JSON.stringify($('Set').item.json.userData) }}"\`
67
+ - **CRITICAL**: Objects must be JSON stringified with escaped quotes
68
+ - **Use when**: Complex data structures, grouped properties
69
+
70
+ #### Important Type Selection Rules
71
+
72
+ 1. **Analyze the requested data type**:
73
+ - "Set count to 5" → number type with value: \`5\`
74
+ - "Set message to hello" → string type with value: \`"hello"\`
75
+ - "Set active to true" → boolean type with value: \`true\`
76
+ - "Set tags to apple, banana" → array type with value: \`"[\\"apple\\", \\"banana\\"]"\`
77
+
78
+ 2. **Expression handling**:
79
+ - All types can use expressions with \`"={{ ... }}"\`
80
+ - For arrays/objects from expressions, use \`JSON.stringify()\`
81
+
82
+ 3. **Common mistakes to avoid**:
83
+ - WRONG: Setting number as string: \`{ "value": "123", "type": "number" }\`
84
+ - CORRECT: \`{ "value": 123, "type": "number" }\`
85
+ - WRONG: Setting boolean as string: \`{ "value": "false", "type": "boolean" }\`
86
+ - CORRECT: \`{ "value": false, "type": "boolean" }\`
87
+ - WRONG: Using type-specific field names: \`{ "booleanValue": true, "type": "boolean" }\`
88
+ - CORRECT: \`{ "value": true, "type": "boolean" }\`
89
+ - WRONG: Setting array without stringification: \`{ "value": [1,2,3], "type": "array" }\`
90
+ - CORRECT: \`{ "value": "[1,2,3]", "type": "array" }\``;
91
+ //# sourceMappingURL=set-node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"set-node.js","sourceRoot":"","sources":["../../../../src/chains/prompts/node-types/set-node.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0DAsF4B,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const TOOL_NODES_GUIDE = "\n## CRITICAL: $fromAI Expression Support for Tool Nodes\n\nTool nodes (nodes ending with \"Tool\" like Gmail Tool, Google Calendar Tool, etc.) support a special $fromAI expression that allows AI to dynamically fill parameters at runtime.\n\n### When to Use $fromAI\n- ONLY available in tool nodes (node types ending with \"Tool\")\n- Use when the AI should determine the value based on context\n- Ideal for parameters that vary based on user input or conversation context\n\n### $fromAI Syntax\n`={{ $fromAI('key', 'description', 'type', defaultValue) }}`\n\n### Parameters\n- key: Unique identifier (1-64 chars, alphanumeric/underscore/hyphen)\n- description: Optional description for the AI (use empty string '' if not needed)\n- type: 'string' | 'number' | 'boolean' | 'json' (defaults to 'string')\n- defaultValue: Optional fallback value\n\n### Tool Node Examples\n\n#### Gmail Tool - Sending Email\n{\n \"sendTo\": \"={{ $fromAI('to') }}\",\n \"subject\": \"={{ $fromAI('subject') }}\",\n \"message\": \"={{ $fromAI('message_html') }}\"\n}\n\n#### Google Calendar Tool - Filtering Events\n{\n \"timeMin\": \"={{ $fromAI('After', '', 'string') }}\",\n \"timeMax\": \"={{ $fromAI('Before', '', 'string') }}\"\n}\n\n### Mixed Usage Examples\nYou can combine $fromAI with regular text:\n- \"Subject: {{ $fromAI('subject') }} - Automated\"\n- \"Dear {{ $fromAI('recipientName', 'Customer name', 'string', 'Customer') }},\"\n\n### Important Rules\n1. ONLY use $fromAI in tool nodes (check if node type ends with \"Tool\")\n2. For timeMin/timeMax and similar date fields, use appropriate key names\n3. The AI will fill these values based on context during execution\n4. Don't use $fromAI in regular nodes like Set, IF, HTTP Request, etc.\n\n## Tool Node Parameter Guidelines\n\n### Identifying Tool Nodes\n1. CHECK NODE TYPE: If the node type ends with \"Tool\", it supports $fromAI expressions\n2. COMMON TOOL NODES:\n - Gmail Tool (gmailTool): to, subject, message \u2192 use $fromAI\n - Google Calendar Tool (googleCalendarTool): timeMin, timeMax \u2192 use $fromAI\n - Slack Tool (slackTool): channel, message \u2192 use $fromAI\n - Microsoft Teams Tool: channel, message \u2192 use $fromAI\n - Telegram Tool: chatId, text \u2192 use $fromAI\n - Other communication/document tools: content fields \u2192 use $fromAI\n\n### When to Use $fromAI in Tool Nodes\n1. DYNAMIC VALUES: Use $fromAI for values that should be determined by AI based on context\n2. USER INPUT FIELDS: Recipients, subjects, messages, date ranges\n3. PRESERVE EXISTING: If a parameter already uses $fromAI, keep it unless explicitly asked to change\n4. DATE/TIME FIELDS: Use descriptive key names for clarity\n\n### Tool Node Parameter Patterns\n- Email recipients: \"={{ $fromAI('to') }}\"\n- Email subjects: \"={{ $fromAI('subject') }}\"\n- Message content: \"={{ $fromAI('message_html') }}\" or \"={{ $fromAI('message') }}\"\n- Date ranges: \"={{ $fromAI('After', '', 'string') }}\"\n- Channel IDs: \"={{ $fromAI('channel') }}\"";