it0/packages/services
hailin e66c187353 fix: improve voice pipeline robustness for poor network conditions
Flutter (agent_call_page.dart):
- Add ConnectOptions with 15s timeouts for connection/peerConnection/iceRestart
- Add RoomReconnectingEvent/RoomAttemptReconnectEvent/RoomReconnectedEvent
  listeners with "网络重连中" UI indicator during reconnection
- Add TimeoutException detection in _friendlyError()

voice-agent (agent.py):
- Wrap entrypoint() in try-except with full traceback logging
- Register room disconnect listener to close httpx clients (instead of
  finally block, since session.start() returns while session runs in bg)
- Add asyncio import for ensure_future cleanup

voice-agent LLM proxy (agent_llm.py):
- Add retry with exponential backoff (max 2 retries, 1s/3s delays) for
  network errors (ConnectError/ConnectTimeout/OSError) and WS InvalidStatusCode
- Extract _do_stream() method for single-attempt logic
- Add WebSocket connection params: open_timeout=10, ping_interval=20,
  ping_timeout=10 for keepalive and faster dead-connection detection
- Use granular httpx.Timeout(connect=10, read=30, write=10, pool=10)
- Increase WS recv timeout from 5s to 30s to reduce unnecessary loops

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 23:34:55 -08:00
..
agent-service fix: increase body parser limit to 50mb for large PDF uploads 2026-02-28 05:35:43 -08:00
audit-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
auth-service feat: complete tenant member management (CRUD + delete tenant) 2026-02-26 10:00:09 -08:00
comm-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
inventory-service fix: set tenantId when creating credentials in inventory-service 2026-02-26 10:52:14 -08:00
monitor-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
ops-service fix: release QueryRunner connections to prevent pool exhaustion 2026-02-23 15:55:06 -08:00
voice-agent fix: improve voice pipeline robustness for poor network conditions 2026-03-01 23:34:55 -08:00
voice-service feat: add TTS voice and style settings to Flutter app 2026-03-01 09:38:15 -08:00