Releases: xynehq/jaf-py
v2.5.10
chore: bump version to 2.5.10 and update related references (#56)
v2.5.9
What's Changed
- feat: migrate to AsyncOpenAI for asynchronous streaming support by @harshpreet931 in #55
Full Changelog: v2.5.8...v2.5.9
v2.5.8
v2.5.7
What's Changed
- feat(core): add prefer_streaming config for response streaming control by @harshpreet931 in #51
- chore: version bump by @harshpreet931 in #52
Full Changelog: v2.5.5...v2.5.7
v2.5.5
What's Changed
- added callbacks and llm call retries by @darsh0230 in #50
New Contributors
- @darsh0230 made their first contribution in #50
Full Changelog: v2.5.4...v2.5.5
v2.5.4
What's Changed
- regeneration added by @nishant49-code in #40
- fix: Simplify message combination logic in _load_conversation_history by @harshpreet931 in #49
New Contributors
- @nishant49-code made their first contribution in #40
Full Changelog: v2.5.3...v2.5.4
v2.5.3
What's Changed
- feat: Enhance LangfuseTraceCollector for compatibility with Langfuse v2 and v3 APIs by @harshpreet931 in #47
Full Changelog: v2.5.2...v2.5.3
v2.5.2
What's Changed
- feat: Implement handoff system for agent communication by @harshpreet931 in #43
- added passing image in additional context to LLM when apporve/reject the tool call(HITL). by @satvikbatra in #35
- feat: Add proxy configuration support for Langfuse and OpenTelemetry … by @harshpreet931 in #46
Full Changelog: v2.5.1...v2.5.2
v2.5.1
What's Changed
- feat: Add agent_name tagging to LangfuseTraceCollector for improved dashboard filtering by @harshpreet931 in #42
Full Changelog: v2.5.0...v2.5.1
v2.5.0
What's Changed
- refactor: Update status handling to use 'execution_status' instead of 'status' across multiple components by @harshpreet931 in #41
Full Changelog: v2.4.8...v2.5.0
This pull request standardizes and clarifies the status fields used in tool execution and HITL (Human-in-the-Loop) workflows across the codebase. The main focus is on consistently using execution_status to represent tool execution outcomes and hitl_status within result payloads to indicate HITL workflow states. This improves code clarity and reduces ambiguity in status reporting. The most important changes are as follows:
Status Field Standardization:
- Replaced all uses of the
statusfield withexecution_statusin tool execution results, event handling, and tracing to consistently indicate tool execution outcomes (e.g., success, error, timeout). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] - Updated tests and event mocks to use
execution_statusinstead ofstatusfor tool call end events. [1] [2]
HITL Workflow Status Clarification:
- Introduced and documented the use of
hitl_statusin result payloads to represent HITL workflow states (e.g., executed, approved_and_executed, pending_approval, rejected, validation_error, execution_error, execution_timeout). [1] [2] [3] [4] [5] [6] [7] - Added detailed documentation to the
ToolCallEndEventDatadataclass explaining the distinction betweenexecution_statusandhitl_status.
These changes ensure that the status of tool executions and HITL workflow states are clearly distinguished and consistently represented throughout the system.
HITL Status Field Migration Guide
Overview
This update clarifies the confusing dual 'status' fields in tool call metadata by introducing clearer naming conventions while maintaining full backward compatibility.
What Changed
Before (Confusing)
# Event data had unclear 'status' field
event.data.status # Could mean execution OR approval status
# Tool result JSON mixed execution and HITL concepts
{"status": "success", "result": "..."} # Unclear what "success" means
{"status": "halted", "message": "..."} # HITL state mixed with execution stateAfter (Clear)
# Event data has clear separation
event.data.execution_status # NEW: success/error/timeout (tool execution)
event.data.status # DEPRECATED: same as execution_status (backward compat)
# Tool result JSON has clear HITL workflow status
{"hitl_status": "executed", "result": "..."} # Normal execution
{"hitl_status": "pending_approval", "message": "..."} # Waiting for approval
{"hitl_status": "approved_and_executed", "result": "..."} # Approved & executed
{"hitl_status": "rejected", "message": "..."} # User rejectedStatus Field Reference
Event Data (ToolCallEndEventData)
| Field | Values | Purpose | Status |
|---|---|---|---|
execution_status |
success, error, timeout |
Whether tool executed successfully | ✅ Use this |
status |
Same as execution_status |
Backward compatibility only |
Tool Result JSON (in result content)
| Field | Values | Purpose | Status |
|---|---|---|---|
hitl_status |
executed, approved_and_executed, pending_approval, rejected, execution_error, etc. |
HITL workflow state | ✅ Use this |
Migration Guide
✅ No Action Needed (Backward Compatible)
- All existing code continues to work unchanged
event.data.statusstill returns the execution status- Tracing systems get both
statusandexecution_statusfields
🔄 Recommended Migrations (Optional)
For Event Consumers
# Old (still works)
if event.data.status == 'success':
print("Tool executed successfully")
# New (recommended)
if event.data.execution_status == 'success':
print("Tool executed successfully")For HITL Logic
# Old (still works)
if tool_result_content.get('status') == 'halted':
print("Waiting for approval")
# New (recommended)
if tool_result_content.get('hitl_status') == 'pending_approval':
print("Waiting for approval")For Langfuse/Analytics
# Tool execution success/failure
execution_successful = event.data.execution_status == 'success'
# HITL workflow state
approval_state = json.loads(event.data.result).get('hitl_status')
needs_approval = approval_state == 'pending_approval'
was_rejected = approval_state == 'rejected'📊 For Dashboard/Analytics Teams
Your existing queries will continue working, but you can now be more precise:
-- Old query (still works)
SELECT * FROM tool_events WHERE status = 'success'
-- New queries (more precise)
SELECT * FROM tool_events WHERE execution_status = 'success' -- Tool ran successfully
SELECT * FROM tool_events WHERE JSON_EXTRACT(result, '$.hitl_status') = 'rejected' -- User rejectedTimeline
- Phase 1 (Current): Full backward compatibility, both field sets available
- Phase 2 (Future): Deprecation warnings for old
statusfield - Phase 3 (Later): Remove deprecated fields (with advance notice)
Examples
Tool Execution Success
# Event data
event.data.execution_status = 'success'
event.data.status = 'success' # Same value for compatibility
# Result JSON
{"hitl_status": "executed", "result": "calculation complete", "tool_name": "calculator"}Tool Requiring Approval
# Event data
event.data.execution_status = None # No execution yet
# Result JSON
{"hitl_status": "pending_approval", "message": "Tool calculator requires approval"}Approved and Executed
# Event data
event.data.execution_status = 'success'
# Result JSON
{"hitl_status": "approved_and_executed", "result": "42", "tool_name": "calculator"}User Rejected
# Event data
event.data.execution_status = None # No execution
# Result JSON
{"hitl_status": "rejected", "message": "Action was not approved", "rejection_reason": "Too risky"}Questions?
For any questions about this migration, please refer to the updated type documentation in jaf/core/types.py or reach out to the platform team.