#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ToolDescriptor {
pub name: &'static str,
pub description: &'static str,
pub mutating: bool,
}
pub const TOOL_CATALOG: &[ToolDescriptor] = &[
ToolDescriptor {
name: "snapshot_tree",
description: "Snapshot the accessibility tree (roles, labels, values, bounds, actions).",
mutating: false,
},
ToolDescriptor {
name: "read_node",
description: "Read a single semantic node by its id.",
mutating: false,
},
ToolDescriptor {
name: "layout_tree",
description: "Walk the full widget/layout tree (incl. widgets the AT tree prunes) with bounds + types.",
mutating: false,
},
ToolDescriptor {
name: "inspect_node",
description: "One widget's full layout record: type, bounds, flags, tree position, Debug repr.",
mutating: false,
},
ToolDescriptor {
name: "find_node",
description: "Find the first node matching a role and/or label.",
mutating: false,
},
ToolDescriptor {
name: "assert_node",
description: "Assert a property of a node (role/label/value/toggled/expanded/…).",
mutating: false,
},
ToolDescriptor {
name: "list_windows",
description: "List the app's managed windows with ids, labels, and titles.",
mutating: false,
},
ToolDescriptor {
name: "invoke_action",
description: "Invoke an AccessKit action on a node (click/focus/expand/…).",
mutating: true,
},
ToolDescriptor {
name: "focus_node",
description: "Move focus to a node.",
mutating: true,
},
ToolDescriptor {
name: "set_value",
description: "Set a node's value via the SetValue AT action.",
mutating: true,
},
ToolDescriptor {
name: "expand",
description: "Expand a disclosure / tree node.",
mutating: true,
},
ToolDescriptor {
name: "collapse",
description: "Collapse a disclosure / tree node.",
mutating: true,
},
ToolDescriptor {
name: "scroll",
description: "Scroll the widget under a node by a pixel delta, with optional modifiers \
(ctrl/shift/alt/meta) — a modifier-held wheel is its own gesture, e.g. \
Ctrl+wheel to zoom.",
mutating: true,
},
ToolDescriptor {
name: "inject_pointer",
description: "Inject a pointer event at a point: action = click (default), double_click, down, up or move; button = primary (default), secondary, middle, back, forward; with optional ctrl/shift/alt/meta held for the press and release. Unknown names and unknown fields are refused rather than defaulted.",
mutating: true,
},
ToolDescriptor {
name: "right_click",
description: "Right-click a node (secondary button at its point) to open its context menu.",
mutating: true,
},
ToolDescriptor {
name: "inject_key",
description: "Inject a key press (with optional modifiers) to the focused widget.",
mutating: true,
},
ToolDescriptor {
name: "type_text",
description: "Focus a node and type text into it.",
mutating: true,
},
ToolDescriptor {
name: "type_ime",
description: "Drive IME composition / commit on a node.",
mutating: true,
},
ToolDescriptor {
name: "drag_node",
description: "Drag from a node to another node or a point.",
mutating: true,
},
ToolDescriptor {
name: "get_overlays",
description: "List active overlays (popovers, menus, tooltips, dialogs).",
mutating: false,
},
ToolDescriptor {
name: "get_shortcuts",
description: "List effective keyboard shortcuts and their bindings.",
mutating: false,
},
ToolDescriptor {
name: "list_live_regions",
description: "List nodes that are live regions (polite/assertive).",
mutating: false,
},
ToolDescriptor {
name: "pull_announcements",
description: "Drain captured live-region announcements since a sequence number.",
mutating: false,
},
ToolDescriptor {
name: "advance_clock",
description: "Advance the simulation clock by N milliseconds.",
mutating: true,
},
ToolDescriptor {
name: "settle",
description: "Run animations / layout to quiescence, then re-sync the tree.",
mutating: true,
},
ToolDescriptor {
name: "wait_for_condition",
description: "Poll until a condition holds (node exists / value / gone / version).",
mutating: true,
},
ToolDescriptor {
name: "screenshot",
description: "Render the window (or a node's bounds) to a PNG image block.",
mutating: false,
},
];
pub const TOOL_COUNT: usize = TOOL_CATALOG.len();