symfonic.agent.facade_turn¶
facade_turn ¶
The caller's half of one invocation, built the same way for every entry.
Extracted from :mod:symfonic.agent.facade when that module reached its size
budget, and the seam is the one the module docstring already implied: the
facade is the public surface -- overloads, validation, lifecycle -- and this
is what one call becomes. One function, so run and stream cannot
drift in what they hand the kernel; a difference there would be a difference
in what the model is asked, invisible in the answer.
delegated_turn_for ¶
Build the child request whose lineage delegation already decided.
Source code in src/symfonic/agent/facade_turn.py
turn_for ¶
turn_for(prompt: str, attachments: Sequence[Attachment], history: Sequence[Message], state: Mapping[str, Any] | None = None, *, session_id: str = '', run_id: str | None = None, root_run_id: str | None = None, parent_run_id: str | None = None) -> TurnRequest
One invocation's request, frozen before it reaches the kernel.
state is copied and deep-frozen here rather than at the far end: the
boundary is the only place that knows the caller still owns their object,
and freezing later would let a caller who mutates their dict mid-turn
change what a rung two steps down sees.