prime-agent icon indicating copy to clipboard operation
prime-agent copied to clipboard

coding-agent: keep Homebrew installs package-manager owned

Open fettpl opened this issue 3 months ago • 0 comments

Problem

A Homebrew formula installs the npm package under a versioned path such as:

/opt/homebrew/Cellar/prime-agent/0.7.0/libexec/lib/node_modules/prime-agent

The current install-method detection treats that path as a custom global npm prefix. With normal filesystem permissions, getSelfUpdateCommand() therefore returns:

npm --prefix /opt/homebrew/Cellar/prime-agent/0.7.0/libexec install -g prime-agent

Running prime-agent update would mutate the Homebrew-managed keg instead of leaving upgrades to Homebrew.

Expected behavior

  • Detect installs inside a Homebrew Cellar as Homebrew-managed.
  • Do not construct or run an npm self-update command for those installs.
  • Direct the user to brew upgrade prime-agent.

This was found during the official Homebrew submission preflight tracked in #843.

The repository currently has no pkg:coding-agent label and this account cannot create one. @badlogic please create/apply that required label when convenient.

fettpl avatar Aug 07 '26 10:08 fettpl