diff --git a/CHANGELOG.md b/CHANGELOG.md index 19c1bc1..354f218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -62,6 +62,12 @@ Newest entries on top, within each tool. ## aikit +### 1.15.5 — 2026-07-03 +- ⚠ **Fix: `aikit auth ` now exits non-zero when the agent is not installed** + (POK-90). Previously it printed the "is not installed. Run 'aikit install …' first." + error but exited `0`, misleading scripts and CI. The message is unchanged; exit + code is now `1` via `AikitError`, consistent with unknown-agent validation. + ### 1.15.4 — 2026-07-02 - **Fix: five POK-65 agents falsely showed "needs auth" when authenticated** (POK-78). `auggie`, `devin`, `qodo`, `openinterpreter`, and `plandex` were registered without diff --git a/aikit b/aikit index 8ca4a2b..0c3dcaf 100755 --- a/aikit +++ b/aikit @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -aikit — AI Coding Agent CLI Installer & Manager v1.15.4 +aikit — AI Coding Agent CLI Installer & Manager v1.15.5 Install, update, authenticate, and manage 31 AI coding agent CLIs from one tool. Architecture: @@ -52,7 +52,7 @@ from rich.progress import Progress, SpinnerColumn, TextColumn from rich.table import Table from rich.text import Text -__version__ = "1.15.4" +__version__ = "1.15.5" import scriptkit as sk @@ -2879,8 +2879,9 @@ def _do_auth_impl(agent_key): icon = agent["icon"] if not detect_agent_bin(agent_key): - print_error(f"{icon} {agent['name']} is not installed. Run 'aikit install {agent_key}' first.") - return + raise AikitError( + f"{icon} {agent['name']} is not installed. Run 'aikit install {agent_key}' first." + ) auth_type = agent.get("auth_type", "unknown") auth_note = agent.get("auth_note", "") diff --git a/tests/test_tools_characterization.py b/tests/test_tools_characterization.py index 6a486f7..f425415 100644 --- a/tests/test_tools_characterization.py +++ b/tests/test_tools_characterization.py @@ -1311,6 +1311,18 @@ def test_aikit_uninstall_prunes_config_entry(tool_loader, monkeypatch, tmp_path) assert "kilo" not in saved.get("agents", {}) +def test_aikit_auth_signals_failure_when_agent_not_installed(tool_loader, monkeypatch): + # POK-90: auth for a known-but-not-installed agent must raise AikitError so + # `aikit auth` exits non-zero (previously it printed an error and returned 0). + m = tool_loader("aikit") + + monkeypatch.setattr(m, "validate_agent_keys", lambda keys: keys) + monkeypatch.setattr(m, "detect_agent_bin", lambda _key: False) + + with pytest.raises(m.AikitError, match="not installed"): + m._do_auth_impl("aider") + + def test_aikit_uninstall_signals_failure_when_no_uninstall_command(tool_loader, monkeypatch): # POK-82: an installed agent with no automated uninstall command must make # `aikit uninstall` exit non-zero (previously it exited 0 and misled callers).