orka.tui.textual_widgets module

Custom Textual widgets for OrKa memory monitoring.

class orka.tui.textual_widgets.StatsWidget(data_manager, **kwargs)[source]

Bases: Static

Widget for displaying memory statistics.

update_stats()[source]

Update the stats display.

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

highlight_style: Style | None
absolute_offset: Offset | None

Force an absolute offset for the widget (used by tooltips).

styles: RenderStyles
message_signal: Signal[Message]

Subscribe to this signal to be notified of all messages sent to this widget.

This is a fairly low-level mechanism, and shouldn’t replace regular message handling.

class orka.tui.textual_widgets.MemoryTableWidget(data_manager, memory_type='all', **kwargs)[source]

Bases: DataTable

Custom data table for displaying memory entries with checkbox selection.

class MemorySelected(memory_data: Dict[str, Any], row_index: int)[source]

Bases: Message

Message sent when a memory row is selected.

time
bubble: ClassVar[bool] = True
handler_name: ClassVar[str] = 'on_memory_table_widget_memory_selected'

Name of the default message handler.

no_dispatch: ClassVar[bool] = False
verbose: ClassVar[bool] = False
selected_memory_key: str | None
on_data_table_cell_selected(event: CellSelected) None[source]

Handle cell selection to toggle checkbox - alternative approach.

on_data_table_row_selected(event: RowSelected) None[source]

Handle row selection to toggle checkbox.

update_data(memory_type='all')[source]

Update the table with filtered data while preserving selection.

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

columns: dict[ColumnKey, Column]

Metadata about the columns of the table, indexed by their key.

rows: dict[RowKey, Row]

Metadata about the rows of the table, indexed by their key.

highlight_style: Style | None
absolute_offset: Offset | None

Force an absolute offset for the widget (used by tooltips).

styles: RenderStyles
message_signal: Signal[Message]

Subscribe to this signal to be notified of all messages sent to this widget.

This is a fairly low-level mechanism, and shouldn’t replace regular message handling.

class orka.tui.textual_widgets.HealthWidget(data_manager, **kwargs)[source]

Bases: Container

Widget for displaying system health metrics.

compose()[source]

Compose the health widget.

update_health()[source]

Update health display with unified health calculations.

can_focus: bool = False

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

highlight_style: Style | None
absolute_offset: Offset | None

Force an absolute offset for the widget (used by tooltips).

styles: RenderStyles
message_signal: Signal[Message]

Subscribe to this signal to be notified of all messages sent to this widget.

This is a fairly low-level mechanism, and shouldn’t replace regular message handling.

class orka.tui.textual_widgets.LogsWidget(data_manager, **kwargs)[source]

Bases: DataTable

Enhanced widget for displaying memory logs with orchestration priority.

update_data()[source]

Update logs with unified filtering - show overview of recent orchestration and system logs.

can_focus: bool = True

Widget may receive focus.

can_focus_children: bool = True

Widget’s children may receive focus.

columns: dict[ColumnKey, Column]

Metadata about the columns of the table, indexed by their key.

rows: dict[RowKey, Row]

Metadata about the rows of the table, indexed by their key.

highlight_style: Style | None
absolute_offset: Offset | None

Force an absolute offset for the widget (used by tooltips).

styles: RenderStyles
message_signal: Signal[Message]

Subscribe to this signal to be notified of all messages sent to this widget.

This is a fairly low-level mechanism, and shouldn’t replace regular message handling.