"""Per-turn orchestration. A turn is: gather dynamic context, hand the conversation to the backend, return the response. As capabilities grow (memory recall, routing per intent, channel adapters) they hang off this function. """ from .context import build_turn_context from .models import Message, ModelRequest, call_model def handle_turn(messages: list[Message]) -> str: request = ModelRequest( messages=messages, turn_context=build_turn_context(), ) response = call_model(request) return response.content