1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//! Daemon domain services.
//!
//! Why: the HTTP handlers in `api.rs` had grown to embed session lifecycle
//! rules, the hook overseer pipeline, tmux I/O policy, and bot pairing logic
//! directly in the request functions, leaving a 2300-line file where business
//! logic and transport were inseparable. Extracting that logic into focused,
//! HTTP-agnostic services makes each rule unit-testable without spinning up an
//! axum request, and shrinks every handler to deserialize-call-serialize.
//! What: this module groups the four domain services and re-exports their
//! public types so call sites use `crate::daemon::services::SessionService` etc.
//! Test: each submodule carries its own `#[cfg(test)]` suite; run them with
//! `cargo test -p trusty-mpm-daemon services`.
// #8257: the record view the dispatch deny and `--list` share, and the OS
// probe the repair asks before it writes.
// #8531: the repair caller, established from the socket's kernel peer pid.
pub
// #7504: the ONE place the merged-PR reclaim's production probes are assembled,
// plus the daemon loop that runs it automatically after a merge.
// #8451: the disk-budget sweep over the builder slot pool.
pub
// #6556: the reader for the `SubagentStop` records a hook parked on disk when
// this daemon was unreachable.
// #8059: the durable, cross-process half of that status — `tm doctor` runs
// daemonless, so the in-memory timings alone reported every sweep idle.
pub
// #7965: the single background-maintenance lane both sweeps take, and the
// last-pass timings `tm doctor` reports.
pub
// #7965: the cross-sweep latency contract — a running sweep never pushes a
// request past the client's discovery budget. It spans both sweeps, so it lives
// beside neither.
pub use ;
pub use ;
pub use ;
pub use TmuxService;