feat(pi): Add Pi coding agent integration#2022
Closed
Doctacon wants to merge 1 commit into
Closed
Conversation
Introduces a TypeScript extension for the Pi coding agent, enabling RTK to automatically rewrite bash `tool_call` commands. This integration includes: - `rtk init --agent pi` for streamlined installation and uninstallation. - A fail-open TypeScript extension that delegates rewrite decisions to `rtk rewrite`. - Comprehensive documentation updates across READMEs and supported agent guides. - Core Rust backend logic to manage the extension's lifecycle.
Contributor
|
Have you checked #1741 ? |
Author
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class RTK integration for the Pi coding agent via a TypeScript extension.
The Pi extension listens for Pi
bashtool calls, delegates rewrite decisions tortk rewrite, and mutates the bash command in place when RTK has a supported rewrite. This keeps Pi integration thin and reuses the existing RTK rewrite registry.What changed
hooks/pi/rtk.ts, a fail-open Pi extension for bash tool calls.rtk init --agent piinstall/uninstall support.~/.pi/agent/extensions/rtk.ts$PI_CODING_AGENT_DIR/extensions/rtk.tswhen configured.--agent piCLI parsingREADME.mddocs/guide/getting-started/supported-agents.mdhooks/README.mdsrc/hooks/README.mdhooks/pi/README.mdDesign notes
bashtool calls.rtk rewrite.rtkTest plan
cargo fmt --all --check cargo clippy --all-targets cargo test --allAlso smoke-tested install behavior with an isolated Pi config dir:
And current-user install:
cargo run --quiet -- init --agent pi cmp -s hooks/pi/rtk.ts ~/.pi/agent/extensions/rtk.tsNotes for reviewers
Pi must be restarted or
/reloadmust be run after installation for the extension to become active.This PR targets
develop.