Skip to main content

spawn_auth_cli_pty

Function spawn_auth_cli_pty 

Source
pub(super) fn spawn_auth_cli_pty(
    login: Arc<Login>,
    stdin_tx: Sender<String>,
    stdin_rx: Receiver<String>,
)
Expand description

PTY-backed variant of spawn_auth_cli. Used for providers whose auth subcommand bails on isatty()==0 (currently OpenClaw). Mirrors the pipes path’s lifecycle: spawn → drain → confirm → finish_success or finish_failure → detach. Stdout+stderr are merged on the PTY side; record_line doesn’t care which stream a line came from.

Same OAuth-success invariant as the pipes path — once bundle_dir (the account’s own isolation dir) resolves and confirm_authenticated returns true, persists a standalone SecretRef::OAuthConfigDir account before finish_success — see spawn_auth_cli’s doc comment.