# Pie v0.5.3 — Record & Replay v1

**Release date:** 2026-05-05
**Manifest:** `0.5.3`
**Artifact:** `pie-0.5.3.zip` (199 KB)
**SHA-256:** `cd581df8092c6a0a61230d521255d80c409de5692bbc5815317b91f50b5391a5`

This release ships **Record & Replay v1**: record any single-tab workflow in the side panel, attach a free-form prompt, and let the LLM turn the trace into a reusable skill — all behind the existing first-run confirm card so you review the generated capability before it lands. Two more built-in skills round out the SkillsList, and a couple of UX polish fixes ride along.

---

## ✨ Highlights

- **Record & Replay v1.** Click **REC** on the chat composer to capture click / type / select / scroll / submit / navigate steps on the active tab. Hit **Finish** and a `📼 已录制 N 步` chip lands in the composer; add a free-form instruction (`参数化 username/password` / `跳过最后那个验证码` / leave blank) and Send. The LLM receives the full trace + your prompt, calls the new built-in skill `create_skill_from_recording`, and the skill drives the existing `create_skill` meta tool — so the **R10 first-run confirm card** shows you the inferred `promptTemplate` / `allowedTools` / `parameters` before the skill is persisted. Replay it later as `/skillname`.
- **3 new built-in skills.** `create_skill_from_recording` (drives the recording → skill flow), `Take Screenshot` (Phase 5 `capture_visible_tab` + describe), and `Open URL in Tab` (v1.5 `open_url` demo). SkillsList now also explains the concept up top: **the underlying tools (click / type / open_url …) are picked by the LLM automatically — this list shows reusable workflows**.
- **Composer textarea defaults to 3 rows.** More room to draft a multi-line prompt without scrolling.
- **Pending-recording chip dark-mode fix.** Chip respected dark-mode tokens but lost contrast on a couple of the auto-themed surfaces; fallback fix landed in PR #23.

## 🛡️ Safety & privacy

- **Sensitive-field redaction at capture time.** Password / `cc-*` / API token / 验证码 fields are **never** written into `promptTemplate`; values are replaced with placeholders (`{{password}}`, `{{verification_code}}`, …) inside the recorder before serialization. Selectors for sensitive fields also drop `id` / `name` hints (REC-G) so the trace can't leak field-shaped identifiers.
- **In-memory only.** The recording session lives entirely in SW memory — `chrome.storage` is never touched while recording (build-time grep gate enforces this, REC-D). SW restart, panel disconnect, session switch, or tab close all auto-abort the recording with no residual state (REC-I).
- **Multi-session sandbox respected.** `sender.tab.id` decides recording ownership; a panel that fakes a `sessionId` cannot bind into another session's recorder (REC-F).
- **R10 first-run confirm is the capability review surface.** No new approval surface added — the recording flow rides the existing Phase 2.6 R10 card, which already renders the full inferred `SkillDefinition` for review. The generated skill is `author='agent'` and requires per-call confirm on first invocation.
- **Hard nav re-injects the listener.** `chrome.webNavigation.onCommitted` is used to re-inject the capture script after a same-tab top-frame navigation, so a recorded `click → navigate → type` sequence stays continuous (REC-H).
- **Agent task gate.** A session that's currently streaming an agent task can't start a new recording (panel-side button disabled + SW-side `inFlightSessionIds` check, REC-L).
- **Trace size cap.** `promptTemplate` ≤ 8 KB (reuse of Phase 2.6 P0-D). Overly long recordings are rejected with "Discard and re-record a shorter flow"; the 8 KB cap is checked both during serialization and at SW orchestrator level (REC-B).

## ⚠️ Permissions

- **`chrome.webNavigation` added** to `manifest.json`. Required for the same-tab hard-nav re-inject path (REC-H). If you upgrade an unpacked install, Chrome will prompt for the new permission on next reload.

## ⚠️ Known limitations / v1.1+ backlog

- **Single-tab only.** Tabs opened during recording (manually or via the agent's `open_url`) aren't captured. Multi-tab recording is deferred to v1.1.
- **No data loops.** v1 records a fixed step sequence; it does not generalize "do this for each row" patterns.
- **SPA route detection relies on `history.pushState` / `replaceState`.** Custom routers that bypass both APIs won't trigger a navigate step — workaround is to demo a click that fires a real navigation.
- **Trace ≤ 8 KB** (the same cap as `promptTemplate`). Long recordings will be rejected with a "discard and re-record" message.

## Provider matrix (unchanged)

| Provider | Tools | Vision |
|---|---|---|
| Anthropic Claude | ✅ | ✅ |
| OpenAI | ✅ | ✅ |
| OpenRouter | ✅ | ✅ |
| MiniMax | ✅ | (per-model — pending §7) |
| ZhiPu (智谱) | ✅ | (per-model — pending §7) |
| Bailian (百炼) | ✅ | (per-model — pending §7) |

## 📦 Install

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

1. Download `pie-0.5.3.zip` from the **Assets** section of this release.
2. (Optional) Verify the SHA-256:
   ```bash
   shasum -a 256 pie-0.5.3.zip
   # expected: cd581df8092c6a0a61230d521255d80c409de5692bbc5815317b91f50b5391a5
   ```
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 → Providers** → paste your API key, pick a model, switch to Chat, send a message.
8. On reload Chrome will prompt for the new `webNavigation` permission — required for the recording feature.

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

- Manifest bumped `0.5.2 → 0.5.3` and gains `webNavigation`. **Reload the unpacked extension** (`chrome://extensions → reload`) to pick up the new permission.
- No storage schema change; existing sessions / skills carry over.
- The 3 new built-in skills auto-appear in SkillsList on next side-panel mount.

## 🔗 Links

- **Roadmap:** [`docs/ROADMAP.md`](../ROADMAP.md) (§5 #4 marked SHIPPED)
- **Plan:** [`docs/plans/2026-05-05-record-and-replay.md`](../superpowers/plans/2026-05-05-record-and-replay.md)
- **Design spec:** [`docs/specs/2026-05-04-record-and-replay-design.md`](../superpowers/specs/2026-05-04-record-and-replay-design.md)
- **Invariant trace:** [`docs/solutions/2026-05-05-record-and-replay-v1-invariant-trace.md`](../solutions/2026-05-05-record-and-replay-v1-invariant-trace.md)
- **Previous release:** [v0.5.2](./v0.5.2.md)
