flock-core 0.5.0b17__py3-none-any.whl → 0.5.0b19__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.

@@ -15,9 +15,13 @@ from pydantic import BaseModel, Field, field_validator
15
15
  from flock.core.component.agent_component_base import AgentComponentConfig
16
16
  from flock.core.component.utility_component import UtilityComponent
17
17
  from flock.core.context.context import FlockContext
18
+ from flock.core.logging.logging import get_logger
18
19
  from flock.core.mcp.flock_mcp_server import FlockMCPServer
19
20
  from flock.core.registry import flock_component
20
21
 
22
+ logger = get_logger(__name__)
23
+
24
+
21
25
  if TYPE_CHECKING:
22
26
  from flock.core.flock_agent import FlockAgent
23
27
 
@@ -181,7 +185,7 @@ class MetricsUtilityComponent(UtilityComponent):
181
185
 
182
186
  return dict(metrics)
183
187
  except Exception as e:
184
- print(f"Error loading metrics from files: {e}")
188
+ logger.error(f"Error loading metrics from files: {e}")
185
189
  return {}
186
190
 
187
191
  def get_metrics(
@@ -419,11 +423,12 @@ class MetricsUtilityComponent(UtilityComponent):
419
423
  if self.config.collect_timing and self._start_time:
420
424
  latency = time.time() - self._start_time
421
425
  self._record_metric("latency", latency, {"agent": agent.name})
426
+ print(f"Latency: {latency * 1000:.2f}ms")
422
427
 
423
428
  # Check for alerts
424
429
  if self._should_alert("latency", latency):
425
430
  # In practice, you'd want to integrate with a proper alerting system
426
- print(f"ALERT: High latency detected: {latency * 1000:.2f}ms")
431
+ logger.warning(f"ALERT: High latency detected!")
427
432
 
428
433
  if self.config.collect_token_usage and result:
429
434
  # Calculate output tokens and cost
@@ -440,6 +445,8 @@ class MetricsUtilityComponent(UtilityComponent):
440
445
  else:
441
446
  total_output_cost += cost[1]
442
447
 
448
+ print(f"Total output tokens: {total_output_tokens}")
449
+
443
450
  self._record_metric(
444
451
  "tokens",
445
452
  total_output_tokens,
flock/core/flock_agent.py CHANGED
@@ -137,6 +137,7 @@ class FlockAgent(BaseModel, Serializable, DSPyIntegrationMixin, ABC):
137
137
  output: DynamicStr | None = None,
138
138
  tools: list[Callable[..., Any]] | None = None,
139
139
  servers: list[str | FlockMCPServer] | None = None,
140
+ tool_whitelist: list[str] | None = None,
140
141
  components: list[AgentComponent] | None = None,
141
142
  config: FlockAgentConfig | None = None,
142
143
  next_agent: DynamicStr | None = None,
@@ -153,6 +154,7 @@ class FlockAgent(BaseModel, Serializable, DSPyIntegrationMixin, ABC):
153
154
  output=output,
154
155
  tools=tools,
155
156
  servers=servers,
157
+ tool_whitelist=tool_whitelist,
156
158
  components=components if components is not None else [],
157
159
  config=config,
158
160
  temporal_activity_config=temporal_activity_config,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flock-core
3
- Version: 0.5.0b17
3
+ Version: 0.5.0b19
4
4
  Summary: Declarative LLM Orchestration at Scale
5
5
  Author-email: Andre Ratzenberger <andre.ratzenberger@whiteduck.de>
6
6
  License-File: LICENSE
@@ -34,11 +34,11 @@ flock/components/routing/default_routing_component.py,sha256=ZHt2Kjf-GHB5n7evU5N
34
34
  flock/components/routing/llm_routing_component.py,sha256=SAaOFjlnhnenM6QEBn3WIpjjNXO-tFpP44TS73zvqzQ,7502
35
35
  flock/components/utility/__init__.py,sha256=JRj932upddjzZMWs1avOupEFr_GZNu21ac66Rhw_XgY,532
36
36
  flock/components/utility/memory_utility_component.py,sha256=26Io61bbCGjD8UQ4BltMA5RLkMXp8tQoQmddXbQSrzA,20183
37
- flock/components/utility/metrics_utility_component.py,sha256=u3Bys0dP7FmTeyZOi4XdMhZHCRYc5miXXJ690-qS1Us,24440
37
+ flock/components/utility/metrics_utility_component.py,sha256=Mck_sFCkfXvNpoSgW2N_WOLnjxazzx8jh79tIx5zJhw,24635
38
38
  flock/components/utility/output_utility_component.py,sha256=c4K_PL3bGqdyy_v6dnOrmTqV-MkWKAB2w0HS8kzg82k,7613
39
39
  flock/core/__init__.py,sha256=OkjsVjRkAB-I6ibeTKVikZ3MxLIcTIzWKphHTbzbr7s,3231
40
40
  flock/core/flock.py,sha256=wRycQlGeaq-Vd75mFpPe02qyWTOEyXthT873iBhA3TI,23388
41
- flock/core/flock_agent.py,sha256=27dDaedYuaSAU85u9Qoaaaj0V4PX24FYrxjTIr63yjA,12776
41
+ flock/core/flock_agent.py,sha256=4Vdhyk-rdsPEuN3xYBsLBBsfpklad6bNj_it9r6XIDc,12868
42
42
  flock/core/flock_factory.py,sha256=Z6GJpYXN9_DXuOqvBH9ir0SMoUw78DkWhrhkm90luAQ,20910
43
43
  flock/core/flock_scheduler.py,sha256=ng_s7gyijmc-AmYvBn5rtg61CSUZiIkXPRSlA1xO6VQ,8766
44
44
  flock/core/flock_server_manager.py,sha256=tM_nOs37vAbEvxmhwy_DL2JPvgFViWroNxrRSu5MfUQ,4523
@@ -551,8 +551,8 @@ flock/workflow/agent_execution_activity.py,sha256=0exwmeWKYXXxdUqDf4YaUVpn0zl06S
551
551
  flock/workflow/flock_workflow.py,sha256=sKFsRIL_bDGonXSNhK1zwu6UechghC_PihJJMidI-VI,9139
552
552
  flock/workflow/temporal_config.py,sha256=3_8O7SDEjMsSMXsWJBfnb6XTp0TFaz39uyzSlMTSF_I,3988
553
553
  flock/workflow/temporal_setup.py,sha256=KR6MlWOrpMtv8NyhaIPAsfl4tjobt81OBByQvg8Kw-Y,1948
554
- flock_core-0.5.0b17.dist-info/METADATA,sha256=5ccnb7IKfldm855CT8LnKXxZj0pW0sG28oGdeZncTOA,9997
555
- flock_core-0.5.0b17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
556
- flock_core-0.5.0b17.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
557
- flock_core-0.5.0b17.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
558
- flock_core-0.5.0b17.dist-info/RECORD,,
554
+ flock_core-0.5.0b19.dist-info/METADATA,sha256=IIENs1thHIvHmhkyhR3G62jimiMS7_ImCmVLv3AKAlQ,9997
555
+ flock_core-0.5.0b19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
556
+ flock_core-0.5.0b19.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
557
+ flock_core-0.5.0b19.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
558
+ flock_core-0.5.0b19.dist-info/RECORD,,