pub fn current_channel() -> StringExpand description
Handle the auto-start CLI verbs, if present. Returns true when one was
handled and the process should exit.
Without this the module would be unreachable in a shipped build — nothing could opt in, query, or remove the registration (Codex P1 on PR #2999). A CLI surface rather than only a UI toggle is deliberate: it gives an uninstaller something to call, which is precisely what Workstream 4’s “one complete, independently-testable uninstall path” needs. A GUI toggle can be layered on later and should call the same functions.
Verbs (checked before any heavy startup work, so they are cheap and cannot disturb a running instance):
--enable-autostart— register, using this executable’s own path--disable-autostart— remove; idempotent, safe to run unconditionally--autostart-status— printenabled/disabled, exit 0 either way The channel this launcher belongs to, which owns any entry it writes (SPEC_START_WITH_OS_2026_09_25.md§3.5). Resolved the same way as the data dir;"unknown"only if that resolution fails.