Will (waitingsnow on Discord) installed Grok Build with
`brew install --cask grok-build`. The cask (formulae.brew.sh/api/cask/
grok-build.json, 1.0.52) links $HOMEBREW_PREFIX/bin/grok to
Caskroom/grok-build/<v>/grok-<v>-macos-<arch> and leaves ~/.grok/bin
empty. magpie only looked at ~/.grok/bin/grok (x.ai's installer), since
`grok` on PATH may be Homebrew's regular-expression formula, so the CLI row
had no version or update, and before grok's first run Grok Build wasn't
detected at all.
- cliSpecs: grok gets brew grok-build, so the cask is updated with
`brew upgrade --cask grok-build`.
- brewBin: for an agent with no Bin (its command name is other tools'),
the command on PATH counts only when it leads into one of the agent's
own formulae or casks. cliBin prefers it (it is what a terminal runs)
over ~/.grok/bin/grok; Agent.Detected uses it too.
- Grok is the only cliSpec with `at`; the brew siblings (gemini-cli, pi,
cline formulae) are the previous commit.
Run: go test -tags nogui ./internal/agent -run 'TestHowInstalled|TestGrok'
(ok, new TestGrokBrewCask); full ./internal/agent passed with -timeout 40m
(650s on a loaded Mac). gofmt -l clean; go vet -tags nogui for darwin,
linux and windows. Broke each piece by hand and watched red: no grok-build
in the spec (cask not found/updated), cliBin skipping brewBin, Detected
skipping it, and brewBin taking any brew grok (the regex formula then shows
as Grok Build). Not tried with a real cask install: nothing installed on
the live machine; the fixture follows the cask JSON's binary/target.