Skip to content

Add and finish Pi coding-agent provider#1

Merged
raphaelluethy merged 10 commits into
mainfrom
cursor/finish-pi-provider-7ced
Jul 17, 2026
Merged

Add and finish Pi coding-agent provider#1
raphaelluethy merged 10 commits into
mainfrom
cursor/finish-pi-provider-7ced

Conversation

@raphaelluethy

@raphaelluethy raphaelluethy commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds Pi as a first-class coding-agent provider (from upstream pingdotgg/t3code#3818 / feat/pi-provider), then finishes the remaining correctness gaps against the official Pi RPC docs and the PR review findings.

Pi talks to the user’s pi --mode rpc process over JSONL, mirrors the existing driver/adapter/text-generation shape, and stays disabled by default.

Demo

End-to-end UI walkthrough (~68s): Settings shows Pi authenticated → new thread → select Pi / GPT-4.1 → send prompt → streamed reply.

pi-provider-working.mp4

Pi authenticated in provider settings
Pi chat reply confirming integration

Finishing fixes in this branch

  • Approval gate: approval-required auto-approves read-only tools; auto-accept-edits also allows edit tools (bash still gated)
  • Confirm titles: Run bash? / Run write? classify as command/file approvals
  • Active model from get_state: adopt Pi’s reported model when none is selected
  • Docs: remove undocumented onApprovalUnavailable policy
  • Tests: auth readiness requires discovered RPC models

Test plan

  • vp check (0 errors)
  • vp run typecheck
  • Pi unit + integration tests (103 passed)
  • Contracts model/runtime tests (14 passed)
  • Recorded end-to-end UI demo video

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

ahmadaccino and others added 7 commits July 8, 2026 21:33
- PiSettings/PiSettingsPatch (enabled, binaryPath, customModels) on ServerSettings
- pi driver kind display name + MODEL_SLUG_ALIASES passthrough entry
- pi.rpc.event / pi.rpc.extension-ui runtime raw sources
RPC-mode (pi --mode rpc) driver over the Effect ChildProcessSpawner:
- PiRpcClient JSONL transport + pure parsing/extraction helpers
- PiAdapter: sessions, text_delta streaming, tool lifecycle, finalize on the
  terminal agent_end, mid-turn steer, image attachments, in-session model switch
  + thinking level, fork-based rollback; thread.started for projection parity;
  unexpected-exit reported as error
- Approval gate driven by runtimeMode (like Claude/Cursor): bundled default-deny
  t3-approvals extension injected via -e with a get_commands load handshake
  (fail-closed); extension_ui <-> canonical approval/user-input bridge
- PiProvider: version probe, live model discovery, models-based auth verdict
- PiTextGeneration via stateless RPC + get_last_assistant_text + shared JSON extract
- @earendil-works/pi-coding-agent devDependency (types only); ship the gate asset
Also ignore local agent scratch dirs (.pi-subagents, .repos/pi-pr-analysis).
Align the bundled approval gate with its tests and docs by auto-approving
read-only tools under approval-required mode. Classify "Run <tool>?" confirm
titles correctly, adopt Pi's active model from get_state for turn.started,
and drop the undocumented onApprovalUnavailable policy from the Pi guide.

Co-authored-by: Raphael Lüthy <raphaelluethy@users.noreply.github.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Jul 17, 2026
Update PiProvider status tests so ready/authenticated requires live RPC
model discovery, and custom-only catalogs stay warning/unknown. Make the
fake pi script wait for a stdin request before responding to avoid races.

Co-authored-by: Raphael Lüthy <raphaelluethy@users.noreply.github.com>
@cursor cursor Bot changed the title Finish Pi coding-agent provider implementation Add and finish Pi coding-agent provider Jul 17, 2026
cursoragent and others added 2 commits July 17, 2026 14:51
Upgrade to @earendil-works/pi-coding-agent 0.80.10, add first-class
codingAgentDir config, surface plugin slash commands, and adopt
agent_settled / thinking max while dropping unused ACP-adjacent bits.

Co-authored-by: Raphael Lüthy <raphaelluethy@users.noreply.github.com>
@raphaelluethy
raphaelluethy marked this pull request as ready for review July 17, 2026 21:21
@raphaelluethy
raphaelluethy merged commit d183d36 into main Jul 17, 2026
11 of 15 checks passed
@raphaelluethy
raphaelluethy deleted the cursor/finish-pi-provider-7ced branch July 17, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants