class

Smith::Output::Renderer

Inherits Reference < Object

Turns the agent's event stream into something for a consumer to read — either a human at a terminal or a script parsing stdout.

Both implementations take their IOs so specs can drive them against IO::Memory instead of a real terminal.

Instance methods

answer
Source
budget_exceeded?

A run stopped by its own cost ceiling did what it was told; a caller automating smith needs to tell that apart from a broken turn.

Source
exit_code
Source
failed?

A failed provider call must not report success. Tool errors deliberately do not count — a failing grep is ordinary agent flow that the model handles itself.

Source
finish(usage : LLM::Usage, cost : Float64 | Nil) : Nil
Source
finish(usage : LLM::Usage) : Nil

Callers that have no price basis still want the usage line.

Source
handle(event : Events::Event) : Nil
Source
mcp_banner(servers : Array(String)) : Nil

Which MCP servers a run came up with. Concrete rather than abstract, and written to prompt_io: it is a diagnostic, and in JSON mode it must stay out of the JSONL stream the same way an approval prompt does.

Source
prompt_io

Where an approval prompt should write. In JSON mode this must not be stdout, or the prompt would land in the middle of the JSONL stream.

Source