The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(gateway): run_turn_runner resolves adapters through the intake/delivery seams
teknium1417d0c0f6a48
diff --git a/gateway/run_turn_runner.py b/gateway/run_turn_runner.pyindex 795db094679..1b09f5af18a 100644--- a/gateway/run_turn_runner.py+++ b/gateway/run_turn_runner.py@@ -264,7 +264,7 @@ class TurnRunner:from agent.display import get_tool_emojiemoji = get_tool_emoji(tool_name, default="⚙️")try:- adapter = self._runner._adapter_for_source(ctx.source)+ adapter = self._runner._delivery_adapter_for(ctx.source)except Exception:adapter = Nonecode_full, code_short = self._progress_terminal_blocks(adapter, tool_name, args, emoji)@@ -704,7 +704,7 @@ class TurnRunner:async def send_progress_messages(self):ctx = self._ctx- adapter = self._runner._adapter_for_source(ctx.source) if ctx.progress_queue else None+ adapter = self._runner._delivery_adapter_for(ctx.source) if ctx.progress_queue else Noneif not adapter:returnif ctx._native_slack_task_cards and hasattr(adapter, "send_native_task_card_progress"):@@ -928,7 +928,7 @@ class TurnRunner:if want_stream_deltas or want_interim_messages:try:from gateway.stream_consumer import GatewayStreamConsumer- adapter = self._runner._adapter_for_source(ctx.source)+ adapter = self._runner._delivery_adapter_for(ctx.source)if adapter:consumer_cfg, pause_typing_before_finalize = self._runner._build_stream_consumer_config(ctx.source, scfg, adapter, on_missing_cursor="raise",@@ -1597,7 +1597,7 @@ class TurnRunner:def _resume_note_interactive(self) -> bool:"""Interactive platforms report the restore and ask what next; event platforms (webhook,API server) continue the work — nobody is present to answer."""- return bool(getattr(self._runner._adapter_for_source(self._ctx.source), "interactive_resume", True))+ return bool(getattr(self._runner._delivery_adapter_for(self._ctx.source), "interactive_resume", True))def _prepare_turn_message(self, agent_history):"""Prepend recovery/notice guidance to ``ctx.message``.