1.9 KiB
WGC S0.1 Target-Binding Spike — 2026-07-27
Purpose
Establish the narrowest possible evidence that the Windows client can bind explicit capture targets through Windows.Graphics.Capture (WGC), without starting capture or processing screen content. This is an S0 sub-step, not a delivered screen-awareness feature.
Implemented boundary
wgc_spike_support_statusreports only whether WGC is supported and the current attached-display count.wgc_spike_probe_authorized_windowreuses the existingCapturePolicy::inspectgate and creates a WGC item only for an already authorized window.wgc_spike_probe_displayscreates WGC items for the displays attached at call time.- Each successful probe returns target kind plus width and height. Invalid or non-positive dimensions are rejected.
No command creates a GraphicsCaptureSession, retrieves a frame, reads text, consumes capture budget, writes raw content, encodes an image, schedules an observation, or calls AstrBot.
Validation
cargo fmt --all: passed.- With
CARGO_TARGET_DIR=src-tauri/.tmp/wgc-check,cargo check -p astrbot-desktop --lib: passed. - With the same isolated target,
cargo test -p astrbot-desktop --lib: 117 passed, 0 failed.
The isolated target is required in this workspace because the default Cargo target resolves generated Tauri permissions through the mapped UNC path and can fail with Windows access denied (os error 5).
Non-evidence and next gate
S0.1 provides no proof that WGC returns useful pixels. It does not validate DirectX/Vulkan games, minimized targets, display topology changes, lock screens, protected content, sensitive-application filtering, quality thresholds, or AstrBot visual understanding.
S0.2 must create a bounded D3D11 WGC frame path, copy one frame to a staging texture, convert BGRA to RGBA, detect black/transparent/empty results, and record manual Windows evidence before any screen frame can progress to a local privacy or network path.