fix(coding-agent): support configurable npm wrapper command closes #2072

This commit is contained in:
Mario Zechner
2026-03-14 04:38:01 +01:00
parent ad32089f0c
commit 7ddaf150d6
7 changed files with 127 additions and 9 deletions

View File

@@ -54,6 +54,15 @@ npm:pkg
- Versioned specs are pinned and skipped by `pi update`.
- Global installs use `npm install -g`.
- Project installs go under `.pi/npm/`.
- Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
Example:
```json
{
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
}
```
### git

View File

@@ -117,6 +117,15 @@ When a provider requests a retry delay longer than `maxDelayMs` (e.g., Google's
|---------|------|---------|-------------|
| `shellPath` | string | - | Custom shell path (e.g., for Cygwin on Windows) |
| `shellCommandPrefix` | string | - | Prefix for every bash command (e.g., `"shopt -s expand_aliases"`) |
| `npmCommand` | string[] | - | Command argv used for npm package lookup/install operations (e.g., `["mise", "exec", "node@20", "--", "npm"]`) |
```json
{
"npmCommand": ["mise", "exec", "node@20", "--", "npm"]
}
```
`npmCommand` is used for all npm package-manager operations, including `npm root -g`, installs, uninstalls, and `npm install` inside git packages. Use argv-style entries exactly as the process should be launched.
### Model Cycling