Strata/strata-daemon/Cargo.toml
Eduard Tolosa e7b0392d92 fix: daemon image decoding, preview alignment, ordering and lifecycle
Audit fixes for the daemon:

- Decode gif/webp/bmp/tiff/ico (enable the pure-Rust image features). These
  mimes were accepted by pick_mime but the image crate only had png/jpeg, so
  thumbnail decode failed and the item was silently dropped. Drop avif (needs
  heavy C deps) and svg (not a raster format the image crate decodes) from the
  allowlist so unsupported types are never selected.
- ItemAdded signal preview now uses db::PREVIEW_CHARS (200), matching the
  history/search queries, so a just-copied row and the same row after a reload
  carry identical text.
- Add a deterministic ", rowid DESC" tiebreaker to the three created_at DESC
  orderings (history, search, prune) so items sharing a millisecond have a
  stable order and prune can't evict the wrong one at the boundary.
- SetConfig now prunes immediately (and emits ItemDeleted) when max_history is
  lowered, instead of waiting for the next copy.
- Request the bus name with AllowReplacement (plus ReplaceExisting) so a
  reload's new instance can cleanly take the name; fix the misleading comment.
- Wayland monitor clears its pending-offers map on Selection{None} so it can't
  grow across copy-then-clear cycles (wlroots path).
- Document that SubmitItem is a trusted-caller method (the password-manager
  hint is enforced client-side; forwarding it is a future contract change).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-26 17:29:29 -05:00

53 lines
1.5 KiB
TOML

[package]
name = "strata-daemon"
version = "0.5.0"
edition = "2021"
description = "Strata clipboard manager backend daemon"
[[bin]]
name = "strata-daemon"
path = "src/main.rs"
[dependencies]
# Async runtime
tokio = { version = "1", features = ["full"] }
# D-Bus (async, tokio-native)
zbus = { version = "4", features = ["tokio"] }
# Wayland clipboard monitoring (custom event loop)
wayland-client = "0.31"
wayland-protocols = { version = "0.32", features = ["client", "staging"] }
wayland-protocols-wlr = { version = "0.3", features = ["client"] }
# Clipboard read / write (paste::get_contents + copy::copy_multi)
# Supports ext-data-control-v1 (GNOME 47+) and zwlr-data-control-v1 fallback
wl-clipboard-rs = "0.9"
# Storage
rusqlite = { version = "0.31", features = ["bundled"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
uuid = { version = "1", features = ["v4"] }
# Image thumbnail generation (runs in spawn_blocking — never blocks async runtime)
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "gif", "webp", "bmp", "tiff", "ico"] }
# Fast content hashing for deduplication
blake3 = "1"
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
# XDG paths
dirs = "5"
# Error handling
anyhow = "1"
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true