feat(pi): inject first-party local MCP tools - #4001
Conversation
|
🚫 This pull request was removed from the merge queue because it was canceled by Jonathan Mieloo (a GitHub user). See more details here.
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
| }, | ||
| { | ||
| name: "Pi local-tools MCP server", | ||
| source: "adapters/local-tools/mcp-server.js", | ||
| destination: "mcp-server.js", |
There was a problem hiding this comment.
When a packaged desktop Pi session enables a first-party local tool, the app launches .vite/build/mcp-server.js as a standalone Node script, but this new asset is not included in asarUnpack alongside rpc-host.js, causing the MCP child and its tools to fail at startup.
Knowledge Base Used: PostHog Code Desktop App (apps/code)
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/vite-main-plugins.mts
Line: 175-179
Comment:
**MCP child remains inside ASAR**
When a packaged desktop Pi session enables a first-party local tool, the app launches `.vite/build/mcp-server.js` as a standalone Node script, but this new asset is not included in `asarUnpack` alongside `rpc-host.js`, causing the MCP child and its tools to fail at startup.
**Knowledge Base Used:** [PostHog Code Desktop App (`apps/code`)](https://app.greptile.com/posthog-org-19734/-/custom-context/knowledge-base/posthog/code/-/docs/apps-code-desktop.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
|
|
/merge stop |
|
/trunk stop |
PR overviewAll previously flagged issues have been addressed. No open security concerns remain on this pull request. Security reviewNo open security issues remain on this pull request. Fixed/addressed: 1 · PR risk: 0/10 |
Summary
posthog-code-toolsMCP server to Pi cloud runs through Pi runtime capabilitiescreatePiRpcClientTesting
pnpm --filter agent buildpnpm --filter code typecheckupload_artifactremains cloud-only; normal desktop Pi sessions retain local capabilities.