//! Service layer — domain logic extracted from HTTP handlers.
//!
//! Each sub-module follows the conventions documented in
//! `docs/architecture/service-modules.md`:
//! - `mod.rs` orchestrates and owns the typed `Error` type
//! - `io.rs` is the only file that performs side effects
//! - Topic-named pure files contain branching logic with no I/O
/// Agent management — start, stop, inspect, and list agents.
pub mod agents;
/// Anthropic API key storage and model listing.
pub mod anthropic;
/// Bot command dispatch — parses and executes slash commands.
pub mod bot_command;
/// Shared pure helpers used across service modules.
pub mod common;
/// Diagnostics — server logs, CRDT dump, and permission management.
pub mod diagnostics;
/// Low-disk-space watchdog — free-space threshold checks and notifications.
pub mod disk_watch;
/// Event-based pipeline triggers: register, list, cancel, and execute on TransitionFired events.
pub mod event_triggers;
/// Pipeline event buffer for SSE streaming.
pub mod events;
/// File I/O — path validation, read, write, and listing.
pub mod file_io;
/// Gateway — multi-project proxy domain logic.
pub mod gateway;
/// Orphaned build-dir GC — reclaims dead worktree `target/` dirs and stale
/// `merge_workspace` leftovers (story 1199).
pub mod gc;
/// Git operations — worktree-scoped git commands.
pub mod git_ops;
/// Merge — rebase agent work onto master and validate.
pub mod merge;
/// Notifications — fan-out pipeline events to chat transports.
pub mod notifications;
/// OAuth 2.0 PKCE flow for Anthropic authentication.
pub mod oauth;
/// Permission router — responder registry and pending-reply tracking that
/// replace holding `perm_rx`'s mutex as a presence signal.
pub mod permission_router;
/// Pipeline status aggregation helpers.
pub mod pipeline;
/// Project open/close/list domain logic.
pub mod project;
/// QA — request, approve, and reject code reviews.
pub mod qa;
/// Project settings read/write and validation.
pub mod settings;
/// Shell command safety, sandboxing, and output helpers.
pub mod shell;
/// Status broadcaster — unified event fan-out to all consumers.
pub mod status;
/// Story CRUD — create, update, move, and manage work items.
pub mod story;
/// Timer — deferred agent start via one-shot timers.
pub mod timer;
/// Wizard — multi-step project setup domain logic.
pub mod wizard;
/// Work-item — cross-cutting domain logic for all pipeline work-item types.
pub mod work_item;
/// WebSocket — real-time pipeline updates and permission prompts.
pub mod ws;
