@atomoz/workflows-nodes 0.1.18 → 0.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +324 -42
- package/dist/index.d.cts +441 -0
- package/dist/index.d.ts +441 -0
- package/dist/index.js +325 -43
- package/package.json +6 -3
package/dist/index.cjs
CHANGED
|
@@ -550,6 +550,104 @@ var DelayNode = {
|
|
|
550
550
|
]
|
|
551
551
|
};
|
|
552
552
|
|
|
553
|
+
// src/nodes/processors/http-request/index.ts
|
|
554
|
+
var HttpRequestNodeFunction = async (params, input, context) => {
|
|
555
|
+
const { url, method, headers, body } = params;
|
|
556
|
+
console.log(`\u{1F4E1} Making HTTP Request: ${method} ${url}`);
|
|
557
|
+
const headersObj = typeof headers === "string" ? JSON.parse(headers || "{}") : headers || {};
|
|
558
|
+
const bodyObj = typeof body === "string" ? body : JSON.stringify(body);
|
|
559
|
+
const response = await fetch(url, {
|
|
560
|
+
method,
|
|
561
|
+
headers: {
|
|
562
|
+
"Content-Type": "application/json",
|
|
563
|
+
...headersObj
|
|
564
|
+
},
|
|
565
|
+
body: method !== "GET" && method !== "HEAD" ? bodyObj : void 0
|
|
566
|
+
});
|
|
567
|
+
const responseText = await response.text();
|
|
568
|
+
let responseData;
|
|
569
|
+
try {
|
|
570
|
+
responseData = JSON.parse(responseText);
|
|
571
|
+
} catch (e) {
|
|
572
|
+
responseData = responseText;
|
|
573
|
+
}
|
|
574
|
+
return {
|
|
575
|
+
status: response.status,
|
|
576
|
+
statusText: response.statusText,
|
|
577
|
+
headers: Object.fromEntries(response.headers.entries()),
|
|
578
|
+
data: responseData
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
var HttpRequestNode = {
|
|
582
|
+
label: "HTTP Request",
|
|
583
|
+
type: "HttpRequestNode",
|
|
584
|
+
category: "step",
|
|
585
|
+
// or 'api'?
|
|
586
|
+
icon: "\u{1F310}",
|
|
587
|
+
description: "Faz uma requisi\xE7\xE3o HTTP externa",
|
|
588
|
+
tags: {
|
|
589
|
+
execution: "async",
|
|
590
|
+
group: "HTTP"
|
|
591
|
+
},
|
|
592
|
+
fields: [
|
|
593
|
+
{
|
|
594
|
+
id: "input",
|
|
595
|
+
label: "Input",
|
|
596
|
+
type: "any",
|
|
597
|
+
handle: {
|
|
598
|
+
type: "input",
|
|
599
|
+
label: "Start",
|
|
600
|
+
name: "input",
|
|
601
|
+
fieldType: "any"
|
|
602
|
+
}
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
id: "url",
|
|
606
|
+
label: "URL",
|
|
607
|
+
type: "string",
|
|
608
|
+
required: true,
|
|
609
|
+
placeholder: "https://api.example.com"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
id: "method",
|
|
613
|
+
label: "Method",
|
|
614
|
+
type: "select",
|
|
615
|
+
required: true,
|
|
616
|
+
defaultValue: "GET",
|
|
617
|
+
options: [
|
|
618
|
+
{ label: "GET", value: "GET" },
|
|
619
|
+
{ label: "POST", value: "POST" },
|
|
620
|
+
{ label: "PUT", value: "PUT" },
|
|
621
|
+
{ label: "DELETE", value: "DELETE" },
|
|
622
|
+
{ label: "PATCH", value: "PATCH" }
|
|
623
|
+
]
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
id: "headers",
|
|
627
|
+
label: "Headers (JSON)",
|
|
628
|
+
type: "json",
|
|
629
|
+
defaultValue: "{}"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
id: "body",
|
|
633
|
+
label: "Body (JSON)",
|
|
634
|
+
type: "json",
|
|
635
|
+
defaultValue: "{}"
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
id: "output",
|
|
639
|
+
label: "Output",
|
|
640
|
+
type: "any",
|
|
641
|
+
handle: {
|
|
642
|
+
type: "output",
|
|
643
|
+
label: "Response",
|
|
644
|
+
name: "output",
|
|
645
|
+
fieldType: "any"
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
]
|
|
649
|
+
};
|
|
650
|
+
|
|
553
651
|
// src/nodes/processors/concat.ts
|
|
554
652
|
var import_zod4 = require("zod");
|
|
555
653
|
var ConcatNodeFunction = (params) => {
|
|
@@ -882,6 +980,21 @@ var IaAgentNode = {
|
|
|
882
980
|
fieldType: "agent"
|
|
883
981
|
}
|
|
884
982
|
},
|
|
983
|
+
{
|
|
984
|
+
id: "sessionMemory",
|
|
985
|
+
label: "Session Memory",
|
|
986
|
+
type: "memory",
|
|
987
|
+
required: false,
|
|
988
|
+
typeable: false,
|
|
989
|
+
handle: {
|
|
990
|
+
type: "input",
|
|
991
|
+
label: "Session Memory",
|
|
992
|
+
name: "sessionMemory",
|
|
993
|
+
fieldType: "memory",
|
|
994
|
+
acceptTypes: ["memory"],
|
|
995
|
+
maxConnections: 1
|
|
996
|
+
}
|
|
997
|
+
},
|
|
885
998
|
{
|
|
886
999
|
id: "response",
|
|
887
1000
|
label: "Response",
|
|
@@ -961,10 +1074,14 @@ async function createLLMFromModel(modelConfig, authToken, streaming = false) {
|
|
|
961
1074
|
// src/nodes/ia/agent/function.ts
|
|
962
1075
|
var IaAgentNodeFunction = async (inputs) => {
|
|
963
1076
|
const { $field: _$field, $req: _$req, $inputs: _$inputs, $vars: _$vars } = inputs;
|
|
964
|
-
const
|
|
1077
|
+
const fieldValues = inputs.fieldValues || {};
|
|
1078
|
+
const { model, tools, systemMessage, name, message } = fieldValues;
|
|
965
1079
|
const authToken = inputs.authToken;
|
|
966
1080
|
const stream = Boolean(inputs?.stream);
|
|
967
1081
|
const emitter = inputs?.emitter;
|
|
1082
|
+
const sessionMemory = fieldValues.sessionMemory || inputs.sessionMemory;
|
|
1083
|
+
const checkpointer = sessionMemory?.checkpointer;
|
|
1084
|
+
const sessionId = inputs.sessionId || inputs.$req?.sessionId || `session-${Date.now()}`;
|
|
968
1085
|
if (!name) {
|
|
969
1086
|
throw new Error("Agent 'name' is required. Please provide a unique name for the agent in the node properties.");
|
|
970
1087
|
}
|
|
@@ -995,17 +1112,26 @@ IMPORTANT: You must base your response on the last message in the conversation h
|
|
|
995
1112
|
const agent = (0, import_prebuilt.createReactAgent)({
|
|
996
1113
|
llm: llmInstance,
|
|
997
1114
|
tools: toolsArray,
|
|
998
|
-
messageModifier: finalSystemMessage
|
|
1115
|
+
messageModifier: finalSystemMessage,
|
|
1116
|
+
// Pass checkpointer directly for distributed memory
|
|
1117
|
+
...checkpointer ? { checkpointer } : {}
|
|
999
1118
|
});
|
|
1000
1119
|
agent.name = name;
|
|
1120
|
+
if (checkpointer) {
|
|
1121
|
+
console.log(`\u{1F9E0} IaAgentNode "${name}": Using distributed memory (sessionId: ${sessionId})`);
|
|
1122
|
+
} else {
|
|
1123
|
+
console.log(`\u26A0\uFE0F IaAgentNode "${name}": No sessionMemory connected - stateless mode`);
|
|
1124
|
+
}
|
|
1001
1125
|
let output = "";
|
|
1002
1126
|
if (message) {
|
|
1003
1127
|
try {
|
|
1004
1128
|
const { HumanMessage: HumanMessage2 } = await import("@langchain/core/messages");
|
|
1129
|
+
const invokeConfig = checkpointer ? { configurable: { thread_id: sessionId } } : {};
|
|
1005
1130
|
if (stream && emitter) {
|
|
1006
|
-
const streamIterator = await agent.stream(
|
|
1007
|
-
messages: [new HumanMessage2(message)]
|
|
1008
|
-
|
|
1131
|
+
const streamIterator = await agent.stream(
|
|
1132
|
+
{ messages: [new HumanMessage2(message)] },
|
|
1133
|
+
invokeConfig
|
|
1134
|
+
);
|
|
1009
1135
|
let lastMessages = [];
|
|
1010
1136
|
const sentContents = /* @__PURE__ */ new Set();
|
|
1011
1137
|
for await (const step of streamIterator) {
|
|
@@ -1049,9 +1175,10 @@ IMPORTANT: You must base your response on the last message in the conversation h
|
|
|
1049
1175
|
}
|
|
1050
1176
|
}
|
|
1051
1177
|
} else {
|
|
1052
|
-
const result = await agent.invoke(
|
|
1053
|
-
messages: [new HumanMessage2(message)]
|
|
1054
|
-
|
|
1178
|
+
const result = await agent.invoke(
|
|
1179
|
+
{ messages: [new HumanMessage2(message)] },
|
|
1180
|
+
invokeConfig
|
|
1181
|
+
);
|
|
1055
1182
|
if (result?.messages && result.messages.length > 0) {
|
|
1056
1183
|
const lastMessage = result.messages[result.messages.length - 1];
|
|
1057
1184
|
const content = lastMessage?.content;
|
|
@@ -1149,6 +1276,21 @@ var AiSupervisorNode = {
|
|
|
1149
1276
|
acceptTypes: ["agent"]
|
|
1150
1277
|
}
|
|
1151
1278
|
},
|
|
1279
|
+
{
|
|
1280
|
+
id: "sessionMemory",
|
|
1281
|
+
label: "Session Memory",
|
|
1282
|
+
type: "memory",
|
|
1283
|
+
required: false,
|
|
1284
|
+
typeable: false,
|
|
1285
|
+
handle: {
|
|
1286
|
+
type: "input",
|
|
1287
|
+
label: "Session Memory",
|
|
1288
|
+
name: "sessionMemory",
|
|
1289
|
+
fieldType: "memory",
|
|
1290
|
+
acceptTypes: ["memory"],
|
|
1291
|
+
maxConnections: 1
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1152
1294
|
{
|
|
1153
1295
|
id: "response",
|
|
1154
1296
|
label: "Response",
|
|
@@ -1169,7 +1311,6 @@ var AiSupervisorNode = {
|
|
|
1169
1311
|
var import_langgraph_supervisor = require("@langchain/langgraph-supervisor");
|
|
1170
1312
|
var import_messages2 = require("@langchain/core/messages");
|
|
1171
1313
|
var import_langgraph = require("@langchain/langgraph");
|
|
1172
|
-
var checkpointer = new import_langgraph.MemorySaver();
|
|
1173
1314
|
var store = new import_langgraph.InMemoryStore();
|
|
1174
1315
|
var extractSupervisorAgents = (agents) => {
|
|
1175
1316
|
if (Array.isArray(agents)) {
|
|
@@ -1225,6 +1366,9 @@ var AiSupervisorNodeFunction = async (params) => {
|
|
|
1225
1366
|
const stream = (typeof outer.stream === "boolean" ? outer.stream : inner.stream) ?? false;
|
|
1226
1367
|
const emitter = outer.emitter ?? inner.emitter;
|
|
1227
1368
|
const authToken = outer.authToken ?? inner.authToken;
|
|
1369
|
+
const sessionMemory = inner.sessionMemory ?? outer.sessionMemory;
|
|
1370
|
+
const checkpointer = sessionMemory?.checkpointer;
|
|
1371
|
+
const sessionId = outer.sessionId || outer.$req?.sessionId || `supervisor-${Date.now()}`;
|
|
1228
1372
|
if (!model) throw new Error("Model is required for AiSupervisorNode");
|
|
1229
1373
|
if (!agents) throw new Error("Agents are required for AiSupervisorNode.");
|
|
1230
1374
|
try {
|
|
@@ -1234,12 +1378,17 @@ var AiSupervisorNodeFunction = async (params) => {
|
|
|
1234
1378
|
let llmInstance;
|
|
1235
1379
|
if (model?.model && model?.integrationId) {
|
|
1236
1380
|
if (!authToken) {
|
|
1237
|
-
throw new Error("Auth token is required to instantiate LLM from integration
|
|
1381
|
+
throw new Error("Auth token is required to instantiate LLM from integration");
|
|
1238
1382
|
}
|
|
1239
1383
|
llmInstance = await createLLMFromModel(model, authToken, stream);
|
|
1240
1384
|
} else {
|
|
1241
1385
|
llmInstance = model;
|
|
1242
1386
|
}
|
|
1387
|
+
if (checkpointer) {
|
|
1388
|
+
console.log(`\u{1F9E0} AiSupervisorNode: Using distributed memory (sessionId: ${sessionId})`);
|
|
1389
|
+
} else {
|
|
1390
|
+
console.log(`\u26A0\uFE0F AiSupervisorNode: No sessionMemory connected - stateless mode`);
|
|
1391
|
+
}
|
|
1243
1392
|
const finalSystemPrompt = systemMessage || "You are a supervisor...";
|
|
1244
1393
|
const workflow = (0, import_langgraph_supervisor.createSupervisor)({
|
|
1245
1394
|
llm: llmInstance,
|
|
@@ -1247,14 +1396,14 @@ var AiSupervisorNodeFunction = async (params) => {
|
|
|
1247
1396
|
prompt: finalSystemPrompt
|
|
1248
1397
|
});
|
|
1249
1398
|
const app = workflow.compile({
|
|
1250
|
-
checkpointer,
|
|
1399
|
+
...checkpointer ? { checkpointer } : {},
|
|
1251
1400
|
store
|
|
1252
1401
|
});
|
|
1253
1402
|
if (stream && emitter) {
|
|
1254
1403
|
try {
|
|
1255
1404
|
const streamIterator = await app.stream(
|
|
1256
1405
|
{ messages: [new import_messages2.HumanMessage({ content: message })] },
|
|
1257
|
-
{ recursionLimit: 150, configurable: { thread_id:
|
|
1406
|
+
{ recursionLimit: 150, configurable: { thread_id: sessionId } }
|
|
1258
1407
|
);
|
|
1259
1408
|
let finalMessages = [];
|
|
1260
1409
|
const previousStepMessages = /* @__PURE__ */ new Map();
|
|
@@ -1333,7 +1482,7 @@ var AiSupervisorNodeFunction = async (params) => {
|
|
|
1333
1482
|
} else {
|
|
1334
1483
|
const result = await app.invoke(
|
|
1335
1484
|
{ messages: [new import_messages2.HumanMessage({ content: message })] },
|
|
1336
|
-
{ recursionLimit: 150, configurable: { thread_id:
|
|
1485
|
+
{ recursionLimit: 150, configurable: { thread_id: sessionId } }
|
|
1337
1486
|
);
|
|
1338
1487
|
const finalResponse = extractFinalResponse(result?.messages);
|
|
1339
1488
|
return {
|
|
@@ -1427,12 +1576,139 @@ var AiToolNode = {
|
|
|
1427
1576
|
// src/nodes/ia/tool/function.ts
|
|
1428
1577
|
var import_tools = require("@langchain/core/tools");
|
|
1429
1578
|
|
|
1579
|
+
// src/nodes/memory/postgres/data.ts
|
|
1580
|
+
var import_zod8 = require("zod");
|
|
1581
|
+
var PostgresMemoryNodeSchema = import_zod8.z.object({
|
|
1582
|
+
connectionString: import_zod8.z.string().describe("PostgreSQL connection string")
|
|
1583
|
+
});
|
|
1584
|
+
var PostgresMemoryNode = {
|
|
1585
|
+
label: "Postgres Memory",
|
|
1586
|
+
type: "PostgresMemoryNode",
|
|
1587
|
+
category: "memory",
|
|
1588
|
+
description: "Persistent conversation memory using PostgreSQL (distributed across pods)",
|
|
1589
|
+
icon: "\u{1F418}",
|
|
1590
|
+
group: "Memory",
|
|
1591
|
+
tags: {
|
|
1592
|
+
execution: "sync",
|
|
1593
|
+
group: "Memory"
|
|
1594
|
+
},
|
|
1595
|
+
fields: [
|
|
1596
|
+
{
|
|
1597
|
+
id: "connectionString",
|
|
1598
|
+
label: "Connection String",
|
|
1599
|
+
type: "string",
|
|
1600
|
+
required: true,
|
|
1601
|
+
defaultValue: "postgresql://postgres:postgres@localhost:5432/workflows",
|
|
1602
|
+
placeholder: "postgresql://user:pass@host:5432/database"
|
|
1603
|
+
},
|
|
1604
|
+
{
|
|
1605
|
+
id: "checkpointer",
|
|
1606
|
+
label: "Checkpointer",
|
|
1607
|
+
type: "memory",
|
|
1608
|
+
required: true,
|
|
1609
|
+
typeable: false,
|
|
1610
|
+
handle: {
|
|
1611
|
+
type: "output",
|
|
1612
|
+
label: "Memory",
|
|
1613
|
+
name: "checkpointer",
|
|
1614
|
+
fieldType: "memory"
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
]
|
|
1618
|
+
};
|
|
1619
|
+
|
|
1620
|
+
// src/nodes/memory/postgres/function.ts
|
|
1621
|
+
var import_langgraph_checkpoint_postgres = require("@langchain/langgraph-checkpoint-postgres");
|
|
1622
|
+
var PostgresMemoryNodeFunction = async (inputs) => {
|
|
1623
|
+
const { $field: _$field, $req: _$req, $inputs: _$inputs, $vars: _$vars } = inputs;
|
|
1624
|
+
const fieldValues = inputs.fieldValues || {};
|
|
1625
|
+
const connectionString = fieldValues.connectionString || inputs.connectionString || "postgresql://postgres:postgres@localhost:5432/workflows";
|
|
1626
|
+
try {
|
|
1627
|
+
const checkpointer = import_langgraph_checkpoint_postgres.PostgresSaver.fromConnString(connectionString);
|
|
1628
|
+
await checkpointer.setup();
|
|
1629
|
+
console.log("\u2705 PostgresMemory: Checkpointer initialized");
|
|
1630
|
+
return {
|
|
1631
|
+
checkpointer,
|
|
1632
|
+
type: "PostgresMemoryNode",
|
|
1633
|
+
connectionString: connectionString.replace(/:[^:@]+@/, ":***@")
|
|
1634
|
+
// Hide password in output
|
|
1635
|
+
};
|
|
1636
|
+
} catch (error) {
|
|
1637
|
+
console.error("\u274C PostgresMemory: Failed to initialize checkpointer:", error);
|
|
1638
|
+
throw new Error(`PostgresMemory initialization failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1639
|
+
}
|
|
1640
|
+
};
|
|
1641
|
+
|
|
1642
|
+
// src/nodes/memory/redis/data.ts
|
|
1643
|
+
var import_zod9 = require("zod");
|
|
1644
|
+
var RedisMemoryNodeSchema = import_zod9.z.object({
|
|
1645
|
+
redisUrl: import_zod9.z.string().describe("Redis connection URL")
|
|
1646
|
+
});
|
|
1647
|
+
var RedisMemoryNode = {
|
|
1648
|
+
label: "Redis Memory",
|
|
1649
|
+
type: "RedisMemoryNode",
|
|
1650
|
+
category: "memory",
|
|
1651
|
+
description: "Fast, persistent conversation memory using Redis (distributed across pods)",
|
|
1652
|
+
icon: "\u{1F534}",
|
|
1653
|
+
group: "Memory",
|
|
1654
|
+
tags: {
|
|
1655
|
+
execution: "sync",
|
|
1656
|
+
group: "Memory"
|
|
1657
|
+
},
|
|
1658
|
+
fields: [
|
|
1659
|
+
{
|
|
1660
|
+
id: "redisUrl",
|
|
1661
|
+
label: "Redis URL",
|
|
1662
|
+
type: "string",
|
|
1663
|
+
required: true,
|
|
1664
|
+
defaultValue: "redis://localhost:6379",
|
|
1665
|
+
placeholder: "redis://localhost:6379"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
id: "checkpointer",
|
|
1669
|
+
label: "Checkpointer",
|
|
1670
|
+
type: "memory",
|
|
1671
|
+
required: true,
|
|
1672
|
+
typeable: false,
|
|
1673
|
+
handle: {
|
|
1674
|
+
type: "output",
|
|
1675
|
+
label: "Memory",
|
|
1676
|
+
name: "checkpointer",
|
|
1677
|
+
fieldType: "memory"
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
]
|
|
1681
|
+
};
|
|
1682
|
+
|
|
1683
|
+
// src/nodes/memory/redis/function.ts
|
|
1684
|
+
var import_langgraph_checkpoint_redis = require("@langchain/langgraph-checkpoint-redis");
|
|
1685
|
+
var RedisMemoryNodeFunction = async (inputs) => {
|
|
1686
|
+
const { $field: _$field, $req: _$req, $inputs: _$inputs, $vars: _$vars } = inputs;
|
|
1687
|
+
const fieldValues = inputs.fieldValues || {};
|
|
1688
|
+
const redisUrl = fieldValues.redisUrl || inputs.redisUrl || "redis://localhost:6379";
|
|
1689
|
+
try {
|
|
1690
|
+
const checkpointer = await import_langgraph_checkpoint_redis.RedisSaver.fromUrl(redisUrl);
|
|
1691
|
+
console.log("\u2705 RedisMemory: Checkpointer initialized");
|
|
1692
|
+
return {
|
|
1693
|
+
checkpointer,
|
|
1694
|
+
type: "RedisMemoryNode",
|
|
1695
|
+
redisUrl: redisUrl.replace(/:[^:@]+@/, ":***@")
|
|
1696
|
+
// Hide password in output
|
|
1697
|
+
};
|
|
1698
|
+
} catch (error) {
|
|
1699
|
+
console.error("\u274C RedisMemory: Failed to initialize checkpointer:", error);
|
|
1700
|
+
throw new Error(`RedisMemory initialization failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
1701
|
+
}
|
|
1702
|
+
};
|
|
1703
|
+
|
|
1430
1704
|
// src/nodes/consts/schemas.ts
|
|
1431
1705
|
var schemas = {
|
|
1432
1706
|
IaAgentNode: IaAgentNodeSchema,
|
|
1433
1707
|
AiSupervisorNode: AiSupervisorNodeSchema,
|
|
1434
1708
|
AiToolNode: AiToolNodeSchema,
|
|
1435
|
-
IaMessageNode: IaMessageNodeSchema
|
|
1709
|
+
IaMessageNode: IaMessageNodeSchema,
|
|
1710
|
+
PostgresMemoryNode: PostgresMemoryNodeSchema,
|
|
1711
|
+
RedisMemoryNode: RedisMemoryNodeSchema
|
|
1436
1712
|
};
|
|
1437
1713
|
|
|
1438
1714
|
// src/nodes/ia/tool/function.ts
|
|
@@ -1474,11 +1750,11 @@ var AiToolNodeFunction = async (params) => {
|
|
|
1474
1750
|
};
|
|
1475
1751
|
|
|
1476
1752
|
// src/nodes/ia/message/message.ts
|
|
1477
|
-
var
|
|
1478
|
-
var IaMessageNodeSchema =
|
|
1479
|
-
model:
|
|
1480
|
-
systemMessage:
|
|
1481
|
-
message:
|
|
1753
|
+
var import_zod10 = require("zod");
|
|
1754
|
+
var IaMessageNodeSchema = import_zod10.z.object({
|
|
1755
|
+
model: import_zod10.z.any().describe("LLM model to use"),
|
|
1756
|
+
systemMessage: import_zod10.z.string().optional().describe("System message for context"),
|
|
1757
|
+
message: import_zod10.z.string().describe("User message to send to the LLM")
|
|
1482
1758
|
});
|
|
1483
1759
|
var IaMessageNodeFunction = async (inputs) => {
|
|
1484
1760
|
const { $field: _$field, $req: _$req, $inputs: _$inputs_var, $vars: _$vars } = inputs;
|
|
@@ -1613,10 +1889,10 @@ var IaMessageNode = {
|
|
|
1613
1889
|
};
|
|
1614
1890
|
|
|
1615
1891
|
// src/nodes/social/whatsapp/send-template/data.ts
|
|
1616
|
-
var
|
|
1617
|
-
var WhatsappSendTemplateNodeSchema =
|
|
1618
|
-
phoneNumber:
|
|
1619
|
-
message:
|
|
1892
|
+
var import_zod11 = require("zod");
|
|
1893
|
+
var WhatsappSendTemplateNodeSchema = import_zod11.z.object({
|
|
1894
|
+
phoneNumber: import_zod11.z.string().describe("Phone number to send the message to"),
|
|
1895
|
+
message: import_zod11.z.string().describe("Message to send")
|
|
1620
1896
|
});
|
|
1621
1897
|
var WhatsappSendTemplateNode = {
|
|
1622
1898
|
label: "Whatsapp Send Template",
|
|
@@ -1657,10 +1933,10 @@ var WhatsappSendTemplateNode = {
|
|
|
1657
1933
|
};
|
|
1658
1934
|
|
|
1659
1935
|
// src/nodes/social/whatsapp/send-message/data.ts
|
|
1660
|
-
var
|
|
1661
|
-
var WhatsappSendMessageNodeSchema =
|
|
1662
|
-
phoneNumber:
|
|
1663
|
-
message:
|
|
1936
|
+
var import_zod12 = require("zod");
|
|
1937
|
+
var WhatsappSendMessageNodeSchema = import_zod12.z.object({
|
|
1938
|
+
phoneNumber: import_zod12.z.string().describe("Phone number to send the message to"),
|
|
1939
|
+
message: import_zod12.z.string().describe("Message content to send")
|
|
1664
1940
|
});
|
|
1665
1941
|
var WhatsappSendMessageNode = {
|
|
1666
1942
|
label: "Whatsapp Send Message",
|
|
@@ -1880,6 +2156,7 @@ var nodes = [
|
|
|
1880
2156
|
ManualTriggerNode,
|
|
1881
2157
|
CronTriggerNode,
|
|
1882
2158
|
DelayNode,
|
|
2159
|
+
HttpRequestNode,
|
|
1883
2160
|
HttpGetInputNode,
|
|
1884
2161
|
// HttpPostInputNode,
|
|
1885
2162
|
// TransformNode,
|
|
@@ -1890,6 +2167,8 @@ var nodes = [
|
|
|
1890
2167
|
IaAgentNode,
|
|
1891
2168
|
AiToolNode,
|
|
1892
2169
|
AiSupervisorNode,
|
|
2170
|
+
PostgresMemoryNode,
|
|
2171
|
+
RedisMemoryNode,
|
|
1893
2172
|
WhatsappSendTemplateNode,
|
|
1894
2173
|
WhatsappSendMessageNode,
|
|
1895
2174
|
WhatsappMessageTriggerNode,
|
|
@@ -2001,6 +2280,7 @@ var nodeFunctions = {
|
|
|
2001
2280
|
CronTrigger: CronTriggerNodeFunction,
|
|
2002
2281
|
HttpOutput: HttpOutputNodeFunction,
|
|
2003
2282
|
ConcatNode: ConcatNodeFunction,
|
|
2283
|
+
HttpRequestNode: HttpRequestNodeFunction,
|
|
2004
2284
|
IaMessageNode: IaMessageNodeFunction,
|
|
2005
2285
|
IaAgentNode: IaAgentNodeFunction,
|
|
2006
2286
|
AiToolNode: AiToolNodeFunction,
|
|
@@ -2008,7 +2288,9 @@ var nodeFunctions = {
|
|
|
2008
2288
|
WhatsappNode: WhatsappStartChatFunction,
|
|
2009
2289
|
WhatsappSendMessageNode: WhatsappSendMessageFunction,
|
|
2010
2290
|
CustomCodeNode: NodeFunction,
|
|
2011
|
-
CustomNode: CustomNodeFunction
|
|
2291
|
+
CustomNode: CustomNodeFunction,
|
|
2292
|
+
PostgresMemoryNode: PostgresMemoryNodeFunction,
|
|
2293
|
+
RedisMemoryNode: RedisMemoryNodeFunction
|
|
2012
2294
|
};
|
|
2013
2295
|
var node_functions_default = nodeFunctions;
|
|
2014
2296
|
|
|
@@ -2122,12 +2404,12 @@ var HttpPutInputNodeFunction = (params) => {
|
|
|
2122
2404
|
};
|
|
2123
2405
|
|
|
2124
2406
|
// src/nodes/inputs/http/put/schema.ts
|
|
2125
|
-
var
|
|
2126
|
-
var HttpPutInputNodeSchema =
|
|
2407
|
+
var import_zod13 = require("zod");
|
|
2408
|
+
var HttpPutInputNodeSchema = import_zod13.z.object({
|
|
2127
2409
|
route: RouteSchema,
|
|
2128
|
-
queryParams:
|
|
2129
|
-
headers:
|
|
2130
|
-
body:
|
|
2410
|
+
queryParams: import_zod13.z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
2411
|
+
headers: import_zod13.z.array(HeaderSchema).optional().describe("Headers configuration"),
|
|
2412
|
+
body: import_zod13.z.array(BodyFieldSchema).optional().describe("Body fields configuration")
|
|
2131
2413
|
});
|
|
2132
2414
|
|
|
2133
2415
|
// src/nodes/inputs/http/delete/data.ts
|
|
@@ -2219,11 +2501,11 @@ var HttpDeleteInputNodeFunction = async (params) => {
|
|
|
2219
2501
|
};
|
|
2220
2502
|
|
|
2221
2503
|
// src/nodes/inputs/http/delete/schema.ts
|
|
2222
|
-
var
|
|
2223
|
-
var HttpDeleteInputNodeSchema =
|
|
2504
|
+
var import_zod14 = require("zod");
|
|
2505
|
+
var HttpDeleteInputNodeSchema = import_zod14.z.object({
|
|
2224
2506
|
route: RouteSchema,
|
|
2225
|
-
queryParams:
|
|
2226
|
-
headers:
|
|
2507
|
+
queryParams: import_zod14.z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
2508
|
+
headers: import_zod14.z.array(HeaderSchema).optional().describe("Headers configuration")
|
|
2227
2509
|
});
|
|
2228
2510
|
|
|
2229
2511
|
// src/nodes/inputs/http/patch/data.ts
|
|
@@ -2336,12 +2618,12 @@ var HttpPatchInputNodeFunction = (params) => {
|
|
|
2336
2618
|
};
|
|
2337
2619
|
|
|
2338
2620
|
// src/nodes/inputs/http/patch/schema.ts
|
|
2339
|
-
var
|
|
2340
|
-
var HttpPatchInputNodeSchema =
|
|
2621
|
+
var import_zod15 = require("zod");
|
|
2622
|
+
var HttpPatchInputNodeSchema = import_zod15.z.object({
|
|
2341
2623
|
route: RouteSchema,
|
|
2342
|
-
queryParams:
|
|
2343
|
-
headers:
|
|
2344
|
-
body:
|
|
2624
|
+
queryParams: import_zod15.z.array(QueryParamSchema).optional().describe("Query parameters configuration"),
|
|
2625
|
+
headers: import_zod15.z.array(HeaderSchema).optional().describe("Headers configuration"),
|
|
2626
|
+
body: import_zod15.z.array(BodyFieldSchema).optional().describe("Body fields configuration")
|
|
2345
2627
|
});
|
|
2346
2628
|
|
|
2347
2629
|
// src/nodes/inputs/http/utils.ts
|