Skip to content

armgit / cua

Public Imported from GitHub
0

Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.

fix: post-launch CI follow-ups (#4405)

ddupont352507b6c031
diff --git a/.github/scripts/sync_driver_release_docs.py b/.github/scripts/sync_driver_release_docs.py
index b378c8ba32..7813bc7c76 100644
--- a/.github/scripts/sync_driver_release_docs.py
+++ b/.github/scripts/sync_driver_release_docs.py
@@ -11,6 +11,11 @@ from typing import Sequence
from release_reference_docs import reference_paths
+# The CLI-shape oracle the generator writes next to the pages; it records
+# the documented version too.
+CLI_SPEC = "scripts/docs-generators/cli-specs/cua-driver.json"
+
+
def driver_reference_paths(root: Path) -> tuple[str, ...]:
return reference_paths(root, "cua-driver")
@@ -29,6 +34,10 @@ def sync_driver_release_docs(root: Path) -> None:
content = path.read_text()
content = replace_once(content, r"^ Version: \S+$", f" Version: {version}", path)
path.write_text(content)
+ spec = root / CLI_SPEC
+ if spec.exists():
+ content = replace_once(spec.read_text(), r'^ "version": "[^"]*"$', f' "version": "{version}"', spec)
+ spec.write_text(content)
def main(argv: Sequence[str] | None = None) -> int:
diff --git a/.github/scripts/tests/test_cua_driver_release_wiring.py b/.github/scripts/tests/test_cua_driver_release_wiring.py
index f4ffb288c4..ef0625af2f 100644
--- a/.github/scripts/tests/test_cua_driver_release_wiring.py
+++ b/.github/scripts/tests/test_cua_driver_release_wiring.py
@@ -453,6 +453,49 @@ fi
self.assertNotIn('"path": "scripts/install.ps1"', config)
self.assertIn('"path": "rust/Skills/cua-driver/SKILL.md"', config)
+ def test_release_please_bumps_the_spacesd_lockfiles(self) -> None:
+ """cua-spacesd and its e2e workspaces lock the driver and spacesd
+ crates by path: each release PR must bump them there too, or every
+ --locked build of those workspaces fails until they are re-locked."""
+ import tomllib
+
+ packages = json.loads(self.read("release-please-config.json"))["packages"]
+ workspaces = {
+ "libs/cua-driver": REPO_ROOT / "libs/cua-driver/rust",
+ "libs/cua-spacesd": REPO_ROOT / "libs/cua-spacesd/crates",
+ }
+ lockfiles = [
+ "libs/cua-spacesd/Cargo.lock",
+ "libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ ]
+ for package, root in workspaces.items():
+ crates = set()
+ for manifest in root.rglob("Cargo.toml"):
+ if "target" in manifest.parts:
+ continue
+ crate = tomllib.loads(manifest.read_text()).get("package", {})
+ if crate.get("version") == {"workspace": True}:
+ crates.add(crate["name"])
+ entries = {
+ (entry["path"], entry.get("jsonpath"))
+ for entry in packages[package]["extra-files"]
+ if isinstance(entry, dict)
+ }
+ for lockfile in lockfiles:
+ locked = tomllib.loads(self.read(lockfile))["package"]
+ for crate in locked:
+ if "source" in crate or crate["name"] not in crates:
+ continue
+ with self.subTest(package=package, lockfile=lockfile, crate=crate["name"]):
+ self.assertIn(
+ (
+ f"/{lockfile}",
+ f"$.package[?(@.name.value=='{crate['name']}')].version",
+ ),
+ entries,
+ )
+
def test_driver_installer_version_advances_only_after_publication(self) -> None:
workflow = self.read(".github/workflows/cd-rust-cua-driver.yml")
diff --git a/.github/scripts/tests/test_sync_driver_release_docs.py b/.github/scripts/tests/test_sync_driver_release_docs.py
index 0c4f54f03d..b962031931 100644
--- a/.github/scripts/tests/test_sync_driver_release_docs.py
+++ b/.github/scripts/tests/test_sync_driver_release_docs.py
@@ -17,6 +17,9 @@ def test_sync_driver_release_docs_updates_generated_markers(tmp_path: Path):
(tmp_path / config).parent.mkdir(parents=True)
shutil.copy(REPO_ROOT / config, tmp_path / config)
shutil.copytree(REPO_ROOT / DOCS, tmp_path / DOCS)
+ spec = "scripts/docs-generators/cli-specs/cua-driver.json"
+ (tmp_path / spec).parent.mkdir(parents=True)
+ shutil.copy(REPO_ROOT / spec, tmp_path / spec)
docs = tmp_path / DOCS
notes = docs / "mcp-tools" / "notes.mdx"
@@ -30,3 +33,4 @@ def test_sync_driver_release_docs_updates_generated_markers(tmp_path: Path):
for relative in paths:
assert "Version: 9.9.9" in (tmp_path / relative).read_text()
assert notes.read_text() == "Shared guidance without a release marker.\n"
+ assert '\n "version": "9.9.9"\n' in (tmp_path / spec).read_text()
diff --git a/.github/workflows/docs-fleet-first-run-smoke.yml b/.github/workflows/docs-fleet-first-run-smoke.yml
index c5ba8e70bb..d4574bdd30 100644
--- a/.github/workflows/docs-fleet-first-run-smoke.yml
+++ b/.github/workflows/docs-fleet-first-run-smoke.yml
@@ -51,7 +51,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install \
--extra-index-url https://wheels.cua.ai/simple \
- "cua-sandbox==0.8.0"
+ "cua-sandbox==0.9.0"
- name: Test the Python example with mocked Fleet calls
run: python -m unittest discover -s docs/scripts/tests -p test_first_cloud_fleet_tutorial.py -v
# The example imports @trycua/cua, which is not on npm yet: build it
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 8fad16ec97..96c2b16c45 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -244,10 +244,17 @@ jobs:
DRIVER_VERSION=$(tr -d '[:space:]' < libs/cua-driver/rust/VERSION)
cargo update --manifest-path libs/cua-driver/rust/Cargo.toml \
-p cua-driver --precise "$DRIVER_VERSION"
+ # cua-spacesd and its standalone e2e workspaces lock the driver
+ # crates by path: follow the new version without upgrading deps.
+ for manifest in libs/cua-spacesd/Cargo.toml libs/cua-spacesd/tests/*/Cargo.toml; do
+ cargo metadata --format-version 1 --manifest-path "$manifest" > /dev/null
+ done
python3 .github/scripts/sync_driver_release_docs.py
python3 .github/scripts/validate_release_versions.py --product driver
git add libs/cua-driver/rust/Cargo.lock \
- docs/content/docs/cua-driver/reference
+ libs/cua-spacesd/Cargo.lock libs/cua-spacesd/tests/*/Cargo.lock \
+ docs/content/docs/cua-driver/reference \
+ scripts/docs-generators/cli-specs/cua-driver.json
COMMIT_MESSAGE="chore(cua-driver-rs): synchronize generated release files"
elif [[ "$LUME" == "true" ]]; then
python3 .github/scripts/sync_lume_release_docs.py
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/onboarding-drive-prompt.png b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/onboarding-drive-prompt.png
index 6774042b3e..a074246642 100644
Binary files a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/onboarding-drive-prompt.png and b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/Snapshots/onboarding-drive-prompt.png differ
diff --git a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
index 2d2037c63a..09d4cd6f42 100644
--- a/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
+++ b/apps/cua-spaces-macos/Tests/CuaSpacesMacTests/ViewModelTests.swift
@@ -385,7 +385,9 @@ struct ViewModelTests {
let w = model.wizard
#expect(w.view.canContinue)
w.send(.next)
- w.send(.setCpus(cpus: 4))
+ // The local range tops out at this Mac's cores (a CI runner has 3).
+ let cpus = min(4, w.view.maxCpus)
+ w.send(.setCpus(cpus: cpus))
w.send(.next)
w.send(.setName(name: "Bad Name"))
#expect(w.view.nameInvalid && !w.view.canContinue)
@@ -396,7 +398,7 @@ struct ViewModelTests {
#expect(!model.showingNewSpace)
for _ in 0..<50 where backend.created.isEmpty { try? await Task.sleep(for: .milliseconds(20)) }
#expect(backend.created.first?.name == "demo")
- #expect(backend.created.first?.cpus == 4)
+ #expect(backend.created.first?.cpus == cpus)
#expect(backend.created.first?.memoryMb == 4096)
}
diff --git a/apps/cua-spaces/src-tauri/tests/installer_commands.rs b/apps/cua-spaces/src-tauri/tests/installer_commands.rs
index e92e12a20d..ca565915b0 100644
--- a/apps/cua-spaces/src-tauri/tests/installer_commands.rs
+++ b/apps/cua-spaces/src-tauri/tests/installer_commands.rs
@@ -31,7 +31,18 @@ fn fake_cua(dir: &Path, body: &str) -> PathBuf {
let app = dir.join("Cua Spaces.app/Contents/MacOS");
std::fs::create_dir_all(&app).unwrap();
let path = app.join("cua");
- std::fs::write(&path, format!("#!/bin/sh\n{body}\n")).unwrap();
+ // Write a staging copy and let a child process create the executable:
+ // a file this (multithreaded) process opened for writing can be held
+ // open by a sibling test's fork until its exec, so exec'ing it races
+ // into ETXTBSY ("Text file busy"). The child's fds never leak here.
+ let staging = dir.join("cua.src");
+ std::fs::write(&staging, format!("#!/bin/sh\n{body}\n")).unwrap();
+ let status = std::process::Command::new("cp")
+ .arg(&staging)
+ .arg(&path)
+ .status()
+ .unwrap();
+ assert!(status.success(), "cp {staging:?} {path:?}");
std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o755)).unwrap();
path
}
diff --git a/apps/cua-spaces/src/components/FactList.test.tsx b/apps/cua-spaces/src/components/FactList.test.tsx
index 6be755f38c..6c4e602979 100644
--- a/apps/cua-spaces/src/components/FactList.test.tsx
+++ b/apps/cua-spaces/src/components/FactList.test.tsx
@@ -42,7 +42,7 @@ describe("FactList (the Space detail's facts)", () => {
it("shows Image, the full System string, Memory, and no Location", () => {
render(<FactList facts={spaceDetail(space, usage).facts} />);
const labels = Array.from(document.querySelectorAll("dt")).map((e) => e.textContent);
- expect(labels).toEqual(["Status", "Image", "System", "Kind", "Memory", "Identifier"]);
+ expect(labels).toEqual(["Status", "Image", "Identifier", "System", "Kind", "Memory"]);
expect(within(row("Kind")).getByText("Container")).toBeInTheDocument();
expect(within(row("Image")).getByText("ghcr.io/trycua/linux:24.04-slim")).toHaveAttribute(
"title",
diff --git a/docs/content/docs/cua-bench/reference/cli/agent.mdx b/docs/content/docs/cua-bench/reference/cli/agent.mdx
index 5387caa67e..2d27ff6f55 100644
--- a/docs/content/docs/cua-bench/reference/cli/agent.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/agent.mdx
@@ -7,7 +7,7 @@ description: "Scaffold custom agents."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/dataset.mdx b/docs/content/docs/cua-bench/reference/cli/dataset.mdx
index 1c55de3ec6..8632ed09bc 100644
--- a/docs/content/docs/cua-bench/reference/cli/dataset.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/dataset.mdx
@@ -7,7 +7,7 @@ description: "List registry datasets and build training data from runs."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/env.mdx b/docs/content/docs/cua-bench/reference/cli/env.mdx
index e64809ddc5..2f46ff896d 100644
--- a/docs/content/docs/cua-bench/reference/cli/env.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/env.mdx
@@ -7,7 +7,7 @@ description: "Cloud pools and local sandboxes, sign-in, status and cleanup."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/images.mdx b/docs/content/docs/cua-bench/reference/cli/images.mdx
index cbfd450900..e4fc03132f 100644
--- a/docs/content/docs/cua-bench/reference/cli/images.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/images.mdx
@@ -7,7 +7,7 @@ description: "The canonical images and platform configurations."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/index.mdx b/docs/content/docs/cua-bench/reference/cli/index.mdx
index e567f9852b..47b90dfbe7 100644
--- a/docs/content/docs/cua-bench/reference/cli/index.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/index.mdx
@@ -7,7 +7,7 @@ description: "cua-bench: run computer-use tasks and benchmark datasets on local
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
```text output
diff --git a/docs/content/docs/cua-bench/reference/cli/run.mdx b/docs/content/docs/cua-bench/reference/cli/run.mdx
index 2ab043e748..3868f05124 100644
--- a/docs/content/docs/cua-bench/reference/cli/run.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/run.mdx
@@ -7,7 +7,7 @@ description: "Run a task or dataset with an agent or the oracle, run one interac
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/task.mdx b/docs/content/docs/cua-bench/reference/cli/task.mdx
index d2e18b03d7..6390550a02 100644
--- a/docs/content/docs/cua-bench/reference/cli/task.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/task.mdx
@@ -7,7 +7,7 @@ description: "Inspect, list, scaffold and generate tasks."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/cli/trace.mdx b/docs/content/docs/cua-bench/reference/cli/trace.mdx
index 195dfd2ca7..30e3c024e1 100644
--- a/docs/content/docs/cua-bench/reference/cli/trace.mdx
+++ b/docs/content/docs/cua-bench/reference/cli/trace.mdx
@@ -7,7 +7,7 @@ description: "View traces and agent trajectories."
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
| Command | Description |
diff --git a/docs/content/docs/cua-bench/reference/index.mdx b/docs/content/docs/cua-bench/reference/index.mdx
index eabe984e27..be75e0f95f 100644
--- a/docs/content/docs/cua-bench/reference/index.mdx
+++ b/docs/content/docs/cua-bench/reference/index.mdx
@@ -7,7 +7,7 @@ description: "Every cb command, the task module contract and the result files, g
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
## Commands
diff --git a/docs/content/docs/cua-bench/reference/results.mdx b/docs/content/docs/cua-bench/reference/results.mdx
index 87859b6be1..786a8a9b60 100644
--- a/docs/content/docs/cua-bench/reference/results.mdx
+++ b/docs/content/docs/cua-bench/reference/results.mdx
@@ -7,7 +7,7 @@ description: "The result.json and summary.json a run writes: every key, its type
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
A run writes one directory per variant and a `summary.json` next to them:
diff --git a/docs/content/docs/cua-bench/reference/task-definition.mdx b/docs/content/docs/cua-bench/reference/task-definition.mdx
index 7506f50ca6..d733081fa2 100644
--- a/docs/content/docs/cua-bench/reference/task-definition.mdx
+++ b/docs/content/docs/cua-bench/reference/task-definition.mdx
@@ -7,7 +7,7 @@ description: "The task module contract: cb.Task, setup_config, the lifecycle dec
AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
Generated by: pnpm --dir docs docs:generate:cua-bench
Source: scripts/docs-generators/extract_cb_docs.py (cua_bench)
- Version: 0.2.11
+ Version: 0.3.0
*/}
A task is a directory with a `main.py`. `cb` imports it, calls the `@cb.tasks_config` function to list the variants, then for each variant starts a sandbox from its `computer` and runs setup, the agent (or the `@cb.solve_task` oracle) and evaluation. Each lifecycle function receives the variant's `cb.Task` and the session on its sandbox.
diff --git a/docs/content/docs/cua-cli/reference/cli/sandbox.mdx b/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
index 48b29ff514..0525d6a871 100644
--- a/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
+++ b/docs/content/docs/cua-cli/reference/cli/sandbox.mdx
@@ -86,11 +86,11 @@ cua sandbox create [OPTIONS] [IMAGE] [-- <COMMAND>...]
# A Linux desktop on this machine (a gVisor container)
cua sb create linux --name dev
-# The same image in the cloud, as a VM
-cua sb create linux --on cloud --kind vm --name dev
-
# A web server container, ready when its HTTP service answers
cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000
+
+# The same Linux image in the cloud instead, as a VM
+cua sb create linux --on cloud --kind vm --name dev
```
## `cua sandbox launch`
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/apps-and-windows.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/apps-and-windows.mdx
index e2f11e1efc..10fc173c44 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/apps-and-windows.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/apps-and-windows.mdx
@@ -44,12 +44,6 @@ Standalone running entries include only apps with NSApplicationActivationPolicyR
Use this for "is X installed?" as well as "is X running?". For per-window state, on-screen, on-current-Space, minimized, window titles, call list_windows instead. For just opening an app, running or not, call launch_app(&#123;bundle_id: ...&#125;) directly; list_apps is not a prerequisite.
-**Parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="list_apps--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
</Tab>
<Tab value="Linux">
@@ -87,6 +81,12 @@ Use this for "is X installed?" as well as "is X running?". For per-window state,
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="list_apps--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
## `list_windows`
Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
@@ -98,20 +98,19 @@ List all layer-0 top-level windows currently known to WindowServer. Includes off
Per-record fields: window_id, pid, app_name, title, bounds (x/y/width/height, top-left origin), z_index (integer or null; higher values are closer to the front; null means stacking order is unavailable and callers must not infer one), is_on_screen, space_ids, current_space_id (the active Space on that window's display), and on_current_space. The top-level current_space_id is WindowServer's main/global active Space and can differ from a record's current_space_id when displays use independent Spaces. To select a frontmost candidate, take the maximum integer z_index; if every value is null, use an explicit fallback instead of relying on array order.
-**Parameters**
+**macOS parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="list_windows--macos--on_screen_only"></span>`on_screen_only` | `boolean` | | When true, drop windows not on the current Space. Default false. |
| <span id="list_windows--macos--pid"></span>`pid` | `integer` | | Optional pid filter. When set, only this pid's windows are returned. |
-| <span id="list_windows--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
</Tab>
<Tab value="Linux">
List top-level windows. Each record includes z_index (integer or null; higher values are closer to the front; null means stacking order is unavailable and callers must not infer one). To select a frontmost candidate, take the maximum integer z_index; if every value is null, use an explicit fallback instead of relying on array order.
-**Parameters**
+**Linux parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -129,7 +128,7 @@ Per-record fields: window_id (HWND), pid + app_name, title, bounds &#123;x, y, w
Inputs: pid (optional pid filter), on_screen_only (bool, default false).
-**Parameters**
+**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -139,6 +138,12 @@ Inputs: pid (optional pid filter), on_screen_only (bool, default false).
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="list_windows--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
## `launch_app`
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
@@ -162,7 +167,7 @@ Optional `additional_arguments`: extra argv strings appended after --args.
Returns the launched app's pid, bundle_id, name, and a `windows` array (same shape as `list_windows`) so callers can skip an extra round-trip before `get_window_state(pid, window_id)`. `launch_state` distinguishes whether the request was sent, the process is running, and a window is ready. When the focus-steal belt-and-braces demotion check ran (target pid ≠ prior frontmost), the response also includes `self_activation_suppressed: bool`; true if focus stayed with the prior frontmost, false if the launched app held focus despite the re-demote attempt.
-**Parameters**
+**macOS parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -170,7 +175,6 @@ Returns the launched app's pid, bundle_id, name, and a `windows` array (same sha
| <span id="launch_app--macos--bundle_id"></span>`bundle_id` | `string` | | App bundle identifier, e.g. com.apple.calculator. Preferred over name. |
| <span id="launch_app--macos--creates_new_application_instance"></span>`creates_new_application_instance` | `boolean` | | When true, force a new app instance even if already running (open -n). Use for concurrent multi-agent/multi-session work so each session gets an isolated instance + window instead of sharing one: on single-instance apps (e.g. Calculator) every caller otherwise gets the same window and the sessions clobber each other. |
| <span id="launch_app--macos--name"></span>`name` | `string` | | App display name. Used only when bundle_id is absent. |
-| <span id="launch_app--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="launch_app--macos--urls"></span>`urls` | `string[]` | | Optional file paths or URLs to open with the app (e.g. a folder path for Finder). |
| <span id="launch_app--macos--webkit_inspector_port"></span>`webkit_inspector_port` | `integer` | | Open a WebKit inspector server on this port (sets WEBKIT_INSPECTOR_SERVER env var). |
@@ -179,7 +183,7 @@ Returns the launched app's pid, bundle_id, name, and a `windows` array (same sha
Launch a Linux app in the background. Provide launch_path (preferred: round-trip the value from list_apps), name (tried as a direct command, then matched against installed .desktop applications, then handed to xdg-open if it is a URL or existing file path), bundle_id (ignored on Linux), or urls (list of URLs to open). Resolution precedence: launch_path &gt; name &gt; bundle_id. Errors when the name resolves to nothing launchable.
-**Parameters**
+**Linux parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -202,7 +206,7 @@ Returns the launched app's pid, name, active flag, AND a `windows` array: same p
Windows-only field: `path` (Swift uses `bundle_id` since macOS apps resolve via LaunchServices; Windows has no LaunchServices, so `path` is the canonical form). The macOS-specific `webkit_inspector_port`, `creates_new_application_instance`, and `additional_arguments` fields are accepted; `additional_arguments` is honored (forwarded as ShellExecuteEx parameters or as the AUMID activation arguments string). The remaining macOS-only fields currently no-op on Windows.
-**Parameters**
+**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -220,6 +224,12 @@ Windows-only field: `path` (Swift uses `bundle_id` since macOS apps resolve via
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="launch_app--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
## `kill_app`
Effect: destructive, idempotent. Platforms: macOS, Linux, Windows.
@@ -229,12 +239,6 @@ Effect: destructive, idempotent. Platforms: macOS, Linux, Windows.
Force-terminate a process by pid (kill -9 equivalent on macOS / Linux; taskkill /F equivalent on Windows). Use as escalation when the cooperative close path (hotkey cmd+q on macOS, click-the-X on Windows) failed to make the process exit. Unsaved state is lost: prefer the cooperative path first.
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="kill_app--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
</Tab>
<Tab value="Linux">
@@ -253,6 +257,7 @@ Force-terminate a process by pid. Use when the standard close path (Alt+F4 / WM_
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="kill_app--pid"></span>`pid` | `integer` | required | PID of the process to terminate. |
+| <span id="kill_app--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
**Example arguments**
@@ -269,12 +274,11 @@ Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
Persistently activate an app and leave it in the foreground. Most input does not need this; use it only for a focus-proxy surface that must remain foreground across interactions. With window_id, success means the exact ordinary macOS window was independently verified as the frontmost process's focused window and the front window of that process on the display it sits on. `exact_window_effect.frontmost_ordinary` additionally reports whether it is first in the global WindowServer layer-0 order; another application (an always-raised utility window, another display's front window) can hold that spot without the requested window losing keyboard focus, so it is reported and not required. Request acceptance alone is reported as a partial result, never as activation. This DOES steal foreground and does NOT restore the previously frontmost application.
-**Parameters**
+**macOS parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="bring_to_front--macos--pid"></span>`pid` | `integer` | required | Process ID of the app to activate. |
-| <span id="bring_to_front--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="bring_to_front--macos--window_id"></span>`window_id` | `integer` | | CGWindowID to verify as the focused, frontmost window. Omit to activate the app only. |
</Tab>
@@ -282,7 +286,7 @@ Persistently activate an app and leave it in the foreground. Most input does not
Persistently activate a window so subsequent input lands on it. This deliberately breaks the no-foreground contract and is not part of the normal input ladder. For an ordinary `background_unavailable` response, retry only the refused action with `delivery_mode:"foreground"`; the input tool performs its own activate, act, and restore sequence. Use `bring_to_front` only for a focus-proxy surface that must remain foreground across multiple calls, such as a remote desktop session, or when repeated action-scoped activation prevents the remote surface from accepting input. X11: EWMH _NET_ACTIVE_WINDOW activation (the `wmctrl -a` equivalent, with proper timestamp handling to beat focus-stealing prevention). Wayland: activates through a target-addressable compositor adapter (wlroots foreign-toplevel or the GNOME Shell helper) and refuses when the compositor offers no safe adapter. Matches the macOS / Windows bring_to_front rung.
-**Parameters**
+**Linux parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -298,7 +302,7 @@ Activate `pid`'s window (or `window_id` if specified) -- bring it to the OS fore
Implementation uses the `AttachThreadInput` trick to bypass Windows' foreground-lock when the daemon is not at UIAccess integrity. Returns structured `{previous_fg_hwnd, now_fg_hwnd}` so callers can later restore. Windows only; macOS / Linux return an error pointing at platform-native alternatives.
-**Parameters**
+**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -308,6 +312,12 @@ Implementation uses the `AttachThreadInput` trick to bypass Windows' foreground-
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="bring_to_front--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
**Example arguments**
```json
@@ -364,6 +374,7 @@ Effect: read-only, idempotent. Platforms: Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="debug_window_info--pid"></span>`pid` | `integer` | required | PID of the process to inspect. |
+| <span id="debug_window_info--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
**Example arguments**
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/click.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/click.mdx
index 8db76e80ee..135588ed10 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/click.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/click.mdx
@@ -43,7 +43,6 @@ from_zoom: set true after a zoom call to auto-translate zoom-image pixel coordin
| <span id="click--macos--count"></span>`count` | `integer` | | Click count (pixel path only). Default 1. |
| <span id="click--macos--debug_image_out"></span>`debug_image_out` | `string` | | Optional file path. When set on a pixel-addressed click, captures a fresh screenshot, draws a red crosshair at (x, y), and writes the PNG. Use to verify coordinate spaces. Requires window_id; incompatible with from_zoom. |
| <span id="click--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": perform the AX action or post the CGEvent without fronting. "foreground": briefly front the window, act, let transient UI settle, then restore the prior frontmost app. Requires window_id. Modified clicks require "foreground" so macOS observes physical modifier-key state. A generic click has no independent postcondition read-back, except selection of list-like AX rows whose AXSelected state can be confirmed; otherwise confirm the effect from a fresh state snapshot. Use the agent loop: background AX (element_token) → snapshot → background pixel (x/y) → snapshot → delivery_mode:"foreground". |
-| <span id="click--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="click--macos--from_zoom"></span>`from_zoom` | `boolean` | | When true, x and y are in the last zoom image for this pid; driver translates back to full-window coordinates. |
| <span id="click--macos--modifier"></span>`modifier` | `string[]` | | Modifier keys: cmd, shift, option/alt, ctrl. |
| <span id="click--macos--pid"></span>`pid` | `integer` | | Target process ID. |
@@ -55,9 +54,9 @@ from_zoom: set true after a zoom call to auto-translate zoom-image pixel coordin
</Tab>
<Tab value="Linux">
-Click against a target pid. **Prefer `element_index` over pixel coordinates**: element_index works on backgrounded / hidden windows, surfaces a stable handle, and tells you what you're clicking via the cached AT-SPI element's role + label. Reach for `x, y` only when the target is a canvas / custom-drawn surface that doesn't appear in the AT-SPI tree.
+Click against a target pid. **Prefer `element_token` over pixel coordinates**: element_token works on backgrounded / hidden windows, surfaces a stable handle, and tells you what you're clicking via the cached AT-SPI element's role + label. Reach for `x, y` only when the target is a canvas / custom-drawn surface that doesn't appear in the AT-SPI tree.
-Provide either (window_id + x/y) or (pid + element_index). x/y are WINDOW-LOCAL pixels of window_id (the get_window_state screenshot frame); a point outside the window is refused (point_outside_window) and every pixel result reports the resolved window_point / screen_point. Background delivery first resolves the accessible under the point and fires its action (the result says `hit: <role> "<name>" action=...`; a file / list item is selected through its container: `selected: ...`), else presses the real virtual pointer there. A click that opens a popup menu names it (`popup: {window_id, bounds}`): pass that window_id to get_window_state to index its items. element_index cache is scoped per (pid, window_id) and is replaced by the next get_window_state of the same window: re-snapshot every turn before clicking.
+Provide either (window_id + x/y) or (pid + element_token). x/y are WINDOW-LOCAL pixels of window_id (the get_window_state screenshot frame); a point outside the window is refused (point_outside_window) and every pixel result reports the resolved window_point / screen_point. Background delivery first resolves the accessible under the point and fires its action (the result says `hit: <role> "<name>" action=...`; a file / list item is selected through its container: `selected: ...`), else presses the real virtual pointer there. A click that opens a popup menu names it (`popup: {window_id, bounds}`): pass that window_id to get_window_state to index its items. The token is stale once the next get_window_state of the same window replaces its snapshot: re-snapshot every turn before clicking.
After a zoom call, pass from_zoom=true to auto-translate zoom-image coords back to full-window space.
@@ -75,13 +74,10 @@ button: "left" (default), "right", or "middle". Defaults to left so the field is
| <span id="click--linux--count"></span>`count` | `integer` | | Number of clicks in one press train: 1 (default), 2 = double-click, 3 = triple-click (line/paragraph selection). There is no separate triple_click tool: pass count: 3 here. Minimum: 1. |
| <span id="click--linux--cursor_id"></span>`cursor_id` | `string` | | Optional multi-cursor instance id. Default: 'default'. |
| <span id="click--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="click--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="click--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="click--linux--from_zoom"></span>`from_zoom` | `boolean` | | Set true after a zoom call to auto-translate zoom-image pixel coordinates back to full-window space. |
| <span id="click--linux--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the action: cmd, shift, option/alt, ctrl. |
| <span id="click--linux--pid"></span>`pid` | `integer` | | Target process ID. Required unless scope is "desktop". |
| <span id="click--linux--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Coordinate frame (default "window"). Pass "desktop" with x,y and no pid/window_id for a screen-absolute click in get_desktop_state coordinates. |
-| <span id="click--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="click--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
| <span id="click--linux--x"></span>`x` | `number` | | Window-local pixel X of the target window's own get_window_state screenshot (0..screenshot_width). For get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"). |
| <span id="click--linux--y"></span>`y` | `number` | | Window-local pixel Y of the target window's own get_window_state screenshot (0..screenshot_height); see x. |
@@ -89,34 +85,32 @@ button: "left" (default), "right", or "middle". Defaults to left so the field is
</Tab>
<Tab value="Windows">
-Left-click against a target pid. **Prefer `element_index` over pixel coordinates**: element_index works on backgrounded / minimized / hidden / off-desktop windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for `x, y` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the UIA tree.
+Left-click against a target pid. **Prefer `element_token` over pixel coordinates**: element_token works on backgrounded / minimized / hidden / off-desktop windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for `x, y` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the UIA tree.
Two addressing modes:
-- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window): performs the UIA Invoke pattern on the cached element via PostMessage. No cursor move, no focus steal. Requires a prior `get_window_state(pid, window_id)` in this turn; the element_index cache is scoped per (pid, window_id) and is replaced by the next snapshot of the same window.
+- `element_token` (from the last `get_window_state` snapshot of that window): performs the UIA Invoke pattern on the cached element via PostMessage. No cursor move, no focus steal. Requires a prior `get_window_state(pid, window_id)` in this turn; the token is stale once the next snapshot of the same window replaces it.
-- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`). On `delivery_mode:"background"` (the default), cua-driver FIRST does a UIA hit-test at the resolved screen position: if the deepest invokable element under that point exposes `InvokePattern`, it's invoked through the accessibility channel; same background-safe path as the `element_index` mode, no foreground swap, no visible flash. **This makes pixel clicks on UWP / WinUI3 / Win11 packaged apps work flash-free out of the box**: agents should default to `delivery_mode:"background"` even on XAML hosts whose CoreInput dispatcher drops raw PostMessage. The PostMessage(WM_LBUTTONDOWN/UP) fallback only runs when the UIA hit-test misses (canvas / video / WebGL / custom-drawn surfaces with no UIA peer), and on those targets `delivery_mode:"background"` returns a structured `background_unavailable` error if PostMessage is known to drop too: at which point you switch to `delivery_mode:"foreground"`. **Always try the default `background` click first and let that error be your signal: do NOT pass `foreground` preemptively because the target 'looks like' GTK/Chromium/etc. The driver decides when background is impossible; a guessed foreground click needlessly steals the user's focus.** `count: 2` posts two down/up pairs for a double-click. Pixel clicks need a visible on-screen window to anchor the coordinate conversion (errors with `pid X has no on-screen window` otherwise).
+- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`). On `delivery_mode:"background"` (the default), cua-driver FIRST does a UIA hit-test at the resolved screen position: if the deepest invokable element under that point exposes `InvokePattern`, it's invoked through the accessibility channel; same background-safe path as the `element_token` mode, no foreground swap, no visible flash. **This makes pixel clicks on UWP / WinUI3 / Win11 packaged apps work flash-free out of the box**: agents should default to `delivery_mode:"background"` even on XAML hosts whose CoreInput dispatcher drops raw PostMessage. The PostMessage(WM_LBUTTONDOWN/UP) fallback only runs when the UIA hit-test misses (canvas / video / WebGL / custom-drawn surfaces with no UIA peer), and on those targets `delivery_mode:"background"` returns a structured `background_unavailable` error if PostMessage is known to drop too: at which point you switch to `delivery_mode:"foreground"`. **Always try the default `background` click first and let that error be your signal: do NOT pass `foreground` preemptively because the target 'looks like' GTK/Chromium/etc. The driver decides when background is impossible; a guessed foreground click needlessly steals the user's focus.** `count: 2` posts two down/up pairs for a double-click. Pixel clicks need a visible on-screen window to anchor the coordinate conversion (errors with `pid X has no on-screen window` otherwise).
-Exactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required for window scope and omitted for desktop scope. `window_id` is required when `element_index` is used (scopes the cache lookup). After a `zoom` call, pass `from_zoom=true` to auto-translate zoom-image coords back to full-window space.
+Exactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required for window scope and omitted for desktop scope. After a `zoom` call, pass `from_zoom=true` to auto-translate zoom-image coords back to full-window space.
-Windows-only convenience: `button: "left"|"right"|"middle"` switches the mouse button (Swift exposes right-click as a separate `right_click` tool). The Swift-only `action` / `modifier` / `debug_image_out` schema fields aren't supported yet.
+Windows-only convenience: `button: "left"|"right"|"middle"` switches the mouse button (Swift exposes right-click as a separate `right_click` tool). `action: "expand"` on an `element_token` opens the element through UIA ExpandCollapsePattern (the dropdown half of an MSAA split button); other actions use the default invoke. `debug_image_out` isn't supported yet.
**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="click--windows--action"></span>`action` | `string` | | Accessibility action for an element_token target. "expand" opens the element through UIA ExpandCollapsePattern, or clicks the dropdown half of an MSAA split button. Omit for the default invoke. |
| <span id="click--windows--button"></span>`button` | `"left" \| "right" \| "middle"` | | Mouse button. Default "left". |
| <span id="click--windows--capture_id"></span>`capture_id` | `string` | | Optional ID from get_window_state or get_desktop_state. When present, x and y are admitted against that exact capture and the ID is consumed before native dispatch. |
| <span id="click--windows--count"></span>`count` | `integer` | | Click count: 1 (single), 2 (double), 3 (triple). Default 1. Range: 1 to 3. |
| <span id="click--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="click--windows--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="click--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="click--windows--from_zoom"></span>`from_zoom` | `boolean` | | When true, x and y are pixel coordinates in the last `zoom` image for this pid. The driver maps them back to window coords. |
| <span id="click--windows--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the action: cmd, shift, option/alt, ctrl. |
| <span id="click--windows--pid"></span>`pid` | `integer` | | Target process ID for window scope. Omit with scope=desktop for screen-absolute coordinates from get_desktop_state. |
| <span id="click--windows--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Coordinate frame (default "window"). Pass "desktop" with x,y and no pid/window_id for a screen-absolute click in get_desktop_state coordinates. |
-| <span id="click--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="click--windows--window_id"></span>`window_id` | `integer` | | HWND for the window whose get_window_state produced the element_index. Required when element_index is used. Optional when element_token is supplied (the token carries it). |
+| <span id="click--windows--window_id"></span>`window_id` | `integer` | | HWND of the target window. Omit when element_token is supplied (the token carries it). |
| <span id="click--windows--x"></span>`x` | `number` | | X in window-local screenshot pixels: same space as the PNG get_window_state returns. Must be provided together with y. |
| <span id="click--windows--y"></span>`y` | `number` | | Y in window-local screenshot pixels. Must be provided together with x. |
@@ -127,5 +121,6 @@ Windows-only convenience: `button: "left"|"right"|"middle"` switches the mouse b
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="click--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="click--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="click--target"></span>`target` | `window target \| desktop target` | | Exact capture/input target selected independently for each action. `display_id="primary"` is the portable desktop target in this release. Platforms that cannot address another display reject it explicitly rather than silently changing coordinate spaces. |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/double-and-right-click.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/double-and-right-click.mdx
index 48ea6aadb1..85ad4cdda2 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/double-and-right-click.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/double-and-right-click.mdx
@@ -37,7 +37,6 @@ Pixel path (x, y provided): two down/up pairs ~80 ms apart at the given coordina
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="double_click--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": inject without fronting or raising the target; no focus steal. "foreground": briefly front the target, act, then restore the prior frontmost; the explicit last resort when a background attempt didn't land. Re-call with "foreground" only for the action that needs it. |
-| <span id="double_click--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="double_click--macos--window_id"></span>`window_id` | `integer` | | CGWindowID. Omit when element_token is supplied (the token carries it). |
| <span id="double_click--macos--x"></span>`x` | `number` | | Screen X coordinate (pixel path). |
| <span id="double_click--macos--y"></span>`y` | `number` | | Screen Y coordinate (pixel path). |
@@ -45,7 +44,7 @@ Pixel path (x, y provided): two down/up pairs ~80 ms apart at the given coordina
</Tab>
<Tab value="Linux">
-Double-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to). No focus steal. Provide either (window_id + x/y) or (pid + element_index). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.
+Double-click at (x,y) or an element_token (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to). No focus steal. Provide either (window_id + x/y) or (pid + element_token). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.
**Linux parameters**
@@ -54,10 +53,7 @@ Double-click at (x,y) or an element_index (AT-SPI bounds). Background delivery o
| <span id="double_click--linux--coordinate_frame"></span>`coordinate_frame` | `"window" \| "desktop"` | | Frame of x/y (and from_x/from_y/to_x/to_y). Default "window": window-local screenshot pixels as returned by get_window_state. "desktop": full-screen pixels as returned by get_desktop_state, translated to the target window. Passing scope:"desktop" together with pid/window_id means the same thing. |
| <span id="double_click--linux--cursor_id"></span>`cursor_id` | `string` | | Optional multi-cursor instance id. Default: 'default'. |
| <span id="double_click--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="double_click--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="double_click--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="double_click--linux--from_zoom"></span>`from_zoom` | `boolean` | | Set true after a zoom call to auto-translate zoom-image pixel coordinates back to full-window space. |
-| <span id="double_click--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="double_click--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
| <span id="double_click--linux--x"></span>`x` | `number` | | Window-local pixel X of the target window's own get_window_state screenshot (0..screenshot_width). For get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"). |
| <span id="double_click--linux--y"></span>`y` | `number` | | Window-local pixel Y of the target window's own get_window_state screenshot (0..screenshot_height); see x. |
@@ -67,23 +63,20 @@ Double-click at (x,y) or an element_index (AT-SPI bounds). Background delivery o
Double-click against a target pid. Two addressing modes:
-- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window): synthesizes a stamped pixel double-click at the element's cached on-screen center via PostMessage. (Windows has no AXOpen analogue; Swift's AXOpen-first path falls through to the same pixel recipe when the element doesn't advertise AXOpen, so the user-visible behavior matches.)
+- `element_token` (from the last `get_window_state` snapshot of that window): synthesizes a stamped pixel double-click at the element's cached on-screen center via PostMessage. (Windows has no AXOpen analogue; Swift's AXOpen-first path falls through to the same pixel recipe when the element doesn't advertise AXOpen, so the user-visible behavior matches.)
- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`): posts two WM_LBUTTONDOWN/UP pairs in quick succession to the deepest child window at that point.
-Exactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required in both modes. `window_id` is required when `element_index` is used. The macOS-only `modifier` field is accepted for parity (no-op on Windows: PostMessage doesn't propagate modifier-key state).
+Exactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required in both modes. The macOS-only `modifier` field is accepted for parity (no-op on Windows: PostMessage doesn't propagate modifier-key state).
**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="double_click--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="double_click--windows--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="double_click--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="double_click--windows--from_zoom"></span>`from_zoom` | `boolean` | | After a zoom call, pass true to translate zoom-image coords back to window space. |
| <span id="double_click--windows--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the action: cmd, shift, option/alt, ctrl. |
-| <span id="double_click--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="double_click--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it). |
+| <span id="double_click--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Omit when element_token is supplied (the token carries it). |
| <span id="double_click--windows--x"></span>`x` | `number` | | X in window-local screenshot pixels. Must be provided together with y. |
| <span id="double_click--windows--y"></span>`y` | `number` | | Y in window-local screenshot pixels. Must be provided together with x. |
@@ -94,6 +87,7 @@ Exactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is requi
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="double_click--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="double_click--pid"></span>`pid` | `integer` | required | Target process ID. |
| <span id="double_click--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
@@ -123,7 +117,6 @@ Exactly one of `element_token` or (`x` AND `y`) must be provided. `pid` always r
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="right_click--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": inject without fronting or raising the target; no focus steal. "foreground": briefly front the target, act, then restore the prior frontmost; the explicit last resort when a background attempt didn't land. Re-call with "foreground" only for the action that needs it. |
-| <span id="right_click--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="right_click--macos--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the right-click: cmd/shift/option/ctrl. Pixel path only. |
| <span id="right_click--macos--window_id"></span>`window_id` | `integer` | | CGWindowID. Omit when element_token is supplied (the token carries it). |
| <span id="right_click--macos--x"></span>`x` | `number` | | X in window-local screenshot pixels. Must be provided together with y. |
@@ -132,7 +125,7 @@ Exactly one of `element_token` or (`x` AND `y`) must be provided. `pid` always r
</Tab>
<Tab value="Linux">
-Right-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to), one outside the window is refused (point_outside_window; x/y are window-local pixels, the result reports window_point / screen_point). No focus steal. When a context menu opens, the result names it (`popup: {window_id, bounds, title}`): call get_window_state(pid, window_id=&lt;that id&gt;) to index its menu items and click them by element_index. Provide either (window_id + x/y) or (pid + element_index). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.
+Right-click at (x,y) or an element_token (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to), one outside the window is refused (point_outside_window; x/y are window-local pixels, the result reports window_point / screen_point). No focus steal. When a context menu opens, the result names it (`popup: {window_id, bounds, title}`): call get_window_state(pid, window_id=&lt;that id&gt;) to index its menu items and click them by element_token. Provide either (window_id + x/y) or (pid + element_token). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.
**Linux parameters**
@@ -141,11 +134,8 @@ Right-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on
| <span id="right_click--linux--coordinate_frame"></span>`coordinate_frame` | `"window" \| "desktop"` | | Frame of x/y (and from_x/from_y/to_x/to_y). Default "window": window-local screenshot pixels as returned by get_window_state. "desktop": full-screen pixels as returned by get_desktop_state, translated to the target window. Passing scope:"desktop" together with pid/window_id means the same thing. |
| <span id="right_click--linux--cursor_id"></span>`cursor_id` | `string` | | Optional multi-cursor instance id. Default: 'default'. |
| <span id="right_click--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="right_click--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="right_click--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="right_click--linux--from_zoom"></span>`from_zoom` | `boolean` | | Set true after a zoom call to auto-translate zoom-image pixel coordinates back to full-window space. |
| <span id="right_click--linux--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the action: cmd, shift, option/alt, ctrl. |
-| <span id="right_click--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="right_click--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
| <span id="right_click--linux--x"></span>`x` | `number` | | Window-local pixel X of the target window's own get_window_state screenshot (0..screenshot_width). For get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"). |
| <span id="right_click--linux--y"></span>`y` | `number` | | Window-local pixel Y of the target window's own get_window_state screenshot (0..screenshot_height); see x. |
@@ -155,23 +145,20 @@ Right-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on
Right-click against a target pid. Two addressing modes:
-- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window): posts WM_RBUTTONDOWN/UP at the element's cached on-screen center via PostMessage. (Windows has no AXShowMenu analogue wired up yet; Swift's AX-action path falls through to the same pixel recipe on non-advertising elements, so user-visible behavior matches.)
+- `element_token` (from the last `get_window_state` snapshot of that window): posts WM_RBUTTONDOWN/UP at the element's cached on-screen center via PostMessage. (Windows has no AXShowMenu analogue wired up yet; Swift's AX-action path falls through to the same pixel recipe on non-advertising elements, so user-visible behavior matches.)
- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`): posts WM_RBUTTONDOWN/UP to the deepest child window at that point.
-Exactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required in both modes. `window_id` is required when `element_index` is used. `modifier` is accepted for parity (no-op on Windows: PostMessage doesn't propagate modifier-key state).
+Exactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required in both modes. `modifier` is accepted for parity (no-op on Windows: PostMessage doesn't propagate modifier-key state).
**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="right_click--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="right_click--windows--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="right_click--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="right_click--windows--from_zoom"></span>`from_zoom` | `boolean` | | After a zoom call, pass true to translate zoom-image coords back to window space. |
| <span id="right_click--windows--modifier"></span>`modifier` | `string[]` | | Modifier keys held during the action: cmd, shift, option/alt, ctrl. |
-| <span id="right_click--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="right_click--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it). |
+| <span id="right_click--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Omit when element_token is supplied (the token carries it). |
| <span id="right_click--windows--x"></span>`x` | `number` | | X in window-local screenshot pixels. Must be provided together with y. |
| <span id="right_click--windows--y"></span>`y` | `number` | | Y in window-local screenshot pixels. Must be provided together with x. |
@@ -182,6 +169,7 @@ Exactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is requi
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="right_click--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="right_click--pid"></span>`pid` | `integer` | required | Target process ID. |
| <span id="right_click--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/keyboard.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/keyboard.mdx
index 0b5ec5e86e..14f30c557a 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/keyboard.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/keyboard.mdx
@@ -52,14 +52,12 @@ Type text to a window via XSendEvent (KeyPress/KeyRelease). No focus steal.
| --- | --- | --- | --- |
| <span id="type_text--linux--coordinate_frame"></span>`coordinate_frame` | `"window" \| "desktop"` | | Frame of x/y (and from_x/from_y/to_x/to_y). Default "window": window-local screenshot pixels as returned by get_window_state. "desktop": full-screen pixels as returned by get_desktop_state, translated to the target window. Passing scope:"desktop" together with pid/window_id means the same thing. |
| <span id="type_text--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="type_text--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="type_text--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
+| <span id="type_text--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="type_text--linux--pid"></span>`pid` | `integer` | | Target process ID. Omit with scope "desktop" to type into the focused application. |
| <span id="type_text--linux--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use "desktop" with no pid to type into the focused application. Default "window". |
-| <span id="type_text--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="type_text--linux--text"></span>`text` | `string` | required | Text to type. |
-| <span id="type_text--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
-| <span id="type_text--linux--x"></span>`x` | `number` | | Pixel X of the field to type into: the element px action form. Pass x,y (no element_index) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the AX path can't reach. Window-local pixels of the target window's own get_window_state screenshot by default (same convention as click); for get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"): a bare pid+x/y is otherwise misinterpreted as window-local and can focus the wrong widget. |
+| <span id="type_text--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y; optional with element_token (the token carries it). |
+| <span id="type_text--linux--x"></span>`x` | `number` | | Pixel X of the field to type into: the element px action form. Pass x,y (no element_token) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the AX path can't reach. Window-local pixels of the target window's own get_window_state screenshot by default (same convention as click); for get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"): a bare pid+x/y is otherwise misinterpreted as window-local and can focus the wrong widget. |
| <span id="type_text--linux--y"></span>`y` | `number` | | Pixel Y of the field (see x). |
</Tab>
@@ -69,7 +67,7 @@ Insert text into the target pid via character-by-character PostMessage(WM_CHAR)
Special keys (Return, Escape, arrows, Tab) go through `press_key` / `hotkey`: they are not text.
-**Routing on Windows.** When the target's owning EXE or top-level window class identifies it as a XAML / WinUI3 / UWP host (modern Notepad, Calculator, Photos, Settings, etc.), the tool requires `element_index` + `window_id` and routes through UI Automation's `ValuePattern.SetValue`: same backend as the `set_value` tool. PostMessage WM_CHAR doesn't reach those hosts (their CoreInput dispatcher only consumes events from the system input queue), so the fallback path silently dropped chars. If you call `type_text(pid, text)` on a XAML host without `element_index`, the tool returns an actionable error pointing you at `get_window_state` first. Native ConsoleHost on Windows ARM64 is hard-refused because it can accept synthesized Unicode events without delivering them; use a process or PTY setup channel instead. Legacy Win32 apps still use the PostMessage path, preserving the no-focus-steal property.
+**Routing on Windows.** When the target's owning EXE or top-level window class identifies it as a XAML / WinUI3 / UWP host (modern Notepad, Calculator, Photos, Settings, etc.), the tool requires `element_token` and routes through UI Automation's `ValuePattern.SetValue`: same backend as the `set_value` tool. PostMessage WM_CHAR doesn't reach those hosts (their CoreInput dispatcher only consumes events from the system input queue), so the fallback path silently dropped chars. If you call `type_text(pid, text)` on a XAML host without `element_token`, the tool returns an actionable error pointing you at `get_window_state` first. Native ConsoleHost on Windows ARM64 is hard-refused because it can accept synthesized Unicode events without delivering them; use a process or PTY setup channel instead. Legacy Win32 apps still use the PostMessage path, preserving the no-focus-steal property.
`delay_ms` (0–200, default 30) spaces successive characters on the PostMessage path so autocomplete and IME can keep up. Ignored on the UIA path (SetValue is atomic).
@@ -79,14 +77,12 @@ Special keys (Return, Escape, arrows, Tab) go through `press_key` / `hotkey`: th
| --- | --- | --- | --- |
| <span id="type_text--windows--delay_ms"></span>`delay_ms` | `integer` | | Milliseconds between characters. Default 30. Range: 0 to 200. |
| <span id="type_text--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="type_text--windows--element_index"></span>`element_index` | `integer` | | Element index from the last get_window_state for the same (pid, window_id). When supplied, type_text writes through UIA ValuePattern and reads that exact element back by handle. The shared ActionResult is confirmed only when the complete expected value is synchronously visible. If SetValue succeeds but read-back is stale or unavailable, the result is unverifiable with no escalation; take a fresh snapshot before retrying because deferred providers may publish only after this call returns. Requires window_id. |
-| <span id="type_text--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
+| <span id="type_text--windows--element_token"></span>`element_token` | `string` | | Opaque element handle from get_window_state. When supplied, type_text writes through UIA ValuePattern and reads that exact element back by handle. The shared ActionResult is confirmed only when the complete expected value is synchronously visible. If SetValue succeeds but read-back is stale or unavailable, the result is unverifiable with no escalation; take a fresh snapshot before retrying because deferred providers may publish only after this call returns. |
| <span id="type_text--windows--pid"></span>`pid` | `integer` | | Target process ID. |
| <span id="type_text--windows--scope"></span>`scope` | `"window" \| "desktop"` | | Use desktop with no pid/window_id to type into the current foreground application. |
-| <span id="type_text--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="type_text--windows--text"></span>`text` | `string` | required | Text to insert at the focused element's cursor. |
-| <span id="type_text--windows--window_id"></span>`window_id` | `integer` | | HWND of the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it). |
-| <span id="type_text--windows--x"></span>`x` | `number` | | Window-local screenshot-pixel X of the field to type into: the element px action form. Pass x,y (no element_index) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the UIA/WM_CHAR path can't reach. Read straight off the get_window_state PNG, same convention as click. |
+| <span id="type_text--windows--window_id"></span>`window_id` | `integer` | | HWND of the target window. Omit when element_token is supplied (the token carries it). |
+| <span id="type_text--windows--x"></span>`x` | `number` | | Window-local screenshot-pixel X of the field to type into: the element px action form. Pass x,y (no element_token) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the UIA/WM_CHAR path can't reach. Read straight off the get_window_state PNG, same convention as click. |
| <span id="type_text--windows--y"></span>`y` | `number` | | Window-local screenshot-pixel Y of the field (see x). |
</Tab>
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/keys-and-shortcuts.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/keys-and-shortcuts.mdx
index 7158c32154..c822dd94ea 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/keys-and-shortcuts.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/keys-and-shortcuts.mdx
@@ -37,7 +37,6 @@ A key press is confirmed only when a bounded native AX value/selection read-back
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="press_key--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": inject without fronting or raising the target; no focus steal. "foreground": briefly front the target, act, then restore the prior frontmost; the explicit last resort when a background attempt didn't land. Re-call with "foreground" only for the action that needs it. |
-| <span id="press_key--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="press_key--macos--key"></span>`key` | `string` | required | Key name: return, tab, escape, up, down, etc. |
| <span id="press_key--macos--modifiers"></span>`modifiers` | `string[]` | | Modifier keys: cmd, shift, option/alt, ctrl, fn. |
| <span id="press_key--macos--pid"></span>`pid` | `integer` | | Target process ID. |
@@ -57,15 +56,12 @@ Press a key via XSendEvent to a window. No focus steal.
| --- | --- | --- | --- |
| <span id="press_key--linux--coordinate_frame"></span>`coordinate_frame` | `"window" \| "desktop"` | | Frame of x/y (and from_x/from_y/to_x/to_y). Default "window": window-local screenshot pixels as returned by get_window_state. "desktop": full-screen pixels as returned by get_desktop_state, translated to the target window. Passing scope:"desktop" together with pid/window_id means the same thing. |
| <span id="press_key--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="press_key--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="press_key--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="press_key--linux--key"></span>`key` | `string` | required | Key name: enter/return, tab, escape, space, backspace, delete, insert, home, end, pageup, pagedown, up, down, left, right, f1-f12, or any single ASCII character. |
| <span id="press_key--linux--modifiers"></span>`modifiers` | `string[]` | | Modifier keys held while the key is pressed: ctrl, shift, alt, super. |
| <span id="press_key--linux--pid"></span>`pid` | `integer` | | Target process ID. Omit with scope "desktop" to send the key to the focused application. |
| <span id="press_key--linux--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use "desktop" with no pid to send the key to the focused application. Default "window". |
-| <span id="press_key--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="press_key--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
-| <span id="press_key--linux--x"></span>`x` | `number` | | Pixel X: the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the AX path can't focus. Pass with y, no element_index. Window-local pixels by default (same convention as click); for get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"). |
+| <span id="press_key--linux--x"></span>`x` | `number` | | Pixel X: the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the AX path can't focus. Pass with y, no element_token. Window-local pixels by default (same convention as click); for get_desktop_state pixels pass scope:"desktop" (or coordinate_frame:"desktop"). |
| <span id="press_key--linux--y"></span>`y` | `number` | | Pixel Y (see x). |
</Tab>
@@ -77,22 +73,19 @@ Optional `window_id` selects a specific HWND when the pid owns more than one; wi
Key vocabulary: return, tab, escape, up/down/left/right, space, delete, home, end, pageup, pagedown, f1-f12, plus any letter or digit. Optional `modifiers` array takes ctrl/shift/alt/win. For true combinations (ctrl+c), `hotkey` is a cleaner surface.
-`element_index` focuses the cached UIA element before sending the key; the top-level window remains backgrounded when delivery_mode is background.
+`element_token` focuses the cached UIA element before sending the key; the top-level window remains backgrounded when delivery_mode is background.
**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="press_key--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="press_key--windows--element_index"></span>`element_index` | `integer` | | Optional element_index from the last get_window_state; focuses that UIA element before the key is delivered. |
-| <span id="press_key--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="press_key--windows--key"></span>`key` | `string` | required | Key name (return, tab, escape, up, down, left, right, space, delete, home, end, pageup, pagedown, f1-f12, letter, digit). |
| <span id="press_key--windows--modifiers"></span>`modifiers` | `string[]` | | Optional modifier names held while the key is pressed (ctrl/shift/alt/win). |
| <span id="press_key--windows--pid"></span>`pid` | `integer` | | Target process ID. |
| <span id="press_key--windows--scope"></span>`scope` | `"window" \| "desktop"` | | Use desktop with no pid/window_id to send the key to the current foreground application. |
-| <span id="press_key--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="press_key--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Required when element_index is used; otherwise auto-resolves the pid's first visible window. |
-| <span id="press_key--windows--x"></span>`x` | `number` | | Window-local screenshot-pixel X: the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the UIA path can't focus. Pass with y, no element_index. |
+| <span id="press_key--windows--window_id"></span>`window_id` | `integer` | | HWND for the target window. Omit when element_token is supplied; otherwise auto-resolves the pid's first visible window. |
+| <span id="press_key--windows--x"></span>`x` | `number` | | Window-local screenshot-pixel X: the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the UIA path can't focus. Pass with y, no element_token. |
| <span id="press_key--windows--y"></span>`y` | `number` | | Window-local screenshot-pixel Y (see x). |
</Tab>
@@ -102,6 +95,7 @@ Key vocabulary: return, tab, escape, up/down/left/right, space, delete, home, en
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="press_key--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="press_key--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="press_key--target"></span>`target` | `window target \| desktop target` | | Preferred per-call target: an exact window (`kind="window"`, `pid`, `window_id`) or the primary desktop (`kind="desktop"`, `display_id="primary"`). |
@@ -131,7 +125,6 @@ Recognized modifiers: cmd/command, shift, option/alt, ctrl/control, fn. Non-modi
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="hotkey--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": inject without fronting or raising the target; no focus steal. "foreground": briefly front the target, act, then restore the prior frontmost; the explicit last resort when a background attempt didn't land. Re-call with "foreground" only for the action that needs it. |
-| <span id="hotkey--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="hotkey--macos--keys"></span>`keys` | `string[]` | required | Modifier(s) and one non-modifier key, e.g. ["cmd", "c"]. Items: 2 to any. |
| <span id="hotkey--macos--pid"></span>`pid` | `integer` | | Target process ID. |
| <span id="hotkey--macos--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use desktop with no pid/window_id to send the chord to the frontmost application. |
@@ -149,12 +142,9 @@ Press a combination of keys simultaneously, e.g. ["ctrl","c"] for Copy. Delivere
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="hotkey--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="hotkey--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="hotkey--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="hotkey--linux--keys"></span>`keys` | `string[]` | required | Modifier(s) + one non-modifier key, e.g. ["ctrl","c"]. Items: 2 to any. |
| <span id="hotkey--linux--pid"></span>`pid` | `integer` | | Target process ID. Omit with scope "desktop" to send the chord to the focused application. |
| <span id="hotkey--linux--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use "desktop" with no pid to send the chord to the focused application. Default "window". |
-| <span id="hotkey--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="hotkey--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
| <span id="hotkey--linux--x"></span>`x` | `number` | | Screenshot-pixel X: the element px action form: pixel-click there to focus, then send the combo (so e.g. Ctrl+V pastes into that field). Pass with y. Use for Chromium/Electron surfaces the background combo can't reach. |
| <span id="hotkey--linux--y"></span>`y` | `number` | | Screenshot-pixel Y (see x). |
@@ -181,12 +171,9 @@ Recognized modifiers: ctrl/control, shift, alt, win/windows. Non-modifier keys u
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="hotkey--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="hotkey--windows--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="hotkey--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="hotkey--windows--keys"></span>`keys` | `string[]` | required | Modifier(s) and one non-modifier key, e.g. ["ctrl", "c"]. Items: 2 to any. |
| <span id="hotkey--windows--pid"></span>`pid` | `integer` | | Target process ID. |
| <span id="hotkey--windows--scope"></span>`scope` | `"window" \| "desktop"` | | Use desktop with no pid/window_id to send the hotkey to the current foreground application. |
-| <span id="hotkey--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
| <span id="hotkey--windows--window_id"></span>`window_id` | `integer` | | Explicit HWND when the pid owns multiple windows. |
| <span id="hotkey--windows--x"></span>`x` | `number` | | Window-local screenshot-pixel X: the element px action form: pixel-click there to focus, then send the combo (so e.g. Ctrl+V pastes into that field). Pass with y. Use for Chromium/Electron surfaces the background combo can't reach. |
| <span id="hotkey--windows--y"></span>`y` | `number` | | Window-local screenshot-pixel Y (see x). |
@@ -198,6 +185,7 @@ Recognized modifiers: ctrl/control, shift, alt, win/windows. Non-modifier keys u
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="hotkey--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="hotkey--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="hotkey--target"></span>`target` | `window target \| desktop target` | | Preferred per-call target: an exact window (`kind="window"`, `pid`, `window_id`) or the primary desktop (`kind="desktop"`, `display_id="primary"`). |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/maintenance.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/maintenance.mdx
index 1ec02062ff..82934ce9a8 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/maintenance.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/maintenance.mdx
@@ -32,12 +32,6 @@ Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
Return the current cua-driver-rs configuration.
-**Parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="get_config--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
</Tab>
<Tab value="Linux">
@@ -66,6 +60,12 @@ Current schema (Windows):
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="get_config--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
## `set_config`
Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
@@ -85,7 +85,6 @@ Note: capture_mode is a per-call param (on get_window_state / click), not a stor
| <span id="set_config--macos--experimental_pip_geometry"></span>`experimental_pip_geometry` | `string` | | PiP window size + optional position in `WxH` or `WxH+X+Y` form (e.g. `320x200+24+24`). Applies on next daemon restart. |
| <span id="set_config--macos--key"></span>`key` | `string` | | Name of a single config field to write (&#123;key, value&#125; shape, matching the CLI `config set` and the Windows/Linux tools). Pair with `value`. Equivalent to passing the field directly. |
| <span id="set_config--macos--max_image_dimension"></span>`max_image_dimension` | `integer` | | Max dimension for screenshot resizing (0 = no limit). |
-| <span id="set_config--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
</Tab>
<Tab value="Linux">
@@ -142,6 +141,7 @@ Returns the full updated config in the same shape as `get_config`.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="set_config--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="set_config--value"></span>`value` | `any` | | New value for `key`. JSON type depends on the key. |
## `check_permissions`
@@ -155,13 +155,12 @@ Report TCC permission status for Accessibility and Screen Recording. By default
Returns: `accessibility` + `screen_recording` (booleans from the TCC preflight APIs), `screen_recording_capturable` (a live ScreenCaptureKit probe when `prompt` is true; null on read-only calls), `direct_capture_status` (`ready`, `unavailable`, `timed_out`, `probe_failed`, `blocked_by_screen_recording`, or `not_checked`), `direct_capture_error` (a structured timeout/probe failure when applicable), `direct_capture_verification` (validated source, UTC time, and bundle identity from an explicit grant probe), and `source` (which TCC identity the booleans reflect: the CuaDriver daemon vs the launching terminal/IDE). macOS attributes grants to the responsible process, so a standalone call from a terminal reports the terminal's grants, not the driver's. The prompt-capable ScreenCaptureKit probe never runs when `prompt` is false. Pass `probe_direct_capture:false` with `prompt:true` to register/request only the two required TCC grants before separately explaining Tahoe's direct-capture consent.
-**Parameters**
+**macOS parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="check_permissions--macos--probe_direct_capture"></span>`probe_direct_capture` | `boolean` | | When prompting and Screen Recording is granted, also run the live ScreenCaptureKit probe that may raise Tahoe's direct-capture consent. Default true. Set false for a staged Accessibility/Screen Recording request. |
| <span id="check_permissions--macos--prompt"></span>`prompt` | `boolean` | `false` | Raise the system permission prompts for missing grants. Default false; only a trusted host setup route may set true. |
-| <span id="check_permissions--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
</Tab>
<Tab value="Linux">
@@ -176,110 +175,13 @@ Check required permissions for cua-driver-rs on Windows.
</Tab>
</Tabs>
-## `health_report`
-
-Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
-Single-call end-to-end driver diagnostics. Designed to let downstream consumers ship one stable call instead of stitching together check_permissions, doctor, version, bundle attribution, and platform capability status. On macOS, prompt-capable direct capture is deliberately skipped; use `cua-driver permissions grant` to verify it explicitly. cua-driver owns the health model; consumers stay thin.
-
-Input: all optional:
- &#123;
- "include": ["&lt;check_name&gt;", ...], // run only these
- "skip": ["&lt;check_name&gt;", ...] // skip these
- &#125;
-If both are given, `include` wins.
-
-Canonical check names:
- macOS : binary_version, platform_supported, session_active,
- bundle_identity, tcc_accessibility, tcc_screen_recording,
- ax_capability, screen_capture_capability
- Windows: binary_version, platform_supported, session_active,
- ax_capability (via UIA), screen_capture_capability (via DXGI)
- Linux : binary_version, platform_supported, session_active,
- ax_capability (via AT-SPI), screen_capture_capability (via X11)
-
-Output: stable contract, schema_version="1":
- &#123;
- "schema_version": "1",
- "platform": "darwin" | "win32" | "linux",
- "driver_version": "&lt;semver&gt;",
- "overall": "ok" | "degraded" | "failed",
- "checks": [
- &#123;
- "name": "&lt;one of the canonical names above&gt;",
- "status": "pass" | "fail" | "skip",
- "message": "&lt;one-line summary, always present&gt;",
- "hint": "&lt;remediation step, present when status=fail&gt;",
- "data": &#123; /* check-specific structured fields */ &#125;
- &#125;,
- ...
- ]
- &#125;
-
-`overall` rules:
- - `ok` : every non-skipped check passes
- - `degraded`: at least one non-core check fails (binary is still usable)
- - `failed` : any core check fails (binary_version, platform_supported, session_active)
-
-Stability: schema_version="1" is the contract. Future breaking changes will be `"2"`. Adding new check names under the same schema_version is non-breaking; consumers must tolerate unknown check names.
-
-**macOS parameters**
+**Parameters on every platform**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="health_report--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Single-call end-to-end driver diagnostics. Designed to let downstream consumers ship one stable call instead of stitching together check_permissions, doctor, version, bundle attribution, and platform capability status. On macOS, prompt-capable direct capture is deliberately skipped; use `cua-driver permissions grant` to verify it explicitly. cua-driver owns the health model; consumers stay thin.
-
-Input: all optional:
- &#123;
- "include": ["&lt;check_name&gt;", ...], // run only these
- "skip": ["&lt;check_name&gt;", ...] // skip these
- &#125;
-If both are given, `include` wins.
-
-Canonical check names:
- macOS : binary_version, platform_supported, session_active,
- bundle_identity, tcc_accessibility, tcc_screen_recording,
- ax_capability, screen_capture_capability
- Windows: binary_version, platform_supported, session_active,
- ax_capability (via UIA), screen_capture_capability (via DXGI)
- Linux : binary_version, platform_supported, session_active,
- ax_capability (via AT-SPI), screen_capture_capability (via X11)
-
-Output: stable contract, schema_version="1":
- &#123;
- "schema_version": "1",
- "platform": "darwin" | "win32" | "linux",
- "driver_version": "&lt;semver&gt;",
- "overall": "ok" | "degraded" | "failed",
- "checks": [
- &#123;
- "name": "&lt;one of the canonical names above&gt;",
- "status": "pass" | "fail" | "skip",
- "message": "&lt;one-line summary, always present&gt;",
- "hint": "&lt;remediation step, present when status=fail&gt;",
- "data": &#123; /* check-specific structured fields */ &#125;
- &#125;,
- ...
- ]
- &#125;
-
-`overall` rules:
- - `ok` : every non-skipped check passes
- - `degraded`: at least one non-core check fails (binary is still usable)
- - `failed` : any core check fails (binary_version, platform_supported, session_active)
-
-Stability: schema_version="1" is the contract. Future breaking changes will be `"2"`. Adding new check names under the same schema_version is non-breaking; consumers must tolerate unknown check names.
+| <span id="check_permissions--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-</Tab>
-<Tab value="Windows">
+## `health_report`
Single-call end-to-end driver diagnostics. Designed to let downstream consumers ship one stable call instead of stitching together check_permissions, doctor, version, bundle attribution, and platform capability status. On macOS, prompt-capable direct capture is deliberately skipped; use `cua-driver permissions grant` to verify it explicitly. cua-driver owns the health model; consumers stay thin.
@@ -324,78 +226,35 @@ Output: stable contract, schema_version="1":
Stability: schema_version="1" is the contract. Future breaking changes will be `"2"`. Adding new check names under the same schema_version is non-breaking; consumers must tolerate unknown check names.
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="health_report--include"></span>`include` | `string[]` | | Only run these checks (canonical names). Wins over `skip`. |
+| <span id="health_report--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="health_report--skip"></span>`skip` | `string[]` | | Skip these checks (canonical names). Ignored when `include` is set. |
## `check_for_update`
-Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Check the saved stable/nightly Cua Driver channel for a release on GitHub. Returns current and selected channels, current and latest versions, an `update_available` boolean, the install one-liner, and the release notes URL. Read-only: never installs. Pacman-owned Linux executables return package-manager guidance without checking GitHub. Mirror of `cua-driver check-update --json`.
-**Parameters**
+Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="check_for_update--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Check the saved stable/nightly Cua Driver channel for a release on GitHub. Returns current and selected channels, current and latest versions, an `update_available` boolean, the install one-liner, and the release notes URL. Read-only: never installs. Pacman-owned Linux executables return package-manager guidance without checking GitHub. Mirror of `cua-driver check-update --json`.
-
-</Tab>
-<Tab value="Windows">
-
-Check the saved stable/nightly Cua Driver channel for a release on GitHub. Returns current and selected channels, current and latest versions, an `update_available` boolean, the install one-liner, and the release notes URL. Read-only: never installs. Pacman-owned Linux executables return package-manager guidance without checking GitHub. Mirror of `cua-driver check-update --json`.
-
-</Tab>
-</Tabs>
+| <span id="check_for_update--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
## `install_extension`
-Effect: destructive. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Preview or install one Driver-managed optional extension. The first call without confirm returns the exact signed artifact, destination, license, source, and trust plan without mutation. Re-call with confirm=true to perform that exact verified installation.
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="install_extension--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Preview or install one Driver-managed optional extension. The first call without confirm returns the exact signed artifact, destination, license, source, and trust plan without mutation. Re-call with confirm=true to perform that exact verified installation.
-
-</Tab>
-<Tab value="Windows">
-
-Preview or install one Driver-managed optional extension. The first call without confirm returns the exact signed artifact, destination, license, source, and trust plan without mutation. Re-call with confirm=true to perform that exact verified installation.
-
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: destructive. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="install_extension--confirm"></span>`confirm` | `boolean` | | Install the previewed extension. Omit or false for a read-only plan. |
| <span id="install_extension--name"></span>`name` | `"perception"` | required | Extension to preview or install. Only perception (the local visual-region parser used by parse_visual_regions) is available. |
+| <span id="install_extension--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
**Example arguments**
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/page.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/page.mdx
index 148115fc6d..847e664eb6 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/page.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/page.mdx
@@ -10,8 +10,6 @@ description: "Read and act on web pages, and prepare and navigate browsers."
Version: 0.32.0
*/}
-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
-
| Tool | Description | Platforms |
| --- | --- | --- |
| [`page`](#page) | Legacy browser compatibility tool. | macOS, Linux, Windows |
@@ -23,31 +21,6 @@ Served by `cua-driver mcp`; see [MCP tools](/cua-driver/reference/mcp-tools) for
## `page`
-Effect: mutating. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
-Legacy browser compatibility tool. Prefer get_browser_state and the typed browser_* tools for exact targeting, endpoint ownership, and consent. Read-only get_text and query_dom remain available by default. Mutating actions require the daemon operator to set CUA_DRIVER_ENABLE_LEGACY_PAGE_MUTATIONS=1 before daemon startup (restart the daemon after changing it); this escape hatch does not provide the typed browser surface's exact binding or existing-profile grant guarantees. Supports Chrome, Brave, Edge, Safari (via AppleScript on macOS), Electron apps (via CDP), Chromium/Firefox on Windows (via UIA for read; CDP for execute_javascript when --remote-debugging-port is set), and WKWebView/Tauri/AT-SPI fallbacks.
-
-Actions:
-- execute_javascript: Run JS and return the result.
-- get_text: Extract visible text from the page.
-- query_dom: Find elements matching a CSS selector.
-- click_element: Click a CSS-selected element AND animate the agent cursor to its on-screen center first (so the user sees what the agent is doing). Prefer over `execute_javascript('el.click()')` whenever you want visible cursor feedback.
-- insert_text: Insert `text` at whatever currently holds DOM focus in one native operation (CDP Input.insertText); no synthesized key events, but more durable than a one-shot execute_javascript write since rich-text editors already have to treat it like an IME commit. Try this before type_keystrokes on a contenteditable that discarded an execute_javascript write. Click/focus the target field first.
-- type_keystrokes: Type `text` via real per-character keystroke events into whatever currently holds DOM focus. Slower than insert_text but the most durable rung: use it when insert_text also gets discarded, or the editor's own keydown/keyup handlers need to see real keys. Click/focus the target field first.
-- enable_javascript_apple_events: macOS-only; patch the browser's Preferences to allow JS from Apple Events (Chrome/Brave/Edge, requires user confirmation and a browser restart).
-
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="page--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
Legacy browser compatibility tool. Prefer get_browser_state and the typed browser_* tools for exact targeting, endpoint ownership, and consent. Read-only get_text and query_dom remain available by default. Mutating actions require the daemon operator to set CUA_DRIVER_ENABLE_LEGACY_PAGE_MUTATIONS=1 before daemon startup (restart the daemon after changing it); this escape hatch does not provide the typed browser surface's exact binding or existing-profile grant guarantees. Supports Chrome, Brave, Edge, Safari (via AppleScript on macOS), Electron apps (via CDP), Chromium/Firefox on Windows (via UIA for read; CDP for execute_javascript when --remote-debugging-port is set), and WKWebView/Tauri/AT-SPI fallbacks.
Actions:
@@ -59,24 +32,7 @@ Actions:
- type_keystrokes: Type `text` via real per-character keystroke events into whatever currently holds DOM focus. Slower than insert_text but the most durable rung: use it when insert_text also gets discarded, or the editor's own keydown/keyup handlers need to see real keys. Click/focus the target field first.
- enable_javascript_apple_events: macOS-only; patch the browser's Preferences to allow JS from Apple Events (Chrome/Brave/Edge, requires user confirmation and a browser restart).
-</Tab>
-<Tab value="Windows">
-
-Legacy browser compatibility tool. Prefer get_browser_state and the typed browser_* tools for exact targeting, endpoint ownership, and consent. Read-only get_text and query_dom remain available by default. Mutating actions require the daemon operator to set CUA_DRIVER_ENABLE_LEGACY_PAGE_MUTATIONS=1 before daemon startup (restart the daemon after changing it); this escape hatch does not provide the typed browser surface's exact binding or existing-profile grant guarantees. Supports Chrome, Brave, Edge, Safari (via AppleScript on macOS), Electron apps (via CDP), Chromium/Firefox on Windows (via UIA for read; CDP for execute_javascript when --remote-debugging-port is set), and WKWebView/Tauri/AT-SPI fallbacks.
-
-Actions:
-- execute_javascript: Run JS and return the result.
-- get_text: Extract visible text from the page.
-- query_dom: Find elements matching a CSS selector.
-- click_element: Click a CSS-selected element AND animate the agent cursor to its on-screen center first (so the user sees what the agent is doing). Prefer over `execute_javascript('el.click()')` whenever you want visible cursor feedback.
-- insert_text: Insert `text` at whatever currently holds DOM focus in one native operation (CDP Input.insertText); no synthesized key events, but more durable than a one-shot execute_javascript write since rich-text editors already have to treat it like an IME commit. Try this before type_keystrokes on a contenteditable that discarded an execute_javascript write. Click/focus the target field first.
-- type_keystrokes: Type `text` via real per-character keystroke events into whatever currently holds DOM focus. Slower than insert_text but the most durable rung: use it when insert_text also gets discarded, or the editor's own keydown/keyup handlers need to see real keys. Click/focus the target field first.
-- enable_javascript_apple_events: macOS-only; patch the browser's Preferences to allow JS from Apple Events (Chrome/Brave/Edge, requires user confirmation and a browser restart).
-
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: mutating. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -88,6 +44,7 @@ Actions:
| <span id="page--javascript"></span>`javascript` | `string` | | JavaScript to execute. Required for execute_javascript. |
| <span id="page--pid"></span>`pid` | `integer` | | Target process ID. |
| <span id="page--selector"></span>`selector` | `string` | | CSS selector for click_element (e.g. 'button.submit', '#login a'). |
+| <span id="page--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="page--target_url_contains"></span>`target_url_contains` | `string` | | Optional, for execute_javascript/insert_text/type_keystrokes: require exactly one browser tab whose URL contains this substring. Use this on a multi-tab browser: there's no built-in link between window_id and which tab a CDP call reaches. |
| <span id="page--text"></span>`text` | `string` | | Text to insert or type. Required for insert_text and type_keystrokes. The target field must already have DOM focus (click/focus it first). |
| <span id="page--user_has_confirmed_enabling"></span>`user_has_confirmed_enabling` | `boolean` | | Must be true to proceed with enable_javascript_apple_events. This will quit and relaunch the browser. |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/pointer.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/pointer.mdx
index 8efccec900..1c47326d26 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/pointer.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/pointer.mdx
@@ -144,7 +144,6 @@ Mapping: by='page' → larger step; by='line' → smaller step; amount = number
| --- | --- | --- | --- |
| <span id="scroll--macos--amount"></span>`amount` | `integer` | | Pixel-wheel path: number of wheel notches. Keystroke path: number of keystroke repetitions. Larger requests are clamped to the maximum. Default: 3. Range: 1 to 50. |
| <span id="scroll--macos--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Best-effort-background ladder rung (default "background"). "background": inject without fronting or raising the target; no focus steal. "foreground": briefly front the target, act, then restore the prior frontmost; the explicit last resort when a background attempt didn't land. Re-call with "foreground" only for the action that needs it. |
-| <span id="scroll--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="scroll--macos--pid"></span>`pid` | `integer` | | Target process ID. Required unless scope is "desktop". |
| <span id="scroll--macos--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use desktop with x,y and no pid/window_id for native get_desktop_state screenshot coordinates. |
| <span id="scroll--macos--window_id"></span>`window_id` | `integer` | | CGWindowID of the target window. Required with x/y; optional with element_token (the token carries it). |
@@ -164,14 +163,11 @@ Scroll the target pid's focused region via XSendEvent Button4/5. direction requi
| <span id="scroll--linux--coordinate_frame"></span>`coordinate_frame` | `"window" \| "desktop"` | | Frame of x/y (and from_x/from_y/to_x/to_y). Default "window": window-local screenshot pixels as returned by get_window_state. "desktop": full-screen pixels as returned by get_desktop_state, translated to the target window. Passing scope:"desktop" together with pid/window_id means the same thing. |
| <span id="scroll--linux--cursor_id"></span>`cursor_id` | `string` | | Optional multi-cursor instance id. Default: 'default'. |
| <span id="scroll--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
-| <span id="scroll--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="scroll--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="scroll--linux--pid"></span>`pid` | `integer` | | Target process ID. Required unless scope is "desktop". |
| <span id="scroll--linux--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use "desktop" with x,y and no pid/window_id for get_desktop_state screen coordinates. Default "window". |
-| <span id="scroll--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="scroll--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it). |
-| <span id="scroll--linux--x"></span>`x` | `number` | | Window-local screenshot-pixel X of the scroll target. Pass with y and without element_index. |
-| <span id="scroll--linux--y"></span>`y` | `number` | | Window-local screenshot-pixel Y of the scroll target. Pass with x and without element_index. |
+| <span id="scroll--linux--window_id"></span>`window_id` | `integer` | | Window id from list_windows. Required with x/y; optional with element_token (the token carries it). |
+| <span id="scroll--linux--x"></span>`x` | `number` | | Window-local screenshot-pixel X of the scroll target. Pass with y and without element_token. |
+| <span id="scroll--linux--y"></span>`y` | `number` | | Window-local screenshot-pixel Y of the scroll target. Pass with x and without element_token. |
</Tab>
<Tab value="Windows">
@@ -182,7 +178,7 @@ Windows transport: WM_VSCROLL / WM_HSCROLL posted to the window; the same events
Mapping: `by: "page"` → SB_PAGEDOWN/UP/LEFT/RIGHT × amount; `by: "line"` → SB_LINEDOWN/UP/LEFT/RIGHT × amount.
-Note: `element_index` is accepted for cross-platform parity but currently no-op on Windows (UIA SetFocus not wired up yet; same caveat as `press_key`).
+Note: `element_token` is accepted for cross-platform parity but currently no-op on Windows (UIA SetFocus not wired up yet; same caveat as `press_key`).
**Windows parameters**
@@ -190,12 +186,9 @@ Note: `element_index` is accepted for cross-platform parity but currently no-op
| --- | --- | --- | --- |
| <span id="scroll--windows--amount"></span>`amount` | `integer` | | Number of scroll ticks. Default 3. Range: 1 to 50. |
| <span id="scroll--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
-| <span id="scroll--windows--element_index"></span>`element_index` | `integer` | | Optional element_index. Accepted for parity; currently no-op on Windows. |
-| <span id="scroll--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
| <span id="scroll--windows--pid"></span>`pid` | `integer` | | Target process ID for window scope. Omit with scope=desktop for screen-absolute coordinates from get_desktop_state. |
| <span id="scroll--windows--scope"></span>`scope` | `"window" \| "desktop"` | `"window"` | Use "desktop" with x,y and no pid/window_id for screen-absolute coordinates from get_desktop_state. Default "window". |
-| <span id="scroll--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
-| <span id="scroll--windows--window_id"></span>`window_id` | `integer` | | HWND of the target window. Required when element_index is used; otherwise auto-resolves the pid's first visible window. |
+| <span id="scroll--windows--window_id"></span>`window_id` | `integer` | | HWND of the target window. Omit when element_token is supplied; otherwise auto-resolves the pid's first visible window. |
| <span id="scroll--windows--x"></span>`x` | `number` | | With pid/window_id: window-local screenshot X used to target a nested scroll surface in foreground mode. Without pid/window_id: screen-absolute X for desktop scope. Must be paired with y. |
| <span id="scroll--windows--y"></span>`y` | `number` | | With pid/window_id: window-local screenshot Y used to target a nested scroll surface in foreground mode. Without pid/window_id: screen-absolute Y for desktop scope. Must be paired with x. |
@@ -208,6 +201,7 @@ Note: `element_index` is accepted for cross-platform parity but currently no-op
| --- | --- | --- | --- |
| <span id="scroll--by"></span>`by` | `"line" \| "page"` | | Scroll granularity. Default: line. |
| <span id="scroll--direction"></span>`direction` | `"up" \| "down" \| "left" \| "right"` | required | Scroll direction. |
+| <span id="scroll--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="scroll--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="scroll--target"></span>`target` | `window target \| desktop target` | | Preferred per-call target: an exact window (`kind="window"`, `pid`, `window_id`) or the primary desktop (`kind="desktop"`, `display_id="primary"`). |
@@ -349,6 +343,7 @@ Effect: destructive. Platforms: Linux.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="parallel_mouse_drag--drags"></span>`drags` | `object[]` | required | Two or more drag gestures to run concurrently, each on its own virtual master pointer. Items: 2 to any. |
+| <span id="parallel_mouse_drag--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
**Example arguments**
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/recording.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/recording.mdx
index e2cf7a2be5..78e3a9d1e5 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/recording.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/recording.mdx
@@ -10,8 +10,6 @@ description: "Record and replay trajectories."
Version: 0.32.0
*/}
-import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
-
| Tool | Description | Platforms |
| --- | --- | --- |
| [`start_recording`](#start_recording) | Start trajectory recording for the calling session. | macOS, Linux, Windows |
@@ -66,79 +64,30 @@ Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
## `stop_recording`
-Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Stop trajectory recording. Disables further per-turn capture and, when video was enabled, gracefully terminates the ffmpeg subprocess so the mp4's moov atom is finalized (the file is playable). Calling stop on an already-stopped session is a no-op. The response carries `last_video_path` pointing at the finalized mp4 (when video was on).
A manual `stop_recording` is **unconditional**: it stops whatever recording is active regardless of which session started it. Ownership-scoped teardown (so one client disconnecting can't stop a recording a later client started) is handled by the registry's `session_end` lifecycle hook, not by this tool.
-**Parameters**
+Effect: mutating, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="stop_recording--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Stop trajectory recording. Disables further per-turn capture and, when video was enabled, gracefully terminates the ffmpeg subprocess so the mp4's moov atom is finalized (the file is playable). Calling stop on an already-stopped session is a no-op. The response carries `last_video_path` pointing at the finalized mp4 (when video was on).
-
-A manual `stop_recording` is **unconditional**: it stops whatever recording is active regardless of which session started it. Ownership-scoped teardown (so one client disconnecting can't stop a recording a later client started) is handled by the registry's `session_end` lifecycle hook, not by this tool.
-
-</Tab>
-<Tab value="Windows">
-
-Stop trajectory recording. Disables further per-turn capture and, when video was enabled, gracefully terminates the ffmpeg subprocess so the mp4's moov atom is finalized (the file is playable). Calling stop on an already-stopped session is a no-op. The response carries `last_video_path` pointing at the finalized mp4 (when video was on).
-
-A manual `stop_recording` is **unconditional**: it stops whatever recording is active regardless of which session started it. Ownership-scoped teardown (so one client disconnecting can't stop a recording a later client started) is handled by the registry's `session_end` lifecycle hook, not by this tool.
-
-</Tab>
-</Tabs>
+| <span id="stop_recording--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
## `get_recording_state`
-Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Report the current trajectory recorder state: whether recording is enabled, the output directory (when enabled), and the 1-based counter for the next turn folder that will be written. Counter increments on every recorded action tool call and resets to 1 each time recording is (re-)enabled.
Pure read-only.
-**Parameters**
+Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="get_recording_state--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Report the current trajectory recorder state: whether recording is enabled, the output directory (when enabled), and the 1-based counter for the next turn folder that will be written. Counter increments on every recorded action tool call and resets to 1 each time recording is (re-)enabled.
-
-Pure read-only.
-
-</Tab>
-<Tab value="Windows">
-
-Report the current trajectory recorder state: whether recording is enabled, the output directory (when enabled), and the 1-based counter for the next turn folder that will be written. Counter increments on every recorded action tool call and resets to 1 each time recording is (re-)enabled.
-
-Pure read-only.
-
-</Tab>
-</Tabs>
+| <span id="get_recording_state--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
## `replay_trajectory`
-Effect: destructive. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.
Caveats:
@@ -146,41 +95,13 @@ Caveats:
- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.
- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="replay_trajectory--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.
-
-Caveats:
-- Element-indexed actions (`click({pid, element_index})` etc.) will fail because element indices are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.
-- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.
-- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.
-
-</Tab>
-<Tab value="Windows">
-
-Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.
-
-Caveats:
-- Element-indexed actions (`click({pid, element_index})` etc.) will fail because element indices are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.
-- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.
-- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.
-
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: destructive. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="replay_trajectory--delay_ms"></span>`delay_ms` | `integer` | | Milliseconds to sleep between turns, for human-observable pacing. Default 500. Range: 0 to 10000. |
| <span id="replay_trajectory--dir"></span>`dir` | `string` | required | Trajectory directory previously written by `start_recording`. Absolute or ~-rooted. |
+| <span id="replay_trajectory--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="replay_trajectory--stop_on_error"></span>`stop_on_error` | `boolean` | | Stop replay on the first tool-call error. Default true: set false to best-effort through the full trajectory. |
**Example arguments**
@@ -191,34 +112,11 @@ Caveats:
## `install_ffmpeg`
-Effect: destructive. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
Install the ffmpeg binary used by start_recording's video capture (Linux/Windows; macOS records natively and needs no ffmpeg). Two-step and confirmed: called without `confirm` it only REPORTS the exact install command for this platform's package manager; pass `confirm: true` to actually run it. No-op if ffmpeg is already on PATH. ffmpeg is run as a separate process, never linked into the driver.
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="install_ffmpeg--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
-Install the ffmpeg binary used by start_recording's video capture (Linux/Windows; macOS records natively and needs no ffmpeg). Two-step and confirmed: called without `confirm` it only REPORTS the exact install command for this platform's package manager; pass `confirm: true` to actually run it. No-op if ffmpeg is already on PATH. ffmpeg is run as a separate process, never linked into the driver.
-
-</Tab>
-<Tab value="Windows">
-
-Install the ffmpeg binary used by start_recording's video capture (Linux/Windows; macOS records natively and needs no ffmpeg). Two-step and confirmed: called without `confirm` it only REPORTS the exact install command for this platform's package manager; pass `confirm: true` to actually run it. No-op if ffmpeg is already on PATH. ffmpeg is run as a separate process, never linked into the driver.
-
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: destructive. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="install_ffmpeg--confirm"></span>`confirm` | `boolean` | | Run the install command. Without it, only the planned command is reported. |
+| <span id="install_ffmpeg--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/screen.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/screen.mdx
index 73e4a64a17..ba3c743586 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/screen.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/screen.mdx
@@ -100,12 +100,11 @@ Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixel
After a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when no current snapshot contains a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.
-**Parameters**
+**macOS parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| <span id="zoom--macos--pid"></span>`pid` | `integer` | | Optional target pid. When omitted, the driver resolves the unique current snapshot for this session and window. |
-| <span id="zoom--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="zoom--macos--window_id"></span>`window_id` | `integer` | required | CGWindowID from list_windows. |
| <span id="zoom--macos--x1"></span>`x1` | `number` | required | Left edge of region in screenshot pixels. |
| <span id="zoom--macos--x2"></span>`x2` | `number` | required | Right edge of region in screenshot pixels. |
@@ -117,9 +116,9 @@ After a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordin
Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixels, with 20% padding. Output is at most 500 px wide.
-After a zoom, pass from_zoom=true to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when the latest snapshot does not contain a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.
+After a zoom, pass from_zoom=true to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when no current snapshot contains a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.
-**Parameters**
+**Linux parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -139,11 +138,11 @@ Coordinates `x1, y1, x2, y2` are in the same pixel space as the screenshot retur
A 20% padding is automatically added on every side of the requested region so the target remains visible even if the caller's coordinates are slightly off.
-After a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when the latest snapshot does not contain a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.
+After a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when no current snapshot contains a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.
Windows-specific: `window_id` is the canonical addressing field (HWND). `pid` is preferred when available; otherwise the driver resolves the unique current snapshot owned by this session and window.
-**Parameters**
+**Windows parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -157,6 +156,12 @@ Windows-specific: `window_id` is the canonical addressing field (HWND). `pid` is
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="zoom--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
**Example arguments**
```json
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/values-and-clipboard.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/values-and-clipboard.mdx
index 61acfdc8ac..fb954792be 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/values-and-clipboard.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/values-and-clipboard.mdx
@@ -39,7 +39,6 @@ For free-form text entry into web inputs, prefer `type_text_chars` which synthes
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="set_value--macos--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="set_value--macos--value"></span>`value` | `string` | required | New value. AX will coerce to the element's native type. |
| <span id="set_value--macos--window_id"></span>`window_id` | `integer` | | CGWindowID. Omit when element_token is supplied (the token carries it). |
@@ -52,11 +51,9 @@ Set value of an AT-SPI element via SetValue action.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="set_value--linux--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="set_value--linux--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
-| <span id="set_value--linux--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
+| <span id="set_value--linux--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | `"background"` | Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus: Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window; a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface. |
| <span id="set_value--linux--value"></span>`value` | `string \| number` | required | New value. Written through AT-SPI EditableText/Value when the element exposes them; otherwise (GTK2 spin scales, VCL spin buttons) the field is clicked with the session's real pointer, its text selected and replaced through the virtual keyboard and committed with Tab, then read back. |
-| <span id="set_value--linux--window_id"></span>`window_id` | `integer` | | Required when element_index is used; optional when element_token is supplied (the token carries it). |
+| <span id="set_value--linux--window_id"></span>`window_id` | `integer` | | Omit when element_token is supplied (the token carries it). |
</Tab>
<Tab value="Windows">
@@ -73,11 +70,9 @@ For free-form text entry that the target accepts via keystrokes only, prefer `ty
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="set_value--windows--element_index"></span>`element_index` | `integer` | | Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values. |
-| <span id="set_value--windows--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it. |
-| <span id="set_value--windows--snapshot_id"></span>`snapshot_id` | `string` | | Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed. |
+| <span id="set_value--windows--delivery_mode"></span>`delivery_mode` | `"background" \| "foreground"` | | Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh; it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess: fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface. |
| <span id="set_value--windows--value"></span>`value` | `string` | required | New value. UIA will coerce to the element's native type. |
-| <span id="set_value--windows--window_id"></span>`window_id` | `integer` | | HWND of the window. Required when element_index is used; optional when element_token is supplied (the token carries it). |
+| <span id="set_value--windows--window_id"></span>`window_id` | `integer` | | HWND of the window. Omit when element_token is supplied (the token carries it). |
</Tab>
</Tabs>
@@ -86,6 +81,7 @@ For free-form text entry that the target accepts via keystrokes only, prefer `ty
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="set_value--element_token"></span>`element_token` | `string` | | Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it. |
| <span id="set_value--pid"></span>`pid` | `integer` | required | Target process ID. |
| <span id="set_value--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
diff --git a/docs/content/docs/cua-driver/reference/mcp-tools/window-state.mdx b/docs/content/docs/cua-driver/reference/mcp-tools/window-state.mdx
index 95d8f6311a..4a85e27086 100644
--- a/docs/content/docs/cua-driver/reference/mcp-tools/window-state.mdx
+++ b/docs/content/docs/cua-driver/reference/mcp-tools/window-state.mdx
@@ -48,7 +48,6 @@ Optional `max_elements` / `max_depth` bound the AX walk to mitigate context-wind
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="get_window_state--macos--capture_mode"></span>`capture_mode` | `"ax" \| "vision"` | | DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot: ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_token) or an element px action (x,y). Any value (including the old "som"/"screenshot" aliases) is accepted but has no effect. |
| <span id="get_window_state--macos--include_accessibility_tree"></span>`include_accessibility_tree` | `boolean` | | Default true: walk the AX tree and return `elements` + `tree_markdown` alongside the screenshot. Set false to SKIP the AX walk entirely (the expensive part, bounded by timeout_ms) and return just the screenshot plus window metadata (bounds, scale, app_name, window_title): the capture-only path for rendering a live window preview / picture-in-picture. Mirrors include_screenshot. Setting BOTH include_accessibility_tree:false AND include_screenshot:false is an error (nothing to return). |
| <span id="get_window_state--macos--include_screenshot"></span>`include_screenshot` | `boolean` | | Default true: returns a grounding screenshot alongside the tree. Set false to skip the grab and return the tree only (the cheap path when you're just re-indexing before an element ax action; saves the image tokens + screen-grab latency). screenshot_out_file still forces a capture to disk. |
| <span id="get_window_state--macos--max_depth"></span>`max_depth` | `integer` | | Cap on the AX-tree walk depth. Nodes whose rendered indent would exceed this are omitted. Omit for the default (25). Lower this for deep menu/Electron trees. Minimum: 1. |
@@ -63,11 +62,11 @@ Optional `max_elements` / `max_depth` bound the AX walk to mitigate context-wind
</Tab>
<Tab value="Linux">
-Walk a running app's AT-SPI tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array.
+Walk a running app's AT-SPI tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array; pass each element's `element_token` to `click`, `type_text`, `set_value`, etc.
PREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of AT-SPI actions exposed by the element, omitted when empty), `frame: {x,y,w,h}` when AT-SPI reports usable bounds, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers: but new fields will only be added to the structured side. Set `query` to project BOTH representations to matching rows plus their ancestor chain while preserving original indices. `total_element_count` reports the complete snapshot and `returned_element_count` reports the projection.
-Always returns BOTH the element tree AND a screenshot: ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_index/element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored. On Wayland, where output capture cannot prove the requested surface's identity, the truthful tree is returned without a screenshot and `screenshot_error.code` is `surface_identity_unproven`.
+Always returns BOTH the element tree AND a screenshot: ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored. On Wayland, where output capture cannot prove the requested surface's identity, the truthful tree is returned without a screenshot and `screenshot_error.code` is `surface_identity_unproven`.
The mirror image: pass `include_accessibility_tree:false` to SKIP the AT-SPI walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title); the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_dimension` caps the returned screenshot's long edge in pixels for a cheap thumbnail.
@@ -77,13 +76,12 @@ TIME BUDGET: `timeout_ms` (default 1000) bounds the whole AT-SPI walk. Large app
SCREENSHOT SCALE: the screenshot is delivered at or below 1.15 megapixels (long edge &lt;= max_image_dimension, 1568 by default), because larger images are downsized before a model reads them and its pixel coordinates would then be uniformly short. Element `screenshot_frame`s and x/y for the pointer tools are pixels of the delivered screenshot (`frame` stays in screen coordinates, as on every platform); `frame_scale` &lt; 1 reports the downsizing. An explicit per-call `max_image_dimension` (0 = native) replaces this cap.
-POPUP MENUS: a context menu / popover / combo list is an override-redirect window that list_windows never shows. A click or right_click that opened one names it in its result (`popup: {window_id, bounds, title}`); pass that window_id here to walk the popup's own AT-SPI toplevel so its menu items get element indices (then click them by element_index). Omitting window_id while a popup of this pid is open walks that popup.
+POPUP MENUS: a context menu / popover / combo list is an override-redirect window that list_windows never shows. A click or right_click that opened one names it in its result (`popup: {window_id, bounds, title}`); pass that window_id here to walk the popup's own AT-SPI toplevel so its menu items get element indices (then click them by element_token). Omitting window_id while a popup of this pid is open walks that popup.
**Linux parameters**
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="get_window_state--linux--capture_mode"></span>`capture_mode` | `"ax" \| "vision"` | | DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot: ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_index/element_token) or an element px action (x,y). Any value (including the old "som"/"screenshot" aliases) is accepted but has no effect. |
| <span id="get_window_state--linux--include_accessibility_tree"></span>`include_accessibility_tree` | `boolean` | | Default true: walk the AT-SPI tree and return `elements` + `tree_markdown` alongside the screenshot. Set false to SKIP the AT-SPI walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title): the capture-only path for a live window preview / picture-in-picture. Mirrors include_screenshot. Setting BOTH include_accessibility_tree:false AND include_screenshot:false is an error (nothing to return). |
| <span id="get_window_state--linux--include_screenshot"></span>`include_screenshot` | `boolean` | | Default true: returns a grounding screenshot alongside the tree. Set false to skip the grab and return tree only (the cheap path for re-indexing before an element ax action). |
| <span id="get_window_state--linux--max_depth"></span>`max_depth` | `integer` | | Cap on the AT-SPI tree walk depth. Omit for the default (uncapped). Lower for deeply nested apps. Minimum: 1. |
@@ -98,9 +96,9 @@ POPUP MENUS: a context menu / popover / combo list is an override-redirect windo
</Tab>
<Tab value="Windows">
-Walk a running app's UIA tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array: pass those indices to `click`, `type_text`, `scroll`, etc.
+Walk a running app's UIA tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array; pass each element's `element_token` to `click`, `type_text`, `scroll`, etc.
-INVARIANT: call `get_window_state` once per turn per (pid, window_id) before any element-indexed action against that window. The index map is replaced by the next snapshot of the same (pid, window_id).
+INVARIANT: call `get_window_state` once per turn per (pid, window_id) before any element action against that window. The next snapshot of the same (pid, window_id) replaces this one, stales its element tokens, and lists the replaced ids in `invalidated_snapshot_ids`.
PREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of UIA patterns exposed as actions, omitted when empty), `frame: {x,y,w,h}`, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers: but new fields will only be added to the structured side.
@@ -110,7 +108,7 @@ The UIA tree walked is the window's tree (HWND-scoped); the screenshot and windo
Set `query` to a case-insensitive substring to project BOTH `tree_markdown` and `structuredContent.elements` to matching rows plus their ancestor chain. Original element indices are preserved. `total_element_count` reports the complete snapshot; `returned_element_count` reports the projection.
-Always returns BOTH the element tree AND a screenshot: ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_index/element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored.
+Always returns BOTH the element tree AND a screenshot: ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored.
The mirror image: pass `include_accessibility_tree:false` to SKIP the UIA walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title); the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_image_dimension` overrides the configured screenshot long-edge limit for this call; pass 0 for native resolution. Legacy `max_dimension` remains a cap on the configured limit.
@@ -126,7 +124,6 @@ Windows requires no special permissions.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
-| <span id="get_window_state--windows--capture_mode"></span>`capture_mode` | `"ax" \| "vision"` | | DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot: ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_index/element_token) or an element px action (x,y). Any value (including the old "som"/"screenshot" aliases) is accepted but has no effect. |
| <span id="get_window_state--windows--include_accessibility_tree"></span>`include_accessibility_tree` | `boolean` | | Default true: walk the UIA tree and return `elements` + `tree_markdown` alongside the screenshot. Set false to SKIP the UIA walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title): the capture-only path for a live window preview / picture-in-picture. Mirrors include_screenshot. Setting BOTH include_accessibility_tree:false AND include_screenshot:false is an error (nothing to return). |
| <span id="get_window_state--windows--include_screenshot"></span>`include_screenshot` | `boolean` | | Default true: returns a grounding screenshot alongside the tree. Set false to skip the grab and return tree only (the cheap path for re-indexing before an element ax action). |
| <span id="get_window_state--windows--max_depth"></span>`max_depth` | `integer` | | Cap on the UIA-tree walk depth. Nodes whose rendered indent would exceed this are omitted. Omit for the default (25). Lower for deep menu / Electron trees. Minimum: 1. |
@@ -145,6 +142,7 @@ Windows requires no special permissions.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
+| <span id="get_window_state--capture_mode"></span>`capture_mode` | `"ax" \| "vision"` | | DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot: ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_token) or an element px action (x,y). Any value (including the old "som"/"screenshot" aliases) is accepted but has no effect. |
| <span id="get_window_state--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
| <span id="get_window_state--timeout_ms"></span>`timeout_ms` | `integer` | `1000` | Wall-clock budget in milliseconds for the accessibility-tree walk (default 1000, min 100, max 120000). Bounds the WHOLE walk. When the budget runs out the tool returns the PARTIAL tree it has, flagged with `truncated: true`, `truncation_reason`, `nodes_visited`, `nodes_pending` and `elements_complete: false`; retry with a larger value (e.g. 5000) or narrow with `query` / `max_depth`. Range: 100 to 120000. |
@@ -165,12 +163,6 @@ Return a lightweight snapshot of the desktop: running regular apps and on-screen
For the full AX subtree of a single window (with interactive element indices you can click by), use `get_window_state` instead: that's the heavy per-window tool. This one is a fast discovery read that needs no TCC grants.
-**Parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="get_accessibility_tree--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
</Tab>
<Tab value="Linux">
@@ -188,6 +180,12 @@ For the full UIA subtree of a single window (with interactive element indices yo
</Tab>
</Tabs>
+**Parameters on every platform**
+
+| Parameter | Type | Default | Description |
+| --- | --- | --- | --- |
+| <span id="get_accessibility_tree--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
+
## `verify_state`
Deterministically verify bounded predicates against one exact window. The driver evaluates structured window/accessibility state and may return the final screenshot as uninterpreted visual evidence for a multimodal caller. Predicate results are satisfied, unsatisfied, or unknown; unknown never implies success. Accessibility projections are conservative: absence remains unknown unless the observed search domain is proven exhaustive.
@@ -212,33 +210,9 @@ Effect: read-only. Platforms: macOS, Linux, Windows.
## `parse_visual_regions`
-Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
-
-<Tabs items={['macOS', 'Linux', 'Windows']} groupId="platform" persist>
-<Tab value="macOS">
-
-Parse one immutable registered capture into model-neutral text and icon regions.
-
-**macOS parameters**
-
-| Parameter | Type | Default | Description |
-| --- | --- | --- | --- |
-| <span id="parse_visual_regions--macos--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
-
-</Tab>
-<Tab value="Linux">
-
Parse one immutable registered capture into model-neutral text and icon regions.
-</Tab>
-<Tab value="Windows">
-
-Parse one immutable registered capture into model-neutral text and icon regions.
-
-</Tab>
-</Tabs>
-
-**Parameters on every platform**
+Effect: read-only, idempotent. Platforms: macOS, Linux, Windows.
| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
@@ -247,6 +221,7 @@ Parse one immutable registered capture into model-neutral text and icon regions.
| <span id="parse_visual_regions--options-kinds"></span>`options.kinds` | `"text" \| "icon"[]` | | Region kinds to return (`text`, `icon`). Omit for all kinds. |
| <span id="parse_visual_regions--options-max_regions"></span>`options.max_regions` | `integer` | | Return at most this many regions. Minimum: 1. |
| <span id="parse_visual_regions--options-min_confidence"></span>`options.min_confidence` | `number` | | Drop regions below this confidence (0 to 1). Range: 0 to 1. |
+| <span id="parse_visual_regions--session"></span>`session` | `string` | | For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session. |
**Example arguments**
diff --git a/docs/content/docs/cua-sdk/concepts/how-sandboxes-work.mdx b/docs/content/docs/cua-sdk/concepts/how-sandboxes-work.mdx
index a0b2241f58..2a7d841fe2 100644
--- a/docs/content/docs/cua-sdk/concepts/how-sandboxes-work.mdx
+++ b/docs/content/docs/cua-sdk/concepts/how-sandboxes-work.mdx
@@ -83,5 +83,5 @@ a sandbox; deleting destroys it and its state.
The SDK manages cloud capacity for your account; to manage it yourself, see
[Cua Fleets](/fleets). `Sandbox.snapshot()` is not available in
-`cua-sandbox` 0.8.0. Streaming, teleport and the other
+`cua-sandbox` 0.9.0. Streaming, teleport and the other
[Spaces](/spaces) primitives need cua-spacesd.
diff --git a/docs/content/docs/cua-sdk/guides/agent-frameworks.mdx b/docs/content/docs/cua-sdk/guides/agent-frameworks.mdx
index cab8ca137f..6968109e50 100644
--- a/docs/content/docs/cua-sdk/guides/agent-frameworks.mdx
+++ b/docs/content/docs/cua-sdk/guides/agent-frameworks.mdx
@@ -8,7 +8,7 @@ import { Callout } from 'fumadocs-ui/components/callout';
Each recipe gives a third-party agent its own cloud desktop instead of yours.
You need [cloud credentials](/cua-sdk/guides/cloud#credentials), and Python
`>=3.11,<3.14` with [`uv`](https://docs.astral.sh/uv/) for the scripts, which
-pin `cua-sandbox==0.8.0`. Your controller owns the sandbox and must release it.
+pin `cua-sandbox==0.9.0`. Your controller owns the sandbox and must release it.
## OpenAI Agents API
@@ -72,7 +72,7 @@ digest) and `CUA_POOL_NAME` a globally unique pool name:
# /// script
# requires-python = ">=3.11,<3.14"
# dependencies = [
-# "cua-sandbox[driver]==0.8.0",
+# "cua-sandbox[driver]==0.9.0",
# ]
# [[tool.uv.index]]
# name = "cua-wheels"
diff --git a/docs/content/docs/cua-sdk/guides/desktop.mdx b/docs/content/docs/cua-sdk/guides/desktop.mdx
index 4eade03d4b..0acedcca66 100644
--- a/docs/content/docs/cua-sdk/guides/desktop.mdx
+++ b/docs/content/docs/cua-sdk/guides/desktop.mdx
@@ -28,7 +28,12 @@ the interfaces below raise `SpacesdNotAvailable`.
from pathlib import Path
from cua_sandbox import Image, Sandbox
+FOCUS_TERMINAL = ("export DISPLAY=:1; nohup xfce4-terminal -T demo >/dev/null 2>&1 & "
+ "xdotool search --sync --name demo windowactivate --sync")
+
async with Sandbox.ephemeral(Image.linux()) as sb:
+ # Keys go to the focused window, so open one.
+ await sb.shell.run(FOCUS_TERMINAL)
width, height = await sb.get_dimensions()
await sb.mouse.click(width // 2, height // 2)
await sb.keyboard.type("hello")
@@ -41,7 +46,11 @@ async with Sandbox.ephemeral(Image.linux()) as sb:
```ts test="container" id="desktop-typescript"
import { writeFile } from 'node:fs/promises';
-import { embedded, SandboxCreateOptions } from '@trycua/cua';
+import { embedded, SandboxCreateOptions, SpacesdCommand } from '@trycua/cua';
+
+const FOCUS_TERMINAL =
+ 'export DISPLAY=:1; nohup xfce4-terminal -T demo >/dev/null 2>&1 & ' +
+ 'xdotool search --sync --name demo windowactivate --sync';
const sb = await embedded().sandboxes().create(
SandboxCreateOptions.create({
@@ -50,6 +59,8 @@ const sb = await embedded().sandboxes().create(
);
try {
const env = await sb.spacesd(undefined);
+ // Keys go to the focused window, so open one.
+ await env.run(SpacesdCommand.create({ program: 'sh', args: ['-c', FOCUS_TERMINAL] }));
const shot = await env.screenshot(undefined);
await env.click(Math.floor(shot.width / 2), Math.floor(shot.height / 2));
await env.typeText('hello');
@@ -76,7 +87,7 @@ cua sb rm -f desk
## Typed Cua Driver
```bash skip="host-install"
-pip install --extra-index-url https://wheels.cua.ai/simple 'cua-sandbox[driver]==0.8.0'
+pip install --extra-index-url https://wheels.cua.ai/simple 'cua-sandbox[driver]==0.9.0'
```
```python test="container" id="typed-driver" prelude="image-desktop"
@@ -148,17 +159,13 @@ Kotlin) returns `{url, expires_at_unix}`; options are `ttl_seconds`,
`view_only`, `clipboard`, `files_root` and `microphone`. The MCP tool is
`sandbox_view`.
-The link carries a viewer ticket in its fragment (`/viewer/#ticket=...`).
-The ticket authorizes only the viewer's calls (streaming, plus clipboard and
-files when granted; never processes or tokens), expires (default 1 hour, at
-most 24 hours) and is revoked when the root token rotates. The page moves it
-out of the address bar. In the cloud the link is a signed `env` service URL;
-no Fleet credential reaches the browser.
+The link's fragment carries a viewer ticket that authorizes only the viewer's
+calls (never processes or tokens), expires (default 1 hour, at most 24) and is
+revoked when the root token rotates. In the cloud it is a signed `env` service
+URL.
-The toolbar has full screen, fit or 1:1 scaling, a keys menu
-(Ctrl+Alt+Del, Alt+Tab, ...), two-way clipboard, file upload (drop files or
-click Upload; they land in `~/Downloads`), folder sharing, microphone and
-stats.
+The toolbar has full screen, scaling, a keys menu, two-way clipboard, file
+upload (to `~/Downloads`), folder sharing, microphone and stats.
| Feature | Chrome, Edge | Firefox | Safari |
| --- | --- | --- | --- |
@@ -171,8 +178,8 @@ stats.
| Full screen | yes, with keyboard lock | yes | yes |
**Folder sharing** picks a local folder and keeps it in sync with
-`~/Shared/<name>` both ways. When a file changes on both sides, both are kept:
-the sandbox version is saved as `name (sandbox copy YYYY-MM-DD HHMMSS).ext`.
+`~/Shared/<name>` both ways. On a conflict both are kept (the sandbox one as
+`name (sandbox copy YYYY-MM-DD HHMMSS).ext`).
Sharing stops when you close the page or click Stop.
![The folder sharing prompt of the viewer](/img/cua-sdk/viewer-share-folder.png)
diff --git a/docs/content/docs/cua-sdk/reference/index.mdx b/docs/content/docs/cua-sdk/reference/index.mdx
index 48e3e8ca6a..9ce112cb3d 100644
--- a/docs/content/docs/cua-sdk/reference/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/index.mdx
@@ -82,7 +82,8 @@ Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are b
| [Stream section and facts](/cua-sdk/reference/spaces/app-core/stream) | A Space detail's Stream rows (desktop and windows with their icons and picture in picture) and its facts with live memory and storage use. *Cua Spaces app export.* |
| [New Space wizard](/cua-sdk/reference/spaces/app-core/new-space) | The New Space wizard: where it runs, image, engine, address and the create call. *Cua Spaces app export.* |
| [Image catalog](/cua-sdk/reference/spaces/app-core/images) | The images the New Space wizard offers: groups, sizes, the image field and its suggestions. *Cua Spaces app export.* |
-| [Teleport picker](/cua-sdk/reference/spaces/app-core/teleport) | The teleport picker and review, consent, the transfer overlay and drag-and-drop. *Cua Spaces app export.* |
+| [Teleport picker](/cua-sdk/reference/spaces/app-core/teleport) | The teleport picker and review, and consent. *Cua Spaces app export.* |
+| [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer) | The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space. *Cua Spaces app export.* |
| [Teleport picker grid](/cua-sdk/reference/spaces/app-core/teleport-grid) | The teleport picker's tiles in both apps: tabs, app and window tiles with their icon and preview sources, and the arrow keys. *Cua Spaces app export.* |
| [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core) | Settings, Storage (this machine or an S3-compatible bucket, the Finder volume, the cache), the first run's Cua Volume page and the Drive page's devices and conflicts. *Cua Spaces app export.* |
| [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core) | The Agents page (persistent agents, memory, routines, computer access), the Drive page and the notifications the apps post. *Cua Spaces app export.* |
@@ -136,4 +137,4 @@ Pages marked *Cua Spaces app export* document the APIs the Cua Spaces apps are b
289 items, 378 methods. The [Types](/cua-sdk/reference/types) page lists them.
-The Cua Spaces app export adds 669 items and 36 methods.
+The Cua Spaces app export adds 678 items and 36 methods.
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx
index 341080b1d1..1a7525f284 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/drag-trigger.mdx
@@ -89,7 +89,7 @@ Returned by [`app_drag_trigger_apply`](#app_drag_trigger_apply).
| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `state` | [`AppDragTriggerState`](#appdragtriggerstate-record) | | New state. |
-| `overlay` | [`Vec<AppDragOverlayEvent>`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlayevent-enum) | | Feed these to the drag overlay, in order. A `drop` carries no Space: the shell puts in the tile under the cursor, if any. |
+| `overlay` | [`Vec<AppDragOverlayEvent>`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlayevent-enum) | | Feed these to the drag overlay, in order. A `drop` carries no Space: the shell puts in the tile under the cursor, if any. |
| `tick_at_ms` / `tickAtMs` | `Option<u64>` | | Send a `tick` at this time (replacing any earlier request); none cancels it. |
## `AppDragKind` enum
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
index 201adb1dc3..a7ebf18a1d 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/index.mdx
@@ -72,7 +72,7 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
## All items
-552 items, across this page and its subpages, grouped by page. Methods are listed on their object.
+561 items, across this page and its subpages, grouped by page. Methods are listed on their object.
**About, updates and launch**: [`app_about_after_launch`](/cua-sdk/reference/spaces/app-core/about#app_about_after_launch), [`app_about_allowed_channels`](/cua-sdk/reference/spaces/app-core/about#app_about_allowed_channels), [`app_about_input_from_json`](/cua-sdk/reference/spaces/app-core/about#app_about_input_from_json), [`app_about_refresh_notice`](/cua-sdk/reference/spaces/app-core/about#app_about_refresh_notice), [`app_about_restart_daemon`](/cua-sdk/reference/spaces/app-core/about#app_about_restart_daemon), [`app_about_view`](/cua-sdk/reference/spaces/app-core/about#app_about_view), [`app_daemon_check_from_json`](/cua-sdk/reference/spaces/app-core/about#app_daemon_check_from_json), [`app_launch_input_from_json`](/cua-sdk/reference/spaces/app-core/about#app_launch_input_from_json), [`app_refresh_report_from_json`](/cua-sdk/reference/spaces/app-core/about#app_refresh_report_from_json), [`AppAboutInput`](/cua-sdk/reference/spaces/app-core/about#appaboutinput-record), [`AppAboutLink`](/cua-sdk/reference/spaces/app-core/about#appaboutlink-record), [`AppAboutLinkId`](/cua-sdk/reference/spaces/app-core/about#appaboutlinkid-enum), [`AppAboutUpdates`](/cua-sdk/reference/spaces/app-core/about#appaboutupdates-record), [`AppAboutView`](/cua-sdk/reference/spaces/app-core/about#appaboutview-record), [`AppCliInstaller`](/cua-sdk/reference/spaces/app-core/about#appcliinstaller), [`AppCliInstallPlan`](/cua-sdk/reference/spaces/app-core/about#appcliinstallplan-record), [`AppCliInstallRequest`](/cua-sdk/reference/spaces/app-core/about#appcliinstallrequest-record), [`AppDaemonCheck`](/cua-sdk/reference/spaces/app-core/about#appdaemoncheck-record), [`AppInstallMethod`](/cua-sdk/reference/spaces/app-core/about#appinstallmethod-enum), [`AppLaunchInput`](/cua-sdk/reference/spaces/app-core/about#applaunchinput-record), [`AppLaunchPlan`](/cua-sdk/reference/spaces/app-core/about#applaunchplan-record), [`AppRefreshReport`](/cua-sdk/reference/spaces/app-core/about#apprefreshreport-record), [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum)
@@ -84,7 +84,7 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
**Cua Cloud billing**: [`app_billing_status`](/cua-sdk/reference/spaces/app-core/billing#app_billing_status), [`AppBillingCard`](/cua-sdk/reference/spaces/app-core/billing#appbillingcard-record), [`AppBillingCredit`](/cua-sdk/reference/spaces/app-core/billing#appbillingcredit-record), [`AppBillingStatus`](/cua-sdk/reference/spaces/app-core/billing#appbillingstatus-record), [`AppCreditNotice`](/cua-sdk/reference/spaces/app-core/billing#appcreditnotice-record)
-**Teleport picker**: [`app_catalog_entries_from_json`](/cua-sdk/reference/spaces/app-core/teleport#app_catalog_entries_from_json), [`app_catalog_entry`](/cua-sdk/reference/spaces/app-core/teleport#app_catalog_entry), [`app_picker_can_plan`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_can_plan), [`app_picker_consent`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_consent), [`app_picker_initial`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_initial), [`app_picker_plan_sensitive`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_plan_sensitive), [`app_picker_primary`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_primary), [`app_picker_progress`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_progress), [`app_picker_reduce`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_reduce), [`app_picker_review`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_review), [`app_picker_sections`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_sections), [`app_picker_sensitive_options`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_sensitive_options), [`app_teleport_plan`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_plan), [`app_teleport_plan_from_json`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_plan_from_json), [`app_transfer_reduce`](/cua-sdk/reference/spaces/app-core/teleport#app_transfer_reduce), [`app_transfer_title`](/cua-sdk/reference/spaces/app-core/teleport#app_transfer_title), [`AppCatalogEntry`](/cua-sdk/reference/spaces/app-core/teleport#appcatalogentry-record), [`AppConsentItem`](/cua-sdk/reference/spaces/app-core/teleport#appconsentitem-record), [`AppConsentKind`](/cua-sdk/reference/spaces/app-core/teleport#appconsentkind-enum), [`AppDragOverlayEffect`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlayeffect-enum), [`AppDragOverlayEvent`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlayevent-enum), [`AppDragOverlayPhase`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlayphase-enum), [`AppDragOverlayState`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlaystate-record), [`AppDragOverlayTransition`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlaytransition-record), [`AppEntrySection`](/cua-sdk/reference/spaces/app-core/teleport#appentrysection-record), [`AppInstallCuaPrompt`](/cua-sdk/reference/spaces/app-core/teleport#appinstallcuaprompt-record), [`AppPickerAction`](/cua-sdk/reference/spaces/app-core/teleport#apppickeraction-enum), [`AppPickerEvent`](/cua-sdk/reference/spaces/app-core/teleport#apppickerevent-enum), [`AppPickerPrimary`](/cua-sdk/reference/spaces/app-core/teleport#apppickerprimary-record), [`AppPickerState`](/cua-sdk/reference/spaces/app-core/teleport#apppickerstate-record), [`AppPickerStep`](/cua-sdk/reference/spaces/app-core/teleport#apppickerstep-enum), [`AppPickerTab`](/cua-sdk/reference/spaces/app-core/teleport#apppickertab-enum), [`AppPlanStepView`](/cua-sdk/reference/spaces/app-core/teleport#appplanstepview-record), [`AppReviewView`](/cua-sdk/reference/spaces/app-core/teleport#appreviewview-record), [`AppTeleportCapability`](/cua-sdk/reference/spaces/app-core/teleport#appteleportcapability-enum), [`AppTeleportConsent`](/cua-sdk/reference/spaces/app-core/teleport#appteleportconsent-record), [`AppTeleportMove`](/cua-sdk/reference/spaces/app-core/teleport#appteleportmove-enum), [`AppTeleportPlan`](/cua-sdk/reference/spaces/app-core/teleport#appteleportplan-record), [`AppTeleportRunEvent`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunevent-record), [`AppTeleportRunPhase`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunphase-enum), [`AppTeleportRunReport`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunreport-record), [`AppTransferOverlayState`](/cua-sdk/reference/spaces/app-core/teleport#apptransferoverlaystate-record), [`AppTransferPhase`](/cua-sdk/reference/spaces/app-core/teleport#apptransferphase-enum), [`AppTransferSignal`](/cua-sdk/reference/spaces/app-core/teleport#apptransfersignal-record), [`AppTransferStatus`](/cua-sdk/reference/spaces/app-core/teleport#apptransferstatus-enum)
+**Teleport picker**: [`app_catalog_entries_from_json`](/cua-sdk/reference/spaces/app-core/teleport#app_catalog_entries_from_json), [`app_catalog_entry`](/cua-sdk/reference/spaces/app-core/teleport#app_catalog_entry), [`app_picker_can_plan`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_can_plan), [`app_picker_consent`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_consent), [`app_picker_initial`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_initial), [`app_picker_plan_sensitive`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_plan_sensitive), [`app_picker_primary`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_primary), [`app_picker_progress`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_progress), [`app_picker_reduce`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_reduce), [`app_picker_review`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_review), [`app_picker_sections`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_sections), [`app_picker_sensitive_options`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_sensitive_options), [`app_picker_status`](/cua-sdk/reference/spaces/app-core/teleport#app_picker_status), [`app_teleport_plan`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_plan), [`app_teleport_plan_from_json`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_plan_from_json), [`app_teleport_run_event`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_run_event), [`app_teleport_run_status`](/cua-sdk/reference/spaces/app-core/teleport#app_teleport_run_status), [`AppCatalogEntry`](/cua-sdk/reference/spaces/app-core/teleport#appcatalogentry-record), [`AppConsentItem`](/cua-sdk/reference/spaces/app-core/teleport#appconsentitem-record), [`AppConsentKind`](/cua-sdk/reference/spaces/app-core/teleport#appconsentkind-enum), [`AppEntrySection`](/cua-sdk/reference/spaces/app-core/teleport#appentrysection-record), [`AppInstallCuaPrompt`](/cua-sdk/reference/spaces/app-core/teleport#appinstallcuaprompt-record), [`AppPickerAction`](/cua-sdk/reference/spaces/app-core/teleport#apppickeraction-enum), [`AppPickerEvent`](/cua-sdk/reference/spaces/app-core/teleport#apppickerevent-enum), [`AppPickerPrimary`](/cua-sdk/reference/spaces/app-core/teleport#apppickerprimary-record), [`AppPickerState`](/cua-sdk/reference/spaces/app-core/teleport#apppickerstate-record), [`AppPickerStep`](/cua-sdk/reference/spaces/app-core/teleport#apppickerstep-enum), [`AppPickerTab`](/cua-sdk/reference/spaces/app-core/teleport#apppickertab-enum), [`AppPlanStepView`](/cua-sdk/reference/spaces/app-core/teleport#appplanstepview-record), [`AppReviewView`](/cua-sdk/reference/spaces/app-core/teleport#appreviewview-record), [`AppTeleportCapability`](/cua-sdk/reference/spaces/app-core/teleport#appteleportcapability-enum), [`AppTeleportConsent`](/cua-sdk/reference/spaces/app-core/teleport#appteleportconsent-record), [`AppTeleportMove`](/cua-sdk/reference/spaces/app-core/teleport#appteleportmove-enum), [`AppTeleportPlan`](/cua-sdk/reference/spaces/app-core/teleport#appteleportplan-record), [`AppTeleportRunEvent`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunevent-record), [`AppTeleportRunPhase`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunphase-enum), [`AppTeleportRunReport`](/cua-sdk/reference/spaces/app-core/teleport#appteleportrunreport-record)
**Your cloud**: [`app_cloud_connect_action_from_json`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_action_from_json), [`app_cloud_connect_initial`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_initial), [`app_cloud_connect_input_from_json`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_input_from_json), [`app_cloud_connect_input_from_status_json`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_input_from_status_json), [`app_cloud_connect_reduce`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_reduce), [`app_cloud_connect_view`](/cua-sdk/reference/spaces/app-core/cloud#app_cloud_connect_view), [`app_connected_cloud_from_json`](/cua-sdk/reference/spaces/app-core/cloud#app_connected_cloud_from_json), [`app_connected_clouds_from_status_json`](/cua-sdk/reference/spaces/app-core/cloud#app_connected_clouds_from_status_json), [`app_is_cloud_word`](/cua-sdk/reference/spaces/app-core/cloud#app_is_cloud_word), [`AppCloudCheckInput`](/cua-sdk/reference/spaces/app-core/cloud#appcloudcheckinput-record), [`AppCloudCheckRow`](/cua-sdk/reference/spaces/app-core/cloud#appcloudcheckrow-record), [`AppCloudConnectAction`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectaction-enum), [`AppCloudConnectInput`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectinput-record), [`AppCloudConnectPhase`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectphase-enum), [`AppCloudConnectRequest`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectrequest-enum), [`AppCloudConnectState`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectstate-record), [`AppCloudConnectView`](/cua-sdk/reference/spaces/app-core/cloud#appcloudconnectview-record), [`AppCloudField`](/cua-sdk/reference/spaces/app-core/cloud#appcloudfield-record), [`AppCloudOffer`](/cua-sdk/reference/spaces/app-core/cloud#appcloudoffer-record), [`AppCloudProviderInput`](/cua-sdk/reference/spaces/app-core/cloud#appcloudproviderinput-record), [`AppCloudProviderRow`](/cua-sdk/reference/spaces/app-core/cloud#appcloudproviderrow-record), [`AppCloudTargetArgs`](/cua-sdk/reference/spaces/app-core/cloud#appcloudtargetargs-record), [`AppConnectedCloud`](/cua-sdk/reference/spaces/app-core/cloud#appconnectedcloud-record)
@@ -98,15 +98,15 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
**Experiments**: [`app_experiments_choose`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_choose), [`app_experiments_from_json`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_from_json), [`app_experiments_page`](/cua-sdk/reference/spaces/app-core/experiments#app_experiments_page), [`app_settings_with_storage`](/cua-sdk/reference/spaces/app-core/experiments#app_settings_with_storage), [`app_telemetry_experiments_changed`](/cua-sdk/reference/spaces/app-core/experiments#app_telemetry_experiments_changed), [`app_telemetry_experiments_on`](/cua-sdk/reference/spaces/app-core/experiments#app_telemetry_experiments_on), [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record)
-**This machine**: [`app_host_arch`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_arch), [`app_host_form_action_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_action_from_json), [`app_host_form_initial`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_initial), [`app_host_form_reduce`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_reduce), [`app_host_form_view`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_view), [`app_host_looks_like_listen`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_looks_like_listen), [`app_host_panel`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_panel), [`app_host_parse_allow_list`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_parse_allow_list), [`app_host_permission_rows`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_permission_rows), [`app_host_setting_change`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setting_change), [`app_host_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setup), [`app_host_state`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state), [`app_host_state_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state_from_json), [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_summary_input), [`app_host_validate_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_validate_setup), [`app_with_this_machine`](/cua-sdk/reference/spaces/app-core/this-machine#app_with_this_machine), [`AppHostAccess`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccess-record), [`AppHostAccessRow`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccessrow-record), [`AppHostAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaction-record), [`AppHostActionId`](/cua-sdk/reference/spaces/app-core/this-machine#apphostactionid-enum), [`AppHostClient`](/cua-sdk/reference/spaces/app-core/this-machine#apphostclient-record), [`AppHostConfirm`](/cua-sdk/reference/spaces/app-core/this-machine#apphostconfirm-record), [`AppHostFormAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformaction-enum), [`AppHostFormChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformchoice-record), [`AppHostFormField`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformfield-record), [`AppHostFormState`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformstate-record), [`AppHostFormView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformview-record), [`AppHostLimit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostlimit-record), [`AppHostPanelView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpanelview-record), [`AppHostPermissionInput`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpermissioninput-record), [`AppHostProvidedSpace`](/cua-sdk/reference/spaces/app-core/this-machine#apphostprovidedspace-record), [`AppHostSettingChange`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsettingchange-record), [`AppHostSetupRequest`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetuprequest-record), [`AppHostSpacesAudit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostspacesaudit-record), [`AppHostState`](/cua-sdk/reference/spaces/app-core/this-machine#apphoststate-record), [`AppHostToggle`](/cua-sdk/reference/spaces/app-core/this-machine#apphosttoggle-record), [`AppPermissionRow`](/cua-sdk/reference/spaces/app-core/this-machine#apppermissionrow-record)
+**This machine**: [`app_host_arch`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_arch), [`app_host_form_action_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_action_from_json), [`app_host_form_initial`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_initial), [`app_host_form_reduce`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_reduce), [`app_host_form_view`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_form_view), [`app_host_looks_like_listen`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_looks_like_listen), [`app_host_panel`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_panel), [`app_host_parse_allow_list`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_parse_allow_list), [`app_host_permission_rows`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_permission_rows), [`app_host_setting_change`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setting_change), [`app_host_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_setup), [`app_host_state`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state), [`app_host_state_from_json`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_state_from_json), [`app_host_summary_input`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_summary_input), [`app_host_validate_setup`](/cua-sdk/reference/spaces/app-core/this-machine#app_host_validate_setup), [`app_with_this_machine`](/cua-sdk/reference/spaces/app-core/this-machine#app_with_this_machine), [`AppHostAccess`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccess-record), [`AppHostAccessRow`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaccessrow-record), [`AppHostAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostaction-record), [`AppHostActionId`](/cua-sdk/reference/spaces/app-core/this-machine#apphostactionid-enum), [`AppHostClient`](/cua-sdk/reference/spaces/app-core/this-machine#apphostclient-record), [`AppHostConfirm`](/cua-sdk/reference/spaces/app-core/this-machine#apphostconfirm-record), [`AppHostFormAction`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformaction-enum), [`AppHostFormChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformchoice-record), [`AppHostFormField`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformfield-record), [`AppHostFormState`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformstate-record), [`AppHostFormView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostformview-record), [`AppHostLimit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostlimit-record), [`AppHostPanelView`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpanelview-record), [`AppHostPermissionInput`](/cua-sdk/reference/spaces/app-core/this-machine#apphostpermissioninput-record), [`AppHostProvidedSpace`](/cua-sdk/reference/spaces/app-core/this-machine#apphostprovidedspace-record), [`AppHostSettingChange`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsettingchange-record), [`AppHostSetupChoice`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetupchoice-record), [`AppHostSetupRequest`](/cua-sdk/reference/spaces/app-core/this-machine#apphostsetuprequest-record), [`AppHostSpacesAudit`](/cua-sdk/reference/spaces/app-core/this-machine#apphostspacesaudit-record), [`AppHostState`](/cua-sdk/reference/spaces/app-core/this-machine#apphoststate-record), [`AppHostToggle`](/cua-sdk/reference/spaces/app-core/this-machine#apphosttoggle-record), [`AppPermissionRow`](/cua-sdk/reference/spaces/app-core/this-machine#apppermissionrow-record)
**Spaces app core**: [`app_menu_input_from_json`](#app_menu_input_from_json), [`cua_spaces_register`](#cua_spaces_register)
-**Notch**: [`app_notch_estimated_progress`](/cua-sdk/reference/spaces/app-core/notch#app_notch_estimated_progress), [`app_notch_initial`](/cua-sdk/reference/spaces/app-core/notch#app_notch_initial), [`app_notch_layout`](/cua-sdk/reference/spaces/app-core/notch#app_notch_layout), [`app_notch_motion`](/cua-sdk/reference/spaces/app-core/notch#app_notch_motion), [`app_notch_radii`](/cua-sdk/reference/spaces/app-core/notch#app_notch_radii), [`app_notch_reduce`](/cua-sdk/reference/spaces/app-core/notch#app_notch_reduce), [`app_notch_tile_at`](/cua-sdk/reference/spaces/app-core/notch#app_notch_tile_at), [`app_notch_view`](/cua-sdk/reference/spaces/app-core/notch#app_notch_view), [`app_os_icon_svg`](/cua-sdk/reference/spaces/app-core/notch#app_os_icon_svg), [`app_os_icon_system_symbol`](/cua-sdk/reference/spaces/app-core/notch#app_os_icon_system_symbol), [`app_presence_name`](/cua-sdk/reference/spaces/app-core/notch#app_presence_name), [`app_presence_principal_id`](/cua-sdk/reference/spaces/app-core/notch#app_presence_principal_id), [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record), [`AppNotchActivity`](/cua-sdk/reference/spaces/app-core/notch#appnotchactivity-record), [`AppNotchActivityKind`](/cua-sdk/reference/spaces/app-core/notch#appnotchactivitykind-enum), [`AppNotchButton`](/cua-sdk/reference/spaces/app-core/notch#appnotchbutton-record), [`AppNotchButtonId`](/cua-sdk/reference/spaces/app-core/notch#appnotchbuttonid-enum), [`AppNotchEffect`](/cua-sdk/reference/spaces/app-core/notch#appnotcheffect-enum), [`AppNotchEvent`](/cua-sdk/reference/spaces/app-core/notch#appnotchevent-enum), [`AppNotchHeader`](/cua-sdk/reference/spaces/app-core/notch#appnotchheader-record), [`AppNotchLayout`](/cua-sdk/reference/spaces/app-core/notch#appnotchlayout-record), [`AppNotchMotion`](/cua-sdk/reference/spaces/app-core/notch#appnotchmotion-record), [`AppNotchPermission`](/cua-sdk/reference/spaces/app-core/notch#appnotchpermission-record), [`AppNotchPhase`](/cua-sdk/reference/spaces/app-core/notch#appnotchphase-enum), [`AppNotchPreview`](/cua-sdk/reference/spaces/app-core/notch#appnotchpreview-record), [`AppNotchRadii`](/cua-sdk/reference/spaces/app-core/notch#appnotchradii-record), [`AppNotchState`](/cua-sdk/reference/spaces/app-core/notch#appnotchstate-record), [`AppNotchTab`](/cua-sdk/reference/spaces/app-core/notch#appnotchtab-record), [`AppNotchTile`](/cua-sdk/reference/spaces/app-core/notch#appnotchtile-record), [`AppNotchTransfer`](/cua-sdk/reference/spaces/app-core/notch#appnotchtransfer-record), [`AppNotchTransition`](/cua-sdk/reference/spaces/app-core/notch#appnotchtransition-record), [`AppNotchView`](/cua-sdk/reference/spaces/app-core/notch#appnotchview-record), [`AppScreenFacts`](/cua-sdk/reference/spaces/app-core/notch#appscreenfacts-record)
+**Notch**: [`app_notch_estimated_progress`](/cua-sdk/reference/spaces/app-core/notch#app_notch_estimated_progress), [`app_notch_initial`](/cua-sdk/reference/spaces/app-core/notch#app_notch_initial), [`app_notch_layout`](/cua-sdk/reference/spaces/app-core/notch#app_notch_layout), [`app_notch_motion`](/cua-sdk/reference/spaces/app-core/notch#app_notch_motion), [`app_notch_radii`](/cua-sdk/reference/spaces/app-core/notch#app_notch_radii), [`app_notch_reduce`](/cua-sdk/reference/spaces/app-core/notch#app_notch_reduce), [`app_notch_tile_at`](/cua-sdk/reference/spaces/app-core/notch#app_notch_tile_at), [`app_notch_view`](/cua-sdk/reference/spaces/app-core/notch#app_notch_view), [`app_os_icon_svg`](/cua-sdk/reference/spaces/app-core/notch#app_os_icon_svg), [`app_os_icon_system_symbol`](/cua-sdk/reference/spaces/app-core/notch#app_os_icon_system_symbol), [`app_presence_name`](/cua-sdk/reference/spaces/app-core/notch#app_presence_name), [`app_presence_principal_id`](/cua-sdk/reference/spaces/app-core/notch#app_presence_principal_id), [`AppLogicalRect`](/cua-sdk/reference/spaces/app-core/notch#applogicalrect-record), [`AppNotchAccess`](/cua-sdk/reference/spaces/app-core/notch#appnotchaccess-record), [`AppNotchActivity`](/cua-sdk/reference/spaces/app-core/notch#appnotchactivity-record), [`AppNotchActivityKind`](/cua-sdk/reference/spaces/app-core/notch#appnotchactivitykind-enum), [`AppNotchButton`](/cua-sdk/reference/spaces/app-core/notch#appnotchbutton-record), [`AppNotchButtonId`](/cua-sdk/reference/spaces/app-core/notch#appnotchbuttonid-enum), [`AppNotchEffect`](/cua-sdk/reference/spaces/app-core/notch#appnotcheffect-enum), [`AppNotchEvent`](/cua-sdk/reference/spaces/app-core/notch#appnotchevent-enum), [`AppNotchHeader`](/cua-sdk/reference/spaces/app-core/notch#appnotchheader-record), [`AppNotchLayout`](/cua-sdk/reference/spaces/app-core/notch#appnotchlayout-record), [`AppNotchMotion`](/cua-sdk/reference/spaces/app-core/notch#appnotchmotion-record), [`AppNotchPermission`](/cua-sdk/reference/spaces/app-core/notch#appnotchpermission-record), [`AppNotchPhase`](/cua-sdk/reference/spaces/app-core/notch#appnotchphase-enum), [`AppNotchPreview`](/cua-sdk/reference/spaces/app-core/notch#appnotchpreview-record), [`AppNotchRadii`](/cua-sdk/reference/spaces/app-core/notch#appnotchradii-record), [`AppNotchState`](/cua-sdk/reference/spaces/app-core/notch#appnotchstate-record), [`AppNotchTab`](/cua-sdk/reference/spaces/app-core/notch#appnotchtab-record), [`AppNotchTile`](/cua-sdk/reference/spaces/app-core/notch#appnotchtile-record), [`AppNotchTransfer`](/cua-sdk/reference/spaces/app-core/notch#appnotchtransfer-record), [`AppNotchTransition`](/cua-sdk/reference/spaces/app-core/notch#appnotchtransition-record), [`AppNotchView`](/cua-sdk/reference/spaces/app-core/notch#appnotchview-record), [`AppScreenFacts`](/cua-sdk/reference/spaces/app-core/notch#appscreenfacts-record)
**Teleport picker grid**: [`app_picker_app_grid`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_app_grid), [`app_picker_grid_primary`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_grid_primary), [`app_picker_grid_step`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_grid_step), [`app_picker_grid_tabs`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_grid_tabs), [`app_picker_remote_grid`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_remote_grid), [`app_picker_window_grid`](/cua-sdk/reference/spaces/app-core/teleport-grid#app_picker_window_grid), [`AppPickerGrid`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickergrid-record), [`AppPickerGridPrimary`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickergridprimary-record), [`AppPickerGridTab`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickergridtab-enum), [`AppPickerGridTabItem`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickergridtabitem-record), [`AppPickerTile`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickertile-record), [`AppPickerTileIcon`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickertileicon-enum), [`AppPickerTileSection`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickertilesection-record), [`AppPickerTileThumbnail`](/cua-sdk/reference/spaces/app-core/teleport-grid#apppickertilethumbnail-enum)
-**Keyvault**: [`app_sensitive_group_sdk`](/cua-sdk/reference/spaces/app-core/keyvault#app_sensitive_group_sdk), [`AppSensitiveGroup`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitivegroup-enum), [`AppSensitiveOption`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitiveoption-record), [`KeyvaultClient`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultclient), [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record), [`kv_credential_form`](/cua-sdk/reference/spaces/app-core/keyvault#kv_credential_form), [`kv_duration`](/cua-sdk/reference/spaces/app-core/keyvault#kv_duration), [`kv_labels`](/cua-sdk/reference/spaces/app-core/keyvault#kv_labels), [`kv_overview_from_json`](/cua-sdk/reference/spaces/app-core/keyvault#kv_overview_from_json), [`kv_passphrase_check`](/cua-sdk/reference/spaces/app-core/keyvault#kv_passphrase_check), [`kv_recovery_key_text`](/cua-sdk/reference/spaces/app-core/keyvault#kv_recovery_key_text), [`kv_sharing_label`](/cua-sdk/reference/spaces/app-core/keyvault#kv_sharing_label), [`KvAccessRequest`](/cua-sdk/reference/spaces/app-core/keyvault#kvaccessrequest-record), [`KvAuditEntry`](/cua-sdk/reference/spaces/app-core/keyvault#kvauditentry-record), [`KvCaller`](/cua-sdk/reference/spaces/app-core/keyvault#kvcaller-record), [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum), [`KvCookieInfo`](/cua-sdk/reference/spaces/app-core/keyvault#kvcookieinfo-record), [`KvCredentialForm`](/cua-sdk/reference/spaces/app-core/keyvault#kvcredentialform-record), [`KvDelivery`](/cua-sdk/reference/spaces/app-core/keyvault#kvdelivery-record), [`KvFormMode`](/cua-sdk/reference/spaces/app-core/keyvault#kvformmode-enum), [`KvGrant`](/cua-sdk/reference/spaces/app-core/keyvault#kvgrant-record), [`KvItem`](/cua-sdk/reference/spaces/app-core/keyvault#kvitem-record), [`KvItemPolicy`](/cua-sdk/reference/spaces/app-core/keyvault#kvitempolicy-record), [`KvItemSummary`](/cua-sdk/reference/spaces/app-core/keyvault#kvitemsummary-record), [`KvLabels`](/cua-sdk/reference/spaces/app-core/keyvault#kvlabels-record), [`KvMethod`](/cua-sdk/reference/spaces/app-core/keyvault#kvmethod-enum), [`KvOutcome`](/cua-sdk/reference/spaces/app-core/keyvault#kvoutcome-enum), [`KvPassphraseCheck`](/cua-sdk/reference/spaces/app-core/keyvault#kvpassphrasecheck-record), [`KvPending`](/cua-sdk/reference/spaces/app-core/keyvault#kvpending-record), [`KvRule`](/cua-sdk/reference/spaces/app-core/keyvault#kvrule-record), [`KvRuleCaller`](/cua-sdk/reference/spaces/app-core/keyvault#kvrulecaller-record), [`KvSelector`](/cua-sdk/reference/spaces/app-core/keyvault#kvselector-enum), [`KvSigning`](/cua-sdk/reference/spaces/app-core/keyvault#kvsigning-enum), [`KvStatus`](/cua-sdk/reference/spaces/app-core/keyvault#kvstatus-record), [`KvStrength`](/cua-sdk/reference/spaces/app-core/keyvault#kvstrength-enum), [`KvVerification`](/cua-sdk/reference/spaces/app-core/keyvault#kvverification-record)
+**Keyvault**: [`app_sensitive_group_sdk`](/cua-sdk/reference/spaces/app-core/keyvault#app_sensitive_group_sdk), [`AppSensitiveGroup`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitivegroup-enum), [`AppSensitiveOption`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitiveoption-record), [`KeyvaultClient`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultclient), [`KeyvaultOverview`](/cua-sdk/reference/spaces/app-core/keyvault#keyvaultoverview-record), [`kv_credential_form`](/cua-sdk/reference/spaces/app-core/keyvault#kv_credential_form), [`kv_duration`](/cua-sdk/reference/spaces/app-core/keyvault#kv_duration), [`kv_labels`](/cua-sdk/reference/spaces/app-core/keyvault#kv_labels), [`kv_overview_from_json`](/cua-sdk/reference/spaces/app-core/keyvault#kv_overview_from_json), [`kv_passphrase_check`](/cua-sdk/reference/spaces/app-core/keyvault#kv_passphrase_check), [`kv_prune_dismissed`](/cua-sdk/reference/spaces/app-core/keyvault#kv_prune_dismissed), [`kv_recovery_key_text`](/cua-sdk/reference/spaces/app-core/keyvault#kv_recovery_key_text), [`kv_sharing_label`](/cua-sdk/reference/spaces/app-core/keyvault#kv_sharing_label), [`kv_signed_in_spaces`](/cua-sdk/reference/spaces/app-core/keyvault#kv_signed_in_spaces), [`kv_space_access_key`](/cua-sdk/reference/spaces/app-core/keyvault#kv_space_access_key), [`kv_visible_sharing_label`](/cua-sdk/reference/spaces/app-core/keyvault#kv_visible_sharing_label), [`KvAccessRequest`](/cua-sdk/reference/spaces/app-core/keyvault#kvaccessrequest-record), [`KvAuditEntry`](/cua-sdk/reference/spaces/app-core/keyvault#kvauditentry-record), [`KvCaller`](/cua-sdk/reference/spaces/app-core/keyvault#kvcaller-record), [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum), [`KvCookieInfo`](/cua-sdk/reference/spaces/app-core/keyvault#kvcookieinfo-record), [`KvCredentialForm`](/cua-sdk/reference/spaces/app-core/keyvault#kvcredentialform-record), [`KvDelivery`](/cua-sdk/reference/spaces/app-core/keyvault#kvdelivery-record), [`KvFormMode`](/cua-sdk/reference/spaces/app-core/keyvault#kvformmode-enum), [`KvGrant`](/cua-sdk/reference/spaces/app-core/keyvault#kvgrant-record), [`KvItem`](/cua-sdk/reference/spaces/app-core/keyvault#kvitem-record), [`KvItemPolicy`](/cua-sdk/reference/spaces/app-core/keyvault#kvitempolicy-record), [`KvItemSummary`](/cua-sdk/reference/spaces/app-core/keyvault#kvitemsummary-record), [`KvLabels`](/cua-sdk/reference/spaces/app-core/keyvault#kvlabels-record), [`KvMethod`](/cua-sdk/reference/spaces/app-core/keyvault#kvmethod-enum), [`KvOutcome`](/cua-sdk/reference/spaces/app-core/keyvault#kvoutcome-enum), [`KvPassphraseCheck`](/cua-sdk/reference/spaces/app-core/keyvault#kvpassphrasecheck-record), [`KvPending`](/cua-sdk/reference/spaces/app-core/keyvault#kvpending-record), [`KvRule`](/cua-sdk/reference/spaces/app-core/keyvault#kvrule-record), [`KvRuleCaller`](/cua-sdk/reference/spaces/app-core/keyvault#kvrulecaller-record), [`KvSelector`](/cua-sdk/reference/spaces/app-core/keyvault#kvselector-enum), [`KvSigning`](/cua-sdk/reference/spaces/app-core/keyvault#kvsigning-enum), [`KvStatus`](/cua-sdk/reference/spaces/app-core/keyvault#kvstatus-record), [`KvStrength`](/cua-sdk/reference/spaces/app-core/keyvault#kvstrength-enum), [`KvVerification`](/cua-sdk/reference/spaces/app-core/keyvault#kvverification-record)
**Share sheet**: [`app_share_action_from_json`](/cua-sdk/reference/spaces/app-core/share#app_share_action_from_json), [`app_share_initial`](/cua-sdk/reference/spaces/app-core/share#app_share_initial), [`app_share_input_from_json`](/cua-sdk/reference/spaces/app-core/share#app_share_input_from_json), [`app_share_reduce`](/cua-sdk/reference/spaces/app-core/share#app_share_reduce), [`app_share_state_from_json`](/cua-sdk/reference/spaces/app-core/share#app_share_state_from_json), [`app_share_view`](/cua-sdk/reference/spaces/app-core/share#app_share_view), [`AppRoleOption`](/cua-sdk/reference/spaces/app-core/share#approleoption-record), [`AppShareEntryInput`](/cua-sdk/reference/spaces/app-core/share#appshareentryinput-record), [`AppShareInput`](/cua-sdk/reference/spaces/app-core/share#appshareinput-record), [`AppShareRequest`](/cua-sdk/reference/spaces/app-core/share#appsharerequest-enum), [`AppShareRowView`](/cua-sdk/reference/spaces/app-core/share#appsharerowview-record), [`AppShareSheetAction`](/cua-sdk/reference/spaces/app-core/share#appsharesheetaction-enum), [`AppShareSheetState`](/cua-sdk/reference/spaces/app-core/share#appsharesheetstate-record), [`AppShareSheetView`](/cua-sdk/reference/spaces/app-core/share#appsharesheetview-record)
@@ -116,6 +116,8 @@ pub fn app_menu_input_from_json(json: String) -> Result<AppMenuInput, CuaError>
**Usage telemetry**: [`app_telemetry_creates`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_creates), [`app_telemetry_enroll`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_enroll), [`app_telemetry_feature`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_feature), [`app_telemetry_launched`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_launched), [`app_telemetry_onboarding`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_onboarding), [`app_telemetry_onboarding_finished`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_onboarding_finished), [`app_telemetry_record`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_record), [`app_telemetry_share`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_share), [`app_telemetry_start`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_start), [`app_telemetry_storage`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_storage), [`app_telemetry_welcome_left`](/cua-sdk/reference/spaces/app-core/telemetry#app_telemetry_welcome_left), [`AppTelemetrySignal`](/cua-sdk/reference/spaces/app-core/telemetry#apptelemetrysignal-enum)
+**Teleport transfer and drag**: [`app_transfer_reduce`](/cua-sdk/reference/spaces/app-core/teleport-transfer#app_transfer_reduce), [`app_transfer_title`](/cua-sdk/reference/spaces/app-core/teleport-transfer#app_transfer_title), [`AppDragOverlayEffect`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlayeffect-enum), [`AppDragOverlayEvent`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlayevent-enum), [`AppDragOverlayPhase`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlayphase-enum), [`AppDragOverlayState`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlaystate-record), [`AppDragOverlayTransition`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlaytransition-record), [`AppTransferOverlayState`](/cua-sdk/reference/spaces/app-core/teleport-transfer#apptransferoverlaystate-record), [`AppTransferPhase`](/cua-sdk/reference/spaces/app-core/teleport-transfer#apptransferphase-enum), [`AppTransferSignal`](/cua-sdk/reference/spaces/app-core/teleport-transfer#apptransfersignal-record), [`AppTransferStatus`](/cua-sdk/reference/spaces/app-core/teleport-transfer#apptransferstatus-enum)
+
**New Space wizard**: [`app_wizard_action_from_json`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_action_from_json), [`app_wizard_create_args`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_create_args), [`app_wizard_create_failed_text`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_create_failed_text), [`app_wizard_creating_text`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_creating_text), [`app_wizard_env_from_json`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_env_from_json), [`app_wizard_image_suggestions`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_image_suggestions), [`app_wizard_initial`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_initial), [`app_wizard_reduce`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_reduce), [`app_wizard_validate_image_ref`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_validate_image_ref), [`app_wizard_view`](/cua-sdk/reference/spaces/app-core/new-space#app_wizard_view), [`AppAddressForm`](/cua-sdk/reference/spaces/app-core/new-space#appaddressform-record), [`AppAddressSubmit`](/cua-sdk/reference/spaces/app-core/new-space#appaddresssubmit-record), [`AppAddressView`](/cua-sdk/reference/spaces/app-core/new-space#appaddressview-record), [`AppCloudEngine`](/cua-sdk/reference/spaces/app-core/new-space#appcloudengine-enum), [`AppCloudPricing`](/cua-sdk/reference/spaces/app-core/new-space#appcloudpricing-record), [`AppCreatePlan`](/cua-sdk/reference/spaces/app-core/new-space#appcreateplan-record), [`AppCreateSpaceArgs`](/cua-sdk/reference/spaces/app-core/new-space#appcreatespaceargs-record), [`AppGpuChoice`](/cua-sdk/reference/spaces/app-core/new-space#appgpuchoice-record), [`AppGpuRow`](/cua-sdk/reference/spaces/app-core/new-space#appgpurow-record), [`AppKindOption`](/cua-sdk/reference/spaces/app-core/new-space#appkindoption-record), [`AppLocalEngine`](/cua-sdk/reference/spaces/app-core/new-space#applocalengine-enum), [`AppLocalStorage`](/cua-sdk/reference/spaces/app-core/new-space#applocalstorage-record), [`AppLocation`](/cua-sdk/reference/spaces/app-core/new-space#applocation-enum), [`AppMenuOption`](/cua-sdk/reference/spaces/app-core/new-space#appmenuoption-record), [`AppRuntime`](/cua-sdk/reference/spaces/app-core/new-space#appruntime-enum), [`AppStepDot`](/cua-sdk/reference/spaces/app-core/new-space#appstepdot-record), [`AppStepState`](/cua-sdk/reference/spaces/app-core/new-space#appstepstate-enum), [`AppStepView`](/cua-sdk/reference/spaces/app-core/new-space#appstepview-record), [`AppStorageVolume`](/cua-sdk/reference/spaces/app-core/new-space#appstoragevolume-record), [`AppTile`](/cua-sdk/reference/spaces/app-core/new-space#apptile-record), [`AppWizardAction`](/cua-sdk/reference/spaces/app-core/new-space#appwizardaction-enum), [`AppWizardEnv`](/cua-sdk/reference/spaces/app-core/new-space#appwizardenv-record), [`AppWizardFact`](/cua-sdk/reference/spaces/app-core/new-space#appwizardfact-record), [`AppWizardField`](/cua-sdk/reference/spaces/app-core/new-space#appwizardfield-record), [`AppWizardLabels`](/cua-sdk/reference/spaces/app-core/new-space#appwizardlabels-record), [`AppWizardMode`](/cua-sdk/reference/spaces/app-core/new-space#appwizardmode-enum), [`AppWizardState`](/cua-sdk/reference/spaces/app-core/new-space#appwizardstate-record), [`AppWizardView`](/cua-sdk/reference/spaces/app-core/new-space#appwizardview-record)
**Image catalog**: [`AppImageDistro`](/cua-sdk/reference/spaces/app-core/images#appimagedistro-record), [`AppImageFieldView`](/cua-sdk/reference/spaces/app-core/images#appimagefieldview-record), [`AppImageGroup`](/cua-sdk/reference/spaces/app-core/images#appimagegroup-record), [`AppImageSizes`](/cua-sdk/reference/spaces/app-core/images#appimagesizes-record), [`AppImageSuggestion`](/cua-sdk/reference/spaces/app-core/images#appimagesuggestion-record), [`AppImageTier`](/cua-sdk/reference/spaces/app-core/images#appimagetier-enum), [`AppPlatformSize`](/cua-sdk/reference/spaces/app-core/images#appplatformsize-record), [`AppSandboxImage`](/cua-sdk/reference/spaces/app-core/images#appsandboximage-record), [`AppSuggestionGroup`](/cua-sdk/reference/spaces/app-core/images#appsuggestiongroup-record)
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx
index 7d0ab1f411..b9480d35a0 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault-screens.mdx
@@ -29,6 +29,7 @@ The `kv_*` functions derive each Keyvault screen from a `KeyvaultOverview`. `kv_
| `detail` | `String` | | Muted detail. |
| `action_label` / `actionLabel` | `String` | | "Revoke", "Remove", "Wipe". |
| `command` | [`KvCommand`](/cua-sdk/reference/spaces/app-core/keyvault#kvcommand-enum) | | What the button sends. |
+| `imports` | `Vec<String>` | | A Space's copies: their import ids, which Dismiss hides from the notch (empty for grants and rules). |
## `KvAccessKind` enum
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx
index aa942dad1f..71ac43a4c1 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/keyvault.mdx
@@ -351,7 +351,7 @@ Returned by [`kv_credential_form`](#kv_credential_form).
| `items` | `Vec<String>` | | Items. |
| `caller_fp` / `callerFp` | `String` | | Caller fingerprint. |
| `delivered_ms` / `deliveredMs` | `u64` | | Delivered. |
-| `expires_ms` / `expiresMs` | `u64` | | Wiped at. |
+| `expires_ms` / `expiresMs` | `u64` | | Wiped at (`KV_NO_EXPIRY`: only when wiped). |
| `wiped` | `bool` | | Already wiped. |
## `KvGrant` record
@@ -485,6 +485,7 @@ Returned by [`kv_passphrase_check`](#kv_passphrase_check).
| `items` | `u32` | | Items. |
| `pending` | `u32` | | Pending requests. |
| `unlock_policy` / `unlockPolicy` | `Option<String>` | | `auto` or `presence`. |
+| `auto_wipe` / `autoWipe` | `Option<bool>` | | Delivered copies wipe themselves after their TTL (off by default; none: not told, a broker before the setting or a third party). |
| `os_protector_available` / `osProtectorAvailable` | `bool` | | The daemon can create the OS key store protector (setup offers Touch ID); false for a development daemon, which is passphrase-only. |
| `passphrase_available` / `passphraseAvailable` | `bool` | | A passphrase can always be chosen. |
| `unlock_protectors` / `unlockProtectors` | `Vec<String>` | | Protector kinds that can unlock this vault now (`macos-keychain`, `windows-credential`, `passphrase`, `recovery`). |
@@ -511,6 +512,7 @@ Returned by [`kv_passphrase_check`](#kv_passphrase_check).
.setUnattended(itemIds: [String], unattended: Bool)
.revokeGrant(id: String)
.removeRule(id: String)
+.setAutoWipe(on: Bool)
.release(target: String)
.approve(requestId: String, items: [String]?)
.deny(requestId: String)
@@ -526,6 +528,7 @@ KvCommand::SetDisabled { disabled: bool }
KvCommand::SetUnattended { item_ids: Vec<String>, unattended: bool }
KvCommand::RevokeGrant { id: String }
KvCommand::RemoveRule { id: String }
+KvCommand::SetAutoWipe { on: bool }
KvCommand::Release { target: String }
KvCommand::Approve { request_id: String, items: Option<Vec<String>> }
KvCommand::Deny { request_id: String }
@@ -542,6 +545,7 @@ KvCommand::Deny { request_id: String }
| `SetUnattended` | Per-item unattended (turning on asks for Touch ID). Fields: `item_ids: Vec<String>`, `unattended: bool` |
| `RevokeGrant` | Revoke a grant (`*`: all). Fields: `id: String` |
| `RemoveRule` | Remove a rule. Fields: `id: String` |
+| `SetAutoWipe` | Auto-wipe of delivered copies (turning it off asks for Touch ID). Fields: `on: bool` |
| `Release` | Wipe a Space's copies. Fields: `target: String` |
| `Approve` | Approve a request for exactly these items (the daemon asks for presence). `None` keeps everything the request asked for, which the approval sheet only sends when the user ticked every row. Fields: `request_id: String`, `items: Option<Vec<String>>` |
| `Deny` | Deny a request. Fields: `request_id: String` |
@@ -865,6 +869,35 @@ pub fn kv_passphrase_check(mode: KvFormMode, passphrase: String, confirm: String
**Returns** [`KvPassphraseCheck`](#kvpassphrasecheck-record)
+## `kv_prune_dismissed`
+
+The dismissed copies still live.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func kvPruneDismissed(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> [String]
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn kv_prune_dismissed(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>) -> Vec<String>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |
+| `now_ms` | `i64` | required |
+| `dismissed` | `Vec<String>` | required |
+
+**Returns** `Vec<String>`
+
## `kv_recovery_key_text`
The banner after setup: the recovery key, shown once.
@@ -920,3 +953,94 @@ pub fn kv_sharing_label(overview: KeyvaultOverview, now_ms: i64) -> Option<Strin
| `now_ms` | `i64` | required |
**Returns** `Option<String>`
+
+## `kv_signed_in_spaces`
+
+The ids of `spaces` signed in through the Keyvault (a live copy is in
+them), less the `dismissed` copies: "Signed in" in the Spaces list
+(nothing dismissed), the key on notch tiles.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func kvSignedInSpaces(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String], spaces: [AppSpace]) -> [String]
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn kv_signed_in_spaces(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>, spaces: Vec<AppSpace>) -> Vec<String>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |
+| `now_ms` | `i64` | required |
+| `dismissed` | `Vec<String>` | required |
+| `spaces` | [`Vec<AppSpace>`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |
+
+**Returns** `Vec<String>`
+
+## `kv_space_access_key`
+
+The Access row of `space`'s copies, to focus from its "Signed in" badge.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func kvSpaceAccessKey(overview: KeyvaultOverview, nowMs: Int64, space: AppSpace) -> String?
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn kv_space_access_key(overview: KeyvaultOverview, now_ms: i64, space: AppSpace) -> Option<String>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |
+| `now_ms` | `i64` | required |
+| `space` | [`AppSpace`](/cua-sdk/reference/spaces/app-core/spaces#appspace-record) | required |
+
+**Returns** `Option<String>`
+
+## `kv_visible_sharing_label`
+
+`kv_sharing_label` without the copies the user dismissed (import ids):
+the notch indicator.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func kvVisibleSharingLabel(overview: KeyvaultOverview, nowMs: Int64, dismissed: [String]) -> String?
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn kv_visible_sharing_label(overview: KeyvaultOverview, now_ms: i64, dismissed: Vec<String>) -> Option<String>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `overview` | [`KeyvaultOverview`](#keyvaultoverview-record) | required |
+| `now_ms` | `i64` | required |
+| `dismissed` | `Vec<String>` | required |
+
+**Returns** `Option<String>`
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json b/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json
index 8ece1ddfce..0168e2d182 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/meta.json
@@ -7,6 +7,7 @@
"new-space",
"images",
"teleport",
+ "teleport-transfer",
"teleport-grid",
"cloud",
"drag-trigger",
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx
index 326f0db4ff..25c237c39f 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/notch.mdx
@@ -156,6 +156,13 @@ pub fn app_os_icon_system_symbol(id: String) -> Option<String>
**Returns** `Option<String>`
+## `AppNotchAccess` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `text` | `String` | | "Keyvault sign-ins live in dev-1" (opens the Access page). |
+| `dismiss` | `String` | | "Dismiss". |
+
## `AppNotchActivity` record
| Field | Type | Default | Description |
@@ -219,6 +226,7 @@ Returned by [`app_notch_motion`](#app_notch_motion).
| `hover_response` / `hoverResponse` | `f64` | | Hover acknowledgement spring response (s): the closed notch grows a little while the dwell runs. |
| `hover_damping` / `hoverDamping` | `f64` | | Hover acknowledgement damping fraction. |
| `hover_scale` / `hoverScale` | `f64` | | Horizontal scale of the closed notch (and its tab) under the pointer. |
+| `hover_scale_y` / `hoverScaleY` | `f64` | | Vertical scale of the closed notch under the pointer (a few points taller, anchored at the top). |
| `content_delay_ms` / `contentDelayMs` | `u32` | | The content starts fading in this long after the shape starts opening (ms). |
| `content_in` / `contentIn` | `f64` | | Content fade-in duration (s). |
| `content_out` / `contentOut` | `f64` | | Content fade-out duration on close (s); the shape waits for it. |
@@ -267,12 +275,13 @@ Returned by [`app_notch_initial`](#app_notch_initial).
| `open` | `bool` | | Opened by hover or click. |
| `hovering` | `bool` | | The pointer is over the panel. |
| `drop_targeted` / `dropTargeted` | `bool` | | A file or app drag (pasteboard) is over the panel. |
-| `drag` | [`AppDragOverlayState`](/cua-sdk/reference/spaces/app-core/teleport#appdragoverlaystate-record) | | The window drag state machine. |
+| `drag` | [`AppDragOverlayState`](/cua-sdk/reference/spaces/app-core/teleport-transfer#appdragoverlaystate-record) | | The window drag state machine. |
| `drag_permission_missing` / `dragPermissionMissing` | `bool` | | Window-drag detection needs a permission this process lacks (macOS Accessibility): the open panel says so instead of failing silently. |
| `query` | `String` | | The header's search text (cleared when the panel closes). |
| `hotspot` | `bool` | | This machine shares its network to a Space (the hotspot). |
| `transfer` | [`Option<AppNotchTransfer>`](#appnotchtransfer-record) | | A teleport or file transfer is in flight. |
| `keyvault` | `Option<String>` | | Keyvault sign-ins are live in a Space right now (the core's `crate.keyvault.view.sharing_label`), so access is never silent. |
+| `signed_in` / `signedIn` | `Vec<String>` | | The Spaces signed in through the Keyvault, less the copies the user dismissed (`crate.keyvault.view.signed_in_spaces`): their tiles carry the key. |
| `hidden` | `bool` | | "Spaces tab in the notch: Hide" (menu bar only): nothing shows in the notch, and hover, clicks and window drags do nothing. |
## `AppNotchTab` record
@@ -297,6 +306,7 @@ Returned by [`app_notch_initial`](#app_notch_initial).
| `label` | `String` | | Accessibility label: name, OS and status. |
| `progress` | `Option<u32>` | | While it is being created: overall progress in thousandths (a ring over the tile). |
| `progress_label` / `progressLabel` | `Option<String>` | | While it is being created: the phase in words ("Starting…"), or "Failed"; while it is being deleted, "Deleting…". |
+| `signed_in` / `signedIn` | `bool` | | Signed in through the Keyvault (and not dismissed): the key badge. |
## `AppNotchTransfer` record
@@ -334,6 +344,7 @@ Returned by [`app_notch_view`](#app_notch_view).
| `show_tab` / `showTab` | `bool` | | The tab shows (closed, no drag in flight; a drag tucks it away). |
| `hover_cue` / `hoverCue` | `bool` | | The pointer rests on the closed notch while the dwell runs: the shells grow it by `NotchMotion.hover_scale`. |
| `permission` | [`Option<AppNotchPermission>`](#appnotchpermission-record) | | One line in the open panel when window drags cannot be detected. |
+| `access` | [`Option<AppNotchAccess>`](#appnotchaccess-record) | | One line in the open panel while Keyvault sign-ins are live in a Space (and not dismissed): what is live, and Dismiss. |
## `AppNotchActivityKind` enum
@@ -450,7 +461,7 @@ AppNotchEffect::Drag { effect: AppDragOverlayEffect }
.escape
.visibility(shown: Bool)
.activity(hotspot: Bool, transfer: AppNotchTransfer?)
-.keyvault(label: String?)
+.keyvault(label: String?, signedIn: [String])
```
</Tab>
@@ -470,7 +481,7 @@ AppNotchEvent::Search { query: String }
AppNotchEvent::Escape
AppNotchEvent::Visibility { shown: bool }
AppNotchEvent::Activity { hotspot: bool, transfer: Option<AppNotchTransfer> }
-AppNotchEvent::Keyvault { label: Option<String> }
+AppNotchEvent::Keyvault { label: Option<String>, signed_in: Vec<String> }
```
</Tab>
@@ -491,7 +502,7 @@ AppNotchEvent::Keyvault { label: Option<String> }
| `Escape` | Esc: clears the search first, then closes. |
| `Visibility` | The notch setting changed: shown, or hidden (menu bar only). Fields: `shown: bool` |
| `Activity` | The hotspot or a transfer started, progressed or ended. Fields: `hotspot: bool`, `transfer: Option<AppNotchTransfer>` |
-| `Keyvault` | Keyvault sharing started, changed or stopped (none: nothing live). Fields: `label: Option<String>` |
+| `Keyvault` | Keyvault sharing started, changed or stopped (none: nothing live). Fields: `label: Option<String>`, `signed_in: Vec<String>` |
## `AppNotchPhase` enum
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
index 18e7b0420f..d1a4440f72 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/onboarding-settings.mdx
@@ -328,6 +328,7 @@ Returned by [`app_settings_load`](#app_settings_load).
| `update_channel` / `updateChannel` | [`AppUpdateChannel`](/cua-sdk/reference/spaces/app-core/about#appupdatechannel-enum) | | Which releases the updater offers (Settings, About). |
| `launch_at_login` / `launchAtLogin` | `Option<bool>` | | Launch at login, as the user chose it (the first run's Done page or Settings); `None`: never chosen (`crate.login_item.launch_plan`). |
| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments: every switch off unless turned on (`crate.experiments`). |
+| `dismissed_access` / `dismissedAccess` | `Vec<String>` | | Keyvault copies (import ids) the user dismissed from the notch: it no longer shows them, nothing is revoked or wiped (`crate.keyvault.view.prune_dismissed` forgets the gone ones). |
## `AppOnboardingAction` enum
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdx
new file mode 100644
index 0000000000..b168babe01
--- /dev/null
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport-transfer.mdx
@@ -0,0 +1,271 @@
+---
+title: "Teleport transfer and drag"
+description: "The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space."
+---
+
+{/*
+ AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
+ Generated by: pnpm --dir docs docs:generate:cua-sdk
+ Source: cua-bindgen docs --namespace cua_spaces_ffi (UniFFI metadata of libcua_spaces_ffi)
+ Version: 0.2.0
+*/}
+
+import { Callout } from 'fumadocs-ui/components/callout';
+import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
+
+<Callout title="Cua Spaces app export">
+These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (`import CuaSpacesFFI`); the Rust tab shows the `cua-spaces-ffi` crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
+</Callout>
+
+The transfer overlay follows a running teleport step by step; the drag overlay shows a file or app dragged onto a Space.
+
+## `AppDragOverlayState` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `phase` | [`AppDragOverlayPhase`](#appdragoverlayphase-enum) | | Phase. |
+| `window_id` / `windowId` | `Option<u32>` | | CoreGraphics id of the dragged window. |
+| `app_name` / `appName` | `Option<String>` | | The dragged app's name. |
+| `target_space_id` / `targetSpaceId` | `Option<String>` | | The tile under the cursor (selector only). |
+| `ghost` | `Option<String>` | | The captured ghost (a data URL or a shell-local image key). |
+
+## `AppDragOverlayTransition` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `state` | [`AppDragOverlayState`](#appdragoverlaystate-record) | | New state. |
+| `effects` | [`Vec<AppDragOverlayEffect>`](#appdragoverlayeffect-enum) | | Effects. |
+
+## `AppTransferOverlayState` record
+
+Returned by [`app_transfer_reduce`](#app_transfer_reduce).
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `phase` | [`AppTransferPhase`](#apptransferphase-enum) | | Phase. |
+| `app_name` / `appName` | `String` | | App being teleported. |
+| `message` | `Option<String>` | | Failure reason. |
+| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |
+| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |
+
+## `AppTransferSignal` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `status` | [`AppTransferStatus`](#apptransferstatus-enum) | | Status. |
+| `app_name` / `appName` | `Option<String>` | | App name. |
+| `message` | `Option<String>` | | Message. |
+| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |
+| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |
+
+## `AppDragOverlayEffect` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.capture(windowId: UInt32?)
+.commit(spaceId: String)
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppDragOverlayEffect::Capture { window_id: Option<u32> }
+AppDragOverlayEffect::Commit { space_id: String }
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Capture` | Capture the ghost (needs Screen Recording; none is fine). Fields: `window_id: Option<u32>` |
+| `Commit` | Teleport to this Space. Fields: `space_id: String` |
+
+## `AppDragOverlayEvent` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.start(windowId: UInt32?, appName: String?)
+.enterNotch
+.leaveNotch
+.over(spaceId: String)
+.out
+.ghostReady(ghost: String?)
+.drop(spaceId: String?)
+.cancel
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppDragOverlayEvent::Start { window_id: Option<u32>, app_name: Option<String> }
+AppDragOverlayEvent::EnterNotch
+AppDragOverlayEvent::LeaveNotch
+AppDragOverlayEvent::Over { space_id: String }
+AppDragOverlayEvent::Out
+AppDragOverlayEvent::GhostReady { ghost: Option<String> }
+AppDragOverlayEvent::Drop { space_id: Option<String> }
+AppDragOverlayEvent::Cancel
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Start` | A supported window drag began. Fields: `window_id: Option<u32>`, `app_name: Option<String>` |
+| `EnterNotch` | The cursor reached the notch box. |
+| `LeaveNotch` | The cursor left the selector. |
+| `Over` | Over a Space tile. Fields: `space_id: String` |
+| `Out` | Off every tile. |
+| `GhostReady` | The ghost capture finished. Fields: `ghost: Option<String>` |
+| `Drop` | Released; the tile under the cursor, if any. Fields: `space_id: Option<String>` |
+| `Cancel` | Abort. |
+
+## `AppDragOverlayPhase` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.idle
+.prompt
+.selector
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppDragOverlayPhase::Idle
+AppDragOverlayPhase::Prompt
+AppDragOverlayPhase::Selector
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Idle` | Nothing showing. |
+| `Prompt` | The "Teleport to Cua" box. |
+| `Selector` | The Space tiles as drop targets. |
+
+## `AppTransferPhase` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.active
+.error
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppTransferPhase::Active
+AppTransferPhase::Error
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Active` | Uploading. |
+| `Error` | Failed. |
+
+## `AppTransferStatus` enum
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+.start
+.progress
+.done
+.error
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+AppTransferStatus::Start
+AppTransferStatus::Progress
+AppTransferStatus::Done
+AppTransferStatus::Error
+```
+
+</Tab>
+</Tabs>
+
+| Variant | Description |
+| --- | --- |
+| `Start` | Began (or retried). |
+| `Progress` | Bytes moved. |
+| `Done` | Finished. |
+| `Error` | Failed. |
+
+## `app_transfer_reduce`
+
+Advances the transfer overlay (`None` hides it).
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func appTransferReduce(state: AppTransferOverlayState?, signal: AppTransferSignal) -> AppTransferOverlayState?
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn app_transfer_reduce(state: Option<AppTransferOverlayState>, signal: AppTransferSignal) -> Option<AppTransferOverlayState>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `state` | [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record) | required |
+| `signal` | [`AppTransferSignal`](#apptransfersignal-record) | required |
+
+**Returns** [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record)
+
+## `app_transfer_title`
+
+The transfer overlay's title.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func appTransferTitle(state: AppTransferOverlayState) -> String
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn app_transfer_title(state: AppTransferOverlayState) -> String
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `state` | [`AppTransferOverlayState`](#apptransferoverlaystate-record) | required |
+
+**Returns** `String`
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx
index acf1c31595..3daed168bb 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/teleport.mdx
@@ -1,6 +1,6 @@
---
title: "Teleport picker"
-description: "The teleport picker and review, consent, the transfer overlay and drag-and-drop."
+description: "The teleport picker and review, and consent."
---
{/*
@@ -17,7 +17,7 @@ import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
These APIs are part of the Cua Spaces app export for building Spaces UIs. They are source-available under FSL-1.1-MIT and ship for Swift only (`import CuaSpacesFFI`); the Rust tab shows the `cua-spaces-ffi` crate they come from. The open source SDK packages for Python, TypeScript and Kotlin do not include them.
</Callout>
-The picker lists `Teleport.catalog` entries, reviews a `Teleport.plan` with its consent items, and follows the run. The transfer and drag overlays show a teleport in progress.
+The picker lists `Teleport.catalog` entries, reviews a `Teleport.plan` with its consent items, and follows the run. The overlays that show a teleport in progress are on [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer).
## `AppEntrySection` record
@@ -98,23 +98,6 @@ Returned by [`app_catalog_entries_from_json`](#app_catalog_entries_from_json), [
| `bytes` | `u64` | | Bytes that leave. |
| `sensitive` | `bool` | | Credentials, cookies, tokens. |
-## `AppDragOverlayState` record
-
-| Field | Type | Default | Description |
-| --- | --- | --- | --- |
-| `phase` | [`AppDragOverlayPhase`](#appdragoverlayphase-enum) | | Phase. |
-| `window_id` / `windowId` | `Option<u32>` | | CoreGraphics id of the dragged window. |
-| `app_name` / `appName` | `Option<String>` | | The dragged app's name. |
-| `target_space_id` / `targetSpaceId` | `Option<String>` | | The tile under the cursor (selector only). |
-| `ghost` | `Option<String>` | | The captured ghost (a data URL or a shell-local image key). |
-
-## `AppDragOverlayTransition` record
-
-| Field | Type | Default | Description |
-| --- | --- | --- | --- |
-| `state` | [`AppDragOverlayState`](#appdragoverlaystate-record) | | New state. |
-| `effects` | [`Vec<AppDragOverlayEffect>`](#appdragoverlayeffect-enum) | | Effects. |
-
## `AppPickerPrimary` record
Returned by [`app_picker_primary`](#app_picker_primary).
@@ -180,6 +163,8 @@ Returned by [`app_teleport_plan`](#app_teleport_plan), [`app_teleport_plan_from_
## `AppTeleportRunEvent` record
+Returned by [`app_teleport_run_event`](#app_teleport_run_event).
+
| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `step` | `u32` | | Step index. |
@@ -201,28 +186,6 @@ Returned by [`app_teleport_plan`](#app_teleport_plan), [`app_teleport_plan_from_
| `skipped` | `Vec<String>` | | Skipped. |
| `launched` | `bool` | | Launched. |
-## `AppTransferOverlayState` record
-
-Returned by [`app_transfer_reduce`](#app_transfer_reduce).
-
-| Field | Type | Default | Description |
-| --- | --- | --- | --- |
-| `phase` | [`AppTransferPhase`](#apptransferphase-enum) | | Phase. |
-| `app_name` / `appName` | `String` | | App being teleported. |
-| `message` | `Option<String>` | | Failure reason. |
-| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |
-| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |
-
-## `AppTransferSignal` record
-
-| Field | Type | Default | Description |
-| --- | --- | --- | --- |
-| `status` | [`AppTransferStatus`](#apptransferstatus-enum) | | Status. |
-| `app_name` / `appName` | `Option<String>` | | App name. |
-| `message` | `Option<String>` | | Message. |
-| `sent_bytes` / `sentBytes` | `Option<f64>` | | Bytes sent. |
-| `total_bytes` / `totalBytes` | `Option<f64>` | | Total bytes. |
-
## `AppConsentKind` enum
<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
@@ -258,105 +221,6 @@ AppConsentKind::Secret
| `State` | App state that leaves this machine. |
| `Secret` | A secret that leaves this machine. |
-## `AppDragOverlayEffect` enum
-
-<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
-<Tab value="Swift">
-
-```swift
-.capture(windowId: UInt32?)
-.commit(spaceId: String)
-```
-
-</Tab>
-<Tab value="Rust">
-
-```rust
-AppDragOverlayEffect::Capture { window_id: Option<u32> }
-AppDragOverlayEffect::Commit { space_id: String }
-```
-
-</Tab>
-</Tabs>
-
-| Variant | Description |
-| --- | --- |
-| `Capture` | Capture the ghost (needs Screen Recording; none is fine). Fields: `window_id: Option<u32>` |
-| `Commit` | Teleport to this Space. Fields: `space_id: String` |
-
-## `AppDragOverlayEvent` enum
-
-<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
-<Tab value="Swift">
-
-```swift
-.start(windowId: UInt32?, appName: String?)
-.enterNotch
-.leaveNotch
-.over(spaceId: String)
-.out
-.ghostReady(ghost: String?)
-.drop(spaceId: String?)
-.cancel
-```
-
-</Tab>
-<Tab value="Rust">
-
-```rust
-AppDragOverlayEvent::Start { window_id: Option<u32>, app_name: Option<String> }
-AppDragOverlayEvent::EnterNotch
-AppDragOverlayEvent::LeaveNotch
-AppDragOverlayEvent::Over { space_id: String }
-AppDragOverlayEvent::Out
-AppDragOverlayEvent::GhostReady { ghost: Option<String> }
-AppDragOverlayEvent::Drop { space_id: Option<String> }
-AppDragOverlayEvent::Cancel
-```
-
-</Tab>
-</Tabs>
-
-| Variant | Description |
-| --- | --- |
-| `Start` | A supported window drag began. Fields: `window_id: Option<u32>`, `app_name: Option<String>` |
-| `EnterNotch` | The cursor reached the notch box. |
-| `LeaveNotch` | The cursor left the selector. |
-| `Over` | Over a Space tile. Fields: `space_id: String` |
-| `Out` | Off every tile. |
-| `GhostReady` | The ghost capture finished. Fields: `ghost: Option<String>` |
-| `Drop` | Released; the tile under the cursor, if any. Fields: `space_id: Option<String>` |
-| `Cancel` | Abort. |
-
-## `AppDragOverlayPhase` enum
-
-<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
-<Tab value="Swift">
-
-```swift
-.idle
-.prompt
-.selector
-```
-
-</Tab>
-<Tab value="Rust">
-
-```rust
-AppDragOverlayPhase::Idle
-AppDragOverlayPhase::Prompt
-AppDragOverlayPhase::Selector
-```
-
-</Tab>
-</Tabs>
-
-| Variant | Description |
-| --- | --- |
-| `Idle` | Nothing showing. |
-| `Prompt` | The "Teleport to Cua" box. |
-| `Selector` | The Space tiles as drop targets. |
-
## `AppPickerAction` enum
<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
@@ -626,64 +490,6 @@ AppTeleportRunPhase::Done
| `Failed` | A step failed. |
| `Done` | All done. |
-## `AppTransferPhase` enum
-
-<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
-<Tab value="Swift">
-
-```swift
-.active
-.error
-```
-
-</Tab>
-<Tab value="Rust">
-
-```rust
-AppTransferPhase::Active
-AppTransferPhase::Error
-```
-
-</Tab>
-</Tabs>
-
-| Variant | Description |
-| --- | --- |
-| `Active` | Uploading. |
-| `Error` | Failed. |
-
-## `AppTransferStatus` enum
-
-<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
-<Tab value="Swift">
-
-```swift
-.start
-.progress
-.done
-.error
-```
-
-</Tab>
-<Tab value="Rust">
-
-```rust
-AppTransferStatus::Start
-AppTransferStatus::Progress
-AppTransferStatus::Done
-AppTransferStatus::Error
-```
-
-</Tab>
-</Tabs>
-
-| Variant | Description |
-| --- | --- |
-| `Start` | Began (or retried). |
-| `Progress` | Bytes moved. |
-| `Done` | Finished. |
-| `Error` | Failed. |
-
## `app_catalog_entries_from_json`
Picker catalog entries from JSON (fixtures, parity flows).
@@ -1011,6 +817,34 @@ pub fn app_picker_sensitive_options(state: AppPickerState) -> Vec<AppSensitiveOp
**Returns** [`Vec<AppSensitiveOption>`](/cua-sdk/reference/spaces/app-core/keyvault#appsensitiveoption-record)
+## `app_picker_status`
+
+What the run is doing, in words ("Packing profile", "Uploading 12 /
+80 MB"), for the line under the progress bar; none unless running.
+
+<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
+<Tab value="Swift">
+
+```swift
+func appPickerStatus(state: AppPickerState) -> String?
+```
+
+</Tab>
+<Tab value="Rust">
+
+```rust
+pub fn app_picker_status(state: AppPickerState) -> Option<String>
+```
+
+</Tab>
+</Tabs>
+
+| Parameter | Type | Default |
+| --- | --- | --- |
+| `state` | [`AppPickerState`](#apppickerstate-record) | required |
+
+**Returns** `Option<String>`
+
## `app_teleport_plan`
A plan from `Teleport.plan`, as the review's plan.
@@ -1065,22 +899,22 @@ pub fn app_teleport_plan_from_json(json: String) -> Result<AppTeleportPlan, CuaE
**Returns** [`AppTeleportPlan`](#appteleportplan-record) · **Raises** [`CuaError`](/cua-sdk/reference/errors)
-## `app_transfer_reduce`
+## `app_teleport_run_event`
-Advances the transfer overlay (`None` hides it).
+An SDK run event as the picker's (`AppPickerEvent.progress`).
<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Swift">
```swift
-func appTransferReduce(state: AppTransferOverlayState?, signal: AppTransferSignal) -> AppTransferOverlayState?
+func appTeleportRunEvent(event: TeleportRunEvent) -> AppTeleportRunEvent
```
</Tab>
<Tab value="Rust">
```rust
-pub fn app_transfer_reduce(state: Option<AppTransferOverlayState>, signal: AppTransferSignal) -> Option<AppTransferOverlayState>
+pub fn app_teleport_run_event(event: TeleportRunEvent) -> AppTeleportRunEvent
```
</Tab>
@@ -1088,27 +922,26 @@ pub fn app_transfer_reduce(state: Option<AppTransferOverlayState>, signal: AppTr
| Parameter | Type | Default |
| --- | --- | --- |
-| `state` | [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record) | required |
-| `signal` | [`AppTransferSignal`](#apptransfersignal-record) | required |
+| `event` | [`TeleportRunEvent`](/cua-sdk/reference/spaces/teleport-apps#teleportrunevent-record) | required |
-**Returns** [`Option<AppTransferOverlayState>`](#apptransferoverlaystate-record)
+**Returns** [`AppTeleportRunEvent`](#appteleportrunevent-record)
-## `app_transfer_title`
+## `app_teleport_run_status`
-The transfer overlay's title.
+`app_picker_status` for a run's events as the SDK delivered them.
<Tabs items={['Swift', 'Rust']} groupId="sdk-lang" persist>
<Tab value="Swift">
```swift
-func appTransferTitle(state: AppTransferOverlayState) -> String
+func appTeleportRunStatus(events: [TeleportRunEvent]) -> String?
```
</Tab>
<Tab value="Rust">
```rust
-pub fn app_transfer_title(state: AppTransferOverlayState) -> String
+pub fn app_teleport_run_status(events: Vec<TeleportRunEvent>) -> Option<String>
```
</Tab>
@@ -1116,6 +949,6 @@ pub fn app_transfer_title(state: AppTransferOverlayState) -> String
| Parameter | Type | Default |
| --- | --- | --- |
-| `state` | [`AppTransferOverlayState`](#apptransferoverlaystate-record) | required |
+| `events` | [`Vec<TeleportRunEvent>`](/cua-sdk/reference/spaces/teleport-apps#teleportrunevent-record) | required |
-**Returns** `String`
+**Returns** `Option<String>`
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
index 49c7c692ac..920193cf59 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/this-machine.mdx
@@ -194,6 +194,8 @@ Returned by [`app_host_panel`](#app_host_panel).
| `permissions` | [`Vec<AppPermissionRow>`](#apppermissionrow-record) | | Panes still to grant. |
| `open_settings_label` / `openSettingsLabel` | `String` | | The permission rows' button. |
| `actions` | [`Vec<AppHostAction>`](#apphostaction-record) | | Buttons, primary first. |
+| `intro` | `Option<String>` | | Before setup: what this machine is and why set it up. |
+| `setup_choices` / `setupChoices` | [`Vec<AppHostSetupChoice>`](#apphostsetupchoice-record) | | Before setup: the ways to set it up, shown inline. |
## `AppHostPermissionInput` record
@@ -227,6 +229,14 @@ Returned by [`app_host_setting_change`](#app_host_setting_change).
| `share_desktop` / `shareDesktop` | `Option<bool>` | | Share this desktop. |
| `provide_spaces` / `provideSpaces` | `Option<bool>` | | Provide Spaces. |
+## `AppHostSetupChoice` record
+
+| Field | Type | Default | Description |
+| --- | --- | --- | --- |
+| `id` | `String` | | The form's profile: `desktop` or `spare`. |
+| `label` | `String` | | Label. |
+| `button_label` / `buttonLabel` | `String` | | The button that opens the form with this choice. |
+
## `AppHostSetupRequest` record
Returned by [`app_host_validate_setup`](#app_host_validate_setup).
diff --git a/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx b/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx
index 3b7fd11e24..e329acc411 100644
--- a/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx
+++ b/docs/content/docs/cua-sdk/reference/spaces/app-core/window.mdx
@@ -619,6 +619,7 @@ Returned by [`app_settings_input_from_json`](#app_settings_input_from_json).
| `billing` | [`Option<AppBillingStatus>`](/cua-sdk/reference/spaces/app-core/billing#appbillingstatus-record) | | The account's Cua Cloud billing, once read (signed in). |
| `login_item` / `loginItem` | [`Option<AppLoginItemInput>`](#apploginiteminput-record) | | Launch at login, once the system was asked (none: no rows). |
| `experiments` | [`AppExperiments`](/cua-sdk/reference/spaces/app-core/experiments#appexperiments-record) | | Settings, Experiments (what the page mentions follows them). |
+| `keyvault_auto_wipe` / `keyvaultAutoWipe` | `Option<bool>` | | The Keyvault's auto-wipe, once the broker told it (none: no Keyvault section). |
## `AppSettingsOption` record
diff --git a/docs/content/docs/cua-sdk/reference/types.mdx b/docs/content/docs/cua-sdk/reference/types.mdx
index 965b8eee07..01513452e5 100644
--- a/docs/content/docs/cua-sdk/reference/types.mdx
+++ b/docs/content/docs/cua-sdk/reference/types.mdx
@@ -50,7 +50,7 @@ Renamed members: in Kotlin, objects implement `AutoCloseable`, whose `close()` f
290 items. Methods are listed on their object.
-The 669 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift only) are listed on their pages: [Decoded media](/cua-sdk/reference/spaces/decoded-media), [Host teleport](/cua-sdk/reference/spaces/teleport-host), [Teleport an app](/cua-sdk/reference/spaces/teleport-apps), [Spaces app core](/cua-sdk/reference/spaces/app-core#all-items), [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core#all-items), [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core#all-items).
+The 678 items of the Cua Spaces app export (source-available, FSL-1.1-MIT, Swift only) are listed on their pages: [Decoded media](/cua-sdk/reference/spaces/decoded-media), [Host teleport](/cua-sdk/reference/spaces/teleport-host), [Teleport an app](/cua-sdk/reference/spaces/teleport-apps), [Spaces app core](/cua-sdk/reference/spaces/app-core#all-items), [App core: Cua Volume storage, mount and sync](/cua-sdk/reference/spaces/volume-app-core#all-items), [App core: agents, drive, notifications](/cua-sdk/reference/spaces/agents-app-core#all-items).
| Item | Kind | Summary |
| --- | --- | --- |
diff --git a/docs/content/docs/fleets/quickstart.mdx b/docs/content/docs/fleets/quickstart.mdx
index cae84d0e55..0ee7650892 100644
--- a/docs/content/docs/fleets/quickstart.mdx
+++ b/docs/content/docs/fleets/quickstart.mdx
@@ -40,7 +40,7 @@ cua sb screenshot first-fleet -o first-fleet.png
</Tab>
<Tab value="Python">
-The script pins `cua-sandbox==0.8.0` and runs `Image.linux()` with
+The script pins `cua-sandbox==0.9.0` and runs `Image.linux()` with
`local=False` (`CUA_FLEET_IMAGE` overrides the image).
```bash skip="third-party-cli"
diff --git a/docs/public/scripts/first-cloud-fleet/first_cloud_fleet.py b/docs/public/scripts/first-cloud-fleet/first_cloud_fleet.py
index 06b94d893f..14753cd70e 100644
--- a/docs/public/scripts/first-cloud-fleet/first_cloud_fleet.py
+++ b/docs/public/scripts/first-cloud-fleet/first_cloud_fleet.py
@@ -1,7 +1,7 @@
# /// script
# requires-python = ">=3.11,<3.14"
# dependencies = [
-# "cua-sandbox==0.8.0",
+# "cua-sandbox==0.9.0",
# ]
# [[tool.uv.index]]
# name = "cua-wheels"
diff --git a/docs/public/scripts/openai-agents-fleet/run_openai_agents_fleet.py b/docs/public/scripts/openai-agents-fleet/run_openai_agents_fleet.py
index 8af4b03dd9..84108bd88f 100644
--- a/docs/public/scripts/openai-agents-fleet/run_openai_agents_fleet.py
+++ b/docs/public/scripts/openai-agents-fleet/run_openai_agents_fleet.py
@@ -2,7 +2,7 @@
# /// script
# requires-python = ">=3.11,<3.14"
# dependencies = [
-# "cua-sandbox==0.8.0",
+# "cua-sandbox==0.9.0",
# "httpx>=0.27,<1",
# ]
# [[tool.uv.index]]
diff --git a/docs/scripts/tests/test_first_cloud_fleet_tutorial.py b/docs/scripts/tests/test_first_cloud_fleet_tutorial.py
index 8217adc1ca..fb9bf7e5a7 100644
--- a/docs/scripts/tests/test_first_cloud_fleet_tutorial.py
+++ b/docs/scripts/tests/test_first_cloud_fleet_tutorial.py
@@ -19,7 +19,7 @@ RECOVERY = DOCS / "content/docs/fleets/guides/troubleshoot.mdx"
PYTHON_SOURCE = DOCS / "public/scripts/first-cloud-fleet/first_cloud_fleet.py"
TYPESCRIPT_SOURCE = DOCS / "public/scripts/first-cloud-fleet/first-cloud-fleet.ts.txt"
IMAGE_REF = "registry.example/cua-image@sha256:" + "1" * 64
-SANDBOX_VERSION = "0.8.0"
+SANDBOX_VERSION = "0.9.0"
class PythonExampleTests(unittest.TestCase):
diff --git a/docs/scripts/tests/test_openai_agents_fleet_example.py b/docs/scripts/tests/test_openai_agents_fleet_example.py
index 89fa093e1c..1081f922ed 100644
--- a/docs/scripts/tests/test_openai_agents_fleet_example.py
+++ b/docs/scripts/tests/test_openai_agents_fleet_example.py
@@ -36,7 +36,7 @@ def test_disposable_pool_name_ignores_existing_pool_override() -> None:
def test_controller_uses_the_spacesd_image_and_default_services() -> None:
source = SCRIPT.read_text()
- assert '"cua-sandbox==0.8.0"' in source
+ assert '"cua-sandbox==0.9.0"' in source
assert "else Image.linux()" in source
assert "cua-desktop-linux" not in source
assert "services={" not in source
diff --git a/libs/cua-bench-rl/uv.lock b/libs/cua-bench-rl/uv.lock
index dc5bd5c1be..f6c60e7af7 100644
--- a/libs/cua-bench-rl/uv.lock
+++ b/libs/cua-bench-rl/uv.lock
@@ -438,7 +438,7 @@ provides-extras = ["test", "sandbox", "agent", "ui", "all"]
[[package]]
name = "cua-agent"
-version = "0.8.4"
+version = "0.9.0"
source = { editable = "../python/agent" }
dependencies = [
{ name = "aiohttp" },
@@ -522,7 +522,7 @@ provides-extras = ["computer", "openai", "anthropic", "qwen", "uitars", "uitars-
[[package]]
name = "cua-bench"
-version = "0.2.11"
+version = "0.3.0"
source = { editable = "../cua-bench" }
dependencies = [
{ name = "aiohttp" },
@@ -660,7 +660,7 @@ provides-extras = ["torch", "tinker", "dev"]
[[package]]
name = "cua-core"
-version = "0.3.1"
+version = "0.3.2"
source = { editable = "../python/core" }
dependencies = [
{ name = "posthog" },
@@ -695,7 +695,7 @@ wheels = [
[[package]]
name = "cua-sandbox"
-version = "0.8.0"
+version = "0.9.0"
source = { editable = "../python/cua-sandbox" }
dependencies = [
{ name = "cua" },
diff --git a/libs/cua-bench/uv.lock b/libs/cua-bench/uv.lock
index 0b0e318a02..a1fa62d05b 100644
--- a/libs/cua-bench/uv.lock
+++ b/libs/cua-bench/uv.lock
@@ -510,7 +510,7 @@ provides-extras = ["test", "sandbox", "agent", "ui", "all"]
[[package]]
name = "cua-agent"
-version = "0.8.4"
+version = "0.9.0"
source = { editable = "../python/agent" }
dependencies = [
{ name = "aiohttp" },
@@ -594,7 +594,7 @@ provides-extras = ["computer", "openai", "anthropic", "qwen", "uitars", "uitars-
[[package]]
name = "cua-bench"
-version = "0.2.11"
+version = "0.3.0"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
@@ -759,7 +759,7 @@ dev = [
[[package]]
name = "cua-core"
-version = "0.3.1"
+version = "0.3.2"
source = { editable = "../python/core" }
dependencies = [
{ name = "posthog" },
@@ -794,7 +794,7 @@ wheels = [
[[package]]
name = "cua-sandbox"
-version = "0.8.0"
+version = "0.9.0"
source = { editable = "../python/cua-sandbox" }
dependencies = [
{ name = "cua" },
diff --git a/libs/cua-spacesd/crates/cua-spacesd-desktop/src/grpc/cursor_shape.rs b/libs/cua-spacesd/crates/cua-spacesd-desktop/src/grpc/cursor_shape.rs
index 89ad10fb35..191ed0526c 100644
--- a/libs/cua-spacesd/crates/cua-spacesd-desktop/src/grpc/cursor_shape.rs
+++ b/libs/cua-spacesd/crates/cua-spacesd-desktop/src/grpc/cursor_shape.rs
@@ -597,6 +597,10 @@ mod tests {
}
fn rig(warp: bool) -> Rig {
+ rig_with(warp, fast())
+ }
+
+ fn rig_with(warp: bool, config: ProberConfig) -> Rig {
let hub = PresenceHub::new();
let fake = Fake::new(warp);
let activity = InputActivity::new();
@@ -608,7 +612,7 @@ mod tests {
Arc::new(Display),
activity.clone(),
Arc::new(move || flag.load(Ordering::SeqCst)),
- fast(),
+ config,
);
let (me, _, rx) = hub.join_with(
Principal {
@@ -677,7 +681,15 @@ mod tests {
#[tokio::test]
async fn recent_or_pending_input_skips_the_probe_for_the_hit_test() {
- let mut rig = rig(true);
+ // A quiet window a slow runner cannot outlast between the input and
+ // the cursor update (50 ms flaked on Windows CI).
+ let mut rig = rig_with(
+ true,
+ ProberConfig {
+ idle_quiet: Duration::from_millis(500),
+ ..fast()
+ },
+ );
rig.activity.note("someone-else", Some((5.0, 5.0)));
rig.hub.update_cursor(&rig.id, at(0.15, 0.5));
assert_eq!(
@@ -685,8 +697,9 @@ mod tests {
(CursorShape::Arrow as i32, CursorShapeSource::HitTest as i32)
);
assert!(rig.fake.moves.lock().unwrap().is_empty(), "never moved");
- // A pending injection also blocks it.
- tokio::time::sleep(Duration::from_millis(80)).await;
+ // A pending injection also blocks it, once the input is no longer
+ // recent.
+ tokio::time::sleep(Duration::from_millis(600)).await;
let announced = rig.activity.announce("bob");
rig.hub.update_cursor(&rig.id, at(0.05, 0.5));
assert_eq!(
diff --git a/libs/cua-spacesd/crates/cua-spacesd-doctor/src/checks/auth.rs b/libs/cua-spacesd/crates/cua-spacesd-doctor/src/checks/auth.rs
index fe5a10c202..6c1004d698 100644
--- a/libs/cua-spacesd/crates/cua-spacesd-doctor/src/checks/auth.rs
+++ b/libs/cua-spacesd/crates/cua-spacesd-doctor/src/checks/auth.rs
@@ -800,7 +800,17 @@ mod tests {
.env("SOMETHING", &token)
.spawn()
.unwrap();
- let (_, environ) = leaks(&token);
+ // spawn() returns once the vfork'd child enters exec, which can be
+ // before the kernel has set up the new image's environment
+ // (/proc/<pid>/environ still reads empty), so poll briefly.
+ let mut environ = Vec::new();
+ for _ in 0..100 {
+ environ = leaks(&token).1;
+ if environ.contains(&child.id()) {
+ break;
+ }
+ std::thread::sleep(std::time::Duration::from_millis(20));
+ }
let _ = child.kill();
let _ = child.wait();
assert!(environ.contains(&child.id()), "{environ:?}");
diff --git a/libs/cua/crates/cua-cli/src/sandbox.rs b/libs/cua/crates/cua-cli/src/sandbox.rs
index 2d2804b530..e3de454fe1 100644
--- a/libs/cua/crates/cua-cli/src/sandbox.rs
+++ b/libs/cua/crates/cua-cli/src/sandbox.rs
@@ -329,10 +329,10 @@ pub enum SandboxCmd {
#[command(after_help = "Examples:
# A Linux desktop on this machine (a gVisor container)
cua sb create linux --name dev
- # The same image in the cloud, as a VM
- cua sb create linux --on cloud --kind vm --name dev
# A web server container, ready when its HTTP service answers
- cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000")]
+ cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000
+ # The same Linux image in the cloud instead, as a VM
+ cua sb create linux --on cloud --kind vm --name dev")]
Create(Box<CreateArgs>),
/// Deprecated alias of `create` that defaults to `--on cloud`.
#[command(after_help = "Examples:
diff --git a/libs/cua/crates/cua-cli/tests/daemon_restart.rs b/libs/cua/crates/cua-cli/tests/daemon_restart.rs
index e38cae3dba..134d470232 100644
--- a/libs/cua/crates/cua-cli/tests/daemon_restart.rs
+++ b/libs/cua/crates/cua-cli/tests/daemon_restart.rs
@@ -8,6 +8,10 @@ mod common;
use common::Home;
+/// Unix: socket only. Windows has no Unix-socket listener, so the daemon
+/// needs its loopback listener there.
+const LOOPBACK: &str = if cfg!(unix) { "off" } else { "127.0.0.1:0" };
+
fn pid_of(started: &str) -> Option<u32> {
let rest = started.split("(pid ").nth(1)?;
rest.split(')').next()?.trim().parse().ok()
@@ -17,14 +21,14 @@ fn pid_of(started: &str) -> Option<u32> {
async fn stop_then_start_right_away_starts_a_new_daemon() {
let mut h = Home::new();
h.set("CUA_DAEMON_NO_RELAY", "1");
- let first = h.run(&["daemon", "start", "--loopback", "off"]).await;
+ let first = h.run(&["daemon", "start", "--loopback", LOOPBACK]).await;
first.ok();
let mut pid = pid_of(&first.stdout).expect("started (pid N)");
for round in 0..5 {
let stop = h.run(&["daemon", "stop"]).await;
stop.ok();
assert_eq!(stop.stdout.trim(), "stopped");
- let start = h.run(&["daemon", "start", "--loopback", "off"]).await;
+ let start = h.run(&["daemon", "start", "--loopback", LOOPBACK]).await;
start.ok();
assert!(
start.stdout.contains("cua daemon started"),
diff --git a/libs/cua/crates/cua-daemon/src/identity.rs b/libs/cua/crates/cua-daemon/src/identity.rs
index fcb2627e92..ceab8ee988 100644
--- a/libs/cua/crates/cua-daemon/src/identity.rs
+++ b/libs/cua/crates/cua-daemon/src/identity.rs
@@ -130,10 +130,12 @@ mod tests {
std::fs::write(&app, b"").unwrap();
// No bundled cua: nothing expected.
assert_eq!(bundled_cua_of(&app), None);
- std::fs::write(macos.join("cua"), b"").unwrap();
- let want = macos.join("cua").canonicalize().unwrap();
+ // The bundled CLI carries the host's executable suffix.
+ let cua = macos.join(if cfg!(windows) { "cua.exe" } else { "cua" });
+ std::fs::write(&cua, b"").unwrap();
+ let want = cua.canonicalize().unwrap();
assert_eq!(bundled_cua_of(&app), Some(want.clone()));
- assert_eq!(bundled_cua_of(&macos.join("cua")), Some(want));
+ assert_eq!(bundled_cua_of(&cua), Some(want));
// A CLI outside any bundle shares whatever daemon runs.
assert_eq!(bundled_cua_of(&dir.path().join("cua")), None);
}
diff --git a/libs/cua/crates/cua-keyvault/src/ipc.rs b/libs/cua/crates/cua-keyvault/src/ipc.rs
index d1d2d87328..2a80a64146 100644
--- a/libs/cua/crates/cua-keyvault/src/ipc.rs
+++ b/libs/cua/crates/cua-keyvault/src/ipc.rs
@@ -25,10 +25,12 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt};
use zeroize::Zeroize;
use crate::audit::{AuditEntry, Verification};
+#[cfg(unix)]
+use crate::broker::StageSink;
use crate::broker::{
AccessRequest, ApproveOptions, Broker, Decision, ImportSpec, InitRequest, Inventory,
- LoginOutcome, LoginRequest, PasswordImportSpec, PendingView, RuleSpec, StageSink, Status,
- TeleportOutcome, TeleportRequest, TeleportStage, UnlockRequest,
+ LoginOutcome, LoginRequest, PasswordImportSpec, PendingView, RuleSpec, Status, TeleportOutcome,
+ TeleportRequest, TeleportStage, UnlockRequest,
};
use crate::caller::{CallerIdentity, TrustPolicy};
use crate::model::{Delivery, Grant, ItemMeta, ItemPolicy, UnattendedRule, UnlockPolicy};
@@ -255,6 +257,8 @@ impl Response {
}
}
+ // Stage frames stream over the Unix socket only.
+ #[cfg(unix)]
fn stage(s: TeleportStage) -> Self {
Self {
ok: true,
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-gpu.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-gpu.json
index 144dca5b4f..0e67227a39 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-gpu.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-gpu.json
@@ -70,7 +70,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"os: System",
"image: Image [ghcr.io/org/app:tag]",
@@ -126,7 +126,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -179,7 +179,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -287,7 +287,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -340,7 +340,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"name: Name [Optional]",
"open-when-ready: Open when ready"
@@ -392,7 +392,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-1024) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-1024) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [],
"gpu": "GPU acceleration (Experimental) [x] Learn more -> https://cua.ai/docs/lume/guides/gpu-passthrough",
"image": "ghcr.io/trycua/macos:26",
diff --git a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-resources.json b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-resources.json
index 7c649517a9..bbe08b2cdd 100644
--- a/libs/cua/crates/cua-spaces-app-core/parity/golden/create-resources.json
+++ b/libs/cua/crates/cua-spaces-app-core/parity/golden/create-resources.json
@@ -1384,7 +1384,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-500) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-500) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"os: System",
"image: Image [ghcr.io/org/app:tag]",
@@ -1442,7 +1442,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-500) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-500) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -1497,7 +1497,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 32 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 33 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -1552,7 +1552,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "150 GB (150-500) ~Uses about 32 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "150 GB (150-500) ~Uses about 33 GB on this Mac at first, up to 150 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -1607,7 +1607,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 32 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 33 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"cpus: CPU cores",
"memory: Memory",
@@ -1662,7 +1662,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 32 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 33 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [
"name: Name [Optional]",
"open-when-ready: Open when ready"
@@ -1716,7 +1716,7 @@
},
"canContinue": true,
"cpusText": "4 cores",
- "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 32 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
+ "disk": "200 GB (150-500) [Reset] ~The disk will be resized to 200 GB after downloading. Uses about 33 GB on this Mac at first, up to 200 GB as the Space fills it. ?A VM disk cannot shrink below the image's 150 GB.",
"fields": [],
"gpu": null,
"image": "ghcr.io/trycua/macos:26",
diff --git a/libs/cua/crates/cua-spaces-cli/build.rs b/libs/cua/crates/cua-spaces-cli/build.rs
new file mode 100644
index 0000000000..822183bf78
--- /dev/null
+++ b/libs/cua/crates/cua-spaces-cli/build.rs
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: FSL-1.1-MIT
+// Copyright (c) 2026 Cua AI, Inc.
+
+//! Gives the `cua-spaces-cli` binary's main thread an 8 MiB stack on
+//! Windows, as cua-cli's build script does for `cua`. Windows defaults to
+//! 1 MiB, and the main thread's command future overflowed it
+//! (STATUS_STACK_OVERFLOW) in unoptimized builds.
+
+fn main() {
+ const STACK: u32 = 8 * 1024 * 1024;
+ let os = std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default();
+ let env = std::env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default();
+ if os == "windows" {
+ if env == "msvc" {
+ println!("cargo:rustc-link-arg-bins=/STACK:{STACK}");
+ } else {
+ println!("cargo:rustc-link-arg-bins=-Wl,--stack,{STACK}");
+ }
+ }
+ println!("cargo:rerun-if-changed=build.rs");
+}
diff --git a/libs/cua/crates/cua-teleport/src/browser_cookies.rs b/libs/cua/crates/cua-teleport/src/browser_cookies.rs
index db044efe3a..b4b9a65b55 100644
--- a/libs/cua/crates/cua-teleport/src/browser_cookies.rs
+++ b/libs/cua/crates/cua-teleport/src/browser_cookies.rs
@@ -481,7 +481,6 @@ mod tests {
assert_eq!(everything.len(), 3);
}
- #[cfg(target_os = "macos")]
fn one_row() -> Vec<TestCookieRow<'static>> {
vec![TestCookieRow {
host_key: ".github.com",
@@ -546,6 +545,7 @@ mod tests {
assert_eq!(cookies_store(p), p.join("Network/Cookies"));
}
+ #[cfg(target_os = "macos")]
#[test]
fn macos_cookies_use_the_named_browsers_safe_storage_item() {
let dir = tempfile::tempdir().unwrap();
diff --git a/libs/cua/crates/cua-volume/src/fs.rs b/libs/cua/crates/cua-volume/src/fs.rs
index 975b4da409..abb5b99fe3 100644
--- a/libs/cua/crates/cua-volume/src/fs.rs
+++ b/libs/cua/crates/cua-volume/src/fs.rs
@@ -197,7 +197,12 @@ impl FsBackend {
}
// One full barrier for the whole batch.
if !out.is_empty() {
- File::open(self.root.join(".lock"))?.sync_all()?;
+ // Opened for writing: Windows refuses FlushFileBuffers on a
+ // read-only handle (Access is denied).
+ OpenOptions::new()
+ .write(true)
+ .open(self.root.join(".lock"))?
+ .sync_all()?;
}
Ok(out)
}
diff --git a/libs/cua/crates/cua-volume/src/service.rs b/libs/cua/crates/cua-volume/src/service.rs
index 4ceb08979c..c0d35066c1 100644
--- a/libs/cua/crates/cua-volume/src/service.rs
+++ b/libs/cua/crates/cua-volume/src/service.rs
@@ -859,7 +859,13 @@ mod tests {
let s = svc.sync_status().await;
assert_eq!(s.feed, "off");
assert_eq!(s.devices.len(), 1);
- assert_eq!((s.backend.as_str(), s.mount.as_str()), ("fs", "off"));
+ // A build that cannot mount here (Windows) says so instead of "off".
+ let idle = if mount_method() == "none" {
+ "unsupported"
+ } else {
+ "off"
+ };
+ assert_eq!((s.backend.as_str(), s.mount.as_str()), ("fs", idle));
assert!(
s.cache.is_none(),
"no cache in front of a store on this machine"
diff --git a/libs/cua/python/tests/test_spaces.py b/libs/cua/python/tests/test_spaces.py
index d2126f6b64..6ae6726022 100644
--- a/libs/cua/python/tests/test_spaces.py
+++ b/libs/cua/python/tests/test_spaces.py
@@ -34,7 +34,7 @@ class Approver(cua.TeleportApprover):
def test_every_contract_tool_maps_to_a_generated_method():
rows = cua.spaces_tool_methods()
- assert len(rows) == 79
+ assert len(rows) == 86
classes = {"Spaces": cua.Spaces, "Space": cua.Space}
for row in rows:
cls, method = row.method.split(".")
diff --git a/libs/cua/swift/Tests/CuaTests/SpacesTests.swift b/libs/cua/swift/Tests/CuaTests/SpacesTests.swift
index 5bf78d1863..6fa8aa407a 100644
--- a/libs/cua/swift/Tests/CuaTests/SpacesTests.swift
+++ b/libs/cua/swift/Tests/CuaTests/SpacesTests.swift
@@ -125,12 +125,13 @@ func exerciseSpaces(_ cua: Cua, _ fx: Fixtures, tmp: URL, teleport: Bool = false
@Suite(.serialized) struct SpacesTests {
@Test func everyContractToolMapsToAGeneratedMethod() {
let rows = spacesToolMethods()
- #expect(rows.count == 79)
+ #expect(rows.count == 86)
// Swift spells `Class.method_name` as `methodName` on the generated
// protocol; check each against the protocol's requirement list.
let spaceMethods: Set<String> = [
"add", "list", "resolve", "remove", "create", "delete",
- "space", "agentCapabilities", "listToolsJson", "callToolJson",
+ "stop", "start", "space", "agentCapabilities", "listToolsJson", "callToolJson",
+ "cloudStatus", "cloudConnect", "cloudTest", "cloudDisconnect", "cloudSweep",
"persistentAgentCreate", "persistentAgents", "persistentAgentRemove",
"persistentAgentSend", "persistentAgentSave", "agentPause", "agentResume",
"routineAdd", "routines", "routineRemove", "routineSetEnabled", "notifyUser",
@@ -161,8 +162,10 @@ func exerciseSpaces(_ cua: Cua, _ fx: Fixtures, tmp: URL, teleport: Bool = false
// line fails to compile if any is missing.
let _: [(any SpacesProtocol) -> Any] = [
{ $0.add }, { $0.list }, { $0.resolve }, { $0.remove }, { $0.create },
- { $0.delete }, { $0.space }, { $0.agentCapabilities },
+ { $0.delete }, { $0.stop }, { $0.start }, { $0.space }, { $0.agentCapabilities },
{ $0.listToolsJson }, { $0.callToolJson },
+ { $0.cloudStatus }, { $0.cloudConnect }, { $0.cloudTest }, { $0.cloudDisconnect },
+ { $0.cloudSweep },
{ $0.persistentAgentCreate }, { $0.persistentAgents }, { $0.persistentAgentRemove },
{ $0.persistentAgentSend }, { $0.persistentAgentSave }, { $0.agentPause },
{ $0.agentResume }, { $0.routineAdd }, { $0.routines }, { $0.routineRemove },
diff --git a/libs/cua/typescript/test/spaces.test.mjs b/libs/cua/typescript/test/spaces.test.mjs
index 4cb9a3721a..2475ca44f6 100644
--- a/libs/cua/typescript/test/spaces.test.mjs
+++ b/libs/cua/typescript/test/spaces.test.mjs
@@ -43,7 +43,7 @@ function findFile(dir, name, budget = { n: 0 }) {
test("every contract tool maps to a generated method", () => {
const rows = spacesApi.spacesToolMethods()
- assert.equal(rows.length, 79)
+ assert.equal(rows.length, 86)
const classes = { Spaces: spacesApi.Spaces, Space: spacesApi.Space }
for (const row of rows) {
const [cls, method] = row.method.split(".")
@@ -176,7 +176,7 @@ async function daemonExercise(cli, teleport) {
const discovery = JSON.parse(readFileSync(join(home, "daemon.json"), "utf8"))
const session = new McpSession(new McpHttpTransport({ url: discovery.loopback_url, token: discovery.token }))
const tools = await session.listTools()
- assert.equal(tools.length, 79)
+ assert.equal(tools.length, 86)
const rows = await session.callJson("list_spaces")
assert.deepEqual(rows.map((r) => r.id), [info.id])
assert.equal(await session.callText("space_bash", { space: info.id, command: "echo webview" }), "webview\n[exit 0]")
diff --git a/libs/cua/typescript/test/teleport.test.mjs b/libs/cua/typescript/test/teleport.test.mjs
index 6d27b96574..25ff619dac 100644
--- a/libs/cua/typescript/test/teleport.test.mjs
+++ b/libs/cua/typescript/test/teleport.test.mjs
@@ -228,7 +228,7 @@ test("the controller drives a host end to end", async () => {
await c.confirm()
assert.equal(c.state.step, "done")
assert.deepEqual(calls[0], ["plan", "vscode", { moves: "app_with_files", files: ["/tmp/project"] }])
- assert.deepEqual(calls[1], ["run", "vscode", { approved: true, acknowledgeSensitive: false }])
+ assert.deepEqual(calls[1], ["run", "vscode", { approved: true, acknowledgeSensitive: false, saveToKeyvault: false, acknowledgeRelayPlaintext: false }])
assert.ok(changes >= 6)
stop()
// A failing catalog surfaces an error.
diff --git a/libs/kasm/.bumpversion.cfg b/libs/kasm/.bumpversion.cfg
index 96b8aaf53a..2abbbd93ef 100644
--- a/libs/kasm/.bumpversion.cfg
+++ b/libs/kasm/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 0.2.0
+current_version = 0.1.4
commit = True
tag = True
tag_name = docker-kasm-v{new_version}
diff --git a/libs/kasm/VERSION b/libs/kasm/VERSION
index 0ea3a944b3..845639eef2 100644
--- a/libs/kasm/VERSION
+++ b/libs/kasm/VERSION
@@ -1 +1 @@
-0.2.0
+0.1.4
diff --git a/libs/python/cua-sandbox-apps/uv.lock b/libs/python/cua-sandbox-apps/uv.lock
index 3274c26b37..dceb57590f 100644
--- a/libs/python/cua-sandbox-apps/uv.lock
+++ b/libs/python/cua-sandbox-apps/uv.lock
@@ -409,7 +409,7 @@ wheels = [
[[package]]
name = "cua-sandbox"
-version = "0.8.0"
+version = "0.9.0"
source = { editable = "../cua-sandbox" }
dependencies = [
{ name = "cua" },
diff --git a/libs/python/cua-sandbox/uv.lock b/libs/python/cua-sandbox/uv.lock
index e326f655e4..bd53baae68 100644
--- a/libs/python/cua-sandbox/uv.lock
+++ b/libs/python/cua-sandbox/uv.lock
@@ -466,7 +466,7 @@ provides-extras = ["test", "sandbox", "agent", "ui", "all"]
[[package]]
name = "cua-agent"
-version = "0.8.4"
+version = "0.9.0"
source = { editable = "../agent" }
dependencies = [
{ name = "aiohttp" },
@@ -550,7 +550,7 @@ provides-extras = ["computer", "openai", "anthropic", "qwen", "uitars", "uitars-
[[package]]
name = "cua-core"
-version = "0.3.1"
+version = "0.3.2"
source = { editable = "../core" }
dependencies = [
{ name = "posthog" },
diff --git a/libs/xfce/.bumpversion.cfg b/libs/xfce/.bumpversion.cfg
index ab31e3d89d..5121138e55 100644
--- a/libs/xfce/.bumpversion.cfg
+++ b/libs/xfce/.bumpversion.cfg
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 0.3.0
+current_version = 0.2.0
commit = True
tag = True
tag_name = docker-xfce-v{new_version}
diff --git a/libs/xfce/VERSION b/libs/xfce/VERSION
index 0d91a54c7d..0ea3a944b3 100644
--- a/libs/xfce/VERSION
+++ b/libs/xfce/VERSION
@@ -1 +1 @@
-0.3.0
+0.2.0
diff --git a/release-please-config.json b/release-please-config.json
index fb3383d2c7..29f8517131 100644
--- a/release-please-config.json
+++ b/release-please-config.json
@@ -75,6 +75,126 @@
{
"type": "generic",
"path": "rust/Skills/cua-driver/SKILL.md"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-contract')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-core')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-sdk')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cursor-overlay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='pip-preview')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-linux')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-macos')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-windows')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-contract')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-core')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-sdk')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cursor-overlay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='pip-preview')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-linux')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-macos')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-windows')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-contract')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-core')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-driver-sdk')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cursor-overlay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='pip-preview')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-linux')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-macos')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='platform-windows')].version"
}
]
},
@@ -174,6 +294,96 @@
"type": "toml",
"path": "Cargo.toml",
"jsonpath": "$.workspace.package.version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-relay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-desktop')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-doctor')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-provider-api')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-server')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-session')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-socks')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-teleport')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-test-apps')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-relay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-server')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-socks')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/spaces-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-teleport')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-relay')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-server')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-socks')].version"
+ },
+ {
+ "type": "toml",
+ "path": "/libs/cua-spacesd/tests/teleport-e2e/Cargo.lock",
+ "jsonpath": "$.package[?(@.name.value=='cua-spacesd-teleport')].version"
}
]
},
diff --git a/scripts/docs-generators/cli-specs/cb.json b/scripts/docs-generators/cli-specs/cb.json
index 6c9f612adb..470becc5f0 100644
--- a/scripts/docs-generators/cli-specs/cb.json
+++ b/scripts/docs-generators/cli-specs/cb.json
@@ -2771,5 +2771,5 @@
"global_options": [],
"name": "cb",
"usage": "cb <COMMAND> [OPTIONS]",
- "version": "0.2.11"
+ "version": "0.3.0"
}
diff --git a/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json b/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
index 6e5d592dbb..08194e30c9 100644
--- a/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
+++ b/scripts/docs-generators/cli-specs/cua-driver-mcp-linux.json
@@ -6,7 +6,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "list_apps",
@@ -26,6 +31,10 @@
"pid": {
"description": "Only list windows owned by this process ID.",
"type": "integer"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"type": "object"
@@ -34,14 +43,14 @@
"read_only": true
},
{
- "description": "Walk a running app's AT-SPI tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array.\n\nPREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of AT-SPI actions exposed by the element, omitted when empty), `frame: {x,y,w,h}` when AT-SPI reports usable bounds, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers — but new fields will only be added to the structured side. Set `query` to project BOTH representations to matching rows plus their ancestor chain while preserving original indices. `total_element_count` reports the complete snapshot and `returned_element_count` reports the projection.\n\nAlways returns BOTH the element tree AND a screenshot — ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_index/element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored. On Wayland, where output capture cannot prove the requested surface's identity, the truthful tree is returned without a screenshot and `screenshot_error.code` is `surface_identity_unproven`.\n\nThe mirror image: pass `include_accessibility_tree:false` to SKIP the AT-SPI walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title) — the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_dimension` caps the returned screenshot's long edge in pixels for a cheap thumbnail.\n\nOptional `max_elements` / `max_depth` bound the AT-SPI walk to mitigate context-window blow-up on Electron / large web apps that produce 10k+ element trees. When applied, BOTH the markdown and the structured elements are truncated identically. Omit both for current default behaviour.\n\nTIME BUDGET: `timeout_ms` (default 1000) bounds the whole AT-SPI walk. Large apps (LibreOffice, GIMP, file managers) can exceed it; the call then returns the PARTIAL tree with `truncated: true`, `truncation_reason`, `nodes_visited`/`nodes_pending` and `elements_complete: false`. Every element listed is real and clickable; elements after the cut are simply missing. Retry with a larger `timeout_ms` (e.g. 5000) or narrow with `query`/`max_depth` when the element you need is absent.\n\nSCREENSHOT SCALE: the screenshot is delivered at or below 1.15 megapixels (long edge <= max_image_dimension, 1568 by default), because larger images are downsized before a model reads them and its pixel coordinates would then be uniformly short. Element `screenshot_frame`s and x/y for the pointer tools are pixels of the delivered screenshot (`frame` stays in screen coordinates, as on every platform); `frame_scale` < 1 reports the downsizing. An explicit per-call `max_image_dimension` (0 = native) replaces this cap.\n\nPOPUP MENUS: a context menu / popover / combo list is an override-redirect window that list_windows never shows. A click or right_click that opened one names it in its result (`popup: {window_id, bounds, title}`); pass that window_id here to walk the popup's own AT-SPI toplevel so its menu items get element indices (then click them by element_index). Omitting window_id while a popup of this pid is open walks that popup.",
+ "description": "Walk a running app's AT-SPI tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array; pass each element's `element_token` to `click`, `type_text`, `set_value`, etc.\n\nPREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of AT-SPI actions exposed by the element, omitted when empty), `frame: {x,y,w,h}` when AT-SPI reports usable bounds, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers — but new fields will only be added to the structured side. Set `query` to project BOTH representations to matching rows plus their ancestor chain while preserving original indices. `total_element_count` reports the complete snapshot and `returned_element_count` reports the projection.\n\nAlways returns BOTH the element tree AND a screenshot — ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored. On Wayland, where output capture cannot prove the requested surface's identity, the truthful tree is returned without a screenshot and `screenshot_error.code` is `surface_identity_unproven`.\n\nThe mirror image: pass `include_accessibility_tree:false` to SKIP the AT-SPI walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title) — the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_dimension` caps the returned screenshot's long edge in pixels for a cheap thumbnail.\n\nOptional `max_elements` / `max_depth` bound the AT-SPI walk to mitigate context-window blow-up on Electron / large web apps that produce 10k+ element trees. When applied, BOTH the markdown and the structured elements are truncated identically. Omit both for current default behaviour.\n\nTIME BUDGET: `timeout_ms` (default 1000) bounds the whole AT-SPI walk. Large apps (LibreOffice, GIMP, file managers) can exceed it; the call then returns the PARTIAL tree with `truncated: true`, `truncation_reason`, `nodes_visited`/`nodes_pending` and `elements_complete: false`. Every element listed is real and clickable; elements after the cut are simply missing. Retry with a larger `timeout_ms` (e.g. 5000) or narrow with `query`/`max_depth` when the element you need is absent.\n\nSCREENSHOT SCALE: the screenshot is delivered at or below 1.15 megapixels (long edge <= max_image_dimension, 1568 by default), because larger images are downsized before a model reads them and its pixel coordinates would then be uniformly short. Element `screenshot_frame`s and x/y for the pointer tools are pixels of the delivered screenshot (`frame` stays in screen coordinates, as on every platform); `frame_scale` < 1 reports the downsizing. An explicit per-call `max_image_dimension` (0 = native) replaces this cap.\n\nPOPUP MENUS: a context menu / popover / combo list is an override-redirect window that list_windows never shows. A click or right_click that opened one names it in its result (`popup: {window_id, bounds, title}`); pass that window_id here to walk the popup's own AT-SPI toplevel so its menu items get element indices (then click them by element_token). Omitting window_id while a popup of this pid is open walks that popup.",
"destructive": false,
"idempotent": false,
"input_schema": {
"additionalProperties": false,
"properties": {
"capture_mode": {
- "description": "DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot — ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_index/element_token) or an element px action (x,y). Any value (including the old \"som\"/\"screenshot\" aliases) is accepted but has no effect.",
+ "description": "DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot — ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_token) or an element px action (x,y). Any value (including the old \"som\"/\"screenshot\" aliases) is accepted but has no effect.",
"enum": [
"ax",
"vision"
@@ -299,6 +308,10 @@
"description": "App name or command to launch. Tried as a direct command first, then matched against installed .desktop applications (exact display name, desktop-file id, or Exec basename; else an unambiguous display-name substring).",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"urls": {
"description": "URLs to open via xdg-open.",
"items": {
@@ -322,6 +335,10 @@
"pid": {
"description": "PID of the process to terminate.",
"type": "integer"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -343,6 +360,10 @@
"description": "Process ID of the app to activate.",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"window_id": {
"description": "X11 window id (xid) to activate. If omitted, the first window of `pid` is used.",
"type": "integer"
@@ -454,7 +475,7 @@
"read_only": false
},
{
- "description": "Click against a target pid. **Prefer `element_index` over pixel coordinates** — element_index works on backgrounded / hidden windows, surfaces a stable handle, and tells you what you're clicking via the cached AT-SPI element's role + label. Reach for `x, y` only when the target is a canvas / custom-drawn surface that doesn't appear in the AT-SPI tree.\n\nProvide either (window_id + x/y) or (pid + element_index). x/y are WINDOW-LOCAL pixels of window_id (the get_window_state screenshot frame); a point outside the window is refused (point_outside_window) and every pixel result reports the resolved window_point / screen_point. Background delivery first resolves the accessible under the point and fires its action (the result says `hit: <role> \"<name>\" action=...`; a file / list item is selected through its container: `selected: ...`), else presses the real virtual pointer there. A click that opens a popup menu names it (`popup: {window_id, bounds}`): pass that window_id to get_window_state to index its items. element_index cache is scoped per (pid, window_id) and is replaced by the next get_window_state of the same window — re-snapshot every turn before clicking.\n\nAfter a zoom call, pass from_zoom=true to auto-translate zoom-image coords back to full-window space.\n\n`count`: 1 (default), 2 for a double-click, 3 for a triple-click (selects a line / paragraph in editors) — one press train with real double-click cadence, in background and foreground alike; there is no separate triple_click tool.\n\nbutton: \"left\" (default), \"right\", or \"middle\". Defaults to left so the field is fully back-compat. X11: routes through XSendEvent ButtonPress/Release with the matching button code. Native Wayland: only left-button is supported via the virtual-pointer protocol — right/middle return an error rather than silently degrading to left. `modifier` holds ctrl/shift/alt/super for the click on X11. Native Wayland refuses modified pointer clicks until its input protocol can carry keyboard modifier state.",
+ "description": "Click against a target pid. **Prefer `element_token` over pixel coordinates** — element_token works on backgrounded / hidden windows, surfaces a stable handle, and tells you what you're clicking via the cached AT-SPI element's role + label. Reach for `x, y` only when the target is a canvas / custom-drawn surface that doesn't appear in the AT-SPI tree.\n\nProvide either (window_id + x/y) or (pid + element_token). x/y are WINDOW-LOCAL pixels of window_id (the get_window_state screenshot frame); a point outside the window is refused (point_outside_window) and every pixel result reports the resolved window_point / screen_point. Background delivery first resolves the accessible under the point and fires its action (the result says `hit: <role> \"<name>\" action=...`; a file / list item is selected through its container: `selected: ...`), else presses the real virtual pointer there. A click that opens a popup menu names it (`popup: {window_id, bounds}`): pass that window_id to get_window_state to index its items. The token is stale once the next get_window_state of the same window replaces its snapshot — re-snapshot every turn before clicking.\n\nAfter a zoom call, pass from_zoom=true to auto-translate zoom-image coords back to full-window space.\n\n`count`: 1 (default), 2 for a double-click, 3 for a triple-click (selects a line / paragraph in editors) — one press train with real double-click cadence, in background and foreground alike; there is no separate triple_click tool.\n\nbutton: \"left\" (default), \"right\", or \"middle\". Defaults to left so the field is fully back-compat. X11: routes through XSendEvent ButtonPress/Release with the matching button code. Native Wayland: only left-button is supported via the virtual-pointer protocol — right/middle return an error rather than silently degrading to left. `modifier` holds ctrl/shift/alt/super for the click on X11. Native Wayland refuses modified pointer clicks until its input protocol can carry keyboard modifier state.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -499,12 +520,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -535,11 +552,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"description": "Exact capture/input target selected independently for each action.\n\n`display_id=\"primary\"` is the portable desktop target in this release.\nPlatforms that cannot address another display reject it explicitly rather\nthan silently changing coordinate spaces.",
"oneOf": [
@@ -605,7 +617,7 @@
"read_only": false
},
{
- "description": "Double-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to). No focus steal. Provide either (window_id + x/y) or (pid + element_index). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.",
+ "description": "Double-click at (x,y) or an element_token (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to). No focus steal. Provide either (window_id + x/y) or (pid + element_token). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -632,12 +644,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -652,11 +660,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"window_id": {
"description": "Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it).",
"type": "integer"
@@ -679,7 +682,7 @@
"read_only": false
},
{
- "description": "Right-click at (x,y) or an element_index (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to), one outside the window is refused (point_outside_window; x/y are window-local pixels, the result reports window_point / screen_point). No focus steal. When a context menu opens, the result names it (`popup: {window_id, bounds, title}`): call get_window_state(pid, window_id=<that id>) to index its menu items and click them by element_index. Provide either (window_id + x/y) or (pid + element_index). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.",
+ "description": "Right-click at (x,y) or an element_token (AT-SPI bounds). Background delivery on X11 sends real button events from the session's virtual master pointer (path mpx_pointer); a point covered by another application's window is refused (target_occluded), one covered by this app's own dialog is retargeted to it (retargeted_to), one outside the window is refused (point_outside_window; x/y are window-local pixels, the result reports window_point / screen_point). No focus steal. When a context menu opens, the result names it (`popup: {window_id, bounds, title}`): call get_window_state(pid, window_id=<that id>) to index its menu items and click them by element_token. Provide either (window_id + x/y) or (pid + element_token). After a zoom call, pass from_zoom=true to auto-translate zoom-image coords.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -706,12 +709,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -733,11 +732,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"window_id": {
"description": "Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it).",
"type": "integer"
@@ -1185,6 +1179,10 @@
},
"minItems": 2,
"type": "array"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -1219,12 +1217,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"pid": {
@@ -1244,11 +1238,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1307,11 +1296,11 @@
"type": "string"
},
"window_id": {
- "description": "Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it).",
+ "description": "Window id from list_windows. Required with x/y; optional with element_token (the token carries it).",
"type": "integer"
},
"x": {
- "description": "Pixel X of the field to type into — the element px action form. Pass x,y (no element_index) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the AX path can't reach. Window-local pixels of the target window's own get_window_state screenshot by default (same convention as click); for get_desktop_state pixels pass scope:\"desktop\" (or coordinate_frame:\"desktop\") — a bare pid+x/y is otherwise misinterpreted as window-local and can focus the wrong widget.",
+ "description": "Pixel X of the field to type into — the element px action form. Pass x,y (no element_token) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the AX path can't reach. Window-local pixels of the target window's own get_window_state screenshot by default (same convention as click); for get_desktop_state pixels pass scope:\"desktop\" (or coordinate_frame:\"desktop\") — a bare pid+x/y is otherwise misinterpreted as window-local and can focus the wrong widget.",
"type": "number"
},
"y": {
@@ -1351,12 +1340,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"key": {
@@ -1387,11 +1372,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1450,7 +1430,7 @@
"type": "integer"
},
"x": {
- "description": "Pixel X — the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the AX path can't focus. Pass with y, no element_index. Window-local pixels by default (same convention as click); for get_desktop_state pixels pass scope:\"desktop\" (or coordinate_frame:\"desktop\").",
+ "description": "Pixel X — the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the AX path can't focus. Pass with y, no element_token. Window-local pixels by default (same convention as click); for get_desktop_state pixels pass scope:\"desktop\" (or coordinate_frame:\"desktop\").",
"type": "number"
},
"y": {
@@ -1482,12 +1462,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"keys": {
@@ -1515,11 +1491,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1601,12 +1572,17 @@
"input_schema": {
"additionalProperties": false,
"properties": {
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
+ "delivery_mode": {
+ "default": "background",
+ "description": "Input delivery mode. 'background' (default) never activates or raises the target window. On X11 it injects via XTEST / the XInput2 master pointer (no focus steal). On Wayland it goes through libei + xdg-desktop-portal, which injects to the compositor's input focus — Wayland's security model has no per-window background targeting, so a specific non-focused window cannot be aimed at; when no libei backend is available the tool returns a structured background_unavailable error. 'foreground' is the explicit escalation: activate the target (X11 _NET_ACTIVE_WINDOW; Wayland compositor activate), inject, then restore the prior active window — a brief focus swap unless the target was already active. Matches the macOS / Windows delivery_mode surface.",
+ "enum": [
+ "background",
+ "foreground"
+ ],
+ "type": "string"
},
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"pid": {
@@ -1617,11 +1593,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"value": {
"description": "New value. Written through AT-SPI EditableText/Value when the element exposes them; otherwise (GTK2 spin scales, VCL spin buttons) the field is clicked with the session's real pointer, its text selected and replaced through the virtual keyboard and committed with Tab, then read back.",
"type": [
@@ -1630,7 +1601,7 @@
]
},
"window_id": {
- "description": "Required when element_index is used; optional when element_token is supplied (the token carries it).",
+ "description": "Omit when element_token is supplied (the token carries it).",
"type": "integer"
}
},
@@ -1695,12 +1666,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"pid": {
@@ -1720,11 +1687,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1779,15 +1741,15 @@
"description": "Preferred per-call target: an exact window (`kind=\"window\"`, `pid`, `window_id`) or the\nprimary desktop (`kind=\"desktop\"`, `display_id=\"primary\"`)."
},
"window_id": {
- "description": "Window id from list_windows. Required with x/y or element_index; optional with element_token (the token carries it).",
+ "description": "Window id from list_windows. Required with x/y; optional with element_token (the token carries it).",
"type": "integer"
},
"x": {
- "description": "Window-local screenshot-pixel X of the scroll target. Pass with y and without element_index.",
+ "description": "Window-local screenshot-pixel X of the scroll target. Pass with y and without element_token.",
"type": "number"
},
"y": {
- "description": "Window-local screenshot-pixel Y of the scroll target. Pass with x and without element_index.",
+ "description": "Window-local screenshot-pixel Y of the scroll target. Pass with x and without element_token.",
"type": "number"
}
},
@@ -2178,7 +2140,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "check_permissions",
@@ -2198,6 +2165,10 @@
},
"type": "array"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"skip": {
"description": "Skip these checks (canonical names). Ignored when `include` is set.",
"items": {
@@ -2217,7 +2188,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_config",
@@ -2254,6 +2230,10 @@
"description": "Legacy per-field shape. Max dimension for screenshot resizing (0 = no limit).",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"value": {
"description": "New value for `key`. JSON type depends on the key."
}
@@ -2269,14 +2249,19 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_accessibility_tree",
"read_only": true
},
{
- "description": "Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixels, with 20% padding. Output is at most 500 px wide.\n\nAfter a zoom, pass from_zoom=true to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when the latest snapshot does not contain a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.",
+ "description": "Capture a cropped JPEG of a window region (x1,y1)–(x2,y2) in screenshot pixels, with 20% padding. Output is at most 500 px wide.\n\nAfter a zoom, pass from_zoom=true to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when no current snapshot contains a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.",
"destructive": false,
"idempotent": true,
"input_schema": {
@@ -2286,6 +2271,10 @@
"description": "Optional target pid. When omitted, the driver resolves the unique current snapshot for this session and window.",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"window_id": {
"description": "Window id of the window captured by get_window_state.",
"type": "integer"
@@ -2372,6 +2361,10 @@
"description": "CSS selector for click_element (e.g. 'button.submit', '#login a').",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"target_url_contains": {
"description": "Optional, for execute_javascript/insert_text/type_keystrokes: require exactly one browser tab whose URL contains this substring. Use this on a multi-tab browser — there's no built-in link between window_id and which tab a CDP call reaches.",
"type": "string"
@@ -2944,7 +2937,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "stop_recording",
@@ -2956,14 +2954,19 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_recording_state",
"read_only": true
},
{
- "description": "Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.\n\nCaveats:\n- Element-indexed actions (`click({pid, element_index})` etc.) will fail because element indices are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.\n- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.\n- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.",
+ "description": "Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.\n\nCaveats:\n- Element-token actions (`click({pid, element_token})` etc.) will fail because element tokens are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.\n- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.\n- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -2979,6 +2982,10 @@
"description": "Trajectory directory previously written by `start_recording`. Absolute or ~-rooted.",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"stop_on_error": {
"description": "Stop replay on the first tool-call error. Default true — set false to best-effort through the full trajectory.",
"type": "boolean"
@@ -3002,6 +3009,10 @@
"confirm": {
"description": "Run the install command. Without it, only the planned command is reported.",
"type": "boolean"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"type": "object"
@@ -3183,7 +3194,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "check_for_update",
@@ -3206,6 +3222,10 @@
"perception"
],
"type": "string"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -3268,6 +3288,10 @@
},
"required": [],
"type": "object"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
diff --git a/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json b/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
index 2b4f2986a6..e6f28d5376 100644
--- a/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
+++ b/scripts/docs-generators/cli-specs/cua-driver-mcp-windows.json
@@ -6,7 +6,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "list_apps",
@@ -26,6 +31,10 @@
"pid": {
"description": "Optional pid filter. When set, only this pid's windows are returned.",
"type": "integer"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"type": "object"
@@ -34,14 +43,14 @@
"read_only": true
},
{
- "description": "Walk a running app's UIA tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array — pass those indices to `click`, `type_text`, `scroll`, etc.\n\nINVARIANT: call `get_window_state` once per turn per (pid, window_id) before any element-indexed action against that window. The index map is replaced by the next snapshot of the same (pid, window_id).\n\nPREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of UIA patterns exposed as actions, omitted when empty), `frame: {x,y,w,h}`, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers — but new fields will only be added to the structured side.\n\nThe UIA tree walked is the window's tree (HWND-scoped); the screenshot and window bounds reported come from the same `window_id`. This is the source of truth for which window the caller intends to reason about — the driver never picks a window implicitly.\n\n`window_id` MUST belong to `pid`; the call returns `isError: true` otherwise. The driver does not auto-fall-back to a different window.\n\nSet `query` to a case-insensitive substring to project BOTH `tree_markdown` and `structuredContent.elements` to matching rows plus their ancestor chain. Original element indices are preserved. `total_element_count` reports the complete snapshot; `returned_element_count` reports the projection.\n\nAlways returns BOTH the element tree AND a screenshot — ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_index/element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored.\n\nThe mirror image: pass `include_accessibility_tree:false` to SKIP the UIA walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title) — the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_image_dimension` overrides the configured screenshot long-edge limit for this call; pass 0 for native resolution. Legacy `max_dimension` remains a cap on the configured limit.\n\nUses `IUIAutomationCacheRequest` to batch-fetch all element properties in a single COM call (Chrome's ~5000-element tree returns in ~2-3s instead of timing out at 4s with per-property RPCs).\n\nOptional `max_elements` / `max_depth` bound the UIA walk to mitigate context-window blow-up on Electron / large web apps that produce 10k+ element trees. When applied, BOTH the markdown and the structured elements are truncated identically. Omit both for current default behaviour (≤5 000 elements, depth ≤25).\n\nCHROMIUM COVERAGE: a browser-owned permission bubble can be composited outside the requested native window. Chromium-family snapshots therefore describe this limit in structuredContent.capture_coverage. After a verified ineffective window action, call escalate_session, take a fresh get_desktop_state snapshot, act explicitly in desktop scope if needed, then verify with another fresh desktop snapshot. This is separate from page JavaScript dialogs, which remain on browser_dialog.\n\nWindows requires no special permissions.",
+ "description": "Walk a running app's UIA tree and return BOTH a structured `elements` array (preferred) AND a Markdown rendering of the same tree (back-compat). Every actionable element is tagged with [element_index N] in the markdown and as `element_index` in the structured array; pass each element's `element_token` to `click`, `type_text`, `scroll`, etc.\n\nINVARIANT: call `get_window_state` once per turn per (pid, window_id) before any element action against that window. The next snapshot of the same (pid, window_id) replaces this one, stales its element tokens, and lists the replaced ids in `invalidated_snapshot_ids`.\n\nPREFERRED CONSUMERS read `structuredContent.elements` (one entry per indexed row with `element_index`, `role`, `label`, `value`, `enabled`, `selected`, `actions` (names of UIA patterns exposed as actions, omitted when empty), `frame: {x,y,w,h}`, `parent_index`, `depth`). The markdown `tree_markdown` stays available and unchanged in shape for existing text-parsing callers — but new fields will only be added to the structured side.\n\nThe UIA tree walked is the window's tree (HWND-scoped); the screenshot and window bounds reported come from the same `window_id`. This is the source of truth for which window the caller intends to reason about — the driver never picks a window implicitly.\n\n`window_id` MUST belong to `pid`; the call returns `isError: true` otherwise. The driver does not auto-fall-back to a different window.\n\nSet `query` to a case-insensitive substring to project BOTH `tree_markdown` and `structuredContent.elements` to matching rows plus their ancestor chain. Original element indices are preserved. `total_element_count` reports the complete snapshot; `returned_element_count` reports the projection.\n\nAlways returns BOTH the element tree AND a screenshot — ground on both and cross-check (the tree lies on some surfaces). Choose the modality at ACTION time: an element ax action (element_token → accessibility rung) or an element px action (x,y → pixel rung off this screenshot). capture_mode is deprecated and ignored.\n\nThe mirror image: pass `include_accessibility_tree:false` to SKIP the UIA walk entirely and return just the screenshot plus window metadata (window_bounds, app_name, window_title) — the capture-only path for a live window preview / picture-in-picture. Setting BOTH `include_accessibility_tree:false` and `include_screenshot:false` is an error. Optional `max_image_dimension` overrides the configured screenshot long-edge limit for this call; pass 0 for native resolution. Legacy `max_dimension` remains a cap on the configured limit.\n\nUses `IUIAutomationCacheRequest` to batch-fetch all element properties in a single COM call (Chrome's ~5000-element tree returns in ~2-3s instead of timing out at 4s with per-property RPCs).\n\nOptional `max_elements` / `max_depth` bound the UIA walk to mitigate context-window blow-up on Electron / large web apps that produce 10k+ element trees. When applied, BOTH the markdown and the structured elements are truncated identically. Omit both for current default behaviour (≤5 000 elements, depth ≤25).\n\nCHROMIUM COVERAGE: a browser-owned permission bubble can be composited outside the requested native window. Chromium-family snapshots therefore describe this limit in structuredContent.capture_coverage. After a verified ineffective window action, call escalate_session, take a fresh get_desktop_state snapshot, act explicitly in desktop scope if needed, then verify with another fresh desktop snapshot. This is separate from page JavaScript dialogs, which remain on browser_dialog.\n\nWindows requires no special permissions.",
"destructive": false,
"idempotent": false,
"input_schema": {
"additionalProperties": false,
"properties": {
"capture_mode": {
- "description": "DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot — ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_index/element_token) or an element px action (x,y). Any value (including the old \"som\"/\"screenshot\" aliases) is accepted but has no effect.",
+ "description": "DEPRECATED and ignored. get_window_state always returns BOTH the element tree and a screenshot — ground on both. The modality is chosen at action time by how you address the target: an element ax action (element_token) or an element px action (x,y). Any value (including the old \"som\"/\"screenshot\" aliases) is accepted but has no effect.",
"enum": [
"ax",
"vision"
@@ -312,6 +321,10 @@
"description": "Full path to executable. Windows-only; takes precedence over name/bundle_id/aumid (but not over `launch_path`).",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"start_minimized": {
"description": "When true, launch the app's window minimized to the taskbar instead of restored-but-not-activated. Use this when the agent wants to drive the app entirely in the background — the user's previously-frontmost window (e.g. terminal) stays visually on top. Desktop launches hold the foreground lock through startup and use SW_SHOWMINNOACTIVE; packaged-app activation remains broker-controlled and receives a best-effort SW_SHOWMINNOACTIVE post-pass. UIA / background dispatch still work on a minimized window; only `screenshot` and `delivery_mode:\"foreground\"` need it restored.",
"type": "boolean"
@@ -343,6 +356,10 @@
"pid": {
"description": "PID of the process to terminate.",
"type": "integer"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -364,6 +381,10 @@
"description": "Target process ID.",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"window_id": {
"description": "Optional HWND. Defaults to pid's first visible top-level window.",
"type": "integer"
@@ -484,6 +505,10 @@
"pid": {
"description": "PID of the process to inspect.",
"type": "integer"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -495,12 +520,16 @@
"read_only": true
},
{
- "description": "Left-click against a target pid. **Prefer `element_index` over pixel coordinates** — element_index works on backgrounded / minimized / hidden / off-desktop windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for `x, y` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the UIA tree.\n\nTwo addressing modes:\n\n- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window) — performs the UIA Invoke pattern on the cached element via PostMessage. No cursor move, no focus steal. Requires a prior `get_window_state(pid, window_id)` in this turn; the element_index cache is scoped per (pid, window_id) and is replaced by the next snapshot of the same window.\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`). On `delivery_mode:\"background\"` (the default), cua-driver FIRST does a UIA hit-test at the resolved screen position: if the deepest invokable element under that point exposes `InvokePattern`, it's invoked through the accessibility channel — same background-safe path as the `element_index` mode, no foreground swap, no visible flash. **This makes pixel clicks on UWP / WinUI3 / Win11 packaged apps work flash-free out of the box** — agents should default to `delivery_mode:\"background\"` even on XAML hosts whose CoreInput dispatcher drops raw PostMessage. The PostMessage(WM_LBUTTONDOWN/UP) fallback only runs when the UIA hit-test misses (canvas / video / WebGL / custom-drawn surfaces with no UIA peer), and on those targets `delivery_mode:\"background\"` returns a structured `background_unavailable` error if PostMessage is known to drop too — at which point you switch to `delivery_mode:\"foreground\"`. **Always try the default `background` click first and let that error be your signal — do NOT pass `foreground` preemptively because the target 'looks like' GTK/Chromium/etc. The driver decides when background is impossible; a guessed foreground click needlessly steals the user's focus.** `count: 2` posts two down/up pairs for a double-click. Pixel clicks need a visible on-screen window to anchor the coordinate conversion (errors with `pid X has no on-screen window` otherwise).\n\nExactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required for window scope and omitted for desktop scope. `window_id` is required when `element_index` is used (scopes the cache lookup). After a `zoom` call, pass `from_zoom=true` to auto-translate zoom-image coords back to full-window space.\n\nWindows-only convenience: `button: \"left\"|\"right\"|\"middle\"` switches the mouse button (Swift exposes right-click as a separate `right_click` tool). The Swift-only `action` / `modifier` / `debug_image_out` schema fields aren't supported yet.",
+ "description": "Left-click against a target pid. **Prefer `element_token` over pixel coordinates** — element_token works on backgrounded / minimized / hidden / off-desktop windows, surfaces a stable handle that survives rebuilds, and tells you what you're clicking via the cached element's role + label. Reach for `x, y` only when the target is a canvas / video / WebGL / custom-drawn surface that doesn't appear in the UIA tree.\n\nTwo addressing modes:\n\n- `element_token` (from the last `get_window_state` snapshot of that window) — performs the UIA Invoke pattern on the cached element via PostMessage. No cursor move, no focus steal. Requires a prior `get_window_state(pid, window_id)` in this turn; the token is stale once the next snapshot of the same window replaces it.\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`). On `delivery_mode:\"background\"` (the default), cua-driver FIRST does a UIA hit-test at the resolved screen position: if the deepest invokable element under that point exposes `InvokePattern`, it's invoked through the accessibility channel — same background-safe path as the `element_token` mode, no foreground swap, no visible flash. **This makes pixel clicks on UWP / WinUI3 / Win11 packaged apps work flash-free out of the box** — agents should default to `delivery_mode:\"background\"` even on XAML hosts whose CoreInput dispatcher drops raw PostMessage. The PostMessage(WM_LBUTTONDOWN/UP) fallback only runs when the UIA hit-test misses (canvas / video / WebGL / custom-drawn surfaces with no UIA peer), and on those targets `delivery_mode:\"background\"` returns a structured `background_unavailable` error if PostMessage is known to drop too — at which point you switch to `delivery_mode:\"foreground\"`. **Always try the default `background` click first and let that error be your signal — do NOT pass `foreground` preemptively because the target 'looks like' GTK/Chromium/etc. The driver decides when background is impossible; a guessed foreground click needlessly steals the user's focus.** `count: 2` posts two down/up pairs for a double-click. Pixel clicks need a visible on-screen window to anchor the coordinate conversion (errors with `pid X has no on-screen window` otherwise).\n\nExactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required for window scope and omitted for desktop scope. After a `zoom` call, pass `from_zoom=true` to auto-translate zoom-image coords back to full-window space.\n\nWindows-only convenience: `button: \"left\"|\"right\"|\"middle\"` switches the mouse button (Swift exposes right-click as a separate `right_click` tool). `action: \"expand\"` on an `element_token` opens the element through UIA ExpandCollapsePattern (the dropdown half of an MSAA split button); other actions use the default invoke. `debug_image_out` isn't supported yet.",
"destructive": true,
"idempotent": false,
"input_schema": {
"additionalProperties": false,
"properties": {
+ "action": {
+ "description": "Accessibility action for an element_token target. \"expand\" opens the element through UIA ExpandCollapsePattern, or clicks the dropdown half of an MSAA split button. Omit for the default invoke.",
+ "type": "string"
+ },
"button": {
"description": "Mouse button. Default \"left\".",
"enum": [
@@ -529,12 +558,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -565,11 +590,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"description": "Exact capture/input target selected independently for each action.\n\n`display_id=\"primary\"` is the portable desktop target in this release.\nPlatforms that cannot address another display reject it explicitly rather\nthan silently changing coordinate spaces.",
"oneOf": [
@@ -616,7 +636,7 @@
]
},
"window_id": {
- "description": "HWND for the window whose get_window_state produced the element_index. Required when element_index is used. Optional when element_token is supplied (the token carries it).",
+ "description": "HWND of the target window. Omit when element_token is supplied (the token carries it).",
"type": "integer"
},
"x": {
@@ -634,7 +654,7 @@
"read_only": false
},
{
- "description": "Double-click against a target pid. Two addressing modes:\n\n- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window) — synthesizes a stamped pixel double-click at the element's cached on-screen center via PostMessage. (Windows has no AXOpen analogue; Swift's AXOpen-first path falls through to the same pixel recipe when the element doesn't advertise AXOpen, so the user-visible behavior matches.)\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`) — posts two WM_LBUTTONDOWN/UP pairs in quick succession to the deepest child window at that point.\n\nExactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required in both modes. `window_id` is required when `element_index` is used. The macOS-only `modifier` field is accepted for parity (no-op on Windows — PostMessage doesn't propagate modifier-key state).",
+ "description": "Double-click against a target pid. Two addressing modes:\n\n- `element_token` (from the last `get_window_state` snapshot of that window) — synthesizes a stamped pixel double-click at the element's cached on-screen center via PostMessage. (Windows has no AXOpen analogue; Swift's AXOpen-first path falls through to the same pixel recipe when the element doesn't advertise AXOpen, so the user-visible behavior matches.)\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`) — posts two WM_LBUTTONDOWN/UP pairs in quick succession to the deepest child window at that point.\n\nExactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required in both modes. The macOS-only `modifier` field is accepted for parity (no-op on Windows — PostMessage doesn't propagate modifier-key state).",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -648,12 +668,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -675,13 +691,8 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"window_id": {
- "description": "HWND for the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it).",
+ "description": "HWND for the target window. Omit when element_token is supplied (the token carries it).",
"type": "integer"
},
"x": {
@@ -702,7 +713,7 @@
"read_only": false
},
{
- "description": "Right-click against a target pid. Two addressing modes:\n\n- `element_index` + `window_id` (from the last `get_window_state` snapshot of that window) — posts WM_RBUTTONDOWN/UP at the element's cached on-screen center via PostMessage. (Windows has no AXShowMenu analogue wired up yet; Swift's AX-action path falls through to the same pixel recipe on non-advertising elements, so user-visible behavior matches.)\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`) — posts WM_RBUTTONDOWN/UP to the deepest child window at that point.\n\nExactly one of `element_index` or (`x` AND `y`) must be provided. `pid` is required in both modes. `window_id` is required when `element_index` is used. `modifier` is accepted for parity (no-op on Windows — PostMessage doesn't propagate modifier-key state).",
+ "description": "Right-click against a target pid. Two addressing modes:\n\n- `element_token` (from the last `get_window_state` snapshot of that window) — posts WM_RBUTTONDOWN/UP at the element's cached on-screen center via PostMessage. (Windows has no AXShowMenu analogue wired up yet; Swift's AX-action path falls through to the same pixel recipe on non-advertising elements, so user-visible behavior matches.)\n\n- `x`, `y` (window-local screenshot pixels, top-left origin of the PNG returned by `get_window_state`) — posts WM_RBUTTONDOWN/UP to the deepest child window at that point.\n\nExactly one of `element_token` or (`x` AND `y`) must be provided. `pid` is required in both modes. `modifier` is accepted for parity (no-op on Windows — PostMessage doesn't propagate modifier-key state).",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -716,12 +727,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"from_zoom": {
@@ -743,13 +750,8 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"window_id": {
- "description": "HWND for the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it).",
+ "description": "HWND for the target window. Omit when element_token is supplied (the token carries it).",
"type": "integer"
},
"x": {
@@ -918,7 +920,7 @@
"read_only": false
},
{
- "description": "Insert text into the target pid via character-by-character PostMessage(WM_CHAR) to the focused window. No focus steal.\n\nSpecial keys (Return, Escape, arrows, Tab) go through `press_key` / `hotkey` — they are not text.\n\n**Routing on Windows.** When the target's owning EXE or top-level window class identifies it as a XAML / WinUI3 / UWP host (modern Notepad, Calculator, Photos, Settings, etc.), the tool requires `element_index` + `window_id` and routes through UI Automation's `ValuePattern.SetValue` — same backend as the `set_value` tool. PostMessage WM_CHAR doesn't reach those hosts (their CoreInput dispatcher only consumes events from the system input queue), so the fallback path silently dropped chars. If you call `type_text(pid, text)` on a XAML host without `element_index`, the tool returns an actionable error pointing you at `get_window_state` first. Native ConsoleHost on Windows ARM64 is hard-refused because it can accept synthesized Unicode events without delivering them; use a process or PTY setup channel instead. Legacy Win32 apps still use the PostMessage path, preserving the no-focus-steal property.\n\n`delay_ms` (0–200, default 30) spaces successive characters on the PostMessage path so autocomplete and IME can keep up. Ignored on the UIA path (SetValue is atomic).",
+ "description": "Insert text into the target pid via character-by-character PostMessage(WM_CHAR) to the focused window. No focus steal.\n\nSpecial keys (Return, Escape, arrows, Tab) go through `press_key` / `hotkey` — they are not text.\n\n**Routing on Windows.** When the target's owning EXE or top-level window class identifies it as a XAML / WinUI3 / UWP host (modern Notepad, Calculator, Photos, Settings, etc.), the tool requires `element_token` and routes through UI Automation's `ValuePattern.SetValue` — same backend as the `set_value` tool. PostMessage WM_CHAR doesn't reach those hosts (their CoreInput dispatcher only consumes events from the system input queue), so the fallback path silently dropped chars. If you call `type_text(pid, text)` on a XAML host without `element_token`, the tool returns an actionable error pointing you at `get_window_state` first. Native ConsoleHost on Windows ARM64 is hard-refused because it can accept synthesized Unicode events without delivering them; use a process or PTY setup channel instead. Legacy Win32 apps still use the PostMessage path, preserving the no-focus-steal property.\n\n`delay_ms` (0–200, default 30) spaces successive characters on the PostMessage path so autocomplete and IME can keep up. Ignored on the UIA path (SetValue is atomic).",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -938,12 +940,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from the last get_window_state for the same (pid, window_id). When supplied, type_text writes through UIA ValuePattern and reads that exact element back by handle. The shared ActionResult is confirmed only when the complete expected value is synchronously visible. If SetValue succeeds but read-back is stale or unavailable, the result is unverifiable with no escalation; take a fresh snapshot before retrying because deferred providers may publish only after this call returns. Requires window_id.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque element handle from get_window_state. When supplied, type_text writes through UIA ValuePattern and reads that exact element back by handle. The shared ActionResult is confirmed only when the complete expected value is synchronously visible. If SetValue succeeds but read-back is stale or unavailable, the result is unverifiable with no escalation; take a fresh snapshot before retrying because deferred providers may publish only after this call returns.",
"type": "string"
},
"pid": {
@@ -962,11 +960,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1025,11 +1018,11 @@
"type": "string"
},
"window_id": {
- "description": "HWND of the target window. Required when element_index is used. Optional when element_token is supplied (the token carries it).",
+ "description": "HWND of the target window. Omit when element_token is supplied (the token carries it).",
"type": "integer"
},
"x": {
- "description": "Window-local screenshot-pixel X of the field to type into — the element px action form. Pass x,y (no element_index) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the UIA/WM_CHAR path can't reach. Read straight off the get_window_state PNG, same convention as click.",
+ "description": "Window-local screenshot-pixel X of the field to type into — the element px action form. Pass x,y (no element_token) and the tool pixel-clicks there to establish real renderer focus, then types. Use for Chromium/Electron inputs the UIA/WM_CHAR path can't reach. Read straight off the get_window_state PNG, same convention as click.",
"type": "number"
},
"y": {
@@ -1046,7 +1039,7 @@
"read_only": false
},
{
- "description": "Press and release a single key, delivered directly to the target pid's top-level window via PostMessage(WM_KEYDOWN/WM_KEYUP). The target does NOT need to be frontmost — no focus steal.\n\nOptional `window_id` selects a specific HWND when the pid owns more than one; without it the first visible top-level window for the pid is used.\n\nKey vocabulary: return, tab, escape, up/down/left/right, space, delete, home, end, pageup, pagedown, f1-f12, plus any letter or digit. Optional `modifiers` array takes ctrl/shift/alt/win. For true combinations (ctrl+c), `hotkey` is a cleaner surface.\n\n`element_index` focuses the cached UIA element before sending the key; the top-level window remains backgrounded when delivery_mode is background.",
+ "description": "Press and release a single key, delivered directly to the target pid's top-level window via PostMessage(WM_KEYDOWN/WM_KEYUP). The target does NOT need to be frontmost — no focus steal.\n\nOptional `window_id` selects a specific HWND when the pid owns more than one; without it the first visible top-level window for the pid is used.\n\nKey vocabulary: return, tab, escape, up/down/left/right, space, delete, home, end, pageup, pagedown, f1-f12, plus any letter or digit. Optional `modifiers` array takes ctrl/shift/alt/win. For true combinations (ctrl+c), `hotkey` is a cleaner surface.\n\n`element_token` focuses the cached UIA element before sending the key; the top-level window remains backgrounded when delivery_mode is background.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -1060,12 +1053,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Optional element_index from the last get_window_state; focuses that UIA element before the key is delivered.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"key": {
@@ -1095,11 +1084,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1154,11 +1138,11 @@
"description": "Preferred per-call target: an exact window (`kind=\"window\"`, `pid`, `window_id`) or the\nprimary desktop (`kind=\"desktop\"`, `display_id=\"primary\"`)."
},
"window_id": {
- "description": "HWND for the target window. Required when element_index is used; otherwise auto-resolves the pid's first visible window.",
+ "description": "HWND for the target window. Omit when element_token is supplied; otherwise auto-resolves the pid's first visible window.",
"type": "integer"
},
"x": {
- "description": "Window-local screenshot-pixel X — the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the UIA path can't focus. Pass with y, no element_index.",
+ "description": "Window-local screenshot-pixel X — the element px action form: pixel-click there to focus, then send the key. Use when the key must go to a Chromium/Electron surface the UIA path can't focus. Pass with y, no element_token.",
"type": "number"
},
"y": {
@@ -1189,12 +1173,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"keys": {
@@ -1221,11 +1201,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1307,12 +1282,16 @@
"input_schema": {
"additionalProperties": false,
"properties": {
- "element_index": {
- "description": "Element index from get_window_state. Requires the matching `snapshot_id` alongside it. Prefer `element_token`, which carries both values.",
- "type": "integer"
+ "delivery_mode": {
+ "description": "Input delivery mode. 'background' (default) never swaps foreground: it routes through UIA Invoke / PostMessage and the window is never raised. For targets whose input stack silently drops posted events (Chromium/Electron content, GTK buttons, VCL/LibreOffice accelerators) the tool returns a structured background_unavailable error rather than fronting. 'foreground' is the explicit escalation: a brief SetForegroundWindow swap + SendInput, restoring the prior foreground afterward. IMPORTANT: 'background' is not a hint to weigh — it is the mandatory first attempt. Do NOT pass 'foreground' preemptively because a target 'looks like' GTK/Chromium/Electron; the DRIVER decides when background is impossible and tells you so via a background_unavailable error (or a verified no-op). Only THEN re-issue the same action with 'foreground'. The lists above are the driver's detectors, not a checklist for you to front on a guess — fronting up-front needlessly steals the user's focus and is a bug, not a shortcut. Matches the macOS delivery_mode surface.",
+ "enum": [
+ "background",
+ "foreground"
+ ],
+ "type": "string"
},
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"pid": {
@@ -1323,17 +1302,12 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"value": {
"description": "New value. UIA will coerce to the element's native type.",
"type": "string"
},
"window_id": {
- "description": "HWND of the window. Required when element_index is used; optional when element_token is supplied (the token carries it).",
+ "description": "HWND of the window. Omit when element_token is supplied (the token carries it).",
"type": "integer"
}
},
@@ -1347,7 +1321,7 @@
"read_only": false
},
{
- "description": "Scroll the target pid's focused region.\n\nWindows transport: WM_VSCROLL / WM_HSCROLL posted to the window — the same events the OS sends when scrollbars or trackpads scroll, so any window that handles scrollbars correctly responds to this. Swift uses synthesized keystrokes (PageDown / arrow keys) via auth-signed SLEventPostToPid; both approaches reach backgrounded windows.\n\nMapping: `by: \"page\"` → SB_PAGEDOWN/UP/LEFT/RIGHT × amount; `by: \"line\"` → SB_LINEDOWN/UP/LEFT/RIGHT × amount.\n\nNote: `element_index` is accepted for cross-platform parity but currently no-op on Windows (UIA SetFocus not wired up yet — same caveat as `press_key`).",
+ "description": "Scroll the target pid's focused region.\n\nWindows transport: WM_VSCROLL / WM_HSCROLL posted to the window — the same events the OS sends when scrollbars or trackpads scroll, so any window that handles scrollbars correctly responds to this. Swift uses synthesized keystrokes (PageDown / arrow keys) via auth-signed SLEventPostToPid; both approaches reach backgrounded windows.\n\nMapping: `by: \"page\"` → SB_PAGEDOWN/UP/LEFT/RIGHT × amount; `by: \"line\"` → SB_LINEDOWN/UP/LEFT/RIGHT × amount.\n\nNote: `element_token` is accepted for cross-platform parity but currently no-op on Windows (UIA SetFocus not wired up yet — same caveat as `press_key`).",
"destructive": false,
"idempotent": false,
"input_schema": {
@@ -1385,12 +1359,8 @@
],
"type": "string"
},
- "element_index": {
- "description": "Optional element_index. Accepted for parity; currently no-op on Windows.",
- "type": "integer"
- },
"element_token": {
- "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. If element_index, snapshot_id, or window_id are also supplied they must agree. Returns an explicit stale error once a newer snapshot supersedes it.",
+ "description": "Opaque per-snapshot element handle from `structuredContent.elements[].element_token`. Returns an explicit stale error naming the current snapshots once a newer read supersedes it.",
"type": "string"
},
"pid": {
@@ -1410,11 +1380,6 @@
"description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
"type": "string"
},
- "snapshot_id": {
- "description": "Snapshot handle from get_window_state. Required when targeting by element_index; stale snapshots fail closed.",
- "pattern": "^s[0-9a-f]{8}$",
- "type": "string"
- },
"target": {
"anyOf": [
{
@@ -1469,7 +1434,7 @@
"description": "Preferred per-call target: an exact window (`kind=\"window\"`, `pid`, `window_id`) or the\nprimary desktop (`kind=\"desktop\"`, `display_id=\"primary\"`)."
},
"window_id": {
- "description": "HWND of the target window. Required when element_index is used; otherwise auto-resolves the pid's first visible window.",
+ "description": "HWND of the target window. Omit when element_token is supplied; otherwise auto-resolves the pid's first visible window.",
"type": "integer"
},
"x": {
@@ -1867,7 +1832,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "check_permissions",
@@ -1887,6 +1857,10 @@
},
"type": "array"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"skip": {
"description": "Skip these checks (canonical names). Ignored when `include` is set.",
"items": {
@@ -1906,7 +1880,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_config",
@@ -1943,6 +1922,10 @@
"description": "Legacy per-field shape.",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"value": {
"description": "New value for `key`. JSON type depends on the key."
}
@@ -1958,14 +1941,19 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_accessibility_tree",
"read_only": true
},
{
- "description": "Zoom into a rectangular region of a window screenshot at full (native) resolution. Use this when `get_window_state` returned a resized image and you need to read small text, identify icons, or verify UI details.\n\nCoordinates `x1, y1, x2, y2` are in the same pixel space as the screenshot returned by `get_window_state` (i.e. the resized image if `max_image_dimension` is active). The maximum zoom region width is 500 px in scaled-image coordinates.\n\nA 20% padding is automatically added on every side of the requested region so the target remains visible even if the caller's coordinates are slightly off.\n\nAfter a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when the latest snapshot does not contain a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.\n\nWindows-specific: `window_id` is the canonical addressing field (HWND). `pid` is preferred when available; otherwise the driver resolves the unique current snapshot owned by this session and window.",
+ "description": "Zoom into a rectangular region of a window screenshot at full (native) resolution. Use this when `get_window_state` returned a resized image and you need to read small text, identify icons, or verify UI details.\n\nCoordinates `x1, y1, x2, y2` are in the same pixel space as the screenshot returned by `get_window_state` (i.e. the resized image if `max_image_dimension` is active). The maximum zoom region width is 500 px in scaled-image coordinates.\n\nA 20% padding is automatically added on every side of the requested region so the target remains visible even if the caller's coordinates are slightly off.\n\nAfter a zoom, pass `from_zoom=true` to click/type_text to auto-translate coordinates back to full-window space. Coordinate actions return `screenshot_context_missing` when no current snapshot contains a screenshot owned by this session. `from_zoom` actions return `zoom_context_missing` when the zoom was never created or was replaced; call `get_window_state`, then `zoom`, again on the same connection.\n\nWindows-specific: `window_id` is the canonical addressing field (HWND). `pid` is preferred when available; otherwise the driver resolves the unique current snapshot owned by this session and window.",
"destructive": false,
"idempotent": false,
"input_schema": {
@@ -1975,6 +1963,10 @@
"description": "Optional target process ID. When omitted, the unique current snapshot for this session and HWND is used.",
"type": "integer"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"window_id": {
"description": "HWND of the target window.",
"type": "integer"
@@ -2061,6 +2053,10 @@
"description": "CSS selector for click_element (e.g. 'button.submit', '#login a').",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"target_url_contains": {
"description": "Optional, for execute_javascript/insert_text/type_keystrokes: require exactly one browser tab whose URL contains this substring. Use this on a multi-tab browser — there's no built-in link between window_id and which tab a CDP call reaches.",
"type": "string"
@@ -2633,7 +2629,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "stop_recording",
@@ -2645,14 +2646,19 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "get_recording_state",
"read_only": true
},
{
- "description": "Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.\n\nCaveats:\n- Element-indexed actions (`click({pid, element_index})` etc.) will fail because element indices are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.\n- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.\n- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.",
+ "description": "Replay a recorded trajectory by re-invoking every turn's tool call in lexical order. `dir` must point at a directory previously written by `start_recording`. Each `turn-NNNNN/` is parsed for `action.json`, and the recorded tool is called with its recorded `arguments` via the same dispatch path an MCP / CLI call uses.\n\nCaveats:\n- Element-token actions (`click({pid, element_token})` etc.) will fail because element tokens are per-snapshot and don't survive across sessions. Pixel clicks (`click({pid, x, y})`) and all keyboard tools replay cleanly. Failures are reported but don't stop replay unless `stop_on_error` is true.\n- `get_window_state` and other read-only tools are NOT currently recorded, so replays do not re-populate the per-(pid, window_id) element cache.\n- If recording is ENABLED while replay runs, the replay itself is recorded into the currently configured output directory. That's deliberate: recording a replay against a new build and diffing the two trajectories is the regression-test workflow.",
"destructive": true,
"idempotent": false,
"input_schema": {
@@ -2668,6 +2674,10 @@
"description": "Trajectory directory previously written by `start_recording`. Absolute or ~-rooted.",
"type": "string"
},
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ },
"stop_on_error": {
"description": "Stop replay on the first tool-call error. Default true — set false to best-effort through the full trajectory.",
"type": "boolean"
@@ -2691,6 +2701,10 @@
"confirm": {
"description": "Run the install command. Without it, only the planned command is reported.",
"type": "boolean"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"type": "object"
@@ -2872,7 +2886,12 @@
"idempotent": true,
"input_schema": {
"additionalProperties": false,
- "properties": {},
+ "properties": {
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
+ }
+ },
"type": "object"
},
"name": "check_for_update",
@@ -2895,6 +2914,10 @@
"perception"
],
"type": "string"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
@@ -2957,6 +2980,10 @@
},
"required": [],
"type": "object"
+ },
+ "session": {
+ "description": "For multi-call work, prefer a short public session label and repeat it on every call that accepts it. Omit it to use the authenticated transport's implicit lifecycle session.",
+ "type": "string"
}
},
"required": [
diff --git a/scripts/docs-generators/cli-specs/cua-driver.json b/scripts/docs-generators/cli-specs/cua-driver.json
index cc5fc5710e..8e7a9bbe92 100644
--- a/scripts/docs-generators/cli-specs/cua-driver.json
+++ b/scripts/docs-generators/cli-specs/cua-driver.json
@@ -2160,5 +2160,5 @@
}
],
"name": "cua-driver",
- "version": "0.31.0"
+ "version": "0.32.0"
}
diff --git a/scripts/docs-generators/cli-specs/cua.json b/scripts/docs-generators/cli-specs/cua.json
index 39a5967e79..980e7d9442 100644
--- a/scripts/docs-generators/cli-specs/cua.json
+++ b/scripts/docs-generators/cli-specs/cua.json
@@ -2103,7 +2103,7 @@
"subcommands": [
{
"abstract": "Create a sandbox: `cua sb create IMAGE [--on local|cloud|direct:<addr>] [--kind auto|container|vm] [--runtime auto|gvisor|runc|qemu|lume|kubevirt]`",
- "after_help": "Examples:\n # A Linux desktop on this machine (a gVisor container)\n cua sb create linux --name dev\n # The same image in the cloud, as a VM\n cua sb create linux --on cloud --kind vm --name dev\n # A web server container, ready when its HTTP service answers\n cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000",
+ "after_help": "Examples:\n # A Linux desktop on this machine (a gVisor container)\n cua sb create linux --name dev\n # A web server container, ready when its HTTP service answers\n cua sb create python:3.12-slim --service web=8000 --wait http:web/ -- python -m http.server 8000\n # The same Linux image in the cloud instead, as a VM\n cua sb create linux --on cloud --kind vm --name dev",
"aliases": [],
"arguments": [
{
diff --git a/scripts/docs-generators/cli-specs/lume.json b/scripts/docs-generators/cli-specs/lume.json
index d5c223e57d..f5e1fe0d39 100644
--- a/scripts/docs-generators/cli-specs/lume.json
+++ b/scripts/docs-generators/cli-specs/lume.json
@@ -1888,5 +1888,5 @@
}
],
"name": "lume",
- "version": "0.5.3"
+ "version": "0.6.0"
}
diff --git a/scripts/docs-generators/cua-sdk.ts b/scripts/docs-generators/cua-sdk.ts
index fc8884e39e..e088f86340 100644
--- a/scripts/docs-generators/cua-sdk.ts
+++ b/scripts/docs-generators/cua-sdk.ts
@@ -810,10 +810,19 @@ export const PAGES: PageSpec[] = [
{
slug: 'spaces/app-core/teleport',
title: 'Teleport picker',
- description: 'The teleport picker and review, consent, the transfer overlay and drag-and-drop.',
- intro: 'The picker lists `Teleport.catalog` entries, reviews a `Teleport.plan` with its consent items, and follows the run. The transfer and drag overlays show a teleport in progress.',
+ description: 'The teleport picker and review, and consent.',
+ intro: 'The picker lists `Teleport.catalog` entries, reviews a `Teleport.plan` with its consent items, and follows the run. The overlays that show a teleport in progress are on [Teleport transfer and drag](/cua-sdk/reference/spaces/app-core/teleport-transfer).',
items: ['AppEntrySection', 'AppReviewView', 'AppPlanStepView', 'AppInstallCuaPrompt'],
- prefixes: ['AppPicker', 'app_picker_', 'AppTeleport', 'app_teleport_', 'AppTransfer', 'app_transfer_', 'AppDragOverlay', 'AppCatalog', 'app_catalog_', 'AppConsent'],
+ prefixes: ['AppPicker', 'app_picker_', 'AppTeleport', 'app_teleport_', 'AppCatalog', 'app_catalog_', 'AppConsent'],
+ spaces: true,
+ },
+ {
+ slug: 'spaces/app-core/teleport-transfer',
+ title: 'Teleport transfer and drag',
+ description: 'The overlays that show a teleport in progress: the transfer overlay and drag-and-drop onto a Space.',
+ intro: 'The transfer overlay follows a running teleport step by step; the drag overlay shows a file or app dragged onto a Space.',
+ items: [],
+ prefixes: ['AppTransfer', 'app_transfer_', 'AppDragOverlay'],
spaces: true,
},
{
diff --git a/scripts/images/attest-doctor-reports.sh b/scripts/images/attest-doctor-reports.sh
index b62df9db68..ae4a034fd6 100755
--- a/scripts/images/attest-doctor-reports.sh
+++ b/scripts/images/attest-doctor-reports.sh
@@ -29,7 +29,14 @@ ledger_checkout() {
else
git -C "$REPO_ROOT" worktree add -q --detach "$dir"
git -C "$dir" checkout -q --orphan "$LEDGER_BRANCH"
- git -C "$dir" rm -rq . >/dev/null 2>&1 || true
+ # An orphan checkout keeps the whole tree staged: empty the index
+ # and the worktree, or the first ledger commit carries the repo.
+ git -C "$dir" read-tree --empty
+ git -C "$dir" clean -fdxq
+ if [ -n "$(git -C "$dir" ls-files | head -1)" ] || [ -n "$(ls -A "$dir" | grep -vx .git)" ]; then
+ echo "error: the new ledger worktree is not empty" >&2
+ return 1
+ fi
printf '# image-doctor ledger\n\nWritten by the image workflows only (scripts/images/doctor_ledger.py).\n' >"$dir/README.md"
fi
echo "$dir"
diff --git a/scripts/images/tests/test_ledger_checkout.py b/scripts/images/tests/test_ledger_checkout.py
new file mode 100644
index 0000000000..b96cac4045
--- /dev/null
+++ b/scripts/images/tests/test_ledger_checkout.py
@@ -0,0 +1,54 @@
+"""attest-doctor-reports.sh ledger_checkout: a new ledger branch starts empty."""
+
+from __future__ import annotations
+
+import os
+import subprocess
+import tempfile
+import unittest
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+SCRIPT = os.path.join(HERE, "..", "attest-doctor-reports.sh")
+
+
+def git(*args: str, cwd: str) -> str:
+ return subprocess.run(["git", *args], cwd=cwd, check=True, capture_output=True, text=True).stdout
+
+
+class LedgerCheckoutTests(unittest.TestCase):
+ def test_first_ledger_commit_holds_only_the_ledger(self) -> None:
+ with tempfile.TemporaryDirectory() as d:
+ origin, repo, attest = (os.path.join(d, n) for n in ("origin.git", "repo", "attest"))
+ git("init", "-q", "--bare", origin, cwd=d)
+ git("init", "-q", repo, cwd=d)
+ for name in ("README.md", "src/lib.rs"):
+ os.makedirs(os.path.dirname(os.path.join(repo, name)) or repo, exist_ok=True)
+ with open(os.path.join(repo, name), "w") as fh:
+ fh.write("repository file\n")
+ git("add", "-A", cwd=repo)
+ git("-c", "user.name=t", "-c", "[email protected]", "commit", "-qm", "init", cwd=repo)
+ git("remote", "add", "origin", origin, cwd=repo)
+ # Only the function under test, with the repository it acts on.
+ with open(SCRIPT) as fh:
+ lines = fh.read().splitlines()
+ start = lines.index("ledger_checkout() {")
+ end = lines.index("}", start)
+ remove = lines.index("ledger_remove() {")
+ body = "\n".join(lines[start : end + 1] + lines[remove : lines.index("}", remove) + 1])
+ out = subprocess.run(
+ ["bash", "-c", f'set -euo pipefail\n{body}\nledger_checkout'],
+ cwd=repo,
+ env={**os.environ, "REPO_ROOT": repo, "ATTEST": attest, "LEDGER_BRANCH": "image-doctor-ledger"},
+ check=True,
+ capture_output=True,
+ text=True,
+ ).stdout.strip()
+ self.assertEqual(sorted(os.listdir(out)), [".git", "README.md"])
+ git("add", "-A", cwd=out)
+ self.assertEqual(git("ls-files", cwd=out).split(), ["README.md"])
+ with open(os.path.join(out, "README.md")) as fh:
+ self.assertIn("image-doctor ledger", fh.read())
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/tests/e2e/cua-sdk/python/test_docs_blocks.py b/tests/e2e/cua-sdk/python/test_docs_blocks.py
index 95ba9e98e1..59004a0a04 100644
--- a/tests/e2e/cua-sdk/python/test_docs_blocks.py
+++ b/tests/e2e/cua-sdk/python/test_docs_blocks.py
@@ -320,10 +320,15 @@ except SyntaxError as e:
def _run_python(block, blocks, sandbox_python, request, tmp_path):
+ # Only a named session is cumulative; blocks without one stand alone
+ # (otherwise every earlier block on the page, and its sandbox, reruns).
session = [
b
for b in blocks
- if b.guide == block.guide and b.session == block.session and b.index < block.index
+ if block.session
+ and b.guide == block.guide
+ and b.session == block.session
+ and b.index < block.index
]
extra = _hermetic_env(block, request, tmp_path / "home")
program = "\n".join(
diff --git a/tests/e2e/cua-sdk/rust/src/lib.rs b/tests/e2e/cua-sdk/rust/src/lib.rs
index 91f1bd0199..d78fa28f4f 100644
--- a/tests/e2e/cua-sdk/rust/src/lib.rs
+++ b/tests/e2e/cua-sdk/rust/src/lib.rs
@@ -327,6 +327,7 @@ pub fn opts(on: &str) -> SandboxCreateOptions {
network: None,
overlays: vec![],
keep_on_failure: false,
+ gpu: None,
}
}
diff --git a/uv.lock b/uv.lock
index 9efca01951..1fe9b2025d 100644
--- a/uv.lock
+++ b/uv.lock
@@ -877,7 +877,7 @@ provides-extras = ["test", "sandbox", "agent", "ui", "all"]
[[package]]
name = "cua-agent"
-version = "0.8.4"
+version = "0.9.0"
source = { editable = "libs/python/agent" }
dependencies = [
{ name = "aiohttp" },
@@ -1041,7 +1041,7 @@ provides-extras = ["computer", "openai", "anthropic", "qwen", "uitars", "uitars-
[[package]]
name = "cua-bench-ui"
-version = "0.7.0"
+version = "0.7.1"
source = { editable = "libs/python/bench-ui" }
dependencies = [
{ name = "aiohttp" },
@@ -1058,7 +1058,7 @@ requires-dist = [
[[package]]
name = "cua-core"
-version = "0.3.1"
+version = "0.3.2"
source = { editable = "libs/python/core" }
dependencies = [
{ name = "posthog" },
@@ -1110,7 +1110,7 @@ wheels = [
[[package]]
name = "cua-sandbox"
-version = "0.8.0"
+version = "0.9.0"
source = { editable = "libs/python/cua-sandbox" }
dependencies = [
{ name = "cua" },