# v0.10.0 Release Notes

> Generated: 2026-01-20 09:15 (+00:00)
> v0.9.0 → v0.10.0

## Recommended Commit Message

feat: add pod operation recording with new records API endpoint
<details>
<summary>翻譯</summary>
feat: 新增 Pod 操作紀錄功能與 records API 端點
</details>

***

## Summary

Add operation recording system to track pod lifecycle events (up, down, clear, sync, overwrite). Introduces `Record` model, database insert method, and REST endpoint for audit trail.
<details>
<summary>翻譯</summary>
新增操作紀錄系統以追蹤 Pod 生命週期事件（up、down、clear、sync、overwrite）。引入 `Record` 模型、資料庫新增方法與 REST 端點用於稽核軌跡。
</details>

## Changes

### FEAT
- Add `Record` model with `UID`, `Content`, `Hostname`, `IP` fields
- Add `recordPod()` function to log pod operations via API
- Add `InsertRecord()` method in SQLite database layer
- Add `/pod/record/insert` POST endpoint for record creation
- Add `hostname` and `ip` columns to `records` table schema

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

- 新增 `Record` 模型含 `UID`、`Content`、`Hostname`、`IP` 欄位
- 新增 `recordPod()` 函式透過 API 記錄 Pod 操作
- 新增 SQLite 資料庫層的 `InsertRecord()` 方法
- 新增 `/pod/record/insert` POST 端點用於建立紀錄
- 新增 `hostname` 與 `ip` 欄位至 `records` 資料表結構

</details>

### UPDATE
- Modify `RsyncToRemote()` to skip dry-run preview when remote directory is empty
- Modify rsync exclude list to remove `docker-compose.yml`, `docker-compose.yaml` from sync phase
- Add trusted proxy configuration (`127.0.0.1`, local IP) to Gin router

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

- 修改 `RsyncToRemote()` 當遠端目錄為空時跳過 dry-run 預覽
- 修改 rsync 排除清單，同步階段移除 `docker-compose.yml`、`docker-compose.yaml`
- 新增信任代理配置（`127.0.0.1`、本機 IP）至 Gin 路由器

</details>

### REFACTOR
- Extract `upsertPod()` helper function from inline HTTP POST logic
- Rename `ListContainers()` to `ListPods()` for consistency
- Move `Record` struct from `database/sqlite.go` to `model/pod.go`

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

- 從內嵌 HTTP POST 邏輯中提取 `upsertPod()` 輔助函式
- 將 `ListContainers()` 重新命名為 `ListPods()` 以保持一致性
- 將 `Record` 結構從 `database/sqlite.go` 移至 `model/pod.go`

</details>

### FIX
- Remove incorrect `pod_uid = excluded.pod_uid` from UPSERT conflict clause

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

- 移除 UPSERT 衝突子句中錯誤的 `pod_uid = excluded.pod_uid`

</details>

***

## Files Changed

| File | Status | Tag |
|------|--------|-----|
| `internal/command/composeCMD.go` | Modified | FEAT, UPDATE, REFACTOR |
| `internal/database/sqlite.go` | Modified | FEAT, REFACTOR, FIX |
| `internal/model/pod.go` | Modified | FEAT |
| `internal/routes/routes.go` | Modified | FEAT, UPDATE |
| `sql/create.sql` | Modified | FEAT |

***

Generated by [Claude Code](https://gist.github.com/pardnchiu/cc619549138ccc7b57c073c314b7d0d8)
