fn spawn_auth_cli_pty(
mgr: Arc<AuthSessionManager>,
wstore: Arc<WaveStore>,
broker: Arc<Broker>,
session_id: String,
provider_id: String,
into_bundle_id: Option<String>,
bundle_dir: Option<String>,
cli_path: String,
auth_login_args: Vec<String>,
auth_check_args: Vec<String>,
auth_env: HashMap<String, String>,
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 — when
into_bundle_id and bundle_dir are both set and confirm_authenticated
returns true, persists SecretRef::OAuthConfigDir + binding before
finish_success.