jaf-py 2.5.5__tar.gz → 2.5.8__tar.gz
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_py-2.5.5/jaf_py.egg-info → jaf_py-2.5.8}/PKG-INFO +2 -2
- {jaf_py-2.5.5 → jaf_py-2.5.8}/README.md +1 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/__init__.py +1 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/agent_tool.py +2 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/engine.py +5 -2
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/guardrails.py +2 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/streaming.py +2 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/tracing.py +1 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/types.py +1 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/providers/model.py +1 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8/jaf_py.egg-info}/PKG-INFO +2 -2
- {jaf_py-2.5.5 → jaf_py-2.5.8}/pyproject.toml +1 -1
- {jaf_py-2.5.5 → jaf_py-2.5.8}/LICENSE +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/agent.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/agent_card.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/client.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/client_example.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/integration_example.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/rag_demo/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/server_demo/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/examples/server_example.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/cleanup.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/factory.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/providers/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/providers/composite.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/providers/in_memory.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/providers/postgres.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/providers/redis.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/serialization.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/run_comprehensive_tests.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/test_cleanup.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/test_serialization.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/test_stress_concurrency.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/tests/test_task_lifecycle.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/memory/types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/protocol.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/server.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/standalone_client.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/run_tests.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/test_agent.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/test_client.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/test_integration.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/test_protocol.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/tests/test_types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/a2a/types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/cli.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/analytics.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/composition.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/errors.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/handoff.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/parallel_agents.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/performance.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/proxy.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/proxy_helpers.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/regeneration.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/state.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/tool_results.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/tools.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/core/workflows.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/exceptions.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/approval_storage.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/factory.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/providers/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/providers/in_memory.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/providers/postgres.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/providers/redis.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/memory/utils.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/plugins/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/plugins/base.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/policies/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/policies/handoff.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/policies/validation.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/providers/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/providers/mcp.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/server/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/server/main.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/server/server.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/server/types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/utils/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/utils/attachments.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/utils/document_processor.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/__init__.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/example.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/functional_core.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/graphviz.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/imperative_shell.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf/visualization/types.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf_py.egg-info/SOURCES.txt +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf_py.egg-info/dependency_links.txt +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf_py.egg-info/entry_points.txt +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf_py.egg-info/requires.txt +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/jaf_py.egg-info/top_level.txt +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/setup.cfg +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/setup.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_a2a_deep.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_a2a_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_api_reference_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_attachments.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_callback_system_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_coffee_tool.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_conversation_id_fix.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_deployment_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_docs_code_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_engine.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_engine_manual.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_error_handling_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_getting_started_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_manual.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_math_tool.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_mcp_comprehensive.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_mcp_docs.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_mcp_real_functionality.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_mcp_transports.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_memory_system_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_model_providers_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_property_based.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_proxy_simple.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_redis_fixes.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_redis_memory.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_server_api_examples.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_session_continuity.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_streamable_http_mcp_example.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_timeout_functionality.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_tool_integration.py +0 -0
- {jaf_py-2.5.5 → jaf_py-2.5.8}/tests/test_validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaf-py
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.8
|
|
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
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<!--  -->
|
|
4
4
|
|
|
5
|
-
[](https://github.com/xynehq/jaf-py)
|
|
6
6
|
[](https://www.python.org/)
|
|
7
7
|
[](https://xynehq.github.io/jaf-py/)
|
|
8
8
|
|
|
@@ -191,7 +191,7 @@ def generate_run_id() -> RunId:
|
|
|
191
191
|
"""Generate a new run ID."""
|
|
192
192
|
return create_run_id(str(uuid.uuid4()))
|
|
193
193
|
|
|
194
|
-
__version__ = "2.5.
|
|
194
|
+
__version__ = "2.5.8"
|
|
195
195
|
__all__ = [
|
|
196
196
|
# Core types and functions
|
|
197
197
|
"TraceId", "RunId", "ValidationResult", "Message", "ModelConfig",
|
|
@@ -178,7 +178,8 @@ def create_agent_tool(
|
|
|
178
178
|
on_event=parent_config.on_event,
|
|
179
179
|
memory=parent_config.memory if preserve_session else None,
|
|
180
180
|
conversation_id=parent_config.conversation_id if preserve_session else None,
|
|
181
|
-
default_tool_timeout=parent_config.default_tool_timeout
|
|
181
|
+
default_tool_timeout=parent_config.default_tool_timeout,
|
|
182
|
+
prefer_streaming=parent_config.prefer_streaming
|
|
182
183
|
)
|
|
183
184
|
|
|
184
185
|
token = _current_run_config.set(sub_config)
|
|
@@ -554,9 +554,12 @@ async def _run_internal(
|
|
|
554
554
|
assistant_event_streamed = False
|
|
555
555
|
|
|
556
556
|
for retry_attempt in range(config.max_empty_response_retries + 1):
|
|
557
|
-
# Get completion from model provider
|
|
557
|
+
# Get completion from model provider
|
|
558
|
+
# Check if streaming should be used based on configuration and availability
|
|
558
559
|
get_stream = getattr(config.model_provider, "get_completion_stream", None)
|
|
559
|
-
|
|
560
|
+
use_streaming = (config.prefer_streaming != False and callable(get_stream))
|
|
561
|
+
|
|
562
|
+
if use_streaming:
|
|
560
563
|
try:
|
|
561
564
|
aggregated_text = ""
|
|
562
565
|
# Working array of partial tool calls
|
|
@@ -288,7 +288,8 @@ Return a JSON object with keys: {{"allowed": boolean, "reason": string}}. Do not
|
|
|
288
288
|
model_override=model_to_use,
|
|
289
289
|
initial_input_guardrails=None,
|
|
290
290
|
final_output_guardrails=None,
|
|
291
|
-
on_event=None
|
|
291
|
+
on_event=None,
|
|
292
|
+
prefer_streaming=config.prefer_streaming
|
|
292
293
|
)
|
|
293
294
|
|
|
294
295
|
# Execute with timeout
|
|
@@ -295,7 +295,8 @@ async def run_streaming(
|
|
|
295
295
|
final_output_guardrails=config.final_output_guardrails,
|
|
296
296
|
on_event=event_handler,
|
|
297
297
|
memory=config.memory,
|
|
298
|
-
conversation_id=config.conversation_id
|
|
298
|
+
conversation_id=config.conversation_id,
|
|
299
|
+
prefer_streaming=config.prefer_streaming
|
|
299
300
|
)
|
|
300
301
|
|
|
301
302
|
from .engine import run
|
|
@@ -897,6 +897,7 @@ class RunConfig(Generic[Ctx]):
|
|
|
897
897
|
max_empty_response_retries: int = 3 # Maximum retries when LLM returns empty response
|
|
898
898
|
empty_response_retry_delay: float = 1.0 # Initial delay in seconds before retrying empty response (uses exponential backoff)
|
|
899
899
|
log_empty_responses: bool = True # Whether to log diagnostic info for empty responses
|
|
900
|
+
prefer_streaming: Optional[bool] = None # Whether to prefer streaming responses. None (default) = use streaming if available, True = prefer streaming, False = disable streaming
|
|
900
901
|
|
|
901
902
|
|
|
902
903
|
# Regeneration types for conversation management
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaf-py
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.8
|
|
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
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "jaf-py"
|
|
7
|
-
version = "2.5.
|
|
7
|
+
version = "2.5.8"
|
|
8
8
|
description = "A purely functional agent framework with immutable state and composable tools - Python implementation"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|