jaf-py 2.4.7__py3-none-any.whl → 2.4.8__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/core/tracing.py CHANGED
@@ -341,7 +341,7 @@ class LangfuseTraceCollector:
341
341
  public_key=public_key,
342
342
  secret_key=secret_key,
343
343
  host=host,
344
- release="jaf-py-v2.1.1"
344
+ release="jaf-py-v2.4.8"
345
345
  )
346
346
  self.active_spans: Dict[str, Any] = {}
347
347
  self.trace_spans: Dict[TraceId, Any] = {}
@@ -399,15 +399,15 @@ class LangfuseTraceCollector:
399
399
  print(f"[LANGFUSE DEBUG] Found user_query from history: {user_query}")
400
400
  break
401
401
 
402
- # Try to extract user_id from token_response
403
- if hasattr(context, 'token_response'):
404
- token_response = context.token_response
405
- print(f"[LANGFUSE DEBUG] Found token_response: {type(token_response)}")
406
- if isinstance(token_response, dict):
407
- user_id = token_response.get("email") or token_response.get("username")
402
+ # Try to extract user_id from user_info
403
+ if hasattr(context, 'user_info'):
404
+ user_info = context.user_info
405
+ print(f"[LANGFUSE DEBUG] Found user_info: {type(user_info)}")
406
+ if isinstance(user_info, dict):
407
+ user_id = user_info.get("email") or user_info.get("username")
408
408
  print(f"[LANGFUSE DEBUG] Extracted user_id: {user_id}")
409
- elif hasattr(token_response, 'email'):
410
- user_id = token_response.email
409
+ elif hasattr(user_info, 'email'):
410
+ user_id = user_info.email
411
411
  print(f"[LANGFUSE DEBUG] Extracted user_id from attr: {user_id}")
412
412
 
413
413
  # Extract conversation history and current user query from messages
@@ -524,7 +524,8 @@ class LangfuseTraceCollector:
524
524
  "agent_name": event.data.get("agent_name", "analytics_agent_jaf"),
525
525
  "conversation_history": conversation_history,
526
526
  "tool_calls": [],
527
- "tool_results": []
527
+ "tool_results": [],
528
+ "user_info": event.data.get("context").user_info if event.data.get("context") and hasattr(event.data.get("context"), 'user_info') else None
528
529
  }
529
530
  )
530
531
  self.trace_spans[trace_id] = trace
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jaf-py
3
- Version: 2.4.7
3
+ Version: 2.4.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
@@ -53,7 +53,7 @@ jaf/core/state.py,sha256=NMtYTpUYa64m1Kte6lD8LGnF2bl69HAcdgXH6f-M97c,5650
53
53
  jaf/core/streaming.py,sha256=h_lYHQA9ee_D5QsDO9-Vhevgi7rFXPslPzd9605AJGo,17034
54
54
  jaf/core/tool_results.py,sha256=-bTOqOX02lMyslp5Z4Dmuhx0cLd5o7kgR88qK2HO_sw,11323
55
55
  jaf/core/tools.py,sha256=84N9A7QQ3xxcOs2eUUot3nmCnt5i7iZT9VwkuzuFBxQ,16274
56
- jaf/core/tracing.py,sha256=iuVgykFUSkoBjem1k6jdVLrhRZzJn-avyxc_6W9BXPI,40159
56
+ jaf/core/tracing.py,sha256=UyAUTBtj_3bThslvtqdmOt7bSMxFkHrTBc-RvItfmvI,40269
57
57
  jaf/core/types.py,sha256=FCc9uWTUS6P1iU-_RxJM7k-HNorsHM-0XHqwwaUGLkE,26267
58
58
  jaf/core/workflows.py,sha256=Ul-82gzjIXtkhnSMSPv-8igikjkMtW1EBo9yrfodtvI,26294
59
59
  jaf/memory/__init__.py,sha256=-L98xlvihurGAzF0DnXtkueDVvO_wV2XxxEwAWdAj50,1400
@@ -86,9 +86,9 @@ jaf/visualization/functional_core.py,sha256=zedMDZbvjuOugWwnh6SJ2stvRNQX1Hlkb9Ab
86
86
  jaf/visualization/graphviz.py,sha256=WTOM6UP72-lVKwI4_SAr5-GCC3ouckxHv88ypCDQWJ0,12056
87
87
  jaf/visualization/imperative_shell.py,sha256=GpMrAlMnLo2IQgyB2nardCz09vMvAzaYI46MyrvJ0i4,2593
88
88
  jaf/visualization/types.py,sha256=QQcbVeQJLuAOXk8ynd08DXIS-PVCnv3R-XVE9iAcglw,1389
89
- jaf_py-2.4.7.dist-info/licenses/LICENSE,sha256=LXUQBJxdyr-7C4bk9cQBwvsF_xwA-UVstDTKabpcjlI,1063
90
- jaf_py-2.4.7.dist-info/METADATA,sha256=fBAZFR5TR6J-fDS-Rufo3G7Xw4vEr0_0dPRX-riLT0Q,27743
91
- jaf_py-2.4.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
- jaf_py-2.4.7.dist-info/entry_points.txt,sha256=OtIJeNJpb24kgGrqRx9szGgDx1vL9ayq8uHErmu7U5w,41
93
- jaf_py-2.4.7.dist-info/top_level.txt,sha256=Xu1RZbGaM4_yQX7bpalo881hg7N_dybaOW282F15ruE,4
94
- jaf_py-2.4.7.dist-info/RECORD,,
89
+ jaf_py-2.4.8.dist-info/licenses/LICENSE,sha256=LXUQBJxdyr-7C4bk9cQBwvsF_xwA-UVstDTKabpcjlI,1063
90
+ jaf_py-2.4.8.dist-info/METADATA,sha256=e1L0JOAJzW81CBJ5RmOXFsSMFr80JioAQ2PTMGISiT0,27743
91
+ jaf_py-2.4.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
92
+ jaf_py-2.4.8.dist-info/entry_points.txt,sha256=OtIJeNJpb24kgGrqRx9szGgDx1vL9ayq8uHErmu7U5w,41
93
+ jaf_py-2.4.8.dist-info/top_level.txt,sha256=Xu1RZbGaM4_yQX7bpalo881hg7N_dybaOW282F15ruE,4
94
+ jaf_py-2.4.8.dist-info/RECORD,,
File without changes