forgewright 0.2.0

Standalone UI automation — CDP for browsers, UIA for Windows desktop apps
Documentation
# forgewright


Standalone UI automation and vision toolkit for Windows. Captures screens, compresses frames with tile-delta hashing, runs visual gate assessments, and drives browsers and desktop apps programmatically.

## Features


- **DXGI capture** with GDI BitBlt fallback
- **BMP decode/encode** (24-bit BGR, bottom-up and top-down)
- **Tile-hash frame compression** — FNV-1a per-tile hashing with delta detection
- **Perceptual hashing** — 64-bit pHash for image similarity
- **Visual gate** — automated pass/fail assessment against configurable expectations
- **Macro compilation**`SkillMacro` to `AgentInputFrame` compiler
- **Shared memory spooler** — ring buffer for agent input frames
- **Photometric stereo** — normal map estimation from multi-light captures
- **Sprite generation** — contour extraction and verification
- **Edge detection** — Sobel-based edge density and feature extraction
- **CDP automation** — Chrome DevTools Protocol WebSocket client
- **UIA automation** — Windows UI Automation accessibility tree driver
- **Burst capture** — multi-frame capture with GIF encoding

## CLI


```
forgewright spawn <exe> [args...]   # Launch a process
forgewright drive <target>          # Drive a running app via CDP/UIA
forgewright login                   # Interactive login prompt
```

## Library Usage


```rust
use forgewright::bridge::VisionBridge;
use forgewright::inlined_types::Frame;
use forgewright::visual_debug::{perceptual_hash, hamming_distance};

// Decode a BMP screenshot
let frame = VisionBridge::decode_bmp(&bmp_bytes)?;

// Compare two frames perceptually
let h1 = perceptual_hash(&frame1.data, frame1.width, frame1.height);
let h2 = perceptual_hash(&frame2.data, frame2.width, frame2.height);
let distance = hamming_distance(h1, h2);
```

## Platform Notes


These modules require Windows and are gated behind `#[cfg(target_os = "windows")]`:

- `dxgi` — DXGI Desktop Duplication + GDI fallback
- `uia` — Windows UI Automation
- `win32` — Win32 window enumeration
- `dual_capture` — Combined DXGI + window capture

All other modules (vision pipeline, gate, bridge, compression) are cross-platform.

## License


MIT OR Apache-2.0