(self, sessions_payload: Dict[str, Any])
| 2500 | return events |
| 2501 | |
| 2502 | def _extract_agent_session_id(self, sessions_payload: Dict[str, Any]) -> Optional[str]: |
| 2503 | if not isinstance(sessions_payload, dict): |
| 2504 | return None |
| 2505 | |
| 2506 | sessions = sessions_payload.get("sessions") |
| 2507 | if isinstance(sessions, list): |
| 2508 | for session in sessions: |
| 2509 | if not isinstance(session, dict): |
| 2510 | continue |
| 2511 | session_id = str(session.get("agentSessionId") or "").strip() |
| 2512 | if session_id: |
| 2513 | return session_id |
| 2514 | |
| 2515 | session_info = sessions_payload.get("sessionInfo") |
| 2516 | if isinstance(session_info, dict): |
| 2517 | session_id = str(session_info.get("agentSessionId") or "").strip() |
| 2518 | if session_id: |
| 2519 | return session_id |
| 2520 | |
| 2521 | return None |
| 2522 | |
| 2523 | def _extract_flow_entity_id(self, entity_payload: Dict[str, Any]) -> Optional[str]: |
| 2524 | if not isinstance(entity_payload, dict): |
no outgoing calls
no test coverage detected