refactor(gateway): run_goals resolves adapters through the intake/delivery seams

Mechanical migration of the `_adapter_for_source` call sites in this sibling. Intake policy sites take `_intake_adapter_for`; every send/edit/typing/pending-slot site takes `_delivery_adapter_for`. Part of #88715 (phase 4).
This commit is contained in:
teknium1
2026-09-19 00:09:02 -07:00
committed by Teknium
parent 417d0c0f6a
commit 294e241e2d

View File

@@ -139,7 +139,7 @@ class GatewayGoalsMixin:
return
session_id = current
watch[quick_key] = (source, session_id)
adapter = self._adapter_for_source(source)
adapter = self._delivery_adapter_for(source)
if adapter is None or not adapter._message_handler:
return
if (
@@ -205,7 +205,7 @@ class GatewayGoalsMixin:
logger.debug("Failed to start heartbeat poller", exc_info=True)
def _goal_notice_adapter(self, source: Any):
adapter = self._adapter_for_source(source)
adapter = self._delivery_adapter_for(source)
if not adapter:
logger.debug("goal continuation: no adapter for %s", getattr(source, "platform", None))
return adapter
@@ -308,7 +308,7 @@ class GatewayGoalsMixin:
return
# Enqueue via the adapter's FIFO so a user message already in flight preempts naturally.
try:
adapter = self._adapter_for_source(source)
adapter = self._delivery_adapter_for(source)
_quick_key = self._session_key_for_source(source)
if adapter and _quick_key:
self._enqueue_fifo(_quick_key, self._synthetic_prompt_event(source, prompt), adapter)