harnessd 0.1.0

The harness daemon: API server (axum WS + REST), agent runtime host, and CLI (init/pair/doctor).
//! # harnessd
//!
//! The daemon. Everything stateful lives here (via [`harness_core`]): the agent
//! runtime, the SQLite event log, and the provider connections. Clients (the TUI and
//! the iOS app) are thin and connect over Tailscale using [`harness_proto`].
//!
//! Also the home of the CLI (`harnessd init | pair | doctor | serve`), so operability
//! is a set of commands rather than a README (design doc ยง9).

mod auth;
mod cli;
mod paths;
mod rest;
mod server;
mod ws;

use clap::Parser;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Structured logs; RUST_LOG overrides. Every handler gets a tracing span.
    tracing_subscriber::fmt()
        .with_env_filter(
            tracing_subscriber::EnvFilter::try_from_default_env()
                .unwrap_or_else(|_| "info,harnessd=debug,harness_core=debug".into()),
        )
        .init();

    cli::Cli::parse().run().await
}