diff --git a/Justfile b/Justfile index 68cf9a6dc..5ae63462d 100644 --- a/Justfile +++ b/Justfile @@ -30,6 +30,7 @@ test: bats tests/test_dynamic_wallpaper.bats bats tests/test_geoclue_latitude.bats bats tests/test_brew_preinstall.bats + bats tests/test_ai_tools_brewfile.bats bats tests/test_validate_brewfiles.bats bats tests/test_oem_brew.bats bats tests/test_bonedigger_report.bats diff --git a/system_files/shared/usr/share/ublue-os/homebrew/ai-tools.Brewfile b/system_files/shared/usr/share/ublue-os/homebrew/ai-tools.Brewfile index c5a9f71ef..b1fa3f420 100644 --- a/system_files/shared/usr/share/ublue-os/homebrew/ai-tools.Brewfile +++ b/system_files/shared/usr/share/ublue-os/homebrew/ai-tools.Brewfile @@ -12,7 +12,6 @@ brew "llmfit" brew "llmmanorg/tap/llmman" brew "mistral-vibe" brew "qwen-code" -brew "ramalama" brew "ublue-os/tap/linux-mcp-server" cask "claude-code" cask "codex" diff --git a/tests/test_ai_tools_brewfile.bats b/tests/test_ai_tools_brewfile.bats new file mode 100644 index 000000000..95ea2009c --- /dev/null +++ b/tests/test_ai_tools_brewfile.bats @@ -0,0 +1,41 @@ +#!/usr/bin/env bats +# Tests for the Bluefin Agent Mode AI tools bundle. +# +# Asserts the required inventory in both directions so additions and removals +# cannot silently drift: every required tool must be present, and the retired +# RamaLama package must be absent. Pure content assertions — no real Homebrew. +# +# Oh My Pi is intentionally NOT asserted yet: the packaged formula lands in +# ublue-os/homebrew-tap#686, after which the brew line and this assertion are +# added in the same follow-up. +# +# Run: bats tests/test_ai_tools_brewfile.bats + +BREWFILE="${BATS_TEST_DIRNAME}/../system_files/shared/usr/share/ublue-os/homebrew/ai-tools.Brewfile" + +@test "ai-tools bundle installs llmman as the local inference runtime" { + grep -qFx 'tap "llmmanorg/tap"' "${BREWFILE}" + grep -qFx 'brew "llmmanorg/tap/llmman"' "${BREWFILE}" +} + +@test "ai-tools bundle installs the read-only linux-mcp-server diagnostics tool" { + grep -qFx 'brew "ublue-os/tap/linux-mcp-server"' "${BREWFILE}" +} + +@test "ai-tools bundle installs Goose as the GUI troubleshooting client" { + grep -qFx 'cask "ublue-os/tap/goose-linux"' "${BREWFILE}" +} + +@test "ai-tools bundle installs Jan as the chat application" { + grep -qFx 'flatpak "ai.jan.Jan"' "${BREWFILE}" +} + +@test "ai-tools bundle no longer installs retired RamaLama" { + run grep -nw 'ramalama' "${BREWFILE}" + [ "${status}" -ne 0 ] +} + +@test "ai-tools bundle stays user-scoped with no privileged install route" { + run grep -nE 'sudo' "${BREWFILE}" + [ "${status}" -ne 0 ] +}