framewatch 0.6.0

Event-driven, change-triggered window capture that emits timestamped screenshots + metadata for AI agents.
[package]
name = "framewatch"
version = "0.6.0"
edition = "2021"
# Floor is set by the locked dependency tree (image 0.25 needs 1.88,
# image_hasher 3.1 needs 1.87), not by framewatch's own source. A CI job builds
# on exactly this version so the claim can't drift.
rust-version = "1.88"
license = "MIT OR Apache-2.0"
description = "Event-driven, change-triggered window capture that emits timestamped screenshots + metadata for AI agents."
repository = "https://github.com/dmoore-dwmmholdings/framewatch"
readme = "README.md"
keywords = ["screen-capture", "screenshot", "windows", "agent", "automation"]
categories = ["multimedia", "os::windows-apis", "computer-vision"]
# Ship the machine-readable manifest + sample packages (the agent docs link them)
# but not the large prebuilt binary or the heavy spec / CI config / test fixtures.
exclude = ["tests/fixtures/*.png", "/.github", "framewatch-spec.md", "dist/framewatch.exe"]

[features]
default = ["cli"]
cli = ["dep:clap", "dep:anyhow", "dep:tracing-subscriber"]
gui = ["dep:eframe", "dep:egui", "dep:dirs"]
# `wgc` enables the live Windows Graphics Capture backend + window enumeration.
# It is kept optional (deviating slightly from the spec's always-on windows deps)
# so the cross-platform core builds and tests fast everywhere without pulling the
# heavy `windows`/`windows-capture` tree. On Windows, build/install with
# `--features wgc` (or `cli,wgc`) for live capture.
wgc = ["dep:windows-capture", "dep:windows"]
jpeg = ["image/jpeg"]
webp = ["dep:webp"]
llm = [] # reserved: out-of-band vision-caption sink
# Continuous A/V recording (`framewatch record`): capture a window to video
# (frames piped to an `ffmpeg` subprocess) + the microphone (`cpal` -> WAV via
# `hound`), producing an LLM-ready package. Implies `wgc` (the live capture
# backend); the video path is additionally `#[cfg(windows)]`. Needs `ffmpeg` on
# PATH at runtime. A pinned whisper.cpp runtime + base.en model are provisioned
# into the user cache on first use; `--transcribe-cmd` remains an override.
record = [
  "dep:cpal",
  "dep:hound",
  "dep:ctrlc",
  "dep:dirs",
  "dep:sha2",
  "dep:ureq",
  "dep:zip",
  "wgc",
]

[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
image = { version = "0.25", default-features = false, features = ["png"] }
image_hasher = "3"
thiserror = "2"
tracing = "0.1"
chrono = { version = "0.4", features = ["serde"] }
crossbeam-channel = "0.5"
smallvec = "1"
regex = "1"
# CLI (optional)
clap = { version = "4", features = ["derive"], optional = true }
anyhow = { version = "1", optional = true }
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
# GUI (optional)
eframe = { version = "0.33", optional = true }
egui = { version = "0.33", optional = true }
dirs = { version = "5", optional = true }
# Encoders (optional)
webp = { version = "0.3", optional = true }
# Recording: microphone capture + WAV writing (optional; `record` / `whisper`).
# Both are pure-Rust and cross-platform.
cpal = { version = "0.17", optional = true }
hound = { version = "3.5", optional = true }
ctrlc = { version = "3", optional = true }
sha2 = { version = "0.10", optional = true }
ureq = { version = "3", optional = true }
zip = { version = "2.4", default-features = false, features = ["deflate"], optional = true }

[target.'cfg(windows)'.dependencies]
windows-capture = { version = "2", optional = true }
windows = { version = "0.62", optional = true, features = [
  "Win32_Foundation",
  "Win32_UI_WindowsAndMessaging",
  "Win32_UI_HiDpi",
  "Win32_Graphics_Dwm",
  "Win32_Graphics_Gdi",
  "Win32_System_Threading",
] }

[dev-dependencies]
tempfile = "3"
# (MockClock and MockBackend live in-crate)

[[bin]]
name = "framewatch"
path = "src/bin/framewatch.rs"
required-features = ["cli"]

[[example]]
name = "embed"
path = "examples/embed.rs"

[[example]]
name = "record-test-app"
path = "examples/record_test_app.rs"
required-features = ["gui"]

[package.metadata.docs.rs]
default-target = "x86_64-pc-windows-msvc"
targets = ["x86_64-pc-windows-msvc"]
features = ["gui", "wgc", "record"]