ReadonlyerrorsEvery error block appended to the program.
ReadonlymessagesEvery message span, decoded in program order.
ReadonlyprogramThe program this view was built from. Never mutated.
ReadonlystopsConfigured stop sequences.
ReadonlystreamStreaming events in arrival order; empty for non-stream programs.
ReadonlystreamingWhether the program requested streaming.
ReadonlytoolsEvery tool definition declared by the program.
ReadonlyusageDecoded provider usage payload, or undefined when absent.
Reads the first float value carried by opcode.
Opcode to look up.
The value, or undefined when the program carries no such instruction.
Reads the first integer value carried by opcode.
Opcode to look up.
The value, or undefined when the program carries no such instruction.
Reads and decodes the first JSON value carried by opcode.
Opcode to look up.
The decoded value, or undefined when the program carries no such instruction.
Lists conversational messages, dropping system and developer turns.
Messages in program order.
Reads the first string value carried by opcode.
Opcode to look up.
The value, or undefined when the program carries no such instruction.
Joins the text of every system and developer message with blank lines.
The combined system prompt, or an empty string when there is none.
Decoded, structured read model of a Program.
A view walks the instruction list once in the constructor and exposes the result as plain arrays, which is cheaper and far more readable than calling several
find*andextract*helpers over the same program. Use the free functions for one-off lookups and a view when a consumer needs most of the program at once — every provider emitter in this package is built on one.Example