ralph_workflow/rendering/mod.rs
1//! Rendering subsystem for user-facing display output.
2//!
3//! This module provides the single source of truth for all user-facing
4//! terminal output formatting. The event loop calls `render_ui_event()`
5//! and displays the result.
6//!
7//! # Architecture
8//!
9//! ```text
10//! UIEvent -> rendering::render_ui_event() -> String -> Logger.info()
11//! ```
12//!
13//! # Separation of Concerns
14//!
15//! This module is ONLY responsible for formatting. It must NOT:
16//! - Read/write files or touch Workspace
17//! - Spawn processes or call executors
18//! - Decide pipeline control flow or emit/handle PipelineEvent
19//! - Perform XML extraction from logs (only render already-provided content)
20//!
21//! # Output Channels
22//!
23//! Ralph has two distinct output channels:
24//!
25//! - **UI channel**: Event loop renders `UIEvent` strings via this module
26//! (phase transitions, progress, semantic XML summaries)
27//! - **Streaming channel**: NDJSON parsers write incremental output via their
28//! printer abstraction during agent execution (not routed through this module)
29//!
30//! # Usage
31//!
32//! ```ignore
33//! use ralph_workflow::rendering::render_ui_event;
34//!
35//! for ui_event in &result.ui_events {
36//! ctx.logger.info(&render_ui_event(ui_event));
37//! }
38//! ```
39
40pub mod json_pretty;
41mod ui_event;
42pub mod xml;
43pub mod xml_pretty;
44
45pub use ui_event::render_ui_event;