Skip to main content

Module renderer

Module renderer 

Source

Structs§

PrefixFingerprint
Per-render fingerprint of the cacheable prefix — the segments a provider caches as a stable prefix (system blocks + history turns). Excludes state_turn (the volatile uncached tail) and token_count metadata (not on the wire). This is the metrics-first instrument (P0-A) behind the optimization work: two renders share a reusable KV / prompt-cache prefix iff their system hashes match and one’s turn_hashes is a prefix of the other’s. Pure and derived — never stored in snapshots, session logs, or event logs.
RenderedContext
Structured render output aligned with LLM API slots.

Functions§

render
Render the context into a RenderedContext suitable for a provider API call.
render_projected
Render with Layer-4 read-time projection driven by handles: tool results whose handle is Collapsed render as previews (originals untouched), freeing budget for more recent turns.