SessionManager held a concrete Tmux, so its decisions — spawn rollback ordering, liveness diffing, activity change-detection — could only be reached by forking a real tmux server. Inner now holds an Arc<dyn Panes>; Tmux is the production adapter, FakePanes the one tests drive. Arc<dyn Panes> rather than a type parameter: a generic would spread through LocalApiState, attach and cli, and one vtable hop is free next to a fork+exec. Adds tests/session_decisions.rs — six cases, no subprocess, 0.24s. Replaces the chmod-0o500 rollback test, which detected root and returned early, so on CI it asserted nothing; the failure is now forced by a regular file sitting where the sidecar directory's parent must be, which no uid can work around. It also asserts the rollback *order*, not just the end state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
30 lines
847 B
Rust
30 lines
847 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 local_events;
|
|
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 local_events::{spawn_session_publisher, LocalEventBus};
|
|
pub use session::{SessionError, SessionEvent, SessionManager};
|