bp_core/control/
mod.rs

1//! IPC control layer between the CLI and the daemon.
2//!
3//! Transport: Unix domain socket at `~/.local/share/billpouch/control.sock`.
4//! Framing: one UTF-8 JSON object per line (newline-delimited JSON).
5//!
6//! The CLI sends a single [`protocol::ControlRequest`] and reads a single
7//! [`protocol::ControlResponse`], then closes the connection.  The daemon
8//! handles each connection in its own `tokio::spawn`ed task.
9//!
10//! ## Sub-modules
11//!
12//! - [`protocol`] — request/response types and typed data payloads.
13//! - [`server`]   — async Unix listener, dispatcher, and `DaemonState`.
14
15pub mod protocol;
16pub mod server;
17
18pub use protocol::{ControlRequest, ControlResponse};
19pub use server::{run_control_server, DaemonState};