SurfSense/surfsense_backend/app/tasks/chat/streaming/agent
CREDO23 26c569467d refactor(chat): add streaming/agent/event_loop.stream_agent_events
Extracts the inner agent-streaming driver previously inlined as
_stream_agent_events in stream_new_chat.py.

stream_agent_events drives graph_stream.event_stream.stream_output and,
after the agent finishes, performs the post-stream safety-net work:

* commit any pending content the agent never explicitly finished
* evaluate file-operation contract outcomes and emit the appropriate
  contract verdict for desktop_local_folder turns

This unit is what flows/shared/stream_loop.py wraps in the rate-limit
recovery while-loop. Add-only; no existing wiring uses it yet.
2026-05-25 21:48:26 +02:00
..
__init__.py refactor(chat): add streaming/agent/ package with build_main_agent_for_thread 2026-05-25 21:48:20 +02:00
builder.py refactor(chat): add streaming/agent/ package with build_main_agent_for_thread 2026-05-25 21:48:20 +02:00
event_loop.py refactor(chat): add streaming/agent/event_loop.stream_agent_events 2026-05-25 21:48:26 +02:00