@henryqw/pi-rtk-test
Keep noisy pnpm test output out of Pi’s model context.
The extension routes direct pnpm test Bash calls through RTK’s test filter. Pi receives failures and a compact result instead of the complete test log.
Install
pi install npm:@henryqw/pi-rtk-test
Install Rust Token Killer (rtk) on Pi’s PATH. This extension does not install or update RTK.
brew install rtk
rtk --version
rtk init -g --agent pi
Use
The rewrite is transparent. Pi changes these direct commands before Bash runs them:
| Pi command | Bash command |
|---|---|
pnpm test |
rtk test pnpm test |
pnpm test -- marker |
rtk test pnpm test -- marker |
Leading and trailing whitespace is removed. All other command text stays unchanged.
Only direct bare pnpm test commands with optional test arguments work. The package leaves these forms unchanged:
pnpm run testandpnpm run-script test- Global or workspace options, such as
pnpm --filter pkg test - Quoted or indirect programs, such as
"pnpm" testorenv pnpm test pnpm test:watchand unrelated commands- Newlines, carriage returns,
;,|,&,<,>, backticks, and$( - Every command that begins with
rtk
For an unsupported form, use rtk test ... explicitly. For example, run rtk test pnpm run test.
Limits and recovery
At startup, the package runs rtk test --help once. It blocks supported pnpm test calls if the probe throws, exits nonzero, is killed, or times out.
The block tells you to install RTK and verify rtk test --help. Other calls stay unchanged. The package does not warn at startup.
This package does not run tests, capture output, or inspect test results. After a rewrite, RTK runs the command and owns its output and exit status.