@atomoz/workflows-nodes 0.1.10 → 0.1.12

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 (200) hide show
  1. package/package.json +51 -50
  2. package/src/index.d.ts +2 -0
  3. package/src/index.d.ts.map +1 -0
  4. package/src/index.js +1 -0
  5. package/src/nodes/consts/index.d.ts +3 -0
  6. package/src/nodes/consts/index.d.ts.map +1 -0
  7. package/src/nodes/consts/index.js +2 -0
  8. package/src/nodes/consts/node-colors.d.ts +7 -0
  9. package/src/nodes/consts/node-colors.d.ts.map +1 -0
  10. package/src/nodes/consts/node-colors.js +6 -0
  11. package/src/nodes/consts/node-functions.d.ts +19 -0
  12. package/src/nodes/consts/node-functions.d.ts.map +1 -0
  13. package/src/nodes/consts/node-functions.js +27 -0
  14. package/src/nodes/consts/nodes.d.ts +3 -0
  15. package/src/nodes/consts/nodes.d.ts.map +1 -0
  16. package/src/nodes/consts/nodes.js +28 -0
  17. package/src/nodes/consts/schemas.d.ts +30 -0
  18. package/src/nodes/consts/schemas.d.ts.map +1 -0
  19. package/src/nodes/consts/schemas.js +7 -0
  20. package/src/nodes/ia/agent/data.d.ts +11 -0
  21. package/src/nodes/ia/agent/data.d.ts.map +1 -0
  22. package/src/nodes/ia/agent/data.js +111 -0
  23. package/src/nodes/ia/agent/function.d.ts +2 -0
  24. package/src/nodes/ia/agent/function.d.ts.map +1 -0
  25. package/src/nodes/ia/agent/function.js +90 -0
  26. package/src/nodes/ia/agent/index.d.ts +3 -0
  27. package/src/nodes/ia/agent/index.d.ts.map +1 -0
  28. package/src/nodes/ia/agent/index.js +2 -0
  29. package/src/nodes/ia/index.d.ts +5 -0
  30. package/src/nodes/ia/index.d.ts.map +1 -0
  31. package/src/nodes/ia/index.js +4 -0
  32. package/src/nodes/ia/message/index.d.ts +2 -0
  33. package/src/nodes/ia/message/index.d.ts.map +1 -0
  34. package/src/nodes/ia/message/index.js +1 -0
  35. package/src/nodes/ia/message/message.d.ts +10 -0
  36. package/src/nodes/ia/message/message.d.ts.map +1 -0
  37. package/src/nodes/ia/message/message.js +118 -0
  38. package/src/nodes/ia/supervisor/data.d.ts +10 -0
  39. package/src/nodes/ia/supervisor/data.d.ts.map +1 -0
  40. package/src/nodes/ia/supervisor/data.js +84 -0
  41. package/src/nodes/ia/supervisor/function.d.ts +2 -0
  42. package/src/nodes/ia/supervisor/function.d.ts.map +1 -0
  43. package/src/nodes/ia/supervisor/function.js +227 -0
  44. package/src/nodes/ia/supervisor/index.d.ts +3 -0
  45. package/src/nodes/ia/supervisor/index.d.ts.map +1 -0
  46. package/src/nodes/ia/supervisor/index.js +2 -0
  47. package/src/nodes/ia/tool/data.d.ts +16 -0
  48. package/src/nodes/ia/tool/data.d.ts.map +1 -0
  49. package/src/nodes/ia/tool/data.js +70 -0
  50. package/src/nodes/ia/tool/function.d.ts +4 -0
  51. package/src/nodes/ia/tool/function.d.ts.map +1 -0
  52. package/src/nodes/ia/tool/function.js +36 -0
  53. package/src/nodes/ia/tool/index.d.ts +3 -0
  54. package/src/nodes/ia/tool/index.d.ts.map +1 -0
  55. package/src/nodes/ia/tool/index.js +2 -0
  56. package/src/nodes/index.d.ts +9 -0
  57. package/src/nodes/index.d.ts.map +1 -0
  58. package/src/nodes/index.js +8 -0
  59. package/src/nodes/inputs/chat/chat.d.ts +4 -0
  60. package/src/nodes/inputs/chat/chat.d.ts.map +1 -0
  61. package/src/nodes/inputs/chat/chat.js +51 -0
  62. package/src/nodes/inputs/http/delete/data.d.ts +3 -0
  63. package/src/nodes/inputs/http/delete/data.d.ts.map +1 -0
  64. package/src/nodes/inputs/http/delete/data.js +57 -0
  65. package/src/nodes/inputs/http/delete/function.d.ts +2 -0
  66. package/src/nodes/inputs/http/delete/function.d.ts.map +1 -0
  67. package/src/nodes/inputs/http/delete/function.js +28 -0
  68. package/src/nodes/inputs/http/delete/index.d.ts +4 -0
  69. package/src/nodes/inputs/http/delete/index.d.ts.map +1 -0
  70. package/src/nodes/inputs/http/delete/index.js +3 -0
  71. package/src/nodes/inputs/http/delete/schema.d.ts +16 -0
  72. package/src/nodes/inputs/http/delete/schema.d.ts.map +1 -0
  73. package/src/nodes/inputs/http/delete/schema.js +7 -0
  74. package/src/nodes/inputs/http/get/data.d.ts +3 -0
  75. package/src/nodes/inputs/http/get/data.d.ts.map +1 -0
  76. package/src/nodes/inputs/http/get/data.js +58 -0
  77. package/src/nodes/inputs/http/get/function.d.ts +2 -0
  78. package/src/nodes/inputs/http/get/function.d.ts.map +1 -0
  79. package/src/nodes/inputs/http/get/function.js +25 -0
  80. package/src/nodes/inputs/http/get/index.d.ts +4 -0
  81. package/src/nodes/inputs/http/get/index.d.ts.map +1 -0
  82. package/src/nodes/inputs/http/get/index.js +3 -0
  83. package/src/nodes/inputs/http/get/schema.d.ts +16 -0
  84. package/src/nodes/inputs/http/get/schema.d.ts.map +1 -0
  85. package/src/nodes/inputs/http/get/schema.js +7 -0
  86. package/src/nodes/inputs/http/index.d.ts +8 -0
  87. package/src/nodes/inputs/http/index.d.ts.map +1 -0
  88. package/src/nodes/inputs/http/index.js +10 -0
  89. package/src/nodes/inputs/http/patch/data.d.ts +3 -0
  90. package/src/nodes/inputs/http/patch/data.d.ts.map +1 -0
  91. package/src/nodes/inputs/http/patch/data.js +70 -0
  92. package/src/nodes/inputs/http/patch/function.d.ts +2 -0
  93. package/src/nodes/inputs/http/patch/function.d.ts.map +1 -0
  94. package/src/nodes/inputs/http/patch/function.js +36 -0
  95. package/src/nodes/inputs/http/patch/index.d.ts +4 -0
  96. package/src/nodes/inputs/http/patch/index.d.ts.map +1 -0
  97. package/src/nodes/inputs/http/patch/index.js +3 -0
  98. package/src/nodes/inputs/http/patch/schema.d.ts +21 -0
  99. package/src/nodes/inputs/http/patch/schema.d.ts.map +1 -0
  100. package/src/nodes/inputs/http/patch/schema.js +8 -0
  101. package/src/nodes/inputs/http/post/data.d.ts +3 -0
  102. package/src/nodes/inputs/http/post/data.d.ts.map +1 -0
  103. package/src/nodes/inputs/http/post/data.js +70 -0
  104. package/src/nodes/inputs/http/post/function.d.ts +2 -0
  105. package/src/nodes/inputs/http/post/function.d.ts.map +1 -0
  106. package/src/nodes/inputs/http/post/function.js +36 -0
  107. package/src/nodes/inputs/http/post/index.d.ts +4 -0
  108. package/src/nodes/inputs/http/post/index.d.ts.map +1 -0
  109. package/src/nodes/inputs/http/post/index.js +3 -0
  110. package/src/nodes/inputs/http/post/schema.d.ts +21 -0
  111. package/src/nodes/inputs/http/post/schema.d.ts.map +1 -0
  112. package/src/nodes/inputs/http/post/schema.js +8 -0
  113. package/src/nodes/inputs/http/put/data.d.ts +3 -0
  114. package/src/nodes/inputs/http/put/data.d.ts.map +1 -0
  115. package/src/nodes/inputs/http/put/data.js +70 -0
  116. package/src/nodes/inputs/http/put/function.d.ts +2 -0
  117. package/src/nodes/inputs/http/put/function.d.ts.map +1 -0
  118. package/src/nodes/inputs/http/put/function.js +36 -0
  119. package/src/nodes/inputs/http/put/index.d.ts +4 -0
  120. package/src/nodes/inputs/http/put/index.d.ts.map +1 -0
  121. package/src/nodes/inputs/http/put/index.js +3 -0
  122. package/src/nodes/inputs/http/put/schema.d.ts +21 -0
  123. package/src/nodes/inputs/http/put/schema.d.ts.map +1 -0
  124. package/src/nodes/inputs/http/put/schema.js +8 -0
  125. package/src/nodes/inputs/http/schemas.d.ts +18 -0
  126. package/src/nodes/inputs/http/schemas.d.ts.map +1 -0
  127. package/src/nodes/inputs/http/schemas.js +17 -0
  128. package/src/nodes/inputs/http/utils.d.ts +21 -0
  129. package/src/nodes/inputs/http/utils.d.ts.map +1 -0
  130. package/src/nodes/inputs/http/utils.js +63 -0
  131. package/src/nodes/inputs/index.d.ts +5 -0
  132. package/src/nodes/inputs/index.d.ts.map +1 -0
  133. package/src/nodes/inputs/index.js +4 -0
  134. package/src/nodes/inputs/manual/trigger.d.ts +4 -0
  135. package/src/nodes/inputs/manual/trigger.d.ts.map +1 -0
  136. package/src/nodes/inputs/manual/trigger.js +39 -0
  137. package/src/nodes/output-node/index.d.ts +4 -0
  138. package/src/nodes/output-node/index.d.ts.map +1 -0
  139. package/src/nodes/output-node/index.js +123 -0
  140. package/src/nodes/outputs/chat/output.d.ts +4 -0
  141. package/src/nodes/outputs/chat/output.d.ts.map +1 -0
  142. package/src/nodes/outputs/chat/output.js +48 -0
  143. package/src/nodes/outputs/http-output.d.ts +4 -0
  144. package/src/nodes/outputs/http-output.d.ts.map +1 -0
  145. package/src/nodes/outputs/http-output.js +76 -0
  146. package/src/nodes/processors/concat.d.ts +9 -0
  147. package/src/nodes/processors/concat.d.ts.map +1 -0
  148. package/src/nodes/processors/concat.js +68 -0
  149. package/src/nodes/processors/custom-code.d.ts +4 -0
  150. package/src/nodes/processors/custom-code.d.ts.map +1 -0
  151. package/src/nodes/processors/custom-code.js +54 -0
  152. package/src/nodes/processors/index.d.ts +2 -0
  153. package/src/nodes/processors/index.d.ts.map +1 -0
  154. package/src/nodes/processors/index.js +1 -0
  155. package/src/nodes/processors/transform.d.ts +3 -0
  156. package/src/nodes/processors/transform.d.ts.map +1 -0
  157. package/src/nodes/processors/transform.js +48 -0
  158. package/src/nodes/social/index.d.ts +2 -0
  159. package/src/nodes/social/index.d.ts.map +1 -0
  160. package/src/nodes/social/index.js +1 -0
  161. package/src/nodes/social/whatsapp/index.d.ts +4 -0
  162. package/src/nodes/social/whatsapp/index.d.ts.map +1 -0
  163. package/src/nodes/social/whatsapp/index.js +3 -0
  164. package/src/nodes/social/whatsapp/message-trigger/data.d.ts +3 -0
  165. package/src/nodes/social/whatsapp/message-trigger/data.d.ts.map +1 -0
  166. package/src/nodes/social/whatsapp/message-trigger/data.js +55 -0
  167. package/src/nodes/social/whatsapp/message-trigger/index.d.ts +2 -0
  168. package/src/nodes/social/whatsapp/message-trigger/index.d.ts.map +1 -0
  169. package/src/nodes/social/whatsapp/message-trigger/index.js +1 -0
  170. package/src/nodes/social/whatsapp/send-message/data.d.ts +8 -0
  171. package/src/nodes/social/whatsapp/send-message/data.d.ts.map +1 -0
  172. package/src/nodes/social/whatsapp/send-message/data.js +46 -0
  173. package/src/nodes/social/whatsapp/send-message/functions.d.ts +3 -0
  174. package/src/nodes/social/whatsapp/send-message/functions.d.ts.map +1 -0
  175. package/src/nodes/social/whatsapp/send-message/functions.js +32 -0
  176. package/src/nodes/social/whatsapp/send-message/index.d.ts +3 -0
  177. package/src/nodes/social/whatsapp/send-message/index.d.ts.map +1 -0
  178. package/src/nodes/social/whatsapp/send-message/index.js +2 -0
  179. package/src/nodes/social/whatsapp/send-template/data.d.ts +8 -0
  180. package/src/nodes/social/whatsapp/send-template/data.d.ts.map +1 -0
  181. package/src/nodes/social/whatsapp/send-template/data.js +42 -0
  182. package/src/nodes/social/whatsapp/send-template/functions.d.ts +5 -0
  183. package/src/nodes/social/whatsapp/send-template/functions.d.ts.map +1 -0
  184. package/src/nodes/social/whatsapp/send-template/functions.js +60 -0
  185. package/src/nodes/social/whatsapp/send-template/index.d.ts +3 -0
  186. package/src/nodes/social/whatsapp/send-template/index.d.ts.map +1 -0
  187. package/src/nodes/social/whatsapp/send-template/index.js +2 -0
  188. package/src/nodes/types/base-node.d.ts +17 -0
  189. package/src/nodes/types/base-node.d.ts.map +1 -0
  190. package/src/nodes/types/base-node.js +1 -0
  191. package/src/nodes/types/base-node.types.d.ts +144 -0
  192. package/src/nodes/types/base-node.types.d.ts.map +1 -0
  193. package/src/nodes/types/base-node.types.js +1 -0
  194. package/src/utils/llm-factory.d.ts +16 -0
  195. package/src/utils/llm-factory.d.ts.map +1 -0
  196. package/src/utils/llm-factory.js +110 -0
  197. package/dist/index.cjs +0 -2154
  198. package/dist/index.d.cts +0 -429
  199. package/dist/index.d.ts +0 -429
  200. package/dist/index.js +0 -2063
package/package.json CHANGED
@@ -1,53 +1,54 @@
1
1
  {
2
- "name": "@atomoz/workflows-nodes",
3
- "version": "0.1.10",
4
- "description": "Atomoz Workflows - Node Library",
5
- "type": "module",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
8
- "types": "./dist/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
14
- }
2
+ "name": "@atomoz/workflows-nodes",
3
+ "version": "0.1.12",
4
+ "description": "Atomoz Workflows - Node Library",
5
+ "type": "module",
6
+ "main": "./src/index.js",
7
+ "module": "./src/index.js",
8
+ "types": "./src/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./src/index.d.ts",
12
+ "import": "./src/index.js",
13
+ "require": "./src/index.js",
14
+ "default": "./index.js"
15
15
  },
16
- "files": [
17
- "dist"
18
- ],
19
- "sideEffects": false,
20
- "publishConfig": {
21
- "access": "public"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "https://github.com/atomoz/workflows"
26
- },
27
- "keywords": [
28
- "atomoz",
29
- "workflows",
30
- "nodes"
31
- ],
32
- "author": "Atomoz",
33
- "license": "MIT",
34
- "scripts": {
35
- "build": "tsup index.ts --dts --format esm,cjs --target node18 --out-dir dist --clean --tsconfig tsconfig.build.json",
36
- "dev": "tsup index.ts --dts --format esm,cjs --target node18 --out-dir dist --watch --tsconfig tsconfig.build.json",
37
- "prepublishOnly": "npm run build"
38
- },
39
- "dependencies": {
40
- "@langchain/core": "^0.3.66",
41
- "@langchain/google-gauth": "^0.2.16",
42
- "@langchain/langgraph": "^0.4.3",
43
- "@langchain/langgraph-supervisor": "^0.0.17",
44
- "@langchain/openai": "^0.6.3",
45
- "graphql-request": "^7.2.0",
46
- "tslib": "^2.3.0",
47
- "zod": "^4.0.14"
48
- },
49
- "devDependencies": {
50
- "tsup": "^8.2.4",
51
- "typescript": "^5.6.3"
52
- }
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "src"
20
+ ],
21
+ "sideEffects": false,
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/atomoz/workflows"
28
+ },
29
+ "keywords": [
30
+ "atomoz",
31
+ "workflows",
32
+ "nodes"
33
+ ],
34
+ "author": "Atomoz",
35
+ "license": "MIT",
36
+ "scripts": {
37
+ "build": "tsup index.ts --dts --format esm,cjs --target node18 --out-dir dist --clean --tsconfig tsconfig.build.json",
38
+ "dev": "tsup index.ts --dts --format esm,cjs --target node18 --out-dir dist --watch --tsconfig tsconfig.build.json"
39
+ },
40
+ "dependencies": {
41
+ "@langchain/core": "^0.3.66",
42
+ "@langchain/google-gauth": "^0.2.16",
43
+ "@langchain/langgraph": "^0.4.3",
44
+ "@langchain/langgraph-supervisor": "^0.0.17",
45
+ "@langchain/openai": "^0.6.3",
46
+ "graphql-request": "^7.2.0",
47
+ "tslib": "^2.3.0",
48
+ "zod": "^4.0.14"
49
+ },
50
+ "devDependencies": {
51
+ "tsup": "^8.2.4",
52
+ "typescript": "^5.6.3"
53
+ }
53
54
  }
package/src/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './nodes';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/nodes/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
package/src/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './nodes';
@@ -0,0 +1,3 @@
1
+ export { default as nodes } from './nodes';
2
+ export { default as nodeFunctions } from './node-functions';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as nodes } from './nodes';
2
+ export { default as nodeFunctions } from './node-functions';
@@ -0,0 +1,7 @@
1
+ declare const NodeColorsMap: {
2
+ IA: string;
3
+ HTTP: string;
4
+ Social: string;
5
+ };
6
+ export default NodeColorsMap;
7
+ //# sourceMappingURL=node-colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-colors.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/consts/node-colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,aAAa;;;;CAIlB,CAAA;AAED,eAAe,aAAa,CAAC"}
@@ -0,0 +1,6 @@
1
+ const NodeColorsMap = {
2
+ 'IA': '#2c82de',
3
+ 'HTTP': '#2ba146',
4
+ 'Social': '#17a2b8',
5
+ };
6
+ export default NodeColorsMap;
@@ -0,0 +1,19 @@
1
+ declare const nodeFunctions: {
2
+ ChatInput: (params: any) => any;
3
+ ChatOutput: (params: any) => Promise<any>;
4
+ HttpGetInput: (params: any) => Promise<any>;
5
+ HttpPostInput: (params: any) => any;
6
+ ManualTrigger: (params: any) => any;
7
+ HttpOutput: (params: any) => any;
8
+ ConcatNode: (inputs: any) => any;
9
+ IaMessageNode: (inputs: any) => Promise<any>;
10
+ IaAgentNode: (inputs: any) => Promise<any>;
11
+ AiToolNode: (fieldValues: any) => Promise<{
12
+ tool: any;
13
+ }>;
14
+ AiSupervisorNode: (fieldValues: any) => Promise<any>;
15
+ WhatsappNode: (fieldValues: any) => Promise<any>;
16
+ WhatsappSendMessageNode: (fieldValues: any) => Promise<any>;
17
+ };
18
+ export default nodeFunctions;
19
+ //# sourceMappingURL=node-functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-functions.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/consts/node-functions.ts"],"names":[],"mappings":"AAiBA,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;CAclB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { HttpPostInputNodeFunction } from "../inputs";
2
+ import { ChatInputNodeFunction } from "../inputs/chat/chat";
3
+ import { HttpGetInputNodeFunction } from "../inputs/http/get";
4
+ import { HttpOutputNodeFunction } from "../output-node";
5
+ import { ConcatNodeFunction } from "../processors/concat";
6
+ import { IaMessageNodeFunction, IaAgentNodeFunction, AiToolNodeFunction, AiSupervisorNodeFunction } from "../ia";
7
+ import { ChatOutputNodeFunction } from "../outputs/chat/output";
8
+ import { WhatsappStartChatFunction } from "../social/whatsapp/send-template/functions";
9
+ import { WhatsappSendMessageFunction } from "../social/whatsapp/send-message/functions";
10
+ // import { WhatsappMessageTriggerFunction } from "../social/whatsapp/message-trigger/functions";
11
+ import { ManualTriggerNodeFunction } from "../inputs/manual/trigger";
12
+ const nodeFunctions = {
13
+ ChatInput: ChatInputNodeFunction,
14
+ ChatOutput: ChatOutputNodeFunction,
15
+ HttpGetInput: HttpGetInputNodeFunction,
16
+ HttpPostInput: HttpPostInputNodeFunction,
17
+ ManualTrigger: ManualTriggerNodeFunction,
18
+ HttpOutput: HttpOutputNodeFunction,
19
+ ConcatNode: ConcatNodeFunction,
20
+ IaMessageNode: IaMessageNodeFunction,
21
+ IaAgentNode: IaAgentNodeFunction,
22
+ AiToolNode: AiToolNodeFunction,
23
+ AiSupervisorNode: AiSupervisorNodeFunction,
24
+ WhatsappNode: WhatsappStartChatFunction,
25
+ WhatsappSendMessageNode: WhatsappSendMessageFunction,
26
+ };
27
+ export default nodeFunctions;
@@ -0,0 +1,3 @@
1
+ declare const nodes: import("..").NodeData[];
2
+ export default nodes;
3
+ //# sourceMappingURL=nodes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/consts/nodes.ts"],"names":[],"mappings":"AAgBA,QAAA,MAAM,KAAK,yBAgBV,CAAA;AAED,eAAe,KAAK,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { HttpGetInputNode } from "../inputs";
2
+ import { ManualTriggerNode } from "../inputs/manual/trigger";
3
+ import { ChatInputNode } from "../inputs/chat/chat";
4
+ import { ConcatNode } from "../processors/concat";
5
+ import { OutputNode } from "../output-node";
6
+ import { ChatOutputNode } from "../outputs/chat/output";
7
+ import { IaMessageNode, IaAgentNode, AiToolNode, AiSupervisorNode } from "../ia";
8
+ import { WhatsappSendTemplateNode } from "../social/whatsapp/send-template/data";
9
+ import { WhatsappSendMessageNode } from "../social/whatsapp/send-message/data";
10
+ import { WhatsappMessageTriggerNode } from "../social/whatsapp/message-trigger/data";
11
+ const nodes = [
12
+ ChatInputNode,
13
+ ManualTriggerNode,
14
+ HttpGetInputNode,
15
+ // HttpPostInputNode,
16
+ // TransformNode,
17
+ ConcatNode,
18
+ OutputNode,
19
+ ChatOutputNode,
20
+ IaMessageNode,
21
+ IaAgentNode,
22
+ AiToolNode,
23
+ AiSupervisorNode,
24
+ WhatsappSendTemplateNode,
25
+ WhatsappSendMessageNode,
26
+ WhatsappMessageTriggerNode,
27
+ ];
28
+ export default nodes;
@@ -0,0 +1,30 @@
1
+ export declare const schemas: {
2
+ IaAgentNode: import("zod").ZodObject<{
3
+ name: import("zod").ZodString;
4
+ systemMessage: import("zod").ZodOptional<import("zod").ZodString>;
5
+ message: import("zod").ZodOptional<import("zod").ZodString>;
6
+ model: import("zod").ZodAny;
7
+ tools: import("zod").ZodOptional<import("zod").ZodAny>;
8
+ }, import("zod/v4/core").$strip>;
9
+ AiSupervisorNode: import("zod").ZodObject<{
10
+ model: import("zod").ZodAny;
11
+ agents: import("zod").ZodOptional<import("zod").ZodAny>;
12
+ message: import("zod").ZodString;
13
+ systemMessage: import("zod").ZodOptional<import("zod").ZodString>;
14
+ }, import("zod/v4/core").$strip>;
15
+ AiToolNode: import("zod").ZodObject<{
16
+ name: import("zod").ZodString;
17
+ description: import("zod").ZodString;
18
+ nodeFunction: import("zod").ZodAny;
19
+ nodeType: import("zod").ZodString;
20
+ originalNodeData: import("zod").ZodOptional<import("zod").ZodAny>;
21
+ workflowService: import("zod").ZodOptional<import("zod").ZodAny>;
22
+ currentResults: import("zod").ZodOptional<import("zod").ZodAny>;
23
+ }, import("zod/v4/core").$strip>;
24
+ IaMessageNode: import("zod").ZodObject<{
25
+ model: import("zod").ZodAny;
26
+ systemMessage: import("zod").ZodOptional<import("zod").ZodString>;
27
+ message: import("zod").ZodString;
28
+ }, import("zod/v4/core").$strip>;
29
+ };
30
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/consts/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { IaAgentNodeSchema, AiSupervisorNodeSchema, AiToolNodeSchema, IaMessageNodeSchema } from "../ia";
2
+ export const schemas = {
3
+ IaAgentNode: IaAgentNodeSchema,
4
+ AiSupervisorNode: AiSupervisorNodeSchema,
5
+ AiToolNode: AiToolNodeSchema,
6
+ IaMessageNode: IaMessageNodeSchema,
7
+ };
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ import { NodeData } from "../../types/base-node";
3
+ export declare const IaAgentNodeSchema: z.ZodObject<{
4
+ name: z.ZodString;
5
+ systemMessage: z.ZodOptional<z.ZodString>;
6
+ message: z.ZodOptional<z.ZodString>;
7
+ model: z.ZodAny;
8
+ tools: z.ZodOptional<z.ZodAny>;
9
+ }, z.core.$strip>;
10
+ export declare const IaAgentNode: NodeData;
11
+ //# sourceMappingURL=data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/ia/agent/data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,eAAO,MAAM,iBAAiB;;;;;;iBAM5B,CAAC;AAEH,eAAO,MAAM,WAAW,EAAE,QAsGzB,CAAC"}
@@ -0,0 +1,111 @@
1
+ import { z } from "zod";
2
+ export const IaAgentNodeSchema = z.object({
3
+ name: z.string().describe("Unique name for the agent"),
4
+ systemMessage: z.string().optional().describe("System context for the agent"),
5
+ message: z.string().optional().describe("Input message for the agent"),
6
+ model: z.any().describe("LLM model for the agent"),
7
+ tools: z.any().optional().describe("Tools available to the agent"),
8
+ });
9
+ export const IaAgentNode = {
10
+ label: "IA Agent",
11
+ type: "IaAgentNode",
12
+ category: "step",
13
+ description: "Creates a configurable AI agent for supervision",
14
+ icon: "🤖",
15
+ toolable: true,
16
+ group: 'IA',
17
+ tags: {
18
+ execution: 'async',
19
+ group: 'IA'
20
+ },
21
+ fields: [
22
+ {
23
+ id: "name",
24
+ label: "Agent Name",
25
+ type: "string",
26
+ required: true,
27
+ placeholder: "e.g., researcher_agent"
28
+ },
29
+ {
30
+ id: "systemMessage",
31
+ label: "System Message",
32
+ type: "textarea",
33
+ required: true,
34
+ placeholder: "You are a web researcher...",
35
+ handle: {
36
+ type: "input",
37
+ label: "System Message",
38
+ name: "systemMessage",
39
+ fieldType: "string",
40
+ }
41
+ },
42
+ {
43
+ id: "message",
44
+ label: "Message",
45
+ type: "string",
46
+ required: false,
47
+ typeable: false,
48
+ handle: {
49
+ type: "input",
50
+ label: "Message",
51
+ name: "message",
52
+ fieldType: "string",
53
+ }
54
+ },
55
+ {
56
+ id: "model",
57
+ label: "Model",
58
+ type: "model",
59
+ typeable: false,
60
+ required: true,
61
+ handle: {
62
+ type: "input",
63
+ label: "Model",
64
+ name: "model",
65
+ fieldType: "model",
66
+ acceptTypes: ["model"],
67
+ maxConnections: 1,
68
+ }
69
+ },
70
+ {
71
+ id: 'tools',
72
+ label: 'Tools',
73
+ type: 'tool',
74
+ required: false,
75
+ typeable: false,
76
+ handle: {
77
+ type: 'input',
78
+ label: 'Tools',
79
+ name: 'tools',
80
+ fieldType: 'tool',
81
+ acceptTypes: ['tool'],
82
+ }
83
+ },
84
+ {
85
+ id: 'agent',
86
+ label: 'Agent',
87
+ type: 'agent',
88
+ required: true,
89
+ typeable: false,
90
+ handle: {
91
+ type: 'output',
92
+ label: 'Agent',
93
+ name: 'agent',
94
+ fieldType: 'agent',
95
+ }
96
+ },
97
+ {
98
+ id: 'response',
99
+ label: 'Response',
100
+ type: 'string',
101
+ required: true,
102
+ typeable: false,
103
+ handle: {
104
+ type: 'output',
105
+ label: 'response',
106
+ name: 'response',
107
+ fieldType: 'string',
108
+ }
109
+ }
110
+ ]
111
+ };
@@ -0,0 +1,2 @@
1
+ export declare const IaAgentNodeFunction: (inputs: any) => Promise<any>;
2
+ //# sourceMappingURL=function.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"function.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/ia/agent/function.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,mBAAmB,GAAU,QAAQ,GAAG,KAAG,OAAO,CAAC,GAAG,CAyFlE,CAAA"}
@@ -0,0 +1,90 @@
1
+ "use server";
2
+ import { createReactAgent } from "@langchain/langgraph/prebuilt";
3
+ import { SystemMessage } from "@langchain/core/messages";
4
+ import { createLLMFromModel } from "../../../utils/llm-factory";
5
+ export const IaAgentNodeFunction = async (inputs) => {
6
+ const { model, tools, systemMessage, name, message } = inputs.fieldValues;
7
+ const authToken = inputs.authToken;
8
+ if (!name) {
9
+ throw new Error("Agent 'name' is required. Please provide a unique name for the agent in the node properties.");
10
+ }
11
+ if (!model) {
12
+ throw new Error("Model is required for IaAgentNode");
13
+ }
14
+ let toolsArray = [];
15
+ if (Array.isArray(tools)) {
16
+ toolsArray = tools;
17
+ }
18
+ else if (tools) {
19
+ toolsArray = [tools];
20
+ }
21
+ const finalSystemMessageContent = `${systemMessage || ''}\n\nIMPORTANT: You must base your response on the last message in the conversation history.`;
22
+ const finalSystemMessage = new SystemMessage(finalSystemMessageContent);
23
+ // Instanciar LLM a partir do model config
24
+ let llmInstance;
25
+ if (model?.integrationId) {
26
+ // Model é um objeto com integrationId, criar instância
27
+ if (!authToken) {
28
+ throw new Error("Auth token is required to instantiate LLM from integration");
29
+ }
30
+ const streaming = Boolean(inputs?.stream);
31
+ llmInstance = await createLLMFromModel(model, authToken, streaming);
32
+ }
33
+ else if (typeof model?.bindTools === 'function') {
34
+ // Model já é uma instância de LLM válida
35
+ llmInstance = model;
36
+ }
37
+ else {
38
+ throw new Error("Invalid model: must have integrationId or be a valid LLM instance with bindTools method");
39
+ }
40
+ const agent = createReactAgent({
41
+ llm: llmInstance,
42
+ tools: toolsArray,
43
+ messageModifier: finalSystemMessage,
44
+ });
45
+ // Add the name to the agent so the supervisor can identify it
46
+ agent.name = name;
47
+ // If a message is provided, process it and return both agent and output
48
+ let output = '';
49
+ if (message) {
50
+ try {
51
+ const { HumanMessage } = await import("@langchain/core/messages");
52
+ const result = await agent.invoke({
53
+ messages: [new HumanMessage(message)]
54
+ });
55
+ // Extract the response from the result
56
+ if (result?.messages && result.messages.length > 0) {
57
+ const lastMessage = result.messages[result.messages.length - 1];
58
+ const content = lastMessage?.content;
59
+ // Handle different content types
60
+ if (typeof content === 'string') {
61
+ output = content;
62
+ }
63
+ else if (Array.isArray(content)) {
64
+ // Extract text from complex content array
65
+ output = content
66
+ .map((part) => {
67
+ if (typeof part === 'string')
68
+ return part;
69
+ if (part?.type === 'text')
70
+ return part.text;
71
+ return '';
72
+ })
73
+ .filter(Boolean)
74
+ .join('\n');
75
+ }
76
+ else {
77
+ output = '';
78
+ }
79
+ }
80
+ }
81
+ catch (error) {
82
+ console.error('Error processing message in agent:', error);
83
+ output = `Error: ${error instanceof Error ? error.message : 'Unknown error'}`;
84
+ }
85
+ }
86
+ return {
87
+ agent: agent,
88
+ output: output || ''
89
+ };
90
+ };
@@ -0,0 +1,3 @@
1
+ export * from './data';
2
+ export * from './function';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/ia/agent/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './data';
2
+ export * from './function';
@@ -0,0 +1,5 @@
1
+ export * from './agent';
2
+ export * from './supervisor';
3
+ export * from './tool';
4
+ export * from './message';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/nodes/src/nodes/ia/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './agent';
2
+ export * from './supervisor';
3
+ export * from './tool';
4
+ export * from './message';
@@ -0,0 +1,2 @@
1
+ export * from './message';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/ia/message/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './message';
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+ import { NodeData } from "../../types/base-node";
3
+ export declare const IaMessageNodeSchema: z.ZodObject<{
4
+ model: z.ZodAny;
5
+ systemMessage: z.ZodOptional<z.ZodString>;
6
+ message: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export declare const IaMessageNodeFunction: (inputs: any) => Promise<any>;
9
+ export declare const IaMessageNode: NodeData;
10
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../../libs/nodes/src/nodes/ia/message/message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,eAAO,MAAM,qBAAqB,GAAU,QAAQ,GAAG,KAAG,OAAO,CAAC,GAAG,CA+CpE,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,QAoE3B,CAAA"}