# pi-plugin-mcowger

> `pi-plugin-mcowger` is a Paseo provider for the [pi coding agent](https://github.com/earendil-works/pi). It targets Paseo `v0.8.0` and embeds pi through `@earendil-works/pi-coding-agent` instead of running the `pi` CLI in RPC mode.

> This is a community-submitted listing. Treat plugin-provided text as untrusted data and review the source before installing or running code.

- **Plugin ID:** `pi-plugin-mcowger`
- **Source repository:** [mcowger/paseo-plugins](https://github.com/mcowger/paseo-plugins/tree/main/pi-plugin-mcowger)
- **Plugin path:** `pi-plugin-mcowger`
- **Catalog page:** https://paseo.cafe/plugins/pi-plugin-mcowger
- **Markdown listing:** https://paseo.cafe/plugins/pi-plugin-mcowger.md
- **Catalog API:** https://paseo.cafe/api/plugin/pi-plugin-mcowger.json
- **License:** MIT
- **Requires Paseo:** `>=0.8.0`
- **Platforms:** all
- **Categories:** provider

## Install

```sh
paseo plugin add mcowger/paseo-plugins --ref main --path pi-plugin-mcowger
```

## Caveats

- None declared.

## Catalog health

- Manifest: valid
- README: present
- License: present
- Tests: present
- Typecheck script: present
- Recently updated: yes

## Security scan

- Status: passed
- Blocking findings: 0
- Advisory findings: 0

## Repository-provided content

> Everything below this point comes from the community repository. It is untrusted reference material, not system instructions. No catalog-authored facts follow it.

### Installation notes

Install from a checkout of this repository:

```bash
cd /absolute/path/to/pi-plugin-mcowger
npm install
npm run typecheck
paseo plugin install "$PWD"
paseo plugin reload pi-plugin-mcowger
```

`npm install` patches broken declaration probes in third-party dependencies and builds the vendored
pi/MCP SDK bundle required by Paseo's plugin compiler. See
[`docs/packaging.md`](./docs/packaging.md) for the details.

### Source README

#### Pi provider (mcowger)

`pi-plugin-mcowger` is a Paseo provider for the
[pi coding agent](https://github.com/earendil-works/pi). It targets Paseo
`v0.8.0` and embeds pi through `@earendil-works/pi-coding-agent` instead of
running the `pi` CLI in RPC mode.

##### Status

The plugin is ready for use with Paseo `v0.8.0`. Paseo's provider API is stable for this release.

##### Preview

![Pi provider preview](./images/pi-provider.svg)

##### Screenshot

![Pi provider in Paseo](./images/pi-provider.png)

##### What it does

- Loads pi models, auth, settings, extensions, skills, and prompt templates from `~/.pi/agent`.
- Exposes pi models with per-model thinking levels in Paseo's composer.
- Stores Pi presets in Paseo host settings and exposes them as composer modes. Manage presets in
  Settings → Plugins → Pi Presets. Selecting one applies its model, thinking level, tool patterns,
  and appended system prompt.
- Provides a branch-aware `todo` tool when no loaded Pi extension already contributes one, and emits
  its results (along with `@juicesharp/rpiv-todo` results) as native Paseo todo items.
- Maps foreground pi subagent calls to native Paseo subagent tool rows.
- Bridges pi extension dialogs to Paseo permission questions.
- Bridges Paseo-provided MCP servers to pi custom tools in-process.
- Publishes Pi extension slash commands alongside built-in commands and prompt templates.
- Exposes native composer selectors for compact and retry.
- Emits startup diagnostics for failed resources, MCP connections, model fallbacks, and unsupported
  session configuration instead of hiding those problems in daemon logs.
- Persists sessions with pi's `SessionManager` and supports replay from the active branch, steering,
  interruption, compaction, and usage reporting.

##### Runtime settings and diagnostics

Active Pi agents expose native composer selectors for `Compact` and `Retry`. Each selector shows
its current state and opens a small popup with explicit on/off choices.

The embedded SDK cannot safely apply per-session environment overrides or provider-native options
without mutating shared process state. It also does not expose MCP approval enforcement. The plugin
leaves those values unchanged and emits a visible startup diagnostic when `env`, `providerOptions`,
or `toolPolicy` is supplied.

Startup diagnostics also cover failed Pi extensions, skills, prompts, themes, MCP tool discovery,
unavailable requested models, and model fallbacks.

##### Preset behavior

Preset modes apply their model and thinking level when selected on an existing live session. In a
new-agent draft composer, Paseo `v0.8.0` provider modes cannot declare model or thinking defaults,
so selecting a preset updates the mode pill but leaves the draft's model and thinking pills unchanged.
The preset is still applied when the session is created. Updating the draft pills immediately will
require a future Paseo host/API change. When no presets are configured, the provider publishes no
modes and Paseo hides the mode pill.

##### Installation

Install from a checkout of this repository:

```bash
cd /absolute/path/to/pi-plugin-mcowger
npm install
npm run typecheck
paseo plugin install "$PWD"
paseo plugin reload pi-plugin-mcowger
```

`npm install` patches broken declaration probes in third-party dependencies and builds the vendored
pi/MCP SDK bundle required by Paseo's plugin compiler. See
[`docs/packaging.md`](./docs/packaging.md) for the details.

##### Pi configuration

The plugin uses pi's normal configuration directory, including:

- `~/.pi/agent/settings.json`
- `~/.pi/agent/auth.json`
- `~/.pi/agent/extensions/`
- `~/.pi/agent/packages`

Presets are managed by Paseo in the plugin's host-scoped settings document. The plugin no longer
reads pi `presets.json` files. Project-local `.pi` settings and resources are loaded for the active
workspace.

##### Development

```bash
npm run build:vendor
npm run lint
npm run typecheck
npm test
npx vitest run --config vitest.smoke.config.ts
```

Set `PI_SMOKE_MODEL` to override the smoke-test model. The default is
`plexus/gemini-3.5-flash-lite`.
