workflow / Exports
workflow
Table of contents
Enumerations
Classes
- AgentEventHandler
- ExecutionEventHandler
- TeamEventHandler
- ToolEventHandler
- EventHandlerUtils
- EdgeUtils
- PluginUtils
- NodeEdgeManager
- CoreWorkflowBuilder
- WorkflowEventSubscriber
Interfaces
- EventData
- EventProcessingResult
- EventHandler
- ConfigurableEventHandler
- EventHandlerConfig
- EventHandlerFactory
- EventHandlerRegistry
- EventProcessingContext
- ContextualEventHandler
- WorkflowSnapshot
- WorkflowBuilderConfig
- WorkflowBuilder
- ExtendedWorkflowBuilder
- WorkflowQuery
- WorkflowPortable
- EdgeValidationRule
- WorkflowEdge
- EdgeCreationOptions
- WorkflowEdgeUpdate
- EdgeQueryFilter
- WorkflowConnection
- WorkflowNodeData
- WorkflowNode
- WorkflowNodeUpdate
- NodeCreationOptions
- PluginConfig
- PluginContext
- WorkflowPlugin
- PluginValidationResult
- PluginManager
- PluginFactory
- ValidationPlugin
- TransformationPlugin
- AuditPlugin
- WorkflowEventSubscriberConfig
- UniversalPosition
- UniversalVisualState
- UniversalDimensions
- UniversalEdgeStyle
- UniversalWorkflowEdge
- UniversalWorkflowNode
- UniversalLayoutConfig
- UniversalWorkflowStructure
- UniversalPlatformConfig
- UniversalConversionOptions
Type Aliases
- WorkflowNodeType
- EventPattern
- WorkflowUpdate
- WorkflowUpdateCallback
- WorkflowNodeStatus
- WorkflowConnectionType
- PluginLifecycle
- PluginHookHandler
- EventSubscriptionCallback
- UniversalNodeType
- UniversalEdgeType
Variables
- WORKFLOW_DEFAULTS
- WORKFLOW_CONSTRAINTS
- EVENT_PROCESSING_DEFAULTS
- LOGGING_DEFAULTS
- CONNECTION_PRIORITIES
- NODE_DISPLAY_PRIORITIES
- NODE_STYLE_DEFAULTS
- PERFORMANCE_THRESHOLDS
- WORKFLOW_NODE_TYPES
- WORKFLOW_NODE_TYPE_DESCRIPTIONS
- UNIVERSAL_NODE_TYPES
- UNIVERSAL_EDGE_TYPES
Functions
Type Aliases
WorkflowNodeType
Ƭ WorkflowNodeType: typeof WORKFLOW_NODE_TYPES[keyof typeof WORKFLOW_NODE_TYPES]
WorkflowNodeType - 타입 안전성을 위한 Union Type
🔒 외부에서 이 타입에 없는 Node 타입 사용 방지 🎯 모든 Node 생성 시 이 상수들만 사용하도록 강제
Defined in
constants/workflow-types.ts:106
EventPattern
Ƭ EventPattern: string | RegExp | (eventType: string) => boolean
Event pattern matching types
Defined in
interfaces/event-handler.ts:22
WorkflowUpdate
Ƭ WorkflowUpdate: WorkflowNodeUpdate | WorkflowEdgeUpdate
Workflow update types
Defined in
interfaces/workflow-builder.ts:27
WorkflowUpdateCallback
Ƭ WorkflowUpdateCallback: (update: WorkflowUpdate) => void
Workflow subscription callback
Type declaration
▸ (update): void
Parameters
| Name | Type |
|---|---|
update | WorkflowUpdate |
Returns
void
Defined in
interfaces/workflow-builder.ts:49
WorkflowNodeStatus
Ƭ WorkflowNodeStatus: "pending" | "running" | "completed" | "error"
Base workflow node status types
Defined in
WorkflowConnectionType
Ƭ WorkflowConnectionType: "has_tools" | "contains" | "receives" | "processes" | "continues" | "executes" | "creates" | "triggers" | "branch" | "result" | "analyze" | "return" | "final" | "deliver" | "integrates" | "finalizes"
Connection types between workflow nodes Based on existing WorkflowConnectionType from workflow-event-subscriber
Defined in
interfaces/workflow-node.ts:15
PluginLifecycle
Ƭ PluginLifecycle: "beforeNodeCreate" | "afterNodeCreate" | "beforeNodeUpdate" | "afterNodeUpdate" | "beforeNodeDelete" | "afterNodeDelete" | "beforeEdgeCreate" | "afterEdgeCreate" | "beforeEdgeUpdate" | "afterEdgeUpdate" | "beforeEdgeDelete" | "afterEdgeDelete" | "beforeSnapshot" | "afterSnapshot"
Plugin lifecycle hooks
Defined in
interfaces/workflow-plugin.ts:11
PluginHookHandler
Ƭ PluginHookHandler<TInput, TOutput>: (input: TInput, context: PluginContext) => Promise<TOutput> | TOutput
Hook handler function type
Type parameters
| Name | Type |
|---|---|
TInput | unknown |
TOutput | unknown |
Type declaration
▸ (input, context): Promise<TOutput> | TOutput
Parameters
| Name | Type |
|---|---|
input | TInput |
context | PluginContext |
Returns
Promise<TOutput> | TOutput
Defined in
interfaces/workflow-plugin.ts:69
EventSubscriptionCallback
Ƭ EventSubscriptionCallback: (eventType: string, eventData: unknown) => void
Event subscription callback for external integrations
Type declaration
▸ (eventType, eventData): void
Parameters
| Name | Type |
|---|---|
eventType | string |
eventData | unknown |
Returns
void
Defined in
services/workflow-event-subscriber.ts:32
UniversalNodeType
Ƭ UniversalNodeType: typeof UNIVERSAL_NODE_TYPES[keyof typeof UNIVERSAL_NODE_TYPES]
Defined in
UniversalEdgeType
Ƭ UniversalEdgeType: typeof UNIVERSAL_EDGE_TYPES[keyof typeof UNIVERSAL_EDGE_TYPES]
Defined in
Variables
WORKFLOW_DEFAULTS
• Const WORKFLOW_DEFAULTS: Object
Default workflow configuration values These constants provide sensible defaults for workflow operations
Type declaration
| Name | Type |
|---|---|
NODE_LEVEL | 1 |
INITIAL_STATUS | "pending" |
AUTO_TIMESTAMP | true |
VALIDATE_CONNECTIONS | true |
MAX_RECURSION_DEPTH | 10 |
DEFAULT_TIMEOUT | 30000 |
PROCESSING_DELAY | 0 |
BATCH_SIZE | 100 |
EVENT_QUEUE_SIZE | 1000 |
MAX_RETRIES | 3 |
RETRY_DELAY | 1000 |
PLUGIN_PRIORITY | 50 |
PLUGIN_TIMEOUT | 5000 |
MAX_PLUGINS | 50 |
LOG_LEVEL | "info" |
DEBUG_MODE | false |
Defined in
WORKFLOW_CONSTRAINTS
• Const WORKFLOW_CONSTRAINTS: Object
Workflow validation constraints These limits help prevent system overload and ensure reasonable performance
Type declaration
| Name | Type |
|---|---|
MAX_NODES | 10000 |
MAX_EDGES | 50000 |
MAX_PLUGINS | 50 |
MAX_NODE_LABEL_LENGTH | 500 |
MAX_EDGE_LABEL_LENGTH | 200 |
MAX_DESCRIPTION_LENGTH | 2000 |
MIN_NODE_ID_LENGTH | 1 |
MAX_NODE_ID_LENGTH | 255 |
MIN_EDGE_ID_LENGTH | 1 |
MAX_EDGE_ID_LENGTH | 255 |
MAX_PROCESSING_TIME | 60000 |
MAX_EVENT_DATA_SIZE | 1048576 |
MAX_BATCH_OPERATIONS | 1000 |
MAX_GRAPH_DEPTH | 100 |
MAX_NODE_CONNECTIONS | 1000 |
MAX_PLUGIN_DEPTH | 10 |
Defined in
EVENT_PROCESSING_DEFAULTS
• Const EVENT_PROCESSING_DEFAULTS: Object
Default event processing configuration
Type declaration
| Name | Type |
|---|---|
PROCESS_ASYNC | true |
PRESERVE_ORDER | true |
ENABLE_BATCHING | false |
STOP_ON_ERROR | false |
LOG_ERRORS | true |
RETRY_ON_FAILURE | true |
CONCURRENT_LIMIT | 10 |
QUEUE_HIGH_WATERMARK | 1000 |
DEBOUNCE_TIME | 100 |
Defined in
LOGGING_DEFAULTS
• Const LOGGING_DEFAULTS: Object
Default logging configuration
Type declaration
| Name | Type |
|---|---|
LEVELS | { ERROR: 0 = 0; WARN: 1 = 1; INFO: 2 = 2; DEBUG: 3 = 3 } |
LEVELS.ERROR | 0 |
LEVELS.WARN | 1 |
LEVELS.INFO | 2 |
LEVELS.DEBUG | 3 |
DEFAULT_LEVEL | 2 |
INCLUDE_TIMESTAMP | true |
INCLUDE_LEVEL | true |
INCLUDE_SOURCE | false |
MAX_MESSAGE_LENGTH | 1000 |
TRUNCATE_LONG_MESSAGES | true |
Defined in
CONNECTION_PRIORITIES
• Const CONNECTION_PRIORITIES: Object
Connection type priorities for automatic layout Higher numbers indicate higher layout priority
Type declaration
| Name | Type |
|---|---|
receives | 100 |
processes | 90 |
executes | 80 |
creates | 70 |
return | 60 |
result | 50 |
analyze | 40 |
integrates | 30 |
branch | 20 |
final | 10 |
deliver | 5 |
Defined in
NODE_DISPLAY_PRIORITIES
• Const NODE_DISPLAY_PRIORITIES: Object
Node type display priorities for UI rendering Higher numbers render on top
Type declaration
| Name | Type |
|---|---|
user_input | 100 |
user_message | 95 |
agent | 90 |
agent_thinking | 80 |
tool_call | 70 |
tool_call_response | 65 |
response | 60 |
tool_result | 50 |
tools_container | 40 |
tool_definition | 35 |
output | 30 |
Defined in
NODE_STYLE_DEFAULTS
• Const NODE_STYLE_DEFAULTS: Object
Default node styling configuration
Type declaration
| Name | Type |
|---|---|
DEFAULT_WIDTH | 200 |
DEFAULT_HEIGHT | 100 |
MIN_WIDTH | 100 |
MIN_HEIGHT | 50 |
HORIZONTAL_SPACING | 250 |
VERTICAL_SPACING | 150 |
LEVEL_SPACING | 200 |
BORDER_RADIUS | 8 |
BORDER_WIDTH | 2 |
FONT_SIZE | 14 |
PADDING | 16 |
Defined in
PERFORMANCE_THRESHOLDS
• Const PERFORMANCE_THRESHOLDS: Object
Performance monitoring thresholds
Type declaration
| Name | Type |
|---|---|
SLOW_OPERATION | 1000 |
VERY_SLOW_OPERATION | 5000 |
HIGH_MEMORY | number |
VERY_HIGH_MEMORY | number |
QUEUE_WARNING_SIZE | 500 |
QUEUE_CRITICAL_SIZE | 800 |
LARGE_WORKFLOW | 1000 |
HUGE_WORKFLOW | 5000 |
Defined in
WORKFLOW_NODE_TYPES
• Const WORKFLOW_NODE_TYPES: Object
🎯 Entry/Exit Points - 워크플로우 시작과 종료
Type declaration
| Name | Type | Description |
|---|---|---|
USER_INPUT | "user_input" | - |
USER_MESSAGE | "user_message" | - |
OUTPUT | "output" | - |
AGENT | "agent" | 🤖 Agent Core - Agent 번호 시스템 (Agent 0, Agent 1, Agent 2...) 모든 Agent는 동일한 'agent' 타입으로 통일 번호와 역할은 data.agentNumber, data.label로 구분 |
TOOLS_CONTAINER | "tools_container" | - |
TOOL_DEFINITION | "tool_definition" | - |
AGENT_THINKING | "agent_thinking" | 🔄 Execution Flow - Agent의 실행 흐름 |
TOOL_CALL | "tool_call" | - |
TOOL_CALL_RESPONSE | "tool_call_response" | - |
RESPONSE | "response" | 📤 Response Types - 응답 처리 "final"이라는 개념 제거: 모든 응답은 연속될 수 있음 |
TOOL_RESULT | "tool_result" | - |
ERROR | "error" | - |
TEAM_ANALYSIS | "team_analysis" | 🏢 Team & Collaboration - 팀 협업 관련 노드들 |
TASK | "task" | - |
AGENT_CREATION | "agent_creation" | - |
AGGREGATION | "aggregation" | - |
TOOL_RESPONSE | "tool_response" | 🔧 Tool Operations - Tool 관련 세부 노드들 |
EXECUTION | "execution" | ⚙️ Execution & Messages - 실행 및 메시지 관련 |
ASSISTANT_MESSAGE | "assistant_message" | - |
Defined in
constants/workflow-types.ts:21
WORKFLOW_NODE_TYPE_DESCRIPTIONS
• Const WORKFLOW_NODE_TYPE_DESCRIPTIONS: Object
Node Type 설명 맵 (디버깅 및 로깅용)
Type declaration
| Name | Type |
|---|---|
user_input | "사용자 입력 (워크플로우 시작점)" |
user_message | "사용자 메시지 (Agent에게 전달)" |
output | "사용자 출력 (결과 전달점)" |
agent | "Agent (번호 시스템으로 구분)" |
tools_container | "Tools 컨테이너" |
tool_definition | "개별 Tool 정의" |
agent_thinking | "Agent 사고/판단 과정" |
tool_call | "개별 Tool 실행" |
tool_call_response | "Tool 실행 결과 응답" |
response | "Agent 응답 (연속 가능)" |
tool_result | "Tool 결과 합류점" |
error | "오류 처리 노드" |
team_analysis | "팀 분석 노드" |
task | "작업 할당 노드" |
agent_creation | "Agent 생성 프로세스" |
aggregation | "결과 집계 노드" |
tool_response | "Tool 응답 노드" |
execution | "실행 노드" |
assistant_message | "Assistant 메시지 노드" |
Defined in
constants/workflow-types.ts:121
UNIVERSAL_NODE_TYPES
• Const UNIVERSAL_NODE_TYPES: Object
Node type definitions for common workflow patterns
Type declaration
| Name | Type |
|---|---|
USER_INPUT | "user_input" |
USER_MESSAGE | "user_message" |
OUTPUT | "output" |
AGENT | "agent" |
TOOLS_CONTAINER | "tools_container" |
TOOL_DEFINITION | "tool_definition" |
AGENT_THINKING | "agent_thinking" |
TOOL_CALL | "tool_call" |
TOOL_CALL_RESPONSE | "tool_call_response" |
RESPONSE | "response" |
TOOL_RESULT | "tool_result" |
GROUP | "group" |
BRANCH | "branch" |
CONDITION | "condition" |
LOOP | "loop" |
ERROR | "error" |
Defined in
UNIVERSAL_EDGE_TYPES
• Const UNIVERSAL_EDGE_TYPES: Object
Edge type definitions for common connection patterns
Type declaration
| Name | Type |
|---|---|
HAS_TOOLS | "has_tools" |
CONTAINS | "contains" |
RECEIVES | "receives" |
PROCESSES | "processes" |
EXECUTES | "executes" |
RESULT | "result" |
BRANCH | "branch" |
ANALYZE | "analyze" |
RETURN | "return" |
FINAL | "final" |
DELIVER | "deliver" |
CREATES | "creates" |
TRIGGERS | "triggers" |
CONTINUES | "continues" |
INTEGRATES | "integrates" |
FINALIZES | "finalizes" |
SUCCESS | "success" |
ERROR | "error" |
FALLBACK | "fallback" |
RETRY | "retry" |
Defined in
Functions
isValidWorkflowNodeType
▸ isValidWorkflowNodeType(nodeType): nodeType is WorkflowNodeType
Node Type 검증 함수
Parameters
| Name | Type | Description |
|---|---|---|
nodeType | string | 검증할 Node 타입 |
Returns
nodeType is WorkflowNodeType
유효한 Node 타입인지 여부
Defined in
constants/workflow-types.ts:114
isWorkflowEdge
▸ isWorkflowEdge(obj): obj is WorkflowEdge
Type guard for WorkflowEdge
Parameters
| Name | Type |
|---|---|
obj | unknown |
Returns
obj is WorkflowEdge
Defined in
interfaces/workflow-edge.ts:97
isWorkflowNode
▸ isWorkflowNode(obj): obj is WorkflowNode
Type guard for WorkflowNode
Parameters
| Name | Type |
|---|---|
obj | unknown |
Returns
obj is WorkflowNode