Expand description
Daemon subsystem: in-process supervision of one ccs-proxy per upstream URL.
See docs/superpowers/specs/2026-05-28-cc-switch-daemon-design.md for design.
Re-exports§
pub use commands::DaemonAction;pub use commands::handle_daemon_command;
Modules§
- aggregate
- commands
- fork
- Unix double-fork into background for daemon process isolation.
- lifecycle
- Daemon main loop: spawn proxies, write state, supervise, shutdown.
- logging
- pidfile
- Pidfile primitives and process-liveness checks for the daemon supervisor.
- state
- status
Enums§
- Proxy
Resolution - Result of attempting to resolve a proxy URL for a given upstream.
Functions§
- print_
version_ mismatch_ warning - Print the version-mismatch warning in red, if one applies. No-op otherwise.
- try_
resolve_ proxy - Check whether the daemon is alive and has a proxy for the given upstream URL.
Returns the proxy URL (http://127.0.0.1:
) if available, otherwise Direct. - version_
mismatch_ warning - If the daemon is alive but was started by a
cc-switchbinary whose version differs from this one, return a warning message. ReturnsNonewhen the daemon is stopped or its version matches the current binary.