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. Actions retain the core exposure, affordance, grant, and version checks before sending Win32 messages. Cross-thread SendMessage is delivered on the owning window thread.

On Windows, facet_agent now selects agent_winui by default; agent_win32 remains for standalone HWND trees and applications opting into the deprecated facet_win32 backend.