Connect stdiod to multiple backend profiles
MI
1d ago+595+595+012345678901234567890123456789-105-105-012345678901234567890123456789
Summary
- Run one WebSocket session per backend profile in a single stdiod process. Keep credentials, status, and child processes scoped to their profile.
- Add
--profileto login, logout, status, server, and keep-awake commands. The running daemon discovers new profiles automatically. - Preserve named sign-ins when the desktop app resets its default account. Explicit
uninstall --purgestill removes all profiles.
Verification
- Rust workspace tests (205 passed), formatting, and Clippy.
- Integration coverage for two concurrent sessions, profile discovery, and isolated logout.
- Verified the demo and dashboard backends connected simultaneously on a Mac under one daemon PID.
Summary by cubic
Connects stdiod to multiple backends from a single daemon process, with one WebSocket session per named profile.
- Adds
--profiletologin,logout,status,keep-awake, andserver; commands without it still use the default sign-in. - Runs the daemon as a per-profile orchestrator (
daemon_profiles) that discovers and respawns backend sessions; tunnel handling stays indaemon::run_backend, and session tasks are aborted cleanly on shutdown. - Keeps backend setup errors isolated to their profiles so one failing backend cannot take down the others.
- Desktop
resetStdiodpreserves named profiles (previously--purgewiped them); explicituninstall --purgestill removes everything, with--keep-profilesopting into preservation. - Profile names are 1–48 lowercase letters, digits, or hyphens, starting with a letter.