feat: route workflow image inputs natively
This commit is contained in:
@@ -166,11 +166,18 @@ class BaseBrain:
|
||||
def record_user_message(self, content: str) -> None:
|
||||
"""Observe a committed user message for brain-owned routing state."""
|
||||
|
||||
async def on_user_turn_end(self, content: str) -> bool:
|
||||
async def on_user_turn_end(
|
||||
self,
|
||||
content: str,
|
||||
user_message: dict[str, Any] | None = None,
|
||||
) -> bool:
|
||||
"""Handle a complete user turn before the conversational LLM runs.
|
||||
|
||||
Return True when the brain scheduled the next action itself and the
|
||||
in-flight context frame must not reach the previous Agent's LLM.
|
||||
|
||||
``user_message`` preserves the current universal-context message for
|
||||
brains that need multimodal routing. Text-only brains can ignore it.
|
||||
"""
|
||||
self.record_user_message(content)
|
||||
return False
|
||||
@@ -222,7 +229,11 @@ class Brain(Protocol):
|
||||
|
||||
def record_user_message(self, content: str) -> None: ...
|
||||
|
||||
async def on_user_turn_end(self, content: str) -> bool: ...
|
||||
async def on_user_turn_end(
|
||||
self,
|
||||
content: str,
|
||||
user_message: dict[str, Any] | None = None,
|
||||
) -> bool: ...
|
||||
|
||||
async def on_assistant_text_start(self, turn_id: str) -> None: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user