LegionWeb.TraceReducer
(LegionWeb v0.3.0)
View Source
Incrementally transforms raw telemetry events into typed display items.
Handles event pairing (llm_stop + eval_stop), filtering of internal events, sub-agent grouping, and collapsing of redundant eval_and_complete + return/done pairs.
Item types
{:message, data}- user message to the agent{:human_response, data}- user response to HumanTool.ask{:exception, data}- fatal error during message handling{:step, data}- one LLM decision, optionally paired with eval outcome{:eval_error, data}- standalone eval failure (unmatched with llm_stop){:subagent, name, items}- collapsible group of sub-agent events{:unknown, data}- unrecognized event type
Summary
Functions
Returns the resolved list of display items.
Process a single raw event, returning updated state.