model-compose 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. {model_compose-0.2.0 → model_compose-0.2.1}/PKG-INFO +1 -1
  2. {model_compose-0.2.0 → model_compose-0.2.1}/pyproject.toml +1 -1
  3. {model_compose-0.2.0/src/mindor/core/component/engine → model_compose-0.2.1/src/mindor/core/component}/base.py +7 -2
  4. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/component.py +4 -2
  5. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/__init__.py +1 -1
  6. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/http_client.py +3 -4
  7. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/http_server.py +3 -4
  8. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/mcp_client.py +3 -4
  9. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/mcp_server.py +3 -4
  10. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/engine/shell.py +3 -4
  11. model_compose-0.2.1/src/mindor/core/component/engine/workflow.py +41 -0
  12. {model_compose-0.2.0/src/mindor/core/controller/engine → model_compose-0.2.1/src/mindor/core/controller}/base.py +8 -2
  13. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/controller.py +4 -2
  14. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/engine/__init__.py +0 -1
  15. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/engine/http_server.py +2 -5
  16. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/engine/mcp_server.py +2 -3
  17. model_compose-0.2.1/src/mindor/core/gateway/__init__.py +2 -0
  18. {model_compose-0.2.0/src/mindor/core/gateway/engine → model_compose-0.2.1/src/mindor/core/gateway}/base.py +7 -1
  19. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/gateway/engine/__init__.py +1 -1
  20. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/gateway/engine/http_tunnel.py +2 -3
  21. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/gateway/engine/ssh_tunnel.py +2 -3
  22. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/gateway/gateway.py +4 -2
  23. {model_compose-0.2.0/src/mindor/core/listener/engine → model_compose-0.2.1/src/mindor/core/listener}/base.py +7 -1
  24. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/listener/engine/__init__.py +0 -1
  25. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/listener/engine/http_callback.py +2 -3
  26. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/listener/listener.py +4 -2
  27. {model_compose-0.2.0/src/mindor/core/workflow/job/impl → model_compose-0.2.1/src/mindor/core/workflow/job}/base.py +7 -1
  28. model_compose-0.2.1/src/mindor/core/workflow/job/impl/__init__.py +2 -0
  29. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/job/impl/action.py +2 -3
  30. model_compose-0.2.0/src/mindor/core/workflow/job/impl/wait.py → model_compose-0.2.1/src/mindor/core/workflow/job/impl/delay.py +11 -12
  31. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/job/job.py +4 -2
  32. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/workflow.py +1 -2
  33. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/action.py +3 -1
  34. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/__init__.py +1 -0
  35. model_compose-0.2.1/src/mindor/dsl/schema/action/impl/workflow.py +8 -0
  36. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/component.py +1 -0
  37. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/__init__.py +1 -0
  38. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/types.py +1 -0
  39. model_compose-0.2.1/src/mindor/dsl/schema/component/impl/workflow.py +17 -0
  40. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/impl/__init__.py +1 -1
  41. model_compose-0.2.0/src/mindor/dsl/schema/job/impl/wait.py → model_compose-0.2.1/src/mindor/dsl/schema/job/impl/delay.py +11 -11
  42. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/impl/types.py +1 -1
  43. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/job.py +1 -1
  44. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/PKG-INFO +1 -1
  45. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/SOURCES.txt +11 -8
  46. model_compose-0.2.0/src/mindor/core/gateway/__init__.py +0 -2
  47. model_compose-0.2.0/src/mindor/core/workflow/job/impl/__init__.py +0 -3
  48. {model_compose-0.2.0 → model_compose-0.2.1}/LICENSE +0 -0
  49. {model_compose-0.2.0 → model_compose-0.2.1}/README.md +0 -0
  50. {model_compose-0.2.0 → model_compose-0.2.1}/setup.cfg +0 -0
  51. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/__init__.py +0 -0
  52. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/cli/__init__.py +0 -0
  53. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/cli/compose.py +0 -0
  54. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/__init__.py +0 -0
  55. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/component/__init__.py +0 -0
  56. {model_compose-0.2.0/src/mindor/core/component/engine → model_compose-0.2.1/src/mindor/core/component}/context.py +0 -0
  57. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/compose/__init__.py +0 -0
  58. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/compose/compose.py +0 -0
  59. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/compose/manager.py +0 -0
  60. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/__init__.py +0 -0
  61. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/runner/__init__.py +0 -0
  62. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/runner/client.py +0 -0
  63. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/runner/http_client.py +0 -0
  64. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/runner/mcp_client.py +0 -0
  65. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/runner/runner.py +0 -0
  66. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/webui/__init__.py +0 -0
  67. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/webui/gradio.py +0 -0
  68. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/controller/webui/webui.py +0 -0
  69. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/listener/__init__.py +0 -0
  70. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/runtime/__init__.py +0 -0
  71. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/runtime/env.py +0 -0
  72. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/services/__init__.py +0 -0
  73. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/services/async_service.py +0 -0
  74. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/__init__.py +0 -0
  75. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/expiring.py +0 -0
  76. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/http_client.py +0 -0
  77. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/http_request.py +0 -0
  78. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/http_status.py +0 -0
  79. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/image.py +0 -0
  80. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/mcp_client.py +0 -0
  81. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/renderer.py +0 -0
  82. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/ssh_client.py +0 -0
  83. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/streaming.py +0 -0
  84. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/time.py +0 -0
  85. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/utils/workqueue.py +0 -0
  86. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/__init__.py +0 -0
  87. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/context.py +0 -0
  88. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/job/__init__.py +0 -0
  89. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/core/workflow/schema.py +0 -0
  90. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/__init__.py +0 -0
  91. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/loader.py +0 -0
  92. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/__init__.py +0 -0
  93. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/__init__.py +0 -0
  94. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/common.py +0 -0
  95. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/http_client.py +0 -0
  96. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/http_server.py +0 -0
  97. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/mcp_client.py +0 -0
  98. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/mcp_server.py +0 -0
  99. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/action/impl/shell.py +0 -0
  100. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/__init__.py +0 -0
  101. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/common.py +0 -0
  102. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/http_client.py +0 -0
  103. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/http_server.py +0 -0
  104. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/mcp_client.py +0 -0
  105. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/mcp_server.py +0 -0
  106. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/component/impl/shell.py +0 -0
  107. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/compose.py +0 -0
  108. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/__init__.py +0 -0
  109. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/controller.py +0 -0
  110. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/__init__.py +0 -0
  111. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/common.py +0 -0
  112. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/http_server.py +0 -0
  113. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/mcp_server.py +0 -0
  114. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/types.py +0 -0
  115. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/controller/impl/webui.py +0 -0
  116. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/__init__.py +0 -0
  117. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/gateway.py +0 -0
  118. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/impl/__init__.py +0 -0
  119. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/impl/common.py +0 -0
  120. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/impl/http_tunnel.py +0 -0
  121. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/impl/ssh_tunnel.py +0 -0
  122. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/gateway/impl/types.py +0 -0
  123. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/__init__.py +0 -0
  124. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/impl/action.py +0 -0
  125. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/job/impl/common.py +0 -0
  126. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/__init__.py +0 -0
  127. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/impl/__init__.py +0 -0
  128. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/impl/common.py +0 -0
  129. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/impl/http_callback.py +0 -0
  130. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/impl/types.py +0 -0
  131. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/listener/listener.py +0 -0
  132. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/__init__.py +0 -0
  133. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/impl/__init__.py +0 -0
  134. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/impl/common.py +0 -0
  135. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/impl/docker.py +0 -0
  136. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/impl/types.py +0 -0
  137. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/runtime/runtime.py +0 -0
  138. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/utils/__init__.py +0 -0
  139. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/utils/annotation.py +0 -0
  140. {model_compose-0.2.0 → model_compose-0.2.1}/src/mindor/dsl/schema/workflow.py +0 -0
  141. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/dependency_links.txt +0 -0
  142. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/entry_points.txt +0 -0
  143. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/requires.txt +0 -0
  144. {model_compose-0.2.0 → model_compose-0.2.1}/src/model_compose.egg-info/top_level.txt +0 -0
  145. {model_compose-0.2.0 → model_compose-0.2.1}/tests/test_cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: model-compose
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: model-compose: Declarative AI Model and Workflow Orchestrator
5
5
  Author-email: Hanyeol Cho <hanyeol.cho@gmail.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "model-compose"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "model-compose: Declarative AI Model and Workflow Orchestrator"
5
5
  authors = [
6
6
  { name = "Hanyeol Cho", email = "hanyeol.cho@gmail.com" }
@@ -1,6 +1,5 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Any
2
2
  from abc import ABC, abstractmethod
3
-
4
3
  from mindor.dsl.schema.component import ComponentConfig, ComponentType
5
4
  from mindor.dsl.schema.action import ActionConfig
6
5
  from mindor.core.services import AsyncService
@@ -66,4 +65,10 @@ class ComponentEngine(AsyncService):
66
65
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
67
66
  pass
68
67
 
69
- ComponentEngineMap: Dict[ComponentType, Type[ComponentEngine]] = {}
68
+ def register_component(type: ComponentType):
69
+ def decorator(cls: Type[ComponentEngine]) -> Type[ComponentEngine]:
70
+ ComponentRegistry[type] = cls
71
+ return cls
72
+ return decorator
73
+
74
+ ComponentRegistry: Dict[ComponentType, Type[ComponentEngine]] = {}
@@ -1,6 +1,6 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.component import ComponentConfig
3
- from .engine import ComponentEngine, ComponentEngineMap
3
+ from .base import ComponentEngine, ComponentRegistry
4
4
 
5
5
  ComponentInstances: Dict[str, ComponentEngine] = {}
6
6
 
@@ -32,7 +32,9 @@ def create_component(id: str, config: ComponentConfig, daemon: bool) -> Componen
32
32
  component = ComponentInstances[id] if id in ComponentInstances else None
33
33
 
34
34
  if not component:
35
- component = ComponentEngineMap[config.type](id, config, daemon)
35
+ if not ComponentRegistry:
36
+ from . import engine
37
+ component = ComponentRegistry[config.type](id, config, daemon)
36
38
  ComponentInstances[id] = component
37
39
 
38
40
  return component
@@ -1,6 +1,6 @@
1
- from .base import *
2
1
  from .http_server import *
3
2
  from .http_client import *
4
3
  from .mcp_server import *
5
4
  from .mcp_client import *
5
+ from .workflow import *
6
6
  from .shell import *
@@ -6,8 +6,8 @@ from mindor.core.listener import HttpCallbackListener
6
6
  from mindor.core.utils.http_client import HttpClient
7
7
  from mindor.core.utils.http_status import is_status_code_matched
8
8
  from mindor.core.utils.time import parse_duration
9
- from .base import ComponentEngine, ComponentType, ComponentEngineMap
10
- from .context import ComponentActionContext
9
+ from ..base import ComponentEngine, ComponentType, register_component
10
+ from ..context import ComponentActionContext
11
11
  from datetime import datetime, timezone
12
12
  import asyncio
13
13
 
@@ -111,6 +111,7 @@ class HttpClientAction:
111
111
 
112
112
  return await context.render_variable(self.config.endpoint)
113
113
 
114
+ @register_component(ComponentType.HTTP_CLIENT)
114
115
  class HttpClientComponent(ComponentEngine):
115
116
  def __init__(self, id: str, config: HttpClientComponentConfig, daemon: bool):
116
117
  super().__init__(id, config, daemon)
@@ -126,5 +127,3 @@ class HttpClientComponent(ComponentEngine):
126
127
 
127
128
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
128
129
  return await HttpClientAction(action).run(context, self.client)
129
-
130
- ComponentEngineMap[ComponentType.HTTP_CLIENT] = HttpClientComponent
@@ -1,8 +1,9 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.component import HttpServerComponentConfig
3
- from .base import ComponentEngine, ComponentType, ComponentEngineMap, ActionConfig
4
- from .context import ComponentActionContext
3
+ from ..base import ComponentEngine, ComponentType, ActionConfig, register_component
4
+ from ..context import ComponentActionContext
5
5
 
6
+ @register_component(ComponentType.HTTP_SERVER)
6
7
  class HttpServerComponent(ComponentEngine):
7
8
  def __init__(self, id: str, config: HttpServerComponentConfig, daemon: bool):
8
9
  super().__init__(id, config, daemon)
@@ -15,5 +16,3 @@ class HttpServerComponent(ComponentEngine):
15
16
 
16
17
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
17
18
  return {}
18
-
19
- ComponentEngineMap[ComponentType.HTTP_SERVER] = HttpServerComponent
@@ -2,8 +2,8 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
2
2
  from mindor.dsl.schema.component import McpClientComponentConfig
3
3
  from mindor.dsl.schema.action import ActionConfig, McpClientActionConfig
4
4
  from mindor.core.utils.mcp_client import McpClient, ContentBlock, TextContent, ImageContent, AudioContent
5
- from .base import ComponentEngine, ComponentType, ComponentEngineMap, ActionConfig
6
- from .context import ComponentActionContext
5
+ from ..base import ComponentEngine, ComponentType, ActionConfig, register_component
6
+ from ..context import ComponentActionContext
7
7
 
8
8
  class McpClientAction():
9
9
  def __init__(self, config: McpClientActionConfig):
@@ -27,6 +27,7 @@ class McpClientAction():
27
27
 
28
28
  return None
29
29
 
30
+ @register_component(ComponentType.MCP_CLIENT)
30
31
  class McpClientComponent(ComponentEngine):
31
32
  def __init__(self, id: str, config: McpClientComponentConfig, daemon: bool):
32
33
  super().__init__(id, config, daemon)
@@ -40,5 +41,3 @@ class McpClientComponent(ComponentEngine):
40
41
 
41
42
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
42
43
  return await McpClientAction(action).run(context, self.client)
43
-
44
- ComponentEngineMap[ComponentType.MCP_CLIENT] = McpClientComponent
@@ -1,8 +1,9 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.component import McpServerComponentConfig
3
- from .base import ComponentEngine, ComponentType, ComponentEngineMap, ActionConfig
4
- from .context import ComponentActionContext
3
+ from ..base import ComponentEngine, ComponentType, ActionConfig, register_component
4
+ from ..context import ComponentActionContext
5
5
 
6
+ @register_component(ComponentType.MCP_SERVER)
6
7
  class McpServerComponent(ComponentEngine):
7
8
  def __init__(self, id: str, config: McpServerComponentConfig, daemon: bool):
8
9
  super().__init__(id, config, daemon)
@@ -15,5 +16,3 @@ class McpServerComponent(ComponentEngine):
15
16
 
16
17
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
17
18
  return {}
18
-
19
- ComponentEngineMap[ComponentType.MCP_SERVER] = McpServerComponent
@@ -1,8 +1,8 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.component import ShellComponentConfig
3
3
  from mindor.dsl.schema.action import ActionConfig, ShellActionConfig
4
- from .base import ComponentEngine, ComponentType, ComponentEngineMap, ActionConfig
5
- from .context import ComponentActionContext
4
+ from ..base import ComponentEngine, ComponentType, ActionConfig, register_component
5
+ from ..context import ComponentActionContext
6
6
  from asyncio.subprocess import Process
7
7
  import asyncio, os
8
8
 
@@ -64,6 +64,7 @@ class ShellAction:
64
64
  working_dir = self.base_dir or os.getcwd()
65
65
  return working_dir
66
66
 
67
+ @register_component(ComponentType.SHELL)
67
68
  class ShellComponent(ComponentEngine):
68
69
  def __init__(self, id: str, config: ShellComponentConfig, daemon: bool):
69
70
  super().__init__(id, config, daemon)
@@ -76,5 +77,3 @@ class ShellComponent(ComponentEngine):
76
77
 
77
78
  async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
78
79
  return await ShellAction(action, self.config.base_dir, self.config.env).run(context)
79
-
80
- ComponentEngineMap[ComponentType.SHELL] = ShellComponent
@@ -0,0 +1,41 @@
1
+ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
+ from mindor.dsl.schema.component import ComponentConfig, WorkflowComponentConfig
3
+ from mindor.dsl.schema.action import ActionConfig, WorkflowActionConfig
4
+ from mindor.dsl.schema.workflow import WorkflowConfig
5
+ from mindor.core.workflow import Workflow, WorkflowResolver, create_workflow
6
+ from ..base import ComponentEngine, ComponentType, ActionConfig, register_component
7
+ from ..context import ComponentActionContext
8
+ import asyncio, os
9
+
10
+ class WorkflowAction:
11
+ def __init__(self, config: WorkflowActionConfig):
12
+ self.config: WorkflowActionConfig = config
13
+ self.components: Dict[str, ComponentConfig] = None
14
+ self.workflows: Dict[str, WorkflowConfig] = None
15
+
16
+ async def run(self, context: ComponentActionContext) -> Any:
17
+ workflow_id = await context.render_variable(self.config.workflow)
18
+ input = await context.render_variable(self.config.input)
19
+
20
+ workflow = self._create_workflow(workflow_id)
21
+ output = await workflow.run(context.call_id, input)
22
+ context.register_source("output", output)
23
+
24
+ return (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else output
25
+
26
+ def _create_workflow(self, workflow_id: Optional[str]) -> Workflow:
27
+ return create_workflow(*WorkflowResolver(self.workflows).resolve(workflow_id), self.components)
28
+
29
+ @register_component(ComponentType.WORKFLOW)
30
+ class WorkflowComponent(ComponentEngine):
31
+ def __init__(self, id: str, config: WorkflowComponentConfig, daemon: bool):
32
+ super().__init__(id, config, daemon)
33
+
34
+ async def _serve(self) -> None:
35
+ pass
36
+
37
+ async def _shutdown(self) -> None:
38
+ pass
39
+
40
+ async def _run(self, action: ActionConfig, context: ComponentActionContext) -> Any:
41
+ return await WorkflowAction(action).run(context)
@@ -127,7 +127,7 @@ class ControllerEngine(AsyncService):
127
127
  self.task_states.set(task_id, state)
128
128
 
129
129
  try:
130
- workflow = create_workflow(*WorkflowResolver(self.workflows).resolve(workflow_id), self.components)
130
+ workflow = self._create_workflow(workflow_id)
131
131
  output = await workflow.run(task_id, input)
132
132
  state = TaskState(task_id=task_id, status="completed", output=output)
133
133
  except Exception as e:
@@ -153,4 +153,10 @@ class ControllerEngine(AsyncService):
153
153
  def _create_workflow(self, workflow_id: Optional[str]) -> Workflow:
154
154
  return create_workflow(*WorkflowResolver(self.workflows).resolve(workflow_id), self.components)
155
155
 
156
- ControllerEngineMap: Dict[ControllerType, Type[ControllerEngine]] = {}
156
+ def register_controller(type: ControllerType):
157
+ def decorator(cls: Type[ControllerEngine]) -> Type[ControllerEngine]:
158
+ ControllerRegistry[type] = cls
159
+ return cls
160
+ return decorator
161
+
162
+ ControllerRegistry: Dict[ControllerType, Type[ControllerEngine]] = {}
@@ -4,7 +4,7 @@ from mindor.dsl.schema.component import ComponentConfig
4
4
  from mindor.dsl.schema.listener import ListenerConfig
5
5
  from mindor.dsl.schema.gateway import GatewayConfig
6
6
  from mindor.dsl.schema.workflow import WorkflowConfig
7
- from .engine import ControllerEngine, ControllerEngineMap
7
+ from .base import ControllerEngine, ControllerRegistry
8
8
 
9
9
  def create_controller(
10
10
  config: ControllerConfig,
@@ -15,6 +15,8 @@ def create_controller(
15
15
  daemon: bool
16
16
  ) -> ControllerEngine:
17
17
  try:
18
- return ControllerEngineMap[config.type](config, components, listeners, gateways, workflows, daemon)
18
+ if not ControllerRegistry:
19
+ from . import engine
20
+ return ControllerRegistry[config.type](config, components, listeners, gateways, workflows, daemon)
19
21
  except KeyError:
20
22
  raise ValueError(f"Unsupported controller type: {config.type}")
@@ -1,3 +1,2 @@
1
- from .base import *
2
1
  from .http_server import *
3
2
  from .mcp_server import *
@@ -1,7 +1,6 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from typing_extensions import Self
3
3
  from pydantic import BaseModel
4
-
5
4
  from mindor.dsl.schema.controller import HttpServerControllerConfig
6
5
  from mindor.dsl.schema.component import ComponentConfig
7
6
  from mindor.dsl.schema.listener import ListenerConfig
@@ -9,8 +8,7 @@ from mindor.dsl.schema.gateway import GatewayConfig
9
8
  from mindor.dsl.schema.workflow import WorkflowConfig
10
9
  from mindor.core.utils.http_request import parse_request_body, parse_options_header
11
10
  from mindor.core.utils.streaming import StreamResource
12
- from .base import ControllerEngine, ControllerType, ControllerEngineMap, TaskState
13
-
11
+ from ..base import ControllerEngine, ControllerType, TaskState, register_controller
14
12
  from fastapi import FastAPI, APIRouter, Request, Body, HTTPException
15
13
  from fastapi.middleware.cors import CORSMiddleware
16
14
  from fastapi.responses import Response, JSONResponse, StreamingResponse
@@ -38,6 +36,7 @@ class TaskResult(BaseModel):
38
36
  error=instance.error
39
37
  )
40
38
 
39
+ @register_controller(ControllerType.HTTP_SERVER)
41
40
  class HttpServerController(ControllerEngine):
42
41
  def __init__(
43
42
  self,
@@ -160,5 +159,3 @@ class HttpServerController(ControllerEngine):
160
159
  headers["Content-Disposition"] = f'attachment; filename="{filename}"'
161
160
 
162
161
  return headers
163
-
164
- ControllerEngineMap[ControllerType.HTTP_SERVER] = HttpServerController
@@ -8,7 +8,7 @@ from mindor.core.workflow.schema import WorkflowSchema, create_workflow_schema
8
8
  from mindor.core.utils.streaming import StreamResource, Base64StreamResource
9
9
  from mindor.core.utils.streaming import save_stream_to_temporary_file
10
10
  from mindor.core.utils.http_client import create_stream_with_url
11
- from .base import ControllerEngine, ControllerType, ControllerEngineMap, TaskState
11
+ from ..base import ControllerEngine, ControllerType, TaskState, register_controller
12
12
  from mcp.server.fastmcp.server import FastMCP
13
13
  from mcp.types import TextContent, ImageContent, AudioContent
14
14
  import uvicorn, re, json
@@ -132,6 +132,7 @@ class WorkflowToolGenerator():
132
132
 
133
133
  return "str"
134
134
 
135
+ @register_controller(ControllerType.MCP_SERVER)
135
136
  class McpServerController(ControllerEngine):
136
137
  def __init__(
137
138
  self,
@@ -180,5 +181,3 @@ class McpServerController(ControllerEngine):
180
181
  async def _shutdown(self) -> None:
181
182
  if self.server:
182
183
  self.server.should_exit = True
183
-
184
- ControllerEngineMap[ControllerType.MCP_SERVER] = McpServerController
@@ -0,0 +1,2 @@
1
+ from .gateway import *
2
+ from .engine import HttpTunnelGateway, SshTunnelGateway
@@ -14,4 +14,10 @@ class GatewayEngine(AsyncService):
14
14
  def get_context(self) -> Dict[str, Any]:
15
15
  pass
16
16
 
17
- GatewayEngineMap: Dict[GatewayType, Type[GatewayEngine]] = {}
17
+ def register_gateway(type: GatewayType):
18
+ def decorator(cls: Type[GatewayEngine]) -> Type[GatewayEngine]:
19
+ GatewayRegistry[type] = cls
20
+ return cls
21
+ return decorator
22
+
23
+ GatewayRegistry: Dict[GatewayType, Type[GatewayEngine]] = {}
@@ -1,2 +1,2 @@
1
- from .base import *
2
1
  from .http_tunnel import *
2
+ from .ssh_tunnel import *
@@ -1,8 +1,9 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Iterator, Any
2
2
  from mindor.dsl.schema.gateway import HttpTunnelGatewayConfig
3
- from .base import GatewayEngine, GatewayType, GatewayEngineMap
3
+ from ..base import GatewayEngine, GatewayType, register_gateway
4
4
  from pyngrok import ngrok
5
5
 
6
+ @register_gateway(GatewayType.HTTP_TUNNEL)
6
7
  class HttpTunnelGateway(GatewayEngine):
7
8
  def __init__(self, id: str, config: HttpTunnelGatewayConfig, daemon: bool):
8
9
  super().__init__(id, config, daemon)
@@ -29,5 +30,3 @@ class HttpTunnelGateway(GatewayEngine):
29
30
  self.tunnel = None
30
31
  self.public_url = None
31
32
  return
32
-
33
- GatewayEngineMap[GatewayType.HTTP_TUNNEL] = HttpTunnelGateway
@@ -1,8 +1,9 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Iterator, Any
2
2
  from mindor.dsl.schema.gateway import SshTunnelGatewayConfig
3
- from .base import GatewayEngine, GatewayType, GatewayEngineMap
3
+ from ..base import GatewayEngine, GatewayType, register_gateway
4
4
  from pyngrok import ngrok
5
5
 
6
+ @register_gateway(GatewayType.SSH_TUNNEL)
6
7
  class SshTunnelGateway(GatewayEngine):
7
8
  def __init__(self, id: str, config: SshTunnelGatewayConfig, daemon: bool):
8
9
  super().__init__(id, config, daemon)
@@ -21,5 +22,3 @@ class SshTunnelGateway(GatewayEngine):
21
22
 
22
23
  async def _shutdown(self) -> None:
23
24
  pass
24
-
25
- GatewayEngineMap[GatewayType.SSH_TUNNEL] = SshTunnelGateway
@@ -1,6 +1,6 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.gateway import GatewayConfig
3
- from .engine import GatewayEngine, GatewayEngineMap
3
+ from .base import GatewayEngine, GatewayRegistry
4
4
 
5
5
  GatewayInstances: Dict[str, GatewayEngine] = {}
6
6
 
@@ -9,7 +9,9 @@ def create_gateway(id: str, config: GatewayConfig, daemon: bool) -> GatewayEngin
9
9
  gateway = GatewayInstances[id] if id in GatewayInstances else None
10
10
 
11
11
  if not gateway:
12
- gateway = GatewayEngineMap[config.type](id, config, daemon)
12
+ if not GatewayRegistry:
13
+ from . import engine
14
+ gateway = GatewayRegistry[config.type](id, config, daemon)
13
15
  GatewayInstances[id] = gateway
14
16
 
15
17
  return gateway
@@ -26,4 +26,10 @@ class ListenerEngine(AsyncService):
26
26
 
27
27
  await super()._stop()
28
28
 
29
- ListenerEngineMap: Dict[ListenerType, Type[ListenerEngine]] = {}
29
+ def register_listener(type: ListenerType):
30
+ def decorator(cls: Type[ListenerEngine]) -> Type[ListenerEngine]:
31
+ ListenerRegistry[type] = cls
32
+ return cls
33
+ return decorator
34
+
35
+ ListenerRegistry: Dict[ListenerType, Type[ListenerEngine]] = {}
@@ -1,2 +1 @@
1
- from .base import *
2
1
  from .http_callback import *
@@ -3,7 +3,7 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
3
3
  from mindor.dsl.schema.listener import HttpCallbackListenerConfig, HttpCallbackConfig
4
4
  from mindor.core.utils.http_request import parse_request_body, parse_options_header
5
5
  from mindor.core.utils.renderer import VariableRenderer
6
- from .base import ListenerEngine, ListenerType, ListenerEngineMap
6
+ from ..base import ListenerEngine, ListenerType, register_listener
7
7
 
8
8
  from fastapi import FastAPI, APIRouter, Body, HTTPException, Request
9
9
  from fastapi.responses import Response, JSONResponse
@@ -45,6 +45,7 @@ class HttpCallbackContext:
45
45
  return self.query
46
46
  raise KeyError(f"Unknown source: {key}")
47
47
 
48
+ @register_listener(ListenerType.HTTP_CALLBACK)
48
49
  class HttpCallbackListener(ListenerEngine):
49
50
  def __init__(self, id: str, config: HttpCallbackListenerConfig, daemon: bool):
50
51
  super().__init__(id, config, daemon)
@@ -124,5 +125,3 @@ class HttpCallbackListener(ListenerEngine):
124
125
  def register_pending_future(cls, id: str, future: asyncio.Future) -> None:
125
126
  with _pending_futures_lock:
126
127
  _pending_futures[id] = future
127
-
128
- ListenerEngineMap[ListenerType.HTTP_CALLBACK] = HttpCallbackListener
@@ -1,6 +1,6 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
2
  from mindor.dsl.schema.listener import ListenerConfig
3
- from .engine import ListenerEngine, ListenerEngineMap
3
+ from .base import ListenerEngine, ListenerRegistry
4
4
 
5
5
  ListenerInstances: Dict[str, ListenerEngine] = {}
6
6
 
@@ -9,7 +9,9 @@ def create_listener(id: str, config: ListenerConfig, daemon: bool) -> ListenerEn
9
9
  listener = ListenerInstances[id] if id in ListenerInstances else None
10
10
 
11
11
  if not listener:
12
- listener = ListenerEngineMap[config.type](id, config, daemon)
12
+ if not ListenerEngine:
13
+ from . import engine
14
+ listener = ListenerRegistry[config.type](id, config, daemon)
13
15
  ListenerInstances[id] = listener
14
16
 
15
17
  return listener
@@ -14,4 +14,10 @@ class Job(ABC):
14
14
  async def run(self, context: WorkflowContext) -> Any:
15
15
  pass
16
16
 
17
- JobMap: Dict[JobType, Type[Job]] = {}
17
+ def register_job(type: JobType):
18
+ def decorator(cls: Type[Job]) -> Type[Job]:
19
+ JobRegistry[type] = cls
20
+ return cls
21
+ return decorator
22
+
23
+ JobRegistry: Dict[JobType, Type[Job]] = {}
@@ -0,0 +1,2 @@
1
+ from .action import *
2
+ from .delay import *
@@ -2,9 +2,10 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
2
2
  from mindor.dsl.schema.job import ActionJobConfig, JobType
3
3
  from mindor.dsl.schema.component import ComponentConfig
4
4
  from mindor.core.component import ComponentEngine, ComponentResolver, create_component
5
- from .base import Job, JobMap, WorkflowContext
5
+ from ..base import Job, JobType, WorkflowContext, register_job
6
6
  import asyncio, ulid
7
7
 
8
+ @register_job(JobType.ACTION)
8
9
  class ActionJob(Job):
9
10
  def __init__(self, id: str, config: ActionJobConfig, components: Dict[str, ComponentConfig]):
10
11
  super().__init__(id, config, components)
@@ -42,5 +43,3 @@ class ActionJob(Job):
42
43
  return ComponentResolver(self.components).resolve(component)
43
44
 
44
45
  return id, component
45
-
46
- JobMap[JobType.ACTION] = ActionJob
@@ -1,25 +1,26 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Any
2
- from mindor.dsl.schema.job import WaitJobConfig, WaitJobType
2
+ from mindor.dsl.schema.job import DelayJobConfig, DelayJobMode
3
3
  from mindor.dsl.schema.component import ComponentConfig
4
4
  from mindor.core.utils.time import parse_duration, parse_datetime
5
- from .base import Job, JobType, JobMap, WorkflowContext
5
+ from ..base import Job, JobType, WorkflowContext, register_job
6
6
  from datetime import datetime
7
7
  import asyncio
8
8
 
9
- class WaitJob(Job):
10
- def __init__(self, id: str, config: WaitJobConfig, components: Dict[str, ComponentConfig]):
9
+ @register_job(JobType.DELAY)
10
+ class DelayJob(Job):
11
+ def __init__(self, id: str, config: DelayJobConfig, components: Dict[str, ComponentConfig]):
11
12
  super().__init__(id, config, components)
12
13
 
13
14
  async def run(self, context: WorkflowContext) -> Any:
14
- if self.config.mode == WaitJobType.TIME_INTERVAL:
15
- return await self._wait_until_time_interval(context)
15
+ if self.config.mode == DelayJobMode.TIME_INTERVAL:
16
+ return await self._delay_for_time_interval(context)
16
17
 
17
- if self.config.mode == WaitJobType.SPECIFIC_TIME:
18
- return await self._wait_until_specific_time(context)
18
+ if self.config.mode == DelayJobMode.SPECIFIC_TIME:
19
+ return await self._delay_until_specific_time(context)
19
20
 
20
21
  return None
21
22
 
22
- async def _wait_until_time_interval(self, context: WorkflowContext) -> Any:
23
+ async def _delay_for_time_interval(self, context: WorkflowContext) -> Any:
23
24
  duration = parse_duration((await context.render_variable(self.config.duration)) or 0.0)
24
25
  duration = duration.total_seconds()
25
26
 
@@ -28,7 +29,7 @@ class WaitJob(Job):
28
29
 
29
30
  return None
30
31
 
31
- async def _wait_until_specific_time(self, context: WorkflowContext) -> Any:
32
+ async def _delay_until_specific_time(self, context: WorkflowContext) -> Any:
32
33
  timezone = await context.render_variable(self.config.timezone)
33
34
  time = parse_datetime((await context.render_variable(self.config.time)) or datetime(2000, 1, 1, 0, 0, 0), timezone)
34
35
 
@@ -39,5 +40,3 @@ class WaitJob(Job):
39
40
  await asyncio.sleep(duration)
40
41
 
41
42
  return None
42
-
43
- JobMap[JobType.WAIT] = WaitJob
@@ -1,7 +1,9 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Any
2
2
  from mindor.dsl.schema.workflow import JobConfig
3
3
  from mindor.dsl.schema.component import ComponentConfig
4
- from .impl import Job, JobMap
4
+ from .base import Job, JobRegistry
5
5
 
6
6
  def create_job(id: str, config: JobConfig, components: Dict[str, ComponentConfig]) -> Job:
7
- return JobMap[config.type](id, config, components)
7
+ if not JobRegistry:
8
+ from . import impl
9
+ return JobRegistry[config.type](id, config, components)
@@ -1,7 +1,6 @@
1
1
  from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Any
2
2
  from mindor.dsl.schema.workflow import WorkflowConfig, JobConfig
3
3
  from mindor.dsl.schema.component import ComponentConfig
4
- from mindor.core.component import ComponentEngine, ComponentResolver, create_component
5
4
  from .context import WorkflowContext
6
5
  from .job import Job, create_job
7
6
  import asyncio
@@ -130,8 +129,8 @@ class Workflow:
130
129
  self.components: Dict[str, ComponentConfig] = components
131
130
 
132
131
  async def run(self, task_id: str, input: Dict[str, Any]) -> Any:
133
- context = WorkflowContext(task_id, input)
134
132
  runner = WorkflowRunner(self.config.jobs, self.components)
133
+ context = WorkflowContext(task_id, input)
135
134
 
136
135
  return await runner.run(context)
137
136
 
@@ -7,7 +7,9 @@ ActionConfig = Annotated[
7
7
  HttpServerActionConfig,
8
8
  HttpClientActionConfig,
9
9
  McpServerActionConfig,
10
- McpClientActionConfig
10
+ McpClientActionConfig,
11
+ WorkflowActionConfig,
12
+ ShellActionConfig
11
13
  ],
12
14
  Field(discriminator="type")
13
15
  ]
@@ -3,4 +3,5 @@ from .http_server import *
3
3
  from .http_client import *
4
4
  from .mcp_server import *
5
5
  from .mcp_client import *
6
+ from .workflow import *
6
7
  from .shell import *
@@ -0,0 +1,8 @@
1
+ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Any
2
+ from pydantic import BaseModel, Field
3
+ from pydantic import model_validator
4
+ from .common import CommonActionConfig
5
+
6
+ class WorkflowActionConfig(CommonActionConfig):
7
+ workflow: str = Field(default="__default__", description="The workflow to run. Defaults to '__default__'.")
8
+ input: Optional[Any] = Field(default=None, description="Input data supplied to the workflow. Accepts any type.")
@@ -8,6 +8,7 @@ ComponentConfig = Annotated[
8
8
  HttpClientComponentConfig,
9
9
  McpServerComponentConfig,
10
10
  McpClientComponentConfig,
11
+ WorkflowComponentConfig,
11
12
  ShellComponentConfig
12
13
  ],
13
14
  Field(discriminator="type")
@@ -3,4 +3,5 @@ from .http_server import *
3
3
  from .http_client import *
4
4
  from .mcp_server import *
5
5
  from .mcp_client import *
6
+ from .workflow import *
6
7
  from .shell import *
@@ -5,4 +5,5 @@ class ComponentType(str, Enum):
5
5
  HTTP_CLIENT = "http-client"
6
6
  MCP_SERVER = "mcp-server"
7
7
  MCP_CLIENT = "mcp-client"
8
+ WORKFLOW = "workflow"
8
9
  SHELL = "shell"