flock-core 0.5.0b2__py3-none-any.whl → 0.5.0b5__py3-none-any.whl

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.

Potentially problematic release.


This version of flock-core might be problematic. Click here for more details.

Files changed (55) hide show
  1. flock/cli/execute_flock.py +1 -1
  2. flock/cli/manage_agents.py +3 -3
  3. flock/components/evaluation/declarative_evaluation_component.py +10 -10
  4. flock/components/routing/conditional_routing_component.py +7 -6
  5. flock/components/routing/default_routing_component.py +3 -3
  6. flock/components/routing/llm_routing_component.py +24 -26
  7. flock/components/utility/memory_utility_component.py +3 -3
  8. flock/components/utility/metrics_utility_component.py +11 -11
  9. flock/components/utility/output_utility_component.py +11 -9
  10. flock/core/__init__.py +24 -10
  11. flock/core/agent/flock_agent_components.py +16 -16
  12. flock/core/agent/flock_agent_integration.py +88 -29
  13. flock/core/agent/flock_agent_serialization.py +23 -20
  14. flock/core/api/endpoints.py +2 -2
  15. flock/core/api/service.py +2 -2
  16. flock/core/component/__init__.py +7 -7
  17. flock/core/component/{evaluation_component_base.py → evaluation_component.py} +2 -2
  18. flock/core/component/{routing_component_base.py → routing_component.py} +3 -4
  19. flock/core/component/{utility_component_base.py → utility_component.py} +3 -3
  20. flock/core/evaluation/utils.py +2 -1
  21. flock/core/execution/batch_executor.py +1 -1
  22. flock/core/execution/evaluation_executor.py +1 -1
  23. flock/core/execution/opik_executor.py +1 -1
  24. flock/core/flock.py +12 -12
  25. flock/core/flock_agent.py +68 -38
  26. flock/core/flock_factory.py +21 -18
  27. flock/core/flock_scheduler.py +1 -1
  28. flock/core/flock_server_manager.py +8 -8
  29. flock/core/mcp/flock_mcp_server.py +11 -11
  30. flock/core/mcp/{flock_mcp_tool_base.py → flock_mcp_tool.py} +2 -2
  31. flock/core/mcp/mcp_client.py +9 -9
  32. flock/core/mcp/mcp_client_manager.py +9 -9
  33. flock/core/mcp/mcp_config.py +24 -24
  34. flock/core/orchestration/flock_execution.py +13 -13
  35. flock/core/orchestration/flock_initialization.py +6 -6
  36. flock/core/orchestration/flock_server_manager.py +8 -6
  37. flock/core/registry/__init__.py +16 -10
  38. flock/core/registry/registry_hub.py +7 -4
  39. flock/core/registry/server_registry.py +6 -6
  40. flock/core/serialization/flock_serializer.py +3 -2
  41. flock/core/util/hydrator.py +1 -1
  42. flock/mcp/servers/sse/flock_sse_server.py +10 -10
  43. flock/mcp/servers/stdio/flock_stdio_server.py +10 -10
  44. flock/mcp/servers/streamable_http/flock_streamable_http_server.py +10 -10
  45. flock/mcp/servers/websockets/flock_websocket_server.py +10 -10
  46. flock/webapp/app/chat.py +1 -1
  47. flock/webapp/app/services/flock_service.py +1 -1
  48. flock/workflow/activities.py +10 -10
  49. {flock_core-0.5.0b2.dist-info → flock_core-0.5.0b5.dist-info}/METADATA +1 -1
  50. {flock_core-0.5.0b2.dist-info → flock_core-0.5.0b5.dist-info}/RECORD +53 -55
  51. flock/core/flock_registry.py.backup +0 -688
  52. flock/workflow/activities_unified.py +0 -230
  53. {flock_core-0.5.0b2.dist-info → flock_core-0.5.0b5.dist-info}/WHEEL +0 -0
  54. {flock_core-0.5.0b2.dist-info → flock_core-0.5.0b5.dist-info}/entry_points.txt +0 -0
  55. {flock_core-0.5.0b2.dist-info → flock_core-0.5.0b5.dist-info}/licenses/LICENSE +0 -0
@@ -36,14 +36,14 @@ LoggingLevel = Literal[
36
36
  ]
37
37
 
38
38
 
39
- A = TypeVar("A", bound="FlockMCPCallbackConfigurationBase")
40
- B = TypeVar("B", bound="FlockMCPConnectionConfigurationBase")
41
- C = TypeVar("C", bound="FlockMCPConfigurationBase")
42
- D = TypeVar("D", bound="FlockMCPCachingConfigurationBase")
43
- E = TypeVar("E", bound="FlockMCPFeatureConfigurationBase")
39
+ A = TypeVar("A", bound="FlockMCPCallbackConfiguration")
40
+ B = TypeVar("B", bound="FlockMCPConnectionConfiguration")
41
+ C = TypeVar("C", bound="FlockMCPConfiguration")
42
+ D = TypeVar("D", bound="FlockMCPCachingConfiguration")
43
+ E = TypeVar("E", bound="FlockMCPFeatureConfiguration")
44
44
 
45
45
 
46
- class FlockMCPCachingConfigurationBase(BaseModel, Serializable):
46
+ class FlockMCPCachingConfiguration(BaseModel, Serializable):
47
47
  """Configuration for Caching in Clients."""
48
48
 
49
49
  tool_cache_max_size: float = Field(
@@ -110,7 +110,7 @@ class FlockMCPCachingConfigurationBase(BaseModel, Serializable):
110
110
  )
111
111
 
112
112
 
113
- class FlockMCPCallbackConfigurationBase(BaseModel, Serializable):
113
+ class FlockMCPCallbackConfiguration(BaseModel, Serializable):
114
114
  """Base Configuration Class for Callbacks for Clients."""
115
115
 
116
116
  sampling_callback: FlockSamplingMCPCallback | None = Field(
@@ -188,7 +188,7 @@ class FlockMCPCallbackConfigurationBase(BaseModel, Serializable):
188
188
  )
189
189
 
190
190
 
191
- class FlockMCPConnectionConfigurationBase(BaseModel, Serializable):
191
+ class FlockMCPConnectionConfiguration(BaseModel, Serializable):
192
192
  """Base Configuration Class for Connection Parameters for a client."""
193
193
 
194
194
  max_retries: int = Field(
@@ -298,7 +298,7 @@ class FlockMCPConnectionConfigurationBase(BaseModel, Serializable):
298
298
  )
299
299
 
300
300
 
301
- class FlockMCPFeatureConfigurationBase(BaseModel, Serializable):
301
+ class FlockMCPFeatureConfiguration(BaseModel, Serializable):
302
302
  """Base Configuration Class for switching MCP Features on and off."""
303
303
 
304
304
  roots_enabled: bool = Field(
@@ -346,7 +346,7 @@ class FlockMCPFeatureConfigurationBase(BaseModel, Serializable):
346
346
  )
347
347
 
348
348
 
349
- class FlockMCPConfigurationBase(BaseModel, Serializable):
349
+ class FlockMCPConfiguration(BaseModel, Serializable):
350
350
  """Base Configuration Class for MCP Clients.
351
351
 
352
352
  Each Client should implement their own config
@@ -357,22 +357,22 @@ class FlockMCPConfigurationBase(BaseModel, Serializable):
357
357
  ..., description="Name of the server the client connects to."
358
358
  )
359
359
 
360
- connection_config: FlockMCPConnectionConfigurationBase = Field(
360
+ connection_config: FlockMCPConnectionConfiguration = Field(
361
361
  ..., description="MCP Connection Configuration for a client."
362
362
  )
363
363
 
364
- caching_config: FlockMCPCachingConfigurationBase = Field(
365
- default_factory=FlockMCPCachingConfigurationBase,
364
+ caching_config: FlockMCPCachingConfiguration = Field(
365
+ default_factory=FlockMCPCachingConfiguration,
366
366
  description="Configuration for the internal caches of the client.",
367
367
  )
368
368
 
369
- callback_config: FlockMCPCallbackConfigurationBase = Field(
370
- default_factory=FlockMCPCallbackConfigurationBase,
369
+ callback_config: FlockMCPCallbackConfiguration = Field(
370
+ default_factory=FlockMCPCallbackConfiguration,
371
371
  description="Callback configuration for the client.",
372
372
  )
373
373
 
374
- feature_config: FlockMCPFeatureConfigurationBase = Field(
375
- default_factory=FlockMCPFeatureConfigurationBase,
374
+ feature_config: FlockMCPFeatureConfiguration = Field(
375
+ default_factory=FlockMCPFeatureConfiguration,
376
376
  description="Feature configuration for the client.",
377
377
  )
378
378
 
@@ -425,7 +425,7 @@ class FlockMCPConfigurationBase(BaseModel, Serializable):
425
425
  config_cls = config_field.annotation
426
426
  except (AttributeError, KeyError):
427
427
  # fallback
428
- config_cls = FlockMCPConnectionConfigurationBase
428
+ config_cls = FlockMCPConnectionConfiguration
429
429
  instance_data["connection_config"] = config_cls.from_dict(connection_config)
430
430
  else:
431
431
  raise ValueError(f"connection_config MUST be specified for '{data.get('name', 'unknown_server')}")
@@ -436,10 +436,10 @@ class FlockMCPConfigurationBase(BaseModel, Serializable):
436
436
  config_cls = config_field.annotation
437
437
  except (AttributeError, KeyError):
438
438
  # fallback
439
- config_cls = FlockMCPCachingConfigurationBase
439
+ config_cls = FlockMCPCachingConfiguration
440
440
  instance_data["caching_config"] = config_cls.from_dict(caching_config)
441
441
  else:
442
- instance_data["caching_config"] = FlockMCPCachingConfigurationBase()
442
+ instance_data["caching_config"] = FlockMCPCachingConfiguration()
443
443
 
444
444
  if feature_config:
445
445
  try:
@@ -447,10 +447,10 @@ class FlockMCPConfigurationBase(BaseModel, Serializable):
447
447
  config_cls = config_field.annotation
448
448
  except (AttributeError, KeyError):
449
449
  # fallback
450
- config_cls = FlockMCPFeatureConfigurationBase
450
+ config_cls = FlockMCPFeatureConfiguration
451
451
  instance_data["feature_config"] = config_cls.from_dict(feature_config)
452
452
  else:
453
- instance_data["feature_config"] = FlockMCPFeatureConfigurationBase()
453
+ instance_data["feature_config"] = FlockMCPFeatureConfiguration()
454
454
 
455
455
  if callback_config:
456
456
  try:
@@ -458,10 +458,10 @@ class FlockMCPConfigurationBase(BaseModel, Serializable):
458
458
  config_cls = config_field.annotation
459
459
  except (AttributeError, KeyError):
460
460
  # fallback
461
- config_cls = FlockMCPCallbackConfigurationBase
461
+ config_cls = FlockMCPCallbackConfiguration
462
462
  instance_data["callback_config"] = config_cls.from_dict(callback_config)
463
463
  else:
464
- instance_data["callback_config"] = FlockMCPCallbackConfigurationBase()
464
+ instance_data["callback_config"] = FlockMCPCallbackConfiguration()
465
465
 
466
466
  return cls(**{k: v for k, v in instance_data.items()})
467
467
 
@@ -57,7 +57,7 @@ class FlockExecution:
57
57
 
58
58
  def run(
59
59
  self,
60
- start_agent: "FlockAgent | str | None" = None,
60
+ agent: "FlockAgent | str | None" = None,
61
61
  input: dict | None = None,
62
62
  context: FlockContext | None = None,
63
63
  run_id: str = "",
@@ -69,7 +69,7 @@ class FlockExecution:
69
69
  """Synchronous execution wrapper."""
70
70
  return self._run_sync(
71
71
  self.run_async(
72
- start_agent=start_agent,
72
+ agent=agent,
73
73
  input=input,
74
74
  context=context,
75
75
  run_id=run_id,
@@ -82,7 +82,7 @@ class FlockExecution:
82
82
 
83
83
  async def run_async(
84
84
  self,
85
- start_agent: "FlockAgent | str | None" = None,
85
+ agent: "FlockAgent | str | None" = None,
86
86
  input: dict | None = None,
87
87
  context: FlockContext | None = None,
88
88
  run_id: str = "",
@@ -95,7 +95,7 @@ class FlockExecution:
95
95
  # Import here to allow forward reference resolution
96
96
  from flock.core.flock_agent import FlockAgent as ConcreteFlockAgent
97
97
  from flock.core.mcp.flock_mcp_server import (
98
- FlockMCPServerBase as ConcreteFlockServer,
98
+ FlockMCPServer as ConcreteFlockServer,
99
99
  )
100
100
 
101
101
  with tracer.start_as_current_span("flock.run_async") as span:
@@ -120,7 +120,7 @@ class FlockExecution:
120
120
  )
121
121
 
122
122
  # Determine starting agent name
123
- start_agent_name = self._resolve_start_agent(start_agent)
123
+ start_agent_name = self._resolve_start_agent(agent)
124
124
 
125
125
  # Setup execution context and input
126
126
  run_input = input if input is not None else self.flock._start_input
@@ -131,7 +131,7 @@ class FlockExecution:
131
131
  span.set_attribute("input", str(run_input))
132
132
  span.set_attribute("run_id", effective_run_id)
133
133
  span.set_attribute("enable_temporal", self.flock.enable_temporal)
134
-
134
+
135
135
  logger.info(
136
136
  f"Initiating Flock run '{self.flock.name}'. Start Agent: '{start_agent_name}'. Temporal: {self.flock.enable_temporal}."
137
137
  )
@@ -169,7 +169,7 @@ class FlockExecution:
169
169
  logger.error(f"Flock run '{self.flock.name}' failed: {e}", exc_info=True)
170
170
  span.record_exception(e)
171
171
  span.set_status(trace.Status(trace.StatusCode.ERROR, str(e)))
172
-
172
+
173
173
  # Return a consistent error structure
174
174
  error_output = {
175
175
  "error": str(e),
@@ -179,7 +179,7 @@ class FlockExecution:
179
179
  }
180
180
  return Box(error_output) if box_result else error_output
181
181
 
182
- def _resolve_start_agent(self, start_agent: "FlockAgent | str | None") -> str:
182
+ def _resolve_start_agent(self, agent: "FlockAgent | str | None") -> str:
183
183
  """Resolve the start agent name from various input types."""
184
184
  from flock.core.flock_agent import FlockAgent as ConcreteFlockAgent
185
185
  from flock.core.registry import get_registry
@@ -188,12 +188,12 @@ class FlockExecution:
188
188
 
189
189
  # Determine starting agent name
190
190
  start_agent_name: str | None = None
191
- if isinstance(start_agent, ConcreteFlockAgent):
192
- start_agent_name = start_agent.name
191
+ if isinstance(agent, ConcreteFlockAgent):
192
+ start_agent_name = agent.name
193
193
  if start_agent_name not in self.flock._agents: # Add if not already present
194
- self.flock.add_agent(start_agent)
195
- elif isinstance(start_agent, str):
196
- start_agent_name = start_agent
194
+ self.flock.add_agent(agent)
195
+ elif isinstance(agent, str):
196
+ start_agent_name = agent
197
197
  else: # start_agent is None
198
198
  start_agent_name = self.flock._start_agent_name
199
199
 
@@ -3,18 +3,18 @@
3
3
 
4
4
  import os
5
5
  import uuid
6
- from typing import TYPE_CHECKING, Any
6
+ from typing import TYPE_CHECKING
7
7
 
8
8
  from opentelemetry.baggage import get_baggage, set_baggage
9
9
 
10
- from flock.core.registry import get_registry
11
10
  from flock.core.logging.logging import get_logger
11
+ from flock.core.registry import get_registry
12
12
  from flock.core.util.cli_helper import init_console
13
13
 
14
14
  if TYPE_CHECKING:
15
15
  from flock.core.flock import Flock
16
16
  from flock.core.flock_agent import FlockAgent
17
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
17
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
18
18
 
19
19
  logger = get_logger("flock.initialization")
20
20
 
@@ -28,7 +28,7 @@ class FlockInitialization:
28
28
  def setup(
29
29
  self,
30
30
  agents: list["FlockAgent"] | None = None,
31
- servers: list["FlockMCPServerBase"] | None = None,
31
+ servers: list["FlockMCPServer"] | None = None,
32
32
  ) -> None:
33
33
  """Handle all initialization side effects and setup."""
34
34
  # Register passed servers first (agents may depend on them)
@@ -64,10 +64,10 @@ class FlockInitialization:
64
64
  enable_temporal=self.flock.enable_temporal,
65
65
  )
66
66
 
67
- def _register_servers(self, servers: list["FlockMCPServerBase"]) -> None:
67
+ def _register_servers(self, servers: list["FlockMCPServer"]) -> None:
68
68
  """Register servers with the Flock instance."""
69
69
  from flock.core.mcp.flock_mcp_server import (
70
- FlockMCPServerBase as ConcreteFlockMCPServer,
70
+ FlockMCPServer as ConcreteFlockMCPServer,
71
71
  )
72
72
 
73
73
  for server in servers:
@@ -3,12 +3,14 @@
3
3
 
4
4
  from typing import TYPE_CHECKING
5
5
 
6
- from flock.core.flock_server_manager import FlockServerManager as InternalServerManager
6
+ from flock.core.flock_server_manager import (
7
+ FlockServerManager as InternalServerManager,
8
+ )
7
9
  from flock.core.logging.logging import get_logger
8
10
 
9
11
  if TYPE_CHECKING:
10
12
  from flock.core.flock import Flock
11
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
13
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
12
14
 
13
15
  logger = get_logger("flock.server_manager")
14
16
 
@@ -21,12 +23,12 @@ class FlockServerManager:
21
23
  # Use the existing internal server manager
22
24
  self._internal_mgr = InternalServerManager()
23
25
 
24
- def add_server(self, server: "FlockMCPServerBase") -> "FlockMCPServerBase":
26
+ def add_server(self, server: "FlockMCPServer") -> "FlockMCPServer":
25
27
  """Adds a server instance to this Flock configuration and registry as well as set it up to be managed by internal manager."""
26
- from flock.core.registry import get_registry
27
28
  from flock.core.mcp.flock_mcp_server import (
28
- FlockMCPServerBase as ConcreteFlockMCPServer,
29
+ FlockMCPServer as ConcreteFlockMCPServer,
29
30
  )
31
+ from flock.core.registry import get_registry
30
32
 
31
33
  registry = get_registry()
32
34
 
@@ -60,6 +62,6 @@ class FlockServerManager:
60
62
  return await self._internal_mgr.__aexit__(exc_type, exc_val, exc_tb)
61
63
 
62
64
  @property
63
- def servers(self) -> dict[str, "FlockMCPServerBase"]:
65
+ def servers(self) -> dict[str, "FlockMCPServer"]:
64
66
  """Returns the dictionary of servers managed by this Flock instance."""
65
67
  return self.flock._servers
@@ -5,32 +5,38 @@ This module provides a complete refactor of the FlockRegistry using
5
5
  the proven composition pattern from Flock and FlockAgent refactoring.
6
6
  """
7
7
 
8
- from flock.core.registry.registry_hub import RegistryHub, get_registry
9
- from flock.core.registry.decorators import flock_component, flock_tool, flock_callable, flock_type
8
+
9
+ from flock.core.registry.agent_registry import AgentRegistry
10
+ from flock.core.registry.callable_registry import CallableRegistry
11
+ from flock.core.registry.component_discovery import ComponentDiscovery
10
12
 
11
13
  # Specialized registry components (for advanced usage)
12
14
  from flock.core.registry.component_registry import ComponentRegistry
13
- from flock.core.registry.callable_registry import CallableRegistry
14
- from flock.core.registry.agent_registry import AgentRegistry
15
+ from flock.core.registry.config_mapping import ConfigMapping
16
+ from flock.core.registry.decorators import (
17
+ flock_callable,
18
+ flock_component,
19
+ flock_tool,
20
+ flock_type,
21
+ )
22
+ from flock.core.registry.registry_hub import RegistryHub, get_registry
15
23
  from flock.core.registry.server_registry import ServerRegistry
16
24
  from flock.core.registry.type_registry import TypeRegistry
17
- from flock.core.registry.config_mapping import ConfigMapping
18
- from flock.core.registry.component_discovery import ComponentDiscovery
19
25
 
20
26
  __all__ = [
21
27
  # Main API
22
28
  "RegistryHub",
23
29
  "get_registry",
24
-
30
+
25
31
  # Decorators
26
32
  "flock_component",
27
- "flock_tool",
33
+ "flock_tool",
28
34
  "flock_callable",
29
35
  "flock_type",
30
-
36
+
31
37
  # Specialized registries (for advanced usage)
32
38
  "ComponentRegistry",
33
- "CallableRegistry",
39
+ "CallableRegistry",
34
40
  "AgentRegistry",
35
41
  "ServerRegistry",
36
42
  "TypeRegistry",
@@ -8,8 +8,9 @@ from flock.core.logging.logging import get_logger
8
8
 
9
9
  if TYPE_CHECKING:
10
10
  from collections.abc import Callable
11
+
11
12
  from flock.core.flock_agent import FlockAgent
12
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
13
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
13
14
 
14
15
  logger = get_logger("registry.hub")
15
16
 
@@ -83,7 +84,9 @@ class RegistryHub:
83
84
  def discovery(self):
84
85
  """Component discovery helper."""
85
86
  if not hasattr(self, '_discovery_helper'):
86
- from flock.core.registry.component_discovery import ComponentDiscovery
87
+ from flock.core.registry.component_discovery import (
88
+ ComponentDiscovery,
89
+ )
87
90
  self._discovery_helper = ComponentDiscovery(self)
88
91
  return self._discovery_helper
89
92
 
@@ -101,11 +104,11 @@ class RegistryHub:
101
104
  """Get all registered agent names."""
102
105
  return self.agents.get_all_agent_names()
103
106
 
104
- def register_server(self, server: "FlockMCPServerBase") -> None:
107
+ def register_server(self, server: "FlockMCPServer") -> None:
105
108
  """Register a FlockMCPServer instance."""
106
109
  self.servers.register_server(server)
107
110
 
108
- def get_server(self, name: str) -> "FlockMCPServerBase | None":
111
+ def get_server(self, name: str) -> "FlockMCPServer | None":
109
112
  """Get a registered FlockMCPServer instance by name."""
110
113
  return self.servers.get_server(name)
111
114
 
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING
7
7
  from flock.core.logging.logging import get_logger
8
8
 
9
9
  if TYPE_CHECKING:
10
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
10
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
11
11
 
12
12
  logger = get_logger("registry.servers")
13
13
 
@@ -17,9 +17,9 @@ class ServerRegistry:
17
17
 
18
18
  def __init__(self, lock: threading.RLock):
19
19
  self._lock = lock
20
- self._servers: dict[str, "FlockMCPServerBase"] = {}
20
+ self._servers: dict[str, FlockMCPServer] = {}
21
21
 
22
- def register_server(self, server: "FlockMCPServerBase") -> None:
22
+ def register_server(self, server: "FlockMCPServer") -> None:
23
23
  """Register a flock mcp server by its name."""
24
24
  if not hasattr(server.config, "name") or not server.config.name:
25
25
  logger.error("Attempted to register a server without a valid 'name' attribute.")
@@ -28,11 +28,11 @@ class ServerRegistry:
28
28
  with self._lock:
29
29
  if server.config.name in self._servers and self._servers[server.config.name] != server:
30
30
  logger.warning(f"Server '{server.config.name}' already registered. Overwriting.")
31
-
31
+
32
32
  self._servers[server.config.name] = server
33
33
  logger.debug(f"Registered server: {server.config.name}")
34
34
 
35
- def get_server(self, name: str) -> "FlockMCPServerBase | None":
35
+ def get_server(self, name: str) -> "FlockMCPServer | None":
36
36
  """Retrieve a registered FlockMCPServer instance by name."""
37
37
  with self._lock:
38
38
  server = self._servers.get(name)
@@ -45,7 +45,7 @@ class ServerRegistry:
45
45
  with self._lock:
46
46
  return list(self._servers.keys())
47
47
 
48
- def get_all_servers(self) -> dict[str, "FlockMCPServerBase"]:
48
+ def get_all_servers(self) -> dict[str, "FlockMCPServer"]:
49
49
  """Get all registered servers."""
50
50
  with self._lock:
51
51
  return self._servers.copy()
@@ -12,9 +12,10 @@ from typing import TYPE_CHECKING, Any, Literal
12
12
 
13
13
  from pydantic import BaseModel, create_model
14
14
 
15
+ from flock.core.logging.logging import get_logger
16
+
15
17
  # Need registry access
16
18
  from flock.core.registry import get_registry
17
- from flock.core.logging.logging import get_logger
18
19
  from flock.core.serialization.serialization_utils import (
19
20
  # Assuming this handles basic serialization needs
20
21
  extract_pydantic_models_from_type_string,
@@ -292,7 +293,7 @@ class FlockSerializer:
292
293
  from flock.core.flock import Flock # Import the actual class
293
294
  from flock.core.flock_agent import FlockAgent as ConcreteFlockAgent
294
295
  from flock.core.mcp.flock_mcp_server import (
295
- FlockMCPServerBase as ConcreteFlockMCPServer,
296
+ FlockMCPServer as ConcreteFlockMCPServer,
296
297
  )
297
298
 
298
299
  logger.debug(
@@ -259,7 +259,7 @@ async def _run_hydration_agent(
259
259
 
260
260
  # Run agent
261
261
  result = await temp_flock.run_async(
262
- start_agent=agent_name,
262
+ agent=agent_name,
263
263
  input=agent_input_data,
264
264
  box_result=False,
265
265
  )
@@ -15,12 +15,12 @@ from opentelemetry import trace
15
15
  from pydantic import Field
16
16
 
17
17
  from flock.core.logging.logging import get_logger
18
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
19
- from flock.core.mcp.mcp_client import FlockMCPClientBase
20
- from flock.core.mcp.mcp_client_manager import FlockMCPClientManagerBase
18
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
19
+ from flock.core.mcp.mcp_client import FlockMCPClient
20
+ from flock.core.mcp.mcp_client_manager import FlockMCPClientManager
21
21
  from flock.core.mcp.mcp_config import (
22
- FlockMCPConfigurationBase,
23
- FlockMCPConnectionConfigurationBase,
22
+ FlockMCPConfiguration,
23
+ FlockMCPConnectionConfiguration,
24
24
  )
25
25
  from flock.core.mcp.types.types import SseServerParameters
26
26
 
@@ -28,7 +28,7 @@ logger = get_logger("mcp.sse.server")
28
28
  tracer = trace.get_tracer(__name__)
29
29
 
30
30
 
31
- class FlockSSEConnectionConfig(FlockMCPConnectionConfigurationBase):
31
+ class FlockSSEConnectionConfig(FlockMCPConnectionConfiguration):
32
32
  """Concrete ConnectionConfig for an SSEClient."""
33
33
 
34
34
  # Only thing we need to override here is the concrete transport_type
@@ -42,7 +42,7 @@ class FlockSSEConnectionConfig(FlockMCPConnectionConfigurationBase):
42
42
  )
43
43
 
44
44
 
45
- class FlockSSEConfig(FlockMCPConfigurationBase):
45
+ class FlockSSEConfig(FlockMCPConfiguration):
46
46
  """Configuration for SSE Clients."""
47
47
 
48
48
  # The only thing we need to override here is the concrete
@@ -53,7 +53,7 @@ class FlockSSEConfig(FlockMCPConfigurationBase):
53
53
  )
54
54
 
55
55
 
56
- class FlockSSEClient(FlockMCPClientBase):
56
+ class FlockSSEClient(FlockMCPClient):
57
57
  """Client for SSE Servers."""
58
58
 
59
59
  config: FlockSSEConfig = Field(..., description="Client configuration.")
@@ -115,7 +115,7 @@ class FlockSSEClient(FlockMCPClientBase):
115
115
  )
116
116
 
117
117
 
118
- class FlockSSEClientManager(FlockMCPClientManagerBase):
118
+ class FlockSSEClientManager(FlockMCPClientManager):
119
119
  """Manager for handling SSE Clients."""
120
120
 
121
121
  client_config: FlockSSEConfig = Field(
@@ -132,7 +132,7 @@ class FlockSSEClientManager(FlockMCPClientManagerBase):
132
132
  return new_client
133
133
 
134
134
 
135
- class FlockSSEServer(FlockMCPServerBase):
135
+ class FlockSSEServer(FlockMCPServer):
136
136
  """Class which represents a MCP Server using the SSE Transport type."""
137
137
 
138
138
  config: FlockSSEConfig = Field(..., description="Config for the server.")
@@ -14,12 +14,12 @@ from opentelemetry import trace
14
14
  from pydantic import Field
15
15
 
16
16
  from flock.core.logging.logging import get_logger
17
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
18
- from flock.core.mcp.mcp_client import FlockMCPClientBase
19
- from flock.core.mcp.mcp_client_manager import FlockMCPClientManagerBase
17
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
18
+ from flock.core.mcp.mcp_client import FlockMCPClient
19
+ from flock.core.mcp.mcp_client_manager import FlockMCPClientManager
20
20
  from flock.core.mcp.mcp_config import (
21
- FlockMCPConfigurationBase,
22
- FlockMCPConnectionConfigurationBase,
21
+ FlockMCPConfiguration,
22
+ FlockMCPConnectionConfiguration,
23
23
  )
24
24
  from flock.core.mcp.types.types import StdioServerParameters
25
25
 
@@ -27,7 +27,7 @@ logger = get_logger("mcp.stdio.server")
27
27
  tracer = trace.get_tracer(__name__)
28
28
 
29
29
 
30
- class FlockStdioConnectionConfig(FlockMCPConnectionConfigurationBase):
30
+ class FlockStdioConnectionConfig(FlockMCPConnectionConfiguration):
31
31
  """Concrete ConnectionConfig for an StdioClient."""
32
32
 
33
33
  # Only thing we need to override here is the concrete transport_type
@@ -42,7 +42,7 @@ class FlockStdioConnectionConfig(FlockMCPConnectionConfigurationBase):
42
42
  )
43
43
 
44
44
 
45
- class FlockStdioConfig(FlockMCPConfigurationBase):
45
+ class FlockStdioConfig(FlockMCPConfiguration):
46
46
  """Configuration for Stdio Clients."""
47
47
 
48
48
  # The only thing we need to override here is the
@@ -53,7 +53,7 @@ class FlockStdioConfig(FlockMCPConfigurationBase):
53
53
  )
54
54
 
55
55
 
56
- class FlockStdioClient(FlockMCPClientBase):
56
+ class FlockStdioClient(FlockMCPClient):
57
57
  """Client for Stdio Servers."""
58
58
 
59
59
  config: FlockStdioConfig = Field(..., description="Client Configuration.")
@@ -104,7 +104,7 @@ class FlockStdioClient(FlockMCPClientBase):
104
104
 
105
105
 
106
106
  # Not really needed but kept here as an example.
107
- class FlockStdioClientManager(FlockMCPClientManagerBase):
107
+ class FlockStdioClientManager(FlockMCPClientManager):
108
108
  """Manager for handling Stdio Clients."""
109
109
 
110
110
  client_config: FlockStdioConfig = Field(
@@ -122,7 +122,7 @@ class FlockStdioClientManager(FlockMCPClientManagerBase):
122
122
  return new_client
123
123
 
124
124
 
125
- class FlockMCPStdioServer(FlockMCPServerBase):
125
+ class FlockMCPStdioServer(FlockMCPServer):
126
126
  """Class which represents a MCP Server using the Stdio Transport type.
127
127
 
128
128
  This means (most likely) that the server is a locally
@@ -17,12 +17,12 @@ from opentelemetry import trace
17
17
  from pydantic import Field
18
18
 
19
19
  from flock.core.logging.logging import get_logger
20
- from flock.core.mcp.flock_mcp_server import FlockMCPServerBase
21
- from flock.core.mcp.mcp_client import FlockMCPClientBase
22
- from flock.core.mcp.mcp_client_manager import FlockMCPClientManagerBase
20
+ from flock.core.mcp.flock_mcp_server import FlockMCPServer
21
+ from flock.core.mcp.mcp_client import FlockMCPClient
22
+ from flock.core.mcp.mcp_client_manager import FlockMCPClientManager
23
23
  from flock.core.mcp.mcp_config import (
24
- FlockMCPConfigurationBase,
25
- FlockMCPConnectionConfigurationBase,
24
+ FlockMCPConfiguration,
25
+ FlockMCPConnectionConfiguration,
26
26
  )
27
27
  from flock.core.mcp.types.types import (
28
28
  StreamableHttpServerParameters,
@@ -34,7 +34,7 @@ tracer = trace.get_tracer(__name__)
34
34
  GetSessionIdCallback = Callable[[], str | None]
35
35
 
36
36
 
37
- class FlockStreamableHttpConnectionConfig(FlockMCPConnectionConfigurationBase):
37
+ class FlockStreamableHttpConnectionConfig(FlockMCPConnectionConfiguration):
38
38
  """Concrete ConnectionConfig for a StreamableHttpClient."""
39
39
 
40
40
  # Only thing we need to override here is the concrete transport_type
@@ -49,7 +49,7 @@ class FlockStreamableHttpConnectionConfig(FlockMCPConnectionConfigurationBase):
49
49
  )
50
50
 
51
51
 
52
- class FlockStreamableHttpConfig(FlockMCPConfigurationBase):
52
+ class FlockStreamableHttpConfig(FlockMCPConfiguration):
53
53
  """Configuration for Streamable HTTP Clients."""
54
54
 
55
55
  # The only thing we need to override here is the
@@ -60,7 +60,7 @@ class FlockStreamableHttpConfig(FlockMCPConfigurationBase):
60
60
  )
61
61
 
62
62
 
63
- class FlockStreamableHttpClient(FlockMCPClientBase):
63
+ class FlockStreamableHttpClient(FlockMCPClient):
64
64
  """Client for StreamableHttpServers."""
65
65
 
66
66
  config: FlockStreamableHttpConfig = Field(
@@ -135,7 +135,7 @@ class FlockStreamableHttpClient(FlockMCPClientBase):
135
135
  )
136
136
 
137
137
 
138
- class FlockStreamableHttpClientManager(FlockMCPClientManagerBase):
138
+ class FlockStreamableHttpClientManager(FlockMCPClientManager):
139
139
  """Manager for handling StreamableHttpClients."""
140
140
 
141
141
  client_config: FlockStreamableHttpConfig = Field(
@@ -153,7 +153,7 @@ class FlockStreamableHttpClientManager(FlockMCPClientManagerBase):
153
153
  return new_client
154
154
 
155
155
 
156
- class FlockStreamableHttpServer(FlockMCPServerBase):
156
+ class FlockStreamableHttpServer(FlockMCPServer):
157
157
  """Class which represents a MCP Server using the streamable Http Transport type."""
158
158
 
159
159
  config: FlockStreamableHttpConfig = Field(