# Pie v0.6.0 — Provider config center + Gemini/DeepSeek + skill scope unblock

**Release date:** 2026-05-07
**Manifest:** `0.6.0`
**Artifact:** `pie-0.6.0.zip` (204 KB)
**SHA-256:** `afe4973b73553ef0eca2dde6ac9584dfe0b63f3757f29b3328a36d94993a01ae`

This release ships three large pieces: a **multi-instance provider config center** (one provider, multiple keys/nicknames, per-session pinning), two **new providers** (Gemini native + DeepSeek), and a **skill scope unblock** that retires three old guard rails (R2 / R3 / R10) in favour of a single global **skip-permissions** toggle. A handful of per-tool fixes and UX polish ride along.

---

## ✨ Highlights

### Provider config center (multi-instance)

- **Multiple instances per provider.** Settings is now an instance list — create N OpenAI / Anthropic / OpenRouter / etc. instances each with its own nickname, API key, and active model (e.g. `OpenAI: Work` + `OpenAI: Personal`). The global `active_instance_id` powers Chat by default; per-session `instanceId` lets you run a Claude session next to a Gemini session without switching globals. Storage moved to `instance_${uuid}` + `instances_index` + `active_instance_id`; old `provider_*` rows are silently migrated and deleted on first run after upgrade.
- **InstanceSelector chip in the composer.** A pill on the chat composer shows the current instance and lets you switch between configs at the start of a turn. Once a task is running, the chip locks to whatever the SW snapshot took at task-start — switching globals mid-task no longer affects the in-flight loop.
- **Per-model capability registry.** `vision`, `tools`, and `maxContextTokens` are now per-model fields in `ModelMeta`, not per-provider booleans. The attach-image button shows up only on vision-capable models; the Settings list and ModelDropdown surface capability tags from the same source.
- **`baseUrl` is now an internal default.** `defaultBaseUrl` in the registry is the single source of truth — Settings / wizards no longer expose a manual `baseUrl` field, and any user-supplied value from v0.5.x is silently dropped during V1→V2 migration.
- **Provider modules de-duplicated.** Five OpenAI-compat providers (OpenAI, OpenRouter, MiniMax, ZhiPu, Bailian, DeepSeek) share `_shared/openai-compat-core.ts` with provider-specific wrappers (OpenRouter sets its own `HTTP-Referer` / `X-OpenRouter-Title` headers via hooks). New providers = registry entry + thin wrapper file + manifest host_permission; the dispatcher table is id-keyed and doesn't need editing.
- **OpenRouter `/v1/models` is fetched lazily.** First time you open the model dropdown for an OpenRouter instance, it fetches the public `/v1/models` endpoint (~200 ms) and caches into `customModels`. Click the ↻ refresh button to re-fetch. No API key required for the listing.
- **Per-provider sticky custom-model pool.** `pcm_${provider}` keeps the set of custom model IDs you've used across all instances of that provider; new instances seed from this pool so you don't have to re-type model IDs you already use elsewhere.

### New providers

- **Gemini (native).** First-party module wired against `https://generativelanguage.googleapis.com/v1beta/models/{model}:streamGenerateContent?alt=sse`. Supports tool use via `function_declarations`, image input via `inline_data`, and proper SSE streaming. Pick `gemini-2.0-flash` / `gemini-1.5-pro` etc. from the model dropdown.
- **DeepSeek (OpenAI-compat).** Thin wrapper on top of `_shared/openai-compat-core.ts` against `https://api.deepseek.com/v1`. Pick `deepseek-chat` / `deepseek-reasoner` from the model dropdown.

### Skill scope unblock (closes #26)

- **R2 / R3 / R10 retired.** The `allowedTools` whitelist (R2), the skill→skill ban (R3), and the first-run capability-confirm card (R10) are gone. Skills now run with full agent capability inside the regular risk classifier; pre-call confirms still fire on every high-risk action exactly as before. `skillExecutionScopeStack` is removed from `SessionAgentState`.
- **Global skip-permissions toggle (DANGER zone).** New Settings → DANGER section adds a one-shot confirm modal; once enabled, the SW short-circuits `sendConfirmRequest` and returns `{approved: true}` for every confirm, including high-risk and CDP keyboard ones. The agent step row in chat shows an `auto-approved` audit footer per step so you can still see what ran. **Use only for personal automation on accounts/pages you own.**
- **Risk classifier unchanged.** Skip-permissions only changes whether a confirm card is shown — the risk classifier still runs, the build-time keyboard host_permission gate (G-1) is still enforced, and the K-9 / R7 / cross-session locks are untouched.

## 🐞 Fixes

- **Stop & new session no longer half-deadlocks the panel (closes #24).** The per-port `AbortController` is now rotated on every `chat-start` / `resume-task` instead of being reused as a `const`, so a previous Stop press doesn't permanently kill subsequent tasks. `createAndActivate` reads `streamingRef.current` instead of stale closure `streaming`, so the "stop the current task before starting a new session" guard always fires.
- **Snapshot reads stable DOM after click / keyboard (closes #27).** Click / press_key / dispatch_keyboard_input now `withActionSettle`-wrap: a SW-side `chrome.webNavigation` listener (cross-doc + `pushState`) plus a page-side `MutationObserver` drive a 500 ms quiet-window wait (3000 ms cap). Cross-doc tear-down survives the script-context kill (helper treats it as a signal and re-installs on the new doc). Eliminates the "agent re-clicks Submit because next iteration saw the outgoing page" loops on Turbo / React Router / async-DOM apps.
- **Assistant message fills sidepanel width (closes #25).** Removed the 320 px `max-width` on the assistant `MessageBubble`, so long markdown / code blocks fill the full chat column on wide displays. User bubble and step rows untouched.
- **Wizard flow polish.** Wizard footer order is `[← provider] · [取消] · [Test] · [Create]`. Cancel/back are bordered buttons (not plain text). InstanceForm preserves `apiKey` on edit; InstanceSelector chip falls back to global active when a brand-new session has no `instanceId`.
- **ModelDropdown.** 280 px scroll cap + search filter. InstancesList replaced its nested-button structure with `div role="button"` + keyboard handlers (a11y).
- **Gemini `functionResponse.name` resolution.** Resolved against the matching prior `tool_use` block (not `toolUseId`) so multi-tool turns serialize correctly.

## ⚠️ Permissions

Two new `host_permissions` for the new providers:

- `https://generativelanguage.googleapis.com/*` — Gemini
- `https://api.deepseek.com/*` — DeepSeek

No new `permissions` (capability) entries. On reload, Chrome will prompt for the new host permissions.

## ⚠️ Known limitations

- **Skip-permissions is global, not per-skill.** The original v0.5.3 R10 first-run card was per-skill capability review; this release replaces it with a global all-or-nothing toggle. Per-skill scoping (e.g. "always confirm when this skill calls keyboard tools") is on the v0.6.x backlog.
- **Vision matrix only partly broadened.** Anthropic / OpenAI / OpenRouter / Gemini support image input today; ZhiPu / Bailian / MiniMax / DeepSeek remain text-only — capability is per-model, so a future model that flips `vision: true` in the registry will Just Work.
- **Migration is one-way.** Once V1→V2 migration runs (`schema_version=2` sentinel), downgrading to v0.5.x will not see the migrated instances. Re-add provider keys if you downgrade.

## Provider matrix

| Provider | Tools | Vision |
|---|---|---|
| Anthropic Claude | ✅ | ✅ |
| OpenAI | ✅ | ✅ |
| OpenRouter | ✅ | ✅ (per-model) |
| Gemini | ✅ | ✅ (per-model) |
| DeepSeek | ✅ | (per-model — text models today) |
| MiniMax | ✅ | (per-model — pending) |
| ZhiPu (智谱) | ✅ | (per-model — pending) |
| Bailian (百炼) | ✅ | (per-model — pending) |

## 📦 Install

### Option A — GitHub Release zip (this release)

1. Download `pie-0.6.0.zip` from the **Assets** section of this release.
2. (Optional) Verify the SHA-256:
   ```bash
   shasum -a 256 pie-0.6.0.zip
   # expected: afe4973b73553ef0eca2dde6ac9584dfe0b63f3757f29b3328a36d94993a01ae
   ```
3. Unzip to a directory you'll keep around (Chrome reads from this directory at runtime — don't delete it after install).
4. Open `chrome://extensions`, enable **Developer mode** (top right).
5. Click **Load unpacked** and select the unzipped directory.
6. Pin Pie to the toolbar; click the icon to open the side panel.
7. **Settings → "+ 新建配置"** → pick provider → paste API key → choose a model → Create. Switch to Chat and send a message.
8. On reload Chrome will prompt for the new `https://generativelanguage.googleapis.com/*` and `https://api.deepseek.com/*` host permissions — required for the new providers.

### Option B — Build from source

```bash
git clone https://github.com/WiseriaAI/Pie.git
cd Pie && pnpm install && pnpm build
```

Then load `dist/` as an unpacked extension.

## Upgrading from v0.5.3

- Manifest bumped `0.5.3 → 0.6.0` and gains two host permissions. **Reload the unpacked extension** (`chrome://extensions → reload`) to pick up.
- **Storage migration is silent and automatic.** On first SW boot, V1→V2 migration converts each existing `provider_*` row into an `instance_${uuid}` + appends to `instances_index`; the previously active provider becomes `active_instance_id`. Existing chat sessions lazy-backfill `instanceId` via `migration_v2_mapping`. A `schema_version=2` sentinel prevents re-runs.
- **Any user-supplied `baseUrl` from v0.5.x is dropped** during migration in favour of `defaultBaseUrl`. If you were proxying a provider through a custom endpoint, you'll need to re-set it via the wizard's custom-model flow.
- **Skills that relied on R10's first-run card** still work — they just no longer show the capability-review card. Per-call high-risk confirms still fire as before. Toggle on **Settings → DANGER → Skip permission prompts** if you want to bypass those too (one-shot confirmation modal first).

## 🔗 Links

- **Roadmap:** [`docs/ROADMAP.md`](../ROADMAP.md)
- **Provider config center spec:** [`docs/specs/2026-05-06-provider-config-center-design.md`](../superpowers/specs/2026-05-06-provider-config-center-design.md)
- **Provider config center plan:** [`docs/plans/2026-05-06-provider-config-center.md`](../superpowers/plans/2026-05-06-provider-config-center.md)
- **Skill scope + skip-permissions plan:** [`docs/plans/2026-05-06-001-feat-skill-scope-and-skip-permissions-plan.md`](../plans/2026-05-06-001-feat-skill-scope-and-skip-permissions-plan.md)
- **Skill scope + skip-permissions invariant trace:** [`docs/solutions/2026-05-06-skill-scope-and-skip-permissions.md`](../solutions/2026-05-06-skill-scope-and-skip-permissions.md)
- **Previous release:** [v0.5.3](./v0.5.3.md)
