[sentinel #11241] feat(tui): implement TuiMaterializer bridging A2A event queue to Output Rendering Framework #3

Open
HAL9000 wants to merge 2 commits from tests/sentinel-11241-impl-tui-materializer into master
Owner

This is an auto-generated sentinel duplicate of upstream PR cleveragents/cleveragents-core#11241 for pipeline testing. It targets the fork's master and is isolated from the canonical pipeline.


Summary

  • Implement TuiMaterializer class — a MaterializationStrategy that bridges A2A event queue to the Output Rendering Framework for live Textual widget operations in the CleverAgents TUI.
  • Real-time subscription to A2aEventQueue mapping task status/artifact events (TaskStatusUpdateEvent, TaskArtifactUpdateEvent) into TUI widgets.
  • Full coverage of all ElementHandle types from ADR-044: Panel, Table, Tree, Progress, Status, Code, Diff, Separator, ActionHint, and Text blocks.

Details

The TuiMaterializer implements the full OutputSession lifecycle protocol:

  • on_session_begin() — registers A2A event subscriber (lazy init), fires begin callbacks
  • on_element_created() — factory dispatches per-kind widget builders with fallback stubs when Textual is unavailable
  • on_element_updated() — incremental update routing via kind-specific renderers
  • on_element_closed() — marks widgets closed, fires close callbacks
  • on_session_end() — unsubscribes from A2A queue, fires session-end callbacks

Each element kind has both a builder (via _make_widget factory dispatch) and an optional updater function for incremental rendering. Thread safety is enforced through _lock on all public methods. When Textual is not installed the materializer falls back to minimal stubs rather than crashing per ADR-044 requirements.

Widget Mapping (per ADR-044)

ElementHandle Type Widget
PanelHandle Static container
TableHandle DataTable
TreeHandle Tree
ProgressHandle ProgressBar/Throbber
StatusHandle Label (CSS class)
CodeHandle ReadOnly TextArea
DiffHandle Custom DiffView
SeparatorHandle Rule
ActionHintHandle Static

Original upstream PR: cleveragents/cleveragents-core#11241

_This is an auto-generated sentinel duplicate of upstream PR `cleveragents/cleveragents-core#11241` for pipeline testing. It targets the fork's `master` and is **isolated** from the canonical pipeline._ --- ### Summary - Implement TuiMaterializer class — a MaterializationStrategy that bridges A2A event queue to the Output Rendering Framework for live Textual widget operations in the CleverAgents TUI. - Real-time subscription to A2aEventQueue mapping task status/artifact events (TaskStatusUpdateEvent, TaskArtifactUpdateEvent) into TUI widgets. - Full coverage of all ElementHandle types from ADR-044: Panel, Table, Tree, Progress, Status, Code, Diff, Separator, ActionHint, and Text blocks. ### Details The TuiMaterializer implements the full OutputSession lifecycle protocol: - on_session_begin() — registers A2A event subscriber (lazy init), fires begin callbacks - on_element_created() — factory dispatches per-kind widget builders with fallback stubs when Textual is unavailable - on_element_updated() — incremental update routing via kind-specific renderers - on_element_closed() — marks widgets closed, fires close callbacks - on_session_end() — unsubscribes from A2A queue, fires session-end callbacks Each element kind has both a builder (via _make_widget factory dispatch) and an optional updater function for incremental rendering. Thread safety is enforced through _lock on all public methods. When Textual is not installed the materializer falls back to minimal stubs rather than crashing per ADR-044 requirements. ### Widget Mapping (per ADR-044) | ElementHandle Type | Widget | |--------------------|-------------------| | PanelHandle | Static container | | TableHandle | DataTable | | TreeHandle | Tree | | ProgressHandle | ProgressBar/Throbber | | StatusHandle | Label (CSS class) | | CodeHandle | ReadOnly TextArea | | DiffHandle | Custom DiffView | | SeparatorHandle | Rule | | ActionHintHandle | Static --- _Original upstream PR: cleveragents/cleveragents-core#11241_
HAL9000 self-assigned this 2026-05-21 10:32:51 +00:00
HAL9000 added 2 commits 2026-05-21 10:32:51 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin tests/sentinel-11241-impl-tui-materializer:tests/sentinel-11241-impl-tui-materializer
git checkout tests/sentinel-11241-impl-tui-materializer
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HAL9000/cleveragents-core#3