# v0.33.0 Release Notes

> v0.32.15 -> v0.33.0

## Summary

Moves session usage and task history off per-session files into a shared SQLite store, so analytics and history lookups read one source of truth. Adds a usage dashboard, scheduled-task catch-up, and a cache for repeated tool lookups.

<details>
<summary>翻譯</summary>

將用量與工作歷史從各 session 檔案改存共用資料庫，分析與歷史查詢改讀同一來源。並新增用量儀表板、排程補執行，以及重複工具查詢的快取。

</details>

## ⚠️ Breaking Changes

### Task history and usage logs now live only in SQLite — do not downgrade

On first start, per-session JSON task-history files and `usage.log` files are imported into SQLite and renamed with a `.imported` suffix. Runtime, HTTP APIs, and history tools then read the database only. Usage timestamps are stored as nanoseconds.

Older builds still look for the original JSON / log files. After this import those files are no longer the live source, so **downgrading hides all migrated usage and task history** (the old version will appear empty). There is no automatic reverse migration.

**Migration:**

- Stay on `v0.33.0` or newer. **Do not downgrade.** Rolling back to `v0.32.x` will not show data that now exists only in SQLite.
- After a successful import, treat the database as authoritative. Do not restore `.imported` files as the live source.
- Update history API clients: list/read return SQLite-backed tasks (`task_hash`, RFC3339 `end_at`) instead of per-file JSON paths.
- Treat usage `send_at` as nanoseconds, not second- or millisecond-scale wall-clock values.

<details>
<summary>翻譯</summary>

工作歷史與用量紀錄改為只存在 SQLite。首次啟動會把各 session 的 JSON 工作歷史與 `usage.log` 匯入資料庫，並改名加上 `.imported` 後綴；之後執行期、HTTP API 與歷史工具只讀資料庫。用量時間戳改存奈秒。

舊版仍去讀原本的 JSON／log。匯入完成後那些檔案已不是正式來源，**降回舊版會看不到已遷移的用量與工作歷史**（舊版會像沒有資料）。沒有自動反向遷移。

**遷移方式：**

- 請留在 `v0.33.0` 或更新版本。**不可降版。** 退回 `v0.32.x` 看不到只存在 SQLite 的資料。
- 匯入成功後以資料庫為準，不要把 `.imported` 檔案當正式來源還原。
- 歷史 API 客戶端改讀 SQLite 任務（`task_hash`、RFC3339 `end_at`），不再依 JSON 檔路徑。
- 用量 `send_at` 視為奈秒，不是秒或毫秒級牆鐘時間。

</details>

## Changes

### BREAKING

- Migrate task history to SQLite and update history APIs for nanosecond timestamps (@pardnchiu) [fd46c30]

<details>
<summary>翻譯</summary>

- 將工作歷史遷移至 SQLite，並更新歷史 API 與奈秒時間戳

</details>

### FEAT

- Add HTTP GET tool cache so repeated identical lookups reuse prior results (@pardnchiu) [67937ac]
- Migrate token usage logs to SQLite and add total usage view (@pardnchiu) [2965f94]
- Add usage analytics dashboard and streamline event streaming (@pardnchiu) [46e471b]
- Improve scheduled task handling and consolidate usage settings (@pardnchiu) [f357b4e]

<details>
<summary>翻譯</summary>

- 新增 HTTP GET 工具快取，相同查詢可重用先前結果
- 將 token 用量紀錄遷移至 SQLite，並新增總用量檢視
- 新增用量分析儀表板並簡化事件串流
- 改善排程任務處理並整合用量設定頁面

</details>

### DOC

- Rewrite HTML render gallery guide and align system-prompt wording (@pardnchiu) [67937ac]

<details>
<summary>翻譯</summary>

- 改寫 HTML 產出範例畫廊指引，並對齊系統提示用語

</details>

### CHORE

- Ignore generated HTML artifacts, treat git config as read-only, bump the browser dependency, and raise image-generation timeout (@pardnchiu) [67937ac]

<details>
<summary>翻譯</summary>

- 忽略產出的 HTML 產物、將 git config 列為唯讀指令、升級瀏覽器相依並提高圖片生成逾時

</details>

## Scope

- `internal/runtime/history/` — BREAKING, FEAT
- `internal/session/usage/` — FEAT, UPDATE
- `internal/tools/history/` — BREAKING
- `internal/runtime/routes/` — FEAT, UPDATE
- `internal/runtime/scheduler.go` — FEAT, UPDATE
- `internal/agents/exec/` — FEAT
- `internal/tools/toolcache/` — FEAT
- `internal/tools/external/` — FEAT, UPDATE
- `page/` — FEAT
- `configs/prompts/` — DOC
- `.gitignore`, `configs/jsons/read_only_command.json`, `go.mod` — CHORE

***

Generated by [SKILL](https://github.com/pardnchiu/skill-version-generate)
