The reachable global postinstall writes an agent profile that changes OpenCode command permissions, which is an install-time AI-agent control-surface change requiring a block. The setup and opt-out are disclosed, and the profile includes restrictive rules, but those facts do not make automatic permission-setting changes consented.
Static reason
High-risk behavior combination matched malicious policy.
Trigger
The npm postinstall hook during a global install, unless CODE_MENTOR_SKIP_SETUP is set.
Impact
The installed profile changes which actions the agent can perform without approval.
Mechanism
It copies the bundled agent profile into ~/.config/opencode/agent/code-mentor.md; the profile sets command allowlists and permission rules.
Policy narrative
On global installation, the postinstall hook writes the package’s agent profile into the user’s OpenCode configuration. That profile changes permission settings by allowing selected commands without asking. The package documents this setup and provides an opt-out, but the permission changes are still made automatically during installation.
Evidence
package.jsonlib/postinstall.mjslib/install.mjsagent/code-mentor.md~/.config/opencode/agent/code-mentor.md