yera.ui.session_runtime

Runtime state for one Yera UI session.

Symbols

class ServerRuntime — Represents a single user session, tracking the executor.

ServerRuntime

Represents a single user session, tracking the executor.

Attributes

id
type: str

Unique identifier for the session.

executor
type: PyRuntimeExecutor

The runtime executor for this session.

publisher
type: Publisher | None

Publisher for streaming events to the UI.

stream
type: EventStream | None

The current event stream.

router_task
type: asyncio.Future | None

Task managing the event router.

Methods

recorded_input — Return the form of an input event that is safe to persist.

ServerRuntime.recorded_input

recorded_input(
    event: InputEvent,
) → InputEvent

Return the form of an input event that is safe to persist.

Parameters

event
type: InputEvent

Input submitted for the pending request.

Returns

type: InputEvent

The event with secret form values masked, or the event itself when it answers no pending form.