feat: add Pi provider integration via RPC#4355
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Effect Service Conventions: one issue found. PiTextGeneration.ts recovers a known tagged failure with Effect.catchTag, which the conventions disallow (and which diverges from every sibling text-generation implementation that uses Effect.catchTags).
Posted via Macroscope — Effect Service Conventions
b06927a to
b0d460a
Compare
|
we're not adding providers right now. we'll reconsider this after our new orchestrator has shipped #2829 |
What Changed
This is intentionally Pi-only. Unlike #2748, which combines Hermes and Pi through ACP, this implementation follows the native RPC direction described in #402.
Why
#402 asks for Pi to participate in the existing provider/orchestration model without a Pi-specific frontend path, static fallback models, or unsafe partially initialized sessions. Pi's RPC mode provides the required session and event primitives while keeping Pi-specific behavior inside its driver, provider, adapter, and transport layers.
UI Changes
Verified in an isolated local app:
Screenshots or a short recording will be attached before marking this draft ready for review.
Verification
pnpm install --frozen-lockfilepnpm exec vp test runagainst 10 affected test files: 168 tests passedpnpm exec vp run --filter t3 --filter @t3tools/web --filter @t3tools/contracts typecheckvp lintfor changed TypeScript/JavaScript filesvp fmt --checkfor changed source and documentation filesgit diff --check origin/main...HEADChecklist
The implementation is focused to one provider, but it necessarily spans contracts, server runtime, web registration, tests, and documentation. This remains a draft while maintainers advise whether they prefer this as one vertical PR or a staged series.
Note
Add Pi provider integration via RPC with session management, text generation, and approval gating
@earendil-works/pi-coding-agentpackage, wiring it into the built-in provider registry alongside existing providers.PiRpcClient— a process-spawned JSONL transport with correlated request/response handling, streaming stdout classification, timeout management, and process lifecycle control.PiAdapterfor session/turn lifecycle, assistant content and reasoning streaming, tool approval gating via an injected extension (t3-approvals.ts), and user input round-trips.PiTextGenerationfor commit messages, PR content, branch names, and thread titles using structured JSON output with schema validation and output sanitization.PiProviderstatus probing viapi --versionand live model discovery via RPC; adds Pi settings schema to contracts and registers the provider in the web UI with an 'Early Access' badge.📊 Macroscope summarized f8389d5. 20 files reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.