The Perception Protocol for Autonomous Desktop Agents
Engineered by fy2ne to replace slow screenshot Vision-Language Models with deterministic GPU compute shaders, Connected Component Labeling, and sub-2KB differential DAG streams at native 60 FPS.
Integrate
1// crates/vactd/src/main.rs — VACT Direct3D 11 Hardware Perception Daemon2"syn-k">use vactd::compute::{DxgiDuplicator, ShaderPipeline};3"syn-k">use vactd::ipc::PipeServer;4"syn-k">use std::sync::Arc;56#[tokio::main]7"syn-k">async "syn-k">fn main() -> Result<(), Box<dyn std::error::Error>> {8 println!("⚡ Initializing VACT 1.0 Kernel (Direct3D 11 Hardware Acceleration)");910 // Acquire zero-copy desktop duplication context (display 0)11 "syn-k">let duplicator = Arc::new(DxgiDuplicator::new(0)?);12 "syn-k">let pipeline = ShaderPipeline::new(&duplicator.device)?;1314 // Bind local Win32 named pipe for sub-5ms agent telemetry15 "syn-k">let server = PipeServer::bind(r"\\.\pipe\VACT")?;16 println!("✓ Telemetry pipe active at \\.\pipe\VACT (60 FPS stream)");1718 // Run 60 FPS perception loop with Bilateral Filter + CCL reduction19 server.run_event_loop(duplicator, pipeline)."syn-k">await20}
Engineered for Autonomous Model Ingestion
VACT structures screen perception directly into clean, deterministic vector JSON deltas. AI models receive exact bounding coordinates without pixel hallucinations or multi-megabyte payloads.
{
"protocol": "VACT/1.0",
"sequence": 84920,
"ack_sequence": 84919,
"timestamp_ns": 1757089421092834,
"tree_state": "DIFF",
"frame_metrics": {
"dt_ms": 4.82,
"fps": 60.1,
"surface": "IDXGIOutputDuplication"
},
"mutations": [
{
"op": "UPDATE",
"id": "btn_deploy_worker",
"role": "button",
"bbox": [880.0, 420.0, 1060.0, 462.0],
"center": [970.0, 441.0],
"label": "Deploy Production Worker",
"confidence": 0.9987,
"hash": "0x7a89b01c"
}
],
"author": "fy2ne (https://fy2ne.me)"
}
Architected for speed, not screenshots
Zero-copy DXGI capture
Acquires full desktop display framebuffers directly into GPU VRAM using IDXGIOutputDuplication in under 0.8ms without CPU copying.
Bilateral range filtering
Executes photometric and spatial Gaussian kernels in compute shaders to eliminate video noise while preserving sharp font and vector UI boundaries.
Sobel gradient tensors
Convolves 3×3 spatial derivative matrices across 64-thread workgroups in Direct3D 11 to extract directional edge magnitudes at 1.1ms.
Connected component labeling
Performs two-pass contiguous pixel reduction on GPU compute cores to cluster elements into discrete, normalized interactive bounding boxes.
Monotonic differential DAG
Streams strictly incremental mutations over the IPC wire instead of re-transmitting static screen real estate, dropping network bandwidth by 99.8%.
Sub-pixel target precision
Provides mathematically grounded centroids [cx, cy] so agents execute mouse actions without visual coordinate drift or hallucinations.
99.8% token cost reduction
Replaces high-resolution bitmap token consumption (2,200 tokens per step) with ultra-lightweight differential vectors (80–180 tokens per step).
Sub-5ms end-to-end latency
Delivers perceptual telemetry at 60 FPS with an average 4.8ms frame time, unlocking genuine real-time reactive desktop interaction.
Air-gapped Win32 IPC pipe
Operates entirely over local OS named pipes \\.\pipe\VACT with zero network exposure, zero telemetry leaks, and zero external dependencies.
Mathematical Formulation
Deterministic equations executed directly on Direct3D 11 GPU compute hardware for edge-preserving bilateral smoothing, Sobel gradient tensor magnitude, and Connected Component Labeling geometry.
Preserves high-contrast text and UI borders while filtering photometric noise over spatial neighborhood $\Omega$ with spatial variance $\sigma_s$ and radiometric variance $\sigma_r$.
Evaluates directional derivative convolution matrices $G_x$ and $G_y$ across 16×16 workgroups to isolate high-energy UI element boundaries.
Parallel reduction step gathering minimum and maximum extents for connected component label $\mathcal{C}_k$, calculating sub-pixel centroids $\mathbf{c}_k$.
Repository Structure
The official codebase is maintained on GitHub under fy2ne/VACT.