# v0.3.2 Release Notes

> v0.3.1 -> v0.3.2

## Summary

Narrows the library to one-shot browser content extraction with optional markup formats. Drops the interactive tab surface and renames the package. Fetch also attempts cookie-consent dismissal.

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

將函式庫收斂為單次瀏覽器內容萃取，可選標記格式輸出。移除互動式分頁介面並更名套件。擷取時也會嘗試關閉 cookie 同意橫幅。

</details>

## ⚠️ Breaking Changes

### Package renamed: `goBrowser` → `browser`

**Before:**
```go
import goBrowser "github.com/pardnchiu/go-browser/core"

goBrowser.Fetch(ctx, href, timeout, opt)
```

**After:**
```go
import "github.com/pardnchiu/go-browser/core"

browser.Fetch(ctx, href, timeout, opt)
```

**Migration:**
```go
// Old
import goBrowser "github.com/pardnchiu/go-browser/core"
result, err := goBrowser.Fetch(ctx, href, timeout, opt)

// New — module path unchanged; only the Go package name changes
import "github.com/pardnchiu/go-browser/core"
result, err := browser.Fetch(ctx, href, timeout, opt)
```

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

套件名稱由 `goBrowser` 更名為 `browser`。module path 不變，請更新 import 別名與所有 `goBrowser.` 前綴呼叫。

</details>

### Interactive tab API removed

**Before:**
```go
id, err := goBrowser.CreateTab(ctx, href, opt)
_ = goBrowser.TabClick(id, selector)
_ = goBrowser.TabType(id, selector, text)
_ = goBrowser.TabScroll(id, count)
_ = goBrowser.TabNavigate(id, href)
jsResult, err := goBrowser.TabEval(id, js)
snap, err := goBrowser.TabSnapshot(id)
_ = goBrowser.CloseTab(id)
```

**After:**
These symbols no longer exist. The library only exposes one-shot `Fetch` (plus markdown helpers). Full CDP / interactive control belongs outside this package (for example Playwright MCP).

**Migration:**
```go
// Old — multi-step tab session
id, _ := goBrowser.CreateTab(ctx, href, opt)
_ = goBrowser.TabClick(id, "#btn")
snap, _ := goBrowser.TabSnapshot(id)
_ = goBrowser.CloseTab(id)

// New — one-shot extraction only
result, err := browser.Fetch(ctx, href, timeout, &browser.Option{
    // Headless, SameSession, Profile, ...
})
// Use result.Content / result.Markdown / result.Tree
// For click/type/eval workflows, switch to a full CDP client (e.g. Playwright MCP)
```

Removed exports: `CreateTab`, `CloseTab`, `TabSnapshot`, `TabClick`, `TabType`, `TabScroll`, `TabNavigate`, `TabEval`, plus the shared interactive browser session cleaned up inside `Close()`.

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

互動式分頁 API 與共用瀏覽器工作階段已移除。此套件僅保留單次 `Fetch` 內容萃取；需要完整 CDP／點擊輸入等互動請改用外部工具（例如 Playwright MCP）。

</details>

## Changes

### FEAT
- Attempt cookie consent banner dismissal during page fetch; expose outcome on `Result.Consent` (@pardnchiu) [a17d868]

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

- 擷取頁面時自動嘗試關閉 cookie 同意橫幅，並於 `Result.Consent` 回報結果

</details>

### FIX
- Isolate browsers by headless mode and User-Agent; fall back to headed only when the response is blocked (@pardnchiu) [47c9003]

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

- 依 headless 與 User-Agent 隔離瀏覽器實例，並僅在被擋時才改用 headed

</details>

### BREAKING
- Remove interactive tab API and shared browser session (@pardnchiu) [de505f2]
- Rename package `goBrowser` to `browser` (@pardnchiu) [35d3342]

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

- 移除互動式分頁 API 與共用瀏覽器工作階段
- 將套件名稱由 `goBrowser` 更名為 `browser`

</details>

### DOC
- Rewrite docs for Chrome content extraction focus and the package rename (@pardnchiu) [cd316a8]

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

- 重寫文件以對齊 Chrome 內容萃取主軸與套件更名

</details>

### REMOVE
- Drop `core/fetch_test.go` with the interactive tab coverage (@pardnchiu) [de505f2]

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

- 隨互動分頁移除一併刪除 `core/fetch_test.go`

</details>

## Scope

- `core/browser.go` — REMOVE, BREAKING
- `core/fetch.go` — FEAT, FIX, BREAKING
- `core/embed/consent.js` — FEAT
- `core/launcher.go` — FIX, BREAKING
- `core/cookie.go`, `core/cookieOther.go`, `core/markdown.go` — BREAKING
- `core/fetch_test.go` — REMOVE
- `README.md`, `doc/` — DOC

***

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