"""LLM flow helpers extracted from the duplex pipeline. This module is intentionally lightweight for phase-wise migration. """ from __future__ import annotations from providers.common.base import LLMStreamEvent def is_done_event(event: LLMStreamEvent) -> bool: """Return whether an LLM stream event signals completion.""" return str(event.type) == "done"