"""Internal context for later Gateway use. Never sends originals to a provider.""" from __future__ import annotations from data_layer import read def build_internal_context(profile_id: str, conversation_id: str) -> dict: messages = read("conversation_messages", profile_id=profile_id, context={"conversation_id": conversation_id}) return { "conversation_id": conversation_id, "messages": messages, "egress": False, "note": "Volltext bleibt lokal. Minimierung und Egress nur über das Privacy Gateway.", }