flock-core 0.3.37__py3-none-any.whl → 0.3.39__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/flock.py +11 -7
- flock/core/flock_registry.py +4 -4
- {flock_core-0.3.37.dist-info → flock_core-0.3.39.dist-info}/METADATA +1 -1
- {flock_core-0.3.37.dist-info → flock_core-0.3.39.dist-info}/RECORD +7 -7
- {flock_core-0.3.37.dist-info → flock_core-0.3.39.dist-info}/WHEEL +0 -0
- {flock_core-0.3.37.dist-info → flock_core-0.3.39.dist-info}/entry_points.txt +0 -0
- {flock_core-0.3.37.dist-info → flock_core-0.3.39.dist-info}/licenses/LICENSE +0 -0
flock/core/flock.py
CHANGED
|
@@ -9,6 +9,7 @@ import uuid
|
|
|
9
9
|
from pathlib import Path
|
|
10
10
|
from typing import TYPE_CHECKING, Any, TypeVar
|
|
11
11
|
|
|
12
|
+
from box import Box
|
|
12
13
|
from opentelemetry import trace
|
|
13
14
|
from opentelemetry.baggage import get_baggage, set_baggage
|
|
14
15
|
|
|
@@ -73,7 +74,7 @@ class Flock(BaseModel, Serializable):
|
|
|
73
74
|
It is serializable to various formats like YAML and JSON.
|
|
74
75
|
"""
|
|
75
76
|
|
|
76
|
-
name: str = Field(
|
|
77
|
+
name: str | None = Field(
|
|
77
78
|
default_factory=lambda: f"flock_{uuid.uuid4().hex[:8]}",
|
|
78
79
|
description="A unique identifier for this Flock instance.",
|
|
79
80
|
)
|
|
@@ -111,6 +112,7 @@ class Flock(BaseModel, Serializable):
|
|
|
111
112
|
name: str | None = None,
|
|
112
113
|
model: str | None = "openai/gpt-4o",
|
|
113
114
|
description: str | None = None,
|
|
115
|
+
show_flock_banner: bool = True,
|
|
114
116
|
enable_temporal: bool = False,
|
|
115
117
|
enable_logging: bool
|
|
116
118
|
| list[str] = False, # Keep logging control at init
|
|
@@ -120,6 +122,7 @@ class Flock(BaseModel, Serializable):
|
|
|
120
122
|
"""Initialize the Flock orchestrator."""
|
|
121
123
|
# Initialize Pydantic fields
|
|
122
124
|
super().__init__(
|
|
125
|
+
name=name,
|
|
123
126
|
model=model,
|
|
124
127
|
description=description,
|
|
125
128
|
enable_temporal=enable_temporal,
|
|
@@ -149,7 +152,8 @@ class Flock(BaseModel, Serializable):
|
|
|
149
152
|
)
|
|
150
153
|
|
|
151
154
|
# Initialize console if needed
|
|
152
|
-
|
|
155
|
+
if show_flock_banner:
|
|
156
|
+
init_console()
|
|
153
157
|
|
|
154
158
|
# Set Temporal debug environment variable
|
|
155
159
|
self._set_temporal_debug_flag()
|
|
@@ -167,7 +171,7 @@ class Flock(BaseModel, Serializable):
|
|
|
167
171
|
# ... (implementation as before) ...
|
|
168
172
|
def _configure_logging(self, enable_logging: bool | list[str]):
|
|
169
173
|
"""Configure logging levels based on the enable_logging flag."""
|
|
170
|
-
logger.debug(f"Configuring logging, enable_logging={enable_logging}")
|
|
174
|
+
# logger.debug(f"Configuring logging, enable_logging={enable_logging}")
|
|
171
175
|
is_enabled_globally = False
|
|
172
176
|
enabled_loggers = []
|
|
173
177
|
|
|
@@ -264,9 +268,9 @@ class Flock(BaseModel, Serializable):
|
|
|
264
268
|
context: FlockContext
|
|
265
269
|
| None = None, # Allow passing initial context state
|
|
266
270
|
run_id: str = "",
|
|
267
|
-
box_result: bool =
|
|
271
|
+
box_result: bool = True, # Changed default to False for raw dict
|
|
268
272
|
agents: list[FlockAgent] | None = None, # Allow adding agents via run
|
|
269
|
-
) ->
|
|
273
|
+
) -> Box:
|
|
270
274
|
"""Entry point for running an agent system synchronously."""
|
|
271
275
|
return asyncio.run(
|
|
272
276
|
self.run_async(
|
|
@@ -285,9 +289,9 @@ class Flock(BaseModel, Serializable):
|
|
|
285
289
|
input: dict | None = None,
|
|
286
290
|
context: FlockContext | None = None,
|
|
287
291
|
run_id: str = "",
|
|
288
|
-
box_result: bool =
|
|
292
|
+
box_result: bool = True, # Changed default
|
|
289
293
|
agents: list[FlockAgent] | None = None, # Allow adding agents via run
|
|
290
|
-
) ->
|
|
294
|
+
) -> Box:
|
|
291
295
|
"""Entry point for running an agent system asynchronously."""
|
|
292
296
|
# This import needs to be here or handled carefully due to potential cycles
|
|
293
297
|
from flock.core.flock_agent import FlockAgent as ConcreteFlockAgent
|
flock/core/flock_registry.py
CHANGED
|
@@ -66,7 +66,7 @@ class FlockRegistry:
|
|
|
66
66
|
if cls._instance is None:
|
|
67
67
|
cls._instance = super().__new__(cls)
|
|
68
68
|
cls._instance._initialize()
|
|
69
|
-
logger.info("FlockRegistry instance created.")
|
|
69
|
+
# logger.info("FlockRegistry instance created.")
|
|
70
70
|
return cls._instance
|
|
71
71
|
|
|
72
72
|
def _initialize(self):
|
|
@@ -75,7 +75,7 @@ class FlockRegistry:
|
|
|
75
75
|
self._callables = {}
|
|
76
76
|
self._types = {}
|
|
77
77
|
self._components = {}
|
|
78
|
-
logger.debug("FlockRegistry initialized internal stores.")
|
|
78
|
+
# logger.debug("FlockRegistry initialized internal stores.")
|
|
79
79
|
# Auto-register core Python types
|
|
80
80
|
self._register_core_types()
|
|
81
81
|
|
|
@@ -227,7 +227,7 @@ class FlockRegistry:
|
|
|
227
227
|
f"Type '{type_name}' already registered. Overwriting."
|
|
228
228
|
)
|
|
229
229
|
self._types[type_name] = type_obj
|
|
230
|
-
logger.debug(f"Registered type: {type_name}")
|
|
230
|
+
# logger.debug(f"Registered type: {type_name}")
|
|
231
231
|
return type_name
|
|
232
232
|
return None
|
|
233
233
|
|
|
@@ -529,4 +529,4 @@ def _auto_register_by_path():
|
|
|
529
529
|
|
|
530
530
|
|
|
531
531
|
# Bootstrapping the registry
|
|
532
|
-
_auto_register_by_path()
|
|
532
|
+
# _auto_register_by_path()
|
|
@@ -16,12 +16,12 @@ flock/cli/view_results.py,sha256=dOzK0O1FHSIDERnx48y-2Xke9BkOHS7pcOhs64AyIg0,781
|
|
|
16
16
|
flock/cli/yaml_editor.py,sha256=VpaSwC-Xcbu_gk4HgUeIL7PXNFu1CdstuJ3mRZOkmIk,8096
|
|
17
17
|
flock/cli/assets/release_notes.md,sha256=bqnk50jxM3w5uY44Dc7MkdT8XmRREFxrVBAG9XCOSSU,4896
|
|
18
18
|
flock/core/__init__.py,sha256=6NmSXsdQOoOPWjWqdF8BYiUveb54CjH8Ta0WAjNM0Ps,574
|
|
19
|
-
flock/core/flock.py,sha256=
|
|
19
|
+
flock/core/flock.py,sha256=u-VtP0UZLwJQDOED0sth33DsHJ6o_PUfGgvTu9yaHFk,23877
|
|
20
20
|
flock/core/flock_agent.py,sha256=jkDwB7yVGYyLfg-WuwvR2X4XblXOs5DrB2dB30xBL7Q,24754
|
|
21
21
|
flock/core/flock_evaluator.py,sha256=dOXZeDOGZcAmJ9ahqq_2bdGUU1VOXY4skmwTVpAjiVw,1685
|
|
22
22
|
flock/core/flock_factory.py,sha256=MGTkJCP1WGpV614f87r1vwe0tqAvBCoH9PlqtqDyJDk,2828
|
|
23
23
|
flock/core/flock_module.py,sha256=96aFVYAgwpKN53xGbivQDUpikOYGFCxK5mqhclOcxY0,3003
|
|
24
|
-
flock/core/flock_registry.py,sha256=
|
|
24
|
+
flock/core/flock_registry.py,sha256=tX16sNy-ViK608WMT9JtK2fVZrtAHaBJOg5xXdhsndk,19446
|
|
25
25
|
flock/core/flock_router.py,sha256=A5GaxcGvtiFlRLHBTW7okh5RDm3BdKam2uXvRHRaj7k,2187
|
|
26
26
|
flock/core/api/__init__.py,sha256=OKlhzDWZJfA6ddBwxQUmATY0TSzESsH032u00iVGvdA,228
|
|
27
27
|
flock/core/api/endpoints.py,sha256=m-QAyizCHGh3sd5IXaDEhquSxNgTZLpUVTXLdVjiDVw,9086
|
|
@@ -429,8 +429,8 @@ flock/workflow/activities.py,sha256=eVZDnxGJl_quNO-UTV3YgvTV8LrRaHN3QDAA1ANKzac,
|
|
|
429
429
|
flock/workflow/agent_activities.py,sha256=NhBZscflEf2IMfSRa_pBM_TRP7uVEF_O0ROvWZ33eDc,963
|
|
430
430
|
flock/workflow/temporal_setup.py,sha256=VWBgmBgfTBjwM5ruS_dVpA5AVxx6EZ7oFPGw4j3m0l0,1091
|
|
431
431
|
flock/workflow/workflow.py,sha256=I9MryXW_bqYVTHx-nl2epbTqeRy27CAWHHA7ZZA0nAk,1696
|
|
432
|
-
flock_core-0.3.
|
|
433
|
-
flock_core-0.3.
|
|
434
|
-
flock_core-0.3.
|
|
435
|
-
flock_core-0.3.
|
|
436
|
-
flock_core-0.3.
|
|
432
|
+
flock_core-0.3.39.dist-info/METADATA,sha256=U9D3p2h8_2xVESx-2Yw2XkYmDuiV4ZSDmqDvoBrfrks,20772
|
|
433
|
+
flock_core-0.3.39.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
434
|
+
flock_core-0.3.39.dist-info/entry_points.txt,sha256=rWaS5KSpkTmWySURGFZk6PhbJ87TmvcFQDi2uzjlagQ,37
|
|
435
|
+
flock_core-0.3.39.dist-info/licenses/LICENSE,sha256=iYEqWy0wjULzM9GAERaybP4LBiPeu7Z1NEliLUdJKSc,1072
|
|
436
|
+
flock_core-0.3.39.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|