fix(coding-agent): append Node to PATH in the Nix wrapper

Shells started by the bash tool now keep the user's node/npm. Pi still
runs on the pinned Node, which stays available as an npm fallback.

closes #10519
This commit is contained in:
Armin Ronacher 2026-10-15 15:49:34 +02:00
parent a3f265b1c6
commit eddebaeebf
2 changed files with 6 additions and 1 deletions

View file

@ -118,12 +118,16 @@ stdenv.mkDerivation {
mkdir -p "$out/lib/pi" "$out/bin"
cp -R . "$out/lib/pi"
# The wrapper runs Pi with an absolute Node path. Node is only on PATH so Pi can
# find npm for package installs; append it so that shells started by the
# bash tool keep the user's node/npm (e.g. from mise or nvm). fd, ripgrep,
# and the clipboard tools are Pi's own dependencies and take precedence.
makeWrapper ${nodejs}/bin/node "$out/bin/pi" \
--add-flags "$out/lib/pi/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js" \
--suffix PATH : ${lib.makeBinPath [ nodejs ]} \
--prefix PATH : ${
lib.makeBinPath (
[
nodejs
fd
ripgrep
]

View file

@ -14,6 +14,7 @@
- Fixed repeated codemode timeouts or aborts accumulating surviving workers; admission now limits live workers to two across sessions, counting cancelled workers until actual exit ([#10748](https://github.com/earendil-works/pi/issues/10748))
- Fixed `--model` choosing a provider by catalog order when several providers offer the match; Pi now prefers the provider with credentials and otherwise reports the ambiguity. `--models` and `enabledModels` add a model for each provider that offers it and warn about the ambiguity ([#10160](https://github.com/earendil-works/pi/issues/10160))
- Fixed `read` line-range labels for numeric-string or null arguments in the TUI, session tree, HTML exports, and examples ([#9887](https://github.com/earendil-works/pi/issues/9887))
- Fixed the Nix package putting its Node.js first on `PATH`, which made bash tool shells use Pi's Node instead of the user's `node`/`npm`. Pi's Node is now only a fallback ([#10519](https://github.com/earendil-works/pi/issues/10519))
- Fixed prompt templates dropping empty quoted arguments (`""` or `''`), which shifted later positional arguments and prevented positional defaults from applying ([#10867](https://github.com/earendil-works/pi/issues/10867))
## [1.2.0] - 2026-10-12