# v1.0.0 — long-horizon tasks, a new storage foundation, and a redesigned side panel

Pie reaches **1.0**. What started as a BYOK browser agent is now built to carry real, multi-step work from start to finish: it keeps a working memory across long tasks, reads big pages without drowning in tokens, hands you files you choose where to save, and rests on a rebuilt storage layer with no practical size ceiling. The settings side panel has been redesigned, page coverage is broader, and providers gained pay-as-you-go / plan endpoint switching.

This release folds in everything since v0.19.5 — 200+ commits across new capabilities, a storage migration, and a UI refresh.

## Built for long-horizon tasks

Three capabilities now work together so the agent can run long extraction and research tasks without losing the thread:

- **Scratchpad — external working memory.** A per-session scratchpad (backed by IndexedDB) lets the agent save structured records and notes as it goes, then read them back later. Five tools — `save_records`, `update_notes`, `read_records`, `clear_scratchpad`, and `query_scratchpad` (SQL over what it collected) — mean a 200-row extraction no longer falls apart when the context window slides. A compact overview rides along on every turn and is never trimmed.
- **Progressive page reading (page atlas).** `read_page` now defaults to an **atlas** mode that gives the agent a structured map of the page first, so it can target the part it needs instead of dumping the whole DOM. Target-gated tools let it drill in by region. The old `search_page` is retired in favor of this flow.
- **File output you control.** The silent `save_to_downloads` is replaced by `output_file`: generated files (CSV, JSON, Markdown, text, anything) appear as a **download card** in the chat — filename · type · size at a glance — and clicking **Download** opens a Save As dialog so nothing lands in your Downloads folder without you deciding where.

## A new storage foundation

All extension state moved from `chrome.storage.local` to a **single IndexedDB database** (`pie`, four object stores). This removes the old ~10 MB ceiling that constrained long sessions and large skills, keeps cross-store writes atomic via `txMulti`, and replaces `chrome.storage.onChanged` with a `BroadcastChannel`-based store bus for cross-context updates. A three-phase startup migration moves existing users over silently and idempotently; encryption keys and instance API keys carry over with a legacy fallback so historical data still decrypts. LRU auto-archiving is gone — the storage indicator now just reports real usage.

## Broader page coverage

- **Rich-text editors:** TinyMCE is now recognized as an editor host and written through its own adapter, with engine-aware tolerant verification (joining existing Monaco / CodeMirror support).
- **Sub-frame clicks:** clicks inside child iframes are dispatched via in-frame synthetic events, fixing a regression where cross-frame targets failed to register.
- **Hidden form controls:** controls hidden behind a visible label are now rescued and made actionable, with the rescued entry reflecting the real control.
- **Container labels:** atlas container targets resolve to semantic titles instead of a content digest, so the agent names what it's acting on correctly.
- **Sharper tool descriptions:** tools now carry explicit USE WHEN / DO NOT USE WHEN guidance, and `read_local_file` surfaces a file-access card when permission is missing.

## Providers & models

- **Pay-as-you-go / Plan endpoints.** Providers that offer both a metered and a subscription endpoint (Zhipu, Kimi, MiMo, StepFun in this first batch) now expose an **endpoint variant** switch in the instance form — pick the one your key matches, and the base URL follows. Adding a new plan endpoint is now just a registry entry.
- **Smoother provider setup.** The config workflow was reworked: test-connection uses the model from the current form variant, fields have resting borders, and the create/edit flow is clearer.
- **OpenAI model refresh:** the gpt-5.5 / gpt-5.4 series is synced into the model list.

## Redesigned side panel

The settings experience was rebuilt (the "v0.20" redesign): a **4-tab information architecture** with a new **General** tab gathering language, experimental flags, and feedback; a modernized provider dropdown and roomier config forms; hairline-bordered panels; and transition animations for expand / tab / menu switches. The skills panel was simplified with a banner explaining how to create skills via the agent. Long-output chat rendering, the pin-tab dropdown, and the thinking section all got animation and layout fixes.

## Reliability

- **No more silent truncation on long thinking.** Output token limits are now resolved per model (`maxOutputTokens`) instead of a hardcoded 4096, and a completion classifier surfaces a `max_tokens` truncation instead of mistaking it for task-done.
- **Abort keeps your history.** Stopping a task now preserves the full conversation so you can pick up exactly where you left off, instead of collapsing it into a summary.
- **Cross-session safety:** the cross-session tab lock is scoped to running sessions and follow-up quotes route to the current session.

## 中文摘要

Pie 迈入 **1.0**。从一个 BYOK 浏览器 agent 起步,它现在已具备承载真实多步任务的能力:长任务中维持工作记忆、不被 token 淹没地读大页面、产出文件由你决定保存位置,并构建在一套无实际容量上限的全新存储层之上。设置侧栏经过重做,页面操作覆盖更广,provider 新增按量/Plan 端点切换。本版本合并了 v0.19.5 以来的全部改动——200+ commit。

- **为长程任务而建**:① **草稿本**(per-session IndexedDB 外部记忆)——`save_records`/`update_notes`/`read_records`/`clear_scratchpad`/`query_scratchpad`(对已收集数据跑 SQL)五个工具,让 200 行抽取不再因上下文窗口滑动而崩;概览搭车每轮注入且永不被裁。② **渐进式读页(page atlas)**——`read_page` 默认进 atlas 模式,先给 agent 一张结构化地图,按需 drill-in,旧的 `search_page` 退役。③ **可控的文件产出**——`save_to_downloads`(静默写入)替换为 `output_file`:生成文件以**下载卡片**出现在聊天里,点 Download 弹另存为对话框,由你决定位置。
- **全新存储地基**:扩展状态从 `chrome.storage.local` 全量迁到**单个 IndexedDB 库**(`pie`,4 个 store),解除约 10 MB 上限;`txMulti` 保跨 store 原子写,`BroadcastChannel` store-bus 取代 `onChanged`;三阶段启动迁移静默且幂等地搬运老用户数据,加密 key 走 legacy fallback 保证历史数据仍可解密;移除 LRU 自动归档,存储指示器只报真实用量。
- **页面覆盖更广**:TinyMCE 编辑器识别 + 适配器写入(加入已有的 Monaco/CodeMirror);子 iframe 内点击经合成事件派发修复回归;隐藏在可见 label 后的表单控件被救回并可操作;atlas 容器目标取语义标题而非内容摘要;工具描述补 USE WHEN / DO NOT USE WHEN,`read_local_file` 缺权限时弹文件访问卡。
- **Provider 与模型**:按量/Plan **端点变体**切换(首批 Zhipu/Kimi/MiMo/StepFun)——instance 表单选端点、base URL 跟随;provider 配置流程重做(test-connection 跟随表单变体);同步 OpenAI gpt-5.5/gpt-5.4 系列。
- **侧栏重做**(v0.20):设置页 **4-tab** 信息架构 + 新增 **General** tab(收语言/实验/反馈);现代化 provider 下拉 + 更宽松表单 + 发丝边框 + 切换动效;skills 面板简化并加说明 banner;长输出渲染、pin-tab 下拉、thinking 区均修了动效与布局。
- **可靠性**:长思考不再静默截断(per-model `maxOutputTokens` + 截断分类器);abort 保留完整历史可无缝续接;跨 session tab 锁限定在运行中的 session,追问引用路由到当前 session。
