# Pie v0.6.1

**Release date:** 2026-05-07
**Manifest:** `0.6.1`
**Artifact:** `pie-0.6.1.zip` (205 KB)
**SHA-256:** `b4a7962202c2ded662e6840204916168033c6fd2d78ddf879fffb3e06c0b95ed`

A small follow-up to v0.6.0 focused on agent loop ergonomics. Two fixes: the **origin-lock hard abort** is now a confirm card you can approve or reject (no more "start a new task to escape" loops on legitimate cross-origin clicks), and **`pinnedTabs` is refreshed every iteration** so `focus_tab` can see tabs that `open_url` just appended (closes #33). No new permissions, no new providers, no storage migration.

---

## ✨ Highlights

### Origin-lock is now a confirm, not a hard abort

- **Before.** Any cross-origin navigation on a pinned tab (e.g. clicking `example.com`'s "Learn more" anchor that goes to `iana.org`) tripped the loop's per-iteration origin lock and aborted with "Page origin changed, agent stopped for safety". Correct as a prompt-injection defence — but unhelpful when the navigation was the user's own intent. The only escape was to start a new task.
- **Now.** The origin-lock failure goes through a dedicated **AgentConfirmCard** showing the from/to origin + new URL/title. On approve, the new origin is persisted to `SessionMeta.pinnedTabs` so subsequent same-tab iterations don't re-prompt. On reject, the original "stopped for safety" abort fires.
- **Skip-permissions auto-approves.** The global `Settings → DANGER → Skip permission prompts` toggle short-circuits the confirm on the SW side (same path as tool confirms) — origin-change confirms get `{approved: true}` without showing a card. The agent step row still surfaces an `auto-approved` audit footer.
- **Restricted URLs still hard-abort.** `chrome://`, `file://`, `view-source://`, and other restricted schemes remain hard aborts with no confirm path.
- **Wire-level shape.** `AgentConfirmRequestMessage` gains an optional `originChangePreview` field; the loop sends a confirm with `tool: ORIGIN_CHANGE_TOOL_SENTINEL` (`"__origin_change__"`) so the SW persists under `PendingConfirmRecord.kind="agent-origin-change"` (separate from `"agent-tool"`) and the panel routes to a dedicated origin-change layout (no resolvedElement / args block).

## 🐞 Fixes

- **`focus_tab` now sees pins added mid-task by `open_url` (closes #33).** `ctx.pinnedTabs` was frozen in the loop closure at task-start, so pins appended mid-task by `open_url` (which writes to `SessionMeta.pinnedTabs`) were invisible to `focus_tab` and other handlers — the LLM's "next iteration" `focus_tab(newPinId)` call always rejected with `"tab N not in pinnedTabs (current: [oldPin])"` even though the pin was correctly persisted. `readFocusFromStorage` now returns `{ focused, pinnedTabs }` and the refreshed array is rebroadcast through a per-iteration `currentPinnedTabs` into `riskCtx` and handler `ctx`.
- **Risk classifier no longer false-positives newly-opened tabs.** Side effect of the `pinnedTabs` refresh: a DOM action on a tab that `open_url` just opened is no longer flagged cross-origin because the frozen array didn't list it.

## ⚠️ Permissions

No changes. `manifest.json` `permissions` and `host_permissions` are identical to v0.6.0. Reload the unpacked extension to pick up the new bundle, but Chrome won't prompt for any new capabilities.

## 📦 Install

### Option A — GitHub Release zip

1. Download `pie-0.6.1.zip` from the **Assets** section of this release.
2. (Optional) Verify the SHA-256:
   ```bash
   shasum -a 256 pie-0.6.1.zip
   # expected: b4a7962202c2ded662e6840204916168033c6fd2d78ddf879fffb3e06c0b95ed
   ```
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.

### 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.6.0

- Manifest bumped `0.6.0 → 0.6.1`. **Reload the unpacked extension** (`chrome://extensions → reload`) to pick up the new bundle.
- No storage migration. Existing instances, sessions, skills, and `skip-permissions` toggle are untouched.
- If you previously hit the "Page origin changed, agent stopped for safety" abort on a tab where the navigation was actually intentional, you'll now get a confirm card instead — pick approve to continue, reject to abort.

## 🔗 Links

- **Roadmap:** [`docs/ROADMAP.md`](../ROADMAP.md)
- **Previous release:** [v0.6.0](./v0.6.0.md)
- **Issues closed:** [#33](https://github.com/WiseriaAI/Pie/issues/33)
