jaf-py 2.6.1__py3-none-any.whl → 2.6.2__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.
- jaf/__init__.py +1 -1
- jaf/core/engine.py +11 -0
- jaf/core/tracing.py +1 -1
- jaf/core/types.py +6 -0
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/METADATA +2 -2
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/RECORD +10 -10
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/WHEEL +0 -0
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/entry_points.txt +0 -0
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/licenses/LICENSE +0 -0
- {jaf_py-2.6.1.dist-info → jaf_py-2.6.2.dist-info}/top_level.txt +0 -0
jaf/__init__.py
CHANGED
jaf/core/engine.py
CHANGED
|
@@ -395,6 +395,17 @@ async def _store_conversation_history(state: RunState[Ctx], config: RunConfig[Ct
|
|
|
395
395
|
)
|
|
396
396
|
|
|
397
397
|
messages_to_store = list(state.messages)
|
|
398
|
+
|
|
399
|
+
if config.before_memory_store:
|
|
400
|
+
if asyncio.iscoroutinefunction(config.before_memory_store):
|
|
401
|
+
messages_to_store = await config.before_memory_store(messages_to_store, state)
|
|
402
|
+
else:
|
|
403
|
+
result = config.before_memory_store(messages_to_store, state)
|
|
404
|
+
if asyncio.iscoroutine(result):
|
|
405
|
+
messages_to_store = await result
|
|
406
|
+
else:
|
|
407
|
+
messages_to_store = result
|
|
408
|
+
|
|
398
409
|
if (
|
|
399
410
|
config.memory.compression_threshold
|
|
400
411
|
and len(messages_to_store) > config.memory.compression_threshold
|
jaf/core/tracing.py
CHANGED
jaf/core/types.py
CHANGED
|
@@ -1115,6 +1115,12 @@ class RunConfig(Generic[Ctx]):
|
|
|
1115
1115
|
Union[ModelCompletionResponse, Awaitable[ModelCompletionResponse]],
|
|
1116
1116
|
]
|
|
1117
1117
|
] = None # Callback after LLM call - can process response
|
|
1118
|
+
before_memory_store: Optional[
|
|
1119
|
+
Callable[
|
|
1120
|
+
[List[Message], RunState[Ctx]],
|
|
1121
|
+
Union[List[Message], Awaitable[List[Message]]],
|
|
1122
|
+
]
|
|
1123
|
+
] = None
|
|
1118
1124
|
max_empty_response_retries: int = 3 # Maximum retries when LLM returns empty response
|
|
1119
1125
|
empty_response_retry_delay: float = (
|
|
1120
1126
|
1.0 # Initial delay in seconds before retrying empty response (uses exponential backoff)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaf-py
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.2
|
|
4
4
|
Summary: A purely functional agent framework with immutable state and composable tools - Python implementation
|
|
5
5
|
Author: JAF Contributors
|
|
6
6
|
Maintainer: JAF Contributors
|
|
@@ -82,7 +82,7 @@ Dynamic: license-file
|
|
|
82
82
|
|
|
83
83
|
<!--  -->
|
|
84
84
|
|
|
85
|
-
[](https://github.com/xynehq/jaf-py)
|
|
86
86
|
[](https://www.python.org/)
|
|
87
87
|
[](https://xynehq.github.io/jaf-py/)
|
|
88
88
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
jaf/__init__.py,sha256=
|
|
1
|
+
jaf/__init__.py,sha256=Yc0wSawKKU2cvECCRJeJ_8mL6XwCPkbTHe74WmjVKRY,8652
|
|
2
2
|
jaf/cli.py,sha256=EDMMA5uX0e3TUIedLdyP3p4Qy-aXADvpht3VgJPJagU,8299
|
|
3
3
|
jaf/exceptions.py,sha256=FdLIw7bdCNtBYfqRyJBkRT4Z1vWuvkzrMqFiMAzjL8Y,9158
|
|
4
4
|
jaf/a2a/__init__.py,sha256=r4W-WHZNjoxR8EQ0x41_rY3fl12OH5qcSn0KycXaKKU,7752
|
|
@@ -43,7 +43,7 @@ jaf/core/agent_tool.py,sha256=gZje8_gZSaWCecySg2ZBK07RcD8bc2hxHsR4z87oKJE,12075
|
|
|
43
43
|
jaf/core/analytics.py,sha256=ypdhllyOThXZB-TY_eR1t1n2qrnAVN7Ljb8PaOtJft0,23267
|
|
44
44
|
jaf/core/checkpoint.py,sha256=O7mfi7gFOAUgJ3zHzgJsr11uzn-BU-Vj1iKyKjcirMk,8398
|
|
45
45
|
jaf/core/composition.py,sha256=Tj0-FRTVWygmAfsBLld7pnZK4nrGMMBx2YYJW_KQPoo,25393
|
|
46
|
-
jaf/core/engine.py,sha256=
|
|
46
|
+
jaf/core/engine.py,sha256=1jY8gBeNy00LgUKolAQRfF33C2L_xZ0j5nyI5OTAPyk,70271
|
|
47
47
|
jaf/core/errors.py,sha256=iDw00o3WH0gHcenRcTj3QEbbloZVpgwnPij6mtaJJk4,5710
|
|
48
48
|
jaf/core/guardrails.py,sha256=oPB7MpD3xWiCWoyaS-xQQp-glaPON7GNVrIL0h1Jefs,26931
|
|
49
49
|
jaf/core/handoff.py,sha256=M7TQfd7BXuer1ZeRJ51nLsI55KifbM6faNtmA2Nsj3I,6196
|
|
@@ -56,8 +56,8 @@ jaf/core/state.py,sha256=fdWDc2DQ-o_g_8E4ibg2QM0Vad_XUique3a5iYBwGZo,9516
|
|
|
56
56
|
jaf/core/streaming.py,sha256=5ntOtJrZVCHuGsygquyCLG2J5yuSxE6DN5OM-BrQiGw,16818
|
|
57
57
|
jaf/core/tool_results.py,sha256=L9U3JDQAjAH5YR7iMpSxfVky2Nxo6FYQs4WE05RATaQ,11283
|
|
58
58
|
jaf/core/tools.py,sha256=rHxzAfGVGpYk3YJKmrq3AQLW0oE3ACkiJBOwle2bLdc,15146
|
|
59
|
-
jaf/core/tracing.py,sha256
|
|
60
|
-
jaf/core/types.py,sha256=
|
|
59
|
+
jaf/core/tracing.py,sha256=-ZlIsfDRoFktiJgoY5R2d9lVjSASctKGjdUBWEuw-EE,57320
|
|
60
|
+
jaf/core/types.py,sha256=MwHSXSamOz3QDjTEaOQzNqOMU1JxwFbHg8Fd9Xzw33Y,35576
|
|
61
61
|
jaf/core/workflows.py,sha256=0825AoD1QwEiGAs5IRlWHmaKrjurx6xF7oDJR6POBsg,25651
|
|
62
62
|
jaf/memory/__init__.py,sha256=YfANOg5vUFSPVG7gpBE4_lYkV5X3_U6Yj9v1_QexfN0,1396
|
|
63
63
|
jaf/memory/approval_storage.py,sha256=DcwtERcoIMH7B-abK9hqND3Moz4zSETsPlgJNkvqcaM,10573
|
|
@@ -89,9 +89,9 @@ jaf/visualization/functional_core.py,sha256=0Xs2R8ELADKNIgokcbjuxmWwxEyCH1yXIEdG
|
|
|
89
89
|
jaf/visualization/graphviz.py,sha256=EwWVIRv8Z7gTiO5Spvcm-z_UUQ1oWNPRgdE33ZzFwx8,11569
|
|
90
90
|
jaf/visualization/imperative_shell.py,sha256=N5lWzOLMIU_iCoy3n5WCg49eec8VxV8f7JIG6_wNtVw,2506
|
|
91
91
|
jaf/visualization/types.py,sha256=90G8oClsFa_APqTuMrTW6KjD0oG9I4kVur773dXNW0E,1393
|
|
92
|
-
jaf_py-2.6.
|
|
93
|
-
jaf_py-2.6.
|
|
94
|
-
jaf_py-2.6.
|
|
95
|
-
jaf_py-2.6.
|
|
96
|
-
jaf_py-2.6.
|
|
97
|
-
jaf_py-2.6.
|
|
92
|
+
jaf_py-2.6.2.dist-info/licenses/LICENSE,sha256=LXUQBJxdyr-7C4bk9cQBwvsF_xwA-UVstDTKabpcjlI,1063
|
|
93
|
+
jaf_py-2.6.2.dist-info/METADATA,sha256=IHIsXU-V5KVPanz4Obos8xlgylgNlg2Q8vgvKToDg7Y,27743
|
|
94
|
+
jaf_py-2.6.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
95
|
+
jaf_py-2.6.2.dist-info/entry_points.txt,sha256=OtIJeNJpb24kgGrqRx9szGgDx1vL9ayq8uHErmu7U5w,41
|
|
96
|
+
jaf_py-2.6.2.dist-info/top_level.txt,sha256=Xu1RZbGaM4_yQX7bpalo881hg7N_dybaOW282F15ruE,4
|
|
97
|
+
jaf_py-2.6.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|