[package]
name = "plumb-cdp"
description = "Chromium DevTools Protocol driver for Plumb — renders pages to PlumbSnapshot."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
homepage.workspace = true
documentation.workspace = true
repository.workspace = true
readme = "README.md"
keywords.workspace = true
categories.workspace = true
exclude = ["AGENTS.md", "CLAUDE.md"]

[features]
default = []
# Opt-in flag for end-to-end tests that need a real Chromium binary in
# the supported major-version range on the host. Off in `just validate`
# / CI; flip on for local smoke runs.
e2e-chromium = []

[dependencies]
# `test-fake` is enabled unconditionally because `FakeDriver::snapshot`
# (the in-tree `plumb-fake://` CLI scheme) calls `PlumbSnapshot::canned`,
# which is gated behind that feature in plumb-core. The feature name is
# legacy — it's a runtime fixture, not a test-only path.
plumb-core = { workspace = true, features = ["test-fake"] }
# `fetcher` + `rustls` + `zip8` enables
# `chromiumoxide::fetcher::BrowserFetcher` (Chrome-for-Testing download)
# used by the auto-fetch path (issue #78). The rustls transport matches
# the workspace `reqwest` policy. The `zip8` feature selects `zip` 0.8
# as the unpacker; chromiumoxide 0.9 requires either `zip0` or `zip8`
# at the workspace level (they're mutually exclusive on the consumer
# side; `zip8` matches the upstream default).
chromiumoxide = { workspace = true, features = ["fetcher", "rustls", "zip8"] }
futures-util = { workspace = true }
tokio = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
indexmap = { workspace = true }
# Cookie / header / storage-state plumbing (PRD §15) — `Headers` in
# chromiumoxide is a `serde_json::Value` wrapper; storage-state.json
# parsing uses serde with `deny_unknown_fields`.
serde = { workspace = true }
serde_json = { workspace = true }
# WHATWG URL parsing — `Url::origin().ascii_serialization()` handles
# default-port elision, IDNA host normalization, scheme case-folding,
# and stripping of userinfo / path / query / fragment so the
# storage-state origin compare matches Playwright's stored format.
url = { workspace = true }
# SHA-256 verification of auto-fetched Chromium binaries (issue #78).
sha2 = { workspace = true }

[dev-dependencies]
plumb-core = { workspace = true, features = ["test-fake"] }
tokio = { workspace = true, features = ["test-util"] }
serde_json = { workspace = true }
tempfile = { workspace = true }
tracing-subscriber = { workspace = true }
criterion = { workspace = true }

[[bench]]
name = "cdp_benchmarks"
harness = false

[lints]
workspace = true
