AstrBot-Desktop/src-tauri
YokiiroBW b6a21a70ec
一些检测仍在等待运行
ci / Portable quality checks (push) Waiting to run
ci / Windows Tauri build (push) Waiting to run
feat(awareness): let the companion read one authorized window
Wires the window-awareness modules to the product for the first time.
uia.rs and capture.rs were fully written and had no Tauri command at all;
their only caller anywhere was an #[ignore]d smoke test, so nothing in a
shipped build could reach them.

Six commands, all behind the ADR-0008 policy: the privacy switch, the
session list, start and stop, a window frame, and the window's UI
Automation text. The read takes a closure so the window handle never
leaves the policy module — there is no accessor that skips the switch, the
session lookup, the expiry check, or the rate limit.

Starting a session has an interaction problem worth naming: reading the
foreground window is the only selection mechanism these modules have, and
at the moment the user clicks the button, the foreground window is this
application. So the button gives them a few bounded seconds to bring the
target forward, and a window belonging to this process is refused rather
than captured — which is the most likely outcome if the delay elapses
while they are still on the settings page.

The panel sends either the window's text or its picture to the companion
slot. Text first in the UI order, deliberately: it is far less revealing
than a screenshot and usually enough to answer "what am I looking at".

The indicator in the shell is ADR-0008 item 5, which no project document
required. Reading someone's screen with no visible sign is
indistinguishable from spyware from the outside, and a stop control the
user has to go looking for is not a stop control. It polls rather than
waiting to be told, because an authorization can lapse on its own — and
when it cannot read the status it renders nothing, claiming neither that a
capture is live nor that one is not.

The app's own commands need no capability entries: only plugin commands go
through the ACL, which the existing commands working under `core:default`
alone already demonstrates.

Rust tests 110 -> 113, frontend 43 -> 47.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 06:29:54 +08:00
..
capabilities fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
icons feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
src feat(awareness): let the companion read one authorized window 2026-07-27 06:29:54 +08:00
tests fix(tauri): grant the window controls the permissions they call 2026-07-27 01:19:42 +08:00
build.rs feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
Cargo.toml feat(p00): add Tauri desktop spike foundation 2026-07-18 20:34:47 +08:00
tauri.conf.json feat(chat): carry voice and other non-image attachments end to end 2026-07-27 06:16:55 +08:00