yera.runtime.models.block_data

Block data models for events blocks.

Symbols

class BarChartData — Bar chart block data.
class BlockEndData — Control event marking the structural end of a block.
class ButtonsData — Button group block data with options and optional label.
class DatePickerData — Date picker block data with value and label.
class ErrorResultData — Serialized data for an error result block.
class ErrorResultDetails — Normalized details captured from an exception.
class FailureExitEventData — Exit event data for failed app execution (exit_code != 0).
class FormData — A form request presenting a struct's fields for one typed submission.
class FormEchoData — The outcome of one form submission, recorded in the transcript.
class ImageData — Describe encoded image content carried by an output event.
class InputEchoData — An accepted input response that terminally commits its request.
class InputRequestBlockData — Data shared by blocks that request a single input value.
class InputRequestData — Input request block data for awaiting user text input.
class LineChartData — Line chart block data.
class MarkdownData — Markdown content block data.
class SectionData — Structural and visual state for a collapsible section.
class SessionMetaData — A partial session metadata update emitted by a runtime or host.
class SliderData — Slider block data with range, initial value, and label.
class SpinnerData — Spinner block data with status and optional message.
class StructData — Struct data for structured generation responses.
class SuccessExitEventData — Exit event data for successful app completion (exit_code 0).
class SuccessResultData — Serialized data for a successful result block.
class SystemPromptData — System prompt block data.
class TableData — Table block data with columns, rows, and border style.
class ThinkingData — Thinking content block data.
class TreeSelectorData — Tree selector request containing nested selectable leaves.

BarChartData

Inherits: BaseModel

Bar chart block data.

BlockEndData

Inherits: BaseModel

Control event marking the structural end of a block.

Distinct from semantic completion (e.g. SpinnerData.status="complete", which means render a tick). This means no further events will arrive for this block_id. It is consumed by the router to close the block's handler context and is never dispatched to a handler's push.

ButtonsData

Button group block data with options and optional label.

DatePickerData

Date picker block data with value and label.

ErrorResultData

Inherits: BaseModel

Serialized data for an error result block.

ErrorResultDetails

Inherits: BaseModel

Normalized details captured from an exception.

FailureExitEventData

Inherits: BaseModel

Exit event data for failed app execution (exit_code != 0).

FormData

A form request presenting a struct's fields for one typed submission.

Attributes

response
type: InputValueSpec

Transport contract accepting one JSON object; the struct, not the form schema, validates its contents.

form_schema
type: dict[str, JsonValue]

Inlined form schema used to render the form and to redact secrets from stored submissions.

label
type: str | None

Optional question shown above the form.

values
type: dict[str, JsonValue]

Current JSON values keyed by field name, pre-filling the form.

errors
type: dict[str, list[str]]

Validation messages keyed by dotted field path, from a previously rejected submission.

FormEchoData

Inherits: BaseModel

The outcome of one form submission, recorded in the transcript.

Attributes

request_id
type: str

Block ID of the form request the submission answered.

status
type: Literal['accepted', 'rejected']

Whether validation accepted or rejected the submission.

label
type: str | None

The request's question, repeated alongside the answers.

form_schema
type: dict[str, JsonValue]

Form schema describing the submitted fields.

values
type: dict[str, JsonValue]

Submitted JSON values with secrets masked.

errors
type: dict[str, list[str]]

Validation messages keyed by dotted field path when rejected.

ImageData

Inherits: BaseModel

Describe encoded image content carried by an output event.

Attributes

data_type
type: Literal['image']

Discriminator identifying image block data.

content
type: str

Base64-encoded image-file content.

media_type
type: ImageMediaType

MIME type identifying the encoded image format.

alt
type: str | None

Optional accessible description of the image.

InputEchoData

Inherits: BaseModel

An accepted input response that terminally commits its request.

InputRequestBlockData

Inherits: BaseModel

Data shared by blocks that request a single input value.

InputRequestData

Input request block data for awaiting user text input.

LineChartData

Inherits: BaseModel

Line chart block data.

MarkdownData

Inherits: BaseModel

Markdown content block data.

SectionData

Inherits: BaseModel

Structural and visual state for a collapsible section.

Section data is emitted as a complete snapshot whenever the section heading changes. Consumers can therefore render each event independently without reconstructing previous updates.

Attributes

title
type: str

Heading shown for the section.

summary
type: str | None

Optional preview shown when the completed section is collapsed.

auto_collapse
type: bool

Whether the section collapses automatically on completion.

glyph
type: str

Registered glyph shown beside the title.

colour
type: NamedColour | None

Optional named colour applied to the section heading.

SessionMetaData

Inherits: BaseModel

A partial session metadata update emitted by a runtime or host.

SliderData

Slider block data with range, initial value, and label.

SpinnerData

Inherits: BaseModel

Spinner block data with status and optional message.

StructData

Inherits: BaseModel

Struct data for structured generation responses.

SuccessExitEventData

Inherits: BaseModel

Exit event data for successful app completion (exit_code 0).

SuccessResultData

Inherits: BaseModel

Serialized data for a successful result block.

SystemPromptData

Inherits: BaseModel

System prompt block data.

TableData

Inherits: BaseModel

Table block data with columns, rows, and border style.

ThinkingData

Inherits: BaseModel

Thinking content block data.

TreeSelectorData

Tree selector request containing nested selectable leaves.