1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// SPDX-License-Identifier: MPL-2.0
// SPDX-FileCopyrightText: 2026 FernTech
//! # teksilo-automation
//!
//! GUI-free runtime-introspection & automation toolkit for Teksilo apps.
//!
//! A Teksilo app exposes a rich semantic surface — the AccessKit
//! accessibility tree — plus an AT-action dispatch path, both of which are
//! queryable and drivable **in-process, without the OS accessibility
//! layer**. This crate turns that latent capability into a small set of
//! serde DTOs plus one core function, [`execute`], that an MCP server (or
//! any other harness) marshals operations to.
//!
//! ```text
//! execute(tree: &mut WidgetTree, ops: &mut dyn WindowOps,
//! op: &AutomationOp, settle: &SettleSpec) -> AutomationReply
//! ```
//!
//! The wire protocol is **serde DTOs, never closures or `!Send` handles**
//! ([`dto`]). [`WidgetTree`](teksilo_core::WidgetTree) is `!Send`, so it
//! lives on exactly one thread; async / socket layers marshal `Send` DTOs
//! to it. Two operations need context [`execute`] doesn't hold —
//! `list_windows` (the window manager) and `screenshot` (a GPU / platform
//! window) — and return [`dto::codes::HOST_REQUIRED`]; the headless server
//! and the live bridge serve those themselves.
//!
//! This crate has no GUI, render, platform, or async dependency. It mirrors
//! `teksilo-data`'s "core-only peer" design so a CI harness, a headless
//! test, or the live in-app bridge can all share it.
//!
//! ## Modules
//! - [`dto`] — the serde wire protocol.
//! - [`executor`] — [`execute`] and the settle model.
//! - [`recording_ops`] — a non-panicking [`WindowOps`](teksilo_core::WindowOps)
//! for the headless server.
//! - [`mcp_schema`] — the canonical tool catalog.
//! - [`wire`] — the live-bridge framing, token handshake and endpoint
//! discovery, shared verbatim by the in-app bridge and the MCP client.
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;