flock-core 0.5.0b23__py3-none-any.whl → 0.5.0b25__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.
- flock/core/mcp/flock_mcp_server.py +26 -10
- {flock_core-0.5.0b23.dist-info → flock_core-0.5.0b25.dist-info}/METADATA +1 -1
- {flock_core-0.5.0b23.dist-info → flock_core-0.5.0b25.dist-info}/RECORD +6 -6
- {flock_core-0.5.0b23.dist-info → flock_core-0.5.0b25.dist-info}/WHEEL +0 -0
- {flock_core-0.5.0b23.dist-info → flock_core-0.5.0b25.dist-info}/entry_points.txt +0 -0
- {flock_core-0.5.0b23.dist-info → flock_core-0.5.0b25.dist-info}/licenses/LICENSE +0 -0
|
@@ -155,7 +155,11 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
155
155
|
await self.post_init()
|
|
156
156
|
if not self.config.allow_all_tools:
|
|
157
157
|
whitelist = self.config.feature_config.tool_whitelist
|
|
158
|
-
if
|
|
158
|
+
if (
|
|
159
|
+
whitelist is not None
|
|
160
|
+
and len(whitelist) > 0
|
|
161
|
+
and name not in whitelist
|
|
162
|
+
):
|
|
159
163
|
return None
|
|
160
164
|
async with self.condition:
|
|
161
165
|
try:
|
|
@@ -267,6 +271,7 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
267
271
|
error=str(module_error),
|
|
268
272
|
)
|
|
269
273
|
span.record_exception(module_error)
|
|
274
|
+
return additional_params
|
|
270
275
|
|
|
271
276
|
async def pre_init(self) -> None:
|
|
272
277
|
"""Run pre-init hooks on modules."""
|
|
@@ -276,11 +281,15 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
276
281
|
with tracer.start_as_current_span("server.pre_init") as span:
|
|
277
282
|
span.set_attribute("server.name", self.config.name)
|
|
278
283
|
# run whitelist checks
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
+
feature_config = self.config.feature_config
|
|
285
|
+
whitelist = (
|
|
286
|
+
feature_config.tool_whitelist if feature_config else None
|
|
287
|
+
)
|
|
288
|
+
if whitelist:
|
|
289
|
+
# Enforce whitelist usage by disabling blanket tool access
|
|
290
|
+
self.config.allow_all_tools = False
|
|
291
|
+
elif whitelist is None:
|
|
292
|
+
# No whitelist configured; ensure defaults allow full access
|
|
284
293
|
self.config.allow_all_tools = True
|
|
285
294
|
try:
|
|
286
295
|
for module in self.get_enabled_components():
|
|
@@ -449,7 +458,7 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
449
458
|
span.record_exception(server_error)
|
|
450
459
|
|
|
451
460
|
# --- Serialization Implementation ---
|
|
452
|
-
def to_dict(self, path_type: str = "relative") -> dict[str, Any]:
|
|
461
|
+
def to_dict(self, path_type: str = "relative") -> dict[str, Any]: # noqa: C901 - TODO: refactor to simplify serialization logic
|
|
453
462
|
"""Convert instance to dictionary representation suitable for serialization."""
|
|
454
463
|
from flock.core.registry import get_registry
|
|
455
464
|
|
|
@@ -469,7 +478,6 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
469
478
|
config_data = self.config.to_dict(path_type=path_type)
|
|
470
479
|
data["config"] = config_data
|
|
471
480
|
|
|
472
|
-
|
|
473
481
|
builtin_by_transport = {}
|
|
474
482
|
|
|
475
483
|
try:
|
|
@@ -638,7 +646,13 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
638
646
|
data["config"] = config_object
|
|
639
647
|
|
|
640
648
|
# now construct
|
|
641
|
-
server = real_cls(
|
|
649
|
+
server = real_cls(
|
|
650
|
+
**{
|
|
651
|
+
k: v
|
|
652
|
+
for k, v in data.items()
|
|
653
|
+
if k not in ["modules", "components"]
|
|
654
|
+
}
|
|
655
|
+
)
|
|
642
656
|
|
|
643
657
|
# re-hydrate components (both legacy modules and new components)
|
|
644
658
|
for cname, cdata in data.get("components", {}).items():
|
|
@@ -646,7 +660,9 @@ class FlockMCPServer(BaseModel, Serializable, ABC):
|
|
|
646
660
|
|
|
647
661
|
# Handle legacy modules for backward compatibility during transition
|
|
648
662
|
for mname, mdata in data.get("modules", {}).items():
|
|
649
|
-
logger.warning(
|
|
663
|
+
logger.warning(
|
|
664
|
+
f"Legacy module '{mname}' found during deserialization - consider migrating to unified components"
|
|
665
|
+
)
|
|
650
666
|
# Skip legacy modules during migration
|
|
651
667
|
|
|
652
668
|
# --- Separate Data ---
|
|
@@ -87,7 +87,7 @@ flock/core/logging/telemetry_exporter/base_exporter.py,sha256=rQJJzS6q9n2aojoSqw
|
|
|
87
87
|
flock/core/logging/telemetry_exporter/file_exporter.py,sha256=nKAjJSZtA7FqHSTuTiFtYYepaxOq7l1rDvs8U8rSBlA,3023
|
|
88
88
|
flock/core/logging/telemetry_exporter/sqlite_exporter.py,sha256=CDsiMb9QcqeXelZ6ZqPSS56ovMPGqOu6whzBZRK__Vg,3498
|
|
89
89
|
flock/core/mcp/__init__.py,sha256=g3hzM_9ntsr-Af9dE9cCZEjQ9YX2jk7-Jm-0JcHSk1A,25
|
|
90
|
-
flock/core/mcp/flock_mcp_server.py,sha256=
|
|
90
|
+
flock/core/mcp/flock_mcp_server.py,sha256=25TtkUrKhadIJY0Zw_P2Z9KwMaKPtsMXvJbAlfc5vBI,27877
|
|
91
91
|
flock/core/mcp/flock_mcp_tool.py,sha256=eGwV8uo-AfvRjcrmOZCLvJAcgB3XKrvrQ7F6GZXF4nI,5494
|
|
92
92
|
flock/core/mcp/mcp_client.py,sha256=JqY_sAYjWCDrIJDOxy-bMqhXjb7kTPHlqxth8SYKr7g,25893
|
|
93
93
|
flock/core/mcp/mcp_client_manager.py,sha256=P-m3loDqPoH2UEW5VeNamgxtoPdZPiG4iPwZ4t28Ctw,8020
|
|
@@ -552,8 +552,8 @@ flock/workflow/agent_execution_activity.py,sha256=0exwmeWKYXXxdUqDf4YaUVpn0zl06S
|
|
|
552
552
|
flock/workflow/flock_workflow.py,sha256=sKFsRIL_bDGonXSNhK1zwu6UechghC_PihJJMidI-VI,9139
|
|
553
553
|
flock/workflow/temporal_config.py,sha256=3_8O7SDEjMsSMXsWJBfnb6XTp0TFaz39uyzSlMTSF_I,3988
|
|
554
554
|
flock/workflow/temporal_setup.py,sha256=KR6MlWOrpMtv8NyhaIPAsfl4tjobt81OBByQvg8Kw-Y,1948
|
|
555
|
-
flock_core-0.5.
|
|
556
|
-
flock_core-0.5.
|
|
557
|
-
flock_core-0.5.
|
|
558
|
-
flock_core-0.5.
|
|
559
|
-
flock_core-0.5.
|
|
555
|
+
flock_core-0.5.0b25.dist-info/METADATA,sha256=OK1IlaUsnVvLIeIBbjn3lGPnCRUl6TTnjJQJ1-1Yu9M,9997
|
|
556
|
+
flock_core-0.5.0b25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
557
|
+
flock_core-0.5.0b25.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
558
|
+
flock_core-0.5.0b25.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
559
|
+
flock_core-0.5.0b25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|