Skip to content

feat: add first-class Pi session support#9

Merged
aytzey merged 1 commit into
mainfrom
feat/pi-support
Jul 10, 2026
Merged

feat: add first-class Pi session support#9
aytzey merged 1 commit into
mainfrom
feat/pi-support

Conversation

@aytzey

@aytzey aytzey commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Discover, resume, branch, convert, compound, and delete native Pi JSONL sessions across the CLI, TUI, and MCP server. Extend setup and real-session validation for the Compound Engineering Pi packages.

Summary

Verification

  • go test ./... -race
  • go vet ./...
  • golangci-lint run
  • Documentation updated when behavior or trust boundaries changed

Provider safety

  • Existing sessions are not modified unexpectedly
  • Tests use temporary provider homes, not real local session stores
  • Format claims identify the upstream CLI version or source reference

Summary by CodeRabbit

  • New Features

    • Added Pi as a supported coding agent.
    • Discover, resume, branch, delete, and convert Pi sessions.
    • Added Pi support across CLI, TUI, and MCP workflows.
    • Added project and global session discovery with environment overrides.
    • Added Pi-native session conversion and active-branch handling.
    • Compound engineering setup now installs required Pi companion packages.
  • Documentation

    • Updated help text, setup instructions, keybindings, supported-agent details, and FAQs to cover Pi.

Discover, resume, branch, convert, compound, and delete native Pi JSONL sessions across the CLI, TUI, and MCP server. Extend setup and real-session validation for the Compound Engineering Pi packages.
@aytzey aytzey merged commit 43ed85e into main Jul 10, 2026
6 checks passed
@aytzey aytzey deleted the feat/pi-support branch July 10, 2026 17:39
@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e7e51f8c-0dfd-42f3-b2c1-2aea3e3caf30

📥 Commits

Reviewing files that changed from the base of the PR and between 6831f8b and 6b4ac7c.

📒 Files selected for processing (17)
  • README.md
  • cmd/showagent/main.go
  • cmd/showagent/main_test.go
  • internal/mcpserver/server.go
  • internal/mcpserver/server_test.go
  • internal/session/compound.go
  • internal/session/compound_plugin.go
  • internal/session/compound_plugin_test.go
  • internal/session/e2e_real_test.go
  • internal/session/opencode_test.go
  • internal/session/pi.go
  • internal/session/pi_test.go
  • internal/session/provider.go
  • internal/session/session_test.go
  • internal/tui/tui.go
  • internal/tui/tui_test.go
  • scripts/e2e-real.sh

📝 Walkthrough

Walkthrough

Adds Pi as a session provider with JSONL discovery, branching, conversion, compound-plugin setup, CLI/TUI/MCP integration, documentation, and real-CLI validation.

Changes

Pi provider integration

Layer / File(s) Summary
Pi session provider
internal/session/pi.go, internal/session/provider.go, internal/session/pi_test.go
Adds Pi session discovery, active-branch parsing, transcript loading, deletion, resume commands, branching, settings resolution, and native JSONL conversion with tests.
Compound engineering and Pi plugins
internal/session/compound.go, internal/session/compound_plugin.go, internal/session/*_test.go
Generalizes compound prompts and installs or repairs Codex, Claude, and Pi plugins while aggregating provider setup errors.
CLI, TUI, MCP, and documentation surfaces
README.md, cmd/showagent/*, internal/mcpserver/*, internal/tui/*, internal/session/*_test.go
Advertises Pi in help, environment scanning, MCP schemas, TUI hints, provider ordering, and user documentation.
Real CLI conversion validation
internal/session/e2e_real_test.go, scripts/e2e-real.sh
Adds Pi conversion targets and verifies exported transcripts and RPC session state.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CLI as showagent CLI
  participant Provider as piProvider
  participant SessionFile as Pi JSONL session
  CLI->>Provider: discover or resume session
  Provider->>SessionFile: read parentId-linked active path
  SessionFile-->>Provider: session entries and metadata
  Provider-->>CLI: transcript, row, or resume arguments
Loading

Possibly related PRs

  • aytzey/showagent#1: Introduces the provider-registry, CLI, TUI, and resume plumbing extended here for Pi.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/pi-support

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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