feat(daemon): route commands and the TUI through a running daemon

Session::open attaches to a daemon when one is reachable and logs in
otherwise, so every existing command works unchanged against either. A local
socket is found automatically, which is what makes an agent's invocation need
no flags at all; --no-daemon opts out.

Commands now read identity, shares, server, and download directory from the
session rather than from this run's config: routed to a daemon those differ,
and the session is the one actually on the network. Without that, whoami
named the wrong server and shares reindex would have imposed the client
machine's folders on the daemon.
This commit is contained in:
Michel de Graaf
2026-07-27 10:33:41 +02:00
parent f54f8f9b82
commit a0354f66a8
13 changed files with 1622 additions and 28 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ pub mod api;
pub mod cli;
pub mod commands;
pub mod daemon;
pub mod directories;
pub(crate) mod directories;
pub mod models;
pub mod output;
pub mod persist;
pub mod port_mapping;
pub(crate) mod port_mapping;
pub mod remote;