A background task, a second broadcast channel and a whole module existed to remap SessionEvent onto CatalogEvent one variant at a time. SessionManager now emits CatalogEvent directly. Deletes local_events.rs, the publisher task, the LocalEventBus channel, enum SessionEvent, LocalApiState::events, and the duplicate capacity constant — events_capacity was declared twice for one logical stream. Lag semantics improve. There were two lag points: the publisher falling behind the manager, which broadcast one Lagged to every client, and each WS subscriber falling behind the bus. Only the per-subscriber one is left, which pump_events already handled — a slow client now makes only itself resync. Adds the first daemon-level tests for WS /api/events: the Snapshot-then- deltas contract, and that a late subscriber gets a Snapshot of current state. Both were described only in a comment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
28 lines
747 B
Rust
28 lines
747 B
Rust
//! `maestro daemon` — the per-host Maestro daemon.
|
|
//!
|
|
//! Wraps tmux, owns every session on the machine, and serves them to clients
|
|
//! (CLI, TUI, web) over a plain HTTP + WebSocket API on a local bind address.
|
|
//! No registry, no peers, no auth layer: reaching the bind address is the
|
|
//! authorization.
|
|
|
|
#![deny(missing_debug_implementations)]
|
|
|
|
pub mod activity;
|
|
pub mod attach;
|
|
pub mod cli;
|
|
pub mod config;
|
|
pub mod dirlist;
|
|
pub mod gitroot;
|
|
pub mod local_api;
|
|
pub mod panes;
|
|
pub mod proc;
|
|
pub mod pty;
|
|
pub mod session;
|
|
pub mod sidecar;
|
|
pub mod spawn_history;
|
|
pub mod tmux;
|
|
pub mod worktree;
|
|
|
|
pub use config::{default_config_path, default_state_dir, load_config, DaemonConfig, EnvOverrides};
|
|
pub use session::{SessionError, SessionManager};
|