feat(tui): implement status bar with connection and turn state indicators feat(tui): create workflow panel for agent status and progress visualization feat(web): introduce web frontend interface with static file serving feat(ws): add WebSocket interface for real-time communication and session management
34 lines
1.2 KiB
Rust
34 lines
1.2 KiB
Rust
//! # Daemon Interface
|
|
//!
|
|
//! Background process that owns agent state and communicates with TUI
|
|
//! clients over a Unix-socket IPC protocol.
|
|
//!
|
|
//! ## Architecture
|
|
//!
|
|
//! ```text
|
|
//! src/
|
|
//! ├── lib.rs — Crate root, module declarations, re-exports
|
|
//! ├── server.rs — Daemon server: session creation, socket bind, client loop
|
|
//! ├── client.rs — IPC client for attaching to daemon (moved from attach mode)
|
|
//! ├── key_code.rs — KeyCode <-> KeyAction conversions
|
|
//! ├── state.rs — AppStateRest, DaemonState, supporting types, create_session
|
|
//! └── handler.rs — Action, apply_action, handle_key, IPC request handler
|
|
//! ```
|
|
//!
|
|
//! ## Modes
|
|
//!
|
|
//! - **Server** (`run_daemon`): creates a session, binds a Unix socket, accepts
|
|
//! incoming clients, and processes their IPC `ClientRequest`s.
|
|
//! - **Client** (`run_attach`): connects to a running daemon over its Unix socket,
|
|
//! enters raw TUI mode, forwards keystrokes, and renders state updates.
|
|
|
|
pub mod client;
|
|
pub mod handler;
|
|
pub mod key_code;
|
|
pub mod server;
|
|
pub mod state;
|
|
|
|
// Re-export key types for convenience.
|
|
pub use handler::{apply_action, Action};
|
|
pub use state::{AppStateRest, DaemonState, Overlay};
|