pi-mono/packages
robopipi[bot] 5fb9a0b110
fix(coding-agent): skip npm audit and fund output when installing pi packages (#11469)
`pi install`, `pi remove` and `pi update --extensions` run npm without
`--no-audit`, so npm prints its "N vulnerabilities … run `npm audit
fix`" advice after every install. pi gives users no way to clear that
warning, and following it causes harm. In `~/.pi/agent/npm`, `npm audit
fix` runs without `--legacy-peer-deps`, so npm installs the
host-provided `@earendil-works/pi-*` peers there: a second copy of pi.
The comment above `getNpmInstallArgs` warns against exactly that.

The change adds `--no-audit --no-fund` wherever pi already passes
`--legacy-peer-deps` to npm:
- `getNpmInstallArgs` (npm package installs and updates)
- `getGitDependencyInstallArgs` (dependency installs for git packages)
- npm uninstall

pi's managed self-update (`runManagedNpmCi`) already passes both flags.
bun and pnpm arguments are unchanged.

I did not edit `CHANGELOG.md`, per CONTRIBUTING.md.

**Testing**
- Updated the expected npm argument arrays in
`test/package-manager.test.ts`. With the source change reverted, 11
tests fail; with it, all 132 pass.
- `npm run check` passes.
- Ran the built CLI by hand with `PI_CODING_AGENT_DIR=/tmp/pa pi install
npm:lodash@4.17.20`:
- Before the change, the output ended with npm's "To address all issues,
run: npm audit fix" block.
- After, it shows only "added 1 package" and "Installed
npm:lodash@4.17.20".

Fixes #11409

Requested by @badlogic

Co-authored-by: triagent <triagent@localhost>
2026-10-27 09:17:54 +01:00
..
agent fix(ai,chord,durable,coding-agent): parse streamed tool-call arguments incrementally (fixes #9265) 2026-10-24 08:00:07 +00:00
ai feat(ai): add GPT-6.1 Terra 2026-10-26 21:27:08 +01:00
chord feat(durable,chord): publish commits at adoption, address-following watches, synchronous observers 2026-10-26 20:44:34 +00:00
codemode fix: update deps for security advisories 2026-10-22 11:24:50 +02:00
coding-agent fix(coding-agent): skip npm audit and fund output when installing pi packages (#11469) 2026-10-27 09:17:54 +01:00
durable feat(durable,chord): publish commits at adoption, address-following watches, synchronous observers 2026-10-26 20:44:34 +00:00
env feat(durable,chord): publish commits at adoption, address-following watches, synchronous observers 2026-10-26 20:44:34 +00:00
evals fix(evals): drop autoevals dependency 2026-10-22 23:32:38 +02:00
mcp fix(ai,chord,durable,coding-agent): parse streamed tool-call arguments incrementally (fixes #9265) 2026-10-24 08:00:07 +00:00
telemetry fix(ai): resolve pi-telemetry from source in workspace tests 2026-10-26 21:05:54 +00:00
tui fix(tui): recognize kitty F1-F12 sequences and ignore F13+ keys (#11468) 2026-10-27 09:16:36 +01:00