Adapter result shape. Mirrors the :class:`src.tool_system.renderers.AgentLoopResult` shape for callers that previously consumed ``run_agent_loop``, AND adds a typed ``terminal`` so wrappers can discriminate exit reason.
| 259 | |
| 260 | @dataclass(frozen=True) |
| 261 | class AgentLoopRunResult: |
| 262 | """Adapter result shape. Mirrors the |
| 263 | :class:`src.tool_system.renderers.AgentLoopResult` shape for |
| 264 | callers that previously consumed ``run_agent_loop``, AND adds a |
| 265 | typed ``terminal`` so wrappers can discriminate exit reason. |
| 266 | """ |
| 267 | response_text: str |
| 268 | usage: dict[str, int] |
| 269 | num_turns: int |
| 270 | terminal: Terminal | None = None |
| 271 | |
| 272 | |
| 273 | async def run_query_as_agent_loop( |
no outgoing calls
no test coverage detected