Skip to content

feat: add Pi RPC backend - #1

Closed
Overbaker wants to merge 1 commit into
mainfrom
feat/pi-rpc-backend
Closed

Overbaker wants to merge 1 commit into
mainfrom
feat/pi-rpc-backend

Conversation

@Overbaker

Copy link
Copy Markdown
Owner

Summary

  • Add Pi as a first-class codeagent-wrapper backend using a local JSONL RPC subprocess (--mode rpc), with model selection, CLI parsing, workflow injection, doctor checks, and role prompt installation.
  • Stream assistant deltas, retain session IDs for resume, preserve literal/multiline prompts through RPC stdin, and support timeout/cancellation and MCP opt-in.
  • Fail on RPC command rejection, provider/retry errors, assistant error/aborted completion (including Pi's errorMessage field), malformed streams, and premature EOF; never silently fall back to another model.
  • Add focused protocol/lifecycle tests, integration documentation, and bump the wrapper installer expectation to v5.16.0.

OpenSlime manages the local Pi subprocess. Pi continues to own provider credentials, model capabilities, context-window configuration, and thinking levels; this PR does not add a standalone remote Pi server transport.

Validation

  • pnpm typecheck
  • pnpm test — 38 files, 457 tests passed
  • pnpm build
  • pnpm pack --pack-destination /tmp --json — all 8 Pi role templates included
  • env -u PI_MODEL go test -short ./... -count=1
  • env -u PI_MODEL go test -race ./... -run 'Pi' -count=1
  • env -u PI_MODEL go vet ./...
  • Real RPC new-session/resume E2E: literal multiline/@/shell-character input preserved; resume retained the same session ID and recalled its marker; assistant ran at high thinking with nonzero reasoning tokens.
  • Real invalid-model E2E: exited 1 with the model-not-found error and no fallback.

Existing unrelated test issue

The non-short env -u PI_MODEL go test ./... -count=1 run reproduces two timing-sensitive Codex test failures:

  • TestRunCodexTask_ForcesStopAfterCompletion
  • TestRunCodexTask_DoesNotTerminateBeforeThreadCompleted

Both fail identically on the unmodified main baseline (e99bd5b), so this PR leaves the unrelated generic Codex behavior unchanged. The CI-equivalent short suite and all Pi checks pass.

@Overbaker

Copy link
Copy Markdown
Owner Author

CI note: Go and Node 20/22 checks pass. The build workflow successfully cross-compiled all six targets and created the GitHub preset release, but its Cloudflare R2 mirror step failed because this repository run did not provide CLOUDFLARE_API_TOKEN / CLOUDFLARE_ACCOUNT_ID. This is a publishing-credential failure, not a compile/test failure; this PR does not change release workflow semantics.

@Overbaker Overbaker closed this Nov 18, 2026
@Overbaker
Overbaker deleted the feat/pi-rpc-backend branch November 18, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant