Documentation
¶
Overview ¶
Package present defines the Message Presenter contract. A product hook may prepend and append text to a user message, but may not edit the user's blocks. The session journals the rendering so restore and replay never re-render it. Machine-originated input is never presented.
A presenter should be deterministic in its Input. A command redelivered before its durable application prefix may be presented again.
Index ¶
Constants ¶
const ( // MaxFrameBlocks bounds Prefix and Suffix combined. MaxFrameBlocks = 8 // MaxFrameTextBytes bounds their summed UTF-8 text bytes. MaxFrameTextBytes = 8192 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error is a typed presentation failure. Error deliberately prints only Kind: product errors may name a person and must not be logged by harness.
type Frame ¶
Frame is the text placed before and after the user's own blocks.
type Input ¶
type Input struct {
SessionID uuid.UUID
LoopID uuid.UUID
AgentName identity.AgentName
Kind runtimecommand.Kind
Principal *sessionwire.Principal
Metadata sessionwire.MessageMetadata
Blocks []content.Block
}
Input is the read-only context given to a presenter. Principal and Metadata are nil when absent. Blocks is a clone of the user's original blocks.