C+
Packages · View as Markdown

agent_win32

agent_win32 walks a live HWND hierarchy into agent_core. It classifies native controls from their class and style, reads current visibility, enabled state, geometry, and text, and implements the common grant-aware backend.

import "agent_win32/agent_win32" as agent;
import "agent_core/auth" as auth;

agent::set_agent_id(button_hwnd, #str_ptr("save\0"));
var surface = agent::open(window_hwnd);
let nodes = surface.describe(auth::reader());
let result = surface.click(auth::operator(), "save");

set_agent_policy pins Protected, Private, or excluded content to a window. mcp_backend() supplies the same backend vtable used by agent_mcp and agent_inapp; the MCP layer is backend-neutral in 0.0.28. Actions retain the core exposure, affordance, grant, and version checks before sending Win32 messages. Cross-thread SendMessage is delivered on the owning window thread.

Facet applications normally use facet_agent, which selects this backend on Windows.