@nuraly/lumenui 0.3.7 → 0.3.9
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/nuralyui.bundle.js +8 -6
- package/dist/nuralyui.bundle.js.gz +0 -0
- package/dist/src/components/canvas/bundle.js +7 -5
- package/dist/src/components/canvas/bundle.js.gz +0 -0
- package/dist/src/components/canvas/workflow-canvas.types.js +2 -2
- package/dist/src/components/chatbot/bundle.js +2 -2
- package/dist/src/components/chatbot/bundle.js.gz +0 -0
- package/dist/src/components/chatbot/plugins/artifact-plugin.d.ts +44 -0
- package/dist/src/components/chatbot/plugins/artifact-plugin.js +62 -0
- package/package.json +1 -1
- package/packages/common/dist/VERSIONS.md +1 -1
package/dist/nuralyui.bundle.js
CHANGED
|
@@ -1266,7 +1266,7 @@ var pt,ut;ht.styles=r`
|
|
|
1266
1266
|
* @license
|
|
1267
1267
|
* Copyright 2024 Nuraly, Laabidi Aymen
|
|
1268
1268
|
* SPDX-License-Identifier: MIT
|
|
1269
|
-
*/var xt,wt,kt,$t,Mt,St,Lt,Tt,Yt;!function(e){e.START="START",e.END="END",e.HTTP_START="HTTP_START",e.HTTP_END="HTTP_END",e.CHAT_START="CHAT_START",e.CHAT_OUTPUT="CHAT_OUTPUT",e.SOCIAL_POST="SOCIAL_POST",e.FUNCTION="FUNCTION",e.HTTP="HTTP",e.CONDITION="CONDITION",e.SWITCH="SWITCH",e.DELAY="DELAY",e.PARALLEL="PARALLEL",e.MERGE="MERGE",e.LOOP="LOOP",e.BREAK="BREAK",e.WAIT="WAIT",e.TRY_CATCH="TRY_CATCH",e.TRANSFORM="TRANSFORM",e.SUB_WORKFLOW="SUB_WORKFLOW",e.EMAIL="EMAIL",e.EMAIL_READER="EMAIL_READER",e.SENDGRID="SENDGRID",e.NOTIFICATION="NOTIFICATION",e.DATABASE="DATABASE",e.VARIABLE="VARIABLE",e.CHATBOT="CHATBOT",e.DEBUG="DEBUG",e.LLM="LLM",e.OCR="OCR",e.WEB_SEARCH="WEB_SEARCH",e.WEB_CRAWL="WEB_CRAWL",e.DOCUMENT_GENERATOR="DOCUMENT_GENERATOR",e.FILE_STORAGE="FILE_STORAGE",e.GOOGLE_CLOUD_STORAGE="GOOGLE_CLOUD_STORAGE",e.S3="S3",e.EMBEDDING="EMBEDDING",e.DOCUMENT_LOADER="DOCUMENT_LOADER",e.TEXT_SPLITTER="TEXT_SPLITTER",e.VECTOR_WRITE="VECTOR_WRITE",e.VECTOR_SEARCH="VECTOR_SEARCH",e.CONTEXT_BUILDER="CONTEXT_BUILDER",e.SUMMARIZATION="SUMMARIZATION",e.GUARDRAIL="GUARDRAIL",e.SLACK_SEND_MESSAGE="SLACK_SEND_MESSAGE",e.SLACK_GET_CHANNEL_INFO="SLACK_GET_CHANNEL_INFO",e.SLACK_LIST_CHANNELS="SLACK_LIST_CHANNELS",e.SLACK_ADD_REACTION="SLACK_ADD_REACTION",e.SLACK_UPLOAD_FILE="SLACK_UPLOAD_FILE",e.RERANKER="RERANKER",e.SHOPIFY="SHOPIFY",e.TELEGRAM_SEND="TELEGRAM_SEND",e.TWILIO_SMS="TWILIO_SMS",e.TWILIO_VOICE="TWILIO_VOICE",e.TELEGRAM_BOT="TELEGRAM_BOT",e.SLACK_SOCKET="SLACK_SOCKET",e.DISCORD_BOT="DISCORD_BOT",e.WHATSAPP_WEBHOOK="WHATSAPP_WEBHOOK",e.CUSTOM_WEBSOCKET="CUSTOM_WEBSOCKET",e.GOOGLE_CALENDAR="GOOGLE_CALENDAR",e.RABBITMQ_TRIGGER="RABBITMQ_TRIGGER",e.KAFKA="KAFKA",e.KAFKA_TRIGGER="KAFKA_TRIGGER",e.ZENDESK="ZENDESK",e.GITLAB="GITLAB",e.MCP="MCP",e.INFORMATION_EXTRACTOR="INFORMATION_EXTRACTOR",e.HUBSPOT="HUBSPOT",e.JIRA="JIRA",e.ELASTICSEARCH="ELASTICSEARCH",e.CALENDLY_TRIGGER="CALENDLY_TRIGGER",e.UI_TABLE="UI_TABLE",e.NOTE="NOTE",e.FRAME="FRAME",e.CRON="CRON"}(xt||(xt={})),function(e){e.AGENT="AGENT",e.TOOL="TOOL",e.MEMORY="MEMORY",e.CONTEXT_MEMORY="CONTEXT_MEMORY",e.PROMPT="PROMPT",e.LLM="AGENT_LLM",e.RETRIEVER="RETRIEVER",e.CHAIN="CHAIN",e.ROUTER="ROUTER",e.HUMAN_INPUT="HUMAN_INPUT",e.OUTPUT_PARSER="OUTPUT_PARSER",e.STRUCTURED_OUTPUT="STRUCTURED_OUTPUT"}(wt||(wt={})),function(e){e.TABLE="DB_TABLE",e.VIEW="DB_VIEW",e.INDEX="DB_INDEX",e.RELATIONSHIP="DB_RELATIONSHIP",e.CONSTRAINT="DB_CONSTRAINT",e.QUERY="DB_QUERY"}(kt||(kt={})),function(e){e.STICKY_NOTE="WB_STICKY_NOTE",e.SHAPE_RECTANGLE="WB_SHAPE_RECTANGLE",e.SHAPE_CIRCLE="WB_SHAPE_CIRCLE",e.SHAPE_DIAMOND="WB_SHAPE_DIAMOND",e.SHAPE_TRIANGLE="WB_SHAPE_TRIANGLE",e.SHAPE_ARROW="WB_SHAPE_ARROW",e.SHAPE_LINE="WB_SHAPE_LINE",e.SHAPE_STAR="WB_SHAPE_STAR",e.SHAPE_HEXAGON="WB_SHAPE_HEXAGON",e.TEXT_BLOCK="WB_TEXT_BLOCK",e.IMAGE="WB_IMAGE",e.DRAWING="WB_DRAWING",e.FRAME="WB_FRAME",e.VOTING="WB_VOTING",e.MERMAID="WB_MERMAID",e.ANCHOR="WB_ANCHOR",e.WORKFLOW="WB_WORKFLOW",e.DATABASE="WB_DATABASE"}($t||($t={})),function(e){e.WORKFLOW="WORKFLOW",e.DATABASE="DATABASE",e.WHITEBOARD="WHITEBOARD"}(Mt||(Mt={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.PAUSED="PAUSED",e.HANDOFF_PENDING="HANDOFF_PENDING",e.ERROR="ERROR"}(St||(St={})),function(e){e.IDLE="IDLE",e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.PAUSED="PAUSED",e.WAITING="WAITING"}(Lt||(Lt={})),function(e){e.INPUT="INPUT",e.OUTPUT="OUTPUT",e.CONFIG="CONFIG",e.CONDITIONAL_TRUE="CONDITIONAL_TRUE",e.CONDITIONAL_FALSE="CONDITIONAL_FALSE",e.CONDITIONAL_DEFAULT="CONDITIONAL_DEFAULT",e.LOOP_ITEM="LOOP_ITEM",e.LOOP_DONE="LOOP_DONE",e.PARALLEL_BRANCH="PARALLEL_BRANCH",e.ERROR="ERROR"}(Tt||(Tt={})),function(e){e.SELECT="SELECT",e.PAN="PAN",e.CONNECT="CONNECT",e.ADD_NODE="ADD_NODE"}(Yt||(Yt={}));const Ct={[xt.START]:"#22c55e",[xt.END]:"#ef4444",[xt.HTTP_START]:"#059669",[xt.HTTP_END]:"#dc2626",[xt.CHAT_START]:"#0ea5e9",[xt.CHAT_OUTPUT]:"#06b6d4",[xt.SOCIAL_POST]:"#7c3aed",[xt.FUNCTION]:"#3b82f6",[xt.HTTP]:"#8b5cf6",[xt.CONDITION]:"#f59e0b",[xt.SWITCH]:"#eab308",[xt.DELAY]:"#6b7280",[xt.PARALLEL]:"#06b6d4",[xt.MERGE]:"#0891b2",[xt.LOOP]:"#ec4899",[xt.BREAK]:"#991b1b",[xt.WAIT]:"#a78bfa",[xt.TRY_CATCH]:"#f43f5e",[xt.TRANSFORM]:"#14b8a6",[xt.SUB_WORKFLOW]:"#6366f1",[xt.EMAIL]:"#f97316",[xt.EMAIL_READER]:"#06b6d4",[xt.SENDGRID]:"#1A82E2",[xt.NOTIFICATION]:"#84cc16",[xt.DATABASE]:"#a855f7",[xt.VARIABLE]:"#64748b",[xt.CHATBOT]:"#0ea5e9",[xt.DEBUG]:"#f97316",[xt.LLM]:"#22d3ee",[xt.OCR]:"#0d9488",[xt.INFORMATION_EXTRACTOR]:"#8B5CF6",[xt.WEB_SEARCH]:"#3b82f6",[xt.WEB_CRAWL]:"#6366f1",[xt.DOCUMENT_GENERATOR]:"#0284c7",[xt.FILE_STORAGE]:"#f59e0b",[xt.GOOGLE_CLOUD_STORAGE]:"#4285f4",[xt.S3]:"#FF9900",[xt.EMBEDDING]:"#8b5cf6",[xt.DOCUMENT_LOADER]:"#ec4899",[xt.TEXT_SPLITTER]:"#14b8a6",[xt.VECTOR_WRITE]:"#10b981",[xt.VECTOR_SEARCH]:"#06b6d4",[xt.CONTEXT_BUILDER]:"#a855f7",[xt.SUMMARIZATION]:"#8B5CF6",[xt.GUARDRAIL]:"#ef4444",[xt.SLACK_SEND_MESSAGE]:"#4A154B",[xt.SLACK_GET_CHANNEL_INFO]:"#4A154B",[xt.SLACK_LIST_CHANNELS]:"#4A154B",[xt.SLACK_ADD_REACTION]:"#4A154B",[xt.SLACK_UPLOAD_FILE]:"#4A154B",[xt.RERANKER]:"#d946ef",[xt.SHOPIFY]:"#96bf48",[xt.TELEGRAM_SEND]:"#0088cc",[xt.TWILIO_SMS]:"#F22F46",[xt.TWILIO_VOICE]:"#F22F46",[xt.TELEGRAM_BOT]:"#0088cc",[xt.SLACK_SOCKET]:"#4A154B",[xt.DISCORD_BOT]:"#5865F2",[xt.WHATSAPP_WEBHOOK]:"#25D366",[xt.CUSTOM_WEBSOCKET]:"#6366f1",[xt.GOOGLE_CALENDAR]:"#4285F4",[xt.RABBITMQ_TRIGGER]:"#FF6600",[xt.KAFKA]:"#231F20",[xt.KAFKA_TRIGGER]:"#231F20",[xt.ZENDESK]:"#03363d",[xt.GITLAB]:"#FC6D26",[xt.MCP]:"#7c3aed",[xt.HUBSPOT]:"#FF7A59",[xt.JIRA]:"#0052CC",[xt.ELASTICSEARCH]:"#00bfb3",[xt.CALENDLY_TRIGGER]:"#006BFF",[xt.UI_TABLE]:"#0891b2",[xt.NOTE]:"#fef08a",[xt.FRAME]:"#6366f1",[xt.CRON]:"#d97706",[wt.AGENT]:"#10b981",[wt.TOOL]:"#0ea5e9",[wt.MEMORY]:"#d946ef",[wt.CONTEXT_MEMORY]:"#c026d3",[wt.PROMPT]:"#f472b6",[wt.LLM]:"#22d3ee",[wt.RETRIEVER]:"#a78bfa",[wt.CHAIN]:"#fbbf24",[wt.ROUTER]:"#fb923c",[wt.HUMAN_INPUT]:"#4ade80",[wt.OUTPUT_PARSER]:"#2dd4bf",[wt.STRUCTURED_OUTPUT]:"#f59e0b",[kt.TABLE]:"#64748b",[kt.VIEW]:"#a855f7",[kt.INDEX]:"#f59e0b",[kt.RELATIONSHIP]:"#ec4899",[kt.CONSTRAINT]:"#ef4444",[kt.QUERY]:"#06b6d4",[$t.STICKY_NOTE]:"#fef08a",[$t.SHAPE_RECTANGLE]:"#3b82f6",[$t.SHAPE_CIRCLE]:"#8b5cf6",[$t.SHAPE_DIAMOND]:"#f59e0b",[$t.SHAPE_TRIANGLE]:"#22c55e",[$t.SHAPE_ARROW]:"#6b7280",[$t.SHAPE_LINE]:"#6b7280",[$t.SHAPE_STAR]:"#f97316",[$t.SHAPE_HEXAGON]:"#ec4899",[$t.TEXT_BLOCK]:"#111827",[$t.IMAGE]:"#06b6d4",[$t.DRAWING]:"#14b8a6",[$t.FRAME]:"#6366f1",[$t.VOTING]:"#ef4444",[$t.MERMAID]:"#8b5cf6",[$t.ANCHOR]:"#f59e0b",[$t.WORKFLOW]:"#6366f1",[$t.DATABASE]:"#64748b"},Dt={[xt.START]:"play",[xt.END]:"stop",[xt.HTTP_START]:"download",[xt.HTTP_END]:"upload",[xt.CHAT_START]:"message-circle",[xt.CHAT_OUTPUT]:"message-square",[xt.SOCIAL_POST]:"send",[xt.FUNCTION]:"code",[xt.HTTP]:"globe",[xt.CONDITION]:"git-branch",[xt.SWITCH]:"git-fork",[xt.DELAY]:"clock",[xt.PARALLEL]:"git-merge",[xt.MERGE]:"merge",[xt.LOOP]:"repeat",[xt.BREAK]:"circle-stop",[xt.WAIT]:"hourglass",[xt.TRY_CATCH]:"shield-alert",[xt.TRANSFORM]:"shuffle",[xt.SUB_WORKFLOW]:"layers",[xt.EMAIL]:"mail",[xt.EMAIL_READER]:"mail-open",[xt.SENDGRID]:"send",[xt.NOTIFICATION]:"bell",[xt.DATABASE]:"database",[xt.VARIABLE]:"box",[xt.CHATBOT]:"message-circle",[xt.DEBUG]:"bug",[xt.LLM]:"brain",[xt.OCR]:"scan",[xt.INFORMATION_EXTRACTOR]:"search",[xt.WEB_SEARCH]:"search",[xt.WEB_CRAWL]:"globe",[xt.DOCUMENT_GENERATOR]:"file-text",[xt.FILE_STORAGE]:"hard-drive",[xt.GOOGLE_CLOUD_STORAGE]:"cloud",[xt.S3]:"cloud",[xt.EMBEDDING]:"hash",[xt.DOCUMENT_LOADER]:"file-text",[xt.TEXT_SPLITTER]:"scissors",[xt.VECTOR_WRITE]:"database",[xt.VECTOR_SEARCH]:"search",[xt.CONTEXT_BUILDER]:"layers",[xt.SUMMARIZATION]:"file-minus",[xt.GUARDRAIL]:"shield",[xt.SLACK_SEND_MESSAGE]:"message-square",[xt.SLACK_GET_CHANNEL_INFO]:"hash",[xt.SLACK_LIST_CHANNELS]:"list",[xt.SLACK_ADD_REACTION]:"smile-plus",[xt.SLACK_UPLOAD_FILE]:"upload",[xt.RERANKER]:"arrow-up-down",[xt.SHOPIFY]:"shopping-cart",[xt.TELEGRAM_SEND]:"send",[xt.TWILIO_SMS]:"message-square",[xt.TWILIO_VOICE]:"phone",[xt.TELEGRAM_BOT]:"send",[xt.SLACK_SOCKET]:"message-square",[xt.DISCORD_BOT]:"gamepad-2",[xt.WHATSAPP_WEBHOOK]:"phone",[xt.CUSTOM_WEBSOCKET]:"radio",[xt.GOOGLE_CALENDAR]:"calendar",[xt.RABBITMQ_TRIGGER]:"inbox",[xt.KAFKA]:"message-square-share",[xt.KAFKA_TRIGGER]:"radio",[xt.ZENDESK]:"ticket",[xt.GITLAB]:"git-merge",[xt.MCP]:"plug",[xt.HUBSPOT]:"users",[xt.JIRA]:"ticket",[xt.ELASTICSEARCH]:"search",[xt.CALENDLY_TRIGGER]:"calendar",[xt.UI_TABLE]:"table",[xt.NOTE]:"sticky-note",[xt.FRAME]:"square",[xt.CRON]:"timer",[wt.AGENT]:"cpu",[wt.TOOL]:"tool",[wt.MEMORY]:"hard-drive",[wt.CONTEXT_MEMORY]:"brain",[wt.PROMPT]:"message-square",[wt.LLM]:"brain",[wt.RETRIEVER]:"search",[wt.CHAIN]:"link",[wt.ROUTER]:"git-pull-request",[wt.HUMAN_INPUT]:"user",[wt.OUTPUT_PARSER]:"file-text",[wt.STRUCTURED_OUTPUT]:"braces",[kt.TABLE]:"table",[kt.VIEW]:"eye",[kt.INDEX]:"list",[kt.RELATIONSHIP]:"git-merge",[kt.CONSTRAINT]:"shield",[kt.QUERY]:"terminal",[$t.STICKY_NOTE]:"sticky-note",[$t.SHAPE_RECTANGLE]:"square",[$t.SHAPE_CIRCLE]:"circle",[$t.SHAPE_DIAMOND]:"diamond",[$t.SHAPE_TRIANGLE]:"triangle",[$t.SHAPE_ARROW]:"arrow-right",[$t.SHAPE_LINE]:"minus",[$t.SHAPE_STAR]:"star",[$t.SHAPE_HEXAGON]:"hexagon",[$t.TEXT_BLOCK]:"type",[$t.IMAGE]:"image",[$t.DRAWING]:"pen-tool",[$t.FRAME]:"frame",[$t.VOTING]:"thumbs-up",[$t.MERMAID]:"git-branch",[$t.ANCHOR]:"anchor",[$t.WORKFLOW]:"layers",[$t.DATABASE]:"table"},zt=[{type:xt.START,name:"Start",description:"Entry point of the workflow",icon:Dt[xt.START],color:Ct[xt.START],category:"control",defaultConfig:{},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.END,name:"End",description:"Exit point of the workflow",icon:Dt[xt.END],color:Ct[xt.END],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.HTTP_START,name:"HTTP Trigger",description:"Start workflow from HTTP request",icon:Dt[xt.HTTP_START],color:Ct[xt.HTTP_START],category:"trigger",defaultConfig:{httpPath:"/webhook",httpMethod:"POST",httpAuth:"none",httpCors:!0,httpRateLimit:100,httpRequestSchema:{}},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Request"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.HTTP_END,name:"HTTP Response",description:"Return HTTP response to caller",icon:Dt[xt.HTTP_END],color:Ct[xt.HTTP_END],category:"control",defaultConfig:{httpStatusCode:200,httpResponseHeaders:{"Content-Type":"application/json"},httpResponseBody:"{{data}}",httpContentType:"application/json"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.CHAT_START,name:"Chat Trigger",description:"Start workflow from chatbot message",icon:Dt[xt.CHAT_START],color:Ct[xt.CHAT_START],category:"trigger",defaultConfig:{outputVariable:"chatInput",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"files",type:Tt.OUTPUT,label:"Files"}]}},{type:xt.CHAT_OUTPUT,name:"Chat Output",description:"Send message to chatbot during execution",icon:Dt[xt.CHAT_OUTPUT],color:Ct[xt.CHAT_OUTPUT],category:"action",defaultConfig:{message:"${variables.response}",messageType:"text",typing:!1,typingDelay:1e3},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SOCIAL_POST,name:"Social Post",description:"Post to social feed on behalf of an agent",icon:Dt[xt.SOCIAL_POST],color:Ct[xt.SOCIAL_POST],category:"action",defaultConfig:{agentId:"",content:"${variables.response}",mediaUrl:"",mediaType:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.LLM,name:"LLM",description:"Call AI language model (OpenAI, Anthropic, etc.)",icon:Dt[xt.LLM],color:Ct[xt.LLM],category:"action",defaultConfig:{provider:"openai",model:"gpt-4",temperature:.7,maxTokens:2048,systemPrompt:"",userPrompt:"${variables.message}"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"},{id:"context_memory",type:Tt.INPUT,label:"Context Memory"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.OCR,name:"OCR",description:"Extract text from images using OCR",icon:Dt[xt.OCR],color:Ct[xt.OCR],category:"action",defaultConfig:{imageSource:"variable",imageField:"${input.files[0].base64}",language:"fr",detectLayout:!1,outputVariable:"ocrResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Image"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Text"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.INFORMATION_EXTRACTOR,name:"Information Extractor",description:"Extract structured data from unstructured text using AI",icon:Dt[xt.INFORMATION_EXTRACTOR],color:Ct[xt.INFORMATION_EXTRACTOR],category:"action",defaultConfig:{inputField:"text",schema:[{name:"field1",type:"string",description:"",required:!0}],model:"gpt-4o-mini",provider:"openai",instructions:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Extracted"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.FUNCTION,name:"Function",description:"Invoke a Nuraly function",icon:Dt[xt.FUNCTION],color:Ct[xt.FUNCTION],category:"action",defaultConfig:{functionId:"",inputMapping:{},outputMapping:{}},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.HTTP,name:"HTTP Request",description:"Make an HTTP request",icon:Dt[xt.HTTP],color:Ct[xt.HTTP],category:"action",defaultConfig:{method:"GET",url:"",headers:{},timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Success"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CONDITION,name:"Condition",description:"Branch based on a condition",icon:Dt[xt.CONDITION],color:Ct[xt.CONDITION],category:"control",defaultConfig:{expression:"",language:"javascript"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"true",type:Tt.CONDITIONAL_TRUE,label:"True"},{id:"false",type:Tt.CONDITIONAL_FALSE,label:"False"}]}},{type:xt.DELAY,name:"Delay",description:"Wait for a specified duration",icon:Dt[xt.DELAY],color:Ct[xt.DELAY],category:"control",defaultConfig:{duration:1e3,unit:"milliseconds"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.PARALLEL,name:"Parallel",description:"Execute branches in parallel",icon:Dt[xt.PARALLEL],color:Ct[xt.PARALLEL],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"branch1",type:Tt.PARALLEL_BRANCH,label:"Branch 1"},{id:"branch2",type:Tt.PARALLEL_BRANCH,label:"Branch 2"}]}},{type:xt.LOOP,name:"Loop",description:"Iterate over an array",icon:Dt[xt.LOOP],color:Ct[xt.LOOP],category:"control",defaultConfig:{iteratorVariable:"item",arrayExpression:"",maxIterations:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"item",type:Tt.LOOP_ITEM,label:"Each Item"},{id:"done",type:Tt.LOOP_DONE,label:"Done"}]}},{type:xt.SWITCH,name:"Switch",description:"Route to a branch based on a value",icon:Dt[xt.SWITCH],color:Ct[xt.SWITCH],category:"control",defaultConfig:{expression:"",language:"javascript",cases:[{value:"case1",label:"Case 1"},{value:"case2",label:"Case 2"}],includeDefault:!0},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"case1",type:Tt.OUTPUT,label:"Case 1"},{id:"case2",type:Tt.OUTPUT,label:"Case 2"},{id:"default",type:Tt.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:xt.MERGE,name:"Merge",description:"Join multiple branches into one",icon:Dt[xt.MERGE],color:Ct[xt.MERGE],category:"control",defaultConfig:{mode:"waitAll"},defaultPorts:{inputs:[{id:"in1",type:Tt.INPUT,label:"Input 1",multiple:!0},{id:"in2",type:Tt.INPUT,label:"Input 2",multiple:!0}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.WAIT,name:"Wait",description:"Pause until a signal or event is received",icon:Dt[xt.WAIT],color:Ct[xt.WAIT],category:"control",defaultConfig:{signalName:"",timeout:3e5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Signal"},{id:"timeout",type:Tt.OUTPUT,label:"Timeout"}]}},{type:xt.TRY_CATCH,name:"Try / Catch",description:"Catch errors from the connected branch",icon:Dt[xt.TRY_CATCH],color:Ct[xt.TRY_CATCH],category:"control",defaultConfig:{catchTypes:["*"],errorVariable:"error"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"try",type:Tt.OUTPUT,label:"Try"},{id:"catch",type:Tt.ERROR,label:"Catch"}]}},{type:xt.BREAK,name:"Break",description:"Exit the enclosing loop",icon:Dt[xt.BREAK],color:Ct[xt.BREAK],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.TRANSFORM,name:"Transform",description:"Transform data using expressions",icon:Dt[xt.TRANSFORM],color:Ct[xt.TRANSFORM],category:"data",defaultConfig:{transformExpression:"",language:"jsonata"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SUB_WORKFLOW,name:"Sub-Workflow",description:"Invoke another workflow",icon:Dt[xt.SUB_WORKFLOW],color:Ct[xt.SUB_WORKFLOW],category:"action",defaultConfig:{workflowId:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.EMAIL,name:"Email",description:"Send an email",icon:Dt[xt.EMAIL],color:Ct[xt.EMAIL],category:"action",defaultConfig:{to:"",cc:"",bcc:"",subject:"",body:"",bodyType:"text",fromName:"",replyTo:"",priority:"normal"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.EMAIL_READER,name:"Email Reader",description:"Read and manage emails from Gmail, Outlook, Yahoo, or IMAP",icon:Dt[xt.EMAIL_READER],color:Ct[xt.EMAIL_READER],category:"action",defaultConfig:{provider:"imap",operation:"LIST",folder:"INBOX",limit:10,includeAttachments:!1,markAsReadOnFetch:!1,searchQuery:"",host:"",port:993,tls:!0,credentialPath:"",sinceDate:"",beforeDate:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SENDGRID,name:"SendGrid",description:"Send email via SendGrid API",icon:Dt[xt.SENDGRID],color:Ct[xt.SENDGRID],category:"action",defaultConfig:{to:"",cc:"",bcc:"",fromEmail:"",fromName:"",replyTo:"",subject:"",body:"",contentType:"text/html",templateId:"",dynamicTemplateData:"",categories:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.OUTPUT,label:"Error"}]}},{type:xt.NOTIFICATION,name:"Notification",description:"Send a notification",icon:Dt[xt.NOTIFICATION],color:Ct[xt.NOTIFICATION],category:"action",defaultConfig:{channel:"",message:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.DATABASE,name:"Data",description:"Read and write data to databases",icon:Dt[xt.DATABASE],color:"#6366F1",category:"data",defaultConfig:{operation:pt.QUERY,dataSource:null,entity:null,filter:null,fields:{},select:[],orderBy:[],limit:null,offset:null,outputVariable:"results"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.VARIABLE,name:"Variable",description:"Set or get a workflow variable",icon:Dt[xt.VARIABLE],color:Ct[xt.VARIABLE],category:"data",defaultConfig:{variableOperation:"set",variableName:"",value:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.CHATBOT,name:"Chatbot Trigger",description:"Trigger workflow from chatbot interactions",icon:Dt[xt.CHATBOT],color:Ct[xt.CHATBOT],category:"trigger",defaultConfig:{triggerEvents:["MESSAGE_SENT"],chatbotSize:"medium",chatbotVariant:"floating",title:"Chat Assistant",subtitle:"Ask me anything",placeholder:"Type a message...",initialMessage:"",enableTypingIndicator:!0,enableSuggestions:!1,suggestions:[],loadingType:"dots",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"message",type:Tt.OUTPUT,label:"Message"},{id:"files",type:Tt.OUTPUT,label:"Files"},{id:"session",type:Tt.OUTPUT,label:"Session Start"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DEBUG,name:"Debug",description:"Display input, output, and variables for debugging",icon:Dt[xt.DEBUG],color:Ct[xt.DEBUG],category:"data",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.UI_TABLE,name:"Table",description:"Display data as an interactive table",icon:Dt[xt.UI_TABLE],color:Ct[xt.UI_TABLE],category:"display",defaultConfig:{tableColumns:[],dataExpression:"",tablePageSize:10,tableEnableFilter:!1,tableEnableSort:!0,tableFixedHeader:!1,tableSize:"normal",tableEmptyText:"No data available"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Data"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.WEB_SEARCH,name:"Web Search",description:"Search the web using Google, Bing, Brave, or DuckDuckGo",icon:Dt[xt.WEB_SEARCH],color:Ct[xt.WEB_SEARCH],category:"web",defaultConfig:{provider:"google",queryField:"query",numResults:10,safeSearch:!0,timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Results"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.WEB_CRAWL,name:"Web Crawl",description:"Crawl web pages and extract text content",icon:Dt[xt.WEB_CRAWL],color:Ct[xt.WEB_CRAWL],category:"web",defaultConfig:{urlField:"url",maxDepth:1,maxPages:10,sameDomainOnly:!0,renderJs:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Pages"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DOCUMENT_GENERATOR,name:"Document Generator",description:"Generate Word documents from templates with dynamic data",icon:Dt[xt.DOCUMENT_GENERATOR],color:Ct[xt.DOCUMENT_GENERATOR],category:"documents",defaultConfig:{templateId:"",data:{},outputVariable:"documentResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.FILE_STORAGE,name:"File Storage",description:"Store files to S3, MinIO, or local filesystem",icon:Dt[xt.FILE_STORAGE],color:Ct[xt.FILE_STORAGE],category:"storage",defaultConfig:{provider:"local",bucket:"default",path:"",fileField:"file",filenameField:"filename"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GOOGLE_CLOUD_STORAGE,name:"Google Cloud Storage",description:"Manage objects in Google Cloud Storage buckets",icon:Dt[xt.GOOGLE_CLOUD_STORAGE],color:Ct[xt.GOOGLE_CLOUD_STORAGE],category:"storage",defaultConfig:{operation:"LIST",bucketName:"",objectPath:"",serviceAccountPath:"",signedUrlExpiration:3600},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.S3,name:"AWS S3",description:"Upload, download, and manage files in Amazon S3",icon:Dt[xt.S3],color:Ct[xt.S3],category:"integrations",defaultConfig:{s3Operation:"upload",s3Bucket:"",s3Key:"",s3Region:"us-east-1",s3ContentType:"auto"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.EMBEDDING,name:"Embedding",description:"Convert text to vector embeddings",icon:Dt[xt.EMBEDDING],color:Ct[xt.EMBEDDING],category:"rag",defaultConfig:{provider:"openai",model:"text-embedding-3-small",inputField:"text",batchSize:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Text"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Embedding"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DOCUMENT_LOADER,name:"Document Loader",description:"Load and parse documents (PDF, Word, HTML, etc.)",icon:Dt[xt.DOCUMENT_LOADER],color:Ct[xt.DOCUMENT_LOADER],category:"rag",defaultConfig:{sourceType:"text",contentField:"content",filenameField:"filename",defaultType:"txt",timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Document"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Content"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TEXT_SPLITTER,name:"Text Splitter",description:"Split text into chunks for embedding",icon:Dt[xt.TEXT_SPLITTER],color:Ct[xt.TEXT_SPLITTER],category:"rag",defaultConfig:{strategy:"recursive",chunkSize:1e3,chunkOverlap:200,contentField:"content"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Text"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Chunks"}]}},{type:xt.VECTOR_WRITE,name:"Vector Write",description:"Store embeddings in vector database",icon:Dt[xt.VECTOR_WRITE],color:Ct[xt.VECTOR_WRITE],category:"rag",defaultConfig:{collectionName:"",upsertMode:"replace"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Embeddings"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.VECTOR_SEARCH,name:"Vector Search",description:"Search for similar documents in vector store",icon:Dt[xt.VECTOR_SEARCH],color:Ct[xt.VECTOR_SEARCH],category:"rag",defaultConfig:{collectionName:"",topK:5,minScore:.7,includeContent:!0,includeMetadata:!0,provider:"openai",model:"text-embedding-3-small"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Query"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Results"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CONTEXT_BUILDER,name:"Context Builder",description:"Format retrieved documents into LLM-ready context",icon:Dt[xt.CONTEXT_BUILDER],color:Ct[xt.CONTEXT_BUILDER],category:"rag",defaultConfig:{template:"default",maxTokens:4e3,maxDocuments:10,includeSourceInfo:!0,includeSimilarityScore:!1,separator:"\n\n---\n\n"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Results"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Context"}]}},{type:xt.RERANKER,name:"Reranker",description:"Re-rank search results by relevance",icon:Dt[xt.RERANKER],color:Ct[xt.RERANKER],category:"rag",defaultConfig:{model:"cross-encoder",topK:5,threshold:.5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Results"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Reranked"}]}},{type:xt.SUMMARIZATION,name:"Summarize Document",description:"Summarize long text using AI with chunking strategies",icon:Dt[xt.SUMMARIZATION],color:Ct[xt.SUMMARIZATION],category:"action",defaultConfig:{inputField:"text",outputField:"summary",strategy:"map_reduce",chunkSize:4e3,chunkOverlap:200,model:"gpt-4o-mini"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Summary"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GUARDRAIL,name:"Guardrail",description:"Validate and filter LLM inputs/outputs for safety",icon:Dt[xt.GUARDRAIL],color:Ct[xt.GUARDRAIL],category:"safety",defaultConfig:{mode:"input",contentField:"content",onFail:"block",checks:[]},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Passed"},{id:"blocked",type:Tt.ERROR,label:"Blocked"}]}},{type:xt.SLACK_SEND_MESSAGE,name:"Slack: Send Message",description:"Send a message to a Slack channel or user",icon:Dt[xt.SLACK_SEND_MESSAGE],color:Ct[xt.SLACK_SEND_MESSAGE],category:"slack",defaultConfig:{slackMethod:"api",botToken:"",channel:"",text:"",unfurlLinks:!0,unfurlMedia:!0},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_GET_CHANNEL_INFO,name:"Slack: Channel Info",description:"Get information about a Slack channel",icon:Dt[xt.SLACK_GET_CHANNEL_INFO],color:Ct[xt.SLACK_GET_CHANNEL_INFO],category:"slack",defaultConfig:{botToken:"",channel:"",includeLocale:!1,includeNumMembers:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Info"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_LIST_CHANNELS,name:"Slack: List Channels",description:"List available Slack channels in the workspace",icon:Dt[xt.SLACK_LIST_CHANNELS],color:Ct[xt.SLACK_LIST_CHANNELS],category:"slack",defaultConfig:{botToken:"",types:"public_channel",excludeArchived:!0,limit:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Channels"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_ADD_REACTION,name:"Slack: Add Reaction",description:"Add a reaction emoji to a Slack message",icon:Dt[xt.SLACK_ADD_REACTION],color:Ct[xt.SLACK_ADD_REACTION],category:"slack",defaultConfig:{botToken:"",channel:"",timestamp:"",name:"thumbsup"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_UPLOAD_FILE,name:"Slack: Upload File",description:"Upload a file to a Slack channel",icon:Dt[xt.SLACK_UPLOAD_FILE],color:Ct[xt.SLACK_UPLOAD_FILE],category:"slack",defaultConfig:{botToken:"",channels:"",filename:"",content:"",title:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GOOGLE_CALENDAR,name:"Google Calendar",description:"Create, read, update, and delete Google Calendar events",icon:Dt[xt.GOOGLE_CALENDAR],color:Ct[xt.GOOGLE_CALENDAR],category:"google-calendar",defaultConfig:{googleCalendarCredential:"",googleCalendarId:"primary",googleCalendarOperation:"getAll",googleCalendarEventSummary:"",googleCalendarEventDescription:"",googleCalendarEventStart:"",googleCalendarEventEnd:"",googleCalendarEventAttendees:"",googleCalendarEventLocation:"",googleCalendarTimeMin:"",googleCalendarTimeMax:"",googleCalendarRecurrence:"",googleCalendarConferenceData:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SHOPIFY,name:"Shopify",description:"Manage Shopify products, orders, customers, inventory, and fulfillments via the Admin API",icon:Dt[xt.SHOPIFY],color:Ct[xt.SHOPIFY],category:"shopify",defaultConfig:{resource:"ORDER",operation:pt.LIST,resourceId:"",filters:"",shopDomain:"",accessToken:""},defaultPorts:{inputs:[{id:"input",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GITLAB,name:"GitLab",description:"Manage GitLab repositories, issues, merge requests, pipelines, and releases",icon:Dt[xt.GITLAB],color:Ct[xt.GITLAB],category:"developer",defaultConfig:{gitlabBaseUrl:"https://gitlab.com",gitlabAccessToken:"",gitlabResource:"issue",gitlabOperation:"getAll",gitlabProjectId:"",gitlabTitle:"",gitlabDescription:"",gitlabLabels:[],gitlabAssigneeIds:[],gitlabSourceBranch:"",gitlabTargetBranch:"",gitlabRef:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TELEGRAM_SEND,name:"Telegram: Send Message",description:"Send a message to a Telegram chat with typing indicator and optional emoji reaction",icon:Dt[xt.TELEGRAM_SEND],color:Ct[xt.TELEGRAM_SEND],category:"telegram",defaultConfig:{botToken:"",chatId:"",text:"",parseMode:"",replyToMessageId:"",showTyping:!0,reaction:"",disableNotification:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.ZENDESK,name:"Zendesk",description:"Manage Zendesk tickets, users, organizations, and satisfaction ratings",icon:Dt[xt.ZENDESK],color:Ct[xt.ZENDESK],category:"zendesk",defaultConfig:{zendeskResource:"TICKET",zendeskOperation:"LIST",zendeskSubdomain:"",zendeskApiToken:"",zendeskEmail:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TWILIO_SMS,name:"Twilio: Send SMS",description:"Send an SMS or WhatsApp message via the Twilio API",icon:Dt[xt.TWILIO_SMS],color:Ct[xt.TWILIO_SMS],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioMessageBody:"",twilioOperation:"send_sms",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TWILIO_VOICE,name:"Twilio: Voice Call",description:"Make a voice call via the Twilio API",icon:Dt[xt.TWILIO_VOICE],color:Ct[xt.TWILIO_VOICE],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioOperation:"make_call",twilioVoiceUrl:"",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TELEGRAM_BOT,name:"Telegram Bot",description:"Receive messages from a Telegram bot via polling or webhook",icon:Dt[xt.TELEGRAM_BOT],color:Ct[xt.TELEGRAM_BOT],category:"trigger",defaultConfig:{botToken:"",mode:"polling",pollingTimeout:30,allowedUpdates:[],allowedChatIds:"",allowedUserIds:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_SOCKET,name:"Slack Socket",description:"Receive events via Slack Socket Mode (WebSocket)",icon:Dt[xt.SLACK_SOCKET],color:Ct[xt.SLACK_SOCKET],category:"trigger",defaultConfig:{appTokenPath:"",botTokenPath:"",eventTypes:[],interactionTypes:[],slashCommands:"",allowedTeamIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DISCORD_BOT,name:"Discord Bot",description:"Receive events from a Discord bot (Gateway WebSocket)",icon:Dt[xt.DISCORD_BOT],color:Ct[xt.DISCORD_BOT],category:"trigger",defaultConfig:{botTokenPath:"",intents:["GUILDS","GUILD_MESSAGES","MESSAGE_CONTENT"],eventTypes:[],allowedGuildIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.WHATSAPP_WEBHOOK,name:"WhatsApp",description:"Receive messages via WhatsApp Business API",icon:Dt[xt.WHATSAPP_WEBHOOK],color:Ct[xt.WHATSAPP_WEBHOOK],category:"trigger",defaultConfig:{phoneNumberId:"",businessAccountId:"",accessTokenPath:"",appSecretPath:"",verifyToken:"",webhookFields:["messages"],messageTypes:[],allowedSenders:"",ignoreStatusUpdates:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CUSTOM_WEBSOCKET,name:"WebSocket Listener",description:"Listen for messages on a custom WebSocket endpoint",icon:Dt[xt.CUSTOM_WEBSOCKET],color:Ct[xt.CUSTOM_WEBSOCKET],category:"trigger",defaultConfig:{url:"",subprotocol:"",authMode:"none",tokenPath:"",username:"",passwordPath:"",headerName:"",headerValuePath:"",queryParamName:"token",queryParamValuePath:"",initialMessage:"",autoReconnect:!0,reconnectDelayMs:5e3,maxReconnectAttempts:0,pingIntervalSec:30,messageFormat:"json",filterExpression:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.RABBITMQ_TRIGGER,name:"RabbitMQ Trigger",description:"Triggers workflow on new messages from a RabbitMQ queue",icon:Dt[xt.RABBITMQ_TRIGGER],color:Ct[xt.RABBITMQ_TRIGGER],category:"trigger",defaultConfig:{connectionUrl:"",queueName:"",exchange:"",routingKey:"#",autoAck:!1,contentType:"application/json",prefetchCount:1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.KAFKA,name:"Kafka: Send Message",description:"Produce a message to a Kafka topic",icon:Dt[xt.KAFKA],color:Ct[xt.KAFKA],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaAcks:"all",kafkaCompressionType:"none"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.KAFKA_TRIGGER,name:"Kafka Trigger",description:"Triggers workflow on new messages from a Kafka topic",icon:Dt[xt.KAFKA_TRIGGER],color:Ct[xt.KAFKA_TRIGGER],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaConsumerGroup:"nuraly-workflow",kafkaFromBeginning:!1,kafkaSessionTimeout:3e4},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CRON,name:"Cron Trigger",description:"Triggers workflow on a scheduled cron expression",icon:Dt[xt.CRON],color:Ct[xt.CRON],category:"trigger",defaultConfig:{cronExpression:"0 * * * *",timezone:"UTC"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Tick"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.MCP,name:"MCP Server",description:"Connect to MCP server - provides tools to Agent/LLM nodes",icon:Dt[xt.MCP],color:Ct[xt.MCP],category:"trigger",defaultConfig:{serverUrl:"",transportType:"streamable_http"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"}]}},{type:xt.HUBSPOT,name:"HubSpot",description:"Manage contacts, deals, companies, and tickets via HubSpot CRM",icon:Dt[xt.HUBSPOT],color:Ct[xt.HUBSPOT],category:"crm",defaultConfig:{hubspotAccessToken:"",hubspotResource:"contact",hubspotOperation:"getAll",hubspotProperties:{},hubspotFilterGroups:[],hubspotLimit:100,hubspotAssociations:[]},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.JIRA,name:"Jira",description:"Create, update, and manage Jira issues",icon:Dt[xt.JIRA],color:Ct[xt.JIRA],category:"jira",defaultConfig:{operation:"createIssue",jiraInstanceUrl:"",projectKey:"",issueType:"Task",summary:"",description:"",assignee:"",priority:"Medium",labels:"",jqlQuery:"",transitionId:"",issueKey:"",comment:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.ELASTICSEARCH,name:"Elasticsearch",description:"Search, index, and manage documents in Elasticsearch",icon:Dt[xt.ELASTICSEARCH],color:Ct[xt.ELASTICSEARCH],category:"integration",defaultConfig:{elasticsearchUrl:"",elasticsearchCredentialPath:"",elasticsearchOperation:"search",elasticsearchIndex:"",elasticsearchDocumentId:"",elasticsearchQueryBody:"",elasticsearchSize:10,elasticsearchFrom:0,elasticsearchRefresh:"false",elasticsearchTimeout:"30s",elasticsearchRouting:"",outputVariable:"elasticsearchResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CALENDLY_TRIGGER,name:"Calendly Trigger",description:"Triggers workflow when a Calendly event is booked or cancelled",icon:Dt[xt.CALENDLY_TRIGGER],color:Ct[xt.CALENDLY_TRIGGER],category:"trigger",defaultConfig:{events:["invitee.created"],scope:"user",outputVariable:"calendlyEvent"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.NOTE,name:"Note",description:"Add annotations and comments to your workflow",icon:Dt[xt.NOTE],color:Ct[xt.NOTE],category:"annotation",defaultConfig:{noteContent:"Add your note here...",noteBackgroundColor:"#fef08a",noteTextColor:"#713f12",noteFontSize:"medium",noteShowBorder:!1},defaultPorts:{inputs:[],outputs:[]}},{type:xt.FRAME,name:"Frame",description:"Group related nodes together with a labeled container",icon:Dt[xt.FRAME],color:Ct[xt.FRAME],category:"annotation",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:wt.AGENT,name:"AI Agent",description:"Autonomous AI agent that can use tools",icon:Dt[wt.AGENT],color:Ct[wt.AGENT],category:"agent",defaultConfig:{agentId:"",maxIterations:10},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"},{id:"retriever",type:Tt.INPUT,label:"Retriever"}],configs:[{id:"llm",type:Tt.CONFIG,label:"LLM"},{id:"prompt",type:Tt.CONFIG,label:"Prompt"},{id:"memory",type:Tt.CONFIG,label:"Memory"},{id:"tools",type:Tt.CONFIG,label:"Tools",multiple:!0},{id:"structured_output",type:Tt.CONFIG,label:"Structured Output"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:wt.TOOL,name:"Tool",description:"A tool that can be used by an agent",icon:Dt[wt.TOOL],color:Ct[wt.TOOL],category:"agent",defaultConfig:{toolName:"",description:"",parameters:[]},defaultPorts:{inputs:[{id:"function",type:Tt.INPUT,label:"Function"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Tool"}]}},{type:wt.MEMORY,name:"Context Memory",description:"Conversation memory for agents - stores and retrieves chat history",icon:Dt[wt.MEMORY],color:Ct[wt.MEMORY],category:"agent",defaultConfig:{cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Memory Config"}]}},{type:wt.CONTEXT_MEMORY,name:"Context Memory (RAG)",description:"RAG-enhanced conversation memory with buffer, semantic, or hybrid modes",icon:Dt[wt.CONTEXT_MEMORY],color:Ct[wt.CONTEXT_MEMORY],category:"agent",defaultConfig:{memoryType:"hybrid",cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Memory Config"}]}},{type:wt.PROMPT,name:"Prompt",description:"Prompt template for LLM",icon:Dt[wt.PROMPT],color:Ct[wt.PROMPT],category:"agent",defaultConfig:{template:"",variables:[]},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Prompt"}]}},{type:wt.LLM,name:"LLM",description:"Large Language Model call",icon:Dt[wt.LLM],color:Ct[wt.LLM],category:"agent",defaultConfig:{provider:"openai",modelName:"gpt-4",temperature:.7,maxTokens:2048},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"}]}},{type:wt.RETRIEVER,name:"Retriever",description:"Retrieve relevant documents from vector store",icon:Dt[wt.RETRIEVER],color:Ct[wt.RETRIEVER],category:"agent",defaultConfig:{vectorStoreId:"",topK:5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Query"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Documents"}]}},{type:wt.CHAIN,name:"Chain",description:"Chain multiple LLM calls together",icon:Dt[wt.CHAIN],color:Ct[wt.CHAIN],category:"agent",defaultConfig:{chainType:"sequential"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:wt.ROUTER,name:"Router",description:"Route to different chains based on input",icon:Dt[wt.ROUTER],color:Ct[wt.ROUTER],category:"agent",defaultConfig:{routingExpression:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"route1",type:Tt.OUTPUT,label:"Route 1"},{id:"route2",type:Tt.OUTPUT,label:"Route 2"},{id:"default",type:Tt.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:wt.HUMAN_INPUT,name:"Human Input",description:"Wait for human input in the workflow",icon:Dt[wt.HUMAN_INPUT],color:Ct[wt.HUMAN_INPUT],category:"agent",defaultConfig:{prompt:"",timeout:864e5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Context"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"}]}},{type:wt.OUTPUT_PARSER,name:"Output Parser",description:"Parse LLM output into structured data",icon:Dt[wt.OUTPUT_PARSER],color:Ct[wt.OUTPUT_PARSER],category:"agent",defaultConfig:{parserType:"json",schema:{}},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Raw Output"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Parsed Data"}]}},{type:wt.STRUCTURED_OUTPUT,name:"Structured Output",description:"Define a JSON schema to enforce structured LLM output",icon:Dt[wt.STRUCTURED_OUTPUT],color:Ct[wt.STRUCTURED_OUTPUT],category:"agent",defaultConfig:{schemaName:"structured_output",strict:!0,schema:{type:"object",properties:{},required:[],additionalProperties:!1}},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Schema"}]}},{type:kt.TABLE,name:"Table",description:"Define a database table with columns",icon:Dt[kt.TABLE],color:Ct[kt.TABLE],category:"db-tables-views",defaultConfig:{tableName:"",columns:[],primaryKey:""},defaultPorts:{inputs:[],outputs:[{id:"ref",type:Tt.OUTPUT,label:"Reference"}]}},{type:kt.VIEW,name:"View",description:"Create a database view based on queries",icon:Dt[kt.VIEW],color:Ct[kt.VIEW],category:"db-tables-views",defaultConfig:{viewName:"",query:"",materialized:!1},defaultPorts:{inputs:[{id:"source",type:Tt.INPUT,label:"Source Tables"}],outputs:[{id:"ref",type:Tt.OUTPUT,label:"Reference"}]}},{type:kt.INDEX,name:"Index",description:"Create an index on table columns",icon:Dt[kt.INDEX],color:Ct[kt.INDEX],category:"db-indexes-queries",defaultConfig:{indexName:"",indexColumns:[],unique:!1,indexType:"BTREE"},defaultPorts:{inputs:[{id:"table",type:Tt.INPUT,label:"Table"}],outputs:[]}},{type:kt.RELATIONSHIP,name:"Relationship",description:"Define foreign key relationships between tables",icon:Dt[kt.RELATIONSHIP],color:Ct[kt.RELATIONSHIP],category:"db-relations-constraints",defaultConfig:{relationshipType:"ONE_TO_MANY",sourceColumn:"",targetColumn:"",onDelete:"CASCADE",onUpdate:"CASCADE"},defaultPorts:{inputs:[{id:"source",type:Tt.INPUT,label:"Source Table"},{id:"target",type:Tt.INPUT,label:"Target Table"}],outputs:[]}},{type:kt.CONSTRAINT,name:"Constraint",description:"Add constraints (unique, check, foreign_key)",icon:Dt[kt.CONSTRAINT],color:Ct[kt.CONSTRAINT],category:"db-relations-constraints",defaultConfig:{constraintName:"",constraintType:"UNIQUE",constraintColumns:[],checkExpression:""},defaultPorts:{inputs:[{id:"table",type:Tt.INPUT,label:"Table"}],outputs:[]}},{type:kt.QUERY,name:"Query",description:"Define saved queries or stored procedures",icon:Dt[kt.QUERY],color:Ct[kt.QUERY],category:"db-indexes-queries",defaultConfig:{queryName:"",queryText:"",parameters:[]},defaultPorts:{inputs:[{id:"tables",type:Tt.INPUT,label:"Tables"}],outputs:[{id:"result",type:Tt.OUTPUT,label:"Result Schema"}]}},{type:$t.STICKY_NOTE,name:"Sticky Note",description:"Add a sticky note to the whiteboard",icon:Dt[$t.STICKY_NOTE],color:Ct[$t.STICKY_NOTE],category:"wb-notes-text",defaultConfig:{textContent:"",backgroundColor:"#fef08a",textColor:"#713f12",fontSize:14,width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.TEXT_BLOCK,name:"Text Block",description:"Add a text block to the whiteboard",icon:Dt[$t.TEXT_BLOCK],color:Ct[$t.TEXT_BLOCK],category:"wb-notes-text",defaultConfig:{textContent:"",fontSize:16,fontWeight:"normal",textAlign:"left",width:200,height:50},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_RECTANGLE,name:"Rectangle",description:"Add a rectangle shape",icon:Dt[$t.SHAPE_RECTANGLE],color:Ct[$t.SHAPE_RECTANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#3b82f6"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_CIRCLE,name:"Circle",description:"Add a circle shape",icon:Dt[$t.SHAPE_CIRCLE],color:Ct[$t.SHAPE_CIRCLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#8b5cf6"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_DIAMOND,name:"Diamond",description:"Add a diamond shape",icon:Dt[$t.SHAPE_DIAMOND],color:Ct[$t.SHAPE_DIAMOND],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f59e0b"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_TRIANGLE,name:"Triangle",description:"Add a triangle shape",icon:Dt[$t.SHAPE_TRIANGLE],color:Ct[$t.SHAPE_TRIANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#22c55e"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_ARROW,name:"Arrow",description:"Add an arrow shape",icon:Dt[$t.SHAPE_ARROW],color:Ct[$t.SHAPE_ARROW],category:"wb-shapes",defaultConfig:{width:120,height:60,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_LINE,name:"Line",description:"Add a line shape",icon:Dt[$t.SHAPE_LINE],color:Ct[$t.SHAPE_LINE],category:"wb-shapes",defaultConfig:{width:120,height:4,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_STAR,name:"Star",description:"Add a star shape",icon:Dt[$t.SHAPE_STAR],color:Ct[$t.SHAPE_STAR],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f97316"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_HEXAGON,name:"Hexagon",description:"Add a hexagon shape",icon:Dt[$t.SHAPE_HEXAGON],color:Ct[$t.SHAPE_HEXAGON],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#ec4899"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.IMAGE,name:"Image",description:"Add an image to the whiteboard",icon:Dt[$t.IMAGE],color:Ct[$t.IMAGE],category:"wb-media",defaultConfig:{imageUrl:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.DRAWING,name:"Drawing",description:"Add a freehand drawing area",icon:Dt[$t.DRAWING],color:Ct[$t.DRAWING],category:"wb-media",defaultConfig:{pathData:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.VOTING,name:"Voting",description:"Add a voting element for collaboration",icon:Dt[$t.VOTING],color:Ct[$t.VOTING],category:"wb-media",defaultConfig:{textContent:"Vote",width:200,height:150},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.MERMAID,name:"Mermaid Diagram",description:"Add a Mermaid diagram to the whiteboard",icon:Dt[$t.MERMAID],color:Ct[$t.MERMAID],category:"wb-media",defaultConfig:{textContent:"graph TD\n A[Start] --\x3e B[End]",width:400,height:300},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.ANCHOR,name:"Anchor",description:"Navigation anchor — other elements can link here",icon:Dt[$t.ANCHOR],color:Ct[$t.ANCHOR],category:"wb-navigation",defaultConfig:{anchorLabel:"Anchor",width:120,height:48},defaultPorts:{inputs:[],outputs:[]}},{type:$t.FRAME,name:"Frame",description:"Group whiteboard elements together",icon:Dt[$t.FRAME],color:Ct[$t.FRAME],category:"wb-layout",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:$t.WORKFLOW,name:"Workflow",description:"Embed a workflow on the whiteboard",icon:Dt[$t.WORKFLOW],color:Ct[$t.WORKFLOW],category:"wb-media",defaultConfig:{workflowId:"",workflowName:"Workflow",workflowSteps:[],width:280,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.DATABASE,name:"Database Table",description:"Embed a database table on the whiteboard",icon:Dt[$t.DATABASE],color:Ct[$t.DATABASE],category:"wb-media",defaultConfig:{dbTableId:"",dbTableName:"Table",dbTableColumns:[],dbPrimaryKey:"",width:280,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}}],Et=[{id:"trigger",name:"Triggers",icon:"zap",nodeTypes:[xt.START,xt.HTTP_START,xt.CHAT_START,xt.CRON,xt.TELEGRAM_BOT,xt.SLACK_SOCKET,xt.DISCORD_BOT,xt.WHATSAPP_WEBHOOK,xt.CUSTOM_WEBSOCKET,xt.MCP,xt.CALENDLY_TRIGGER],canvasType:Mt.WORKFLOW},{id:"control",name:"Control Flow",icon:"git-branch",nodeTypes:[xt.END,xt.HTTP_END,xt.CONDITION,xt.SWITCH,xt.DELAY,xt.WAIT,xt.PARALLEL,xt.MERGE,xt.LOOP,xt.BREAK,xt.TRY_CATCH],canvasType:Mt.WORKFLOW},{id:"action",name:"Actions",icon:"zap",nodeTypes:[xt.FUNCTION,xt.HTTP,xt.INFORMATION_EXTRACTOR,xt.OCR,xt.CHAT_OUTPUT,xt.SOCIAL_POST,xt.SUB_WORKFLOW,xt.EMAIL,xt.EMAIL_READER,xt.SENDGRID,xt.NOTIFICATION,xt.DOCUMENT_GENERATOR,xt.SUMMARIZATION],canvasType:Mt.WORKFLOW},{id:"data",name:"Data",icon:"database",nodeTypes:[xt.TRANSFORM,xt.DATABASE,xt.ELASTICSEARCH,xt.VARIABLE,xt.DEBUG],canvasType:Mt.WORKFLOW},{id:"web",name:"Web",icon:"globe",nodeTypes:[xt.WEB_SEARCH,xt.WEB_CRAWL],canvasType:Mt.WORKFLOW},{id:"storage",name:"Storage",icon:"hard-drive",nodeTypes:[xt.FILE_STORAGE,xt.GOOGLE_CLOUD_STORAGE,xt.S3],canvasType:Mt.WORKFLOW},{id:"messaging",name:"Messaging",icon:"inbox",nodeTypes:[xt.RABBITMQ_TRIGGER,xt.KAFKA,xt.KAFKA_TRIGGER],canvasType:Mt.WORKFLOW},{id:"rag",name:"RAG",icon:"layers",nodeTypes:[xt.DOCUMENT_LOADER,xt.TEXT_SPLITTER,xt.EMBEDDING,xt.VECTOR_WRITE,xt.VECTOR_SEARCH,xt.CONTEXT_BUILDER,xt.RERANKER],canvasType:Mt.WORKFLOW},{id:"safety",name:"Safety",icon:"shield",nodeTypes:[xt.GUARDRAIL],canvasType:Mt.WORKFLOW},{id:"display",name:"Display",icon:"monitor",nodeTypes:[xt.UI_TABLE],canvasType:Mt.WORKFLOW},{id:"google-calendar",name:"Google Calendar",icon:"calendar",nodeTypes:[xt.GOOGLE_CALENDAR],canvasType:Mt.WORKFLOW},{id:"shopify",name:"Shopify",icon:"shopping-cart",nodeTypes:[xt.SHOPIFY],canvasType:Mt.WORKFLOW},{id:"twilio",name:"Twilio",icon:"phone",nodeTypes:[xt.TWILIO_SMS,xt.TWILIO_VOICE],canvasType:Mt.WORKFLOW},{id:"telegram",name:"Telegram",icon:"send",nodeTypes:[xt.TELEGRAM_SEND],canvasType:Mt.WORKFLOW},{id:"zendesk",name:"Zendesk",icon:"ticket",nodeTypes:[xt.ZENDESK],canvasType:Mt.WORKFLOW},{id:"slack",name:"Slack",icon:"message-square",nodeTypes:[xt.SLACK_SEND_MESSAGE,xt.SLACK_GET_CHANNEL_INFO,xt.SLACK_LIST_CHANNELS,xt.SLACK_ADD_REACTION,xt.SLACK_UPLOAD_FILE],canvasType:Mt.WORKFLOW},{id:"crm",name:"CRM",icon:"users",nodeTypes:[xt.HUBSPOT],canvasType:Mt.WORKFLOW},{id:"jira",name:"Jira",icon:"ticket",nodeTypes:[xt.JIRA],canvasType:Mt.WORKFLOW},{id:"gitlab",name:"GitLab",icon:"git-merge",nodeTypes:[xt.GITLAB],canvasType:Mt.WORKFLOW},{id:"annotation",name:"Annotations",icon:"message-square",nodeTypes:[xt.NOTE,xt.FRAME],canvasType:Mt.WORKFLOW},{id:"agent",name:"AI Agents",icon:"cpu",nodeTypes:[wt.AGENT,wt.LLM,wt.PROMPT,wt.MEMORY,wt.CONTEXT_MEMORY,wt.TOOL,wt.RETRIEVER,wt.CHAIN,wt.ROUTER,wt.HUMAN_INPUT,wt.OUTPUT_PARSER,wt.STRUCTURED_OUTPUT],canvasType:Mt.WORKFLOW},{id:"db-tables-views",name:"Tables & Views",icon:"table",nodeTypes:[kt.TABLE,kt.VIEW],canvasType:Mt.DATABASE},{id:"db-relations-constraints",name:"Relations & Constraints",icon:"git-merge",nodeTypes:[kt.RELATIONSHIP,kt.CONSTRAINT],canvasType:Mt.DATABASE},{id:"db-indexes-queries",name:"Indexes & Queries",icon:"list",nodeTypes:[kt.INDEX,kt.QUERY],canvasType:Mt.DATABASE},{id:"wb-notes-text",name:"Notes & Text",icon:"sticky-note",nodeTypes:[$t.STICKY_NOTE,$t.TEXT_BLOCK],canvasType:Mt.WHITEBOARD},{id:"wb-shapes",name:"Shapes",icon:"square",nodeTypes:[$t.SHAPE_RECTANGLE,$t.SHAPE_CIRCLE,$t.SHAPE_DIAMOND,$t.SHAPE_TRIANGLE,$t.SHAPE_ARROW,$t.SHAPE_LINE,$t.SHAPE_STAR,$t.SHAPE_HEXAGON],canvasType:Mt.WHITEBOARD},{id:"wb-media",name:"Media & Interactive",icon:"image",nodeTypes:[$t.IMAGE,$t.DRAWING,$t.VOTING,$t.MERMAID],canvasType:Mt.WHITEBOARD},{id:"wb-navigation",name:"Navigation",icon:"anchor",nodeTypes:[$t.ANCHOR],canvasType:Mt.WHITEBOARD},{id:"wb-layout",name:"Layout",icon:"frame",nodeTypes:[$t.FRAME],canvasType:Mt.WHITEBOARD}];function At(e){return zt.find(t=>t.type===e)}function Ot(e){return Object.values(wt).includes(e)}function It(e){return Object.values(xt).includes(e)}function jt(e){return Object.values(kt).includes(e)}function Pt(e){return Object.values($t).includes(e)}function Nt(e){return Et.filter(t=>t.canvasType===e)}function Ht(e,t,i){var n;const s=At(e);return s?{id:i||"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),name:s.name,type:s.type,position:t,configuration:Object.assign({},s.defaultConfig),ports:{inputs:s.defaultPorts.inputs.map(e=>Object.assign({},e)),configs:null===(n=s.defaultPorts.configs)||void 0===n?void 0:n.map(e=>Object.assign({},e)),outputs:s.defaultPorts.outputs.map(e=>Object.assign({},e))},metadata:{icon:s.icon,color:s.color,description:s.description},status:Lt.IDLE,selected:!1}:null}const Rt=[{name:"Yellow",bg:"#fef08a",text:"#713f12"},{name:"Blue",bg:"#bfdbfe",text:"#1e3a5f"},{name:"Green",bg:"#bbf7d0",text:"#14532d"},{name:"Pink",bg:"#fbcfe8",text:"#831843"},{name:"Orange",bg:"#fed7aa",text:"#7c2d12"},{name:"Purple",bg:"#ddd6fe",text:"#4c1d95"},{name:"Gray",bg:"#e5e7eb",text:"#374151"}],Ft=[{name:"Indigo",bg:"rgba(99, 102, 241, 0.05)",border:"rgba(99, 102, 241, 0.3)",solid:"#6366f1"},{name:"Blue",bg:"rgba(59, 130, 246, 0.05)",border:"rgba(59, 130, 246, 0.3)",solid:"#3b82f6"},{name:"Green",bg:"rgba(34, 197, 94, 0.05)",border:"rgba(34, 197, 94, 0.3)",solid:"#22c55e"},{name:"Orange",bg:"rgba(249, 115, 22, 0.05)",border:"rgba(249, 115, 22, 0.3)",solid:"#f97316"},{name:"Red",bg:"rgba(239, 68, 68, 0.05)",border:"rgba(239, 68, 68, 0.3)",solid:"#ef4444"},{name:"Purple",bg:"rgba(168, 85, 247, 0.05)",border:"rgba(168, 85, 247, 0.3)",solid:"#a855f7"},{name:"Gray",bg:"rgba(107, 114, 128, 0.05)",border:"rgba(107, 114, 128, 0.3)",solid:"#6b7280"}];function Bt(e){return e===xt.NOTE||e===xt.FRAME}function Ut(e){return e===xt.FRAME}function Vt(e){return e===xt.NOTE}const qt=new Set([xt.TELEGRAM_BOT,xt.SLACK_SOCKET,xt.DISCORD_BOT,xt.WHATSAPP_WEBHOOK,xt.CUSTOM_WEBSOCKET,xt.RABBITMQ_TRIGGER,xt.CALENDLY_TRIGGER,xt.KAFKA_TRIGGER,xt.CRON]);function Wt(e){return qt.has(e)}
|
|
1269
|
+
*/var xt,wt,kt,$t,Mt,St,Lt,Tt,Yt;!function(e){e.START="START",e.END="END",e.HTTP_START="HTTP_START",e.HTTP_END="HTTP_END",e.CHAT_START="CHAT_START",e.CHAT_OUTPUT="CHAT_OUTPUT",e.SOCIAL_POST="SOCIAL_POST",e.FUNCTION="FUNCTION",e.HTTP="HTTP",e.CONDITION="CONDITION",e.SWITCH="SWITCH",e.DELAY="DELAY",e.PARALLEL="PARALLEL",e.MERGE="MERGE",e.LOOP="LOOP",e.BREAK="BREAK",e.WAIT="WAIT",e.TRY_CATCH="TRY_CATCH",e.TRANSFORM="TRANSFORM",e.SUB_WORKFLOW="SUB_WORKFLOW",e.EMAIL="EMAIL",e.EMAIL_READER="EMAIL_READER",e.SENDGRID="SENDGRID",e.NOTIFICATION="NOTIFICATION",e.DATABASE="DATABASE",e.VARIABLE="VARIABLE",e.CHATBOT="CHATBOT",e.DEBUG="DEBUG",e.LLM="LLM",e.OCR="OCR",e.WEB_SEARCH="WEB_SEARCH",e.WEB_CRAWL="WEB_CRAWL",e.DOCUMENT_GENERATOR="DOCUMENT_GENERATOR",e.FILE_STORAGE="FILE_STORAGE",e.GOOGLE_CLOUD_STORAGE="GOOGLE_CLOUD_STORAGE",e.S3="S3",e.EMBEDDING="EMBEDDING",e.DOCUMENT_LOADER="DOCUMENT_LOADER",e.TEXT_SPLITTER="TEXT_SPLITTER",e.VECTOR_WRITE="VECTOR_WRITE",e.VECTOR_SEARCH="VECTOR_SEARCH",e.CONTEXT_BUILDER="CONTEXT_BUILDER",e.SUMMARIZATION="SUMMARIZATION",e.GUARDRAIL="GUARDRAIL",e.SLACK_SEND_MESSAGE="SLACK_SEND_MESSAGE",e.SLACK_GET_CHANNEL_INFO="SLACK_GET_CHANNEL_INFO",e.SLACK_LIST_CHANNELS="SLACK_LIST_CHANNELS",e.SLACK_ADD_REACTION="SLACK_ADD_REACTION",e.SLACK_UPLOAD_FILE="SLACK_UPLOAD_FILE",e.RERANKER="RERANKER",e.SHOPIFY="SHOPIFY",e.TELEGRAM_SEND="TELEGRAM_SEND",e.TWILIO_SMS="TWILIO_SMS",e.TWILIO_VOICE="TWILIO_VOICE",e.TELEGRAM_BOT="TELEGRAM_BOT",e.SLACK_SOCKET="SLACK_SOCKET",e.DISCORD_BOT="DISCORD_BOT",e.WHATSAPP_WEBHOOK="WHATSAPP_WEBHOOK",e.CUSTOM_WEBSOCKET="CUSTOM_WEBSOCKET",e.GOOGLE_CALENDAR="GOOGLE_CALENDAR",e.RABBITMQ_TRIGGER="RABBITMQ_TRIGGER",e.KAFKA="KAFKA",e.KAFKA_TRIGGER="KAFKA_TRIGGER",e.ZENDESK="ZENDESK",e.GITLAB="GITLAB",e.MCP="MCP",e.INFORMATION_EXTRACTOR="INFORMATION_EXTRACTOR",e.HUBSPOT="HUBSPOT",e.JIRA="JIRA",e.ELASTICSEARCH="ELASTICSEARCH",e.CALENDLY_TRIGGER="CALENDLY_TRIGGER",e.UI_TABLE="UI_TABLE",e.NOTE="NOTE",e.FRAME="FRAME",e.CRON="CRON"}(xt||(xt={})),function(e){e.AGENT="AGENT",e.TOOL="TOOL",e.MEMORY="MEMORY",e.CONTEXT_MEMORY="CONTEXT_MEMORY",e.PROMPT="PROMPT",e.LLM="AGENT_LLM",e.RETRIEVER="RETRIEVER",e.CHAIN="CHAIN",e.ROUTER="ROUTER",e.HUMAN_INPUT="HUMAN_INPUT",e.OUTPUT_PARSER="OUTPUT_PARSER",e.STRUCTURED_OUTPUT="STRUCTURED_OUTPUT"}(wt||(wt={})),function(e){e.TABLE="DB_TABLE",e.VIEW="DB_VIEW",e.INDEX="DB_INDEX",e.RELATIONSHIP="DB_RELATIONSHIP",e.CONSTRAINT="DB_CONSTRAINT",e.QUERY="DB_QUERY"}(kt||(kt={})),function(e){e.STICKY_NOTE="WB_STICKY_NOTE",e.SHAPE_RECTANGLE="WB_SHAPE_RECTANGLE",e.SHAPE_CIRCLE="WB_SHAPE_CIRCLE",e.SHAPE_DIAMOND="WB_SHAPE_DIAMOND",e.SHAPE_TRIANGLE="WB_SHAPE_TRIANGLE",e.SHAPE_ARROW="WB_SHAPE_ARROW",e.SHAPE_LINE="WB_SHAPE_LINE",e.SHAPE_STAR="WB_SHAPE_STAR",e.SHAPE_HEXAGON="WB_SHAPE_HEXAGON",e.TEXT_BLOCK="WB_TEXT_BLOCK",e.IMAGE="WB_IMAGE",e.DRAWING="WB_DRAWING",e.FRAME="WB_FRAME",e.VOTING="WB_VOTING",e.MERMAID="WB_MERMAID",e.ANCHOR="WB_ANCHOR",e.WORKFLOW="WB_WORKFLOW",e.DATABASE="WB_DATABASE"}($t||($t={})),function(e){e.WORKFLOW="WORKFLOW",e.DATABASE="DATABASE",e.WHITEBOARD="WHITEBOARD"}(Mt||(Mt={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.PAUSED="PAUSED",e.HANDOFF_PENDING="HANDOFF_PENDING",e.ERROR="ERROR"}(St||(St={})),function(e){e.IDLE="IDLE",e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.PAUSED="PAUSED",e.WAITING="WAITING"}(Lt||(Lt={})),function(e){e.INPUT="INPUT",e.OUTPUT="OUTPUT",e.CONFIG="CONFIG",e.CONDITIONAL_TRUE="CONDITIONAL_TRUE",e.CONDITIONAL_FALSE="CONDITIONAL_FALSE",e.CONDITIONAL_DEFAULT="CONDITIONAL_DEFAULT",e.LOOP_ITEM="LOOP_ITEM",e.LOOP_DONE="LOOP_DONE",e.PARALLEL_BRANCH="PARALLEL_BRANCH",e.ERROR="ERROR"}(Tt||(Tt={})),function(e){e.SELECT="SELECT",e.PAN="PAN",e.CONNECT="CONNECT",e.ADD_NODE="ADD_NODE"}(Yt||(Yt={}));const Ct={[xt.START]:"#22c55e",[xt.END]:"#ef4444",[xt.HTTP_START]:"#059669",[xt.HTTP_END]:"#dc2626",[xt.CHAT_START]:"#0ea5e9",[xt.CHAT_OUTPUT]:"#06b6d4",[xt.SOCIAL_POST]:"#7c3aed",[xt.FUNCTION]:"#3b82f6",[xt.HTTP]:"#8b5cf6",[xt.CONDITION]:"#f59e0b",[xt.SWITCH]:"#eab308",[xt.DELAY]:"#6b7280",[xt.PARALLEL]:"#06b6d4",[xt.MERGE]:"#0891b2",[xt.LOOP]:"#ec4899",[xt.BREAK]:"#991b1b",[xt.WAIT]:"#a78bfa",[xt.TRY_CATCH]:"#f43f5e",[xt.TRANSFORM]:"#14b8a6",[xt.SUB_WORKFLOW]:"#6366f1",[xt.EMAIL]:"#f97316",[xt.EMAIL_READER]:"#06b6d4",[xt.SENDGRID]:"#1A82E2",[xt.NOTIFICATION]:"#84cc16",[xt.DATABASE]:"#a855f7",[xt.VARIABLE]:"#64748b",[xt.CHATBOT]:"#0ea5e9",[xt.DEBUG]:"#f97316",[xt.LLM]:"#22d3ee",[xt.OCR]:"#0d9488",[xt.INFORMATION_EXTRACTOR]:"#8B5CF6",[xt.WEB_SEARCH]:"#3b82f6",[xt.WEB_CRAWL]:"#6366f1",[xt.DOCUMENT_GENERATOR]:"#0284c7",[xt.FILE_STORAGE]:"#f59e0b",[xt.GOOGLE_CLOUD_STORAGE]:"#4285f4",[xt.S3]:"#FF9900",[xt.EMBEDDING]:"#8b5cf6",[xt.DOCUMENT_LOADER]:"#ec4899",[xt.TEXT_SPLITTER]:"#14b8a6",[xt.VECTOR_WRITE]:"#10b981",[xt.VECTOR_SEARCH]:"#06b6d4",[xt.CONTEXT_BUILDER]:"#a855f7",[xt.SUMMARIZATION]:"#8B5CF6",[xt.GUARDRAIL]:"#ef4444",[xt.SLACK_SEND_MESSAGE]:"#4A154B",[xt.SLACK_GET_CHANNEL_INFO]:"#4A154B",[xt.SLACK_LIST_CHANNELS]:"#4A154B",[xt.SLACK_ADD_REACTION]:"#4A154B",[xt.SLACK_UPLOAD_FILE]:"#4A154B",[xt.RERANKER]:"#d946ef",[xt.SHOPIFY]:"#96bf48",[xt.TELEGRAM_SEND]:"#0088cc",[xt.TWILIO_SMS]:"#F22F46",[xt.TWILIO_VOICE]:"#F22F46",[xt.TELEGRAM_BOT]:"#0088cc",[xt.SLACK_SOCKET]:"#4A154B",[xt.DISCORD_BOT]:"#5865F2",[xt.WHATSAPP_WEBHOOK]:"#25D366",[xt.CUSTOM_WEBSOCKET]:"#6366f1",[xt.GOOGLE_CALENDAR]:"#4285F4",[xt.RABBITMQ_TRIGGER]:"#FF6600",[xt.KAFKA]:"#231F20",[xt.KAFKA_TRIGGER]:"#231F20",[xt.ZENDESK]:"#03363d",[xt.GITLAB]:"#FC6D26",[xt.MCP]:"#7c3aed",[xt.HUBSPOT]:"#FF7A59",[xt.JIRA]:"#0052CC",[xt.ELASTICSEARCH]:"#00bfb3",[xt.CALENDLY_TRIGGER]:"#006BFF",[xt.UI_TABLE]:"#0891b2",[xt.NOTE]:"#fef08a",[xt.FRAME]:"#6366f1",[xt.CRON]:"#d97706",[wt.AGENT]:"#10b981",[wt.TOOL]:"#0ea5e9",[wt.MEMORY]:"#d946ef",[wt.CONTEXT_MEMORY]:"#c026d3",[wt.PROMPT]:"#f472b6",[wt.LLM]:"#22d3ee",[wt.RETRIEVER]:"#a78bfa",[wt.CHAIN]:"#fbbf24",[wt.ROUTER]:"#fb923c",[wt.HUMAN_INPUT]:"#4ade80",[wt.OUTPUT_PARSER]:"#2dd4bf",[wt.STRUCTURED_OUTPUT]:"#f59e0b",[kt.TABLE]:"#64748b",[kt.VIEW]:"#a855f7",[kt.INDEX]:"#f59e0b",[kt.RELATIONSHIP]:"#ec4899",[kt.CONSTRAINT]:"#ef4444",[kt.QUERY]:"#06b6d4",[$t.STICKY_NOTE]:"#fef08a",[$t.SHAPE_RECTANGLE]:"#3b82f6",[$t.SHAPE_CIRCLE]:"#8b5cf6",[$t.SHAPE_DIAMOND]:"#f59e0b",[$t.SHAPE_TRIANGLE]:"#22c55e",[$t.SHAPE_ARROW]:"#6b7280",[$t.SHAPE_LINE]:"#6b7280",[$t.SHAPE_STAR]:"#f97316",[$t.SHAPE_HEXAGON]:"#ec4899",[$t.TEXT_BLOCK]:"#111827",[$t.IMAGE]:"#06b6d4",[$t.DRAWING]:"#14b8a6",[$t.FRAME]:"#6366f1",[$t.VOTING]:"#ef4444",[$t.MERMAID]:"#8b5cf6",[$t.ANCHOR]:"#f59e0b",[$t.WORKFLOW]:"#6366f1",[$t.DATABASE]:"#64748b"},Dt={[xt.START]:"play",[xt.END]:"stop",[xt.HTTP_START]:"download",[xt.HTTP_END]:"upload",[xt.CHAT_START]:"message-circle",[xt.CHAT_OUTPUT]:"message-square",[xt.SOCIAL_POST]:"send",[xt.FUNCTION]:"code",[xt.HTTP]:"globe",[xt.CONDITION]:"git-branch",[xt.SWITCH]:"git-fork",[xt.DELAY]:"clock",[xt.PARALLEL]:"git-merge",[xt.MERGE]:"merge",[xt.LOOP]:"repeat",[xt.BREAK]:"circle-stop",[xt.WAIT]:"hourglass",[xt.TRY_CATCH]:"shield-alert",[xt.TRANSFORM]:"shuffle",[xt.SUB_WORKFLOW]:"layers",[xt.EMAIL]:"mail",[xt.EMAIL_READER]:"mail-open",[xt.SENDGRID]:"send",[xt.NOTIFICATION]:"bell",[xt.DATABASE]:"database",[xt.VARIABLE]:"box",[xt.CHATBOT]:"message-circle",[xt.DEBUG]:"bug",[xt.LLM]:"brain",[xt.OCR]:"scan",[xt.INFORMATION_EXTRACTOR]:"search",[xt.WEB_SEARCH]:"search",[xt.WEB_CRAWL]:"globe",[xt.DOCUMENT_GENERATOR]:"file-text",[xt.FILE_STORAGE]:"hard-drive",[xt.GOOGLE_CLOUD_STORAGE]:"cloud",[xt.S3]:"cloud",[xt.EMBEDDING]:"hash",[xt.DOCUMENT_LOADER]:"file-text",[xt.TEXT_SPLITTER]:"scissors",[xt.VECTOR_WRITE]:"database",[xt.VECTOR_SEARCH]:"search",[xt.CONTEXT_BUILDER]:"layers",[xt.SUMMARIZATION]:"file-minus",[xt.GUARDRAIL]:"shield",[xt.SLACK_SEND_MESSAGE]:"message-square",[xt.SLACK_GET_CHANNEL_INFO]:"hash",[xt.SLACK_LIST_CHANNELS]:"list",[xt.SLACK_ADD_REACTION]:"smile-plus",[xt.SLACK_UPLOAD_FILE]:"upload",[xt.RERANKER]:"arrow-up-down",[xt.SHOPIFY]:"shopping-cart",[xt.TELEGRAM_SEND]:"send",[xt.TWILIO_SMS]:"message-square",[xt.TWILIO_VOICE]:"phone",[xt.TELEGRAM_BOT]:"send",[xt.SLACK_SOCKET]:"message-square",[xt.DISCORD_BOT]:"gamepad-2",[xt.WHATSAPP_WEBHOOK]:"phone",[xt.CUSTOM_WEBSOCKET]:"radio",[xt.GOOGLE_CALENDAR]:"calendar",[xt.RABBITMQ_TRIGGER]:"inbox",[xt.KAFKA]:"message-square-share",[xt.KAFKA_TRIGGER]:"radio",[xt.ZENDESK]:"ticket",[xt.GITLAB]:"git-merge",[xt.MCP]:"plug",[xt.HUBSPOT]:"users",[xt.JIRA]:"ticket",[xt.ELASTICSEARCH]:"search",[xt.CALENDLY_TRIGGER]:"calendar",[xt.UI_TABLE]:"table",[xt.NOTE]:"sticky-note",[xt.FRAME]:"square",[xt.CRON]:"timer",[wt.AGENT]:"cpu",[wt.TOOL]:"tool",[wt.MEMORY]:"hard-drive",[wt.CONTEXT_MEMORY]:"brain",[wt.PROMPT]:"message-square",[wt.LLM]:"brain",[wt.RETRIEVER]:"search",[wt.CHAIN]:"link",[wt.ROUTER]:"git-pull-request",[wt.HUMAN_INPUT]:"user",[wt.OUTPUT_PARSER]:"file-text",[wt.STRUCTURED_OUTPUT]:"braces",[kt.TABLE]:"table",[kt.VIEW]:"eye",[kt.INDEX]:"list",[kt.RELATIONSHIP]:"git-merge",[kt.CONSTRAINT]:"shield",[kt.QUERY]:"terminal",[$t.STICKY_NOTE]:"sticky-note",[$t.SHAPE_RECTANGLE]:"square",[$t.SHAPE_CIRCLE]:"circle",[$t.SHAPE_DIAMOND]:"diamond",[$t.SHAPE_TRIANGLE]:"triangle",[$t.SHAPE_ARROW]:"arrow-right",[$t.SHAPE_LINE]:"minus",[$t.SHAPE_STAR]:"star",[$t.SHAPE_HEXAGON]:"hexagon",[$t.TEXT_BLOCK]:"type",[$t.IMAGE]:"image",[$t.DRAWING]:"pen-tool",[$t.FRAME]:"frame",[$t.VOTING]:"thumbs-up",[$t.MERMAID]:"git-branch",[$t.ANCHOR]:"anchor",[$t.WORKFLOW]:"layers",[$t.DATABASE]:"table"},zt=[{type:xt.START,name:"Start",description:"Entry point of the workflow",icon:Dt[xt.START],color:Ct[xt.START],category:"control",defaultConfig:{},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.END,name:"End",description:"Exit point of the workflow",icon:Dt[xt.END],color:Ct[xt.END],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.HTTP_START,name:"HTTP Trigger",description:"Start workflow from HTTP request",icon:Dt[xt.HTTP_START],color:Ct[xt.HTTP_START],category:"trigger",defaultConfig:{httpPath:"/webhook",httpMethod:"POST",httpAuth:"none",httpAuthSecretKey:"",httpCors:!0,httpRateLimit:100,httpRequestSchema:{}},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Request"}]}},{type:xt.HTTP_END,name:"HTTP Response",description:"Return HTTP response to caller",icon:Dt[xt.HTTP_END],color:Ct[xt.HTTP_END],category:"control",defaultConfig:{httpStatusCode:200,httpResponseHeaders:{"Content-Type":"application/json"},httpResponseBody:"{{data}}",httpContentType:"application/json"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.CHAT_START,name:"Chat Trigger",description:"Start workflow from chatbot message",icon:Dt[xt.CHAT_START],color:Ct[xt.CHAT_START],category:"trigger",defaultConfig:{outputVariable:"chatInput",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"files",type:Tt.OUTPUT,label:"Files"}]}},{type:xt.CHAT_OUTPUT,name:"Chat Output",description:"Send message to chatbot during execution",icon:Dt[xt.CHAT_OUTPUT],color:Ct[xt.CHAT_OUTPUT],category:"action",defaultConfig:{message:"${variables.response}",messageType:"text",typing:!1,typingDelay:1e3},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SOCIAL_POST,name:"Social Post",description:"Post to social feed on behalf of an agent",icon:Dt[xt.SOCIAL_POST],color:Ct[xt.SOCIAL_POST],category:"action",defaultConfig:{agentId:"",content:"${variables.response}",mediaUrl:"",mediaType:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.LLM,name:"LLM",description:"Call AI language model (OpenAI, Anthropic, etc.)",icon:Dt[xt.LLM],color:Ct[xt.LLM],category:"action",defaultConfig:{provider:"openai",model:"gpt-4",temperature:.7,maxTokens:2048,systemPrompt:"",userPrompt:"${variables.message}"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"},{id:"context_memory",type:Tt.INPUT,label:"Context Memory"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.OCR,name:"OCR",description:"Extract text from images using OCR",icon:Dt[xt.OCR],color:Ct[xt.OCR],category:"action",defaultConfig:{imageSource:"variable",imageField:"${input.files[0].base64}",language:"fr",detectLayout:!1,outputVariable:"ocrResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Image"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Text"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.INFORMATION_EXTRACTOR,name:"Information Extractor",description:"Extract structured data from unstructured text using AI",icon:Dt[xt.INFORMATION_EXTRACTOR],color:Ct[xt.INFORMATION_EXTRACTOR],category:"action",defaultConfig:{inputField:"text",schema:[{name:"field1",type:"string",description:"",required:!0}],model:"gpt-4o-mini",provider:"openai",instructions:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Extracted"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.FUNCTION,name:"Function",description:"Invoke a Nuraly function",icon:Dt[xt.FUNCTION],color:Ct[xt.FUNCTION],category:"action",defaultConfig:{functionId:"",inputMapping:{},outputMapping:{}},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.HTTP,name:"HTTP Request",description:"Make an HTTP request",icon:Dt[xt.HTTP],color:Ct[xt.HTTP],category:"action",defaultConfig:{method:"GET",url:"",headers:{},timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Success"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CONDITION,name:"Condition",description:"Branch based on a condition",icon:Dt[xt.CONDITION],color:Ct[xt.CONDITION],category:"control",defaultConfig:{conditionMode:"expression",expression:"",language:"javascript"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"true",type:Tt.CONDITIONAL_TRUE,label:"True"},{id:"false",type:Tt.CONDITIONAL_FALSE,label:"False"}]}},{type:xt.DELAY,name:"Delay",description:"Wait for a specified duration",icon:Dt[xt.DELAY],color:Ct[xt.DELAY],category:"control",defaultConfig:{duration:1e3,unit:"milliseconds"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.PARALLEL,name:"Parallel",description:"Execute branches in parallel",icon:Dt[xt.PARALLEL],color:Ct[xt.PARALLEL],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"branch1",type:Tt.PARALLEL_BRANCH,label:"Branch 1"},{id:"branch2",type:Tt.PARALLEL_BRANCH,label:"Branch 2"}]}},{type:xt.LOOP,name:"Loop",description:"Iterate over an array",icon:Dt[xt.LOOP],color:Ct[xt.LOOP],category:"control",defaultConfig:{iteratorVariable:"item",arrayExpression:"",maxIterations:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"item",type:Tt.LOOP_ITEM,label:"Each Item"},{id:"done",type:Tt.LOOP_DONE,label:"Done"}]}},{type:xt.SWITCH,name:"Switch",description:"Route to a branch based on a value",icon:Dt[xt.SWITCH],color:Ct[xt.SWITCH],category:"control",defaultConfig:{expression:"",language:"javascript",cases:[{value:"case1",label:"Case 1"},{value:"case2",label:"Case 2"}],includeDefault:!0},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"case1",type:Tt.OUTPUT,label:"Case 1"},{id:"case2",type:Tt.OUTPUT,label:"Case 2"},{id:"default",type:Tt.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:xt.MERGE,name:"Merge",description:"Join multiple branches into one",icon:Dt[xt.MERGE],color:Ct[xt.MERGE],category:"control",defaultConfig:{mode:"waitAll"},defaultPorts:{inputs:[{id:"in1",type:Tt.INPUT,label:"Input 1",multiple:!0},{id:"in2",type:Tt.INPUT,label:"Input 2",multiple:!0}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.WAIT,name:"Wait",description:"Pause until a signal or event is received",icon:Dt[xt.WAIT],color:Ct[xt.WAIT],category:"control",defaultConfig:{signalName:"",timeout:3e5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Signal"},{id:"timeout",type:Tt.OUTPUT,label:"Timeout"}]}},{type:xt.TRY_CATCH,name:"Try / Catch",description:"Catch errors from the connected branch",icon:Dt[xt.TRY_CATCH],color:Ct[xt.TRY_CATCH],category:"control",defaultConfig:{catchTypes:["*"],errorVariable:"error"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"try",type:Tt.OUTPUT,label:"Try"},{id:"catch",type:Tt.ERROR,label:"Catch"}]}},{type:xt.BREAK,name:"Break",description:"Exit the enclosing loop",icon:Dt[xt.BREAK],color:Ct[xt.BREAK],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[]}},{type:xt.TRANSFORM,name:"Transform",description:"Transform data using expressions",icon:Dt[xt.TRANSFORM],color:Ct[xt.TRANSFORM],category:"data",defaultConfig:{transformExpression:"",language:"jsonata"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SUB_WORKFLOW,name:"Sub-Workflow",description:"Invoke another workflow",icon:Dt[xt.SUB_WORKFLOW],color:Ct[xt.SUB_WORKFLOW],category:"action",defaultConfig:{workflowId:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.EMAIL,name:"Email",description:"Send an email",icon:Dt[xt.EMAIL],color:Ct[xt.EMAIL],category:"action",defaultConfig:{to:"",cc:"",bcc:"",subject:"",body:"",bodyType:"text",fromName:"",replyTo:"",priority:"normal"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.EMAIL_READER,name:"Email Reader",description:"Read and manage emails from Gmail, Outlook, Yahoo, or IMAP",icon:Dt[xt.EMAIL_READER],color:Ct[xt.EMAIL_READER],category:"action",defaultConfig:{provider:"imap",operation:"LIST",folder:"INBOX",limit:10,includeAttachments:!1,markAsReadOnFetch:!1,searchQuery:"",host:"",port:993,tls:!0,credentialPath:"",sinceDate:"",beforeDate:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.SENDGRID,name:"SendGrid",description:"Send email via SendGrid API",icon:Dt[xt.SENDGRID],color:Ct[xt.SENDGRID],category:"action",defaultConfig:{to:"",cc:"",bcc:"",fromEmail:"",fromName:"",replyTo:"",subject:"",body:"",contentType:"text/html",templateId:"",dynamicTemplateData:"",categories:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.OUTPUT,label:"Error"}]}},{type:xt.NOTIFICATION,name:"Notification",description:"Send a notification",icon:Dt[xt.NOTIFICATION],color:Ct[xt.NOTIFICATION],category:"action",defaultConfig:{channel:"",message:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.DATABASE,name:"Data",description:"Read and write data to databases",icon:Dt[xt.DATABASE],color:"#6366F1",category:"data",defaultConfig:{operation:pt.QUERY,dataSource:null,entity:null,filter:null,fields:{},select:[],orderBy:[],limit:null,offset:null,outputVariable:"results"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.VARIABLE,name:"Variable",description:"Set or get a workflow variable",icon:Dt[xt.VARIABLE],color:Ct[xt.VARIABLE],category:"data",defaultConfig:{variableOperation:"set",variableName:"",value:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.CHATBOT,name:"Chatbot Trigger",description:"Trigger workflow from chatbot interactions",icon:Dt[xt.CHATBOT],color:Ct[xt.CHATBOT],category:"trigger",defaultConfig:{triggerEvents:["MESSAGE_SENT"],chatbotSize:"medium",chatbotVariant:"floating",title:"Chat Assistant",subtitle:"Ask me anything",placeholder:"Type a message...",initialMessage:"",enableTypingIndicator:!0,enableSuggestions:!1,suggestions:[],loadingType:"dots",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"message",type:Tt.OUTPUT,label:"Message"},{id:"files",type:Tt.OUTPUT,label:"Files"},{id:"session",type:Tt.OUTPUT,label:"Session Start"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DEBUG,name:"Debug",description:"Display input, output, and variables for debugging",icon:Dt[xt.DEBUG],color:Ct[xt.DEBUG],category:"data",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.UI_TABLE,name:"Table",description:"Display data as an interactive table",icon:Dt[xt.UI_TABLE],color:Ct[xt.UI_TABLE],category:"display",defaultConfig:{tableColumns:[],dataExpression:"",tablePageSize:10,tableEnableFilter:!1,tableEnableSort:!0,tableFixedHeader:!1,tableSize:"normal",tableEmptyText:"No data available"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Data"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:xt.WEB_SEARCH,name:"Web Search",description:"Search the web using Google, Bing, Brave, or DuckDuckGo",icon:Dt[xt.WEB_SEARCH],color:Ct[xt.WEB_SEARCH],category:"web",defaultConfig:{provider:"google",queryField:"query",numResults:10,safeSearch:!0,timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Results"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.WEB_CRAWL,name:"Web Crawl",description:"Crawl web pages and extract text content",icon:Dt[xt.WEB_CRAWL],color:Ct[xt.WEB_CRAWL],category:"web",defaultConfig:{urlField:"url",maxDepth:1,maxPages:10,sameDomainOnly:!0,renderJs:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Pages"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DOCUMENT_GENERATOR,name:"Document Generator",description:"Generate Word documents from templates with dynamic data",icon:Dt[xt.DOCUMENT_GENERATOR],color:Ct[xt.DOCUMENT_GENERATOR],category:"documents",defaultConfig:{templateId:"",data:{},outputVariable:"documentResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.FILE_STORAGE,name:"File Storage",description:"Store files to S3, MinIO, or local filesystem",icon:Dt[xt.FILE_STORAGE],color:Ct[xt.FILE_STORAGE],category:"storage",defaultConfig:{provider:"local",bucket:"default",path:"",fileField:"file",filenameField:"filename"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GOOGLE_CLOUD_STORAGE,name:"Google Cloud Storage",description:"Manage objects in Google Cloud Storage buckets",icon:Dt[xt.GOOGLE_CLOUD_STORAGE],color:Ct[xt.GOOGLE_CLOUD_STORAGE],category:"storage",defaultConfig:{operation:"LIST",bucketName:"",objectPath:"",serviceAccountPath:"",signedUrlExpiration:3600},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.S3,name:"AWS S3",description:"Upload, download, and manage files in Amazon S3",icon:Dt[xt.S3],color:Ct[xt.S3],category:"integrations",defaultConfig:{s3Operation:"upload",s3Bucket:"",s3Key:"",s3Region:"us-east-1",s3ContentType:"auto"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.EMBEDDING,name:"Embedding",description:"Convert text to vector embeddings",icon:Dt[xt.EMBEDDING],color:Ct[xt.EMBEDDING],category:"rag",defaultConfig:{provider:"openai",model:"text-embedding-3-small",inputField:"text",batchSize:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Text"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Embedding"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DOCUMENT_LOADER,name:"Document Loader",description:"Load and parse documents (PDF, Word, HTML, etc.)",icon:Dt[xt.DOCUMENT_LOADER],color:Ct[xt.DOCUMENT_LOADER],category:"rag",defaultConfig:{sourceType:"text",contentField:"content",filenameField:"filename",defaultType:"txt",timeout:3e4},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Document"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Content"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TEXT_SPLITTER,name:"Text Splitter",description:"Split text into chunks for embedding",icon:Dt[xt.TEXT_SPLITTER],color:Ct[xt.TEXT_SPLITTER],category:"rag",defaultConfig:{strategy:"recursive",chunkSize:1e3,chunkOverlap:200,contentField:"content"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Text"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Chunks"}]}},{type:xt.VECTOR_WRITE,name:"Vector Write",description:"Store embeddings in vector database",icon:Dt[xt.VECTOR_WRITE],color:Ct[xt.VECTOR_WRITE],category:"rag",defaultConfig:{collectionName:"",upsertMode:"replace"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Embeddings"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.VECTOR_SEARCH,name:"Vector Search",description:"Search for similar documents in vector store",icon:Dt[xt.VECTOR_SEARCH],color:Ct[xt.VECTOR_SEARCH],category:"rag",defaultConfig:{collectionName:"",topK:5,minScore:.7,includeContent:!0,includeMetadata:!0,provider:"openai",model:"text-embedding-3-small"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Query"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Results"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CONTEXT_BUILDER,name:"Context Builder",description:"Format retrieved documents into LLM-ready context",icon:Dt[xt.CONTEXT_BUILDER],color:Ct[xt.CONTEXT_BUILDER],category:"rag",defaultConfig:{template:"default",maxTokens:4e3,maxDocuments:10,includeSourceInfo:!0,includeSimilarityScore:!1,separator:"\n\n---\n\n"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Results"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Context"}]}},{type:xt.RERANKER,name:"Reranker",description:"Re-rank search results by relevance",icon:Dt[xt.RERANKER],color:Ct[xt.RERANKER],category:"rag",defaultConfig:{model:"cross-encoder",topK:5,threshold:.5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Results"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Reranked"}]}},{type:xt.SUMMARIZATION,name:"Summarize Document",description:"Summarize long text using AI with chunking strategies",icon:Dt[xt.SUMMARIZATION],color:Ct[xt.SUMMARIZATION],category:"action",defaultConfig:{inputField:"text",outputField:"summary",strategy:"map_reduce",chunkSize:4e3,chunkOverlap:200,model:"gpt-4o-mini"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Summary"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GUARDRAIL,name:"Guardrail",description:"Validate and filter LLM inputs/outputs for safety",icon:Dt[xt.GUARDRAIL],color:Ct[xt.GUARDRAIL],category:"safety",defaultConfig:{mode:"input",contentField:"content",onFail:"block",checks:[]},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Passed"},{id:"blocked",type:Tt.ERROR,label:"Blocked"}]}},{type:xt.SLACK_SEND_MESSAGE,name:"Slack: Send Message",description:"Send a message to a Slack channel or user",icon:Dt[xt.SLACK_SEND_MESSAGE],color:Ct[xt.SLACK_SEND_MESSAGE],category:"slack",defaultConfig:{slackMethod:"api",botToken:"",channel:"",text:"",unfurlLinks:!0,unfurlMedia:!0},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_GET_CHANNEL_INFO,name:"Slack: Channel Info",description:"Get information about a Slack channel",icon:Dt[xt.SLACK_GET_CHANNEL_INFO],color:Ct[xt.SLACK_GET_CHANNEL_INFO],category:"slack",defaultConfig:{botToken:"",channel:"",includeLocale:!1,includeNumMembers:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Info"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_LIST_CHANNELS,name:"Slack: List Channels",description:"List available Slack channels in the workspace",icon:Dt[xt.SLACK_LIST_CHANNELS],color:Ct[xt.SLACK_LIST_CHANNELS],category:"slack",defaultConfig:{botToken:"",types:"public_channel",excludeArchived:!0,limit:100},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Channels"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_ADD_REACTION,name:"Slack: Add Reaction",description:"Add a reaction emoji to a Slack message",icon:Dt[xt.SLACK_ADD_REACTION],color:Ct[xt.SLACK_ADD_REACTION],category:"slack",defaultConfig:{botToken:"",channel:"",timestamp:"",name:"thumbsup"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_UPLOAD_FILE,name:"Slack: Upload File",description:"Upload a file to a Slack channel",icon:Dt[xt.SLACK_UPLOAD_FILE],color:Ct[xt.SLACK_UPLOAD_FILE],category:"slack",defaultConfig:{botToken:"",channels:"",filename:"",content:"",title:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GOOGLE_CALENDAR,name:"Google Calendar",description:"Create, read, update, and delete Google Calendar events",icon:Dt[xt.GOOGLE_CALENDAR],color:Ct[xt.GOOGLE_CALENDAR],category:"google-calendar",defaultConfig:{googleCalendarCredential:"",googleCalendarId:"primary",googleCalendarOperation:"getAll",googleCalendarEventSummary:"",googleCalendarEventDescription:"",googleCalendarEventStart:"",googleCalendarEventEnd:"",googleCalendarEventAttendees:"",googleCalendarEventLocation:"",googleCalendarTimeMin:"",googleCalendarTimeMax:"",googleCalendarRecurrence:"",googleCalendarConferenceData:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SHOPIFY,name:"Shopify",description:"Manage Shopify products, orders, customers, inventory, and fulfillments via the Admin API",icon:Dt[xt.SHOPIFY],color:Ct[xt.SHOPIFY],category:"shopify",defaultConfig:{resource:"ORDER",operation:pt.LIST,resourceId:"",filters:"",shopDomain:"",accessToken:""},defaultPorts:{inputs:[{id:"input",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.GITLAB,name:"GitLab",description:"Manage GitLab repositories, issues, merge requests, pipelines, and releases",icon:Dt[xt.GITLAB],color:Ct[xt.GITLAB],category:"developer",defaultConfig:{gitlabBaseUrl:"https://gitlab.com",gitlabAccessToken:"",gitlabResource:"issue",gitlabOperation:"getAll",gitlabProjectId:"",gitlabTitle:"",gitlabDescription:"",gitlabLabels:[],gitlabAssigneeIds:[],gitlabSourceBranch:"",gitlabTargetBranch:"",gitlabRef:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TELEGRAM_SEND,name:"Telegram: Send Message",description:"Send a message to a Telegram chat with typing indicator and optional emoji reaction",icon:Dt[xt.TELEGRAM_SEND],color:Ct[xt.TELEGRAM_SEND],category:"telegram",defaultConfig:{botToken:"",chatId:"",text:"",parseMode:"",replyToMessageId:"",showTyping:!0,reaction:"",disableNotification:!1},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.ZENDESK,name:"Zendesk",description:"Manage Zendesk tickets, users, organizations, and satisfaction ratings",icon:Dt[xt.ZENDESK],color:Ct[xt.ZENDESK],category:"zendesk",defaultConfig:{zendeskResource:"TICKET",zendeskOperation:"LIST",zendeskSubdomain:"",zendeskApiToken:"",zendeskEmail:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TWILIO_SMS,name:"Twilio: Send SMS",description:"Send an SMS or WhatsApp message via the Twilio API",icon:Dt[xt.TWILIO_SMS],color:Ct[xt.TWILIO_SMS],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioMessageBody:"",twilioOperation:"send_sms",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TWILIO_VOICE,name:"Twilio: Voice Call",description:"Make a voice call via the Twilio API",icon:Dt[xt.TWILIO_VOICE],color:Ct[xt.TWILIO_VOICE],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioOperation:"make_call",twilioVoiceUrl:"",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.TELEGRAM_BOT,name:"Telegram Bot",description:"Receive messages from a Telegram bot via polling or webhook",icon:Dt[xt.TELEGRAM_BOT],color:Ct[xt.TELEGRAM_BOT],category:"trigger",defaultConfig:{botToken:"",mode:"polling",pollingTimeout:30,allowedUpdates:[],allowedChatIds:"",allowedUserIds:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.SLACK_SOCKET,name:"Slack Socket",description:"Receive events via Slack Socket Mode (WebSocket)",icon:Dt[xt.SLACK_SOCKET],color:Ct[xt.SLACK_SOCKET],category:"trigger",defaultConfig:{appTokenPath:"",botTokenPath:"",eventTypes:[],interactionTypes:[],slashCommands:"",allowedTeamIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.DISCORD_BOT,name:"Discord Bot",description:"Receive events from a Discord bot (Gateway WebSocket)",icon:Dt[xt.DISCORD_BOT],color:Ct[xt.DISCORD_BOT],category:"trigger",defaultConfig:{botTokenPath:"",intents:["GUILDS","GUILD_MESSAGES","MESSAGE_CONTENT"],eventTypes:[],allowedGuildIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.WHATSAPP_WEBHOOK,name:"WhatsApp",description:"Receive messages via WhatsApp Business API",icon:Dt[xt.WHATSAPP_WEBHOOK],color:Ct[xt.WHATSAPP_WEBHOOK],category:"trigger",defaultConfig:{phoneNumberId:"",businessAccountId:"",accessTokenPath:"",appSecretPath:"",verifyToken:"",webhookFields:["messages"],messageTypes:[],allowedSenders:"",ignoreStatusUpdates:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CUSTOM_WEBSOCKET,name:"WebSocket Listener",description:"Listen for messages on a custom WebSocket endpoint",icon:Dt[xt.CUSTOM_WEBSOCKET],color:Ct[xt.CUSTOM_WEBSOCKET],category:"trigger",defaultConfig:{url:"",subprotocol:"",authMode:"none",tokenPath:"",username:"",passwordPath:"",headerName:"",headerValuePath:"",queryParamName:"token",queryParamValuePath:"",initialMessage:"",autoReconnect:!0,reconnectDelayMs:5e3,maxReconnectAttempts:0,pingIntervalSec:30,messageFormat:"json",filterExpression:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.RABBITMQ_TRIGGER,name:"RabbitMQ Trigger",description:"Triggers workflow on new messages from a RabbitMQ queue",icon:Dt[xt.RABBITMQ_TRIGGER],color:Ct[xt.RABBITMQ_TRIGGER],category:"trigger",defaultConfig:{connectionUrl:"",queueName:"",exchange:"",routingKey:"#",autoAck:!1,contentType:"application/json",prefetchCount:1},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.KAFKA,name:"Kafka: Send Message",description:"Produce a message to a Kafka topic",icon:Dt[xt.KAFKA],color:Ct[xt.KAFKA],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaAcks:"all",kafkaCompressionType:"none"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.KAFKA_TRIGGER,name:"Kafka Trigger",description:"Triggers workflow on new messages from a Kafka topic",icon:Dt[xt.KAFKA_TRIGGER],color:Ct[xt.KAFKA_TRIGGER],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaConsumerGroup:"nuraly-workflow",kafkaFromBeginning:!1,kafkaSessionTimeout:3e4},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Message"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CRON,name:"Cron Trigger",description:"Triggers workflow on a scheduled cron expression",icon:Dt[xt.CRON],color:Ct[xt.CRON],category:"trigger",defaultConfig:{cronExpression:"0 * * * *",timezone:"UTC"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Tick"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.MCP,name:"MCP Server",description:"Connect to MCP server - provides tools to Agent/LLM nodes",icon:Dt[xt.MCP],color:Ct[xt.MCP],category:"trigger",defaultConfig:{serverUrl:"",transportType:"streamable_http"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"}]}},{type:xt.HUBSPOT,name:"HubSpot",description:"Manage contacts, deals, companies, and tickets via HubSpot CRM",icon:Dt[xt.HUBSPOT],color:Ct[xt.HUBSPOT],category:"crm",defaultConfig:{hubspotAccessToken:"",hubspotResource:"contact",hubspotOperation:"getAll",hubspotProperties:{},hubspotFilterGroups:[],hubspotLimit:100,hubspotAssociations:[]},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.JIRA,name:"Jira",description:"Create, update, and manage Jira issues",icon:Dt[xt.JIRA],color:Ct[xt.JIRA],category:"jira",defaultConfig:{operation:"createIssue",jiraInstanceUrl:"",projectKey:"",issueType:"Task",summary:"",description:"",assignee:"",priority:"Medium",labels:"",jqlQuery:"",transitionId:"",issueKey:"",comment:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.ELASTICSEARCH,name:"Elasticsearch",description:"Search, index, and manage documents in Elasticsearch",icon:Dt[xt.ELASTICSEARCH],color:Ct[xt.ELASTICSEARCH],category:"integration",defaultConfig:{elasticsearchUrl:"",elasticsearchCredentialPath:"",elasticsearchOperation:"search",elasticsearchIndex:"",elasticsearchDocumentId:"",elasticsearchQueryBody:"",elasticsearchSize:10,elasticsearchFrom:0,elasticsearchRefresh:"false",elasticsearchTimeout:"30s",elasticsearchRouting:"",outputVariable:"elasticsearchResult"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Result"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.CALENDLY_TRIGGER,name:"Calendly Trigger",description:"Triggers workflow when a Calendly event is booked or cancelled",icon:Dt[xt.CALENDLY_TRIGGER],color:Ct[xt.CALENDLY_TRIGGER],category:"trigger",defaultConfig:{events:["invitee.created"],scope:"user",outputVariable:"calendlyEvent"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Event"},{id:"error",type:Tt.ERROR,label:"Error"}]}},{type:xt.NOTE,name:"Note",description:"Add annotations and comments to your workflow",icon:Dt[xt.NOTE],color:Ct[xt.NOTE],category:"annotation",defaultConfig:{noteContent:"Add your note here...",noteBackgroundColor:"#fef08a",noteTextColor:"#713f12",noteFontSize:"medium",noteShowBorder:!1},defaultPorts:{inputs:[],outputs:[]}},{type:xt.FRAME,name:"Frame",description:"Group related nodes together with a labeled container",icon:Dt[xt.FRAME],color:Ct[xt.FRAME],category:"annotation",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:wt.AGENT,name:"AI Agent",description:"Autonomous AI agent that can use tools",icon:Dt[wt.AGENT],color:Ct[wt.AGENT],category:"agent",defaultConfig:{agentId:"",maxIterations:10},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"},{id:"retriever",type:Tt.INPUT,label:"Retriever"}],configs:[{id:"llm",type:Tt.CONFIG,label:"LLM"},{id:"prompt",type:Tt.CONFIG,label:"Prompt"},{id:"memory",type:Tt.CONFIG,label:"Memory"},{id:"tools",type:Tt.CONFIG,label:"Tools",multiple:!0},{id:"structured_output",type:Tt.CONFIG,label:"Structured Output"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:wt.TOOL,name:"Tool",description:"A tool that can be used by an agent",icon:Dt[wt.TOOL],color:Ct[wt.TOOL],category:"agent",defaultConfig:{toolName:"",description:"",parameters:[]},defaultPorts:{inputs:[{id:"function",type:Tt.INPUT,label:"Function"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Tool"}]}},{type:wt.MEMORY,name:"Context Memory",description:"Conversation memory for agents - stores and retrieves chat history",icon:Dt[wt.MEMORY],color:Ct[wt.MEMORY],category:"agent",defaultConfig:{cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Memory Config"}]}},{type:wt.CONTEXT_MEMORY,name:"Context Memory (RAG)",description:"RAG-enhanced conversation memory with buffer, semantic, or hybrid modes",icon:Dt[wt.CONTEXT_MEMORY],color:Ct[wt.CONTEXT_MEMORY],category:"agent",defaultConfig:{memoryType:"hybrid",cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Memory Config"}]}},{type:wt.PROMPT,name:"Prompt",description:"Prompt template for LLM",icon:Dt[wt.PROMPT],color:Ct[wt.PROMPT],category:"agent",defaultConfig:{template:"",variables:[]},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Prompt"}]}},{type:wt.LLM,name:"LLM",description:"Large Language Model call",icon:Dt[wt.LLM],color:Ct[wt.LLM],category:"agent",defaultConfig:{provider:"openai",modelName:"gpt-4",temperature:.7,maxTokens:2048},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"}]}},{type:wt.RETRIEVER,name:"Retriever",description:"Retrieve relevant documents from vector store",icon:Dt[wt.RETRIEVER],color:Ct[wt.RETRIEVER],category:"agent",defaultConfig:{vectorStoreId:"",topK:5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Query"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Documents"}]}},{type:wt.CHAIN,name:"Chain",description:"Chain multiple LLM calls together",icon:Dt[wt.CHAIN],color:Ct[wt.CHAIN],category:"agent",defaultConfig:{chainType:"sequential"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Output"}]}},{type:wt.ROUTER,name:"Router",description:"Route to different chains based on input",icon:Dt[wt.ROUTER],color:Ct[wt.ROUTER],category:"agent",defaultConfig:{routingExpression:""},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Input"}],outputs:[{id:"route1",type:Tt.OUTPUT,label:"Route 1"},{id:"route2",type:Tt.OUTPUT,label:"Route 2"},{id:"default",type:Tt.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:wt.HUMAN_INPUT,name:"Human Input",description:"Wait for human input in the workflow",icon:Dt[wt.HUMAN_INPUT],color:Ct[wt.HUMAN_INPUT],category:"agent",defaultConfig:{prompt:"",timeout:864e5},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Context"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Response"}]}},{type:wt.OUTPUT_PARSER,name:"Output Parser",description:"Parse LLM output into structured data",icon:Dt[wt.OUTPUT_PARSER],color:Ct[wt.OUTPUT_PARSER],category:"agent",defaultConfig:{parserType:"json",schema:{}},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"Raw Output"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Parsed Data"}]}},{type:wt.STRUCTURED_OUTPUT,name:"Structured Output",description:"Define a JSON schema to enforce structured LLM output",icon:Dt[wt.STRUCTURED_OUTPUT],color:Ct[wt.STRUCTURED_OUTPUT],category:"agent",defaultConfig:{schemaName:"structured_output",strict:!0,schema:{type:"object",properties:{},required:[],additionalProperties:!1}},defaultPorts:{inputs:[],outputs:[{id:"out",type:Tt.OUTPUT,label:"Schema"}]}},{type:kt.TABLE,name:"Table",description:"Define a database table with columns",icon:Dt[kt.TABLE],color:Ct[kt.TABLE],category:"db-tables-views",defaultConfig:{tableName:"",columns:[],primaryKey:""},defaultPorts:{inputs:[],outputs:[{id:"ref",type:Tt.OUTPUT,label:"Reference"}]}},{type:kt.VIEW,name:"View",description:"Create a database view based on queries",icon:Dt[kt.VIEW],color:Ct[kt.VIEW],category:"db-tables-views",defaultConfig:{viewName:"",query:"",materialized:!1},defaultPorts:{inputs:[{id:"source",type:Tt.INPUT,label:"Source Tables"}],outputs:[{id:"ref",type:Tt.OUTPUT,label:"Reference"}]}},{type:kt.INDEX,name:"Index",description:"Create an index on table columns",icon:Dt[kt.INDEX],color:Ct[kt.INDEX],category:"db-indexes-queries",defaultConfig:{indexName:"",indexColumns:[],unique:!1,indexType:"BTREE"},defaultPorts:{inputs:[{id:"table",type:Tt.INPUT,label:"Table"}],outputs:[]}},{type:kt.RELATIONSHIP,name:"Relationship",description:"Define foreign key relationships between tables",icon:Dt[kt.RELATIONSHIP],color:Ct[kt.RELATIONSHIP],category:"db-relations-constraints",defaultConfig:{relationshipType:"ONE_TO_MANY",sourceColumn:"",targetColumn:"",onDelete:"CASCADE",onUpdate:"CASCADE"},defaultPorts:{inputs:[{id:"source",type:Tt.INPUT,label:"Source Table"},{id:"target",type:Tt.INPUT,label:"Target Table"}],outputs:[]}},{type:kt.CONSTRAINT,name:"Constraint",description:"Add constraints (unique, check, foreign_key)",icon:Dt[kt.CONSTRAINT],color:Ct[kt.CONSTRAINT],category:"db-relations-constraints",defaultConfig:{constraintName:"",constraintType:"UNIQUE",constraintColumns:[],checkExpression:""},defaultPorts:{inputs:[{id:"table",type:Tt.INPUT,label:"Table"}],outputs:[]}},{type:kt.QUERY,name:"Query",description:"Define saved queries or stored procedures",icon:Dt[kt.QUERY],color:Ct[kt.QUERY],category:"db-indexes-queries",defaultConfig:{queryName:"",queryText:"",parameters:[]},defaultPorts:{inputs:[{id:"tables",type:Tt.INPUT,label:"Tables"}],outputs:[{id:"result",type:Tt.OUTPUT,label:"Result Schema"}]}},{type:$t.STICKY_NOTE,name:"Sticky Note",description:"Add a sticky note to the whiteboard",icon:Dt[$t.STICKY_NOTE],color:Ct[$t.STICKY_NOTE],category:"wb-notes-text",defaultConfig:{textContent:"",backgroundColor:"#fef08a",textColor:"#713f12",fontSize:14,width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.TEXT_BLOCK,name:"Text Block",description:"Add a text block to the whiteboard",icon:Dt[$t.TEXT_BLOCK],color:Ct[$t.TEXT_BLOCK],category:"wb-notes-text",defaultConfig:{textContent:"",fontSize:16,fontWeight:"normal",textAlign:"left",width:200,height:50},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_RECTANGLE,name:"Rectangle",description:"Add a rectangle shape",icon:Dt[$t.SHAPE_RECTANGLE],color:Ct[$t.SHAPE_RECTANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#3b82f6"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_CIRCLE,name:"Circle",description:"Add a circle shape",icon:Dt[$t.SHAPE_CIRCLE],color:Ct[$t.SHAPE_CIRCLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#8b5cf6"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_DIAMOND,name:"Diamond",description:"Add a diamond shape",icon:Dt[$t.SHAPE_DIAMOND],color:Ct[$t.SHAPE_DIAMOND],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f59e0b"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_TRIANGLE,name:"Triangle",description:"Add a triangle shape",icon:Dt[$t.SHAPE_TRIANGLE],color:Ct[$t.SHAPE_TRIANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#22c55e"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_ARROW,name:"Arrow",description:"Add an arrow shape",icon:Dt[$t.SHAPE_ARROW],color:Ct[$t.SHAPE_ARROW],category:"wb-shapes",defaultConfig:{width:120,height:60,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_LINE,name:"Line",description:"Add a line shape",icon:Dt[$t.SHAPE_LINE],color:Ct[$t.SHAPE_LINE],category:"wb-shapes",defaultConfig:{width:120,height:4,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_STAR,name:"Star",description:"Add a star shape",icon:Dt[$t.SHAPE_STAR],color:Ct[$t.SHAPE_STAR],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f97316"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.SHAPE_HEXAGON,name:"Hexagon",description:"Add a hexagon shape",icon:Dt[$t.SHAPE_HEXAGON],color:Ct[$t.SHAPE_HEXAGON],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#ec4899"},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.IMAGE,name:"Image",description:"Add an image to the whiteboard",icon:Dt[$t.IMAGE],color:Ct[$t.IMAGE],category:"wb-media",defaultConfig:{imageUrl:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.DRAWING,name:"Drawing",description:"Add a freehand drawing area",icon:Dt[$t.DRAWING],color:Ct[$t.DRAWING],category:"wb-media",defaultConfig:{pathData:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.VOTING,name:"Voting",description:"Add a voting element for collaboration",icon:Dt[$t.VOTING],color:Ct[$t.VOTING],category:"wb-media",defaultConfig:{textContent:"Vote",width:200,height:150},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.MERMAID,name:"Mermaid Diagram",description:"Add a Mermaid diagram to the whiteboard",icon:Dt[$t.MERMAID],color:Ct[$t.MERMAID],category:"wb-media",defaultConfig:{textContent:"graph TD\n A[Start] --\x3e B[End]",width:400,height:300},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.ANCHOR,name:"Anchor",description:"Navigation anchor — other elements can link here",icon:Dt[$t.ANCHOR],color:Ct[$t.ANCHOR],category:"wb-navigation",defaultConfig:{anchorLabel:"Anchor",width:120,height:48},defaultPorts:{inputs:[],outputs:[]}},{type:$t.FRAME,name:"Frame",description:"Group whiteboard elements together",icon:Dt[$t.FRAME],color:Ct[$t.FRAME],category:"wb-layout",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:$t.WORKFLOW,name:"Workflow",description:"Embed a workflow on the whiteboard",icon:Dt[$t.WORKFLOW],color:Ct[$t.WORKFLOW],category:"wb-media",defaultConfig:{workflowId:"",workflowName:"Workflow",workflowSteps:[],width:280,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}},{type:$t.DATABASE,name:"Database Table",description:"Embed a database table on the whiteboard",icon:Dt[$t.DATABASE],color:Ct[$t.DATABASE],category:"wb-media",defaultConfig:{dbTableId:"",dbTableName:"Table",dbTableColumns:[],dbPrimaryKey:"",width:280,height:200},defaultPorts:{inputs:[{id:"in",type:Tt.INPUT,label:"In"}],outputs:[{id:"out",type:Tt.OUTPUT,label:"Out"}]}}],Et=[{id:"trigger",name:"Triggers",icon:"zap",nodeTypes:[xt.START,xt.HTTP_START,xt.CHAT_START,xt.CRON,xt.TELEGRAM_BOT,xt.SLACK_SOCKET,xt.DISCORD_BOT,xt.WHATSAPP_WEBHOOK,xt.CUSTOM_WEBSOCKET,xt.MCP,xt.CALENDLY_TRIGGER],canvasType:Mt.WORKFLOW},{id:"control",name:"Control Flow",icon:"git-branch",nodeTypes:[xt.END,xt.HTTP_END,xt.CONDITION,xt.SWITCH,xt.DELAY,xt.WAIT,xt.PARALLEL,xt.MERGE,xt.LOOP,xt.BREAK,xt.TRY_CATCH],canvasType:Mt.WORKFLOW},{id:"action",name:"Actions",icon:"zap",nodeTypes:[xt.FUNCTION,xt.HTTP,xt.INFORMATION_EXTRACTOR,xt.OCR,xt.CHAT_OUTPUT,xt.SOCIAL_POST,xt.SUB_WORKFLOW,xt.EMAIL,xt.EMAIL_READER,xt.SENDGRID,xt.NOTIFICATION,xt.DOCUMENT_GENERATOR,xt.SUMMARIZATION],canvasType:Mt.WORKFLOW},{id:"data",name:"Data",icon:"database",nodeTypes:[xt.TRANSFORM,xt.DATABASE,xt.ELASTICSEARCH,xt.VARIABLE,xt.DEBUG],canvasType:Mt.WORKFLOW},{id:"web",name:"Web",icon:"globe",nodeTypes:[xt.WEB_SEARCH,xt.WEB_CRAWL],canvasType:Mt.WORKFLOW},{id:"storage",name:"Storage",icon:"hard-drive",nodeTypes:[xt.FILE_STORAGE,xt.GOOGLE_CLOUD_STORAGE,xt.S3],canvasType:Mt.WORKFLOW},{id:"messaging",name:"Messaging",icon:"inbox",nodeTypes:[xt.RABBITMQ_TRIGGER,xt.KAFKA,xt.KAFKA_TRIGGER],canvasType:Mt.WORKFLOW},{id:"rag",name:"RAG",icon:"layers",nodeTypes:[xt.DOCUMENT_LOADER,xt.TEXT_SPLITTER,xt.EMBEDDING,xt.VECTOR_WRITE,xt.VECTOR_SEARCH,xt.CONTEXT_BUILDER,xt.RERANKER],canvasType:Mt.WORKFLOW},{id:"safety",name:"Safety",icon:"shield",nodeTypes:[xt.GUARDRAIL],canvasType:Mt.WORKFLOW},{id:"display",name:"Display",icon:"monitor",nodeTypes:[xt.UI_TABLE],canvasType:Mt.WORKFLOW},{id:"google-calendar",name:"Google Calendar",icon:"calendar",nodeTypes:[xt.GOOGLE_CALENDAR],canvasType:Mt.WORKFLOW},{id:"shopify",name:"Shopify",icon:"shopping-cart",nodeTypes:[xt.SHOPIFY],canvasType:Mt.WORKFLOW},{id:"twilio",name:"Twilio",icon:"phone",nodeTypes:[xt.TWILIO_SMS,xt.TWILIO_VOICE],canvasType:Mt.WORKFLOW},{id:"telegram",name:"Telegram",icon:"send",nodeTypes:[xt.TELEGRAM_SEND],canvasType:Mt.WORKFLOW},{id:"zendesk",name:"Zendesk",icon:"ticket",nodeTypes:[xt.ZENDESK],canvasType:Mt.WORKFLOW},{id:"slack",name:"Slack",icon:"message-square",nodeTypes:[xt.SLACK_SEND_MESSAGE,xt.SLACK_GET_CHANNEL_INFO,xt.SLACK_LIST_CHANNELS,xt.SLACK_ADD_REACTION,xt.SLACK_UPLOAD_FILE],canvasType:Mt.WORKFLOW},{id:"crm",name:"CRM",icon:"users",nodeTypes:[xt.HUBSPOT],canvasType:Mt.WORKFLOW},{id:"jira",name:"Jira",icon:"ticket",nodeTypes:[xt.JIRA],canvasType:Mt.WORKFLOW},{id:"gitlab",name:"GitLab",icon:"git-merge",nodeTypes:[xt.GITLAB],canvasType:Mt.WORKFLOW},{id:"annotation",name:"Annotations",icon:"message-square",nodeTypes:[xt.NOTE,xt.FRAME],canvasType:Mt.WORKFLOW},{id:"agent",name:"AI Agents",icon:"cpu",nodeTypes:[wt.AGENT,wt.LLM,wt.PROMPT,wt.MEMORY,wt.CONTEXT_MEMORY,wt.TOOL,wt.RETRIEVER,wt.CHAIN,wt.ROUTER,wt.HUMAN_INPUT,wt.OUTPUT_PARSER,wt.STRUCTURED_OUTPUT],canvasType:Mt.WORKFLOW},{id:"db-tables-views",name:"Tables & Views",icon:"table",nodeTypes:[kt.TABLE,kt.VIEW],canvasType:Mt.DATABASE},{id:"db-relations-constraints",name:"Relations & Constraints",icon:"git-merge",nodeTypes:[kt.RELATIONSHIP,kt.CONSTRAINT],canvasType:Mt.DATABASE},{id:"db-indexes-queries",name:"Indexes & Queries",icon:"list",nodeTypes:[kt.INDEX,kt.QUERY],canvasType:Mt.DATABASE},{id:"wb-notes-text",name:"Notes & Text",icon:"sticky-note",nodeTypes:[$t.STICKY_NOTE,$t.TEXT_BLOCK],canvasType:Mt.WHITEBOARD},{id:"wb-shapes",name:"Shapes",icon:"square",nodeTypes:[$t.SHAPE_RECTANGLE,$t.SHAPE_CIRCLE,$t.SHAPE_DIAMOND,$t.SHAPE_TRIANGLE,$t.SHAPE_ARROW,$t.SHAPE_LINE,$t.SHAPE_STAR,$t.SHAPE_HEXAGON],canvasType:Mt.WHITEBOARD},{id:"wb-media",name:"Media & Interactive",icon:"image",nodeTypes:[$t.IMAGE,$t.DRAWING,$t.VOTING,$t.MERMAID],canvasType:Mt.WHITEBOARD},{id:"wb-navigation",name:"Navigation",icon:"anchor",nodeTypes:[$t.ANCHOR],canvasType:Mt.WHITEBOARD},{id:"wb-layout",name:"Layout",icon:"frame",nodeTypes:[$t.FRAME],canvasType:Mt.WHITEBOARD}];function At(e){return zt.find(t=>t.type===e)}function Ot(e){return Object.values(wt).includes(e)}function It(e){return Object.values(xt).includes(e)}function jt(e){return Object.values(kt).includes(e)}function Pt(e){return Object.values($t).includes(e)}function Nt(e){return Et.filter(t=>t.canvasType===e)}function Ht(e,t,i){var n;const s=At(e);return s?{id:i||"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),name:s.name,type:s.type,position:t,configuration:Object.assign({},s.defaultConfig),ports:{inputs:s.defaultPorts.inputs.map(e=>Object.assign({},e)),configs:null===(n=s.defaultPorts.configs)||void 0===n?void 0:n.map(e=>Object.assign({},e)),outputs:s.defaultPorts.outputs.map(e=>Object.assign({},e))},metadata:{icon:s.icon,color:s.color,description:s.description},status:Lt.IDLE,selected:!1}:null}const Rt=[{name:"Yellow",bg:"#fef08a",text:"#713f12"},{name:"Blue",bg:"#bfdbfe",text:"#1e3a5f"},{name:"Green",bg:"#bbf7d0",text:"#14532d"},{name:"Pink",bg:"#fbcfe8",text:"#831843"},{name:"Orange",bg:"#fed7aa",text:"#7c2d12"},{name:"Purple",bg:"#ddd6fe",text:"#4c1d95"},{name:"Gray",bg:"#e5e7eb",text:"#374151"}],Ft=[{name:"Indigo",bg:"rgba(99, 102, 241, 0.05)",border:"rgba(99, 102, 241, 0.3)",solid:"#6366f1"},{name:"Blue",bg:"rgba(59, 130, 246, 0.05)",border:"rgba(59, 130, 246, 0.3)",solid:"#3b82f6"},{name:"Green",bg:"rgba(34, 197, 94, 0.05)",border:"rgba(34, 197, 94, 0.3)",solid:"#22c55e"},{name:"Orange",bg:"rgba(249, 115, 22, 0.05)",border:"rgba(249, 115, 22, 0.3)",solid:"#f97316"},{name:"Red",bg:"rgba(239, 68, 68, 0.05)",border:"rgba(239, 68, 68, 0.3)",solid:"#ef4444"},{name:"Purple",bg:"rgba(168, 85, 247, 0.05)",border:"rgba(168, 85, 247, 0.3)",solid:"#a855f7"},{name:"Gray",bg:"rgba(107, 114, 128, 0.05)",border:"rgba(107, 114, 128, 0.3)",solid:"#6b7280"}];function Bt(e){return e===xt.NOTE||e===xt.FRAME}function Ut(e){return e===xt.FRAME}function Vt(e){return e===xt.NOTE}const qt=new Set([xt.TELEGRAM_BOT,xt.SLACK_SOCKET,xt.DISCORD_BOT,xt.WHATSAPP_WEBHOOK,xt.CUSTOM_WEBSOCKET,xt.RABBITMQ_TRIGGER,xt.CALENDLY_TRIGGER,xt.KAFKA_TRIGGER,xt.CRON]);function Wt(e){return qt.has(e)}
|
|
1270
1270
|
/**
|
|
1271
1271
|
* @license
|
|
1272
1272
|
* Copyright 2017 Google LLC
|
|
@@ -4948,7 +4948,7 @@ class Vn{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(
|
|
|
4948
4948
|
* @license
|
|
4949
4949
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4950
4950
|
* SPDX-License-Identifier: MIT
|
|
4951
|
-
*/var ts=function(e,t,i,n){return new(i||(i=Promise))(function(s,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function r(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}l((n=n.apply(e,t||[])).next())})};class is{constructor(e,t,i,n,s,a,o){this.stateHandler=t,this.messageHandler=i,this.fileHandler=n,this.eventBus=s,this.ui=a,this.plugins=o,this.cancelRequested=!1,this.provider=e}setProvider(e){this.provider=e}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(e){return ts(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(e){this.logError("Failed to auto-connect provider:",e)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const t=this.buildContext(),i=this.provider.sendMessage(e.text,t);yield this.processStream(i)}catch(e){throw this.logError("Provider error:",e),this.eventBus.emit("error",e),e}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(e){return ts(this,void 0,void 0,function*(){var t;let i=null;const n=Array.from(this.plugins.values()).filter(e=>Array.isArray(e.htmlTags)),s=[];let a="",o="",r=0;if(n.length>0)for(const e of n)for(const t of e.htmlTags)r=Math.max(r,t.open.length,t.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const d=yield e.next();if(l=d.done||!1,l||!d.value)break;const c=String(d.value),h=c.startsWith(o)?c.slice(o.length):c;o=c,a+=h;let p="",u=!1;for(;a.length;){const e=s[s.length-1];if(e){const t=e.buffer+a,n=t.indexOf(e.close);if(-1===n){e.buffer=t,a="";break}const o=t.slice(0,n),r="function"==typeof e.plugin.renderHtmlBlock?e.plugin.renderHtmlBlock(e.name,o):"";if(r)
|
|
4951
|
+
*/var ts=function(e,t,i,n){return new(i||(i=Promise))(function(s,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function r(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}l((n=n.apply(e,t||[])).next())})};class is{constructor(e,t,i,n,s,a,o){this.stateHandler=t,this.messageHandler=i,this.fileHandler=n,this.eventBus=s,this.ui=a,this.plugins=o,this.cancelRequested=!1,this.provider=e}setProvider(e){this.provider=e}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(e){return ts(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(e){this.logError("Failed to auto-connect provider:",e)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const t=this.buildContext(),i=this.provider.sendMessage(e.text,t);yield this.processStream(i)}catch(e){throw this.logError("Provider error:",e),this.eventBus.emit("error",e),e}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(e){return ts(this,void 0,void 0,function*(){var t;let i=null;const n=Array.from(this.plugins.values()).filter(e=>Array.isArray(e.htmlTags)),s=[];let a="",o="",r=0;if(n.length>0)for(const e of n)for(const t of e.htmlTags)r=Math.max(r,t.open.length,t.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const d=yield e.next();if(l=d.done||!1,l||!d.value)break;const c=String(d.value),h=c.startsWith(o)?c.slice(o.length):c;o=c,a+=h;let p="",u=!1;for(;a.length;){const e=s[s.length-1];if(e){const t=e.buffer+a,n=t.indexOf(e.close);if(-1===n){e.buffer=t,a="";break}const o=t.slice(0,n),r="function"==typeof e.plugin.renderHtmlBlock?e.plugin.renderHtmlBlock(e.name,o):"";if(r){const t=/<div data-placeholder-id="[^"]*">[\s\S]*?<\/div>/;e.hasPlaceholder&&i&&t.test(i.text)?(i.text=i.text.replace(t,r),this.messageHandler.updateMessage(i.id,{text:i.text})):e.hasPlaceholder&&t.test(p)?(p=p.replace(t,r),u=!0):(p+=r,u=!0)}s.pop(),a=t.slice(n+e.close.length);continue}if(0===n.length){p+=a,a="";break}let t=null;for(const e of n)for(const i of e.htmlTags){const n=a.indexOf(i.open);-1!==n&&(!t||n<t.idx)&&(t={idx:n,plugin:e,name:i.name,open:i.open,close:i.close})}if(!t){if(r>0&&a.length>r-1){const e=a.length-(r-1);p+=a.slice(0,e),a=a.slice(e)}break}{p+=a.slice(0,t.idx);let e=!1;if("function"==typeof t.plugin.renderHtmlBlockPlaceholder){const i=t.plugin.renderHtmlBlockPlaceholder(t.name);i&&(p+=i,u=!0,e=!0)}s.push({plugin:t.plugin,name:t.name,open:t.open,close:t.close,buffer:"",hasPlaceholder:e}),a=a.slice(t.idx+t.open.length)}}if(p)for(const e of this.plugins.values()){!(Array.isArray(e.htmlTags)&&e.htmlTags.length>0)&&e.afterReceive&&(p=yield e.afterReceive(p))}const m=u||/<\w+[^>]*>/.test(p);i?p&&(this.messageHandler.appendToBotMessage(i.id,p),i.text+=p,m&&!(null===(t=i.metadata)||void 0===t?void 0:t.renderAsHtml)&&this.messageHandler.updateMessage(i.id,{metadata:Object.assign(Object.assign({},i.metadata||{}),{renderAsHtml:!0})})):(i=this.messageHandler.createBotMessage(p,m?{renderAsHtml:!0}:void 0),this.stateHandler.addMessageToState(i),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.setTyping(!1))}if(!this.cancelRequested&&i&&(a&&this.messageHandler.appendToBotMessage(i.id,a),s.length>0)){const e=s.map(e=>e.open+e.buffer).join("");e&&this.messageHandler.appendToBotMessage(i.id,e)}}catch(e){throw this.logError("Error processing stream:",e),e}})}buildContext(){const e=this.stateHandler.getState(),t=e.currentThreadId?e.threads.find(t=>t.id===e.currentThreadId):void 0;return console.log("[ProviderService] buildContext state.uploadedFiles:",e.uploadedFiles),{messages:e.messages,metadata:e.metadata,selectedModules:e.selectedModules,currentThread:t,uploadedFiles:e.uploadedFiles}}uploadFileToProvider(e){return ts(this,void 0,void 0,function*(){var t,i;if(!(null===(i=null===(t=this.provider)||void 0===t?void 0:t.capabilities)||void 0===i?void 0:i.fileUpload)||!this.provider.uploadFile)throw new Error("Provider does not support file upload");const n=this.buildContext();return yield this.provider.uploadFile(e,n)})}getCapabilities(){var e;return(null===(e=this.provider)||void 0===e?void 0:e.capabilities)||{streaming:!1,fileUpload:!1,contextWindow:0}}log(e,...t){console.log(`[ProviderService] ${e}`,...t)}logError(e,t){console.error(`[ProviderService] ${e}`,t)}}
|
|
4952
4952
|
/**
|
|
4953
4953
|
* @license
|
|
4954
4954
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
@@ -7798,7 +7798,7 @@ function Aa(e,t){const i=document.createElement(e);return i.style.cssText=t,i}fu
|
|
|
7798
7798
|
* @license
|
|
7799
7799
|
* Copyright 2024 Nuraly, Laabidi Aymen
|
|
7800
7800
|
* SPDX-License-Identifier: MIT
|
|
7801
|
-
*/const Ha=[{label:"Equals",value:"eq"},{label:"Not Equals",value:"neq"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Contains",value:"contains"},{label:"Does Not Contain",value:"notContains"},{label:"Starts With",value:"startsWith"},{label:"Ends With",value:"endsWith"},{label:"Is Empty",value:"isEmpty"},{label:"Is Not Empty",value:"isNotEmpty"},{label:"Matches Regex",value:"regex"}],Ra=new Set(["isEmpty","isNotEmpty"]);function Fa(e,t){var i;const n=e.conditionMode||"
|
|
7801
|
+
*/const Ha=[{label:"Equals",value:"eq"},{label:"Not Equals",value:"neq"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Contains",value:"contains"},{label:"Does Not Contain",value:"notContains"},{label:"Starts With",value:"startsWith"},{label:"Ends With",value:"endsWith"},{label:"Is Empty",value:"isEmpty"},{label:"Is Not Empty",value:"isNotEmpty"},{label:"Matches Regex",value:"regex"}],Ra=new Set(["isEmpty","isNotEmpty"]);function Fa(e,t){var i;const n=e.conditionMode||"expression",s=e.conditionLogic||"and",a=(null===(i=e.conditions)||void 0===i?void 0:i.length)?e.conditions:[{leftValue:"",operator:"eq",rightValue:""}],o=e=>{t("conditions",e)};return q`
|
|
7802
7802
|
<div class="config-field">
|
|
7803
7803
|
<label>Mode</label>
|
|
7804
7804
|
<nr-select
|
|
@@ -7890,7 +7890,7 @@ function Aa(e,t){const i=document.createElement(e);return i.style.cssText=t,i}fu
|
|
|
7890
7890
|
<label>Language</label>
|
|
7891
7891
|
<nr-select
|
|
7892
7892
|
.value=${e.language||"javascript"}
|
|
7893
|
-
.options=${[{label:"JavaScript",value:"javascript"}
|
|
7893
|
+
.options=${[{label:"JavaScript",value:"javascript"}]}
|
|
7894
7894
|
@nr-change=${e=>t("language",e.detail.value)}
|
|
7895
7895
|
></nr-select>
|
|
7896
7896
|
</div>
|
|
@@ -10753,9 +10753,11 @@ return function(e,t,i,n,s){const a=i||"{workflowId}",o=e.httpPath||"/webhook",r=
|
|
|
10753
10753
|
<label>Duration</label>
|
|
10754
10754
|
<nr-input
|
|
10755
10755
|
type="number"
|
|
10756
|
+
min="0"
|
|
10756
10757
|
value=${String(e.duration||1e3)}
|
|
10757
|
-
@nr-input=${e=>t("duration",Number.parseInt(e.detail.value))}
|
|
10758
|
+
@nr-input=${e=>t("duration",Number.parseInt(e.detail.value)||0)}
|
|
10758
10759
|
></nr-input>
|
|
10760
|
+
<small class="field-hint">Effective delay is capped at 24 hours. Delays over 10s release the worker until they elapse.</small>
|
|
10759
10761
|
</div>
|
|
10760
10762
|
<div class="config-field">
|
|
10761
10763
|
<label>Unit</label>
|
|
@@ -26882,7 +26884,7 @@ var Kh=function(e,t,i,n){return new(i||(i=Promise))(function(s,a){function o(e){
|
|
|
26882
26884
|
* @license
|
|
26883
26885
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
26884
26886
|
* SPDX-License-Identifier: MIT
|
|
26885
|
-
*/var Dp=function(e,t,i,n){return new(i||(i=Promise))(function(s,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function r(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}l((n=n.apply(e,t||[])).next())})};class zp extends Mp{constructor(){super(...arguments),this.id="artifact",this.name="Artifact Plugin",this.version="1.0.0",this.artifacts=new Map}onInit(e){this.controller=e,e&&"function"==typeof e.on&&e.on("processing:end",()=>{var t,i;try{const n=[...(null===(t=e.getMessages)||void 0===t?void 0:t.call(e))||[]].reverse().find(e=>e.sender===Xi.Bot);n&&!(null===(i=n.metadata)||void 0===i?void 0:i.hasArtifacts)&&this.processMessage(n)}catch(e){}})}onMessageReceived(e){return Dp(this,void 0,void 0,function*(){e.sender===Xi.Bot&&this.processMessage(e)})}processMessage(e){var t;if(null===(t=e.metadata)||void 0===t?void 0:t.hasArtifacts)return void this.rebuildArtifactsFromMetadata(e);const i=e.text;if(!i)return;const n=/```(\w*)\n([\s\S]*?)```/g;let s;const a=[];let o=0;for(;null!==(s=n.exec(i));){const t=(s[1]||"text").toLowerCase(),i=s[2],n=`artifact-${e.id}-${o}`,r={id:n,language:t,content:i,title:this.extractTitle(i,t,o),messageId:e.id,index:o};a.push(r),this.artifacts.set(n,r),o++}if(0===a.length)return;let r=i,l=0;r=r.replaceAll(n,()=>`\0ARTIFACT_CARD_${a[l++].id}\0`),r=gn(r);for(const e of a)r=r.replace(`\0ARTIFACT_CARD_${e.id}\0`,this.renderPlaceholderCard(e));const d=this.getOncePerConversationStyleTag(this.getStyles());this.controller&&"function"==typeof this.controller.updateMessage&&this.controller.updateMessage(e.id,{text:d+r,metadata:Object.assign(Object.assign({},e.metadata),{renderAsHtml:!0,hasArtifacts:!0,artifactIds:a.map(e=>e.id),artifactOriginalText:i})})}rebuildArtifactsFromMetadata(e){var t,i;const n=null===(t=e.metadata)||void 0===t?void 0:t.artifactIds;if(!(null==n?void 0:n.length))return;if(n.every(e=>this.artifacts.has(e)))return;const s=null===(i=e.metadata)||void 0===i?void 0:i.artifactOriginalText;if(!s)return;const a=/```(\w*)\n([\s\S]*?)```/g;let o,r=0;for(;null!==(o=a.exec(s));){const t=(o[1]||"text").toLowerCase(),i=o[2],n=`artifact-${e.id}-${r}`,s=this.extractTitle(i,t,r);this.artifacts.set(n,{id:n,language:t,content:i,title:s,messageId:e.id,index:r}),r++}}getArtifact(e){return this.artifacts.get(e)}getAllArtifacts(){return Array.from(this.artifacts.values())}getArtifactsForMessage(e){return Array.from(this.artifacts.values()).filter(t=>t.messageId===e)}extractTitle(e,t,i){const n=e.trimStart().split("\n")[0]||"",s=[/^\/\/\s*(.+)/,/^#\s*(.+)/,/^--\s*(.+)/,/^\/\*\s*(.*?)\*\//,/^<!--\s*(.*?)-->/];for(const e of s){const t=e.exec(n);if(null==t?void 0:t[1]){const e=t[1].trim();if(e.length>0&&e.length<=60)return e}}return`${bn(t)} Snippet ${i+1}`}renderPlaceholderCard(e){const t=bn(e.language),i=mn(e.title);return`<div class="nr-artifact-card" data-artifact-id="${e.id}" role="button" tabindex="0" aria-label="View ${i}">\n <nr-icon name="code" size="small" class="nr-artifact-card__icon"></nr-icon>\n <span class="nr-artifact-card__info">\n <span class="nr-artifact-card__title">${i}</span>\n <nr-tag size="small" class="nr-artifact-card__lang">${t}</nr-tag>\n </span>\n <nr-icon name="chevron-right" size="small" class="nr-artifact-card__chevron"></nr-icon>\n</div>`}getStyles(){return"\n .nr-artifact-card {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n margin: 8px 0;\n background: #f6f8fa;\n border: 1px solid #d0d7de;\n border-radius: 8px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n user-select: none;\n max-width: 100%;\n }\n .nr-artifact-card:hover {\n background: #eaeef2;\n border-color: #8b949e;\n }\n .nr-artifact-card:focus-visible {\n outline: 2px solid #0b5fff;\n outline-offset: 2px;\n }\n .nr-artifact-card__icon {\n flex-shrink: 0;\n color: #57606a;\n }\n .nr-artifact-card__info {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n }\n .nr-artifact-card__title {\n font-size: 13px;\n font-weight: 500;\n color: #1f2937;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.3;\n }\n .nr-artifact-card__lang {\n align-self: flex-start;\n }\n .nr-artifact-card__chevron {\n flex-shrink: 0;\n color: #6c757d;\n }\n "}}
|
|
26887
|
+
*/var Dp=function(e,t,i,n){return new(i||(i=Promise))(function(s,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function r(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(o,r)}l((n=n.apply(e,t||[])).next())})};class zp extends Mp{constructor(){super(...arguments),this.id="artifact",this.name="Artifact Plugin",this.version="1.0.0",this.artifacts=new Map}onInit(e){this.controller=e,e&&"function"==typeof e.on&&e.on("processing:end",()=>{var t,i;try{const n=[...(null===(t=e.getMessages)||void 0===t?void 0:t.call(e))||[]].reverse().find(e=>e.sender===Xi.Bot);n&&!(null===(i=n.metadata)||void 0===i?void 0:i.hasArtifacts)&&this.processMessage(n)}catch(e){}})}onMessageReceived(e){return Dp(this,void 0,void 0,function*(){e.sender===Xi.Bot&&this.processMessage(e)})}processMessage(e){var t;if(null===(t=e.metadata)||void 0===t?void 0:t.hasArtifacts)return void this.rebuildArtifactsFromMetadata(e);const i=e.text;if(!i)return;const n=/```(\w*)\n([\s\S]*?)```/g;let s;const a=[];let o=0;for(;null!==(s=n.exec(i));){const t=(s[1]||"text").toLowerCase(),i=s[2],n=`artifact-${e.id}-${o}`,r={id:n,language:t,content:i,title:this.extractTitle(i,t,o),messageId:e.id,index:o};a.push(r),this.artifacts.set(n,r),o++}if(0===a.length)return;let r=i,l=0;r=r.replaceAll(n,()=>`\0ARTIFACT_CARD_${a[l++].id}\0`),r=gn(r);for(const e of a)r=r.replace(`\0ARTIFACT_CARD_${e.id}\0`,this.renderPlaceholderCard(e));const d=this.getOncePerConversationStyleTag(this.getStyles());this.controller&&"function"==typeof this.controller.updateMessage&&this.controller.updateMessage(e.id,{text:d+r,metadata:Object.assign(Object.assign({},e.metadata),{renderAsHtml:!0,hasArtifacts:!0,artifactIds:a.map(e=>e.id),artifactOriginalText:i})})}rebuildArtifactsFromMetadata(e){var t,i;const n=null===(t=e.metadata)||void 0===t?void 0:t.artifactIds;if(!(null==n?void 0:n.length))return;if(n.every(e=>this.artifacts.has(e)))return;const s=null===(i=e.metadata)||void 0===i?void 0:i.artifactOriginalText;if(!s)return;const a=/```(\w*)\n([\s\S]*?)```/g;let o,r=0;for(;null!==(o=a.exec(s));){const t=(o[1]||"text").toLowerCase(),i=o[2],n=`artifact-${e.id}-${r}`,s=this.extractTitle(i,t,r);this.artifacts.set(n,{id:n,language:t,content:i,title:s,messageId:e.id,index:r}),r++}}getArtifact(e){return this.artifacts.get(e)}getAllArtifacts(){return Array.from(this.artifacts.values())}getArtifactsForMessage(e){return Array.from(this.artifacts.values()).filter(t=>t.messageId===e)}processNow(e){var t;if(!this.controller||"function"!=typeof this.controller.getMessages)return!1;const i=(this.controller.getMessages()||[]).find(t=>t.id===e);return!(!i||i.sender!==Xi.Bot)&&((null===(t=i.metadata)||void 0===t?void 0:t.hasArtifacts)?(this.rebuildArtifactsFromMetadata(i),!0):(this.processMessage(i),!0))}extractTitle(e,t,i){const n=e.trimStart().split("\n")[0]||"",s=[/^\/\/\s*(.+)/,/^#\s*(.+)/,/^--\s*(.+)/,/^\/\*\s*(.*?)\*\//,/^<!--\s*(.*?)-->/];for(const e of s){const t=e.exec(n);if(null==t?void 0:t[1]){const e=t[1].trim();if(e.length>0&&e.length<=60)return e}}return`${bn(t)} Snippet ${i+1}`}renderPlaceholderCard(e){const t=bn(e.language),i=mn(e.title);return`<div class="nr-artifact-card" data-artifact-id="${e.id}" role="button" tabindex="0" aria-label="View ${i}">\n <nr-icon name="code" size="small" class="nr-artifact-card__icon"></nr-icon>\n <span class="nr-artifact-card__info">\n <span class="nr-artifact-card__title">${i}</span>\n <nr-tag size="small" class="nr-artifact-card__lang">${t}</nr-tag>\n </span>\n <nr-icon name="chevron-right" size="small" class="nr-artifact-card__chevron"></nr-icon>\n</div>`}getStyles(){return"\n .nr-artifact-card {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n margin: 8px 0;\n background: #f6f8fa;\n border: 1px solid #d0d7de;\n border-radius: 8px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n user-select: none;\n max-width: 100%;\n }\n .nr-artifact-card:hover {\n background: #eaeef2;\n border-color: #8b949e;\n }\n .nr-artifact-card:focus-visible {\n outline: 2px solid #0b5fff;\n outline-offset: 2px;\n }\n .nr-artifact-card__icon {\n flex-shrink: 0;\n color: #57606a;\n }\n .nr-artifact-card__info {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n }\n .nr-artifact-card__title {\n font-size: 13px;\n font-weight: 500;\n color: #1f2937;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.3;\n }\n .nr-artifact-card__lang {\n align-self: flex-start;\n }\n .nr-artifact-card__chevron {\n flex-shrink: 0;\n color: #6c757d;\n }\n "}}
|
|
26886
26888
|
/**
|
|
26887
26889
|
* @license
|
|
26888
26890
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
Binary file
|
|
@@ -103,7 +103,7 @@ var P,_;O.styles=e`
|
|
|
103
103
|
* @license
|
|
104
104
|
* Copyright 2024 Nuraly, Laabidi Aymen
|
|
105
105
|
* SPDX-License-Identifier: MIT
|
|
106
|
-
*/var U,V,H,q,G,W,K,J,Y;!function(e){e.START="START",e.END="END",e.HTTP_START="HTTP_START",e.HTTP_END="HTTP_END",e.CHAT_START="CHAT_START",e.CHAT_OUTPUT="CHAT_OUTPUT",e.SOCIAL_POST="SOCIAL_POST",e.FUNCTION="FUNCTION",e.HTTP="HTTP",e.CONDITION="CONDITION",e.SWITCH="SWITCH",e.DELAY="DELAY",e.PARALLEL="PARALLEL",e.MERGE="MERGE",e.LOOP="LOOP",e.BREAK="BREAK",e.WAIT="WAIT",e.TRY_CATCH="TRY_CATCH",e.TRANSFORM="TRANSFORM",e.SUB_WORKFLOW="SUB_WORKFLOW",e.EMAIL="EMAIL",e.EMAIL_READER="EMAIL_READER",e.SENDGRID="SENDGRID",e.NOTIFICATION="NOTIFICATION",e.DATABASE="DATABASE",e.VARIABLE="VARIABLE",e.CHATBOT="CHATBOT",e.DEBUG="DEBUG",e.LLM="LLM",e.OCR="OCR",e.WEB_SEARCH="WEB_SEARCH",e.WEB_CRAWL="WEB_CRAWL",e.DOCUMENT_GENERATOR="DOCUMENT_GENERATOR",e.FILE_STORAGE="FILE_STORAGE",e.GOOGLE_CLOUD_STORAGE="GOOGLE_CLOUD_STORAGE",e.S3="S3",e.EMBEDDING="EMBEDDING",e.DOCUMENT_LOADER="DOCUMENT_LOADER",e.TEXT_SPLITTER="TEXT_SPLITTER",e.VECTOR_WRITE="VECTOR_WRITE",e.VECTOR_SEARCH="VECTOR_SEARCH",e.CONTEXT_BUILDER="CONTEXT_BUILDER",e.SUMMARIZATION="SUMMARIZATION",e.GUARDRAIL="GUARDRAIL",e.SLACK_SEND_MESSAGE="SLACK_SEND_MESSAGE",e.SLACK_GET_CHANNEL_INFO="SLACK_GET_CHANNEL_INFO",e.SLACK_LIST_CHANNELS="SLACK_LIST_CHANNELS",e.SLACK_ADD_REACTION="SLACK_ADD_REACTION",e.SLACK_UPLOAD_FILE="SLACK_UPLOAD_FILE",e.RERANKER="RERANKER",e.SHOPIFY="SHOPIFY",e.TELEGRAM_SEND="TELEGRAM_SEND",e.TWILIO_SMS="TWILIO_SMS",e.TWILIO_VOICE="TWILIO_VOICE",e.TELEGRAM_BOT="TELEGRAM_BOT",e.SLACK_SOCKET="SLACK_SOCKET",e.DISCORD_BOT="DISCORD_BOT",e.WHATSAPP_WEBHOOK="WHATSAPP_WEBHOOK",e.CUSTOM_WEBSOCKET="CUSTOM_WEBSOCKET",e.GOOGLE_CALENDAR="GOOGLE_CALENDAR",e.RABBITMQ_TRIGGER="RABBITMQ_TRIGGER",e.KAFKA="KAFKA",e.KAFKA_TRIGGER="KAFKA_TRIGGER",e.ZENDESK="ZENDESK",e.GITLAB="GITLAB",e.MCP="MCP",e.INFORMATION_EXTRACTOR="INFORMATION_EXTRACTOR",e.HUBSPOT="HUBSPOT",e.JIRA="JIRA",e.ELASTICSEARCH="ELASTICSEARCH",e.CALENDLY_TRIGGER="CALENDLY_TRIGGER",e.UI_TABLE="UI_TABLE",e.NOTE="NOTE",e.FRAME="FRAME",e.CRON="CRON"}(U||(U={})),function(e){e.AGENT="AGENT",e.TOOL="TOOL",e.MEMORY="MEMORY",e.CONTEXT_MEMORY="CONTEXT_MEMORY",e.PROMPT="PROMPT",e.LLM="AGENT_LLM",e.RETRIEVER="RETRIEVER",e.CHAIN="CHAIN",e.ROUTER="ROUTER",e.HUMAN_INPUT="HUMAN_INPUT",e.OUTPUT_PARSER="OUTPUT_PARSER",e.STRUCTURED_OUTPUT="STRUCTURED_OUTPUT"}(V||(V={})),function(e){e.TABLE="DB_TABLE",e.VIEW="DB_VIEW",e.INDEX="DB_INDEX",e.RELATIONSHIP="DB_RELATIONSHIP",e.CONSTRAINT="DB_CONSTRAINT",e.QUERY="DB_QUERY"}(H||(H={})),function(e){e.STICKY_NOTE="WB_STICKY_NOTE",e.SHAPE_RECTANGLE="WB_SHAPE_RECTANGLE",e.SHAPE_CIRCLE="WB_SHAPE_CIRCLE",e.SHAPE_DIAMOND="WB_SHAPE_DIAMOND",e.SHAPE_TRIANGLE="WB_SHAPE_TRIANGLE",e.SHAPE_ARROW="WB_SHAPE_ARROW",e.SHAPE_LINE="WB_SHAPE_LINE",e.SHAPE_STAR="WB_SHAPE_STAR",e.SHAPE_HEXAGON="WB_SHAPE_HEXAGON",e.TEXT_BLOCK="WB_TEXT_BLOCK",e.IMAGE="WB_IMAGE",e.DRAWING="WB_DRAWING",e.FRAME="WB_FRAME",e.VOTING="WB_VOTING",e.MERMAID="WB_MERMAID",e.ANCHOR="WB_ANCHOR",e.WORKFLOW="WB_WORKFLOW",e.DATABASE="WB_DATABASE"}(q||(q={})),function(e){e.WORKFLOW="WORKFLOW",e.DATABASE="DATABASE",e.WHITEBOARD="WHITEBOARD"}(G||(G={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.PAUSED="PAUSED",e.HANDOFF_PENDING="HANDOFF_PENDING",e.ERROR="ERROR"}(W||(W={})),function(e){e.IDLE="IDLE",e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.PAUSED="PAUSED",e.WAITING="WAITING"}(K||(K={})),function(e){e.INPUT="INPUT",e.OUTPUT="OUTPUT",e.CONFIG="CONFIG",e.CONDITIONAL_TRUE="CONDITIONAL_TRUE",e.CONDITIONAL_FALSE="CONDITIONAL_FALSE",e.CONDITIONAL_DEFAULT="CONDITIONAL_DEFAULT",e.LOOP_ITEM="LOOP_ITEM",e.LOOP_DONE="LOOP_DONE",e.PARALLEL_BRANCH="PARALLEL_BRANCH",e.ERROR="ERROR"}(J||(J={})),function(e){e.SELECT="SELECT",e.PAN="PAN",e.CONNECT="CONNECT",e.ADD_NODE="ADD_NODE"}(Y||(Y={}));const Q={[U.START]:"#22c55e",[U.END]:"#ef4444",[U.HTTP_START]:"#059669",[U.HTTP_END]:"#dc2626",[U.CHAT_START]:"#0ea5e9",[U.CHAT_OUTPUT]:"#06b6d4",[U.SOCIAL_POST]:"#7c3aed",[U.FUNCTION]:"#3b82f6",[U.HTTP]:"#8b5cf6",[U.CONDITION]:"#f59e0b",[U.SWITCH]:"#eab308",[U.DELAY]:"#6b7280",[U.PARALLEL]:"#06b6d4",[U.MERGE]:"#0891b2",[U.LOOP]:"#ec4899",[U.BREAK]:"#991b1b",[U.WAIT]:"#a78bfa",[U.TRY_CATCH]:"#f43f5e",[U.TRANSFORM]:"#14b8a6",[U.SUB_WORKFLOW]:"#6366f1",[U.EMAIL]:"#f97316",[U.EMAIL_READER]:"#06b6d4",[U.SENDGRID]:"#1A82E2",[U.NOTIFICATION]:"#84cc16",[U.DATABASE]:"#a855f7",[U.VARIABLE]:"#64748b",[U.CHATBOT]:"#0ea5e9",[U.DEBUG]:"#f97316",[U.LLM]:"#22d3ee",[U.OCR]:"#0d9488",[U.INFORMATION_EXTRACTOR]:"#8B5CF6",[U.WEB_SEARCH]:"#3b82f6",[U.WEB_CRAWL]:"#6366f1",[U.DOCUMENT_GENERATOR]:"#0284c7",[U.FILE_STORAGE]:"#f59e0b",[U.GOOGLE_CLOUD_STORAGE]:"#4285f4",[U.S3]:"#FF9900",[U.EMBEDDING]:"#8b5cf6",[U.DOCUMENT_LOADER]:"#ec4899",[U.TEXT_SPLITTER]:"#14b8a6",[U.VECTOR_WRITE]:"#10b981",[U.VECTOR_SEARCH]:"#06b6d4",[U.CONTEXT_BUILDER]:"#a855f7",[U.SUMMARIZATION]:"#8B5CF6",[U.GUARDRAIL]:"#ef4444",[U.SLACK_SEND_MESSAGE]:"#4A154B",[U.SLACK_GET_CHANNEL_INFO]:"#4A154B",[U.SLACK_LIST_CHANNELS]:"#4A154B",[U.SLACK_ADD_REACTION]:"#4A154B",[U.SLACK_UPLOAD_FILE]:"#4A154B",[U.RERANKER]:"#d946ef",[U.SHOPIFY]:"#96bf48",[U.TELEGRAM_SEND]:"#0088cc",[U.TWILIO_SMS]:"#F22F46",[U.TWILIO_VOICE]:"#F22F46",[U.TELEGRAM_BOT]:"#0088cc",[U.SLACK_SOCKET]:"#4A154B",[U.DISCORD_BOT]:"#5865F2",[U.WHATSAPP_WEBHOOK]:"#25D366",[U.CUSTOM_WEBSOCKET]:"#6366f1",[U.GOOGLE_CALENDAR]:"#4285F4",[U.RABBITMQ_TRIGGER]:"#FF6600",[U.KAFKA]:"#231F20",[U.KAFKA_TRIGGER]:"#231F20",[U.ZENDESK]:"#03363d",[U.GITLAB]:"#FC6D26",[U.MCP]:"#7c3aed",[U.HUBSPOT]:"#FF7A59",[U.JIRA]:"#0052CC",[U.ELASTICSEARCH]:"#00bfb3",[U.CALENDLY_TRIGGER]:"#006BFF",[U.UI_TABLE]:"#0891b2",[U.NOTE]:"#fef08a",[U.FRAME]:"#6366f1",[U.CRON]:"#d97706",[V.AGENT]:"#10b981",[V.TOOL]:"#0ea5e9",[V.MEMORY]:"#d946ef",[V.CONTEXT_MEMORY]:"#c026d3",[V.PROMPT]:"#f472b6",[V.LLM]:"#22d3ee",[V.RETRIEVER]:"#a78bfa",[V.CHAIN]:"#fbbf24",[V.ROUTER]:"#fb923c",[V.HUMAN_INPUT]:"#4ade80",[V.OUTPUT_PARSER]:"#2dd4bf",[V.STRUCTURED_OUTPUT]:"#f59e0b",[H.TABLE]:"#64748b",[H.VIEW]:"#a855f7",[H.INDEX]:"#f59e0b",[H.RELATIONSHIP]:"#ec4899",[H.CONSTRAINT]:"#ef4444",[H.QUERY]:"#06b6d4",[q.STICKY_NOTE]:"#fef08a",[q.SHAPE_RECTANGLE]:"#3b82f6",[q.SHAPE_CIRCLE]:"#8b5cf6",[q.SHAPE_DIAMOND]:"#f59e0b",[q.SHAPE_TRIANGLE]:"#22c55e",[q.SHAPE_ARROW]:"#6b7280",[q.SHAPE_LINE]:"#6b7280",[q.SHAPE_STAR]:"#f97316",[q.SHAPE_HEXAGON]:"#ec4899",[q.TEXT_BLOCK]:"#111827",[q.IMAGE]:"#06b6d4",[q.DRAWING]:"#14b8a6",[q.FRAME]:"#6366f1",[q.VOTING]:"#ef4444",[q.MERMAID]:"#8b5cf6",[q.ANCHOR]:"#f59e0b",[q.WORKFLOW]:"#6366f1",[q.DATABASE]:"#64748b"},X={[U.START]:"play",[U.END]:"stop",[U.HTTP_START]:"download",[U.HTTP_END]:"upload",[U.CHAT_START]:"message-circle",[U.CHAT_OUTPUT]:"message-square",[U.SOCIAL_POST]:"send",[U.FUNCTION]:"code",[U.HTTP]:"globe",[U.CONDITION]:"git-branch",[U.SWITCH]:"git-fork",[U.DELAY]:"clock",[U.PARALLEL]:"git-merge",[U.MERGE]:"merge",[U.LOOP]:"repeat",[U.BREAK]:"circle-stop",[U.WAIT]:"hourglass",[U.TRY_CATCH]:"shield-alert",[U.TRANSFORM]:"shuffle",[U.SUB_WORKFLOW]:"layers",[U.EMAIL]:"mail",[U.EMAIL_READER]:"mail-open",[U.SENDGRID]:"send",[U.NOTIFICATION]:"bell",[U.DATABASE]:"database",[U.VARIABLE]:"box",[U.CHATBOT]:"message-circle",[U.DEBUG]:"bug",[U.LLM]:"brain",[U.OCR]:"scan",[U.INFORMATION_EXTRACTOR]:"search",[U.WEB_SEARCH]:"search",[U.WEB_CRAWL]:"globe",[U.DOCUMENT_GENERATOR]:"file-text",[U.FILE_STORAGE]:"hard-drive",[U.GOOGLE_CLOUD_STORAGE]:"cloud",[U.S3]:"cloud",[U.EMBEDDING]:"hash",[U.DOCUMENT_LOADER]:"file-text",[U.TEXT_SPLITTER]:"scissors",[U.VECTOR_WRITE]:"database",[U.VECTOR_SEARCH]:"search",[U.CONTEXT_BUILDER]:"layers",[U.SUMMARIZATION]:"file-minus",[U.GUARDRAIL]:"shield",[U.SLACK_SEND_MESSAGE]:"message-square",[U.SLACK_GET_CHANNEL_INFO]:"hash",[U.SLACK_LIST_CHANNELS]:"list",[U.SLACK_ADD_REACTION]:"smile-plus",[U.SLACK_UPLOAD_FILE]:"upload",[U.RERANKER]:"arrow-up-down",[U.SHOPIFY]:"shopping-cart",[U.TELEGRAM_SEND]:"send",[U.TWILIO_SMS]:"message-square",[U.TWILIO_VOICE]:"phone",[U.TELEGRAM_BOT]:"send",[U.SLACK_SOCKET]:"message-square",[U.DISCORD_BOT]:"gamepad-2",[U.WHATSAPP_WEBHOOK]:"phone",[U.CUSTOM_WEBSOCKET]:"radio",[U.GOOGLE_CALENDAR]:"calendar",[U.RABBITMQ_TRIGGER]:"inbox",[U.KAFKA]:"message-square-share",[U.KAFKA_TRIGGER]:"radio",[U.ZENDESK]:"ticket",[U.GITLAB]:"git-merge",[U.MCP]:"plug",[U.HUBSPOT]:"users",[U.JIRA]:"ticket",[U.ELASTICSEARCH]:"search",[U.CALENDLY_TRIGGER]:"calendar",[U.UI_TABLE]:"table",[U.NOTE]:"sticky-note",[U.FRAME]:"square",[U.CRON]:"timer",[V.AGENT]:"cpu",[V.TOOL]:"tool",[V.MEMORY]:"hard-drive",[V.CONTEXT_MEMORY]:"brain",[V.PROMPT]:"message-square",[V.LLM]:"brain",[V.RETRIEVER]:"search",[V.CHAIN]:"link",[V.ROUTER]:"git-pull-request",[V.HUMAN_INPUT]:"user",[V.OUTPUT_PARSER]:"file-text",[V.STRUCTURED_OUTPUT]:"braces",[H.TABLE]:"table",[H.VIEW]:"eye",[H.INDEX]:"list",[H.RELATIONSHIP]:"git-merge",[H.CONSTRAINT]:"shield",[H.QUERY]:"terminal",[q.STICKY_NOTE]:"sticky-note",[q.SHAPE_RECTANGLE]:"square",[q.SHAPE_CIRCLE]:"circle",[q.SHAPE_DIAMOND]:"diamond",[q.SHAPE_TRIANGLE]:"triangle",[q.SHAPE_ARROW]:"arrow-right",[q.SHAPE_LINE]:"minus",[q.SHAPE_STAR]:"star",[q.SHAPE_HEXAGON]:"hexagon",[q.TEXT_BLOCK]:"type",[q.IMAGE]:"image",[q.DRAWING]:"pen-tool",[q.FRAME]:"frame",[q.VOTING]:"thumbs-up",[q.MERMAID]:"git-branch",[q.ANCHOR]:"anchor",[q.WORKFLOW]:"layers",[q.DATABASE]:"table"},Z=[{type:U.START,name:"Start",description:"Entry point of the workflow",icon:X[U.START],color:Q[U.START],category:"control",defaultConfig:{},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.END,name:"End",description:"Exit point of the workflow",icon:X[U.END],color:Q[U.END],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.HTTP_START,name:"HTTP Trigger",description:"Start workflow from HTTP request",icon:X[U.HTTP_START],color:Q[U.HTTP_START],category:"trigger",defaultConfig:{httpPath:"/webhook",httpMethod:"POST",httpAuth:"none",httpCors:!0,httpRateLimit:100,httpRequestSchema:{}},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Request"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.HTTP_END,name:"HTTP Response",description:"Return HTTP response to caller",icon:X[U.HTTP_END],color:Q[U.HTTP_END],category:"control",defaultConfig:{httpStatusCode:200,httpResponseHeaders:{"Content-Type":"application/json"},httpResponseBody:"{{data}}",httpContentType:"application/json"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.CHAT_START,name:"Chat Trigger",description:"Start workflow from chatbot message",icon:X[U.CHAT_START],color:Q[U.CHAT_START],category:"trigger",defaultConfig:{outputVariable:"chatInput",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"files",type:J.OUTPUT,label:"Files"}]}},{type:U.CHAT_OUTPUT,name:"Chat Output",description:"Send message to chatbot during execution",icon:X[U.CHAT_OUTPUT],color:Q[U.CHAT_OUTPUT],category:"action",defaultConfig:{message:"${variables.response}",messageType:"text",typing:!1,typingDelay:1e3},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SOCIAL_POST,name:"Social Post",description:"Post to social feed on behalf of an agent",icon:X[U.SOCIAL_POST],color:Q[U.SOCIAL_POST],category:"action",defaultConfig:{agentId:"",content:"${variables.response}",mediaUrl:"",mediaType:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.LLM,name:"LLM",description:"Call AI language model (OpenAI, Anthropic, etc.)",icon:X[U.LLM],color:Q[U.LLM],category:"action",defaultConfig:{provider:"openai",model:"gpt-4",temperature:.7,maxTokens:2048,systemPrompt:"",userPrompt:"${variables.message}"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"},{id:"context_memory",type:J.INPUT,label:"Context Memory"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.OCR,name:"OCR",description:"Extract text from images using OCR",icon:X[U.OCR],color:Q[U.OCR],category:"action",defaultConfig:{imageSource:"variable",imageField:"${input.files[0].base64}",language:"fr",detectLayout:!1,outputVariable:"ocrResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Image"}],outputs:[{id:"out",type:J.OUTPUT,label:"Text"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.INFORMATION_EXTRACTOR,name:"Information Extractor",description:"Extract structured data from unstructured text using AI",icon:X[U.INFORMATION_EXTRACTOR],color:Q[U.INFORMATION_EXTRACTOR],category:"action",defaultConfig:{inputField:"text",schema:[{name:"field1",type:"string",description:"",required:!0}],model:"gpt-4o-mini",provider:"openai",instructions:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Extracted"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.FUNCTION,name:"Function",description:"Invoke a Nuraly function",icon:X[U.FUNCTION],color:Q[U.FUNCTION],category:"action",defaultConfig:{functionId:"",inputMapping:{},outputMapping:{}},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.HTTP,name:"HTTP Request",description:"Make an HTTP request",icon:X[U.HTTP],color:Q[U.HTTP],category:"action",defaultConfig:{method:"GET",url:"",headers:{},timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Success"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CONDITION,name:"Condition",description:"Branch based on a condition",icon:X[U.CONDITION],color:Q[U.CONDITION],category:"control",defaultConfig:{expression:"",language:"javascript"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"true",type:J.CONDITIONAL_TRUE,label:"True"},{id:"false",type:J.CONDITIONAL_FALSE,label:"False"}]}},{type:U.DELAY,name:"Delay",description:"Wait for a specified duration",icon:X[U.DELAY],color:Q[U.DELAY],category:"control",defaultConfig:{duration:1e3,unit:"milliseconds"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.PARALLEL,name:"Parallel",description:"Execute branches in parallel",icon:X[U.PARALLEL],color:Q[U.PARALLEL],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"branch1",type:J.PARALLEL_BRANCH,label:"Branch 1"},{id:"branch2",type:J.PARALLEL_BRANCH,label:"Branch 2"}]}},{type:U.LOOP,name:"Loop",description:"Iterate over an array",icon:X[U.LOOP],color:Q[U.LOOP],category:"control",defaultConfig:{iteratorVariable:"item",arrayExpression:"",maxIterations:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"item",type:J.LOOP_ITEM,label:"Each Item"},{id:"done",type:J.LOOP_DONE,label:"Done"}]}},{type:U.SWITCH,name:"Switch",description:"Route to a branch based on a value",icon:X[U.SWITCH],color:Q[U.SWITCH],category:"control",defaultConfig:{expression:"",language:"javascript",cases:[{value:"case1",label:"Case 1"},{value:"case2",label:"Case 2"}],includeDefault:!0},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"case1",type:J.OUTPUT,label:"Case 1"},{id:"case2",type:J.OUTPUT,label:"Case 2"},{id:"default",type:J.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:U.MERGE,name:"Merge",description:"Join multiple branches into one",icon:X[U.MERGE],color:Q[U.MERGE],category:"control",defaultConfig:{mode:"waitAll"},defaultPorts:{inputs:[{id:"in1",type:J.INPUT,label:"Input 1",multiple:!0},{id:"in2",type:J.INPUT,label:"Input 2",multiple:!0}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.WAIT,name:"Wait",description:"Pause until a signal or event is received",icon:X[U.WAIT],color:Q[U.WAIT],category:"control",defaultConfig:{signalName:"",timeout:3e5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Signal"},{id:"timeout",type:J.OUTPUT,label:"Timeout"}]}},{type:U.TRY_CATCH,name:"Try / Catch",description:"Catch errors from the connected branch",icon:X[U.TRY_CATCH],color:Q[U.TRY_CATCH],category:"control",defaultConfig:{catchTypes:["*"],errorVariable:"error"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"try",type:J.OUTPUT,label:"Try"},{id:"catch",type:J.ERROR,label:"Catch"}]}},{type:U.BREAK,name:"Break",description:"Exit the enclosing loop",icon:X[U.BREAK],color:Q[U.BREAK],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.TRANSFORM,name:"Transform",description:"Transform data using expressions",icon:X[U.TRANSFORM],color:Q[U.TRANSFORM],category:"data",defaultConfig:{transformExpression:"",language:"jsonata"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SUB_WORKFLOW,name:"Sub-Workflow",description:"Invoke another workflow",icon:X[U.SUB_WORKFLOW],color:Q[U.SUB_WORKFLOW],category:"action",defaultConfig:{workflowId:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.EMAIL,name:"Email",description:"Send an email",icon:X[U.EMAIL],color:Q[U.EMAIL],category:"action",defaultConfig:{to:"",cc:"",bcc:"",subject:"",body:"",bodyType:"text",fromName:"",replyTo:"",priority:"normal"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.EMAIL_READER,name:"Email Reader",description:"Read and manage emails from Gmail, Outlook, Yahoo, or IMAP",icon:X[U.EMAIL_READER],color:Q[U.EMAIL_READER],category:"action",defaultConfig:{provider:"imap",operation:"LIST",folder:"INBOX",limit:10,includeAttachments:!1,markAsReadOnFetch:!1,searchQuery:"",host:"",port:993,tls:!0,credentialPath:"",sinceDate:"",beforeDate:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SENDGRID,name:"SendGrid",description:"Send email via SendGrid API",icon:X[U.SENDGRID],color:Q[U.SENDGRID],category:"action",defaultConfig:{to:"",cc:"",bcc:"",fromEmail:"",fromName:"",replyTo:"",subject:"",body:"",contentType:"text/html",templateId:"",dynamicTemplateData:"",categories:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.OUTPUT,label:"Error"}]}},{type:U.NOTIFICATION,name:"Notification",description:"Send a notification",icon:X[U.NOTIFICATION],color:Q[U.NOTIFICATION],category:"action",defaultConfig:{channel:"",message:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.DATABASE,name:"Data",description:"Read and write data to databases",icon:X[U.DATABASE],color:"#6366F1",category:"data",defaultConfig:{operation:P.QUERY,dataSource:null,entity:null,filter:null,fields:{},select:[],orderBy:[],limit:null,offset:null,outputVariable:"results"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.VARIABLE,name:"Variable",description:"Set or get a workflow variable",icon:X[U.VARIABLE],color:Q[U.VARIABLE],category:"data",defaultConfig:{variableOperation:"set",variableName:"",value:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.CHATBOT,name:"Chatbot Trigger",description:"Trigger workflow from chatbot interactions",icon:X[U.CHATBOT],color:Q[U.CHATBOT],category:"trigger",defaultConfig:{triggerEvents:["MESSAGE_SENT"],chatbotSize:"medium",chatbotVariant:"floating",title:"Chat Assistant",subtitle:"Ask me anything",placeholder:"Type a message...",initialMessage:"",enableTypingIndicator:!0,enableSuggestions:!1,suggestions:[],loadingType:"dots",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"message",type:J.OUTPUT,label:"Message"},{id:"files",type:J.OUTPUT,label:"Files"},{id:"session",type:J.OUTPUT,label:"Session Start"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DEBUG,name:"Debug",description:"Display input, output, and variables for debugging",icon:X[U.DEBUG],color:Q[U.DEBUG],category:"data",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.UI_TABLE,name:"Table",description:"Display data as an interactive table",icon:X[U.UI_TABLE],color:Q[U.UI_TABLE],category:"display",defaultConfig:{tableColumns:[],dataExpression:"",tablePageSize:10,tableEnableFilter:!1,tableEnableSort:!0,tableFixedHeader:!1,tableSize:"normal",tableEmptyText:"No data available"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Data"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.WEB_SEARCH,name:"Web Search",description:"Search the web using Google, Bing, Brave, or DuckDuckGo",icon:X[U.WEB_SEARCH],color:Q[U.WEB_SEARCH],category:"web",defaultConfig:{provider:"google",queryField:"query",numResults:10,safeSearch:!0,timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Results"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.WEB_CRAWL,name:"Web Crawl",description:"Crawl web pages and extract text content",icon:X[U.WEB_CRAWL],color:Q[U.WEB_CRAWL],category:"web",defaultConfig:{urlField:"url",maxDepth:1,maxPages:10,sameDomainOnly:!0,renderJs:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Pages"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DOCUMENT_GENERATOR,name:"Document Generator",description:"Generate Word documents from templates with dynamic data",icon:X[U.DOCUMENT_GENERATOR],color:Q[U.DOCUMENT_GENERATOR],category:"documents",defaultConfig:{templateId:"",data:{},outputVariable:"documentResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.FILE_STORAGE,name:"File Storage",description:"Store files to S3, MinIO, or local filesystem",icon:X[U.FILE_STORAGE],color:Q[U.FILE_STORAGE],category:"storage",defaultConfig:{provider:"local",bucket:"default",path:"",fileField:"file",filenameField:"filename"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GOOGLE_CLOUD_STORAGE,name:"Google Cloud Storage",description:"Manage objects in Google Cloud Storage buckets",icon:X[U.GOOGLE_CLOUD_STORAGE],color:Q[U.GOOGLE_CLOUD_STORAGE],category:"storage",defaultConfig:{operation:"LIST",bucketName:"",objectPath:"",serviceAccountPath:"",signedUrlExpiration:3600},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.S3,name:"AWS S3",description:"Upload, download, and manage files in Amazon S3",icon:X[U.S3],color:Q[U.S3],category:"integrations",defaultConfig:{s3Operation:"upload",s3Bucket:"",s3Key:"",s3Region:"us-east-1",s3ContentType:"auto"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.EMBEDDING,name:"Embedding",description:"Convert text to vector embeddings",icon:X[U.EMBEDDING],color:Q[U.EMBEDDING],category:"rag",defaultConfig:{provider:"openai",model:"text-embedding-3-small",inputField:"text",batchSize:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Text"}],outputs:[{id:"out",type:J.OUTPUT,label:"Embedding"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DOCUMENT_LOADER,name:"Document Loader",description:"Load and parse documents (PDF, Word, HTML, etc.)",icon:X[U.DOCUMENT_LOADER],color:Q[U.DOCUMENT_LOADER],category:"rag",defaultConfig:{sourceType:"text",contentField:"content",filenameField:"filename",defaultType:"txt",timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Document"}],outputs:[{id:"out",type:J.OUTPUT,label:"Content"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TEXT_SPLITTER,name:"Text Splitter",description:"Split text into chunks for embedding",icon:X[U.TEXT_SPLITTER],color:Q[U.TEXT_SPLITTER],category:"rag",defaultConfig:{strategy:"recursive",chunkSize:1e3,chunkOverlap:200,contentField:"content"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Text"}],outputs:[{id:"out",type:J.OUTPUT,label:"Chunks"}]}},{type:U.VECTOR_WRITE,name:"Vector Write",description:"Store embeddings in vector database",icon:X[U.VECTOR_WRITE],color:Q[U.VECTOR_WRITE],category:"rag",defaultConfig:{collectionName:"",upsertMode:"replace"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Embeddings"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.VECTOR_SEARCH,name:"Vector Search",description:"Search for similar documents in vector store",icon:X[U.VECTOR_SEARCH],color:Q[U.VECTOR_SEARCH],category:"rag",defaultConfig:{collectionName:"",topK:5,minScore:.7,includeContent:!0,includeMetadata:!0,provider:"openai",model:"text-embedding-3-small"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Query"}],outputs:[{id:"out",type:J.OUTPUT,label:"Results"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CONTEXT_BUILDER,name:"Context Builder",description:"Format retrieved documents into LLM-ready context",icon:X[U.CONTEXT_BUILDER],color:Q[U.CONTEXT_BUILDER],category:"rag",defaultConfig:{template:"default",maxTokens:4e3,maxDocuments:10,includeSourceInfo:!0,includeSimilarityScore:!1,separator:"\n\n---\n\n"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Results"}],outputs:[{id:"out",type:J.OUTPUT,label:"Context"}]}},{type:U.RERANKER,name:"Reranker",description:"Re-rank search results by relevance",icon:X[U.RERANKER],color:Q[U.RERANKER],category:"rag",defaultConfig:{model:"cross-encoder",topK:5,threshold:.5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Results"}],outputs:[{id:"out",type:J.OUTPUT,label:"Reranked"}]}},{type:U.SUMMARIZATION,name:"Summarize Document",description:"Summarize long text using AI with chunking strategies",icon:X[U.SUMMARIZATION],color:Q[U.SUMMARIZATION],category:"action",defaultConfig:{inputField:"text",outputField:"summary",strategy:"map_reduce",chunkSize:4e3,chunkOverlap:200,model:"gpt-4o-mini"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Summary"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GUARDRAIL,name:"Guardrail",description:"Validate and filter LLM inputs/outputs for safety",icon:X[U.GUARDRAIL],color:Q[U.GUARDRAIL],category:"safety",defaultConfig:{mode:"input",contentField:"content",onFail:"block",checks:[]},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Passed"},{id:"blocked",type:J.ERROR,label:"Blocked"}]}},{type:U.SLACK_SEND_MESSAGE,name:"Slack: Send Message",description:"Send a message to a Slack channel or user",icon:X[U.SLACK_SEND_MESSAGE],color:Q[U.SLACK_SEND_MESSAGE],category:"slack",defaultConfig:{slackMethod:"api",botToken:"",channel:"",text:"",unfurlLinks:!0,unfurlMedia:!0},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_GET_CHANNEL_INFO,name:"Slack: Channel Info",description:"Get information about a Slack channel",icon:X[U.SLACK_GET_CHANNEL_INFO],color:Q[U.SLACK_GET_CHANNEL_INFO],category:"slack",defaultConfig:{botToken:"",channel:"",includeLocale:!1,includeNumMembers:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Info"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_LIST_CHANNELS,name:"Slack: List Channels",description:"List available Slack channels in the workspace",icon:X[U.SLACK_LIST_CHANNELS],color:Q[U.SLACK_LIST_CHANNELS],category:"slack",defaultConfig:{botToken:"",types:"public_channel",excludeArchived:!0,limit:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Channels"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_ADD_REACTION,name:"Slack: Add Reaction",description:"Add a reaction emoji to a Slack message",icon:X[U.SLACK_ADD_REACTION],color:Q[U.SLACK_ADD_REACTION],category:"slack",defaultConfig:{botToken:"",channel:"",timestamp:"",name:"thumbsup"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_UPLOAD_FILE,name:"Slack: Upload File",description:"Upload a file to a Slack channel",icon:X[U.SLACK_UPLOAD_FILE],color:Q[U.SLACK_UPLOAD_FILE],category:"slack",defaultConfig:{botToken:"",channels:"",filename:"",content:"",title:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GOOGLE_CALENDAR,name:"Google Calendar",description:"Create, read, update, and delete Google Calendar events",icon:X[U.GOOGLE_CALENDAR],color:Q[U.GOOGLE_CALENDAR],category:"google-calendar",defaultConfig:{googleCalendarCredential:"",googleCalendarId:"primary",googleCalendarOperation:"getAll",googleCalendarEventSummary:"",googleCalendarEventDescription:"",googleCalendarEventStart:"",googleCalendarEventEnd:"",googleCalendarEventAttendees:"",googleCalendarEventLocation:"",googleCalendarTimeMin:"",googleCalendarTimeMax:"",googleCalendarRecurrence:"",googleCalendarConferenceData:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SHOPIFY,name:"Shopify",description:"Manage Shopify products, orders, customers, inventory, and fulfillments via the Admin API",icon:X[U.SHOPIFY],color:Q[U.SHOPIFY],category:"shopify",defaultConfig:{resource:"ORDER",operation:P.LIST,resourceId:"",filters:"",shopDomain:"",accessToken:""},defaultPorts:{inputs:[{id:"input",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GITLAB,name:"GitLab",description:"Manage GitLab repositories, issues, merge requests, pipelines, and releases",icon:X[U.GITLAB],color:Q[U.GITLAB],category:"developer",defaultConfig:{gitlabBaseUrl:"https://gitlab.com",gitlabAccessToken:"",gitlabResource:"issue",gitlabOperation:"getAll",gitlabProjectId:"",gitlabTitle:"",gitlabDescription:"",gitlabLabels:[],gitlabAssigneeIds:[],gitlabSourceBranch:"",gitlabTargetBranch:"",gitlabRef:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TELEGRAM_SEND,name:"Telegram: Send Message",description:"Send a message to a Telegram chat with typing indicator and optional emoji reaction",icon:X[U.TELEGRAM_SEND],color:Q[U.TELEGRAM_SEND],category:"telegram",defaultConfig:{botToken:"",chatId:"",text:"",parseMode:"",replyToMessageId:"",showTyping:!0,reaction:"",disableNotification:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.ZENDESK,name:"Zendesk",description:"Manage Zendesk tickets, users, organizations, and satisfaction ratings",icon:X[U.ZENDESK],color:Q[U.ZENDESK],category:"zendesk",defaultConfig:{zendeskResource:"TICKET",zendeskOperation:"LIST",zendeskSubdomain:"",zendeskApiToken:"",zendeskEmail:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TWILIO_SMS,name:"Twilio: Send SMS",description:"Send an SMS or WhatsApp message via the Twilio API",icon:X[U.TWILIO_SMS],color:Q[U.TWILIO_SMS],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioMessageBody:"",twilioOperation:"send_sms",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TWILIO_VOICE,name:"Twilio: Voice Call",description:"Make a voice call via the Twilio API",icon:X[U.TWILIO_VOICE],color:Q[U.TWILIO_VOICE],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioOperation:"make_call",twilioVoiceUrl:"",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TELEGRAM_BOT,name:"Telegram Bot",description:"Receive messages from a Telegram bot via polling or webhook",icon:X[U.TELEGRAM_BOT],color:Q[U.TELEGRAM_BOT],category:"trigger",defaultConfig:{botToken:"",mode:"polling",pollingTimeout:30,allowedUpdates:[],allowedChatIds:"",allowedUserIds:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_SOCKET,name:"Slack Socket",description:"Receive events via Slack Socket Mode (WebSocket)",icon:X[U.SLACK_SOCKET],color:Q[U.SLACK_SOCKET],category:"trigger",defaultConfig:{appTokenPath:"",botTokenPath:"",eventTypes:[],interactionTypes:[],slashCommands:"",allowedTeamIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DISCORD_BOT,name:"Discord Bot",description:"Receive events from a Discord bot (Gateway WebSocket)",icon:X[U.DISCORD_BOT],color:Q[U.DISCORD_BOT],category:"trigger",defaultConfig:{botTokenPath:"",intents:["GUILDS","GUILD_MESSAGES","MESSAGE_CONTENT"],eventTypes:[],allowedGuildIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.WHATSAPP_WEBHOOK,name:"WhatsApp",description:"Receive messages via WhatsApp Business API",icon:X[U.WHATSAPP_WEBHOOK],color:Q[U.WHATSAPP_WEBHOOK],category:"trigger",defaultConfig:{phoneNumberId:"",businessAccountId:"",accessTokenPath:"",appSecretPath:"",verifyToken:"",webhookFields:["messages"],messageTypes:[],allowedSenders:"",ignoreStatusUpdates:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CUSTOM_WEBSOCKET,name:"WebSocket Listener",description:"Listen for messages on a custom WebSocket endpoint",icon:X[U.CUSTOM_WEBSOCKET],color:Q[U.CUSTOM_WEBSOCKET],category:"trigger",defaultConfig:{url:"",subprotocol:"",authMode:"none",tokenPath:"",username:"",passwordPath:"",headerName:"",headerValuePath:"",queryParamName:"token",queryParamValuePath:"",initialMessage:"",autoReconnect:!0,reconnectDelayMs:5e3,maxReconnectAttempts:0,pingIntervalSec:30,messageFormat:"json",filterExpression:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.RABBITMQ_TRIGGER,name:"RabbitMQ Trigger",description:"Triggers workflow on new messages from a RabbitMQ queue",icon:X[U.RABBITMQ_TRIGGER],color:Q[U.RABBITMQ_TRIGGER],category:"trigger",defaultConfig:{connectionUrl:"",queueName:"",exchange:"",routingKey:"#",autoAck:!1,contentType:"application/json",prefetchCount:1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.KAFKA,name:"Kafka: Send Message",description:"Produce a message to a Kafka topic",icon:X[U.KAFKA],color:Q[U.KAFKA],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaAcks:"all",kafkaCompressionType:"none"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.KAFKA_TRIGGER,name:"Kafka Trigger",description:"Triggers workflow on new messages from a Kafka topic",icon:X[U.KAFKA_TRIGGER],color:Q[U.KAFKA_TRIGGER],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaConsumerGroup:"nuraly-workflow",kafkaFromBeginning:!1,kafkaSessionTimeout:3e4},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CRON,name:"Cron Trigger",description:"Triggers workflow on a scheduled cron expression",icon:X[U.CRON],color:Q[U.CRON],category:"trigger",defaultConfig:{cronExpression:"0 * * * *",timezone:"UTC"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Tick"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.MCP,name:"MCP Server",description:"Connect to MCP server - provides tools to Agent/LLM nodes",icon:X[U.MCP],color:Q[U.MCP],category:"trigger",defaultConfig:{serverUrl:"",transportType:"streamable_http"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"}]}},{type:U.HUBSPOT,name:"HubSpot",description:"Manage contacts, deals, companies, and tickets via HubSpot CRM",icon:X[U.HUBSPOT],color:Q[U.HUBSPOT],category:"crm",defaultConfig:{hubspotAccessToken:"",hubspotResource:"contact",hubspotOperation:"getAll",hubspotProperties:{},hubspotFilterGroups:[],hubspotLimit:100,hubspotAssociations:[]},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.JIRA,name:"Jira",description:"Create, update, and manage Jira issues",icon:X[U.JIRA],color:Q[U.JIRA],category:"jira",defaultConfig:{operation:"createIssue",jiraInstanceUrl:"",projectKey:"",issueType:"Task",summary:"",description:"",assignee:"",priority:"Medium",labels:"",jqlQuery:"",transitionId:"",issueKey:"",comment:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.ELASTICSEARCH,name:"Elasticsearch",description:"Search, index, and manage documents in Elasticsearch",icon:X[U.ELASTICSEARCH],color:Q[U.ELASTICSEARCH],category:"integration",defaultConfig:{elasticsearchUrl:"",elasticsearchCredentialPath:"",elasticsearchOperation:"search",elasticsearchIndex:"",elasticsearchDocumentId:"",elasticsearchQueryBody:"",elasticsearchSize:10,elasticsearchFrom:0,elasticsearchRefresh:"false",elasticsearchTimeout:"30s",elasticsearchRouting:"",outputVariable:"elasticsearchResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CALENDLY_TRIGGER,name:"Calendly Trigger",description:"Triggers workflow when a Calendly event is booked or cancelled",icon:X[U.CALENDLY_TRIGGER],color:Q[U.CALENDLY_TRIGGER],category:"trigger",defaultConfig:{events:["invitee.created"],scope:"user",outputVariable:"calendlyEvent"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.NOTE,name:"Note",description:"Add annotations and comments to your workflow",icon:X[U.NOTE],color:Q[U.NOTE],category:"annotation",defaultConfig:{noteContent:"Add your note here...",noteBackgroundColor:"#fef08a",noteTextColor:"#713f12",noteFontSize:"medium",noteShowBorder:!1},defaultPorts:{inputs:[],outputs:[]}},{type:U.FRAME,name:"Frame",description:"Group related nodes together with a labeled container",icon:X[U.FRAME],color:Q[U.FRAME],category:"annotation",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:V.AGENT,name:"AI Agent",description:"Autonomous AI agent that can use tools",icon:X[V.AGENT],color:Q[V.AGENT],category:"agent",defaultConfig:{agentId:"",maxIterations:10},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"},{id:"retriever",type:J.INPUT,label:"Retriever"}],configs:[{id:"llm",type:J.CONFIG,label:"LLM"},{id:"prompt",type:J.CONFIG,label:"Prompt"},{id:"memory",type:J.CONFIG,label:"Memory"},{id:"tools",type:J.CONFIG,label:"Tools",multiple:!0},{id:"structured_output",type:J.CONFIG,label:"Structured Output"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:V.TOOL,name:"Tool",description:"A tool that can be used by an agent",icon:X[V.TOOL],color:Q[V.TOOL],category:"agent",defaultConfig:{toolName:"",description:"",parameters:[]},defaultPorts:{inputs:[{id:"function",type:J.INPUT,label:"Function"}],outputs:[{id:"out",type:J.OUTPUT,label:"Tool"}]}},{type:V.MEMORY,name:"Context Memory",description:"Conversation memory for agents - stores and retrieves chat history",icon:X[V.MEMORY],color:Q[V.MEMORY],category:"agent",defaultConfig:{cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Memory Config"}]}},{type:V.CONTEXT_MEMORY,name:"Context Memory (RAG)",description:"RAG-enhanced conversation memory with buffer, semantic, or hybrid modes",icon:X[V.CONTEXT_MEMORY],color:Q[V.CONTEXT_MEMORY],category:"agent",defaultConfig:{memoryType:"hybrid",cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Memory Config"}]}},{type:V.PROMPT,name:"Prompt",description:"Prompt template for LLM",icon:X[V.PROMPT],color:Q[V.PROMPT],category:"agent",defaultConfig:{template:"",variables:[]},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Prompt"}]}},{type:V.LLM,name:"LLM",description:"Large Language Model call",icon:X[V.LLM],color:Q[V.LLM],category:"agent",defaultConfig:{provider:"openai",modelName:"gpt-4",temperature:.7,maxTokens:2048},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Response"}]}},{type:V.RETRIEVER,name:"Retriever",description:"Retrieve relevant documents from vector store",icon:X[V.RETRIEVER],color:Q[V.RETRIEVER],category:"agent",defaultConfig:{vectorStoreId:"",topK:5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Query"}],outputs:[{id:"out",type:J.OUTPUT,label:"Documents"}]}},{type:V.CHAIN,name:"Chain",description:"Chain multiple LLM calls together",icon:X[V.CHAIN],color:Q[V.CHAIN],category:"agent",defaultConfig:{chainType:"sequential"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:V.ROUTER,name:"Router",description:"Route to different chains based on input",icon:X[V.ROUTER],color:Q[V.ROUTER],category:"agent",defaultConfig:{routingExpression:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"route1",type:J.OUTPUT,label:"Route 1"},{id:"route2",type:J.OUTPUT,label:"Route 2"},{id:"default",type:J.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:V.HUMAN_INPUT,name:"Human Input",description:"Wait for human input in the workflow",icon:X[V.HUMAN_INPUT],color:Q[V.HUMAN_INPUT],category:"agent",defaultConfig:{prompt:"",timeout:864e5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Context"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"}]}},{type:V.OUTPUT_PARSER,name:"Output Parser",description:"Parse LLM output into structured data",icon:X[V.OUTPUT_PARSER],color:Q[V.OUTPUT_PARSER],category:"agent",defaultConfig:{parserType:"json",schema:{}},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Raw Output"}],outputs:[{id:"out",type:J.OUTPUT,label:"Parsed Data"}]}},{type:V.STRUCTURED_OUTPUT,name:"Structured Output",description:"Define a JSON schema to enforce structured LLM output",icon:X[V.STRUCTURED_OUTPUT],color:Q[V.STRUCTURED_OUTPUT],category:"agent",defaultConfig:{schemaName:"structured_output",strict:!0,schema:{type:"object",properties:{},required:[],additionalProperties:!1}},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Schema"}]}},{type:H.TABLE,name:"Table",description:"Define a database table with columns",icon:X[H.TABLE],color:Q[H.TABLE],category:"db-tables-views",defaultConfig:{tableName:"",columns:[],primaryKey:""},defaultPorts:{inputs:[],outputs:[{id:"ref",type:J.OUTPUT,label:"Reference"}]}},{type:H.VIEW,name:"View",description:"Create a database view based on queries",icon:X[H.VIEW],color:Q[H.VIEW],category:"db-tables-views",defaultConfig:{viewName:"",query:"",materialized:!1},defaultPorts:{inputs:[{id:"source",type:J.INPUT,label:"Source Tables"}],outputs:[{id:"ref",type:J.OUTPUT,label:"Reference"}]}},{type:H.INDEX,name:"Index",description:"Create an index on table columns",icon:X[H.INDEX],color:Q[H.INDEX],category:"db-indexes-queries",defaultConfig:{indexName:"",indexColumns:[],unique:!1,indexType:"BTREE"},defaultPorts:{inputs:[{id:"table",type:J.INPUT,label:"Table"}],outputs:[]}},{type:H.RELATIONSHIP,name:"Relationship",description:"Define foreign key relationships between tables",icon:X[H.RELATIONSHIP],color:Q[H.RELATIONSHIP],category:"db-relations-constraints",defaultConfig:{relationshipType:"ONE_TO_MANY",sourceColumn:"",targetColumn:"",onDelete:"CASCADE",onUpdate:"CASCADE"},defaultPorts:{inputs:[{id:"source",type:J.INPUT,label:"Source Table"},{id:"target",type:J.INPUT,label:"Target Table"}],outputs:[]}},{type:H.CONSTRAINT,name:"Constraint",description:"Add constraints (unique, check, foreign_key)",icon:X[H.CONSTRAINT],color:Q[H.CONSTRAINT],category:"db-relations-constraints",defaultConfig:{constraintName:"",constraintType:"UNIQUE",constraintColumns:[],checkExpression:""},defaultPorts:{inputs:[{id:"table",type:J.INPUT,label:"Table"}],outputs:[]}},{type:H.QUERY,name:"Query",description:"Define saved queries or stored procedures",icon:X[H.QUERY],color:Q[H.QUERY],category:"db-indexes-queries",defaultConfig:{queryName:"",queryText:"",parameters:[]},defaultPorts:{inputs:[{id:"tables",type:J.INPUT,label:"Tables"}],outputs:[{id:"result",type:J.OUTPUT,label:"Result Schema"}]}},{type:q.STICKY_NOTE,name:"Sticky Note",description:"Add a sticky note to the whiteboard",icon:X[q.STICKY_NOTE],color:Q[q.STICKY_NOTE],category:"wb-notes-text",defaultConfig:{textContent:"",backgroundColor:"#fef08a",textColor:"#713f12",fontSize:14,width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.TEXT_BLOCK,name:"Text Block",description:"Add a text block to the whiteboard",icon:X[q.TEXT_BLOCK],color:Q[q.TEXT_BLOCK],category:"wb-notes-text",defaultConfig:{textContent:"",fontSize:16,fontWeight:"normal",textAlign:"left",width:200,height:50},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_RECTANGLE,name:"Rectangle",description:"Add a rectangle shape",icon:X[q.SHAPE_RECTANGLE],color:Q[q.SHAPE_RECTANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#3b82f6"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_CIRCLE,name:"Circle",description:"Add a circle shape",icon:X[q.SHAPE_CIRCLE],color:Q[q.SHAPE_CIRCLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#8b5cf6"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_DIAMOND,name:"Diamond",description:"Add a diamond shape",icon:X[q.SHAPE_DIAMOND],color:Q[q.SHAPE_DIAMOND],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f59e0b"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_TRIANGLE,name:"Triangle",description:"Add a triangle shape",icon:X[q.SHAPE_TRIANGLE],color:Q[q.SHAPE_TRIANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#22c55e"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_ARROW,name:"Arrow",description:"Add an arrow shape",icon:X[q.SHAPE_ARROW],color:Q[q.SHAPE_ARROW],category:"wb-shapes",defaultConfig:{width:120,height:60,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_LINE,name:"Line",description:"Add a line shape",icon:X[q.SHAPE_LINE],color:Q[q.SHAPE_LINE],category:"wb-shapes",defaultConfig:{width:120,height:4,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_STAR,name:"Star",description:"Add a star shape",icon:X[q.SHAPE_STAR],color:Q[q.SHAPE_STAR],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f97316"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_HEXAGON,name:"Hexagon",description:"Add a hexagon shape",icon:X[q.SHAPE_HEXAGON],color:Q[q.SHAPE_HEXAGON],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#ec4899"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.IMAGE,name:"Image",description:"Add an image to the whiteboard",icon:X[q.IMAGE],color:Q[q.IMAGE],category:"wb-media",defaultConfig:{imageUrl:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.DRAWING,name:"Drawing",description:"Add a freehand drawing area",icon:X[q.DRAWING],color:Q[q.DRAWING],category:"wb-media",defaultConfig:{pathData:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.VOTING,name:"Voting",description:"Add a voting element for collaboration",icon:X[q.VOTING],color:Q[q.VOTING],category:"wb-media",defaultConfig:{textContent:"Vote",width:200,height:150},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.MERMAID,name:"Mermaid Diagram",description:"Add a Mermaid diagram to the whiteboard",icon:X[q.MERMAID],color:Q[q.MERMAID],category:"wb-media",defaultConfig:{textContent:"graph TD\n A[Start] --\x3e B[End]",width:400,height:300},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.ANCHOR,name:"Anchor",description:"Navigation anchor — other elements can link here",icon:X[q.ANCHOR],color:Q[q.ANCHOR],category:"wb-navigation",defaultConfig:{anchorLabel:"Anchor",width:120,height:48},defaultPorts:{inputs:[],outputs:[]}},{type:q.FRAME,name:"Frame",description:"Group whiteboard elements together",icon:X[q.FRAME],color:Q[q.FRAME],category:"wb-layout",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:q.WORKFLOW,name:"Workflow",description:"Embed a workflow on the whiteboard",icon:X[q.WORKFLOW],color:Q[q.WORKFLOW],category:"wb-media",defaultConfig:{workflowId:"",workflowName:"Workflow",workflowSteps:[],width:280,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.DATABASE,name:"Database Table",description:"Embed a database table on the whiteboard",icon:X[q.DATABASE],color:Q[q.DATABASE],category:"wb-media",defaultConfig:{dbTableId:"",dbTableName:"Table",dbTableColumns:[],dbPrimaryKey:"",width:280,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}}],ee=[{id:"trigger",name:"Triggers",icon:"zap",nodeTypes:[U.START,U.HTTP_START,U.CHAT_START,U.CRON,U.TELEGRAM_BOT,U.SLACK_SOCKET,U.DISCORD_BOT,U.WHATSAPP_WEBHOOK,U.CUSTOM_WEBSOCKET,U.MCP,U.CALENDLY_TRIGGER],canvasType:G.WORKFLOW},{id:"control",name:"Control Flow",icon:"git-branch",nodeTypes:[U.END,U.HTTP_END,U.CONDITION,U.SWITCH,U.DELAY,U.WAIT,U.PARALLEL,U.MERGE,U.LOOP,U.BREAK,U.TRY_CATCH],canvasType:G.WORKFLOW},{id:"action",name:"Actions",icon:"zap",nodeTypes:[U.FUNCTION,U.HTTP,U.INFORMATION_EXTRACTOR,U.OCR,U.CHAT_OUTPUT,U.SOCIAL_POST,U.SUB_WORKFLOW,U.EMAIL,U.EMAIL_READER,U.SENDGRID,U.NOTIFICATION,U.DOCUMENT_GENERATOR,U.SUMMARIZATION],canvasType:G.WORKFLOW},{id:"data",name:"Data",icon:"database",nodeTypes:[U.TRANSFORM,U.DATABASE,U.ELASTICSEARCH,U.VARIABLE,U.DEBUG],canvasType:G.WORKFLOW},{id:"web",name:"Web",icon:"globe",nodeTypes:[U.WEB_SEARCH,U.WEB_CRAWL],canvasType:G.WORKFLOW},{id:"storage",name:"Storage",icon:"hard-drive",nodeTypes:[U.FILE_STORAGE,U.GOOGLE_CLOUD_STORAGE,U.S3],canvasType:G.WORKFLOW},{id:"messaging",name:"Messaging",icon:"inbox",nodeTypes:[U.RABBITMQ_TRIGGER,U.KAFKA,U.KAFKA_TRIGGER],canvasType:G.WORKFLOW},{id:"rag",name:"RAG",icon:"layers",nodeTypes:[U.DOCUMENT_LOADER,U.TEXT_SPLITTER,U.EMBEDDING,U.VECTOR_WRITE,U.VECTOR_SEARCH,U.CONTEXT_BUILDER,U.RERANKER],canvasType:G.WORKFLOW},{id:"safety",name:"Safety",icon:"shield",nodeTypes:[U.GUARDRAIL],canvasType:G.WORKFLOW},{id:"display",name:"Display",icon:"monitor",nodeTypes:[U.UI_TABLE],canvasType:G.WORKFLOW},{id:"google-calendar",name:"Google Calendar",icon:"calendar",nodeTypes:[U.GOOGLE_CALENDAR],canvasType:G.WORKFLOW},{id:"shopify",name:"Shopify",icon:"shopping-cart",nodeTypes:[U.SHOPIFY],canvasType:G.WORKFLOW},{id:"twilio",name:"Twilio",icon:"phone",nodeTypes:[U.TWILIO_SMS,U.TWILIO_VOICE],canvasType:G.WORKFLOW},{id:"telegram",name:"Telegram",icon:"send",nodeTypes:[U.TELEGRAM_SEND],canvasType:G.WORKFLOW},{id:"zendesk",name:"Zendesk",icon:"ticket",nodeTypes:[U.ZENDESK],canvasType:G.WORKFLOW},{id:"slack",name:"Slack",icon:"message-square",nodeTypes:[U.SLACK_SEND_MESSAGE,U.SLACK_GET_CHANNEL_INFO,U.SLACK_LIST_CHANNELS,U.SLACK_ADD_REACTION,U.SLACK_UPLOAD_FILE],canvasType:G.WORKFLOW},{id:"crm",name:"CRM",icon:"users",nodeTypes:[U.HUBSPOT],canvasType:G.WORKFLOW},{id:"jira",name:"Jira",icon:"ticket",nodeTypes:[U.JIRA],canvasType:G.WORKFLOW},{id:"gitlab",name:"GitLab",icon:"git-merge",nodeTypes:[U.GITLAB],canvasType:G.WORKFLOW},{id:"annotation",name:"Annotations",icon:"message-square",nodeTypes:[U.NOTE,U.FRAME],canvasType:G.WORKFLOW},{id:"agent",name:"AI Agents",icon:"cpu",nodeTypes:[V.AGENT,V.LLM,V.PROMPT,V.MEMORY,V.CONTEXT_MEMORY,V.TOOL,V.RETRIEVER,V.CHAIN,V.ROUTER,V.HUMAN_INPUT,V.OUTPUT_PARSER,V.STRUCTURED_OUTPUT],canvasType:G.WORKFLOW},{id:"db-tables-views",name:"Tables & Views",icon:"table",nodeTypes:[H.TABLE,H.VIEW],canvasType:G.DATABASE},{id:"db-relations-constraints",name:"Relations & Constraints",icon:"git-merge",nodeTypes:[H.RELATIONSHIP,H.CONSTRAINT],canvasType:G.DATABASE},{id:"db-indexes-queries",name:"Indexes & Queries",icon:"list",nodeTypes:[H.INDEX,H.QUERY],canvasType:G.DATABASE},{id:"wb-notes-text",name:"Notes & Text",icon:"sticky-note",nodeTypes:[q.STICKY_NOTE,q.TEXT_BLOCK],canvasType:G.WHITEBOARD},{id:"wb-shapes",name:"Shapes",icon:"square",nodeTypes:[q.SHAPE_RECTANGLE,q.SHAPE_CIRCLE,q.SHAPE_DIAMOND,q.SHAPE_TRIANGLE,q.SHAPE_ARROW,q.SHAPE_LINE,q.SHAPE_STAR,q.SHAPE_HEXAGON],canvasType:G.WHITEBOARD},{id:"wb-media",name:"Media & Interactive",icon:"image",nodeTypes:[q.IMAGE,q.DRAWING,q.VOTING,q.MERMAID],canvasType:G.WHITEBOARD},{id:"wb-navigation",name:"Navigation",icon:"anchor",nodeTypes:[q.ANCHOR],canvasType:G.WHITEBOARD},{id:"wb-layout",name:"Layout",icon:"frame",nodeTypes:[q.FRAME],canvasType:G.WHITEBOARD}];function te(e){return Z.find(t=>t.type===e)}function ie(e){return Object.values(V).includes(e)}function ne(e){return Object.values(U).includes(e)}function ae(e){return Object.values(H).includes(e)}function oe(e){return Object.values(q).includes(e)}function se(e){return ee.filter(t=>t.canvasType===e)}function re(e,t,i){var n;const a=te(e);return a?{id:i||"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),name:a.name,type:a.type,position:t,configuration:Object.assign({},a.defaultConfig),ports:{inputs:a.defaultPorts.inputs.map(e=>Object.assign({},e)),configs:null===(n=a.defaultPorts.configs)||void 0===n?void 0:n.map(e=>Object.assign({},e)),outputs:a.defaultPorts.outputs.map(e=>Object.assign({},e))},metadata:{icon:a.icon,color:a.color,description:a.description},status:K.IDLE,selected:!1}:null}const le=[{name:"Yellow",bg:"#fef08a",text:"#713f12"},{name:"Blue",bg:"#bfdbfe",text:"#1e3a5f"},{name:"Green",bg:"#bbf7d0",text:"#14532d"},{name:"Pink",bg:"#fbcfe8",text:"#831843"},{name:"Orange",bg:"#fed7aa",text:"#7c2d12"},{name:"Purple",bg:"#ddd6fe",text:"#4c1d95"},{name:"Gray",bg:"#e5e7eb",text:"#374151"}],ce=[{name:"Indigo",bg:"rgba(99, 102, 241, 0.05)",border:"rgba(99, 102, 241, 0.3)",solid:"#6366f1"},{name:"Blue",bg:"rgba(59, 130, 246, 0.05)",border:"rgba(59, 130, 246, 0.3)",solid:"#3b82f6"},{name:"Green",bg:"rgba(34, 197, 94, 0.05)",border:"rgba(34, 197, 94, 0.3)",solid:"#22c55e"},{name:"Orange",bg:"rgba(249, 115, 22, 0.05)",border:"rgba(249, 115, 22, 0.3)",solid:"#f97316"},{name:"Red",bg:"rgba(239, 68, 68, 0.05)",border:"rgba(239, 68, 68, 0.3)",solid:"#ef4444"},{name:"Purple",bg:"rgba(168, 85, 247, 0.05)",border:"rgba(168, 85, 247, 0.3)",solid:"#a855f7"},{name:"Gray",bg:"rgba(107, 114, 128, 0.05)",border:"rgba(107, 114, 128, 0.3)",solid:"#6b7280"}];function de(e){return e===U.NOTE||e===U.FRAME}function pe(e){return e===U.FRAME}function he(e){return e===U.NOTE}const ue=new Set([U.TELEGRAM_BOT,U.SLACK_SOCKET,U.DISCORD_BOT,U.WHATSAPP_WEBHOOK,U.CUSTOM_WEBSOCKET,U.RABBITMQ_TRIGGER,U.CALENDLY_TRIGGER,U.KAFKA_TRIGGER,U.CRON]);function be(e){return ue.has(e)}
|
|
106
|
+
*/var U,V,H,q,G,W,K,J,Y;!function(e){e.START="START",e.END="END",e.HTTP_START="HTTP_START",e.HTTP_END="HTTP_END",e.CHAT_START="CHAT_START",e.CHAT_OUTPUT="CHAT_OUTPUT",e.SOCIAL_POST="SOCIAL_POST",e.FUNCTION="FUNCTION",e.HTTP="HTTP",e.CONDITION="CONDITION",e.SWITCH="SWITCH",e.DELAY="DELAY",e.PARALLEL="PARALLEL",e.MERGE="MERGE",e.LOOP="LOOP",e.BREAK="BREAK",e.WAIT="WAIT",e.TRY_CATCH="TRY_CATCH",e.TRANSFORM="TRANSFORM",e.SUB_WORKFLOW="SUB_WORKFLOW",e.EMAIL="EMAIL",e.EMAIL_READER="EMAIL_READER",e.SENDGRID="SENDGRID",e.NOTIFICATION="NOTIFICATION",e.DATABASE="DATABASE",e.VARIABLE="VARIABLE",e.CHATBOT="CHATBOT",e.DEBUG="DEBUG",e.LLM="LLM",e.OCR="OCR",e.WEB_SEARCH="WEB_SEARCH",e.WEB_CRAWL="WEB_CRAWL",e.DOCUMENT_GENERATOR="DOCUMENT_GENERATOR",e.FILE_STORAGE="FILE_STORAGE",e.GOOGLE_CLOUD_STORAGE="GOOGLE_CLOUD_STORAGE",e.S3="S3",e.EMBEDDING="EMBEDDING",e.DOCUMENT_LOADER="DOCUMENT_LOADER",e.TEXT_SPLITTER="TEXT_SPLITTER",e.VECTOR_WRITE="VECTOR_WRITE",e.VECTOR_SEARCH="VECTOR_SEARCH",e.CONTEXT_BUILDER="CONTEXT_BUILDER",e.SUMMARIZATION="SUMMARIZATION",e.GUARDRAIL="GUARDRAIL",e.SLACK_SEND_MESSAGE="SLACK_SEND_MESSAGE",e.SLACK_GET_CHANNEL_INFO="SLACK_GET_CHANNEL_INFO",e.SLACK_LIST_CHANNELS="SLACK_LIST_CHANNELS",e.SLACK_ADD_REACTION="SLACK_ADD_REACTION",e.SLACK_UPLOAD_FILE="SLACK_UPLOAD_FILE",e.RERANKER="RERANKER",e.SHOPIFY="SHOPIFY",e.TELEGRAM_SEND="TELEGRAM_SEND",e.TWILIO_SMS="TWILIO_SMS",e.TWILIO_VOICE="TWILIO_VOICE",e.TELEGRAM_BOT="TELEGRAM_BOT",e.SLACK_SOCKET="SLACK_SOCKET",e.DISCORD_BOT="DISCORD_BOT",e.WHATSAPP_WEBHOOK="WHATSAPP_WEBHOOK",e.CUSTOM_WEBSOCKET="CUSTOM_WEBSOCKET",e.GOOGLE_CALENDAR="GOOGLE_CALENDAR",e.RABBITMQ_TRIGGER="RABBITMQ_TRIGGER",e.KAFKA="KAFKA",e.KAFKA_TRIGGER="KAFKA_TRIGGER",e.ZENDESK="ZENDESK",e.GITLAB="GITLAB",e.MCP="MCP",e.INFORMATION_EXTRACTOR="INFORMATION_EXTRACTOR",e.HUBSPOT="HUBSPOT",e.JIRA="JIRA",e.ELASTICSEARCH="ELASTICSEARCH",e.CALENDLY_TRIGGER="CALENDLY_TRIGGER",e.UI_TABLE="UI_TABLE",e.NOTE="NOTE",e.FRAME="FRAME",e.CRON="CRON"}(U||(U={})),function(e){e.AGENT="AGENT",e.TOOL="TOOL",e.MEMORY="MEMORY",e.CONTEXT_MEMORY="CONTEXT_MEMORY",e.PROMPT="PROMPT",e.LLM="AGENT_LLM",e.RETRIEVER="RETRIEVER",e.CHAIN="CHAIN",e.ROUTER="ROUTER",e.HUMAN_INPUT="HUMAN_INPUT",e.OUTPUT_PARSER="OUTPUT_PARSER",e.STRUCTURED_OUTPUT="STRUCTURED_OUTPUT"}(V||(V={})),function(e){e.TABLE="DB_TABLE",e.VIEW="DB_VIEW",e.INDEX="DB_INDEX",e.RELATIONSHIP="DB_RELATIONSHIP",e.CONSTRAINT="DB_CONSTRAINT",e.QUERY="DB_QUERY"}(H||(H={})),function(e){e.STICKY_NOTE="WB_STICKY_NOTE",e.SHAPE_RECTANGLE="WB_SHAPE_RECTANGLE",e.SHAPE_CIRCLE="WB_SHAPE_CIRCLE",e.SHAPE_DIAMOND="WB_SHAPE_DIAMOND",e.SHAPE_TRIANGLE="WB_SHAPE_TRIANGLE",e.SHAPE_ARROW="WB_SHAPE_ARROW",e.SHAPE_LINE="WB_SHAPE_LINE",e.SHAPE_STAR="WB_SHAPE_STAR",e.SHAPE_HEXAGON="WB_SHAPE_HEXAGON",e.TEXT_BLOCK="WB_TEXT_BLOCK",e.IMAGE="WB_IMAGE",e.DRAWING="WB_DRAWING",e.FRAME="WB_FRAME",e.VOTING="WB_VOTING",e.MERMAID="WB_MERMAID",e.ANCHOR="WB_ANCHOR",e.WORKFLOW="WB_WORKFLOW",e.DATABASE="WB_DATABASE"}(q||(q={})),function(e){e.WORKFLOW="WORKFLOW",e.DATABASE="DATABASE",e.WHITEBOARD="WHITEBOARD"}(G||(G={})),function(e){e.DISCONNECTED="DISCONNECTED",e.CONNECTING="CONNECTING",e.CONNECTED="CONNECTED",e.PAUSED="PAUSED",e.HANDOFF_PENDING="HANDOFF_PENDING",e.ERROR="ERROR"}(W||(W={})),function(e){e.IDLE="IDLE",e.PENDING="PENDING",e.RUNNING="RUNNING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e.CANCELLED="CANCELLED",e.PAUSED="PAUSED",e.WAITING="WAITING"}(K||(K={})),function(e){e.INPUT="INPUT",e.OUTPUT="OUTPUT",e.CONFIG="CONFIG",e.CONDITIONAL_TRUE="CONDITIONAL_TRUE",e.CONDITIONAL_FALSE="CONDITIONAL_FALSE",e.CONDITIONAL_DEFAULT="CONDITIONAL_DEFAULT",e.LOOP_ITEM="LOOP_ITEM",e.LOOP_DONE="LOOP_DONE",e.PARALLEL_BRANCH="PARALLEL_BRANCH",e.ERROR="ERROR"}(J||(J={})),function(e){e.SELECT="SELECT",e.PAN="PAN",e.CONNECT="CONNECT",e.ADD_NODE="ADD_NODE"}(Y||(Y={}));const Q={[U.START]:"#22c55e",[U.END]:"#ef4444",[U.HTTP_START]:"#059669",[U.HTTP_END]:"#dc2626",[U.CHAT_START]:"#0ea5e9",[U.CHAT_OUTPUT]:"#06b6d4",[U.SOCIAL_POST]:"#7c3aed",[U.FUNCTION]:"#3b82f6",[U.HTTP]:"#8b5cf6",[U.CONDITION]:"#f59e0b",[U.SWITCH]:"#eab308",[U.DELAY]:"#6b7280",[U.PARALLEL]:"#06b6d4",[U.MERGE]:"#0891b2",[U.LOOP]:"#ec4899",[U.BREAK]:"#991b1b",[U.WAIT]:"#a78bfa",[U.TRY_CATCH]:"#f43f5e",[U.TRANSFORM]:"#14b8a6",[U.SUB_WORKFLOW]:"#6366f1",[U.EMAIL]:"#f97316",[U.EMAIL_READER]:"#06b6d4",[U.SENDGRID]:"#1A82E2",[U.NOTIFICATION]:"#84cc16",[U.DATABASE]:"#a855f7",[U.VARIABLE]:"#64748b",[U.CHATBOT]:"#0ea5e9",[U.DEBUG]:"#f97316",[U.LLM]:"#22d3ee",[U.OCR]:"#0d9488",[U.INFORMATION_EXTRACTOR]:"#8B5CF6",[U.WEB_SEARCH]:"#3b82f6",[U.WEB_CRAWL]:"#6366f1",[U.DOCUMENT_GENERATOR]:"#0284c7",[U.FILE_STORAGE]:"#f59e0b",[U.GOOGLE_CLOUD_STORAGE]:"#4285f4",[U.S3]:"#FF9900",[U.EMBEDDING]:"#8b5cf6",[U.DOCUMENT_LOADER]:"#ec4899",[U.TEXT_SPLITTER]:"#14b8a6",[U.VECTOR_WRITE]:"#10b981",[U.VECTOR_SEARCH]:"#06b6d4",[U.CONTEXT_BUILDER]:"#a855f7",[U.SUMMARIZATION]:"#8B5CF6",[U.GUARDRAIL]:"#ef4444",[U.SLACK_SEND_MESSAGE]:"#4A154B",[U.SLACK_GET_CHANNEL_INFO]:"#4A154B",[U.SLACK_LIST_CHANNELS]:"#4A154B",[U.SLACK_ADD_REACTION]:"#4A154B",[U.SLACK_UPLOAD_FILE]:"#4A154B",[U.RERANKER]:"#d946ef",[U.SHOPIFY]:"#96bf48",[U.TELEGRAM_SEND]:"#0088cc",[U.TWILIO_SMS]:"#F22F46",[U.TWILIO_VOICE]:"#F22F46",[U.TELEGRAM_BOT]:"#0088cc",[U.SLACK_SOCKET]:"#4A154B",[U.DISCORD_BOT]:"#5865F2",[U.WHATSAPP_WEBHOOK]:"#25D366",[U.CUSTOM_WEBSOCKET]:"#6366f1",[U.GOOGLE_CALENDAR]:"#4285F4",[U.RABBITMQ_TRIGGER]:"#FF6600",[U.KAFKA]:"#231F20",[U.KAFKA_TRIGGER]:"#231F20",[U.ZENDESK]:"#03363d",[U.GITLAB]:"#FC6D26",[U.MCP]:"#7c3aed",[U.HUBSPOT]:"#FF7A59",[U.JIRA]:"#0052CC",[U.ELASTICSEARCH]:"#00bfb3",[U.CALENDLY_TRIGGER]:"#006BFF",[U.UI_TABLE]:"#0891b2",[U.NOTE]:"#fef08a",[U.FRAME]:"#6366f1",[U.CRON]:"#d97706",[V.AGENT]:"#10b981",[V.TOOL]:"#0ea5e9",[V.MEMORY]:"#d946ef",[V.CONTEXT_MEMORY]:"#c026d3",[V.PROMPT]:"#f472b6",[V.LLM]:"#22d3ee",[V.RETRIEVER]:"#a78bfa",[V.CHAIN]:"#fbbf24",[V.ROUTER]:"#fb923c",[V.HUMAN_INPUT]:"#4ade80",[V.OUTPUT_PARSER]:"#2dd4bf",[V.STRUCTURED_OUTPUT]:"#f59e0b",[H.TABLE]:"#64748b",[H.VIEW]:"#a855f7",[H.INDEX]:"#f59e0b",[H.RELATIONSHIP]:"#ec4899",[H.CONSTRAINT]:"#ef4444",[H.QUERY]:"#06b6d4",[q.STICKY_NOTE]:"#fef08a",[q.SHAPE_RECTANGLE]:"#3b82f6",[q.SHAPE_CIRCLE]:"#8b5cf6",[q.SHAPE_DIAMOND]:"#f59e0b",[q.SHAPE_TRIANGLE]:"#22c55e",[q.SHAPE_ARROW]:"#6b7280",[q.SHAPE_LINE]:"#6b7280",[q.SHAPE_STAR]:"#f97316",[q.SHAPE_HEXAGON]:"#ec4899",[q.TEXT_BLOCK]:"#111827",[q.IMAGE]:"#06b6d4",[q.DRAWING]:"#14b8a6",[q.FRAME]:"#6366f1",[q.VOTING]:"#ef4444",[q.MERMAID]:"#8b5cf6",[q.ANCHOR]:"#f59e0b",[q.WORKFLOW]:"#6366f1",[q.DATABASE]:"#64748b"},X={[U.START]:"play",[U.END]:"stop",[U.HTTP_START]:"download",[U.HTTP_END]:"upload",[U.CHAT_START]:"message-circle",[U.CHAT_OUTPUT]:"message-square",[U.SOCIAL_POST]:"send",[U.FUNCTION]:"code",[U.HTTP]:"globe",[U.CONDITION]:"git-branch",[U.SWITCH]:"git-fork",[U.DELAY]:"clock",[U.PARALLEL]:"git-merge",[U.MERGE]:"merge",[U.LOOP]:"repeat",[U.BREAK]:"circle-stop",[U.WAIT]:"hourglass",[U.TRY_CATCH]:"shield-alert",[U.TRANSFORM]:"shuffle",[U.SUB_WORKFLOW]:"layers",[U.EMAIL]:"mail",[U.EMAIL_READER]:"mail-open",[U.SENDGRID]:"send",[U.NOTIFICATION]:"bell",[U.DATABASE]:"database",[U.VARIABLE]:"box",[U.CHATBOT]:"message-circle",[U.DEBUG]:"bug",[U.LLM]:"brain",[U.OCR]:"scan",[U.INFORMATION_EXTRACTOR]:"search",[U.WEB_SEARCH]:"search",[U.WEB_CRAWL]:"globe",[U.DOCUMENT_GENERATOR]:"file-text",[U.FILE_STORAGE]:"hard-drive",[U.GOOGLE_CLOUD_STORAGE]:"cloud",[U.S3]:"cloud",[U.EMBEDDING]:"hash",[U.DOCUMENT_LOADER]:"file-text",[U.TEXT_SPLITTER]:"scissors",[U.VECTOR_WRITE]:"database",[U.VECTOR_SEARCH]:"search",[U.CONTEXT_BUILDER]:"layers",[U.SUMMARIZATION]:"file-minus",[U.GUARDRAIL]:"shield",[U.SLACK_SEND_MESSAGE]:"message-square",[U.SLACK_GET_CHANNEL_INFO]:"hash",[U.SLACK_LIST_CHANNELS]:"list",[U.SLACK_ADD_REACTION]:"smile-plus",[U.SLACK_UPLOAD_FILE]:"upload",[U.RERANKER]:"arrow-up-down",[U.SHOPIFY]:"shopping-cart",[U.TELEGRAM_SEND]:"send",[U.TWILIO_SMS]:"message-square",[U.TWILIO_VOICE]:"phone",[U.TELEGRAM_BOT]:"send",[U.SLACK_SOCKET]:"message-square",[U.DISCORD_BOT]:"gamepad-2",[U.WHATSAPP_WEBHOOK]:"phone",[U.CUSTOM_WEBSOCKET]:"radio",[U.GOOGLE_CALENDAR]:"calendar",[U.RABBITMQ_TRIGGER]:"inbox",[U.KAFKA]:"message-square-share",[U.KAFKA_TRIGGER]:"radio",[U.ZENDESK]:"ticket",[U.GITLAB]:"git-merge",[U.MCP]:"plug",[U.HUBSPOT]:"users",[U.JIRA]:"ticket",[U.ELASTICSEARCH]:"search",[U.CALENDLY_TRIGGER]:"calendar",[U.UI_TABLE]:"table",[U.NOTE]:"sticky-note",[U.FRAME]:"square",[U.CRON]:"timer",[V.AGENT]:"cpu",[V.TOOL]:"tool",[V.MEMORY]:"hard-drive",[V.CONTEXT_MEMORY]:"brain",[V.PROMPT]:"message-square",[V.LLM]:"brain",[V.RETRIEVER]:"search",[V.CHAIN]:"link",[V.ROUTER]:"git-pull-request",[V.HUMAN_INPUT]:"user",[V.OUTPUT_PARSER]:"file-text",[V.STRUCTURED_OUTPUT]:"braces",[H.TABLE]:"table",[H.VIEW]:"eye",[H.INDEX]:"list",[H.RELATIONSHIP]:"git-merge",[H.CONSTRAINT]:"shield",[H.QUERY]:"terminal",[q.STICKY_NOTE]:"sticky-note",[q.SHAPE_RECTANGLE]:"square",[q.SHAPE_CIRCLE]:"circle",[q.SHAPE_DIAMOND]:"diamond",[q.SHAPE_TRIANGLE]:"triangle",[q.SHAPE_ARROW]:"arrow-right",[q.SHAPE_LINE]:"minus",[q.SHAPE_STAR]:"star",[q.SHAPE_HEXAGON]:"hexagon",[q.TEXT_BLOCK]:"type",[q.IMAGE]:"image",[q.DRAWING]:"pen-tool",[q.FRAME]:"frame",[q.VOTING]:"thumbs-up",[q.MERMAID]:"git-branch",[q.ANCHOR]:"anchor",[q.WORKFLOW]:"layers",[q.DATABASE]:"table"},Z=[{type:U.START,name:"Start",description:"Entry point of the workflow",icon:X[U.START],color:Q[U.START],category:"control",defaultConfig:{},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.END,name:"End",description:"Exit point of the workflow",icon:X[U.END],color:Q[U.END],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.HTTP_START,name:"HTTP Trigger",description:"Start workflow from HTTP request",icon:X[U.HTTP_START],color:Q[U.HTTP_START],category:"trigger",defaultConfig:{httpPath:"/webhook",httpMethod:"POST",httpAuth:"none",httpAuthSecretKey:"",httpCors:!0,httpRateLimit:100,httpRequestSchema:{}},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Request"}]}},{type:U.HTTP_END,name:"HTTP Response",description:"Return HTTP response to caller",icon:X[U.HTTP_END],color:Q[U.HTTP_END],category:"control",defaultConfig:{httpStatusCode:200,httpResponseHeaders:{"Content-Type":"application/json"},httpResponseBody:"{{data}}",httpContentType:"application/json"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.CHAT_START,name:"Chat Trigger",description:"Start workflow from chatbot message",icon:X[U.CHAT_START],color:Q[U.CHAT_START],category:"trigger",defaultConfig:{outputVariable:"chatInput",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"files",type:J.OUTPUT,label:"Files"}]}},{type:U.CHAT_OUTPUT,name:"Chat Output",description:"Send message to chatbot during execution",icon:X[U.CHAT_OUTPUT],color:Q[U.CHAT_OUTPUT],category:"action",defaultConfig:{message:"${variables.response}",messageType:"text",typing:!1,typingDelay:1e3},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SOCIAL_POST,name:"Social Post",description:"Post to social feed on behalf of an agent",icon:X[U.SOCIAL_POST],color:Q[U.SOCIAL_POST],category:"action",defaultConfig:{agentId:"",content:"${variables.response}",mediaUrl:"",mediaType:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.LLM,name:"LLM",description:"Call AI language model (OpenAI, Anthropic, etc.)",icon:X[U.LLM],color:Q[U.LLM],category:"action",defaultConfig:{provider:"openai",model:"gpt-4",temperature:.7,maxTokens:2048,systemPrompt:"",userPrompt:"${variables.message}"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"},{id:"context_memory",type:J.INPUT,label:"Context Memory"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.OCR,name:"OCR",description:"Extract text from images using OCR",icon:X[U.OCR],color:Q[U.OCR],category:"action",defaultConfig:{imageSource:"variable",imageField:"${input.files[0].base64}",language:"fr",detectLayout:!1,outputVariable:"ocrResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Image"}],outputs:[{id:"out",type:J.OUTPUT,label:"Text"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.INFORMATION_EXTRACTOR,name:"Information Extractor",description:"Extract structured data from unstructured text using AI",icon:X[U.INFORMATION_EXTRACTOR],color:Q[U.INFORMATION_EXTRACTOR],category:"action",defaultConfig:{inputField:"text",schema:[{name:"field1",type:"string",description:"",required:!0}],model:"gpt-4o-mini",provider:"openai",instructions:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Extracted"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.FUNCTION,name:"Function",description:"Invoke a Nuraly function",icon:X[U.FUNCTION],color:Q[U.FUNCTION],category:"action",defaultConfig:{functionId:"",inputMapping:{},outputMapping:{}},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.HTTP,name:"HTTP Request",description:"Make an HTTP request",icon:X[U.HTTP],color:Q[U.HTTP],category:"action",defaultConfig:{method:"GET",url:"",headers:{},timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Success"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CONDITION,name:"Condition",description:"Branch based on a condition",icon:X[U.CONDITION],color:Q[U.CONDITION],category:"control",defaultConfig:{conditionMode:"expression",expression:"",language:"javascript"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"true",type:J.CONDITIONAL_TRUE,label:"True"},{id:"false",type:J.CONDITIONAL_FALSE,label:"False"}]}},{type:U.DELAY,name:"Delay",description:"Wait for a specified duration",icon:X[U.DELAY],color:Q[U.DELAY],category:"control",defaultConfig:{duration:1e3,unit:"milliseconds"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.PARALLEL,name:"Parallel",description:"Execute branches in parallel",icon:X[U.PARALLEL],color:Q[U.PARALLEL],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"branch1",type:J.PARALLEL_BRANCH,label:"Branch 1"},{id:"branch2",type:J.PARALLEL_BRANCH,label:"Branch 2"}]}},{type:U.LOOP,name:"Loop",description:"Iterate over an array",icon:X[U.LOOP],color:Q[U.LOOP],category:"control",defaultConfig:{iteratorVariable:"item",arrayExpression:"",maxIterations:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"item",type:J.LOOP_ITEM,label:"Each Item"},{id:"done",type:J.LOOP_DONE,label:"Done"}]}},{type:U.SWITCH,name:"Switch",description:"Route to a branch based on a value",icon:X[U.SWITCH],color:Q[U.SWITCH],category:"control",defaultConfig:{expression:"",language:"javascript",cases:[{value:"case1",label:"Case 1"},{value:"case2",label:"Case 2"}],includeDefault:!0},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"case1",type:J.OUTPUT,label:"Case 1"},{id:"case2",type:J.OUTPUT,label:"Case 2"},{id:"default",type:J.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:U.MERGE,name:"Merge",description:"Join multiple branches into one",icon:X[U.MERGE],color:Q[U.MERGE],category:"control",defaultConfig:{mode:"waitAll"},defaultPorts:{inputs:[{id:"in1",type:J.INPUT,label:"Input 1",multiple:!0},{id:"in2",type:J.INPUT,label:"Input 2",multiple:!0}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.WAIT,name:"Wait",description:"Pause until a signal or event is received",icon:X[U.WAIT],color:Q[U.WAIT],category:"control",defaultConfig:{signalName:"",timeout:3e5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Signal"},{id:"timeout",type:J.OUTPUT,label:"Timeout"}]}},{type:U.TRY_CATCH,name:"Try / Catch",description:"Catch errors from the connected branch",icon:X[U.TRY_CATCH],color:Q[U.TRY_CATCH],category:"control",defaultConfig:{catchTypes:["*"],errorVariable:"error"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"try",type:J.OUTPUT,label:"Try"},{id:"catch",type:J.ERROR,label:"Catch"}]}},{type:U.BREAK,name:"Break",description:"Exit the enclosing loop",icon:X[U.BREAK],color:Q[U.BREAK],category:"control",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[]}},{type:U.TRANSFORM,name:"Transform",description:"Transform data using expressions",icon:X[U.TRANSFORM],color:Q[U.TRANSFORM],category:"data",defaultConfig:{transformExpression:"",language:"jsonata"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SUB_WORKFLOW,name:"Sub-Workflow",description:"Invoke another workflow",icon:X[U.SUB_WORKFLOW],color:Q[U.SUB_WORKFLOW],category:"action",defaultConfig:{workflowId:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.EMAIL,name:"Email",description:"Send an email",icon:X[U.EMAIL],color:Q[U.EMAIL],category:"action",defaultConfig:{to:"",cc:"",bcc:"",subject:"",body:"",bodyType:"text",fromName:"",replyTo:"",priority:"normal"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.EMAIL_READER,name:"Email Reader",description:"Read and manage emails from Gmail, Outlook, Yahoo, or IMAP",icon:X[U.EMAIL_READER],color:Q[U.EMAIL_READER],category:"action",defaultConfig:{provider:"imap",operation:"LIST",folder:"INBOX",limit:10,includeAttachments:!1,markAsReadOnFetch:!1,searchQuery:"",host:"",port:993,tls:!0,credentialPath:"",sinceDate:"",beforeDate:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.SENDGRID,name:"SendGrid",description:"Send email via SendGrid API",icon:X[U.SENDGRID],color:Q[U.SENDGRID],category:"action",defaultConfig:{to:"",cc:"",bcc:"",fromEmail:"",fromName:"",replyTo:"",subject:"",body:"",contentType:"text/html",templateId:"",dynamicTemplateData:"",categories:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.OUTPUT,label:"Error"}]}},{type:U.NOTIFICATION,name:"Notification",description:"Send a notification",icon:X[U.NOTIFICATION],color:Q[U.NOTIFICATION],category:"action",defaultConfig:{channel:"",message:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.DATABASE,name:"Data",description:"Read and write data to databases",icon:X[U.DATABASE],color:"#6366F1",category:"data",defaultConfig:{operation:P.QUERY,dataSource:null,entity:null,filter:null,fields:{},select:[],orderBy:[],limit:null,offset:null,outputVariable:"results"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.VARIABLE,name:"Variable",description:"Set or get a workflow variable",icon:X[U.VARIABLE],color:Q[U.VARIABLE],category:"data",defaultConfig:{variableOperation:"set",variableName:"",value:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.CHATBOT,name:"Chatbot Trigger",description:"Trigger workflow from chatbot interactions",icon:X[U.CHATBOT],color:Q[U.CHATBOT],category:"trigger",defaultConfig:{triggerEvents:["MESSAGE_SENT"],chatbotSize:"medium",chatbotVariant:"floating",title:"Chat Assistant",subtitle:"Ask me anything",placeholder:"Type a message...",initialMessage:"",enableTypingIndicator:!0,enableSuggestions:!1,suggestions:[],loadingType:"dots",enableFileUpload:!1,maxFileSize:10,maxFiles:5,allowImages:!0,allowDocuments:!1,allowText:!1,allowAudio:!1,allowVideo:!1},defaultPorts:{inputs:[],outputs:[{id:"message",type:J.OUTPUT,label:"Message"},{id:"files",type:J.OUTPUT,label:"Files"},{id:"session",type:J.OUTPUT,label:"Session Start"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DEBUG,name:"Debug",description:"Display input, output, and variables for debugging",icon:X[U.DEBUG],color:Q[U.DEBUG],category:"data",defaultConfig:{},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.UI_TABLE,name:"Table",description:"Display data as an interactive table",icon:X[U.UI_TABLE],color:Q[U.UI_TABLE],category:"display",defaultConfig:{tableColumns:[],dataExpression:"",tablePageSize:10,tableEnableFilter:!1,tableEnableSort:!0,tableFixedHeader:!1,tableSize:"normal",tableEmptyText:"No data available"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Data"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:U.WEB_SEARCH,name:"Web Search",description:"Search the web using Google, Bing, Brave, or DuckDuckGo",icon:X[U.WEB_SEARCH],color:Q[U.WEB_SEARCH],category:"web",defaultConfig:{provider:"google",queryField:"query",numResults:10,safeSearch:!0,timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Results"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.WEB_CRAWL,name:"Web Crawl",description:"Crawl web pages and extract text content",icon:X[U.WEB_CRAWL],color:Q[U.WEB_CRAWL],category:"web",defaultConfig:{urlField:"url",maxDepth:1,maxPages:10,sameDomainOnly:!0,renderJs:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Pages"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DOCUMENT_GENERATOR,name:"Document Generator",description:"Generate Word documents from templates with dynamic data",icon:X[U.DOCUMENT_GENERATOR],color:Q[U.DOCUMENT_GENERATOR],category:"documents",defaultConfig:{templateId:"",data:{},outputVariable:"documentResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.FILE_STORAGE,name:"File Storage",description:"Store files to S3, MinIO, or local filesystem",icon:X[U.FILE_STORAGE],color:Q[U.FILE_STORAGE],category:"storage",defaultConfig:{provider:"local",bucket:"default",path:"",fileField:"file",filenameField:"filename"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GOOGLE_CLOUD_STORAGE,name:"Google Cloud Storage",description:"Manage objects in Google Cloud Storage buckets",icon:X[U.GOOGLE_CLOUD_STORAGE],color:Q[U.GOOGLE_CLOUD_STORAGE],category:"storage",defaultConfig:{operation:"LIST",bucketName:"",objectPath:"",serviceAccountPath:"",signedUrlExpiration:3600},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.S3,name:"AWS S3",description:"Upload, download, and manage files in Amazon S3",icon:X[U.S3],color:Q[U.S3],category:"integrations",defaultConfig:{s3Operation:"upload",s3Bucket:"",s3Key:"",s3Region:"us-east-1",s3ContentType:"auto"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.EMBEDDING,name:"Embedding",description:"Convert text to vector embeddings",icon:X[U.EMBEDDING],color:Q[U.EMBEDDING],category:"rag",defaultConfig:{provider:"openai",model:"text-embedding-3-small",inputField:"text",batchSize:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Text"}],outputs:[{id:"out",type:J.OUTPUT,label:"Embedding"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DOCUMENT_LOADER,name:"Document Loader",description:"Load and parse documents (PDF, Word, HTML, etc.)",icon:X[U.DOCUMENT_LOADER],color:Q[U.DOCUMENT_LOADER],category:"rag",defaultConfig:{sourceType:"text",contentField:"content",filenameField:"filename",defaultType:"txt",timeout:3e4},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Document"}],outputs:[{id:"out",type:J.OUTPUT,label:"Content"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TEXT_SPLITTER,name:"Text Splitter",description:"Split text into chunks for embedding",icon:X[U.TEXT_SPLITTER],color:Q[U.TEXT_SPLITTER],category:"rag",defaultConfig:{strategy:"recursive",chunkSize:1e3,chunkOverlap:200,contentField:"content"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Text"}],outputs:[{id:"out",type:J.OUTPUT,label:"Chunks"}]}},{type:U.VECTOR_WRITE,name:"Vector Write",description:"Store embeddings in vector database",icon:X[U.VECTOR_WRITE],color:Q[U.VECTOR_WRITE],category:"rag",defaultConfig:{collectionName:"",upsertMode:"replace"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Embeddings"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.VECTOR_SEARCH,name:"Vector Search",description:"Search for similar documents in vector store",icon:X[U.VECTOR_SEARCH],color:Q[U.VECTOR_SEARCH],category:"rag",defaultConfig:{collectionName:"",topK:5,minScore:.7,includeContent:!0,includeMetadata:!0,provider:"openai",model:"text-embedding-3-small"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Query"}],outputs:[{id:"out",type:J.OUTPUT,label:"Results"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CONTEXT_BUILDER,name:"Context Builder",description:"Format retrieved documents into LLM-ready context",icon:X[U.CONTEXT_BUILDER],color:Q[U.CONTEXT_BUILDER],category:"rag",defaultConfig:{template:"default",maxTokens:4e3,maxDocuments:10,includeSourceInfo:!0,includeSimilarityScore:!1,separator:"\n\n---\n\n"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Results"}],outputs:[{id:"out",type:J.OUTPUT,label:"Context"}]}},{type:U.RERANKER,name:"Reranker",description:"Re-rank search results by relevance",icon:X[U.RERANKER],color:Q[U.RERANKER],category:"rag",defaultConfig:{model:"cross-encoder",topK:5,threshold:.5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Results"}],outputs:[{id:"out",type:J.OUTPUT,label:"Reranked"}]}},{type:U.SUMMARIZATION,name:"Summarize Document",description:"Summarize long text using AI with chunking strategies",icon:X[U.SUMMARIZATION],color:Q[U.SUMMARIZATION],category:"action",defaultConfig:{inputField:"text",outputField:"summary",strategy:"map_reduce",chunkSize:4e3,chunkOverlap:200,model:"gpt-4o-mini"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Summary"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GUARDRAIL,name:"Guardrail",description:"Validate and filter LLM inputs/outputs for safety",icon:X[U.GUARDRAIL],color:Q[U.GUARDRAIL],category:"safety",defaultConfig:{mode:"input",contentField:"content",onFail:"block",checks:[]},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Passed"},{id:"blocked",type:J.ERROR,label:"Blocked"}]}},{type:U.SLACK_SEND_MESSAGE,name:"Slack: Send Message",description:"Send a message to a Slack channel or user",icon:X[U.SLACK_SEND_MESSAGE],color:Q[U.SLACK_SEND_MESSAGE],category:"slack",defaultConfig:{slackMethod:"api",botToken:"",channel:"",text:"",unfurlLinks:!0,unfurlMedia:!0},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_GET_CHANNEL_INFO,name:"Slack: Channel Info",description:"Get information about a Slack channel",icon:X[U.SLACK_GET_CHANNEL_INFO],color:Q[U.SLACK_GET_CHANNEL_INFO],category:"slack",defaultConfig:{botToken:"",channel:"",includeLocale:!1,includeNumMembers:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Info"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_LIST_CHANNELS,name:"Slack: List Channels",description:"List available Slack channels in the workspace",icon:X[U.SLACK_LIST_CHANNELS],color:Q[U.SLACK_LIST_CHANNELS],category:"slack",defaultConfig:{botToken:"",types:"public_channel",excludeArchived:!0,limit:100},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Channels"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_ADD_REACTION,name:"Slack: Add Reaction",description:"Add a reaction emoji to a Slack message",icon:X[U.SLACK_ADD_REACTION],color:Q[U.SLACK_ADD_REACTION],category:"slack",defaultConfig:{botToken:"",channel:"",timestamp:"",name:"thumbsup"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_UPLOAD_FILE,name:"Slack: Upload File",description:"Upload a file to a Slack channel",icon:X[U.SLACK_UPLOAD_FILE],color:Q[U.SLACK_UPLOAD_FILE],category:"slack",defaultConfig:{botToken:"",channels:"",filename:"",content:"",title:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GOOGLE_CALENDAR,name:"Google Calendar",description:"Create, read, update, and delete Google Calendar events",icon:X[U.GOOGLE_CALENDAR],color:Q[U.GOOGLE_CALENDAR],category:"google-calendar",defaultConfig:{googleCalendarCredential:"",googleCalendarId:"primary",googleCalendarOperation:"getAll",googleCalendarEventSummary:"",googleCalendarEventDescription:"",googleCalendarEventStart:"",googleCalendarEventEnd:"",googleCalendarEventAttendees:"",googleCalendarEventLocation:"",googleCalendarTimeMin:"",googleCalendarTimeMax:"",googleCalendarRecurrence:"",googleCalendarConferenceData:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SHOPIFY,name:"Shopify",description:"Manage Shopify products, orders, customers, inventory, and fulfillments via the Admin API",icon:X[U.SHOPIFY],color:Q[U.SHOPIFY],category:"shopify",defaultConfig:{resource:"ORDER",operation:P.LIST,resourceId:"",filters:"",shopDomain:"",accessToken:""},defaultPorts:{inputs:[{id:"input",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.GITLAB,name:"GitLab",description:"Manage GitLab repositories, issues, merge requests, pipelines, and releases",icon:X[U.GITLAB],color:Q[U.GITLAB],category:"developer",defaultConfig:{gitlabBaseUrl:"https://gitlab.com",gitlabAccessToken:"",gitlabResource:"issue",gitlabOperation:"getAll",gitlabProjectId:"",gitlabTitle:"",gitlabDescription:"",gitlabLabels:[],gitlabAssigneeIds:[],gitlabSourceBranch:"",gitlabTargetBranch:"",gitlabRef:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TELEGRAM_SEND,name:"Telegram: Send Message",description:"Send a message to a Telegram chat with typing indicator and optional emoji reaction",icon:X[U.TELEGRAM_SEND],color:Q[U.TELEGRAM_SEND],category:"telegram",defaultConfig:{botToken:"",chatId:"",text:"",parseMode:"",replyToMessageId:"",showTyping:!0,reaction:"",disableNotification:!1},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.ZENDESK,name:"Zendesk",description:"Manage Zendesk tickets, users, organizations, and satisfaction ratings",icon:X[U.ZENDESK],color:Q[U.ZENDESK],category:"zendesk",defaultConfig:{zendeskResource:"TICKET",zendeskOperation:"LIST",zendeskSubdomain:"",zendeskApiToken:"",zendeskEmail:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TWILIO_SMS,name:"Twilio: Send SMS",description:"Send an SMS or WhatsApp message via the Twilio API",icon:X[U.TWILIO_SMS],color:Q[U.TWILIO_SMS],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioMessageBody:"",twilioOperation:"send_sms",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TWILIO_VOICE,name:"Twilio: Voice Call",description:"Make a voice call via the Twilio API",icon:X[U.TWILIO_VOICE],color:Q[U.TWILIO_VOICE],category:"twilio",defaultConfig:{twilioAccountSid:"",twilioAuthToken:"",twilioFromNumber:"",twilioToNumber:"",twilioOperation:"make_call",twilioVoiceUrl:"",twilioStatusCallback:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.TELEGRAM_BOT,name:"Telegram Bot",description:"Receive messages from a Telegram bot via polling or webhook",icon:X[U.TELEGRAM_BOT],color:Q[U.TELEGRAM_BOT],category:"trigger",defaultConfig:{botToken:"",mode:"polling",pollingTimeout:30,allowedUpdates:[],allowedChatIds:"",allowedUserIds:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.SLACK_SOCKET,name:"Slack Socket",description:"Receive events via Slack Socket Mode (WebSocket)",icon:X[U.SLACK_SOCKET],color:Q[U.SLACK_SOCKET],category:"trigger",defaultConfig:{appTokenPath:"",botTokenPath:"",eventTypes:[],interactionTypes:[],slashCommands:"",allowedTeamIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.DISCORD_BOT,name:"Discord Bot",description:"Receive events from a Discord bot (Gateway WebSocket)",icon:X[U.DISCORD_BOT],color:Q[U.DISCORD_BOT],category:"trigger",defaultConfig:{botTokenPath:"",intents:["GUILDS","GUILD_MESSAGES","MESSAGE_CONTENT"],eventTypes:[],allowedGuildIds:"",allowedChannelIds:"",allowedUserIds:"",ignoreBots:!0},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.WHATSAPP_WEBHOOK,name:"WhatsApp",description:"Receive messages via WhatsApp Business API",icon:X[U.WHATSAPP_WEBHOOK],color:Q[U.WHATSAPP_WEBHOOK],category:"trigger",defaultConfig:{phoneNumberId:"",businessAccountId:"",accessTokenPath:"",appSecretPath:"",verifyToken:"",webhookFields:["messages"],messageTypes:[],allowedSenders:"",ignoreStatusUpdates:!1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CUSTOM_WEBSOCKET,name:"WebSocket Listener",description:"Listen for messages on a custom WebSocket endpoint",icon:X[U.CUSTOM_WEBSOCKET],color:Q[U.CUSTOM_WEBSOCKET],category:"trigger",defaultConfig:{url:"",subprotocol:"",authMode:"none",tokenPath:"",username:"",passwordPath:"",headerName:"",headerValuePath:"",queryParamName:"token",queryParamValuePath:"",initialMessage:"",autoReconnect:!0,reconnectDelayMs:5e3,maxReconnectAttempts:0,pingIntervalSec:30,messageFormat:"json",filterExpression:""},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.RABBITMQ_TRIGGER,name:"RabbitMQ Trigger",description:"Triggers workflow on new messages from a RabbitMQ queue",icon:X[U.RABBITMQ_TRIGGER],color:Q[U.RABBITMQ_TRIGGER],category:"trigger",defaultConfig:{connectionUrl:"",queueName:"",exchange:"",routingKey:"#",autoAck:!1,contentType:"application/json",prefetchCount:1},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.KAFKA,name:"Kafka: Send Message",description:"Produce a message to a Kafka topic",icon:X[U.KAFKA],color:Q[U.KAFKA],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaAcks:"all",kafkaCompressionType:"none"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.KAFKA_TRIGGER,name:"Kafka Trigger",description:"Triggers workflow on new messages from a Kafka topic",icon:X[U.KAFKA_TRIGGER],color:Q[U.KAFKA_TRIGGER],category:"messaging",defaultConfig:{kafkaBrokers:"localhost:9092",kafkaConsumerGroup:"nuraly-workflow",kafkaFromBeginning:!1,kafkaSessionTimeout:3e4},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Message"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CRON,name:"Cron Trigger",description:"Triggers workflow on a scheduled cron expression",icon:X[U.CRON],color:Q[U.CRON],category:"trigger",defaultConfig:{cronExpression:"0 * * * *",timezone:"UTC"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Tick"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.MCP,name:"MCP Server",description:"Connect to MCP server - provides tools to Agent/LLM nodes",icon:X[U.MCP],color:Q[U.MCP],category:"trigger",defaultConfig:{serverUrl:"",transportType:"streamable_http"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"}]}},{type:U.HUBSPOT,name:"HubSpot",description:"Manage contacts, deals, companies, and tickets via HubSpot CRM",icon:X[U.HUBSPOT],color:Q[U.HUBSPOT],category:"crm",defaultConfig:{hubspotAccessToken:"",hubspotResource:"contact",hubspotOperation:"getAll",hubspotProperties:{},hubspotFilterGroups:[],hubspotLimit:100,hubspotAssociations:[]},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.JIRA,name:"Jira",description:"Create, update, and manage Jira issues",icon:X[U.JIRA],color:Q[U.JIRA],category:"jira",defaultConfig:{operation:"createIssue",jiraInstanceUrl:"",projectKey:"",issueType:"Task",summary:"",description:"",assignee:"",priority:"Medium",labels:"",jqlQuery:"",transitionId:"",issueKey:"",comment:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.ELASTICSEARCH,name:"Elasticsearch",description:"Search, index, and manage documents in Elasticsearch",icon:X[U.ELASTICSEARCH],color:Q[U.ELASTICSEARCH],category:"integration",defaultConfig:{elasticsearchUrl:"",elasticsearchCredentialPath:"",elasticsearchOperation:"search",elasticsearchIndex:"",elasticsearchDocumentId:"",elasticsearchQueryBody:"",elasticsearchSize:10,elasticsearchFrom:0,elasticsearchRefresh:"false",elasticsearchTimeout:"30s",elasticsearchRouting:"",outputVariable:"elasticsearchResult"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Result"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.CALENDLY_TRIGGER,name:"Calendly Trigger",description:"Triggers workflow when a Calendly event is booked or cancelled",icon:X[U.CALENDLY_TRIGGER],color:Q[U.CALENDLY_TRIGGER],category:"trigger",defaultConfig:{events:["invitee.created"],scope:"user",outputVariable:"calendlyEvent"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Event"},{id:"error",type:J.ERROR,label:"Error"}]}},{type:U.NOTE,name:"Note",description:"Add annotations and comments to your workflow",icon:X[U.NOTE],color:Q[U.NOTE],category:"annotation",defaultConfig:{noteContent:"Add your note here...",noteBackgroundColor:"#fef08a",noteTextColor:"#713f12",noteFontSize:"medium",noteShowBorder:!1},defaultPorts:{inputs:[],outputs:[]}},{type:U.FRAME,name:"Frame",description:"Group related nodes together with a labeled container",icon:X[U.FRAME],color:Q[U.FRAME],category:"annotation",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:V.AGENT,name:"AI Agent",description:"Autonomous AI agent that can use tools",icon:X[V.AGENT],color:Q[V.AGENT],category:"agent",defaultConfig:{agentId:"",maxIterations:10},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"},{id:"retriever",type:J.INPUT,label:"Retriever"}],configs:[{id:"llm",type:J.CONFIG,label:"LLM"},{id:"prompt",type:J.CONFIG,label:"Prompt"},{id:"memory",type:J.CONFIG,label:"Memory"},{id:"tools",type:J.CONFIG,label:"Tools",multiple:!0},{id:"structured_output",type:J.CONFIG,label:"Structured Output"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:V.TOOL,name:"Tool",description:"A tool that can be used by an agent",icon:X[V.TOOL],color:Q[V.TOOL],category:"agent",defaultConfig:{toolName:"",description:"",parameters:[]},defaultPorts:{inputs:[{id:"function",type:J.INPUT,label:"Function"}],outputs:[{id:"out",type:J.OUTPUT,label:"Tool"}]}},{type:V.MEMORY,name:"Context Memory",description:"Conversation memory for agents - stores and retrieves chat history",icon:X[V.MEMORY],color:Q[V.MEMORY],category:"agent",defaultConfig:{cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Memory Config"}]}},{type:V.CONTEXT_MEMORY,name:"Context Memory (RAG)",description:"RAG-enhanced conversation memory with buffer, semantic, or hybrid modes",icon:X[V.CONTEXT_MEMORY],color:Q[V.CONTEXT_MEMORY],category:"agent",defaultConfig:{memoryType:"hybrid",cutoffMode:"message",maxMessages:50,maxTokens:4e3,conversationIdExpression:"${input.threadId}"},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Memory Config"}]}},{type:V.PROMPT,name:"Prompt",description:"Prompt template for LLM",icon:X[V.PROMPT],color:Q[V.PROMPT],category:"agent",defaultConfig:{template:"",variables:[]},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Prompt"}]}},{type:V.LLM,name:"LLM",description:"Large Language Model call",icon:X[V.LLM],color:Q[V.LLM],category:"agent",defaultConfig:{provider:"openai",modelName:"gpt-4",temperature:.7,maxTokens:2048},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Response"}]}},{type:V.RETRIEVER,name:"Retriever",description:"Retrieve relevant documents from vector store",icon:X[V.RETRIEVER],color:Q[V.RETRIEVER],category:"agent",defaultConfig:{vectorStoreId:"",topK:5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Query"}],outputs:[{id:"out",type:J.OUTPUT,label:"Documents"}]}},{type:V.CHAIN,name:"Chain",description:"Chain multiple LLM calls together",icon:X[V.CHAIN],color:Q[V.CHAIN],category:"agent",defaultConfig:{chainType:"sequential"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"out",type:J.OUTPUT,label:"Output"}]}},{type:V.ROUTER,name:"Router",description:"Route to different chains based on input",icon:X[V.ROUTER],color:Q[V.ROUTER],category:"agent",defaultConfig:{routingExpression:""},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Input"}],outputs:[{id:"route1",type:J.OUTPUT,label:"Route 1"},{id:"route2",type:J.OUTPUT,label:"Route 2"},{id:"default",type:J.CONDITIONAL_DEFAULT,label:"Default"}]}},{type:V.HUMAN_INPUT,name:"Human Input",description:"Wait for human input in the workflow",icon:X[V.HUMAN_INPUT],color:Q[V.HUMAN_INPUT],category:"agent",defaultConfig:{prompt:"",timeout:864e5},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Context"}],outputs:[{id:"out",type:J.OUTPUT,label:"Response"}]}},{type:V.OUTPUT_PARSER,name:"Output Parser",description:"Parse LLM output into structured data",icon:X[V.OUTPUT_PARSER],color:Q[V.OUTPUT_PARSER],category:"agent",defaultConfig:{parserType:"json",schema:{}},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"Raw Output"}],outputs:[{id:"out",type:J.OUTPUT,label:"Parsed Data"}]}},{type:V.STRUCTURED_OUTPUT,name:"Structured Output",description:"Define a JSON schema to enforce structured LLM output",icon:X[V.STRUCTURED_OUTPUT],color:Q[V.STRUCTURED_OUTPUT],category:"agent",defaultConfig:{schemaName:"structured_output",strict:!0,schema:{type:"object",properties:{},required:[],additionalProperties:!1}},defaultPorts:{inputs:[],outputs:[{id:"out",type:J.OUTPUT,label:"Schema"}]}},{type:H.TABLE,name:"Table",description:"Define a database table with columns",icon:X[H.TABLE],color:Q[H.TABLE],category:"db-tables-views",defaultConfig:{tableName:"",columns:[],primaryKey:""},defaultPorts:{inputs:[],outputs:[{id:"ref",type:J.OUTPUT,label:"Reference"}]}},{type:H.VIEW,name:"View",description:"Create a database view based on queries",icon:X[H.VIEW],color:Q[H.VIEW],category:"db-tables-views",defaultConfig:{viewName:"",query:"",materialized:!1},defaultPorts:{inputs:[{id:"source",type:J.INPUT,label:"Source Tables"}],outputs:[{id:"ref",type:J.OUTPUT,label:"Reference"}]}},{type:H.INDEX,name:"Index",description:"Create an index on table columns",icon:X[H.INDEX],color:Q[H.INDEX],category:"db-indexes-queries",defaultConfig:{indexName:"",indexColumns:[],unique:!1,indexType:"BTREE"},defaultPorts:{inputs:[{id:"table",type:J.INPUT,label:"Table"}],outputs:[]}},{type:H.RELATIONSHIP,name:"Relationship",description:"Define foreign key relationships between tables",icon:X[H.RELATIONSHIP],color:Q[H.RELATIONSHIP],category:"db-relations-constraints",defaultConfig:{relationshipType:"ONE_TO_MANY",sourceColumn:"",targetColumn:"",onDelete:"CASCADE",onUpdate:"CASCADE"},defaultPorts:{inputs:[{id:"source",type:J.INPUT,label:"Source Table"},{id:"target",type:J.INPUT,label:"Target Table"}],outputs:[]}},{type:H.CONSTRAINT,name:"Constraint",description:"Add constraints (unique, check, foreign_key)",icon:X[H.CONSTRAINT],color:Q[H.CONSTRAINT],category:"db-relations-constraints",defaultConfig:{constraintName:"",constraintType:"UNIQUE",constraintColumns:[],checkExpression:""},defaultPorts:{inputs:[{id:"table",type:J.INPUT,label:"Table"}],outputs:[]}},{type:H.QUERY,name:"Query",description:"Define saved queries or stored procedures",icon:X[H.QUERY],color:Q[H.QUERY],category:"db-indexes-queries",defaultConfig:{queryName:"",queryText:"",parameters:[]},defaultPorts:{inputs:[{id:"tables",type:J.INPUT,label:"Tables"}],outputs:[{id:"result",type:J.OUTPUT,label:"Result Schema"}]}},{type:q.STICKY_NOTE,name:"Sticky Note",description:"Add a sticky note to the whiteboard",icon:X[q.STICKY_NOTE],color:Q[q.STICKY_NOTE],category:"wb-notes-text",defaultConfig:{textContent:"",backgroundColor:"#fef08a",textColor:"#713f12",fontSize:14,width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.TEXT_BLOCK,name:"Text Block",description:"Add a text block to the whiteboard",icon:X[q.TEXT_BLOCK],color:Q[q.TEXT_BLOCK],category:"wb-notes-text",defaultConfig:{textContent:"",fontSize:16,fontWeight:"normal",textAlign:"left",width:200,height:50},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_RECTANGLE,name:"Rectangle",description:"Add a rectangle shape",icon:X[q.SHAPE_RECTANGLE],color:Q[q.SHAPE_RECTANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#3b82f6"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_CIRCLE,name:"Circle",description:"Add a circle shape",icon:X[q.SHAPE_CIRCLE],color:Q[q.SHAPE_CIRCLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#8b5cf6"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_DIAMOND,name:"Diamond",description:"Add a diamond shape",icon:X[q.SHAPE_DIAMOND],color:Q[q.SHAPE_DIAMOND],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f59e0b"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_TRIANGLE,name:"Triangle",description:"Add a triangle shape",icon:X[q.SHAPE_TRIANGLE],color:Q[q.SHAPE_TRIANGLE],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#22c55e"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_ARROW,name:"Arrow",description:"Add an arrow shape",icon:X[q.SHAPE_ARROW],color:Q[q.SHAPE_ARROW],category:"wb-shapes",defaultConfig:{width:120,height:60,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_LINE,name:"Line",description:"Add a line shape",icon:X[q.SHAPE_LINE],color:Q[q.SHAPE_LINE],category:"wb-shapes",defaultConfig:{width:120,height:4,fillColor:"#6b7280"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_STAR,name:"Star",description:"Add a star shape",icon:X[q.SHAPE_STAR],color:Q[q.SHAPE_STAR],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#f97316"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.SHAPE_HEXAGON,name:"Hexagon",description:"Add a hexagon shape",icon:X[q.SHAPE_HEXAGON],color:Q[q.SHAPE_HEXAGON],category:"wb-shapes",defaultConfig:{width:120,height:120,fillColor:"#ec4899"},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.IMAGE,name:"Image",description:"Add an image to the whiteboard",icon:X[q.IMAGE],color:Q[q.IMAGE],category:"wb-media",defaultConfig:{imageUrl:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.DRAWING,name:"Drawing",description:"Add a freehand drawing area",icon:X[q.DRAWING],color:Q[q.DRAWING],category:"wb-media",defaultConfig:{pathData:"",width:200,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.VOTING,name:"Voting",description:"Add a voting element for collaboration",icon:X[q.VOTING],color:Q[q.VOTING],category:"wb-media",defaultConfig:{textContent:"Vote",width:200,height:150},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.MERMAID,name:"Mermaid Diagram",description:"Add a Mermaid diagram to the whiteboard",icon:X[q.MERMAID],color:Q[q.MERMAID],category:"wb-media",defaultConfig:{textContent:"graph TD\n A[Start] --\x3e B[End]",width:400,height:300},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.ANCHOR,name:"Anchor",description:"Navigation anchor — other elements can link here",icon:X[q.ANCHOR],color:Q[q.ANCHOR],category:"wb-navigation",defaultConfig:{anchorLabel:"Anchor",width:120,height:48},defaultPorts:{inputs:[],outputs:[]}},{type:q.FRAME,name:"Frame",description:"Group whiteboard elements together",icon:X[q.FRAME],color:Q[q.FRAME],category:"wb-layout",defaultConfig:{frameLabel:"Group",frameWidth:400,frameHeight:300,frameBackgroundColor:"rgba(99, 102, 241, 0.05)",frameBorderColor:"rgba(99, 102, 241, 0.3)",frameLabelPosition:"top-left",frameLabelPlacement:"outside",frameShowLabel:!0,frameCollapsed:!1},defaultPorts:{inputs:[],outputs:[]}},{type:q.WORKFLOW,name:"Workflow",description:"Embed a workflow on the whiteboard",icon:X[q.WORKFLOW],color:Q[q.WORKFLOW],category:"wb-media",defaultConfig:{workflowId:"",workflowName:"Workflow",workflowSteps:[],width:280,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}},{type:q.DATABASE,name:"Database Table",description:"Embed a database table on the whiteboard",icon:X[q.DATABASE],color:Q[q.DATABASE],category:"wb-media",defaultConfig:{dbTableId:"",dbTableName:"Table",dbTableColumns:[],dbPrimaryKey:"",width:280,height:200},defaultPorts:{inputs:[{id:"in",type:J.INPUT,label:"In"}],outputs:[{id:"out",type:J.OUTPUT,label:"Out"}]}}],ee=[{id:"trigger",name:"Triggers",icon:"zap",nodeTypes:[U.START,U.HTTP_START,U.CHAT_START,U.CRON,U.TELEGRAM_BOT,U.SLACK_SOCKET,U.DISCORD_BOT,U.WHATSAPP_WEBHOOK,U.CUSTOM_WEBSOCKET,U.MCP,U.CALENDLY_TRIGGER],canvasType:G.WORKFLOW},{id:"control",name:"Control Flow",icon:"git-branch",nodeTypes:[U.END,U.HTTP_END,U.CONDITION,U.SWITCH,U.DELAY,U.WAIT,U.PARALLEL,U.MERGE,U.LOOP,U.BREAK,U.TRY_CATCH],canvasType:G.WORKFLOW},{id:"action",name:"Actions",icon:"zap",nodeTypes:[U.FUNCTION,U.HTTP,U.INFORMATION_EXTRACTOR,U.OCR,U.CHAT_OUTPUT,U.SOCIAL_POST,U.SUB_WORKFLOW,U.EMAIL,U.EMAIL_READER,U.SENDGRID,U.NOTIFICATION,U.DOCUMENT_GENERATOR,U.SUMMARIZATION],canvasType:G.WORKFLOW},{id:"data",name:"Data",icon:"database",nodeTypes:[U.TRANSFORM,U.DATABASE,U.ELASTICSEARCH,U.VARIABLE,U.DEBUG],canvasType:G.WORKFLOW},{id:"web",name:"Web",icon:"globe",nodeTypes:[U.WEB_SEARCH,U.WEB_CRAWL],canvasType:G.WORKFLOW},{id:"storage",name:"Storage",icon:"hard-drive",nodeTypes:[U.FILE_STORAGE,U.GOOGLE_CLOUD_STORAGE,U.S3],canvasType:G.WORKFLOW},{id:"messaging",name:"Messaging",icon:"inbox",nodeTypes:[U.RABBITMQ_TRIGGER,U.KAFKA,U.KAFKA_TRIGGER],canvasType:G.WORKFLOW},{id:"rag",name:"RAG",icon:"layers",nodeTypes:[U.DOCUMENT_LOADER,U.TEXT_SPLITTER,U.EMBEDDING,U.VECTOR_WRITE,U.VECTOR_SEARCH,U.CONTEXT_BUILDER,U.RERANKER],canvasType:G.WORKFLOW},{id:"safety",name:"Safety",icon:"shield",nodeTypes:[U.GUARDRAIL],canvasType:G.WORKFLOW},{id:"display",name:"Display",icon:"monitor",nodeTypes:[U.UI_TABLE],canvasType:G.WORKFLOW},{id:"google-calendar",name:"Google Calendar",icon:"calendar",nodeTypes:[U.GOOGLE_CALENDAR],canvasType:G.WORKFLOW},{id:"shopify",name:"Shopify",icon:"shopping-cart",nodeTypes:[U.SHOPIFY],canvasType:G.WORKFLOW},{id:"twilio",name:"Twilio",icon:"phone",nodeTypes:[U.TWILIO_SMS,U.TWILIO_VOICE],canvasType:G.WORKFLOW},{id:"telegram",name:"Telegram",icon:"send",nodeTypes:[U.TELEGRAM_SEND],canvasType:G.WORKFLOW},{id:"zendesk",name:"Zendesk",icon:"ticket",nodeTypes:[U.ZENDESK],canvasType:G.WORKFLOW},{id:"slack",name:"Slack",icon:"message-square",nodeTypes:[U.SLACK_SEND_MESSAGE,U.SLACK_GET_CHANNEL_INFO,U.SLACK_LIST_CHANNELS,U.SLACK_ADD_REACTION,U.SLACK_UPLOAD_FILE],canvasType:G.WORKFLOW},{id:"crm",name:"CRM",icon:"users",nodeTypes:[U.HUBSPOT],canvasType:G.WORKFLOW},{id:"jira",name:"Jira",icon:"ticket",nodeTypes:[U.JIRA],canvasType:G.WORKFLOW},{id:"gitlab",name:"GitLab",icon:"git-merge",nodeTypes:[U.GITLAB],canvasType:G.WORKFLOW},{id:"annotation",name:"Annotations",icon:"message-square",nodeTypes:[U.NOTE,U.FRAME],canvasType:G.WORKFLOW},{id:"agent",name:"AI Agents",icon:"cpu",nodeTypes:[V.AGENT,V.LLM,V.PROMPT,V.MEMORY,V.CONTEXT_MEMORY,V.TOOL,V.RETRIEVER,V.CHAIN,V.ROUTER,V.HUMAN_INPUT,V.OUTPUT_PARSER,V.STRUCTURED_OUTPUT],canvasType:G.WORKFLOW},{id:"db-tables-views",name:"Tables & Views",icon:"table",nodeTypes:[H.TABLE,H.VIEW],canvasType:G.DATABASE},{id:"db-relations-constraints",name:"Relations & Constraints",icon:"git-merge",nodeTypes:[H.RELATIONSHIP,H.CONSTRAINT],canvasType:G.DATABASE},{id:"db-indexes-queries",name:"Indexes & Queries",icon:"list",nodeTypes:[H.INDEX,H.QUERY],canvasType:G.DATABASE},{id:"wb-notes-text",name:"Notes & Text",icon:"sticky-note",nodeTypes:[q.STICKY_NOTE,q.TEXT_BLOCK],canvasType:G.WHITEBOARD},{id:"wb-shapes",name:"Shapes",icon:"square",nodeTypes:[q.SHAPE_RECTANGLE,q.SHAPE_CIRCLE,q.SHAPE_DIAMOND,q.SHAPE_TRIANGLE,q.SHAPE_ARROW,q.SHAPE_LINE,q.SHAPE_STAR,q.SHAPE_HEXAGON],canvasType:G.WHITEBOARD},{id:"wb-media",name:"Media & Interactive",icon:"image",nodeTypes:[q.IMAGE,q.DRAWING,q.VOTING,q.MERMAID],canvasType:G.WHITEBOARD},{id:"wb-navigation",name:"Navigation",icon:"anchor",nodeTypes:[q.ANCHOR],canvasType:G.WHITEBOARD},{id:"wb-layout",name:"Layout",icon:"frame",nodeTypes:[q.FRAME],canvasType:G.WHITEBOARD}];function te(e){return Z.find(t=>t.type===e)}function ie(e){return Object.values(V).includes(e)}function ne(e){return Object.values(U).includes(e)}function ae(e){return Object.values(H).includes(e)}function oe(e){return Object.values(q).includes(e)}function se(e){return ee.filter(t=>t.canvasType===e)}function re(e,t,i){var n;const a=te(e);return a?{id:i||"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),name:a.name,type:a.type,position:t,configuration:Object.assign({},a.defaultConfig),ports:{inputs:a.defaultPorts.inputs.map(e=>Object.assign({},e)),configs:null===(n=a.defaultPorts.configs)||void 0===n?void 0:n.map(e=>Object.assign({},e)),outputs:a.defaultPorts.outputs.map(e=>Object.assign({},e))},metadata:{icon:a.icon,color:a.color,description:a.description},status:K.IDLE,selected:!1}:null}const le=[{name:"Yellow",bg:"#fef08a",text:"#713f12"},{name:"Blue",bg:"#bfdbfe",text:"#1e3a5f"},{name:"Green",bg:"#bbf7d0",text:"#14532d"},{name:"Pink",bg:"#fbcfe8",text:"#831843"},{name:"Orange",bg:"#fed7aa",text:"#7c2d12"},{name:"Purple",bg:"#ddd6fe",text:"#4c1d95"},{name:"Gray",bg:"#e5e7eb",text:"#374151"}],ce=[{name:"Indigo",bg:"rgba(99, 102, 241, 0.05)",border:"rgba(99, 102, 241, 0.3)",solid:"#6366f1"},{name:"Blue",bg:"rgba(59, 130, 246, 0.05)",border:"rgba(59, 130, 246, 0.3)",solid:"#3b82f6"},{name:"Green",bg:"rgba(34, 197, 94, 0.05)",border:"rgba(34, 197, 94, 0.3)",solid:"#22c55e"},{name:"Orange",bg:"rgba(249, 115, 22, 0.05)",border:"rgba(249, 115, 22, 0.3)",solid:"#f97316"},{name:"Red",bg:"rgba(239, 68, 68, 0.05)",border:"rgba(239, 68, 68, 0.3)",solid:"#ef4444"},{name:"Purple",bg:"rgba(168, 85, 247, 0.05)",border:"rgba(168, 85, 247, 0.3)",solid:"#a855f7"},{name:"Gray",bg:"rgba(107, 114, 128, 0.05)",border:"rgba(107, 114, 128, 0.3)",solid:"#6b7280"}];function de(e){return e===U.NOTE||e===U.FRAME}function pe(e){return e===U.FRAME}function he(e){return e===U.NOTE}const ue=new Set([U.TELEGRAM_BOT,U.SLACK_SOCKET,U.DISCORD_BOT,U.WHATSAPP_WEBHOOK,U.CUSTOM_WEBSOCKET,U.RABBITMQ_TRIGGER,U.CALENDLY_TRIGGER,U.KAFKA_TRIGGER,U.CRON]);function be(e){return ue.has(e)}
|
|
107
107
|
/**
|
|
108
108
|
* @license
|
|
109
109
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
@@ -3791,7 +3791,7 @@ class ti{constructor(){this.listeners=new Map}on(e,t){return this.listeners.has(
|
|
|
3791
3791
|
* @license
|
|
3792
3792
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
3793
3793
|
* SPDX-License-Identifier: MIT
|
|
3794
|
-
*/var pi=function(e,t,i,n){return new(i||(i=Promise))(function(a,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function r(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,r)}l((n=n.apply(e,t||[])).next())})};class hi{constructor(e,t,i,n,a,o,s){this.stateHandler=t,this.messageHandler=i,this.fileHandler=n,this.eventBus=a,this.ui=o,this.plugins=s,this.cancelRequested=!1,this.provider=e}setProvider(e){this.provider=e}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(e){return pi(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(e){this.logError("Failed to auto-connect provider:",e)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const t=this.buildContext(),i=this.provider.sendMessage(e.text,t);yield this.processStream(i)}catch(e){throw this.logError("Provider error:",e),this.eventBus.emit("error",e),e}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(e){return pi(this,void 0,void 0,function*(){var t;let i=null;const n=Array.from(this.plugins.values()).filter(e=>Array.isArray(e.htmlTags)),a=[];let o="",s="",r=0;if(n.length>0)for(const e of n)for(const t of e.htmlTags)r=Math.max(r,t.open.length,t.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const c=yield e.next();if(l=c.done||!1,l||!c.value)break;const d=String(c.value),p=d.startsWith(s)?d.slice(s.length):d;s=d,o+=p;let h="",u=!1;for(;o.length;){const e=a[a.length-1];if(e){const t=e.buffer+o,n=t.indexOf(e.close);if(-1===n){e.buffer=t,o="";break}const s=t.slice(0,n),r="function"==typeof e.plugin.renderHtmlBlock?e.plugin.renderHtmlBlock(e.name,s):"";if(r)
|
|
3794
|
+
*/var pi=function(e,t,i,n){return new(i||(i=Promise))(function(a,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function r(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,r)}l((n=n.apply(e,t||[])).next())})};class hi{constructor(e,t,i,n,a,o,s){this.stateHandler=t,this.messageHandler=i,this.fileHandler=n,this.eventBus=a,this.ui=o,this.plugins=s,this.cancelRequested=!1,this.provider=e}setProvider(e){this.provider=e}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(e){return pi(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(e){this.logError("Failed to auto-connect provider:",e)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const t=this.buildContext(),i=this.provider.sendMessage(e.text,t);yield this.processStream(i)}catch(e){throw this.logError("Provider error:",e),this.eventBus.emit("error",e),e}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(e){return pi(this,void 0,void 0,function*(){var t;let i=null;const n=Array.from(this.plugins.values()).filter(e=>Array.isArray(e.htmlTags)),a=[];let o="",s="",r=0;if(n.length>0)for(const e of n)for(const t of e.htmlTags)r=Math.max(r,t.open.length,t.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const c=yield e.next();if(l=c.done||!1,l||!c.value)break;const d=String(c.value),p=d.startsWith(s)?d.slice(s.length):d;s=d,o+=p;let h="",u=!1;for(;o.length;){const e=a[a.length-1];if(e){const t=e.buffer+o,n=t.indexOf(e.close);if(-1===n){e.buffer=t,o="";break}const s=t.slice(0,n),r="function"==typeof e.plugin.renderHtmlBlock?e.plugin.renderHtmlBlock(e.name,s):"";if(r){const t=/<div data-placeholder-id="[^"]*">[\s\S]*?<\/div>/;e.hasPlaceholder&&i&&t.test(i.text)?(i.text=i.text.replace(t,r),this.messageHandler.updateMessage(i.id,{text:i.text})):e.hasPlaceholder&&t.test(h)?(h=h.replace(t,r),u=!0):(h+=r,u=!0)}a.pop(),o=t.slice(n+e.close.length);continue}if(0===n.length){h+=o,o="";break}let t=null;for(const e of n)for(const i of e.htmlTags){const n=o.indexOf(i.open);-1!==n&&(!t||n<t.idx)&&(t={idx:n,plugin:e,name:i.name,open:i.open,close:i.close})}if(!t){if(r>0&&o.length>r-1){const e=o.length-(r-1);h+=o.slice(0,e),o=o.slice(e)}break}{h+=o.slice(0,t.idx);let e=!1;if("function"==typeof t.plugin.renderHtmlBlockPlaceholder){const i=t.plugin.renderHtmlBlockPlaceholder(t.name);i&&(h+=i,u=!0,e=!0)}a.push({plugin:t.plugin,name:t.name,open:t.open,close:t.close,buffer:"",hasPlaceholder:e}),o=o.slice(t.idx+t.open.length)}}if(h)for(const e of this.plugins.values()){!(Array.isArray(e.htmlTags)&&e.htmlTags.length>0)&&e.afterReceive&&(h=yield e.afterReceive(h))}const b=u||/<\w+[^>]*>/.test(h);i?h&&(this.messageHandler.appendToBotMessage(i.id,h),i.text+=h,b&&!(null===(t=i.metadata)||void 0===t?void 0:t.renderAsHtml)&&this.messageHandler.updateMessage(i.id,{metadata:Object.assign(Object.assign({},i.metadata||{}),{renderAsHtml:!0})})):(i=this.messageHandler.createBotMessage(h,b?{renderAsHtml:!0}:void 0),this.stateHandler.addMessageToState(i),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.setTyping(!1))}if(!this.cancelRequested&&i&&(o&&this.messageHandler.appendToBotMessage(i.id,o),a.length>0)){const e=a.map(e=>e.open+e.buffer).join("");e&&this.messageHandler.appendToBotMessage(i.id,e)}}catch(e){throw this.logError("Error processing stream:",e),e}})}buildContext(){const e=this.stateHandler.getState(),t=e.currentThreadId?e.threads.find(t=>t.id===e.currentThreadId):void 0;return console.log("[ProviderService] buildContext state.uploadedFiles:",e.uploadedFiles),{messages:e.messages,metadata:e.metadata,selectedModules:e.selectedModules,currentThread:t,uploadedFiles:e.uploadedFiles}}uploadFileToProvider(e){return pi(this,void 0,void 0,function*(){var t,i;if(!(null===(i=null===(t=this.provider)||void 0===t?void 0:t.capabilities)||void 0===i?void 0:i.fileUpload)||!this.provider.uploadFile)throw new Error("Provider does not support file upload");const n=this.buildContext();return yield this.provider.uploadFile(e,n)})}getCapabilities(){var e;return(null===(e=this.provider)||void 0===e?void 0:e.capabilities)||{streaming:!1,fileUpload:!1,contextWindow:0}}log(e,...t){console.log(`[ProviderService] ${e}`,...t)}logError(e,t){console.error(`[ProviderService] ${e}`,t)}}
|
|
3795
3795
|
/**
|
|
3796
3796
|
* @license
|
|
3797
3797
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
@@ -6641,7 +6641,7 @@ function qn(e,t){const i=document.createElement(e);return i.style.cssText=t,i}fu
|
|
|
6641
6641
|
* @license
|
|
6642
6642
|
* Copyright 2024 Nuraly, Laabidi Aymen
|
|
6643
6643
|
* SPDX-License-Identifier: MIT
|
|
6644
|
-
*/const Qn=[{label:"Equals",value:"eq"},{label:"Not Equals",value:"neq"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Contains",value:"contains"},{label:"Does Not Contain",value:"notContains"},{label:"Starts With",value:"startsWith"},{label:"Ends With",value:"endsWith"},{label:"Is Empty",value:"isEmpty"},{label:"Is Not Empty",value:"isNotEmpty"},{label:"Matches Regex",value:"regex"}],Xn=new Set(["isEmpty","isNotEmpty"]);function Zn(e,t){var a;const o=e.conditionMode||"
|
|
6644
|
+
*/const Qn=[{label:"Equals",value:"eq"},{label:"Not Equals",value:"neq"},{label:"Greater Than",value:"gt"},{label:"Greater Than or Equal",value:"gte"},{label:"Less Than",value:"lt"},{label:"Less Than or Equal",value:"lte"},{label:"Contains",value:"contains"},{label:"Does Not Contain",value:"notContains"},{label:"Starts With",value:"startsWith"},{label:"Ends With",value:"endsWith"},{label:"Is Empty",value:"isEmpty"},{label:"Is Not Empty",value:"isNotEmpty"},{label:"Matches Regex",value:"regex"}],Xn=new Set(["isEmpty","isNotEmpty"]);function Zn(e,t){var a;const o=e.conditionMode||"expression",s=e.conditionLogic||"and",r=(null===(a=e.conditions)||void 0===a?void 0:a.length)?e.conditions:[{leftValue:"",operator:"eq",rightValue:""}],l=e=>{t("conditions",e)};return i`
|
|
6645
6645
|
<div class="config-field">
|
|
6646
6646
|
<label>Mode</label>
|
|
6647
6647
|
<nr-select
|
|
@@ -6733,7 +6733,7 @@ function qn(e,t){const i=document.createElement(e);return i.style.cssText=t,i}fu
|
|
|
6733
6733
|
<label>Language</label>
|
|
6734
6734
|
<nr-select
|
|
6735
6735
|
.value=${e.language||"javascript"}
|
|
6736
|
-
.options=${[{label:"JavaScript",value:"javascript"}
|
|
6736
|
+
.options=${[{label:"JavaScript",value:"javascript"}]}
|
|
6737
6737
|
@nr-change=${e=>t("language",e.detail.value)}
|
|
6738
6738
|
></nr-select>
|
|
6739
6739
|
</div>
|
|
@@ -9592,9 +9592,11 @@ return function(e,t,a,o,s){const r=a||"{workflowId}",l=e.httpPath||"/webhook",c=
|
|
|
9592
9592
|
<label>Duration</label>
|
|
9593
9593
|
<nr-input
|
|
9594
9594
|
type="number"
|
|
9595
|
+
min="0"
|
|
9595
9596
|
value=${String(e.duration||1e3)}
|
|
9596
|
-
@nr-input=${e=>t("duration",Number.parseInt(e.detail.value))}
|
|
9597
|
+
@nr-input=${e=>t("duration",Number.parseInt(e.detail.value)||0)}
|
|
9597
9598
|
></nr-input>
|
|
9599
|
+
<small class="field-hint">Effective delay is capped at 24 hours. Delays over 10s release the worker until they elapse.</small>
|
|
9598
9600
|
</div>
|
|
9599
9601
|
<div class="config-field">
|
|
9600
9602
|
<label>Unit</label>
|
|
Binary file
|
|
@@ -562,6 +562,7 @@ export const NODE_TEMPLATES = [
|
|
|
562
562
|
httpPath: '/webhook',
|
|
563
563
|
httpMethod: 'POST',
|
|
564
564
|
httpAuth: 'none',
|
|
565
|
+
httpAuthSecretKey: '',
|
|
565
566
|
httpCors: true,
|
|
566
567
|
httpRateLimit: 100,
|
|
567
568
|
httpRequestSchema: {},
|
|
@@ -570,7 +571,6 @@ export const NODE_TEMPLATES = [
|
|
|
570
571
|
inputs: [],
|
|
571
572
|
outputs: [
|
|
572
573
|
{ id: 'out', type: PortType.OUTPUT, label: 'Request' },
|
|
573
|
-
{ id: 'error', type: PortType.ERROR, label: 'Error' },
|
|
574
574
|
],
|
|
575
575
|
},
|
|
576
576
|
},
|
|
@@ -760,7 +760,7 @@ export const NODE_TEMPLATES = [
|
|
|
760
760
|
icon: NODE_ICONS[WorkflowNodeType.CONDITION],
|
|
761
761
|
color: NODE_COLORS[WorkflowNodeType.CONDITION],
|
|
762
762
|
category: 'control',
|
|
763
|
-
defaultConfig: { expression: '', language: 'javascript' },
|
|
763
|
+
defaultConfig: { conditionMode: 'expression', expression: '', language: 'javascript' },
|
|
764
764
|
defaultPorts: {
|
|
765
765
|
inputs: [{ id: 'in', type: PortType.INPUT, label: 'Input' }],
|
|
766
766
|
outputs: [
|
|
@@ -2824,7 +2824,7 @@ class Ct{constructor(){this.listeners=new Map}on(t,e){return this.listeners.has(
|
|
|
2824
2824
|
* @license
|
|
2825
2825
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
2826
2826
|
* SPDX-License-Identifier: MIT
|
|
2827
|
-
*/var Lt=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{l(n.next(t))}catch(t){s(t)}}function a(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,a)}l((n=n.apply(t,e||[])).next())})};class Bt{constructor(t,e,i,n,o,s,r){this.stateHandler=e,this.messageHandler=i,this.fileHandler=n,this.eventBus=o,this.ui=s,this.plugins=r,this.cancelRequested=!1,this.provider=t}setProvider(t){this.provider=t}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(t){return Lt(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(t){this.logError("Failed to auto-connect provider:",t)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const e=this.buildContext(),i=this.provider.sendMessage(t.text,e);yield this.processStream(i)}catch(t){throw this.logError("Provider error:",t),this.eventBus.emit("error",t),t}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(t){return Lt(this,void 0,void 0,function*(){var e;let i=null;const n=Array.from(this.plugins.values()).filter(t=>Array.isArray(t.htmlTags)),o=[];let s="",r="",a=0;if(n.length>0)for(const t of n)for(const e of t.htmlTags)a=Math.max(a,e.open.length,e.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const d=yield t.next();if(l=d.done||!1,l||!d.value)break;const c=String(d.value),h=c.startsWith(r)?c.slice(r.length):c;r=c,s+=h;let u="",p=!1;for(;s.length;){const t=o[o.length-1];if(t){const e=t.buffer+s,n=e.indexOf(t.close);if(-1===n){t.buffer=e,s="";break}const r=e.slice(0,n),a="function"==typeof t.plugin.renderHtmlBlock?t.plugin.renderHtmlBlock(t.name,r):"";if(a)
|
|
2827
|
+
*/var Lt=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{l(n.next(t))}catch(t){s(t)}}function a(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,a)}l((n=n.apply(t,e||[])).next())})};class Bt{constructor(t,e,i,n,o,s,r){this.stateHandler=e,this.messageHandler=i,this.fileHandler=n,this.eventBus=o,this.ui=s,this.plugins=r,this.cancelRequested=!1,this.provider=t}setProvider(t){this.provider=t}stopCurrentProcessing(){this.cancelRequested=!0,this.eventBus.emit("processing:stopped")}hasProvider(){return!!this.provider&&this.provider.isConnected()}processMessage(t){return Lt(this,void 0,void 0,function*(){if(this.provider){if(!this.provider.isConnected()){this.log("Provider not connected, attempting to connect...");try{yield this.provider.connect({})}catch(t){this.logError("Failed to auto-connect provider:",t)}if(!this.provider.isConnected())return void this.log("Provider is still not connected after attempt; aborting processing")}try{this.cancelRequested=!1,this.ui.onProcessingStart&&this.ui.onProcessingStart(),this.ui.onTypingStart&&this.ui.onTypingStart(),this.stateHandler.setTyping(!0),this.stateHandler.setProcessing(!0),this.eventBus.emit("processing:start");const e=this.buildContext(),i=this.provider.sendMessage(t.text,e);yield this.processStream(i)}catch(t){throw this.logError("Provider error:",t),this.eventBus.emit("error",t),t}finally{this.ui.onProcessingEnd&&this.ui.onProcessingEnd(),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.updateState({statusText:void 0}),this.stateHandler.setTyping(!1),this.stateHandler.setProcessing(!1),this.eventBus.emit("processing:end"),this.fileHandler.clearFiles()}}else this.log("No provider configured")})}processStream(t){return Lt(this,void 0,void 0,function*(){var e;let i=null;const n=Array.from(this.plugins.values()).filter(t=>Array.isArray(t.htmlTags)),o=[];let s="",r="",a=0;if(n.length>0)for(const t of n)for(const e of t.htmlTags)a=Math.max(a,e.open.length,e.close.length);try{let l=!1;for(;!l&&!this.cancelRequested;){const d=yield t.next();if(l=d.done||!1,l||!d.value)break;const c=String(d.value),h=c.startsWith(r)?c.slice(r.length):c;r=c,s+=h;let u="",p=!1;for(;s.length;){const t=o[o.length-1];if(t){const e=t.buffer+s,n=e.indexOf(t.close);if(-1===n){t.buffer=e,s="";break}const r=e.slice(0,n),a="function"==typeof t.plugin.renderHtmlBlock?t.plugin.renderHtmlBlock(t.name,r):"";if(a){const e=/<div data-placeholder-id="[^"]*">[\s\S]*?<\/div>/;t.hasPlaceholder&&i&&e.test(i.text)?(i.text=i.text.replace(e,a),this.messageHandler.updateMessage(i.id,{text:i.text})):t.hasPlaceholder&&e.test(u)?(u=u.replace(e,a),p=!0):(u+=a,p=!0)}o.pop(),s=e.slice(n+t.close.length);continue}if(0===n.length){u+=s,s="";break}let e=null;for(const t of n)for(const i of t.htmlTags){const n=s.indexOf(i.open);-1!==n&&(!e||n<e.idx)&&(e={idx:n,plugin:t,name:i.name,open:i.open,close:i.close})}if(!e){if(a>0&&s.length>a-1){const t=s.length-(a-1);u+=s.slice(0,t),s=s.slice(t)}break}{u+=s.slice(0,e.idx);let t=!1;if("function"==typeof e.plugin.renderHtmlBlockPlaceholder){const i=e.plugin.renderHtmlBlockPlaceholder(e.name);i&&(u+=i,p=!0,t=!0)}o.push({plugin:e.plugin,name:e.name,open:e.open,close:e.close,buffer:"",hasPlaceholder:t}),s=s.slice(e.idx+e.open.length)}}if(u)for(const t of this.plugins.values()){!(Array.isArray(t.htmlTags)&&t.htmlTags.length>0)&&t.afterReceive&&(u=yield t.afterReceive(u))}const f=p||/<\w+[^>]*>/.test(u);i?u&&(this.messageHandler.appendToBotMessage(i.id,u),i.text+=u,f&&!(null===(e=i.metadata)||void 0===e?void 0:e.renderAsHtml)&&this.messageHandler.updateMessage(i.id,{metadata:Object.assign(Object.assign({},i.metadata||{}),{renderAsHtml:!0})})):(i=this.messageHandler.createBotMessage(u,f?{renderAsHtml:!0}:void 0),this.stateHandler.addMessageToState(i),this.ui.onTypingEnd&&this.ui.onTypingEnd(),this.stateHandler.setTyping(!1))}if(!this.cancelRequested&&i&&(s&&this.messageHandler.appendToBotMessage(i.id,s),o.length>0)){const t=o.map(t=>t.open+t.buffer).join("");t&&this.messageHandler.appendToBotMessage(i.id,t)}}catch(t){throw this.logError("Error processing stream:",t),t}})}buildContext(){const t=this.stateHandler.getState(),e=t.currentThreadId?t.threads.find(e=>e.id===t.currentThreadId):void 0;return console.log("[ProviderService] buildContext state.uploadedFiles:",t.uploadedFiles),{messages:t.messages,metadata:t.metadata,selectedModules:t.selectedModules,currentThread:e,uploadedFiles:t.uploadedFiles}}uploadFileToProvider(t){return Lt(this,void 0,void 0,function*(){var e,i;if(!(null===(i=null===(e=this.provider)||void 0===e?void 0:e.capabilities)||void 0===i?void 0:i.fileUpload)||!this.provider.uploadFile)throw new Error("Provider does not support file upload");const n=this.buildContext();return yield this.provider.uploadFile(t,n)})}getCapabilities(){var t;return(null===(t=this.provider)||void 0===t?void 0:t.capabilities)||{streaming:!1,fileUpload:!1,contextWindow:0}}log(t,...e){console.log(`[ProviderService] ${t}`,...e)}logError(t,e){console.error(`[ProviderService] ${t}`,e)}}
|
|
2828
2828
|
/**
|
|
2829
2829
|
* @license
|
|
2830
2830
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
@@ -2910,7 +2910,7 @@ var Yt=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){
|
|
|
2910
2910
|
* @license
|
|
2911
2911
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
2912
2912
|
* SPDX-License-Identifier: MIT
|
|
2913
|
-
*/var Fe=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{l(n.next(t))}catch(t){s(t)}}function a(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,a)}l((n=n.apply(t,e||[])).next())})};class De extends ze{constructor(){super(...arguments),this.id="artifact",this.name="Artifact Plugin",this.version="1.0.0",this.artifacts=new Map}onInit(t){this.controller=t,t&&"function"==typeof t.on&&t.on("processing:end",()=>{var e,i;try{const n=[...(null===(e=t.getMessages)||void 0===e?void 0:e.call(t))||[]].reverse().find(t=>t.sender===q.Bot);n&&!(null===(i=n.metadata)||void 0===i?void 0:i.hasArtifacts)&&this.processMessage(n)}catch(t){}})}onMessageReceived(t){return Fe(this,void 0,void 0,function*(){t.sender===q.Bot&&this.processMessage(t)})}processMessage(t){var e;if(null===(e=t.metadata)||void 0===e?void 0:e.hasArtifacts)return void this.rebuildArtifactsFromMetadata(t);const i=t.text;if(!i)return;const n=/```(\w*)\n([\s\S]*?)```/g;let o;const s=[];let r=0;for(;null!==(o=n.exec(i));){const e=(o[1]||"text").toLowerCase(),i=o[2],n=`artifact-${t.id}-${r}`,a={id:n,language:e,content:i,title:this.extractTitle(i,e,r),messageId:t.id,index:r};s.push(a),this.artifacts.set(n,a),r++}if(0===s.length)return;let a=i,l=0;a=a.replaceAll(n,()=>`\0ARTIFACT_CARD_${s[l++].id}\0`),a=ct(a);for(const t of s)a=a.replace(`\0ARTIFACT_CARD_${t.id}\0`,this.renderPlaceholderCard(t));const d=this.getOncePerConversationStyleTag(this.getStyles());this.controller&&"function"==typeof this.controller.updateMessage&&this.controller.updateMessage(t.id,{text:d+a,metadata:Object.assign(Object.assign({},t.metadata),{renderAsHtml:!0,hasArtifacts:!0,artifactIds:s.map(t=>t.id),artifactOriginalText:i})})}rebuildArtifactsFromMetadata(t){var e,i;const n=null===(e=t.metadata)||void 0===e?void 0:e.artifactIds;if(!(null==n?void 0:n.length))return;if(n.every(t=>this.artifacts.has(t)))return;const o=null===(i=t.metadata)||void 0===i?void 0:i.artifactOriginalText;if(!o)return;const s=/```(\w*)\n([\s\S]*?)```/g;let r,a=0;for(;null!==(r=s.exec(o));){const e=(r[1]||"text").toLowerCase(),i=r[2],n=`artifact-${t.id}-${a}`,o=this.extractTitle(i,e,a);this.artifacts.set(n,{id:n,language:e,content:i,title:o,messageId:t.id,index:a}),a++}}getArtifact(t){return this.artifacts.get(t)}getAllArtifacts(){return Array.from(this.artifacts.values())}getArtifactsForMessage(t){return Array.from(this.artifacts.values()).filter(e=>e.messageId===t)}extractTitle(t,e,i){const n=t.trimStart().split("\n")[0]||"",o=[/^\/\/\s*(.+)/,/^#\s*(.+)/,/^--\s*(.+)/,/^\/\*\s*(.*?)\*\//,/^<!--\s*(.*?)-->/];for(const t of o){const e=t.exec(n);if(null==e?void 0:e[1]){const t=e[1].trim();if(t.length>0&&t.length<=60)return t}}return`${dt(e)} Snippet ${i+1}`}renderPlaceholderCard(t){const e=dt(t.language),i=at(t.title);return`<div class="nr-artifact-card" data-artifact-id="${t.id}" role="button" tabindex="0" aria-label="View ${i}">\n <nr-icon name="code" size="small" class="nr-artifact-card__icon"></nr-icon>\n <span class="nr-artifact-card__info">\n <span class="nr-artifact-card__title">${i}</span>\n <nr-tag size="small" class="nr-artifact-card__lang">${e}</nr-tag>\n </span>\n <nr-icon name="chevron-right" size="small" class="nr-artifact-card__chevron"></nr-icon>\n</div>`}getStyles(){return"\n .nr-artifact-card {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n margin: 8px 0;\n background: #f6f8fa;\n border: 1px solid #d0d7de;\n border-radius: 8px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n user-select: none;\n max-width: 100%;\n }\n .nr-artifact-card:hover {\n background: #eaeef2;\n border-color: #8b949e;\n }\n .nr-artifact-card:focus-visible {\n outline: 2px solid #0b5fff;\n outline-offset: 2px;\n }\n .nr-artifact-card__icon {\n flex-shrink: 0;\n color: #57606a;\n }\n .nr-artifact-card__info {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n }\n .nr-artifact-card__title {\n font-size: 13px;\n font-weight: 500;\n color: #1f2937;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.3;\n }\n .nr-artifact-card__lang {\n align-self: flex-start;\n }\n .nr-artifact-card__chevron {\n flex-shrink: 0;\n color: #6c757d;\n }\n "}}
|
|
2913
|
+
*/var Fe=function(t,e,i,n){return new(i||(i=Promise))(function(o,s){function r(t){try{l(n.next(t))}catch(t){s(t)}}function a(t){try{l(n.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i(function(t){t(e)})).then(r,a)}l((n=n.apply(t,e||[])).next())})};class De extends ze{constructor(){super(...arguments),this.id="artifact",this.name="Artifact Plugin",this.version="1.0.0",this.artifacts=new Map}onInit(t){this.controller=t,t&&"function"==typeof t.on&&t.on("processing:end",()=>{var e,i;try{const n=[...(null===(e=t.getMessages)||void 0===e?void 0:e.call(t))||[]].reverse().find(t=>t.sender===q.Bot);n&&!(null===(i=n.metadata)||void 0===i?void 0:i.hasArtifacts)&&this.processMessage(n)}catch(t){}})}onMessageReceived(t){return Fe(this,void 0,void 0,function*(){t.sender===q.Bot&&this.processMessage(t)})}processMessage(t){var e;if(null===(e=t.metadata)||void 0===e?void 0:e.hasArtifacts)return void this.rebuildArtifactsFromMetadata(t);const i=t.text;if(!i)return;const n=/```(\w*)\n([\s\S]*?)```/g;let o;const s=[];let r=0;for(;null!==(o=n.exec(i));){const e=(o[1]||"text").toLowerCase(),i=o[2],n=`artifact-${t.id}-${r}`,a={id:n,language:e,content:i,title:this.extractTitle(i,e,r),messageId:t.id,index:r};s.push(a),this.artifacts.set(n,a),r++}if(0===s.length)return;let a=i,l=0;a=a.replaceAll(n,()=>`\0ARTIFACT_CARD_${s[l++].id}\0`),a=ct(a);for(const t of s)a=a.replace(`\0ARTIFACT_CARD_${t.id}\0`,this.renderPlaceholderCard(t));const d=this.getOncePerConversationStyleTag(this.getStyles());this.controller&&"function"==typeof this.controller.updateMessage&&this.controller.updateMessage(t.id,{text:d+a,metadata:Object.assign(Object.assign({},t.metadata),{renderAsHtml:!0,hasArtifacts:!0,artifactIds:s.map(t=>t.id),artifactOriginalText:i})})}rebuildArtifactsFromMetadata(t){var e,i;const n=null===(e=t.metadata)||void 0===e?void 0:e.artifactIds;if(!(null==n?void 0:n.length))return;if(n.every(t=>this.artifacts.has(t)))return;const o=null===(i=t.metadata)||void 0===i?void 0:i.artifactOriginalText;if(!o)return;const s=/```(\w*)\n([\s\S]*?)```/g;let r,a=0;for(;null!==(r=s.exec(o));){const e=(r[1]||"text").toLowerCase(),i=r[2],n=`artifact-${t.id}-${a}`,o=this.extractTitle(i,e,a);this.artifacts.set(n,{id:n,language:e,content:i,title:o,messageId:t.id,index:a}),a++}}getArtifact(t){return this.artifacts.get(t)}getAllArtifacts(){return Array.from(this.artifacts.values())}getArtifactsForMessage(t){return Array.from(this.artifacts.values()).filter(e=>e.messageId===t)}processNow(t){var e;if(!this.controller||"function"!=typeof this.controller.getMessages)return!1;const i=(this.controller.getMessages()||[]).find(e=>e.id===t);return!(!i||i.sender!==q.Bot)&&((null===(e=i.metadata)||void 0===e?void 0:e.hasArtifacts)?(this.rebuildArtifactsFromMetadata(i),!0):(this.processMessage(i),!0))}extractTitle(t,e,i){const n=t.trimStart().split("\n")[0]||"",o=[/^\/\/\s*(.+)/,/^#\s*(.+)/,/^--\s*(.+)/,/^\/\*\s*(.*?)\*\//,/^<!--\s*(.*?)-->/];for(const t of o){const e=t.exec(n);if(null==e?void 0:e[1]){const t=e[1].trim();if(t.length>0&&t.length<=60)return t}}return`${dt(e)} Snippet ${i+1}`}renderPlaceholderCard(t){const e=dt(t.language),i=at(t.title);return`<div class="nr-artifact-card" data-artifact-id="${t.id}" role="button" tabindex="0" aria-label="View ${i}">\n <nr-icon name="code" size="small" class="nr-artifact-card__icon"></nr-icon>\n <span class="nr-artifact-card__info">\n <span class="nr-artifact-card__title">${i}</span>\n <nr-tag size="small" class="nr-artifact-card__lang">${e}</nr-tag>\n </span>\n <nr-icon name="chevron-right" size="small" class="nr-artifact-card__chevron"></nr-icon>\n</div>`}getStyles(){return"\n .nr-artifact-card {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 10px 14px;\n margin: 8px 0;\n background: #f6f8fa;\n border: 1px solid #d0d7de;\n border-radius: 8px;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n user-select: none;\n max-width: 100%;\n }\n .nr-artifact-card:hover {\n background: #eaeef2;\n border-color: #8b949e;\n }\n .nr-artifact-card:focus-visible {\n outline: 2px solid #0b5fff;\n outline-offset: 2px;\n }\n .nr-artifact-card__icon {\n flex-shrink: 0;\n color: #57606a;\n }\n .nr-artifact-card__info {\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 0;\n flex: 1;\n }\n .nr-artifact-card__title {\n font-size: 13px;\n font-weight: 500;\n color: #1f2937;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: 1.3;\n }\n .nr-artifact-card__lang {\n align-self: flex-start;\n }\n .nr-artifact-card__chevron {\n flex-shrink: 0;\n color: #6c757d;\n }\n "}}
|
|
2914
2914
|
/**
|
|
2915
2915
|
* @license
|
|
2916
2916
|
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
Binary file
|
|
@@ -58,6 +58,50 @@ export declare class ArtifactPlugin extends ChatPluginBase implements ChatbotPlu
|
|
|
58
58
|
getAllArtifacts(): ChatbotArtifact[];
|
|
59
59
|
/** Get all artifacts belonging to a specific message */
|
|
60
60
|
getArtifactsForMessage(messageId: string): ChatbotArtifact[];
|
|
61
|
+
/**
|
|
62
|
+
* Force artifact extraction on a specific message NOW, regardless of
|
|
63
|
+
* streaming state. Useful when structured content arrives via a
|
|
64
|
+
* side-channel (e.g. tool result events delivered out-of-band) and the
|
|
65
|
+
* caller wants the artifact card to appear before the stream's
|
|
66
|
+
* `processing:end` fires.
|
|
67
|
+
*
|
|
68
|
+
* <p>Idempotent: if the message has already been processed
|
|
69
|
+
* (`metadata.hasArtifacts === true`), this is a no-op. The regular
|
|
70
|
+
* `processing:end` handler will also skip the message later for the
|
|
71
|
+
* same reason, so calling this method early does NOT cause duplicate
|
|
72
|
+
* processing on stream completion.
|
|
73
|
+
*
|
|
74
|
+
* <p>Typical usage from outside the plugin:
|
|
75
|
+
* ```typescript
|
|
76
|
+
* const artifactPlugin = new ArtifactPlugin();
|
|
77
|
+
* const controller = new ChatbotCoreController({
|
|
78
|
+
* plugins: [new MarkdownPlugin(), artifactPlugin],
|
|
79
|
+
* // ...
|
|
80
|
+
* });
|
|
81
|
+
*
|
|
82
|
+
* // When a tool result arrives via a custom side-channel:
|
|
83
|
+
* provider.onMessage('TOOL_RESULT_JSON', (msg) => {
|
|
84
|
+
* const messages = controller.getMessages();
|
|
85
|
+
* const lastBotMsg = [...messages].reverse()
|
|
86
|
+
* .find(m => m.sender === ChatbotSender.Bot);
|
|
87
|
+
* if (lastBotMsg) {
|
|
88
|
+
* // 1) Append the fenced content to the bot message text
|
|
89
|
+
* controller.messageHandler.appendToBotMessage(
|
|
90
|
+
* lastBotMsg.id,
|
|
91
|
+
* '\n\n```json\n' + msg.content + '\n```\n\n'
|
|
92
|
+
* );
|
|
93
|
+
* // 2) Trigger artifact extraction right away
|
|
94
|
+
* artifactPlugin.processNow(lastBotMsg.id);
|
|
95
|
+
* }
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @param messageId id of the bot message to process. If not found, or
|
|
100
|
+
* not a bot message, returns false.
|
|
101
|
+
* @returns true when the message was processed (or rebuilt from
|
|
102
|
+
* metadata); false when skipped or message not found.
|
|
103
|
+
*/
|
|
104
|
+
processNow(messageId: string): boolean;
|
|
61
105
|
/**
|
|
62
106
|
* Try to extract a meaningful title from the first comment line of the code.
|
|
63
107
|
* Falls back to a generic "Code Snippet #N" title.
|
|
@@ -196,6 +196,68 @@ export class ArtifactPlugin extends ChatPluginBase {
|
|
|
196
196
|
getArtifactsForMessage(messageId) {
|
|
197
197
|
return Array.from(this.artifacts.values()).filter(a => a.messageId === messageId);
|
|
198
198
|
}
|
|
199
|
+
/**
|
|
200
|
+
* Force artifact extraction on a specific message NOW, regardless of
|
|
201
|
+
* streaming state. Useful when structured content arrives via a
|
|
202
|
+
* side-channel (e.g. tool result events delivered out-of-band) and the
|
|
203
|
+
* caller wants the artifact card to appear before the stream's
|
|
204
|
+
* `processing:end` fires.
|
|
205
|
+
*
|
|
206
|
+
* <p>Idempotent: if the message has already been processed
|
|
207
|
+
* (`metadata.hasArtifacts === true`), this is a no-op. The regular
|
|
208
|
+
* `processing:end` handler will also skip the message later for the
|
|
209
|
+
* same reason, so calling this method early does NOT cause duplicate
|
|
210
|
+
* processing on stream completion.
|
|
211
|
+
*
|
|
212
|
+
* <p>Typical usage from outside the plugin:
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const artifactPlugin = new ArtifactPlugin();
|
|
215
|
+
* const controller = new ChatbotCoreController({
|
|
216
|
+
* plugins: [new MarkdownPlugin(), artifactPlugin],
|
|
217
|
+
* // ...
|
|
218
|
+
* });
|
|
219
|
+
*
|
|
220
|
+
* // When a tool result arrives via a custom side-channel:
|
|
221
|
+
* provider.onMessage('TOOL_RESULT_JSON', (msg) => {
|
|
222
|
+
* const messages = controller.getMessages();
|
|
223
|
+
* const lastBotMsg = [...messages].reverse()
|
|
224
|
+
* .find(m => m.sender === ChatbotSender.Bot);
|
|
225
|
+
* if (lastBotMsg) {
|
|
226
|
+
* // 1) Append the fenced content to the bot message text
|
|
227
|
+
* controller.messageHandler.appendToBotMessage(
|
|
228
|
+
* lastBotMsg.id,
|
|
229
|
+
* '\n\n```json\n' + msg.content + '\n```\n\n'
|
|
230
|
+
* );
|
|
231
|
+
* // 2) Trigger artifact extraction right away
|
|
232
|
+
* artifactPlugin.processNow(lastBotMsg.id);
|
|
233
|
+
* }
|
|
234
|
+
* });
|
|
235
|
+
* ```
|
|
236
|
+
*
|
|
237
|
+
* @param messageId id of the bot message to process. If not found, or
|
|
238
|
+
* not a bot message, returns false.
|
|
239
|
+
* @returns true when the message was processed (or rebuilt from
|
|
240
|
+
* metadata); false when skipped or message not found.
|
|
241
|
+
*/
|
|
242
|
+
processNow(messageId) {
|
|
243
|
+
var _a;
|
|
244
|
+
if (!this.controller || typeof this.controller.getMessages !== 'function') {
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
const messages = this.controller.getMessages() || [];
|
|
248
|
+
const message = messages.find(m => m.id === messageId);
|
|
249
|
+
if (!message || message.sender !== ChatbotSender.Bot) {
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
if ((_a = message.metadata) === null || _a === void 0 ? void 0 : _a.hasArtifacts) {
|
|
253
|
+
// Already processed — but rebuild the in-memory artifacts Map so
|
|
254
|
+
// callers can immediately resolve artifact IDs via getArtifact().
|
|
255
|
+
this.rebuildArtifactsFromMetadata(message);
|
|
256
|
+
return true;
|
|
257
|
+
}
|
|
258
|
+
this.processMessage(message);
|
|
259
|
+
return true;
|
|
260
|
+
}
|
|
199
261
|
// ── Private helpers ────────────────────────────────────────────────
|
|
200
262
|
/**
|
|
201
263
|
* Try to extract a meaningful title from the first comment line of the code.
|
package/package.json
CHANGED