This repository has been archived on 2026-10-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maestro/crates/maestro-daemon/src/lib.rs
T
Miguel PalhasandClaude Opus 5 63898cef25
ci / rust (pull_request) Successful in 1m45s
ci / rust (push) Successful in 1m38s
feat(maestro): put a Panes seam behind Tmux
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>
2026-08-22 12:44:13 +01:00

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};