agent_tui/core/
mod.rs

1//! Core types and Visual Object Model (VOM) for agent-tui.
2//!
3//! This crate provides the element detection system that identifies UI components
4//! (buttons, inputs, tabs, etc.) in terminal screens using Connected-Component Labeling.
5
6#![deny(clippy::all)]
7
8mod element;
9pub mod screen;
10pub mod style;
11pub mod vom;
12
13#[cfg(test)]
14pub mod test_fixtures;
15
16pub use element::Element;
17pub use element::ElementType;
18pub use element::Position;
19pub use element::component_to_element;
20pub use element::detect_checkbox_state;
21pub use element::find_element_by_ref;
22pub use screen::ScreenGrid;
23pub use style::CellStyle;
24pub use style::Color;
25pub use vom::Cluster;
26pub use vom::Component;
27pub use vom::Rect;
28pub use vom::Role;
29pub use vom::analyze;
30pub use vom::classify;
31pub use vom::hash_cluster;
32pub use vom::segment_buffer;
33
34/// Cursor position in the terminal.
35///
36/// This is a pure value object representing where the cursor is located
37/// in the terminal grid.
38#[derive(Debug, Clone)]
39pub struct CursorPosition {
40    pub row: u16,
41    pub col: u16,
42    pub visible: bool,
43}