fix(pi): spawn bundled Pi CLI directly under Node, not via bun
Follow-up to 2707370. That commit resolved the bundled @earendil-works/pi-coding-agent/dist/cli.js path correctly but then spawned it as "bun <cli.js>" on the assumption that the OS couldn't exec a .js file directly. Pi is a Node app (its package.json bin entry points at dist/cli.js which carries "#!/usr/bin/env node"), and npm sets the exec bit during install. The OS handles the shebang and runs the script under Node with no extra runtime needed. Requiring "bun" would have broken any Pi user who installed Pi globally via `npm install -g @earendil-works/pi-coding-agent` without also installing Bun. The subagent spawn would have failed with ENOENT once the plugin used the bundled path. Fix: drop the cliViaBun flag and bun wrapping entirely. Spawn the resolved cli.js path directly. The OS resolves the shebang and runs it under Node. Explicit piBinary override path was already direct- spawn and is unaffected. Verification: - 297/297 Pi unit tests pass - 25/25 subagent-runner tests pass - 2/2 Pi historian e2e tests pass in 5s (pi-historian-success, pi-slow-historian) which are the tests that actually spawn Pi via the bundled resolution path - Typecheck clean
U
ualtinok committed
4326e0bf6e1bfdb09e5596ad9ed3d0e8ae1514b9
Parent: 2899eb7