@@ -338,7 +338,7 @@ under a relative name are written below that directory.
338338
339339| Surface | Start it with | Notes |
340340| ---| ---| ---|
341- | ** MCP server** | ` je_auto_control_mcp ` (stdio) or ` AC_start_mcp_http_server ` | 710 tools for Claude Desktop / Claude Code / custom tool loops: the full ` ac_* ` surface plus short model-friendly aliases for common GUI actions. Speaks the stateless MCP 2026-07-28 beside the ` initialize ` -based revisions. Bearer auth, TLS, audit log, rate limit, plugin hot-reload, CI fake backend. |
341+ | ** MCP server** | ` je_auto_control_mcp ` (stdio) or ` AC_start_mcp_http_server ` | 711 tools for Claude Desktop / Claude Code / custom tool loops: the full ` ac_* ` surface plus short model-friendly aliases for common GUI actions. Speaks the stateless MCP 2026-07-28 beside the ` initialize ` -based revisions. Bearer auth, TLS, audit log, rate limit, plugin hot-reload, CI fake backend. |
342342| ** REST API** | ` je_auto_control start-rest ` | Bearer token, per-IP rate limit + lockout, SQLite audit hook, ` /metrics ` , ` /openapi.json ` , ` /docs ` Swagger UI, ` /dashboard ` . |
343343| ** TCP socket server** | ` je_auto_control start-server ` | Newline-framed JSON action lists. Binds ` 127.0.0.1 ` by default. |
344344| ** pytest plugin** | installed automatically | Fixtures plus a Gherkin step library for pytest-bdd / behave. |
@@ -511,8 +511,8 @@ distinct from automatic fallback after observed optional native absence;
511511permission/pause/revocation/failure metadata cannot imply CLI fallback.
512512Capture helper and portal selection are diagnosed independently. Rendering and
513513language changes reuse the snapshot without probing. Native portal restore,
514- compositor restart, capture-result/context integration and cancelable active
515- diagnostics remain in ` Progress.md ` .
514+ compositor restart, capture-result/context integration and native session
515+ controls remain in ` Progress.md ` .
516516
517517The GUI task infrastructure provides ` gui.task_controller.TaskController ` :
518518` submit(work, owner=widget) ` returns a caller-owned ` TaskHandle ` with
@@ -530,16 +530,43 @@ thread. Cancellation does not forcibly interrupt an uncooperative call
530530or relabel a successful committed return. Errors/progress use the captured
531531secret scope; terminal errors retain no exception traceback. Failed thread
532532starts roll back both registries and preserve the original failure.
533- This is shared infrastructure: Diagnostics and other panels still await
534- controller/timeout/stop integration, tracked in ` Progress.md ` .
535-
536- Active diagnostics stop immediately when a check raises explicit cancellation
537- or a hard control signal, including an explicit exception cause chain.
538- The original object propagates through the core, SDK, CLI and Diagnostics
539- action; it is not logged or converted into a failed report row, and later
540- checks do not run. Ordinary probe errors still produce failed rows and
541- allow remaining checks. A canceled GUI run can be retried explicitly.
542- Background workers and cooperative stop controls remain pending.
533+ Diagnostics now adopts this controller. Remaining panel/backend migrations
534+ and native session operations stay in ` Progress.md ` .
535+
536+ Active ** Diagnostics → Actions → Run diagnostics** uses the shared task
537+ controller off the GUI thread. ** Stop diagnostics** requests cooperative stop;
538+ the view distinguishes running, stopping, canceled and failed states in four
539+ languages. Progress counts completed checks. Duplicate runs are ignored, close
540+ abandons late progress/results, and a deliberate retry starts a new owned run.
541+ GUI cancellation is a typed outcome without retained exception tracebacks;
542+ headless core/SDK/CLI and the MCP handler preserve original direct/wrapped controls.
543+ Ordinary probe failures still become report rows and allow remaining checks.
544+
545+ ` CancellationToken ` , ` TaskProgress ` and ` cancellation_scope ` are exported by both
546+ SDK namespaces. Bind ` with cancellation_scope(token): report = run_diagnostics() ` ;
547+ the owning caller can call ` token.cancel() ` from another thread. The existing
548+ no-argument diagnostics signature remains. Scope binding grants no authority;
549+ ` cancellation_scope(None) ` only suspends cancellation for bounded owned cleanup.
550+ ` AC_diagnose ` and the new read-only ` ac_diagnose ` share the report. The MCP tool
551+ accepts no arguments, uses request cancellation/progress and requires
552+ ` read_screen ` , as does the explicit GUI action. Caller-supplied tokens or
553+ authority metadata are rejected. These are active checks: capture may request
554+ consent. ` ac_probe_capabilities ` remains the separate passive alternative.
555+
556+ Scoped Wayland D-Bus connect/read/partial-write waits poll at intervals capped
557+ at 0.1s within the original total deadline. Cancellation attempts Request.Close
558+ on the originating bus with its separate 0.25s budget, then releases that
559+ connection; a canceled returned image is discarded. Scoped CLI captures stop
560+ and reap their newly owned helper/process group with bounded cleanup, preserving
561+ the original control even if pipe close fails; reaped numeric PIDs are never
562+ signaled. liboeffis acquisition observes scoped stop and releases its own context.
563+ Uncooperative/native calls are not forcibly preempted; the GUI remains responsive
564+ while cleanup completes. Restore/restart, native session controls, capture-owner
565+ metadata and remaining panel/backend migrations stay in ` Progress.md ` .
566+
567+ ` python -m examples.cancellable_diagnostics ` runs a controlled cancellation demo
568+ without providers. ` --active --cancel-after 2 ` explicitly runs diagnostics and
569+ requests stop after two seconds; native/device/API acceptance remains separate.
543570
544571Opening Diagnostics displays a localized not-run state and performs no checks.
545572Choose ** Actions → Run diagnostics** to start the existing active checks, which
@@ -590,7 +617,7 @@ ignore synthetic input, and fall back silently when the driver is absent.
590617
591618| Resource | What's in it |
592619| ---| ---|
593- | [ ` examples/ ` ] ( examples/ ) | 42 self-contained scripts: screenshot + click, OCR, scheduler, remote desktop, agent loop, observability, recording, variables, hotkeys, triggers, reports, MCP, REST, secrets, plugins, computer use, Wayland, cross-host DAGs, chat-ops, pytest/BDD, anchor locators, action journals. |
620+ | [ ` examples/ ` ] ( examples/ ) | 43 self-contained scripts: screenshot + click, OCR, scheduler, remote desktop, agent loop, observability, recording, variables, hotkeys, triggers, reports, MCP, REST, secrets, plugins, computer use, Wayland, cross-host DAGs, chat-ops, pytest/BDD, anchor locators, action journals. |
594621| [ Read the Docs] ( https://autocontrol.readthedocs.io/en/latest/ ) | Full API reference, English and 中文. |
595622| [ architecture_explore.md] ( architecture_explore.md ) | Every module's responsibility, layer by layer. |
596623| [ docs/CAPABILITY_MATRIX.md] ( docs/CAPABILITY_MATRIX.md ) | Capability × platform matrix. |
0 commit comments