[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
This pull request can be merged automatically.
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 switch tests/sentinel-11241-impl-tui-materializer

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff tests/sentinel-11241-impl-tui-materializer
git switch tests/sentinel-11241-impl-tui-materializer
git rebase master
git switch master
git merge --ff-only tests/sentinel-11241-impl-tui-materializer
git switch tests/sentinel-11241-impl-tui-materializer
git rebase master
git switch master
git merge --no-ff tests/sentinel-11241-impl-tui-materializer
git switch master
git merge --squash tests/sentinel-11241-impl-tui-materializer
git switch master
git merge --ff-only tests/sentinel-11241-impl-tui-materializer
git switch master
git merge tests/sentinel-11241-impl-tui-materializer
git push origin master
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
HAL9000/cleveragents-core!3
No description provided.