Rebrand auth guidance strings: grok login/logout -> kigi login/logout

The headless not-signed-in message still pointed at `grok login` and
XAI_API_KEY; error copy across the shell (re-auth prompts, managed-config
rejection, mcp doctor, trace classifier) and kigi-bin did too. All now
reference `kigi login` / `kigi logout`, and the headless fallback points
at the Moonshot open-platform key (KIGI_MOONSHOT_API_KEY).
This commit is contained in:
2026-07-17 19:33:06 -04:00
parent dab3fa71c9
commit 78cd94a751
14 changed files with 30 additions and 34 deletions
@@ -1052,7 +1052,7 @@ pub async fn resolve_api_key(explicit: Option<&str>, kigi_home: &Path) -> Result
return Ok(key);
}
Err(anyhow!(
"no API key: pass --api-key, set XAI_API_KEY, or run `grok login` to populate \
"no API key: pass --api-key, set XAI_API_KEY, or run `kigi login` to populate \
<grok-home>/auth.json. An expired OIDC token is auto-refreshed when a refresh_token \
is present; if not, re-login is required."
))
@@ -1088,7 +1088,7 @@ async fn non_interactive_auth_key(kigi_home: &Path) -> Result<Option<String>> {
}
Err(AuthError::NotLoggedIn) => Ok(None),
Err(e) => Err(anyhow!(
"auth.json refresh failed: {e}. Run `grok login` to re-authenticate, \
"auth.json refresh failed: {e}. Run `kigi login` to re-authenticate, \
or pass --api-key / set $XAI_API_KEY to bypass auth.json."
)),
}
@@ -2134,7 +2134,7 @@ mod tests {
}
/// Write an `auth.json` whose only entry is at the production
/// OIDC scope (the same scope `grok login` writes today and
/// OIDC scope (the same scope `kigi login` writes today and
/// `AuthManager` reads). `auth_mode: api_key` skips the refresh
/// path entirely — useful for "plain key, no refresh wanted"
/// fixtures.
@@ -2345,7 +2345,7 @@ mod tests {
assert!(
msg.contains("--api-key")
&& msg.contains("XAI_API_KEY")
&& msg.contains("grok login")
&& msg.contains("kigi login")
&& msg.contains("auth.json"),
"error names all three sources: {msg}",
);